Merge branch 'master' into object_obj_tokeidai

This commit is contained in:
tom-overton
2022-01-10 10:46:22 -08:00
360 changed files with 31418 additions and 6385 deletions
+17 -5
View File
@@ -8,8 +8,12 @@ COMPARE ?= 1
NON_MATCHING ?= 0
# If ORIG_COMPILER is 1, compile with QEMU_IRIX and the original compiler
ORIG_COMPILER ?= 0
# if WERROR is 1, pass -Werror to CC_CHECK, so warnings would be treated as errors
WERROR ?= 0
# Keep .mdebug section in build
KEEP_MDEBUG ?= 0
# Disassembles all asm from the ROM instead of skipping files which are entirely in C
FULL_DISASM ?= 0
ifeq ($(NON_MATCHING),1)
CFLAGS := -DNON_MATCHING
@@ -17,6 +21,10 @@ ifeq ($(NON_MATCHING),1)
COMPARE := 0
endif
ifneq ($(FULL_DISASM), 0)
DISASM_FLAGS += --full
endif
PROJECT_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
MAKE = make
@@ -104,6 +112,10 @@ ifneq ($(NON_MATCHING),1)
COMPFLAGS += --matching
endif
ifneq ($(WERROR), 0)
CC_CHECK += -Werror
endif
#### Files ####
# ROM image
@@ -246,7 +258,7 @@ setup:
## Assembly generation
disasm:
$(RM) -rf asm data
python3 tools/disasm/disasm.py -j $(N_THREADS)
python3 tools/disasm/disasm.py -j $(N_THREADS) $(DISASM_FLAGS)
diff-init: uncompressed
$(RM) -rf expected/
@@ -284,8 +296,8 @@ build/data/%.o: data/%.s
$(AS) $(ASFLAGS) $< -o $@
build/src/overlays/%.o: src/overlays/%.c
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
$(CC_CHECK) $<
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
@$(OBJDUMP) -d $@ > $(@:.o=.s)
# TODO: `() || true` is currently necessary to suppress `Error 1 (ignored)` make warnings caused by `test`, but this will go away if
# the following is moved to a separate rule that is only run once when all the required objects have been compiled.
@@ -294,21 +306,21 @@ build/src/overlays/%.o: src/overlays/%.c
$(RM_MDEBUG)
build/src/%.o: src/%.c
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
$(CC_CHECK) $<
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
@$(OBJDUMP) -d $@ > $(@:.o=.s)
$(RM_MDEBUG)
build/src/libultra/libc/ll.o: src/libultra/libc/ll.c
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
$(CC_CHECK) $<
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
python3 tools/set_o32abi_bit.py $@
@$(OBJDUMP) -d $@ > $(@:.o=.s)
$(RM_MDEBUG)
build/src/libultra/libc/llcvt.o: src/libultra/libc/llcvt.c
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
$(CC_CHECK) $<
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
python3 tools/set_o32abi_bit.py $@
@$(OBJDUMP) -d $@ > $(@:.o=.s)
$(RM_MDEBUG)
+2 -2
View File
@@ -1,7 +1,7 @@
<Root>
<File Name="gameplay_dangeon_keep" Segment="5">
<DList Name="gameplay_dangeon_keep_DL_000140" Offset="0x140" />
<DList Name="gameplay_dangeon_keep_DL_000230" Offset="0x230" />
<DList Name="gDoorLockDL" Offset="0x140" />
<DList Name="gDoorChainsDL" Offset="0x230" />
<Texture Name="gameplay_dangeon_keep_Tex_0002C0" OutName="tex_0002C0" Format="rgba16" Width="32" Height="32" Offset="0x2C0" />
<Texture Name="gameplay_dangeon_keep_Tex_000AC0" OutName="tex_000AC0" Format="rgba16" Width="32" Height="32" Offset="0xAC0" />
<Texture Name="gameplay_dangeon_keep_Tex_0012C0" OutName="tex_0012C0" Format="rgba16" Width="16" Height="128" Offset="0x12C0" />
+95 -89
View File
@@ -766,59 +766,62 @@
<PlayerAnimation Name="gameplay_keep_Linkanim_00E4E8" Offset="0xE4E8" />
<PlayerAnimation Name="gameplay_keep_Linkanim_00E4F0" Offset="0xE4F0" />
<DList Name="gameplay_keep_DL_00E5C0" Offset="0xE5C0" />
<Collision Name="gameplay_keep_Colheader_00E710" Offset="0xE710" />
<Animation Name="gameplay_keep_Anim_00EB7C" Offset="0xEB7C" />
<DList Name="gameplay_keep_DL_00ED80" Offset="0xED80" />
<DList Name="gameplay_keep_DL_00F2B8" Offset="0xF2B8" />
<DList Name="gameplay_keep_DL_00F350" Offset="0xF350" />
<DList Name="gameplay_keep_DL_00F438" Offset="0xF438" />
<DList Name="gameplay_keep_DL_00F4C0" Offset="0xF4C0" />
<DList Name="gameplay_keep_DL_00F548" Offset="0xF548" />
<DList Name="gameplay_keep_DL_00F5D0" Offset="0xF5D0" />
<DList Name="gameplay_keep_DL_00F658" Offset="0xF658" />
<DList Name="gameplay_keep_DL_00F6E0" Offset="0xF6E0" />
<DList Name="gameplay_keep_DL_00F768" Offset="0xF768" />
<DList Name="gameplay_keep_DL_00F7F0" Offset="0xF7F0" />
<Texture Name="gameplay_keep_Tex_00F878" OutName="tex_00F878" Format="rgba16" Width="16" Height="32" Offset="0xF878" />
<Texture Name="gameplay_keep_Tex_00FC78" OutName="tex_00FC78" Format="rgba16" Width="16" Height="32" Offset="0xFC78" />
<Texture Name="gameplay_keep_Tex_010078" OutName="tex_010078" Format="rgba16" Width="32" Height="32" Offset="0x10078" />
<Texture Name="gameplay_keep_Tex_010878" OutName="tex_010878" Format="rgba16" Width="16" Height="32" Offset="0x10878" />
<Texture Name="gameplay_keep_Tex_010C78" OutName="tex_010C78" Format="rgba16" Width="32" Height="32" Offset="0x10C78" />
<Limb Name="gameplay_keep_Standardlimb_011478" Type="Standard" Offset="0x11478" />
<Limb Name="gameplay_keep_Standardlimb_011484" Type="Standard" Offset="0x11484" />
<Limb Name="gameplay_keep_Standardlimb_011490" Type="Standard" Offset="0x11490" />
<Limb Name="gameplay_keep_Standardlimb_01149C" Type="Standard" Offset="0x1149C" />
<Limb Name="gameplay_keep_Standardlimb_0114A8" Type="Standard" Offset="0x114A8" />
<Limb Name="gameplay_keep_Standardlimb_0114B4" Type="Standard" Offset="0x114B4" />
<Limb Name="gameplay_keep_Standardlimb_0114C0" Type="Standard" Offset="0x114C0" />
<Limb Name="gameplay_keep_Standardlimb_0114CC" Type="Standard" Offset="0x114CC" />
<Limb Name="gameplay_keep_Standardlimb_0114D8" Type="Standard" Offset="0x114D8" />
<Limb Name="gameplay_keep_Standardlimb_0114E4" Type="Standard" Offset="0x114E4" />
<Skeleton Name="gameplay_keep_Skel_011518" Type="Normal" LimbType="Standard" Offset="0x11518" />
<Animation Name="gameplay_keep_Anim_0117A8" Offset="0x117A8" />
<Collision Name="gameplay_keep_Colheader_0118D8" Offset="0x118D8" />
<DList Name="gameplay_keep_DL_011BD0" Offset="0x11BD0" />
<DList Name="gameplay_keep_DL_0121B0" Offset="0x121B0" />
<DList Name="gameplay_keep_DL_012260" Offset="0x12260" />
<DList Name="gameplay_keep_DL_012308" Offset="0x12308" />
<DList Name="gameplay_keep_DL_012390" Offset="0x12390" />
<DList Name="gameplay_keep_DL_012418" Offset="0x12418" />
<DList Name="gameplay_keep_DL_0124A0" Offset="0x124A0" />
<DList Name="gameplay_keep_DL_012528" Offset="0x12528" />
<DList Name="gameplay_keep_DL_0125B0" Offset="0x125B0" />
<DList Name="gameplay_keep_DL_012638" Offset="0x12638" />
<DList Name="gameplay_keep_DL_0126C0" Offset="0x126C0" />
<Limb Name="gameplay_keep_Standardlimb_012748" Type="Standard" Offset="0x12748" />
<Limb Name="gameplay_keep_Standardlimb_012754" Type="Standard" Offset="0x12754" />
<Limb Name="gameplay_keep_Standardlimb_012760" Type="Standard" Offset="0x12760" />
<Limb Name="gameplay_keep_Standardlimb_01276C" Type="Standard" Offset="0x1276C" />
<Limb Name="gameplay_keep_Standardlimb_012778" Type="Standard" Offset="0x12778" />
<Limb Name="gameplay_keep_Standardlimb_012784" Type="Standard" Offset="0x12784" />
<Limb Name="gameplay_keep_Standardlimb_012790" Type="Standard" Offset="0x12790" />
<Limb Name="gameplay_keep_Standardlimb_01279C" Type="Standard" Offset="0x1279C" />
<Limb Name="gameplay_keep_Standardlimb_0127A8" Type="Standard" Offset="0x127A8" />
<Limb Name="gameplay_keep_Standardlimb_0127B4" Type="Standard" Offset="0x127B4" />
<Skeleton Name="gameplay_keep_Skel_0127E8" Type="Flex" LimbType="Standard" Offset="0x127E8" />
<!-- Deku Flower -->
<Collision Name="gPinkDekuFlowerCol" Offset="0xE710" />
<Animation Name="gDekuFlowerBounceAnim" Offset="0xEB7C" /> <!-- Original name is "dnp_boyoyon" ("bounce") -->
<DList Name="gPinkDekuFlowerIdleDL" Offset="0xED80" />
<DList Name="gPinkDekuFlowerBaseDL" Offset="0xF2B8" />
<DList Name="gPinkDekuFlowerCenterDL" Offset="0xF350" />
<DList Name="gPinkDekuFlowerBackLeftPetalDL" Offset="0xF438" />
<DList Name="gPinkDekuFlowerLeftLeafDL" Offset="0xF4C0" />
<DList Name="gPinkDekuFlowerFrontLeftPetalDL" Offset="0xF548" />
<DList Name="gPinkDekuFlowerRightLeafDL" Offset="0xF5D0" />
<DList Name="gPinkDekuFlowerBackRightPetalDL" Offset="0xF658" />
<DList Name="gPinkDekuFlowerFrontRightPetalDL" Offset="0xF6E0" />
<DList Name="gPinkDekuFlowerFrontLeafDL" Offset="0xF768" />
<DList Name="gPinkDekuFlowerBackLeafDL" Offset="0xF7F0" />
<Texture Name="gPinkDekuFlowerPetalAndCenterTex" OutName="pink_deku_flower_petal_and_center" Format="rgba16" Width="16" Height="32" Offset="0xF878" />
<Texture Name="gPinkDekuFlowerLeafAndCenterTex" OutName="pink_deku_flower_leaf_and_center" Format="rgba16" Width="16" Height="32" Offset="0xFC78" />
<Texture Name="gPinkDekuFlowerBaseLeafTex" OutName="pink_deku_flower_base_leaf" Format="rgba16" Width="32" Height="32" Offset="0x10078" />
<Texture Name="gGoldDekuFlowerPetalAndCenterTex" OutName="gold_deku_flower_petal_and_center" Format="rgba16" Width="16" Height="32" Offset="0x10878" />
<Texture Name="gGoldDekuFlowerBaseLeafTex" OutName="gold_deku_flower_base_leaf" Format="rgba16" Width="32" Height="32" Offset="0x10C78" />
<Limb Name="gPinkDekuFlowerBaseLimb" Type="Standard" Offset="0x11478" />
<Limb Name="gPinkDekuFlowerCenterLimb" Type="Standard" Offset="0x11484" />
<Limb Name="gPinkDekuFlowerBackLeafLimb" Type="Standard" Offset="0x11490" />
<Limb Name="gPinkDekuFlowerFrontLeafLimb" Type="Standard" Offset="0x1149C" />
<Limb Name="gPinkDekuFlowerFrontRightPetalLimb" Type="Standard" Offset="0x114A8" />
<Limb Name="gPinkDekuFlowerBackRightPetalLimb" Type="Standard" Offset="0x114B4" />
<Limb Name="gPinkDekuFlowerRightLeafLimb" Type="Standard" Offset="0x114C0" />
<Limb Name="gPinkDekuFlowerFrontLeftPetalLimb" Type="Standard" Offset="0x114CC" />
<Limb Name="gPinkDekuFlowerLeftLeafLimb" Type="Standard" Offset="0x114D8" />
<Limb Name="gPinkDekuFlowerBackLeftPetalLimb" Type="Standard" Offset="0x114E4" />
<Skeleton Name="gPinkDekuFlowerSkel" Type="Normal" LimbType="Standard" Offset="0x11518" />
<Animation Name="gDekuFlowerRustleAnim" Offset="0x117A8" /> <!-- Original name is "dnp_zawa" ("rustling") -->
<Collision Name="gGoldDekuFlowerCol" Offset="0x118D8" />
<DList Name="gGoldDekuFlowerIdleDL" Offset="0x11BD0" />
<DList Name="gGoldDekuFlowerBaseDL" Offset="0x121B0" />
<DList Name="gGoldDekuFlowerCenterDL" Offset="0x12260" />
<DList Name="gGoldDekuFlowerBackLeftPetalDL" Offset="0x12308" />
<DList Name="gGoldDekuFlowerLeftPetalDL" Offset="0x12390" />
<DList Name="gGoldDekuFlowerFrontLeftPetalDL" Offset="0x12418" />
<DList Name="gGoldDekuFlowerRightPetalDL" Offset="0x124A0" />
<DList Name="gGoldDekuFlowerBackRightPetalDL" Offset="0x12528" />
<DList Name="gGoldDekuFlowerFrontRightPetalDL" Offset="0x125B0" />
<DList Name="gGoldDekuFlowerFrontPetalDL" Offset="0x12638" />
<DList Name="gGoldDekuFlowerBackPetalDL" Offset="0x126C0" />
<Limb Name="gGoldDekuFlowerBaseLimb" Type="Standard" Offset="0x12748" />
<Limb Name="gGoldDekuFlowerCenterLimb" Type="Standard" Offset="0x12754" />
<Limb Name="gGoldDekuFlowerBackPetalLimb" Type="Standard" Offset="0x12760" />
<Limb Name="gGoldDekuFlowerFrontPetalLimb" Type="Standard" Offset="0x1276C" />
<Limb Name="gGoldDekuFlowerFrontRightPetalLimb" Type="Standard" Offset="0x12778" />
<Limb Name="gGoldDekuFlowerBackRightPetalLimb" Type="Standard" Offset="0x12784" />
<Limb Name="gGoldDekuFlowerRightPetalLimb" Type="Standard" Offset="0x12790" />
<Limb Name="gGoldDekuFlowerFrontLeftPetalLimb" Type="Standard" Offset="0x1279C" />
<Limb Name="gGoldDekuFlowerLeftPetalLimb" Type="Standard" Offset="0x127A8" />
<Limb Name="gGoldDekuFlowerBackLeftPetalLimb" Type="Standard" Offset="0x127B4" />
<Skeleton Name="gGoldDekuFlowerSkel" Type="Flex" LimbType="Standard" Offset="0x127E8" />
<Animation Name="gameplay_keep_Anim_012860" Offset="0x12860" />
<Animation Name="gameplay_keep_Anim_0128BC" Offset="0x128BC" />
<Texture Name="gameplay_keep_Tex_0128D0" OutName="tex_0128D0" Format="rgba16" Width="16" Height="128" Offset="0x128D0" />
@@ -863,7 +866,7 @@
<Texture Name="gameplay_keep_Tex_01EAF8" OutName="tex_01EAF8" Format="rgba16" Width="16" Height="16" Offset="0x1EAF8" />
<DList Name="gameplay_keep_DL_01ED00" Offset="0x1ED00" />
<DList Name="gameplay_keep_DL_01ED90" Offset="0x1ED90" />
<DList Name="gameplay_keep_DL_01F0F0" Offset="0x1F0F0" />
<DList Name="gZTargetArrowDL" Offset="0x1F0F0" />
<Texture Name="gameplay_keep_Tex_01F200" OutName="tex_01F200" Format="i8" Width="8" Height="8" Offset="0x1F200" />
<DList Name="gameplay_keep_DL_01F300" Offset="0x1F300" />
<Texture Name="gameplay_keep_Tex_01F340" OutName="tex_01F340" Format="ia8" Width="32" Height="32" Offset="0x1F340" />
@@ -939,36 +942,39 @@
<Limb Name="gameplay_keep_Standardlimb_02AF34" Type="Standard" Offset="0x2AF34" />
<Skeleton Name="gameplay_keep_Skel_02AF58" Type="Flex" LimbType="Standard" Offset="0x2AF58" />
<Animation Name="gameplay_keep_Anim_02B2E8" Offset="0x2B2E8" />
<Animation Name="gameplay_keep_Anim_02B494" Offset="0x2B494" />
<DList Name="gameplay_keep_DL_02B6B0" Offset="0x2B6B0" />
<DList Name="gameplay_keep_DL_02B748" Offset="0x2B748" />
<DList Name="gameplay_keep_DL_02B7E0" Offset="0x2B7E0" />
<DList Name="gameplay_keep_DL_02B888" Offset="0x2B888" />
<DList Name="gameplay_keep_DL_02B920" Offset="0x2B920" />
<DList Name="gameplay_keep_DL_02B9B8" Offset="0x2B9B8" />
<DList Name="gameplay_keep_DL_02BA68" Offset="0x2BA68" />
<DList Name="gameplay_keep_DL_02BB00" Offset="0x2BB00" />
<DList Name="gameplay_keep_DL_02BB98" Offset="0x2BB98" />
<Texture Name="gameplay_keep_Tex_02BC30" OutName="tex_02BC30" Format="ia8" Width="32" Height="32" Offset="0x2BC30" />
<Texture Name="gameplay_keep_Tex_02C030" OutName="tex_02C030" Format="ia8" Width="16" Height="32" Offset="0x2C030" />
<Texture Name="gameplay_keep_Tex_02C230" OutName="tex_02C230" Format="ia8" Width="32" Height="32" Offset="0x2C230" />
<Texture Name="gameplay_keep_Tex_02C630" OutName="tex_02C630" Format="ia8" Width="16" Height="16" Offset="0x2C630" />
<Texture Name="gameplay_keep_Tex_02C730" OutName="tex_02C730" Format="i4" Width="16" Height="16" Offset="0x2C730" />
<TextureAnimation Name="gameplay_keep_Matanimheader_02C818" Offset="0x2C818" />
<TextureAnimation Name="gameplay_keep_Matanimheader_02C890" Offset="0x2C890" />
<TextureAnimation Name="gameplay_keep_Matanimheader_02C908" Offset="0x2C908" />
<TextureAnimation Name="gameplay_keep_Matanimheader_02C980" Offset="0x2C980" />
<TextureAnimation Name="gameplay_keep_Matanimheader_02C9F8" Offset="0x2C9F8" />
<Limb Name="gameplay_keep_Standardlimb_02CA08" Type="Standard" Offset="0x2CA08" />
<Limb Name="gameplay_keep_Standardlimb_02CA14" Type="Standard" Offset="0x2CA14" />
<Limb Name="gameplay_keep_Standardlimb_02CA20" Type="Standard" Offset="0x2CA20" />
<Limb Name="gameplay_keep_Standardlimb_02CA2C" Type="Standard" Offset="0x2CA2C" />
<Limb Name="gameplay_keep_Standardlimb_02CA38" Type="Standard" Offset="0x2CA38" />
<Limb Name="gameplay_keep_Standardlimb_02CA44" Type="Standard" Offset="0x2CA44" />
<Limb Name="gameplay_keep_Standardlimb_02CA50" Type="Standard" Offset="0x2CA50" />
<Limb Name="gameplay_keep_Standardlimb_02CA5C" Type="Standard" Offset="0x2CA5C" />
<Limb Name="gameplay_keep_Standardlimb_02CA68" Type="Standard" Offset="0x2CA68" />
<Skeleton Name="gameplay_keep_Skel_02CA98" Type="Flex" LimbType="Standard" Offset="0x2CA98" />
<!-- Stray Fairy -->
<Animation Name="gStrayFairyFlyingAnim" Offset="0x2B494" /> <!-- Original name is "ys_fly01" -->
<DList Name="gStrayFairyRightFacingHeadDL" Offset="0x2B6B0" />
<DList Name="gStrayFairyLeftFacingHeadDL" Offset="0x2B748" />
<DList Name="gStrayFairyGlowDL" Offset="0x2B7E0" />
<DList Name="gStrayFairyTorsoDL" Offset="0x2B888" />
<DList Name="gStrayFairyLeftArmDL" Offset="0x2B920" />
<DList Name="gStrayFairyPelvisAndLegsDL" Offset="0x2B9B8" />
<DList Name="gStrayFairyRightArmDL" Offset="0x2BA68" />
<DList Name="gStrayFairyRightWingDL" Offset="0x2BB00" />
<DList Name="gStrayFairyLeftWingDL" Offset="0x2BB98" />
<Texture Name="gStrayFairyRightFacingHeadTex" OutName="stray_fairy_right_facing_head" Format="ia8" Width="32" Height="32" Offset="0x2BC30" />
<Texture Name="gStrayFairyBodyTex" OutName="stray_fairy_body" Format="ia8" Width="16" Height="32" Offset="0x2C030" />
<Texture Name="gStrayFairyLeftFacingHeadTex" OutName="stray_fairy_left_facing_head" Format="ia8" Width="32" Height="32" Offset="0x2C230" />
<Texture Name="gStrayFairyWingTex" OutName="stray_fairy_wing" Format="ia8" Width="16" Height="16" Offset="0x2C630" />
<Texture Name="gStrayFairyGlowTex" OutName="stray_fairy_glow" Format="i4" Width="16" Height="16" Offset="0x2C730" />
<TextureAnimation Name="gStrayFairyClockTownTexAnim" Offset="0x2C818" />
<TextureAnimation Name="gStrayFairySnowheadTexAnim" Offset="0x2C890" />
<TextureAnimation Name="gStrayFairyWoodfallTexAnim" Offset="0x2C908" />
<TextureAnimation Name="gStrayFairyGreatBayTexAnim" Offset="0x2C980" />
<TextureAnimation Name="gStrayFairyStoneTowerTexAnim" Offset="0x2C9F8" />
<Limb Name="gStrayFairyRightFacingHeadLimb" Type="Standard" Offset="0x2CA08" />
<Limb Name="gStrayFairyLeftWingLimb" Type="Standard" Offset="0x2CA14" />
<Limb Name="gStrayFairyRightWingLimb" Type="Standard" Offset="0x2CA20" />
<Limb Name="gStrayFairyGlowLimb" Type="Standard" Offset="0x2CA2C" />
<Limb Name="gStrayFairyTorsoLimb" Type="Standard" Offset="0x2CA38" />
<Limb Name="gStrayFairyRightArmLimb" Type="Standard" Offset="0x2CA44" />
<Limb Name="gStrayFairyPelvisAndLegsLimb" Type="Standard" Offset="0x2CA50" />
<Limb Name="gStrayFairyLeftArmLimb" Type="Standard" Offset="0x2CA5C" />
<Limb Name="gStrayFairyLeftFacingHeadLimb" Type="Standard" Offset="0x2CA68" />
<Skeleton Name="gStrayFairySkel" Type="Flex" LimbType="Standard" Offset="0x2CA98" />
<Texture Name="gameplay_keep_Tex_02CAA8" OutName="tex_02CAA8" Format="i4" Width="16" Height="16" Offset="0x2CAA8" />
<Texture Name="gameplay_keep_Tex_02CB30" OutName="tex_02CB30" Format="i8" Width="16" Height="16" Offset="0x2CB30" />
<Texture Name="gameplay_keep_Tex_02CC30" OutName="tex_02CC30" Format="rgba16" Width="32" Height="32" Offset="0x2CC30" />
@@ -1295,13 +1301,13 @@
<Texture Name="gameplay_keep_Tex_075000" OutName="tex_075000" Format="i4" Width="32" Height="64" Offset="0x75000" />
<Texture Name="gameplay_keep_Tex_075400" OutName="tex_075400" Format="i4" Width="32" Height="64" Offset="0x75400" />
<Texture Name="gameplay_keep_Tex_075800" OutName="tex_075800" Format="i4" Width="32" Height="32" Offset="0x75800" />
<DList Name="gameplay_keep_DL_075A40" Offset="0x75A40" />
<DList Name="gSquareShadowDL" Offset="0x75A40" />
<Texture Name="gameplay_keep_Tex_075AA8" OutName="tex_075AA8" Format="i4" Width="16" Height="16" Offset="0x75AA8" />
<DList Name="gameplay_keep_DL_075B30" Offset="0x75B30" />
<DList Name="gFootShadowDL" Offset="0x75B30" />
<Texture Name="gameplay_keep_Tex_075BC0" OutName="tex_075BC0" Format="ia16" Width="32" Height="64" Offset="0x75BC0" />
<DList Name="gameplay_keep_DL_076BC0" Offset="0x76BC0" />
<DList Name="gCircleShadowDL" Offset="0x76BC0" />
<Texture Name="gameplay_keep_Tex_076C40" OutName="tex_076C40" Format="ia16" Width="32" Height="32" Offset="0x76C40" />
<DList Name="gameplay_keep_DL_077480" Offset="0x77480" />
<DList Name="gHorseShadowDL" Offset="0x77480" />
<Texture Name="gameplay_keep_Tex_0774D0" OutName="tex_0774D0" Format="i8" Width="16" Height="64" Offset="0x774D0" />
<DList Name="gameplay_keep_DL_077990" Offset="0x77990" />
<Texture Name="gameplay_keep_Tex_077A40" OutName="tex_077A40" Format="ia8" Width="32" Height="128" Offset="0x77A40" />
@@ -1316,7 +1322,7 @@
<DList Name="gameplay_keep_DL_07AB10" Offset="0x7AB10" />
<DList Name="gameplay_keep_DL_07AB58" Offset="0x7AB58" />
<DList Name="gameplay_keep_DL_07AB70" Offset="0x7AB70" />
<DList Name="gameplay_keep_DL_07AE00" Offset="0x7AE00" />
<DList Name="gZTargetLockOnTriangleDL" Offset="0x7AE00" />
<DList Name="gameplay_keep_DL_07AFB0" Offset="0x7AFB0" />
<DList Name="gameplay_keep_DL_07B0B8" Offset="0x7B0B8" />
<Texture Name="gameplay_keep_Tex_07B0C0" OutName="tex_07B0C0" Format="i8" Width="64" Height="64" Offset="0x7B0C0" />
+1 -1
View File
@@ -49,7 +49,7 @@
<Texture Name="object_cs_Tex_00B9A0" OutName="tex_00B9A0" Format="ci8" Width="8" Height="8" Offset="0xB9A0" />
<Texture Name="object_cs_Tex_00B9E0" OutName="tex_00B9E0" Format="ci8" Width="16" Height="16" Offset="0xB9E0" />
<Texture Name="object_cs_Tex_00BAE0" OutName="tex_00BAE0" Format="ci8" Width="16" Height="16" Offset="0xBAE0" />
<!-- <Blob Name="object_cs_Blob_00BBE0" Size="0x400" Offset="0xBBE0" /> -->
<Blob Name="object_cs_Blob_00BBE0" Size="0x400" Offset="0xBBE0" />
<Texture Name="object_cs_Tex_00BFE0" OutName="tex_00BFE0" Format="ci8" Width="8" Height="8" Offset="0xBFE0" />
<Texture Name="object_cs_Tex_00C020" OutName="tex_00C020" Format="ci8" Width="8" Height="8" Offset="0xC020" />
<Texture Name="object_cs_Tex_00C060" OutName="tex_00C060" Format="ci8" Width="8" Height="8" Offset="0xC060" />
+46 -41
View File
@@ -1,6 +1,6 @@
<Root>
<File Name="object_fish" Segment="6">
<Animation Name="object_fish_Anim_00007C" Offset="0x7C" />
<Animation Name="gFishingFishAnim" Offset="0x7C" />
<DList Name="object_fish_DL_000940" Offset="0x940" />
<DList Name="object_fish_DL_0009E8" Offset="0x9E8" />
<DList Name="object_fish_DL_000B00" Offset="0xB00" />
@@ -35,29 +35,29 @@
<Limb Name="object_fish_Standardlimb_002960" Type="Standard" Offset="0x2960" />
<Limb Name="object_fish_Standardlimb_00296C" Type="Standard" Offset="0x296C" />
<Limb Name="object_fish_Standardlimb_002978" Type="Standard" Offset="0x2978" />
<Skeleton Name="object_fish_Skel_0029C0" Type="Flex" LimbType="Standard" Offset="0x29C0" />
<Skeleton Name="gFishingFishSkel" Type="Flex" LimbType="Standard" Offset="0x29C0" />
<Texture Name="object_fish_Tex_0029D0" OutName="tex_0029D0" Format="rgba16" Width="8" Height="16" Offset="0x29D0" />
<Texture Name="object_fish_Tex_002AD0" OutName="tex_002AD0" Format="rgba16" Width="8" Height="8" Offset="0x2AD0" />
<DList Name="object_fish_DL_002BD0" Offset="0x2BD0" />
<Texture Name="object_fish_Tex_002CE0" OutName="tex_002CE0" Format="i4" Width="32" Height="64" Offset="0x2CE0" />
<Texture Name="object_fish_Tex_0030E0" OutName="tex_0030E0" Format="i4" Width="16" Height="16" Offset="0x30E0" />
<DList Name="object_fish_DL_003230" Offset="0x3230" />
<DList Name="gFishingStreamSplashDL" Offset="0x3230" />
<Texture Name="object_fish_Tex_003320" OutName="tex_003320" Format="ia8" Width="16" Height="16" Offset="0x3320" />
<DList Name="object_fish_DL_003460" Offset="0x3460" />
<DList Name="object_fish_DL_0034C0" Offset="0x34C0" />
<DList Name="gFishingBubbleSetupDL" Offset="0x3460" />
<DList Name="gFishingBubbleVtxDL" Offset="0x34C0" />
<Texture Name="object_fish_Tex_0034E0" OutName="tex_0034E0" Format="i8" Width="16" Height="16" Offset="0x34E0" />
<DList Name="object_fish_DL_003610" Offset="0x3610" />
<DList Name="object_fish_DL_003680" Offset="0x3680" />
<DList Name="gFishingDustSplashSetupDL" Offset="0x3610" />
<DList Name="gFishingDustSplashVtxDL" Offset="0x3680" />
<DList Name="object_fish_DL_0036E0" Offset="0x36E0" />
<DList Name="object_fish_DL_003710" Offset="0x3710" />
<DList Name="object_fish_DL_003760" Offset="0x3760" />
<DList Name="gFishingLineVtxDL" Offset="0x3710" />
<DList Name="gFishingRainDropVtxDL" Offset="0x3760" />
<Texture Name="object_fish_Tex_003778" OutName="tex_003778" Format="rgba16" Width="16" Height="16" Offset="0x3778" />
<DList Name="object_fish_DL_0039A8" Offset="0x39A8" />
<DList Name="object_fish_DL_003A18" Offset="0x3A18" />
<Animation Name="object_fish_Anim_00453C" Offset="0x453C" />
<DList Name="gFishingRainSplashSetupDL" Offset="0x39A8" />
<DList Name="gFishingRainSplashVtxDL" Offset="0x3A18" />
<Animation Name="gFishingOwnerAnim" Offset="0x453C" />
<DList Name="object_fish_DL_006F60" Offset="0x6F60" />
<DList Name="object_fish_DL_007350" Offset="0x7350" />
<DList Name="object_fish_DL_0074C8" Offset="0x74C8" />
<DList Name="gFishingOwnerHairDL" Offset="0x7350" />
<DList Name="gFishingOwnerHatDL" Offset="0x74C8" />
<DList Name="object_fish_DL_0076B8" Offset="0x76B8" />
<DList Name="object_fish_DL_007CF8" Offset="0x7CF8" />
<DList Name="object_fish_DL_007E48" Offset="0x7E48" />
@@ -73,12 +73,12 @@
<Limb Name="object_fish_Standardlimb_0085B4" Type="Standard" Offset="0x85B4" />
<Limb Name="object_fish_Standardlimb_0085C0" Type="Standard" Offset="0x85C0" />
<Limb Name="object_fish_Standardlimb_0085CC" Type="Standard" Offset="0x85CC" />
<Skeleton Name="object_fish_Skel_0085F8" Type="Flex" LimbType="Standard" Offset="0x85F8" />
<DList Name="object_fish_DL_008610" Offset="0x8610" />
<DList Name="object_fish_DL_008678" Offset="0x8678" />
<Skeleton Name="gFishingOwnerSkel" Type="Flex" LimbType="Standard" Offset="0x85F8" />
<DList Name="gFishingRippleSetupDL" Offset="0x8610" />
<DList Name="gFishingRippleVtxDL" Offset="0x8678" />
<Texture Name="object_fish_Tex_008690" OutName="tex_008690" Format="i4" Width="32" Height="32" Offset="0x8690" />
<DList Name="object_fish_DL_0088C0" Offset="0x88C0" />
<DList Name="object_fish_DL_008970" Offset="0x8970" />
<DList Name="gFishingWaterDustSetupDL" Offset="0x88C0" />
<DList Name="gFishingWaterDustVtxDL" Offset="0x8970" />
<Texture Name="object_fish_TLUT_008990" OutName="tlut_008990" Format="rgba16" Width="16" Height="16" Offset="0x8990" />
<Texture Name="object_fish_Tex_008B90" OutName="tex_008B90" Format="ci8" Width="8" Height="8" Offset="0x8B90" />
<Texture Name="object_fish_Tex_008BD0" OutName="tex_008BD0" Format="ci8" Width="16" Height="16" Offset="0x8BD0" />
@@ -86,21 +86,23 @@
<Texture Name="object_fish_Tex_008DD0" OutName="tex_008DD0" Format="ci8" Width="8" Height="8" Offset="0x8DD0" />
<Texture Name="object_fish_Tex_008E10" OutName="tex_008E10" Format="ci8" Width="32" Height="32" Offset="0x8E10" />
<Texture Name="object_fish_Tex_009210" OutName="tex_009210" Format="ci8" Width="8" Height="8" Offset="0x9210" />
<!-- <Blob Name="object_fish_Blob_009250" Size="0xC00" Offset="0x9250" /> -->
<Texture Name="gFishingOwnerEyeOpenTex" OutName="tex_009250" Format="ci8" Width="32" Height="32" Offset="0x9250" />
<Texture Name="gFishingOwnerEyeHalfTex" OutName="tex_009650" Format="ci8" Width="32" Height="32" Offset="0x9650" />
<Texture Name="gFishingOwnerEyeClosedTex" OutName="tex_009A50" Format="ci8" Width="32" Height="32" Offset="0x9A50" />
<Texture Name="object_fish_Tex_009E50" OutName="tex_009E50" Format="ci8" Width="64" Height="32" Offset="0x9E50" />
<Texture Name="object_fish_Tex_00A650" OutName="tex_00A650" Format="ci8" Width="8" Height="8" Offset="0xA650" />
<Texture Name="object_fish_Tex_00A690" OutName="tex_00A690" Format="ci8" Width="16" Height="16" Offset="0xA690" />
<Texture Name="object_fish_Tex_00A790" OutName="tex_00A790" Format="ci8" Width="8" Height="16" Offset="0xA790" />
<Texture Name="object_fish_Tex_00A810" OutName="tex_00A810" Format="ci8" Width="16" Height="16" Offset="0xA810" />
<Texture Name="object_fish_Tex_00A910" OutName="tex_00A910" Format="ia8" Width="64" Height="64" Offset="0xA910" />
<DList Name="object_fish_DL_00B950" Offset="0xB950" />
<DList Name="object_fish_DL_00B9C0" Offset="0xB9C0" />
<DList Name="gFishingSinkingLureSegmentSetupDL" Offset="0xB950" />
<DList Name="gFishingSinkingLureSegmentVtxDL" Offset="0xB9C0" />
<Texture Name="object_fish_Tex_00B9E0" OutName="tex_00B9E0" Format="rgba16" Width="64" Height="16" Offset="0xB9E0" />
<DList Name="object_fish_DL_00C220" Offset="0xC220" />
<DList Name="object_fish_DL_00C298" Offset="0xC298" />
<DList Name="gFishingGroupFishSetupDL" Offset="0xC220" />
<DList Name="gFishingGroupFishVtxDL" Offset="0xC298" />
<DList Name="object_fish_DL_00C650" Offset="0xC650" />
<Texture Name="object_fish_Tex_00C780" OutName="tex_00C780" Format="rgba16" Width="32" Height="32" Offset="0xC780" />
<Animation Name="object_fish_Anim_00CFE0" Offset="0xCFE0" />
<Animation Name="gFishingLoachAnim" Offset="0xCFE0" />
<DList Name="object_fish_DL_00DED0" Offset="0xDED0" />
<DList Name="object_fish_DL_00DFA8" Offset="0xDFA8" />
<DList Name="object_fish_DL_00E048" Offset="0xE048" />
@@ -129,29 +131,32 @@
<Limb Name="object_fish_Standardlimb_011008" Type="Standard" Offset="0x11008" />
<Limb Name="object_fish_Standardlimb_011014" Type="Standard" Offset="0x11014" />
<Limb Name="object_fish_Standardlimb_011020" Type="Standard" Offset="0x11020" />
<Skeleton Name="object_fish_Skel_011058" Type="Flex" LimbType="Standard" Offset="0x11058" />
<!-- <Blob Name="object_fish_Blob_011064" Size="0x30C" Offset="0x11064" /> -->
<DList Name="object_fish_DL_0113D0" Offset="0x113D0" />
<DList Name="object_fish_DL_011410" Offset="0x11410" />
<Skeleton Name="gFishingLoachSkel" Type="Flex" LimbType="Standard" Offset="0x11058" />
<Blob Name="object_fish_Blob_011064" Size="0xC" Offset="0x11064" />
<Texture Name="gFishingRodSegmentStripTex" OutName="tex_011070" Format="rgba16" Width="16" Height="8" Offset="0x11070" />
<Texture Name="gFishingRodSegmentBlackTex" OutName="tex_011170" Format="rgba16" Width="16" Height="8" Offset="0x11170" />
<Texture Name="gFishingRodSegmentWhiteTex" OutName="tex_011270" Format="rgba16" Width="16" Height="8" Offset="0x11270" />
<DList Name="gFishingRodSetupDL" Offset="0x113D0" />
<DList Name="gFishingRodSegmentDL" Offset="0x11410" />
<Texture Name="object_fish_Tex_011440" OutName="tex_011440" Format="rgba16" Width="32" Height="32" Offset="0x11440" />
<Texture Name="object_fish_Tex_011C40" OutName="tex_011C40" Format="rgba16" Width="32" Height="16" Offset="0x11C40" />
<DList Name="object_fish_DL_012160" Offset="0x12160" />
<DList Name="object_fish_DL_0121F0" Offset="0x121F0" />
<DList Name="gFishingLureHookDL" Offset="0x12160" />
<DList Name="gFishingLureFloatDL" Offset="0x121F0" />
<Texture Name="object_fish_Tex_0122E0" OutName="tex_0122E0" Format="rgba16" Width="32" Height="32" Offset="0x122E0" />
<Texture Name="object_fish_Tex_012AE0" OutName="tex_012AE0" Format="rgba16" Width="32" Height="32" Offset="0x12AE0" />
<DList Name="object_fish_DL_013330" Offset="0x13330" />
<DList Name="object_fish_DL_0133B0" Offset="0x133B0" />
<DList Name="object_fish_DL_013590" Offset="0x13590" />
<DList Name="object_fish_DL_013610" Offset="0x13610" />
<DList Name="gFishingLilyPadSetupDL" Offset="0x13330" />
<DList Name="gFishingLilyPadVtxDL" Offset="0x133B0" />
<DList Name="gFishingRockSetupDL" Offset="0x13590" />
<DList Name="gFishingRockVtxDL" Offset="0x13610" />
<Texture Name="object_fish_Tex_013660" OutName="tex_013660" Format="rgba16" Width="32" Height="32" Offset="0x13660" />
<DList Name="object_fish_DL_013F50" Offset="0x13F50" />
<DList Name="object_fish_DL_013FD0" Offset="0x13FD0" />
<DList Name="object_fish_DL_014030" Offset="0x14030" />
<DList Name="object_fish_DL_0140B0" Offset="0x140B0" />
<DList Name="gFishingWoodPostSetupDL" Offset="0x13F50" />
<DList Name="gFishingWoodPostVtxDL" Offset="0x13FD0" />
<DList Name="gFishingReedSetupDL" Offset="0x14030" />
<DList Name="gFishingReedVtxDL" Offset="0x140B0" />
<Texture Name="object_fish_Tex_0140D0" OutName="tex_0140D0" Format="rgba16" Width="16" Height="16" Offset="0x140D0" />
<Texture Name="object_fish_Tex_0142D0" OutName="tex_0142D0" Format="rgba16" Width="32" Height="32" Offset="0x142D0" />
<Texture Name="object_fish_Tex_014AD0" OutName="tex_014AD0" Format="i8" Width="32" Height="32" Offset="0x14AD0" />
<DList Name="object_fish_DL_0153D0" Offset="0x153D0" />
<DList Name="object_fish_DL_015470" Offset="0x15470" />
<DList Name="gFishingAquariumBottomDL" Offset="0x153D0" />
<DList Name="gFishingAquariumContainerDL" Offset="0x15470" />
</File>
</Root>
+86 -59
View File
@@ -1,63 +1,90 @@
<Root>
<!-- Object for the Four Giants -->
<File Name="object_giant" Segment="6">
<Animation Name="object_giant_Anim_002168" Offset="0x2168" />
<!-- <Blob Name="object_giant_Blob_003D40" Size="0x90" Offset="0x3D40" /> -->
<DList Name="object_giant_DL_003DD0" Offset="0x3DD0" />
<DList Name="object_giant_DL_0040C0" Offset="0x40C0" />
<DList Name="object_giant_DL_004200" Offset="0x4200" />
<DList Name="object_giant_DL_004438" Offset="0x4438" />
<DList Name="object_giant_DL_004560" Offset="0x4560" />
<DList Name="object_giant_DL_0046A0" Offset="0x46A0" />
<DList Name="object_giant_DL_0048D8" Offset="0x48D8" />
<DList Name="object_giant_DL_004A00" Offset="0x4A00" />
<DList Name="object_giant_DL_004B10" Offset="0x4B10" />
<DList Name="object_giant_DL_004C38" Offset="0x4C38" />
<DList Name="object_giant_DL_004D58" Offset="0x4D58" />
<DList Name="object_giant_DL_004EC0" Offset="0x4EC0" />
<DList Name="object_giant_DL_004FD0" Offset="0x4FD0" />
<DList Name="object_giant_DL_0050F8" Offset="0x50F8" />
<DList Name="object_giant_DL_005218" Offset="0x5218" />
<Texture Name="object_giant_TLUT_005380" OutName="tlut_005380" Format="rgba16" Width="16" Height="16" Offset="0x5380" />
<Texture Name="object_giant_Tex_005580" OutName="tex_005580" Format="ci8" Width="16" Height="16" Offset="0x5580" />
<Texture Name="object_giant_Tex_005680" OutName="tex_005680" Format="ci8" Width="16" Height="16" Offset="0x5680" />
<Texture Name="object_giant_Tex_005780" OutName="tex_005780" Format="ci8" Width="16" Height="16" Offset="0x5780" />
<Texture Name="object_giant_Tex_005880" OutName="tex_005880" Format="ci8" Width="16" Height="16" Offset="0x5880" />
<Texture Name="object_giant_Tex_005980" OutName="tex_005980" Format="ci8" Width="16" Height="16" Offset="0x5980" />
<!-- <Blob Name="object_giant_Blob_005A80" Size="0x1800" Offset="0x5A80" /> -->
<Texture Name="object_giant_Tex_007280" OutName="tex_007280" Format="ci8" Width="16" Height="16" Offset="0x7280" />
<Texture Name="object_giant_Tex_007380" OutName="tex_007380" Format="ci8" Width="16" Height="32" Offset="0x7380" />
<DList Name="object_giant_DL_007610" Offset="0x7610" />
<Texture Name="object_giant_Tex_0076C0" OutName="tex_0076C0" Format="rgba16" Width="16" Height="16" Offset="0x76C0" />
<Limb Name="object_giant_Standardlimb_0078C0" Type="Standard" Offset="0x78C0" />
<Limb Name="object_giant_Standardlimb_0078CC" Type="Standard" Offset="0x78CC" />
<Limb Name="object_giant_Standardlimb_0078D8" Type="Standard" Offset="0x78D8" />
<Limb Name="object_giant_Standardlimb_0078E4" Type="Standard" Offset="0x78E4" />
<Limb Name="object_giant_Standardlimb_0078F0" Type="Standard" Offset="0x78F0" />
<Limb Name="object_giant_Standardlimb_0078FC" Type="Standard" Offset="0x78FC" />
<Limb Name="object_giant_Standardlimb_007908" Type="Standard" Offset="0x7908" />
<Limb Name="object_giant_Standardlimb_007914" Type="Standard" Offset="0x7914" />
<Limb Name="object_giant_Standardlimb_007920" Type="Standard" Offset="0x7920" />
<Limb Name="object_giant_Standardlimb_00792C" Type="Standard" Offset="0x792C" />
<Limb Name="object_giant_Standardlimb_007938" Type="Standard" Offset="0x7938" />
<Limb Name="object_giant_Standardlimb_007944" Type="Standard" Offset="0x7944" />
<Limb Name="object_giant_Standardlimb_007950" Type="Standard" Offset="0x7950" />
<Limb Name="object_giant_Standardlimb_00795C" Type="Standard" Offset="0x795C" />
<Limb Name="object_giant_Standardlimb_007968" Type="Standard" Offset="0x7968" />
<Skeleton Name="object_giant_Skel_0079B0" Type="Flex" LimbType="Standard" Offset="0x79B0" />
<Animation Name="object_giant_Anim_008394" Offset="0x8394" />
<Animation Name="object_giant_Anim_0096E4" Offset="0x96E4" />
<Animation Name="object_giant_Anim_00A1C4" Offset="0xA1C4" />
<Animation Name="object_giant_Anim_00ACA4" Offset="0xACA4" />
<Animation Name="object_giant_Anim_00B784" Offset="0xB784" />
<Animation Name="object_giant_Anim_00C5D4" Offset="0xC5D4" />
<Animation Name="object_giant_Anim_00D040" Offset="0xD040" />
<Animation Name="object_giant_Anim_00DE84" Offset="0xDE84" />
<Animation Name="object_giant_Anim_0102A4" Offset="0x102A4" />
<Animation Name="object_giant_Anim_0116E4" Offset="0x116E4" />
<Animation Name="object_giant_Anim_012A38" Offset="0x12A38" />
<Animation Name="object_giant_Anim_013004" Offset="0x13004" />
<Animation Name="object_giant_Anim_013FE8" Offset="0x13FE8" />
<Animation Name="object_giant_Anim_015334" Offset="0x15334" />
<Animation Name="object_giant_Anim_017944" Offset="0x17944" />
<Animation Name="gGiantLargeStrideAnim" Offset="0x2168" /> <!-- Original name is "kya_testwalk" -->
<!-- Giant Body Vertices. Contains everything but the beard. -->
<Array Name="gGiantBodyVtx" Count="444" Offset="0x2180">
<Vtx/>
</Array>
<!-- Giant Unused Beard Vertices. An exact duplicate of the beard vertices that are actually used. -->
<Array Name="gGiantUnusedBeardVtx" Count="9" Offset="0x3D40">
<Vtx/>
</Array>
<!-- Giant Limb DisplayLists -->
<DList Name="gGiantHeadDL" Offset="0x3DD0" />
<DList Name="gGiantRightThighDL" Offset="0x40C0" />
<DList Name="gGiantRightShinDL" Offset="0x4200" />
<DList Name="gGiantRightFootDL" Offset="0x4438" />
<DList Name="gGiantLeftThighDL" Offset="0x4560" />
<DList Name="gGiantLeftShinDL" Offset="0x46A0" />
<DList Name="gGiantLeftFootDL" Offset="0x48D8" />
<DList Name="gGiantRightShoulderDL" Offset="0x4A00" />
<DList Name="gGiantRightUpperArmDL" Offset="0x4B10" />
<DList Name="gGiantRightForearmDL" Offset="0x4C38" />
<DList Name="gGiantRightHandDL" Offset="0x4D58" />
<DList Name="gGiantLeftShoulderDL" Offset="0x4EC0" />
<DList Name="gGiantLeftUpperArmDL" Offset="0x4FD0" />
<DList Name="gGiantLeftForearmDL" Offset="0x50F8" />
<DList Name="gGiantLeftHandDL" Offset="0x5218" />
<!-- Giant Textures -->
<Texture Name="gGiantTLUT" OutName="giant_tlut" Format="rgba16" Width="16" Height="16" Offset="0x5380" />
<Texture Name="gGiantFootTex" OutName="giant_foot" Format="ci8" Width="16" Height="16" Offset="0x5580" />
<Texture Name="gGiantShinTex" OutName="giant_shin" Format="ci8" Width="16" Height="16" Offset="0x5680" />
<Texture Name="gGiantForearmAndKneeTex" OutName="giant_forearm_and_knee" Format="ci8" Width="16" Height="16" Offset="0x5780" />
<Texture Name="gGiantUpperArmAndThighTex" OutName="giant_upper_arm_and_thigh" Format="ci8" Width="16" Height="16" Offset="0x5880" />
<Texture Name="gGiantHandTex" OutName="giant_hand" Format="ci8" Width="16" Height="16" Offset="0x5980" />
<Texture Name="gGiantFaceEyeOpenTex" OutName="giant_face_eye_open" Format="ci8" Width="32" Height="64" Offset="0x5A80" TlutOffset="0x5380" />
<Texture Name="gGiantFaceEyeHalfTex" OutName="giant_face_eye_half" Format="ci8" Width="32" Height="64" Offset="0x6280" TlutOffset="0x5380" />
<Texture Name="gGiantFaceEyeClosedTex" OutName="giant_face_eye_closed" Format="ci8" Width="32" Height="64" Offset="0x6A80" TlutOffset="0x5380" />
<Texture Name="gGiantGroinTex" OutName="giant_groin" Format="ci8" Width="16" Height="16" Offset="0x7280" />
<Texture Name="gGiantHairTex" OutName="giant_hair" Format="ci8" Width="16" Height="32" Offset="0x7380" />
<!-- Giant Beard Vertices, DisplayList, and Texture -->
<Array Name="gGiantBeardVtx" Count="9" Offset="0x7580">
<Vtx/>
</Array>
<DList Name="gGiantBeardDL" Offset="0x7610" />
<Texture Name="gGiantBeardTex" OutName="giant_beard" Format="rgba16" Width="16" Height="16" Offset="0x76C0" />
<!-- Giant Limbs -->
<Limb Name="gGiantHeadLimb" Type="Standard" Offset="0x78C0" />
<Limb Name="gGiantLeftThighLimb" Type="Standard" Offset="0x78CC" />
<Limb Name="gGiantLeftShinLimb" Type="Standard" Offset="0x78D8" />
<Limb Name="gGiantLeftFootLimb" Type="Standard" Offset="0x78E4" />
<Limb Name="gGiantRightThighLimb" Type="Standard" Offset="0x78F0" />
<Limb Name="gGiantRightShinLimb" Type="Standard" Offset="0x78FC" />
<Limb Name="gGiantRightFootLimb" Type="Standard" Offset="0x7908" />
<Limb Name="gGiantLeftShoulderLimb" Type="Standard" Offset="0x7914" />
<Limb Name="gGiantLeftUpperArmLimb" Type="Standard" Offset="0x7920" />
<Limb Name="gGiantLeftForearmLimb" Type="Standard" Offset="0x792C" />
<Limb Name="gGiantLeftHandLimb" Type="Standard" Offset="0x7938" />
<Limb Name="gGiantRightShoulderLimb" Type="Standard" Offset="0x7944" />
<Limb Name="gGiantRightUpperArmLimb" Type="Standard" Offset="0x7950" />
<Limb Name="gGiantRightForearmLimb" Type="Standard" Offset="0x795C" />
<Limb Name="gGiantRightHandLimb" Type="Standard" Offset="0x7968" />
<!-- Giant Skeleton -->
<Skeleton Name="gGiantSkel" Type="Flex" LimbType="Standard" Offset="0x79B0" />
<!-- Giant Animations -->
<Animation Name="gGiantLookUpStartAnim" Offset="0x8394" /> <!-- Original name is "kyo_kaoage" ("raising face") -->
<Animation Name="gGiantLookUpLoopAnim" Offset="0x96E4" /> <!-- Original name is "kyo_kaoage_loop" -->
<Animation Name="gGiantBigCallStartAnim" Offset="0xA1C4" /> <!-- Original name is "kyo_sakebi" ("cry"). Stretches his arms outward -->
<Animation Name="gGiantSmallCallStartAnim" Offset="0xACA4" /> <!-- Original name is "kyo_sakebi2" ("cry2"). Places his hands over his mouth -->
<Animation Name="gGiantSmallCallLoopAnim" Offset="0xB784" /> <!-- Original name is "kyo_sakebi2_loop" -->
<Animation Name="gGiantSmallCallEndAnim" Offset="0xC5D4" /> <!-- Original name is "kyo_sakebi2_modori" ("cry2 return") -->
<Animation Name="gGiantBigCallLoopAnim" Offset="0xD040" /> <!-- Original name is "kyo_sakebi_loop" -->
<Animation Name="gGiantBigCallEndAnim" Offset="0xDE84" /> <!-- Original name is "kyo_sakebi_modori" ("cry return") -->
<Animation Name="gGiantFallingOverAnim" Offset="0x102A4" /> <!-- Original name is "kyo_taoreru" ("falling over") -->
<Animation Name="gGiantRaisedArmsStartAnim" Offset="0x116E4" /> <!-- Original name is "kyo_teage" ("raising arm") -->
<Animation Name="gGiantRaisedArmsLoopAnim" Offset="0x12A38" /> <!-- Original name is "kyo_teage_loop" -->
<Animation Name="gGiantStruggleStartAnim" Offset="0x13004" /> <!-- Original name is "kyo_tukisasae" ("holding up the moon") -->
<Animation Name="gGiantStruggleLoopAnim" Offset="0x13FE8" /> <!-- Original name is "kyo_tukisasae_loop" -->
<Animation Name="gGiantIdleAnim" Offset="0x15334" /> <!-- Original name is "kyo_wait" -->
<Animation Name="gGiantWalkingAnim" Offset="0x17944" /> <!-- Original name is "kyo_walk" -->
</File>
</Root>
+5 -4
View File
@@ -1,8 +1,9 @@
<Root>
<!-- Object for small wooden crate -->
<File Name="object_kibako" Segment="6">
<Texture Name="object_kibako_Tex_000000" OutName="tex_000000" Format="rgba16" Width="32" Height="64" Offset="0x0" />
<DList Name="object_kibako_DL_001180" Offset="0x1180" />
<Texture Name="object_kibako_Tex_001240" OutName="tex_001240" Format="rgba16" Width="64" Height="16" Offset="0x1240" />
<DList Name="object_kibako_DL_001A70" Offset="0x1A70" />
<Texture Name="gSmallCrateTex" OutName="small_crate" Format="rgba16" Width="32" Height="64" Offset="0x0" />
<DList Name="gSmallCrateDL" Offset="0x1180" />
<Texture Name="gSmallCrateFragmentTex" OutName="small_crate_fragment" Format="rgba16" Width="64" Height="16" Offset="0x1240" />
<DList Name="gSmallCrateFragmentDL" Offset="0x1A70" />
</File>
</Root>
+10 -9
View File
@@ -1,13 +1,14 @@
<Root>
<!-- Object for large wooden crate -->
<File Name="object_kibako2" Segment="6">
<Texture Name="object_kibako2_TLUT_000000" OutName="tlut_000000" Format="rgba16" Width="4" Height="4" Offset="0x0" />
<Texture Name="object_kibako2_Tex_000020" OutName="tex_000020" Format="ci4" Width="32" Height="64" Offset="0x20" />
<Texture Name="object_kibako2_Tex_000420" OutName="tex_000420" Format="ci4" Width="32" Height="64" Offset="0x420" />
<DList Name="object_kibako2_DL_000960" Offset="0x960" />
<Collision Name="object_kibako2_Colheader_000B70" Offset="0xB70" />
<Texture Name="object_kibako2_TLUT_000BA0" OutName="tlut_000BA0" Format="rgba16" Width="4" Height="4" Offset="0xBA0" />
<Texture Name="object_kibako2_Tex_000BC0" OutName="tex_000BC0" Format="ci4" Width="32" Height="64" Offset="0xBC0" />
<DList Name="object_kibako2_DL_001040" Offset="0x1040" />
<DList Name="object_kibako2_DL_001100" Offset="0x1100" />
<Texture Name="gLargeCrateTLUT" OutName="large_crate_tlut" Format="rgba16" Width="4" Height="4" Offset="0x0" />
<Texture Name="gLargeCrateTopTex" OutName="large_crate_top" Format="ci4" Width="32" Height="64" Offset="0x20" />
<Texture Name="gLargeCrateSidesTex" OutName="large_crate_sides" Format="ci4" Width="32" Height="64" Offset="0x420" />
<DList Name="gLargeCrateDL" Offset="0x960" />
<Collision Name="gLargeCrateCol" Offset="0xB70" />
<Texture Name="gLargeCrateFragmentTLUT" OutName="large_crate_fragment_tlut" Format="rgba16" Width="4" Height="4" Offset="0xBA0" />
<Texture Name="gLargeCrateFragmentTex" OutName="large_crate_fragment" Format="ci4" Width="32" Height="64" Offset="0xBC0" />
<DList Name="gLargeCrateFragment1DL" Offset="0x1040" />
<DList Name="gLargeCrateFragment2DL" Offset="0x1100" />
</File>
</Root>
+2 -2
View File
@@ -7,9 +7,9 @@
<DList Name="object_oF1d_map_DL_000D50" Offset="0xD50" />
<DList Name="object_oF1d_map_DL_000DD8" Offset="0xDD8" />
<DList Name="object_oF1d_map_DL_001560" Offset="0x1560" />
<!-- <Blob Name="object_oF1d_map_Blob_001750" Size="0x20" Offset="0x1750" /> -->
<Blob Name="object_oF1d_map_Blob_001750" Size="0x20" Offset="0x1750" />
<Texture Name="object_oF1d_map_Tex_001770" OutName="tex_001770" Format="rgba16" Width="32" Height="64" Offset="0x1770" />
<!-- <Blob Name="object_oF1d_map_Blob_002770" Size="0x800" Offset="0x2770" /> -->
<Blob Name="object_oF1d_map_Blob_002770" Size="0x800" Offset="0x2770" />
<Texture Name="object_oF1d_map_Tex_002F70" OutName="tex_002F70" Format="i4" Width="32" Height="32" Offset="0x2F70" />
<DList Name="object_oF1d_map_DL_0031A0" Offset="0x31A0" />
<DList Name="object_oF1d_map_DL_003258" Offset="0x3258" />
+4 -2
View File
@@ -11,9 +11,11 @@
<Texture Name="object_ssh_Tex_0017B0" OutName="tex_0017B0" Format="i8" Width="16" Height="16" Offset="0x17B0" />
<Texture Name="object_ssh_Tex_0018B0" OutName="tex_0018B0" Format="ci8" Width="8" Height="16" Offset="0x18B0" />
<Texture Name="object_ssh_Tex_001930" OutName="tex_001930" Format="ci8" Width="8" Height="8" Offset="0x1930" />
<!-- <Blob Name="object_ssh_Blob_001970" Size="0x400" Offset="0x1970" /> -->
<Texture Name="object_ssh_Tex_001970" OutName="tex_001970" Format="ci8" Width="32" Height="32" Offset="0x1970" />
<Texture Name="object_ssh_Tex_001D70" OutName="tex_001D70" Format="ci8" Width="8" Height="16" Offset="0x1D70" />
<!-- <Blob Name="object_ssh_Blob_001DF0" Size="0x800" Offset="0x1DF0" /> -->
<Texture Name="object_ssh_Tex_001DF0" OutName="tex_001DF0" Format="ci8" Width="32" Height="32" Offset="0x1DF0" />
<Texture Name="object_ssh_Tex_0021F0" OutName="tex_0021F0" Format="ci8" Width="32" Height="32" Offset="0x21F0" />
<Blob Name="object_ssh_Blob_0025F0" Size="0x2870" Offset="0x25F0" />
<DList Name="object_ssh_DL_004E60" Offset="0x4E60" />
<DList Name="object_ssh_DL_005210" Offset="0x5210" />
<DList Name="object_ssh_DL_0056A0" Offset="0x56A0" />
+3 -2
View File
@@ -1,6 +1,7 @@
<Root>
<!-- Used for the unused water vortex actor. -->
<File Name="object_stream" Segment="6">
<Texture Name="object_stream_Tex_000000" OutName="tex_000000" Format="i4" Width="64" Height="64" Offset="0x0" />
<DList Name="object_stream_DL_000950" Offset="0x950" />
<Texture Name="gWaterVortexTex" OutName="water_vortex" Format="i4" Width="64" Height="64" Offset="0x0" />
<DList Name="gWaterVortexDL" Offset="0x950" />
</File>
</Root>
+1 -1
View File
@@ -3,7 +3,7 @@
<Animation Name="object_wiz_Anim_0007B0" Offset="0x7B0" />
<Texture Name="object_wiz_Tex_0007C0" OutName="tex_0007C0" Format="i4" Width="32" Height="64" Offset="0x7C0" />
<Texture Name="object_wiz_Tex_000BC0" OutName="tex_000BC0" Format="i4" Width="32" Height="32" Offset="0xBC0" />
<!-- <Blob Name="object_wiz_Blob_000DC0" Size="0x80" Offset="0xDC0" /> -->
<Texture Name="object_wiz_Tex_000DC0" OutName="tex_000DC0" Format="i4" Width="16" Height="16" Offset="0xDC0" />
<DList Name="object_wiz_DL_000E70" Offset="0xE70" />
<DList Name="object_wiz_DL_000F28" Offset="0xF28" />
<DList Name="object_wiz_DL_000FD8" Offset="0xFD8" />
+6
View File
@@ -0,0 +1,6 @@
<Root>
<File Name="ovl_En_Bomjima" BaseAddress="0x80BFE170" RangeStart="0x2998" RangeEnd="0x29B8">
<DList Name="gEnBomjima_D_80C00B08" Offset="0x2998"/>
<DList Name="gEnBomjima_D_80C00B18" Offset="0x29A8"/>
</File>
</Root>
+14
View File
@@ -0,0 +1,14 @@
<Root>
<File Name="ovl_En_Mm2" BaseAddress="0x809A2030" RangeStart="0x240" RangeEnd="0xAD0">
<Texture Name="sEnMm2EnvelopeTex" OutName="mm2_envelope" Format="i8" Width="32" Height="32" Offset="0x240"/>
<Texture Name="sEnMm2LetterTex" OutName="mm2_letter" Format="i8" Width="16" Height="16" Offset="0x640"/>
<Array Name="sEnMm21Vtx" Count="10" Offset="0x840">
<Vtx/>
</Array>
<Array Name="sEnMm22Vtx" Count="12" Offset="0x8E0">
<Vtx/>
</Array>
<DList Name="sEnMm2DL" Offset="0x9A8"/>
</File>
</Root>
+32 -32
View File
@@ -63,7 +63,7 @@ void EnMs_Init(Actor* thisx, GlobalContext* globalCtx) {
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06003DC0, &D_060005EC, this->jointTable, this->morphTable, 9);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinderType1(globalCtx, &this->collider, &this->actor, &D_80952BA0);
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 35.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
Actor_SetScale(&this->actor, 0.015f);
this->actor.colChkInfo.mass = 0xFF;
this->actionFunc = func_80952734;
@@ -87,7 +87,7 @@ void func_80952734(EnMs* this, GlobalContext* globalCtx) {
this->actor.textId = 0x932;
}
if (func_800B84D0(&this->actor, globalCtx) != 0) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) != 0) {
this->actionFunc = func_809527F8;
return;
}
@@ -107,12 +107,12 @@ void func_809529AC(EnMs *this, GlobalContext *globalCtx) {
func_800B8500(&this->actor, globalCtx, this->actor.xzDistToPlayer, this->actor.playerHeightRel, 0);
this->actionFunc = func_80952A1C;
} else {
func_800B8A1C(&this->actor, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
Actor_PickUp(&this->actor, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
}
}
void func_80952A1C(EnMs *this, GlobalContext *globalCtx) {
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_80151938(globalCtx, 0x936U);
this->actionFunc = func_809527F8;
} else {
@@ -124,7 +124,7 @@ void EnMs_Update(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnMs* this = THIS;
Actor_SetHeight(&this->actor, 20.0f);
Actor_SetFocus(&this->actor, 20.0f);
this->actor.targetArrowOffset = 500.0f;
Actor_SetScale(&this->actor, 0.015f);
SkelAnime_Update(&this->skelAnime);
@@ -156,7 +156,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
u8 temp_v0;
u8 temp_v0_2;
temp_v0 = func_80152498(&globalCtx->msgCtx);
temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 != 4) {
if (temp_v0 != 5) {
if ((temp_v0 == 6) && (func_80147624(globalCtx) != 0)) {
@@ -168,7 +168,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
}
if (func_80147624(globalCtx) != 0) {
func_801477B4(globalCtx);
func_800B8A1C((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
this->actionFunc = func_809529AC;
return;
}
@@ -198,7 +198,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
return;
}
func_8019F208();
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
func_801159EC(-0xA);
this->actionFunc = func_809529AC;
}
@@ -208,7 +208,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
which is long, messy, and contains some rather nasty-looking control flow, including horrors like
```C
temp_v0 = func_80152498(&globalCtx->msgCtx);
temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 != 4) {
if (temp_v0 != 5) {
if ((temp_v0 == 6) && (func_80147624(globalCtx) != 0)) {
@@ -238,7 +238,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
u8 temp_v0;
u8 temp_v0_2;
temp_v0 = func_80152498(&globalCtx->msgCtx);
temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 4) {
goto block_7;
}
@@ -258,7 +258,7 @@ block_5:
goto block_17;
}
func_801477B4(globalCtx);
func_800B8A1C((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
this->actionFunc = func_809529AC;
return;
block_7:
@@ -290,7 +290,7 @@ block_13:
return;
block_15:
func_8019F208();
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
func_801159EC(-0xA);
this->actionFunc = func_809529AC;
return;
@@ -340,7 +340,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
u8 temp_v0;
u8 temp_v0_2;
temp_v0 = func_80152498(&globalCtx->msgCtx);
temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 4) {
goto block_7;
}
@@ -360,7 +360,7 @@ block_5:
goto block_17;
}
func_801477B4(globalCtx);
func_800B8A1C((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
this->actionFunc = func_809529AC;
return;
block_7:
@@ -390,7 +390,7 @@ block_11:
}
func_8019F208();
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
func_801159EC(-0xA);
this->actionFunc = func_809529AC;
return;
@@ -410,7 +410,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
u8 temp_v0;
u8 temp_v0_2;
temp_v0 = func_80152498(&globalCtx->msgCtx);
temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 4) {
goto block_7;
}
@@ -430,7 +430,7 @@ block_5:
return;
}
func_801477B4(globalCtx);
func_800B8A1C((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
this->actionFunc = func_809529AC;
return;
block_7:
@@ -460,7 +460,7 @@ block_11:
}
func_8019F208();
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
func_801159EC(-0xA);
this->actionFunc = func_809529AC;
return;
@@ -509,7 +509,7 @@ So let us rewrite the entire second half as a switch:
}
func_8019F208();
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
func_801159EC(-0xA);
this->actionFunc = func_809529AC;
return;
@@ -540,7 +540,7 @@ There's a couple of other obvious things here:
func_80151938(globalCtx, 0x937U);
} else {
func_8019F208();
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
func_801159EC(-0xA);
this->actionFunc = func_809529AC;
}
@@ -568,7 +568,7 @@ can be swapped round and made to wrap the switch. This leaves us with
void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
u8 temp_v0;
temp_v0 = func_80152498(&globalCtx->msgCtx);
temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 4) {
goto block_7;
}
@@ -588,7 +588,7 @@ block_5:
return;
}
func_801477B4(globalCtx);
func_800B8A1C((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
this->actionFunc = func_809529AC;
return;
block_7:
@@ -605,7 +605,7 @@ block_7:
func_80151938(globalCtx, 0x937U);
} else {
func_8019F208();
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
func_801159EC(-0xA);
this->actionFunc = func_809529AC;
}
@@ -623,7 +623,7 @@ block_7:
Now, the top of the function also looks like a switch:
```C
temp_v0 = func_80152498(&globalCtx->msgCtx);
temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 4) {
goto block_7;
}
@@ -641,7 +641,7 @@ Putting all this together, we write down a function with no gotos in it:
```C
void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
switch (func_80152498(&globalCtx->msgCtx)) {
switch (Message_GetState(&globalCtx->msgCtx)) {
case 6:
this->actionFunc = func_80952734;
break;
@@ -651,7 +651,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
return;
}
func_801477B4(globalCtx);
func_800B8A1C((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
this->actionFunc = func_809529AC;
break;
@@ -660,7 +660,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
func_801477B4(globalCtx);
if (gSaveContext.rupees < 0xA) {
play_sound(0x4806U);
func_80151938(globalCtx, 0x935U);
@@ -669,7 +669,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
func_80151938(globalCtx, 0x937U);
} else {
func_8019F208();
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
func_801159EC(-0xA);
this->actionFunc = func_809529AC;
}
@@ -694,7 +694,7 @@ Lastly, we can simplify `case 5` to replace the return in the if by the rest of
```C
void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
switch (func_80152498(&globalCtx->msgCtx)) {
switch (Message_GetState(&globalCtx->msgCtx)) {
case 6:
this->actionFunc = func_80952734;
break;
@@ -702,7 +702,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
case 5:
if (func_80147624(globalCtx) != 0) {
func_801477B4(globalCtx);
func_800B8A1C((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
this->actionFunc = func_809529AC;
}
break;
@@ -712,7 +712,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
func_801477B4(globalCtx);
if (gSaveContext.rupees < 0xA) {
play_sound(0x4806U);
func_80151938(globalCtx, 0x935U);
@@ -721,7 +721,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
func_80151938(globalCtx, 0x937U);
} else {
func_8019F208();
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
func_801159EC(-0xA);
this->actionFunc = func_809529AC;
}
+9 -9
View File
@@ -148,9 +148,9 @@ void func_80C1019C(EnRecepgirl* this, GlobalContext* globalCtx) {
}
}
if (func_800B84D0(&this->actor, globalCtx) != 0) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) != 0) {
func_80C10290(this);
} else if (Actor_IsActorFacingLink(&this->actor, 0x2000)) {
} else if (Actor_IsFacingPlayer(&this->actor, 0x2000)) {
func_800B8614(&this->actor, globalCtx, 60.0f);
if (Player_GetMask(globalCtx) == 2) {
this->actor.textId = 0x2367;
@@ -188,7 +188,7 @@ void func_80C102D4(EnRecepgirl *this, GlobalContext *globalCtx) {
}
}
temp_v0_2 = func_80152498(&globalCtx->msgCtx);
temp_v0_2 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0_2 == 2) {
this->actor.textId = 0x2ADC;
func_80C10148(this);
@@ -197,7 +197,7 @@ void func_80C102D4(EnRecepgirl *this, GlobalContext *globalCtx) {
if ((temp_v0_2 == 5) && (func_80147624(globalCtx) != 0)) {
if (this->actor.textId == 0x2AD9) {
Actor_SetSwitchFlag(globalCtx, this->actor.params);
Flags_SetSwitch(globalCtx, this->actor.params);
Animation_MorphToPlayOnce(&this->skelAnime, &D_0600AD98, 10.0f);
if ((gSaveContext.weekEventReg[63] & 0x80)) {
this->actor.textId = 0x2ADF;
@@ -476,9 +476,9 @@ void func_80C1019C(EnRecepgirl* this, GlobalContext* globalCtx) {
}
}
if (func_800B84D0(&this->actor, globalCtx) != 0) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) != 0) {
func_80C10290(this);
} else if (Actor_IsActorFacingLink(&this->actor, 0x2000)) {
} else if (Actor_IsFacingPlayer(&this->actor, 0x2000)) {
func_800B8614(&this->actor, globalCtx, 60.0f);
if (Player_GetMask(globalCtx) == PLAYER_MASK_KAFEIS_MASK) {
this->actor.textId = 0x2367; // "... doesn't Kafei want to break off his engagement ... ?"
@@ -514,13 +514,13 @@ void func_80C102D4(EnRecepgirl* this, GlobalContext* globalCtx) {
}
}
temp_v0_2 = func_80152498(&globalCtx->msgCtx);
temp_v0_2 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0_2 == 2) {
this->actor.textId = 0x2ADC; // hear directions again?
func_80C10148(this);
} else if ((temp_v0_2 == 5) && (func_80147624(globalCtx) != 0)) {
if (this->actor.textId == 0x2AD9) { // "Welcome..."
Actor_SetSwitchFlag(globalCtx, this->actor.params);
Flags_SetSwitch(globalCtx, this->actor.params);
Animation_MorphToPlayOnce(&this->skelAnime, &D_0600AD98, 10.0f);
if (gSaveContext.weekEventReg[63] & 0x80) { // showed Couple's Mask to meeting
this->actor.textId = 0x2ADF; // Mayor's office is on the left (meeting ended)
@@ -546,7 +546,7 @@ void func_80C102D4(EnRecepgirl* this, GlobalContext* globalCtx) {
}
}
```
All this branching is to make the conversation look more diverse and interesting. Notably, though, `func_80C1019C` is set to start with, and is only changed when `func_800B84D0(&this->actor, globalCtx) != 0`. This is something to do with talking. The other function handles the rest of the conversation, and hands back to the first if `func_80152498(&globalCtx->msgCtx) == 2`. This function is *something* to do with the text state, which will require `z_message` to be decomped. However, observation in-game will reveal this is something to do with ending dialogue. So we can conclude that the action functions are `EnRecepgirl_Wait` and `EnRecepgirl_Talk`. The setup functions are thus `EnRecepgirl_SetupWait` and `EnRecepgirl_SetupTalk`.
All this branching is to make the conversation look more diverse and interesting. Notably, though, `func_80C1019C` is set to start with, and is only changed when `Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) != 0`. This is something to do with talking. The other function handles the rest of the conversation, and hands back to the first if `Message_GetState(&globalCtx->msgCtx) == 2`. This function is *something* to do with the text state, which will require `z_message` to be decomped. However, observation in-game will reveal this is something to do with ending dialogue. So we can conclude that the action functions are `EnRecepgirl_Wait` and `EnRecepgirl_Talk`. The setup functions are thus `EnRecepgirl_SetupWait` and `EnRecepgirl_SetupTalk`.
For more complex actors, we have a tool called `graphovl.py` that can produce function flow graphs for actors: running
```
+2 -2
View File
@@ -27,7 +27,7 @@ glabel func_809529AC
/* 0003D8 809529F8 C484009C */ lwc1 $f4, 0x9c($a0)
/* 0003DC 809529FC 8C870098 */ lw $a3, 0x98($a0)
/* 0003E0 80952A00 24060035 */ addiu $a2, $zero, 0x35
/* 0003E4 80952A04 0C02E287 */ jal func_800B8A1C
/* 0003E4 80952A04 0C02E287 */ jal Actor_PickUp
/* 0003E8 80952A08 E7A40010 */ swc1 $f4, 0x10($sp)
.L80952A0C:
/* 0003EC 80952A0C 8FBF001C */ lw $ra, 0x1c($sp)
@@ -46,7 +46,7 @@ void func_809529AC(EnMs *this, GlobalContext *globalCtx) {
func_800B8500(&this->actor, globalCtx, this->actor.xzDistToPlayer, this->actor.playerHeightRel, 0);
this->actionFunc = func_80952A1C;
} else {
func_800B8A1C(&this->actor, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
Actor_PickUp(&this->actor, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
}
}
```
+11 -11
View File
@@ -116,11 +116,11 @@ void func_80C1019C(EnRecepgirl *this, GlobalContext *globalCtx) {
Animation_ChangeTransitionRepeat(temp_a0, &D_06009890, -4.0f);
}
}
if (func_800B84D0((Actor *) this, globalCtx) != 0) {
if (Actor_ProcessTalkRequest((Actor *) this, globalCtx) != 0) {
func_80C10290(this);
return;
}
if (Actor_IsActorFacingLink((Actor *) this, 0x2000) != 0) {
if (Actor_IsFacingPlayer((Actor *) this, 0x2000) != 0) {
func_800B8614((Actor *) this, globalCtx, 60.0f);
if (Player_GetMask(globalCtx) == 2) {
this->actor.textId = 0x2367;
@@ -168,11 +168,11 @@ void func_80C1019C(EnRecepgirl *this, GlobalContext *globalCtx) {
Animation_ChangeTransitionRepeat(&this->skelAnime, &D_06009890, -4.0f);
}
}
if (func_800B84D0(&this->actor, globalCtx) != 0) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) != 0) {
func_80C10290(this);
return;
}
if (Actor_IsActorFacingLink(&this->actor, 0x2000) != 0) {
if (Actor_IsFacingPlayer(&this->actor, 0x2000) != 0) {
func_800B8614(&this->actor, globalCtx, 60.0f);
if (Player_GetMask(globalCtx) == 2) {
this->actor.textId = 0x2367;
@@ -203,9 +203,9 @@ void func_80C1019C(EnRecepgirl* this, GlobalContext* globalCtx) {
}
}
if (func_800B84D0(&this->actor, globalCtx) != 0) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) != 0) {
func_80C10290(this);
} else if (Actor_IsActorFacingLink(&this->actor, 0x2000)) {
} else if (Actor_IsFacingPlayer(&this->actor, 0x2000)) {
func_800B8614(&this->actor, globalCtx, 60.0f);
if (Player_GetMask(globalCtx) == 2) {
this->actor.textId = 0x2367;
@@ -282,7 +282,7 @@ void func_80C102D4(EnRecepgirl *this, GlobalContext *globalCtx) {
Animation_MorphToPlayOnce(sp20, &D_0600A280, -4.0f);
}
}
temp_v0_2 = func_80152498(&globalCtx->msgCtx);
temp_v0_2 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0_2 == 2) {
this->actor.textId = 0x2ADC;
func_80C10148(this);
@@ -291,7 +291,7 @@ void func_80C102D4(EnRecepgirl *this, GlobalContext *globalCtx) {
if (((temp_v0_2 & 0xFF) == 5) && (func_80147624(globalCtx) != 0)) {
temp_v0_3 = this->actor.textId;
if (temp_v0_3 == 0x2AD9) {
Actor_SetSwitchFlag(globalCtx, (s32) this->actor.params);
Flags_SetSwitch(globalCtx, (s32) this->actor.params);
Animation_MorphToPlayOnce(sp20, &D_0600AD98, 10.0f);
if ((*(&gSaveContext + 0xF37) & 0x80) != 0) {
this->actor.textId = 0x2ADF;
@@ -340,7 +340,7 @@ void func_80C102D4(EnRecepgirl *this, GlobalContext *globalCtx) {
}
}
temp_v0_2 = func_80152498(&globalCtx->msgCtx);
temp_v0_2 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0_2 == 2) {
this->actor.textId = 0x2ADC;
func_80C10148(this);
@@ -349,7 +349,7 @@ void func_80C102D4(EnRecepgirl *this, GlobalContext *globalCtx) {
if (((temp_v0_2 & 0xFF) == 5) && (func_80147624(globalCtx) != 0)) {
if (this->actor.textId == 0x2AD9) {
Actor_SetSwitchFlag(globalCtx, this->actor.params);
Flags_SetSwitch(globalCtx, this->actor.params);
Animation_MorphToPlayOnce(&this->skelAnime, &D_0600AD98, 10.0f);
if ((*(&gSaveContext + 0xF37) & 0x80) != 0) {
this->actor.textId = 0x2ADF;
@@ -390,7 +390,7 @@ The yellow shows registers that don't match, the different colours on the regist
```
somehow we skipped over `t0`. Where is this in the code? The `153` in the middle is the line number in the C file (the `3f0`s are the offsets into the assembly file), we have `--source` if you want to see the code explicitly, or you can do it the old-fashioned way, and work it out from nearby function calls. In this case, `func_80C10148` is run straight after, and the only place that is called is
```C
temp_v0_2 = func_80152498(&globalCtx->msgCtx);
temp_v0_2 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0_2 == 2) {
this->actor.textId = 0x2ADC;
func_80C10148(this);
+237 -330
View File
@@ -15,8 +15,7 @@ s32 DmaMgr_FindDmaIndex(u32 vromAddr);
const char* func_800809F4(u32 param_1);
void DmaMgr_ProcessMsg(DmaRequest* req);
void DmaMgr_ThreadEntry(void* arg);
s32 DmaMgr_SendRequestImpl(DmaRequest* request, void* vramStart, uintptr_t vromStart, size_t size, UNK_TYPE4 unused,
OSMesgQueue* callback, void* callbackMesg);
s32 DmaMgr_SendRequestImpl(DmaRequest* request, void* vramStart, uintptr_t vromStart, size_t size, UNK_TYPE4 unused, OSMesgQueue* callback, void* callbackMesg);
s32 DmaMgr_SendRequest0(void* vramStart, uintptr_t vromStart, size_t size);
void DmaMgr_Start(void);
void DmaMgr_Stop(void);
@@ -305,8 +304,8 @@ void osViBlack(u8 active);
s32 __osSiRawReadIo(u32 devAddr, u32* data);
OSId osGetThreadId(OSThread* t);
void osSpTaskYield(void);
s32 __osPfsGetNextPage(OSPfs* param_1, __OSInode* param_2, u8 param_3, u8 param_4);
s32 osPfsReadWriteFile(OSPfs* pfs, s32 file_no, u8 flag, s32 offset, s32 size_in_bytes, u8* data_buffer);
s32 __osPfsGetNextPage(OSPfs* pfs, u8* bank, __OSInode* inode, __OSInodeUnit* page);
s32 osPfsReadWriteFile(OSPfs* pfs, s32 fileNo, u8 flag, s32 offset, s32 size, u8* data);
s32 __osPfsGetStatus(OSMesgQueue* queue, s32 channel);
// void __osPfsRequestOneChannel(void);
// void __osPfsGetOneChannelData(void);
@@ -317,8 +316,7 @@ void osViSetMode(OSViMode* modep);
void guLookAtF(float mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
void guLookAt(Mtx* m, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
s32 osPfsAllocateFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32 fileSize, s32* fileNo);
s32 __osPfsDeclearPage(OSPfs* pfs, __OSInode* inode, s32 fileSizeInPages, s32* startPage, u8 bank, s32* decleared,
s32* finalPage);
s32 __osPfsDeclearPage(OSPfs* pfs, __OSInode* inode, s32 fileSizeInPages, s32* startPage, u8 bank, s32* decleared, s32* finalPage);
s32 osStopTimer(OSTimer* t);
u32 __osProbeTLB(void* param_1);
void osCreatePiManager(OSPri pri, OSMesgQueue* cmdQ, OSMesg* cmdBuf, s32 cmdMsgCnt);
@@ -493,8 +491,8 @@ void* __osMemcpy(void* dst, void* src, size_t size);
// void EnItem00_DrawHeartContainer(EnItem00* this, GlobalContext* globalCtx);
// void EnItem00_DrawHeartPiece(EnItem00* this, GlobalContext* globalCtx);
// s16 func_800A7650(s16 dropId);
EnItem00* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, u32 params);
Actor* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, u32 params);
Actor* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, u32 params);
Actor* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s32 params);
void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3f* spawnPos, s16 params);
s32 func_800A8150(s32 index);
s32 func_800A817C(s32 index);
@@ -551,70 +549,51 @@ s16 func_800B09D0(s16 a0, s16 a1, f32 a2);
u8 func_800B0A24(u8 a0, u8 a1, f32 a2);
void EffectSs_DrawGEffect(GlobalContext* globalCtx, EffectSs* this, void* texture);
void EffectSsDust_Spawn(GlobalContext* globalCtx, u16 drawFlags, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life, u8 updateMode);
void func_800B0DE0(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor, s16 scale, s16 scaleStep);
void func_800B0E48(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor, s16 scale, s16 scaleStep);
void func_800B0EB0(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
void func_800B0F18(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
void func_800B0F80(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
void func_800B0FE8(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor, s16 scale, s16 scaleStep);
void func_800B1054(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor, s16 scale, s16 scaleStep);
void func_800B0DE0(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
void func_800B0E48(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
void func_800B0EB0(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
void func_800B0F18(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
void func_800B0F80(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
void func_800B0FE8(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
void func_800B1054(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
void func_800B10C0(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
void func_800B1130(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
void func_800B11A0(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
void func_800B1210(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
void func_800B1280(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 life);
void func_800B12F0(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 life);
void func_800B1360(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor);
void func_800B139C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor);
void func_800B1280(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life);
void func_800B12F0(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life);
void func_800B1360(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
void func_800B139C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
void func_800B13D8(Vec3f* srcPos, f32 randScale, Vec3f* newPos, Vec3f* velocity, Vec3f* accel);
void func_800B14D4(GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos);
void func_800B1598(GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos);
void EffectSsKiraKira_SpawnSmallYellow(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
void EffectSsKiraKira_SpawnSmall(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
Color_RGBA8* primColor, Color_RGBA8* envColor);
void EffectSsGSpk_SpawnSmall(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
Color_RGBA8* primColor, Color_RGBA8* envColor);
void EffectSsKiraKira_SpawnSmall(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
void EffectSsGSpk_SpawnSmall(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
void EffectSsKiraKira_SpawnDispersed(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
// void EffectSsKiraKira_SpawnFocused(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE2 param_7, UNK_TYPE4 param_8);
// void EffectSsBomb2_SpawnFade(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4);
void EffectSsBomb2_SpawnLayered(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
s16 scaleStep);
void EffectSsBomb2_SpawnLayered(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
// void EffectSsBlast_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4, Color_RGBA8* param_5, Color_RGBA8* param_6, UNK_TYPE2 param_7, UNK_TYPE2 param_8, UNK_TYPE2 param_9, UNK_TYPE2 param_10);
// void EffectSsBlast_SpawnWhiteCustomScale(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
void EffectSsBlast_SpawnWhiteCustomScale(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
s16 scaleStep, s16 life);
// void EffectSsBlast_SpawnShockwave(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE2 param_7);
// void EffectSsBlast_SpawnWhiteShockwave(void);
void EffectSsBlast_SpawnWhiteShockwave(GlobalContext* globalCtx, Vec3f* arg1, Vec3f* arg2, Vec3f* arg3);
// void EffectSsGSpk_SpawnAccel(UNK_TYPE4 uParm1, UNK_TYPE4 uParm2, Vec3f* pzParm3, Vec3f* pzParm4, Vec3f* param_5, Color_RGBA8* param_6, Color_RGBA8* param_7, UNK_TYPE2 param_8, UNK_TYPE2 param_9);
// void EffectSsGSpk_SpawnNoAccel(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE2 param_8, UNK_TYPE2 param_9);
// void EffectSsGSpk_SpawnFuse(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void EffectSsGSpk_SpawnRandColor(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
// void EffectSsGSpk_SpawnSmall(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
void EffectSsDFire_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 alpha, s16 fadeDelay, s16 life, s32 arg9);
void EffectSsBubble_Spawn(GlobalContext* globalCtx, Vec3f* pos, f32 yPosOffset, f32 yPosRandScale, f32 xzPosRandScale,
f32 scale);
void EffectSsDFire_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 alpha, s16 fadeDelay, s16 life, s32 arg9);
void EffectSsBubble_Spawn(GlobalContext* globalCtx, Vec3f* pos, f32 yPosOffset, f32 yPosRandScale, f32 xzPosRandScale, f32 scale);
void EffectSsGRipple_Spawn(GlobalContext* globalCtx, Vec3f* pos, s16 radius, s16 radiusMax, s16 life);
void EffectSsGSplash_Spawn(GlobalContext* globalCtx, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor,
s16 type, s16 scale);
void EffectSsGSplash_Spawn(GlobalContext* globalCtx, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 type, s16 scale);
// void EffectSsGFire_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2);
// void EffectSsLightning_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Color_RGBA8* pzParm3, Color_RGBA8* pzParm4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7, UNK_TYPE2 param_8);
// void EffectSsDtBubble_SpawnColorProfile(UNK_TYPE4 param_1, Vec3f* param_2, Vec3f* param_3, Vec3f* param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7, UNK_TYPE2 param_8);
void EffectSsDtBubble_SpawnCustomColor(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 life, s16 randXZ);
void EffectSsHahen_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16 scale,
s16 objId, s16 life, Gfx* dList);
void EffectSsHahen_SpawnBurst(GlobalContext* globalCtx, Vec3f* pos, f32 burstScale, s16 unused, s16 scale,
s16 randScaleRange, s16 count, s16 objId, s16 life, Gfx* dList);
void EffectSsDtBubble_SpawnCustomColor(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 life, s16 randXZ);
void EffectSsHahen_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16 scale, s16 objId, s16 life, Gfx* dList);
void EffectSsHahen_SpawnBurst(GlobalContext* globalCtx, Vec3f* pos, f32 burstScale, s16 unused, s16 scale, s16 randScaleRange, s16 count, s16 objId, s16 life, Gfx* dList);
// void func_800B2364(void);
// void EffectSsStick_Spawn(UNK_TYPE4 uParm1, UNK_PTR puParm2, UNK_TYPE2 uParm3);
// void EffectSsSibuki_Spawn(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
@@ -625,28 +604,22 @@ void EffectSsHitMark_SpawnFixedScale(GlobalContext* globalCtx, s32 type, Vec3f*
// void EffectSsHitMark_SpawnCustomScale(void);
// void EffectSsFhgFlash_SpawnShock(UNK_TYPE4 uParm1, UNK_TYPE4 uParm2, Vec3f* pzParm3, UNK_TYPE2 uParm4, UNK_TYPE1 param_5);
// void EffectSsKFire_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4, UNK_TYPE2 param_5, UNK_TYPE1 param_6);
void EffectSsSolderSrchBall_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused,
s16* linkDetected, s16 drawFlag);
void EffectSsKakera_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* arg3, s16 gravity, s16 arg5,
s16 arg6, s16 arg7, s16 arg8, s16 scale, s16 arg10, s16 arg11, s32 life, s16 colorIdx,
s16 objId, Gfx* dList);
void EffectSsSolderSrchBall_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16* linkDetected, s16 drawFlag);
void EffectSsKakera_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* arg3, s16 gravity, s16 arg5, s16 arg6, s16 arg7, s16 arg8, s16 scale, s16 arg10, s16 arg11, s32 life, s16 colorIdx, s16 objId, Gfx* dList);
// void EffectSsIcePiece_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, UNK_TYPE4 uParm3, Vec3f* pzParm4, Vec3f* param_5, UNK_TYPE4 param_6);
// void EffectSsIcePiece_SpawnBurst(void);
// void EffectSsEnIce_SpawnFlyingVec3f(UNK_TYPE4 uParm1, Actor* pzParm2, Vec3f* pzParm3, Color_RGBA8* pzParm4, Color_RGBA8* param_5, UNK_TYPE4 param_6);
// void func_800B2B44(void);
// void func_800B2B7C(void);
void EffectSsEnIce_Spawn(GlobalContext* globalCtx, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel,
Color_RGBA8* primColor, Color_RGBA8* envColor, s32 life);
void EffectSsEnIce_Spawn(GlobalContext* globalCtx, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s32 life);
// void EffectSsFireTail_Spawn(UNK_TYPE4 uParm1, UNK_TYPE4 uParm2, Vec3f* pzParm3, UNK_TYPE4 uParm4, Vec3f* param_5, UNK_TYPE2 param_6, Color_RGBA8* param_7, Color_RGBA8* param_8, UNK_TYPE2 param_9, UNK_TYPE2 param_10, UNK_TYPE4 param_11);
// void EffectSsFireTail_SpawnFlame(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE4 param_6);
// void EffectSsFireTail_SpawnFlameOnPlayer(void);
void EffectSsEnFire_SpawnVec3f(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, s16 scale, s16 arg4, s16 flags, s16 bodyPart);
// void EffectSsEnFire_SpawnVec3s(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
// void EffectSsExtra_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4, UNK_TYPE2 param_5, UNK_TYPE2 param_6);
void EffectSsDeadDb_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* prim, Color_RGBA8* env,
s16 scale, s16 scaleStep, s32 unk);
void func_800B3030(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s32 colorIndex);
void EffectSsDeadDb_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* prim, Color_RGBA8* env, s16 scale, s16 scaleStep, s32 unk);
void func_800B3030(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s32 colorIndex);
// void EffectSsDeadDd_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4, UNK_TYPE1* param_5, UNK_TYPE1* param_6, UNK_TYPE2 param_7, UNK_TYPE2 param_8, UNK_TYPE2 param_9, UNK_TYPE4 param_10);
// void EffectSsDeadDs_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7, UNK_TYPE4 param_8);
// void func_800B31BC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE4 param_6);
@@ -656,73 +629,60 @@ void FlagSet_Update(GameState* gameState);
void FlagSet_Draw(GameState* gameState);
void Overlay_LoadGameState(GameStateOverlay* gameState);
void Overlay_FreeGameState(GameStateOverlay* gameState);
void Actor_PrintLists(ActorContext* actorCtx);
void ActorShape_Init(ActorShape* actorShape, f32 yOffset, ActorShadowFunc func, f32 scale);
void ActorShadow_Draw(Actor* actor, Lights* mapper, GlobalContext* globalCtx, Gfx* displayList, Color_RGBA8* color);
void func_800B3FC0(Actor* actor, Lights* mapper, GlobalContext* globalCtx);
void func_800B4024(Actor* actor, Lights* mapper, GlobalContext* globalCtx);
void func_800B4088(Actor* actor, Lights* mapper, GlobalContext* globalCtx);
void func_800B40B8(Actor* actor, Lights* mapper, GlobalContext* globalCtx);
void func_800B40E0(GlobalContext* globalCtx, Light* light, MtxF* arg2, s32 arg3, f32 arg4, f32 arg5, f32 arg6);
void func_800B42F8(Actor* actor, Lights* mapper, GlobalContext* globalCtx);
// void func_800B4A98(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
void func_800B4AEC(GlobalContext* globalCtx, Actor* actor, f32 param_3);
void ActorShape_Init(ActorShape* actorShape, f32 yOffset, ActorShadowFunc shadowDraw, f32 shadowScale);
void ActorShadow_DrawCircle(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void ActorShadow_DrawSquare(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void ActorShadow_DrawWhiteCircle(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void ActorShadow_DrawHorse(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void ActorShadow_DrawFeet(Actor* actor, Lights* mapper, GlobalContext* globalCtx);
void Actor_SetFeetPos(Actor* actor, s32 limbIndex, s32 leftFootIndex, Vec3f* leftFootPos, s32 rightFootIndex, Vec3f* rightFootPos);
void func_800B4AEC(GlobalContext* globalCtx, Actor* actor, f32 y);
void func_800B4B50(Actor* actor, Lights* mapper, GlobalContext* globalCtx);
void func_800B4EDC(GlobalContext* globalCtx, Vec3f* pzParm2, Vec3f* pzParm3, f32* pfParm4);
// void func_800B4F40(TargetContext* targetCtx, s32 param_2, UNK_TYPE4 param_3, UNK_TYPE4 param_4, UNK_TYPE4 param_5);
void func_800B4F78(TargetContext* targetCtx, u8 type, GlobalContext* globalCtx);
void func_800B5040(TargetContext* targetCtx, Actor* actor, u8 type, GlobalContext* globalCtx);
void Actor_TargetContextInit(TargetContext* targetCtx, Actor* actor, GlobalContext* globalCtx);
void func_800B5208(TargetContext* targetCtx, GlobalContext* globalCtx);
void func_800B5814(TargetContext* targetCtx, Player* player, Actor* actor, GlobalContext* globalCtx);
u32 Flags_GetSwitch(GlobalContext* globalCtx, s32 flag);
void Actor_SetSwitchFlag(GlobalContext* globalCtx, s32 flag);
void Actor_UnsetSwitchFlag(GlobalContext* globalCtx, s32 flag);
u32 Actor_GetChestFlag(GlobalContext* globalCtx, u32 flag);
void Actor_SetChestFlag(GlobalContext* globalCtx, u32 flag);
void Actor_SetAllChestFlag(GlobalContext* globalCtx, u32 flags);
u32 Actor_GetAllChestFlag(GlobalContext* globalCtx);
u32 Actor_GetRoomCleared(GlobalContext* globalCtx, u32 roomNumber);
void Actor_SetRoomCleared(GlobalContext* globalCtx, u32 roomNumber);
void Actor_UnsetRoomCleared(GlobalContext* globalCtx, u32 roomNumber);
u32 Actor_GetRoomClearedTemp(GlobalContext* globalCtx, u32 roomNumber);
void Actor_SetRoomClearedTemp(GlobalContext* globalCtx, u32 roomNumber);
void Actor_UnsetRoomClearedTemp(GlobalContext* globalCtx, u32 roomNumber);
u32 Actor_GetCollectibleFlag(GlobalContext* globalCtx, s32 index);
void Actor_SetCollectibleFlag(GlobalContext* globalCtx, s32 index);
void Actor_TitleCardContextInit(GlobalContext* globalCtx, TitleCardContext* titleCardCtx);
void Actor_TitleCardCreate(GlobalContext* globalCtx, TitleCardContext* titleCardCtx, u32 texture, s16 param_4, s16 param_5, u8 param_6, u8 param_7);
// void Actor_Nop800B5E50(UNK_TYPE4 param_1, UNK_TYPE4 param_2, UNK_TYPE4 param_3, UNK_TYPE4 param_4);
void Actor_TitleCardUpdate(GlobalContext* globalCtx, TitleCardContext* titleCardCtx);
void Actor_TitleCardDraw(GlobalContext* globalCtx, TitleCardContext* titleCardCtx);
// UNK_TYPE4 func_800B6434(GlobalContext* globalCtx, TitleCardContext* titleCardCtx);
// UNK_TYPE4 func_800B645C(void);
void func_800B6468(GlobalContext* globalCtx);
void func_800B6474(GlobalContext* globalCtx);
// UNK_TYPE4 func_800B648C(GlobalContext* globalCtx, UNK_TYPE1 param_2, UNK_TYPE1 param_3, f32 param_4, Vec3f* param_5);
f32 func_800B64FC(GlobalContext* globalCtx, f32 fParm2, Vec3f* pzParm3, u32* puParm4);
void* func_800B6584(GlobalContext* globalCtx, s16 sParm2, void* pvParm3, u32 uParm4);
// UNK_TYPE4 func_800B6608(s32 iParm1, s16 sParm2);
// void func_800B6680(void);
void Actor_GetProjectedPos(GlobalContext* globalCtx, Vec3f* arg1, Vec3f* arg2, f32* arg3);
void Actor_DrawZTarget(TargetContext* targetCtx, GlobalContext* globalCtx);
s32 Flags_GetSwitch(GlobalContext* globalCtx, s32 flag);
void Flags_SetSwitch(GlobalContext* globalCtx, s32 flag);
void Flags_UnsetSwitch(GlobalContext* globalCtx, s32 flag);
s32 Flags_GetTreasure(GlobalContext* globalCtx, s32 flag);
void Flags_SetTreasure(GlobalContext* globalCtx, s32 flag);
void Flags_SetAllTreasure(GlobalContext* globalCtx, s32 flag);
s32 Flags_GetAllTreasure(GlobalContext* globalCtx);
s32 Flags_GetClear(GlobalContext* globalCtx, s32 roomNumber);
void Flags_SetClear(GlobalContext* globalCtx, s32 roomNumber);
void Flags_UnsetClear(GlobalContext* globalCtx, s32 roomNumber);
s32 Flags_GetClearTemp(GlobalContext* globalCtx, s32 roomNumber);
void Flags_SetClearTemp(GlobalContext* globalCtx, s32 roomNumber);
void Flags_UnsetClearTemp(GlobalContext* globalCtx, s32 roomNumber);
s32 Flags_GetCollectible(GlobalContext* globalCtx, s32 flag);
void Flags_SetCollectible(GlobalContext* globalCtx, s32 flag);
void TitleCard_InitBossName(GameState* gameState, TitleCardContext* titleCtx, TexturePtr texture, s16 x, s16 y, u8 width, u8 height);
s32 func_800B648C(GlobalContext* globalCtx, s32 arg1, s32 arg2, f32 arg3, Vec3f* arg4);
f32 func_800B64FC(GlobalContext* globalCtx, f32 arg1, Vec3f* arg2, u32* arg3);
void* func_800B6584(GlobalContext* globalCtx, s16 id, void* arg2, size_t size);
void* func_800B6608(GlobalContext* globalCtx, s16 id);
void* func_800B6680(GlobalContext* globalCtx, s16 id);
void Actor_MarkForDeath(Actor* actor);
void Actor_InitCurrPosition(Actor* actor);
void Actor_SetHeight(Actor* actor, f32 height);
void Actor_SetRotationFromDrawRotation(Actor* actor);
void Actor_InitDrawRotation(Actor* actor);
void Actor_SetWorldToHome(Actor* actor);
void Actor_SetFocus(Actor* actor, f32 height);
void Actor_SetWorldRotToShape(Actor* actor);
void Actor_SetShapeRotToWorld(Actor* actor);
void Actor_SetScale(Actor* actor, f32 scale);
void Actor_SetObjectSegment(GlobalContext* globalCtx, Actor* actor);
void Actor_InitToDefaultValues(Actor* actor, GlobalContext* globalCtx);
void Actor_FiniActor(Actor* actor, GlobalContext* globalCtx);
void Actor_SetObjectDependency(GlobalContext* globalCtx, Actor* actor);
void Actor_SetMovementScale(s32 scale);
void Actor_ApplyMovement(Actor* actor);
void Actor_SetVelocityYRotationAndGravity(Actor* actor);
void Actor_SetVelocityAndMoveYRotationAndGravity(Actor* actor);
void Actor_SetVelocityXYRotation(Actor* actor);
void Actor_SetVelocityAndMoveXYRotation(Actor* actor);
void Actor_SetVelocityXYRotationReverse(Actor* actor);
void Actor_SetVelocityAndMoveXYRotationReverse(Actor* actor);
void func_800B6C04(Actor* actor, f32 fParm2);
// void func_800B6C58(Actor* actor, UNK_TYPE4 param_2);
void Actor_UpdatePos(Actor* actor);
void Actor_UpdateVelocityWithGravity(Actor* actor);
void Actor_MoveWithGravity(Actor* actor);
void Actor_UpdateVelocityWithoutGravity(Actor* actor);
void Actor_MoveWithoutGravity(Actor* actor);
void Actor_UpdateVelocityWithoutGravityReverse(Actor* actor);
void Actor_MoveWithoutGravityReverse(Actor* actor);
void Actor_SetSpeeds(Actor* actor, f32 speed);
s16 Actor_YawBetweenActors(Actor* from, Actor* to);
s16 Actor_YawBetweenActorsTop(Actor* from, Actor* to);
s16 Actor_YawToPoint(Actor* actor, Vec3f* point);
@@ -733,171 +693,142 @@ f32 Actor_DistanceBetweenActors(Actor* actor1, Actor* actor2);
f32 Actor_DistanceToPoint(Actor* actor, Vec3f* point);
f32 Actor_XZDistanceBetweenActors(Actor* actor1, Actor* actor2);
f32 Actor_XZDistanceToPoint(Actor* actor, Vec3f* point);
void Actor_CalcOffsetOrientedToDrawRotation(Actor* actor, Vec3f* offset, Vec3f* point);
f32 Actor_YDistance(Actor* actor1, Actor* actor2);
void func_800B6F20(GlobalContext* globalCtx, s32 param_2, f32 param_3, s16 param_4);
float func_800B6FC8(Player* player);
// void func_800B7090(void);
// void func_800B7118(void);
// void func_800B7128(void);
void Actor_OffsetOfPointInActorCoords(Actor* actor, Vec3f* offset, Vec3f* point);
f32 Actor_HeightDiff(Actor* actor1, Actor* actor2);
void func_800B6F20(GlobalContext* globalCtx, Input* input, f32 arg2, s16 arg3);
f32 Player_GetHeight(Player* player);
f32 Player_GetRunSpeedLimit(Player* player);
s32 func_800B7118(Player* player);
s32 func_800B7128(Player* player);
s32 func_800B715C(GlobalContext* globalCtx);
// void func_800B7170(void);
// void func_800B71DC(void);
u32 func_800B7200(s32 param_1);
// void func_800B722C(void);
void func_800B724C(GlobalContext* globalCtx, Actor* actor, u8 arg2);
u32 func_800B7298(GlobalContext* globalCtx, Actor* actor, u8 arg2);
void func_800B72E0(s32 param_1);
void func_800B72F8(DynaPolyActor* dpactor, f32 a1, s16 a2);
s32 Actor_IsLinkFacingActor(Actor* actor, s16 tolerance, GlobalContext* globalCtx);
s32 Actor_IsActorFacedByActor(Actor* actor, Actor* other, s16 tolerance);
s32 Actor_IsActorFacingLink(Actor* actor, s16 angle);
s32 Actor_IsActorFacingActor(Actor* actor, Actor* other, s16 tolerance);
s32 Actor_IsActorFacingLinkAndWithinRange(Actor* actor, f32 range, s16 tolerance);
s32 Actor_IsActorFacingActorAndWithinRange(Actor* actor, Actor* other, f32 range, s16 tolerance);
void func_800B75A0(CollisionPoly* param_1, Vec3f* param_2, s16* param_3);
// UNK_TYPE4 func_800B761C(Actor* param_1, UNK_TYPE4 param_2, u32 param_3);
// UNK_TYPE4 func_800B7678(GlobalContext* globalCtx, Actor* param_2, s32 param_3, u32 param_4);
void Actor_SetCameraHorseSetting(GlobalContext* globalCtx, Player* player);
void Actor_MountHorse(GlobalContext* globalCtx, Player* player, Actor* horse);
s32 func_800B724C(GlobalContext* globalCtx, Actor* actor, u8 csMode);
u32 func_800B7298(GlobalContext* globalCtx, Actor* actor, u8 csMode);
void func_800B72F8(DynaPolyActor* dyna, f32 extraPushForce, s16 yRotation);
s32 Player_IsFacingActor(Actor* actor, s16 maxAngleDiff, GlobalContext* globalCtx);
s32 Actor_ActorBIsFacingActorA(Actor* actorA, Actor* actorB, s16 maxAngleDiff);
s32 Actor_IsFacingPlayer(Actor* actor, s16 angle);
s32 Actor_ActorAIsFacingActorB(Actor* actorA, Actor* actorB, s16 maxAngleDiff);
s32 Actor_IsFacingAndNearPlayer(Actor* actor, f32 range, s16 maxAngleDiff);
s32 Actor_ActorAIsFacingAndNearActorB(Actor* actorA, Actor* actorB, f32 range, s16 maxAngleDiff);
void func_800B75A0(CollisionPoly* poly, Vec3f* normal, s16* azimuth);
void Actor_UpdateBgCheckInfo(GlobalContext* globalCtx, Actor* actor, f32 wallCheckHeight, f32 wallCheckRadius, f32 ceilingCheckHeight, u32 flags);
// void func_800B7E04(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
Hilite* func_800B7FE0(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* gfxCtx);
// void func_800B8018(void);
void func_800B8050(Actor* actor, GlobalContext* globalCtx, s32 iParm3);
void func_800B8118(Actor* actor, GlobalContext* globalCtx, s32 iParm3);
// void func_800B81E0(void);
UNK_PTR func_800B8214(PosRot* param_1, Actor* param_2);
f32* func_800B8248(PosRot* param_1, Player* param_2);
// void func_800B82EC(void);
// void func_800B83BC(void);
// void func_800B83F8(void);
s32 func_800B84D0(Actor* actor, GlobalContext* globalCtx); // Actor_IsTalking
s32 func_800B8500(Actor* actor, GlobalContext* globalCtx, f32 fParm3, f32 fParm4, s32 param_5);
s32 func_800B85E0(Actor* actor, GlobalContext* globalCtx, f32 uParm3, s32 uParm4);
s32 func_800B8614(Actor* actor, GlobalContext* globalCtx, f32 uParm3);
Hilite* Hilite_DrawOpa(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* gfxCtx);
void func_800B8050(Actor* actor, GlobalContext* globalCtx, s32 flag);
void func_800B8118(Actor* actor, GlobalContext* globalCtx, s32 flag);
PosRot* Actor_GetFocus(PosRot* dest, Actor* actor);
PosRot* Actor_GetWorld(PosRot* dest, Actor* actor);
PosRot* Actor_GetWorldPosShapeRot(PosRot* dest, Actor* actor);
s32 func_800B83F8(Actor* actor, Player* player, s32 flag);
s32 Actor_ProcessTalkRequest(Actor* actor, GameState* gameState);
s32 func_800B8500(Actor* actor, GlobalContext* globalCtx, f32 xzRange, f32 yRange, s32 exchangeItemId);
s32 func_800B85E0(Actor* actor, GlobalContext* globalCtx, f32 radius, s32 exchangeItemId);
s32 func_800B8614(Actor* actor, GlobalContext* globalCtx, f32 radius);
s32 func_800B863C(Actor* actor, GlobalContext* globalCtx);
u32 func_800B867C(Actor* actor, GlobalContext* globalCtx);
UNK_TYPE4 func_800B86C8(Actor* actor1, GlobalContext* globalCtx, Actor* actor2);
s32 func_800B8708(GlobalContext* globalCtx);
s32 func_800B8718(Actor* actor, GlobalContext* globalCtx);
void func_800B874C(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3);
// void func_800B8804(void);
// void func_800B882C(void);
// void func_800B886C(void);
void func_800B8898(GlobalContext* globalCtx, Actor* actor, s16* arg2, s16* arg3);
s32 Actor_TextboxIsClosing(Actor* actor, GlobalContext* globalCtx);
s32 Actor_ChangeFocus(Actor* actor1, GlobalContext* globalCtx, Actor* actor2);
s32 Player_GetExchangeItemId(GlobalContext* globalCtx);
s32 func_800B8718(Actor* actor, GameState* gameState);
s32 func_800B874C(Actor* actor, GlobalContext* globalCtx, f32 xzRange, f32 yRange);
s32 func_800B8804(Actor* actor, GlobalContext* globalCtx, f32 xzRange);
s32 func_800B886C(Actor* actor, GlobalContext* globalCtx);
void Actor_GetScreenPos(GlobalContext* globalCtx, Actor* actor, s16* x, s16* y);
s32 func_800B8934(GlobalContext* globalCtx, Actor* actor);
u32 Actor_HasParent(Actor* actor, GlobalContext* globalCtx);
UNK_TYPE4 func_800B8A1C(Actor* actor, GlobalContext* globalCtx, s32 iParm3, f32 fParm4, f32 param_5);
// void func_800B8B84(void);
void func_800B8BB0(Actor* actor, GlobalContext* globalCtx);
// void func_800B8BD0(void);
s32 Actor_HasParent(Actor* actor, GlobalContext* globalCtx);
s32 Actor_PickUp(Actor* actor, GlobalContext* globalCtx, s32 getItemId, f32 xzRange, f32 yRange);
s32 Actor_PickUpNearby(Actor* actor, GlobalContext* globalCtx, s32 getItemId);
s32 Actor_LiftActor(Actor* actor, GlobalContext* globalCtx);
s32 Actor_PickUpFar(Actor* actor, GlobalContext* globalCtx, s32 getItemId);
s32 Actor_HasNoParent(Actor* actor, GlobalContext* globalCtx);
// void func_800B8C20(void);
void func_800B8C20(Actor* actorA, Actor* actorB, GlobalContext* globalCtx);
void func_800B8C50(Actor* actor, GlobalContext* globalCtx);
// void func_800B8C78(void);
// void func_800B8C9C(void);
// void func_800B8CEC(void);
// void func_800B8D10(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
s32 Actor_HasRider(GlobalContext* globalCtx, Actor* horse);
s32 Actor_SetRideActor(GlobalContext* globalCtx, Actor* horse, s32 mountSide);
s32 Actor_HasNoRider(GlobalContext* globalCtx, Actor* horse);
void func_800B8D10(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6);
void func_800B8D50(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 yaw, f32 arg4, u32 arg5);
void func_800B8D98(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f32 arg4);
// void func_800B8DD4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_800B8E1C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
void func_800B8E58(Actor* actor, u16 sfxId);
void Audio_PlayActorSound2(Actor* actor, u16 sfxId);
// void func_800B8FC0(void);
void func_800B8DD4(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5);
void func_800B8E1C(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f32 arg4);
void func_800B8E58(Player* player, u16 sfxId);
void Actor_PlaySfxAtPos(Actor* actor, u16 sfxId);
void func_800B8EF4(GlobalContext* globalCtx, Actor* actor);
void func_800B8F98(Actor* actor, u16 sfxId);
void func_800B8FC0(Actor* actor, u16 sfxId);
void func_800B8FE8(Actor* actor, u16 sfxId);
void func_800B9010(Actor* actor, u16 sfxId);
// void func_800B9038(void);
// void func_800B9084(void);
void func_800B9038(Actor* actor, s32 timer);
void func_800B9084(Actor* actor);
void func_800B9098(Actor* actor);
s32 func_800B90AC(GlobalContext* globalCtx, Actor* actor, UNK_TYPE arg2, UNK_TYPE arg3, UNK_TYPE arg4);
// void func_800B90F4(void);
s32 func_800B90AC(GlobalContext* globalCtx, Actor* actor, CollisionPoly* polygon, s32 index, s32 arg4);
void func_800B90F4(GlobalContext* globalCtx);
void func_800B9120(ActorContext* actorCtx);
// void Actor_Init(GlobalContext* globalCtx, ActorContext* actorCtx, UNK_TYPE4 uParm3);
void func_800B9334(GlobalContext* globalCtx, ActorContext* actorCtx);
Actor* Actor_UpdateActor(s800B948C* params);
void Actor_InitContext(GlobalContext* globalCtx, ActorContext* actorCtx, ActorEntry* actorEntry);
void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx);
void Actor_DrawActor(GlobalContext* globalCtx, Actor* actor);
void func_800B9D1C(Actor* actor);
void Actor_DrawAllSetup(GlobalContext* globalCtx);
s32 Actor_RecordUndrawnActor(GlobalContext* globalCtx, Actor* actor);
// void func_800B9E84(void);
void func_800B9EF4(GlobalContext* globalCtx, s32 numActors, Actor** actors);
s32 func_800BA2D8(GlobalContext* globalCtx, Actor* actor);
s32 func_800BA2FC(GlobalContext* globalCtx, Actor* actor, Vec3f* param_3, f32 param_4);
void Actor_DrawAll(GlobalContext* globalCtx, ActorContext* actorCtx);
void func_800BA6FC(GlobalContext* globalCtx, ActorContext* actorCtx);
void func_800BA798(GlobalContext* globalCtx, ActorContext* actorCtx);
void func_800BA8B8(GlobalContext* globalCtx, ActorContext* actorCtx);
// void func_800BA9B4(void);
void Actor_InsertIntoTypeList(ActorContext* actorCtx, Actor* actor, u8 type);
Actor* Actor_RemoveFromTypeList(GlobalContext* globalCtx, ActorContext* actorCtx, Actor* actor);
void Actor_FreeOverlay(ActorOverlay* entry);
Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 index, f32 x, f32 y, f32 z, s16 rotX, s16 rotY, s16 rotZ, s16 sParm10);
ActorInit* Actor_LoadOverlay(ActorContext* actorCtx, s16 index);
Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, GlobalContext* globalCtx, s16 index, f32 x, f32 y, f32 z, s16 rotX, s16 rotY, s16 rotZ, s32 variable, u32 cutscene, s32 param_12, Actor* parent);
Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, GlobalContext* globalCtx, s16 index, f32 x, f32 y, f32 z, s16 rotX, s16 rotY, s16 rotZ, s32 variable);
void Actor_CleanupContext(ActorContext* actorCtx, GlobalContext* globalCtx);
Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s32 params);
Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, GlobalContext* globalCtx, s16 index, f32 x, f32 y, f32 z, s16 rotX, s16 rotY, s16 rotZ, s32 params, u32 cutscene, s32 arg11, Actor* parent);
Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, GlobalContext* globalCtx, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s32 params);
void Actor_SpawnTransitionActors(GlobalContext* globalCtx, ActorContext* actorCtx);
void func_800BB2D0(ActorContext* actorCtx, u16* param_2, GlobalContext* globalCtx);
Actor* func_800BB498(ActorContext* actorCtx, Actor* actor, GlobalContext* globalCtx);
// void func_800BB59C(void);
// void func_800BB604(void);
// void func_800BB8EC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
void Enemy_StartFinishingBlow(GlobalContext* globalCtx, Actor* actor);
// void func_800BBAC0(void);
void func_800BBB74(s16* arg1, UNK_TYPE1 arg2, UNK_TYPE1 arg3, UNK_TYPE4 arg4);
// void func_800BBC20(void);
void func_800BBCEC(Actor* actor, GlobalContext* globalCtx, s16 arg2, Gfx** dList);
void func_800BBDAC(GlobalContext* globalCtx, Actor* actor, Vec3f* arg2, f32 arg3, UNK_TYPE4 arg4, f32 arg5, s16 arg6, s16 arg7, u8 arg8);
void func_800BBFB0(GlobalContext* globalCtx, Vec3f* position, f32 param3, s32 param_4, s16 param_5, s16 param_6, u8 param_7);
s16 func_800BBAC0(s16 arg0[2], s16 arg1, s16 arg2, s16 arg3);
s16 func_800BBB74(s16 arg0[2], s16 arg1, s16 arg2, s16 arg3);
void Actor_SpawnBodyParts(Actor* actor, GlobalContext* globalCtx, s32 arg2, Gfx** dList);
void Actor_SpawnFloorDustRing(GlobalContext* globalCtx, Actor* actor, Vec3f* posXZ, f32 radius, s32 countMinusOne, f32 randAccelWeight, s16 scale, s16 scaleStep, u8 useLighting);
void func_800BBFB0(GlobalContext* globalCtx, Vec3f* position, f32 arg2, s32 arg3, s16 arg4, s16 scaleStep, u8 arg6);
void func_800BC154(GlobalContext* globalCtx, ActorContext* actorCtx, Actor* actor, u8 actorCategory);
// void func_800BC188(void);
// void func_800BC1B4(void);
Actor* func_800BC270(GlobalContext* globalCtx, Actor* actor, f32 arg2, UNK_TYPE4 arg3);
s32 func_800BC188(s32 index);
Actor* func_800BC270(GlobalContext* globalCtx, Actor* actor, f32 arg2, s32 arg3);
Actor* func_800BC444(GlobalContext* globalCtx, Actor* actor, f32 arg2);
s16 func_800BC4EC(Actor* actor, GlobalContext* globalCtx, f32 distance, s16 angle);
s32 func_800BC5B8(GlobalContext* globalCtx, Actor* actor);
s32 func_800BC5EC(GlobalContext* globalCtx, Actor* actor);
void func_800BC620(Vec3f* arg0, Vec3f* arg1, u8 arg2, GlobalContext* globalCtx);
// void func_800BC770(void);
// void func_800BC7D8(void);
s16 Actor_TestFloorInDirection(Actor* actor, GlobalContext* globalCtx, f32 distance, s16 angle);
s32 Actor_IsTargeted(GlobalContext* globalCtx, Actor* actor);
s32 Actor_OtherIsTargeted(GlobalContext* globalCtx, Actor* actor);
void func_800BC620(Vec3f* arg0, Vec3f* arg1, u8 alpha, GlobalContext* globalCtx);
void func_800BC770(GlobalContext* globalCtx, s16 y, s16 countdown);
void func_800BC7D8(GlobalContext* globalCtx, s16 y, s16 countdown, s16 speed);
void func_800BC848(Actor* actor, GlobalContext* globalCtx, s16 arg2, s16 arg3);
// void func_800BC8B8(void);
// void func_800BCB50(void);
void func_800BCB70(Actor* actor, u16 arg1, u16 arg2, s16 arg3, s16 arg4);
void func_800BCBF4(Vec3f* uParm1, GlobalContext* globalCtx);
void func_800BCC68(Vec3f* param_1, GlobalContext* globalCtx);
UNK_RET func_800BCCDC(Vec3s* points, u8 pathcount, Vec3f* pos1, Vec3f* pos2, UNK_TYPE parm5);
// void func_800BD2B4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_800BD384(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7, UNK_TYPE2 param_8, UNK_TYPE1 param_9);
// void func_800BD6E4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5);
void func_800BD888(Actor*, struct_800BD888_arg1*, s16, s16); // This function is very similar to OoT's func_80034A14
// void func_800BD9A0(void);
// void func_800BD9E0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE2 param_6);
// void func_800BDAA0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE2 param_6);
// void func_800BDB6C(void);
void func_800BDC5C(SkelAnime* skelAnime, ActorAnimationEntry animation[], s32 index);
// void func_800BDCF4(void);
void Actor_DrawDoorLock(GlobalContext* globalCtx, s32 frame, s32 type);
void Actor_SetColorFilter(Actor* actor, u16 colorFlag, u16 colorIntensityMax, u16 xluFlag, u16 duration);
Hilite* func_800BCBF4(Vec3f* arg0, GlobalContext* globalCtx);
Hilite* func_800BCC68(Vec3f* arg0, GlobalContext* globalCtx);
void func_800BCCDC(Vec3s* points, s32 pathCount, Vec3f* pos1, Vec3f* pos2, s32 parm5);
s32 func_800BD2B4(GlobalContext* globalCtx, Actor* actor, s16* arg2, f32 arg3, u16 (*textIdCallback)(GlobalContext*, Actor*), s16 (*arg5)(GlobalContext*, Actor*));
void func_800BD888(Actor* actor, struct_800BD888_arg1* arg1, s16 arg2, s16 arg3);
void func_800BD9E0(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
void func_800BDAA0(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
void Actor_ChangeAnimation(SkelAnime* skelAnime, ActorAnimationEntry* animation, s32 index);
void Actor_Noop(Actor* actor, GlobalContext* globalCtx);
void func_800BDFC0(GlobalContext* globalCtx, Gfx* dl);
void func_800BE03C(GlobalContext* globalCtx, Gfx* dl);
Actor* func_800BE0B8(GlobalContext* globalCtx, Actor* inActor, s16 arg2, u8 arg3, f32 arg4);
s32 func_800BE184(GlobalContext* globalCtx, Actor* actor, f32 arg2, s32 arg3, s32 arg4, s32 arg5);
u8 Actor_ApplyDamage(Actor* actor); // returns current health
void func_800BE258(Actor* actor, UNK_PTR arg1);
void func_800BE2B8(Actor* actor, ColliderJntSph* jntSphere);
void Gfx_DrawDListOpa(GlobalContext* globalCtx, Gfx* dlist);
void Gfx_DrawDListXlu(GlobalContext* globalCtx, Gfx* dlist);
Actor* Actor_FindNearby(GlobalContext* globalCtx, Actor* inActor, s16 actorId, u8 actorCategory, f32 distance);
s32 func_800BE184(GlobalContext* globalCtx, Actor* actor, f32 xzDist, s16 arg3, s16 arg4, s16 arg5);
u8 Actor_ApplyDamage(Actor* actor);
void Actor_SetDropFlag(Actor* actor, ColliderInfo* colInfo);
void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSphere);
void func_800BE33C(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, s32 arg3);
void func_800BE3D0(Actor* actor, s16 angle, Vec3s* arg2);
void func_800BE504(Actor* actor, ColliderCylinder* collider);
void func_800BE568(Actor* actor, ColliderSphere* collider);
void func_800BE5CC(Actor* actor, ColliderJntSph* collider, s32 arg2);
// void func_800BE63C(void);
void func_800BE680(GlobalContext* globalCtx, Actor* actor, Vec3f limbPos[], s16 arg3, f32 arg4, f32 arg5, f32 arg6, u8 mode);
void func_800BF7CC(GlobalContext* globalCtx, Actor* actor, Vec3f limbPos[], s32 arg3, s32 arg4, f32 arg5, f32 arg6);
void ActorOverlayTable_FaultPrint(void* arg0, void* arg1); // ActorOverlayTable_FaultPrint
void* ActorOverlayTable_FaultAddrConv(void* arg0, void* arg1); // ActorOverlayTable_FaultAddrConv
void ActorOverlayTable_Init(void); // ActorOverlayTable_Init
void ActorOverlayTable_Cleanup(void); // ActorOverlayTable_Cleanup
void func_800BE5CC(Actor* actor, ColliderJntSph* collider, s32 colliderIndex);
s32 func_800BE63C(struct EnBox* chest);
void func_800BE680(GlobalContext* globalCtx, Actor* actor, Vec3f limbPos[], s16 arg3, f32 effectScale, f32 steamScale, f32 effectAlpha, u8 mode);
void Actor_SpawnIceEffects(GlobalContext* globalCtx, Actor* actor, Vec3f limbPos[], s32 limbPosCount, s32 effectsPerLimb, f32 scale, f32 scaleRange);
void ActorOverlayTable_FaultPrint(void* arg0, void* arg1);
void* ActorOverlayTable_FaultAddrConv(void* arg0, void* arg1);
void ActorOverlayTable_Init(void);
void ActorOverlayTable_Cleanup(void);
void SSNode_SetValue(SSNode* node, s16* polyIndex, u16 next);
void SSList_SetNull(SSList* head);
void SSNodeList_SetSSListHead(SSNodeList* list, SSList* ssList, s16* polyIndex);
@@ -1227,7 +1158,7 @@ void func_800DE0EC(Camera* camera, Actor* actor);
Vec3s* Camera_Update(Vec3s* param_1, Camera* camera);
// void func_800DF498(void);
u32 Camera_SetMode(Camera* camera, s16 mode, s8 param_3);
// void func_800DF840(void);
s32 Camera_ChangeMode(Camera* camera, s16 mode);
// void func_800DF86C(void);
// void func_800DF8EC(void);
s32 func_800DFAC8(Camera* camera, s16 param_2);
@@ -1255,7 +1186,7 @@ s16 Camera_ClearFlags(Camera* camera, s16 flags);
// void func_800E0238(void);
void func_800E02AC(Camera* camera, Actor* actor);
void func_800E0308(Camera* camera, Actor* actor);
// void func_800E031C(void);
f32 func_800E031C(Camera* camera);
void func_800E0348(Camera* camera);
DamageTable* DamageTable_Get(s32 index);
void DamageTable_Clear(DamageTable* damageTable);
@@ -1533,8 +1464,8 @@ void func_800EDF24(Actor* actor, GlobalContext* globalCtx, u32 arg2);
void func_800EDF78(Actor* actor, GlobalContext* globalCtx, s32 iParm3);
void func_800EE0CC(Actor* actor, GlobalContext* globalCtx, s32 iParm3);
s32 func_800EE1D8(GlobalContext* globalCtx);
u32 func_800EE200(GlobalContext* globalCtx, u32 uParm2);
u32 func_800EE29C(GlobalContext* globalCtx, u32 uParm2);
u32 func_800EE200(GlobalContext* globalCtx, u16 uParm2);
u32 func_800EE29C(GlobalContext* globalCtx, u16 uParm2);
u32 func_800EE2F4(GlobalContext* globalCtx);
void GetItem_Draw(GlobalContext* globalCtx, s16 index);
void func_800EE364(GlobalContext* globalCtx, s16 index);
@@ -1618,14 +1549,11 @@ void ActorCutscene_SetReturnCamera(s16 index);
// void func_800F23E0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
f32 func_800F2478(f32 target, TransformData* transData, s32 refIdx);
void SkelCurve_Clear(SkelAnimeCurve* skelCurve);
s32 SkelCurve_Init(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, SkelCurveLimbList* limbListSeg,
TransformUpdateIndex* transUpdIdx);
s32 SkelCurve_Init(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, SkelCurveLimbList* limbListSeg, TransformUpdateIndex* transUpdIdx);
void SkelCurve_Destroy(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve);
void SkelCurve_SetAnim(SkelAnimeCurve* skelCurve, TransformUpdateIndex* transUpdIdx, f32 arg2, f32 animFinalFrame,
f32 animCurFrame, f32 animSpeed);
void SkelCurve_SetAnim(SkelAnimeCurve* skelCurve, TransformUpdateIndex* transUpdIdx, f32 arg2, f32 animFinalFrame, f32 animCurFrame, f32 animSpeed);
s32 SkelCurve_Update(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve);
void SkelCurve_Draw(Actor* actor, GlobalContext* globalCtx, SkelAnimeCurve* skelCurve,
OverrideCurveLimbDraw overrideLimbDraw, PostCurveLimbDraw postLimbDraw, s32 lod, Actor* thisx);
void SkelCurve_Draw(Actor* actor, GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, OverrideCurveLimbDraw overrideLimbDraw, PostCurveLimbDraw postLimbDraw, s32 lod, Actor* thisx);
void FireObj_SetPosition(FireObj* fire, Vec3f* pos);
void FireObj_Draw(GlobalContext* globalCtx, FireObj* fire);
void FireObj_Init(GlobalContext* globalCtx, FireObj* fire, FireObjInitParams* init, Actor* actor);
@@ -1639,7 +1567,7 @@ void FireObj_Update(GlobalContext* globalCtx, FireObj* fire, Actor* actor);
// void func_800F3B68(void);
// void func_800F3C44(void);
// void func_800F3ED4(void);
void func_800F40A0(GlobalContext* globalCtx, s32 param_2);
void func_800F40A0(GameState* gameState, Player* player);
// void func_800F415C(void);
UNK_TYPE func_800F41E4(GlobalContext* globalCtx, ActorContext* actorCtx);
@@ -1658,7 +1586,7 @@ u32 func_800F5954(u8* param_1, u32 param_2, u32 param_3, u8 param_4, u8 param_5)
f32 func_800F5A8C(u16 arg0, u16 arg1, u16 arg2, GlobalContext* globalContext);
// void func_800F5B10(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5);
// void func_800F5CD0(void);
// void func_800F6834(void);
void func_800F6834(GlobalContext* globalCtx, s32 waterLightsIndex);
// void func_800F694C(void);
// void func_800F6A04(void);
// void func_800F6A40(void);
@@ -2136,7 +2064,7 @@ void func_80122F28(Player* player, GlobalContext* globalCtx, Actor* actor);
void func_8012301C(s32 iParm1, GlobalContext* globalCtx);
void func_80123140(GlobalContext* globalCtx, Player* param_2);
u32 func_80123358(GlobalContext* globalCtx, Player* player);
u32 func_801233E4(GlobalContext* globalCtx);
s32 Player_InCsMode(GameState* gameState);
// void func_80123420(void);
// void func_80123434(void);
// void func_80123448(void);
@@ -2160,7 +2088,7 @@ void func_80123F2C(GlobalContext* globalCtx, s32 arg1);
// void func_80124020(void);
u8 Player_GetMask(GlobalContext* globalCtx);
void Player_RemoveMask(GlobalContext* globalCtx);
// void func_8012405C(void);
s32 func_8012405C(GlobalContext* globalCtx);
// void func_80124088(void);
s32 func_801240C8(Player* player);
// void func_801240DC(void);
@@ -2172,7 +2100,7 @@ s32 func_801240C8(Player* player);
// void func_801241E0(void);
// void func_8012420C(void);
// void func_8012422C(void);
// void func_80124258(void);
s32 Player_GetExplosiveHeld(Player* player);
// void func_80124278(void);
s32 func_801242B4(Player* player);
// void func_801242DC(void);
@@ -2465,35 +2393,20 @@ UNK_TYPE func_80133038(GlobalContext* globalCtx, UNK_TYPE* arg1, struct_80133038
void SkelAnime_DrawLimbLod(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor, s32 lod);
void SkelAnime_DrawLod(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor, s32 lod);
void SkelAnime_DrawFlexLimbLod(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable, OverrideLimbDrawFlex overrideLimbDraw, PostLimbDrawFlex postLimbDraw, Actor* actor, s32 lod, Mtx** mtx);
void SkelAnime_DrawFlexLod(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDrawFlex overrideLimbDraw, PostLimbDrawFlex postLimbDraw, Actor* actor,
s32 lod);
void SkelAnime_DrawLimbOpa(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor);
void SkelAnime_DrawOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor);
void SkelAnime_DrawFlexLimbOpa(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor,
Mtx** limbMatricies);
void SkelAnime_DrawFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor);
void func_80134148(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDrawOpa unkDraw, Actor* actor,
Mtx** mtx);
void func_801343C0(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDrawOpa unkDraw, Actor* actor);
void SkelAnime_DrawFlexLod(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, OverrideLimbDrawFlex overrideLimbDraw, PostLimbDrawFlex postLimbDraw, Actor* actor, s32 lod);
void SkelAnime_DrawLimbOpa(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor);
void SkelAnime_DrawOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor);
void SkelAnime_DrawFlexLimbOpa(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor, Mtx** limbMatricies);
void SkelAnime_DrawFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor);
void func_80134148(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDrawOpa unkDraw, Actor* actor, Mtx** mtx);
void func_801343C0(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDrawOpa unkDraw, Actor* actor);
void SkelAnime_GetFrameData(AnimationHeader* animationSeg, s32 currentFrame, s32 limbCount, Vec3s* dst);
s16 Animation_GetLength(void* animation);
s16 Animation_GetLastFrame(void* animation);
Gfx* SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable,
OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, Gfx* gfx);
Gfx* SkelAnime_Draw(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable,
OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, Gfx* gfx);
Gfx* SkelAnime_DrawFlexLimb(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable,
OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor,
Mtx** mtx, Gfx* gfx);
Gfx* SkelAnime_DrawFlex(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, Gfx* gfx);
Gfx* SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, Gfx* gfx);
Gfx* SkelAnime_Draw(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, Gfx* gfx);
Gfx* SkelAnime_DrawFlexLimb(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, Mtx** mtx, Gfx* gfx);
Gfx* SkelAnime_DrawFlex(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, Gfx* gfx);
s16 SkelAnime_GetFrameDataLegacy(LegacyAnimationHeader* animation, s32 frame, Vec3s* frameTable);
s16 Animation_GetLimbCount2(LegacyAnimationHeader* animation);
s16 Animation_GetLength2(LegacyAnimationHeader* animation);
@@ -2503,8 +2416,7 @@ void AnimationContext_Reset(AnimationContext* animationCtx);
void AnimationContext_SetNextQueue(GlobalContext* globalCtx);
void AnimationContext_DisableQueue(GlobalContext* globalCtx);
AnimationEntry* AnimationContext_AddEntry(AnimationContext* animationCtx, AnimationType type);
void AnimationContext_SetLoadFrame(GlobalContext* globalCtx, LinkAnimationHeader* animation, s32 frame,
s32 limbCount, Vec3s* frameTable);
void AnimationContext_SetLoadFrame(GlobalContext* globalCtx, LinkAnimationHeader* animation, s32 frame, s32 limbCount, Vec3s* frameTable);
void AnimationContext_SetCopyAll(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src);
void AnimationContext_SetInterp(GlobalContext* globalCtx, s32 limbCount, Vec3s* arg2, Vec3s* arg3, f32 arg4);
void AnimationContext_SetCopyTrue(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* index);
@@ -2517,9 +2429,7 @@ void AnimationContext_CopyTrue(GlobalContext* globalCtx, AnimationEntryData* dat
void AnimationContext_CopyFalse(GlobalContext* globalCtx, AnimationEntryData* data);
void AnimationContext_MoveActor(GlobalContext* globalCtx, AnimationEntryData* data);
void AnimationContext_Update(GlobalContext* globalCtx, AnimationContext* animationCtx);
void SkelAnime_InitLink(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
LinkAnimationHeader* animation, s32 flags, Vec3s* jointTable,
Vec3s* morphTable, s32 limbBufCount);
void SkelAnime_InitLink(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg, LinkAnimationHeader* animation, s32 flags, Vec3s* jointTable, Vec3s* morphTable, s32 limbBufCount);
void LinkAnimation_SetUpdateFunction(SkelAnime* skelAnime);
s32 LinkAnimation_Update(GlobalContext* globalCtx, SkelAnime* skelAnime);
s32 LinkAnimation_Morph(GlobalContext* globalCtx, SkelAnime* skelAnime);
@@ -2543,8 +2453,7 @@ void LinkAnimation_EndLoop(SkelAnime* skelAnime);
s32 Animation_OnFrameImpl(SkelAnime* skelAnime, f32 arg1, f32 updateRate);
s32 LinkAnimation_OnFrame(SkelAnime* skelAnime, f32 arg1);
void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, AnimationHeader* animationSeg, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
void SkelAnime_InitFlex(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
void SkelAnime_InitFlex(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg, AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, AnimationHeader* animationSeg);
void SkelAnime_SetUpdate(SkelAnime* skelAnime);
s32 SkelAnime_Update(SkelAnime* skelAnime);
@@ -2617,7 +2526,7 @@ void func_8013A46C(s32 flag);
u32 func_8013A4C4(s32 flag);
s16 func_8013A504(s16 val);
s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos, Vec3s* rot, f32 distanceMin, f32 distanceMax, s16 angleError);
Actor* func_8013A7C0(GlobalContext* globalCtx, s32 arg1);
struct EnDoor* SubS_FindDoor(GlobalContext* globalCtx, s32 unk_1A5);
Gfx* func_8013A860(GlobalContext* globalCtx, s32 idx, void** skeleton, Vec3s* jointTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, UnkActorDraw unkActorDraw, Actor* actor, Mtx** mtx, Gfx* gfx);
Gfx* func_8013AB00(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, UnkActorDraw unkActorDraw, Actor* actor, Gfx* gfx);
s32 func_8013AD6C(GlobalContext* globalCtx);
@@ -2630,7 +2539,7 @@ void func_8013B350(Vec3f* arg0, f32* arg1, f32 arg2, s32 arg3, s32 arg4, Vec3s*
s32 func_8013B6B0(Path* path, f32* arg1, s32* arg2, s32 arg3, s32 arg4, s32* arg5, f32* arg6, Vec3f* arg7, s32 arg8);
void func_8013B878(GlobalContext* globalCtx, Path* path, s32 arg2, Vec3f* arg3);
Path* func_8013BB34(GlobalContext* globalCtx, u8 arg1, s32 arg2);
Actor* func_8013BB7C(Actor* actor, GlobalContext* globalCtx, u8 actorCategory, s16 actorId);
Actor* SubS_FindNearestActor(Actor* actor, GlobalContext* globalCtx, u8 actorCategory, s16 actorId);
s32 func_8013BC6C(SkelAnime* skelAnime, ActorAnimationEntryS* arg1, s32 arg2);
s32 func_8013BD40(Actor* actor, Path* path, s32 arg2);
Path* func_8013BEDC(GlobalContext* globalCtx, u8 arg1, u8 arg2, s32* arg3);
@@ -2651,7 +2560,7 @@ s32 func_8013D768(Actor* actor, Vec3f* arg1, s16 arg2);
s16 func_8013D83C(Path* path, s32 pointIdx, Vec3f* pos, f32* distSq);
s8 func_8013D8DC(s8 arg0, GlobalContext* globalCtx);
s8 func_8013D924(s16 arg0, GlobalContext* globalCtx);
Actor* func_ActorCategoryIterateById(GlobalContext* globalCtx, Actor* actorListStart, u8 actorCategory, s16 actorId);
Actor* SubS_FindActor(GlobalContext* globalCtx, Actor* actorListStart, u8 actorCategory, s16 actorId);
s32 func_8013D9C8(GlobalContext* globalCtx, s16* arg1, s16* arg2, s32 arg3);
s32 func_8013DB90(GlobalContext* globalCtx, Vec3f* arg1, f32 arg2);
s32 func_8013DC40(Path* arg0, s32 arg1, s32 arg2, Vec3f* arg3);
@@ -2666,17 +2575,17 @@ s32 func_8013E2D4(Actor* actor, s16 arg1, s16 arg2, s32 arg3);
s32 func_8013E3B8(Actor* actor, s16 cutscenes[], s16 len);
void func_8013E4B0(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, Plane* plane);
s32 func_8013E5CC(Vec3f* arg0, Vec3s* arg1, Vec3f* arg2, Vec3f* arg3, Vec3f* arg4, Vec3f* arg5);
Actor* func_8013E640(GlobalContext* globalCtx, Actor* arg1, Actor* actorListStart, u8 actorCategory, s16 actorId, void* arg5, func_8013E640_arg6 arg6);
Actor* SubS_FindActorCustom(GlobalContext* globalCtx, Actor* actor, Actor* actorListStart, u8 actorCategory, s16 actorId, void* verifyData, VerifyActor verifyActor);
s32 func_8013E748(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, s32 arg4, Vec3s* arg5, func_8013E748_arg6 arg6);
s32 func_8013E7C0(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2);
void func_8013E8F8(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, s32 arg4, s16 arg5, s16 arg6);
s32 func_8013E950(Vec3f* arg0, Vec3f* arg1, s16 arg2, Vec3f* arg3, Vec3f* arg4, s16* arg5, s16* arg6, s16* arg7, s16* arg8, u16 arg9, u16 arg10, u16 arg11, u16 arg12);
// void func_8013EC10(void);
void func_8013EC44(f32 arg0, u8 arg1, u8 arg2, u8 arg3);
void func_8013EC44(f32 a, u8 b, u8 c, u8 d);
void func_8013ECE0(f32 xyzDistToPlayerSq, u8 arg1, u8 arg2, u8 arg3);
void func_8013ED9C(void);
void func_8013EDD0(void);
// void func_8013EE04(void);
u32 func_8013EE04(void);
void func_8013EE24(void);
// void func_8013EE38(void);
// void func_8013EE48(void);
@@ -2739,8 +2648,7 @@ void VisMono_Draw(void* arg0, Gfx** gfx, u32 arg2);
void func_801420C0(void* arg0);
void func_801420F4(void* arg0);
void func_80142100(void* arg0, Gfx** gfx, u32 arg2);
s32 func_80142440(SkyboxContext* skyboxCtx, Vtx* vtx, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7,
s32 arg8);
s32 func_80142440(SkyboxContext* skyboxCtx, Vtx* vtx, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8);
void func_80143148(SkyboxContext* skyboxCtx, s32 arg1);
void func_801431E8(GameState* gameState, SkyboxContext* skyboxCtx, s16 skyType);
void func_80143324(GlobalContext* globalCtx, SkyboxContext* skyboxCtx, s16 skyType);
@@ -2822,7 +2730,7 @@ void func_80151BB4(GlobalContext* globalCtx, u32 uParm2);
// void func_80151DA4(void);
void func_80152434(GlobalContext* globalCtx, u16 arg2);
// void func_80152464(void);
u8 func_80152498(MessageContext* msgCtx);
u8 Message_GetState(MessageContext* msgCtx);
// void func_8015268C(void);
// void func_80152C64(void);
// void func_80152CAC(void);
@@ -2924,7 +2832,7 @@ void* TransitionFade_Init(void* param_1);
// void TransitionCircle_Update(void);
// void TransitionCircle_SetColor(void);
// void TransitionCircle_SetType(void);
// void func_80164C14(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
void func_80164C14(Gfx** arg0, TexturePtr* arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, f32 arg6);
// void TransitionCircle_Draw(void);
// void TransitionCircle_IsDone(void);
// void func_801651B0(void);
@@ -2960,7 +2868,7 @@ void Play_Draw(GlobalContext* globalCtx);
void func_80168DAC(GlobalContext* globalCtx);
void Play_Update(GlobalContext* globalCtx);
s32 func_801690CC(GlobalContext* globalCtx);
// void func_80169100(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
f32 func_80169100(GlobalContext* globalCtx, MtxF* mtx, CollisionPoly** arg2, s32* arg3, Vec3f* feetPosPtr);
// void func_801691F0(void);
void* Play_LoadScene(GlobalContext* globalCtx, RomFile* entry);
void func_8016927C(GlobalContext* globalCtx, s16 sParm2);
@@ -2983,7 +2891,7 @@ void func_801699D4(GlobalContext* globalCtx, s16 arg1, s16 arg2);
void func_80169AFC(GlobalContext* globalCtx, s16 camId, s16 arg2);
// void func_80169C64(void);
// void func_80169C84(void);
// void convert_scene_number_among_shared_scenes(void);
s16 convert_scene_number_among_shared_scenes(s16 arg0);
void func_80169D40(GlobalContext* globalCtx);
void func_80169DCC(GlobalContext* globalCtx, s32 arg1, u16 arg2, s32 arg3, s32 arg4, Vec3f* arg5, s16 arg6);
void func_80169E6C(GlobalContext* globalCtx, s32 param_1, s32 param_2);
@@ -3038,8 +2946,7 @@ void PreRender_ApplyFiltersSlowlyInit(PreRender* this);
void PreRender_ApplyFiltersSlowlyDestroy(PreRender* this);
void func_801720C4(PreRender* this);
void func_801720FC(PreRenderParams* params, Gfx** gfxp);
void func_80172758(Gfx** gfxp, void* timg, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 tt, u16 arg8, f32 x,
f32 y, f32 xScale, f32 yScale, u32 flags);
void func_80172758(Gfx** gfxp, void* timg, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 tt, u16 arg8, f32 x, f32 y, f32 xScale, f32 yScale, u32 flags);
void THGA_Ct(TwoHeadGfxArena* thga, Gfx* start, size_t size);
void THGA_Dt(TwoHeadGfxArena* thga);
u32 THGA_IsCrash(TwoHeadGfxArena* thga);
@@ -3283,7 +3190,7 @@ s32 Math3D_TriChkLineSegParaZIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx,
// void func_8017D404(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
void Math3D_TriSetCoords(TriNorm* tri, Vec3f* pointA, Vec3f* pointB, Vec3f* pointC);
u32 Math3D_IsPointInSphere(Sphere16* sphere, Vec3f* point);
// void func_8017D668(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9);
s32 Math3D_PointDistToLine2D(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32* arg6, f32* arg7, f32* arg8); // returns boolean
// void func_8017D7C0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8017D814(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_8017D91C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
@@ -3786,8 +3693,8 @@ void func_8019F170(Vec3f* pos, u16 sfxId);
void func_8019F1C0(Vec3f* pos, u16 sfxId);
void play_sound(u16 sfxId);
void func_8019F128(u16 sfxId);
void func_8019F208(void); // decide
void func_8019F230(void); // cancel
void func_8019F208(void); // Decide sound
void func_8019F230(void); // Cancel sound
// void func_8019F258(void);
// void func_8019F300(void);
void func_8019F420(Vec3f* pos, u16 sfxId);
@@ -3802,7 +3709,7 @@ void func_8019F570(Vec3f* pos, s8 arg1);
void func_8019F88C(Vec3f* arg0, u16 sfxId, UNK_TYPE arg2);
// void func_8019F900(void);
// void func_8019FA18(void);
void func_8019FAD8(Vec3f* param_1, u16 param_2, f32 param_3);
void func_8019FAD8(Vec3f* param_1, u16 sfxId, f32 param_3);
// void func_8019FB0C(void);
// void func_8019FC20(void);
// void func_8019FCB8(void);
@@ -3826,7 +3733,7 @@ void func_801A0204(s8 seqId);
// void func_801A0554(void);
// void func_801A05F0(void);
void func_801A0654(Vec3f* arg0, u16 sfxId, s32 arg2);
// void func_801A0810(void);
void func_801A0810(s32* arg0, u16 sfxId, u8 arg2);
// void func_801A0868(void);
// void func_801A09D4(void);
// void func_801A0CB0(void);
@@ -3844,7 +3751,7 @@ void func_801A1DB8(Vec3f* vec, u8 seqId, f32 arg2);
// void func_801A1E0C(void);
void func_801A1F00(u8 arg0, u16 seqId);
void func_801A1F88(void);
// void func_801A1FB4(void);
void func_801A1FB4(u8 playerIdx, Vec3f* pos, u16 seqId, f32 maxDist);
// void func_801A2090(void);
void func_801A246C(u8 param_1, u8 param_2);
// void func_801A2544(void);
@@ -3936,7 +3843,7 @@ UNK_TYPE func_801A51F0(UNK_TYPE arg0);
void func_801A5BD0(s32 param_1);
// void func_801A5C28(void);
// void func_801A5C8C(void);
void func_801A5CFC(u16 sfxId, Vec3f* param_2, u8 param_3, f32* param_4, f32* param_5, s8* param_6);
void Audio_PlaySfxGeneral(u16 sfxId, Vec3f* param_2, u8 param_3, f32* param_4, f32* param_5, s8* param_6);
// void func_801A5DDC(void);
// void func_801A5F7C(void);
// void func_801A6430(void);
+33
View File
@@ -1,6 +1,39 @@
#ifndef _INITVARS_H_
#define _INITVARS_H_
extern EffectSsInit Effect_Ss_Dust_InitVars;
extern EffectSsInit Effect_Ss_Kirakira_InitVars;
extern EffectSsInit Effect_Ss_Bomb2_InitVars;
extern EffectSsInit Effect_Ss_Blast_InitVars;
extern EffectSsInit Effect_Ss_G_Spk_InitVars;
extern EffectSsInit Effect_Ss_D_Fire_InitVars;
extern EffectSsInit Effect_Ss_Bubble_InitVars;
extern EffectSsInit Effect_Ss_G_Ripple_InitVars;
extern EffectSsInit Effect_Ss_G_Splash_InitVars;
extern EffectSsInit Effect_Ss_G_Fire_InitVars;
extern EffectSsInit Effect_Ss_Lightning_InitVars;
extern EffectSsInit Effect_Ss_Dt_Bubble_InitVars;
extern EffectSsInit Effect_Ss_Hahen_InitVars;
extern EffectSsInit Effect_Ss_Stick_InitVars;
extern EffectSsInit Effect_Ss_Sibuki_InitVars;
extern EffectSsInit Effect_Ss_Stone1_InitVars;
extern EffectSsInit Effect_Ss_Hitmark_InitVars;
extern EffectSsInit Effect_Ss_Fhg_Flash_InitVars;
extern EffectSsInit Effect_Ss_K_Fire_InitVars;
extern EffectSsInit Effect_Ss_Solder_Srch_Ball_InitVars;
extern EffectSsInit Effect_Ss_Kakera_InitVars;
extern EffectSsInit Effect_Ss_Ice_Piece_InitVars;
extern EffectSsInit Effect_Ss_En_Ice_InitVars;
extern EffectSsInit Effect_Ss_Fire_Tail_InitVars;
extern EffectSsInit Effect_Ss_En_Fire_InitVars;
extern EffectSsInit Effect_Ss_Extra_InitVars;
extern EffectSsInit Effect_Ss_Dead_Db_InitVars;
extern EffectSsInit Effect_Ss_Dead_Dd_InitVars;
extern EffectSsInit Effect_Ss_Dead_Ds_InitVars;
extern EffectSsInit Effect_Ss_Ice_Smoke_InitVars;
extern EffectSsInit Effect_En_Ice_Block_InitVars;
extern EffectSsInit Effect_Ss_Sbn_InitVars;
extern ActorInit Arms_Hook_InitVars;
extern ActorInit Arrow_Fire_InitVars;
extern ActorInit Arrow_Ice_InitVars;
+9 -2
View File
@@ -99,8 +99,8 @@
typedef struct {
/* 0x00 */ u32 ramarray[15];
/* 0x3C */ u32 pifstatus;
} OSPifRam;
/* 0x3C */ u32 status;
} OSPifRam; // size = 0x40
typedef struct {
@@ -153,4 +153,11 @@ extern u8 __osMaxControllers;
// extern OSMesgQueue D_8009CF38;
// extern OSMesg D_8009CF50;
typedef struct {
/* 0x00 */ OSContPad cur;
/* 0x06 */ OSContPad prev;
/* 0x0C */ OSContPad press; // X/Y store delta from last frame
/* 0x12 */ OSContPad rel; // X/Y store adjusted
} Input; // size = 0x18
#endif
+7 -2
View File
@@ -39,9 +39,9 @@
} \
(void)0
#define GET_PLAYER(globalCtx) ((Player*)(globalCtx)->actorCtx.actorList[ACTORCAT_PLAYER].first)
#define GET_PLAYER(globalCtx) ((Player*)(globalCtx)->actorCtx.actorLists[ACTORCAT_PLAYER].first)
#define GET_FIRST_ENEMY(globalCtx) ((Actor*)(globalCtx)->actorCtx.actorList[ACTORCAT_ENEMY].first)
#define GET_FIRST_ENEMY(globalCtx) ((Actor*)(globalCtx)->actorCtx.actorLists[ACTORCAT_ENEMY].first)
// linkAge still exists in MM, but is always set to 0 (always adult)
// There are remnants of these macros from OOT, but they are essentially useless
@@ -86,6 +86,8 @@
#define CHECK_BTN_ALL(state, combo) (~((state) | ~(combo)) == 0)
#define CHECK_BTN_ANY(state, combo) (((state) & (combo)) != 0)
#define CHECK_FLAG_ALL(flags, mask) (((flags) & (mask)) == (mask))
extern GraphicsContext* __gfxCtx;
#define WORK_DISP __gfxCtx->work.p
@@ -147,6 +149,9 @@ extern GraphicsContext* __gfxCtx;
(b) = _temp; \
}
#define OVERLAY_RELOCATION_OFFSET(overlayEntry) ((uintptr_t)((overlayEntry)->vramStart) - (uintptr_t)((overlayEntry)->loadedRamAddr))
#define VRAM_PTR_SIZE(entry) ((uintptr_t)((entry)->vramEnd) - (uintptr_t)((entry)->vramStart))
#ifdef __GNUC__
#define ALIGNED8 __attribute__ ((aligned (8)))
#else
+2
View File
@@ -53,6 +53,8 @@
#define SP_DMEM_START 0x04000000
#define SP_DMEM_SIZE 0x1000
#define TMEM_SIZE 0x1000
#define SP_MEM_ADDR_REG 0x04040000
#define SP_DRAM_ADDR_REG 0x04040004
#define SP_RD_LEN_REG 0x04040008
+23 -41
View File
@@ -374,7 +374,6 @@ extern u8 D_801AE214[32];
// extern UNK_TYPE4 D_801AE240;
// extern UNK_TYPE4 D_801AE250;
extern UNK_PTR D_801AE260[3];
// extern UNK_TYPE4 D_801AE26C;
// extern UNK_TYPE4 D_801AE27C;
// extern UNK_TYPE4 D_801AE28C;
// extern UNK_TYPE4 D_801AE29C;
@@ -382,7 +381,7 @@ extern UNK_PTR D_801AE260[3];
// extern UNK_TYPE4 D_801AE2BC;
// extern UNK_TYPE4 D_801AE2CC;
// extern UNK_TYPE4 D_801AE2DC;
extern EffectSsInfo EffectSS2Info;
// extern EffectSsInfo sEffectSsInfo;
// extern UNK_TYPE1 D_801AE3B0;
// extern UNK_TYPE1 D_801AE3B4;
// extern UNK_TYPE4 D_801AE3B8;
@@ -410,16 +409,13 @@ extern EffectSsInfo EffectSS2Info;
// extern UNK_TYPE1 D_801AE48A;
// extern UNK_TYPE1 D_801AE48C;
// extern UNK_TYPE1 D_801AE490;
extern EffectSsOverlay particleOverlayTable[39];
extern EffectSsOverlay gParticleOverlayTable[39];
// extern FlagSetEntry sFlagEntries[];
// extern s32 sEntryIndex;
// extern u32 sCurrentBit;
// extern s32 sTimer;
extern Color_RGBA8 D_801AEC80;
extern s801AEC84 D_801AEC84[13];
extern f32 actorMovementScale;
extern f32 D_801AECF0;
extern f32 D_801AECF4;
extern TargetRangeParams gTargetRanges[];
extern s16 D_801AED48[8];
// extern UNK_TYPE4 D_801AED58;
extern Color_RGBA8 actorDefaultHitColor;
@@ -2838,7 +2834,7 @@ extern f32 D_801DE860;
extern f32 D_801DE864;
extern f32 D_801DE868;
extern f32 D_801DE884;
// extern UNK_TYPE1 D_801DE890;
extern TexturePtr D_801DE890[];
extern f32 D_801DF090;
extern f32 D_801DF094;
extern f32 D_801DF0A0;
@@ -3102,15 +3098,15 @@ extern u64 gJpegUCodeData[];
// bss
// extern UNK_TYPE1 D_801ED890;
// extern UNK_TYPE1 D_801ED8A0;
// extern UNK_TYPE1 D_801ED8B0;
// extern UNK_TYPE1 D_801ED8B4;
// extern UNK_TYPE1 D_801ED894;
extern CollisionPoly* D_801ED8B0;
extern s32 D_801ED8B4;
// extern UNK_TYPE1 D_801ED8B8;
// extern UNK_TYPE1 D_801ED8BC;
// extern UNK_TYPE1 D_801ED8C0;
// extern UNK_TYPE1 D_801ED8C4;
extern f32 D_801ED8C8;
extern f32 D_801ED8CC;
extern f32 sBgmEnemyDistSq;
extern f32 D_801ED8D0;
// extern UNK_TYPE1 D_801ED8D4;
// extern UNK_TYPE1 D_801ED8D8;
@@ -3866,14 +3862,6 @@ extern UNK_TYPE D_0400E3D8;
extern UNK_TYPE D_0400E408;
extern UNK_TYPE D_0400E410;
extern UNK_TYPE D_0400E418;
extern CollisionHeader D_0400E710; // Pink Deku Flower collision
extern AnimationHeader D_0400EB7C; // Deku Flower intense flutter animation
extern Gfx D_0400ED80; // Pink Deku Flower display list
extern SkeletonHeader D_04011518; // Pink Deku Flower skeleton
extern AnimationHeader D_040117A8; // Deku Flower small flutter animation
extern CollisionHeader D_040118D8; // Gold Deku Flower collision
extern Gfx D_04011BD0; // Gold Deku Flower display list
extern SkeletonHeader D_040127E8; // Gold Deku Flower skeleton
extern UNK_TYPE D_04012860;
extern UNK_TYPE D_040128BC;
extern u64 D_04014570[];
@@ -3895,7 +3883,6 @@ extern Gfx D_04023210[];
extern UNK_TYPE D_04023288;
extern Gfx D_04023348[];
extern Gfx D_04023428[];
extern UNK_TYPE D_04025850;
extern UNK_TYPE D_04025DD0;
extern UNK_TYPE D_040281DC;
extern UNK_TYPE D_04028FEC;
@@ -3903,16 +3890,9 @@ extern AnimationHeader D_04029140;
extern Gfx D_04029CB0[];
extern Gfx D_04029CF0[];
extern UNK_TYPE D_04029D20;
extern AnimationHeader D_0402B494;
extern AnimatedMaterial D_0402C818;
extern AnimatedMaterial D_0402C890;
extern AnimatedMaterial D_0402C908;
extern AnimatedMaterial D_0402C980;
extern AnimatedMaterial D_0402C9F8;
extern FlexSkeletonHeader D_0402CA98;
extern Gfx D_0402E510[];
extern UNK_TYPE D_0402E65C;
extern UNK_TYPE D_0402F0EC;
extern AnimationHeader D_0402E65C;
extern AnimationHeader D_0402F0EC;
extern Gfx D_04030100[]; // Floor shockwave ring
extern Gfx D_040301B0[];
extern UNK_TYPE D_04032270;
@@ -3934,8 +3914,8 @@ extern UNK_TYPE D_0403F230;
extern UNK_TYPE D_04044300;
extern Gfx D_04048DF0[];
extern UNK_TYPE D_04050D10;
extern UNK_TYPE D_04051180;
extern UNK_TYPE D_04051238;
extern Gfx D_04051180[];
extern Gfx D_04051238[];
extern AnimationHeader D_0405140C;
extern Gfx D_040527F0[];
extern Gfx D_040528B0[];
@@ -3954,7 +3934,8 @@ extern TexturePtr D_0408EFE0[]; // gDust6Tex
extern TexturePtr D_0408F3E0[]; // gDust7Tex
extern TexturePtr D_0408F7E0[]; // gDust8Tex
extern UNK_TYPE D_04050550;
extern UNK_TYPE D_04050648;
extern Gfx D_04050648[];
extern Gfx D_040506E0[];
extern UNK_TYPE D_040510B0;
extern UNK_TYPE D_04054940;
extern Gfx D_0405AAB0[];
@@ -3980,17 +3961,14 @@ extern Gfx D_0406AB30[];
extern UNK_TYPE D_0406B730;
extern UNK_TYPE D_0406BB0C;
extern UNK_TYPE D_0406F380;
extern Gfx D_040706E0[];
extern UNK_TYPE D_04073F00;
extern UNK_TYPE D_04075400;
extern Gfx D_04075A40[];
extern Gfx D_04075B30[];
extern Gfx D_04076BC0[];
extern Gfx D_04077480[];
extern UNK_TYPE D_04079B10;
extern Gfx D_0407AB10[]; // sun (sparkles when small) displaylist
extern Gfx D_0407AB58[];
extern UNK_TYPE D_0407AFB0;
extern Gfx gGameplayKeepDrawFlameDL[];
extern UNK_TYPE D_0407D650;
extern UNK_TYPE D_0407F218;
extern UNK_TYPE D_040815D0;
@@ -3998,12 +3976,16 @@ extern UNK_TYPE D_04081628;
extern UNK_TYPE D_04083534;
extern UNK_TYPE D_04091BE0;
extern UNK_TYPE D_04091CE0;
extern TexturePtr D_04091DE0[];
extern TexturePtr D_04091FE0[];
extern TexturePtr D_040921E0[];
extern TexturePtr D_040923E0[];
extern Gfx D_05000C40[];
extern UNK_TYPE D_05001D20;
extern UNK_TYPE D_050061E8;
extern UNK_TYPE D_05006420;
extern UNK_TYPE D_050066B0;
extern Gfx D_050061E8[];
extern Gfx D_05006420[];
extern Gfx D_050066B0[];
extern UNK_TYPE D_05007498;
extern Gfx D_05007890[];
extern Gfx D_050078A0[];
@@ -4024,7 +4006,7 @@ extern UNK_TYPE D_0502324C;
// other segments
extern GfxMasterList D_0E000000;
extern Mtx D_01000000;
extern UNK_TYPE D_0F000000;
+34 -118
View File
@@ -334,26 +334,6 @@ typedef struct {
/* 0x24 */ s16 unk_24;
} SramContext; // size = 0x28
typedef struct {
/* 0x00 */ UNK_TYPE4 unk0;
/* 0x04 */ UNK_TYPE4 unk4;
/* 0x08 */ UNK_TYPE4 unk8;
/* 0x0C */ f32 unkC;
/* 0x10 */ Color_RGBA8 unk10;
} TargetContextEntry; // size = 0x14
typedef struct {
/* 0x0 */ u32 texture;
/* 0x4 */ s16 unk4;
/* 0x6 */ s16 unk6;
/* 0x8 */ u8 unk8;
/* 0x9 */ u8 unk9;
/* 0xA */ u8 fadeOutDelay;
/* 0xB */ u8 fadeInDelay;
/* 0xC */ s16 alpha;
/* 0xE */ s16 color;
} TitleCardContext; // size = 0x10
typedef struct {
/* 0x0 */ s32 topY;
/* 0x4 */ s32 bottomY;
@@ -392,15 +372,27 @@ typedef struct {
} s80185D40; // size = 0x2C
typedef struct {
/* 0x0 */ u8 unk0;
/* 0x1 */ u8 unk1;
/* 0x2 */ u8 unk2;
/* 0x3 */ u8 unk3;
/* 0x4 */ u8 unk4;
/* 0x5 */ u8 unk5;
/* 0x6 */ u8 unk6;
/* 0x7 */ u8 unk7;
} s801AEC84; // size = 0x8
/* 0x00 */ u32 unk0;
/* 0x04 */ u8 unk4;
/* 0x05 */ u8 unk5;
/* 0x06 */ u8 unk6;
/* 0x07 */ UNK_TYPE1 pad7[0x2];
/* 0x09 */ u8 unk9;
/* 0x0A */ UNK_TYPE1 padA[0x2];
/* 0x0C */ u32 unkC;
/* 0x10 */ u16 unk10;
/* 0x12 */ u16 unk12;
/* 0x14 */ u16 unk14;
/* 0x16 */ UNK_TYPE1 pad16[0x2];
/* 0x18 */ u32 unk18;
/* 0x1C */ u32 unk1C;
/* 0x20 */ u32 unk20;
/* 0x24 */ u32 unk24;
/* 0x28 */ u32 unk28;
/* 0x2C */ u32 unk2C;
/* 0x30 */ u32 unk30;
/* 0x34 */ u32 unk34;
} s8018CFAC; // size = 0x38
typedef struct {
/* 0x00 */ Vec3f unk0;
@@ -480,13 +472,6 @@ typedef struct {
/* 0x10 */ Vec3f relativePos;
} SoundSource; // size = 0x1C
typedef struct {
/* 0x00 */ OSContPad cur;
/* 0x06 */ OSContPad prev;
/* 0x0C */ OSContPad press; // X/Y store delta from last frame
/* 0x12 */ OSContPad rel; // X/Y store adjusted
} Input; // size = 0x18
typedef struct {
/* 0x000 */ u32 magic;
/* 0x004 */ GraphicsContext* gfxCtx;
@@ -743,7 +728,7 @@ typedef struct {
/* 0x22 */ u16 unk_22;
/* 0x24 */ u16 unk_24;
/* 0x26 */ u8 unk_26;
/* 0x28 */ LightInfo unk_28; // sun 1
/* 0x28 */ LightInfo dirLight1; // sun 1
/* 0x36 */ LightInfo unk_36; // sun 2
/* 0x44 */ s8 unk_44;
/* 0x48 */ DmaRequest unk_48;
@@ -877,7 +862,9 @@ typedef struct {
/* 0x1202A */ u16 unk1202A;
/* 0x1202C */ UNK_TYPE1 pad1202C[0x2];
/* 0x1202E */ u16 unk1202E;
/* 0x12030 */ UNK_TYPE1 pad12030[0x14];
/* 0x12030 */ s16 unk_12030;
/* 0x12032 */ UNK_TYPE1 unk_12032[0x2];
/* 0x12034 */ UNK_TYPE1 pad12034[0x10];
/* 0x12044 */ s16 unk12044;
/* 0x12046 */ UNK_TYPE1 pad12046[0x2];
/* 0x12048 */ u8 unk12048; // EnKakasi
@@ -1197,24 +1184,12 @@ typedef enum {
STACK_STATUS_OVERFLOW = 2
} StackStatus;
typedef struct TargetContext TargetContext;
typedef struct ActorContext ActorContext;
typedef struct s800B948C s800B948C;
struct FireObjLight {
/* 0x00 */ LightNode* light;
/* 0x04 */ LightInfoPositional lightInfo;
/* 0x12 */ u8 unk12;
}; // size = 0x13
typedef struct ActorListEntry {
/* 0x0 */ s32 length; // number of actors loaded of this type
/* 0x4 */ Actor* first; // pointer to first actor of this type
/* 0x8 */ UNK_TYPE1 pad8[0x4];
} ActorListEntry; // size = 0xC
#define OS_SC_RETRACE_MSG 1
#define OS_SC_DONE_MSG 2
#define OS_SC_NMI_MSG 3 // name is made up, 3 is OS_SC_RDP_DONE_MSG in the original sched.c
@@ -1271,72 +1246,6 @@ struct FireObj {
/* 0x78 */ FireObjLight light;
}; // size = 0x8B
struct TargetContext {
/* 0x00 */ Vec3f unk0;
/* 0x0C */ Vec3f unkC;
/* 0x18 */ Color_RGBAf unk18;
/* 0x28 */ Color_RGBAf unk28;
/* 0x38 */ Actor* unk38;
/* 0x3C */ Actor* unk3C;
/* 0x40 */ f32 unk40;
/* 0x44 */ f32 unk44;
/* 0x48 */ s16 unk48;
/* 0x4A */ u8 unk4A;
/* 0x4B */ u8 unk4B;
/* 0x4C */ s8 unk4C;
/* 0x4D */ UNK_TYPE1 pad4D[0x3];
/* 0x50 */ TargetContextEntry unk50[3];
/* 0x8C */ Actor* unk8C;
/* 0x90 */ Actor* unk90;
/* 0x94 */ Actor* unk_94;
}; // size = 0x98
struct s800B948C {
/* 0x00 */ GlobalContext* globalCtx;
/* 0x04 */ Actor* actor;
/* 0x08 */ u32 updateActorIfSet;
/* 0x0C */ u32 unkC;
/* 0x10 */ Actor* unk10;
/* 0x14 */ Player* player;
/* 0x18 */ u32 runMainIfSet; // Bitmask of actor flags. The actor will only have main called if it has at least 1 flag set that matches this bitmask
}; // size = 0x1C
struct ActorContext {
/* 0x000 */ UNK_TYPE1 pad0[0x2];
/* 0x002 */ u8 unk2;
/* 0x003 */ u8 unk3;
/* 0x004 */ s8 unk4;
/* 0x005 */ u8 unk5;
/* 0x006 */ UNK_TYPE1 pad6[0x5];
/* 0x00B */ s8 unkB;
/* 0x00C */ s16 unkC;
/* 0x00E */ u8 totalLoadedActors;
/* 0x00F */ u8 undrawnActorCount;
/* 0x010 */ ActorListEntry actorList[12];
/* 0x0A0 */ Actor* undrawnActors[32]; // Records the first 32 actors drawn each frame
/* 0x120 */ TargetContext targetContext;
/* 0x1B8 */ u32 switchFlags[4]; // First 0x40 are permanent, second 0x40 are temporary
/* 0x1C8 */ u32 chestFlags;
/* 0x1CC */ u32 clearedRooms;
/* 0x1D0 */ u32 clearedRoomsTemp;
/* 0x1D4 */ u32 collectibleFlags[4]; // bitfield of 128 bits
/* 0x1E4 */ TitleCardContext titleCtxt;
/* 0x1F4 */ u8 unk1F4;
/* 0x1F5 */ u8 unk1F5;
/* 0x1F6 */ UNK_TYPE1 pad1F6[0x2];
/* 0x1F8 */ f32 unk1F8;
/* 0x1FC */ Vec3f unk1FC;
/* 0x208 */ UNK_TYPE1 pad208[0x48];
/* 0x250 */ void* unk250; // allocation of 0x20f0 bytes?
/* 0x254 */ u32 unk254[5];
/* 0x268 */ u8 unk268;
/* 0x269 */ UNK_TYPE1 pad269[0x3];
/* 0x26C */ UNK_TYPE1 pad26C[0xC];
/* 0x278 */ u16 unk278;
/* 0x27A */ UNK_TYPE1 pad27A[0x2];
/* 0x27C */ UNK_TYPE1 pad27C[0x8];
}; // size = 0x284
typedef struct {
/* 0x00 */ u8 seqIndex;
/* 0x01 */ u8 nightSeqIndex;
@@ -1448,7 +1357,9 @@ struct GlobalContext {
/* 0x18B4C */ PreRender pauseBgPreRender;
/* 0x18B9C */ char unk_18B9C[0x2B8];
/* 0x18E54 */ SceneTableEntry* loadedScene;
/* 0x18E58 */ char unk_18E58[0x400];
/* 0x18E58 */ char unk_18E58[0x10];
/* 0x18E68 */ s32 unk_18E68;
/* 0x18E6C */ char unk_18E6C[0x3EC];
}; // size = 0x19258
typedef struct {
@@ -1504,7 +1415,7 @@ typedef struct {
typedef s32 (*func_8013E748_arg6)(struct GlobalContext*, Actor*, Vec3s*);
typedef s32 (*func_8013E640_arg6)(struct GlobalContext*, Actor*, Actor*, void*);
typedef s32 (*VerifyActor)(struct GlobalContext*, Actor*, Actor*, void*);
struct struct_8013DF3C_arg1;
typedef void (*struct_8013DF3C_arg1_unk_func1)(struct GlobalContext*, struct struct_8013DF3C_arg1*);
@@ -1577,6 +1488,11 @@ typedef struct DebugDispObject {
/* 0x2C */ s32 pad; //Padding not in the OOT version
} DebugDispObject; // size = 0x30
typedef struct {
/* 0x0 */ f32 rangeSq;
/* 0x4 */ f32 leashScale;
} TargetRangeParams; // size = 0x8
typedef struct {
/* 0x00 */ u8* value;
/* 0x04 */ const char* name;
+176 -8
View File
@@ -1,5 +1,5 @@
#ifndef _Z64ACTOR_H_
#define _Z64ACTOR_H_
#ifndef Z64ACTOR_H
#define Z64ACTOR_H
#include "PR/ultratypes.h"
#include "z64math.h"
@@ -7,6 +7,8 @@
#include "z64collision_check.h"
#include "unk.h"
// This value is hardcoded to be the size of ovl_Arrow_Fire which currently is the biggest actor that uses the AM_FIELD.
#define AM_FIELD_SIZE SEGMENT_SIZE(ovl_Arrow_Fire)
#define MASS_IMMOVABLE 0xFF // Cannot be pushed by OC collisions
#define MASS_HEAVY 0xFE // Can only be pushed by OC collisions with IMMOVABLE and HEAVY objects.
@@ -15,6 +17,9 @@ struct GlobalContext;
struct Lights;
struct CollisionPoly;
struct EnBox;
struct EnDoor;
typedef void(*ActorFunc)(struct Actor* this, struct GlobalContext* globalCtx);
typedef struct {
@@ -116,6 +121,8 @@ typedef struct {
/* 0x10 */ f32 shadowScale; // Changes the size of the shadow
/* 0x14 */ u8 shadowAlpha; // Default is 255
/* 0x15 */ u8 feetFloorFlags; // Set if the actor's foot is clipped under the floor. & 1 is right foot, & 2 is left
/* 0x16 */ u8 unk_16;
/* 0x17 */ u8 unk_17;
/* 0x18 */ Vec3f feetPos[2]; // Update by using `Actor_SetFeetPos` in PostLimbDrawOpa
} ActorShape; // size = 0x30
@@ -131,15 +138,15 @@ typedef struct Actor {
/* 0x020 */ s16 unk20;
/* 0x024 */ PosRot world; // Position/rotation in the world
/* 0x038 */ s8 cutscene;
/* 0x039 */ s8 unk39;
/* 0x039 */ u8 audioFlags; // Another set of flags? Seems related to sfx or bgm
/* 0x03C */ PosRot focus; // Target reticle focuses on this position. For player this represents head pos and rot
/* 0x050 */ u16 sfx; // SFX ID to play. Sound plays when value is set, then is cleared the following update cycle
/* 0x050 */ u16 sfxId; // Id of sound effect to play. Plays when value is set, then is cleared the following update cycle
/* 0x054 */ f32 targetArrowOffset; // Height offset of the target arrow relative to `focus` position
/* 0x058 */ Vec3f scale; // Scale of the actor in each axis
/* 0x064 */ Vec3f velocity; // Velocity of the actor in each axis
/* 0x070 */ f32 speedXZ; // How fast the actor is traveling along the XZ plane
/* 0x074 */ f32 gravity; // Acceleration due to gravity. Value is added to Y velocity every frame
/* 0x078 */ f32 minVelocityY; // Sets the lower bounds cap on velocity along the Y axis
/* 0x078 */ f32 terminalVelocity; // Sets the lower bounds cap on velocity along the Y axis
/* 0x07C */ struct CollisionPoly* wallPoly; // Wall polygon the actor is touching
/* 0x080 */ struct CollisionPoly* floorPoly; // Floor polygon directly below the actor
/* 0x084 */ u8 wallBgId; // Bg ID of the wall polygon the actor is touching
@@ -168,12 +175,12 @@ typedef struct Actor {
/* 0x11C */ u8 colorFilterTimer; // A non-zero value enables the color filter. Decrements automatically
/* 0x11D */ u8 isDrawn; // Set to true if the actor is currently being drawn. Always stays false for lens actors
/* 0x11E */ u8 dropFlag; // Configures what item is dropped by the actor from `Item_DropCollectibleRandom`
/* 0x11F */ u8 hintId; // Sets what 0600 dialog to display when talking to navi. Default 0xFF
/* 0x11F */ u8 hintId; // Sets what 0600 dialog to display when talking to Tatl. Default 0xFF
/* 0x120 */ struct Actor* parent; // Usage is actor specific. Set if actor is spawned via `Actor_SpawnAsChild`
/* 0x124 */ struct Actor* child; // Usage is actor specific. Set if actor is spawned via `Actor_SpawnAsChild`
/* 0x128 */ struct Actor* prev; // Previous actor of this category
/* 0x12C */ struct Actor* next; // Next actor of this category
/* 0x130 */ ActorFunc init; // Initialization Routine. Called by `Actor_Init` or `Actor_UpdateAll`
/* 0x130 */ ActorFunc init; // Initialization Routine. Called by `Actor_InitContext` or `Actor_UpdateAll`
/* 0x134 */ ActorFunc destroy; // Destruction Routine. Called by `Actor_Destroy`
/* 0x138 */ ActorFunc update; // Update Routine. Called by `Actor_UpdateAll`
/* 0x13C */ ActorFunc draw; // Draw Routine. Called by `Actor_Draw`
@@ -287,7 +294,8 @@ typedef enum {
/* 0x08 */ ACTORCAT_MISC,
/* 0x09 */ ACTORCAT_BOSS,
/* 0x0A */ ACTORCAT_DOOR,
/* 0x0B */ ACTORCAT_CHEST
/* 0x0B */ ACTORCAT_CHEST,
/* 0x0C */ ACTORCAT_MAX
} ActorType;
typedef struct {
@@ -308,6 +316,96 @@ typedef struct {
/* 0x0E */ s16 transitionRate;
} ActorAnimationEntryS; // size = 0x10
typedef struct {
/* 0x00 */ Vec3f pos;
/* 0x0C */ f32 unkC;
/* 0x10 */ Color_RGBA8 color;
} TargetContextEntry; // size = 0x14
typedef struct TargetContext {
/* 0x00 */ Vec3f unk0;
/* 0x0C */ Vec3f targetCenterPos;
/* 0x18 */ Color_RGBAf fairyInner;
/* 0x28 */ Color_RGBAf fairyOuter;
/* 0x38 */ Actor* arrowPointedActor;
/* 0x3C */ Actor* targetedActor;
/* 0x40 */ f32 unk40;
/* 0x44 */ f32 unk44;
/* 0x48 */ s16 unk48; // alpha
/* 0x4A */ u8 unk4A;
/* 0x4B */ u8 unk4B;
/* 0x4C */ s8 unk4C;
/* 0x4D */ UNK_TYPE1 pad4D[0x3];
/* 0x50 */ TargetContextEntry unk50[3];
/* 0x8C */ Actor* unk8C;
/* 0x90 */ Actor* bgmEnemy;
/* 0x94 */ Actor* unk_94;
} TargetContext; // size = 0x98
typedef struct {
/* 0x0 */ TexturePtr texture;
/* 0x4 */ s16 x;
/* 0x6 */ s16 y;
/* 0x8 */ u8 width;
/* 0x9 */ u8 height;
/* 0xA */ u8 durationTimer; // how long the title card appears for before fading
/* 0xB */ u8 delayTimer; // how long the title card waits to appear
/* 0xC */ s16 alpha;
/* 0xE */ s16 intensity;
} TitleCardContext; // size = 0x10
typedef struct ActorContext_unk_20C {
/* 0x0 */ s16 id;
/* 0x2 */ s8 isDynamicallyInitialised;
/* 0x4 */ void* ptr;
} ActorContext_unk_20C; // size = 0x8
typedef struct ActorContextFlags {
/* 0x00 */ u32 switches[4]; // First 0x40 are permanent, second 0x40 are temporary
/* 0x10 */ u32 chest;
/* 0x14 */ u32 clearedRoom;
/* 0x18 */ u32 clearedRoomTemp;
/* 0x1C */ u32 collectible[4]; // bitfield of 128 bits
} ActorContextFlags; // size = 0x2C
typedef struct ActorListEntry {
/* 0x0 */ s32 length; // number of actors loaded of this type
/* 0x4 */ Actor* first; // pointer to first actor of this type
/* 0x8 */ s32 unk_08;
} ActorListEntry; // size = 0xC
typedef struct ActorContext {
/* 0x000 */ u8 freezeFlashTimer;
/* 0x001 */ UNK_TYPE1 pad1;
/* 0x002 */ u8 unk2;
/* 0x003 */ u8 unk3;
/* 0x004 */ s8 unk4;
/* 0x005 */ u8 unk5;
/* 0x006 */ UNK_TYPE1 pad6[0x5];
/* 0x00B */ s8 unkB;
/* 0x00C */ s16 unkC;
/* 0x00E */ u8 totalLoadedActors;
/* 0x00F */ u8 undrawnActorCount;
/* 0x010 */ ActorListEntry actorLists[ACTORCAT_MAX];
/* 0x0A0 */ Actor* undrawnActors[32]; // Records the first 32 actors drawn each frame
/* 0x120 */ TargetContext targetContext;
/* 0x1B8 */ ActorContextFlags flags;
/* 0x1E4 */ TitleCardContext titleCtxt;
/* 0x1F4 */ u8 unk1F4;
/* 0x1F5 */ u8 unk1F5;
/* 0x1F6 */ UNK_TYPE1 pad1F6[0x2];
/* 0x1F8 */ f32 unk1F8;
/* 0x1FC */ Vec3f unk1FC;
/* 0x208 */ UNK_TYPE1 unk_208[0x4];
/* 0x20C */ ActorContext_unk_20C unk_20C[8];
/* 0x24C */ UNK_TYPE1 unk_24C[0x4];
/* 0x250 */ void* absoluteSpace; // Space used to allocate actor overlays of alloc type ALLOCTYPE_ABSOLUTE
/* 0x254 */ u32 unk254[5];
/* 0x268 */ u8 unk268;
/* 0x269 */ UNK_TYPE1 pad269[0x3];
/* 0x26C */ Input unk_26C;
} ActorContext; // size = 0x284
typedef enum {
/* 0x000 */ ACTOR_PLAYER,
/* 0x001 */ ACTOR_EN_TEST,
@@ -1002,6 +1100,76 @@ typedef enum {
/* 0x2B2 */ ACTOR_ID_MAX // originally "ACTOR_DLF_MAX"
} ActorID;
typedef enum {
/* 0 */ DOORLOCK_NORMAL,
/* 1 */ DOORLOCK_BOSS,
/* 2 */ DOORLOCK_2, // DOORLOCK_NORMAL_SPIRIT on OoT
/* 3 */ DOORLOCK_MAX
} DoorLockType;
// Targetability / ACTOR_FLAG_TARGETABLE?
#define ACTOR_FLAG_1 (1 << 0)
//
#define ACTOR_FLAG_2 (1 << 1)
//
#define ACTOR_FLAG_4 (1 << 2)
//
#define ACTOR_FLAG_8 (1 << 3)
//
#define ACTOR_FLAG_10 (1 << 4)
//
#define ACTOR_FLAG_20 (1 << 5)
//
#define ACTOR_FLAG_40 (1 << 6)
// Invisible
#define ACTOR_FLAG_80 (1 << 7)
// Related to talk
#define ACTOR_FLAG_100 (1 << 8)
//
#define ACTOR_FLAG_200 (1 << 9)
//
#define ACTOR_FLAG_400 (1 << 10)
//
#define ACTOR_FLAG_800 (1 << 11)
//
#define ACTOR_FLAG_1000 (1 << 12)
//
#define ACTOR_FLAG_2000 (1 << 13)
//
#define ACTOR_FLAG_4000 (1 << 14)
//
#define ACTOR_FLAG_8000 (1 << 15)
//
#define ACTOR_FLAG_10000 (1 << 16)
//
#define ACTOR_FLAG_20000 (1 << 17)
//
#define ACTOR_FLAG_40000 (1 << 18)
//
#define ACTOR_FLAG_80000 (1 << 19)
//
#define ACTOR_FLAG_100000 (1 << 20)
//
#define ACTOR_FLAG_200000 (1 << 21)
//
#define ACTOR_FLAG_400000 (1 << 22)
//
#define ACTOR_FLAG_800000 (1 << 23)
//
#define ACTOR_FLAG_1000000 (1 << 24)
//
#define ACTOR_FLAG_2000000 (1 << 25)
//
#define ACTOR_FLAG_4000000 (1 << 26)
//
#define ACTOR_FLAG_8000000 (1 << 27)
//
#define ACTOR_FLAG_10000000 (1 << 28)
//
#define ACTOR_FLAG_20000000 (1 << 29)
//
#define ACTOR_FLAG_40000000 (1 << 30)
typedef enum {
/* 0x00 */ CLEAR_TAG_SMALL_EXPLOSION,
/* 0x01 */ CLEAR_TAG_LARGE_EXPLOSION,
+1 -22
View File
@@ -254,7 +254,7 @@ typedef struct {
/* 0x0C */ void* vramEnd;
/* 0x10 */ void* loadedRamAddr;
/* 0x14 */ EffectSsInit* initInfo;
/* 0x18 */ u32 unk18; // Always 0x01000000?
/* 0x18 */ u8 unk18; // Always 1?
} EffectSsOverlay; // size = 0x1C
typedef struct EffectSs {
@@ -279,27 +279,6 @@ typedef struct {
/* 0x8 */ s32 size;
} EffectSsInfo; // size = 0xC
typedef struct {
/* 0x0 */ EffectSs* data_table; // Name from debug assert
/* 0x4 */ s32 searchIndex;
/* 0x8 */ s32 size;
} EffectTableInfo; // size = 0xC
typedef struct {
/* 0x0 */ UNK_TYPE4 unk0;
/* 0x4 */ EffectSsInitFunc init;
} ParticleOverlayInfo; // size = 0x8
typedef struct {
/* 0x00 */ u32 vromStart;
/* 0x04 */ u32 vromEnd;
/* 0x08 */ void* vramStart;
/* 0x0C */ void* vramEnd;
/* 0x10 */ void* loadedRamAddr;
/* 0x14 */ ParticleOverlayInfo* overlayInfo;
/* 0x18 */ u32 unk18; // Always 0x01000000?
} ParticleOverlay; // size = 0x1C
typedef enum {
/* 0x00 */ EFFECT_SS_DUST,
/* 0x01 */ EFFECT_SS_KIRAKIRA,
+11
View File
@@ -275,6 +275,7 @@ typedef enum {
/* 0x07 */ GI_RUPEE_HUGE,
/* 0x08 */ GI_WALLET_ADULT,
/* 0x09 */ GI_WALLET_GIANT,
/* 0x0A */ GI_RECOVERY_HEART,
/* 0x0C */ GI_HEART_PIECE = 0x0C,
/* 0x0D */ GI_HEART_CONTAINER,
/* 0x16 */ GI_BOMBS_10 = 0x16,
@@ -298,6 +299,7 @@ typedef enum {
/* 0x3C */ GI_KEY_SMALL = 0x3C,
/* 0x3E */ GI_MAP = 0x3E,
/* 0x3F */ GI_COMPASS,
/* 0x52 */ GI_SCALE_GOLD = 0x52, // Assumed, used in En_Fishing
/* 0x59 */ GI_BOTTLE_POTION_RED = 0x59,
/* 0x5B */ GI_POTION_RED = 0x5B,
/* 0x5C */ GI_POTION_GREEN,
@@ -341,6 +343,7 @@ typedef enum {
/* 0x9F */ GI_SHIELD_HERO_2, // Code that treats this as hero's shield is unused, so take with a grain of salt
/* 0xA1 */ GI_LETTER_TO_MAMA = 0xA1,
/* 0xA9 */ GI_BOTTLE = 0xA9,
/* 0xAB */ GI_PENDANT_OF_MEMORIES = 0xAB,
/* 0xBA */ GI_MAX = 0xBA
} GetItemID;
@@ -371,4 +374,12 @@ typedef enum {
/* 0x68 */ GID_SWORD_GREAT_FAIRY
} GetItemDrawID;
// TODO: fill
typedef enum {
/* -1 */ EXCH_ITEM_MINUS1 = -1, // Unknown usage or function
/* 0x00 */ EXCH_ITEM_NONE,
/* 0x1E */ EXCH_ITEM_1E = 0x1E, // BOTTLE_MUSHROOM
/* 0x2A */ EXCH_ITEM_2A = 0x2A // MOON_TEAR?
} ExchangeItemID;
#endif
+11 -10
View File
@@ -1,5 +1,5 @@
#ifndef _Z64PLAYER_H_
#define _Z64PLAYER_H_
#ifndef Z64PLAYER_H
#define Z64PLAYER_H
#include "z64actor.h"
#include "os.h"
@@ -252,7 +252,7 @@ typedef struct Player {
/* 0x32A */ Vec3s morphTable[5];
/* 0x348 */ s16 eyeTexId;
/* 0x34A */ s16 eyeAnimTimer;
/* 0x34C */ Actor* leftHandActor;
/* 0x34C */ Actor* heldActor;
/* 0x350 */ PosRot leftHandWorld;
/* 0x364 */ Actor* rightHandActor;
/* 0x368 */ PosRot rightHandWorld;
@@ -261,12 +261,12 @@ typedef struct Player {
/* 0x37E */ s8 doorTimer;
/* 0x37F */ s8 doorNext; // used with spiral staircase
/* 0x380 */ Actor* doorActor;
/* 0x384 */ s16 unk_384;
/* 0x386 */ u16 unk_386;
/* 0x388 */ Actor* unk_388;
/* 0x38C */ s16 unk_38C;
/* 0x384 */ s16 getItemId;
/* 0x386 */ u16 getItemDirection;
/* 0x388 */ Actor* interactRangeActor;
/* 0x38C */ s8 mountSide;
/* 0x390 */ Actor* rideActor;
/* 0x394 */ u8 unk_394;
/* 0x394 */ u8 csMode;
/* 0x395 */ u8 unk_395;
/* 0x396 */ u8 unk_396;
/* 0x397 */ u8 unk_397;
@@ -289,7 +289,8 @@ typedef struct Player {
/* 0x664 */ ColliderQuad shieldQuad;
/* 0x6E4 */ ColliderCylinder shieldCylinder;
/* 0x730 */ Actor* unk_730;
/* 0x734 */ char unk_734[8];
/* 0x734 */ char unk_734[4];
/* 0x738 */ s32 unk_738;
/* 0x73C */ s32 blureEffectIndex[3];
/* 0x748 */ char unk_748[0x320];
/* 0xA68 */ PlayerAgeProperties* ageProperties; // repurposed as "transformation properties"?
@@ -301,7 +302,7 @@ typedef struct Player {
/* 0xA80 */ Actor* tatlActor;
/* 0xA84 */ s16 tatlTextId;
/* 0xA86 */ s8 unk_A86;
/* 0xA87 */ s8 unk_A87;
/* 0xA87 */ s8 exchangeItemId;
/* 0xA88 */ Actor* targetActor;
/* 0xA8C */ f32 targetActorDistance;
/* 0xA90 */ Actor* unk_A90;
+1 -1
View File
@@ -174,7 +174,7 @@ typedef struct {
/* 0x3F5C */ s32 unk_3F5C; // "bet_rupees"
/* 0x3F60 */ u8 unk_3F60; // "framescale_flag"
/* 0x3F64 */ f32 unk_3F64; // "framescale_scale"
/* 0x3F68 */ u32 unk_3F68[5][120];
/* 0x3F68 */ u32 cycleSceneFlags[120][5];
/* 0x48C8 */ u16 unk_48C8; // "scene_id_mix"
/* 0x48CA */ u8 maskMaskBit[3]; // masks given away on the Moon
/* 0x48CD */ char unk_48CD[24];
+1 -1
View File
@@ -295,7 +295,7 @@ typedef struct {
/* 0x04 */ s16 id;
/* 0x06 */ Vec3s pos;
/* 0x0C */ s16 rotY;
/* 0x0E */ s16 params;
/* 0x0E */ u16 params;
} TransitionActorEntry; // size = 0x10
typedef struct {
+35 -50
View File
@@ -120,8 +120,6 @@ beginseg
include "build/src/libultra/io/devmgr.o"
include "build/src/libultra/io/pirawdma.o"
include "build/src/libultra/io/contpfs.o"
include "build/data/boot/contpfs.data.o"
include "build/data/boot/contpfs.bss.o"
include "build/asm/boot/getcount.text.o"
pad_text
include "build/asm/boot/guMtxL2F.text.o"
@@ -436,15 +434,13 @@ beginseg
include "build/src/code/z_eff_tire_mark.o"
include "build/src/code/z_effect.o"
include "build/src/code/z_effect_soft_sprite.o"
include "build/data/code/z_effect_soft_sprite.data.o"
include "build/src/code/z_effect_soft_sprite_old_init.o"
include "build/data/code/z_effect_soft_sprite_old_init.data.o"
include "build/src/code/z_effect_soft_sprite_dlftbls.o"
include "build/src/code/flg_set.o"
include "build/data/code/flg_set.bss.o"
include "build/src/code/pad_801DC9C0.o"
include "build/src/code/z_DLF.o"
include "build/src/code/z_actor.o"
include "build/data/code/z_actor.data.o"
include "build/data/code/z_actor.bss.o"
include "build/src/code/z_actor_dlftbls.o"
include "build/src/code/z_bgcheck.o"
@@ -879,8 +875,7 @@ beginseg
name "ovl_En_Peehat"
compress
include "build/src/overlays/actors/ovl_En_Peehat/z_en_peehat.o"
include "build/data/ovl_En_Peehat/ovl_En_Peehat.data.o"
include "build/data/ovl_En_Peehat/ovl_En_Peehat.reloc.o"
include "build/src/overlays/actors/ovl_En_Peehat/ovl_En_Peehat_reloc.o"
endseg
beginseg
@@ -963,8 +958,7 @@ beginseg
name "ovl_En_St"
compress
include "build/src/overlays/actors/ovl_En_St/z_en_st.o"
include "build/data/ovl_En_St/ovl_En_St.data.o"
include "build/data/ovl_En_St/ovl_En_St.reloc.o"
include "build/src/overlays/actors/ovl_En_St/ovl_En_St_reloc.o"
endseg
beginseg
@@ -1200,9 +1194,11 @@ beginseg
name "ovl_Object_Kankyo"
compress
include "build/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.o"
include "build/data/ovl_Object_Kankyo/ovl_Object_Kankyo.data.o"
include "build/data/ovl_Object_Kankyo/ovl_Object_Kankyo.bss.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_Object_Kankyo/ovl_Object_Kankyo_reloc.o"
#else
include "build/data/ovl_Object_Kankyo/ovl_Object_Kankyo.reloc.o"
#endif
endseg
beginseg
@@ -1328,9 +1324,11 @@ beginseg
name "ovl_En_Fishing"
compress
include "build/src/overlays/actors/ovl_En_Fishing/z_en_fishing.o"
include "build/data/ovl_En_Fishing/ovl_En_Fishing.data.o"
include "build/data/ovl_En_Fishing/ovl_En_Fishing.bss.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_En_Fishing/ovl_En_Fishing_reloc.o"
#else
include "build/data/ovl_En_Fishing/ovl_En_Fishing.reloc.o"
#endif
endseg
beginseg
@@ -1376,8 +1374,7 @@ beginseg
name "ovl_En_Fish"
compress
include "build/src/overlays/actors/ovl_En_Fish/z_en_fish.o"
include "build/data/ovl_En_Fish/ovl_En_Fish.data.o"
include "build/data/ovl_En_Fish/ovl_En_Fish.reloc.o"
include "build/src/overlays/actors/ovl_En_Fish/ovl_En_Fish_reloc.o"
endseg
beginseg
@@ -1676,8 +1673,7 @@ beginseg
name "ovl_En_Ishi"
compress
include "build/src/overlays/actors/ovl_En_Ishi/z_en_ishi.o"
include "build/data/ovl_En_Ishi/ovl_En_Ishi.data.o"
include "build/data/ovl_En_Ishi/ovl_En_Ishi.reloc.o"
include "build/src/overlays/actors/ovl_En_Ishi/ovl_En_Ishi_reloc.o"
endseg
beginseg
@@ -1819,16 +1815,14 @@ beginseg
name "ovl_Obj_Roomtimer"
compress
include "build/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.o"
include "build/data/ovl_Obj_Roomtimer/ovl_Obj_Roomtimer.data.o"
include "build/data/ovl_Obj_Roomtimer/ovl_Obj_Roomtimer.reloc.o"
include "build/src/overlays/actors/ovl_Obj_Roomtimer/ovl_Obj_Roomtimer_reloc.o"
endseg
beginseg
name "ovl_En_Ssh"
compress
include "build/src/overlays/actors/ovl_En_Ssh/z_en_ssh.o"
include "build/data/ovl_En_Ssh/ovl_En_Ssh.data.o"
include "build/data/ovl_En_Ssh/ovl_En_Ssh.reloc.o"
include "build/src/overlays/actors/ovl_En_Ssh/ovl_En_Ssh_reloc.o"
endseg
beginseg
@@ -2276,8 +2270,7 @@ beginseg
name "ovl_En_Mm2"
compress
include "build/src/overlays/actors/ovl_En_Mm2/z_en_mm2.o"
include "build/data/ovl_En_Mm2/ovl_En_Mm2.data.o"
include "build/data/ovl_En_Mm2/ovl_En_Mm2.reloc.o"
include "build/src/overlays/actors/ovl_En_Mm2/ovl_En_Mm2_reloc.o"
endseg
beginseg
@@ -2552,9 +2545,7 @@ beginseg
name "ovl_Boss_04"
compress
include "build/src/overlays/actors/ovl_Boss_04/z_boss_04.o"
include "build/data/ovl_Boss_04/ovl_Boss_04.data.o"
include "build/data/ovl_Boss_04/ovl_Boss_04.bss.o"
include "build/data/ovl_Boss_04/ovl_Boss_04.reloc.o"
include "build/src/overlays/actors/ovl_Boss_04/ovl_Boss_04_reloc.o"
endseg
beginseg
@@ -2610,8 +2601,11 @@ beginseg
name "ovl_En_Go"
compress
include "build/src/overlays/actors/ovl_En_Go/z_en_go.o"
include "build/data/ovl_En_Go/ovl_En_Go.data.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_En_Go/ovl_En_Go_reloc.o"
#else
include "build/data/ovl_En_Go/ovl_En_Go.reloc.o"
#endif
endseg
beginseg
@@ -2648,9 +2642,7 @@ beginseg
name "ovl_Obj_Flowerpot"
compress
include "build/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.o"
include "build/data/ovl_Obj_Flowerpot/ovl_Obj_Flowerpot.data.o"
include "build/data/ovl_Obj_Flowerpot/ovl_Obj_Flowerpot.bss.o"
include "build/data/ovl_Obj_Flowerpot/ovl_Obj_Flowerpot.reloc.o"
include "build/src/overlays/actors/ovl_Obj_Flowerpot/ovl_Obj_Flowerpot_reloc.o"
endseg
beginseg
@@ -2930,8 +2922,7 @@ beginseg
name "ovl_En_Wiz_Fire"
compress
include "build/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.o"
include "build/data/ovl_En_Wiz_Fire/ovl_En_Wiz_Fire.data.o"
include "build/data/ovl_En_Wiz_Fire/ovl_En_Wiz_Fire.reloc.o"
include "build/src/overlays/actors/ovl_En_Wiz_Fire/ovl_En_Wiz_Fire_reloc.o"
endseg
beginseg
@@ -3021,8 +3012,7 @@ beginseg
name "ovl_Obj_Hugebombiwa"
compress
include "build/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.o"
include "build/data/ovl_Obj_Hugebombiwa/ovl_Obj_Hugebombiwa.data.o"
include "build/data/ovl_Obj_Hugebombiwa/ovl_Obj_Hugebombiwa.reloc.o"
include "build/src/overlays/actors/ovl_Obj_Hugebombiwa/ovl_Obj_Hugebombiwa_reloc.o"
endseg
beginseg
@@ -3044,8 +3034,7 @@ beginseg
name "ovl_En_Water_Effect"
compress
include "build/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.o"
include "build/data/ovl_En_Water_Effect/ovl_En_Water_Effect.data.o"
include "build/data/ovl_En_Water_Effect/ovl_En_Water_Effect.reloc.o"
include "build/src/overlays/actors/ovl_En_Water_Effect/ovl_En_Water_Effect_reloc.o"
endseg
beginseg
@@ -3623,8 +3612,7 @@ beginseg
name "ovl_En_Kame"
compress
include "build/src/overlays/actors/ovl_En_Kame/z_en_kame.o"
include "build/data/ovl_En_Kame/ovl_En_Kame.data.o"
include "build/data/ovl_En_Kame/ovl_En_Kame.reloc.o"
include "build/src/overlays/actors/ovl_En_Kame/ovl_En_Kame_reloc.o"
endseg
beginseg
@@ -3842,8 +3830,7 @@ beginseg
name "ovl_En_Col_Man"
compress
include "build/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.o"
include "build/data/ovl_En_Col_Man/ovl_En_Col_Man.data.o"
include "build/data/ovl_En_Col_Man/ovl_En_Col_Man.reloc.o"
include "build/src/overlays/actors/ovl_En_Col_Man/ovl_En_Col_Man_reloc.o"
endseg
beginseg
@@ -3864,8 +3851,11 @@ beginseg
name "ovl_Obj_Snowball"
compress
include "build/src/overlays/actors/ovl_Obj_Snowball/z_obj_snowball.o"
include "build/data/ovl_Obj_Snowball/ovl_Obj_Snowball.data.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_Obj_Snowball/ovl_obj_Snowball_reloc.o"
#else
include "build/data/ovl_Obj_Snowball/ovl_Obj_Snowball.reloc.o"
#endif
endseg
beginseg
@@ -3880,8 +3870,7 @@ beginseg
name "ovl_En_Gb2"
compress
include "build/src/overlays/actors/ovl_En_Gb2/z_en_gb2.o"
include "build/data/ovl_En_Gb2/ovl_En_Gb2.data.o"
include "build/data/ovl_En_Gb2/ovl_En_Gb2.reloc.o"
include "build/src/overlays/actors/ovl_En_Gb2/ovl_En_Gb2_reloc.o"
endseg
beginseg
@@ -3980,8 +3969,7 @@ beginseg
name "ovl_Obj_Dowsing"
compress
include "build/src/overlays/actors/ovl_Obj_Dowsing/z_obj_dowsing.o"
include "build/data/ovl_Obj_Dowsing/ovl_Obj_Dowsing.data.o"
include "build/data/ovl_Obj_Dowsing/ovl_Obj_Dowsing.reloc.o"
include "build/src/overlays/actors/ovl_Obj_Dowsing/ovl_Obj_Dowsing_reloc.o"
endseg
beginseg
@@ -4419,8 +4407,7 @@ beginseg
name "ovl_Obj_Jg_Gakki"
compress
include "build/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.o"
include "build/data/ovl_Obj_Jg_Gakki/ovl_Obj_Jg_Gakki.data.o"
include "build/data/ovl_Obj_Jg_Gakki/ovl_Obj_Jg_Gakki.reloc.o"
include "build/src/overlays/actors/ovl_Obj_Jg_Gakki/ovl_Obj_Jg_Gakki_reloc.o"
endseg
beginseg
@@ -4919,8 +4906,7 @@ beginseg
name "ovl_En_Ruppecrow"
compress
include "build/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.o"
include "build/data/ovl_En_Ruppecrow/ovl_En_Ruppecrow.data.o"
include "build/data/ovl_En_Ruppecrow/ovl_En_Ruppecrow.reloc.o"
include "build/src/overlays/actors/ovl_En_Ruppecrow/ovl_En_Ruppecrow_reloc.o"
endseg
beginseg
@@ -5105,7 +5091,6 @@ beginseg
name "ovl_En_Bomjima"
compress
include "build/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.o"
include "build/data/ovl_En_Bomjima/ovl_En_Bomjima.data.o"
include "build/data/ovl_En_Bomjima/ovl_En_Bomjima.reloc.o"
endseg
+4 -4
View File
@@ -182,7 +182,7 @@ void __osFree(Arena* arena, void* ptr) {
ArenaNode* newNext;
ArenaImpl_Lock(arena);
node = (ArenaNode*)((u32)ptr - sizeof(ArenaNode));
node = (ArenaNode*)((uintptr_t)ptr - sizeof(ArenaNode));
if (ptr == NULL || (node->magic != NODE_MAGIC) || node->isFree) {
goto end;
@@ -190,10 +190,10 @@ void __osFree(Arena* arena, void* ptr) {
next = node->next;
prev = node->prev;
node->isFree = 1;
node->isFree = true;
newNext = next;
if ((u32)next == (u32)node + sizeof(ArenaNode) + node->size && next->isFree) {
if ((uintptr_t)next == (uintptr_t)node + sizeof(ArenaNode) + node->size && next->isFree) {
newNext = next->next;
if (newNext != NULL) {
newNext->prev = node;
@@ -205,7 +205,7 @@ void __osFree(Arena* arena, void* ptr) {
next = newNext;
}
if (prev != NULL && prev->isFree && (u32)node == (u32)prev + sizeof(ArenaNode) + prev->size) {
if (prev != NULL && prev->isFree && (uintptr_t)node == (uintptr_t)prev + sizeof(ArenaNode) + prev->size) {
if (next) {
next->prev = prev;
}
+1
View File
@@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h"
u8 sYaz0DataBuffer[0x400];
+1
View File
@@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h"
u32 sDmaMgrDmaBuffSize = 0x2000;
+1
View File
@@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h"
u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE];
+1 -1
View File
@@ -6,7 +6,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A5C8C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A5CFC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/Audio_PlaySfxGeneral.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A5DDC.s")
+10 -16
View File
@@ -88,33 +88,27 @@ GameStateOverlay* Graph_GetNextGameState(GameState* gameState) {
return NULL;
}
#ifdef NON_MATCHING
// Regalloc differences
void* Graph_FaultAddrConvFunc(void* address, void* param) {
u32 addr = address;
GameStateOverlay* gamestateOvl;
u32 ramConv;
u32 ramStart;
u32 diff;
uintptr_t addr = address;
GameStateOverlay* gamestateOvl = &gGameStateOverlayTable[0];
uintptr_t ramConv;
void* ramStart;
uintptr_t diff;
s32 i;
for (i = 0; i < graphNumGameStates; i++) {
gamestateOvl = &gGameStateOverlayTable[i];
for (i = 0; i < graphNumGameStates; i++, gamestateOvl++) {
diff = VRAM_PTR_SIZE(gamestateOvl);
ramStart = gamestateOvl->loadedRamAddr;
diff = (u32)gamestateOvl->vramEnd - (u32)gamestateOvl->vramStart;
ramConv = (u32)gamestateOvl->vramStart - ramStart;
ramConv = (uintptr_t)gamestateOvl->vramStart - (uintptr_t)ramStart;
if (gamestateOvl->loadedRamAddr != NULL) {
if (addr >= ramStart && addr < ramStart + diff) {
if (ramStart != NULL) {
if (addr >= (uintptr_t)ramStart && addr < (uintptr_t)ramStart + diff) {
return addr + ramConv;
}
}
}
return NULL;
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/graph/Graph_FaultAddrConvFunc.s")
#endif
void Graph_Init(GraphicsContext* gfxCtx) {
bzero(gfxCtx, sizeof(GraphicsContext));
+1
View File
@@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h"
#define RSP_DONE_MSG 667
+1 -1
View File
@@ -138,7 +138,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_IsPointInSphere.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017D668.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_PointDistToLine2D.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017D7C0.s")
+4297 -452
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -722,7 +722,7 @@ void ActorOverlayTable_FaultPrint(void* arg0, void* arg1) {
FaultDrawer_Printf("No. RamStart- RamEnd cn Name\n");
for (i = 0, overlayEntry = &gActorOverlayTable[0]; i < gMaxActorId; i++, overlayEntry++) {
overlaySize = (u32)overlayEntry->vramEnd - (u32)overlayEntry->vramStart;
overlaySize = VRAM_PTR_SIZE(overlayEntry);
if (overlayEntry->loadedRamAddr != NULL) {
FaultDrawer_Printf("%3d %08x-%08x %3d %s\n", i, overlayEntry->loadedRamAddr,
(u32)overlayEntry->loadedRamAddr + overlaySize, overlayEntry->numLoaded, "");
@@ -740,7 +740,7 @@ void* ActorOverlayTable_FaultAddrConv(void* arg0, void* arg1) {
u32 offset;
for (i = 0; i < gMaxActorId; i++, overlayEntry++) {
size = (u8*)overlayEntry->vramEnd - (u8*)overlayEntry->vramStart;
size = VRAM_PTR_SIZE(overlayEntry);
ramStart = overlayEntry->loadedRamAddr;
ramEnd = ramStart + size;
offset = (u8*)overlayEntry->vramStart - ramStart;
+1 -1
View File
@@ -3991,7 +3991,7 @@ void BgCheck_InitCollisionHeaders(CollisionContext* colCtx, GlobalContext* globa
for (i = 0; i < BG_ACTOR_MAX; i++) {
flag = dyna->bgActorFlags[i];
if ((flag & 1) && !(flag & 2)) {
Actor_SetObjectSegment(globalCtx, dyna->bgActors[i].actor);
Actor_SetObjectDependency(globalCtx, dyna->bgActors[i].actor);
CollisionHeader_SegmentedToVirtual(dyna->bgActors[i].colHeader);
}
}
+1 -1
View File
@@ -312,7 +312,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_SetMode.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DF840.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_ChangeMode.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DF86C.s")
+39
View File
@@ -0,0 +1,39 @@
#include "global.h"
/**
* Draws a display list to the opaque display buffer
*/
void Gfx_DrawDListOpa(GlobalContext* globalCtx, Gfx* dlist) {
Gfx* dl;
OPEN_DISPS(globalCtx->state.gfxCtx);
dl = POLY_OPA_DISP;
gSPDisplayList(&dl[0], &sSetupDL[6 * 0x19]);
gSPMatrix(&dl[1], Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(&dl[2], dlist);
POLY_OPA_DISP = &dl[3];
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
/**
* Draws a display list to the translucent display buffer
*/
void Gfx_DrawDListXlu(GlobalContext* globalCtx, Gfx* dlist) {
Gfx* dl;
OPEN_DISPS(globalCtx->state.gfxCtx);
dl = POLY_XLU_DISP;
gSPDisplayList(&dl[0], &sSetupDL[6 * 0x19]);
gSPMatrix(&dl[1], Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(&dl[2], dlist);
POLY_XLU_DISP = &dl[3];
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
+53 -52
View File
@@ -1,20 +1,22 @@
#include "global.h"
EffectSsInfo sEffectSsInfo = { NULL, 0, 0 };
void EffectSS_Init(GlobalContext* globalCtx, s32 numEntries) {
u32 i;
EffectSs* effectsSs;
EffectSsOverlay* overlay;
EffectSS2Info.data_table = (EffectSs*)THA_AllocEndAlign16(&globalCtx->state.heap, numEntries * sizeof(EffectSs));
EffectSS2Info.searchIndex = 0;
EffectSS2Info.size = numEntries;
sEffectSsInfo.data_table = (EffectSs*)THA_AllocEndAlign16(&globalCtx->state.heap, numEntries * sizeof(EffectSs));
sEffectSsInfo.searchIndex = 0;
sEffectSsInfo.size = numEntries;
for (effectsSs = &EffectSS2Info.data_table[0]; effectsSs < &EffectSS2Info.data_table[EffectSS2Info.size];
for (effectsSs = &sEffectSsInfo.data_table[0]; effectsSs < &sEffectSsInfo.data_table[sEffectSsInfo.size];
effectsSs++) {
EffectSS_ResetEntry(effectsSs);
}
overlay = &particleOverlayTable[0];
overlay = &gParticleOverlayTable[0];
for (i = 0; i < EFFECT_SS_MAX; i++) {
overlay->loadedRamAddr = NULL;
overlay++;
@@ -27,30 +29,31 @@ void EffectSS_Clear(GlobalContext* globalCtx) {
EffectSsOverlay* overlay;
void* addr;
EffectSS2Info.data_table = NULL;
EffectSS2Info.searchIndex = 0;
EffectSS2Info.size = 0;
sEffectSsInfo.data_table = NULL;
sEffectSsInfo.searchIndex = 0;
sEffectSsInfo.size = 0;
// This code is completely useless, as data_table was just set to NULL and size to 0
for (effectsSs = EffectSS2Info.data_table; effectsSs < EffectSS2Info.data_table + EffectSS2Info.size; effectsSs++) {
//! @bug: Effects left in the table are not properly deleted, as data_table was just set to NULL and size to 0
for (effectsSs = &sEffectSsInfo.data_table[0]; effectsSs < &sEffectSsInfo.data_table[sEffectSsInfo.size];
effectsSs++) {
EffectSS_Delete(effectsSs);
}
// Free memory from loaded particle overlays
overlay = &particleOverlayTable[0];
overlay = &gParticleOverlayTable[0];
for (i = 0; i < EFFECT_SS_MAX; i++) {
addr = overlay->loadedRamAddr;
if (addr != NULL) {
ZeldaArena_Free(addr);
}
overlay->loadedRamAddr = 0;
overlay->loadedRamAddr = NULL;
overlay++;
}
}
EffectSs* EffectSS_GetTable() {
return EffectSS2Info.data_table;
return sEffectSsInfo.data_table;
}
void EffectSS_Delete(EffectSs* effectSs) {
@@ -90,27 +93,27 @@ s32 EffectSS_FindFreeSpace(s32 priority, s32* tableEntry) {
s32 foundFree;
s32 i;
if (EffectSS2Info.searchIndex >= EffectSS2Info.size) {
EffectSS2Info.searchIndex = 0;
if (sEffectSsInfo.searchIndex >= sEffectSsInfo.size) {
sEffectSsInfo.searchIndex = 0;
}
// Search for a unused entry
i = EffectSS2Info.searchIndex;
i = sEffectSsInfo.searchIndex;
foundFree = false;
while (true) {
if (EffectSS2Info.data_table[i].life == -1) {
if (sEffectSsInfo.data_table[i].life == -1) {
foundFree = true;
break;
}
i++;
if (i >= EffectSS2Info.size) {
if (i >= sEffectSsInfo.size) {
i = 0; // Loop around the whole table
}
// After a full loop, break out
if (i == EffectSS2Info.searchIndex) {
if (i == sEffectSsInfo.searchIndex) {
break;
}
}
@@ -122,22 +125,22 @@ s32 EffectSS_FindFreeSpace(s32 priority, s32* tableEntry) {
// If all slots are in use, search for a slot with a lower priority
// Note that a lower priority is representend by a higher value
i = EffectSS2Info.searchIndex;
i = sEffectSsInfo.searchIndex;
while (true) {
// Equal priority should only be considered "lower" if flag 0 is set
if ((priority <= EffectSS2Info.data_table[i].priority) &&
!((priority == EffectSS2Info.data_table[i].priority) && (EffectSS2Info.data_table[i].flags & 1))) {
if ((priority <= sEffectSsInfo.data_table[i].priority) &&
!((priority == sEffectSsInfo.data_table[i].priority) && (sEffectSsInfo.data_table[i].flags & 1))) {
break;
}
i++;
if (i >= EffectSS2Info.size) {
if (i >= sEffectSsInfo.size) {
i = 0; // Loop around the whole table
}
// After a full loop, return 1 to indicate that we failed to find a suitable slot
if (i == EffectSS2Info.searchIndex) {
if (i == sEffectSsInfo.searchIndex) {
return true;
}
}
@@ -151,8 +154,8 @@ void EffectSS_Copy(GlobalContext* globalCtx, EffectSs* effectsSs) {
if (FrameAdvance_IsEnabled(globalCtx) != true) {
if (EffectSS_FindFreeSpace(effectsSs->priority, &index) == 0) {
EffectSS2Info.searchIndex = index + 1;
EffectSS2Info.data_table[index] = *effectsSs;
sEffectSsInfo.searchIndex = index + 1;
sEffectSsInfo.data_table[index] = *effectsSs;
}
}
}
@@ -160,7 +163,7 @@ void EffectSS_Copy(GlobalContext* globalCtx, EffectSs* effectsSs) {
void EffectSs_Spawn(GlobalContext* globalCtx, s32 type, s32 priority, void* initData) {
s32 index;
u32 overlaySize;
EffectSsOverlay* entry = &particleOverlayTable[type];
EffectSsOverlay* entry = &gParticleOverlayTable[type];
EffectSsInit* initInfo;
if (EffectSS_FindFreeSpace(priority, &index) != 0) {
@@ -168,8 +171,8 @@ void EffectSs_Spawn(GlobalContext* globalCtx, s32 type, s32 priority, void* init
return;
}
EffectSS2Info.searchIndex = index + 1;
overlaySize = (u32)entry->vramEnd - (u32)entry->vramStart;
sEffectSsInfo.searchIndex = index + 1;
overlaySize = VRAM_PTR_SIZE(entry);
if (entry->vramStart == NULL) {
initInfo = entry->initInfo;
@@ -184,27 +187,25 @@ void EffectSs_Spawn(GlobalContext* globalCtx, s32 type, s32 priority, void* init
Load2_LoadOverlay(entry->vromStart, entry->vromEnd, entry->vramStart, entry->vramEnd, entry->loadedRamAddr);
}
initInfo = (void*)(u32)(
entry->initInfo != NULL
? (EffectSsInit*)(-((u32)entry->vramStart - (u32)entry->loadedRamAddr) + (u32)entry->initInfo)
: NULL);
initInfo = (uintptr_t)(
(entry->initInfo != NULL) ? (void*)(-OVERLAY_RELOCATION_OFFSET(entry) + (uintptr_t)entry->initInfo) : NULL);
}
if (initInfo->init != NULL) {
// Delete the previous effect in the slot, in case the slot wasn't free
EffectSS_Delete(&EffectSS2Info.data_table[index]);
EffectSS_Delete(&sEffectSsInfo.data_table[index]);
EffectSS2Info.data_table[index].type = type;
EffectSS2Info.data_table[index].priority = priority;
sEffectSsInfo.data_table[index].type = type;
sEffectSsInfo.data_table[index].priority = priority;
if (initInfo->init(globalCtx, index, &EffectSS2Info.data_table[index], initData) == 0) {
EffectSS_ResetEntry(&EffectSS2Info.data_table[index]);
if (initInfo->init(globalCtx, index, &sEffectSsInfo.data_table[index], initData) == 0) {
EffectSS_ResetEntry(&sEffectSsInfo.data_table[index]);
}
}
}
void EffectSS_UpdateParticle(GlobalContext* globalCtx, s32 index) {
EffectSs* particle = &EffectSS2Info.data_table[index];
EffectSs* particle = &sEffectSsInfo.data_table[index];
if (particle->update != NULL) {
particle->velocity.x += particle->accel.x;
@@ -222,23 +223,23 @@ void EffectSS_UpdateParticle(GlobalContext* globalCtx, s32 index) {
void EffectSS_UpdateAllParticles(GlobalContext* globalCtx) {
s32 i;
for (i = 0; i < EffectSS2Info.size; i++) {
if (EffectSS2Info.data_table[i].life > -1) {
EffectSS2Info.data_table[i].life--;
for (i = 0; i < sEffectSsInfo.size; i++) {
if (sEffectSsInfo.data_table[i].life > -1) {
sEffectSsInfo.data_table[i].life--;
if (EffectSS2Info.data_table[i].life < 0) {
EffectSS_Delete(&EffectSS2Info.data_table[i]);
if (sEffectSsInfo.data_table[i].life < 0) {
EffectSS_Delete(&sEffectSsInfo.data_table[i]);
}
}
if (EffectSS2Info.data_table[i].life > -1) {
if (sEffectSsInfo.data_table[i].life > -1) {
EffectSS_UpdateParticle(globalCtx, i);
}
}
}
void EffectSS_DrawParticle(GlobalContext* globalCtx, s32 index) {
EffectSs* entry = &EffectSS2Info.data_table[index];
EffectSs* entry = &sEffectSsInfo.data_table[index];
if (entry->draw != NULL) {
entry->draw(globalCtx, index, entry);
@@ -252,12 +253,12 @@ void EffectSS_DrawAllParticles(GlobalContext* globalCtx) {
Lights_BindAll(lights, globalCtx->lightCtx.listHead, NULL, globalCtx);
Lights_Draw(lights, globalCtx->state.gfxCtx);
for (i = 0; i < EffectSS2Info.size; i++) {
if (EffectSS2Info.data_table[i].life > -1) {
if ((EffectSS2Info.data_table[i].pos.x > 32000.0f) || (EffectSS2Info.data_table[i].pos.x < -32000.0f) ||
(EffectSS2Info.data_table[i].pos.y > 32000.0f) || (EffectSS2Info.data_table[i].pos.y < -32000.0f) ||
(EffectSS2Info.data_table[i].pos.z > 32000.0f) || (EffectSS2Info.data_table[i].pos.z < -32000.0f)) {
EffectSS_Delete(&EffectSS2Info.data_table[i]);
for (i = 0; i < sEffectSsInfo.size; i++) {
if (sEffectSsInfo.data_table[i].life > -1) {
if ((sEffectSsInfo.data_table[i].pos.x > 32000.0f) || (sEffectSsInfo.data_table[i].pos.x < -32000.0f) ||
(sEffectSsInfo.data_table[i].pos.y > 32000.0f) || (sEffectSsInfo.data_table[i].pos.y < -32000.0f) ||
(sEffectSsInfo.data_table[i].pos.z > 32000.0f) || (sEffectSsInfo.data_table[i].pos.z < -32000.0f)) {
EffectSS_Delete(&sEffectSsInfo.data_table[i]);
} else {
EffectSS_DrawParticle(globalCtx, i);
}
+56
View File
@@ -0,0 +1,56 @@
#include "global.h"
#include "initvars.h"
#define EFFECT_SS_OVERLAY(name) \
{ \
SEGMENT_ROM_START(ovl_##name), SEGMENT_ROM_END(ovl_##name), SEGMENT_START(ovl_##name), \
SEGMENT_END(ovl_##name), NULL, &name##_InitVars, 1, \
}
#define EFFECT_SS_OVERLAY_INTERNAL(name) \
{ 0, 0, NULL, NULL, NULL, &name##_InitVars, 1 }
#define EFFECT_SS_OVERLAY_UNSET \
{ 0 }
EffectSsOverlay gParticleOverlayTable[] = {
EFFECT_SS_OVERLAY(Effect_Ss_Dust),
EFFECT_SS_OVERLAY(Effect_Ss_Kirakira),
EFFECT_SS_OVERLAY_UNSET,
EFFECT_SS_OVERLAY(Effect_Ss_Bomb2),
EFFECT_SS_OVERLAY(Effect_Ss_Blast),
EFFECT_SS_OVERLAY(Effect_Ss_G_Spk),
EFFECT_SS_OVERLAY(Effect_Ss_D_Fire),
EFFECT_SS_OVERLAY(Effect_Ss_Bubble),
EFFECT_SS_OVERLAY_UNSET,
EFFECT_SS_OVERLAY(Effect_Ss_G_Ripple),
EFFECT_SS_OVERLAY(Effect_Ss_G_Splash),
EFFECT_SS_OVERLAY_UNSET,
EFFECT_SS_OVERLAY(Effect_Ss_G_Fire),
EFFECT_SS_OVERLAY(Effect_Ss_Lightning),
EFFECT_SS_OVERLAY(Effect_Ss_Dt_Bubble),
EFFECT_SS_OVERLAY(Effect_Ss_Hahen),
EFFECT_SS_OVERLAY(Effect_Ss_Stick),
EFFECT_SS_OVERLAY(Effect_Ss_Sibuki),
EFFECT_SS_OVERLAY_UNSET,
EFFECT_SS_OVERLAY_UNSET,
EFFECT_SS_OVERLAY(Effect_Ss_Stone1),
EFFECT_SS_OVERLAY(Effect_Ss_Hitmark),
EFFECT_SS_OVERLAY(Effect_Ss_Fhg_Flash),
EFFECT_SS_OVERLAY(Effect_Ss_K_Fire),
EFFECT_SS_OVERLAY(Effect_Ss_Solder_Srch_Ball),
EFFECT_SS_OVERLAY(Effect_Ss_Kakera),
EFFECT_SS_OVERLAY(Effect_Ss_Ice_Piece),
EFFECT_SS_OVERLAY(Effect_Ss_En_Ice),
EFFECT_SS_OVERLAY(Effect_Ss_Fire_Tail),
EFFECT_SS_OVERLAY(Effect_Ss_En_Fire),
EFFECT_SS_OVERLAY(Effect_Ss_Extra),
EFFECT_SS_OVERLAY_UNSET,
EFFECT_SS_OVERLAY(Effect_Ss_Dead_Db),
EFFECT_SS_OVERLAY(Effect_Ss_Dead_Dd),
EFFECT_SS_OVERLAY(Effect_Ss_Dead_Ds),
EFFECT_SS_OVERLAY_UNSET,
EFFECT_SS_OVERLAY(Effect_Ss_Ice_Smoke),
EFFECT_SS_OVERLAY(Effect_En_Ice_Block),
EFFECT_SS_OVERLAY(Effect_Ss_Sbn),
};
+49 -75
View File
@@ -124,32 +124,32 @@ void func_800B1054(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f*
EffectSsDust_Spawn(globalCtx, 1, pos, velocity, accel, primColor, envColor, scale, scaleStep, 10, 1);
}
extern Color_RGBA8 D_801AE3B0;
extern Color_RGBA8 D_801AE3B4;
static Color_RGBA8 sDustBrownPrim = { 170, 130, 90, 255 };
static Color_RGBA8 sDustBrownEnv = { 100, 60, 20, 255 };
void func_800B10C0(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &D_801AE3B0, &D_801AE3B4, 100, 5, 10, 0);
EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, 100, 5, 10, 0);
}
void func_800B1130(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &D_801AE3B0, &D_801AE3B4, 100, 5, 10, 0);
EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, 100, 5, 10, 0);
}
void func_800B11A0(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep) {
EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &D_801AE3B0, &D_801AE3B4, scale, scaleStep, 10, 0);
EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, scale, scaleStep, 10, 0);
}
void func_800B1210(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep) {
EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &D_801AE3B0, &D_801AE3B4, scale, scaleStep, 10, 0);
EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, scale, scaleStep, 10, 0);
}
void func_800B1280(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 life) {
EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &D_801AE3B0, &D_801AE3B4, scale, scaleStep, life, 0);
EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, scale, scaleStep, life, 0);
}
void func_800B12F0(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 life) {
EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &D_801AE3B0, &D_801AE3B4, scale, scaleStep, life, 0);
EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, scale, scaleStep, life, 0);
}
void func_800B1360(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
@@ -206,12 +206,9 @@ void func_800B1598(GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos) {
}
}
extern Color_RGBA8 D_801AE3B8;
extern Color_RGBA8 D_801AE3BC;
void EffectSsKiraKira_SpawnSmallYellow(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
Color_RGBA8 primColor = D_801AE3B8;
Color_RGBA8 envColor = D_801AE3BC;
Color_RGBA8 primColor = { 255, 255, 200, 255 };
Color_RGBA8 envColor = { 255, 200, 0, 0 };
EffectSsKiraKira_SpawnDispersed(globalCtx, pos, velocity, accel, &primColor, &envColor, 1000, 16);
}
@@ -307,12 +304,12 @@ void EffectSsBlast_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity,
EffectSs_Spawn(globalCtx, EFFECT_SS_BLAST, 128, &initParams);
}
extern Color_RGBA8 D_801AE3C0;
extern Color_RGBA8 D_801AE3C4;
void EffectSsBlast_SpawnWhiteCustomScale(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
s16 scaleStep, s16 life) {
EffectSsBlast_Spawn(globalCtx, pos, velocity, accel, &D_801AE3C0, &D_801AE3C4, scale, scaleStep, 35, life);
static Color_RGBA8 primColor = { 255, 255, 255, 255 };
static Color_RGBA8 envColor = { 200, 200, 200, 0 };
EffectSsBlast_Spawn(globalCtx, pos, velocity, accel, &primColor, &envColor, scale, scaleStep, 35, life);
}
void EffectSsBlast_SpawnShockwave(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
@@ -320,11 +317,11 @@ void EffectSsBlast_SpawnShockwave(GlobalContext* globalCtx, Vec3f* pos, Vec3f* v
EffectSsBlast_Spawn(globalCtx, pos, velocity, accel, primColor, envColor, 100, 375, 35, life);
}
extern Color_RGBA8 D_801AE3C8;
extern Color_RGBA8 D_801AE3CC;
void EffectSsBlast_SpawnWhiteShockwave(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
EffectSsBlast_SpawnShockwave(globalCtx, pos, velocity, accel, &D_801AE3C8, &D_801AE3CC, 10);
static Color_RGBA8 primColor = { 255, 255, 255, 255 };
static Color_RGBA8 envColor = { 200, 200, 200, 0 };
EffectSsBlast_SpawnShockwave(globalCtx, pos, velocity, accel, &primColor, &envColor, 10);
}
// EffectSsGSpk Spawn Functions
@@ -364,24 +361,18 @@ void EffectSsGSpk_SpawnNoAccel(GlobalContext* globalCtx, Actor* actor, Vec3f* po
EffectSs_Spawn(globalCtx, EFFECT_SS_G_SPK, 128, &initParams);
}
extern Color_RGBA8 D_801AE3D0;
extern Color_RGBA8 D_801AE3D4;
void EffectSsGSpk_SpawnFuse(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
Color_RGBA8 primColor = D_801AE3D0;
Color_RGBA8 envColor = D_801AE3D4;
Color_RGBA8 primColor = { 255, 255, 150, 255 };
Color_RGBA8 envColor = { 255, 0, 0, 0 };
EffectSsGSpk_SpawnSmall(globalCtx, actor, pos, velocity, accel, &primColor, &envColor);
}
extern Color_RGBA8 D_801AE3D8;
extern Color_RGBA8 D_801AE3DC;
// unused
void EffectSsGSpk_SpawnRandColor(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
s16 scale, s16 scaleStep) {
Color_RGBA8 primColor = D_801AE3D8;
Color_RGBA8 envColor = D_801AE3DC;
Color_RGBA8 primColor = { 255, 255, 150, 255 };
Color_RGBA8 envColor = { 255, 0, 0, 0 };
s32 randOffset = (Rand_ZeroOne() * 20.0f) - 10.0f;
primColor.r += randOffset;
@@ -585,12 +576,10 @@ void EffectSsHahen_SpawnBurst(GlobalContext* globalCtx, Vec3f* pos, f32 burstSca
}
}
extern Vec3f D_801AE3E0;
void func_800B2364(GlobalContext* globalCtx, Vec3f* pos, Gfx* dList) {
Vec3f posVec = D_801AE3E0;
Vec3f accel = { 0.0f, -2.0f, 0.0f };
EffectSsHahen_Spawn(globalCtx, pos, &gZeroVec3f, &posVec, 1, 5, 1, 10, dList);
EffectSsHahen_Spawn(globalCtx, pos, &gZeroVec3f, &accel, 1, 5, 1, 10, dList);
}
// EffectSsStick Spawn Functions
@@ -624,12 +613,9 @@ void EffectSsSibuki_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity,
EffectSs_Spawn(globalCtx, EFFECT_SS_SIBUKI, 128, &initParams);
}
extern Vec3f D_801AE3EC;
extern Vec3f D_801AE3F8;
void EffectSsSibuki_SpawnBurst(GlobalContext* globalCtx, Vec3f* pos) {
s16 i;
Vec3f zeroVec = D_801AE3EC;
Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
s16 randDirection = Rand_ZeroOne() * 1.99f;
for (i = 0; i < KREG(19) + 30; i++) {
@@ -759,11 +745,6 @@ void EffectSsIcePiece_Spawn(GlobalContext* globalCtx, Vec3f* pos, f32 scale, Vec
EffectSs_Spawn(globalCtx, EFFECT_SS_ICE_PIECE, 128, &initParams);
}
extern Vec3f D_801AE3F8;
extern Vec3f D_801AE404[10];
#ifdef NON_MATCHING
/* needs data migration to match */
void EffectSsIcePiece_SpawnBurst(GlobalContext* globalCtx, Vec3f* refPos, f32 scale) {
static Vec3f accel = { 0.0f, 0.0f, 0.0f };
static Vec3f vecScales[] = {
@@ -799,15 +780,11 @@ void EffectSsIcePiece_SpawnBurst(GlobalContext* globalCtx, Vec3f* refPos, f32 sc
&accel, 25);
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsIcePiece_SpawnBurst.s")
#endif
// EffectSsEnIce Spawn Functions
void EffectSsEnIce_SpawnFlyingVec3f(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Color_RGBA8* prim,
Color_RGBA8* env, f32 scale) {
EffectSsEnIceInitParams initParams;
initParams.actor = actor;
@@ -818,17 +795,17 @@ void EffectSsEnIce_SpawnFlyingVec3f(GlobalContext* globalCtx, Actor* actor, Vec3
initParams.scale = scale;
if (actor != NULL) {
Audio_PlayActorSound2(actor, NA_SE_PL_FREEZE_S);
Actor_PlaySfxAtPos(actor, NA_SE_PL_FREEZE_S);
}
EffectSs_Spawn(globalCtx, EFFECT_SS_EN_ICE, 80, &initParams);
}
extern Color_RGBA8 D_801AE47C;
extern Color_RGBA8 D_801AE480;
void func_800B2B44(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, f32 scale) {
EffectSsEnIce_SpawnFlyingVec3f(globalCtx, actor, pos, &D_801AE47C, &D_801AE480, scale);
static Color_RGBA8 primColor = { 150, 150, 150, 250 };
static Color_RGBA8 envColor = { 235, 245, 255, 255 };
EffectSsEnIce_SpawnFlyingVec3f(globalCtx, actor, pos, &primColor, &envColor, scale);
}
void func_800B2B7C(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, f32 scale) {
@@ -874,29 +851,21 @@ void EffectSsFireTail_Spawn(GlobalContext* globalCtx, Actor* actor, Vec3f* pos,
EffectSs_Spawn(globalCtx, EFFECT_SS_FIRE_TAIL, 128, &initParams);
}
extern Color_RGBA8 D_801AE484;
extern Color_RGBA8 D_801AE488;
#ifdef NON_MATCHING
// needs data migration to match
void EffectSsFireTail_SpawnFlame(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, f32 arg3, s16 bodyPart,
f32 colorIntensity) {
static Color_RGBA8 primColor = { 255, 255, 0, 255 };
static Color_RGBA8 envColor = { 255, 0, 0, 255 };
D_801AE484.g = (s32)(255.0f * colorIntensity);
D_801AE484.b = 0;
primColor.g = (s32)(255.0f * colorIntensity);
primColor.b = 0;
D_801AE488.g = 0;
D_801AE488.b = 0;
D_801AE484.r = D_801AE488.r = (s32)(255.0f * colorIntensity);
envColor.g = 0;
envColor.b = 0;
primColor.r = envColor.r = (s32)(255.0f * colorIntensity);
EffectSsFireTail_Spawn(globalCtx, actor, pos, arg3, &actor->velocity, 15, &D_801AE484, &D_801AE488,
EffectSsFireTail_Spawn(globalCtx, actor, pos, arg3, &actor->velocity, 15, &primColor, &envColor,
(colorIntensity == 1.0f) ? 0 : 1, bodyPart, 1);
}
#else
void EffectSsFireTail_SpawnFlame(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, f32 arg3, s16 bodyPart,
f32 colorIntensity);
#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsFireTail_SpawnFlame.s")
#endif
void EffectSsFireTail_SpawnFlameOnPlayer(GlobalContext* globalCtx, f32 scale, s16 bodyPart, f32 colorIntensity) {
Player* player = GET_PLAYER(globalCtx);
@@ -919,7 +888,7 @@ void EffectSsEnFire_SpawnVec3f(GlobalContext* globalCtx, Actor* actor, Vec3f* po
initParams.bodyPart = bodyPart;
if (actor != NULL) {
Audio_PlayActorSound2(actor, NA_SE_EV_FLAME_IGNITION);
Actor_PlaySfxAtPos(actor, NA_SE_EV_FLAME_IGNITION);
}
EffectSs_Spawn(globalCtx, EFFECT_SS_EN_FIRE, 128, &initParams);
@@ -939,7 +908,7 @@ void EffectSsEnFire_SpawnVec3s(GlobalContext* globalCtx, Actor* actor, Vec3s* po
initParams.bodyPart = bodyPart;
if (actor != NULL) {
Audio_PlayActorSound2(actor, NA_SE_EV_FLAME_IGNITION);
Actor_PlaySfxAtPos(actor, NA_SE_EV_FLAME_IGNITION);
}
EffectSs_Spawn(globalCtx, EFFECT_SS_EN_FIRE, 128, &initParams);
@@ -982,12 +951,17 @@ void EffectSsDeadDb_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity,
EffectSs_Spawn(globalCtx, EFFECT_SS_DEAD_DB, 120, &initParams);
}
extern Color_RGBA8 D_801AE48C;
extern Color_RGBA8 D_801AE490[4];
void func_800B3030(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s32 colorIndex) {
EffectSsDeadDb_Spawn(globalCtx, pos, velocity, accel, &D_801AE48C, &D_801AE490[colorIndex], scale, scaleStep, 9);
static Color_RGBA8 primColor = { 255, 255, 255, 255 };
static Color_RGBA8 envColors[] = {
{ 255, 0, 0, 255 },
{ 0, 255, 0, 255 },
{ 0, 0, 255, 255 },
{ 150, 150, 150, 255 },
};
EffectSsDeadDb_Spawn(globalCtx, pos, velocity, accel, &primColor, &envColors[colorIndex], scale, scaleStep, 9);
}
// EffectSsDeadDd Spawn Functions
+6 -6
View File
@@ -11,10 +11,10 @@ void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.textId = ((this->actor.params >> 8) & 0xFF) | 0x300;
this->actor.params = (this->actor.params & 0xFF) - 9;
Actor_ProcessInitChain(&this->actor, &enAObjInitVar);
ActorShape_Init(&this->actor.shape, 0, func_800B3FC0, 12);
ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawCircle, 12);
Collider_InitAndSetCylinder(globalCtx, &this->collision, &this->actor, &enAObjCylinderInit);
Collider_UpdateCylinder(&this->actor, &this->collision);
this->actor.colChkInfo.mass = 255;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actionFunc = EnAObj_Update1;
}
@@ -27,7 +27,7 @@ void EnAObj_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void EnAObj_Update1(EnAObj* this, GlobalContext* globalCtx) {
s32 yawDiff;
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->actionFunc = EnAObj_Update2;
} else {
yawDiff = ABS_ALT((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y));
@@ -39,7 +39,7 @@ void EnAObj_Update1(EnAObj* this, GlobalContext* globalCtx) {
}
void EnAObj_Update2(EnAObj* this, GlobalContext* globalCtx) {
if (func_800B867C(&this->actor, globalCtx)) {
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
this->actionFunc = EnAObj_Update1;
}
}
@@ -48,10 +48,10 @@ void EnAObj_Update(Actor* thisx, GlobalContext* globalCtx) {
EnAObj* this = THIS;
this->actionFunc(this, globalCtx);
Actor_SetHeight(&this->actor, 45.0f);
Actor_SetFocus(&this->actor, 45.0f);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collision.base);
}
void EnAObj_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, enAObjDisplayLists[thisx->params]);
Gfx_DrawDListOpa(globalCtx, enAObjDisplayLists[thisx->params]);
}
+4 -4
View File
@@ -66,7 +66,7 @@ Actor* EnHy_FindNearestDoor(Actor* actor, GlobalContext* globalCtx) {
f32 minDist = 0.0f;
do {
doorIter = func_ActorCategoryIterateById(globalCtx, doorIter, ACTORCAT_DOOR, ACTOR_EN_DOOR);
doorIter = SubS_FindActor(globalCtx, doorIter, ACTORCAT_DOOR, ACTOR_EN_DOOR);
door = doorIter;
dist = Actor_DistanceBetweenActors(actor, door);
if (!isSetup || (dist < minDist)) {
@@ -131,7 +131,7 @@ void func_800F0BB4(EnHy* enHy, GlobalContext* globalCtx, Actor* door, s16 arg3,
Vec3f offset;
f32 phi_f0;
Actor_CalcOffsetOrientedToDrawRotation(door, &offset, &enHy->actor.world.pos);
Actor_OffsetOfPointInActorCoords(door, &offset, &enHy->actor.world.pos);
phi_f0 = (offset.z >= 0.0f) ? 1.0f : -1.0f;
sp3B = ((s8)phi_f0 < 0) ? 0 : 2;
EnHy_ChangeObjectAndAnim(enHy, globalCtx, (sp3B == 0) ? arg3 : arg4);
@@ -260,12 +260,12 @@ s32 EnHy_PlayWalkingSound(EnHy* enHy, GlobalContext* globalCtx, f32 distAboveThr
enHy->isLeftFootOnGround = isFootOnGround = func_8013DB90(globalCtx, &enHy->leftFootPos, distAboveThreshold);
if (enHy->isLeftFootOnGround && !wasLeftFootOnGround && isFootOnGround) {
Audio_PlayActorSound2(&enHy->actor, sfxId);
Actor_PlaySfxAtPos(&enHy->actor, sfxId);
}
enHy->isRightFootOnGround = isFootOnGround = func_8013DB90(globalCtx, &enHy->rightFootPos, distAboveThreshold);
if (enHy->isRightFootOnGround && !wasRightFootOnGround && isFootOnGround) {
Audio_PlayActorSound2(&enHy->actor, sfxId);
Actor_PlaySfxAtPos(&enHy->actor, sfxId);
}
return 0;
}
+100 -122
View File
@@ -43,7 +43,7 @@ static InitChainEntry sInitChain[] = {
};
void EnItem00_SetObject(EnItem00* this, GlobalContext* globalCtx, f32* shadowOffset, f32* shadowScale) {
Actor_SetObjectSegment(globalCtx, &this->actor);
Actor_SetObjectDependency(globalCtx, &this->actor);
Actor_SetScale(&this->actor, 0.5f);
this->unk154 = 0.5f;
*shadowOffset = 0.0f;
@@ -63,7 +63,7 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
thisx->params &= 0xFF; // Has to be thisx to match
if (Actor_GetCollectibleFlag(globalCtx, this->collectibleFlag)) {
if (Flags_GetCollectible(globalCtx, this->collectibleFlag)) {
if (this->actor.params == ITEM00_HEART_PIECE) {
sp30 = 0;
this->collectibleFlag = 0;
@@ -169,7 +169,7 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
}
this->unk14E = 0;
ActorShape_Init(&this->actor.shape, shadowOffset, func_800B3FC0, shadowScale);
ActorShape_Init(&this->actor.shape, shadowOffset, ActorShadow_DrawCircle, shadowScale);
this->actor.shape.shadowAlpha = 180;
this->actor.focus.pos = this->actor.world.pos;
this->unk14A = GI_NONE;
@@ -251,7 +251,7 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
}
if ((getItemId != GI_NONE) && (Actor_HasParent(&this->actor, globalCtx) == 0)) {
func_800B8A1C(&this->actor, globalCtx, getItemId, 50.0f, 20.0f);
Actor_PickUp(&this->actor, globalCtx, getItemId, 50.0f, 20.0f);
}
this->actionFunc = func_800A6A40;
@@ -407,7 +407,7 @@ void func_800A6A40(EnItem00* this, GlobalContext* globalCtx) {
if (this->unk14A != GI_NONE) {
if (Actor_HasParent(&this->actor, globalCtx) == 0) {
func_800B8A1C(&this->actor, globalCtx, this->unk14A, 50.0f, 80.0f);
Actor_PickUp(&this->actor, globalCtx, this->unk14A, 50.0f, 80.0f);
this->unk152++;
} else {
this->unk14A = GI_NONE;
@@ -457,7 +457,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actor.scale.y = this->actor.scale.x;
if (this->actor.gravity != 0.0f) {
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 15.0f, 15.0f, 0x1D);
if (this->actor.floorHeight <= BGCHECK_Y_MIN) {
@@ -574,7 +574,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
if (getItemId != GI_NONE) {
if (!Actor_HasParent(&this->actor, globalCtx)) {
func_800B8A1C(&this->actor, globalCtx, getItemId, 50.0f, 20.0f);
Actor_PickUp(&this->actor, globalCtx, getItemId, 50.0f, 20.0f);
}
}
@@ -586,7 +586,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
case ITEM00_MAP:
case ITEM00_COMPASS:
if (Actor_HasParent(&this->actor, globalCtx)) {
Actor_SetCollectibleFlag(globalCtx, this->collectibleFlag);
Flags_SetCollectible(globalCtx, this->collectibleFlag);
Actor_MarkForDeath(&this->actor);
}
return;
@@ -598,7 +598,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
play_sound(NA_SE_SY_GET_RUPY);
} else if (getItemId != GI_NONE) {
if (Actor_HasParent(&this->actor, globalCtx)) {
Actor_SetCollectibleFlag(globalCtx, this->collectibleFlag);
Flags_SetCollectible(globalCtx, this->collectibleFlag);
Actor_MarkForDeath(&this->actor);
}
return;
@@ -606,7 +606,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
play_sound(NA_SE_SY_GET_ITEM);
}
Actor_SetCollectibleFlag(globalCtx, this->collectibleFlag);
Flags_SetCollectible(globalCtx, this->collectibleFlag);
this->unk152 = 15;
this->unk14C = 35;
@@ -651,7 +651,7 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
s8 bankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_GI_HEART);
if (Object_IsLoaded(&globalCtx->objectCtx, bankIndex)) {
this->actor.objBankIndex = bankIndex;
Actor_SetObjectSegment(globalCtx, &this->actor);
Actor_SetObjectDependency(globalCtx, &this->actor);
this->unk152 = -2;
}
} else {
@@ -828,112 +828,94 @@ s16 func_800A7650(s16 dropId) {
return dropId;
}
#ifdef NON_MATCHING
// Reordering issues
EnItem00* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, u32 params) {
Actor* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, u32 params) {
s32 pad;
EnItem00* spawnedActor = NULL;
s32 pad2;
s32 param10000;
s16 param8000;
s16 param7F00;
s32 param20000;
s32 paramFF;
Actor* spawnedActor = NULL;
s32 newParamFF;
s32 param10000 = params & 0x10000;
s16 param8000 = params & 0x8000;
s16 param7F00 = params & 0x7F00;
s32 param20000 = params & 0x20000;
s32 paramFF = params & 0xFF;
s32 i;
param10000 = params & 0x10000;
param8000 = params & 0x8000;
param7F00 = params & 0x7F00;
param20000 = params & 0x20000;
paramFF = params & 0xFF;
params &= 0x7FFF;
newParamFF = params & 0xFF;
if (paramFF == ITEM00_3_HEARTS) {
for (i = 0; i != 3; i++) {
for (i = 0; i < 3; i++) {
spawnedActor = Item_DropCollectible(globalCtx, spawnPos, param7F00 | ITEM00_HEART | param8000);
}
} else if (paramFF == ITEM00_MUSHROOM_CLOUD) {
param7F00 >>= 8;
if (!Actor_GetCollectibleFlag(globalCtx, param7F00)) {
if (!Flags_GetCollectible(globalCtx, param7F00)) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_OBJ_KINOKO, spawnPos->x, spawnPos->y, spawnPos->z, 0, 0,
0, param7F00);
}
} else if (((paramFF == ITEM00_FLEXIBLE) || ((params & 0xFF) == ITEM00_BIG_FAIRY)) && (param10000 == 0)) {
if ((params & 0xFF) == ITEM00_FLEXIBLE) {
// TODO: fix cast, this actor is not an EnItem00
spawnedActor =
(EnItem00*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f,
} else if (((paramFF == ITEM00_FLEXIBLE) || (newParamFF == ITEM00_BIG_FAIRY)) && (param10000 == 0)) {
newParamFF = params & 0xFF;
if (newParamFF == ITEM00_FLEXIBLE) {
spawnedActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f,
spawnPos->z, 0, 0, 0, ((((param7F00 >> 8) & 0x7F) << 9) & 0xFE00) | 0x102);
if (!Actor_GetCollectibleFlag(globalCtx, (param7F00 >> 8) & 0x7F)) {
if (!Flags_GetCollectible(globalCtx, (param7F00 >> 8) & 0x7F)) {
Audio_PlaySoundAtPosition(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
}
} else {
// TODO: fix cast, this actor is not an EnItem00
spawnedActor = (EnItem00*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELFORG, spawnPos->x,
spawnPos->y + 40.0f, spawnPos->z, 0, 0, 0,
((((param7F00 >> 8) & 0x7F) & 0x7F) << 9) | 7);
spawnedActor =
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELFORG, spawnPos->x, spawnPos->y + 40.0f,
spawnPos->z, 0, 0, 0, ((((param7F00 >> 8) & 0x7F) & 0x7F) << 9) | 7);
if (param20000 == 0) {
if (!Actor_GetCollectibleFlag(globalCtx, (param7F00 >> 8) & 0x7F)) {
if (!Flags_GetCollectible(globalCtx, (param7F00 >> 8) & 0x7F)) {
Audio_PlaySoundAtPosition(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
}
}
}
} else {
if (param8000 == 0) {
params = func_800A7650(params & 0xFF);
params = func_800A7650(newParamFF);
}
if (params != (u32)ITEM00_NO_DROP) {
spawnedActor = (EnItem00*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ITEM00, spawnPos->x,
spawnPos->y, spawnPos->z, 0, 0, 0, params | param8000 | param7F00);
if ((s32)params != ITEM00_NO_DROP) {
spawnedActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ITEM00, spawnPos->x, spawnPos->y,
spawnPos->z, 0, 0, 0, (s32)params | param8000 | param7F00);
if ((spawnedActor != NULL) && (param8000 == 0)) {
if (param10000 == 0) {
spawnedActor->actor.velocity.y = 8.0f;
spawnedActor->velocity.y = 8.0f;
} else {
spawnedActor->actor.velocity.y = -2.0f;
spawnedActor->velocity.y = -2.0f;
}
spawnedActor->actor.speedXZ = 2.0f;
spawnedActor->actor.gravity = -0.9f;
spawnedActor->actor.world.rot.y = randPlusMinusPoint5Scaled(65536.0f);
Actor_SetScale(&spawnedActor->actor, 0.0f);
spawnedActor->actionFunc = func_800A6780;
spawnedActor->unk152 = 0xDC;
if ((spawnedActor->actor.params != ITEM00_SMALL_KEY) &&
(spawnedActor->actor.params != ITEM00_HEART_PIECE) &&
(spawnedActor->actor.params != ITEM00_HEART_CONTAINER)) {
spawnedActor->actor.room = -1;
spawnedActor->speedXZ = 2.0f;
spawnedActor->gravity = -0.9f;
spawnedActor->world.rot.y = randPlusMinusPoint5Scaled(65536.0f);
Actor_SetScale(spawnedActor, 0.0f);
((EnItem00*)spawnedActor)->actionFunc = func_800A6780;
((EnItem00*)spawnedActor)->unk152 = 0xDC;
if ((spawnedActor->params != ITEM00_SMALL_KEY) && (spawnedActor->params != ITEM00_HEART_PIECE) &&
(spawnedActor->params != ITEM00_HEART_CONTAINER)) {
spawnedActor->room = -1;
}
spawnedActor->actor.flags |= 0x0010;
spawnedActor->flags |= 0x0010;
}
}
}
return spawnedActor;
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_en_item00/Item_DropCollectible.s")
#endif
#ifdef NON_MATCHING
// Regalloc, minor reordering
Actor* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, u32 params) {
Actor* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s32 params) {
Actor* spawnedActor = NULL;
u32 pad;
u32 param10000;
s16 param8000;
s16 param7F00;
s32 pad;
s32 param10000 = params & 0x10000;
s16 param8000 = params & 0x8000;
s16 param7F00 = params & 0x7F00;
param10000 = params & 0x10000;
param8000 = params & 0x8000;
param7F00 = params & 0x7F00;
params &= 0xFF;
if (params == ITEM00_3_HEARTS) {
if ((params & 0xFF) == ITEM00_3_HEARTS) {
return NULL;
}
if (((params == ITEM00_FLEXIBLE) || (params == ITEM00_BIG_FAIRY)) && (param10000 == 0)) {
if (params == ITEM00_FLEXIBLE) {
if ((((params & 0xFF) == ITEM00_FLEXIBLE) || ((params & 0xFF) == ITEM00_BIG_FAIRY)) && (param10000 == 0)) {
if ((params & 0xFF) == ITEM00_FLEXIBLE) {
spawnedActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f,
spawnPos->z, 0, 0, 0, ((((param7F00 >> 8) & 0x7F) << 9) & 0xFE00) | 0x102);
} else {
@@ -941,14 +923,14 @@ Actor* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, u32 para
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELFORG, spawnPos->x, spawnPos->y + 40.0f,
spawnPos->z, 0, 0, 0, ((((param7F00 >> 8) & 0x7F) & 0x7F) << 9) | 7);
}
if (Actor_GetCollectibleFlag(globalCtx, (param7F00 >> 8) & 0x7F) == 0) {
if (Flags_GetCollectible(globalCtx, (param7F00 >> 8) & 0x7F) == 0) {
Audio_PlaySoundAtPosition(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
}
} else {
params = func_800A7650(params);
if (params != (u32)ITEM00_NO_DROP) {
params = func_800A7650(params & 0xFF);
if (params != ITEM00_NO_DROP) {
spawnedActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ITEM00, spawnPos->x, spawnPos->y,
spawnPos->z, 0, 0, 0, params | param8000 | param7F00);
spawnPos->z, 0, 0, 0, (s32)params | param8000 | param7F00);
if (spawnedActor != NULL) {
if (param8000 == 0) {
spawnedActor->velocity.y = 0.0f;
@@ -967,9 +949,6 @@ Actor* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, u32 para
return spawnedActor;
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_en_item00/Item_DropCollectible2.s")
#endif
u8 sDropTable[DROP_TABLE_SIZE * DROP_TABLE_NUMBER] = {
ITEM00_RUPEE_GREEN, ITEM00_RUPEE_GREEN, ITEM00_RUPEE_BLUE, ITEM00_NO_DROP, ITEM00_NO_DROP,
@@ -1047,17 +1026,14 @@ u8 sDropTableAmounts[DROP_TABLE_SIZE * DROP_TABLE_NUMBER] = {
0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
};
#ifdef NON_MATCHING
// Many regalloc and reordering issues
void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3f* spawnPos, s16 params) {
EnItem00* spawnedActor;
u8 dropId;
s32 dropQuantity;
s16 dropTableIndex;
s16 param8000;
s16 dropTableIndex = Rand_ZeroOne() * 16.0f;
s16 param8000 = params & 0x8000;
u8 dropFlag;
dropTableIndex = Rand_ZeroOne() * 16.0f;
param8000 = params & 0x8000;
params &= 0x1F0;
if (params < 0x101) {
@@ -1065,50 +1041,54 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3
dropQuantity = sDropTableAmounts[params + dropTableIndex];
if (dropId == ITEM00_MASK) {
dropQuantity = 1;
if (gSaveContext.playerForm != PLAYER_FORM_GORON) {
if (gSaveContext.playerForm != PLAYER_FORM_ZORA) {
if (gSaveContext.playerForm != PLAYER_FORM_HUMAN) {
dropId = ITEM00_RUPEE_GREEN;
} else {
dropId = ITEM00_ARROWS_10;
}
} else {
switch (gSaveContext.playerForm) {
case PLAYER_FORM_HUMAN:
dropId = ITEM00_ARROWS_10;
break;
case PLAYER_FORM_ZORA:
dropId = ITEM00_HEART;
}
} else {
dropId = ITEM00_MAGIC_SMALL;
break;
case PLAYER_FORM_GORON:
dropId = ITEM00_MAGIC_SMALL;
break;
default:
dropId = ITEM00_RUPEE_GREEN;
break;
}
dropQuantity = 1;
}
if (fromActor != NULL) {
if (fromActor->dropFlag != 0) {
if ((fromActor->dropFlag & 1) != 0) {
dropFlag = fromActor->dropFlag;
if (dropFlag != 0) {
if (fromActor->dropFlag & 1) {
params = 0x10;
dropId = ITEM00_ARROWS_30;
dropQuantity = 1;
} else if (fromActor->dropFlag & 2) {
params = 0x10;
} else if ((fromActor->dropFlag & 2) != 0) {
dropId = ITEM00_HEART;
params = 0x10;
} else if ((fromActor->dropFlag & 0x20) != 0) {
dropQuantity = 1;
} else if (fromActor->dropFlag & 0x20) {
dropId = ITEM00_RUPEE_PURPLE;
dropQuantity = 1;
}
dropQuantity = 1;
}
}
if (dropId == ITEM00_FLEXIBLE) {
if (gSaveContext.health < 0x11) {
if (gSaveContext.health <= 0x10) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f,
spawnPos->z, 0, 0, 0, 2);
Audio_PlaySoundAtPosition(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
return;
}
if (gSaveContext.health < 0x31) {
if (gSaveContext.health <= 0x30) {
params = 0x10;
dropId = ITEM00_HEART;
dropQuantity = 3;
} else if (gSaveContext.health < 0x51) {
} else if (gSaveContext.health <= 0x50) {
params = 0x10;
dropId = ITEM00_HEART;
dropQuantity = 1;
@@ -1132,6 +1112,8 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3
params = 0xA0;
dropId = ITEM00_RUPEE_RED;
dropQuantity = 1;
} else {
return;
}
}
@@ -1167,18 +1149,16 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3
}
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_en_item00/Item_DropCollectibleRandom.s")
#endif
s32 D_801AE194[32] = { ITEM00_NO_DROP, ITEM00_RUPEE_GREEN, ITEM00_RUPEE_BLUE, ITEM00_NO_DROP,
ITEM00_RUPEE_RED, ITEM00_RUPEE_PURPLE, ITEM00_NO_DROP, ITEM00_RUPEE_HUGE,
ITEM00_COMPASS, ITEM00_MUSHROOM_CLOUD, ITEM00_HEART, ITEM00_3_HEARTS,
ITEM00_HEART_PIECE, ITEM00_HEART_CONTAINER, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_LARGE,
ITEM00_FLEXIBLE, ITEM00_BIG_FAIRY, ITEM00_NO_DROP, ITEM00_NUTS_10,
ITEM00_NO_DROP, ITEM00_BOMBS_A, ITEM00_NO_DROP, ITEM00_NO_DROP,
ITEM00_NO_DROP, ITEM00_STICK, ITEM00_NO_DROP, ITEM00_NO_DROP,
ITEM00_NO_DROP, ITEM00_NO_DROP, ITEM00_ARROWS_10, ITEM00_ARROWS_30 };
s32 D_801AE194[32] = {
ITEM00_NO_DROP, ITEM00_RUPEE_GREEN, ITEM00_RUPEE_BLUE, ITEM00_NO_DROP, ITEM00_RUPEE_RED,
ITEM00_RUPEE_PURPLE, ITEM00_NO_DROP, ITEM00_RUPEE_HUGE, ITEM00_COMPASS, ITEM00_MUSHROOM_CLOUD,
ITEM00_HEART, ITEM00_3_HEARTS, ITEM00_HEART_PIECE, ITEM00_HEART_CONTAINER, ITEM00_MAGIC_SMALL,
ITEM00_MAGIC_LARGE, ITEM00_FLEXIBLE, ITEM00_BIG_FAIRY, ITEM00_NO_DROP, ITEM00_NUTS_10,
ITEM00_NO_DROP, ITEM00_BOMBS_A, ITEM00_NO_DROP, ITEM00_NO_DROP, ITEM00_NO_DROP,
ITEM00_STICK, ITEM00_NO_DROP, ITEM00_NO_DROP, ITEM00_NO_DROP, ITEM00_NO_DROP,
ITEM00_ARROWS_10, ITEM00_ARROWS_30,
};
s32 func_800A8150(s32 index) {
if ((index < 0) || (index >= ARRAY_COUNT(D_801AE194))) {
@@ -1188,9 +1168,7 @@ s32 func_800A8150(s32 index) {
return D_801AE194[index];
}
u8 D_801AE214[32] = {
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
u8 D_801AE214[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
s32 func_800A817C(s32 index) {
if ((index < 0) || (index >= ARRAY_COUNT(D_801AE214))) {
@@ -1201,5 +1179,5 @@ s32 func_800A817C(s32 index) {
}
s32 func_800A81A4(GlobalContext* globalCtx, s32 a1, s32 a2) {
return (func_800A8150(a1) == ITEM00_BIG_FAIRY) && (!Actor_GetCollectibleFlag(globalCtx, a2));
return (func_800A8150(a1) == ITEM00_BIG_FAIRY) && (!Flags_GetCollectible(globalCtx, a2));
}
+3 -3
View File
@@ -24,7 +24,7 @@ void* KaleidoManager_FaultAddrConvFunc(void* address, void* param) {
uintptr_t offset;
if (ovl != NULL) {
size = (u8*)ovl->vramEnd - (u8*)ovl->vramStart;
size = VRAM_PTR_SIZE(ovl);
ramStart = ovl->loadedRamAddr;
ramEnd = ramStart + size;
offset = (u8*)ovl->vramStart - ramStart;
@@ -47,7 +47,7 @@ void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl) {
void KaleidoManager_ClearOvl(KaleidoMgrOverlay* ovl) {
if (ovl->loadedRamAddr != NULL) {
ovl->offset = 0;
bzero(ovl->loadedRamAddr, (uintptr_t)ovl->vramEnd - (uintptr_t)ovl->vramStart);
bzero(ovl->loadedRamAddr, VRAM_PTR_SIZE(ovl));
ovl->loadedRamAddr = NULL;
gKaleidoMgrCurOvl = NULL;
}
@@ -59,7 +59,7 @@ void KaleidoManager_Init(GlobalContext* globalCtx) {
u32 i;
for (i = 0; i < ARRAY_COUNT(gKaleidoMgrOverlayTable); i++) {
size = (uintptr_t)gKaleidoMgrOverlayTable[i].vramEnd - (uintptr_t)gKaleidoMgrOverlayTable[i].vramStart;
size = VRAM_PTR_SIZE(&gKaleidoMgrOverlayTable[i]);
if (size > largestSize) {
largestSize = size;
}
+2 -2
View File
@@ -399,9 +399,9 @@ void LifeMeter_UpdateSizeAndBeep(GlobalContext* globalCtx) {
if (interfaceCtx->lifeSizeChange <= 0) {
interfaceCtx->lifeSizeChange = 0;
interfaceCtx->lifeSizeChangeDirection = 0;
if (func_801233E4(globalCtx) == 0 && (globalCtx->pauseCtx.state == 0) &&
if (Player_InCsMode(&globalCtx->state) == 0 && (globalCtx->pauseCtx.state == 0) &&
(globalCtx->pauseCtx.debugState == 0) && LifeMeter_IsCritical() && func_801690CC(globalCtx) == 0) {
// func_801233E4 and func_801690CC : Check if in Cutscene
// Player_InCsMode and func_801690CC : Check if in Cutscene
play_sound(NA_SE_SY_HITPOINT_ALARM);
}
}
+1 -1
View File
@@ -382,7 +382,7 @@ void Lights_GlowCheck(GlobalContext* globalCtx) {
pos.x = params->x;
pos.y = params->y;
pos.z = params->z;
func_800B4EDC(globalCtx, &pos, &multDest, &wDest);
Actor_GetProjectedPos(globalCtx, &pos, &multDest, &wDest);
params->drawGlow = 0;
+1 -1
View File
@@ -80,7 +80,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80152464.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80152498.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/Message_GetState.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8015268C.s")
+2 -2
View File
@@ -38,7 +38,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80123358.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_801233E4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/Player_InCsMode.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80123420.s")
@@ -114,7 +114,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8012422C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80124258.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/Player_GetExplosiveHeld.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80124278.s")
+1 -1
View File
@@ -608,7 +608,7 @@ void Quake2_Update(void) {
player = GET_PLAYER(globalCtx);
if (&player->actor != NULL) {
func_800B8248(&playerPosRot, player);
Actor_GetWorldPosShapeRot(&playerPosRot, &player->actor);
}
angle1Speed = 359.2f;
+2 -2
View File
@@ -20,7 +20,7 @@ s32 func_8013A240(GlobalContext* globalCtx) {
}
for (; type < 12; type++) {
for (actor = globalCtx->actorCtx.actorList[type].first; actor != NULL; actor = actor->next) {
for (actor = globalCtx->actorCtx.actorLists[type].first; actor != NULL; actor = actor->next) {
seen = 0;
switch (globalCtx->sceneNum) {
@@ -134,7 +134,7 @@ s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos,
ret |= 0x3e;
}
func_800B4EDC(globalCtx, pos, &screenSpace, &distance);
Actor_GetProjectedPos(globalCtx, pos, &screenSpace, &distance);
x = (s16)(screenSpace.x * distance * 160.0f + 160.0f) - 85;
y = (s16)(screenSpace.y * distance * -120.0f + 120.0f) - 67;
if ((x < 0) || (0x96 < x) || (y < 0) || (0x69 < y)) {
+107 -5
View File
@@ -1,6 +1,40 @@
#include "global.h"
/*
* File: z_sub_s.c
* Description: Various miscellaneous helpers
*/
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013A7C0.s")
#include "global.h"
#include "overlays/actors/ovl_En_Door/z_en_door.h"
/**
* Finds the first EnDoor instance with unk_1A4 == 5 and the specified unk_1A5.
*/
EnDoor* SubS_FindDoor(GlobalContext* globalCtx, s32 unk_1A5) {
Actor* actor = NULL;
EnDoor* door;
while (true) {
actor = SubS_FindActor(globalCtx, actor, ACTORCAT_DOOR, ACTOR_EN_DOOR);
door = (EnDoor*)actor;
if (actor == NULL) {
break;
}
if ((door->unk_1A4 == 5) && (door->unk_1A5 == (u8)unk_1A5)) {
break;
}
if (actor->next == NULL) {
door = NULL;
break;
}
actor = actor->next;
}
return door;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013A860.s")
@@ -26,7 +60,40 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013BB34.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013BB7C.s")
/**
* Finds the nearest actor instance of a specified Id and category to an actor.
*/
Actor* SubS_FindNearestActor(Actor* actor, GlobalContext* globalCtx, u8 actorCategory, s16 actorId) {
Actor* actorIter = NULL;
Actor* actorTmp;
f32 dist;
Actor* closestActor = NULL;
f32 minDist = 99999.0f;
s32 isSetup = false;
do {
actorIter = SubS_FindActor(globalCtx, actorIter, actorCategory, actorId);
actorTmp = actorIter;
if (actorTmp == NULL) {
break;
}
actorIter = actorTmp;
if (actorIter != actor) {
dist = Actor_DistanceBetweenActors(actor, actorIter);
if (!isSetup || dist < minDist) {
closestActor = actorIter;
minDist = dist;
isSetup = true;
}
}
actorIter = actorIter->next;
} while (actorIter != NULL);
return closestActor;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013BC6C.s")
@@ -68,7 +135,22 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013D924.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_ActorCategoryIterateById.s")
/**
* Finds the first actor instance of a specified Id and category.
*/
Actor* SubS_FindActor(GlobalContext* globalCtx, Actor* actorListStart, u8 actorCategory, s16 actorId) {
Actor* actor = actorListStart;
if (actor == NULL) {
actor = globalCtx->actorCtx.actorLists[actorCategory].first;
}
while (actor != NULL && actorId != actor->id) {
actor = actor->next;
}
return actor;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013D9C8.s")
@@ -100,7 +182,27 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013E5CC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013E640.s")
/**
* Finds the first actor instance of a specified Id and category verified with a custom callback.
* The callback should return `true` when the actor is succesfully verified.
*/
Actor* SubS_FindActorCustom(GlobalContext* globalCtx, Actor* actor, Actor* actorListStart, u8 actorCategory,
s16 actorId, void* verifyData, VerifyActor verifyActor) {
Actor* actorIter = actorListStart;
if (actorListStart == NULL) {
actorIter = globalCtx->actorCtx.actorLists[actorCategory].first;
}
while (actorIter != NULL && (actorId != actorIter->id ||
(actorId == actorIter->id &&
(verifyActor == NULL ||
(verifyActor != NULL && !verifyActor(globalCtx, actor, actorIter, verifyData)))))) {
actorIter = actorIter->next;
}
return actorIter;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013E748.s")
+1 -1
View File
@@ -7,7 +7,7 @@ s32 __osContChannelReset(OSMesgQueue* mq, s32 channel) {
__osSiGetAccess();
__osPfsPifRam.pifstatus = 1;
__osPfsPifRam.status = 1;
for (i = 0; i < channel; i++) {
*bufptr++ = 0;
+36
View File
@@ -1,6 +1,42 @@
#include "ultra64.h"
#include "global.h"
__OSInode __osPfsInodeCache;
OSViMode osViModeNtscHpn1 = {
8, // type
{
// comRegs
0x324E, // ctrl
0x500, // width
0x3E52239, // burst
0x20C, // vSync
0xC15, // hSync
0xC150C15, // leap
0x6C02EC, // hStart
0x400, // xScale
0, // vCurrent
},
{ // fldRegs
{
// [0]
0x500, // origin
0x400, // yScale
0x2301FD, // vStart
0xE0204, // vBurst
2, // vIntr
},
{
// [1]
0xA00, // origin
0x400, // yScale
0x2501FF, // vStart
0xE0204, // vBurst
2, // vIntr
} },
};
s32 __osPfsInodeCacheChannel = -1;
u8 __osPfsInodeCacheBank = 250;
u16 __osSumcalc(u8* ptr, s32 length) {
s32 i;
u32 sum = 0;
+1 -1
View File
@@ -47,7 +47,7 @@ void __osPackReadData() {
__osContPifRam.ramarray[i] = 0;
}
__osContPifRam.pifstatus = 1;
__osContPifRam.status = 1;
readformat.dummy = 255;
readformat.txsize = 1;
readformat.rxsize = 4;
+1 -1
View File
@@ -78,7 +78,7 @@ void __osPackRequestData(u8 poll) {
__osContPifRam.ramarray[i] = 0;
}
__osContPifRam.pifstatus = 1;
__osContPifRam.status = 1;
ptr = (u8*)__osContPifRam.ramarray;
requestHeader.align = 255;
requestHeader.txsize = 1;
+1 -1
View File
@@ -20,7 +20,7 @@ s32 __osMotorAccess(OSPfs* pfs, u32 vibrate) {
}
__osSiGetAccess();
osPifBuffers[pfs->channel].pifstatus = 1;
osPifBuffers[pfs->channel].status = 1;
buf += pfs->channel;
for (i = 0; i < BLOCKSIZE; i++) {
((__OSContRamReadFormat*)buf)->data[i] = vibrate;
+71 -3
View File
@@ -1,7 +1,75 @@
#include "ultra64.h"
#include "global.h"
#pragma GLOBAL_ASM("asm/non_matchings/boot/pfsgetstatus/__osPfsGetStatus.s")
void __osPfsRequestOneChannel(s32 channel, u8 poll);
void __osPfsGetOneChannelData(s32 channel, OSContStatus* contData);
#pragma GLOBAL_ASM("asm/non_matchings/boot/pfsgetstatus/__osPfsRequestOneChannel.s")
s32 __osPfsGetStatus(OSMesgQueue* queue, s32 channel) {
s32 ret = 0;
OSMesg msg;
OSContStatus data;
#pragma GLOBAL_ASM("asm/non_matchings/boot/pfsgetstatus/__osPfsGetOneChannelData.s")
__osPfsInodeCacheBank = 250;
__osPfsRequestOneChannel(channel, CONT_CMD_REQUEST_STATUS);
ret = __osSiRawStartDma(OS_WRITE, &__osPfsPifRam);
osRecvMesg(queue, &msg, OS_MESG_BLOCK);
ret = __osSiRawStartDma(OS_READ, &__osPfsPifRam);
osRecvMesg(queue, &msg, OS_MESG_BLOCK);
__osPfsGetOneChannelData(channel, &data);
if (((data.status & CONT_CARD_ON) != 0) && ((data.status & CONT_CARD_PULL) != 0)) {
return PFS_ERR_NEW_PACK;
} else if (data.errno || ((data.status & CONT_CARD_ON) == 0)) {
return PFS_ERR_NOPACK;
} else if ((data.status & CONT_ADDR_CRC_ER) != 0) {
return PFS_ERR_CONTRFAIL;
}
return ret;
}
void __osPfsRequestOneChannel(s32 channel, u8 poll) {
u8* bufptr;
__OSContRequestHeaderAligned req;
s32 idx;
__osContLastPoll = CONT_CMD_END;
__osPfsPifRam.status = CONT_CMD_READ_BUTTON;
bufptr = (u8*)&__osPfsPifRam;
req.txsize = 1;
req.rxsize = 3;
req.poll = poll;
req.typeh = 0xFF;
req.typel = 0xFF;
req.status = 0xFF;
for (idx = 0; idx < channel; idx++) {
*bufptr++ = 0;
}
*((__OSContRequestHeaderAligned*)bufptr) = req;
bufptr += sizeof(req);
*((u8*)bufptr) = CONT_CMD_END;
}
void __osPfsGetOneChannelData(s32 channel, OSContStatus* contData) {
u8* bufptr = (u8*)&__osPfsPifRam;
__OSContRequestHeaderAligned req;
s32 idx;
for (idx = 0; idx < channel; idx++) {
bufptr++;
}
req = *((__OSContRequestHeaderAligned*)bufptr);
contData->errno = (req.rxsize & 0xC0) >> 4;
if (contData->errno) {
return;
}
contData->type = (req.typel << 8) | req.typeh;
contData->status = req.status;
}
+1 -1
View File
@@ -55,7 +55,7 @@ void __osPfsRequestData(u8 poll) {
__osContLastPoll = poll;
__osPfsPifRam.pifstatus = 1;
__osPfsPifRam.status = 1;
req.align = 0xFF;
req.txsize = 1;
+121 -2
View File
@@ -1,5 +1,124 @@
#include "ultra64.h"
#include "global.h"
#pragma GLOBAL_ASM("asm/non_matchings/boot/pfsreadwritefile/__osPfsGetNextPage.s")
#define CHECK_IPAGE(p, pfs) \
(((p).ipage >= (pfs).inodeStartPage) && ((p).inode_t.bank < (pfs).banks) && ((p).inode_t.page >= 0x01) && \
((p).inode_t.page < 0x80))
#pragma GLOBAL_ASM("asm/non_matchings/boot/pfsreadwritefile/osPfsReadWriteFile.s")
s32 __osPfsGetNextPage(OSPfs* pfs, u8* bank, __OSInode* inode, __OSInodeUnit* page) {
s32 ret;
if (page->inode_t.bank != *bank) {
*bank = page->inode_t.bank;
if ((ret = __osPfsRWInode(pfs, inode, PFS_READ, *bank)) != 0) {
return ret;
}
}
*page = inode->inodePage[page->inode_t.page];
if (!CHECK_IPAGE(*page, *pfs)) {
if (page->ipage == PFS_EOF) {
return PFS_ERR_INVALID;
}
return PFS_ERR_INCONSISTENT;
}
return 0;
}
s32 osPfsReadWriteFile(OSPfs* pfs, s32 fileNo, u8 flag, s32 offset, s32 size, u8* data) {
s32 ret;
__OSDir dir;
__OSInode inode;
__OSInodeUnit curPage;
s32 curBlock;
s32 blockSize;
u8* buffer;
u8 bank;
u16 blockno;
if ((fileNo >= pfs->dir_size) || (fileNo < 0)) {
return PFS_ERR_INVALID;
}
if ((size <= 0) || ((size % BLOCKSIZE) != 0)) {
return PFS_ERR_INVALID;
}
if ((offset < 0) || ((offset % BLOCKSIZE) != 0)) {
return PFS_ERR_INVALID;
}
if (!(pfs->status & PFS_INITIALIZED)) {
return PFS_ERR_INVALID;
}
if (__osCheckId(pfs) == PFS_ERR_NEW_PACK) {
return PFS_ERR_NEW_PACK;
}
if (pfs->activebank != PFS_ID_BANK_256K && (ret = __osPfsSelectBank(pfs, PFS_ID_BANK_256K)) != 0) {
return ret;
}
if ((ret = __osContRamRead(pfs->queue, pfs->channel, pfs->dir_table + fileNo, (u8*)&dir)) != 0) {
return ret;
}
if ((dir.company_code == 0) || (dir.game_code == 0)) {
return PFS_ERR_INVALID;
}
if (!CHECK_IPAGE(dir.start_page, *pfs)) {
if (dir.start_page.ipage == PFS_EOF) {
return PFS_ERR_INVALID;
}
return PFS_ERR_INCONSISTENT;
}
if ((flag == PFS_READ) && ((dir.status & PFS_WRITTEN) == 0)) {
return PFS_ERR_BAD_DATA;
}
bank = 255;
curBlock = offset / BLOCKSIZE;
curPage = dir.start_page;
while (curBlock >= 8) {
if ((ret = __osPfsGetNextPage(pfs, &bank, &inode, &curPage)) != 0) {
return ret;
}
curBlock -= 8;
}
blockSize = size / BLOCKSIZE;
buffer = data;
while (blockSize > 0) {
if (curBlock == 8) {
if ((ret = __osPfsGetNextPage(pfs, &bank, &inode, &curPage)) != 0) {
return ret;
}
curBlock = 0;
}
if (pfs->activebank != curPage.inode_t.bank && (ret = __osPfsSelectBank(pfs, curPage.inode_t.bank)) != 0) {
return ret;
}
blockno = curPage.inode_t.page * PFS_ONE_PAGE + curBlock;
if (flag == PFS_READ) {
ret = __osContRamRead(pfs->queue, pfs->channel, blockno, buffer);
} else {
ret = __osContRamWrite(pfs->queue, pfs->channel, blockno, buffer, 0);
}
if (ret != 0) {
return ret;
}
buffer += BLOCKSIZE;
curBlock++;
blockSize--;
}
if (flag == PFS_WRITE && !(dir.status & PFS_WRITTEN)) {
dir.status |= PFS_WRITTEN;
if (pfs->activebank != PFS_ID_BANK_256K && (ret = __osPfsSelectBank(pfs, PFS_ID_BANK_256K)) != 0) {
return ret;
}
if ((ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->dir_table + fileNo, (u8*)&dir, 0)) != 0) {
return ret;
}
}
return __osPfsGetStatus(pfs->queue, pfs->channel);
}
+1 -1
View File
@@ -12,7 +12,7 @@ s32 __osVoiceGetStatus(OSMesgQueue* mq, s32 port, u8* status) {
do {
if (ret != CONT_ERR_CONTRFAIL) {
__osContPifRam.pifstatus = CONT_CMD_READ_BUTTON;
__osContPifRam.status = CONT_CMD_READ_BUTTON;
for (i = 0; i < port; i++, *ptr++ = 0) {
;
@@ -77,7 +77,7 @@ void ArmsHook_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void ArmsHook_Wait(ArmsHook* this, GlobalContext* globalCtx) {
if (this->actor.parent == NULL) {
ArmsHook_SetupAction(this, ArmsHook_Shoot);
func_800B6C04(&this->actor, 20.0f);
Actor_SetSpeeds(&this->actor, 20.0f);
this->actor.parent = &GET_PLAYER(globalCtx)->actor;
this->timer = 26;
}
@@ -90,7 +90,7 @@ void func_808C1154(ArmsHook* this) {
s32 ArmsHook_AttachToPlayer(ArmsHook* this, Player* player) {
player->actor.child = &this->actor;
player->leftHandActor = &this->actor;
player->heldActor = &this->actor;
if (this->actor.child != NULL) {
player->actor.parent = this->actor.child = NULL;
return 1;
@@ -237,7 +237,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
Vec3f prevFrameDiff;
Vec3f sp60;
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Math_Vec3f_Diff(&this->actor.world.pos, &this->actor.prevPos, &prevFrameDiff);
Math_Vec3f_Sum(&this->unk1E0, &prevFrameDiff, &this->unk1E0);
this->actor.shape.rot.x = Math_FAtan2F(this->actor.speedXZ, -this->actor.velocity.y);
@@ -162,7 +162,7 @@ void ArrowIce_Fly(ArrowIce* this, GlobalContext* globalCtx) {
ArrowIce_LerpFiredPosition(&this->firedPos, &this->actor.world.pos, 0.05f);
if (arrow->unk_261 & 1) {
Audio_PlayActorSound2(&this->actor, NA_SE_IT_EXPLOSION_ICE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_IT_EXPLOSION_ICE);
ArrowIce_SetupAction(this, ArrowIce_Hit);
this->timer = 32;
this->alpha = 255;
@@ -123,7 +123,7 @@ void BgCtowerGear_Splash(BgCtowerGear* this, GlobalContext* globalCtx) {
}
}
}
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WATERWHEEL_LEVEL);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WATERWHEEL_LEVEL);
}
}
@@ -200,7 +200,7 @@ void BgCtowerGear_UpdateOrgan(Actor* thisx, GlobalContext* globalCtx) {
// Using BgCtowerGear *this = THIS causes regalloc issues
void BgCtowerGear_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_80AD32E8[BGCTOWERGEAR_GET_TYPE(thisx)]);
Gfx_DrawDListOpa(globalCtx, D_80AD32E8[BGCTOWERGEAR_GET_TYPE(thisx)]);
}
void BgCtowerGear_DrawOrgan(Actor* thisx, GlobalContext* globalCtx) {
@@ -67,7 +67,7 @@ void BgCtowerRot_Init(Actor* thisx, GlobalContext* globalCtx) {
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06017650);
this->dyna.actor.world.rot.y = this->dyna.actor.shape.rot.y - 0x4000;
}
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
Actor_OffsetOfPointInActorCoords(&this->dyna.actor, &offset, &player->actor.world.pos);
if (offset.z < 0.0f) {
this->dyna.actor.world.pos.x = this->dyna.actor.home.pos.x + (Math_SinS(this->dyna.actor.world.rot.y) * 80.0f);
this->dyna.actor.world.pos.z = this->dyna.actor.home.pos.z + (Math_CosS(this->dyna.actor.world.rot.y) * 80.0f);
@@ -91,7 +91,7 @@ void BgCtowerRot_CorridorRotate(BgCtowerRot* this, GlobalContext* globalCtx) {
f32 offsetDiffZ;
f32 rotZtmp;
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
Actor_OffsetOfPointInActorCoords(&this->dyna.actor, &offset, &player->actor.world.pos);
if (offset.z > 1100.0f) {
rotZ = 0.0f;
} else {
@@ -114,7 +114,7 @@ void BgCtowerRot_DoorDoNothing(BgCtowerRot* this, GlobalContext* globalCtx) {
void BgCtowerRot_DoorClose(BgCtowerRot* this, GlobalContext* globalCtx) {
if (!Math_SmoothStepToF(&this->timer, 0.0f, 0.1f, 15.0f, 0.1f)) {
if (this->dyna.actor.params == MAIN_DOOR) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP);
ActorCutscene_Stop(this->dyna.actor.cutscene);
}
this->actionFunc = BgCtowerRot_DoorDoNothing;
@@ -131,7 +131,7 @@ void BgCtowerRot_DoorIdle(BgCtowerRot* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
Vec3f offset;
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
Actor_OffsetOfPointInActorCoords(&this->dyna.actor, &offset, &player->actor.world.pos);
if (offset.z > 30.0f) {
this->unk160 = 0.0f;
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
@@ -159,8 +159,8 @@ void BgCtowerRot_Update(Actor* thisx, GlobalContext* globalCtx) {
void BgCtowerRot_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgCtowerRot* this = THIS;
func_800BDFC0(globalCtx, bgCtowerRotDlists[this->dyna.actor.params]);
Gfx_DrawDListOpa(globalCtx, bgCtowerRotDlists[this->dyna.actor.params]);
if (this->dyna.actor.params == CORRIDOR) {
func_800BE03C(globalCtx, D_060129D0);
Gfx_DrawDListXlu(globalCtx, D_060129D0);
}
}
@@ -95,8 +95,8 @@ void func_80B401F8(BgGoronOyu* this, GlobalContext* globalCtx) {
if (dist.x >= 0.0f && dist.x <= this->waterBoxXLength && dist.z >= 0.0f && dist.z <= this->waterBoxZLength &&
fabsf(dist.y) < 100.0f && player->actor.depthInWater > 12.0f) {
func_800B8A1C(&this->dyna.actor, globalCtx, 0xBA, this->dyna.actor.xzDistToPlayer,
fabsf(this->dyna.actor.playerHeightRel));
Actor_PickUp(&this->dyna.actor, globalCtx, 0xBA, this->dyna.actor.xzDistToPlayer,
fabsf(this->dyna.actor.playerHeightRel));
}
}
@@ -53,7 +53,7 @@ void BgHakaCurtain_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06001588);
if (Actor_GetRoomCleared(globalCtx, this->dyna.actor.room)) {
if (Flags_GetClear(globalCtx, this->dyna.actor.room)) {
func_80B6DE80(this);
return;
}
@@ -71,7 +71,7 @@ void func_80B6DC98(BgHakaCurtain* this) {
}
void func_80B6DCAC(BgHakaCurtain* this, GlobalContext* globalCtx) {
if (Actor_GetRoomCleared(globalCtx, this->dyna.actor.room)) {
if (Flags_GetClear(globalCtx, this->dyna.actor.room)) {
func_80B6DCEC(this);
}
}
@@ -137,5 +137,5 @@ void BgHakaCurtain_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgHakaCurtain_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_06001410);
Gfx_DrawDListOpa(globalCtx, D_06001410);
}
@@ -84,11 +84,10 @@ s32 func_80BD6638(s16* arg0, s16* arg1, s32 arg2) {
void func_80BD66AC(BgHakaTomb* this, GlobalContext* globalCtx) {
s16 temp;
if (Actor_GetRoomCleared(globalCtx, this->dyna.actor.room)) {
if (Flags_GetClear(globalCtx, this->dyna.actor.room)) {
this->dyna.actor.flags |= 9;
}
if (!func_80BD6638(&temp, this->cutscenes, 1) && (temp < 0) &&
Actor_GetRoomCleared(globalCtx, this->dyna.actor.room)) {
if (!func_80BD6638(&temp, this->cutscenes, 1) && (temp < 0) && Flags_GetClear(globalCtx, this->dyna.actor.room)) {
this->dyna.actor.flags |= 1;
if (this->dyna.actor.isTargeted) {
func_80BD6754(this);
@@ -129,5 +128,5 @@ void BgHakaTomb_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgHakaTomb_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_060007B0);
Gfx_DrawDListOpa(globalCtx, D_060007B0);
}
@@ -187,7 +187,7 @@ void func_80A9B160(BgHakuginPostUnkStruct* unkStruct, GlobalContext* globalCtx)
unkStruct->unk_0000[i].unk_24 = 0.0f;
unkStruct->unk_0000[i].unk_34 = 1;
if (D_80A9D880[unkStruct->unk_0000[i].unk_00].unk_04 != 0) {
Actor_UnsetSwitchFlag(globalCtx, unkStruct->unk_0000[i].unk_2E);
Flags_UnsetSwitch(globalCtx, unkStruct->unk_0000[i].unk_2E);
}
}
}
@@ -261,7 +261,7 @@ void func_80A9B3BC(BgHakuginPost* this, GlobalContext* globalCtx) {
}
if (!(sp20 | sp1C)) {
Actor_SetSwitchFlag(globalCtx, sp28);
Flags_SetSwitch(globalCtx, sp28);
this->unk_170 = true;
} else {
this->unk_170 = sp20;
@@ -290,9 +290,9 @@ void func_80A9B46C(BgHakuginPost* this, GlobalContext* globalCtx) {
}
if (!this->unk_170 && (sp28 == 1)) {
Actor_UnsetSwitchFlag(globalCtx, sp2C);
Flags_UnsetSwitch(globalCtx, sp2C);
} else if (!this->unk_174 && (sp24 == 1)) {
Actor_UnsetSwitchFlag(globalCtx, sp30);
Flags_UnsetSwitch(globalCtx, sp30);
}
this->unk_170 = sp28;
@@ -682,9 +682,9 @@ void func_80A9C854(BgHakuginPost* this, GlobalContext* globalCtx) {
}
if (sp38) {
Actor_SetSwitchFlag(globalCtx, this->dyna.actor.home.rot.x & 0x7F);
Flags_SetSwitch(globalCtx, this->dyna.actor.home.rot.x & 0x7F);
} else {
Actor_UnsetSwitchFlag(globalCtx, this->dyna.actor.home.rot.x & 0x7F);
Flags_UnsetSwitch(globalCtx, this->dyna.actor.home.rot.x & 0x7F);
}
}
@@ -840,9 +840,9 @@ void func_80A9CE1C(BgHakuginPost* this, GlobalContext* globalCtx) {
temp = (s16)(this->dyna.actor.yawTowardsPlayer + 0x58F0);
D_80A9E028.unk_0000[i].unk_28 = ((s16)(player->actor.shape.rot.y - temp) / 3) + temp;
D_80A9E028.unk_0000[i].unk_34 = 2;
func_800B8E58(&player->actor, NA_SE_IT_HAMMER_HIT);
func_800B8E58(player, NA_SE_IT_HAMMER_HIT);
func_8019F128(NA_SE_EV_SLIDE_DOOR_OPEN);
Actor_SetSwitchFlag(globalCtx, D_80A9E028.unk_0000[i].unk_2E);
Flags_SetSwitch(globalCtx, D_80A9E028.unk_0000[i].unk_2E);
this->unk_178 = 20;
func_80A9D2C4(this, func_80A9CE00, D_80A9E028.unk_0000[i].unk_14.y + 50.0f,
D_80A9E028.unk_0000[i].unk_2A, D_80A9E028.unk_0000[i].unk_2C);
@@ -56,7 +56,7 @@ const ActorInit Bg_Icicle_InitVars = {
static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneScale, 1500, ICHAIN_CONTINUE),
ICHAIN_F32(gravity, -3, ICHAIN_CONTINUE),
ICHAIN_F32(minVelocityY, -30, ICHAIN_CONTINUE),
ICHAIN_F32(terminalVelocity, -30, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
@@ -144,7 +144,7 @@ void BgIcicle_Shiver(BgIcicle* this, GlobalContext* globalCtx) {
}
if (!(this->shiverTimer % 4)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_ICE_SWING);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_ICE_SWING);
}
if (this->shiverTimer == 0) {
@@ -184,7 +184,7 @@ void BgIcicle_Fall(BgIcicle* this, GlobalContext* globalCtx) {
return;
}
} else {
Actor_SetVelocityAndMoveYRotationAndGravity(&this->dyna.actor);
Actor_MoveWithGravity(&this->dyna.actor);
this->dyna.actor.world.pos.y += 40.0f;
Actor_UpdateBgCheckInfo(globalCtx, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
this->dyna.actor.world.pos.y -= 40.0f;
@@ -245,5 +245,5 @@ void BgIcicle_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgIcicle_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_060000D0);
Gfx_DrawDListOpa(globalCtx, D_060000D0);
}
@@ -119,5 +119,5 @@ void BgIkanaRay_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgIkanaRay* this = THIS;
AnimatedMat_Draw(globalCtx, this->animatedTextures);
func_800BE03C(globalCtx, D_06001100);
Gfx_DrawDListXlu(globalCtx, D_06001100);
}
@@ -77,7 +77,7 @@ void BgIkanaShutter_Init(Actor* thisx, GlobalContext* globalCtx) {
func_80BD5828(this);
return;
}
if (Actor_GetRoomCleared(globalCtx, this->dyna.actor.room)) {
if (Flags_GetClear(globalCtx, this->dyna.actor.room)) {
BgIkanaShutter_SetupDoNothing(this);
return;
}
@@ -166,7 +166,7 @@ void func_80BD5AE8(BgIkanaShutter* this) {
}
void func_80BD5B04(BgIkanaShutter* this, GlobalContext* globalCtx) {
if (Actor_GetRoomClearedTemp(globalCtx, this->dyna.actor.room)) {
if (Flags_GetClearTemp(globalCtx, this->dyna.actor.room)) {
func_80BD5B44(this);
}
}
@@ -179,7 +179,7 @@ void func_80BD5B44(BgIkanaShutter* this) {
void func_80BD5B60(BgIkanaShutter* this, GlobalContext* globalCtx) {
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
Actor_SetRoomCleared(globalCtx, this->dyna.actor.room);
Flags_SetClear(globalCtx, this->dyna.actor.room);
func_80BD5BC4(this);
return;
}
@@ -213,5 +213,5 @@ void BgIkanaShutter_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgIkanaShutter_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_06000CE8);
Gfx_DrawDListOpa(globalCtx, D_06000CE8);
}
@@ -57,7 +57,7 @@ s32 func_80C0A740(BgIkninSusceil* this, GlobalContext* globalCtx) {
Vec3f offset;
Player* player = GET_PLAYER(globalCtx);
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
Actor_OffsetOfPointInActorCoords(&this->dyna.actor, &offset, &player->actor.world.pos);
return (D_80C0B0E8.x < offset.z) && (offset.z < D_80C0B0E8.y) && (offset.x > -240.0f) && (offset.x < D_80C0B0E4);
}
@@ -94,7 +94,7 @@ s32 func_80C0A95C(BgIkninSusceil* this, GlobalContext* globalCtx) {
Vec3f offset;
f32 temp1, temp2, temp3, temp4;
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
Actor_OffsetOfPointInActorCoords(&this->dyna.actor, &offset, &player->actor.world.pos);
for (i = 0; i < 7; i++) {
temp3 = (D_80C0B0F0[i] * 80.0f) + 0.5f;
temp4 = (D_80C0B0F0[i] * 80.0f) + 79.5f;
@@ -155,8 +155,8 @@ void func_80C0ABA8(BgIkninSusceil* this, GlobalContext* globalCtx) {
this->dyna.actor.world.pos.y += this->dyna.actor.velocity.y;
if (this->dyna.actor.world.pos.y <= this->dyna.actor.home.pos.y) {
func_80C0A86C(this, globalCtx, 4, 14, 1);
Actor_UnsetSwitchFlag(globalCtx, GET_SUSCEIL_SWITCHFLAG(this));
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BIGWALL_BOUND);
Flags_UnsetSwitch(globalCtx, GET_SUSCEIL_SWITCHFLAG(this));
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_BIGWALL_BOUND);
func_80C0AC74(this);
} else {
func_800B9010(&this->dyna.actor, NA_SE_EV_ICE_PILLAR_FALL - SFX_FLAG);
@@ -229,7 +229,7 @@ void BgIkninSusceil_Update(Actor* thisx, GlobalContext* globalCtx) {
if ((this->unk168 == 0) && (this->unk166 > 0) && (player->stateFlags3 & 0x100) && (player->unk_B48 > 1000.0f)) {
this->unk168 = 2;
if ((func_80C0A95C(this, globalCtx) != 0) && (this->actionFunc != func_80C0AE5C)) {
func_800B8E58(&player->actor, NA_SE_PL_BODY_HIT);
func_800B8E58(player, NA_SE_PL_BODY_HIT);
func_80C0AE3C(this);
}
}
@@ -260,5 +260,5 @@ void BgIkninSusceil_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgIkninSusceil* this = THIS;
AnimatedMat_Draw(globalCtx, this->animatedTexture);
func_800BDFC0(globalCtx, D_0600C308);
Gfx_DrawDListOpa(globalCtx, D_0600C308);
}
@@ -90,7 +90,7 @@ void BgIknvObj_Init(Actor* thisx, GlobalContext* globalCtx) {
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE;
gSaveContext.weekEventReg[51] &= (u8)~0x10;
Actor_SetHeight(&this->dyna.actor, IREG(88));
Actor_SetFocus(&this->dyna.actor, IREG(88));
break;
default:
Actor_MarkForDeath(&this->dyna.actor);
@@ -154,7 +154,7 @@ s32 func_80BD7E0C(BgIknvObj* this, s16 targetRotation, GlobalContext* globalCtx)
func_800B9010(&this->dyna.actor, NA_SE_EV_STONEDOOR_OPEN_S - SFX_FLAG);
return false;
}
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP);
return true;
}
@@ -71,11 +71,11 @@ void BgInibsMovebg_Draw(Actor* thisx, GlobalContext* globalCtx) {
dl1 = this->unk_15C;
if (dl1 != NULL) {
func_800BDFC0(globalCtx, this->unk_15C);
Gfx_DrawDListOpa(globalCtx, this->unk_15C);
}
dl2 = this->unk_160;
if (dl2 != NULL) {
func_800BE03C(globalCtx, this->unk_160);
Gfx_DrawDListXlu(globalCtx, this->unk_160);
}
}
@@ -228,7 +228,7 @@ void BgKin2Fence_SetupPlayOpenCutscene(BgKin2Fence* this) {
void BgKin2Fence_PlayOpenCutscene(BgKin2Fence* this, GlobalContext* globalCtx) {
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
Actor_SetSwitchFlag(globalCtx, this->dyna.actor.params & 0x7F);
Flags_SetSwitch(globalCtx, this->dyna.actor.params & 0x7F);
BgKin2Fence_SetupWaitBeforeOpen(this);
return;
}
@@ -272,5 +272,5 @@ void BgKin2Fence_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgKin2Fence_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_06000828);
Gfx_DrawDListOpa(globalCtx, D_06000828);
}
@@ -55,7 +55,7 @@ static ColliderTrisInit D_80B6FA08 = {
// static InitChainEntry sInitChain[] = {
static InitChainEntry D_80B6FA24[] = {
ICHAIN_F32_DIV1000(gravity, -2000, ICHAIN_CONTINUE),
ICHAIN_F32_DIV1000(minVelocityY, -20000, ICHAIN_CONTINUE),
ICHAIN_F32_DIV1000(terminalVelocity, -20000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneScale, 100, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 100, ICHAIN_CONTINUE),
@@ -110,7 +110,7 @@ void BgLadder_ActionStartCutscene(BgLadder* this, GlobalContext* globalCtx) {
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
this->dyna.actor.draw = BgLadder_Draw;
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_SECRET_LADDER_APPEAR);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_SECRET_LADDER_APPEAR);
this->action = BgLadder_ActionFadeIn;
} else {
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
@@ -47,5 +47,5 @@ void BgLbfshot_Destroy(Actor* thisx, GlobalContext* globalCtx) {
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
}
void BgLbfshot_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_06000228);
Gfx_DrawDListOpa(globalCtx, D_06000228);
}
@@ -173,5 +173,5 @@ void BgLotus_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgLotus_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_06000040);
Gfx_DrawDListOpa(globalCtx, D_06000040);
}
@@ -41,6 +41,6 @@ void BgMarketStep_Init(Actor* thisx, GlobalContext* globalCtx) {
void BgMarketStep_Draw(Actor* thisx, GlobalContext* globalCtx) {
s32 index = thisx->params & 1;
func_800BDFC0(globalCtx, D_80AF0120[index]);
func_800BDFC0(globalCtx, D_80AF0128[index]);
Gfx_DrawDListOpa(globalCtx, D_80AF0120[index]);
Gfx_DrawDListOpa(globalCtx, D_80AF0128[index]);
}
@@ -55,5 +55,5 @@ void BgMbarChair_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgMbarChair_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_06000288);
Gfx_DrawDListOpa(globalCtx, D_06000288);
}
@@ -65,7 +65,7 @@ void BgTobira01_Open(BgTobira01* this, GlobalContext* globalCtx) {
if (this->timer != prevTimer) {
if (1) {}
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONEDOOR_OPEN_S - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_STONEDOOR_OPEN_S - SFX_FLAG);
this->dyna.actor.world.pos.y = (this->yOffset = (this->timer * (5.0f / 3.0f)) + this->dyna.actor.home.pos.y);
this->timer2 = 180;
}
+17 -17
View File
@@ -740,8 +740,8 @@ void func_809DAB78(Boss02* this, GlobalContext* globalCtx) {
this->actor.speedXZ = this->unk_01A8 * D_809DF5B0;
}
Actor_SetVelocityXYRotation(&this->actor);
Actor_ApplyMovement(&this->actor);
Actor_UpdateVelocityWithoutGravity(&this->actor);
Actor_UpdatePos(&this->actor);
spD0 = this->actor.world.pos;
if (D_809E0422 != 0) {
@@ -756,7 +756,7 @@ void func_809DAB78(Boss02* this, GlobalContext* globalCtx) {
this->unk_0170 = this->unk_017C;
this->unk_0170.y = temp_f0;
this->unk_016C = 120;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_INBOSS_ROAR_OLD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_INBOSS_ROAR_OLD);
}
this->actor.flags &= ~1;
@@ -965,7 +965,7 @@ void func_809DAB78(Boss02* this, GlobalContext* globalCtx) {
D_809E042C->unk_1D5C = 0.0f;
play_sound(NA_SE_EN_INBOSS_DEAD_PRE2_OLD);
} else if (!(this->unk_0146[1] & 0xF) && (Rand_ZeroOne() < 0.5f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_INBOSS_DAMAGE_OLD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_INBOSS_DAMAGE_OLD);
}
return;
@@ -987,7 +987,7 @@ void func_809DAB78(Boss02* this, GlobalContext* globalCtx) {
this->unk_0144 = 22;
this->actor.gravity = -1.0f * D_809DF5B0;
this->actor.velocity.y = 0.0f;
this->actor.minVelocityY = -1000.0f * D_809DF5B0;
this->actor.terminalVelocity = -1000.0f * D_809DF5B0;
this->unk_0164 = randPlusMinusPoint5Scaled(0.05f);
spCC = player->actor.world.pos.x - this->actor.world.pos.x;
@@ -1006,7 +1006,7 @@ void func_809DAB78(Boss02* this, GlobalContext* globalCtx) {
Audio_QueueSeqCmd(NA_BGM_CLEAR_BOSS | 0x8000);
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_INBOSS_DEAD_OLD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_INBOSS_DEAD_OLD);
}
}
return;
@@ -1017,7 +1017,7 @@ void func_809DAB78(Boss02* this, GlobalContext* globalCtx) {
Math_Vec3f_Copy(&this->unk_01BC[i], &this->actor.world.pos);
this->unk_0B1C[i].y += this->unk_0164;
Math_ApproachF(&this->unk_0B1C[i].x, -(M_PI / 2), 0.1f, 0.07f);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 50.0f, 150.0f, 100.0f, 4);
if (this->actor.bgCheckFlags & 1) {
@@ -1100,7 +1100,7 @@ void func_809DBFB4(Boss02* this, GlobalContext* globalCtx) {
this->unk_0156 = 15;
if (i == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_INBOSS_DAMAGE_OLD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_INBOSS_DAMAGE_OLD);
this->unk_015C = 1;
} else {
func_8019F1C0(&this->unk_167C, NA_SE_EN_INBOSS_DAMAGE_OLD);
@@ -1227,9 +1227,9 @@ void Boss02_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_016C != 0) {
if ((this->unk_016C == 60) && (this->unk_0144 < 20)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_INBOSS_ROAR_OLD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_INBOSS_ROAR_OLD);
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_INBOSS_SAND_OLD - SFX_FLAG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_INBOSS_SAND_OLD - SFX_FLAG);
if (this->unk_0144 > 20) {
sp3C.x = randPlusMinusPoint5Scaled(100.0f * D_809DF5B0) + this->unk_0170.x;
@@ -1959,7 +1959,7 @@ void func_809DD934(Boss02* this, GlobalContext* globalCtx) {
player->actor.home.pos = player->actor.world.pos;
player->actor.prevPos = player->actor.world.pos;
temp_a0_5 = globalCtx->actorCtx.actorList[ACTORCAT_BG].first;
temp_a0_5 = globalCtx->actorCtx.actorLists[ACTORCAT_BG].first;
while (temp_a0_5 != NULL) {
if (temp_a0_5->id == ACTOR_BG_INIBS_MOVEBG) {
Actor_MarkForDeath(temp_a0_5);
@@ -1971,7 +1971,7 @@ void func_809DD934(Boss02* this, GlobalContext* globalCtx) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_BG_INIBS_MOVEBG, 0, D_809E0422 ? 3150.0f : 0.0f, 0, 0, 0, 0,
D_809E0422);
temp_a0_5 = globalCtx->actorCtx.actorList[ACTORCAT_BOSS].first;
temp_a0_5 = globalCtx->actorCtx.actorLists[ACTORCAT_BOSS].first;
while (temp_a0_5 != NULL) {
if ((temp_a0_5->id == ACTOR_EN_TANRON5) || (temp_a0_5->id == ACTOR_ITEM_B_HEART)) {
if (D_809E0422 == 0) {
@@ -2002,7 +2002,7 @@ void func_809DD934(Boss02* this, GlobalContext* globalCtx) {
temp_a0_5->velocity.z *= phi_f0_2;
temp_a0_5->gravity *= phi_f0_2;
temp_a0_5->minVelocityY *= phi_f0_2;
temp_a0_5->terminalVelocity *= phi_f0_2;
temp_a0_5->scale.x *= phi_f0_2;
temp_a0_5->scale.y *= phi_f0_2;
@@ -2109,11 +2109,11 @@ void func_809DEAC4(Boss02* this, GlobalContext* globalCtx) {
player->actor.shape.rot.y = -0x8000;
player->actor.world.rot.y = player->actor.shape.rot.y;
this->unk_1D24.x = player->actor.world.pos.x - 20.0f;
this->unk_1D24.y = (func_800B6FC8(player) + player->actor.world.pos.y) - 29.0f;
this->unk_1D24.y = (Player_GetHeight(player) + player->actor.world.pos.y) - 29.0f;
this->unk_1D24.z = player->actor.world.pos.z - 50;
this->unk_1D30.x = player->actor.world.pos.x;
this->unk_1D30.y = (func_800B6FC8(player) + player->actor.world.pos.y) - 17.0f;
this->unk_1D30.y = (Player_GetHeight(player) + player->actor.world.pos.y) - 17.0f;
this->unk_1D30.z = player->actor.world.pos.z;
if (this->unk_1D1C >= 30) {
if (this->unk_1D1C == 30) {
@@ -2177,8 +2177,8 @@ void func_809DEAC4(Boss02* this, GlobalContext* globalCtx) {
}
if (this->unk_1D1C == (u32)(KREG(92) + 125)) {
Actor_TitleCardCreate(globalCtx, &globalCtx->actorCtx.titleCtxt, Lib_SegmentedToVirtual(&D_06008650),
160, 180, 128, 40);
TitleCard_InitBossName(&globalCtx->state, &globalCtx->actorCtx.titleCtxt,
Lib_SegmentedToVirtual(&D_06008650), 160, 180, 128, 40);
}
if (this->unk_1D1C == (u32)(BREG(27) + 335)) {
+749 -42
View File
@@ -5,6 +5,7 @@
*/
#include "z_boss_04.h"
#include "objects/object_boss04/object_boss04.h"
#define FLAGS 0x00000035
@@ -15,14 +16,18 @@ void Boss04_Destroy(Actor* thisx, GlobalContext* globalCtx);
void Boss04_Update(Actor* thisx, GlobalContext* globalCtx);
void Boss04_Draw(Actor* thisx, GlobalContext* globalCtx);
void func_809EC544(Boss04* this);
void func_809EC568(Boss04* this, GlobalContext* globalCtx);
void func_809ECD00(Boss04* this, GlobalContext* globalCtx);
void func_809ECD18(Boss04* this, GlobalContext* globalCtx);
void func_809ECEF4(Boss04* this);
void func_809ECF58(Boss04* this, GlobalContext* globalCtx);
void func_809ED224(Boss04* this);
void func_809ED2A0(Boss04* this, GlobalContext* globalCtx);
#if 0
// static DamageTable sDamageTable = {
static DamageTable D_809EE150 = {
static u8 D_809EE4D0;
static DamageTable sDamageTable = {
/* Deku Nut */ DMG_ENTRY(1, 0xF),
/* Deku Stick */ DMG_ENTRY(1, 0xF),
/* Horse trample */ DMG_ENTRY(0, 0x0),
@@ -69,75 +74,777 @@ const ActorInit Boss_04_InitVars = {
(ActorFunc)Boss04_Draw,
};
// static ColliderJntSphElementInit sJntSphElementsInit[1] = {
static ColliderJntSphElementInit D_809EE190[1] = {
static ColliderJntSphElementInit sJntSphElementsInit1[1] = {
{
{ ELEMTYPE_UNK3, { 0xF7CFFFFF, 0x00, 0x08 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_ON | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
{
ELEMTYPE_UNK3,
{ 0xF7CFFFFF, 0x00, 0x08 },
{ 0xF7CFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 0, { { 0, 0, 0 }, 50 }, 100 },
},
};
// static ColliderJntSphInit sJntSphInit = {
static ColliderJntSphInit D_809EE1B4 = {
{ COLTYPE_HIT3, AT_ON | AT_TYPE_ENEMY, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_PLAYER, OC2_TYPE_1, COLSHAPE_JNTSPH, },
1, D_809EE190, // sJntSphElementsInit,
static ColliderJntSphInit sJntSphInit1 = {
{
COLTYPE_HIT3,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
1,
sJntSphElementsInit1,
};
// static ColliderJntSphElementInit sJntSphElementsInit[1] = {
static ColliderJntSphElementInit D_809EE1C4[1] = {
static ColliderJntSphElementInit sJntSphElementsInit2[1] = {
{
{ ELEMTYPE_UNK3, { 0xF7CFFFFF, 0x00, 0x08 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_ON | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
{
ELEMTYPE_UNK3,
{ 0xF7CFFFFF, 0x00, 0x08 },
{ 0xF7CFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 0, { { 0, 0, 0 }, 70 }, 100 },
},
};
// static ColliderJntSphInit sJntSphInit = {
static ColliderJntSphInit D_809EE1E8 = {
{ COLTYPE_METAL, AT_ON | AT_TYPE_ENEMY, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_PLAYER, OC2_TYPE_1, COLSHAPE_JNTSPH, },
1, D_809EE1C4, // sJntSphElementsInit,
static ColliderJntSphInit sJntSphInit2 = {
{
COLTYPE_METAL,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
1,
sJntSphElementsInit2,
};
#endif
void func_809EC040(s32 index, ColliderJntSph* collider, Vec3f* arg2) {
collider->elements[index].dim.worldSphere.center.x = arg2->x;
collider->elements[index].dim.worldSphere.center.y = arg2->y;
collider->elements[index].dim.worldSphere.center.z = arg2->z;
collider->elements[index].dim.worldSphere.radius =
collider->elements[index].dim.modelSphere.radius * collider->elements[index].dim.scale;
}
extern DamageTable D_809EE150;
extern ColliderJntSphElementInit D_809EE190[1];
extern ColliderJntSphInit D_809EE1B4;
extern ColliderJntSphElementInit D_809EE1C4[1];
extern ColliderJntSphInit D_809EE1E8;
void Boss04_Init(Actor* thisx, GlobalContext* globalCtx2) {
static Vec3f D_809EE1F8[] = {
{ -1000.0f, 0.0f, 0.0f },
{ 1000.0f, 0.0f, 0.0f },
{ 0.0f, 0.0f, -1000.0f },
{ 0.0f, 0.0f, 1000.0f },
};
GlobalContext* globalCtx = globalCtx2;
Boss04* this = THIS;
s32 i;
CollisionPoly* spC0;
Vec3f spB4;
Vec3f spA8;
s32 spA4;
f32 phi_f20;
f32 phi_f24;
Vec3f sp90;
s16 phi_s0_2;
s32 pad;
extern UNK_TYPE D_0600004C;
extern UNK_TYPE D_06004510;
if (Flags_GetClear(globalCtx, globalCtx->roomCtx.currRoom.num)) {
Actor_MarkForDeath(&this->actor);
return;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/func_809EC040.s")
this->actor.params = 0x64;
Actor_SetScale(&this->actor, 0.1f);
this->actor.targetMode = 5;
this->actor.hintId = 0x19;
this->actor.colChkInfo.health = 20;
this->actor.colChkInfo.damageTable = &sDamageTable;
this->unk_700 = 1.0f;
this->unk_6FC = 1.0f;
this->unk_6F8 = 1.0f;
Collider_InitAndSetJntSph(globalCtx, &this->collider1, &this->actor, &sJntSphInit1, this->collider1Elements);
Collider_InitAndSetJntSph(globalCtx, &this->collider2, &this->actor, &sJntSphInit2, this->collider2Elements);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_boss04_Skel_0045E8, &object_boss04_Anim_00004C,
this->jointTable, this->morphtable, 9);
spA8.y = this->actor.world.pos.y + 200.0f;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/Boss04_Init.s")
for (i = 0; i < ARRAY_COUNT(D_809EE1F8); i++) {
spA8.x = D_809EE1F8[i].x + this->actor.world.pos.x;
spA8.z = D_809EE1F8[i].z + this->actor.world.pos.z;
if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &spA8, &spB4, &spC0, 1, 0, 0, 1,
&spA4)) {
if (i == 0) {
this->unk_6D8 = spB4.x;
} else if (i == 1) {
this->unk_6DC = spB4.x;
} else if (i == 2) {
this->unk_6E0 = spB4.z;
} else if (i == 3) {
this->unk_6E4 = spB4.z;
}
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/Boss04_Destroy.s")
this->unk_6E8 = this->unk_6D8 + ((this->unk_6DC - this->unk_6D8) * 0.5f);
this->unk_6F0 = this->unk_6E0 + ((this->unk_6E4 - this->unk_6E0) * 0.5f);
this->actor.world.pos.x = this->unk_6E8;
this->actor.world.pos.z = this->unk_6F0;
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 35.0f, 60.0f, 60.0f, 4);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/func_809EC544.s")
if ((KREG(64) != 0) || (gSaveContext.eventInf[6] & 1)) {
func_809ECD00(this, globalCtx);
this->actor.world.pos.y = this->actor.floorHeight + 160.0f;
phi_f24 = this->actor.floorHeight;
D_809EE4D0 = KREG(41) + 50;
} else {
func_809EC544(this);
this->actor.world.pos.y = KREG(70) + (this->actor.floorHeight + 590.0f);
phi_f24 = KREG(71) + (this->actor.floorHeight + 550.0f);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/func_809EC568.s")
phi_f20 = 110.0f;
this->unk_6F6 = 82;
phi_s0_2 = 0;
for (i = 0; i < 82; i++) {
Matrix_RotateY(phi_s0_2, MTXMODE_NEW);
Matrix_GetStateTranslationAndScaledZ(phi_f20, &sp90);
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_TANRON2, this->unk_6E8 + sp90.x,
phi_f24, this->unk_6F0 + sp90.z, 0, 0, 0, i);
phi_f20 += 2.5f;
phi_s0_2 += 0x1300;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/func_809ECD00.s")
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_TANRON2, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 100);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/func_809ECD18.s")
void Boss04_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/func_809ECEF4.s")
void func_809EC544(Boss04* this) {
this->actionFunc = func_809EC568;
this->actor.flags &= ~1;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/func_809ECF58.s")
void func_809EC568(Boss04* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
f32 x;
f32 y;
f32 z;
s32 pad;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/func_809ED224.s")
this->unk_704++;
this->unk_1FE = 15;
if ((this->unk_708 != 0) && (this->unk_708 < 10)) {
this->actor.world.pos.y = (Math_SinS(this->unk_1F4 * 512) * 10.0f) + (this->actor.floorHeight + 160.0f);
Matrix_RotateY(this->actor.yawTowardsPlayer, MTXMODE_NEW);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/func_809ED2A0.s")
switch (this->unk_708) {
case 0:
this->unk_2C8 = 50;
this->unk_2D0 = 2000.0f;
if ((player->stateFlags1 & 0x100000) && (this->actor.projectedPos.z > 0.0f) &&
(fabsf(this->actor.projectedPos.x) < 300.0f) && (fabsf(this->actor.projectedPos.y) < 300.0f)) {
if ((this->unk_704 >= 15) && (ActorCutscene_GetCurrentIndex() == -1)) {
Actor* boss;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/func_809ED45C.s")
this->unk_708 = 10;
this->unk_704 = 0;
func_800EA0D4(globalCtx, &globalCtx->csCtx);
this->unk_70A = func_801694DC(globalCtx);
func_80169590(globalCtx, 0, 1);
func_80169590(globalCtx, this->unk_70A, 7);
func_800B7298(globalCtx, &this->actor, 7);
player->actor.world.pos.x = this->unk_6E8;
player->actor.world.pos.z = this->unk_6F0 + 410.0f;
player->actor.shape.rot.y = 0x7FFF;
player->actor.world.rot.y = player->actor.shape.rot.y;
Math_Vec3f_Copy(&this->unk_70C, &player->actor.world.pos);
this->unk_70C.y += 100.0f;
Math_Vec3f_Copy(&this->unk_718, &this->actor.world.pos);
func_8016566C(150);
this->unk_744 = 60.0f;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/func_809ED50C.s")
boss = globalCtx->actorCtx.actorLists[ACTORCAT_BOSS].first;
while (boss != NULL) {
if (boss->id == ACTOR_EN_WATER_EFFECT) {
Actor_MarkForDeath(boss);
}
boss = boss->next;
}
}
} else {
this->unk_704 = 0;
}
break;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/Boss04_Update.s")
case 10:
if (this->unk_704 == 3) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_EYEGOLE_DEMO_EYE);
this->unk_74A = 1;
}
this->unk_2D0 = 10000.0f;
this->unk_2C8 = 300;
Math_ApproachF(&this->unk_744, 20.0f, 0.3f, 11.0f);
if (this->unk_704 == 40) {
this->unk_708 = 11;
this->unk_704 = 0;
}
break;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/func_809EDCCC.s")
case 11:
if (this->unk_704 > 50) {
this->unk_708 = 12;
this->unk_704 = 0;
this->actor.gravity = -3.0f;
}
break;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/func_809EDECC.s")
case 13:
if (this->unk_704 == 45) {
this->unk_708 = 1;
this->unk_704 = 0;
func_800B7298(globalCtx, &this->actor, 0x15);
this->actor.gravity = 0.0f;
break;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_04/Boss04_Draw.s")
case 12:
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ME_ATTACK - SFX_FLAG);
Math_ApproachF(&this->unk_718.x, this->actor.world.pos.x, 0.5f, 1000.0f);
Math_ApproachF(&this->unk_718.y, this->actor.world.pos.y, 0.5f, 1000.0f);
Math_ApproachF(&this->unk_718.z, this->actor.world.pos.z, 0.5f, 1000.0f);
if (this->actor.bgCheckFlags & 2) {
play_sound(NA_SE_IT_BIG_BOMB_EXPLOSION);
this->unk_6F4 = 15;
this->unk_708 = 13;
this->unk_704 = 0;
this->unk_2DA = 10;
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_CLEAR_TAG, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, CLEAR_TAG_SPLASH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_KONB_JUMP_LEV_OLD - SFX_FLAG);
this->unk_748 = 20;
}
break;
case 1:
player->actor.shape.rot.y = 0x7FFF;
player->actor.world.rot.y = player->actor.shape.rot.y;
Matrix_GetStateTranslationAndScaledZ(-100.0f, &this->unk_70C);
this->unk_70C.x += player->actor.world.pos.x;
this->unk_70C.y = Player_GetHeight(player) + player->actor.world.pos.y + 36.0f;
this->unk_70C.z += player->actor.world.pos.z;
this->unk_718.x = player->actor.world.pos.x;
this->unk_718.y = (Player_GetHeight(player) + player->actor.world.pos.y) - 4.0f;
this->unk_718.z = player->actor.world.pos.z;
if (this->unk_704 >= 35) {
this->unk_704 = 0;
this->unk_708 = 2;
this->unk_728 = -200.0f;
}
break;
case 2:
case 3:
Matrix_GetStateTranslationAndScaledZ(500.0f, &this->unk_70C);
this->unk_70C.x += this->actor.world.pos.x;
this->unk_70C.y += this->actor.world.pos.y - 50.0f;
this->unk_70C.z += this->actor.world.pos.z;
this->unk_718.x = this->actor.world.pos.x;
this->unk_718.z = this->actor.world.pos.z;
this->unk_718.y = (this->actor.world.pos.y - 70.0f) + this->unk_728;
Math_ApproachZeroF(&this->unk_728, 0.05f, this->unk_73C);
Math_ApproachF(&this->unk_73C, 3.0f, 1.0f, 0.05f);
if (this->unk_704 == 20) {
this->unk_708 = 3;
}
if (this->unk_704 == 70) {
this->unk_2C8 = 300;
this->unk_2D0 = 0.0f;
D_809EE4D0 = 1;
this->unk_2E2 = 60;
this->unk_2E0 = 93;
}
if (this->unk_704 > 140) {
Camera* sp5C = Play_GetCamera(globalCtx, MAIN_CAM);
this->unk_708 = 0;
func_809ECD00(this, globalCtx);
sp5C->eye = this->unk_70C;
sp5C->eyeNext = this->unk_70C;
sp5C->at = this->unk_718;
func_80169AFC(globalCtx, this->unk_70A, 0);
this->unk_70A = 0;
func_800EA0EC(globalCtx, &globalCtx->csCtx);
func_800B7298(globalCtx, &this->actor, 6);
func_80165690();
gSaveContext.eventInf[6] |= 1;
}
break;
}
if (this->unk_70A != 0) {
Vec3f sp50;
ShrinkWindow_SetLetterboxTarget(0x1B);
if (this->unk_748 != 0) {
this->unk_748--;
}
Math_Vec3f_Copy(&sp50, &this->unk_718);
sp50.y += Math_SinS(this->unk_748 * 0x4000) * this->unk_748 * 1.5f;
Play_CameraSetAtEye(globalCtx, this->unk_70A, &sp50, &this->unk_70C);
func_80169940(globalCtx, this->unk_70A, this->unk_744);
Math_ApproachF(&this->unk_744, 60.0f, 0.1f, 1.0f);
}
this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
x = player->actor.world.pos.x - this->actor.world.pos.x;
y = player->actor.world.pos.y - this->actor.world.pos.y;
z = player->actor.world.pos.z - this->actor.world.pos.z;
this->actor.shape.rot.x = Math_Atan2S(-y, sqrtf(SQ(x) + SQ(z)));
}
void func_809ECD00(Boss04* this, GlobalContext* globalCtx) {
this->actionFunc = func_809ECD18;
}
void func_809ECD18(Boss04* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if (this->unk_1F4 >= 0x500) {
this->unk_1F4 -= 0x300;
this->unk_1F7 += 1;
}
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 10, 0x200);
this->actor.world.pos.y = (this->actor.floorHeight + KREG(17) + 160.0f) + (Math_SinS(this->unk_1F4 * 512) * 10.0f);
Math_ApproachF(&this->actor.speedXZ, this->unk_6D4, 1.0f, 0.5f);
if (this->unk_1F8 == 0) {
this->unk_1F8 = Rand_ZeroFloat(100.0f) + 50.0f;
this->unk_6D4 = Rand_ZeroFloat(3.0f);
if (Rand_ZeroOne() < 0.1f) {
Math_Vec3f_Copy(&this->unk_6C8, &player->actor.world.pos);
} else {
this->unk_6C8.x = randPlusMinusPoint5Scaled(600.0f) + this->unk_6E8;
this->unk_6C8.z = randPlusMinusPoint5Scaled(600.0f) + this->unk_6F0;
}
}
Math_ApproachS(&this->actor.world.rot.y,
Math_Atan2S(this->unk_6C8.x - this->actor.world.pos.x, this->unk_6C8.z - this->actor.world.pos.z), 5,
0x200);
if (((s8)this->actor.colChkInfo.health <= 10) || (KREG(88) != 0)) {
KREG(88) = 0;
func_809ECEF4(this);
}
}
void func_809ECEF4(Boss04* this) {
this->actionFunc = func_809ECF58;
Math_Vec3s_Copy(&this->actor.world.rot, &this->actor.shape.rot);
this->unk_1F8 = 0;
this->unk_1F6 = 1;
this->unk_1FA = 60;
this->actor.speedXZ = 0.0f;
this->actor.gravity = -3.0f;
}
void func_809ECF58(Boss04* this, GlobalContext* globalCtx) {
Vec3f sp3C;
if ((this->unk_1FE == 14) || ((this->actor.bgCheckFlags & 8) && (this->unk_1F8 == 0))) {
this->unk_1F8 = 20;
if ((Rand_ZeroOne() < 0.2f) && (this->unk_1FE == 0)) {
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
this->unk_2D0 = 10000.0f;
this->unk_2C8 = 100;
} else {
this->actor.world.rot.y = BINANG_ROT180((s16)Rand_ZeroFloat(8000.0f) + this->actor.world.rot.y);
}
this->actor.speedXZ = 0.0f;
if (this->actor.bgCheckFlags & 8) {
play_sound(NA_SE_IT_BIG_BOMB_EXPLOSION);
func_800BC848(&this->actor, globalCtx, 15, 10);
this->unk_6F4 = 15;
sp3C.x = this->actor.focus.pos.x;
sp3C.y = this->actor.focus.pos.y;
sp3C.z = this->actor.focus.pos.z;
func_800BBFB0(globalCtx, &sp3C, 100.0f, 40, 500, 10, 0);
}
}
Math_ApproachS(&this->actor.shape.rot.x, Math_SinS(this->unk_1F4 * 0xFB8) * 5000.0f, 5, 0x800);
Math_ApproachS(&this->actor.shape.rot.z, Math_SinS(this->unk_1F4 * 0xCD0) * 3000.0f, 5, 0x800);
if (this->unk_6F4 == 0) {
Math_ApproachS(&this->actor.shape.rot.y, this->actor.world.rot.y, 5, 0x1000);
if (this->unk_1FA == 0) {
Math_ApproachF(&this->actor.speedXZ, 20.0f, 1.0f, 1.0f);
sp3C.x = this->actor.world.pos.x;
sp3C.y = this->actor.floorHeight + 2.0f;
sp3C.z = this->actor.world.pos.z;
EffectSsGRipple_Spawn(globalCtx, &sp3C, 1400, 500, 0);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ME_ATTACK - SFX_FLAG);
}
}
if (KREG(88) != 0) {
KREG(88) = 0;
func_809ED224(this);
this->unk_1FE = 100;
this->unk_200 = 100;
}
}
void func_809ED224(Boss04* this) {
this->actionFunc = func_809ED2A0;
this->unk_1F8 = 60;
this->unk_1FA = 100;
this->actor.speedXZ = 0.0f;
this->unk_2D0 = 10000.0f;
this->unk_2C8 = 200;
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ME_DEAD);
this->actor.flags &= ~1;
func_801A2ED8();
this->unk_1F6 = 10;
}
void func_809ED2A0(Boss04* this, GlobalContext* globalCtx) {
this->unk_2DA = 10;
if (this->unk_1F8 >= 5) {
this->unk_6FC = (Math_SinS(this->unk_1F8 * 0x3000) * 10.0f * 0.01f) + 1.0f;
this->unk_700 = (Math_CosS(this->unk_1F8 * 0x3000) * 10.0f * 0.01f) + 1.0f;
this->unk_6F8 = this->unk_700;
}
if (this->unk_1F8 == 5) {
this->unk_6F8 *= 1.3f;
this->unk_6FC *= 1.3f;
this->unk_700 *= 1.3f;
}
if (this->unk_1F8 == 3) {
this->actor.flags &= ~1;
this->unk_700 = 0.0f;
this->unk_6FC = 0.0f;
this->unk_6F8 = 0.0f;
}
if ((this->unk_1F8 == 2) || (this->unk_1F8 == 5)) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_CLEAR_TAG, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, CLEAR_TAG_LARGE_EXPLOSION);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_IT_BIG_BOMB_EXPLOSION);
}
if (this->unk_1FA == 3) {
this->unk_1F6 = 11;
}
if (this->unk_1FA == 0) {
Actor_MarkForDeath(&this->actor);
}
}
void func_809ED45C(Boss04* this, GlobalContext* globalCtx) {
ColliderJntSphElement* temp_v0;
u8 damage;
if ((this->unk_1FE == 0) && (this->collider1.elements[0].info.bumperFlags & BUMP_HIT)) {
this->collider1.elements[0].info.bumperFlags &= ~BUMP_HIT;
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ME_DAMAGE);
damage = this->actor.colChkInfo.damage;
this->actor.colChkInfo.health = this->actor.colChkInfo.health - damage;
if ((s8)this->actor.colChkInfo.health <= 0) {
func_809ED224(this);
this->unk_1FE = 100;
this->unk_200 = 100;
Enemy_StartFinishingBlow(globalCtx, &this->actor);
} else {
this->unk_2DA = 15;
this->unk_1FE = 15;
this->unk_200 = 15;
}
}
}
void func_809ED50C(Boss04* this) {
s32 i;
this->unk_2DE += this->unk_2E2;
this->unk_2DC += this->unk_2E0;
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_APPLY);
Matrix_InsertTranslation(0.0f, 0.0f, 10.0f, MTXMODE_APPLY);
Matrix_GetStateTranslation(&this->unk_6BC);
Matrix_Scale(this->actor.scale.x * 13.0f, this->actor.scale.y * 13.0f, this->actor.scale.z * 16.0f, MTXMODE_APPLY);
Matrix_RotateY(this->unk_2DC, MTXMODE_APPLY);
Matrix_InsertXRotation_s(this->unk_2DE, MTXMODE_APPLY);
Matrix_StatePush();
for (i = 0; i < ARRAY_COUNT(this->unk_2E4); i++) {
Matrix_RotateStateAroundXAxis(0.3926991f);
Matrix_GetStateTranslationAndScaledZ(100.0f, &this->unk_2E4[i]);
}
Matrix_StatePop();
Matrix_StatePush();
Matrix_InsertTranslation(38.0f, 0.0f, 0.0f, MTXMODE_APPLY);
for (i = 0; i < ARRAY_COUNT(this->unk_3A4); i++) {
Matrix_RotateStateAroundXAxis(0.41887903f);
Matrix_GetStateTranslationAndScaledZ(92.0f, &this->unk_3A4[i]);
}
Matrix_StatePop();
Matrix_StatePush();
Matrix_InsertTranslation(-38.0f, 0.0f, 0.0f, MTXMODE_APPLY);
for (i = 0; i < ARRAY_COUNT(this->unk_458); i++) {
Matrix_RotateStateAroundXAxis(0.41887903f);
Matrix_GetStateTranslationAndScaledZ(92.0f, &this->unk_458[i]);
}
Matrix_StatePop();
Matrix_StatePush();
Matrix_InsertTranslation(71.0f, 0.0f, 0.0f, MTXMODE_APPLY);
for (i = 0; i < ARRAY_COUNT(this->unk_50C); i++) {
Matrix_RotateStateAroundXAxis(0.5711987f);
Matrix_GetStateTranslationAndScaledZ(71.0f, &this->unk_50C[i]);
}
Matrix_StatePop();
Matrix_StatePush();
Matrix_InsertTranslation(-71.0f, 0.0f, 0.0f, MTXMODE_APPLY);
for (i = 0; i < ARRAY_COUNT(this->unk_590); i++) {
Matrix_RotateStateAroundXAxis(0.5711987f);
Matrix_GetStateTranslationAndScaledZ(71.0f, &this->unk_590[i]);
}
Matrix_StatePop();
Matrix_StatePush();
Matrix_InsertTranslation(92.0f, 0.0f, 0.0f, MTXMODE_APPLY);
for (i = 0; i < ARRAY_COUNT(this->unk_614); i++) {
Matrix_RotateStateAroundXAxis(1.0471976f);
Matrix_GetStateTranslationAndScaledZ(38.0f, &this->unk_614[i]);
}
Matrix_StatePop();
Matrix_StatePush();
Matrix_InsertTranslation(-92.0f, 0.0f, 0.0f, MTXMODE_APPLY);
for (i = 0; i < ARRAY_COUNT(this->unk_65C); i++) {
Matrix_RotateStateAroundXAxis(1.0471976f);
Matrix_GetStateTranslationAndScaledZ(38.0f, &this->unk_65C[i]);
}
Matrix_StatePop();
Matrix_StatePush();
Matrix_InsertTranslation(100.0f, 0.0f, 0.0f, MTXMODE_APPLY);
Matrix_GetStateTranslation(&this->unk_6A4);
Matrix_StatePop();
Matrix_InsertTranslation(-100.0f, 0.0f, 0.0f, MTXMODE_APPLY);
Matrix_GetStateTranslation(&this->unk_6B0);
}
void Boss04_Update(Actor* thisx, GlobalContext* globalCtx2) {
GlobalContext* globalCtx = globalCtx2;
Boss04* this = THIS;
s16 temp_v0_8;
s32 pad;
this->unk_1F4++;
if (KREG(63) == 0) {
if (this->unk_1F8 != 0) {
this->unk_1F8--;
}
if (this->unk_1FA != 0) {
this->unk_1FA--;
}
if (this->unk_2C8 != 0) {
this->unk_2C8--;
}
if (this->unk_1FE != 0) {
this->unk_1FE--;
}
if (this->unk_200 != 0) {
this->unk_200--;
}
if (this->unk_2DA != 0) {
this->unk_2DA--;
}
if (this->unk_6F4 != 0) {
this->unk_6F4--;
}
this->actionFunc(this, globalCtx);
Actor_MoveWithGravity(&this->actor);
this->actor.world.pos.y -= 100.0f;
this->actor.prevPos.y -= 100.0f;
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 100.0f, 120.0f, 200.0f, 5);
this->actor.world.pos.y += 100.0f;
this->actor.prevPos.y += 100.0f;
}
if (this->unk_200 == 10) {
this->unk_2D0 = 0.0f;
this->unk_2C8 = Rand_ZeroFloat(100.0f) + 60.0f;
}
if (this->unk_2C8 == 0) {
this->unk_2C8 = Rand_ZeroFloat(100.0f) + 60.0f;
this->unk_2D0 = 10000.0f - this->unk_2D0;
}
Math_ApproachF(&this->unk_2CC, this->unk_2D0, 0.2f, 1000.0f);
if (this->actionFunc != func_809ED2A0) {
temp_v0_8 = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
if (ABS_ALT(temp_v0_8) < 0x6000) {
if (temp_v0_8 > 0x2500) {
this->unk_2D6 = 0x2500;
} else if (temp_v0_8 < -0x2500) {
this->unk_2D6 = -0x2500;
} else {
this->unk_2D6 = temp_v0_8;
}
} else {
this->unk_2D6 = 0;
}
Math_ApproachS(&this->unk_2D4, this->unk_2D6, 5, 0x800);
this->unk_2D8 = 2000;
this->unk_700 = (Math_SinS(this->unk_6F4 * 0x3000) * this->unk_6F4 * 0.02f) + 1.0f;
this->unk_6FC = (Math_CosS(this->unk_6F4 * 0x3000) * this->unk_6F4 * 0.02f) + 1.0f;
this->unk_6F8 = this->unk_6FC;
this->actor.shape.yOffset = (this->unk_6FC - 1.0f) * 1000.0f;
func_809ED45C(this, globalCtx);
if (this->unk_2CC > 3000.0f) {
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider1.base);
this->actor.flags |= 1;
} else {
this->actor.flags &= ~1;
}
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider2.base);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider2.base);
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider2.base);
func_809ED50C(this);
}
if (D_809EE4D0 != 0) {
D_809EE4D0--;
if (D_809EE4D0 == 0) {
func_801A2E54(0x38);
}
}
if (this->unk_74A != 0) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ME_EXIST - SFX_FLAG);
}
}
s32 Boss04_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
Actor* thisx) {
Boss04* this = THIS;
if (limbIndex == KREG(32)) {
if (!(this->unk_1F4 & 3)) {
*dList = NULL;
}
rot->x += KREG(33) * 256;
rot->y += KREG(34) * 256;
rot->z += KREG(35) * 256;
}
if ((limbIndex == 5) || (limbIndex == 7)) {
rot->y = (rot->y + (s16)this->unk_2CC) - 0x500;
}
if (limbIndex == 4) {
rot->y += this->unk_2D8;
rot->z += this->unk_2D4;
if (this->unk_2DA != 0) {
rot->y = (s16)(Math_SinS(this->unk_1F4 * 0x3000) * (this->unk_2DA * 500)) + rot->y;
rot->z = (s16)(Math_SinS(this->unk_1F4 * 0x3500) * (this->unk_2DA * 300)) + rot->z;
}
}
return false;
}
void Boss04_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
static Vec3f D_809EE228 = { 0.0f, -200.0f, 0.0f };
static Vec3f D_809EE234 = { 0.0f, 720.0f, 0.0f };
Boss04* this = THIS;
Vec3f sp18;
if (limbIndex == 1) {
Matrix_GetStateTranslationAndScaledY(-500.0f, &this->actor.focus.pos);
Matrix_MultiplyVector3fByState(&D_809EE228, &sp18);
func_809EC040(0, &this->collider1, &sp18);
Matrix_MultiplyVector3fByState(&D_809EE234, &sp18);
func_809EC040(0, &this->collider2, &sp18);
}
}
void Boss04_Draw(Actor* thisx, GlobalContext* globalCtx) {
Boss04* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx);
func_8012C28C(globalCtx->state.gfxCtx);
if (this->unk_200 & 1) {
POLY_OPA_DISP = Gfx_SetFog(POLY_OPA_DISP, 255, 0, 0, 255, 900, 1099);
}
Matrix_InsertTranslation(0.0f, 0.0f, 800.0f, MTXMODE_APPLY);
Matrix_Scale(this->unk_6F8, this->unk_6FC, this->unk_700, MTXMODE_APPLY);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
Boss04_OverrideLimbDraw, Boss04_PostLimbDraw, &this->actor);
POLY_OPA_DISP = func_801660B8(globalCtx, POLY_OPA_DISP);
if (this->actionFunc != func_809EC568) {
func_8012C448(globalCtx->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, 150);
gSPDisplayList(POLY_XLU_DISP++, object_boss04_DL_004510);
Matrix_InsertTranslation(this->unk_6BC.x, this->actor.floorHeight, this->unk_6BC.z, MTXMODE_NEW);
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_APPLY);
Matrix_InsertTranslation(0.0f, 0.0f, -20.0f, MTXMODE_APPLY);
Matrix_Scale(this->unk_6F8 * 1.8f, 0.0f, this->unk_700 * 2.8f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, object_boss04_DL_004550);
}
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
+63 -2
View File
@@ -9,9 +9,70 @@ typedef void (*Boss04ActionFunc)(struct Boss04*, GlobalContext*);
typedef struct Boss04 {
/* 0x0000 */ Actor actor;
/* 0x0144 */ char unk_144[0xC0];
/* 0x0144 */ SkelAnime skelAnime;
/* 0x0188 */ Vec3s jointTable[9];
/* 0x01BE */ Vec3s morphtable[9];
/* 0x01F4 */ s16 unk_1F4;
/* 0x01F6 */ s8 unk_1F6;
/* 0x01F7 */ u8 unk_1F7;
/* 0x01F8 */ s16 unk_1F8;
/* 0x01FA */ s16 unk_1FA;
/* 0x01FC */ UNK_TYPE1 unk_1FC[2];
/* 0x01FE */ s16 unk_1FE;
/* 0x0200 */ s16 unk_200;
/* 0x0204 */ Boss04ActionFunc actionFunc;
/* 0x0208 */ char unk_208[0x544];
/* 0x0208 */ ColliderJntSph collider1;
/* 0x0228 */ ColliderJntSphElement collider1Elements[1];
/* 0x0268 */ ColliderJntSph collider2;
/* 0x0288 */ ColliderJntSphElement collider2Elements[1];
/* 0x02C8 */ s16 unk_2C8;
/* 0x02CC */ f32 unk_2CC;
/* 0x02D0 */ f32 unk_2D0;
/* 0x02D4 */ s16 unk_2D4;
/* 0x02D6 */ s16 unk_2D6;
/* 0x02D8 */ s16 unk_2D8;
/* 0x02DA */ s16 unk_2DA;
/* 0x02DC */ s16 unk_2DC;
/* 0x02DE */ s16 unk_2DE;
/* 0x02E0 */ s16 unk_2E0;
/* 0x02E2 */ s16 unk_2E2;
/* 0x02E4 */ Vec3f unk_2E4[16];
/* 0x02E4 */ Vec3f unk_3A4[15];
/* 0x02E4 */ Vec3f unk_458[15];
/* 0x02E4 */ Vec3f unk_50C[11];
/* 0x02E4 */ Vec3f unk_590[11];
/* 0x02E4 */ Vec3f unk_614[6];
/* 0x02E4 */ Vec3f unk_65C[6];
/* 0x02E4 */ Vec3f unk_6A4;
/* 0x02E4 */ Vec3f unk_6B0;
/* 0x06BC */ Vec3f unk_6BC;
/* 0x06C8 */ Vec3f unk_6C8;
/* 0x06D4 */ f32 unk_6D4;
/* 0x06D8 */ f32 unk_6D8;
/* 0x06DC */ f32 unk_6DC;
/* 0x06E0 */ f32 unk_6E0;
/* 0x06E4 */ f32 unk_6E4;
/* 0x06E8 */ f32 unk_6E8;
/* 0x06EC */ UNK_TYPE1 unk_6EC[4];
/* 0x06F0 */ f32 unk_6F0;
/* 0x06F4 */ s16 unk_6F4;
/* 0x06F6 */ s16 unk_6F6;
/* 0x06F8 */ f32 unk_6F8;
/* 0x06FC */ f32 unk_6FC;
/* 0x0700 */ f32 unk_700;
/* 0x0704 */ u32 unk_704;
/* 0x0708 */ s16 unk_708;
/* 0x070A */ s16 unk_70A;
/* 0x070C */ Vec3f unk_70C;
/* 0x0718 */ Vec3f unk_718;
/* 0x0724 */ UNK_TYPE1 unk_724[4];
/* 0x0728 */ f32 unk_728;
/* 0x072C */ UNK_TYPE1 unk_72C[0x10];
/* 0x073C */ f32 unk_73C;
/* 0x0740 */ UNK_TYPE1 unk_740[4];
/* 0x0744 */ f32 unk_744;
/* 0x0748 */ s16 unk_748;
/* 0x074A */ u8 unk_74A;
} Boss04; // size = 0x74C
extern const ActorInit Boss_04_InitVars;
+2 -2
View File
@@ -53,8 +53,8 @@ void DmSa_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk2E0 = 0;
this->alpha = 0xFF;
this->actor.targetArrowOffset = 3000.0f;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 24.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06013328, NULL, 0, 0, 0);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06013328, NULL, NULL, NULL, 0);
func_80A2E960(&this->skelAnime, D_80A2ED00, 0);
Actor_SetScale(&this->actor, 0.01f);
this->actionFunc = DmSa_DoNothing;
@@ -44,5 +44,5 @@ void DmStatue_Update(Actor* thisx, GlobalContext* globalCtx) {
void DmStatue_Draw(Actor* thisx, GlobalContext* globalCtx) {
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&D_06001788));
func_800BE03C(globalCtx, D_06000520);
Gfx_DrawDListXlu(globalCtx, D_06000520);
}
+92 -92
View File
@@ -260,7 +260,7 @@ void func_80A9FE3C(DmStk* this, GlobalContext* globalCtx, SkelAnime* skelAnime,
void func_80A9FED8(DmStk* this, GlobalContext* globalCtx) {
switch (globalCtx->csCtx.frames + 20) {
case 1195:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_APPEAR);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_APPEAR);
break;
case 1232:
@@ -268,48 +268,48 @@ void func_80A9FED8(DmStk* this, GlobalContext* globalCtx) {
case 1252:
case 1255:
case 1257:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_SHAKEHEAD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_SHAKEHEAD);
break;
case 1285:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL03_LAUGH_BIG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL03_LAUGH_BIG);
break;
case 1343:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
break;
case 1410:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
break;
case 1603:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_WALK);
break;
case 1610:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_REVERSE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_REVERSE);
break;
case 2095:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_SURPRISED);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_SURPRISED);
break;
case 2190:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_JUMP);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_JUMP);
break;
case 2212:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_ONGND);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_ONGND);
break;
case 2214:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL02_LAUGH_SHORT);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL02_LAUGH_SHORT);
break;
case 2250:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL06_SURPRISED);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_DOWN_K);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL06_SURPRISED);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_DOWN_K);
break;
case 2255:
@@ -338,7 +338,7 @@ void func_80A9FED8(DmStk* this, GlobalContext* globalCtx) {
case 2508:
case 2519:
case 2530:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_RIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_RIDE);
break;
}
}
@@ -368,11 +368,11 @@ void func_80AA0100(DmStk* this, GlobalContext* globalCtx) {
case 232:
case 243:
case 254:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_RIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_RIDE);
break;
case 173:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL03_LAUGH_BIG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL03_LAUGH_BIG);
break;
}
}
@@ -380,15 +380,15 @@ void func_80AA0100(DmStk* this, GlobalContext* globalCtx) {
void func_80AA0158(DmStk* this, GlobalContext* globalCtx) {
switch (globalCtx->csCtx.frames) {
case 18:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_GASAGOSO);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_GASAGOSO);
break;
case 90:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
break;
case 142:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_EVIL_POWER);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_EVIL_POWER);
break;
}
}
@@ -405,11 +405,11 @@ void func_80AA01C0(DmStk* this, GlobalContext* globalCtx) {
break;
case 560:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL02_LAUGH_SHORT);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL02_LAUGH_SHORT);
break;
case 890:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL21_PSYCHO_VOICE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL21_PSYCHO_VOICE);
break;
}
}
@@ -423,7 +423,7 @@ void func_80AA0264(DmStk* this, GlobalContext* globalCtx) {
break;
case 71:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_BODY);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_BODY);
break;
case 365:
@@ -435,30 +435,30 @@ void func_80AA0264(DmStk* this, GlobalContext* globalCtx) {
break;
case 265:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL03_LAUGH_BIG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL03_LAUGH_BIG);
break;
case 126:
Audio_PlayActorSound2(&player->actor, NA_SE_VO_DUMMY_150);
Actor_PlaySfxAtPos(&player->actor, NA_SE_VO_DUMMY_150);
break;
case 197:
Audio_PlayActorSound2(&player->actor, NA_SE_VO_DUMMY_134);
Actor_PlaySfxAtPos(&player->actor, NA_SE_VO_DUMMY_134);
break;
case 207:
Audio_PlayActorSound2(&player->actor, NA_SE_VO_DUMMY_135);
Actor_PlaySfxAtPos(&player->actor, NA_SE_VO_DUMMY_135);
break;
case 217:
Audio_PlayActorSound2(&player->actor, NA_SE_VO_DUMMY_136);
Actor_PlaySfxAtPos(&player->actor, NA_SE_VO_DUMMY_136);
break;
}
if (player) {}
if ((globalCtx->csCtx.frames >= 263) && (globalCtx->csCtx.frames < 698)) {
Audio_PlayActorSound2(&player->actor, NA_SE_EN_STALKIDS_BODY_LEV - SFX_FLAG);
Actor_PlaySfxAtPos(&player->actor, NA_SE_EN_STALKIDS_BODY_LEV - SFX_FLAG);
}
}
@@ -471,37 +471,37 @@ void func_80AA0420(DmStk* this, GlobalContext* globalCtx) {
break;
case 258:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_TURN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_TURN);
break;
case 524:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_TURN);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL04_ANGER);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_TURN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL04_ANGER);
break;
case 534:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_ROLL);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_PO_ROLL);
break;
case 678:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_STRETCH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_STRETCH);
break;
}
if ((this->unk_2E0 == 31) && (globalCtx->csCtx.frames < 700)) {
if (Animation_OnFrame(&this->skelAnime, 5.0f) || Animation_OnFrame(&this->skelAnime, 25.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_OTEDAMA1);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_OTEDAMA1);
} else if (Animation_OnFrame(&this->skelAnime, 17.0f) || Animation_OnFrame(&this->skelAnime, 40.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_OTEDAMA2);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_OTEDAMA2);
}
}
if (globalCtx->csCtx.frames >= 700) {
if (D_80AA3CB8 < 128) {
if ((D_80AA3CB8 & 0x1F) == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL20_CALL_MOON);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL20_CALL_MOON);
} else if ((D_80AA3CB8 & 0x1F) == 16) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL20_CALL_MOON2);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL20_CALL_MOON2);
}
D_80AA3CB8++;
}
@@ -512,14 +512,14 @@ void func_80AA0420(DmStk* this, GlobalContext* globalCtx) {
void func_80AA05F0(DmStk* this, GlobalContext* globalCtx) {
if (globalCtx->csCtx.frames == 3) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL06_SURPRISED);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_DOWN_K);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL06_SURPRISED);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_DOWN_K);
}
}
void func_80AA0634(DmStk* this, GlobalContext* globalCtx) {
if ((globalCtx->csCtx.frames >= 642) && (globalCtx->csCtx.frames < 845)) {
Audio_PlayActorSound2(&this->actor, NA_SE_NE_STAL23_COLD - SFX_FLAG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_NE_STAL23_COLD - SFX_FLAG);
}
}
@@ -531,16 +531,16 @@ void func_80AA066C(DmStk* this, GlobalContext* globalCtx) {
case 72:
case 77:
case 79:
Audio_PlayActorSound2(&this->actor, NA_SE_PL_WALK_WATER2);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_PL_WALK_WATER2);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_WALK);
break;
case 186:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_UP);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_UP);
break;
case 230:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL22_LAUGH_KID_L);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL22_LAUGH_KID_L);
break;
}
}
@@ -552,7 +552,7 @@ void func_80AA071C(DmStk* this, GlobalContext* globalCtx) {
break;
case 660:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_SHAKEHEAD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_SHAKEHEAD);
break;
}
}
@@ -566,27 +566,27 @@ void func_80AA076C(DmStk* this, GlobalContext* globalCtx) {
break;
case 45:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_RIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_RIDE);
break;
case 93:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
break;
case 245:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_RIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_RIDE);
break;
case 269:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL11_LAUGH_SHY2);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL11_LAUGH_SHY2);
break;
case 327:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_SHAKEHEAD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_SHAKEHEAD);
break;
case 455:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_RIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_RIDE);
break;
case 1730:
@@ -594,7 +594,7 @@ void func_80AA076C(DmStk* this, GlobalContext* globalCtx) {
break;
case 1395:
func_800B8E58(&player->actor, NA_SE_VO_DUMMY_34);
func_800B8E58(player, NA_SE_VO_DUMMY_34);
break;
case 1850:
@@ -608,20 +608,20 @@ void func_80AA076C(DmStk* this, GlobalContext* globalCtx) {
if (this->unk_2E0 == 0) {
if (Animation_OnFrame(&this->skelAnime, 8.0f) || Animation_OnFrame(&this->skelAnime, 17.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
}
if (Animation_OnFrame(&this->skelAnime, 28.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_RIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_RIDE);
}
} else if (this->unk_2E0 == 71) {
if (Animation_OnFrame(&this->skelAnime, 2.0f) || Animation_OnFrame(&this->skelAnime, 6.0f) ||
Animation_OnFrame(&this->skelAnime, 12.0f) || Animation_OnFrame(&this->skelAnime, 18.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
}
} else if ((this->unk_2E0 == 70) &&
(Animation_OnFrame(&this->skelAnime, 16.0f) || Animation_OnFrame(&this->skelAnime, 23.0f))) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_NOSE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_NOSE);
}
}
@@ -634,25 +634,25 @@ void func_80AA09DC(DmStk* this, GlobalContext* globalCtx) {
break;
case 234:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_TURN);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL04_ANGER);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_TURN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL04_ANGER);
break;
case 244:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_ROLL);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_PO_ROLL);
break;
case 388:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_STRETCH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_STRETCH);
break;
}
if (globalCtx->csCtx.frames >= 408) {
if (D_80AA3CBC < 128) {
if ((D_80AA3CBC & 0x1F) == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL20_CALL_MOON);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL20_CALL_MOON);
} else if ((D_80AA3CBC & 0x1F) == 16) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL20_CALL_MOON2);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL20_CALL_MOON2);
}
D_80AA3CBC++;
}
@@ -675,19 +675,19 @@ void func_80AA0B08(DmStk* this, GlobalContext* globalCtx) {
case 332:
case 335:
case 344:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
break;
case 367:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_BODY_LEV);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_BODY_LEV);
break;
case 470:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_HEADACHE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_HEADACHE);
break;
case 486:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
func_8019F1C0(&this->unk_310, NA_SE_EN_STAL08_CRY_BIG);
break;
@@ -696,11 +696,11 @@ void func_80AA0B08(DmStk* this, GlobalContext* globalCtx) {
break;
case 590:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
break;
case 592:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_RIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_RIDE);
break;
case 594:
@@ -712,16 +712,16 @@ void func_80AA0B08(DmStk* this, GlobalContext* globalCtx) {
if ((globalCtx->csCtx.frames >= 62) && (globalCtx->csCtx.frames < 273)) {
if ((Rand_ZeroOne() < 0.75f) && ((globalCtx->state.frames % 2) != 0)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_EARTHQUAKE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_EARTHQUAKE);
}
}
if ((globalCtx->csCtx.frames >= 498) && (globalCtx->csCtx.frames < 577)) {
if ((globalCtx->state.frames % 4) == 0) {
if ((globalCtx->state.frames & 4) != 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_BODY_LEV);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_BODY_LEV);
} else {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
}
}
}
@@ -734,16 +734,16 @@ void func_80AA0B08(DmStk* this, GlobalContext* globalCtx) {
void func_80AA0DA8(DmStk* this, GlobalContext* globalCtx) {
switch (globalCtx->csCtx.frames) {
case 551:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_PULLED);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_PULLED);
break;
case 711:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
break;
case 716:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_ONGND);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_ONGND);
break;
}
}
@@ -751,16 +751,16 @@ void func_80AA0DA8(DmStk* this, GlobalContext* globalCtx) {
void func_80AA0E1C(DmStk* this, GlobalContext* globalCtx) {
switch (globalCtx->csCtx.frames) {
case 311:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_PULLED);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_PULLED);
break;
case 365:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
break;
case 372:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_ONGND);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_ONGND);
break;
}
}
@@ -834,24 +834,24 @@ void func_80AA0E90(DmStk* this, GlobalContext* globalCtx) {
if (this->unk_2E0 == 1) {
if (Animation_OnFrame(&this->skelAnime, 2.0f) || Animation_OnFrame(&this->skelAnime, 6.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_WALK);
}
} else if (this->unk_2E0 == 19) {
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 13.0f) ||
Animation_OnFrame(&this->skelAnime, 20.0f) || Animation_OnFrame(&this->skelAnime, 27.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_PL_CALM_HIT);
Actor_PlaySfxAtPos(&this->actor, NA_SE_PL_CALM_HIT);
}
} else if (this->unk_2E0 == 14) {
if (Animation_OnFrame(&this->skelAnime, 3.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_PL_PUT_OUT_ITEM);
Actor_PlaySfxAtPos(&this->actor, NA_SE_PL_PUT_OUT_ITEM);
}
} else if (this->unk_2E0 == 15) {
if (Animation_OnFrame(&this->skelAnime, 14.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_UNSKILLFUL_OCARINA);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_UNSKILLFUL_OCARINA);
}
if (Animation_OnFrame(&this->skelAnime, 45.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL01_LAUGH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL01_LAUGH);
}
}
}
@@ -964,7 +964,7 @@ void DmStk_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_2E4 = this->unk_2E4;
this->actor.targetArrowOffset = 1100.0f;
this->unk_334 = 99;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 24.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06013328, NULL, NULL, NULL, 0);
func_80A9FE3C(this, globalCtx, &this->skelAnime, &sAnimations[this->unk_2E0], 0);
}
@@ -1062,7 +1062,7 @@ void func_80AA19EC(DmStk* this, GlobalContext* globalCtx) {
void func_80AA1A50(DmStk* this, GlobalContext* globalCtx) {
if (ActorCutscene_GetCanPlayNext(0xA)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_DAMAGE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_DAMAGE);
ActorCutscene_Start(0xA, &this->actor);
this->actor.shape.rot.x = 0;
this->actor.world.rot.x = this->actor.shape.rot.x;
@@ -1109,7 +1109,7 @@ void func_80AA1B9C(DmStk* this, GlobalContext* globalCtx) {
this->unk_2E0 = 39;
func_80A9FE3C(this, globalCtx, &this->skelAnime, &sAnimations[this->unk_2E0], 0);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_DOWN_K);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_DOWN_K);
this->actionFunc = func_80AA1C64;
}
@@ -1568,9 +1568,9 @@ void DmStk_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->actor.params != 1) {
if (this->unk_2E0 == 33) {
Actor_SetHeight(&this->actor, 40.0f);
Actor_SetFocus(&this->actor, 40.0f);
} else {
Actor_SetHeight(&this->actor, 6.0f);
Actor_SetFocus(&this->actor, 6.0f);
}
func_80A9FDB0(this, globalCtx);
@@ -1592,7 +1592,7 @@ void DmStk_Update(Actor* thisx, GlobalContext* globalCtx) {
switch (this->unk_33A) {
case 1:
if (func_800B8718(&this->actor, globalCtx)) {
if (func_800B8718(&this->actor, &globalCtx->state)) {
this->unk_33A = 2;
} else {
func_800B874C(&this->actor, globalCtx, this->actor.xzDistToPlayer,
@@ -1719,7 +1719,7 @@ void DmStk_PostLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[this->unk_337].segment);
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&D_06008658));
func_800BDFC0(globalCtx, D_06007840);
Gfx_DrawDListOpa(globalCtx, D_06007840);
gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->unk_336].segment);
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[this->unk_336].segment);
@@ -1829,7 +1829,7 @@ void DmStk_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_33B != 0) {
if (this->actor.params == 1) {
func_800BDFC0(globalCtx, D_06006BB0);
Gfx_DrawDListOpa(globalCtx, D_06006BB0);
return;
}
@@ -208,5 +208,5 @@ void DoorAna_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void DoorAna_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BE03C(globalCtx, D_05000C40);
Gfx_DrawDListXlu(globalCtx, D_05000C40);
}
@@ -205,7 +205,7 @@ void DoorSpiral_Init(Actor* thisx, GlobalContext* globalCtx) {
}
DoorSpiral_SetupAction(this, DoorSpiral_WaitForObject);
Actor_SetHeight(&this->actor, 60.0f);
Actor_SetFocus(&this->actor, 60.0f);
}
void DoorSpiral_Destroy(Actor* thisx, GlobalContext* globalCtx) {
@@ -237,7 +237,7 @@ f32 DoorSpiral_GetDistFromPlayer(GlobalContext* globalCtx, DoorSpiral* this, f32
target.y = player->actor.world.pos.y + yOffset;
target.z = player->actor.world.pos.z;
Actor_CalcOffsetOrientedToDrawRotation(&this->actor, &offset, &target);
Actor_OffsetOfPointInActorCoords(&this->actor, &offset, &target);
if ((spiralWidth < fabsf(offset.x)) || (spiralHeight < fabsf(offset.y))) {
return FLT_MAX;
@@ -252,7 +252,7 @@ f32 DoorSpiral_GetDistFromPlayer(GlobalContext* globalCtx, DoorSpiral* this, f32
s32 DoorSpiral_PlayerShouldClimb(DoorSpiral* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if (!(func_801233E4(globalCtx))) {
if (!Player_InCsMode(&globalCtx->state)) {
SpiralInfo* spiralInfo = &sSpiralInfo[this->spiralType];
f32 dist =
DoorSpiral_GetDistFromPlayer(globalCtx, this, 0.0f, spiralInfo->spiralWidth, spiralInfo->spiralHeight);
@@ -327,7 +327,7 @@ void func_808B90CC(DoorWarp1* this, GlobalContext* globalCtx) {
DoorWarp1_SetupAction(this, func_808B921C);
}
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WARP_HOLE_ENERGY - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WARP_HOLE_ENERGY - SFX_FLAG);
}
void func_808B921C(DoorWarp1* this, GlobalContext* globalCtx) {
@@ -348,14 +348,14 @@ void func_808B921C(DoorWarp1* this, GlobalContext* globalCtx) {
DoorWarp1_SetupAction(this, func_808B93A0);
}
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BOSS_WARP_HOLE - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_BOSS_WARP_HOLE - SFX_FLAG);
}
void func_808B93A0(DoorWarp1* this, GlobalContext* globalCtx) {
s32 pad;
Player* player = GET_PLAYER(globalCtx);
if ((func_80152498(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 4 && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
if (globalCtx->msgCtx.choiceIndex == 0) {
func_8019F208();
@@ -371,7 +371,7 @@ void func_808B93A0(DoorWarp1* this, GlobalContext* globalCtx) {
}
}
func_808BB8D4(this, globalCtx, 1);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BOSS_WARP_HOLE - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_BOSS_WARP_HOLE - SFX_FLAG);
}
void func_808B94A4(DoorWarp1* this, GlobalContext* globalCtx) {
@@ -379,7 +379,7 @@ void func_808B94A4(DoorWarp1* this, GlobalContext* globalCtx) {
DoorWarp1_SetupAction(this, func_808B921C);
}
func_808BB8D4(this, globalCtx, 1);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BOSS_WARP_HOLE - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_BOSS_WARP_HOLE - SFX_FLAG);
}
void func_808B9524(DoorWarp1* this, GlobalContext* globalCtx) {
@@ -414,14 +414,14 @@ void func_808B958C(DoorWarp1* this, GlobalContext* globalCtx) {
}
Math_SmoothStepToF(&this->unk_1A8, 6.0f, 0.2f, 0.02f, 0.01f);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_LINK_WARP - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_LINK_WARP - SFX_FLAG);
}
void func_808B96A0(DoorWarp1* this, GlobalContext* globalCtx) {
}
void func_808B96B0(DoorWarp1* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
Math_SmoothStepToF(&this->unk_1B0, 255.0f, 0.4f, 10.0f, 0.01f);
Math_SmoothStepToF(&this->unk_1B4, 255.0f, 0.4f, 10.0f, 0.01f);
@@ -441,11 +441,11 @@ void func_808B96B0(DoorWarp1* this, GlobalContext* globalCtx) {
}
void func_808B977C(DoorWarp1* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
if (func_808B866C(this, globalCtx) && !func_801690CC(globalCtx)) {
Player* player = GET_PLAYER(globalCtx);
func_801A5CFC(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &D_801DB4B0, &D_801DB4B0, &D_801DB4B8);
Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &D_801DB4B0, &D_801DB4B0, &D_801DB4B8);
func_800B7298(globalCtx, &this->dyna.actor, 9);
player->unk_3A0.x = this->dyna.actor.world.pos.x;
player->unk_3A0.z = this->dyna.actor.world.pos.z;
@@ -514,7 +514,7 @@ void func_808B9B30(DoorWarp1* this, GlobalContext* globalCtx) {
}
void func_808B9BE8(DoorWarp1* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
Math_SmoothStepToF(&this->unk_1B0, 255.0f, 0.2f, 2.0f, 0.1f);
Math_SmoothStepToF(&this->unk_1B4, 255.0f, 0.2f, 2.0f, 0.1f);
if (this->unk_1C4 < 10) {
@@ -546,7 +546,7 @@ void func_808B9CE8(DoorWarp1* this, GlobalContext* globalCtx) {
}
if (!Actor_HasParent(&this->dyna.actor, globalCtx)) {
func_800B8A1C(&this->dyna.actor, globalCtx, func_808B849C(this, globalCtx) + 84, 30.0f, 80.0f);
Actor_PickUp(&this->dyna.actor, globalCtx, func_808B849C(this, globalCtx) + 84, 30.0f, 80.0f);
return;
}
@@ -579,7 +579,7 @@ void func_808B9CE8(DoorWarp1* this, GlobalContext* globalCtx) {
}
void func_808B9E94(DoorWarp1* this, GlobalContext* globalCtx) {
if (func_80152498(&globalCtx->msgCtx) == 2) {
if (Message_GetState(&globalCtx->msgCtx) == 2) {
this->unk_1CE = 110;
DoorWarp1_SetupAction(this, func_808B9ED8);
}
@@ -593,7 +593,7 @@ void func_808B9ED8(DoorWarp1* this, GlobalContext* globalCtx) {
}
void func_808B9F10(DoorWarp1* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
if ((this->unk_203 == 0) && func_808B866C(this, globalCtx) && !func_801690CC(globalCtx) && (this->unk_203 == 0)) {
Player* player = GET_PLAYER(globalCtx);
@@ -619,7 +619,7 @@ void func_808B9FD0(DoorWarp1* this, GlobalContext* globalCtx) {
ActorCutscene_SetIntentToPlay(globalCtx->unk_1879C[9]);
} else {
ActorCutscene_Start(globalCtx->unk_1879C[9], NULL);
func_801A5CFC(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &D_801DB4B0, &D_801DB4B0, &D_801DB4B8);
Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &D_801DB4B0, &D_801DB4B0, &D_801DB4B8);
Animation_ChangeImpl(&this->skelAnime, &object_warp1_Anim_001374, 1.0f,
Animation_GetLastFrame(&object_warp1_Anim_001374.common),
Animation_GetLastFrame(&object_warp1_Anim_001374.common), 2, 40.0f, 1);
@@ -1015,7 +1015,7 @@ void func_808BAE9C(DoorWarp1* this, GlobalContext* globalCtx) {
}
void func_808BB4C4(DoorWarp1* this, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, object_warp1_DL_0076C0);
Gfx_DrawDListOpa(globalCtx, object_warp1_DL_0076C0);
}
#ifdef NON_MATCHING
@@ -1036,7 +1036,7 @@ void func_808BB4F4(DoorWarp1* this, GlobalContext* globalCtx2) {
this->dyna.actor.world.pos.z, MTXMODE_NEW);
Matrix_Scale(4.0f, this->unk_1AC, 4.0f, MTXMODE_APPLY);
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&object_warp1_Matanimheader_0044D8));
func_800BE03C(globalCtx, object_warp1_DL_003230);
Gfx_DrawDListXlu(globalCtx, object_warp1_DL_003230);
return;
}
@@ -129,7 +129,7 @@ void func_80BECBE0(EnAkindonuts* this, s16 arg1) {
this->actor.velocity.z = 0.0f;
}
Actor_ApplyMovement(&this->actor);
Actor_UpdatePos(&this->actor);
}
void func_80BECC7C(EnAkindonuts* this, GlobalContext* globalCtx) {
@@ -1036,7 +1036,7 @@ void func_80BEE73C(EnAkindonuts* this, GlobalContext* globalCtx) {
player->actor.textId = D_80BF048C[params];
this->unk_33C = player->actor.textId;
if (this->unk_33C == 0x15E4) {
player->unk_A87 = itemActionParam;
player->exchangeItemId = itemActionParam;
this->actionFunc = func_80BEF20C;
} else {
this->actionFunc = func_80BEF18C;
@@ -1045,7 +1045,7 @@ void func_80BEE73C(EnAkindonuts* this, GlobalContext* globalCtx) {
player->actor.textId = D_80BF0494[params];
this->unk_33C = player->actor.textId;
if (this->unk_33C == 0x15F9) {
player->unk_A87 = itemActionParam;
player->exchangeItemId = itemActionParam;
this->actionFunc = func_80BEF20C;
} else {
this->actionFunc = func_80BEF18C;
@@ -1054,7 +1054,7 @@ void func_80BEE73C(EnAkindonuts* this, GlobalContext* globalCtx) {
player->actor.textId = D_80BF049C[params];
this->unk_33C = player->actor.textId;
if (this->unk_33C == 0x160C) {
player->unk_A87 = itemActionParam;
player->exchangeItemId = itemActionParam;
this->actionFunc = func_80BEF20C;
} else {
this->actionFunc = func_80BEF18C;
@@ -1063,7 +1063,7 @@ void func_80BEE73C(EnAkindonuts* this, GlobalContext* globalCtx) {
player->actor.textId = D_80BF04A4[params];
this->unk_33C = player->actor.textId;
if (this->unk_33C == 0x1621) {
player->unk_A87 = itemActionParam;
player->exchangeItemId = itemActionParam;
this->actionFunc = func_80BEF20C;
} else {
this->actionFunc = func_80BEF18C;
@@ -1162,7 +1162,7 @@ void func_80BEEB20(EnAkindonuts* this, GlobalContext* globalCtx) {
}
if (phi_v0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_AKINDONUTS_HIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_AKINDONUTS_HIDE);
this->actionFunc = func_80BEEDC0;
this->unk_338 = 3;
this->collider.dim.height = 64;
@@ -1175,12 +1175,12 @@ void func_80BEEB20(EnAkindonuts* this, GlobalContext* globalCtx) {
if ((this->unk_338 == 4) || (this->unk_338 == 18)) {
this->unk_338 = 17;
this->collider.dim.height = 0;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_DOWN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN);
func_8013BC6C(&this->skelAnime, sAnimations, 17);
} else if (this->unk_338 == 2) {
this->unk_338 = 16;
this->collider.dim.height = 32;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_UP);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_UP);
func_8013BC6C(&this->skelAnime, sAnimations, 16);
} else if (this->unk_338 == 17) {
phi_v0 = DECR(this->unk_33A);
@@ -1213,7 +1213,7 @@ void func_80BEEE10(EnAkindonuts* this, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 2000, 0);
this->actor.world.rot.y = this->actor.shape.rot.y;
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_2DC(this, globalCtx);
this->actionFunc = func_80BEEFA8;
} else if (((this->actor.xzDistToPlayer < 100.0f) &&
@@ -1229,7 +1229,7 @@ void func_80BEEE10(EnAkindonuts* this, GlobalContext* globalCtx) {
}
void func_80BEEFA8(EnAkindonuts* this, GlobalContext* globalCtx) {
u8 temp_v0 = func_80152498(&globalCtx->msgCtx);
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 5) {
if (func_80147624(globalCtx)) {
@@ -1274,7 +1274,7 @@ void func_80BEEFA8(EnAkindonuts* this, GlobalContext* globalCtx) {
}
void func_80BEF18C(EnAkindonuts* this, GlobalContext* globalCtx) {
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_33C = 0;
@@ -1283,7 +1283,7 @@ void func_80BEF18C(EnAkindonuts* this, GlobalContext* globalCtx) {
}
void func_80BEF20C(EnAkindonuts* this, GlobalContext* globalCtx) {
u8 sp27 = func_80152498(&globalCtx->msgCtx);
u8 sp27 = Message_GetState(&globalCtx->msgCtx);
s16 sp24 = this->skelAnime.curFrame;
s16 sp22 = Animation_GetLastFrame(&sAnimations[this->unk_338].animationSeg->common);
@@ -1319,25 +1319,25 @@ void func_80BEF360(EnAkindonuts* this, GlobalContext* globalCtx) {
this->unk_32C &= ~0x40;
this->actionFunc = func_80BEF450;
} else {
func_800B8A1C(&this->actor, globalCtx, func_80BED034(this), 300.0f, 300.0f);
Actor_PickUp(&this->actor, globalCtx, func_80BED034(this), 300.0f, 300.0f);
}
} else if (Actor_HasParent(&this->actor, globalCtx)) {
this->actor.parent = NULL;
this->actionFunc = func_80BEF450;
} else {
func_800B8A1C(&this->actor, globalCtx, func_80BECFBC(this), 300.0f, 300.0f);
Actor_PickUp(&this->actor, globalCtx, func_80BECFBC(this), 300.0f, 300.0f);
}
}
void func_80BEF450(EnAkindonuts* this, GlobalContext* globalCtx) {
if ((func_80152498(&globalCtx->msgCtx) == 6) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 6) && func_80147624(globalCtx)) {
func_800B85E0(&this->actor, globalCtx, 400.0f, -1);
this->actionFunc = func_80BEF4B8;
}
}
void func_80BEF4B8(EnAkindonuts* this, GlobalContext* globalCtx) {
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_2DC(this, globalCtx);
this->actionFunc = func_80BEEFA8;
} else {
@@ -1422,7 +1422,7 @@ void func_80BEF518(EnAkindonuts* this, GlobalContext* globalCtx) {
this->unk_33E = 3;
this->unk_338 = 19;
func_8013BC6C(&this->skelAnime, sAnimations, this->unk_338);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_DOWN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN);
this->unk_32C &= ~2;
this->unk_32C |= 0x80;
this->unk_358 = this->actor.world.pos.y;
@@ -1481,7 +1481,7 @@ void func_80BEF83C(EnAkindonuts* this, GlobalContext* globalCtx) {
this->unk_34C = 0.3f;
this->unk_338 = 9;
func_8013BC6C(&this->skelAnime, sAnimations, this->unk_338);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_AKINDONUTS_HIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_AKINDONUTS_HIDE);
this->actionFunc = func_80BEF9F0;
}
}
@@ -1587,7 +1587,7 @@ void EnAkindonuts_Init(Actor* thisx, GlobalContext* globalCtx) {
this->morphTable, 28);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinderType1(globalCtx, &this->collider, &this->actor, &sCylinderInit);
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 35.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
Actor_SetScale(&this->actor, 0.01f);
this->actor.colChkInfo.cylRadius = 0;
@@ -1620,9 +1620,9 @@ void EnAkindonuts_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void EnAkindonuts_Update(Actor* thisx, GlobalContext* globalCtx) {
EnAkindonuts* this = THIS;
Actor_SetHeight(&this->actor, 60.0f);
Actor_SetFocus(&this->actor, 60.0f);
SkelAnime_Update(&this->skelAnime);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
this->actionFunc(this, globalCtx);

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