Merge remote-tracking branch 'upstream/master' into ultracleanup2

This commit is contained in:
angie
2023-09-19 14:58:45 -03:00
150 changed files with 3629 additions and 1439 deletions
+5 -6
View File
@@ -207,8 +207,7 @@ DEP_FILES := $(O_FILES:.o=.asmproc.d) $(OVL_RELOC_FILES:.o=.d)
$(shell mkdir -p build/baserom $(foreach dir,$(SRC_DIRS) $(ASM_DIRS) $(ASSET_BIN_DIRS),build/$(dir)))
# directory flags
build/src/boot_O2/%.o: OPTFLAGS := -O2
build/src/boot_O2_g3/%.o: OPTFLAGS := -O2 -g3
build/src/boot/O2/%.o: OPTFLAGS := -O2
build/src/libultra/os/%.o: OPTFLAGS := -O1
build/src/libultra/voice/%.o: OPTFLAGS := -O2
@@ -225,8 +224,8 @@ build/assets/%.o: OPTFLAGS := -O1
build/assets/%.o: ASM_PROC_FLAGS :=
# file flags
build/src/boot_O2_g3/fault.o: CFLAGS += -trapuv
build/src/boot_O2_g3/fault_drawer.o: CFLAGS += -trapuv
build/src/boot/fault.o: CFLAGS += -trapuv
build/src/boot/fault_drawer.o: CFLAGS += -trapuv
build/src/code/jpegutils.o: OPTFLAGS := -O2
build/src/code/jpegdecoder.o: OPTFLAGS := -O2
@@ -239,8 +238,8 @@ build/src/libultra/libc/llcvt.o: OPTFLAGS := -O1
build/src/libultra/libc/llcvt.o: MIPS_VERSION := -mips3 -32
# cc & asm-processor
build/src/boot_O2/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) --
build/src/boot_O2_g3/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) --
build/src/boot/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) --
build/src/boot/O2/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) --
build/src/libultra/%.o: CC := $(CC_OLD)
# Needed at least until voice is decompiled
+274 -121
View File
@@ -1,162 +1,315 @@
<Root>
<!-- Assets for fishing -->
<File Name="object_fish" Segment="6">
<Animation Name="gFishingFishAnim" Offset="0x7C" /> <!-- Original name is "basu" -->
<DList Name="object_fish_DL_000940" Offset="0x940" />
<DList Name="object_fish_DL_0009E8" Offset="0x9E8" />
<DList Name="object_fish_DL_000B00" Offset="0xB00" />
<DList Name="object_fish_DL_000BA0" Offset="0xBA0" />
<DList Name="object_fish_DL_000C40" Offset="0xC40" />
<DList Name="object_fish_DL_000E30" Offset="0xE30" />
<DList Name="object_fish_DL_000ED0" Offset="0xED0" />
<DList Name="object_fish_DL_000F70" Offset="0xF70" />
<DList Name="object_fish_DL_0010A0" Offset="0x10A0" />
<DList Name="object_fish_DL_001260" Offset="0x1260" />
<DList Name="object_fish_DL_001300" Offset="0x1300" />
<DList Name="object_fish_DL_0013A0" Offset="0x13A0" />
<Texture Name="object_fish_Tex_0014D0" OutName="tex_0014D0" Format="rgba16" Width="16" Height="16" Offset="0x14D0" />
<Texture Name="object_fish_Tex_0016D0" OutName="tex_0016D0" Format="rgba16" Width="16" Height="16" Offset="0x16D0" />
<Texture Name="object_fish_Tex_0018D0" OutName="tex_0018D0" Format="rgba16" Width="16" Height="16" Offset="0x18D0" />
<Texture Name="object_fish_Tex_001AD0" OutName="tex_001AD0" Format="rgba16" Width="32" Height="32" Offset="0x1AD0" />
<Texture Name="object_fish_Tex_0022D0" OutName="tex_0022D0" Format="rgba16" Width="16" Height="16" Offset="0x22D0" />
<!-- <Blob Name="object_fish_Blob_0024D0" Size="0x200" Offset="0x24D0" /> -->
<Texture Name="object_fish_Tex_0026D0" OutName="tex_0026D0" Format="rgba16" Width="16" Height="16" Offset="0x26D0" />
<Limb Name="object_fish_Standardlimb_0028D0" Type="Standard" EnumName="FISHING_FISH_LIMB_01" Offset="0x28D0" />
<Limb Name="object_fish_Standardlimb_0028DC" Type="Standard" EnumName="FISHING_FISH_LIMB_02" Offset="0x28DC" />
<Limb Name="object_fish_Standardlimb_0028E8" Type="Standard" EnumName="FISHING_FISH_LIMB_03" Offset="0x28E8" />
<Limb Name="object_fish_Standardlimb_0028F4" Type="Standard" EnumName="FISHING_FISH_LIMB_04" Offset="0x28F4" />
<Limb Name="object_fish_Standardlimb_002900" Type="Standard" EnumName="FISHING_FISH_LIMB_05" Offset="0x2900" />
<Limb Name="object_fish_Standardlimb_00290C" Type="Standard" EnumName="FISHING_FISH_LIMB_06" Offset="0x290C" />
<Limb Name="object_fish_Standardlimb_002918" Type="Standard" EnumName="FISHING_FISH_LIMB_07" Offset="0x2918" />
<Limb Name="object_fish_Standardlimb_002924" Type="Standard" EnumName="FISHING_FISH_LIMB_08" Offset="0x2924" />
<Limb Name="object_fish_Standardlimb_002930" Type="Standard" EnumName="FISHING_FISH_LIMB_09" Offset="0x2930" />
<Limb Name="object_fish_Standardlimb_00293C" Type="Standard" EnumName="FISHING_FISH_LIMB_0A" Offset="0x293C" />
<Limb Name="object_fish_Standardlimb_002948" Type="Standard" EnumName="FISHING_FISH_LIMB_0B" Offset="0x2948" />
<Limb Name="object_fish_Standardlimb_002954" Type="Standard" EnumName="FISHING_FISH_LIMB_0C" Offset="0x2954" />
<Limb Name="object_fish_Standardlimb_002960" Type="Standard" EnumName="FISHING_FISH_LIMB_0D" Offset="0x2960" />
<Limb Name="object_fish_Standardlimb_00296C" Type="Standard" EnumName="FISHING_FISH_LIMB_0E" Offset="0x296C" />
<Limb Name="object_fish_Standardlimb_002978" Type="Standard" EnumName="FISHING_FISH_LIMB_0F" Offset="0x2978" />
<Skeleton Name="gFishingFishSkel" Type="Flex" LimbType="Standard" LimbNone="FISHING_FISH_LIMB_NONE" LimbMax="FISHING_FISH_LIMB_MAX" EnumName="FishingFishLimb" 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" />
<!-- Bass -->
<!-- Bass Animations -->
<Animation Name="gFishingBassAnim" Offset="0x7C" /> <!-- Original name is "basu" -->
<!-- Bass DLs -->
<DList Name="gFishingBassTailFinDL" Offset="0x940" />
<DList Name="gFishingBassBackSegmentEndDL" Offset="0x9E8" />
<DList Name="gFishingBassTopRearFinDL" Offset="0xB00" />
<DList Name="gFishingBassBottomRearFinDL" Offset="0xBA0" />
<DList Name="gFishingBassBackSegmentDL" Offset="0xC40" />
<DList Name="gFishingBassTopFrontFinDL" Offset="0xE30" />
<DList Name="gFishingBassBottomFrontFinDL" Offset="0xED0" />
<DList Name="gFishingBassMiddleSegmentDL" Offset="0xF70" />
<DList Name="gFishingBassHeadDL" Offset="0x10A0" />
<DList Name="gFishingBassLeftPectoralFinDL" Offset="0x1260" />
<DList Name="gFishingBassRightPectoralFinDL" Offset="0x1300" />
<DList Name="gFishingBassJawDL" Offset="0x13A0" />
<!-- Bass Textures -->
<Texture Name="gFishingBassTailFinTex" OutName="fishing_bass_tail_fin" Format="rgba16" Width="16" Height="16" Offset="0x14D0" />
<Texture Name="gFishingBassTopScalesTex" OutName="fishing_bass_top_scales" Format="rgba16" Width="16" Height="16" Offset="0x16D0" />
<Texture Name="gFishingBassBottomScalesTex" OutName="fishing_bass_bottom_scales" Format="rgba16" Width="16" Height="16" Offset="0x18D0" />
<Texture Name="gFishingBassHeadTex" OutName="fishing_bass_head" Format="rgba16" Width="32" Height="32" Offset="0x1AD0" />
<Texture Name="gFishingBassFinTex" OutName="fishing_bass_fin" Format="rgba16" Width="16" Height="16" Offset="0x22D0" />
<Texture Name="gFishingBassUnusedFinTex" OutName="fishing_bass_unused_fin" Format="rgba16" Width="16" Height="16" Offset="0x24D0" />
<Texture Name="gFishingBassSpinyFinTex" OutName="fishing_bass_spiny_fin" Format="rgba16" Width="16" Height="16" Offset="0x26D0" />
<!-- Bass Limbs and Skel -->
<Limb Name="gFishingBassHeadLimb" Type="Standard" EnumName="FISHING_BASS_LIMB_HEAD" Offset="0x28D0" />
<Limb Name="gFishingBassMiddleSegmentRootLimb" Type="Standard" EnumName="FISHING_BASS_LIMB_MIDDLE_SEGMENT_ROOT" Offset="0x28DC" />
<Limb Name="gFishingBassBackSegmentRootLimb" Type="Standard" EnumName="FISHING_BASS_LIMB_BACK_SEGMENT_ROOT" Offset="0x28E8" />
<Limb Name="gFishingBassEndRootLimb" Type="Standard" EnumName="FISHING_BASS_LIMB_END_ROOT" Offset="0x28F4" />
<Limb Name="gFishingBassTailFinLimb" Type="Standard" EnumName="FISHING_BASS_LIMB_TAIL_FIN" Offset="0x2900" />
<Limb Name="gFishingBassBackSegmentEndLimb" Type="Standard" EnumName="FISHING_BASS_LIMB_BACK_SEGMENT_END" Offset="0x290C" />
<Limb Name="gFishingBassBackSegmentLimb" Type="Standard" EnumName="FISHING_BASS_LIMB_BACK_SEGMENT" Offset="0x2918" />
<Limb Name="gFishingBassTopRearFinLimb" Type="Standard" EnumName="FISHING_BASS_LIMB_TOP_REAR_FIN" Offset="0x2924" />
<Limb Name="gFishingBassBottomRearFinLimb" Type="Standard" EnumName="FISHING_BASS_LIMB_BOTTOM_REAR_FIN" Offset="0x2930" />
<Limb Name="gFishingBassMiddleSegmentLimb" Type="Standard" EnumName="FISHING_BASS_LIMB_MIDDLE_SEGMENT" Offset="0x293C" />
<Limb Name="gFishingBassTopFrontFinLimb" Type="Standard" EnumName="FISHING_BASS_LIMB_TOP_FRONT_FIN" Offset="0x2948" />
<Limb Name="gFishingBassBottomFrontFinLimb" Type="Standard" EnumName="FISHING_BASS_LIMB_BOTTOM_FRONT_FIN" Offset="0x2954" />
<Limb Name="gFishingBassJawLimb" Type="Standard" EnumName="FISHING_BASS_LIMB_JAW" Offset="0x2960" />
<Limb Name="gFishingBassRightPectoralFinLimb" Type="Standard" EnumName="FISHING_BASS_LIMB_RIGHT_PECTORAL_FIN" Offset="0x296C" />
<Limb Name="gFishingBassLeftPectoralFinLimb" Type="Standard" EnumName="FISHING_BASS_LIMB_LEFT_PECTORAL_FIN" Offset="0x2978" />
<Skeleton Name="gFishingBassSkel" Type="Flex" LimbType="Standard" LimbNone="FISHING_BASS_LIMB_NONE" LimbMax="FISHING_BASS_LIMB_MAX" EnumName="FishingBassLimb" Offset="0x29C0" />
<!-- Old Lure -->
<!-- Old Lure Textures -->
<Texture Name="gFishingOldLureHookTex" OutName="fishing_old_lure_hook" Format="rgba16" Width="8" Height="16" Offset="0x29D0" />
<Texture Name="gFishingOldLureFloatTex" OutName="fishing_old_lure_float" Format="rgba16" Width="8" Height="8" Offset="0x2AD0" />
<!-- Old Lure DLs -->
<DList Name="gFishingOldLureDL" Offset="0x2BD0" />
<!-- Stream Splash -->
<!-- Stream Splash Textures -->
<Texture Name="gFishingStreamSplashTile1Tex" OutName="fishing_stream_splash_tile_1" Format="i4" Width="32" Height="64" Offset="0x2CE0" />
<Texture Name="gFishingStreamSplashTile2Tex" OutName="fishing_stream_splash_tile_2" Format="i4" Width="16" Height="16" Offset="0x30E0" />
<!-- Stream Splash DLs-->
<DList Name="gFishingStreamSplashDL" Offset="0x3230" />
<Texture Name="object_fish_Tex_003320" OutName="tex_003320" Format="ia8" Width="16" Height="16" Offset="0x3320" />
<!-- Bubble -->
<!-- Bubble Textures-->
<Texture Name="gFishingBubbleTex" OutName="fishing_bubble" Format="ia8" Width="16" Height="16" Offset="0x3320" />
<!-- Bubble DLs-->
<DList Name="gFishingBubbleMaterialDL" Offset="0x3460" />
<DList Name="gFishingBubbleModelDL" Offset="0x34C0" />
<Texture Name="object_fish_Tex_0034E0" OutName="tex_0034E0" Format="i8" Width="16" Height="16" Offset="0x34E0" />
<!-- Dust Splash -->
<!-- Dust Splash Texture-->
<Texture Name="gFishingDustSplashTex" OutName="fishing_dust_splash" Format="i8" Width="16" Height="16" Offset="0x34E0" />
<!-- Dust Splash DLs-->
<DList Name="gFishingDustSplashMaterialDL" Offset="0x3610" />
<DList Name="gFishingDustSplashModelDL" Offset="0x3680" />
<DList Name="object_fish_DL_0036E0" Offset="0x36E0" />
<!-- Line -->
<!-- Line DLs -->
<DList Name="gFishingUnusedMaterialDL" Offset="0x36E0" />
<DList Name="gFishingLineModelDL" Offset="0x3710" />
<!-- Raindrop -->
<!-- Raindrop DLs -->
<DList Name="gFishingRainDropModelDL" Offset="0x3760" />
<Texture Name="object_fish_Tex_003778" OutName="tex_003778" Format="rgba16" Width="16" Height="16" Offset="0x3778" />
<!-- Rain Splash -->
<!-- Rain Splash Textures -->
<Texture Name="gFishingRainSplashTex" OutName="fishing_rain_splash" Format="rgba16" Width="16" Height="16" Offset="0x3778" />
<!-- Rain Splash DLs -->
<DList Name="gFishingRainSplashMaterialDL" Offset="0x39A8" />
<DList Name="gFishingRainSplashModelDL" Offset="0x3A18" />
<!-- Owner -->
<!-- Owner Animations -->
<Animation Name="gFishingOwnerAnim" Offset="0x453C" /> <!-- Original name is "fs_matsu" -->
<DList Name="object_fish_DL_006F60" Offset="0x6F60" />
<!-- Owner DLs -->
<DList Name="gFishingOwnerTorsoDL" Offset="0x6F60" />
<DList Name="gFishingOwnerHairDL" Offset="0x7350" />
<DList Name="gFishingOwnerHatDL" Offset="0x74C8" /> <!-- Original name is "fs_cap_model" -->
<DList Name="object_fish_DL_0076B8" Offset="0x76B8" />
<DList Name="object_fish_DL_007CF8" Offset="0x7CF8" />
<DList Name="object_fish_DL_007E48" Offset="0x7E48" />
<DList Name="object_fish_DL_007F78" Offset="0x7F78" />
<DList Name="object_fish_DL_008138" Offset="0x8138" />
<DList Name="object_fish_DL_008288" Offset="0x8288" />
<DList Name="object_fish_DL_0083B8" Offset="0x83B8" />
<Limb Name="object_fish_Standardlimb_008578" Type="Standard" EnumName="FISHING_OWNER_LIMB_01" Offset="0x8578" />
<Limb Name="object_fish_Standardlimb_008584" Type="Standard" EnumName="FISHING_OWNER_LIMB_02" Offset="0x8584" />
<Limb Name="object_fish_Standardlimb_008590" Type="Standard" EnumName="FISHING_OWNER_LIMB_03" Offset="0x8590" />
<Limb Name="object_fish_Standardlimb_00859C" Type="Standard" EnumName="FISHING_OWNER_LIMB_04" Offset="0x859C" />
<Limb Name="object_fish_Standardlimb_0085A8" Type="Standard" EnumName="FISHING_OWNER_LIMB_05" Offset="0x85A8" />
<Limb Name="object_fish_Standardlimb_0085B4" Type="Standard" EnumName="FISHING_OWNER_LIMB_06" Offset="0x85B4" />
<Limb Name="object_fish_Standardlimb_0085C0" Type="Standard" EnumName="FISHING_OWNER_LIMB_07" Offset="0x85C0" />
<Limb Name="object_fish_Standardlimb_0085CC" Type="Standard" EnumName="FISHING_OWNER_LIMB_HEAD" Offset="0x85CC" />
<DList Name="gFishingOwnerHeadDL" Offset="0x76B8" />
<DList Name="gFishingOwnerRightUpperArmDL" Offset="0x7CF8" />
<DList Name="gFishingOwnerRightForearmDL" Offset="0x7E48" />
<DList Name="gFishingOwnerRightHandDL" Offset="0x7F78" />
<DList Name="gFishingOwnerLeftUpperArmDL" Offset="0x8138" />
<DList Name="gFishingOwnerLeftForearmDL" Offset="0x8288" />
<DList Name="gFishingOwnerLeftHandDL" Offset="0x83B8" />
<!-- Owner Limbs and Skel -->
<Limb Name="gFishingOwnerTorsoLimb" Type="Standard" EnumName="FISHING_OWNER_LIMB_TORSO" Offset="0x8578" />
<Limb Name="gFishingOwnerLeftUpperArmLimb" Type="Standard" EnumName="FISHING_OWNER_LIMB_LEFT_UPPER_ARM" Offset="0x8584" />
<Limb Name="gFishingOwnerLeftForearmLimb" Type="Standard" EnumName="FISHING_OWNER_LIMB_LEFT_FOREARM" Offset="0x8590" />
<Limb Name="gFishingOwnerLeftHandLimb" Type="Standard" EnumName="FISHING_OWNER_LIMB_LEFT_HAND" Offset="0x859C" />
<Limb Name="gFishingOwnerRightUpperArmLimb" Type="Standard" EnumName="FISHING_OWNER_LIMB_RIGHT_UPPER_ARM" Offset="0x85A8" />
<Limb Name="gFishingOwnerRightForearmLimb" Type="Standard" EnumName="FISHING_OWNER_LIMB_RIGHT_FOREARM" Offset="0x85B4" />
<Limb Name="gFishingOwnerRightHandLimb" Type="Standard" EnumName="FISHING_OWNER_LIMB_RIGHT_HAND" Offset="0x85C0" />
<Limb Name="gFishingOwnerHeadLimb" Type="Standard" EnumName="FISHING_OWNER_LIMB_HEAD" Offset="0x85CC" />
<Skeleton Name="gFishingOwnerSkel" Type="Flex" LimbType="Standard" LimbNone="FISHING_OWNER_LIMB_NONE" LimbMax="FISHING_OWNER_LIMB_MAX" EnumName="FishingOwnerLimb" Offset="0x85F8" />
<!-- Ripple -->
<!-- Ripple DLs -->
<DList Name="gFishingRippleMaterialDL" Offset="0x8610" />
<DList Name="gFishingRippleModelDL" Offset="0x8678" />
<Texture Name="object_fish_Tex_008690" OutName="tex_008690" Format="i4" Width="32" Height="32" Offset="0x8690" />
<!-- Water Dust -->
<!-- Water Dust Textures-->
<Texture Name="gFishingWaterDustTex" OutName="fishing_water_dust" Format="i4" Width="32" Height="32" Offset="0x8690" />
<!-- Water Dust DLs -->
<DList Name="gFishingWaterDustMaterialDL" Offset="0x88C0" />
<DList Name="gFishingWaterDustModelDL" Offset="0x8970" /> <!-- Original name is "fs_smoke_modelT" -->
<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" />
<Texture Name="object_fish_Tex_008CD0" OutName="tex_008CD0" Format="ci8" Width="16" Height="16" Offset="0x8CD0" />
<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" />
<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" />
<!-- Owner -->
<!-- Owner Textures -->
<Texture Name="gFishingOwnerTLUT" OutName="fishing_owner_tlut" Format="rgba16" Width="16" Height="16" Offset="0x8990" />
<Texture Name="gFishingOwnerSkinTex" OutName="fishing_owner_skin" Format="ci8" Width="8" Height="8" Offset="0x8B90" TlutOffset="0x8990" />
<Texture Name="gFishingOwnerHairFullTex" OutName="fishing_owner_hair_full" Format="ci8" Width="16" Height="16" Offset="0x8BD0" TlutOffset="0x8990" />
<Texture Name="gFishingOwnerHairPartialTex" OutName="fishing_owner_hair_partial" Format="ci8" Width="16" Height="16" Offset="0x8CD0" TlutOffset="0x8990" />
<Texture Name="gFishingOwnerEarTex" OutName="fishing_owner_ear" Format="ci8" Width="8" Height="8" Offset="0x8DD0" TlutOffset="0x8990" />
<Texture Name="gFishingOwnerMouthTex" OutName="fishing_owner_mouth" Format="ci8" Width="32" Height="32" Offset="0x8E10" TlutOffset="0x8990" />
<Texture Name="gFishingOwnerNostrilTex" OutName="fishing_owner_nostril" Format="ci8" Width="8" Height="8" Offset="0x9210" TlutOffset="0x8990" />
<Texture Name="gFishingOwnerEyeOpenTex" OutName="fishing_owner_eye_open" Format="ci8" Width="32" Height="32" Offset="0x9250" TlutOffset="0x8990" />
<Texture Name="gFishingOwnerEyeHalfTex" OutName="fishing_owner_eye_half" Format="ci8" Width="32" Height="32" Offset="0x9650" TlutOffset="0x8990" />
<Texture Name="gFishingOwnerEyeClosedTex" OutName="fishing_owner_eye_closed" Format="ci8" Width="32" Height="32" Offset="0x9A50" TlutOffset="0x8990" />
<Texture Name="gFishingOwnerHatTex" OutName="fishing_owner_hat" Format="ci8" Width="64" Height="32" Offset="0x9E50" TlutOffset="0x8990" />
<Texture Name="gFishingOwnerShirtTex" OutName="fishing_owner_shirt" Format="ci8" Width="8" Height="8" Offset="0xA650" TlutOffset="0x8990" />
<Texture Name="gFishingOwnerFingersTex" OutName="fishing_owner_fingers" Format="ci8" Width="16" Height="16" Offset="0xA690" TlutOffset="0x8990" />
<Texture Name="gFishingOwnerCollarTex" OutName="fishing_owner_collar" Format="ci8" Width="8" Height="16" Offset="0xA790" TlutOffset="0x8990" />
<Texture Name="gFishingOwnerVestTex" OutName="fishing_owner_vest" Format="ci8" Width="16" Height="16" Offset="0xA810" TlutOffset="0x8990" />
<!-- Sinking Lure -->
<!-- Sinking Lure Textures -->
<Texture Name="gFishingSinkingLureSegmentTex" OutName="fishing_sinking_lure_segment" Format="ia8" Width="64" Height="64" Offset="0xA910" />
<!-- Sinking Lure DLs -->
<DList Name="gFishingSinkingLureSegmentMaterialDL" Offset="0xB950" />
<DList Name="gFishingSinkingLureSegmentModelDL" Offset="0xB9C0" />
<Texture Name="object_fish_Tex_00B9E0" OutName="tex_00B9E0" Format="rgba16" Width="64" Height="16" Offset="0xB9E0" />
<!-- Group Fish -->
<!-- Group Fish Texture -->
<Texture Name="gFishingGroupFishTex" OutName="fishing_group_fish" Format="rgba16" Width="64" Height="16" Offset="0xB9E0" />
<!-- Group Fish DLs -->
<DList Name="gFishingGroupFishMaterialDL" Offset="0xC220" />
<DList Name="gFishingGroupFishModelDL" Offset="0xC298" /> <!-- Original name is "minnow_model" -->
<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" />
<!-- Unused Rock -->
<!-- Unused Rock DLs -->
<DList Name="gFishingUnusedRockDL" Offset="0xC650" />
<!-- Unused Rock Textures -->
<Texture Name="gFishingUnusedRockTex" OutName="fishing_unused_rock" Format="rgba16" Width="32" Height="32" Offset="0xC780" />
<!-- Loach -->
<!-- Loach Animations -->
<Animation Name="gFishingLoachAnim" Offset="0xCFE0" /> <!-- Original name is "nz_namazu" -->
<DList Name="object_fish_DL_00DED0" Offset="0xDED0" />
<DList Name="object_fish_DL_00DFA8" Offset="0xDFA8" />
<DList Name="object_fish_DL_00E048" Offset="0xE048" />
<DList Name="object_fish_DL_00E168" Offset="0xE168" />
<DList Name="object_fish_DL_00E460" Offset="0xE460" />
<DList Name="object_fish_DL_00E500" Offset="0xE500" />
<DList Name="object_fish_DL_00E808" Offset="0xE808" />
<DList Name="object_fish_DL_00E8B0" Offset="0xE8B0" />
<DList Name="object_fish_DL_00EB28" Offset="0xEB28" />
<DList Name="object_fish_DL_00EBC8" Offset="0xEBC8" />
<DList Name="object_fish_DL_00EC68" Offset="0xEC68" />
<Texture Name="object_fish_Tex_00ED28" OutName="tex_00ED28" Format="rgba16" Width="32" Height="32" Offset="0xED28" />
<Texture Name="object_fish_Tex_00F528" OutName="tex_00F528" Format="rgba16" Width="32" Height="32" Offset="0xF528" />
<Texture Name="object_fish_Tex_00FD28" OutName="tex_00FD28" Format="rgba16" Width="32" Height="32" Offset="0xFD28" />
<Texture Name="object_fish_Tex_010528" OutName="tex_010528" Format="rgba16" Width="32" Height="32" Offset="0x10528" />
<Texture Name="object_fish_Tex_010D28" OutName="tex_010D28" Format="rgba16" Width="8" Height="8" Offset="0x10D28" />
<Texture Name="object_fish_Tex_010DA8" OutName="tex_010DA8" Format="rgba16" Width="16" Height="16" Offset="0x10DA8" />
<Limb Name="object_fish_Standardlimb_010FA8" Type="Standard" EnumName="FISHING_LOACH_LIMB_01" Offset="0x10FA8" />
<Limb Name="object_fish_Standardlimb_010FB4" Type="Standard" EnumName="FISHING_LOACH_LIMB_02" Offset="0x10FB4" />
<Limb Name="object_fish_Standardlimb_010FC0" Type="Standard" EnumName="FISHING_LOACH_LIMB_03" Offset="0x10FC0" />
<Limb Name="object_fish_Standardlimb_010FCC" Type="Standard" EnumName="FISHING_LOACH_LIMB_04" Offset="0x10FCC" />
<Limb Name="object_fish_Standardlimb_010FD8" Type="Standard" EnumName="FISHING_LOACH_LIMB_05" Offset="0x10FD8" />
<Limb Name="object_fish_Standardlimb_010FE4" Type="Standard" EnumName="FISHING_LOACH_LIMB_06" Offset="0x10FE4" />
<Limb Name="object_fish_Standardlimb_010FF0" Type="Standard" EnumName="FISHING_LOACH_LIMB_07" Offset="0x10FF0" />
<Limb Name="object_fish_Standardlimb_010FFC" Type="Standard" EnumName="FISHING_LOACH_LIMB_08" Offset="0x10FFC" />
<Limb Name="object_fish_Standardlimb_011008" Type="Standard" EnumName="FISHING_LOACH_LIMB_09" Offset="0x11008" />
<Limb Name="object_fish_Standardlimb_011014" Type="Standard" EnumName="FISHING_LOACH_LIMB_0A" Offset="0x11014" />
<Limb Name="object_fish_Standardlimb_011020" Type="Standard" EnumName="FISHING_LOACH_LIMB_0B" Offset="0x11020" />
<!-- Loach DLs -->
<DList Name="gFishingLoachHeadDL" Offset="0xDED0" />
<DList Name="gFishingLoachLowerFrontFin" Offset="0xDFA8" />
<DList Name="gFishingLoachFrontSegmentDL" Offset="0xE048" />
<DList Name="gFishingLoachMiddleSegmentDL" Offset="0xE168" />
<DList Name="gFishingLoachLowerBackFinDL" Offset="0xE460" />
<DList Name="gFishingLoachBackSegmentDL" Offset="0xE500" />
<DList Name="gFishingLoachTailFinDL" Offset="0xE808" />
<DList Name="gFishingLoachTailSegmentDL" Offset="0xE8B0" />
<DList Name="gFishingLoachRightPectoralFinDL" Offset="0xEB28" />
<DList Name="gFishingLoachLeftPectoralFinDL" Offset="0xEBC8" />
<DList Name="gFishingLoachJawDL" Offset="0xEC68" />
<!-- Loach Textures -->
<Texture Name="gFishingLoachTopScalesTex" OutName="fishing_loach_top_scales" Format="rgba16" Width="32" Height="32" Offset="0xED28" />
<Texture Name="gFishingLoachBottomScalesTex" OutName="fishing_loach_bottom_scales" Format="rgba16" Width="32" Height="32" Offset="0xF528" />
<Texture Name="gFishingLoachGillTex" OutName="fishing_loach_gill" Format="rgba16" Width="32" Height="32" Offset="0xFD28" />
<Texture Name="gFishingLoachHeadTex" OutName="fishing_loach_head" Format="rgba16" Width="32" Height="32" Offset="0x10528" />
<Texture Name="gFishingLoachTopFinTex" OutName="fishing_loach_top_fin" Format="rgba16" Width="8" Height="8" Offset="0x10D28" />
<Texture Name="gFishingLoachFinTex" OutName="fishing_loach_fin" Format="rgba16" Width="16" Height="16" Offset="0x10DA8" />
<!-- Loach Limbs and Skel -->
<Limb Name="gFishingLoachHeadLimb" Type="Standard" EnumName="FISHING_LOACH_LIMB_HEAD" Offset="0x10FA8" />
<Limb Name="gFishingLoachLowerFrontFinLimb" Type="Standard" EnumName="FISHING_LOACH_LIMB_LOWER_FRONT_FIN" Offset="0x10FB4" />
<Limb Name="gFishingLoachMiddleSegmentLimb" Type="Standard" EnumName="FISHING_LOACH_LIMB_MIDDLE_SEGMENT" Offset="0x10FC0" />
<Limb Name="gFishingLoachLowerBackFinLimb" Type="Standard" EnumName="FISHING_LOACH_LIMB_LOWER_BACK_FIN" Offset="0x10FCC" />
<Limb Name="gFishingLoachTailFinLimb" Type="Standard" EnumName="FISHING_LOACH_LIMB_TAIL_FIN" Offset="0x10FD8" />
<Limb Name="gFishingLoachTailSegmentLimb" Type="Standard" EnumName="FISHING_LOACH_LIMB_TAIL_SEGMENT" Offset="0x10FE4" />
<Limb Name="gFishingLoachBackSegmentLimb" Type="Standard" EnumName="FISHING_LOACH_LIMB_BACK_SEGMENT" Offset="0x10FF0" />
<Limb Name="gFishingLoachFrontSegmentLimb" Type="Standard" EnumName="FISHING_LOACH_LIMB_FRONT_SEGMENT" Offset="0x10FFC" />
<Limb Name="gFishingLoachLeftPectoralFinLimb" Type="Standard" EnumName="FISHING_LOACH_LIMB_LEFT_PECTORAL_FIN" Offset="0x11008" />
<Limb Name="gFishingLoachRightPectoralFinLimb" Type="Standard" EnumName="FISHING_LOACH_LIMB_RIGHT_PECTORAL_FIN" Offset="0x11014" />
<Limb Name="gFishingLoachJawLimb" Type="Standard" EnumName="FISHING_LOACH_LIMB_JAW" Offset="0x11020" />
<Skeleton Name="gFishingLoachSkel" Type="Flex" LimbType="Standard" LimbNone="FISHING_LOACH_LIMB_NONE" LimbMax="FISHING_LOACH_LIMB_MAX" EnumName="FishingLoachLimb" 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" />
<!-- Fishing Rod -->
<!-- Fishing Rod Textures -->
<Texture Name="gFishingRodSegmentStripTex" OutName="fishing_rod_segment_strip" Format="rgba16" Width="16" Height="8" Offset="0x11070" />
<Texture Name="gFishingRodSegmentBlackTex" OutName="fishing_rod_segment_black" Format="rgba16" Width="16" Height="8" Offset="0x11170" />
<Texture Name="gFishingRodSegmentWhiteTex" OutName="fishing_rod_segment_white" Format="rgba16" Width="16" Height="8" Offset="0x11270" />
<!-- Fishing Rod DLs -->
<DList Name="gFishingRodSetupDL" Offset="0x113D0" />
<DList Name="gFishingRodSegmentDL" Offset="0x11410" /> <!-- Original name is "rod_model" -->
<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" />
<!-- Lure -->
<!-- Lure Textures -->
<Texture Name="gFishingLureHookTex" OutName="fishing_lure_hook" Format="rgba16" Width="32" Height="32" Offset="0x11440" />
<Texture Name="gFishingLureFloatTex" OutName="fishing_lure_float" Format="rgba16" Width="32" Height="16" Offset="0x11C40" />
<!-- Lure DLs -->
<DList Name="gFishingLureHookDL" Offset="0x12160" /> <!-- Original name is "rua_hari_model" -->
<DList Name="gFishingLureFloatDL" Offset="0x121F0" /> <!-- Original name is "rua_body_model" -->
<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" />
<!-- Lily Pad and Rock -->
<!-- Lily Pad and Rock Textures -->
<Texture Name="gFishingLilyPadTex" OutName="fishing_lily_pad" Format="rgba16" Width="32" Height="32" Offset="0x122E0" />
<Texture Name="gFishingRockTex" OutName="fishing_rock" Format="rgba16" Width="32" Height="32" Offset="0x12AE0" />
<!-- Lily Pad and Rock DLs -->
<DList Name="gFishingLilyPadMaterialDL" Offset="0x13330" />
<DList Name="gFishingLilyPadModelDL" Offset="0x133B0" /> <!-- Original name is "turi_hasu_model" -->
<DList Name="gFishingRockMaterialDL" Offset="0x13590" />
<DList Name="gFishingRockModelDL" Offset="0x13610" />
<Texture Name="object_fish_Tex_013660" OutName="tex_013660" Format="rgba16" Width="32" Height="32" Offset="0x13660" />
<!-- Wood Post -->
<!-- Wood Post Textures -->
<Texture Name="gFishingWoodPostTex" OutName="fishing_wood_post" Format="rgba16" Width="32" Height="32" Offset="0x13660" />
<!-- Wood Post DLs -->
<DList Name="gFishingWoodPostMaterialDL" Offset="0x13F50" />
<DList Name="gFishingWoodPostModelDL" Offset="0x13FD0" />
<!-- Reed -->
<!-- Reed DLs -->
<DList Name="gFishingReedMaterialDL" Offset="0x14030" />
<DList Name="gFishingReedModelDL" Offset="0x140B0" /> <!-- Original name is "turi_kusa_model" -->
<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" />
<!-- Aquarium -->
<!-- Aquarium Textures -->
<Texture Name="gFishingAquariumBottomTex" OutName="fishing_aquarium_bottom" Format="rgba16" Width="16" Height="16" Offset="0x140D0" />
<Texture Name="gFishingAquariumWaterTex" OutName="fishing_aquarium_water" Format="rgba16" Width="32" Height="32" Offset="0x142D0" />
<Texture Name="gFishingAquariumGlassTex" OutName="fishing_aquarium_glass" Format="i8" Width="32" Height="32" Offset="0x14AD0" />
<!-- Aquarium DLs -->
<DList Name="gFishingAquariumBottomDL" Offset="0x153D0" />
<DList Name="gFishingAquariumContainerDL" Offset="0x15470" /> <!-- Original name is "turi_suisou_modelT" -->
</File>
</Root>
+3 -2
View File
@@ -1,6 +1,7 @@
<Root>
<!-- Object for Stone Tower Smoke -->
<File Name="object_funen" Segment="6">
<DList Name="object_funen_DL_0000D0" Offset="0xD0" /> <!-- Original name is "obj_smork_modelT" -->
<Texture Name="object_funen_Tex_0001C0" OutName="tex_0001C0" Format="ia8" Width="32" Height="32" Offset="0x1C0" />
<DList Name="gStoneTowerSmokeDL" Offset="0xD0" /> <!-- Original name is "obj_smork_modelT" -->
<Texture Name="gStoneTowerSmokeTex" OutName="stone_tower_smoke" Format="ia8" Width="32" Height="32" Offset="0x1C0" />
</File>
</Root>
+7 -7
View File
@@ -1,23 +1,23 @@
<Root>
<File Name="object_ice_block" Segment="6">
<!-- IceArrow Freezes ChuChu into a Pushable/Climbable Cube block -->
<DList Name="gIceBlockCubeDL" Offset="0x1A0" />
<DList Name="gIceBlockCubeEndDL" Offset="0x310" />
<DList Name="gIceBlockCubeDL" Offset="0x1A0" /> <!-- Original name is "ic_block_modelT" -->
<DList Name="gIceBlockCubeEndDL" Offset="0x310" /> <!-- Original name is "ic_block_model" -->
<!-- this TexAnim is for the cube surface -->
<TextureAnimation Name="gIceBlockCubeSublimatingAirTexAnim" Offset="0x328" />
<Collision Name="gIceBlockCol" Offset="0x438" />
<Collision Name="gIceBlockCol" Offset="0x438" /> <!-- Original name is "ic_block_bgdatainfo" -->
<!-- IceArrow Freezes Octarock into a floating Iceberg platform -->
<DList Name="gIceBlockIceBergDL" Offset="0x7F0" />
<DList Name="gIceBlockIceBergEndDL" Offset="0x9B8" />
<DList Name="gIceBlockIceBergDL" Offset="0x7F0" /> <!-- Original name is "ic_blockdai_modelT" -->
<DList Name="gIceBlockIceBergEndDL" Offset="0x9B8" /> <!-- Original name is "ic_blockdai_model" -->
<!-- this TexAnim is for the iceberg surface -->
<TextureAnimation Name="gIceBlockIceBergSublimatingAirTexAnim" Offset="0x9D0" />
<!-- Shard of Ice thrown off of IceBlock (EffectEnIceBlock) -->
<!-- IceArrow creates frozen block or platform, throws shards during growing animation -->
<!-- too big to be a snow flake, more like thin block of ice, better described as "Chip", or "Shard" or "Plate" -->
<DList Name="gIceBlockShardEffectEndDL" Offset="0xA30" />
<DList Name="gIceBlockShardEffectDL" Offset="0xA38" />
<DList Name="gIceBlockShardEffectEndDL" Offset="0xA30" /> <!-- Original name is "ic_kakera_modelT" -->
<DList Name="gIceBlockShardEffectDL" Offset="0xA38" /> <!-- Original name is "ic_kakera_model" -->
<!-- These two appear to be identical (but different hash) -->
<!-- first is used in CubeDL and ShardDL -->
+2 -2
View File
@@ -1,7 +1,7 @@
<Root>
<File Name="object_icefloe" Segment="6">
<DList Name="gIcefloeIcePlatformDL" Offset="0x1E0" />
<DList Name="gIcefloeIcePlatformDL" Offset="0x1E0" /> <!-- Original name is "w_ice_model" -->
<Texture Name="gIcefloePlatformTex" OutName="icefloe_iceplatform" Format="rgba16" Width="32" Height="32" Offset="0x2C8" />
<Collision Name="gIcefloePlatformCol" Offset="0xC90" />
<Collision Name="gIcefloePlatformCol" Offset="0xC90" /> <!-- Original name is "w_ice_bgdatainfo" -->
</File>
</Root>
+2 -2
View File
@@ -1,7 +1,7 @@
<Root>
<File Name="object_icicle" Segment="6">
<DList Name="object_icicle_DL_0000D0" Offset="0xD0" />
<Collision Name="object_icicle_Colheader_000294" Offset="0x294" />
<DList Name="object_icicle_DL_0000D0" Offset="0xD0" /> <!-- Original name is "ice_turara_model" -->
<Collision Name="object_icicle_Colheader_000294" Offset="0x294" /> <!-- Original name is "ice_turara_bgdatainfo" -->
<Texture Name="object_icicle_Tex_0002C0" OutName="tex_0002C0" Format="i8" Width="64" Height="64" Offset="0x2C0" />
</File>
</Root>
+18 -18
View File
@@ -1,34 +1,34 @@
<Root>
<!-- This is the object for the Iron Knuckle Enemy -->
<File Name="object_ik" Segment="6">
<Animation Name="gIronKnuckleVerticalAttackAnim" Offset="0xCE8" />
<Animation Name="gIronKnuckleRecoverVerticalAttackAnim" Offset="0x15F8" />
<Animation Name="gIronKnuckleEndVerticalAttackAnim" Offset="0x1ABC" />
<Animation Name="gIronKnuckleHorizontalAttackAnim" Offset="0x2484" />
<Animation Name="gIronKnuckleEndHorizontalAttackAnim" Offset="0x2E7C" />
<Animation Name="gIronKnuckleBackHitAnim" Offset="0x367C" />
<Animation Name="gIronKnuckleBlockAnim" Offset="0x391C" />
<Animation Name="gIronKnuckleDeathAnim" Offset="0x4A04" />
<Animation Name="gIronKnuckleFrontHitAnim" Offset="0x5254" />
<Animation Name="gIronKnuckleRunAnim" Offset="0x57F4" />
<Animation Name="gIronKnuckleWalkAnim" Offset="0x6294" />
<Animation Name="gIronKnuckleVerticalAttackAnim" Offset="0xCE8" /> <!-- Original name is "ironknack_attackA" -->
<Animation Name="gIronKnuckleRecoverVerticalAttackAnim" Offset="0x15F8" /> <!-- Original name is "ironknack_attackA_end" -->
<Animation Name="gIronKnuckleEndVerticalAttackAnim" Offset="0x1ABC" /> <!-- Original name is "ironknack_attackA_hit" -->
<Animation Name="gIronKnuckleHorizontalAttackAnim" Offset="0x2484" /> <!-- Original name is "ironknack_attackB" -->
<Animation Name="gIronKnuckleEndHorizontalAttackAnim" Offset="0x2E7C" /> <!-- Original name is "ironknack_attackB_end" -->
<Animation Name="gIronKnuckleBackHitAnim" Offset="0x367C" /> <!-- Original name is "ironknack_back_hit" -->
<Animation Name="gIronKnuckleBlockAnim" Offset="0x391C" /> <!-- Original name is "ironknack_defense" -->
<Animation Name="gIronKnuckleDeathAnim" Offset="0x4A04" /> <!-- Original name is "ironknack_down" -->
<Animation Name="gIronKnuckleFrontHitAnim" Offset="0x5254" /> <!-- Original name is "ironknack_front_hit" -->
<Animation Name="gIronKnuckleRunAnim" Offset="0x57F4" /> <!-- Original name is "ironknack_run" -->
<Animation Name="gIronKnuckleWalkAnim" Offset="0x6294" /> <!-- Original name is "ironknack_walk" -->
<Array Name="gObjectIkVtx_009740" Count="566" Offset="0x6730">
<Vtx/>
</Array>
<DList Name="gIronKnuckleArmorFrontDL" Offset="0x9A40" />
<DList Name="gIronKnuckleArmorBackDL" Offset="0x9BC8" />
<DList Name="gIronKnuckleArmorFrontDL" Offset="0x9A40" /> <!-- Original name is "ironknack_front_armer" -->
<DList Name="gIronKnuckleArmorBackDL" Offset="0x9BC8" /> <!-- Original name is "ironknack_back_armer" -->
<DList Name="gIronKnuckleAxeDL" Offset="0x9D20" />
<DList Name="gIronKnuckleRightHandDL" Offset="0x9FD8" />
<DList Name="gIronKnuckleLowerRightPauldronDL" Offset="0xA130" />
<DList Name="gIronKnuckleLowerRightPauldronDL" Offset="0xA130" /> <!-- Original name is "ironknack_Rshoulder_b" -->
<DList Name="gIronKnuckleLeftHandDL" Offset="0xA1F0" />
<DList Name="gIronKnuckleLowerLeftPauldronDL" Offset="0xA348" />
<DList Name="gIronKnuckleUpperRightPauldronDL" Offset="0xA408" />
<DList Name="gIronKnuckleUpperLeftPauldronDL" Offset="0xA4F0" />
<DList Name="gIronKnuckleLowerLeftPauldronDL" Offset="0xA348" /> <!-- Original name is "ironknack_Lshoulder_b" -->
<DList Name="gIronKnuckleUpperRightPauldronDL" Offset="0xA408" /> <!-- Original name is "ironknack_Rshoulder" -->
<DList Name="gIronKnuckleUpperLeftPauldronDL" Offset="0xA4F0" /> <!-- Original name is "ironknack_Lshoulder" -->
<DList Name="gIronKnuckleFrontTorsoArmorMarkingDL" Offset="0xA5D8" />
<DList Name="gIronKnuckleRearTorsoArmorMarkingDL" Offset="0xA6D0" />
<DList Name="gIronKnuckleRivetsMarking1DL" Offset="0xA780" />
<DList Name="gIronKnuckleRivetsMarking2DL" Offset="0xA820" />
<DList Name="gIronKnuckleBasMarkingDL" Offset="0xBF80" />
<DList Name="gIronKnuckleBasMarkingDL" Offset="0xBF80" /> <!-- Original name is "ironknack_head" -->
<DList Name="gIronKnuckleGerudoHeadDL" Offset="0xC200" />
<DList Name="gIronKnuckleHelmetMarkingDL" Offset="0xCF08" />
<DList Name="gIronKnuckleTanArmorMaterialDL" Offset="0xD038" />
+33 -33
View File
@@ -1,38 +1,38 @@
<Root>
<File Name="object_ikana_obj" Segment="6">
<DList Name="object_ikana_obj_DL_000040" Offset="0x40" />
<DList Name="object_ikana_obj_DL_000048" Offset="0x48" />
<Collision Name="object_ikana_obj_Colheader_000128" Offset="0x128" />
<DList Name="object_ikana_obj_DL_000280" Offset="0x280" />
<DList Name="object_ikana_obj_DL_000288" Offset="0x288" />
<DList Name="object_ikana_obj_DL_000370" Offset="0x370" />
<DList Name="object_ikana_obj_DL_000378" Offset="0x378" />
<Collision Name="object_ikana_obj_Colheader_000488" Offset="0x488" />
<DList Name="object_ikana_obj_DL_0008C0" Offset="0x8C0" />
<DList Name="gStoneTowerTemplePunchablePillarDL" Offset="0x8C8" />
<Collision Name="gStoneTowerTemplePunchablePillarCol" Offset="0xC50" />
<DList Name="object_ikana_obj_DL_000CE0" Offset="0xCE0" />
<DList Name="object_ikana_obj_DL_000CE8" Offset="0xCE8" />
<Collision Name="object_ikana_obj_Colheader_000F28" Offset="0xF28" />
<DList Name="object_ikana_obj_DL_001100" Offset="0x1100" />
<DList Name="object_ikana_obj_DL_001210" Offset="0x1210" />
<DList Name="object_ikana_obj_DL_000040" Offset="0x40" /> <!-- Original name is "m2_IKA_BOMBfl_modelT" -->
<DList Name="object_ikana_obj_DL_000048" Offset="0x48" /> <!-- Original name is "m2_IKA_BOMBfl_model" -->
<Collision Name="object_ikana_obj_Colheader_000128" Offset="0x128" /> <!-- Original name is "m2_IKA_BOMBfl_bgdatainfo" -->
<DList Name="object_ikana_obj_DL_000280" Offset="0x280" /> <!-- Original name is "m2_IKA_BOMBhahen_modelT" -->
<DList Name="object_ikana_obj_DL_000288" Offset="0x288" /> <!-- Original name is "m2_IKA_BOMBhahen_model" -->
<DList Name="object_ikana_obj_DL_000370" Offset="0x370" /> <!-- Original name is "m2_IKA_BOMBwall_modelT" -->
<DList Name="object_ikana_obj_DL_000378" Offset="0x378" /> <!-- Original name is "m2_IKA_BOMBwall_model" -->
<Collision Name="object_ikana_obj_Colheader_000488" Offset="0x488" /> <!-- Original name is "m2_IKA_BOMBwall_bgdatainfo" -->
<DList Name="object_ikana_obj_DL_0008C0" Offset="0x8C0" /> <!-- Original name is "m2_IKA_Dalma_modelT" -->
<DList Name="gStoneTowerTemplePunchablePillarDL" Offset="0x8C8" /> <!-- Original name is "m2_IKA_Dalma_model" -->
<Collision Name="gStoneTowerTemplePunchablePillarCol" Offset="0xC50" /> <!-- Original name is "m2_IKA_Dalma_bgdatainfo" -->
<DList Name="object_ikana_obj_DL_000CE0" Offset="0xCE0" /> <!-- Not present in MM3D, but it was probably named "m2_IKA_KOUSI_modelT" based on the rest of this object. -->
<DList Name="object_ikana_obj_DL_000CE8" Offset="0xCE8" /> <!-- Original name is "m2_IKA_KOUSI_model" -->
<Collision Name="object_ikana_obj_Colheader_000F28" Offset="0xF28" /> <!-- Original name is "m2_IKA_KOUSI_bgdatainfo" -->
<DList Name="object_ikana_obj_DL_001100" Offset="0x1100" /> <!-- Original name is "m2_IKA_LIGHT_modelT" -->
<DList Name="object_ikana_obj_DL_001210" Offset="0x1210" /> <!-- Original name is "m2_IKA_LIGHT_model" -->
<TextureAnimation Name="object_ikana_obj_Matanimheader_001228" Offset="0x1228" />
<DList Name="gStoneTowerTempleMirrorLightAbsorptionDL" Offset="0x14B0" />
<DList Name="object_ikana_obj_DL_001660" Offset="0x1660" />
<DList Name="gStoneTowerTempleMirrorLightAbsorptionDL" Offset="0x14B0" /> <!-- Original name is "m2_IKA_MRin_modelT" -->
<DList Name="object_ikana_obj_DL_001660" Offset="0x1660" /> <!-- Original name is "m2_IKA_MRin_model" -->
<TextureAnimation Name="gStoneTowerTempleMirrorLightAbsorptionTexAnim" Offset="0x1678" />
<DList Name="gStoneTowerTempleMirrorLightEmissionDL" Offset="0x1880" />
<DList Name="object_ikana_obj_DL_001AC0" Offset="0x1AC0" />
<DList Name="gStoneTowerTempleMirrorLightEmissionDL" Offset="0x1880" /> <!-- Original name is "m2_IKA_MRout_modelT" -->
<DList Name="object_ikana_obj_DL_001AC0" Offset="0x1AC0" /> <!-- Original name is "m2_IKA_MRout_model" -->
<TextureAnimation Name="gStoneTowerTempleMirrorLightEmissionTexAnim" Offset="0x1AD8" />
<DList Name="object_ikana_obj_DL_001E10" Offset="0x1E10" />
<DList Name="gStoneTowerTempleMirrorDL" Offset="0x1E18" />
<Collision Name="gStoneTowerTempleMirrorCol" Offset="0x2358" />
<DList Name="object_ikana_obj_DL_004710" Offset="0x4710" />
<DList Name="object_ikana_obj_DL_0048A0" Offset="0x48A0" />
<Collision Name="object_ikana_obj_Colheader_006368" Offset="0x6368" />
<DList Name="object_ikana_obj_DL_007360" Offset="0x7360" />
<DList Name="object_ikana_obj_DL_007448" Offset="0x7448" />
<DList Name="object_ikana_obj_DL_001E10" Offset="0x1E10" /> <!-- Original name is "m2_IKA_Mirror_modelT" -->
<DList Name="gStoneTowerTempleMirrorDL" Offset="0x1E18" /> <!-- Original name is "m2_IKA_Mirror_model" -->
<Collision Name="gStoneTowerTempleMirrorCol" Offset="0x2358" /> <!-- Original name is "m2_IKA_Mirror_bgdatainfo" -->
<DList Name="object_ikana_obj_DL_004710" Offset="0x4710" /> <!-- Not present in MM3D, but it was probably named "m2_IKA_room05_modelT" based on the rest of this object. -->
<DList Name="object_ikana_obj_DL_0048A0" Offset="0x48A0" /> <!-- Original name is "m2_IKA_room05_model" -->
<Collision Name="object_ikana_obj_Colheader_006368" Offset="0x6368" /> <!-- Original name is "m2_IKA_room05_bgdatainfo" -->
<DList Name="object_ikana_obj_DL_007360" Offset="0x7360" /> <!-- Not present in MM3D, but it was probably named "m2_IKA_room06_modelT" based on the rest of this object. -->
<DList Name="object_ikana_obj_DL_007448" Offset="0x7448" /> <!-- Original name is "m2_IKA_room06_model" -->
<TextureAnimation Name="object_ikana_obj_Matanimheader_007B68" Offset="0x7B68" />
<Collision Name="object_ikana_obj_Colheader_0084F8" Offset="0x84F8" />
<Collision Name="object_ikana_obj_Colheader_0084F8" Offset="0x84F8" /> <!-- Original name is "m2_IKA_room06_bgdatainfo" -->
<Texture Name="object_ikana_obj_TLUT_008530" OutName="tlut_008530" Format="rgba16" Width="4" Height="4" Offset="0x8530" />
<!-- <Blob Name="object_ikana_obj_Blob_008550" Size="0x40" Offset="0x8550" /> -->
<Texture Name="object_ikana_obj_TLUT_008590" OutName="tlut_008590" Format="rgba16" Width="4" Height="4" Offset="0x8590" />
@@ -58,10 +58,10 @@
<Texture Name="gStoneTowerEmblemFrameTex" OutName="stone_tower_temple_emblem_frame" Format="ia8" Width="32" Height="64" Offset="0x109B0" />
<Texture Name="object_ikana_obj_Tex_0111B0" OutName="tex_0111B0" Format="rgba16" Width="32" Height="32" Offset="0x111B0" />
<Texture Name="object_ikana_obj_Tex_0119B0" OutName="tex_0119B0" Format="rgba16" Width="32" Height="32" Offset="0x119B0" />
<DList Name="object_ikana_obj_DL_012B70" Offset="0x12B70" />
<DList Name="object_ikana_obj_DL_013EA0" Offset="0x13EA0" />
<DList Name="object_ikana_obj_DL_013EA8" Offset="0x13EA8" />
<DList Name="object_ikana_obj_DL_014A40" Offset="0x14A40" />
<DList Name="object_ikana_obj_DL_012B70" Offset="0x12B70" /> <!-- Original name is probably "m2_IKA_RASENsita_model" (the model is just a green cube in MM3D) -->
<DList Name="object_ikana_obj_DL_013EA0" Offset="0x13EA0" /> <!-- Original name is probably "m2_IKA_RASENue_modelT" (the model is just a green cube in MM3D) -->
<DList Name="object_ikana_obj_DL_013EA8" Offset="0x13EA8" /> <!-- Original name is probably "m2_IKA_RASENue_model" (the model is just a green cube in MM3D) -->
<DList Name="object_ikana_obj_DL_014A40" Offset="0x14A40" /> <!-- Original name is "m2_IKA_shutter_model" -->
<Texture Name="object_ikana_obj_Tex_014BA0" OutName="tex_014BA0" Format="rgba16" Width="32" Height="64" Offset="0x14BA0" />
</File>
</Root>
+33 -33
View File
@@ -1,7 +1,7 @@
<Root>
<File Name="object_ikn_demo" Segment="6">
<!-- <Blob Name="object_ikn_demo_Blob_000000" Size="0x10" Offset="0x0" /> -->
<Animation Name="object_ikn_demo_Anim_0000B8" Offset="0xB8" />
<Animation Name="object_ikn_demo_Anim_0000B8" Offset="0xB8" /> <!-- Original name is "osk_default" -->
<DList Name="object_ikn_demo_DL_001D20" Offset="0x1D20" />
<DList Name="object_ikn_demo_DL_002128" Offset="0x2128" />
<DList Name="object_ikn_demo_DL_002208" Offset="0x2208" />
@@ -44,13 +44,13 @@
<Limb Name="object_ikn_demo_Standardlimb_003898" Type="Standard" EnumName="OBJECT_IKN_DEMO_1_LIMB_0F" Offset="0x3898" />
<Limb Name="object_ikn_demo_Standardlimb_0038A4" Type="Standard" EnumName="OBJECT_IKN_DEMO_1_LIMB_10" Offset="0x38A4" />
<Skeleton Name="object_ikn_demo_Skel_0038F0" Type="Flex" LimbType="Standard" LimbNone="OBJECT_IKN_DEMO_1_LIMB_NONE" LimbMax="OBJECT_IKN_DEMO_1_LIMB_MAX" EnumName="ObjectIknDemo1Limb" Offset="0x38F0" />
<Animation Name="object_ikn_demo_Anim_003CAC" Offset="0x3CAC" />
<Animation Name="object_ikn_demo_Anim_004208" Offset="0x4208" />
<Animation Name="object_ikn_demo_Anim_004514" Offset="0x4514" />
<Animation Name="object_ikn_demo_Anim_004A58" Offset="0x4A58" />
<Animation Name="object_ikn_demo_Anim_0065D8" Offset="0x65D8" />
<Animation Name="object_ikn_demo_Anim_0067B8" Offset="0x67B8" />
<Animation Name="object_ikn_demo_Anim_006808" Offset="0x6808" />
<Animation Name="object_ikn_demo_Anim_003CAC" Offset="0x3CAC" /> <!-- Original name is "osk_hanasu_loop" -->
<Animation Name="object_ikn_demo_Anim_004208" Offset="0x4208" /> <!-- Original name is "osk_hanasu_wait" -->
<Animation Name="object_ikn_demo_Anim_004514" Offset="0x4514" /> <!-- Original name is "osk_okoru_loop" -->
<Animation Name="object_ikn_demo_Anim_004A58" Offset="0x4A58" /> <!-- Original name is "osk_okoru_wait" -->
<Animation Name="object_ikn_demo_Anim_0065D8" Offset="0x65D8" /> <!-- Original name is "osk_utau_loop" -->
<Animation Name="object_ikn_demo_Anim_0067B8" Offset="0x67B8" /> <!-- Original name is "sk1_bibiru_loop" -->
<Animation Name="object_ikn_demo_Anim_006808" Offset="0x6808" /> <!-- Original name is "sk1_default" -->
<DList Name="object_ikn_demo_DL_0072F0" Offset="0x72F0" />
<DList Name="object_ikn_demo_DL_007680" Offset="0x7680" />
<DList Name="object_ikn_demo_DL_0077B0" Offset="0x77B0" />
@@ -64,19 +64,19 @@
<Limb Name="object_ikn_demo_Standardlimb_007B18" Type="Standard" EnumName="OBJECT_IKN_DEMO_2_LIMB_05" Offset="0x7B18" />
<Limb Name="object_ikn_demo_Standardlimb_007B24" Type="Standard" EnumName="OBJECT_IKN_DEMO_2_LIMB_06" Offset="0x7B24" />
<Skeleton Name="object_ikn_demo_Skel_007B48" Type="Flex" LimbType="Standard" LimbNone="OBJECT_IKN_DEMO_2_LIMB_NONE" LimbMax="OBJECT_IKN_DEMO_2_LIMB_MAX" EnumName="ObjectIknDemo2Limb" Offset="0x7B48" />
<Animation Name="object_ikn_demo_Anim_0081A8" Offset="0x81A8" />
<Animation Name="object_ikn_demo_Anim_0083F4" Offset="0x83F4" />
<Animation Name="object_ikn_demo_Anim_008724" Offset="0x8724" />
<Animation Name="object_ikn_demo_Anim_008AF4" Offset="0x8AF4" />
<Animation Name="object_ikn_demo_Anim_008CEC" Offset="0x8CEC" />
<Animation Name="object_ikn_demo_Anim_008F1C" Offset="0x8F1C" />
<Animation Name="object_ikn_demo_Anim_009044" Offset="0x9044" />
<Animation Name="object_ikn_demo_Anim_009254" Offset="0x9254" />
<Animation Name="object_ikn_demo_Anim_0098E4" Offset="0x98E4" />
<Animation Name="object_ikn_demo_Anim_009A44" Offset="0x9A44" />
<Animation Name="object_ikn_demo_Anim_009CC8" Offset="0x9CC8" />
<Animation Name="object_ikn_demo_Anim_009EA8" Offset="0x9EA8" />
<Animation Name="object_ikn_demo_Anim_009F00" Offset="0x9F00" />
<Animation Name="object_ikn_demo_Anim_0081A8" Offset="0x81A8" /> <!-- Original name is "sk1_hajikareru" -->
<Animation Name="object_ikn_demo_Anim_0083F4" Offset="0x83F4" /> <!-- Original name is "sk1_hajikareru_loop" -->
<Animation Name="object_ikn_demo_Anim_008724" Offset="0x8724" /> <!-- Original name is "sk1_hebo" -->
<Animation Name="object_ikn_demo_Anim_008AF4" Offset="0x8AF4" /> <!-- Original name is "sk1_hebo_loop" -->
<Animation Name="object_ikn_demo_Anim_008CEC" Offset="0x8CEC" /> <!-- Original name is "sk1_odoroku" -->
<Animation Name="object_ikn_demo_Anim_008F1C" Offset="0x8F1C" /> <!-- Original name is "sk1_odoroku_loop" -->
<Animation Name="object_ikn_demo_Anim_009044" Offset="0x9044" /> <!-- Original name is "sk1_sagaru" -->
<Animation Name="object_ikn_demo_Anim_009254" Offset="0x9254" /> <!-- Original name is "sk1_sagaru_loop" -->
<Animation Name="object_ikn_demo_Anim_0098E4" Offset="0x98E4" /> <!-- Original name is "sk1_syutugen_loop" -->
<Animation Name="object_ikn_demo_Anim_009A44" Offset="0x9A44" /> <!-- Original name is "sk1_warau" -->
<Animation Name="object_ikn_demo_Anim_009CC8" Offset="0x9CC8" /> <!-- Original name is "sk1_warau_loop" -->
<Animation Name="object_ikn_demo_Anim_009EA8" Offset="0x9EA8" /> <!-- Original name is "sk2_bibiru_loop" -->
<Animation Name="object_ikn_demo_Anim_009F00" Offset="0x9F00" /> <!-- Original name is "sk2_default" -->
<DList Name="object_ikn_demo_DL_00AB80" Offset="0xAB80" />
<DList Name="object_ikn_demo_DL_00AEA0" Offset="0xAEA0" />
<DList Name="object_ikn_demo_DL_00B028" Offset="0xB028" />
@@ -90,18 +90,18 @@
<Limb Name="object_ikn_demo_Standardlimb_00B460" Type="Standard" EnumName="OBJECT_IKN_DEMO_3_LIMB_05" Offset="0xB460" />
<Limb Name="object_ikn_demo_Standardlimb_00B46C" Type="Standard" EnumName="OBJECT_IKN_DEMO_3_LIMB_06" Offset="0xB46C" />
<Skeleton Name="object_ikn_demo_Skel_00B490" Type="Flex" LimbType="Standard" LimbNone="OBJECT_IKN_DEMO_3_LIMB_NONE" LimbMax="OBJECT_IKN_DEMO_3_LIMB_MAX" EnumName="ObjectIknDemo3Limb" Offset="0xB490" />
<Animation Name="object_ikn_demo_Anim_00B704" Offset="0xB704" />
<Animation Name="object_ikn_demo_Anim_00B8C0" Offset="0xB8C0" />
<Animation Name="object_ikn_demo_Anim_00B9E4" Offset="0xB9E4" />
<Animation Name="object_ikn_demo_Anim_00BDB4" Offset="0xBDB4" />
<Animation Name="object_ikn_demo_Anim_00BF04" Offset="0xBF04" />
<Animation Name="object_ikn_demo_Anim_00C154" Offset="0xC154" />
<Animation Name="object_ikn_demo_Anim_00C2C4" Offset="0xC2C4" />
<Animation Name="object_ikn_demo_Anim_00C59C" Offset="0xC59C" />
<Animation Name="object_ikn_demo_Anim_00C804" Offset="0xC804" />
<Animation Name="object_ikn_demo_Anim_00CA74" Offset="0xCA74" />
<Animation Name="object_ikn_demo_Anim_00CD28" Offset="0xCD28" />
<Animation Name="object_ikn_demo_Anim_00D044" Offset="0xD044" />
<Animation Name="object_ikn_demo_Anim_00B704" Offset="0xB704" /> <!-- Original name is "sk2_hajiku" -->
<Animation Name="object_ikn_demo_Anim_00B8C0" Offset="0xB8C0" /> <!-- Original name is "sk2_hajiku_loop" -->
<Animation Name="object_ikn_demo_Anim_00B9E4" Offset="0xB9E4" /> <!-- Original name is "sk2_hiku" -->
<Animation Name="object_ikn_demo_Anim_00BDB4" Offset="0xBDB4" /> <!-- Original name is "sk2_hiku_loop" -->
<Animation Name="object_ikn_demo_Anim_00BF04" Offset="0xBF04" /> <!-- Original name is "sk2_maee" -->
<Animation Name="object_ikn_demo_Anim_00C154" Offset="0xC154" /> <!-- Original name is "sk2_maee_loop" -->
<Animation Name="object_ikn_demo_Anim_00C2C4" Offset="0xC2C4" /> <!-- Original name is "sk2_muu" -->
<Animation Name="object_ikn_demo_Anim_00C59C" Offset="0xC59C" /> <!-- Original name is "sk2_muu_loop" -->
<Animation Name="object_ikn_demo_Anim_00C804" Offset="0xC804" /> <!-- Original name is "sk2_nani" -->
<Animation Name="object_ikn_demo_Anim_00CA74" Offset="0xCA74" /> <!-- Original name is "sk2_nani_loop" -->
<Animation Name="object_ikn_demo_Anim_00CD28" Offset="0xCD28" /> <!-- Original name is "sk2_odoroku" -->
<Animation Name="object_ikn_demo_Anim_00D044" Offset="0xD044" /> <!-- Original name is "sk2_odoroku_loop' "-->
<Texture Name="object_ikn_demo_Tex_00D060" OutName="tex_00D060" Format="rgba16" Width="8" Height="8" Offset="0xD060" />
<!-- <Blob Name="object_ikn_demo_Blob_00D0E0" Size="0x100" Offset="0xD0E0" /> -->
<Texture Name="object_ikn_demo_Tex_00D1E0" OutName="tex_00D1E0" Format="rgba16" Width="16" Height="16" Offset="0xD1E0" />
+18 -18
View File
@@ -1,15 +1,15 @@
<Root>
<File Name="object_ikninside_obj" Segment="6">
<DList Name="object_ikninside_obj_DL_000590" Offset="0x590" />
<DList Name="object_ikninside_obj_DL_000EA0" Offset="0xEA0" />
<DList Name="object_ikninside_obj_DL_000590" Offset="0x590" /> <!-- Original name is "w2_RASENsite_model" -->
<DList Name="object_ikninside_obj_DL_000EA0" Offset="0xEA0" /> <!-- Original name is "w2_RASENue_model" -->
<Texture Name="object_ikninside_obj_Tex_001120" OutName="tex_001120" Format="rgba16" Width="32" Height="64" Offset="0x1120" />
<Texture Name="object_ikninside_obj_Tex_002120" OutName="tex_002120" Format="rgba16" Width="32" Height="64" Offset="0x2120" />
<Texture Name="object_ikninside_obj_Tex_003120" OutName="tex_003120" Format="rgba16" Width="32" Height="64" Offset="0x3120" />
<DList Name="object_ikninside_obj_DL_004440" Offset="0x4440" />
<DList Name="object_ikninside_obj_DL_004440" Offset="0x4440" /> <!-- Original name is "w2_ikn_marutobira_model" -->
<Texture Name="object_ikninside_obj_TLUT_004620" OutName="tlut_004620" Format="rgba16" Width="16" Height="16" Offset="0x4620" />
<Texture Name="object_ikninside_obj_Tex_004820" OutName="tex_004820" Format="ci8" Width="32" Height="64" Offset="0x4820" />
<Texture Name="object_ikninside_obj_Tex_005020" OutName="tex_005020" Format="ci8" Width="16" Height="32" Offset="0x5020" />
<DList Name="object_ikninside_obj_DL_005260" Offset="0x5260" />
<DList Name="object_ikninside_obj_DL_005260" Offset="0x5260" /> <!-- Original name is "w2_ikn_zenetu_model" -->
<Texture Name="object_ikninside_obj_Tex_0052F0" OutName="tex_0052F0" Format="ia16" Width="16" Height="64" Offset="0x52F0" />
<!-- <Blob Name="object_ikninside_obj_Blob_005AF0" Size="0x220" Offset="0x5AF0" /> -->
<Texture Name="object_ikninside_obj_Tex_005D10" OutName="tex_005D10" Format="ia16" Width="32" Height="32" Offset="0x5D10" />
@@ -22,27 +22,27 @@
<Texture Name="object_ikninside_obj_Tex_008D30" OutName="tex_008D30" Format="rgba16" Width="32" Height="32" Offset="0x8D30" />
<Texture Name="object_ikninside_obj_Tex_009530" OutName="tex_009530" Format="rgba16" Width="16" Height="64" Offset="0x9530" />
<Texture Name="object_ikninside_obj_Tex_009D30" OutName="tex_009D30" Format="rgba16" Width="32" Height="32" Offset="0x9D30" />
<DList Name="object_ikninside_obj_DL_00A5A0" Offset="0xA5A0" />
<DList Name="object_ikninside_obj_DL_00A5A8" Offset="0xA5A8" />
<DList Name="object_ikninside_obj_DL_00A740" Offset="0xA740" />
<DList Name="object_ikninside_obj_DL_00A748" Offset="0xA748" />
<DList Name="object_ikninside_obj_DL_00AB10" Offset="0xAB10" />
<DList Name="object_ikninside_obj_DL_00AD50" Offset="0xAD50" />
<DList Name="object_ikninside_obj_DL_00AEC0" Offset="0xAEC0" />
<DList Name="object_ikninside_obj_DL_00B0A8" Offset="0xB0A8" />
<DList Name="object_ikninside_obj_DL_00A5A0" Offset="0xA5A0" /> <!-- Original name is "w2_ikn_hahen_modelT" -->
<DList Name="object_ikninside_obj_DL_00A5A8" Offset="0xA5A8" /> <!-- Original name is "w2_ikn_hahen_model" -->
<DList Name="object_ikninside_obj_DL_00A740" Offset="0xA740" /> <!-- Original name is "w2_ikn_hahen2_modelT" -->
<DList Name="object_ikninside_obj_DL_00A748" Offset="0xA748" /> <!-- Original name is "w2_ikn_hahen2_model" -->
<DList Name="object_ikninside_obj_DL_00AB10" Offset="0xAB10" /> <!-- Original name is "w2_ikn_hikari_modelT" -->
<DList Name="object_ikninside_obj_DL_00AD50" Offset="0xAD50" /> <!-- Original name is "w2_ikn_hikari_model" -->
<DList Name="object_ikninside_obj_DL_00AEC0" Offset="0xAEC0" /> <!-- Original name is "w2_ikn_hikari2_modelT" -->
<DList Name="object_ikninside_obj_DL_00B0A8" Offset="0xB0A8" /> <!-- Original name is "w2_ikn_hikari2_model" -->
<Texture Name="object_ikninside_obj_Tex_00B0B0" OutName="tex_00B0B0" Format="ia16" Width="32" Height="32" Offset="0xB0B0" />
<Texture Name="object_ikninside_obj_Tex_00B8B0" OutName="tex_00B8B0" Format="ia16" Width="16" Height="32" Offset="0xB8B0" />
<TextureAnimation Name="object_ikninside_obj_Matanimheader_00BCB8" Offset="0xBCB8" />
<TextureAnimation Name="object_ikninside_obj_Matanimheader_00BCC8" Offset="0xBCC8" />
<DList Name="object_ikninside_obj_DL_00C300" Offset="0xC300" />
<DList Name="object_ikninside_obj_DL_00C308" Offset="0xC308" />
<DList Name="object_ikninside_obj_DL_00C300" Offset="0xC300" /> <!-- Original name is "w2_ikn_turitenjo_modelT" -->
<DList Name="object_ikninside_obj_DL_00C308" Offset="0xC308" /> <!-- Original name is "w2_ikn_turitenjo_model" -->
<TextureAnimation Name="object_ikninside_obj_Matanimheader_00C670" Offset="0xC670" />
<Collision Name="object_ikninside_obj_Colheader_00CBAC" Offset="0xCBAC" />
<DList Name="object_ikninside_obj_DL_00CC70" Offset="0xCC70" />
<DList Name="object_ikninside_obj_DL_00CC78" Offset="0xCC78" />
<Collision Name="object_ikninside_obj_Colheader_00CBAC" Offset="0xCBAC" /> <!-- Original name is "w2_ikn_turitenjo_bgdatainfo" -->
<DList Name="object_ikninside_obj_DL_00CC70" Offset="0xCC70" /> <!-- Original name is "w2_ikn_yuka_modelT" -->
<DList Name="object_ikninside_obj_DL_00CC78" Offset="0xCC78" /> <!-- Original name is "w2_ikn_yuka_model" -->
<Texture Name="object_ikninside_obj_Tex_00CD60" OutName="tex_00CD60" Format="rgba16" Width="16" Height="64" Offset="0xCD60" />
<Texture Name="object_ikninside_obj_Tex_00D560" OutName="tex_00D560" Format="i4" Width="64" Height="64" Offset="0xD560" />
<TextureAnimation Name="object_ikninside_obj_Matanimheader_00DD70" Offset="0xDD70" />
<Collision Name="object_ikninside_obj_Colheader_00DE48" Offset="0xDE48" />
<Collision Name="object_ikninside_obj_Colheader_00DE48" Offset="0xDE48" /> <!-- Original name is "w2_ikn_yuka_bgdatainfo" -->
</File>
</Root>
+18 -18
View File
@@ -24,19 +24,19 @@
<Texture Name="object_iknv_obj_Tex_007360" OutName="tex_007360" Format="i8" Width="32" Height="64" Offset="0x7360" />
<Texture Name="object_iknv_obj_Tex_007B60" OutName="tex_007B60" Format="rgba16" Width="32" Height="32" Offset="0x7B60" />
<Texture Name="object_iknv_obj_Tex_008360" OutName="tex_008360" Format="i8" Width="32" Height="128" Offset="0x8360" />
<DList Name="object_iknv_obj_DL_00DB60" Offset="0xDB60" />
<DList Name="object_iknv_obj_DL_00DDD8" Offset="0xDDD8" />
<DList Name="object_iknv_obj_DL_00DB60" Offset="0xDB60" /> <!-- Original name is "z2_dokuana_modelT" -->
<DList Name="object_iknv_obj_DL_00DDD8" Offset="0xDDD8" /> <!-- Original name is "z2_dokuana_model" -->
<TextureAnimation Name="object_iknv_obj_Matanimheader_00F1C0" Offset="0xF1C0" />
<DList Name="object_iknv_obj_DL_010D90" Offset="0x10D90" />
<DList Name="object_iknv_obj_DL_010D98" Offset="0x10D98" />
<DList Name="object_iknv_obj_DL_010D90" Offset="0x10D90" /> <!-- Original name is "z2_doukutu_modelT" -->
<DList Name="object_iknv_obj_DL_010D98" Offset="0x10D98" /> <!-- Original name is "z2_doukutu_model" -->
<!-- <Blob Name="object_iknv_obj_Blob_0113E0" Size="0x10" Offset="0x113E0" /> -->
<DList Name="object_iknv_obj_DL_0115E0" Offset="0x115E0" />
<DList Name="object_iknv_obj_DL_011788" Offset="0x11788" />
<DList Name="object_iknv_obj_DL_0115E0" Offset="0x115E0" /> <!-- Original name is "z2_doumizu_modelT" -->
<DList Name="object_iknv_obj_DL_011788" Offset="0x11788" /> <!-- Original name is "z2_doumizu_model" -->
<TextureAnimation Name="object_iknv_obj_Matanimheader_0117A0" Offset="0x117A0" />
<Collision Name="object_iknv_obj_Colheader_0117C8" Offset="0x117C8" />
<DList Name="object_iknv_obj_DL_011880" Offset="0x11880" />
<DList Name="object_iknv_obj_DL_011950" Offset="0x11950" />
<Collision Name="object_iknv_obj_Colheader_0119D4" Offset="0x119D4" />
<Collision Name="object_iknv_obj_Colheader_0117C8" Offset="0x117C8" /> <!-- Original name is "z2_doumizu_bgdatainfo" -->
<DList Name="object_iknv_obj_DL_011880" Offset="0x11880" /> <!-- Original name is "z2_ikiriguti_modelT" -->
<DList Name="object_iknv_obj_DL_011950" Offset="0x11950" /> <!-- Original name is "z2_ikiriguti_model" -->
<Collision Name="object_iknv_obj_Colheader_0119D4" Offset="0x119D4" /> <!-- Original name is "z2_ikiriguti_bgdatainfo" -->
<DList Name="object_iknv_obj_DL_011E70" Offset="0x11E70" />
<DList Name="object_iknv_obj_DL_011F40" Offset="0x11F40" />
<DList Name="object_iknv_obj_DL_012020" Offset="0x12020" />
@@ -57,14 +57,14 @@
<DList Name="object_iknv_obj_DL_012550" Offset="0x12550" />
<DList Name="object_iknv_obj_DL_0125E0" Offset="0x125E0" />
<DList Name="object_iknv_obj_DL_0126D0" Offset="0x126D0" />
<DList Name="object_iknv_obj_DL_012700" Offset="0x12700" />
<DList Name="object_iknv_obj_DL_012700" Offset="0x12700" /> <!-- Original name is "z2_ikkawa_modelT" -->
<TextureAnimation Name="object_iknv_obj_Matanimheader_012728" Offset="0x12728" />
<Collision Name="object_iknv_obj_Colheader_012788" Offset="0x12788" />
<DList Name="object_iknv_obj_DL_012880" Offset="0x12880" />
<DList Name="object_iknv_obj_DL_0129C0" Offset="0x129C0" />
<DList Name="object_iknv_obj_DL_0129C8" Offset="0x129C8" />
<Collision Name="object_iknv_obj_Colheader_012CA4" Offset="0x12CA4" />
<DList Name="object_iknv_obj_DL_013050" Offset="0x13050" />
<DList Name="object_iknv_obj_DL_013058" Offset="0x13058" />
<Collision Name="object_iknv_obj_Colheader_012788" Offset="0x12788" /> <!-- Original name is "z2_ikkawa_bgdatainfo" -->
<DList Name="object_iknv_obj_DL_012880" Offset="0x12880" /> <!-- Original name is "z2_ikkawa_c_model" -->
<DList Name="object_iknv_obj_DL_0129C0" Offset="0x129C0" /> <!-- Not present in MM3D, but it was probably named "z2_iwado_model" based on the rest of this object. -->
<DList Name="object_iknv_obj_DL_0129C8" Offset="0x129C8" /> <!-- Original name is "z2_iwado_model" -->
<Collision Name="object_iknv_obj_Colheader_012CA4" Offset="0x12CA4" /> <!-- Original name is "z2_iwado_bgdatainfo" -->
<DList Name="object_iknv_obj_DL_013050" Offset="0x13050" /> <!-- Original name is "z2_suisya_modelT" -->
<DList Name="object_iknv_obj_DL_013058" Offset="0x13058" /> <!-- Original name is "z2_suisya_model" -->
</File>
</Root>
+19 -19
View File
@@ -1,10 +1,10 @@
<Root>
<File Name="object_in" Segment="6">
<Animation Name="object_in_Anim_0003B4" Offset="0x3B4" />
<Animation Name="object_in_Anim_000CB0" Offset="0xCB0" />
<Animation Name="object_in_Anim_001BE0" Offset="0x1BE0" />
<Animation Name="object_in_Anim_0003B4" Offset="0x3B4" /> <!-- Original name is "in2_fusagu" -->
<Animation Name="object_in_Anim_000CB0" Offset="0xCB0" /> <!-- Original name is "in2_kachi" -->
<Animation Name="object_in_Anim_001BE0" Offset="0x1BE0" /> <!-- Original name is "in2_kuyasii" -->
<TextureAnimation Name="object_in_Matanimheader_001C30" Offset="0x1C30" />
<Animation Name="object_in_Anim_001D10" Offset="0x1D10" />
<Animation Name="object_in_Anim_001D10" Offset="0x1D10" /> <!-- Original name is "in_matsu1" -->
<!-- <Blob Name="object_in_Blob_001D20" Size="0x1738" Offset="0x1D20" /> -->
<Texture Name="object_in_Tex_003520" OutName="tex_003520" Format="ci8" Width="8" Height="8" Offset="0x3520" />
<Texture Name="object_in_Tex_0035E0" OutName="tex_0035E0" Format="ci8" Width="32" Height="32" Offset="0x35E0" />
@@ -113,21 +113,21 @@
<Limb Name="object_in_Standardlimb_014E44" Type="Standard" EnumName="OBJECT_IN_LIMB_12" Offset="0x14E44" />
<Limb Name="object_in_Standardlimb_014E50" Type="Standard" EnumName="OBJECT_IN_LIMB_13" Offset="0x14E50" />
<Skeleton Name="object_in_Skel_014EA8" Type="Flex" LimbType="Standard" LimbNone="OBJECT_IN_LIMB_NONE" LimbMax="OBJECT_IN_LIMB_MAX" EnumName="ObjectInLimb" Offset="0x14EA8" />
<Animation Name="object_in_Anim_014F8C" Offset="0x14F8C" />
<Animation Name="object_in_Anim_015918" Offset="0x15918" />
<Animation Name="object_in_Anim_015E38" Offset="0x15E38" />
<Animation Name="object_in_Anim_016484" Offset="0x16484" />
<Animation Name="object_in_Anim_016A60" Offset="0x16A60" />
<Animation Name="object_in_Anim_0170DC" Offset="0x170DC" />
<Animation Name="object_in_Anim_0177AC" Offset="0x177AC" />
<Animation Name="object_in_Anim_018240" Offset="0x18240" />
<Animation Name="object_in_Anim_0187C8" Offset="0x187C8" />
<Animation Name="object_in_Anim_0198A8" Offset="0x198A8" />
<Animation Name="object_in_Anim_019EB4" Offset="0x19EB4" />
<Animation Name="object_in_Anim_01A140" Offset="0x1A140" />
<Animation Name="object_in_Anim_01B3C4" Offset="0x1B3C4" />
<Animation Name="object_in_Anim_01B904" Offset="0x1B904" />
<Animation Name="object_in_Anim_01C0B0" Offset="0x1C0B0" />
<Animation Name="object_in_Anim_014F8C" Offset="0x14F8C" /> <!-- Original name is "in_matsu2" -->
<Animation Name="object_in_Anim_015918" Offset="0x15918" /> <!-- Original name is "in_shigoto" -->
<Animation Name="object_in_Anim_015E38" Offset="0x15E38" /> <!-- Original name is "ingo_anim_fastrun" -->
<Animation Name="object_in_Anim_016484" Offset="0x16484" /> <!-- Original name is "ingo_anim_fastrun_muti" -->
<Animation Name="object_in_Anim_016A60" Offset="0x16A60" /> <!-- Original name is "ingo_anim_slowrun" -->
<Animation Name="object_in_Anim_0170DC" Offset="0x170DC" /> <!-- Original name is "ingo_anim_slowrun_muti" -->
<Animation Name="object_in_Anim_0177AC" Offset="0x177AC" /> <!-- Original name is "ingo_anim_stop" -->
<Animation Name="object_in_Anim_018240" Offset="0x18240" /> <!-- Original name is "ingo_anim_stop_muti" -->
<Animation Name="object_in_Anim_0187C8" Offset="0x187C8" /> <!-- Original name is "ingo_anim_wait1" -->
<Animation Name="object_in_Anim_0198A8" Offset="0x198A8" /> <!-- Original name is "ingo_anim_wait2" -->
<Animation Name="object_in_Anim_019EB4" Offset="0x19EB4" /> <!-- Original name is "ingo_jump" -->
<Animation Name="object_in_Anim_01A140" Offset="0x1A140" /> <!-- Original name is "ingo_run1" -->
<Animation Name="object_in_Anim_01B3C4" Offset="0x1B3C4" /> <!-- Original name is "ingo_tyakuti" -->
<Animation Name="object_in_Anim_01B904" Offset="0x1B904" /> <!-- Original name is "ingo_wait1" -->
<Animation Name="object_in_Anim_01C0B0" Offset="0x1C0B0" /> <!-- Original name is "ingo_walk_loop" -->
<DList Name="object_in_DL_01C520" Offset="0x1C520" />
<DList Name="object_in_DL_01C528" Offset="0x1C528" />
<Texture Name="object_in_TLUT_01C8F0" OutName="tlut_01C8F0" Format="rgba16" Width="16" Height="16" Offset="0x1C8F0" />
+12 -12
View File
@@ -1,6 +1,6 @@
<Root>
<File Name="object_in2" Segment="6">
<Animation Name="object_in2_Anim_000084" Offset="0x84" />
<Animation Name="object_in2_Anim_000084" Offset="0x84" /> <!-- Original name is "in2_kihon" -->
<DList Name="object_in2_DL_002D60" Offset="0x2D60" />
<DList Name="object_in2_DL_003060" Offset="0x3060" />
<DList Name="object_in2_DL_0035B0" Offset="0x35B0" />
@@ -67,16 +67,16 @@
<Limb Name="object_in2_Standardlimb_00784C" Type="Standard" EnumName="OBJECT_IN2_LIMB_12" Offset="0x784C" />
<Limb Name="object_in2_Standardlimb_007858" Type="Standard" EnumName="OBJECT_IN2_LIMB_13" Offset="0x7858" />
<Skeleton Name="object_in2_Skel_0078B0" Type="Flex" LimbType="Standard" LimbNone="OBJECT_IN2_LIMB_NONE" LimbMax="OBJECT_IN2_LIMB_MAX" EnumName="ObjectIn2Limb" Offset="0x78B0" />
<Animation Name="object_in2_Anim_008090" Offset="0x8090" />
<Animation Name="object_in2_Anim_00898C" Offset="0x898C" />
<Animation Name="object_in2_Anim_009450" Offset="0x9450" />
<Animation Name="object_in2_Anim_009CDC" Offset="0x9CDC" />
<Animation Name="object_in2_Anim_00A5E0" Offset="0xA5E0" />
<Animation Name="object_in2_Anim_00A70C" Offset="0xA70C" />
<Animation Name="object_in2_Anim_00AD18" Offset="0xAD18" />
<Animation Name="object_in2_Anim_00B8B0" Offset="0xB8B0" />
<Animation Name="object_in2_Anim_00B990" Offset="0xB990" />
<Animation Name="object_in2_Anim_00BA80" Offset="0xBA80" />
<Animation Name="object_in2_Anim_00C03C" Offset="0xC03C" />
<Animation Name="object_in2_Anim_008090" Offset="0x8090" /> <!-- Original name is "in2_suwarukard" -->
<Animation Name="object_in2_Anim_00898C" Offset="0x898C" /> <!-- Original name is "in2_suwarunomu" -->
<Animation Name="object_in2_Anim_009450" Offset="0x9450" /> <!-- Original name is "in2_suwaruokoru" -->
<Animation Name="object_in2_Anim_009CDC" Offset="0x9CDC" /> <!-- Original name is "in2_suwaruwait" -->
<Animation Name="object_in2_Anim_00A5E0" Offset="0xA5E0" /> <!-- Original name is "in2_suwaruwait2" -->
<Animation Name="object_in2_Anim_00A70C" Offset="0xA70C" /> <!-- Original name is "in2_suwaruwait3" -->
<Animation Name="object_in2_Anim_00AD18" Offset="0xAD18" /> <!-- Original name is "in2_walk" -->
<Animation Name="object_in2_Anim_00B8B0" Offset="0xB8B0" /> <!-- Original name is "in2_walk2suwaru" -->
<Animation Name="object_in2_Anim_00B990" Offset="0xB990" /> <!-- Original name is "in2_matsu1" -->
<Animation Name="object_in2_Anim_00BA80" Offset="0xBA80" /> <!-- Original name is "in_neru1" -->
<Animation Name="object_in2_Anim_00C03C" Offset="0xC03C" /> <!-- Original name is "in_pekopeko" -->
</File>
</Root>
+6 -6
View File
@@ -1,10 +1,10 @@
<Root>
<File Name="object_js" Segment="6">
<Animation Name="object_js_Anim_00016C" Offset="0x16C" />
<Animation Name="object_js_Anim_0003DC" Offset="0x3DC" />
<Animation Name="object_js_Anim_000AD4" Offset="0xAD4" />
<Animation Name="object_js_Anim_000C7C" Offset="0xC7C" />
<Animation Name="object_js_Anim_000F4C" Offset="0xF4C" />
<Animation Name="object_js_Anim_00016C" Offset="0x16C" /> <!-- Original name is "js_chigau" -->
<Animation Name="object_js_Anim_0003DC" Offset="0x3DC" /> <!-- Original name is "js_chigau2wait" -->
<Animation Name="object_js_Anim_000AD4" Offset="0xAD4" /> <!-- Original name is "js_furueru" -->
<Animation Name="object_js_Anim_000C7C" Offset="0xC7C" /> <!-- Original name is "js_maido" -->
<Animation Name="object_js_Anim_000F4C" Offset="0xF4C" /> <!-- Original name is "js_matsu" -->
<DList Name="object_js_DL_003F30" Offset="0x3F30" />
<DList Name="object_js_DL_004510" Offset="0x4510" />
<DList Name="object_js_DL_004688" Offset="0x4688" />
@@ -40,6 +40,6 @@
<Limb Name="object_js_Standardlimb_006948" Type="Standard" EnumName="OBJECT_JS_LIMB_0B" Offset="0x6948" />
<Limb Name="object_js_Standardlimb_006954" Type="Standard" EnumName="OBJECT_JS_LIMB_0C" Offset="0x6954" />
<Skeleton Name="object_js_Skel_006990" Type="Flex" LimbType="Standard" LimbNone="OBJECT_JS_LIMB_NONE" LimbMax="OBJECT_JS_LIMB_MAX" EnumName="ObjectJsLimb" Offset="0x6990" />
<Collision Name="object_js_Colheader_0069E8" Offset="0x69E8" />
<Collision Name="object_js_Colheader_0069E8" Offset="0x69E8" /> <!-- Original name is "test_floor_bgdatainfo" -->
</File>
</Root>
+23 -23
View File
@@ -50,26 +50,26 @@
<Limb Name="object_jso_Standardlimb_003104" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_12" Offset="0x3104" />
<Limb Name="object_jso_Standardlimb_003110" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_13" Offset="0x3110" />
<Skeleton Name="object_jso_Skel_003168" Type="Flex" LimbType="Standard" LimbNone="OBJECT_JSO_1_LIMB_NONE" LimbMax="OBJECT_JSO_1_LIMB_MAX" EnumName="ObjectJso1Limb" Offset="0x3168" />
<Animation Name="object_jso_Anim_003238" Offset="0x3238" />
<Animation Name="object_jso_Anim_003530" Offset="0x3530" />
<Animation Name="object_jso_Anim_00378C" Offset="0x378C" />
<Animation Name="object_jso_Anim_0038AC" Offset="0x38AC" />
<Animation Name="object_jso_Anim_003D5C" Offset="0x3D5C" />
<Animation Name="object_jso_Anim_004018" Offset="0x4018" />
<Animation Name="object_jso_Anim_004384" Offset="0x4384" />
<Animation Name="object_jso_Anim_0044F8" Offset="0x44F8" />
<Animation Name="object_jso_Anim_004858" Offset="0x4858" />
<Animation Name="object_jso_Anim_005778" Offset="0x5778" />
<Animation Name="object_jso_Anim_005D5C" Offset="0x5D5C" />
<Animation Name="object_jso_Anim_00603C" Offset="0x603C" />
<Animation Name="object_jso_Anim_0063A4" Offset="0x63A4" />
<Animation Name="object_jso_Anim_0067F0" Offset="0x67F0" />
<Animation Name="object_jso_Anim_0070BC" Offset="0x70BC" />
<Animation Name="object_jso_Anim_0071E0" Offset="0x71E0" />
<Animation Name="object_jso_Anim_0072AC" Offset="0x72AC" />
<Animation Name="object_jso_Anim_00788C" Offset="0x788C" />
<Animation Name="object_jso_Anim_007B04" Offset="0x7B04" />
<Animation Name="object_jso_Anim_0081F4" Offset="0x81F4" />
<Animation Name="object_jso_Anim_003238" Offset="0x3238" /> <!-- Original name is "jsk_pose" -->
<Animation Name="object_jso_Anim_003530" Offset="0x3530" /> <!-- Original name is "jso_attack1" -->
<Animation Name="object_jso_Anim_00378C" Offset="0x378C" /> <!-- Original name is "jso_attack2" -->
<Animation Name="object_jso_Anim_0038AC" Offset="0x38AC" /> <!-- Original name is "jso_attack_wait" -->
<Animation Name="object_jso_Anim_003D5C" Offset="0x3D5C" /> <!-- Original name is "jso_back" -->
<Animation Name="object_jso_Anim_004018" Offset="0x4018" /> <!-- Original name is "jso_bomb" -->
<Animation Name="object_jso_Anim_004384" Offset="0x4384" /> <!-- Original name is "jso_chakuchiD" -->
<Animation Name="object_jso_Anim_0044F8" Offset="0x44F8" /> <!-- Original name is "jso_damage" -->
<Animation Name="object_jso_Anim_004858" Offset="0x4858" /> <!-- Original name is "jso_defense" -->
<Animation Name="object_jso_Anim_005778" Offset="0x5778" /> <!-- Original name is "jso_demo_start" -->
<Animation Name="object_jso_Anim_005D5C" Offset="0x5D5C" /> <!-- Original name is "jso_down" -->
<Animation Name="object_jso_Anim_00603C" Offset="0x603C" /> <!-- Original name is "jso_hajiku" -->
<Animation Name="object_jso_Anim_0063A4" Offset="0x63A4" /> <!-- Original name is "jso_henahena" -->
<Animation Name="object_jso_Anim_0067F0" Offset="0x67F0" /> <!-- Original name is "jso_hetari" -->
<Animation Name="object_jso_Anim_0070BC" Offset="0x70BC" /> <!-- Original name is "jso_jakin" -->
<Animation Name="object_jso_Anim_0071E0" Offset="0x71E0" /> <!-- Original name is "jso_jumpD" -->
<Animation Name="object_jso_Anim_0072AC" Offset="0x72AC" /> <!-- Original name is "jso_kaiten" -->
<Animation Name="object_jso_Anim_00788C" Offset="0x788C" /> <!-- Original name is "jso_kyoro" -->
<Animation Name="object_jso_Anim_007B04" Offset="0x7B04" /> <!-- Original name is "jso_ororo" -->
<Animation Name="object_jso_Anim_0081F4" Offset="0x81F4" /> <!-- Original name is "jso_start" -->
<DList Name="object_jso_DL_008F50" Offset="0x8F50" />
<DList Name="object_jso_DL_009008" Offset="0x9008" />
<DList Name="object_jso_DL_0090C0" Offset="0x90C0" />
@@ -115,8 +115,8 @@
<Limb Name="object_jso_Standardlimb_00A99C" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_12" Offset="0xA99C" />
<Limb Name="object_jso_Standardlimb_00A9A8" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_13" Offset="0xA9A8" />
<Skeleton Name="object_jso_Skel_00AA00" Type="Flex" LimbType="Standard" LimbNone="OBJECT_JSO_2_LIMB_NONE" LimbMax="OBJECT_JSO_2_LIMB_MAX" EnumName="ObjectJso2Limb" Offset="0xAA00" />
<Animation Name="object_jso_Anim_00AE80" Offset="0xAE80" />
<Animation Name="object_jso_Anim_00B1DC" Offset="0xB1DC" />
<Animation Name="object_jso_Anim_00B5F0" Offset="0xB5F0" />
<Animation Name="object_jso_Anim_00AE80" Offset="0xAE80" /> <!-- Original name is "jso_wait" -->
<Animation Name="object_jso_Anim_00B1DC" Offset="0xB1DC" /> <!-- Original name is "jso_waitD" -->
<Animation Name="object_jso_Anim_00B5F0" Offset="0xB5F0" /> <!-- Original name is "jso_walk" -->
</File>
</Root>
+1 -1
View File
@@ -6,7 +6,7 @@
<Animation Name="gEvanInspiredAnim" Offset="0x48D4" /> <!-- Original name is "zK_furimuki" ("to turn around") -->
<Animation Name="gEvanPlayRightAnim" Offset="0x5E04" /> <!-- Original name is "zK_play01" -->
<Animation Name="gEvanPlayLeftAnim" Offset="0x7334" /> <!-- Original name is "zK_play02" -->
<Animation Name="gEeanTalkFootTapAnim" Offset="0x7C40" /> <!-- Original name is "zK_talk01" -->
<Animation Name="gEvanTalkFootTapAnim" Offset="0x7C40" /> <!-- Original name is "zK_talk01" -->
<Animation Name="gEvanTalkLookDownAnim" Offset="0x8630" /> <!-- Original name is "zK_talk02" -->
<Animation Name="gEvanTalkArmsOutAnim" Offset="0x90CC" /> <!-- Original name is "zK_talk03" -->
<Animation Name="gEvanTalkHandsOnHipsAnim" Offset="0x9830" /> <!-- Original name is "zK_talk04" -->
+86 -77
View File
@@ -1,81 +1,90 @@
<Root>
<!-- Assets for Lulu - Zora Vocalist -->
<File Name="object_zov" Segment="6">
<Animation Name="object_zov_Anim_0017D4" Offset="0x17D4" />
<Animation Name="object_zov_Anim_0023F4" Offset="0x23F4" />
<Animation Name="object_zov_Anim_002B5C" Offset="0x2B5C" />
<Animation Name="object_zov_Anim_00418C" Offset="0x418C" />
<Animation Name="object_zov_Anim_005A6C" Offset="0x5A6C" />
<Animation Name="object_zov_Anim_0066A4" Offset="0x66A4" />
<Animation Name="object_zov_Anim_008120" Offset="0x8120" />
<Animation Name="object_zov_Anim_00A888" Offset="0xA888" />
<Animation Name="object_zov_Anim_00B4CC" Offset="0xB4CC" />
<Animation Name="object_zov_Anim_00C510" Offset="0xC510" />
<Animation Name="object_zov_Anim_00CAA8" Offset="0xCAA8" />
<Animation Name="object_zov_Anim_00D3EC" Offset="0xD3EC" />
<DList Name="object_zov_DL_0107B0" Offset="0x107B0" />
<DList Name="object_zov_DL_010BC0" Offset="0x10BC0" />
<DList Name="object_zov_DL_010E60" Offset="0x10E60" />
<DList Name="object_zov_DL_010FF0" Offset="0x10FF0" />
<DList Name="object_zov_DL_011230" Offset="0x11230" />
<DList Name="object_zov_DL_011300" Offset="0x11300" />
<DList Name="object_zov_DL_0113F0" Offset="0x113F0" />
<DList Name="object_zov_DL_011690" Offset="0x11690" />
<DList Name="object_zov_DL_011820" Offset="0x11820" />
<DList Name="object_zov_DL_011A60" Offset="0x11A60" />
<DList Name="object_zov_DL_011B30" Offset="0x11B30" />
<DList Name="object_zov_DL_011C20" Offset="0x11C20" />
<DList Name="object_zov_DL_0122E0" Offset="0x122E0" />
<DList Name="object_zov_DL_0123C0" Offset="0x123C0" />
<DList Name="object_zov_DL_012560" Offset="0x12560" />
<DList Name="object_zov_DL_0127D0" Offset="0x127D0" />
<DList Name="object_zov_DL_012890" Offset="0x12890" />
<DList Name="object_zov_DL_012B20" Offset="0x12B20" />
<DList Name="object_zov_DL_012CB8" Offset="0x12CB8" />
<DList Name="object_zov_DL_012F28" Offset="0x12F28" />
<DList Name="object_zov_DL_012FE8" Offset="0x12FE8" />
<Texture Name="object_zov_TLUT_013278" OutName="tlut_013278" Format="rgba16" Width="16" Height="16" Offset="0x13278" />
<Texture Name="object_zov_Tex_013478" OutName="tex_013478" Format="rgba16" Width="8" Height="16" Offset="0x13478" />
<Texture Name="object_zov_Tex_013578" OutName="tex_013578" Format="ci8" Width="8" Height="8" Offset="0x13578" />
<Texture Name="object_zov_Tex_0135B8" OutName="tex_0135B8" Format="ci8" Width="8" Height="8" Offset="0x135B8" />
<Texture Name="object_zov_Tex_0135F8" OutName="tex_0135F8" Format="ci8" Width="32" Height="32" Offset="0x135F8" />
<Texture Name="object_zov_Tex_0139F8" OutName="tex_0139F8" Format="ci8" Width="16" Height="16" Offset="0x139F8" />
<Texture Name="object_zov_Tex_013AF8" OutName="tex_013AF8" Format="ci8" Width="8" Height="8" Offset="0x13AF8" />
<Texture Name="object_zov_Tex_013B38" OutName="tex_013B38" Format="ci8" Width="16" Height="16" Offset="0x13B38" />
<Texture Name="object_zov_Tex_013C38" OutName="tex_013C38" Format="ci8" Width="32" Height="32" Offset="0x13C38" />
<Texture Name="object_zov_Tex_014038" OutName="tex_014038" Format="ci8" Width="16" Height="16" Offset="0x14038" />
<Texture Name="object_zov_Tex_014138" OutName="tex_014138" Format="ci8" Width="32" Height="32" Offset="0x14138" />
<Texture Name="object_zov_Tex_014538" OutName="tex_014538" Format="ci8" Width="32" Height="32" Offset="0x14538" />
<Texture Name="object_zov_Tex_014938" OutName="tex_014938" Format="ci8" Width="32" Height="32" Offset="0x14938" />
<!-- <Blob Name="object_zov_Blob_014D38" Size="0x400" Offset="0x14D38" /> -->
<Texture Name="object_zov_Tex_015138" OutName="tex_015138" Format="ci8" Width="32" Height="32" Offset="0x15138" />
<Texture Name="object_zov_Tex_015538" OutName="tex_015538" Format="ci8" Width="8" Height="8" Offset="0x15538" />
<Texture Name="object_zov_Tex_015578" OutName="tex_015578" Format="ci8" Width="16" Height="16" Offset="0x15578" />
<Texture Name="object_zov_Tex_015678" OutName="tex_015678" Format="ci8" Width="16" Height="16" Offset="0x15678" />
<Texture Name="object_zov_Tex_015778" OutName="tex_015778" Format="rgba16" Width="32" Height="32" Offset="0x15778" />
<Texture Name="object_zov_Tex_015F78" OutName="tex_015F78" Format="ci8" Width="16" Height="16" Offset="0x15F78" />
<Texture Name="object_zov_Tex_016078" OutName="tex_016078" Format="ci8" Width="8" Height="16" Offset="0x16078" />
<Limb Name="object_zov_Standardlimb_0160F8" Type="Standard" EnumName="OBJECT_ZOV_LIMB_01" Offset="0x160F8" />
<Limb Name="object_zov_Standardlimb_016104" Type="Standard" EnumName="OBJECT_ZOV_LIMB_02" Offset="0x16104" />
<Limb Name="object_zov_Standardlimb_016110" Type="Standard" EnumName="OBJECT_ZOV_LIMB_03" Offset="0x16110" />
<Limb Name="object_zov_Standardlimb_01611C" Type="Standard" EnumName="OBJECT_ZOV_LIMB_04" Offset="0x1611C" />
<Limb Name="object_zov_Standardlimb_016128" Type="Standard" EnumName="OBJECT_ZOV_LIMB_05" Offset="0x16128" />
<Limb Name="object_zov_Standardlimb_016134" Type="Standard" EnumName="OBJECT_ZOV_LIMB_06" Offset="0x16134" />
<Limb Name="object_zov_Standardlimb_016140" Type="Standard" EnumName="OBJECT_ZOV_LIMB_07" Offset="0x16140" />
<Limb Name="object_zov_Standardlimb_01614C" Type="Standard" EnumName="OBJECT_ZOV_LIMB_08" Offset="0x1614C" />
<Limb Name="object_zov_Standardlimb_016158" Type="Standard" EnumName="OBJECT_ZOV_LIMB_09" Offset="0x16158" />
<Limb Name="object_zov_Standardlimb_016164" Type="Standard" EnumName="OBJECT_ZOV_LIMB_0A" Offset="0x16164" />
<Limb Name="object_zov_Standardlimb_016170" Type="Standard" EnumName="OBJECT_ZOV_LIMB_0B" Offset="0x16170" />
<Limb Name="object_zov_Standardlimb_01617C" Type="Standard" EnumName="OBJECT_ZOV_LIMB_0C" Offset="0x1617C" />
<Limb Name="object_zov_Standardlimb_016188" Type="Standard" EnumName="OBJECT_ZOV_LIMB_0D" Offset="0x16188" />
<Limb Name="object_zov_Standardlimb_016194" Type="Standard" EnumName="OBJECT_ZOV_LIMB_0E" Offset="0x16194" />
<Limb Name="object_zov_Standardlimb_0161A0" Type="Standard" EnumName="OBJECT_ZOV_LIMB_0F" Offset="0x161A0" />
<Limb Name="object_zov_Standardlimb_0161AC" Type="Standard" EnumName="OBJECT_ZOV_LIMB_10" Offset="0x161AC" />
<Limb Name="object_zov_Standardlimb_0161B8" Type="Standard" EnumName="OBJECT_ZOV_LIMB_11" Offset="0x161B8" />
<Limb Name="object_zov_Standardlimb_0161C4" Type="Standard" EnumName="OBJECT_ZOV_LIMB_12" Offset="0x161C4" />
<Limb Name="object_zov_Standardlimb_0161D0" Type="Standard" EnumName="OBJECT_ZOV_LIMB_13" Offset="0x161D0" />
<Limb Name="object_zov_Standardlimb_0161DC" Type="Standard" EnumName="OBJECT_ZOV_LIMB_14" Offset="0x161DC" />
<Limb Name="object_zov_Standardlimb_0161E8" Type="Standard" EnumName="OBJECT_ZOV_LIMB_15" Offset="0x161E8" />
<Limb Name="object_zov_Standardlimb_0161F4" Type="Standard" EnumName="OBJECT_ZOV_LIMB_16" Offset="0x161F4" />
<Skeleton Name="object_zov_Skel_016258" Type="Flex" LimbType="Standard" LimbNone="OBJECT_ZOV_LIMB_NONE" LimbMax="OBJECT_ZOV_LIMB_MAX" EnumName="ObjectZovLimb" Offset="0x16258" />
<!-- Lulu Animations -->
<Animation Name="gLuluTurnAndWalkAnim" Offset="0x17D4" />
<Animation Name="gLuluWalkLoopAnim" Offset="0x23F4" />
<Animation Name="gLuluSingStartAnim" Offset="0x2B5C" />
<Animation Name="gLuluSingLoopAnim" Offset="0x418C" />
<Animation Name="gLuluLookForwardAndLeftAnim" Offset="0x5A6C" />
<Animation Name="gLuluLookLeftLoopAnim" Offset="0x66A4" />
<Animation Name="gLuluPutHandsDownAnim" Offset="0x8120" />
<Animation Name="gLuluLookAroundAnim" Offset="0xA888" />
<Animation Name="gLuluLookForwardAndDownAnim" Offset="0xB4CC" />
<Animation Name="gLuluAngleHeadAnim" Offset="0xC510" />
<Animation Name="gLuluNodAnim" Offset="0xCAA8" />
<Animation Name="gLuluLookDownAnim" Offset="0xD3EC" />
<!-- Lulu Limb DLists -->
<DList Name="gLuluTorsoDL" Offset="0x107B0" />
<DList Name="gLuluRightUpperArmDL" Offset="0x10BC0" />
<DList Name="gLuluRightForearmDL" Offset="0x10E60" />
<DList Name="gLuluRightHandDL" Offset="0x10FF0" />
<DList Name="gLuluRightArmUpperFinDL" Offset="0x11230" />
<DList Name="gLuluRightArmLowerFinDL" Offset="0x11300" />
<DList Name="gLuluLeftUpperArmDL" Offset="0x113F0" />
<DList Name="gLuluLeftForearmDL" Offset="0x11690" />
<DList Name="gLuluLeftHandDL" Offset="0x11820" />
<DList Name="gLuluLeftArmUpperFinDL" Offset="0x11A60" />
<DList Name="gLuluLeftArmLowerFinDL" Offset="0x11B30" />
<DList Name="gLuluHeadDL" Offset="0x11C20" />
<DList Name="gLuluPelvisDL" Offset="0x122E0" />
<DList Name="gLuluRightThighDL" Offset="0x123C0" />
<DList Name="gLuluRightShinDL" Offset="0x12560" />
<DList Name="gLuluRightLegFinDL" Offset="0x127D0" />
<DList Name="gLuluRightFootDL" Offset="0x12890" />
<DList Name="gLuluLeftThighDL" Offset="0x12B20" />
<DList Name="gLuluLeftShinDL" Offset="0x12CB8" />
<DList Name="gLuluLeftLegFinDL" Offset="0x12F28" />
<DList Name="gLuluLeftFootDL" Offset="0x12FE8" />
<!-- Lulu Textures -->
<Texture Name="gLuluTLUT" OutName="lulu_tlut" Format="rgba16" Width="16" Height="16" Offset="0x13278" />
<Texture Name="gLuluEarringTex" OutName="lulu_earring" Format="rgba16" Width="8" Height="16" Offset="0x13478" />
<Texture Name="gLuluSkinTex" OutName="lulu_skin" Format="ci8" Width="8" Height="8" Offset="0x13578" />
<Texture Name="gLuluNostrilTex" OutName="lulu_nostril" Format="ci8" Width="8" Height="8" Offset="0x135B8" />
<Texture Name="gLuluMouthClosedTex" OutName="lulu_mouth_closed" Format="ci8" Width="32" Height="32" Offset="0x135F8" />
<Texture Name="gLuluHeadSkinTex" OutName="lulu_head_skin" Format="ci8" Width="16" Height="16" Offset="0x139F8" />
<Texture Name="gLuluEarCavityTex" OutName="lulu_ear_cavity" Format="ci8" Width="8" Height="8" Offset="0x13AF8" />
<Texture Name="gLuluHeadHoleTex" OutName="lulu_head_hole" Format="ci8" Width="16" Height="16" Offset="0x13B38" />
<Texture Name="gLuluEyeOpenTex" OutName="lulu_eye_open" Format="ci8" Width="32" Height="32" Offset="0x13C38" />
<Texture Name="gLuluEarTex" OutName="lulu_ear" Format="ci8" Width="16" Height="16" Offset="0x14038" />
<Texture Name="gLuluEyeClosedTex" OutName="lulu_eye_closed" Format="ci8" Width="32" Height="32" Offset="0x14138" />
<Texture Name="gLuluMouthOpenTex" OutName="lulu_mouth_open" Format="ci8" Width="32" Height="32" Offset="0x14538" />
<Texture Name="gLuluSpottedSkinTex" OutName="lulu_spotted_skin" Format="ci8" Width="32" Height="32" Offset="0x14938" />
<Texture Name="gLuluMouthOpenFullTex" OutName="lulu_mouth_open_full" Format="ci8" Width="32" Height="32" Offset="0x14D38" />
<Texture Name="gLuluEyeHalfTex" OutName="lulu_eye_half" Format="ci8" Width="32" Height="32" Offset="0x15138" />
<Texture Name="gLuluSkinShadowTex" OutName="lulu_skin_shadow" Format="ci8" Width="8" Height="8" Offset="0x15538" />
<Texture Name="gLuluKneeAndElbowTex" OutName="lulu_knee_and_elbow" Format="ci8" Width="16" Height="16" Offset="0x15578" />
<Texture Name="gLuluFingersTex" OutName="lulu_fingers" Format="ci8" Width="16" Height="16" Offset="0x15678" />
<Texture Name="gLuluDressPatternTex" OutName="lulu_dress_pattern" Format="rgba16" Width="32" Height="32" Offset="0x15778" />
<Texture Name="gLuluDressStringTex" OutName="lulu_dress_string" Format="ci8" Width="16" Height="16" Offset="0x15F78" />
<Texture Name="gLuluDressLoopTex" OutName="lulu_dress_loop" Format="ci8" Width="8" Height="16" Offset="0x16078" />
<!-- Lulu Limbs and Skeleton -->
<Limb Name="gLuluRootLimb" Type="Standard" EnumName="LULU_LIMB_ROOT" Offset="0x160F8" />
<Limb Name="gLuluPelvisLimb" Type="Standard" EnumName="LULU_LIMB_PELVIS" Offset="0x16104" />
<Limb Name="gLuluLeftThighLimb" Type="Standard" EnumName="LULU_LIMB_LEFT_THIGH" Offset="0x16110" />
<Limb Name="gLuluLeftShinLimb" Type="Standard" EnumName="LULU_LIMB_LEFT_SHIN" Offset="0x1611C" />
<Limb Name="gLuluLeftFootLimb" Type="Standard" EnumName="LULU_LIMB_LEFT_FOOT" Offset="0x16128" />
<Limb Name="gLuluLeftLegFinLimb" Type="Standard" EnumName="LULU_LIMB_LEFT_LEG_FIN" Offset="0x16134" />
<Limb Name="gLuluRightThighLimb" Type="Standard" EnumName="LULU_LIMB_RIGHT_THIGH" Offset="0x16140" />
<Limb Name="gLuluRightShinLimb" Type="Standard" EnumName="LULU_LIMB_RIGHT_SHIN" Offset="0x1614C" />
<Limb Name="gLuluRightFootLimb" Type="Standard" EnumName="LULU_LIMB_RIGHT_FOOT" Offset="0x16158" />
<Limb Name="gLuluRightLegFinLimb" Type="Standard" EnumName="LULU_LIMB_RIGHT_LEG_FIN" Offset="0x16164" />
<Limb Name="gLuluTorsoLimb" Type="Standard" EnumName="LULU_LIMB_TORSO" Offset="0x16170" />
<Limb Name="gLuluHeadLimb" Type="Standard" EnumName="LULU_LIMB_HEAD" Offset="0x1617C" />
<Limb Name="gLuluLeftUpperArmLimb" Type="Standard" EnumName="LULU_LIMB_LEFT_UPPER_ARM" Offset="0x16188" />
<Limb Name="gLuluLeftArmUpperFinLimb" Type="Standard" EnumName="LULU_LIMB_LEFT_ARM_UPPER_FIN" Offset="0x16194" />
<Limb Name="gLuluLeftArmLowerFinLimb" Type="Standard" EnumName="LULU_LIMB_LEFT_ARM_LOWER_FIN" Offset="0x161A0" />
<Limb Name="gLuluLeftForearmLimb" Type="Standard" EnumName="LULU_LIMB_LEFT_FOREARM" Offset="0x161AC" />
<Limb Name="gLuluLeftHandLimb" Type="Standard" EnumName="LULU_LIMB_LEFT_HAND" Offset="0x161B8" />
<Limb Name="gLuluRightUpperArmLimb" Type="Standard" EnumName="LULU_LIMB_RIGHT_UPPER_ARM" Offset="0x161C4" />
<Limb Name="gLuluRightArmUpperFinLimb" Type="Standard" EnumName="LULU_LIMB_RIGHT_ARM_UPPER_FIN" Offset="0x161D0" />
<Limb Name="gLuluRightArmLowerFinLimb" Type="Standard" EnumName="LULU_LIMB_RIGHT_ARM_LOWER_FIN" Offset="0x161DC" />
<Limb Name="gLuluRightForearmLimb" Type="Standard" EnumName="LULU_LIMB_RIGHT_FOREARM" Offset="0x161E8" />
<Limb Name="gLuluRightHandLimb" Type="Standard" EnumName="LULU_LIMB_RIGHT_HAND" Offset="0x161F4" />
<Skeleton Name="gLuluSkel" Type="Flex" LimbType="Standard" LimbNone="LULU_LIMB_NONE" LimbMax="LULU_LIMB_MAX" EnumName="LuluLimb" Offset="0x16258" />
</File>
</Root>
@@ -2,6 +2,30 @@
<ExternalFile XmlPath="misc/scene_texture_08.xml" OutPath="misc/scene_texture_08/"/>
<File Name="Z2_00KEIKOKU" Segment="2" Game="MM">
<Scene Name="Z2_00KEIKOKU" Offset="0x0"/>
<Cutscene Name="gTerminaFieldClockTowerOpeningCs" Offset="0x9D8"/> <!-- Original name is "clock_t_change" -->
<Cutscene Name="gTerminaFieldTelescopeDay1And2Cs" Offset="0x11F8"/> <!-- Original name is "findoutstk" -->
<Cutscene Name="gTerminaFieldMoonCrashCs" Offset="0x1A48"/> <!-- Original name is "moon_atack" -->
<Cutscene Name="gTerminaFieldTelescopeDay3Cs" Offset="0x2A88"/> <!-- Original name is "findoutstk_3rd" -->
<Cutscene Name="gTerminaFieldTelescopeFinalHoursCs" Offset="0x32A8"/> <!-- Original name is "findoutstk_mad" -->
<Cutscene Name="gTerminaFieldSkullKidDrawingStartCs" Offset="0x3A68"/> <!-- Original name is "find_rakugaki" ("rakugaki" = "graffiti") -->
<Cutscene Name="gTerminaFieldSkullKidDrawingEndCs" Offset="0x4208"/> <!-- Original name is "rakugaki_end" -->
<Cutscene Name="gTerminaFieldIntroFromWestClockTownCs" Offset="0x4568"/> <!-- Original name is "sc1st01_001valley0" -->
<Cutscene Name="gTerminaFieldIntroFromNorthClockTownCs" Offset="0x4858"/> <!-- Original name is "sc1st01_001valley1" -->
<Cutscene Name="gTerminaFieldIntroFromEastClockTownCs" Offset="0x4A68"/> <!-- Original name is "sc1st01_001valley2" -->
<Cutscene Name="gTerminaFieldIntroFromSouthClockTownCs" Offset="0x4C78"/> <!-- Original name is "sc1st01_001valley3" -->
<Cutscene Name="gTerminaFieldGiantsGatherToStopMoonCs" Offset="0xDE2C"/> <!-- Original name is "k_s_start" ("k" is probably short for "kyojin", meaning "giant") -->
<Cutscene Name="gTerminaFieldGiantsStopMoonFailureCs" Offset="0xFA3C"/> <!-- Original name is "k_s_sippai" ("failure") -->
<Cutscene Name="gTerminaFieldGiantsStopMoonSuccessCs" Offset="0x1040C"/> <!-- Original name is "k_s_seikou" ("success") -->
<Cutscene Name="gTerminaFieldFirstCycleClockTowerOpeningCs" Offset="0x11414"/> <!-- Original name is "clock_t_change"; exact duplicate of gTerminaFieldClockTowerOpeningCs -->
<Cutscene Name="gTerminaFieldSkullKidFlashbackRainCs" Offset="0x11E80"/> <!-- Original name is "memory" -->
<Cutscene Name="gTerminaFieldSkullKidFlashbackDrawingWithFairiesCs" Offset="0x133B0"/> <!-- Original name is "rakugaki" -->
<Cutscene Name="gTerminaFieldSkullKidFlashbackPlayingWithFairiesCs" Offset="0x137E0"/> <!-- Original name is "asobu" ("to play; to enjoy oneself; to have a good time") -->
<Cutscene Name="gTerminaFieldCremiaHugCs" Offset="0x1421C"/> <!-- Original name is "climia_dakisime" ("dakisime" = "to hug someone close") -->
<Cutscene Name="gTerminaFieldGiantsDepartCs" Offset="0x1507C"/> <!-- Original name is "aftermoonclash" -->
<Cutscene Name="gTerminaFieldHappyMaskSalesmanAndLinkDepartCs" Offset="0x174EC"/> <!-- Original name is "bye_omenya" ("omenya" = "mask salesman") -->
<Cutscene Name="gTerminaFieldMoonsDestructionCs" Offset="0x1A1FC"/> <!-- Original name is "moonclash" -->
<Cutscene Name="gTerminaFieldCreditsWeddingCs" Offset="0x1B114"/> <!-- Original name is "sc_meoto" ("meoto" = "married couple; husband and wife; man and wife") -->
<Cutscene Name="gTerminaFieldCreditsPostmanCs" Offset="0x1BC94"/> <!-- Original name is "sc_posthut" -->
</File>
<File Name="Z2_00KEIKOKU_room_00" Segment="3" Game="MM">
<Room Name="Z2_00KEIKOKU_room_00" Offset="0x0"/>
+3 -3
View File
@@ -94,7 +94,7 @@ void func_80952734(EnMs* this, PlayState* play) {
if (this->actor.xzDistToPlayer < 90.0f) {
if (ABS_ALT(temp_v1) < 0x2000) {
func_800B8614(&this->actor, play, 90.0f);
Actor_OfferTalk(&this->actor, play, 90.0f);
}
}
}
@@ -104,7 +104,7 @@ void func_80952734(EnMs* this, PlayState* play) {
void func_809529AC(EnMs* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->actor.textId = 0;
func_800B8500(&this->actor, play, this->actor.xzDistToPlayer, this->actor.playerHeightRel, 0);
Actor_OfferTalkExchange(&this->actor, play, this->actor.xzDistToPlayer, this->actor.playerHeightRel, 0);
this->actionFunc = func_80952A1C;
} else {
Actor_OfferGetItem(&this->actor, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
@@ -116,7 +116,7 @@ void func_80952A1C(EnMs* this, PlayState* play) {
Message_ContinueTextbox(play, 0x936U);
this->actionFunc = func_809527F8;
} else {
func_800B8500(&this->actor, play, this->actor.xzDistToPlayer, this->actor.playerHeightRel, -1);
Actor_OfferTalkExchange(&this->actor, play, this->actor.xzDistToPlayer, this->actor.playerHeightRel, -1);
}
}
+2 -2
View File
@@ -137,7 +137,7 @@ void func_80C1019C(EnRecepgirl* this, PlayState* play) {
if (Actor_ProcessTalkRequest(&this->actor, &play->state) != 0) {
func_80C10290(this);
} else if (Actor_IsFacingPlayer(&this->actor, 0x2000)) {
func_800B8614(&this->actor, play, 60.0f);
Actor_OfferTalk(&this->actor, play, 60.0f);
if (Player_GetMask(play) == 2) {
this->actor.textId = 0x2367;
} else if (Flags_GetSwitch(play, this->actor.params)) {
@@ -473,7 +473,7 @@ void func_80C1019C(EnRecepgirl* this, PlayState* play) {
if (Actor_ProcessTalkRequest(&this->actor, &play->state) != 0) {
func_80C10290(this);
} else if (Actor_IsFacingPlayer(&this->actor, 0x2000)) {
func_800B8614(&this->actor, play, 60.0f);
Actor_OfferTalk(&this->actor, play, 60.0f);
if (Player_GetMask(play) == PLAYER_MASK_KAFEIS_MASK) {
this->actor.textId = 0x2367; // "... doesn't Kafei want to break off his engagement ... ?"
} else if (Flags_GetSwitch(play, this->actor.params)) {
+2 -2
View File
@@ -16,7 +16,7 @@ glabel func_809529AC
/* 0003B0 809529D0 8C860098 */ lw $a2, 0x98($a0)
/* 0003B4 809529D4 8C87009C */ lw $a3, 0x9c($a0)
/* 0003B8 809529D8 AFA40020 */ sw $a0, 0x20($sp)
/* 0003BC 809529DC 0C02E140 */ jal func_800B8500
/* 0003BC 809529DC 0C02E140 */ jal Actor_OfferTalkExchange
/* 0003C0 809529E0 AFA00010 */ sw $zero, 0x10($sp)
/* 0003C4 809529E4 8FA40020 */ lw $a0, 0x20($sp)
/* 0003C8 809529E8 3C0E8095 */ lui $t6, %hi(func_80952A1C)
@@ -43,7 +43,7 @@ and turn it into compilable C code:
void func_809529AC(EnMs* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->actor.textId = 0;
func_800B8500(&this->actor, play, this->actor.xzDistToPlayer, this->actor.playerHeightRel, 0);
Actor_OfferTalkExchange(&this->actor, play, this->actor.xzDistToPlayer, this->actor.playerHeightRel, 0);
this->actionFunc = func_80952A1C;
} else {
Actor_OfferGetItem(&this->actor, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
+3 -3
View File
@@ -135,7 +135,7 @@ void func_80C1019C(EnRecepgirl* this, PlayState* play) {
return;
}
if (Actor_IsFacingPlayer((Actor *) this, 0x2000) != 0) {
func_800B8614((Actor *) this, play, 60.0f);
Actor_OfferTalk((Actor *) this, play, 60.0f);
if (Player_GetMask(play) == 2) {
this->actor.textId = 0x2367;
return;
@@ -190,7 +190,7 @@ void func_80C1019C(EnRecepgirl* this, PlayState* play) {
return;
}
if (Actor_IsFacingPlayer(&this->actor, 0x2000) != 0) {
func_800B8614(&this->actor, play, 60.0f);
Actor_OfferTalk(&this->actor, play, 60.0f);
if (Player_GetMask(play) == 2) {
this->actor.textId = 0x2367;
return;
@@ -226,7 +226,7 @@ void func_80C1019C(EnRecepgirl* this, PlayState* play) {
if (Actor_ProcessTalkRequest(&this->actor, &play->state) != 0) {
func_80C10290(this);
} else if (Actor_IsFacingPlayer(&this->actor, 0x2000)) {
func_800B8614(&this->actor, play, 60.0f);
Actor_OfferTalk(&this->actor, play, 60.0f);
if (Player_GetMask(play) == 2) {
this->actor.textId = 0x2367;
} else if (Flags_GetSwitch(play, this->actor.params)) {
+29
View File
@@ -4,6 +4,35 @@
#include "ultratypes.h"
#include "os_pi.h"
#define FLASH_START_ADDR 0x08000000 // FRAM Base Address in Cart Memory
#define FLASH_SIZE 0x20000
#define FLASH_LATENCY 0x5
#define FLASH_PULSE 0x0C
#define FLASH_PAGE_SIZE 0xF
#define FLASH_REL_DURATION 0x2
#define DEVICE_TYPE_FLASH 8
/* OLD_FLASH is MX_PROTO_A, MX_A and MX_C */
#define OLD_FLASH 0
/* NEW_FLASH is MX_B_AND_D and MATSUSHITA flash */
#define NEW_FLASH 1
#define FLASH_STATUS_ERASE_BUSY 2
#define FLASH_STATUS_ERASE_OK 0
#define FLASH_STATUS_ERASE_ERROR -1
#define FLASH_STATUS_WRITE_BUSY 1
#define FLASH_STATUS_WRITE_OK 0
#define FLASH_STATUS_WRITE_ERROR -1
#define FLASH_VERSION_MX_PROTO_A 0x00C20000
#define FLASH_VERSION_MX_A 0x00C20001
#define FLASH_VERSION_MX_C 0x00C2001E
#define FLASH_VERSION_MX_B_AND_D 0x00C2001D
#define FLASH_VERSION_MEI 0x003200F1
OSPiHandle* osFlashReInit(u8 latency, u8 pulse, u8 pageSize, u8 relDuration, u32 start);
OSPiHandle* osFlashInit(void);
+27
View File
@@ -0,0 +1,27 @@
#ifndef PR_OS_INTERNAL_FLASH_H
#define PR_OS_INTERNAL_FLASH_H
#include "os_flash.h"
#define FLASH_BLOCK_SIZE 128
#define FLASH_CMD_REG 0x10000 // Located at 0x08010000 on the Cart
/* set whole chip erase mode */
#define FLASH_CMD_CHIP_ERASE 0x3C000000
/* set sector erase mode */
#define FLASH_CMD_SECTOR_ERASE 0x4B000000
/* do erasure */
#define FLASH_CMD_EXECUTE_ERASE 0x78000000
/* program selected page */
#define FLASH_CMD_PROGRAM_PAGE 0xA5000000
/* set page program mode */
#define FLASH_CMD_PAGE_PROGRAM 0xB4000000
/* set status mode */
#define FLASH_CMD_STATUS 0xD2000000
/* set silicon id mode */
#define FLASH_CMD_ID 0xE1000000
/* set read mode */
#define FLASH_CMD_READ_ARRAY 0xF0000000
#endif
+2 -2
View File
@@ -1,5 +1,5 @@
#ifndef PR_OS_INTERNAL_REG
#define PR_OS_INTERNAL_REG
#ifndef PR_OS_INTERNAL_REG_H
#define PR_OS_INTERNAL_REG_H
#include "ultratypes.h"
#include "os_exception.h"
+5 -7
View File
@@ -1,14 +1,12 @@
#ifndef PR_RSP_H
#define PR_RSP_H
#ifndef PR_OS_INTERNAL_RSP_H
#define PR_OS_INTERNAL_RSP_H
#include "ultratypes.h"
#include "libc/stddef.h"
u32 __osSpGetStatus(void);
void __osSpSetStatus(u32 data);
s32 __osSpSetPc(u32 pc);
s32 __osSpRawStartDma(s32 direction, u32 devAddr, void* dramAddr, size_t size);
s32 __osSpSetPc(void* pc);
s32 __osSpRawStartDma(s32 direction, void* devAddr, void* dramAddr, size_t size);
#endif
-2
View File
@@ -99,10 +99,8 @@ typedef struct OSDevMgr {
#define PI_DOMAIN1 0
#define PI_DOMAIN2 1
extern OSPiHandle* __osPiTable;
void osCreatePiManager(OSPri pri, OSMesgQueue* cmdQ, OSMesg* cmdBuf, s32 cmdMsgCnt);
OSPiHandle* osCartRomInit(void);
+7 -1
View File
@@ -122,6 +122,13 @@ extern OSViMode osViModeNtscLan1;
extern OSViMode osViModeMpalLan1;
extern OSViMode osViModeFpalLan1;
extern OSViMode osViModeNtscHpf1;
extern OSViMode osViModePalLan1;
extern OSViMode osViModeNtscHpn1;
extern OSViMode osViModeNtscLan1;
extern OSViMode osViModeMpalLan1;
extern OSViMode osViModeFpalLan1;
void* osViGetCurrentFramebuffer(void);
void* osViGetNextFramebuffer(void);
void osViSetXScale(f32 value);
@@ -134,5 +141,4 @@ void osViSwapBuffer(void* frameBufPtr);
void osViBlack(u8 active);
void osCreateViManager(OSPri pri);
#endif
-1
View File
@@ -102,5 +102,4 @@ s32 __osEPiRawReadIo(OSPiHandle* handle, uintptr_t devAddr, u32* data);
s32 __osEPiRawStartDma(OSPiHandle* handle, s32 direction, uintptr_t cartAddr, void* dramAddr, size_t size);
OSMesgQueue* osPiGetCmdQueue(void);
#endif
+21 -21
View File
@@ -203,33 +203,33 @@
#define VI_V_CURRENT_LINE_REG 0x04400010
#define VI_BURST_REG 0x04400014
#define VI_TIMING_REG 0x04400014
#define VI_V_SYNC_REG 0x04400018 //VI vertical sync
#define VI_H_SYNC_REG 0x0440001C //VI horizontal sync
#define VI_LEAP_REG 0x04400020 //VI horizontal sync leap
#define VI_V_SYNC_REG 0x04400018 // VI vertical sync
#define VI_H_SYNC_REG 0x0440001C // VI horizontal sync
#define VI_LEAP_REG 0x04400020 // VI horizontal sync leap
#define VI_H_SYNC_LEAP_REG 0x04400020
#define VI_H_START_REG 0x04400024 //VI horizontal video
#define VI_H_START_REG 0x04400024 // VI horizontal video
#define VI_H_VIDEO_REG 0x04400024
#define VI_V_START_REG 0x04400028 //VI vertical video
#define VI_V_START_REG 0x04400028 // VI vertical video
#define VI_V_VIDEO_REG 0x04400028
#define VI_V_BURST_REG 0x0440002C //VI vertical burst
#define VI_X_SCALE_REG 0x04400030 //VI x-scale
#define VI_Y_SCALE_REG 0x04400034 //VI y-scale
#define VI_V_BURST_REG 0x0440002C // VI vertical burst
#define VI_X_SCALE_REG 0x04400030 // VI x-scale
#define VI_Y_SCALE_REG 0x04400034 // VI y-scale
#define PI_DRAM_ADDR_REG 0x04600000 //PI DRAM address
#define PI_CART_ADDR_REG 0x04600004 //PI pbus (cartridge) address
#define PI_RD_LEN_REG 0x04600008 //PI read length
#define PI_WR_LEN_REG 0x0460000C //PI write length
#define PI_STATUS_REG 0x04600010 //PI status
#define PI_BSD_DOM1_LAT_REG 0x04600014 //PI dom1 latency
#define PI_DRAM_ADDR_REG 0x04600000 // PI DRAM address
#define PI_CART_ADDR_REG 0x04600004 // PI pbus (cartridge) address
#define PI_RD_LEN_REG 0x04600008 // PI read length
#define PI_WR_LEN_REG 0x0460000C // PI write length
#define PI_STATUS_REG 0x04600010 // PI status
#define PI_BSD_DOM1_LAT_REG 0x04600014 // PI dom1 latency
#define PI_DOMAIN1_REG 0x04600014
#define PI_BSD_DOM1_PWD_REG 0x04600018 //PI dom1 pulse width
#define PI_BSD_DOM1_PGS_REG 0x0460001C //PI dom1 page size
#define PI_BSD_DOM1_RLS_REG 0x04600020 //PI dom1 release
#define PI_BSD_DOM2_LAT_REG 0x04600024 //PI dom2 latency
#define PI_BSD_DOM1_PWD_REG 0x04600018 // PI dom1 pulse width
#define PI_BSD_DOM1_PGS_REG 0x0460001C // PI dom1 page size
#define PI_BSD_DOM1_RLS_REG 0x04600020 // PI dom1 release
#define PI_BSD_DOM2_LAT_REG 0x04600024 // PI dom2 latency
#define PI_DOMAIN2_REG 0x04600024
#define PI_BSD_DOM2_PWD_REG 0x04600028 //PI dom2 pulse width
#define PI_BSD_DOM2_PGS_REG 0x0460002C //PI dom2 page size
#define PI_BSD_DOM2_RLS_REG 0x04600030 //PI dom2 release
#define PI_BSD_DOM2_PWD_REG 0x04600028 // PI dom2 pulse width
#define PI_BSD_DOM2_PGS_REG 0x0460002C // PI dom2 page size
#define PI_BSD_DOM2_RLS_REG 0x04600030 // PI dom2 release
#define PI_STATUS_DMA_BUSY (1 << 0)
#define PI_STATUS_IO_BUSY (1 << 1)
+2 -2
View File
@@ -103,7 +103,7 @@ typedef struct FaultMgr {
/* 0x844 */ void* fb;
} FaultMgr; // size = 0x848
extern FaultMgr gFaultMgr;
// TODO: Commented out to try to avoid bss reorder in fault.c
// extern FaultMgr gFaultMgr;
#endif
+3 -35
View File
@@ -40,11 +40,11 @@ void CIC6105_PrintRomInfo(void);
void CIC6105_AddRomInfoFaultPage(void);
void CIC6105_RemoveRomInfoFaultPage(void);
void func_800818F4(void);
void __osSyncVPrintf(const char* fmt, ...);
void osSyncPrintfUnused(const char* fmt, ...);
void rmonPrintf(const char* fmt, ...);
void func_80084940(void);
void func_80084968(void);
void RcpUtils_PrintRegisterStatus(void);
void RcpUtils_Reset(void);
void PadUtils_Init(Input* input);
void func_80085150(void);
@@ -1160,34 +1160,6 @@ void Play_AssignPlayerCsIdsFromScene(GameState* thisx, s32 spawnCsId);
void Play_FillScreen(GameState* thisx, s16 fillScreenOn, u8 red, u8 green, u8 blue, u8 alpha);
void Play_Init(GameState* thisx);
void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg);
void PreRender_Init(PreRender* this);
void PreRender_SetValues(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf);
void PreRender_Destroy(PreRender* this);
void func_8016FDB8(PreRender* this, Gfx** gfxp, void* buf, void* bufSave, u32 arg4);
void func_8016FF70(PreRender* this, Gfx** gfxp, void* buf, void* bufSave);
void func_8016FF90(PreRender* this, Gfx** gfxp, void* buf, void* bufSave, s32 envR, s32 envG, s32 envB, s32 envA);
void func_80170200(PreRender* this, Gfx** gfxp, void* buf, void* bufSave);
void func_8017023C(PreRender* this, Gfx** gfxp, void* buf, void* bufSave);
void func_8017057C(PreRender* this, Gfx** gfxp);
void func_801705B4(PreRender* this, Gfx** gfxp);
void func_801705EC(PreRender* this, Gfx** gfxp);
void func_80170730(PreRender* this, Gfx** gfxp);
void func_80170774(PreRender* this, Gfx** gfxp);
void func_80170798(PreRender* this, Gfx** gfxp);
void func_80170AE0(PreRender* this, Gfx** gfxp, s32 alpha);
void func_80170B28(PreRender* this, Gfx** gfxp);
void PreRender_AntiAliasAlgorithm(PreRender* this, s32 x, s32 y);
void PreRender_ApplyAntiAliasingFilter(PreRender* this);
u32 func_801716C4(u8* arg0, u8* arg1, u8* arg2);
void func_801717F8(PreRender* this);
void PreRender_ApplyFilters(PreRender* this);
void PreRender_ApplyFiltersSlowlyInit(PreRender* this);
void PreRender_ApplyFiltersSlowlyDestroy(PreRender* this);
void func_801720C4(PreRender* this);
void func_801720FC(PreRenderParams* params, Gfx** gfxp);
void Prerender_DrawBackground2D(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 GameAlloc_Log(GameAlloc* this);
void* GameAlloc_Malloc(GameAlloc* this, size_t size);
void GameAlloc_Free(GameAlloc* this, void* data);
@@ -1208,10 +1180,6 @@ void Graph_ThreadEntry(void* arg);
Gfx* Graph_GfxPlusOne(Gfx* gfx);
Gfx* Graph_BranchDlist(Gfx* gfx, Gfx* dst);
void* Graph_DlistAlloc(Gfx** gfx, size_t size);
ListAlloc* ListAlloc_Init(ListAlloc* this);
// void ListAlloc_Alloc(void);
// void ListAlloc_Free(void);
void ListAlloc_FreeAll(ListAlloc* this);
void Sched_SwapFramebuffer(CfbInfo* cfbInfo);
void Sched_RetraceUpdateFramebuffer(SchedContext* sched, CfbInfo* cfbInfo);
+16
View File
@@ -0,0 +1,16 @@
#ifndef LISTALLOC_H
#define LISTALLOC_H
#include "ultra64.h"
typedef struct ListAlloc {
/* 0x0 */ struct ListAlloc* prev;
/* 0x4 */ struct ListAlloc* next;
} ListAlloc; // size = 0x8
ListAlloc* ListAlloc_Init(ListAlloc* this);
void* ListAlloc_Alloc(ListAlloc* this, size_t size);
void ListAlloc_Free(ListAlloc* this, void* data);
void ListAlloc_FreeAll(ListAlloc* this);
#endif
+20
View File
@@ -0,0 +1,20 @@
#ifndef SYS_FLASHROM_H
#define SYS_FLASHROM_H
#include "ultra64.h"
typedef struct {
/* 0x00 */ s32 requestType;
/* 0x04 */ OSMesg response;
/* 0x08 */ void* addr;
/* 0x0C */ s32 pageNum;
/* 0x10 */ s32 pageCount;
/* 0x14 */ OSMesgQueue messageQueue;
} FlashromRequest; // size = 0x2C
#define FLASHROM_REQUEST_WRITE 1
#define FLASHROM_REQUEST_READ 2
#define FLASH_TYPE_MAGIC 0x11118001
#endif
-32
View File
@@ -24,38 +24,6 @@ extern s32 sIrqMgrRetraceCount;
// extern UNK_TYPE4 D_80097524;
// extern u32 sRandInt;
extern char bootThreadName[];
extern char idleThreadName[];
extern char irqmgrThreadName[];
extern char mainThreadName[];
extern f32 D_800981B0;
extern char D_800981C0[];
extern const char dmamgrString800981C4[];
extern const char dmamgrString800981D4[];
extern const char dmamgrString800981E4[];
extern const char dmamgrString800981F4[];
extern const char dmamgrThreadName[];
extern char D_80098210[];
extern char yaz0String80098220[];
extern char yaz0String8009823C[];
extern char D_80098280[];
extern char D_80098290[];
extern char D_800982A4[];
extern char D_800990B0[];
extern f32 D_800990C0[9];
extern f32 D_800990E4;
extern f32 D_800990E8;
extern f32 D_800990EC;
extern f32 D_800990F0;
extern f32 D_800990F4;
extern f32 D_800990F8;
extern f32 D_800990FC;
extern f32 D_80099100;
extern f32 D_80099104;
extern f32 D_80099108;
extern f32 D_8009910C;
extern char gBuildTeam[];
extern char gBuildDate[];
extern char gBuildMakeOption[];
+1 -108
View File
@@ -52,6 +52,7 @@
#include "z64object.h"
#include "z64ocarina.h"
#include "z64player.h"
#include "z64prerender.h"
#include "z64save.h"
#include "z64scene.h"
#include "z64schedule.h"
@@ -63,15 +64,6 @@
#include "z64view.h"
#include "regs.h"
typedef struct {
/* 0x00 */ s32 requestType;
/* 0x04 */ OSMesg response;
/* 0x08 */ void* addr;
/* 0x0C */ s32 pageNum;
/* 0x10 */ s32 pageCount;
/* 0x14 */ OSMesgQueue messageQueue;
} FlashromRequest; // size = 0x2C
typedef struct {
/* 0x000 */ View view;
/* 0x168 */ u8* iconItemSegment;
@@ -231,53 +223,6 @@ typedef struct {
/* 0xFA */ u8 unk_FA[4];
} EnvironmentContext; // size = 0x100
typedef struct ListAlloc {
/* 0x0 */ struct ListAlloc* prev;
/* 0x4 */ struct ListAlloc* next;
} ListAlloc; // size = 0x8
typedef struct {
/* 0x00 */ u16 width;
/* 0x02 */ u16 height;
/* 0x04 */ u16 widthSave;
/* 0x06 */ u16 heightSave;
/* 0x08 */ char unk_8[8];
/* 0x10 */ u16* fbuf;
/* 0x14 */ u16* fbufSave;
/* 0x18 */ u8* cvgSave;
/* 0x1C */ u16* zbuf;
/* 0x20 */ u16* zbufSave;
/* 0x24 */ u16 ulxSave;
/* 0x26 */ u16 ulySave;
/* 0x28 */ u16 lrxSave;
/* 0x2A */ u16 lrySave;
/* 0x2C */ u16 ulx;
/* 0x2E */ u16 uly;
/* 0x30 */ u16 lrx;
/* 0x32 */ u16 lry;
/* 0x34 */ char unk_34[16];
/* 0x44 */ ListAlloc alloc;
/* 0x4C */ u8 unk_4C;
/* 0x4D */ u8 unk_4D;
/* 0x4E */ char unk_4E[2];
} PreRender; // size = 0x50
typedef struct {
/* 0x00 */ void* timg;
/* 0x04 */ void* tlut;
/* 0x08 */ u16 width;
/* 0x0A */ u16 height;
/* 0x0C */ u8 fmt;
/* 0x0D */ u8 siz;
/* 0x0E */ u16 tt;
/* 0x10 */ u16 unk_10;
/* 0x14 */ f32 x;
/* 0x18 */ f32 y;
/* 0x1C */ f32 xScale;
/* 0x20 */ f32 yScale;
/* 0x24 */ u32 flags;
} PreRenderParams; // size = 0x28
struct PlayState;
typedef struct {
@@ -393,56 +338,4 @@ typedef struct {
/* 0x10 */ Color_RGBA8_u32 envColor;
} Struct_80140E80; // size = 0x14
// TODO: Dedicated Header?
#define FRAM_BASE_ADDRESS 0x08000000 // FRAM Base Address in Cart Memory
#define FRAM_STATUS_REGISTER FRAM_BASE_ADDRESS // FRAM Base Address in Cart Memory
#define FRAM_COMMAND_REGISTER 0x10000 // Located at 0x08010000 on the Cart
#define FLASH_VERSION_MX_PROTO_A 0x00C20000
#define FLASH_VERSION_MX_A 0x00C20001
#define FLASH_VERSION_MX_C 0x00C2001E
#define FLASH_VERSION_MX_B_AND_D 0x00C2001D
#define FLASH_VERSION_MEI 0x003200F1
#define FLASH_TYPE_MAGIC 0x11118001
#define FLASH_PAGE_SIZE 128
#define FLASHROM_REQUEST_WRITE 1
#define FLASHROM_REQUEST_READ 2
typedef enum FramCommand {
/* Does nothing for FRAM_COMMAND_SET_MODE_READ_AND_STATUS, FRAM_MODE_NOP, FRAM_COMMAND_SET_MODE_STATUS_AND_STATUS
Initializes fram to 0xFF in FRAM_MODE_ERASE
Writes Contents in FLASHRAM_MODE_WRITE
After execution, sets FRAM_MODE to FRAM_MODE_NOP */
FRAM_COMMAND_EXECUTE = 0xD2000000,
/* flashram->erase_offset = (command & 0xFFFF) * 128; */
FRAM_COMMAND_SET_ERASE_SECTOR_OFFSET = 0x4B000000,
/* flashram->mode = FLASHRAM_MODE_ERASE;
flashram->status = 0x1111800800C20000LL; */
FRAM_COMMAND_SET_MODE_ERASE_AND_STATUS = 0x78000000,
/* flashram->erase_offset = (command & 0xFFFF) * 128;
flashram->status = 0x1111800400C20000LL; */
FRAM_COMMAND_SET_ERASE_SECTOR_OFFSET_AND_STATUS = 0xA5000000,
/* flashram->mode = FLASHRAM_MODE_WRITE; */
FRAM_COMMAND_SET_MODE_WRITE = 0xB4000000,
/* flashram->mode = FLASHRAM_MODE_STATUS;
flashram->status = 0x1111800100C20000LL; */
FRAM_COMMAND_SET_MODE_STATUS_AND_STATUS = 0xE1000000,
/* flashram->mode = FLASHRAM_MODE_READ;
flashram->status = 0x11118004F0000000LL; */
FRAM_COMMAND_SET_MODE_READ_AND_STATUS = 0xF0000000,
/* unk */
FRAM_COMMAND_UNK_ERASE_OPERATION = 0x3C000000
} FramCommand;
typedef enum FramMode {
/* 0 */ FRAM_MODE_NOP,
/* 1 */ FRAM_MODE_ERASE,
/* 2 */ FRAM_MODE_WRITE,
/* 3 */ FRAM_MODE_READ,
/* 4 */ FRAM_MODE_STATUS
} FramMode;
#endif
+1
View File
@@ -2,6 +2,7 @@
#define Z64ACTOR_H
#include "PR/ultratypes.h"
#include "color.h"
#include "padutils.h"
#include "z64math.h"
#include "z64animation.h"
+1
View File
@@ -6,6 +6,7 @@
#include "z64dma.h"
#include "z64math.h"
struct GameState;
struct PlayState;
struct Actor;
struct SkelAnime;
+73
View File
@@ -0,0 +1,73 @@
#ifndef Z64_PRERENDER_H
#define Z64_PRERENDER_H
#include "ultra64.h"
#include "listalloc.h"
#include "unk.h"
#define BG2D_FLAGS_1 (1 << 0)
#define BG2D_FLAGS_2 (1 << 1)
#define BG2D_FLAGS_AC_THRESHOLD (1 << 2)
#define BG2D_FLAGS_LOAD_S2DEX2 (1 << 3)
#define BG2D_FLAGS_COPY (1 << 4)
typedef enum PrerenderFilterState {
/* 0 */ PRERENDER_FILTER_STATE_NONE,
/* 1 */ PRERENDER_FILTER_STATE_PROCESS,
/* 2 */ PRERENDER_FILTER_STATE_DONE
} PrerenderFilterState;
typedef struct PreRender {
/* 0x00 */ u16 width;
/* 0x02 */ u16 height;
/* 0x04 */ u16 widthSave;
/* 0x06 */ u16 heightSave;
/* 0x08 */ UNK_TYPE1 unk_08[0x8];
/* 0x10 */ u16* fbuf;
/* 0x14 */ u16* fbufSave;
/* 0x18 */ u8* cvgSave;
/* 0x1C */ u16* zbuf;
/* 0x20 */ u16* zbufSave;
/* 0x24 */ u16 ulxSave;
/* 0x26 */ u16 ulySave;
/* 0x28 */ u16 lrxSave;
/* 0x2A */ u16 lrySave;
/* 0x2C */ u16 ulx;
/* 0x2E */ u16 uly;
/* 0x30 */ u16 lrx;
/* 0x32 */ u16 lry;
/* 0x34 */ UNK_TYPE1 unk_34[0x10];
/* 0x44 */ ListAlloc alloc;
/* 0x4C */ u8 unk_4C;
/* 0x4D */ u8 filterState; // See `PrerenderFilterState`
} PreRender; // size = 0x50
void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg);
void PreRender_Init(PreRender* this);
void PreRender_SetValues(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf);
void PreRender_Destroy(PreRender* this);
void PreRender_CopyImage(PreRender* this, Gfx** gfxp, void* img, void* imgDst, u32 useThresholdAlphaCompare);
void PreRender_RestoreBuffer(PreRender* this, Gfx** gfxp, void* buf, void* bufSave);
void func_8016FF90(PreRender* this, Gfx** gfxp, void* buf, void* bufSave, s32 envR, s32 envG, s32 envB, s32 envA);
void func_80170200(PreRender* this, Gfx** gfxp, void* buf, void* bufSave);
void PreRender_CoverageRgba16ToI8(PreRender* this, Gfx** gfxp, void* img, void* cvgDst);
void PreRender_SaveZBuffer(PreRender* this, Gfx** gfxp);
void PreRender_SaveFramebuffer(PreRender* this, Gfx** gfxp);
void PreRender_FetchFbufCoverage(PreRender* this, Gfx** gfxp);
void PreRender_DrawCoverage(PreRender* this, Gfx** gfxp);
void PreRender_RestoreZBuffer(PreRender* this, Gfx** gfxp);
void func_80170798(PreRender* this, Gfx** gfxp);
void func_80170AE0(PreRender* this, Gfx** gfxp, s32 alpha);
void PreRender_RestoreFramebuffer(PreRender* this, Gfx** gfxp);
void PreRender_AntiAliasFilterPixel(PreRender* this, s32 x, s32 y);
void PreRender_AntiAliasFilter(PreRender* this);
u32 PreRender_Get5bMedian9(u8* px1, u8* px2, u8* px3);
void PreRender_DivotFilter(PreRender* this);
void PreRender_ApplyFilters(PreRender* this);
void PreRender_ApplyFiltersSlowlyInit(PreRender* this);
void PreRender_ApplyFiltersSlowlyDestroy(PreRender* this);
void func_801720C4(PreRender* this);
void Prerender_DrawBackground2D(Gfx** gfxp, void* timg, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 tt, u16 tlutCount, f32 x, f32 y, f32 xScale, f32 yScale, u32 flags);
#endif
+34 -38
View File
@@ -13,38 +13,38 @@ endseg
beginseg
name "boot"
address 0x80080060
include "build/src/boot_O2_g3/boot_main.o"
include "build/src/boot/boot_main.o"
include "build/data/boot/rspboot.data.o"
include "build/src/boot_O2_g3/idle.o"
include "build/src/boot_O2_g3/viconfig.o"
include "build/src/boot/idle.o"
include "build/src/boot/viconfig.o"
include "build/data/boot/viconfig.data.o"
include "build/src/boot_O2_g3/z_std_dma.o"
include "build/src/boot_O2_g3/yaz0.o"
include "build/src/boot_O2_g3/irqmgr.o"
include "build/src/boot_O2_g3/CIC6105.o"
include "build/src/boot_O2_g3/syncprintf.o"
include "build/src/boot_O2_g3/fault.o"
include "build/src/boot_O2_g3/fault_drawer.o"
include "build/src/boot_O2/boot_80084940.o"
include "build/src/boot_O2/loadfragment.o"
include "build/src/boot_O2/loadfragment2.o"
include "build/src/boot_O2/padutils.o"
include "build/src/boot_O2/stackcheck.o"
include "build/src/boot_O2/gfxprint.o"
include "build/src/boot/z_std_dma.o"
include "build/src/boot/yaz0.o"
include "build/src/boot/irqmgr.o"
include "build/src/boot/CIC6105.o"
include "build/src/boot/syncprintf.o"
include "build/src/boot/fault.o"
include "build/src/boot/fault_drawer.o"
include "build/src/boot/O2/rcp_utils.o"
include "build/src/boot/O2/loadfragment.o"
include "build/src/boot/O2/loadfragment2.o"
include "build/src/boot/O2/padutils.o"
include "build/src/boot/O2/stackcheck.o"
include "build/src/boot/O2/gfxprint.o"
include "build/data/boot/gfxprint.data.o"
include "build/src/boot_O2/mtxuty-cvt.o"
include "build/src/boot_O2/debug.o"
include "build/src/boot_O2/system_heap.o"
include "build/src/boot_O2/padsetup.o"
include "build/src/boot_O2/boot_80086760.o"
include "build/src/boot/O2/mtxuty-cvt.o"
include "build/src/boot/O2/debug.o"
include "build/src/boot/O2/system_heap.o"
include "build/src/boot/O2/padsetup.o"
include "build/src/boot/O2/math64.o"
include "build/asm/boot/fp.text.o"
include "build/data/boot/fp.data.o"
include "build/src/boot_O2/system_malloc.o"
include "build/src/boot_O2/rand.o"
include "build/src/boot_O2/__osMalloc.o"
include "build/src/boot/O2/system_malloc.o"
include "build/src/boot/O2/rand.o"
include "build/src/boot/O2/__osMalloc.o"
include "build/src/libultra/libc/sprintf.o"
include "build/src/boot_O2/printutils.o"
include "build/src/boot_O2/sleep.o"
include "build/src/boot/O2/printutils.o"
include "build/src/boot/O2/sleep.o"
include "build/asm/boot/setcause.text.o"
include "build/src/libultra/os/sendmesg.o"
include "build/src/libultra/io/pfsfreeblocks.o"
@@ -232,12 +232,12 @@ beginseg
include "build/src/libultra/os/sethwinterrupt.o"
include "build/asm/boot/getwatchlo.text.o"
include "build/asm/boot/setwatchlo.text.o"
include "build/src/boot_O2/fmodf.o"
include "build/src/boot_O2/__osMemset.o"
include "build/src/boot_O2/__osStrcmp.o"
include "build/src/boot_O2/__osStrcpy.o"
include "build/src/boot_O2/__osMemcpy.o"
include "build/src/boot_O2_g3/build.o"
include "build/src/boot/O2/fmodf.o"
include "build/src/boot/O2/__osMemset.o"
include "build/src/boot/O2/__osStrcmp.o"
include "build/src/boot/O2/__osStrcpy.o"
include "build/src/boot/O2/__osMemcpy.o"
include "build/src/boot/build.o"
endseg
beginseg
@@ -547,7 +547,6 @@ beginseg
include "build/src/code/z_play.o"
include "build/src/code/z_play_hireso.o"
include "build/src/code/PreRender.o"
include "build/data/code/PreRender.bss.o"
include "build/src/code/TwoHeadGfxArena.o"
include "build/src/code/TwoHeadArena.o"
include "build/src/code/audio_stop_all_sfx.o"
@@ -3098,8 +3097,7 @@ beginseg
name "ovl_Obj_Tokei_Tobira"
compress
include "build/src/overlays/actors/ovl_Obj_Tokei_Tobira/z_obj_tokei_tobira.o"
include "build/data/ovl_Obj_Tokei_Tobira/ovl_Obj_Tokei_Tobira.data.o"
include "build/data/ovl_Obj_Tokei_Tobira/ovl_Obj_Tokei_Tobira.reloc.o"
include "build/src/overlays/actors/ovl_Obj_Tokei_Tobira/ovl_Obj_Tokei_Tobira_reloc.o"
endseg
beginseg
@@ -4851,9 +4849,7 @@ beginseg
name "ovl_En_Invadepoh_Demo"
compress
include "build/src/overlays/actors/ovl_En_Invadepoh_Demo/z_en_invadepoh_demo.o"
include "build/data/ovl_En_Invadepoh_Demo/ovl_En_Invadepoh_Demo.data.o"
include "build/data/ovl_En_Invadepoh_Demo/ovl_En_Invadepoh_Demo.bss.o"
include "build/data/ovl_En_Invadepoh_Demo/ovl_En_Invadepoh_Demo.reloc.o"
include "build/src/overlays/actors/ovl_En_Invadepoh_Demo/ovl_En_Invadepoh_Demo_reloc.o"
endseg
beginseg
+23
View File
@@ -0,0 +1,23 @@
#include "ultra64.h"
void RcpUtils_PrintRegisterStatus(void) {
u32 spStatus = __osSpGetStatus();
u32 dpStatus = osDpGetStatus();
if (spStatus) {
// stubbed debug prints
}
if (dpStatus) {
// stubbed debug prints
}
}
void RcpUtils_Reset(void) {
RcpUtils_PrintRegisterStatus();
// Flush the RDP pipeline and freeze clock counter
osDpSetStatus(DPC_SET_FREEZE | DPC_SET_FLUSH);
// Halt the RSP, disable interrupt on break and set "task done" signal
__osSpSetStatus(SP_SET_HALT | SP_SET_TASKDONE | SP_CLR_INTR_BREAK);
RcpUtils_PrintRegisterStatus();
}
@@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "irqmgr.h"
#include "main.h"
#include "stack.h"
@@ -1,7 +1,6 @@
#include "global.h"
// This isn't a vprintf since it doesn't take a va_list
void __osSyncVPrintf(const char* fmt, ...) {
void osSyncPrintfUnused(const char* fmt, ...) {
}
void osSyncPrintf(const char* fmt, ...) {
-15
View File
@@ -1,15 +0,0 @@
#include "global.h"
void func_80084940(void) {
u32 spStatus = __osSpGetStatus();
u32 dpStatus = osDpGetStatus();
if (spStatus && dpStatus) {} // stubbed debug prints
}
void func_80084968(void) {
func_80084940();
osDpSetStatus(0x28);
__osSpSetStatus(0x4082);
func_80084940();
}
+544 -162
View File
@@ -1,4 +1,18 @@
/**
* @file PreRender.c
*
* This file implements various routines important to framebuffer effects, such as RDP accelerated color and depth
* buffer copies and coverage drawing. Also contains software implementations of the Video Interface anti-aliasing and
* divot filters.
*/
#include "z64prerender.h"
#include "global.h"
#include "PR/gs2dex.h"
#include "libc/alloca.h"
#include "libc/stdbool.h"
#include "color.h"
#include "macros.h"
#include "slowly.h"
#include "stack.h"
#include "stackcheck.h"
@@ -41,20 +55,20 @@ void PreRender_Destroy(PreRender* this) {
ListAlloc_FreeAll(&this->alloc);
}
void func_8016FDB8(PreRender* this, Gfx** gfxp, void* buf, void* bufSave, u32 arg4) {
void PreRender_CopyImage(PreRender* this, Gfx** gfxp, void* img, void* imgDst, u32 useThresholdAlphaCompare) {
Gfx* gfx = *gfxp;
u32 flags;
gDPPipeSync(gfx++);
gDPSetColorImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width, bufSave);
gDPSetColorImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width, imgDst);
gDPSetScissor(gfx++, G_SC_NON_INTERLACE, 0, 0, this->width, this->height);
flags = 0x18;
if (arg4 == true) {
flags = 0x1C;
flags = BG2D_FLAGS_LOAD_S2DEX2 | BG2D_FLAGS_COPY;
if (useThresholdAlphaCompare == true) {
flags |= BG2D_FLAGS_AC_THRESHOLD;
}
Prerender_DrawBackground2D(&gfx, buf, NULL, this->width, this->height, G_IM_FMT_RGBA, G_IM_SIZ_16b, G_TT_NONE, 0,
Prerender_DrawBackground2D(&gfx, img, NULL, this->width, this->height, G_IM_FMT_RGBA, G_IM_SIZ_16b, G_TT_NONE, 0,
0.0f, 0.0f, 1.0f, 1.0f, flags);
gDPPipeSync(gfx++);
gDPSetColorImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width, this->fbuf);
@@ -62,8 +76,8 @@ void func_8016FDB8(PreRender* this, Gfx** gfxp, void* buf, void* bufSave, u32 ar
*gfxp = gfx;
}
void func_8016FF70(PreRender* this, Gfx** gfxp, void* buf, void* bufSave) {
func_8016FDB8(this, gfxp, buf, bufSave, false);
void PreRender_RestoreBuffer(PreRender* this, Gfx** gfxp, void* buf, void* bufSave) {
PreRender_CopyImage(this, gfxp, buf, bufSave, false);
}
void func_8016FF90(PreRender* this, Gfx** gfxp, void* buf, void* bufSave, s32 envR, s32 envG, s32 envB, s32 envA) {
@@ -91,7 +105,7 @@ void func_8016FF90(PreRender* this, Gfx** gfxp, void* buf, void* bufSave, s32 en
gDPSetScissor(gfx++, G_SC_NON_INTERLACE, 0, 0, this->width, this->height);
Prerender_DrawBackground2D(&gfx, buf, 0, this->width, this->height, G_IM_FMT_RGBA, G_IM_SIZ_16b, G_TT_NONE, 0, 0.0f,
0.0f, 1.0f, 1.0f, 0xB);
0.0f, 1.0f, 1.0f, BG2D_FLAGS_1 | BG2D_FLAGS_2 | BG2D_FLAGS_LOAD_S2DEX2);
gDPPipeSync(gfx++);
gDPSetColorImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width, this->fbuf);
@@ -102,103 +116,174 @@ void func_80170200(PreRender* this, Gfx** gfxp, void* buf, void* bufSave) {
func_8016FF90(this, gfxp, buf, bufSave, 255, 255, 255, 255);
}
#ifdef NON_MATCHING
// just regalloc
void func_8017023C(PreRender* this, Gfx** gfxp, void* buf, void* bufSave) {
/**
* Reads the coverage values stored in the RGBA16 format `img` with dimensions `this->width`, `this->height` and
* converts it to an 8-bpp intensity image.
*
* @param gfxp Display list pointer
* @param img Image to read coverage from
* @param cvgDst Buffer to store coverage into
*/
void PreRender_CoverageRgba16ToI8(PreRender* this, Gfx** gfxp, void* img, void* cvgDst) {
Gfx* gfx = *gfxp;
s32 x;
s32 x2;
s32 dx;
s32 rowsRemaining;
s32 curRow;
s32 nRows;
gDPPipeSync(gfx++);
gDPSetOtherMode(gfx++,
G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_NONE | G_TL_TILE |
G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
G_AC_NONE | G_ZS_PRIM | G_RM_PASS | G_RM_OPA_CI2);
// Set the combiner to draw the texture as-is, discarding alpha channel
gDPSetCombineLERP(gfx++, 0, 0, 0, TEXEL0, 0, 0, 0, 0, 0, 0, 0, TEXEL0, 0, 0, 0, 0);
gDPSetColorImage(gfx++, G_IM_FMT_I, G_IM_SIZ_8b, this->width, bufSave);
// Set the destination color image to the provided address
gDPSetColorImage(gfx++, G_IM_FMT_I, G_IM_SIZ_8b, this->width, cvgDst);
// Set up a scissor based on the source image
gDPSetScissor(gfx++, G_SC_NON_INTERLACE, 0, 0, this->width, this->height);
dx = 0x1000 / (this->width * 2);
x = this->height;
x2 = 0;
// Calculate the max number of rows that can fit into TMEM at once
nRows = TMEM_SIZE / (this->width * G_IM_SIZ_16b_BYTES);
while (x > 0) {
// Set up the number of remaining rows
rowsRemaining = this->height;
curRow = 0;
while (rowsRemaining > 0) {
s32 uls = 0;
s32 lrs = this->width - 1;
s32 ult;
s32 lrt;
dx = CLAMP_MAX(dx, x);
ult = x2;
lrt = x2 + dx - 1;
// Make sure that we don't load past the end of the source image
if (nRows > rowsRemaining) {
nRows = rowsRemaining;
}
gDPLoadTextureTile(gfx++, buf, G_IM_FMT_IA, G_IM_SIZ_16b, this->width, this->height, uls, ult, lrs, lrt, 0,
// Determine the upper and lower bounds of the rect to draw
ult = curRow;
lrt = curRow + nRows - 1;
// Load a horizontal strip of the source image in IA16 format. Since the source image is stored in memory as
// RGBA16, the bits are reinterpreted into IA16:
//
// r g b a
// 11111 111 11 11111 1
// i a
// 11111 111 11 11111 1
//
// I = (r << 3) | (g >> 2)
// A = (g << 6) | (b << 1) | a
//
// Since it is expected that r = g = b = cvg in the source image, this results in
// I = (cvg << 3) | (cvg >> 2)
// This expands the 5-bit coverage into an 8-bit value
gDPLoadTextureTile(gfx++, img, G_IM_FMT_IA, G_IM_SIZ_16b, this->width, this->height, uls, ult, lrs, lrt, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
G_TX_NOLOD);
// Draw that horizontal strip to the destination image. With the combiner and blender configuration set above,
// the intensity (I) channel of the loaded IA16 texture will be written as-is to the I8 color image, each pixel
// in the final image is
// I = (cvg << 3) | (cvg >> 2)
gSPTextureRectangle(gfx++, uls << 2, ult << 2, (lrs + 1) << 2, (lrt + 1) << 2, G_TX_RENDERTILE, uls << 5,
ult << 5, 1 << 10, 1 << 10);
x2 += dx;
x -= dx;
// Update the number of rows remaining and index of the row being drawn
curRow += nRows;
rowsRemaining -= nRows;
}
// Reset the color image to the current framebuffer
gDPPipeSync(gfx++);
gDPSetColorImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width, this->fbuf);
*gfxp = gfx;
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/PreRender/func_8017023C.s")
#endif
void func_8017057C(PreRender* this, Gfx** gfxp) {
/**
* Saves zbuf to zbufSave
*/
void PreRender_SaveZBuffer(PreRender* this, Gfx** gfxp) {
if ((this->zbufSave != NULL) && (this->zbuf != NULL)) {
func_8016FF70(this, gfxp, this->zbuf, this->zbufSave);
PreRender_RestoreBuffer(this, gfxp, this->zbuf, this->zbufSave);
}
}
void func_801705B4(PreRender* this, Gfx** gfxp) {
/**
* Saves fbuf to fbufSave
*/
void PreRender_SaveFramebuffer(PreRender* this, Gfx** gfxp) {
if ((this->fbufSave != NULL) && (this->fbuf != NULL)) {
func_80170200(this, gfxp, this->fbuf, this->fbufSave);
}
}
void func_801705EC(PreRender* this, Gfx** gfxp) {
/**
* Fetches the coverage of the current framebuffer into an image of the same format as the current color image, storing
* it over the framebuffer in memory.
*/
void PreRender_FetchFbufCoverage(PreRender* this, Gfx** gfxp) {
Gfx* gfx = *gfxp;
gDPPipeSync(gfx++);
// Set the blend color to full white and set maximum depth
gDPSetBlendColor(gfx++, 255, 255, 255, 8);
gDPSetPrimDepth(gfx++, -1, -1);
gDPSetPrimDepth(gfx++, 0xFFFF, 0xFFFF);
// Uses G_RM_VISCVG to blit the coverage values to the framebuffer
//
// G_RM_VISCVG is the following special render mode:
// IM_RD : Allow read-modify-write operations on the framebuffer
// FORCE_BL : Apply the blender to all pixels rather than just edges, skip the division step of the blend formula
// (G_BL_CLR_IN * G_BL_0 + G_BL_CLR_BL * G_BL_A_MEM) = G_BL_CLR_BL * G_BL_A_MEM
//
// G_BL_A_MEM ("memory alpha") is coverage, therefore this blender configuration emits only the coverage (up to a
// constant factor determined by blend color) and discards any pixel colors. For an RGBA16 framebuffer, each of the
// three color channels r,g,b will receive the coverage value individually.
//
// Also disables other modes such as alpha compare and texture perspective correction
gDPSetOtherMode(gfx++,
G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_NONE | G_TL_TILE |
G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
G_AC_NONE | G_ZS_PRIM | G_RM_VISCVG | G_RM_VISCVG2);
// Set up a scissor with the same dimensions as the framebuffer
gDPSetScissor(gfx++, G_SC_NON_INTERLACE, 0, 0, this->width, this->height);
// Fill rectangle to obtain the coverage values as an RGBA16 image
gDPFillRectangle(gfx++, 0, 0, this->width, this->height);
gDPPipeSync(gfx++);
*gfxp = gfx;
}
void func_80170730(PreRender* this, Gfx** gfxp) {
func_801705EC(this, gfxp);
/**
* Draws the coverage of the current framebuffer `this->fbuf` to an I8 image at `this->cvgSave`. Overwrites
* `this->fbuf` in the process.
*/
void PreRender_DrawCoverage(PreRender* this, Gfx** gfxp) {
PreRender_FetchFbufCoverage(this, gfxp);
if (this->cvgSave != NULL) {
func_8017023C(this, gfxp, this->fbuf, this->cvgSave);
PreRender_CoverageRgba16ToI8(this, gfxp, this->fbuf, this->cvgSave);
}
}
void func_80170774(PreRender* this, Gfx** gfxp) {
func_8016FF70(this, gfxp, this->zbufSave, this->zbuf);
/**
* Restores zbufSave to zbuf
*/
void PreRender_RestoreZBuffer(PreRender* this, Gfx** gfxp) {
PreRender_RestoreBuffer(this, gfxp, this->zbufSave, this->zbuf);
}
/**
* Draws a full-screen image to the current framebuffer, that sources the rgb channel from `this->fbufSave` and
* the alpha channel from `this->cvgSave` modulated by environment color.
*/
void func_80170798(PreRender* this, Gfx** gfxp) {
Gfx* gfx;
s32 y;
s32 y2;
s32 dy;
s32 rowsRemaining;
s32 curRow;
s32 nRows;
s32 rtile = 1;
if (this->cvgSave != NULL) {
@@ -206,43 +291,55 @@ void func_80170798(PreRender* this, Gfx** gfxp) {
gDPPipeSync(gfx++);
gDPSetEnvColor(gfx++, 255, 255, 255, 32);
// Effectively disable blending in both cycles. It's 2-cycle so that TEXEL1 can be used to point to a different
// texture tile.
gDPSetOtherMode(gfx++,
G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_NONE | G_TL_TILE |
G_TD_CLAMP | G_TP_NONE | G_CYC_2CYCLE | G_PM_NPRIMITIVE,
G_AC_NONE | G_ZS_PRIM | AA_EN | CVG_DST_CLAMP | ZMODE_OPA | CVG_X_ALPHA |
GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1) |
GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1));
// Set up the color combiner: first cycle: TEXEL0, TEXEL1 + ENVIRONMENT; second cycle: G_CC_PASS2
gDPSetCombineLERP(gfx++, 0, 0, 0, TEXEL0, 1, 0, TEXEL1, ENVIRONMENT, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED);
dy = (this->width > 320) ? 2 : 4;
y = this->height;
y2 = 0;
nRows = (this->width > SCREEN_WIDTH) ? 2 : 4;
while (y > 0) {
rowsRemaining = this->height;
curRow = 0;
while (rowsRemaining > 0) {
s32 uls = 0;
s32 lrs = this->width - 1;
s32 ult;
s32 lrt;
dy = CLAMP_MAX(dy, y);
// Make sure that we don't load past the end of the source image
if (nRows > rowsRemaining) {
nRows = rowsRemaining;
}
ult = y2;
lrt = (y2 + dy - 1);
// Determine the upper and lower bounds of the rect to draw
ult = curRow;
lrt = curRow + nRows - 1;
// Load the frame buffer line
gDPLoadMultiTile(gfx++, this->fbufSave, 0x0000, G_TX_RENDERTILE, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width,
this->height, uls, ult, lrs, lrt, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
// Load the coverage line
gDPLoadMultiTile(gfx++, this->cvgSave, 0x0160, rtile, G_IM_FMT_I, G_IM_SIZ_8b, this->width, this->height,
uls, ult, lrs, lrt, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
//! FAKE
if (1) {}
if (1) {}
// Draw a texture for which the rgb channels come from the framebuffer and the alpha channel comes from
// coverage, modulated by env color
gSPTextureRectangle(gfx++, uls << 2, ult << 2, (lrs + 1) << 2, (lrt + 1) << 2, G_TX_RENDERTILE, uls << 5,
ult << 5, 1 << 10, 1 << 10);
y2 += dy;
y -= dy;
curRow += nRows;
rowsRemaining -= nRows;
}
gDPPipeSync(gfx++);
@@ -254,134 +351,186 @@ void func_80170AE0(PreRender* this, Gfx** gfxp, s32 alpha) {
func_8016FF90(this, gfxp, this->fbufSave, this->fbuf, 255, 255, 255, alpha);
}
void func_80170B28(PreRender* this, Gfx** gfxp) {
func_8016FF70(this, gfxp, this->fbufSave, this->fbuf);
/**
* Copies fbufSave to fbuf
*/
void PreRender_RestoreFramebuffer(PreRender* this, Gfx** gfxp) {
PreRender_RestoreBuffer(this, gfxp, this->fbufSave, this->fbuf);
}
/**
* Applies an anti-alias filter where the middle pixel (index 7) correspond to (x, y) in this 3x5 rectangle
* _ _ _ _ _
* | 0 1 2 3 4 |
* | 5 6 7 8 9 |
* | A B C D E |
*
* Applies the Video Interface anti-aliasing of silhouette edges to an image.
*
* This filter performs a linear interpolation on partially covered pixels between the current pixel color (called
* foreground color) and a "background" pixel color obtained by sampling fully covered pixels at the six highlighted
* points in the following 5x3 neighborhood:
* _ _ _ _ _
* | o o |
* | o X o |
* | o o |
*
* Whether a pixel is partially covered is determined by reading the coverage values associated with the image.
* Coverage is a measure of how many subpixels the last drawn primitive covered. A fully covered pixel is one with a
* full coverage value, the entire pixel was covered by the primitive.
* The background color is calculated as the average of the "penultimate" minimum and maximum colors in the 5x3
* neighborhood.
*
* The final color is calculated by interpolating the foreground and background color weighted by the coverage:
* OutputColor = cvg * ForeGround + (1.0 - cvg) * BackGround
*
* This is a software implementation of the same algorithm used in the Video Interface hardware when Anti-Aliasing is
* enabled in the VI Control Register.
*
* Patent describing the algorithm:
*
* Gossett, C. P., & van Hook, T. J. (Filed 1995, Published 1998)
* Antialiasing of silhouette edges (USOO5742277A)
* U.S. Patent and Trademark Office
* Expired 2015-10-06
* https://patents.google.com/patent/US5742277A/en
*
* @param this PreRender instance
* @param x Center pixel x
* @param y Center pixel y
*/
void PreRender_AntiAliasAlgorithm(PreRender* this, s32 x, s32 y) {
void PreRender_AntiAliasFilterPixel(PreRender* this, s32 x, s32 y) {
s32 i;
s32 j;
s32 buffA[3 * 5];
s32 buffCvg[3 * 5];
s32 buffR[3 * 5];
s32 buffG[3 * 5];
s32 buffB[3 * 5];
s32 x1;
s32 y1;
s32 pad;
s32 pxR;
s32 pxG;
s32 pxB;
s32 pxR2;
s32 pxG2;
s32 pxB2;
s32 xi;
s32 yi;
s32 temp;
s32 pmaxR;
s32 pmaxG;
s32 pmaxB;
s32 pminR;
s32 pminG;
s32 pminB;
Color_RGBA16 pxIn;
Color_RGBA16 pxOut;
u32 pxR3;
u32 pxG3;
u32 pxB3;
u32 outR;
u32 outG;
u32 outB;
for (i = 0; i < 3 * 5; i++) {
x1 = (i % 5) + x - 2;
y1 = (i / 5) + y - 1;
// Extract pixels in the 5x3 neighborhood
for (i = 0; i < 5 * 3; i++) {
xi = x + (i % 5) - 2;
yi = y + (i / 5) - 1;
if (x1 < 0) {
x1 = 0;
} else if (x1 > (this->width - 1)) {
x1 = this->width - 1;
// Clamp coordinates to the edges of the image
if (xi < 0) {
xi = 0;
} else if (xi > (this->width - 1)) {
xi = this->width - 1;
}
if (y1 < 0) {
y1 = 0;
} else if (y1 > (this->height - 1)) {
y1 = this->height - 1;
if (yi < 0) {
yi = 0;
} else if (yi > (this->height - 1)) {
yi = this->height - 1;
}
pxIn.rgba = this->fbufSave[x1 + y1 * this->width];
// Extract color channels for each pixel, convert 5-bit color channels to 8-bit
pxIn.rgba = this->fbufSave[xi + yi * this->width];
buffR[i] = (pxIn.r << 3) | (pxIn.r >> 2);
buffG[i] = (pxIn.g << 3) | (pxIn.g >> 2);
buffB[i] = (pxIn.b << 3) | (pxIn.b >> 2);
buffA[i] = this->cvgSave[x1 + y1 * this->width] >> 5;
buffCvg[i] = this->cvgSave[xi + yi * this->width] >> 5;
}
pxR = pxR2 = buffR[7];
pxG = pxG2 = buffG[7];
pxB = pxB2 = buffB[7];
pmaxR = pminR = buffR[7];
pmaxG = pminG = buffG[7];
pmaxB = pminB = buffB[7];
for (i = 1; i < 3 * 5; i += 2) {
if (buffA[i] == 7) {
if (pxR < buffR[i]) {
for (j = 1; j < 15; j += 2) {
if ((i != j) && (buffR[j] >= buffR[i]) && (buffA[j] == 7)) {
pxR = buffR[i];
// For each neighbor
for (i = 1; i < 5 * 3; i += 2) {
// Only sample fully covered pixels
if (buffCvg[i] == 7) {
// Determine "Penultimate Maximum" Value
// If current maximum is less than this neighbor
if (pmaxR < buffR[i]) {
// For each neighbor (again)
for (j = 1; j < 5 * 3; j += 2) {
// If not the neighbor we were at before, and this neighbor has a larger value and this pixel is
// fully covered, that means the neighbor at `i` is the "penultimate maximum"
if ((i != j) && (buffR[j] >= buffR[i]) && (buffCvg[j] == 7)) {
pmaxR = buffR[i];
}
}
}
if (pxG < buffG[i]) {
for (j = 1; j < 15; j += 2) {
if ((i != j) && (buffG[j] >= buffG[i]) && (buffA[j] == 7)) {
pxG = buffG[i];
if (pmaxG < buffG[i]) {
for (j = 1; j < 5 * 3; j += 2) {
if ((i != j) && (buffG[j] >= buffG[i]) && (buffCvg[j] == 7)) {
pmaxG = buffG[i];
}
}
}
if (pxB < buffB[i]) {
for (j = 1; j < 15; j += 2) {
if ((i != j) && (buffB[j] >= buffB[i]) && (buffA[j] == 7)) {
pxB = buffB[i];
if (pmaxB < buffB[i]) {
for (j = 1; j < 5 * 3; j += 2) {
if ((i != j) && (buffB[j] >= buffB[i]) && (buffCvg[j] == 7)) {
pmaxB = buffB[i];
}
}
}
if (1) {}
if (pxR2 > buffR[i]) {
for (j = 1; j < 15; j += 2) {
if ((i != j) && (buffR[j] <= buffR[i]) && (buffA[j] == 7)) {
pxR2 = buffR[i];
// Determine "Penultimate Minimum" Value
// Same as above with inverted conditions
if (pminR > buffR[i]) {
for (j = 1; j < 5 * 3; j += 2) {
if ((i != j) && (buffR[j] <= buffR[i]) && (buffCvg[j] == 7)) {
pminR = buffR[i];
}
}
}
if (pxG2 > buffG[i]) {
for (j = 1; j < 15; j += 2) {
if ((i != j) && (buffG[j] <= buffG[i]) && (buffA[j] == 7)) {
pxG2 = buffG[i];
if (pminG > buffG[i]) {
for (j = 1; j < 5 * 3; j += 2) {
if ((i != j) && (buffG[j] <= buffG[i]) && (buffCvg[j] == 7)) {
pminG = buffG[i];
}
}
}
if (pxB2 > buffB[i]) {
for (j = 1; j < 15; j += 2) {
if ((i != j) && (buffB[j] <= buffB[i]) && (buffA[j] == 7)) {
pxB2 = buffB[i];
if (pminB > buffB[i]) {
for (j = 1; j < 5 * 3; j += 2) {
if ((i != j) && (buffB[j] <= buffB[i]) && (buffCvg[j] == 7)) {
pminB = buffB[i];
}
}
}
}
}
pad = 7 - buffA[7];
pxR3 = buffR[7] + (((s32)((pad * ((pxR + pxR2) - (buffR[7] << 1))) + 4)) >> 3);
pxG3 = buffG[7] + (((s32)((pad * ((pxG + pxG2) - (buffG[7] << 1))) + 4)) >> 3);
pxB3 = buffB[7] + (((s32)((pad * ((pxB + pxB2) - (buffB[7] << 1))) + 4)) >> 3);
// The background color is determined by averaging the penultimate minimum and maximum pixels, and subtracting the
// Foreground color:
// BackGround = (pMax + pMin) - (ForeGround) * 2
pxOut.r = pxR3 >> 3;
pxOut.g = pxG3 >> 3;
pxOut.b = pxB3 >> 3;
// OutputColor = cvg * ForeGround + (1.0 - cvg) * BackGround
temp = 7 - buffCvg[7];
outR = buffR[7] + ((s32)(temp * (pmaxR + pminR - (buffR[7] * 2)) + 4) >> 3);
outG = buffG[7] + ((s32)(temp * (pmaxG + pminG - (buffG[7] * 2)) + 4) >> 3);
outB = buffB[7] + ((s32)(temp * (pmaxB + pminB - (buffB[7] * 2)) + 4) >> 3);
pxOut.r = outR >> 3;
pxOut.g = outG >> 3;
pxOut.b = outB >> 3;
pxOut.a = 1;
this->fbufSave[x + y * this->width] = pxOut.rgba;
}
/**
* Applies an anti-alias filter to the current prerender
* Applies the Video Interface anti-aliasing filter to `this->fbufSave` using `this->cvgSave`
*/
void PreRender_ApplyAntiAliasingFilter(PreRender* this) {
void PreRender_AntiAliasFilter(PreRender* this) {
s32 x;
s32 y;
s32 cvg;
// Apply AA filter
for (y = 0; y < this->height; y++) {
for (x = 0; x < this->width; x++) {
cvg = this->cvgSave[x + y * this->width];
@@ -389,49 +538,187 @@ void PreRender_ApplyAntiAliasingFilter(PreRender* this) {
cvg++;
if (cvg != 8) {
PreRender_AntiAliasAlgorithm(this, x, y);
// If this pixel has only partial coverage, perform the Video Filter interpolation on it
PreRender_AntiAliasFilterPixel(this, x, y);
}
}
}
}
#pragma GLOBAL_ASM("asm/non_matchings/code/PreRender/func_801716C4.s")
/**
* Selects the median value from 9 different 5-bit pixels:
* px1[0], px1[1], px1[2], px2[0], px2[1], px2[2], px3[0], px3[1], px3[2]
* all args are expected to be an array of 3 different 5-bit values
*/
u32 PreRender_Get5bMedian9(u8* px1, u8* px2, u8* px3) {
u8 pxValCount[32]; // Stores the count for each of the possible 32 5-bit pixel values
u32 pxCount; // Pixel count
s32 pxMed; // Pixel median value
#pragma GLOBAL_ASM("asm/non_matchings/code/PreRender/func_801717F8.s")
// Initialize count to 0 in groups of 4 bits
*(s32*)(&pxValCount[0]) = 0;
*(s32*)(&pxValCount[4]) = 0;
*(s32*)(&pxValCount[8]) = 0;
*(s32*)(&pxValCount[12]) = 0;
*(s32*)(&pxValCount[16]) = 0;
*(s32*)(&pxValCount[20]) = 0;
*(s32*)(&pxValCount[24]) = 0;
*(s32*)(&pxValCount[28]) = 0;
// Increment the count that contains the pixel values
pxValCount[px1[0]]++;
pxValCount[px1[1]]++;
pxValCount[px1[2]]++;
pxValCount[px2[0]]++;
pxValCount[px2[1]]++;
pxValCount[px2[2]]++;
pxValCount[px3[0]]++;
pxValCount[px3[1]]++;
pxValCount[px3[2]]++;
// Loop through the 32 bits until 5 values are found, then return that bit value.
// Note that the median of 9 is the 5th sequential value.
pxCount = 0;
pxMed = 0;
while (true) {
pxCount += pxValCount[pxMed];
if (pxCount >= 5) {
// the median is found
break;
}
pxMed++;
}
return pxMed;
}
// Despite the name, this function doesn't seem like an hardware-accurate divot filter
void PreRender_DivotFilter(PreRender* this) {
u32 width = this->width;
u32 height = this->height;
u8* buffer = alloca(width * 10);
u8* redRow[3];
u8* greenRow[3];
u8* blueRow[3];
u8* cvgFull;
Color_RGBA16 inPx;
Color_RGBA16 outPx;
u32 x;
u32 y;
s32 pad;
redRow[0] = &buffer[width * 0];
redRow[1] = &buffer[width * 1];
redRow[2] = &buffer[width * 2];
greenRow[0] = &buffer[width * 3];
greenRow[1] = &buffer[width * 4];
greenRow[2] = &buffer[width * 5];
blueRow[0] = &buffer[width * 6];
blueRow[1] = &buffer[width * 7];
blueRow[2] = &buffer[width * 8];
cvgFull = &buffer[width * 9];
// Fill line buffers for first 2 rows
for (y = 0; y < 2; y++) {
for (x = 0; x < width; x++) {
inPx.rgba = this->fbufSave[x + y * this->width];
redRow[y][x] = inPx.r;
greenRow[y][x] = inPx.g;
blueRow[y][x] = inPx.b;
}
}
// For each row in the image, except first and last
for (y = 1; y < height - 1; y++) {
// Find start of pixels and coverage for current line (bug? this should probably be fetching the NEXT line, but
// really the divot filter only cares about individual lines so it's already wrong)
u8* redRow2 = redRow[2];
u8* greenRow2 = greenRow[2];
u8* blueRow2 = blueRow[2];
u8* lineCvg = &this->cvgSave[width * y];
u16* linePx = &this->fbufSave[width * y];
// Obtain next row from current line, current line becomes the bottom row?? (weird, you would expect this to
// sample the NEXT line?)
for (x = 0; x < width; x++) {
inPx.rgba = linePx[x];
redRow2[x] = inPx.r;
greenRow2[x] = inPx.g;
blueRow2[x] = inPx.b;
// checking for full coverage
cvgFull[x] = (lineCvg[x] >> 5) == 7;
}
for (x = 1; x < width - 1; x++) {
// if the coverage of the three adjacent pixels on the current line are not all fully covered
if (cvgFull[x - 1] && cvgFull[x] && cvgFull[x + 1]) {
continue;
}
// find median value in 3x3 square for each (r,g,b), replaces the pixel marked by X:
// * * *
// * * *
// * X *
outPx.r = PreRender_Get5bMedian9(&redRow[0][x - 1], &redRow[1][x - 1], &redRow[2][x - 1]);
outPx.g = PreRender_Get5bMedian9(&greenRow[0][x - 1], &greenRow[1][x - 1], &greenRow[2][x - 1]);
outPx.b = PreRender_Get5bMedian9(&blueRow[0][x - 1], &blueRow[1][x - 1], &blueRow[2][x - 1]);
outPx.a = 1;
this->fbufSave[x + y * this->width] = outPx.rgba;
}
// Shuffle row 1 -> 0
redRow[0] = redRow[1];
greenRow[0] = greenRow[1];
blueRow[0] = blueRow[1];
// Shuffle row 2 -> 1
redRow[1] = redRow[2];
greenRow[1] = greenRow[2];
blueRow[1] = blueRow[2];
}
}
/**
* Applies filters to the framebuffer prerender to make it look smoother
*/
void PreRender_ApplyFilters(PreRender* this) {
if ((this->cvgSave == NULL) || (this->fbufSave == NULL)) {
this->unk_4D = 0;
this->filterState = PRERENDER_FILTER_STATE_NONE;
} else {
this->unk_4D = 1;
PreRender_ApplyAntiAliasingFilter(this);
func_801717F8(this);
this->unk_4D = 2;
this->filterState = PRERENDER_FILTER_STATE_PROCESS;
PreRender_AntiAliasFilter(this);
PreRender_DivotFilter(this);
this->filterState = PRERENDER_FILTER_STATE_DONE;
}
}
extern SlowlyMgr sSlowlyMgr;
extern s32 D_801F6FC0;
extern StackEntry sSlowlyStackInfo;
extern STACK(sSlowlyStack, 0x1000);
SlowlyMgr sSlowlyMgr;
s32 sSlowlyRunning;
StackEntry sSlowlyStackInfo;
STACK(sSlowlyStack, 0x1000);
/**
* Initializes `PreRender_ApplyFilters` onto a new "slowly" thread
*/
void PreRender_ApplyFiltersSlowlyInit(PreRender* this) {
if ((this->cvgSave != NULL) && (this->fbufSave != NULL)) {
if (D_801F6FC0) {
if (sSlowlyRunning) {
StackCheck_Cleanup(&sSlowlyStackInfo);
Slowly_Destroy(&sSlowlyMgr);
}
this->unk_4D = 1;
this->filterState = PRERENDER_FILTER_STATE_PROCESS;
StackCheck_Init(&sSlowlyStackInfo, sSlowlyStack, STACK_TOP(sSlowlyStack), 0, 0x100, "slowly");
Slowly_Init(&sSlowlyMgr, STACK_TOP(sSlowlyStack), (void*)PreRender_ApplyFilters, this, NULL);
D_801F6FC0 = true;
sSlowlyRunning = true;
}
}
@@ -439,10 +726,10 @@ void PreRender_ApplyFiltersSlowlyInit(PreRender* this) {
* Destroys the "slowly" thread
*/
void PreRender_ApplyFiltersSlowlyDestroy(PreRender* this) {
if (D_801F6FC0) {
if (sSlowlyRunning) {
StackCheck_Cleanup(&sSlowlyStackInfo);
Slowly_Destroy(&sSlowlyMgr);
D_801F6FC0 = false;
sSlowlyRunning = false;
}
}
@@ -453,26 +740,121 @@ void func_801720C4(PreRender* this) {
}
}
#pragma GLOBAL_ASM("asm/non_matchings/code/PreRender/func_801720FC.s")
typedef struct {
/* 0x00 */ void* timg;
/* 0x04 */ void* tlut;
/* 0x08 */ u16 width;
/* 0x0A */ u16 height;
/* 0x0C */ u8 fmt;
/* 0x0D */ u8 siz;
/* 0x0E */ u16 tt;
/* 0x10 */ u16 tlutCount;
/* 0x14 */ f32 x;
/* 0x18 */ f32 y;
/* 0x1C */ f32 xScale;
/* 0x20 */ f32 yScale;
/* 0x24 */ u32 flags;
} PreRenderBackground2DParams; // size = 0x28
void Prerender_DrawBackground2DImpl(PreRenderBackground2DParams* bg2D, Gfx** gfxp) {
Gfx* gfx;
uObjBg* bg;
u32 alphaCompare;
Gfx* gfxTemp;
u32 loadS2DEX2;
loadS2DEX2 = (bg2D->flags & BG2D_FLAGS_LOAD_S2DEX2) != 0;
alphaCompare = (bg2D->flags & BG2D_FLAGS_AC_THRESHOLD) ? G_AC_THRESHOLD : G_AC_NONE;
gfxTemp = *gfxp;
bg = Graph_DlistAlloc(&gfxTemp, sizeof(uObjBg));
gfx = gfxTemp;
bg->b.imageX = 0;
bg->b.imageW = (bg2D->width * (1 << 2)) + 1;
bg->b.frameX = bg2D->x * (1 << 2);
bg->b.imageY = 0;
bg->b.imageH = (bg2D->height * (1 << 2)) + 1;
bg->b.frameY = bg2D->y * (1 << 2);
bg->b.imagePtr = bg2D->timg;
bg->b.imageLoad = G_BGLT_LOADTILE;
bg->b.imageFmt = bg2D->fmt;
bg->b.imageSiz = bg2D->siz;
bg->b.imagePal = 0;
bg->b.imageFlip = 0;
if (loadS2DEX2) {
gSPLoadUcodeL(gfx++, gspS2DEX2_fifo);
}
if ((bg2D->fmt == G_IM_FMT_CI) && (bg2D->tlut != NULL)) {
gDPLoadTLUT(gfx++, bg2D->tlutCount, 256, bg2D->tlut);
} else {
gDPPipeSync(gfx++);
}
if (bg2D->flags & BG2D_FLAGS_COPY) {
bg->b.frameW = bg2D->width * (1 << 2);
bg->b.frameH = bg2D->height * (1 << 2);
guS2DInitBg(bg);
if (!(bg2D->flags & BG2D_FLAGS_1)) {
gDPSetOtherMode(gfx++, bg2D->tt | G_CYC_COPY, alphaCompare);
}
gSPBgRectCopy(gfx++, bg);
} else {
bg->b.frameW = (u32)(bg2D->width * (1 << 2)) * bg2D->xScale;
bg->b.frameH = (u32)(bg2D->height * (1 << 2)) * bg2D->yScale;
bg->b.tmemW = (1 << 10) / bg2D->xScale;
bg->b.tmemH = (1 << 10) / bg2D->yScale;
bg->s.imageYorig = bg->b.imageY;
if (!(bg2D->flags & BG2D_FLAGS_1)) {
gDPSetOtherMode(gfx++, bg2D->tt | G_AD_DISABLE | G_CD_DISABLE | G_TC_FILT,
AA_EN | CVG_X_ALPHA | ALPHA_CVG_SEL |
GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_BL, G_BL_1MA) |
GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_BL, G_BL_1MA) | alphaCompare);
}
if (!(bg2D->flags & BG2D_FLAGS_2)) {
gDPSetCombineLERP(gfx++, 0, 0, 0, TEXEL0, 0, 0, 0, 1, 0, 0, 0, TEXEL0, 0, 0, 0, 1);
}
gSPObjRenderMode(gfx++, G_OBJRM_ANTIALIAS | G_OBJRM_BILERP);
gSPBgRect1Cyc(gfx++, bg);
}
gDPPipeSync(gfx++);
if (loadS2DEX2) {
gSPLoadUcode(gfx++, SysUcode_GetUCode(), SysUcode_GetUCodeData());
}
*gfxp = gfx;
}
void Prerender_DrawBackground2D(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) {
PreRenderParams params;
PreRenderParams* paramsp = &params;
u16 tlutCount, f32 x, f32 y, f32 xScale, f32 yScale, u32 flags) {
PreRenderBackground2DParams bg2D;
PreRenderBackground2DParams* bg2DPtr = &bg2D;
params.timg = timg;
params.tlut = tlut;
params.width = width;
params.height = height;
params.fmt = fmt;
params.siz = siz;
params.tt = tt;
params.unk_10 = arg8;
params.x = x;
params.y = y;
params.xScale = xScale;
params.yScale = yScale;
params.flags = flags;
bg2D.timg = timg;
bg2D.tlut = tlut;
bg2D.width = width;
bg2D.height = height;
bg2D.fmt = fmt;
bg2D.siz = siz;
bg2D.tt = tt;
bg2D.tlutCount = tlutCount;
bg2D.x = x;
bg2D.y = y;
bg2D.xScale = xScale;
bg2D.yScale = yScale;
bg2D.flags = flags;
func_801720FC(paramsp, gfxp);
Prerender_DrawBackground2DImpl(bg2DPtr, gfxp);
}
+1 -1
View File
@@ -1,4 +1,4 @@
#include "global.h"
#include "listalloc.h"
#include "system_malloc.h"
ListAlloc* ListAlloc_Init(ListAlloc* this) {
+2
View File
@@ -36,6 +36,8 @@
#include "PR/os_motor.h"
#include "fault.h"
extern FaultMgr gFaultMgr;
#define PADMGR_RETRACE_MSG (1 << 0)
#define PADMGR_PRE_NMI_MSG (1 << 1)
#define PADMGR_NMI_MSG (1 << 2)
+9 -7
View File
@@ -5,6 +5,8 @@
#include "stackcheck.h"
#include "system_malloc.h"
#include "z64thread.h"
#include "sys_flashrom.h"
#include "PR/os_internal_flash.h"
OSMesgQueue sFlashromMesgQueue;
OSMesg sFlashromMesg[1];
@@ -81,7 +83,7 @@ s32 SysFlashrom_ReadData(void* addr, u32 pageNum, u32 pageCount) {
if (!SysFlashrom_IsInit()) {
return -1;
}
osInvalDCache(addr, pageCount * FLASH_PAGE_SIZE);
osInvalDCache(addr, pageCount * FLASH_BLOCK_SIZE);
osFlashReadArray(&msg, OS_MESG_PRI_NORMAL, pageNum, addr, pageCount, &sFlashromMesgQueue);
osRecvMesg(&sFlashromMesgQueue, NULL, OS_MESG_BLOCK);
return 0;
@@ -103,12 +105,12 @@ s32 SysFlashrom_ExecWrite(void* addr, u32 pageNum, u32 pageCount) {
return -1;
}
// Ensure the page is always aligned to a sector boundary.
if ((pageNum % FLASH_PAGE_SIZE) != 0) {
if ((pageNum % FLASH_BLOCK_SIZE) != 0) {
Fault_AddHungupAndCrash("../sys_flashrom.c", 275);
}
osWritebackDCache(addr, pageCount * FLASH_PAGE_SIZE);
osWritebackDCache(addr, pageCount * FLASH_BLOCK_SIZE);
for (i = 0; i < pageCount; i++) {
osFlashWriteBuffer(&msg, OS_MESG_PRI_NORMAL, (u8*)addr + i * FLASH_PAGE_SIZE, &sFlashromMesgQueue);
osFlashWriteBuffer(&msg, OS_MESG_PRI_NORMAL, (u8*)addr + i * FLASH_BLOCK_SIZE, &sFlashromMesgQueue);
osRecvMesg(&sFlashromMesgQueue, NULL, OS_MESG_BLOCK);
result = osFlashWriteArray(i + pageNum);
if (result != 0) {
@@ -125,7 +127,7 @@ s32 SysFlashrom_AttemptWrite(void* addr, u32 pageNum, u32 pageCount) {
if (!SysFlashrom_IsInit()) {
return -1;
}
osWritebackDCache(addr, pageCount * FLASH_PAGE_SIZE);
osWritebackDCache(addr, pageCount * FLASH_BLOCK_SIZE);
i = 0;
failRetry:
result = SysFlashrom_EraseSector(pageNum);
@@ -153,7 +155,7 @@ s32 SysFlashrom_NeedsToErase(void* data, void* addr, u32 pageCount) {
u32 size;
u32 i;
for (i = 0; i < pageCount * FLASH_PAGE_SIZE; i += 4) {
for (i = 0; i < pageCount * FLASH_BLOCK_SIZE; i += 4) {
if ((*(s32*)data & *(s32*)addr) != *(s32*)addr) {
return false;
}
@@ -169,7 +171,7 @@ s32 SysFlashrom_WriteData(void* addr, u32 pageNum, u32 pageCount) {
if (!SysFlashrom_IsInit()) {
return -1;
}
size = pageCount * FLASH_PAGE_SIZE;
size = pageCount * FLASH_BLOCK_SIZE;
data = SystemArena_Malloc(size);
if (data == NULL) {
ret = SysFlashrom_AttemptWrite(addr, pageNum, pageCount);
+2 -3
View File
@@ -3,8 +3,7 @@
* Description:
*/
#include "prevent_bss_reordering.h"
#include "global.h"
#include "z64actor.h"
#include "fault.h"
#include "sys_cfb.h"
#include "loadfragment.h"
@@ -2893,7 +2892,7 @@ void Actor_DrawLensActors(PlayState* play, s32 numLensActors, Actor** lensActors
play->pauseBgPreRender.fbuf);
gfxTemp = gfx;
func_8016FDB8(&play->pauseBgPreRender, &gfxTemp, spA4, zbuffer, 1);
PreRender_CopyImage(&play->pauseBgPreRender, &gfxTemp, spA4, zbuffer, true);
gfx = gfxTemp;
}
+1
View File
@@ -43,6 +43,7 @@
*
*/
#include "prevent_bss_reordering.h"
#include "global.h"
#include "libc/string.h"
#include "z64quake.h"
-1
View File
@@ -1,4 +1,3 @@
#include "prevent_bss_reordering.h"
#include "global.h"
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
#include "interface/parameter_static/parameter_static.h"
+5 -5
View File
@@ -83,7 +83,7 @@ void Play_DrawMotionBlur(PlayState* this) {
sMotionBlurStatus = MOTION_BLUR_PROCESS;
}
func_801705B4(&this->pauseBgPreRender, &gfx);
PreRender_SaveFramebuffer(&this->pauseBgPreRender, &gfx);
gSPEndDisplayList(gfx++);
@@ -1267,8 +1267,8 @@ void Play_DrawMain(PlayState* this) {
if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_READY) {
Gfx* sp8C = POLY_OPA_DISP;
if (this->pauseBgPreRender.unk_4D == 2) {
func_80170B28(&this->pauseBgPreRender, &sp8C);
if (this->pauseBgPreRender.filterState == PRERENDER_FILTER_STATE_DONE) {
PreRender_RestoreFramebuffer(&this->pauseBgPreRender, &sp8C);
} else {
func_80170798(&this->pauseBgPreRender, &sp8C);
}
@@ -1405,10 +1405,10 @@ void Play_DrawMain(PlayState* this) {
this->pauseBgPreRender.cvgSave = NULL;
}
func_801705B4(&this->pauseBgPreRender, &sp74);
PreRender_SaveFramebuffer(&this->pauseBgPreRender, &sp74);
if (this->pauseBgPreRender.cvgSave != NULL) {
func_80170730(&this->pauseBgPreRender, &sp74);
PreRender_DrawCoverage(&this->pauseBgPreRender, &sp74);
}
gSPEndDisplayList(sp74++);
+56 -70
View File
@@ -1,5 +1,6 @@
#include "ultra64.h"
#include "global.h"
#include "PR/os_internal_flash.h"
#include "alignment.h"
u32 __osFlashID[4] ALIGNED(8);
@@ -8,15 +9,11 @@ OSMesgQueue __osFlashMessageQ ALIGNED(8);
OSPiHandle __osFlashHandler ALIGNED(8);
OSMesg __osFlashMsgBuf[1];
s32 __osFlashVersion;
s32 D_801FD0FC[0x5];
static s32 sBssPad[5];
typedef enum {
/* 0 */ FLASH_OLD,
/* 1 */ FLASH_NEW
} FlashVersion;
u32 osFlashGetAddr(u32 pageNum) {
s32 addr = (__osFlashVersion == FLASH_OLD) ? pageNum << 6 : pageNum << 7;
uintptr_t osFlashGetAddr(u32 pageNum) {
// Account for hadware bug in old flash where the address bits are shifted 1-off where they should be
uintptr_t addr = (__osFlashVersion == OLD_FLASH) ? pageNum * (FLASH_BLOCK_SIZE >> 1) : pageNum * FLASH_BLOCK_SIZE;
return addr;
}
@@ -28,14 +25,14 @@ OSPiHandle* osFlashReInit(u8 latency, u8 pulse, u8 pageSize, u8 relDuration, u32
__osFlashHandler.pulse = pulse;
__osFlashHandler.pageSize = pageSize;
__osFlashHandler.relDuration = relDuration;
__osFlashHandler.domain = 1;
__osFlashHandler.domain = PI_DOMAIN2;
return &__osFlashHandler;
}
void osFlashChange(u32 flashNum) {
__osFlashHandler.baseAddress = PHYS_TO_K1(FRAM_STATUS_REGISTER + (flashNum << 17));
__osFlashHandler.type = 8 + flashNum;
__osFlashHandler.baseAddress = PHYS_TO_K1(FRAM_STATUS_REGISTER + (flashNum * FLASH_SIZE));
__osFlashHandler.type = DEVICE_TYPE_FLASH + flashNum;
return;
}
@@ -46,27 +43,29 @@ OSPiHandle* osFlashInit(void) {
osCreateMesgQueue(&__osFlashMessageQ, __osFlashMsgBuf, ARRAY_COUNT(__osFlashMsgBuf));
if (__osFlashHandler.baseAddress == PHYS_TO_K1(FRAM_BASE_ADDRESS)) {
if (__osFlashHandler.baseAddress == PHYS_TO_K1(FLASH_START_ADDR)) {
return &__osFlashHandler;
}
__osFlashHandler.type = 8;
__osFlashHandler.baseAddress = PHYS_TO_K1(FRAM_BASE_ADDRESS);
__osFlashHandler.latency = 5;
__osFlashHandler.pulse = 12;
__osFlashHandler.pageSize = 15;
__osFlashHandler.relDuration = 2;
__osFlashHandler.domain = 1;
__osFlashHandler.type = DEVICE_TYPE_FLASH;
__osFlashHandler.baseAddress = PHYS_TO_K1(FLASH_START_ADDR);
__osFlashHandler.latency = FLASH_LATENCY;
__osFlashHandler.pulse = FLASH_PULSE;
__osFlashHandler.pageSize = FLASH_PAGE_SIZE;
__osFlashHandler.relDuration = FLASH_REL_DURATION;
__osFlashHandler.domain = PI_DOMAIN2;
__osFlashHandler.speed = 0;
bzero(&__osFlashHandler.transferInfo, sizeof(__OSTranxInfo));
osEPiLinkHandle(&__osFlashHandler);
osFlashReadId(&flashType, &flashVendor);
if (flashVendor == 0x00C2001E || flashVendor == 0x00C20001 || flashVendor == 0x00C20000) {
__osFlashVersion = FLASH_OLD;
if ((flashVendor == FLASH_VERSION_MX_C) || (flashVendor == FLASH_VERSION_MX_A) ||
(flashVendor == FLASH_VERSION_MX_PROTO_A)) {
__osFlashVersion = OLD_FLASH;
} else {
__osFlashVersion = FLASH_NEW;
__osFlashVersion = NEW_FLASH;
}
return &__osFlashHandler;
@@ -75,12 +74,12 @@ OSPiHandle* osFlashInit(void) {
void osFlashReadStatus(u8* flashStatus) {
u32 outFlashStatus;
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER, FRAM_COMMAND_EXECUTE);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_STATUS);
// read status using IO
osEPiReadIo(&__osFlashHandler, __osFlashHandler.baseAddress, &outFlashStatus);
// why twice ?
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER, FRAM_COMMAND_EXECUTE);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_STATUS);
osEPiReadIo(&__osFlashHandler, __osFlashHandler.baseAddress, &outFlashStatus);
*flashStatus = outFlashStatus & 0xFF;
@@ -95,11 +94,10 @@ void osFlashReadId(u32* flashType, u32* flashVendor) {
osFlashReadStatus(&flashStatus);
// select silicon id read mode
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER,
FRAM_COMMAND_SET_MODE_STATUS_AND_STATUS);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_ID);
// read silicon id using DMA
__osFlashMsg.hdr.pri = 0;
__osFlashMsg.hdr.pri = OS_MESG_PRI_NORMAL;
__osFlashMsg.hdr.retQueue = &__osFlashMessageQ;
__osFlashMsg.dramAddr = __osFlashID;
__osFlashMsg.devAddr = 0;
@@ -117,7 +115,7 @@ void osFlashReadId(u32* flashType, u32* flashVendor) {
void osFlashClearStatus(void) {
// select status mode
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER, FRAM_COMMAND_EXECUTE);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_STATUS);
// clear status
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress, 0);
@@ -131,10 +129,8 @@ s32 osFlashAllErase(void) {
OSMesg msg;
// start chip erase operation
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER,
FRAM_COMMAND_UNK_ERASE_OPERATION);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER,
FRAM_COMMAND_SET_MODE_ERASE_AND_STATUS);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_CHIP_ERASE);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_EXECUTE_ERASE);
// wait for completion by polling erase-busy flag
osCreateMesgQueue(&mq, &msg, 1);
@@ -142,25 +138,23 @@ s32 osFlashAllErase(void) {
osSetTimer(&timer, OS_USEC_TO_CYCLES(15000), 0, &mq, &msg);
osRecvMesg(&mq, &msg, OS_MESG_BLOCK);
osEPiReadIo(&__osFlashHandler, __osFlashHandler.baseAddress, &status);
} while ((status & 2) == 2);
} while ((status & FLASH_STATUS_ERASE_BUSY) == FLASH_STATUS_ERASE_BUSY);
// check erase operation status, clear status
osEPiReadIo(&__osFlashHandler, __osFlashHandler.baseAddress, &status);
osFlashClearStatus();
if (((status & 0xFF) == 0x08) || ((status & 0xFF) == 0x48) || ((status & 0x08) == 0x08)) {
return 0;
return FLASH_STATUS_ERASE_OK;
} else {
return -1;
return FLASH_STATUS_ERASE_ERROR;
}
}
void osFlashAllEraseThrough(void) {
// start chip erase operation
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER,
FRAM_COMMAND_UNK_ERASE_OPERATION);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER,
FRAM_COMMAND_SET_MODE_ERASE_AND_STATUS);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_CHIP_ERASE);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_EXECUTE_ERASE);
}
s32 osFlashCheckEraseEnd(void) {
@@ -168,8 +162,8 @@ s32 osFlashCheckEraseEnd(void) {
// check if erase operation is completed
osFlashReadStatus(&status);
if ((status & 0x02) == 0x02) {
return 2; // busy
if ((status & FLASH_STATUS_ERASE_BUSY) == FLASH_STATUS_ERASE_BUSY) {
return FLASH_STATUS_ERASE_BUSY;
} else {
// check erase operation status, clear status
osFlashReadStatus(&status);
@@ -177,9 +171,9 @@ s32 osFlashCheckEraseEnd(void) {
osFlashClearStatus();
if (((status & 0xFF) == 0x08) || ((status & 0xFF) == 0x48) || ((status & 0x08) == 0x08)) {
return 0;
return FLASH_STATUS_ERASE_OK;
} else {
return -1;
return FLASH_STATUS_ERASE_ERROR;
}
}
@@ -190,10 +184,8 @@ s32 osFlashSectorErase(u32 pageNum) {
OSMesg msg;
// start sector erase operation
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER,
FRAM_COMMAND_SET_ERASE_SECTOR_OFFSET | pageNum);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER,
FRAM_COMMAND_SET_MODE_ERASE_AND_STATUS);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_SECTOR_ERASE | pageNum);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_EXECUTE_ERASE);
// wait for completion by polling erase-busy flag
osCreateMesgQueue(&mq, &msg, 1);
@@ -201,39 +193,37 @@ s32 osFlashSectorErase(u32 pageNum) {
osSetTimer(&timer, OS_USEC_TO_CYCLES(12500), 0, &mq, &msg);
osRecvMesg(&mq, &msg, OS_MESG_BLOCK);
osEPiReadIo(&__osFlashHandler, __osFlashHandler.baseAddress, &status);
} while ((status & 2) == 2);
} while ((status & FLASH_STATUS_ERASE_BUSY) == FLASH_STATUS_ERASE_BUSY);
// check erase operation status, clear status
osEPiReadIo(&__osFlashHandler, __osFlashHandler.baseAddress, &status);
osFlashClearStatus();
if (((status & 0xFF) == 0x08) || ((status & 0xFF) == 0x48) || ((status & 0x08) == 0x08)) {
return 0;
return FLASH_STATUS_ERASE_OK;
} else {
return -1;
return FLASH_STATUS_ERASE_ERROR;
}
}
void osFlashSectorEraseThrough(u32 pageNum) {
// start sector erase operation
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER,
FRAM_COMMAND_SET_ERASE_SECTOR_OFFSET | pageNum);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER,
FRAM_COMMAND_SET_MODE_ERASE_AND_STATUS);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_SECTOR_ERASE | pageNum);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_EXECUTE_ERASE);
}
s32 osFlashWriteBuffer(OSIoMesg* mb, s32 priority, void* dramAddr, OSMesgQueue* mq) {
s32 ret;
// select load page mode
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER, FRAM_COMMAND_SET_MODE_WRITE);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_PAGE_PROGRAM);
// DMA 128-byte page
mb->hdr.pri = priority;
mb->hdr.retQueue = mq;
mb->dramAddr = dramAddr;
mb->devAddr = 0;
mb->size = 0x80;
mb->size = FLASH_BLOCK_SIZE;
ret = osEPiStartDma(&__osFlashHandler, mb, OS_WRITE);
@@ -247,14 +237,12 @@ s32 osFlashWriteArray(u32 pageNum) {
OSMesg msg;
// only needed for new flash ?
if (__osFlashVersion == FLASH_NEW) {
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER,
FRAM_COMMAND_SET_MODE_WRITE);
if (__osFlashVersion == NEW_FLASH) {
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_PAGE_PROGRAM);
}
// start program page operation
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER,
FRAM_COMMAND_SET_ERASE_SECTOR_OFFSET_AND_STATUS | pageNum);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_PROGRAM_PAGE | pageNum);
// wait for completion by polling write-busy flag
osCreateMesgQueue(&mq, &msg, 1);
@@ -262,16 +250,16 @@ s32 osFlashWriteArray(u32 pageNum) {
osSetTimer(&timer, OS_USEC_TO_CYCLES(200), 0, &mq, &msg);
osRecvMesg(&mq, &msg, OS_MESG_BLOCK);
osEPiReadIo(&__osFlashHandler, __osFlashHandler.baseAddress, &status);
} while ((status & 0x01) == 0x01);
} while ((status & FLASH_STATUS_WRITE_BUSY) == FLASH_STATUS_WRITE_BUSY);
// check program operation status, clear status
osEPiReadIo(&__osFlashHandler, __osFlashHandler.baseAddress, &status);
osFlashClearStatus();
if (((status & 0xFF) == 0x04) || ((status & 0xFF) == 0x44) || ((status & 0x04) == 0x04)) {
return 0;
return FLASH_STATUS_WRITE_OK;
} else {
return -1;
return FLASH_STATUS_WRITE_ERROR;
}
}
@@ -282,8 +270,7 @@ s32 osFlashReadArray(OSIoMesg* mb, s32 priority, u32 pageNum, void* dramAddr, u3
u32 pages;
// select read array mode
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FRAM_COMMAND_REGISTER,
FRAM_COMMAND_SET_MODE_READ_AND_STATUS);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_READ_ARRAY);
// dummy read to initiate "fast-page" reads ?
osEPiReadIo(&__osFlashHandler, __osFlashHandler.baseAddress, &dummy);
@@ -296,10 +283,9 @@ s32 osFlashReadArray(OSIoMesg* mb, s32 priority, u32 pageNum, void* dramAddr, u3
last_page = pageNum + pageCount - 1;
if ((last_page & 0xF00) != (pageNum & 0xF00)) {
pages = 256 - (pageNum & 0xFF);
pageCount -= pages;
mb->size = pages << 7;
mb->size = pages * FLASH_BLOCK_SIZE;
mb->devAddr = osFlashGetAddr(pageNum);
osEPiStartDma(&__osFlashHandler, mb, OS_READ);
osRecvMesg(mq, NULL, OS_MESG_BLOCK);
@@ -310,7 +296,7 @@ s32 osFlashReadArray(OSIoMesg* mb, s32 priority, u32 pageNum, void* dramAddr, u3
while (pageCount > 256) {
pages = 256;
pageCount -= 256;
mb->size = pages << 7;
mb->size = pages * FLASH_BLOCK_SIZE;
mb->devAddr = osFlashGetAddr(pageNum);
osEPiStartDma(&__osFlashHandler, mb, OS_READ);
osRecvMesg(mq, NULL, OS_MESG_BLOCK);
@@ -318,7 +304,7 @@ s32 osFlashReadArray(OSIoMesg* mb, s32 priority, u32 pageNum, void* dramAddr, u3
mb->dramAddr = (void*)((uintptr_t)mb->dramAddr + mb->size);
}
mb->size = pageCount << 7;
mb->size = pageCount * FLASH_BLOCK_SIZE;
mb->devAddr = osFlashGetAddr(pageNum);
ret = osEPiStartDma(&__osFlashHandler, mb, OS_READ);
+3 -3
View File
@@ -3,7 +3,7 @@
#include "alignment.h"
#include "macros.h"
s32 __osContinitialized = 0;
s32 __osContinitialized = false;
OSPifRam __osContPifRam ALIGNED(16);
u8 __osContLastPoll;
@@ -20,11 +20,11 @@ s32 osContInit(OSMesgQueue* mq, u8* bitpattern, OSContStatus* data) {
OSTimer mytimer;
OSMesgQueue timerMesgQueue;
if (__osContinitialized != 0) {
if (__osContinitialized) {
return 0;
}
__osContinitialized = 1;
__osContinitialized = true;
t = osGetTime();
if (t < OS_USEC_TO_CYCLES(500000)) {
+1 -1
View File
@@ -1,7 +1,7 @@
#include "ultra64.h"
#include "alignment.h"
__OSViContext vi[2] ALIGNED(8) = { 0 };
static __OSViContext vi[2] ALIGNED(8) = { 0 };
__OSViContext* __osViCurr = &vi[0];
__OSViContext* __osViNext = &vi[1];
+1
View File
@@ -4,6 +4,7 @@
#include "PR/osint.h"
#include "libc/stdbool.h"
#include "macros.h"
#include "alignment.h"
OSThread viThread;
STACK(sViStack, OS_VIM_STACKSIZE) ALIGNED(16);
+6 -6
View File
@@ -3,12 +3,12 @@
#define COLD_RESET 0
typedef struct {
/* 0x0 */ u32 ins_00; // lui k0, 0x8000
/* 0x4 */ u32 ins_04; // addiu k0, k0, 0x39E0
/* 0x8 */ u32 ins_08; // jr k0 ; __osException
/* 0xC */ u32 ins_0C; // nop
} __osExceptionVector; // size = 0x10
typedef struct __osExceptionVector {
/* 0x0 */ u32 ins_00; // lui k0, 0x8000
/* 0x4 */ u32 ins_04; // addiu k0, k0, 0x39E0
/* 0x8 */ u32 ins_08; // jr k0 ; __osException
/* 0xC */ u32 ins_0C; // nop
} __osExceptionVector; // size = 0x10
extern __osExceptionVector __osExceptionPreamble;
+1
View File
@@ -3,6 +3,7 @@
*/
#include "PR/controller_voice.h"
#include "PR/voiceinternal.h"
#include "PR/controller.h"
#include "PR/voiceinternal.h"
#include "functions.h"
+1
View File
@@ -3,6 +3,7 @@
*/
#include "PR/controller_voice.h"
#include "PR/voiceinternal.h"
#include "PR/controller.h"
#include "PR/voiceinternal.h"
#include "functions.h"
+1
View File
@@ -3,6 +3,7 @@
*/
#include "PR/controller_voice.h"
#include "PR/voiceinternal.h"
#include "PR/controller.h"
#include "PR/voiceinternal.h"
#include "functions.h"
+1
View File
@@ -3,6 +3,7 @@
*/
#include "PR/controller_voice.h"
#include "PR/voiceinternal.h"
#include "PR/controller.h"
#include "PR/voiceinternal.h"
#include "functions.h"
+1
View File
@@ -3,6 +3,7 @@
*/
#include "PR/controller_voice.h"
#include "PR/voiceinternal.h"
#include "PR/controller.h"
#include "PR/voiceinternal.h"
#include "functions.h"
@@ -100,9 +100,9 @@ void BgNumaHana_UpdatePetalPosRots(BgNumaHana* this) {
s32 i;
innerPetalYPos = this->dyna.actor.world.pos.y + -10.0f;
angle = this->petalZRotation - 0x2000;
angle = this->petalRotZ - 0x2000;
outerPetalPosScale = (Math_CosS(angle) * 77.42784f) + 74.95192f;
outerPetalYPos = (Math_SinS(this->petalZRotation) * 77.42784f) + this->dyna.actor.world.pos.y + -64.74976f;
outerPetalYPos = (Math_SinS(this->petalRotZ) * 77.42784f) + this->dyna.actor.world.pos.y + -64.74976f;
for (i = 0; i < ARRAY_COUNT(this->innerPetalPosRot); i++) {
innerPetalPosRot = &this->innerPetalPosRot[i];
@@ -114,14 +114,14 @@ void BgNumaHana_UpdatePetalPosRots(BgNumaHana* this) {
innerPetalPosRot->pos.z = (Math_CosS(angle) * 74.95192f) + this->dyna.actor.world.pos.z;
innerPetalPosRot->rot.x = this->dyna.actor.shape.rot.x;
innerPetalPosRot->rot.y = angle - 0x4000;
innerPetalPosRot->rot.z = this->dyna.actor.shape.rot.z + this->petalZRotation;
innerPetalPosRot->rot.z = this->dyna.actor.shape.rot.z + this->petalRotZ;
outerPetalPosRot->pos.x = (Math_SinS(angle) * outerPetalPosScale) + this->dyna.actor.world.pos.x;
outerPetalPosRot->pos.y = outerPetalYPos;
outerPetalPosRot->pos.z = (Math_CosS(angle) * outerPetalPosScale) + this->dyna.actor.world.pos.z;
outerPetalPosRot->rot.x = innerPetalPosRot->rot.x;
outerPetalPosRot->rot.y = innerPetalPosRot->rot.y;
outerPetalPosRot->rot.z = innerPetalPosRot->rot.z + this->outerPetalZRotation;
outerPetalPosRot->rot.z = innerPetalPosRot->rot.z + this->outerPetalRotZ;
}
}
@@ -130,10 +130,10 @@ void BgNumaHana_UpdatePetalPosRots(BgNumaHana* this) {
* as if they are "settling" into place. This function is responsible
* for computing the extra rotation for this "settling".
*/
void BgNumaHana_UpdateSettleRotation(s16* settleZRotation, s16* settleAngle, f32* settleScale, f32 scaleStep) {
void BgNumaHana_UpdateSettleRotation(s16* settleRotZ, s16* settleAngle, f32* settleScale, f32 scaleStep) {
*settleAngle += 0x32C8;
Math_StepToF(settleScale, 0.0f, scaleStep);
*settleZRotation += (s16)(Math_SinS(*settleAngle) * *settleScale);
*settleRotZ += (s16)(Math_SinS(*settleAngle) * *settleScale);
}
void BgNumaHana_Init(Actor* thisx, PlayState* play) {
@@ -164,15 +164,15 @@ void BgNumaHana_Init(Actor* thisx, PlayState* play) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_12_01)) {
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->petalZRotation = 0x2000;
this->innerPetalZRotation = 0x2000;
this->innerPetalZRotationalVelocity = 0;
this->settleZRotation = 0;
this->petalRotZ = 0x2000;
this->innerPetalRotZ = 0x2000;
this->innerPetalAngularVelocityZ = 0;
this->settleRotZ = 0;
this->settleAngle = 0;
this->settleScale = 0.0f;
this->outerPetalZRotation = -0x4000;
this->outerPetalZRotationalVelocity = 0;
this->flowerRotationalVelocity = 0x147;
this->outerPetalRotZ = -0x4000;
this->outerPetalAngularVelocityZ = 0;
this->flowerAngularVelocity = 0x147;
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + 210.0f;
FireObj_SetState2(&this->fire, 0.05f, FIRE_STATE_FULLY_LIT);
@@ -238,13 +238,13 @@ void BgNumaHana_SetupUnfoldInnerPetals(BgNumaHana* this) {
* parts of the petals that are closest to the stalk.
*/
void BgNumaHana_UnfoldInnerPetals(BgNumaHana* this, PlayState* play) {
Math_StepToS(&this->innerPetalZRotationalVelocity, 240, 14);
if (Math_ScaledStepToS(&this->innerPetalZRotation, 0x2000, this->innerPetalZRotationalVelocity)) {
Math_StepToS(&this->innerPetalAngularVelocityZ, 240, 14);
if (Math_ScaledStepToS(&this->innerPetalRotZ, 0x2000, this->innerPetalAngularVelocityZ)) {
if (this->transitionTimer >= 11) {
BgNumaHana_SetupUnfoldOuterPetals(this);
} else {
if (this->transitionTimer <= 0) {
this->settleZRotation = 0;
this->settleRotZ = 0;
this->settleAngle = 0;
this->settleScale = 420.0f;
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_FLOWERPETAL_STOP);
@@ -255,8 +255,8 @@ void BgNumaHana_UnfoldInnerPetals(BgNumaHana* this, PlayState* play) {
Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_FLOWERPETAL_MOVE - SFX_FLAG);
}
BgNumaHana_UpdateSettleRotation(&this->settleZRotation, &this->settleAngle, &this->settleScale, 20.0f);
this->petalZRotation = this->innerPetalZRotation + this->settleZRotation;
BgNumaHana_UpdateSettleRotation(&this->settleRotZ, &this->settleAngle, &this->settleScale, 20.0f);
this->petalRotZ = this->innerPetalRotZ + this->settleRotZ;
BgNumaHana_UpdatePetalPosRots(this);
}
@@ -270,13 +270,13 @@ void BgNumaHana_SetupUnfoldOuterPetals(BgNumaHana* this) {
* parts of the petals that are furthest to the stalk.
*/
void BgNumaHana_UnfoldOuterPetals(BgNumaHana* this, PlayState* play) {
Math_StepToS(&this->outerPetalZRotationalVelocity, 240, 14);
if (Math_ScaledStepToS(&this->outerPetalZRotation, -0x4000, this->outerPetalZRotationalVelocity)) {
Math_StepToS(&this->outerPetalAngularVelocityZ, 240, 14);
if (Math_ScaledStepToS(&this->outerPetalRotZ, -0x4000, this->outerPetalAngularVelocityZ)) {
if (this->transitionTimer >= 11) {
BgNumaHana_SetupRaiseFlower(this);
} else {
if (this->transitionTimer <= 0) {
this->settleZRotation = 0;
this->settleRotZ = 0;
this->settleAngle = 0x5120;
this->settleScale = 130.0f;
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_FLOWERPETAL_STOP);
@@ -287,8 +287,8 @@ void BgNumaHana_UnfoldOuterPetals(BgNumaHana* this, PlayState* play) {
Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_FLOWERPETAL_MOVE - SFX_FLAG);
}
BgNumaHana_UpdateSettleRotation(&this->settleZRotation, &this->settleAngle, &this->settleScale, 7.0f);
this->petalZRotation = this->innerPetalZRotation + this->settleZRotation;
BgNumaHana_UpdateSettleRotation(&this->settleRotZ, &this->settleAngle, &this->settleScale, 7.0f);
this->petalRotZ = this->innerPetalRotZ + this->settleRotZ;
BgNumaHana_UpdatePetalPosRots(this);
}
@@ -303,10 +303,10 @@ void BgNumaHana_RaiseFlower(BgNumaHana* this, PlayState* play) {
s32 pad;
DynaPolyActor* child;
BgNumaHana_UpdateSettleRotation(&this->settleZRotation, &this->settleAngle, &this->settleScale, 10.0f);
this->petalZRotation = this->innerPetalZRotation + this->settleZRotation;
Math_StepToS(&this->flowerRotationalVelocity, 0x111, 0xA);
this->dyna.actor.shape.rot.y += this->flowerRotationalVelocity;
BgNumaHana_UpdateSettleRotation(&this->settleRotZ, &this->settleAngle, &this->settleScale, 10.0f);
this->petalRotZ = this->innerPetalRotZ + this->settleRotZ;
Math_StepToS(&this->flowerAngularVelocity, 0x111, 0xA);
this->dyna.actor.shape.rot.y += this->flowerAngularVelocity;
Math_StepToF(&this->dyna.actor.velocity.y, 3.0f, 0.3f);
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 210.0f,
@@ -317,14 +317,14 @@ void BgNumaHana_RaiseFlower(BgNumaHana* this, PlayState* play) {
DynaPoly_EnableCollision(play, &play->colCtx.dyna, child->bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->petalZRotation = 0x2000;
this->innerPetalZRotation = 0x2000;
this->innerPetalZRotationalVelocity = 0;
this->settleZRotation = 0;
this->petalRotZ = 0x2000;
this->innerPetalRotZ = 0x2000;
this->innerPetalAngularVelocityZ = 0;
this->settleRotZ = 0;
this->settleAngle = 0;
this->outerPetalZRotation = -0x4000;
this->outerPetalZRotationalVelocity = 0;
this->flowerRotationalVelocity = 0x147;
this->outerPetalRotZ = -0x4000;
this->outerPetalAngularVelocityZ = 0;
this->flowerAngularVelocity = 0x147;
this->settleScale = 0.0f;
CutsceneManager_Stop(this->dyna.actor.csId);
@@ -343,8 +343,8 @@ void BgNumaHana_SetupOpenedIdle(BgNumaHana* this) {
* Spins the "opened" flower around the y-axis.
*/
void BgNumaHana_OpenedIdle(BgNumaHana* this, PlayState* play) {
this->dyna.actor.shape.rot.y += this->flowerRotationalVelocity;
this->petalZRotation = this->innerPetalZRotation + this->settleZRotation;
this->dyna.actor.shape.rot.y += this->flowerAngularVelocity;
this->petalRotZ = this->innerPetalRotZ + this->settleRotZ;
BgNumaHana_UpdatePetalPosRots(this);
Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_FLOWER_ROLLING - SFX_FLAG);
}
@@ -29,15 +29,15 @@ typedef struct BgNumaHana {
/* 0x234 */ BgNumaHanaActionFunc actionFunc;
/* 0x238 */ WoodenFlowerPetalPosRot innerPetalPosRot[6];
/* 0x2B0 */ WoodenFlowerPetalPosRot outerPetalPosRot[6];
/* 0x328 */ s16 petalZRotation;
/* 0x32A */ s16 innerPetalZRotation;
/* 0x32C */ s16 innerPetalZRotationalVelocity;
/* 0x32E */ s16 settleZRotation;
/* 0x328 */ s16 petalRotZ;
/* 0x32A */ s16 innerPetalRotZ;
/* 0x32C */ s16 innerPetalAngularVelocityZ;
/* 0x32E */ s16 settleRotZ;
/* 0x330 */ s16 settleAngle;
/* 0x334 */ f32 settleScale;
/* 0x338 */ s16 outerPetalZRotation;
/* 0x33A */ s16 outerPetalZRotationalVelocity;
/* 0x33C */ s16 flowerRotationalVelocity;
/* 0x338 */ s16 outerPetalRotZ;
/* 0x33A */ s16 outerPetalAngularVelocityZ;
/* 0x33C */ s16 flowerAngularVelocity;
/* 0x33E */ s16 transitionTimer;
} BgNumaHana; // size = 0x340
@@ -4,6 +4,7 @@
* Description: Woodfall scene objects (temple, water, walls, etc)
*/
#include "prevent_bss_reordering.h"
#include "z_dm_char01.h"
#include "objects/object_mtoride/object_mtoride.h"
#include "overlays/actors/ovl_Obj_Etcetera/z_obj_etcetera.h"
+3 -3
View File
@@ -139,7 +139,7 @@ void EnBom_Init(Actor* thisx, PlayState* play) {
this->actor.colChkInfo.cylHeight = 10;
this->flashSpeedScale = 7;
this->isPowderKeg = ENBOM_GETX_1(&this->actor);
this->isPowderKeg = ENBOM_GET_1(&this->actor);
if (this->isPowderKeg) {
play->actorCtx.flags |= ACTORCTX_FLAG_0;
this->timer = gSaveContext.powderKegTimer;
@@ -162,9 +162,9 @@ void EnBom_Init(Actor* thisx, PlayState* play) {
func_80872648(play, &this->actor.world.pos);
}
this->collider2Elements[0].info.toucher.damage += ENBOM_GETZ_FF00(thisx);
this->collider2Elements[0].info.toucher.damage += ENBOM_GET_FF00(thisx);
this->actor.shape.rot.z &= 0xFF;
if (ENBOM_GETZ_80(&this->actor)) {
if (ENBOM_GET_80(&this->actor)) {
this->actor.shape.rot.z |= 0xFF00;
}
+3 -3
View File
@@ -7,9 +7,9 @@ struct EnBom;
typedef void (*EnBomActionFunc)(struct EnBom*, PlayState*);
#define ENBOM_GETX_1(thisx) ((thisx)->shape.rot.x & 1)
#define ENBOM_GETZ_80(thisx) ((thisx)->shape.rot.z & 0x80)
#define ENBOM_GETZ_FF00(thisx) (((thisx)->shape.rot.z & 0xFF00) >> 8)
#define ENBOM_GET_1(thisx) ((thisx)->shape.rot.x & 1)
#define ENBOM_GET_80(thisx) ((thisx)->shape.rot.z & 0x80)
#define ENBOM_GET_FF00(thisx) (((thisx)->shape.rot.z & 0xFF00) >> 8)
typedef enum BombType {
/* 0 */ BOMB_TYPE_BODY,
@@ -949,8 +949,8 @@ void EnFishing_Init(Actor* thisx, PlayState* play2) {
thisx->bgCheckFlags |= BGCHECKFLAG_PLAYER_800; // Added in MM
if ((thisx->params < 115) || (thisx->params == 200)) {
SkelAnime_InitFlex(play, &this->skelAnime, &gFishingFishSkel, &gFishingFishAnim, NULL, NULL, 0);
Animation_MorphToLoop(&this->skelAnime, &gFishingFishAnim, 0.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gFishingBassSkel, &gFishingBassAnim, NULL, NULL, 0);
Animation_MorphToLoop(&this->skelAnime, &gFishingBassAnim, 0.0f);
} else {
SkelAnime_InitFlex(play, &this->skelAnime, &gFishingLoachSkel, &gFishingLoachAnim, NULL, NULL, 0);
Animation_MorphToLoop(&this->skelAnime, &gFishingLoachAnim, 0.0f);
@@ -3932,8 +3932,8 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) {
SkelAnime_Free(&this->skelAnime, play);
if (this->unk_148 == 0) {
SkelAnime_InitFlex(play, &this->skelAnime, &gFishingFishSkel, &gFishingFishAnim, 0, 0, 0);
Animation_MorphToLoop(&this->skelAnime, &gFishingFishAnim, 0.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gFishingBassSkel, &gFishingBassAnim, 0, 0, 0);
Animation_MorphToLoop(&this->skelAnime, &gFishingBassAnim, 0.0f);
} else {
SkelAnime_InitFlex(play, &this->skelAnime, &gFishingLoachSkel, &gFishingLoachAnim, 0, 0, 0);
Animation_MorphToLoop(&this->skelAnime, &gFishingLoachAnim, 0.0f);
@@ -4177,32 +4177,33 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) {
}
}
s32 EnFishing_FishOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
s32 EnFishing_BassOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
EnFishing* this = THIS;
if (limbIndex == FISHING_FISH_LIMB_0D) {
if (limbIndex == FISHING_BASS_LIMB_JAW) {
rot->z -= this->unk_168 - 11000;
} else if ((limbIndex == FISHING_FISH_LIMB_02) || (limbIndex == FISHING_FISH_LIMB_03)) {
} else if ((limbIndex == FISHING_BASS_LIMB_MIDDLE_SEGMENT_ROOT) ||
(limbIndex == FISHING_BASS_LIMB_BACK_SEGMENT_ROOT)) {
rot->y += this->unk_164;
} else if (limbIndex == FISHING_FISH_LIMB_04) {
} else if (limbIndex == FISHING_BASS_LIMB_END_ROOT) {
rot->y += this->unk_16E;
} else if (limbIndex == FISHING_FISH_LIMB_0E) {
} else if (limbIndex == FISHING_BASS_LIMB_RIGHT_PECTORAL_FIN) {
rot->y -= this->unk_16A;
} else if (limbIndex == FISHING_FISH_LIMB_0F) {
} else if (limbIndex == FISHING_BASS_LIMB_LEFT_PECTORAL_FIN) {
rot->y += this->unk_16A;
} else if (limbIndex == FISHING_FISH_LIMB_08) {
} else if (limbIndex == FISHING_BASS_LIMB_TOP_REAR_FIN) {
rot->y += this->unk_16C;
} else if (limbIndex == FISHING_FISH_LIMB_09) {
} else if (limbIndex == FISHING_BASS_LIMB_BOTTOM_REAR_FIN) {
rot->y -= this->unk_16C;
}
return false;
}
void EnFishing_FishPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
void EnFishing_BassPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
EnFishing* this = THIS;
if (limbIndex == FISHING_FISH_LIMB_0D) {
if (limbIndex == FISHING_BASS_LIMB_JAW) {
Matrix_MultVec3f(&sFishMouthOffset, &this->fishMouthPos);
}
}
@@ -4210,11 +4211,11 @@ void EnFishing_FishPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec
s32 EnFishing_LoachOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
EnFishing* this = THIS;
if (limbIndex == FISHING_LOACH_LIMB_03) {
if (limbIndex == FISHING_LOACH_LIMB_MIDDLE_SEGMENT) {
rot->y += this->unk_1C4[0];
} else if (limbIndex == FISHING_LOACH_LIMB_04) {
} else if (limbIndex == FISHING_LOACH_LIMB_LOWER_BACK_FIN) {
rot->y += this->unk_1C4[1];
} else if (limbIndex == FISHING_LOACH_LIMB_05) {
} else if (limbIndex == FISHING_LOACH_LIMB_TAIL_FIN) {
rot->y += this->unk_1C4[2];
}
@@ -4225,7 +4226,7 @@ void EnFishing_LoachPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve
static Vec3f sLoachMouthOffset = { 500.0f, 500.0f, 0.0f };
EnFishing* this = THIS;
if (limbIndex == FISHING_LOACH_LIMB_0B) {
if (limbIndex == FISHING_LOACH_LIMB_JAW) {
Matrix_MultVec3f(&sLoachMouthOffset, &this->fishMouthPos);
}
}
@@ -4246,7 +4247,7 @@ void EnFishing_DrawFish(Actor* thisx, PlayState* play) {
Matrix_Translate(0.0f, 0.0f, this->unk_164 * 10.0f * 0.01f, MTXMODE_APPLY);
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnFishing_FishOverrideLimbDraw, EnFishing_FishPostLimbDraw, &this->actor);
EnFishing_BassOverrideLimbDraw, EnFishing_BassPostLimbDraw, &this->actor);
} else {
Matrix_Translate(0.0f, 0.0f, 3000.0f, MTXMODE_APPLY);
Matrix_RotateYF(BINANG_TO_RAD(this->unk_164), MTXMODE_APPLY);
@@ -473,12 +473,12 @@ void EnGrasshopper_Fly(EnGrasshopper* this, PlayState* play) {
this->targetRot.z = (this->actor.world.rot.y - this->targetRot.y) * 0.2f;
targetSpeed = (this->index * 0.1f) + 4.0f;
Math_ApproachF(&this->actor.speed, targetSpeed, 0.4f, 0.7f);
Math_ApproachF(&this->rotationalVelocity, 2000.0f, 1.0f, 50.0f);
Math_SmoothStepToS(&this->actor.world.rot.y, this->targetRot.y, 5, this->rotationalVelocity, 5);
Math_ApproachF(&this->angularVelocity, 2000.0f, 1.0f, 50.0f);
Math_SmoothStepToS(&this->actor.world.rot.y, this->targetRot.y, 5, this->angularVelocity, 5);
if (this->timer == 0) {
if (Rand_ZeroFloat(1.0f) < 0.3f) {
this->waitTimer = Rand_S16Offset(10, 10);
this->rotationalVelocity = 0.0f;
this->angularVelocity = 0.0f;
}
this->targetRot.y = Math_Atan2S(diffX, diffZ);
@@ -606,7 +606,7 @@ void EnGrasshopper_Bounced(EnGrasshopper* this, PlayState* play) {
Math_ApproachF(&this->actor.speed, targetSpeed, 0.4f, 0.8f);
Math_SmoothStepToS(&this->actor.world.rot.z, this->targetRot.z, 5, 0x3E8, 5);
this->targetRot.z *= 0.8f;
Math_SmoothStepToS(&this->actor.world.rot.y, this->targetRot.y, 5, this->rotationalVelocity, 5);
Math_SmoothStepToS(&this->actor.world.rot.y, this->targetRot.y, 5, this->angularVelocity, 5);
if (this->timer == 0) {
this->collider.elements[0].info.toucherFlags |= (TOUCH_ON | TOUCH_SFX_WOOD);
this->timer = 0;
@@ -90,7 +90,7 @@ typedef struct EnGrasshopper {
/* 0x035C */ s16 bankState;
/* 0x035E */ s16 type;
/* 0x0360 */ f32 dragonflyScale;
/* 0x0364 */ f32 rotationalVelocity;
/* 0x0364 */ f32 angularVelocity;
/* 0x0368 */ f32 endFrame;
/* 0x036C */ f32 approachSpeed;
/* 0x0370 */ f32 baseFlyHeight;
@@ -1,9 +1,21 @@
/*
* File: z_en_invadepoh_demo.c
* Overlay: ovl_En_Invadepoh_Demo
* Description:
* Description: Aliens cutscene actors
*
* This actor is responsible for handling the characters that appear in two cutscenes:
* 1. The cutscene where Romani introduces the aliens to the player.
* 2. The cutscene where the aliens abduct the cows and Romani from the barn.
*
* To be more specific, this actor has five variations:
* 1. An alien
* 2. Romani
* 3. A cow (minus the tail)
* 4. The UFO (which appears as a spinning ball of light)
* 5. A cow tail
*/
#include "sys_cfb.h"
#include "z_en_invadepoh_demo.h"
#define FLAGS (ACTOR_FLAG_10)
@@ -15,14 +27,72 @@ void EnInvadepohDemo_Destroy(Actor* thisx, PlayState* play);
void EnInvadepohDemo_Update(Actor* thisx, PlayState* play);
void EnInvadepohDemo_Draw(Actor* thisx, PlayState* play);
void func_80C19AB4(EnInvadepohDemo* this, PlayState* play);
void func_80C19D00(EnInvadepohDemo* this, PlayState* play);
void func_80C19D48(EnInvadepohDemo* this, PlayState* play);
void func_80C19E04(EnInvadepohDemo* this, PlayState* play);
void func_80C19EC0(EnInvadepohDemo* this, PlayState* play);
void func_80C19F7C(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_DoNothing(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Alien_Init(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Romani_Init(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Cow_Init(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Ufo_Init(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_CowTail_Init(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Cow_Destroy(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_CowTail_Destroy(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Alien_Idle(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Alien_FollowPath(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Romani_Idle(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Romani_FollowPath(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Cow_Idle(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Cow_FollowPath(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Ufo_Idle(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Ufo_FollowPath(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_SelectCueAction(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_CowTail_Idle(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Alien_WaitForObject(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Romani_WaitForObject(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Cow_WaitForObject(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_CowTail_WaitForObject(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Alien_Draw(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Romani_Draw(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Cow_Draw(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_Ufo_Draw(EnInvadepohDemo* this, PlayState* play);
void EnInvadepohDemo_CowTail_Draw(EnInvadepohDemo* this, PlayState* play);
#define DRAW_FLAG_SHOULD_DRAW 1
#define EN_INVADEPOH_DEMO_CUEID_NONE -1
typedef enum {
/* 0 */ EN_INVADEPOH_DEMO_ALIEN_CUEID_DO_NOTHING,
/* 1 */ EN_INVADEPOH_DEMO_ALIEN_CUEID_IDLE,
/* 2 */ EN_INVADEPOH_DEMO_ALIEN_CUEID_FOLLOW_PATH_1,
/* 3 */ EN_INVADEPOH_DEMO_ALIEN_CUEID_FOLLOW_PATH_2,
/* 4 */ EN_INVADEPOH_DEMO_ALIEN_CUEID_FOLLOW_PATH_3,
/* 5 */ EN_INVADEPOH_DEMO_ALIEN_CUEID_FOLLOW_PATH_4,
/* 6 */ EN_INVADEPOH_DEMO_ALIEN_CUEID_FOLLOW_PATH_5, // Doesn't seem to be actually used in the final game
/* 7 */ EN_INVADEPOH_DEMO_ALIEN_CUEID_MAX
} EnInvadepohDemoAlienCueId;
typedef enum {
/* 0 */ EN_INVADEPOH_DEMO_ROMANI_CUEID_DO_NOTHING,
/* 1 */ EN_INVADEPOH_DEMO_ROMANI_CUEID_IDLE,
/* 2 */ EN_INVADEPOH_DEMO_ROMANI_CUEID_FOLLOW_PATH,
/* 3 */ EN_INVADEPOH_DEMO_ROMANI_CUEID_MAX
} EnInvadepohDemoRomaniCueId;
typedef enum {
/* 0 */ EN_INVADEPOH_DEMO_COW_CUEID_DO_NOTHING,
/* 1 */ EN_INVADEPOH_DEMO_COW_CUEID_IDLE,
/* 2 */ EN_INVADEPOH_DEMO_COW_CUEID_FOLLOW_PATH_1,
/* 3 */ EN_INVADEPOH_DEMO_COW_CUEID_FOLLOW_PATH_2,
/* 4 */ EN_INVADEPOH_DEMO_COW_CUEID_FOLLOW_PATH_3,
/* 5 */ EN_INVADEPOH_DEMO_COW_CUEID_MAX
} EnInvadepohDemoCowCueId;
typedef enum {
/* 0 */ EN_INVADEPOH_DEMO_UFO_CUEID_DO_NOTHING,
/* 1 */ EN_INVADEPOH_DEMO_UFO_CUEID_IDLE_1,
/* 2 */ EN_INVADEPOH_DEMO_UFO_CUEID_FOLLOW_PATH,
/* 3 */ EN_INVADEPOH_DEMO_UFO_CUEID_IDLE_2, // Doesn't seem to be actually used in the final game
/* 4 */ EN_INVADEPOH_DEMO_UFO_CUEID_MAX
} EnInvadepohDemoUfoCueId;
#if 0
ActorInit En_Invadepoh_Demo_InitVars = {
ACTOR_EN_INVADEPOH_DEMO,
ACTORCAT_PROP,
@@ -35,134 +105,710 @@ ActorInit En_Invadepoh_Demo_InitVars = {
(ActorFunc)EnInvadepohDemo_Draw,
};
// static InitChainEntry sInitChain[] = {
static InitChainEntry D_80C1AA74[] = {
ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 600, ICHAIN_CONTINUE),
ICHAIN_F32(targetArrowOffset, 6000, ICHAIN_CONTINUE),
static s32 sCueTypes[EN_INVADEPOH_DEMO_TYPE_MAX] = {
CS_CMD_ACTOR_CUE_553, // EN_INVADEPOH_DEMO_TYPE_ALIEN
CS_CMD_ACTOR_CUE_554, // EN_INVADEPOH_DEMO_TYPE_ROMANI
CS_CMD_ACTOR_CUE_563, // EN_INVADEPOH_DEMO_TYPE_COW
CS_CMD_ACTOR_CUE_555, // EN_INVADEPOH_DEMO_TYPE_UFO
CS_CAM_STOP, // EN_INVADEPOH_DEMO_TYPE_COW_TAIL
};
static InitChainEntry sAlienInitChain[] = {
ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 600, ICHAIN_CONTINUE), ICHAIN_F32(targetArrowOffset, 6000, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP),
};
// static InitChainEntry sInitChain[] = {
static InitChainEntry D_80C1AA88[] = {
ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneScale, 100, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 100, ICHAIN_CONTINUE),
ICHAIN_F32(targetArrowOffset, 1500, ICHAIN_CONTINUE),
ICHAIN_U8(targetMode, TARGET_MODE_6, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP),
static InitChainEntry sRomaniInitChain[] = {
ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 100, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 100, ICHAIN_CONTINUE), ICHAIN_F32(targetArrowOffset, 1500, ICHAIN_CONTINUE),
ICHAIN_U8(targetMode, TARGET_MODE_6, ICHAIN_CONTINUE), ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP),
};
// static InitChainEntry sInitChain[] = {
static InitChainEntry D_80C1AAA0[] = {
static InitChainEntry sCowInitChain[] = {
ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneScale, 200, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 300, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP),
};
// static InitChainEntry sInitChain[] = {
static InitChainEntry D_80C1AAB0[] = {
ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_CONTINUE),
ICHAIN_VEC3S(shape.rot, 0, ICHAIN_CONTINUE),
ICHAIN_F32(terminalVelocity, -100, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 800, ICHAIN_STOP),
static InitChainEntry sUfoInitChain[] = {
ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_CONTINUE), ICHAIN_VEC3S(shape.rot, 0, ICHAIN_CONTINUE),
ICHAIN_F32(terminalVelocity, -100, ICHAIN_CONTINUE), ICHAIN_VEC3F_DIV1000(scale, 800, ICHAIN_STOP),
};
// static InitChainEntry sInitChain[] = {
static InitChainEntry D_80C1AAC8[] = {
static InitChainEntry sCowTailInitChain[] = {
ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneScale, 100, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 100, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP),
};
#endif
static EnInvadepohDemoFunc sInitFuncs[EN_INVADEPOH_DEMO_TYPE_MAX] = {
EnInvadepohDemo_Alien_Init, // EN_INVADEPOH_DEMO_TYPE_ALIEN
EnInvadepohDemo_Romani_Init, // EN_INVADEPOH_DEMO_TYPE_ROMANI
EnInvadepohDemo_Cow_Init, // EN_INVADEPOH_DEMO_TYPE_COW
EnInvadepohDemo_Ufo_Init, // EN_INVADEPOH_DEMO_TYPE_UFO
EnInvadepohDemo_CowTail_Init, // EN_INVADEPOH_DEMO_TYPE_COW_TAIL
};
extern InitChainEntry D_80C1AA74[];
extern InitChainEntry D_80C1AA88[];
extern InitChainEntry D_80C1AAA0[];
extern InitChainEntry D_80C1AAB0[];
extern InitChainEntry D_80C1AAC8[];
static EnInvadepohDemoFunc sDestroyFuncs[EN_INVADEPOH_DEMO_TYPE_MAX] = {
EnInvadepohDemo_DoNothing, // EN_INVADEPOH_DEMO_TYPE_ALIEN
EnInvadepohDemo_DoNothing, // EN_INVADEPOH_DEMO_TYPE_ROMANI
EnInvadepohDemo_Cow_Destroy, // EN_INVADEPOH_DEMO_TYPE_COW
EnInvadepohDemo_DoNothing, // EN_INVADEPOH_DEMO_TYPE_UFO
EnInvadepohDemo_CowTail_Destroy, // EN_INVADEPOH_DEMO_TYPE_COW_TAIL
};
extern UNK_TYPE D_06000560;
extern UNK_TYPE D_06001D80;
extern UNK_TYPE D_06004264;
extern UNK_TYPE D_06004E98;
extern UNK_TYPE D_06011FC8;
extern UNK_TYPE D_06016588;
static EnInvadepohDemoFunc sAlienCueActionCsFuncs[EN_INVADEPOH_DEMO_ALIEN_CUEID_MAX] = {
EnInvadepohDemo_DoNothing, // EN_INVADEPOH_DEMO_ALIEN_CUEID_DO_NOTHING
EnInvadepohDemo_Alien_Idle, // EN_INVADEPOH_DEMO_ALIEN_CUEID_IDLE
EnInvadepohDemo_Alien_FollowPath, // EN_INVADEPOH_DEMO_ALIEN_CUEID_FOLLOW_PATH_1
EnInvadepohDemo_Alien_FollowPath, // EN_INVADEPOH_DEMO_ALIEN_CUEID_FOLLOW_PATH_2
EnInvadepohDemo_Alien_FollowPath, // EN_INVADEPOH_DEMO_ALIEN_CUEID_FOLLOW_PATH_3
EnInvadepohDemo_Alien_FollowPath, // EN_INVADEPOH_DEMO_ALIEN_CUEID_FOLLOW_PATH_4
EnInvadepohDemo_Alien_FollowPath, // EN_INVADEPOH_DEMO_ALIEN_CUEID_FOLLOW_PATH_5
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C192A0.s")
static EnInvadepohDemoFunc sRomaniCueActionCsFuncs[EN_INVADEPOH_DEMO_ROMANI_CUEID_MAX] = {
EnInvadepohDemo_DoNothing, // EN_INVADEPOH_DEMO_ROMANI_CUEID_DO_NOTHING
EnInvadepohDemo_Romani_Idle, // EN_INVADEPOH_DEMO_ROMANI_CUEID_IDLE
EnInvadepohDemo_Romani_FollowPath, // EN_INVADEPOH_DEMO_ROMANI_CUEID_FOLLOW_PATH
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C192B0.s")
static EnInvadepohDemoFunc sCowCueActionCsFuncs[EN_INVADEPOH_DEMO_COW_CUEID_MAX] = {
EnInvadepohDemo_DoNothing, // EN_INVADEPOH_DEMO_COW_CUEID_DO_NOTHING
EnInvadepohDemo_Cow_Idle, // EN_INVADEPOH_DEMO_COW_CUEID_IDLE
EnInvadepohDemo_Cow_FollowPath, // EN_INVADEPOH_DEMO_COW_CUEID_FOLLOW_PATH_1
EnInvadepohDemo_Cow_FollowPath, // EN_INVADEPOH_DEMO_COW_CUEID_FOLLOW_PATH_2
EnInvadepohDemo_Cow_FollowPath, // EN_INVADEPOH_DEMO_COW_CUEID_FOLLOW_PATH_3
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C19334.s")
static EnInvadepohDemoFunc sUfoCueActionCsFuncs[EN_INVADEPOH_DEMO_UFO_CUEID_MAX] = {
EnInvadepohDemo_DoNothing, // EN_INVADEPOH_DEMO_UFO_CUEID_DO_NOTHING
EnInvadepohDemo_Ufo_Idle, // EN_INVADEPOH_DEMO_UFO_CUEID_IDLE_1
EnInvadepohDemo_Ufo_FollowPath, // EN_INVADEPOH_DEMO_UFO_CUEID_FOLLOW_PATH
EnInvadepohDemo_Ufo_Idle, // EN_INVADEPOH_DEMO_UFO_CUEID_IDLE_2
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C193A8.s")
static EnInvadepohDemoFunc sDrawFuncs[EN_INVADEPOH_DEMO_TYPE_MAX] = {
EnInvadepohDemo_Alien_Draw, // EN_INVADEPOH_DEMO_TYPE_ALIEN
EnInvadepohDemo_Romani_Draw, // EN_INVADEPOH_DEMO_TYPE_ROMANI
EnInvadepohDemo_Cow_Draw, // EN_INVADEPOH_DEMO_TYPE_COW
EnInvadepohDemo_Ufo_Draw, // EN_INVADEPOH_DEMO_TYPE_UFO
EnInvadepohDemo_CowTail_Draw, // EN_INVADEPOH_DEMO_TYPE_COW_TAIL
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C19454.s")
MtxF sAlienLeftEyeBeamMtxF;
MtxF sAlienRightEyeBeamMtxF;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C19498.s")
void EnInvadepohDemo_DoNothing(EnInvadepohDemo* this, PlayState* play) {
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C1950C.s")
void EnInvadepohDemo_Alien_Init(EnInvadepohDemo* this, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sAlienInitChain);
this->actor.flags = ACTOR_FLAG_10 | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_80000000;
this->objectIndex = Object_GetIndex(&play->objectCtx, OBJECT_UCH);
if (this->objectIndex < 0) {
Actor_Kill(&this->actor);
return;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C19548.s")
this->actionFunc = EnInvadepohDemo_Alien_WaitForObject;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C19564.s")
void EnInvadepohDemo_Romani_Init(EnInvadepohDemo* this, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sRomaniInitChain);
this->objectIndex = Object_GetIndex(&play->objectCtx, OBJECT_MA1);
if (this->objectIndex < 0) {
Actor_Kill(&this->actor);
return;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C19590.s")
this->actionFunc = EnInvadepohDemo_Romani_WaitForObject;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C1965C.s")
void EnInvadepohDemo_Cow_Init(EnInvadepohDemo* this, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sCowInitChain);
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_INVADEPOH_DEMO, 0.0f, 0.0f, 0.0f, 0, 0, 0,
EN_INVADEPOH_DEMO_TYPE_COW_TAIL);
this->objectIndex = Object_GetIndex(&play->objectCtx, OBJECT_COW);
if (this->objectIndex < 0) {
Actor_Kill(&this->actor);
return;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C19688.s")
this->actionFunc = EnInvadepohDemo_Cow_WaitForObject;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C19754.s")
void EnInvadepohDemo_Ufo_Init(EnInvadepohDemo* this, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sUfoInitChain);
this->actionFunc = EnInvadepohDemo_SelectCueAction;
this->drawFlags |= DRAW_FLAG_SHOULD_DRAW;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C1985C.s")
void EnInvadepohDemo_CowTail_Init(EnInvadepohDemo* this, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sCowTailInitChain);
this->objectIndex = Object_GetIndex(&play->objectCtx, OBJECT_COW);
if (this->objectIndex < 0) {
Actor_Kill(&this->actor);
return;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C1987C.s")
this->actionFunc = EnInvadepohDemo_CowTail_WaitForObject;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C199BC.s")
void EnInvadepohDemo_Cow_Destroy(EnInvadepohDemo* this, PlayState* play) {
Actor* thisx = &this->actor;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C199EC.s")
if (thisx->child != NULL) {
thisx->child->parent = NULL;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C19AB4.s")
Actor_Kill(thisx->child);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C19D00.s")
void EnInvadepohDemo_CowTail_Destroy(EnInvadepohDemo* this, PlayState* play) {
if (this->actor.parent != NULL) {
this->actor.parent->child = NULL;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C19D48.s")
void EnInvadepohDemo_Alien_Idle(EnInvadepohDemo* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C19E04.s")
void EnInvadepohDemo_Alien_FollowPath(EnInvadepohDemo* this, PlayState* play) {
Path* path = &play->setupPathList[this->pathIndex];
s32 pathCount = path->count;
Vec3s* points = Lib_SegmentedToVirtual(path->points);
Vec3f point;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C19EC0.s")
if (pathCount != 0) {
Math_Vec3s_ToVec3f(&point, &points[this->pointIndex]);
if (Math_Vec3f_StepTo(&this->actor.world.pos, &point, this->speed) < this->speed) {
this->pointIndex++;
if (this->pointIndex >= pathCount) {
Actor_Kill(&this->actor);
}
} else {
SkelAnime_Update(&this->skelAnime);
}
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C19F7C.s")
void EnInvadepohDemo_Romani_Idle(EnInvadepohDemo* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C1A038.s")
void EnInvadepohDemo_Romani_FollowPath(EnInvadepohDemo* this, PlayState* play) {
Path* path = &play->setupPathList[this->pathIndex];
s32 pathCount = path->count;
Vec3s* points = Lib_SegmentedToVirtual(path->points);
Vec3f point;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C1A070.s")
if (pathCount != 0) {
Math_Vec3s_ToVec3f(&point, &points[this->pointIndex]);
if (Math_Vec3f_StepTo(&this->actor.world.pos, &point, this->speed) < this->speed) {
this->pointIndex++;
if (this->pointIndex >= pathCount) {
Actor_Kill(&this->actor);
}
} else {
SkelAnime_Update(&this->skelAnime);
}
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C1A168.s")
/**
* Positions the cow tail actor at the appropriate spot on the cow's body and rotates it to
* match the cow's rotation. This function is also responsible for playing the cow's animation.
*/
void EnInvadepohDemo_Cow_UpdateCommon(EnInvadepohDemo* this, PlayState* play) {
s32 pad;
MtxF mtx;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C1A244.s")
if (this->actor.child != NULL) {
Matrix_Push();
Matrix_SetTranslateRotateYXZ(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
&this->actor.shape.rot);
Matrix_Translate(0.0f, 57.0f, -36.0f, MTXMODE_APPLY);
Matrix_RotateXS(this->actor.shape.rot.x * -0.7f, MTXMODE_APPLY);
Matrix_RotateZS(this->actor.shape.rot.z * -0.7f, MTXMODE_APPLY);
Matrix_MultZero(&this->actor.child->world.pos);
Matrix_Get(&mtx);
Matrix_MtxFToYXZRot(&mtx, &this->actor.child->shape.rot, false);
Matrix_Pop();
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C1A590.s")
SkelAnime_Update(&this->skelAnime);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C1A650.s")
void EnInvadepohDemo_Cow_Idle(EnInvadepohDemo* this, PlayState* play) {
EnInvadepohDemo_Cow_UpdateCommon(this, play);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C1A670.s")
void EnInvadepohDemo_Cow_FollowPath(EnInvadepohDemo* this, PlayState* play) {
Path* path = &play->setupPathList[this->pathIndex];
s32 pathCount = path->count;
Vec3s* points = Lib_SegmentedToVirtual(path->points);
Vec3f point;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C1A6C8.s")
if (pathCount != 0) {
if (((this->cueId == EN_INVADEPOH_DEMO_COW_CUEID_FOLLOW_PATH_1) && (play->csCtx.curFrame == 343)) ||
((this->cueId == EN_INVADEPOH_DEMO_COW_CUEID_FOLLOW_PATH_2) && (play->csCtx.curFrame == 421)) ||
((this->cueId == EN_INVADEPOH_DEMO_COW_CUEID_FOLLOW_PATH_3) && (play->csCtx.curFrame == 521))) {
Actor_PlaySfx(&this->actor, NA_SE_EV_COW_CRY);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/func_80C1A854.s")
Math_Vec3s_ToVec3f(&point, &points[this->pointIndex]);
if (Math_Vec3f_StepTo(&this->actor.world.pos, &point, this->speed) < this->speed) {
this->pointIndex++;
if (this->pointIndex >= pathCount) {
Actor_Kill(&this->actor);
}
} else {
EnInvadepohDemo_Cow_UpdateCommon(this, play);
}
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/EnInvadepohDemo_Init.s")
void EnInvadepohDemo_Ufo_Idle(EnInvadepohDemo* this, PlayState* play) {
this->ufoRotZ += 0x258;
Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_UFO_FLY - SFX_FLAG);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/EnInvadepohDemo_Destroy.s")
void EnInvadepohDemo_Ufo_FollowPath(EnInvadepohDemo* this, PlayState* play) {
Path* path = &play->setupPathList[this->pathIndex];
s32 pathCount = path->count;
Vec3s* points = Lib_SegmentedToVirtual(path->points);
Vec3f point;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/EnInvadepohDemo_Update.s")
if (pathCount != 0) {
this->ufoRotZ += 0x258;
Math_Vec3s_ToVec3f(&point, &points[this->pointIndex]);
if (Math_Vec3f_StepTo(&this->actor.world.pos, &point, this->speed) < this->speed) {
this->pointIndex++;
if (this->pointIndex >= pathCount) {
Actor_Kill(&this->actor);
}
}
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Invadepoh_Demo/EnInvadepohDemo_Draw.s")
/**
* Updates the actor's cue ID if certain conditions are met and calls a function based
* on their current cue ID. Specifically, cows and aliens offset the cue ID from their
* cue channel (which applies to *all* aliens/cows, not just this specific actor), then
* they compare this offset value to a value read from their params. If these two values
* match, the actor's cue ID is updated.
*
* The distinction between a "global" cue ID from the cue channel and a "local" cue ID
* specific to an instance of this actor is used to prevent all the cows or aliens from
* moving along the path at once. The cow or alien waits in a stationary "idle" state
* until the "global" cue ID changes to a specific value; if the cue ID offset matches
* what this actor specifies in its params, then that acts like a signal to tell the
* actor to update the "local" cue ID and start moving. The other cows or aliens in
* the scene should have different params, meaning the cue ID offset will not match;
* they will thus ignore this "global" cue ID change and remain idle.
*/
void EnInvadepohDemo_SelectCueAction(EnInvadepohDemo* this, PlayState* play) {
CsCmdActorCue* cue;
s32 cueIdOffset;
if (Cutscene_IsCueInChannel(play, sCueTypes[this->type])) {
this->cueChannel = Cutscene_GetCueChannel(play, sCueTypes[this->type]);
cue = play->csCtx.actorCues[this->cueChannel];
switch (this->type) {
case EN_INVADEPOH_DEMO_TYPE_UFO:
if (this->cueId != cue->id) {
if (cue->id == EN_INVADEPOH_DEMO_UFO_CUEID_FOLLOW_PATH) {
Actor_PlaySfx(&this->actor, NA_SE_EV_UFO_DASH);
}
this->cueId = cue->id;
}
break;
case EN_INVADEPOH_DEMO_TYPE_ROMANI:
if (this->cueId != cue->id) {
this->cueId = cue->id;
}
break;
case EN_INVADEPOH_DEMO_TYPE_ALIEN:
if (cue->id > EN_INVADEPOH_DEMO_ALIEN_CUEID_IDLE) {
cueIdOffset = cue->id - EN_INVADEPOH_DEMO_ALIEN_CUEID_FOLLOW_PATH_1;
if (this->cueIdOffset != cueIdOffset) {
break;
}
}
if (this->cueId != cue->id) {
this->cueId = cue->id;
}
break;
case EN_INVADEPOH_DEMO_TYPE_COW:
if (cue->id > EN_INVADEPOH_DEMO_COW_CUEID_IDLE) {
cueIdOffset = cue->id - EN_INVADEPOH_DEMO_COW_CUEID_IDLE;
if (this->cueIdOffset != cueIdOffset) {
break;
}
}
if (this->cueId != cue->id) {
this->cueId = cue->id;
}
break;
default:
break;
}
switch (this->type) {
case EN_INVADEPOH_DEMO_TYPE_UFO:
sUfoCueActionCsFuncs[this->cueId](this, play);
break;
case EN_INVADEPOH_DEMO_TYPE_ALIEN:
sAlienCueActionCsFuncs[this->cueId](this, play);
break;
case EN_INVADEPOH_DEMO_TYPE_ROMANI:
sRomaniCueActionCsFuncs[this->cueId](this, play);
break;
case EN_INVADEPOH_DEMO_TYPE_COW:
sCowCueActionCsFuncs[this->cueId](this, play);
break;
default:
break;
}
}
}
void EnInvadepohDemo_CowTail_Idle(EnInvadepohDemo* this, PlayState* play) {
if (this->actor.parent == NULL) {
Actor_Kill(&this->actor);
return;
}
SkelAnime_Update(&this->skelAnime);
}
void EnInvadepohDemo_Alien_WaitForObject(EnInvadepohDemo* this, PlayState* play) {
s32 pad[2];
if (Object_IsLoaded(&play->objectCtx, this->objectIndex)) {
this->actor.objBankIndex = this->objectIndex;
Actor_SetObjectDependency(play, &this->actor);
this->drawFlags |= DRAW_FLAG_SHOULD_DRAW;
this->actionFunc = EnInvadepohDemo_SelectCueAction;
SkelAnime_InitFlex(play, &this->skelAnime, &gAlienSkel, &gAlienFloatAnim, this->jointTable, this->morphTable,
ALIEN_LIMB_MAX);
Animation_PlayLoop(&this->skelAnime, &gAlienFloatAnim);
}
}
void EnInvadepohDemo_Romani_WaitForObject(EnInvadepohDemo* this, PlayState* play) {
s32 pad[2];
if (Object_IsLoaded(&play->objectCtx, this->objectIndex)) {
this->actor.objBankIndex = this->objectIndex;
Actor_SetObjectDependency(play, &this->actor);
this->drawFlags |= DRAW_FLAG_SHOULD_DRAW;
this->actionFunc = EnInvadepohDemo_SelectCueAction;
SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniAbductedAnim, this->jointTable,
this->morphTable, ROMANI_LIMB_MAX);
Animation_PlayLoop(&this->skelAnime, &gRomaniAbductedAnim);
}
}
void EnInvadepohDemo_Cow_WaitForObject(EnInvadepohDemo* this, PlayState* play) {
s32 pad[2];
if (Object_IsLoaded(&play->objectCtx, this->objectIndex)) {
this->actor.objBankIndex = this->objectIndex;
Actor_SetObjectDependency(play, &this->actor);
this->drawFlags |= DRAW_FLAG_SHOULD_DRAW;
this->actionFunc = EnInvadepohDemo_SelectCueAction;
SkelAnime_InitFlex(play, &this->skelAnime, &gCowSkel, &gCowMooAnim, this->jointTable, this->morphTable,
COW_LIMB_MAX);
Animation_PlayLoop(&this->skelAnime, &gCowMooAnim);
}
}
void EnInvadepohDemo_CowTail_WaitForObject(EnInvadepohDemo* this, PlayState* play) {
s32 pad[2];
if (Object_IsLoaded(&play->objectCtx, this->objectIndex)) {
this->actor.objBankIndex = this->objectIndex;
Actor_SetObjectDependency(play, &this->actor);
this->drawFlags |= DRAW_FLAG_SHOULD_DRAW;
this->actionFunc = EnInvadepohDemo_CowTail_Idle;
SkelAnime_InitFlex(play, &this->skelAnime, &gCowTailSkel, &gCowTailSwishAnim, this->jointTable,
this->morphTable, COW_TAIL_LIMB_MAX);
Animation_PlayLoop(&this->skelAnime, &gCowTailSwishAnim);
}
}
void EnInvadepohDemo_Ufo_UpdateMatrixTranslation(Vec3f* translation) {
MtxF* currentMatrix = Matrix_GetCurrent();
currentMatrix->xw = translation->x;
currentMatrix->yw = translation->y;
currentMatrix->zw = translation->z;
}
s32 EnInvadepohDemo_Ufo_ShouldDrawLensFlare(PlayState* play, Vec3f* pos) {
Vec3f projectedPos;
f32 invW;
Actor_GetProjectedPos(play, pos, &projectedPos, &invW);
if ((projectedPos.z > 1.0f) && (fabsf(projectedPos.x * invW) < 1.0f) && (fabsf(projectedPos.y * invW) < 1.0f)) {
f32 screenPosX = PROJECTED_TO_SCREEN_X(projectedPos, invW);
f32 screenPosY = PROJECTED_TO_SCREEN_Y(projectedPos, invW);
s32 wZ = (s32)(projectedPos.z * invW * 16352.0f) + 16352;
if (wZ < SysCfb_GetZBufferInt(screenPosX, screenPosY)) {
return true;
}
}
return false;
}
void EnInvadepohDemo_Alien_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx,
Gfx** gfx) {
if (limbIndex == ALIEN_LIMB_LEFT_EYE) {
Matrix_Push();
Matrix_RotateZS(-0x53ED, MTXMODE_APPLY);
Matrix_RotateYS(-0x3830, MTXMODE_APPLY);
Matrix_Scale(1.0f, 1.0f, 1.5f, MTXMODE_APPLY);
Matrix_Get(&sAlienLeftEyeBeamMtxF);
Matrix_Pop();
} else if (limbIndex == ALIEN_LIMB_RIGHT_EYE) {
Matrix_Push();
Matrix_RotateZS(-0x53ED, MTXMODE_APPLY);
Matrix_RotateYS(-0x47D0, MTXMODE_APPLY);
Matrix_Scale(1.0f, 1.0f, 1.5f, MTXMODE_APPLY);
Matrix_Get(&sAlienRightEyeBeamMtxF);
Matrix_Pop();
}
}
void EnInvadepohDemo_Alien_Draw(EnInvadepohDemo* this, PlayState* play) {
s32 pad[2];
Mtx* mtx;
OPEN_DISPS(play->state.gfxCtx);
Gfx_SetupDL25_Xlu(play->state.gfxCtx);
Gfx_SetupDL25_Opa(play->state.gfxCtx);
Matrix_Push();
AnimatedMat_Draw(play, Lib_SegmentedToVirtual(&gAlienEmptyTexAnim));
Scene_SetRenderModeXlu(play, 0, 1);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
POLY_OPA_DISP =
SkelAnime_DrawFlex(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL,
EnInvadepohDemo_Alien_PostLimbDraw, &this->actor, POLY_OPA_DISP);
// In EnInvadepoh, the eye beam alpha is controlled by an instance variable, and there is an if-block that checks
// to see if this variable is not zero. In this actor, the eye beam alpha is hardcoded, but this block is still
// necessary to prevent reordering; this is likely a result of copy-pasting from EnInvadepoh.
if (true) {
Gfx* gfx;
AnimatedMat_Draw(play, Lib_SegmentedToVirtual(&gAlienEyeBeamTexAnim));
OPEN_DISPS(play->state.gfxCtx);
gfx = POLY_XLU_DISP;
gDPPipeSync(gfx++);
gDPSetPrimColor(gfx++, 0, 0xFF, 240, 180, 100, 60);
gDPSetEnvColor(gfx++, 255, 255, 255, 150);
Matrix_Mult(&sAlienLeftEyeBeamMtxF, MTXMODE_NEW);
mtx = Matrix_NewMtx(play->state.gfxCtx);
if (mtx != NULL) {
gSPMatrix(gfx++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfx++, gAlienEyeBeamDL);
Matrix_Mult(&sAlienRightEyeBeamMtxF, MTXMODE_NEW);
mtx = Matrix_NewMtx(play->state.gfxCtx);
if (mtx != NULL) {
gSPMatrix(gfx++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfx++, gAlienEyeBeamDL);
POLY_XLU_DISP = gfx;
}
}
CLOSE_DISPS(play->state.gfxCtx);
}
CLOSE_DISPS(play->state.gfxCtx);
// In EnInvadepoh, the code to draw the light flash checks an instance variable which is set to true if the actor
// should draw. In this actor, an equivalent variable is checked in EnInvadepohDemo_Draw, so it isn't checked here.
// However, this block is still necessary to prevent reordering; this is likely a result of copy-pasting from
// EnInvadepoh. Similarly, this function requires a lot of extra stack space for unused variables; the names and
// types of these variables are inferred from EnInvadepoh's version of this code.
if (true) {
Gfx* gfx;
Vec3f glowOffset;
Vec3f glowPos; // unused, inferred from EnInvadepoh
s32 glowAlpha; // unused, inferred from EnInvadepoh
OPEN_DISPS(play->state.gfxCtx);
gfx = POLY_XLU_DISP;
gfx = Gfx_SetupDL20_NoCD(gfx);
gDPSetDither(gfx++, G_CD_NOISE);
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
0);
Matrix_Mult(&play->billboardMtxF, MTXMODE_NEW);
Matrix_MultVecZ(90.0f, &glowOffset);
Matrix_Translate(this->actor.world.pos.x + glowOffset.x, this->actor.world.pos.y + glowOffset.y + 25.0f,
this->actor.world.pos.z + glowOffset.z, MTXMODE_NEW);
Matrix_Scale(0.15f, 0.15f, 0.15f, MTXMODE_APPLY);
gSPDisplayList(gfx++, gameplay_keep_DL_029CB0);
gDPSetPrimColor(gfx++, 0, 0, 240, 180, 100, 100);
mtx = Matrix_NewMtx(play->state.gfxCtx);
if (mtx != NULL) {
gSPMatrix(gfx++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfx++, gameplay_keep_DL_029CF0);
POLY_XLU_DISP = gfx;
}
CLOSE_DISPS(play->state.gfxCtx);
}
Matrix_Pop();
}
void EnInvadepohDemo_Romani_Draw(EnInvadepohDemo* this, PlayState* play) {
s32 pad[2];
OPEN_DISPS(play->state.gfxCtx);
Gfx_SetupDL25_Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(&gRomaniEyeSadTex));
gSPSegment(POLY_OPA_DISP++, 0x09, Lib_SegmentedToVirtual(&gRomaniMouthHangingOpenTex));
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL,
NULL, &this->actor);
CLOSE_DISPS(play->state.gfxCtx);
}
s32 EnInvadepohDemo_Cow_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
Actor* thisx) {
if (limbIndex == COW_LIMB_NOSE_RING) {
*dList = NULL;
}
return false;
}
void EnInvadepohDemo_Cow_Draw(EnInvadepohDemo* this, PlayState* play) {
Gfx_SetupDL37_Opa(play->state.gfxCtx);
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnInvadepohDemo_Cow_OverrideLimbDraw, NULL, &this->actor);
}
void EnInvadepohDemo_Ufo_Draw(EnInvadepohDemo* this, PlayState* play) {
s32 pad[2];
Vec3f flashPos = gZeroVec3f;
Mtx* mtx;
flashPos.x = this->actor.world.pos.x;
flashPos.y = this->actor.world.pos.y;
flashPos.z = this->actor.world.pos.z;
EnInvadepohDemo_Ufo_UpdateMatrixTranslation(&flashPos);
Matrix_ReplaceRotation(&play->billboardMtxF);
Matrix_RotateZS(this->ufoRotZ, MTXMODE_APPLY);
OPEN_DISPS(play->state.gfxCtx);
Gfx_SetupDL25_Xlu(play->state.gfxCtx);
mtx = Matrix_NewMtx(play->state.gfxCtx);
if (mtx != NULL) {
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(POLY_XLU_DISP++, 0xFF, 0x80, 255, 255, 0, 180);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 50, 0, 0);
gSPDisplayList(POLY_XLU_DISP++, gEffFlash1DL);
}
CLOSE_DISPS(play->state.gfxCtx);
if (EnInvadepohDemo_Ufo_ShouldDrawLensFlare(play, &flashPos)) {
func_800F9824(play, &play->envCtx, &play->view, play->state.gfxCtx, flashPos, 20.0f, 9.0f, 0, 0);
}
}
void EnInvadepohDemo_CowTail_Draw(EnInvadepohDemo* this, PlayState* play) {
Gfx_SetupDL37_Opa(play->state.gfxCtx);
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL,
NULL, &this->actor);
}
void EnInvadepohDemo_Init(Actor* thisx, PlayState* play) {
s32 pad;
EnInvadepohDemo* this = THIS;
this->cueIdOffset = EN_INVADEPOH_DEMO_GET_CUEID_OFFSET(&this->actor);
this->type = EN_INVADEPOH_DEMO_GET_TYPE(&this->actor);
if ((this->type < EN_INVADEPOH_DEMO_TYPE_ALIEN) || (this->type > EN_INVADEPOH_DEMO_TYPE_COW_TAIL)) {
Actor_Kill(&this->actor);
return;
}
if (this->type == EN_INVADEPOH_DEMO_TYPE_UFO) {
this->actor.world.rot.z = 0;
this->speed = EN_INVADEPOH_DEMO_GET_SPEED(&this->actor);
this->actor.shape.rot.z = this->actor.world.rot.z;
} else {
this->actor.world.rot.z = 0;
this->speed = EN_INVADEPOH_DEMO_GET_SPEED(&this->actor) / 10.0f;
this->actor.shape.rot.z = this->actor.world.rot.z;
}
this->drawFlags = 0;
this->cueId = EN_INVADEPOH_DEMO_CUEID_NONE;
this->ufoRotZ = 0;
this->pathIndex = EN_INVADEPOH_DEMO_GET_PATH_INDEX(&this->actor);
this->pointIndex = 0;
this->objectIndex = -1;
sInitFuncs[this->type](this, play);
}
void EnInvadepohDemo_Destroy(Actor* thisx, PlayState* play) {
s32 pad;
EnInvadepohDemo* this = THIS;
sDestroyFuncs[this->type](this, play);
}
void EnInvadepohDemo_Update(Actor* thisx, PlayState* play) {
s32 pad;
EnInvadepohDemo* this = THIS;
this->actionFunc(this, play);
}
void EnInvadepohDemo_Draw(Actor* thisx, PlayState* play) {
s32 pad;
EnInvadepohDemo* this = THIS;
if ((this->cueId != EN_INVADEPOH_DEMO_CUEID_NONE) && (this->drawFlags & DRAW_FLAG_SHOULD_DRAW)) {
sDrawFuncs[this->type](this, play);
}
}

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