1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-13 10:21:18 +00:00

Merge branch 'main' into bottle_info

This commit is contained in:
Pablo 2024-10-11 17:33:55 +02:00
commit c1b2f3867e
115 changed files with 6584 additions and 631 deletions

View file

@ -30,7 +30,8 @@ COMPILER ?= ido
# gc-eu-mq GameCube Europe/PAL Master Quest
# gc-jp-ce GameCube Japan (Collector's Edition disc)
# The following versions are work-in-progress and not yet matching:
# (none currently)
# ntsc-1.0 N64 NTSC 1.0 (Japan/US depending on REGION)
# ntsc-1.1 N64 NTSC 1.1 (Japan/US depending on REGION)
VERSION ?= gc-eu-mq-dbg
# Number of threads to extract and compress with
N_THREADS ?= $(shell nproc)
@ -50,7 +51,19 @@ CPP_DEFINES ?=
REGIONAL_CHECKSUM := 0
# Version-specific settings
ifeq ($(VERSION),pal-1.0)
ifeq ($(VERSION),ntsc-1.0)
REGIONAL_CHECKSUM := 1
REGION ?= JP
PLATFORM := N64
DEBUG := 0
COMPARE := 0
else ifeq ($(VERSION),ntsc-1.1)
REGIONAL_CHECKSUM := 1
REGION ?= JP
PLATFORM := N64
DEBUG := 0
COMPARE := 0
else ifeq ($(VERSION),pal-1.0)
REGION ?= EU
PLATFORM := N64
DEBUG := 0

View file

@ -6,7 +6,7 @@
<Room Name="ddan_boss_room_0" Offset="0x0"/>
</File>
<File Name="ddan_boss_room_1" Segment="3">
<Texture Name="gDodongosCavernBossLavaFloorTex" OutName="lava_floor" Format="rgba16" Width="32" Height="64" Offset="0x21D8"/>
<Texture Name="gDodongosCavernBossLavaFloorTex" OutName="lava_floor" Format="rgba16" Width="32" Height="64" Offset="0x21C8"/>
<Room Name="ddan_boss_room_1" Offset="0x0"/>
</File>
</Root>

View file

@ -0,0 +1,12 @@
<Root>
<File Name="ddan_boss_scene" Segment="2">
<Scene Name="ddan_boss_scene" Offset="0x0"/>
</File>
<File Name="ddan_boss_room_0" Segment="3">
<Room Name="ddan_boss_room_0" Offset="0x0"/>
</File>
<File Name="ddan_boss_room_1" Segment="3">
<Texture Name="gDodongosCavernBossLavaFloorTex" OutName="lava_floor" Format="rgba16" Width="32" Height="64" Offset="0x21D8"/>
<Room Name="ddan_boss_room_1" Offset="0x0"/>
</File>
</Root>

View file

@ -1,8 +1,8 @@
<Root>
<File Name="ice_doukutu_scene" Segment="2">
<Cutscene Name="gIceCavernSerenadeCs" Offset="0x250"/>
<Texture Name="gIceCavernNightEntranceTex" OutName="night_entrance" Format="ia16" Width="64" Height="4" Offset="0xF7F0"/>
<Texture Name="gIceCavernDayEntranceTex" OutName="day_entrance" Format="ia16" Width="64" Height="4" Offset="0xF9F0"/>
<Texture Name="gIceCavernNightEntranceTex" OutName="night_entrance" Format="ia16" Width="64" Height="4" Offset="0xF810"/>
<Texture Name="gIceCavernDayEntranceTex" OutName="day_entrance" Format="ia16" Width="64" Height="4" Offset="0xFA10"/>
<Scene Name="ice_doukutu_scene" Offset="0x0"/>
</File>
<File Name="ice_doukutu_room_0" Segment="3">

View file

@ -0,0 +1,44 @@
<Root>
<File Name="ice_doukutu_scene" Segment="2">
<Cutscene Name="gIceCavernSerenadeCs" Offset="0x250"/>
<Texture Name="gIceCavernNightEntranceTex" OutName="night_entrance" Format="ia16" Width="64" Height="4" Offset="0xF7F0"/>
<Texture Name="gIceCavernDayEntranceTex" OutName="day_entrance" Format="ia16" Width="64" Height="4" Offset="0xF9F0"/>
<Scene Name="ice_doukutu_scene" Offset="0x0"/>
</File>
<File Name="ice_doukutu_room_0" Segment="3">
<Room Name="ice_doukutu_room_0" Offset="0x0"/>
</File>
<File Name="ice_doukutu_room_1" Segment="3">
<Room Name="ice_doukutu_room_1" Offset="0x0"/>
</File>
<File Name="ice_doukutu_room_2" Segment="3">
<Room Name="ice_doukutu_room_2" Offset="0x0"/>
</File>
<File Name="ice_doukutu_room_3" Segment="3">
<Room Name="ice_doukutu_room_3" Offset="0x0"/>
</File>
<File Name="ice_doukutu_room_4" Segment="3">
<Room Name="ice_doukutu_room_4" Offset="0x0"/>
</File>
<File Name="ice_doukutu_room_5" Segment="3">
<Room Name="ice_doukutu_room_5" Offset="0x0"/>
</File>
<File Name="ice_doukutu_room_6" Segment="3">
<Room Name="ice_doukutu_room_6" Offset="0x0"/>
</File>
<File Name="ice_doukutu_room_7" Segment="3">
<Room Name="ice_doukutu_room_7" Offset="0x0"/>
</File>
<File Name="ice_doukutu_room_8" Segment="3">
<Room Name="ice_doukutu_room_8" Offset="0x0"/>
</File>
<File Name="ice_doukutu_room_9" Segment="3">
<Room Name="ice_doukutu_room_9" Offset="0x0"/>
</File>
<File Name="ice_doukutu_room_10" Segment="3">
<Room Name="ice_doukutu_room_10" Offset="0x0"/>
</File>
<File Name="ice_doukutu_room_11" Segment="3">
<Room Name="ice_doukutu_room_11" Offset="0x0"/>
</File>
</Root>

View file

@ -7,7 +7,6 @@
<Scene Name="spot01_scene" Offset="0x0"/>
</File>
<File Name="spot01_room_0" Segment="3">
<DList Name="gSpot01DL_009E38" Offset="0x9E38"/>
<Room Name="spot01_room_0" Offset="0x0"/>
</File>
</Root>

View file

@ -8,7 +8,6 @@
<Cutscene Name="gGraveyardIntroCs" Offset="0x70C0"/>
</File>
<File Name="spot02_room_0" Segment="3">
<DList Name="gSpot02DL_0026D0" Offset="0x26D0"/>
<Room Name="spot02_room_0" Offset="0x0"/>
</File>
<File Name="spot02_room_1" Segment="3">

View file

@ -14,8 +14,6 @@
<Room Name="spot04_room_1" Offset="0x0"/>
</File>
<File Name="spot04_room_2" Segment="3">
<DList Name="gSpot04DL_002BB8" Offset="0x2BB8"/>
<DList Name="gSpot04DL_005058" Offset="0x5058"/>
<Room Name="spot04_room_2" Offset="0x0"/>
</File>
</Root>

View file

@ -8,9 +8,6 @@
<Scene Name="spot09_scene" Offset="0x0"/>
</File>
<File Name="spot09_room_0" Segment="3">
<DList Name="gSpot09DL_007108" Offset="0x7108"/>
<DList Name="gSpot09DL_008780" Offset="0x8780"/>
<Room Name="spot09_room_0" Offset="0x0"/>
</File>
</Root>

View file

@ -10,6 +10,6 @@
</File>
<File Name="spot16_room_0" Segment="3">
<Room Name="spot16_room_0" Offset="0x0"/>
<DList Name="spot16_room_0DL_00AA48" Offset="0xAA48"/>
<DList Name="spot16_room_0DL_00AA48" Offset="0xA9C8"/>
</File>
</Root>

View file

@ -0,0 +1,15 @@
<Root>
<File Name="spot16_scene" Segment="2">
<Cutscene Name="gDMTOwlCs" Offset="0x1E6A0"/>
<Cutscene Name="gDMTIntroCs" Offset="0x7EA0"/>
<Path Name="spot16_scenePathList_000254" Offset="0x254" NumPaths="2"/>
<Path Name="spot16_scenePathList_007884" Offset="0x7884" NumPaths="3"/>
<Scene Name="spot16_scene" Offset="0x0"/>
<Scene Name="spot16_scene_unused" Offset="0x78A0"/>
<Texture Name="spot16_scene_Tex_01AE98" Format="i4" Width="64" Height="64" Offset="0x1AE98"/>
</File>
<File Name="spot16_room_0" Segment="3">
<Room Name="spot16_room_0" Offset="0x0"/>
<DList Name="spot16_room_0DL_00AA48" Offset="0xAA48"/>
</File>
</Root>

View file

@ -3,6 +3,6 @@
<Texture Name="nintendo_rogo_static_Tex_000000" OutName="tex_00000000" Format="i8" Width="192" Height="32" Offset="0x0000"/>
<Texture Name="nintendo_rogo_static_Tex_001800" OutName="tex_00001800" Format="i8" Width="32" Height="32" Offset="0x1800"/>
<DList Name="gNintendo64LogoDL" Offset="0x2720"/>
<DList Name="gNintendo64LogoDL" Offset="0x27A0"/>
</File>
</Root>

View file

@ -0,0 +1,8 @@
<Root>
<File Name="nintendo_rogo_static" Segment="1">
<Texture Name="nintendo_rogo_static_Tex_000000" OutName="tex_00000000" Format="i8" Width="192" Height="32" Offset="0x0000"/>
<Texture Name="nintendo_rogo_static_Tex_001800" OutName="tex_00001800" Format="i8" Width="32" Height="32" Offset="0x1800"/>
<DList Name="gNintendo64LogoDL" Offset="0x2720"/>
</File>
</Root>

View file

@ -988,7 +988,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan_mq.xml
- name: scenes/dungeons/ddan_boss
xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
xml_path: assets/xml/scenes/dungeons/ddan_boss_v2.xml
- name: scenes/dungeons/FIRE_bs
xml_path: assets/xml/scenes/dungeons/FIRE_bs.xml
- name: scenes/dungeons/ganon
@ -1160,7 +1160,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
xml_path: assets/xml/scenes/overworld/spot16.xml
xml_path: assets/xml/scenes/overworld/spot16_v2.xml
- name: scenes/overworld/spot17
xml_path: assets/xml/scenes/overworld/spot17.xml
- name: scenes/overworld/spot18
@ -1236,7 +1236,7 @@ assets:
- name: textures/nes_font_static
xml_path: assets/xml/textures/nes_font_static_v2.xml
- name: textures/nintendo_rogo_static
xml_path: assets/xml/textures/nintendo_rogo_static.xml
xml_path: assets/xml/textures/nintendo_rogo_static_v2.xml
- name: textures/parameter_static
xml_path: assets/xml/textures/parameter_static.xml
- name: textures/place_title_cards

View file

@ -972,7 +972,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan_mq.xml
- name: scenes/dungeons/ddan_boss
xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
xml_path: assets/xml/scenes/dungeons/ddan_boss_v2.xml
- name: scenes/dungeons/FIRE_bs
xml_path: assets/xml/scenes/dungeons/FIRE_bs.xml
- name: scenes/dungeons/ganon
@ -1142,7 +1142,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
xml_path: assets/xml/scenes/overworld/spot16.xml
xml_path: assets/xml/scenes/overworld/spot16_v2.xml
- name: scenes/overworld/spot17
xml_path: assets/xml/scenes/overworld/spot17.xml
- name: scenes/overworld/spot18
@ -1202,7 +1202,7 @@ assets:
- name: textures/nes_font_static
xml_path: assets/xml/textures/nes_font_static_v2.xml
- name: textures/nintendo_rogo_static
xml_path: assets/xml/textures/nintendo_rogo_static.xml
xml_path: assets/xml/textures/nintendo_rogo_static_v2.xml
- name: textures/parameter_static
xml_path: assets/xml/textures/parameter_static.xml
- name: textures/place_title_cards

View file

@ -972,7 +972,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan.xml
- name: scenes/dungeons/ddan_boss
xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
xml_path: assets/xml/scenes/dungeons/ddan_boss_v2.xml
- name: scenes/dungeons/FIRE_bs
xml_path: assets/xml/scenes/dungeons/FIRE_bs.xml
- name: scenes/dungeons/ganon
@ -1000,7 +1000,7 @@ assets:
- name: scenes/dungeons/HIDAN
xml_path: assets/xml/scenes/dungeons/HIDAN.xml
- name: scenes/dungeons/ice_doukutu
xml_path: assets/xml/scenes/dungeons/ice_doukutu.xml
xml_path: assets/xml/scenes/dungeons/ice_doukutu_v2.xml
- name: scenes/dungeons/jyasinboss
xml_path: assets/xml/scenes/dungeons/jyasinboss.xml
- name: scenes/dungeons/jyasinzou
@ -1142,7 +1142,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
xml_path: assets/xml/scenes/overworld/spot16.xml
xml_path: assets/xml/scenes/overworld/spot16_v2.xml
- name: scenes/overworld/spot17
xml_path: assets/xml/scenes/overworld/spot17.xml
- name: scenes/overworld/spot18
@ -1202,7 +1202,7 @@ assets:
- name: textures/nes_font_static
xml_path: assets/xml/textures/nes_font_static_v2.xml
- name: textures/nintendo_rogo_static
xml_path: assets/xml/textures/nintendo_rogo_static.xml
xml_path: assets/xml/textures/nintendo_rogo_static_v2.xml
- name: textures/parameter_static
xml_path: assets/xml/textures/parameter_static.xml
- name: textures/place_title_cards

View file

@ -971,7 +971,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan.xml
- name: scenes/dungeons/ddan_boss
xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
xml_path: assets/xml/scenes/dungeons/ddan_boss_v2.xml
- name: scenes/dungeons/FIRE_bs
xml_path: assets/xml/scenes/dungeons/FIRE_bs.xml
- name: scenes/dungeons/ganon
@ -999,7 +999,7 @@ assets:
- name: scenes/dungeons/HIDAN
xml_path: assets/xml/scenes/dungeons/HIDAN.xml
- name: scenes/dungeons/ice_doukutu
xml_path: assets/xml/scenes/dungeons/ice_doukutu.xml
xml_path: assets/xml/scenes/dungeons/ice_doukutu_v2.xml
- name: scenes/dungeons/jyasinboss
xml_path: assets/xml/scenes/dungeons/jyasinboss.xml
- name: scenes/dungeons/jyasinzou
@ -1141,7 +1141,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
xml_path: assets/xml/scenes/overworld/spot16.xml
xml_path: assets/xml/scenes/overworld/spot16_v2.xml
- name: scenes/overworld/spot17
xml_path: assets/xml/scenes/overworld/spot17.xml
- name: scenes/overworld/spot18
@ -1201,7 +1201,7 @@ assets:
- name: textures/nes_font_static
xml_path: assets/xml/textures/nes_font_static_v2.xml
- name: textures/nintendo_rogo_static
xml_path: assets/xml/textures/nintendo_rogo_static.xml
xml_path: assets/xml/textures/nintendo_rogo_static_v2.xml
- name: textures/parameter_static
xml_path: assets/xml/textures/parameter_static.xml
- name: textures/place_title_cards

View file

@ -971,7 +971,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan_mq.xml
- name: scenes/dungeons/ddan_boss
xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
xml_path: assets/xml/scenes/dungeons/ddan_boss_v2.xml
- name: scenes/dungeons/FIRE_bs
xml_path: assets/xml/scenes/dungeons/FIRE_bs.xml
- name: scenes/dungeons/ganon
@ -1141,7 +1141,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
xml_path: assets/xml/scenes/overworld/spot16.xml
xml_path: assets/xml/scenes/overworld/spot16_v2.xml
- name: scenes/overworld/spot17
xml_path: assets/xml/scenes/overworld/spot17.xml
- name: scenes/overworld/spot18
@ -1201,7 +1201,7 @@ assets:
- name: textures/nes_font_static
xml_path: assets/xml/textures/nes_font_static.xml
- name: textures/nintendo_rogo_static
xml_path: assets/xml/textures/nintendo_rogo_static.xml
xml_path: assets/xml/textures/nintendo_rogo_static_v2.xml
- name: textures/parameter_static
xml_path: assets/xml/textures/parameter_static.xml
- name: textures/place_title_cards

View file

@ -971,7 +971,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan.xml
- name: scenes/dungeons/ddan_boss
xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
xml_path: assets/xml/scenes/dungeons/ddan_boss_v2.xml
- name: scenes/dungeons/FIRE_bs
xml_path: assets/xml/scenes/dungeons/FIRE_bs.xml
- name: scenes/dungeons/ganon
@ -999,7 +999,7 @@ assets:
- name: scenes/dungeons/HIDAN
xml_path: assets/xml/scenes/dungeons/HIDAN.xml
- name: scenes/dungeons/ice_doukutu
xml_path: assets/xml/scenes/dungeons/ice_doukutu.xml
xml_path: assets/xml/scenes/dungeons/ice_doukutu_v2.xml
- name: scenes/dungeons/jyasinboss
xml_path: assets/xml/scenes/dungeons/jyasinboss.xml
- name: scenes/dungeons/jyasinzou
@ -1141,7 +1141,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
xml_path: assets/xml/scenes/overworld/spot16.xml
xml_path: assets/xml/scenes/overworld/spot16_v2.xml
- name: scenes/overworld/spot17
xml_path: assets/xml/scenes/overworld/spot17.xml
- name: scenes/overworld/spot18
@ -1201,7 +1201,7 @@ assets:
- name: textures/nes_font_static
xml_path: assets/xml/textures/nes_font_static.xml
- name: textures/nintendo_rogo_static
xml_path: assets/xml/textures/nintendo_rogo_static.xml
xml_path: assets/xml/textures/nintendo_rogo_static_v2.xml
- name: textures/parameter_static
xml_path: assets/xml/textures/parameter_static.xml
- name: textures/place_title_cards

View file

@ -971,7 +971,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan_mq.xml
- name: scenes/dungeons/ddan_boss
xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
xml_path: assets/xml/scenes/dungeons/ddan_boss_v2.xml
- name: scenes/dungeons/FIRE_bs
xml_path: assets/xml/scenes/dungeons/FIRE_bs.xml
- name: scenes/dungeons/ganon
@ -1141,7 +1141,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
xml_path: assets/xml/scenes/overworld/spot16.xml
xml_path: assets/xml/scenes/overworld/spot16_v2.xml
- name: scenes/overworld/spot17
xml_path: assets/xml/scenes/overworld/spot17.xml
- name: scenes/overworld/spot18
@ -1201,7 +1201,7 @@ assets:
- name: textures/nes_font_static
xml_path: assets/xml/textures/nes_font_static_v2.xml
- name: textures/nintendo_rogo_static
xml_path: assets/xml/textures/nintendo_rogo_static.xml
xml_path: assets/xml/textures/nintendo_rogo_static_v2.xml
- name: textures/parameter_static
xml_path: assets/xml/textures/parameter_static.xml
- name: textures/place_title_cards

View file

@ -971,7 +971,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan.xml
- name: scenes/dungeons/ddan_boss
xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
xml_path: assets/xml/scenes/dungeons/ddan_boss_v2.xml
- name: scenes/dungeons/FIRE_bs
xml_path: assets/xml/scenes/dungeons/FIRE_bs.xml
- name: scenes/dungeons/ganon
@ -999,7 +999,7 @@ assets:
- name: scenes/dungeons/HIDAN
xml_path: assets/xml/scenes/dungeons/HIDAN.xml
- name: scenes/dungeons/ice_doukutu
xml_path: assets/xml/scenes/dungeons/ice_doukutu.xml
xml_path: assets/xml/scenes/dungeons/ice_doukutu_v2.xml
- name: scenes/dungeons/jyasinboss
xml_path: assets/xml/scenes/dungeons/jyasinboss.xml
- name: scenes/dungeons/jyasinzou
@ -1141,7 +1141,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
xml_path: assets/xml/scenes/overworld/spot16.xml
xml_path: assets/xml/scenes/overworld/spot16_v2.xml
- name: scenes/overworld/spot17
xml_path: assets/xml/scenes/overworld/spot17.xml
- name: scenes/overworld/spot18
@ -1201,7 +1201,7 @@ assets:
- name: textures/nes_font_static
xml_path: assets/xml/textures/nes_font_static_v2.xml
- name: textures/nintendo_rogo_static
xml_path: assets/xml/textures/nintendo_rogo_static.xml
xml_path: assets/xml/textures/nintendo_rogo_static_v2.xml
- name: textures/parameter_static
xml_path: assets/xml/textures/parameter_static.xml
- name: textures/place_title_cards

View file

@ -0,0 +1 @@
9f04c8e68534b870f707c247fa4b50fc build/ntsc-1.0/oot-ntsc-1.0-compressed.z64

View file

@ -0,0 +1 @@
963d8ee3bd921f4d3c833b82004a76d2 build/ntsc-1.0/oot-ntsc-1.0.z64

View file

@ -0,0 +1 @@
5bd1fe107bf8106b2ab6650abecd54d6 build/ntsc-1.0/oot-ntsc-1.0-compressed.z64

View file

@ -0,0 +1 @@
6829a16db1a34e8ce989847cd8da8d9a build/ntsc-1.0/oot-ntsc-1.0.z64

1219
baseroms/ntsc-1.0/config.yml Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1 @@
1bf5f42b98c3e97948f01155f12e2d88 build/ntsc-1.1/oot-ntsc-1.1-compressed.z64

View file

@ -0,0 +1 @@
8b07c719217cb89334edf481a52ef392 build/ntsc-1.1/oot-ntsc-1.1.z64

View file

@ -0,0 +1 @@
721fdcc6f5f34be55c43a807f2a16af4 build/ntsc-1.1/oot-ntsc-1.1-compressed.z64

View file

@ -0,0 +1 @@
a11496a4abcd9f173f2f2a342a6370d2 build/ntsc-1.1/oot-ntsc-1.1.z64

1219
baseroms/ntsc-1.1/config.yml Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -978,7 +978,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan.xml
- name: scenes/dungeons/ddan_boss
xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
xml_path: assets/xml/scenes/dungeons/ddan_boss_v2.xml
- name: scenes/dungeons/FIRE_bs
xml_path: assets/xml/scenes/dungeons/FIRE_bs.xml
- name: scenes/dungeons/ganon
@ -1006,7 +1006,7 @@ assets:
- name: scenes/dungeons/HIDAN
xml_path: assets/xml/scenes/dungeons/HIDAN.xml
- name: scenes/dungeons/ice_doukutu
xml_path: assets/xml/scenes/dungeons/ice_doukutu.xml
xml_path: assets/xml/scenes/dungeons/ice_doukutu_v2.xml
- name: scenes/dungeons/jyasinboss
xml_path: assets/xml/scenes/dungeons/jyasinboss.xml
- name: scenes/dungeons/jyasinzou
@ -1148,7 +1148,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
xml_path: assets/xml/scenes/overworld/spot16.xml
xml_path: assets/xml/scenes/overworld/spot16_v2.xml
- name: scenes/overworld/spot17
xml_path: assets/xml/scenes/overworld/spot17.xml
- name: scenes/overworld/spot18
@ -1208,7 +1208,7 @@ assets:
- name: textures/nes_font_static
xml_path: assets/xml/textures/nes_font_static.xml
- name: textures/nintendo_rogo_static
xml_path: assets/xml/textures/nintendo_rogo_static.xml
xml_path: assets/xml/textures/nintendo_rogo_static_v2.xml
- name: textures/parameter_static
xml_path: assets/xml/textures/parameter_static.xml
- name: textures/place_title_cards

View file

@ -984,7 +984,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan.xml
- name: scenes/dungeons/ddan_boss
xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
xml_path: assets/xml/scenes/dungeons/ddan_boss_v2.xml
- name: scenes/dungeons/FIRE_bs
xml_path: assets/xml/scenes/dungeons/FIRE_bs.xml
- name: scenes/dungeons/ganon
@ -1214,7 +1214,7 @@ assets:
- name: textures/nes_font_static
xml_path: assets/xml/textures/nes_font_static.xml
- name: textures/nintendo_rogo_static
xml_path: assets/xml/textures/nintendo_rogo_static.xml
xml_path: assets/xml/textures/nintendo_rogo_static_v2.xml
- name: textures/parameter_static
xml_path: assets/xml/textures/parameter_static.xml
- name: textures/place_title_cards

View file

@ -984,7 +984,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan.xml
- name: scenes/dungeons/ddan_boss
xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
xml_path: assets/xml/scenes/dungeons/ddan_boss_v2.xml
- name: scenes/dungeons/FIRE_bs
xml_path: assets/xml/scenes/dungeons/FIRE_bs.xml
- name: scenes/dungeons/ganon
@ -1214,7 +1214,7 @@ assets:
- name: textures/nes_font_static
xml_path: assets/xml/textures/nes_font_static.xml
- name: textures/nintendo_rogo_static
xml_path: assets/xml/textures/nintendo_rogo_static.xml
xml_path: assets/xml/textures/nintendo_rogo_static_v2.xml
- name: textures/parameter_static
xml_path: assets/xml/textures/parameter_static.xml
- name: textures/place_title_cards

View file

@ -52,6 +52,8 @@
#ifndef ASEQ_H
#define ASEQ_H
#include "versions.h"
/**
* IO Ports
*/

View file

@ -18,6 +18,7 @@
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNT_2D(arr) (s32)(sizeof(arr) / sizeof(arr[0][0]))
#define PHYSICAL_TO_VIRTUAL(addr) (void*)((uintptr_t)(addr) + 0x80000000)
#define VIRTUAL_TO_PHYSICAL(addr) (uintptr_t)((u8*)(addr) - 0x80000000)

View file

@ -48,6 +48,7 @@
#define R_ENV_Z_FAR REG(13)
#define R_ENV_FOG_NEAR REG(14)
#define R_ENV_TIME_SPEED_OLD REG(15) // Most likely used during development. Unused in the final game.
#define R_DECELERATE_RATE REG(43)
#define R_RUN_SPEED_LIMIT REG(45)
#define R_ENABLE_ARENA_DBG SREG(0)
#define R_AUDIOMGR_DEBUG_LEVEL SREG(20)

View file

@ -2,6 +2,7 @@
#define SEQUENCE_H
#include "ultra64.h"
#include "versions.h"
#define DEFINE_SEQUENCE(_0, seqId, _2, _3, _4) seqId,
#define DEFINE_SEQUENCE_PTR(_0, seqId, _2, _3, _4) seqId,

View file

@ -2,6 +2,7 @@
#define SFX_H
#include "ultra64.h"
#include "versions.h"
#include "z64math.h"
typedef enum SfxBankType {

View file

@ -15,10 +15,10 @@
* - Argument 3: Cache load policy for the sequence (AudioCacheLoadType)
* - Argument 4: Sequence flags
*/
#if PLATFORM_N64
#define SEQ_0_FLAGS SEQ_FLAG_FANFARE | SEQ_FLAG_ENEMY
#else
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
#define SEQ_0_FLAGS SEQ_FLAG_FANFARE
#else
#define SEQ_0_FLAGS SEQ_FLAG_FANFARE | SEQ_FLAG_ENEMY
#endif
DEFINE_SEQUENCE (Sequence_0, NA_BGM_GENERAL_SFX, MEDIUM_CART, CACHE_LOAD_PERMANENT, SEQ_0_FLAGS ) // general_sfx
DEFINE_SEQUENCE (Sequence_1, NA_BGM_NATURE_AMBIENCE, MEDIUM_CART, CACHE_LOAD_TEMPORARY, SEQ_FLAG_ENEMY ) // nature_ambience

View file

@ -334,10 +334,10 @@
/* 0x3942 */ DEFINE_SFX(CHAN_4EA8, NA_SE_EN_BALINADE_THUNDER, 0x34, 3, 0, 0)
/* 0x3943 */ DEFINE_SFX(CHAN_415D, NA_SE_EN_BALINADE_BL_SPARK, 0x20, 2, 0, 0)
/* 0x3944 */ DEFINE_SFX(CHAN_4184, NA_SE_EN_BALINADE_BL_DEAD, 0x34, 3, 0, 0)
#if PLATFORM_N64
/* 0x3945 */ DEFINE_SFX(CHAN_4E86, NA_SE_EN_BALINADE_BREAK2, 0x34, 3, 0, 0)
#else
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
/* 0x3945 */ DEFINE_SFX(CHAN_4E86, NA_SE_EN_BALINADE_BREAK2, 0x30, 3, 0, 0)
#else
/* 0x3945 */ DEFINE_SFX(CHAN_4E86, NA_SE_EN_BALINADE_BREAK2, 0x34, 3, 0, 0)
#endif
/* 0x3946 */ DEFINE_SFX(CHAN_425D, NA_SE_EN_BALINADE_HIT_RINK, 0x38, 3, 0, 0)
/* 0x3947 */ DEFINE_SFX(CHAN_3AF4, NA_SE_EN_GANON_WAVE_GND, 0x20, 3, 0, 0)

View file

@ -43,10 +43,10 @@
/* 0x281F */ DEFINE_SFX(CHAN_1B61, NA_SE_EV_TBOX_UNLOCK, 0x30, 0, 0, 0)
/* 0x2820 */ DEFINE_SFX(CHAN_1B7D, NA_SE_EV_TBOX_OPEN, 0x30, 0, 0, 0)
/* 0x2821 */ DEFINE_SFX(CHAN_1B93, NA_SE_SY_TIMER, 0xA0, 0, 0, SFX_FLAG_13 | SFX_FLAG_3)
#if PLATFORM_N64
/* 0x2822 */ DEFINE_SFX(CHAN_1BE9, NA_SE_EV_FLAME_IGNITION, 0x2D, 2, 0, 0)
#else
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
/* 0x2822 */ DEFINE_SFX(CHAN_1BE9, NA_SE_EV_FLAME_IGNITION, 0x20, 2, 0, 0)
#else
/* 0x2822 */ DEFINE_SFX(CHAN_1BE9, NA_SE_EV_FLAME_IGNITION, 0x2D, 2, 0, 0)
#endif
/* 0x2823 */ DEFINE_SFX(CHAN_1BF9, NA_SE_EV_SPEAR_HIT, 0x30, 0, 0, 0)
/* 0x2824 */ DEFINE_SFX(CHAN_1C14, NA_SE_EV_ELEVATOR_MOVE, 0x30, 0, 0, SFX_FLAG_11)
@ -108,10 +108,10 @@
/* 0x285C */ DEFINE_SFX(CHAN_2374, NA_SE_EV_BLOCKSINK, 0x30, 2, 0, 0)
/* 0x285D */ DEFINE_SFX(CHAN_2389, NA_SE_EV_CROWD, 0x30, 0, 0, SFX_FLAG_13 | SFX_FLAG_12 | SFX_FLAG_11)
/* 0x285E */ DEFINE_SFX(CHAN_23A6, NA_SE_EV_WATER_LEVEL_DOWN, 0x30, 0, 0, 0)
#if PLATFORM_N64
/* 0x285F */ DEFINE_SFX(CHAN_23D5, NA_SE_EV_NAVY_VANISH, 0x2C, 0, 0, 0)
#else
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
/* 0x285F */ DEFINE_SFX(CHAN_23D5, NA_SE_EV_NAVY_VANISH, 0x30, 0, 0, 0)
#else
/* 0x285F */ DEFINE_SFX(CHAN_23D5, NA_SE_EV_NAVY_VANISH, 0x2C, 0, 0, 0)
#endif
/* 0x2860 */ DEFINE_SFX(CHAN_23EB, NA_SE_EV_LADDER_DOUND, 0x30, 3, 0, 0)
/* 0x2861 */ DEFINE_SFX(CHAN_2401, NA_SE_EV_WEB_VIBRATION, 0x30, 0, 0, 0)

View file

@ -28,10 +28,10 @@
/* 0x1810 */ DEFINE_SFX(CHAN_10A2, NA_SE_IT_BOOMERANG_FLY, 0x30, 0, 0, SFX_FLAG_10)
/* 0x1811 */ DEFINE_SFX(CHAN_10D2, NA_SE_IT_SWORD_STRIKE, 0x40, 2, 0, 0)
/* 0x1812 */ DEFINE_SFX(CHAN_10E6, NA_SE_IT_HAMMER_SWING, 0x30, 0, 1, 0)
#if PLATFORM_N64
/* 0x1813 */ DEFINE_SFX(CHAN_10F4, NA_SE_IT_HOOKSHOT_REFLECT, 0x20, 0, 0, 0)
#else
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
/* 0x1813 */ DEFINE_SFX(CHAN_10F4, NA_SE_IT_HOOKSHOT_REFLECT, 0x30, 0, 0, 0)
#else
/* 0x1813 */ DEFINE_SFX(CHAN_10F4, NA_SE_IT_HOOKSHOT_REFLECT, 0x20, 0, 0, 0)
#endif
/* 0x1814 */ DEFINE_SFX(CHAN_110B, NA_SE_IT_ARROW_STICK_CRE, 0x30, 0, 0, 0)
/* 0x1815 */ DEFINE_SFX(CHAN_1120, NA_SE_IT_ARROW_STICK_OBJ, 0x34, 0, 0, 0)

View file

@ -389,6 +389,8 @@ ALIGNED(4) typedef struct PreNmiBuff {
} PreNmiBuff; // size = 0x18 (actually osAppNMIBuffer is 0x40 bytes large but the rest is unused)
typedef enum ViModeEditState {
/* -2 */ VI_MODE_EDIT_STATE_NEGATIVE_2 = -2,
/* -1 */ VI_MODE_EDIT_STATE_NEGATIVE_1,
/* 0 */ VI_MODE_EDIT_STATE_INACTIVE,
/* 1 */ VI_MODE_EDIT_STATE_ACTIVE,
/* 2 */ VI_MODE_EDIT_STATE_2, // active, more adjustments

View file

@ -70,6 +70,12 @@ typedef enum PlayerEnvHazard {
/* 0x4 */ PLAYER_ENV_HAZARD_UNDERWATER_FREE
} PlayerEnvHazard;
typedef enum PlayerIdleType {
/* -0x1 */ PLAYER_IDLE_CRIT_HEALTH = -1,
/* 0x0 */ PLAYER_IDLE_DEFAULT,
/* 0x1 */ PLAYER_IDLE_FIDGET
} PlayerIdleType;
typedef enum PlayerItemAction {
/* 0x00 */ PLAYER_IA_NONE,
/* 0x01 */ PLAYER_IA_SWORD_CS, // Hold sword without shield in hand. The sword is not usable.
@ -669,7 +675,7 @@ typedef struct WeaponInfo {
#define PLAYER_STATE1_3 (1 << 3)
#define PLAYER_STATE1_HOSTILE_LOCK_ON (1 << 4) // Currently locked onto a hostile actor. Triggers a "battle" variant of many actions.
#define PLAYER_STATE1_5 (1 << 5)
#define PLAYER_STATE1_6 (1 << 6)
#define PLAYER_STATE1_TALKING (1 << 6) // Currently talking to an actor. This includes item exchanges.
#define PLAYER_STATE1_DEAD (1 << 7) // Player has died. Note that this gets set when the death cutscene has started, after landing from the air.
#define PLAYER_STATE1_START_CHANGING_HELD_ITEM (1 << 8) // Item change process has begun
#define PLAYER_STATE1_9 (1 << 9)
@ -724,7 +730,7 @@ typedef struct WeaponInfo {
#define PLAYER_STATE2_25 (1 << 25)
#define PLAYER_STATE2_26 (1 << 26)
#define PLAYER_STATE2_27 (1 << 27)
#define PLAYER_STATE2_28 (1 << 28)
#define PLAYER_STATE2_IDLE_FIDGET (1 << 28) // Playing a fidget idle animation (under typical circumstances, see `Player_ChooseNextIdleAnim` for more info)
#define PLAYER_STATE2_29 (1 << 29)
#define PLAYER_STATE2_30 (1 << 30)
#define PLAYER_STATE2_31 (1 << 31)
@ -742,6 +748,16 @@ typedef void (*PlayerActionFunc)(struct Player*, struct PlayState*);
typedef s32 (*UpperActionFunc)(struct Player*, struct PlayState*);
typedef void (*AfterPutAwayFunc)(struct PlayState*, struct Player*);
#define UNK6AE_ROT_FOCUS_X (1 << 0)
#define UNK6AE_ROT_FOCUS_Y (1 << 1)
#define UNK6AE_ROT_FOCUS_Z (1 << 2)
#define UNK6AE_ROT_HEAD_X (1 << 3)
#define UNK6AE_ROT_HEAD_Y (1 << 4)
#define UNK6AE_ROT_HEAD_Z (1 << 5)
#define UNK6AE_ROT_UPPER_X (1 << 6)
#define UNK6AE_ROT_UPPER_Y (1 << 7)
#define UNK6AE_ROT_UPPER_Z (1 << 8)
typedef struct Player {
/* 0x0000 */ Actor actor;
/* 0x014C */ s8 currentTunic; // current tunic from `PlayerTunic`
@ -830,17 +846,13 @@ typedef struct Player {
/* 0x06A0 */ f32 unk_6A0;
/* 0x06A4 */ f32 closestSecretDistSq;
/* 0x06A8 */ Actor* unk_6A8;
/* 0x06AC */ s8 unk_6AC;
/* 0x06AC */ s8 idleType;
/* 0x06AD */ u8 unk_6AD;
/* 0x06AE */ u16 unk_6AE;
/* 0x06B0 */ s16 unk_6B0;
/* 0x06AE */ u16 unk_6AE_rotFlags; // See `UNK6AE_ROT_` macros. If its flag isn't set, a rot steps to 0.
/* 0x06B0 */ s16 upperLimbYawSecondary;
/* 0x06B2 */ char unk_6B4[0x004];
/* 0x06B6 */ s16 unk_6B6;
/* 0x06B8 */ s16 unk_6B8;
/* 0x06BA */ s16 unk_6BA;
/* 0x06BC */ s16 unk_6BC;
/* 0x06BE */ s16 unk_6BE;
/* 0x06C0 */ s16 unk_6C0;
/* 0x06B6 */ Vec3s headLimbRot;
/* 0x06BC */ Vec3s upperLimbRot;
/* 0x06C2 */ s16 unk_6C2;
/* 0x06C4 */ f32 unk_6C4;
/* 0x06C8 */ SkelAnime upperSkelAnime;
@ -870,6 +882,7 @@ typedef struct Player {
/* 0x0850 */ union {
s16 actionVar2;
s16 fallDamageStunTimer; // Player_Action_Idle: Prevents any movement and shakes model up and down quickly to indicate fall damage stun
s16 bonked; // Player_Action_Roll: set to true after bonking into a wall or an actor
s16 startedTextbox; // Player_Action_SwingBottle: set to true when the textbox is started
s16 useWaterBottleSwingAnimations; // Player_Action_SwingBottle: used to determine which bottle swing animation to use
@ -893,7 +906,7 @@ typedef struct Player {
/* 0x0888 */ f32 distToInteractWall; // xyz distance to the interact wall
/* 0x088C */ u8 ledgeClimbType;
/* 0x088D */ u8 ledgeClimbDelayTimer;
/* 0x088E */ u8 unk_88E;
/* 0x088E */ u8 textboxBtnCooldownTimer; // Prevents usage of A/B/C-up when counting down
/* 0x088F */ u8 damageFlickerAnimCounter; // Used to flicker Link after taking damage
/* 0x0890 */ u8 unk_890;
/* 0x0891 */ u8 bodyShockTimer;

View file

@ -1188,7 +1188,7 @@ u8 D_8016B9F3;
u8 sFanfareStartTimer;
u16 sFanfareSeqId;
#if PLATFORM_N64
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
u16 sPrevAmbienceSeqId;
#endif
@ -1706,7 +1706,7 @@ void AudioOcarina_PlayControllerInput(u8 unused) {
} else {
// no bending or vibrato for recording state OCARINA_RECORD_SCARECROW_SPAWN
sCurOcarinaBendIndex = 0;
#if PLATFORM_N64
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
sCurOcarinaVibrato = 0;
#endif
sCurOcarinaBendFreq = 1.0f; // No bend
@ -1852,18 +1852,17 @@ void AudioOcarina_PlaybackSong(void) {
sRelativeNotePlaybackVolume = sNotePlaybackVolume / 127.0f;
}
#if PLATFORM_N64
// Update vibrato
sNotePlaybackVibrato = sPlaybackSong[sPlaybackNotePos].vibrato;
// Sets vibrato to io port 6
AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, SFX_CHANNEL_OCARINA, 6, sNotePlaybackVibrato);
#else
// Update vibrato
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
if (sNotePlaybackVibrato != sPlaybackSong[sPlaybackNotePos].vibrato) {
sNotePlaybackVibrato = sPlaybackSong[sPlaybackNotePos].vibrato;
// Sets vibrato to io port 6
AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, SFX_CHANNEL_OCARINA, 6, sNotePlaybackVibrato);
}
#else
sNotePlaybackVibrato = sPlaybackSong[sPlaybackNotePos].vibrato;
// Sets vibrato to io port 6
AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, SFX_CHANNEL_OCARINA, 6, sNotePlaybackVibrato);
#endif
// Update bend
@ -2145,7 +2144,7 @@ void AudioOcarina_RecordSong(void) {
} else if (sRecordOcarinaVolume != sCurOcarinaVolume) {
noteChanged = true;
} else if (sRecordOcarinaVibrato != sCurOcarinaVibrato) {
#if PLATFORM_N64
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
if (sRecordingState != OCARINA_RECORD_SCARECROW_SPAWN) {
noteChanged = true;
}
@ -2153,7 +2152,7 @@ void AudioOcarina_RecordSong(void) {
noteChanged = true;
#endif
} else if (sRecordOcarinaBendIndex != sCurOcarinaBendIndex) {
#if PLATFORM_N64
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
if (sRecordingState != OCARINA_RECORD_SCARECROW_SPAWN) {
noteChanged = true;
}
@ -2494,7 +2493,7 @@ f32 Audio_ComputeSfxFreqScale(u8 bankId, u8 entryIdx) {
switch (bankId) {
case BANK_VOICE:
#if PLATFORM_N64
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
if (((entry->sfxId & 0xFF) < 0x40) && (sAudioBaseFilter2 != 0)) {
phi_v0 = true;
} else if (((entry->sfxId & 0xFF) >= 0x40) && (sAudioExtraFilter2 != 0)) {
@ -2615,7 +2614,7 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIndex) {
f32 behindScreenZ;
u8 baseFilter = 0;
SfxBankEntry* entry = &gSfxBanks[bankId][entryIdx];
#if PLATFORM_N64
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
s32 pad;
#endif
@ -2656,7 +2655,7 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIndex) {
}
}
if (sAudioBaseFilter != 0) {
#if PLATFORM_N64
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
if ((bankId == BANK_PLAYER) || (bankId == BANK_ITEM) ||
((bankId == BANK_VOICE) && ((entry->sfxId & 0xFF) < 0x40)))
#else
@ -3240,7 +3239,7 @@ void Audio_PlaySceneSequence(u16 seqId) {
AUDIOCMD_GLOBAL_STOP_AUDIOCMDS();
}
#if PLATFORM_N64
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
if (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_DISABLED) {
Audio_StopSequence(SEQ_PLAYER_BGM_MAIN, 0);
AUDIOCMD_GLOBAL_STOP_AUDIOCMDS();
@ -3384,7 +3383,7 @@ void func_800F5B58(void) {
if (sPrevMainBgmSeqId == NA_BGM_DISABLED) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
} else {
#if PLATFORM_N64
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
if (sPrevMainBgmSeqId == NA_BGM_NATURE_AMBIENCE) {
sPrevMainBgmSeqId = sPrevAmbienceSeqId;
}
@ -3520,10 +3519,10 @@ void Audio_SetSequenceMode(u8 seqMode) {
volumeFadeInTimer);
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_SUB, 10, 8, NA_BGM_ENEMY);
#if PLATFORM_N64
if (seqId > NA_BGM_NATURE_AMBIENCE)
#else
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
if (seqId != NA_BGM_NATURE_AMBIENCE)
#else
if (seqId > NA_BGM_NATURE_AMBIENCE)
#endif
{
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_SUB,
@ -3545,14 +3544,20 @@ void Audio_SetSequenceMode(u8 seqMode) {
sPrevSeqMode = seqMode + 0x80;
} else {
#if PLATFORM_N64
if (seqMode == SEQ_MODE_ENEMY) {
// If both seqMode = sPrevSeqMode = SEQ_MODE_ENEMY
if ((Audio_GetActiveSeqId(SEQ_PLAYER_BGM_SUB) == NA_BGM_DISABLED) && (seqId != NA_BGM_DISABLED) &&
(sSeqFlags[seqId & 0xFF & 0xFF] & SEQ_FLAG_ENEMY)) {
#if OOT_VERSION < NTSC_1_1 || PLATFORM_GC
// Empty
#elif OOT_VERSION < PAL_1_0
if ((seqMode == SEQ_MODE_ENEMY) && (seqId != NA_BGM_FIELD_LOGIC) &&
(Audio_GetActiveSeqId(SEQ_PLAYER_BGM_SUB) == NA_BGM_DISABLED)) {
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_SUB, 10, 8, NA_BGM_ENEMY);
sPrevSeqMode = seqMode + 0x80;
}
#else
// If both seqMode = sPrevSeqMode = SEQ_MODE_ENEMY
if ((seqMode == SEQ_MODE_ENEMY) && (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_SUB) == NA_BGM_DISABLED) &&
(seqId != NA_BGM_DISABLED) && (sSeqFlags[seqId & 0xFF & 0xFF] & SEQ_FLAG_ENEMY)) {
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_SUB, 10, 8, NA_BGM_ENEMY);
sPrevSeqMode = seqMode + 0x80;
}
#endif
}
@ -3595,20 +3600,20 @@ void Audio_SetBgmEnemyVolume(f32 dist) {
sAudioEnemyVol = ((350.0f - adjDist) * 127.0f) / 350.0f;
Audio_SetVolumeScale(SEQ_PLAYER_BGM_SUB, VOL_SCALE_INDEX_BGM_SUB, sAudioEnemyVol, 10);
#if PLATFORM_N64
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId > NA_BGM_NATURE_AMBIENCE)
#else
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE)
#else
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId > NA_BGM_NATURE_AMBIENCE)
#endif
{
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_SUB, (0x7F - sAudioEnemyVol), 10);
}
}
#if PLATFORM_N64
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId > NA_BGM_NATURE_AMBIENCE)
#else
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE)
#else
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId > NA_BGM_NATURE_AMBIENCE)
#endif
{
Audio_SplitBgmChannels(sAudioEnemyVol);
@ -3923,7 +3928,7 @@ void func_800F6C34(void) {
sFanfareStartTimer = 0;
D_8016B9F3 = 1;
sMalonSingingDisabled = false;
#if PLATFORM_N64
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
sPrevAmbienceSeqId = NA_BGM_DISABLED;
#endif
}
@ -3984,7 +3989,7 @@ void Audio_StartNatureAmbienceSequence(u16 playerIO, u16 channelMask) {
}
#endif
#if PLATFORM_N64
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
if ((Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_DISABLED) &&
(Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_NATURE_AMBIENCE)) {
Audio_StopSequence(SEQ_PLAYER_BGM_MAIN, 0);
@ -4018,7 +4023,7 @@ void Audio_PlayNatureAmbienceSequence(u8 natureAmbienceId) {
if ((gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId == NA_BGM_DISABLED) ||
!(sSeqFlags[gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId & 0xFF & 0xFF] & SEQ_FLAG_NO_AMBIENCE)) {
#if PLATFORM_N64
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE) {
sPrevAmbienceSeqId = gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId;
}

View file

@ -437,7 +437,7 @@ void AudioSeq_SequencePlayerDisableAsFinished(SequencePlayer* seqPlayer) {
void AudioSeq_SequencePlayerDisable(SequencePlayer* seqPlayer) {
s32 finished = 0;
#if PLATFORM_N64
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
if (seqPlayer->finished == 1) {
finished = 1;
}
@ -457,7 +457,7 @@ void AudioSeq_SequencePlayerDisable(SequencePlayer* seqPlayer) {
}
if (AudioLoad_IsFontLoadComplete(seqPlayer->defaultFont)) {
#if PLATFORM_N64
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
if (finished == 1) {
AudioHeap_ReleaseNotesForFont(seqPlayer->defaultFont);
}

View file

@ -644,10 +644,10 @@ Acmd* AudioSynth_DoOneAudioUpdate(s16* aiBuf, s32 aiBufLen, Acmd* cmd, s32 updat
// Leak reverb between the left and right channels
#if PLATFORM_N64
if (((reverb->leakRtl != 0) || (reverb->leakLtr != 0)) && (gAudioCtx.soundMode != SOUNDMODE_MONO))
#else
#if OOT_VERSION < NTSC_1_1 || PLATFORM_GC
if ((reverb->leakRtl != 0) || (reverb->leakLtr != 0))
#else
if (((reverb->leakRtl != 0) || (reverb->leakLtr != 0)) && (gAudioCtx.soundMode != SOUNDMODE_MONO))
#endif
{
cmd = AudioSynth_LeakReverb(cmd, reverb);
@ -785,7 +785,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
samplesLenFixedPoint = (resamplingRateFixedPoint * aiBufLen * 2) + synthState->samplePosFrac;
numSamplesToLoad = samplesLenFixedPoint >> 16;
#if PLATFORM_N64
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
if (numSamplesToLoad == 0) {
skipBytes = false;
}

View file

@ -1,4 +1,5 @@
#include "global.h"
#include "versions.h"
#define SAMPLES_TO_OVERPRODUCE 0x10
#define EXTRA_BUFFERED_AI_SAMPLES_TARGET 0x80
@ -16,7 +17,7 @@ AudioTask* AudioThread_Update(void) {
return AudioThread_UpdateImpl();
}
#if PLATFORM_N64
#if !(OOT_VERSION < PAL_1_0 || PLATFORM_GC)
static s32 sMaxAbiCmdCnt = 0x80;
static AudioTask* sWaitingAudioTask = NULL;
#endif
@ -25,7 +26,7 @@ static AudioTask* sWaitingAudioTask = NULL;
* This is Audio_Update for the audio thread
*/
AudioTask* AudioThread_UpdateImpl(void) {
#if !PLATFORM_N64
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
static s32 sMaxAbiCmdCnt = 0x80;
static AudioTask* sWaitingAudioTask = NULL;
#endif

View file

@ -18,10 +18,10 @@ const TempoData gTempoData = {
// Sizes of everything on the init pool
#define AI_BUFFERS_SIZE (AIBUF_SIZE * ARRAY_COUNT(gAudioCtx.aiBuffers))
#define SOUNDFONT_LIST_SIZE (NUM_SOUNDFONTS * sizeof(SoundFont))
#if PLATFORM_N64
#define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONT_1_SIZE + SFX_SOUNDFONT_2_SIZE + 0x10)
#else
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
#define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONT_1_SIZE + SFX_SOUNDFONT_2_SIZE)
#else
#define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONT_1_SIZE + SFX_SOUNDFONT_2_SIZE + 0x10)
#endif
const AudioHeapInitSizes gAudioHeapInitSizes = {

View file

@ -342,7 +342,7 @@ void Audio_ChooseActiveSfx(u8 bankId) {
entry->sfxId, entry->posX, entry->posZ, *entry->posX, *entry->posY, *entry->posZ);
}
entry->priority = (u32)entry->dist + (SQ(0xFF - sfxImportance) * SQ(76));
#if !PLATFORM_N64
#if OOT_VERSION < NTSC_1_1 || PLATFORM_GC
temp3 = entry->sfxId; // fake
entry->priority = entry->priority + temp3 - temp3;
#endif

View file

@ -1,5 +1,6 @@
#include "ultra64.h"
#include "global.h"
#include "versions.h"
#define DEFINE_SFX(_0, _1, importance, distParam, randParam, flags) \
{ importance, ((((distParam) << SFX_PARAM_01_SHIFT) & SFX_PARAM_01_MASK) | \

View file

@ -1,5 +1,6 @@
#include "attributes.h"
#include "z64audio.h"
#include "versions.h"
// Symbol definition

View file

@ -39,7 +39,11 @@ void CIC6105_FaultClient(void) {
Fault_Printf(" [Creator:%s]", gBuildCreator);
Fault_SetCursor(56, 192);
Fault_Printf("[Date:%s]", gBuildDate);
#if OOT_VERSION < PAL_1_0
Fault_SetCursor(128, 24);
#else
Fault_SetCursor(96, 32);
#endif
Fault_Printf("I LOVE YOU %08x", func_80001714());
}

View file

@ -48,6 +48,11 @@ void rmonPrintf(const char* fmt, ...) {
va_end(args);
}
#if OOT_VERSION < PAL_1_0
void func_800015F4(void) {
}
#endif
#if OOT_DEBUG
void* is_proutSyncPrintf(void* arg, const char* str, size_t count) {
u32 data;

View file

@ -39,7 +39,11 @@ void Locale_Init(void) {
PRINTF(VT_COL(RED, WHITE));
PRINTF(T("z_locale_init: 日本用かアメリカ用か判別できません\n",
"z_locale_init: Can't tell if it's for Japan or America\n"));
#if PLATFORM_N64
#if OOT_VERSION < NTSC_1_1
LogUtils_HungupThread("../z_locale.c", 86);
#elif OOT_VERSION < PAL_1_0
LogUtils_HungupThread("../z_locale.c", 92);
#elif OOT_VERSION < GC_JP
LogUtils_HungupThread("../z_locale.c", 101);
#else
LogUtils_HungupThread("../z_locale.c", 118);

View file

@ -27,7 +27,7 @@
#endif
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:94 pal-1.0:92 pal-1.1:92"
"ntsc-1.2:92 pal-1.0:90 pal-1.1:90"
StackEntry sDmaMgrStackInfo;
OSMesgQueue sDmaMgrMsgQueue;
@ -296,12 +296,14 @@ NORETURN void DmaMgr_Error(DmaRequest* req, const char* filename, const char* er
Fault_AddHungupAndCrashImpl(buff1, buff2);
}
#define DMA_ERROR(req, filename, errorName, errorDesc, file, n64Line, gcLine) \
#define DMA_ERROR(req, filename, errorName, errorDesc, file, line1, line2, line3) \
DmaMgr_Error(req, filename, errorName, errorDesc)
#elif PLATFORM_N64
#define DMA_ERROR(req, filename, errorName, errorDesc, file, n64Line, gcLine) Fault_AddHungupAndCrash(file, n64Line)
#elif PLATFORM_GC
#define DMA_ERROR(req, filename, errorName, errorDesc, file, n64Line, gcLine) Fault_AddHungupAndCrash(file, gcLine)
#elif OOT_VERSION < NTSC_1_1
#define DMA_ERROR(req, filename, errorName, errorDesc, file, line1, line2, line3) Fault_AddHungupAndCrash(file, line1)
#elif OOT_VERSION < GC_JP
#define DMA_ERROR(req, filename, errorName, errorDesc, file, line1, line2, line3) Fault_AddHungupAndCrash(file, line2)
#else
#define DMA_ERROR(req, filename, errorName, errorDesc, file, line1, line2, line3) Fault_AddHungupAndCrash(file, line3)
#endif
#if PLATFORM_GC
@ -407,7 +409,7 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
DMA_ERROR(req, filename, "Segment Alignment Error",
T("セグメント境界をまたがってDMA転送することはできません",
"DMA transfers cannot cross segment boundaries"),
"../z_std_dma.c", 578, 726);
"../z_std_dma.c", 575, 578, 726);
}
DmaMgr_DmaRomToRam(iter->romStart + (vrom - iter->file.vromStart), ram, size);
@ -428,7 +430,7 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
DMA_ERROR(req, filename, "Can't Transfer Segment",
T("圧縮されたセグメントの途中からはDMA転送することはできません",
"DMA transfer cannot be performed from the middle of a compressed segment"),
"../z_std_dma.c", 598, 746);
"../z_std_dma.c", 595, 598, 746);
}
if (size != iter->file.vromEnd - iter->file.vromStart) {
@ -437,7 +439,7 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
DMA_ERROR(req, filename, "Can't Transfer Segment",
T("圧縮されたセグメントの一部だけをDMA転送することはできません",
"It is not possible to DMA only part of a compressed segment"),
"../z_std_dma.c", 604, 752);
"../z_std_dma.c", 601, 604, 752);
}
// Reduce the thread priority and decompress the file, the decompression routine handles the DMA
@ -470,8 +472,8 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
// Error, rom is compressed so DMA may only be requested within the filesystem bounds
DMA_ERROR(req, NULL, "DATA DON'T EXIST",
T("該当するデータが存在しません", "Corresponding data does not exist"), "../z_std_dma.c", 624,
771);
T("該当するデータが存在しません", "Corresponding data does not exist"), "../z_std_dma.c", 621,
624, 771);
return;
} else {
// ROM is uncompressed, allow arbitrary DMA even if the region is not marked in the filesystem
@ -543,7 +545,7 @@ s32 DmaMgr_RequestAsync(DmaRequest* req, void* ram, uintptr_t vrom, size_t size,
// its line number is unknown.
//! @bug `req` is passed to `DMA_ERROR` without rom, ram and size being set
DMA_ERROR(req, NULL, "ILLIGAL DMA-FUNCTION CALL", T("パラメータ異常です", "Parameter error"), "../z_std_dma.c",
0, 0);
0, 0, 0);
}
#endif
@ -645,7 +647,9 @@ void DmaMgr_Init(void) {
PRINTF("_bootSegmentRomStart(%08x) != dma_rom_ad[0].rom_b(%08x)\n", _bootSegmentRomStart,
gDmaDataTable[0].file.vromEnd);
//! @bug The main code file where fault.c resides is not yet loaded
#if PLATFORM_N64
#if OOT_VERSION < NTSC_1_1
Fault_AddHungupAndCrash("../z_std_dma.c", 837);
#elif OOT_VERSION < GC_JP
Fault_AddHungupAndCrash("../z_std_dma.c", 840);
#else
Fault_AddHungupAndCrash("../z_std_dma.c", 1055);

View file

@ -386,7 +386,11 @@ void GameState_InitArena(GameState* gameState, size_t size) {
} else {
THA_Init(&gameState->tha, NULL, 0);
PRINTF(T("ハイラル確保失敗\n", "Failure to secure Hyrule\n"));
#if PLATFORM_N64
#if OOT_VERSION < NTSC_1_1
HUNGUP_AND_CRASH("../game.c", 895);
#elif OOT_VERSION < PAL_1_0
HUNGUP_AND_CRASH("../game.c", 898);
#elif OOT_VERSION < GC_JP
HUNGUP_AND_CRASH("../game.c", 985);
#else
HUNGUP_AND_CRASH("../game.c", 999);
@ -431,7 +435,11 @@ void GameState_Realloc(GameState* gameState, size_t size) {
SystemArena_Display();
#endif
#if PLATFORM_N64
#if OOT_VERSION < NTSC_1_1
HUNGUP_AND_CRASH("../game.c", 940);
#elif OOT_VERSION < PAL_1_0
HUNGUP_AND_CRASH("../game.c", 943);
#elif OOT_VERSION < GC_JP
HUNGUP_AND_CRASH("../game.c", 1030);
#else
HUNGUP_AND_CRASH("../game.c", 1044);

View file

@ -379,7 +379,11 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
PRINTF("%c", BEL);
PRINTF(VT_COL(RED, WHITE) T("ダイナミック領域先頭が破壊されています\n", "Dynamic area head is destroyed\n")
VT_RST);
#if PLATFORM_N64
#if OOT_VERSION < NTSC_1_1
Fault_AddHungupAndCrash("../graph.c", 937);
#elif OOT_VERSION < PAL_1_0
Fault_AddHungupAndCrash("../graph.c", 940);
#elif OOT_VERSION < GC_JP
Fault_AddHungupAndCrash("../graph.c", 951);
#else
Fault_AddHungupAndCrash("../graph.c", 1070);
@ -390,7 +394,11 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
PRINTF("%c", BEL);
PRINTF(VT_COL(RED, WHITE)
T("ダイナミック領域末尾が破壊されています\n", "Dynamic region tail is destroyed\n") VT_RST);
#if PLATFORM_N64
#if OOT_VERSION < NTSC_1_1
Fault_AddHungupAndCrash("../graph.c", 943);
#elif OOT_VERSION < PAL_1_0
Fault_AddHungupAndCrash("../graph.c", 946);
#elif OOT_VERSION < GC_JP
Fault_AddHungupAndCrash("../graph.c", 957);
#else
Fault_AddHungupAndCrash("../graph.c", 1076);
@ -486,7 +494,11 @@ void Graph_ThreadEntry(void* arg0) {
sprintf(faultMsg, "CLASS SIZE= %d bytes", size);
Fault_AddHungupAndCrashImpl("GAME CLASS MALLOC FAILED", faultMsg);
#elif PLATFORM_N64
#elif OOT_VERSION < NTSC_1_1
Fault_AddHungupAndCrash("../graph.c", 1067);
#elif OOT_VERSION < PAL_1_0
Fault_AddHungupAndCrash("../graph.c", 1070);
#elif OOT_VERSION < GC_JP
Fault_AddHungupAndCrash("../graph.c", 1081);
#else
Fault_AddHungupAndCrash("../graph.c", 1200);

View file

@ -34,6 +34,7 @@
*/
#include "global.h"
#include "terminal.h"
#include "versions.h"
vu32 gIrqMgrResetStatus = IRQ_RESET_STATUS_IDLE;
volatile OSTime sIrqMgrResetTime = 0;
@ -43,9 +44,13 @@ u32 sIrqMgrRetraceCount = 0;
// Internal messages
#define IRQ_RETRACE_MSG 666
#define IRQ_PRENMI_MSG 669
#if OOT_VERSION < PAL_1_0
#define IRQ_PRENMI500_MSG 670
#else
#define IRQ_PRENMI450_MSG 671
#define IRQ_PRENMI480_MSG 672
#define IRQ_PRENMI500_MSG 673
#endif
/**
* Registers a client and an associated message queue with the IRQ manager. When an
@ -163,8 +168,13 @@ void IrqMgr_HandlePreNMI(IrqMgr* irqMgr) {
irqMgr->resetStatus = IRQ_RESET_STATUS_PRENMI;
sIrqMgrResetTime = irqMgr->resetTime = osGetTime();
#if OOT_VERSION < PAL_1_0
// Schedule a PRENMI500 message to be handled in 500ms
osSetTimer(&irqMgr->timer, OS_USEC_TO_CYCLES(500000), 0, &irqMgr->queue, (OSMesg)IRQ_PRENMI500_MSG);
#else
// Schedule a PRENMI450 message to be handled in 450ms
osSetTimer(&irqMgr->timer, OS_USEC_TO_CYCLES(450000), 0, &irqMgr->queue, (OSMesg)IRQ_PRENMI450_MSG);
#endif
IrqMgr_JamMesgToClients(irqMgr, (OSMesg)&irqMgr->prenmiMsg);
}
@ -183,6 +193,27 @@ void IrqMgr_CheckStacks(void) {
}
}
#if OOT_VERSION < PAL_1_0
void IrqMgr_HandlePreNMI500(IrqMgr* irqMgr) {
u64 nmi = IRQ_RESET_STATUS_NMI; // required to match
u32 result;
gIrqMgrResetStatus = nmi;
irqMgr->resetStatus = IRQ_RESET_STATUS_NMI;
IrqMgr_SendMesgToClients(irqMgr, (OSMesg)&irqMgr->nmiMsg);
result = osAfterPreNMI();
if (result != 0) {
// Schedule another PRENMI500 message to be handled in 1ms
osSetTimer(&irqMgr->timer, OS_USEC_TO_CYCLES(1000), 0, &irqMgr->queue, (OSMesg)IRQ_PRENMI500_MSG);
}
IrqMgr_CheckStacks();
}
#else
void IrqMgr_HandlePreNMI450(IrqMgr* irqMgr) {
u64 nmi = IRQ_RESET_STATUS_NMI; // required to match
@ -215,6 +246,8 @@ void IrqMgr_HandlePreNMI500(IrqMgr* irqMgr) {
IrqMgr_CheckStacks();
}
#endif
/**
* Runs on each vertical retrace
*
@ -244,6 +277,11 @@ void IrqMgr_ThreadEntry(void* arg) {
while (!exit) {
osRecvMesg(&irqMgr->queue, (OSMesg*)&msg, OS_MESG_BLOCK);
switch (msg) {
#if OOT_VERSION < PAL_1_0
default:
break;
#endif
case IRQ_RETRACE_MSG:
IrqMgr_HandleRetrace(irqMgr);
break;
@ -254,6 +292,7 @@ void IrqMgr_ThreadEntry(void* arg) {
IrqMgr_HandlePreNMI(irqMgr);
break;
#if OOT_VERSION >= PAL_1_0
case IRQ_PRENMI450_MSG:
PRINTF("PRENMI450_MSG\n");
PRINTF(T("スケジューラPRENMI450メッセージを受信\n", "Scheduler: Receives PRENMI450 message\n"));
@ -265,6 +304,7 @@ void IrqMgr_ThreadEntry(void* arg) {
PRINTF(T("スケジューラPRENMI480メッセージを受信\n", "Scheduler: Receives PRENMI480 message\n"));
IrqMgr_HandlePreNMI480(irqMgr);
break;
#endif
case IRQ_PRENMI500_MSG:
PRINTF("PRENMI500_MSG\n");
@ -273,11 +313,13 @@ void IrqMgr_ThreadEntry(void* arg) {
exit = true;
break;
#if OOT_VERSION >= PAL_1_0
default:
PRINTF(T("irqmgr.c:予期しないメッセージを受け取りました(%08x)\n",
"irqmgr.c: Unexpected message received (%08x)\n"),
msg);
break;
#endif
}
}

View file

@ -1,4 +1,5 @@
#include "ultra64.h"
#include "versions.h"
// Declared before including other headers for BSS ordering
extern uintptr_t gSegments[NUM_SEGMENTS];
@ -23,7 +24,7 @@ extern struct IrqMgr gIrqMgr;
#endif
#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160 gc-us-mq:160" \
"ntsc-1.2:154 pal-1.0:152 pal-1.1:152"
"ntsc-1.2:151 pal-1.0:149 pal-1.1:149"
extern u8 _buffersSegmentEnd[];
@ -39,7 +40,11 @@ uintptr_t gSegments[NUM_SEGMENTS];
OSThread sGraphThread;
STACK(sGraphStack, 0x1800);
#if OOT_VERSION < PAL_1_0
STACK(sSchedStack, 0x400);
#else
STACK(sSchedStack, 0x600);
#endif
STACK(sAudioStack, 0x800);
STACK(sPadMgrStack, 0x500);
STACK(sIrqMgrStack, 0x500);
@ -78,7 +83,7 @@ void Main(void* arg) {
#if PLATFORM_N64
func_800AD410();
if (D_80121211 != 0) {
systemHeapStart = (uintptr_t)&_n64ddSegmentEnd;
systemHeapStart = (uintptr_t)_n64ddSegmentEnd;
SysCfb_Init(1);
} else {
func_800AD488();
@ -150,7 +155,10 @@ void Main(void* arg) {
StackCheck_Init(&sGraphStackInfo, sGraphStack, STACK_TOP(sGraphStack), 0, 0x100, "graph");
osCreateThread(&sGraphThread, THREAD_ID_GRAPH, Graph_ThreadEntry, arg, STACK_TOP(sGraphStack), THREAD_PRI_GRAPH);
osStartThread(&sGraphThread);
#if OOT_VERSION >= PAL_1_0
osSetThreadPri(NULL, THREAD_PRI_MAIN);
#endif
while (true) {
s16* msg = NULL;
@ -162,6 +170,9 @@ void Main(void* arg) {
switch (*msg) {
case OS_SC_PRE_NMI_MSG:
PRINTF(T("main.c: リセットされたみたいだよ\n", "main.c: Looks like it's been reset\n"));
#if OOT_VERSION < PAL_1_0
StackCheck_Check(NULL);
#endif
PreNmiBuff_SetReset(gAppNmiBufferPtr);
break;
}

View file

@ -326,7 +326,9 @@ void PadMgr_UpdateInputs(PadMgr* padMgr) {
default:
// Unknown error response
LOG_HEX("padnow1->errno", pad->errno, "../padmgr.c", 396);
#if PLATFORM_N64
#if OOT_VERSION < NTSC_1_1
Fault_AddHungupAndCrash("../padmgr.c", 379);
#elif OOT_VERSION < GC_JP
Fault_AddHungupAndCrash("../padmgr.c", 382);
#else
Fault_AddHungupAndCrash("../padmgr.c", 397);

View file

@ -33,7 +33,11 @@ void SysCfb_Init(s32 n64dd) {
PRINTF("RAM4M mode\n");
sSysCfbEnd = 0x80400000;
} else {
#if PLATFORM_N64
#if OOT_VERSION < NTSC_1_1
LogUtils_HungupThread("../sys_cfb.c", 305);
#elif OOT_VERSION < PAL_1_0
LogUtils_HungupThread("../sys_cfb.c", 308);
#elif OOT_VERSION < GC_JP
LogUtils_HungupThread("../sys_cfb.c", 322);
#else
LogUtils_HungupThread("../sys_cfb.c", 354);

View file

@ -389,7 +389,7 @@ void Attention_Draw(Attention* attention, PlayState* play) {
Attention_SetReticlePos(attention, attention->curReticle, projectedPos.x, projectedPos.y, projectedPos.z);
if (!(player->stateFlags1 & PLAYER_STATE1_6) || (actor != player->focusActor)) {
if (!(player->stateFlags1 & PLAYER_STATE1_TALKING) || (actor != player->focusActor)) {
OVERLAY_DISP = Gfx_SetupDL(OVERLAY_DISP, SETUPDL_57);
for (i = 0, curReticle = attention->curReticle; i < numReticles;
@ -1098,7 +1098,7 @@ int func_8002DD6C(Player* player) {
}
int func_8002DD78(Player* player) {
return func_8002DD6C(player) && player->unk_834;
return func_8002DD6C(player) && (player->unk_834 != 0);
}
int func_8002DDA8(PlayState* play) {
@ -2308,29 +2308,29 @@ void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* play
u32 sCategoryFreezeMasks[ACTORCAT_MAX] = {
// ACTORCAT_SWITCH
PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28,
PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28,
// ACTORCAT_BG
PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28,
PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28,
// ACTORCAT_PLAYER
0,
// ACTORCAT_EXPLOSIVE
PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_10 | PLAYER_STATE1_28,
PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_10 | PLAYER_STATE1_28,
// ACTORCAT_NPC
PLAYER_STATE1_DEAD,
// ACTORCAT_ENEMY
PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29,
PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29,
// ACTORCAT_PROP
PLAYER_STATE1_DEAD | PLAYER_STATE1_28,
// ACTORCAT_ITEMACTION
0,
// ACTORCAT_MISC
PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29,
PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29,
// ACTORCAT_BOSS
PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_10 | PLAYER_STATE1_28,
PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_10 | PLAYER_STATE1_28,
// ACTORCAT_DOOR
0,
// ACTORCAT_CHEST
PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28,
PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28,
};
void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
@ -2381,7 +2381,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
requiredActorFlag = ACTOR_FLAG_25;
}
if ((player->stateFlags1 & PLAYER_STATE1_6) && ((player->actor.textId & 0xFF00) != 0x600)) {
if ((player->stateFlags1 & PLAYER_STATE1_TALKING) && ((player->actor.textId & 0xFF00) != 0x600)) {
sp74 = player->talkActor;
}

View file

@ -1,7 +1,7 @@
#include "global.h"
#include "terminal.h"
#pragma increment_block_number "ntsc-1.2:140"
#pragma increment_block_number "ntsc-1.2:136"
u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* nodeList);
void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector);
@ -1611,7 +1611,11 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
colCtx->subdivAmount.z,
ALIGNOF_MASK(StaticLookup));
if (colCtx->lookupTbl == NULL) {
#if OOT_VERSION < NTSC_1_1
LogUtils_HungupThread("../z_bgcheck.c", 4173);
#else
LogUtils_HungupThread("../z_bgcheck.c", 4176);
#endif
}
colCtx->minBounds.x = colCtx->colHeader->minBounds.x;
colCtx->minBounds.y = colCtx->colHeader->minBounds.y;
@ -1635,7 +1639,11 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
tblMax = customNodeListMax;
} else {
if (colCtx->memSize < memSize) {
#if OOT_VERSION < NTSC_1_1
LogUtils_HungupThread("../z_bgcheck.c", 4227);
#else
LogUtils_HungupThread("../z_bgcheck.c", 4230);
#endif
}
tblMax = (colCtx->memSize - memSize) / sizeof(SSNode);
}

View file

@ -3639,7 +3639,7 @@ s32 Camera_KeepOn3(Camera* camera) {
}
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:96 pal-1.0:94 pal-1.1:94"
"ntsc-1.2:93 pal-1.0:91 pal-1.1:91"
s32 Camera_KeepOn4(Camera* camera) {
static Vec3f D_8015BD50;

View file

@ -1,13 +1,22 @@
#include "global.h"
#include "gfx.h"
#include "macros.h"
#include "regs.h"
#include "sfx.h"
#include "sys_math3d.h"
#include "sys_matrix.h"
#include "terminal.h"
#include "versions.h"
#include "z64collision_check.h"
#include "z64effect.h"
#include "z64frame_advance.h"
#include "zelda_arena.h"
#include "z64play.h"
#include "overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h"
#include "z_lib.h"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:208" \
"pal-1.0:200 pal-1.1:200"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:104 pal-1.0:104 pal-1.1:104"
typedef s32 (*ColChkResetFunc)(PlayState*, Collider*);
typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*);

View file

@ -52,17 +52,17 @@ void Interface_Init(PlayState* play) {
#if OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN) {
doActionOffset = LANGUAGE_JPN * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
doActionOffset = (LANGUAGE_JPN * DO_ACTION_MAX + DO_ACTION_ATTACK) * DO_ACTION_TEX_SIZE;
} else {
doActionOffset = LANGUAGE_ENG * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
doActionOffset = (LANGUAGE_ENG * DO_ACTION_MAX + DO_ACTION_ATTACK) * DO_ACTION_TEX_SIZE;
}
#else
if (gSaveContext.language == LANGUAGE_ENG) {
doActionOffset = LANGUAGE_ENG * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
doActionOffset = (LANGUAGE_ENG * DO_ACTION_MAX + DO_ACTION_ATTACK) * DO_ACTION_TEX_SIZE;
} else if (gSaveContext.language == LANGUAGE_GER) {
doActionOffset = LANGUAGE_GER * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
doActionOffset = (LANGUAGE_GER * DO_ACTION_MAX + DO_ACTION_ATTACK) * DO_ACTION_TEX_SIZE;
} else {
doActionOffset = LANGUAGE_FRA * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
doActionOffset = (LANGUAGE_FRA * DO_ACTION_MAX + DO_ACTION_ATTACK) * DO_ACTION_TEX_SIZE;
}
#endif
@ -71,17 +71,17 @@ void Interface_Init(PlayState* play) {
#if OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN) {
doActionOffset = 3 * DO_ACTION_TEX_SIZE + LANGUAGE_JPN * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
doActionOffset = (LANGUAGE_JPN * DO_ACTION_MAX + DO_ACTION_RETURN) * DO_ACTION_TEX_SIZE;
} else {
doActionOffset = 3 * DO_ACTION_TEX_SIZE + LANGUAGE_ENG * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
doActionOffset = (LANGUAGE_ENG * DO_ACTION_MAX + DO_ACTION_RETURN) * DO_ACTION_TEX_SIZE;
}
#else
if (gSaveContext.language == LANGUAGE_ENG) {
doActionOffset = 3 * DO_ACTION_TEX_SIZE + LANGUAGE_ENG * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
doActionOffset = (LANGUAGE_ENG * DO_ACTION_MAX + DO_ACTION_RETURN) * DO_ACTION_TEX_SIZE;
} else if (gSaveContext.language == LANGUAGE_GER) {
doActionOffset = 3 * DO_ACTION_TEX_SIZE + LANGUAGE_GER * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
doActionOffset = (LANGUAGE_GER * DO_ACTION_MAX + DO_ACTION_RETURN) * DO_ACTION_TEX_SIZE;
} else {
doActionOffset = 3 * DO_ACTION_TEX_SIZE + LANGUAGE_FRA * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
doActionOffset = (LANGUAGE_FRA * DO_ACTION_MAX + DO_ACTION_RETURN) * DO_ACTION_TEX_SIZE;
}
#endif
@ -326,7 +326,7 @@ void Regs_InitDataImpl(void) {
ZREG(10) = 200;
ZREG(11) = 0;
ZREG(12) = 200;
ZREG(13) = 0;
R_PAUSE_PAGE_SWITCH_FRAME_ADVANCE_ON = false;
ZREG(14) = 110;
ZREG(15) = 56;
ZREG(16) = 1;
@ -619,11 +619,12 @@ void Regs_InitDataImpl(void) {
R_MINIMAP_COLOR(2) = 255;
}
VREG(21) = 0;
VREG(22) = 0;
VREG(23) = 0;
VREG(24) = 0;
VREG(25) = 0;
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_A) = 0;
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_DOWN) = 0;
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_RIGHT) = 0;
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_LEFT) = 0;
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_UP) = 0;
VREG(26) = 0;
VREG(27) = 0;
R_OCARINA_BUTTONS_XPOS = 98;
@ -649,7 +650,7 @@ void Regs_InitDataImpl(void) {
R_OCARINA_BUTTONS_YPOS(2) = 176;
R_OCARINA_BUTTONS_YPOS(3) = 172;
R_OCARINA_BUTTONS_YPOS(4) = 170;
VREG(50) = 30;
R_OCARINA_BUTTONS_APPEAR_ALPHA_STEP = 30;
R_OCARINA_BUTTONS_YPOS_OFFSET = 0;
VREG(52) = -16;
VREG(53) = 230;

View file

@ -124,7 +124,7 @@ u16 gCamAtSplinePointsAppliedFrame;
u16 gCamEyePointAppliedFrame;
u16 gCamAtPointAppliedFrame;
#pragma increment_block_number "gc-eu:192 gc-eu-mq:176 gc-jp:192 gc-jp-ce:192 gc-jp-mq:176 gc-us:192 gc-us-mq:176" \
#pragma increment_block_number "gc-eu:188 gc-eu-mq:176 gc-jp:188 gc-jp-ce:188 gc-jp-mq:176 gc-us:188 gc-us-mq:176" \
"ntsc-1.2:80 pal-1.0:80 pal-1.1:80"
// Cam ID to return to when a scripted cutscene is finished

View file

@ -1,5 +1,5 @@
#pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224 gc-us-mq:224" \
"ntsc-1.2:0"
"ntsc-1.2:224 pal-1.0:224 pal-1.1:224"
#include "global.h"
#include "terminal.h"

View file

@ -144,7 +144,7 @@ void KaleidoSetup_Init(PlayState* play) {
pauseCtx->cursorPoint[PAUSE_ITEM] = 0;
pauseCtx->cursorPoint[PAUSE_MAP] = VREG(30) + 3;
pauseCtx->cursorPoint[PAUSE_QUEST] = 0;
pauseCtx->cursorPoint[PAUSE_QUEST] = QUEST_MEDALLION_FOREST;
pauseCtx->cursorPoint[PAUSE_EQUIP] = 1;
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 10;

View file

@ -1,5 +1,5 @@
#pragma increment_block_number "gc-eu:248 gc-eu-mq:248 gc-jp:240 gc-jp-ce:240 gc-jp-mq:240 gc-us:240 gc-us-mq:240" \
"ntsc-1.2:0 pal-1.0:252 pal-1.1:252"
#pragma increment_block_number "gc-eu:244 gc-eu-mq:244 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224 gc-us-mq:224" \
"ntsc-1.2:224 pal-1.0:252 pal-1.1:252"
#include "global.h"
#include "ultra64.h"
@ -215,7 +215,7 @@ s16 sSunDepthTestX;
s16 sSunDepthTestY;
#pragma increment_block_number "gc-eu:240 gc-eu-mq:240 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224 gc-us-mq:224" \
"ntsc-1.2:216 pal-1.0:240 pal-1.1:240"
"ntsc-1.2:224 pal-1.0:240 pal-1.1:240"
LightNode* sNGameOverLightNode;
LightInfo sNGameOverLightInfo;

View file

@ -3889,7 +3889,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (1) {}
if (sOcarinaButtonAlphaValues[i] != 255) {
sOcarinaButtonAlphaValues[i] += VREG(50);
sOcarinaButtonAlphaValues[i] += R_OCARINA_BUTTONS_APPEAR_ALPHA_STEP;
if (sOcarinaButtonAlphaValues[i] >= 255) {
sOcarinaButtonAlphaValues[i] = 255;
}

View file

@ -2125,9 +2125,9 @@ void Interface_LoadActionLabel(InterfaceContext* interfaceCtx, u16 action, s16 l
#endif
#if OOT_VERSION < PAL_1_0
if ((action != DO_ACTION_NONE) && (action != DO_ACTION_MAX + DO_ACTION_NONE))
if ((action != 0 * DO_ACTION_MAX + DO_ACTION_NONE) && (action != 1 * DO_ACTION_MAX + DO_ACTION_NONE))
#else
if ((action != DO_ACTION_NONE) && (action != DO_ACTION_MAX + DO_ACTION_NONE) &&
if ((action != 0 * DO_ACTION_MAX + DO_ACTION_NONE) && (action != 1 * DO_ACTION_MAX + DO_ACTION_NONE) &&
(action != 2 * DO_ACTION_MAX + DO_ACTION_NONE))
#endif
{

View file

@ -176,7 +176,11 @@ void Play_SetupTransition(PlayState* this, s32 transitionType) {
break;
default:
#if OOT_VERSION < PAL_1_1
#if OOT_VERSION < NTSC_1_1
HUNGUP_AND_CRASH("../z_play.c", 2263);
#elif OOT_VERSION < PAL_1_0
HUNGUP_AND_CRASH("../z_play.c", 2266);
#elif OOT_VERSION < PAL_1_1
HUNGUP_AND_CRASH("../z_play.c", 2269);
#elif OOT_VERSION < GC_JP
HUNGUP_AND_CRASH("../z_play.c", 2272);

View file

@ -24,8 +24,8 @@ s16 sBootData[PLAYER_BOOTS_MAX][17] = {
FRAMERATE_CONST(270, 324), // REG(36)
600, // REG(37)
FRAMERATE_CONST(350, 420), // REG(38)
800, // REG(43)
600, // REG(45)
800, // R_DECELERATE_RATE
600, // R_RUN_SPEED_LIMIT
-100, // REG(68)
600, // REG(69)
590, // IREG(66)
@ -44,8 +44,8 @@ s16 sBootData[PLAYER_BOOTS_MAX][17] = {
FRAMERATE_CONST(270, 324), // REG(36)
1000, // REG(37)
FRAMERATE_CONST(0, 0), // REG(38)
800, // REG(43)
300, // REG(45)
800, // R_DECELERATE_RATE
300, // R_RUN_SPEED_LIMIT
-160, // REG(68)
600, // REG(69)
590, // IREG(66)
@ -64,8 +64,8 @@ s16 sBootData[PLAYER_BOOTS_MAX][17] = {
FRAMERATE_CONST(270, 324), // REG(36)
600, // REG(37)
FRAMERATE_CONST(600, 720), // REG(38)
800, // REG(43)
550, // REG(45)
800, // R_DECELERATE_RATE
550, // R_RUN_SPEED_LIMIT
-100, // REG(68)
600, // REG(69)
540, // IREG(66)
@ -84,8 +84,8 @@ s16 sBootData[PLAYER_BOOTS_MAX][17] = {
FRAMERATE_CONST(400, 480), // REG(36)
0, // REG(37)
FRAMERATE_CONST(300, 360), // REG(38)
800, // REG(43)
500, // REG(45)
800, // R_DECELERATE_RATE
500, // R_RUN_SPEED_LIMIT
-100, // REG(68)
600, // REG(69)
590, // IREG(66)
@ -104,8 +104,8 @@ s16 sBootData[PLAYER_BOOTS_MAX][17] = {
FRAMERATE_CONST(270, 324), // REG(36)
600, // REG(37)
FRAMERATE_CONST(50, 60), // REG(38)
800, // REG(43)
550, // REG(45)
800, // R_DECELERATE_RATE
550, // R_RUN_SPEED_LIMIT
-40, // REG(68)
400, // REG(69)
540, // IREG(66)
@ -124,8 +124,8 @@ s16 sBootData[PLAYER_BOOTS_MAX][17] = {
FRAMERATE_CONST(400, 480), // REG(36)
800, // REG(37)
FRAMERATE_CONST(400, 480), // REG(38)
800, // REG(43)
550, // REG(45)
800, // R_DECELERATE_RATE
550, // R_RUN_SPEED_LIMIT
-100, // REG(68)
600, // REG(69)
540, // IREG(66)
@ -589,8 +589,8 @@ void Player_SetBootData(PlayState* play, Player* this) {
REG(36) = bootRegs[5];
REG(37) = bootRegs[6];
REG(38) = bootRegs[7];
REG(43) = bootRegs[8];
REG(45) = bootRegs[9];
R_DECELERATE_RATE = bootRegs[8];
R_RUN_SPEED_LIMIT = bootRegs[9];
REG(68) = bootRegs[10];
REG(69) = bootRegs[11];
IREG(66) = bootRegs[12];
@ -600,7 +600,7 @@ void Player_SetBootData(PlayState* play, Player* this) {
MREG(95) = bootRegs[16];
if (play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_2) {
REG(45) = 500;
R_RUN_SPEED_LIMIT = 500;
}
}
@ -1295,22 +1295,22 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
}
if (limbIndex == PLAYER_LIMB_HEAD) {
rot->x += this->unk_6BA;
rot->y -= this->unk_6B8;
rot->z += this->unk_6B6;
rot->x += this->headLimbRot.z;
rot->y -= this->headLimbRot.y;
rot->z += this->headLimbRot.x;
} else if (limbIndex == PLAYER_LIMB_UPPER) {
if (this->unk_6B0 != 0) {
if (this->upperLimbYawSecondary != 0) {
Matrix_RotateZ(BINANG_TO_RAD(0x44C), MTXMODE_APPLY);
Matrix_RotateY(BINANG_TO_RAD(this->unk_6B0), MTXMODE_APPLY);
Matrix_RotateY(BINANG_TO_RAD(this->upperLimbYawSecondary), MTXMODE_APPLY);
}
if (this->unk_6BE != 0) {
Matrix_RotateY(BINANG_TO_RAD(this->unk_6BE), MTXMODE_APPLY);
if (this->upperLimbRot.y != 0) {
Matrix_RotateY(BINANG_TO_RAD(this->upperLimbRot.y), MTXMODE_APPLY);
}
if (this->unk_6BC != 0) {
Matrix_RotateX(BINANG_TO_RAD(this->unk_6BC), MTXMODE_APPLY);
if (this->upperLimbRot.x != 0) {
Matrix_RotateX(BINANG_TO_RAD(this->upperLimbRot.x), MTXMODE_APPLY);
}
if (this->unk_6C0 != 0) {
Matrix_RotateZ(BINANG_TO_RAD(this->unk_6C0), MTXMODE_APPLY);
if (this->upperLimbRot.z != 0) {
Matrix_RotateZ(BINANG_TO_RAD(this->upperLimbRot.z), MTXMODE_APPLY);
}
} else if (limbIndex == PLAYER_LIMB_L_THIGH) {
s32 pad;
@ -1788,7 +1788,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
Matrix_MtxFToYXZRotS(&sp44, &heldActor->world.rot, 0);
heldActor->shape.rot = heldActor->world.rot;
if (func_8002DD78(this) != 0) {
if (func_8002DD78(this)) {
Matrix_Translate(500.0f, 300.0f, 0.0f, MTXMODE_APPLY);
Player_DrawHookshotReticle(play, this,
(this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f);

View file

@ -456,7 +456,11 @@ RoomShapeImageMultiBgEntry* Room_GetImageMultiBgEntry(RoomShapeImageMulti* roomS
PRINTF(VT_COL(RED, WHITE) T("z_room.c:カメラIDに一致するデータが存在しません camid=%d\n",
"z_room.c: Data consistent with camera id does not exist camid=%d\n") VT_RST,
bgCamIndex);
#if PLATFORM_N64
#if OOT_VERSION < NTSC_1_1
Fault_AddHungupAndCrash("../z_room.c", 724);
#elif OOT_VERSION < PAL_1_0
Fault_AddHungupAndCrash("../z_room.c", 727);
#elif OOT_VERSION < GC_JP
Fault_AddHungupAndCrash("../z_room.c", 721);
#else
LogUtils_HungupThread("../z_room.c", 726);
@ -543,7 +547,11 @@ void Room_DrawImage(PlayState* play, Room* room, u32 flags) {
} else if (roomShape->amountType == ROOM_SHAPE_IMAGE_AMOUNT_MULTI) {
Room_DrawImageMulti(play, room, flags);
} else {
#if PLATFORM_N64
#if OOT_VERSION < NTSC_1_1
Fault_AddHungupAndCrash("../z_room.c", 849);
#elif OOT_VERSION < PAL_1_0
Fault_AddHungupAndCrash("../z_room.c", 852);
#elif OOT_VERSION < GC_JP
Fault_AddHungupAndCrash("../z_room.c", 836);
#else
LogUtils_HungupThread("../z_room.c", 841);

View file

@ -1,5 +1,6 @@
#include "global.h"
#include "ultra64/viint.h"
#include "versions.h"
void ViMode_LogPrint(OSViMode* osViMode) {
LOG_ADDRESS("osvimodep", osViMode, "../z_vimode.c", 87);
@ -182,6 +183,7 @@ void ViMode_Save(ViMode* viMode) {
R_VI_MODE_EDIT_ULX_ADJ = viMode->leftAdjust;
R_VI_MODE_EDIT_LRX_ADJ = viMode->rightAdjust;
#if OOT_VERSION >= PAL_1_0
if (SREG(58) == 1) {
SREG(58) = 0;
@ -200,6 +202,7 @@ void ViMode_Save(ViMode* viMode) {
break;
}
}
#endif
}
void ViMode_Load(ViMode* viMode) {
@ -270,8 +273,18 @@ void ViMode_Update(ViMode* viMode, Input* input) {
// Load state from REGs
ViMode_Load(viMode);
#if OOT_VERSION < PAL_1_0
if (viMode->editState == VI_MODE_EDIT_STATE_NEGATIVE_2) {
// Log comparison between the NTSC LAN1 mode and the custom mode
ViMode_LogPrint(&osViModeNtscLan1);
ViMode_LogPrint(&viMode->customViMode);
viMode->editState = VI_MODE_EDIT_STATE_NEGATIVE_1;
} else if ((viMode->editState == VI_MODE_EDIT_STATE_2) || (viMode->editState == VI_MODE_EDIT_STATE_3))
#else
if ((viMode->editState == VI_MODE_EDIT_STATE_ACTIVE) || (viMode->editState == VI_MODE_EDIT_STATE_2) ||
(viMode->editState == VI_MODE_EDIT_STATE_3)) {
(viMode->editState == VI_MODE_EDIT_STATE_3))
#endif
{
gScreenWidth = viMode->viWidth;
gScreenHeight = viMode->viHeight;
@ -333,6 +346,21 @@ void ViMode_Update(ViMode* viMode, Input* input) {
}
// Clamp adjustments
#if OOT_VERSION < PAL_1_0
// Do not allow parts of the framebuffer to end up offscreen
if (viMode->leftAdjust < 0) {
viMode->leftAdjust = 0;
}
if (viMode->upperAdjust < 0) {
viMode->upperAdjust = 0;
}
if (viMode->rightAdjust > 0) {
viMode->rightAdjust = 0;
}
if (viMode->lowerAdjust > 0) {
viMode->lowerAdjust = 0;
}
#else
if (viMode->editState >= VI_MODE_EDIT_STATE_2) {
// Allow parts of the framebuffer to possibly be offscreen by a small margin
if (viMode->leftAdjust < -16) {
@ -362,11 +390,21 @@ void ViMode_Update(ViMode* viMode, Input* input) {
viMode->lowerAdjust = 0;
}
}
#endif
// Configure the custom VI mode with the selected settings
ViMode_Configure(viMode, OS_VI_MPAL_LPN1, osTvType, viMode->loRes, viMode->antialiasOff, viMode->modeN,
viMode->fb16Bit, viMode->viWidth, viMode->viHeight, viMode->leftAdjust, viMode->rightAdjust,
viMode->upperAdjust, viMode->lowerAdjust);
#if OOT_VERSION < PAL_1_0
if (viMode->editState == VI_MODE_EDIT_STATE_3) {
// Log comparison between the NTSC LAN1 mode and the custom mode
ViMode_LogPrint(&osViModeNtscLan1);
ViMode_LogPrint(&viMode->customViMode);
}
#endif
ViMode_ConfigureFeatures(viMode, viMode->viFeatures);
if (viMode->editState == VI_MODE_EDIT_STATE_3) {

View file

@ -112,9 +112,9 @@ void func_801C6FD8(void) {
// Adds a HungupAndCrash
void func_801C7018(void) {
if (D_80121213 != 0) {
#if OOT_VERSION == NTSC_1_0
#if OOT_VERSION < NTSC_1_1
Fault_AddHungupAndCrash("../z_n64dd.c", 503);
#elif OOT_VERSION == NTSC_1_1
#elif OOT_VERSION < PAL_1_0
Fault_AddHungupAndCrash("../z_n64dd.c", 551);
#else
Fault_AddHungupAndCrash("../z_n64dd.c", 573);
@ -215,7 +215,7 @@ void func_801C7268(void) {
} else if (B_801D9DC8 != 0) {
B_801D9DC8 = 0;
}
#if OOT_VERSION == NTSC_1_0
#if OOT_VERSION < NTSC_1_1
if (B_801D9DC0 != 0) {
sp1C = (osGetTime() - B_801D9DC0) * 64 / 3000;
@ -338,7 +338,7 @@ s32 func_801C7658(void) {
B_801D9D50.unk_00 = 13;
(&func_801C8000)(&B_801D9D50);
#if OOT_VERSION > NTSC_1_1
#if OOT_VERSION >= PAL_1_0
StackCheck_Init(&B_801DAF88, B_801D9F88, STACK_TOP(B_801D9F88), 0, 0x100, "ddmsg");
osCreateThread(&B_801D9DD8, THREAD_ID_DDMSG, &func_801C711C, &B_801D9B90, STACK_TOP(B_801D9F88), THREAD_PRI_DDMSG);
osStartThread(&B_801D9DD8);
@ -519,7 +519,7 @@ void func_801C7C1C(void* dest, s32 offset, s32 size) {
bcopy((u8*)sp4C, (u8*)dest + func_801C7BEC(sp5C) - sp54 + var_s1, sp50);
}
}
#if OOT_VERSION == NTSC_1_0
#if OOT_VERSION < NTSC_1_1
if (B_801D9DC0 != 0) {
temp_v1_2 = (osGetTime() - B_801D9DC0) * 64 / 3000;
if (1000000 - temp_v1_2 > 0) {

View file

@ -289,7 +289,7 @@ void BgHakaSgami_Update(Actor* thisx, PlayState* play) {
BgHakaSgami* this = (BgHakaSgami*)thisx;
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29)) ||
if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29)) ||
(this->actionFunc == BgHakaSgami_SetupSpin)) {
this->actionFunc(this, play);
}

View file

@ -200,7 +200,7 @@ void BgJyaGoroiwa_Update(Actor* thisx, PlayState* play) {
s32 bgId;
Vec3f checkPos;
if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
this->actionFunc(this, play);
BgJyaGoroiwa_UpdateRotation(this);
checkPos.x = this->actor.world.pos.x;

View file

@ -381,7 +381,7 @@ void BossMo_Init(Actor* thisx, PlayState* play2) {
} else {
Actor_SetScale(&this->actor, 0.01f);
BossMo_SetupTentacle(this, play);
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
MO_WATER_LEVEL(play) = -50;
this->waterTexAlpha = 90.0f;
this->actor.world.pos.y = MO_WATER_LEVEL(play);

View file

@ -484,7 +484,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
}
Actor_SetScale(&this->actor, 2.5 * 0.01f);
this->actor.colChkInfo.mass = 255;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.colChkInfo.health = 0;
Collider_InitCylinder(play, &this->collider);

View file

@ -10,7 +10,7 @@
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:128"
"ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)

View file

@ -6,6 +6,9 @@
#include "assets/objects/object_efc_star_field/object_efc_star_field.h"
#include "assets/objects/object_toki_objects/object_toki_objects.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:128"
#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
void DemoKankyo_Init(Actor* thisx, PlayState* play);

View file

@ -915,7 +915,7 @@ void DoorShutter_Update(Actor* thisx, PlayState* play) {
DoorShutter* this = (DoorShutter*)thisx;
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_10 | PLAYER_STATE1_28)) ||
if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_10 | PLAYER_STATE1_28)) ||
(this->actionFunc == DoorShutter_WaitForObject)) {
this->actionFunc(this, play);
}

View file

@ -178,7 +178,7 @@ void EnDekunuts_SetupBurrow(EnDekunuts* this) {
void EnDekunuts_SetupBeginRun(EnDekunuts* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gDekuNutsUnburrowAnim, -3.0f);
this->collider.dim.height = 37;
this->actor.colChkInfo.mass = 0x32;
this->actor.colChkInfo.mass = 50;
Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_DAMAGE);
this->collider.base.acFlags &= ~AC_ON;
this->actionFunc = EnDekunuts_BeginRun;
@ -446,7 +446,7 @@ void EnDekunuts_ColliderCheck(EnDekunuts* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if (this->actor.colChkInfo.mass == 0x32) {
if (this->actor.colChkInfo.mass == 50) {
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actor.colChkInfo.damageEffect != 1) {
if (this->actor.colChkInfo.damageEffect == 2) {

View file

@ -83,7 +83,7 @@ void EnDntJiji_Init(Actor* thisx, PlayState* play) {
// "Deku Scrub mask show elder"
PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ デグナッツお面品評会長老 ☆☆☆☆☆ %x\n" VT_RST, this->stage);
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.attentionRangeType = ATTENTION_RANGE_6;
this->actionFunc = EnDntJiji_SetFlower;
this->actor.gravity = -2.0f;

View file

@ -128,7 +128,7 @@ void EnDntNomal_Init(Actor* thisx, PlayState* play) {
this->type = ENDNTNOMAL_TARGET;
}
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->objectId = -1;
if (this->type == ENDNTNOMAL_TARGET) {
PRINTF("\n\n");
@ -676,7 +676,7 @@ void EnDntNomal_SetupStageAttack(EnDntNomal* this, PlayState* play) {
if (this->timer3 == 0) {
this->endFrame = (f32)Animation_GetLastFrame(&gDntStageSpitAnim);
Animation_Change(&this->skelAnime, &gDntStageSpitAnim, 1.0f, 0.0f, this->endFrame, ANIMMODE_ONCE, -10.0f);
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->isSolid = true;
this->timer2 = 0;
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY);

View file

@ -63,7 +63,7 @@ static ColliderCylinderInit sCylinderInit = {
{ 18, 20, 0, { 0, 0, 0 } },
};
static CollisionCheckInfoInit2 sColChkInit = { 1, 2, 25, 25, 0xFF };
static CollisionCheckInfoInit2 sColChkInit = { 1, 2, 25, 25, MASS_IMMOVABLE };
void EnDodojr_Init(Actor* thisx, PlayState* play) {
EnDodojr* this = (EnDodojr*)thisx;

View file

@ -176,7 +176,7 @@ void EnGb_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->dyna.actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
Actor_SetScale(&this->dyna.actor, 0.01f);
this->dyna.actor.colChkInfo.mass = 0xFF;
this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE;
this->dyna.actor.speed = 0.0f;
this->dyna.actor.velocity.y = 0.0f;
this->dyna.actor.gravity = -1.0f;

View file

@ -739,7 +739,7 @@ void EnGoroiwa_Update(Actor* thisx, PlayState* play) {
s32 pad;
s32 bgId;
if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
if (this->collisionDisabledTimer > 0) {
this->collisionDisabledTimer--;
}

View file

@ -724,7 +724,7 @@ void EnHorse_ResetRace(EnHorse* this, PlayState* play) {
s32 EnHorse_PlayerCanMove(EnHorse* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if ((player->stateFlags1 & PLAYER_STATE1_0) || func_8002DD78(GET_PLAYER(play)) == 1 ||
if ((player->stateFlags1 & PLAYER_STATE1_0) || func_8002DD78(GET_PLAYER(play)) == true ||
(player->stateFlags1 & PLAYER_STATE1_20) || ((this->stateFlags & ENHORSE_FLAG_19) && !this->inRace) ||
this->action == ENHORSE_ACT_HBA || player->actor.flags & ACTOR_FLAG_TALK ||
play->csCtx.state != CS_STATE_IDLE) {
@ -3608,9 +3608,9 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) {
}
if (thisx->speed == 0.0f && !(this->stateFlags & ENHORSE_FLAG_19)) {
thisx->colChkInfo.mass = 0xFF;
thisx->colChkInfo.mass = MASS_IMMOVABLE;
} else {
thisx->colChkInfo.mass = 0xFE;
thisx->colChkInfo.mass = MASS_HEAVY;
}
if (thisx->speed >= 5.0f) {

View file

@ -90,7 +90,11 @@ s32 EnHorseGameCheck_InitIngoRace(EnHorseGameCheckBase* base, PlayState* play) {
this->ingoHorse = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -250.0f, 1.0f, -1650.0f, 0, 0x4000, 0, 0x8003);
if (this->ingoHorse == NULL) {
#if OOT_VERSION < NTSC_1_1
LogUtils_HungupThread("../z_en_horse_game_check.c", 382);
#else
LogUtils_HungupThread("../z_en_horse_game_check.c", 385);
#endif
}
this->startTimer = 0;
this->finishTimer = 0;

View file

@ -60,7 +60,7 @@ void EnMk_Init(Actor* thisx, PlayState* play) {
Animation_PlayLoop(&this->skelAnime, &object_mk_Anim_000D88);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
Actor_SetScale(&this->actor, 0.01f);
this->actionFunc = EnMk_Wait;

View file

@ -147,7 +147,7 @@ void EnNutsball_Update(Actor* thisx, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 pad;
if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29)) ||
if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29)) ||
(this->actionFunc == func_80ABBB34)) {
this->actionFunc(this, play);

View file

@ -138,7 +138,7 @@ void EnNy_Init(Actor* thisx, PlayState* play) {
// "Dummy new initials"
PRINTF("ダミーニュウ イニシャル[ %d ] \n", this->actor.params);
PRINTF("En_Ny_actor_move2[ %x ] \n", EnNy_UpdateUnused);
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.update = EnNy_UpdateUnused;
this->collider.base.colMaterial = COL_MATERIAL_METAL;
}

View file

@ -578,7 +578,7 @@ void EnOkuta_Update(Actor* thisx, PlayState* play2) {
Vec3f prevPos;
s32 canRestorePrevPos;
if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
if (this->actor.params == 0) {
EnOkuta_ColliderCheck(this, play);
if (!WaterBox_GetSurfaceImpl(play, &play->colCtx, this->actor.world.pos.x, this->actor.world.pos.z,

Some files were not shown because too many files have changed in this diff Show more