1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-15 04:14:34 +00:00

Merge branch 'master' into doc_pause_menu

This commit is contained in:
Dragorn421 2022-08-30 21:37:59 +02:00
commit 0678609c48
No known key found for this signature in database
GPG key ID: 32B53D2D16FC4118
64 changed files with 1480 additions and 1257 deletions

View file

@ -1,96 +1,106 @@
<Root> <Root>
<!-- Assets for Ganondorf -->
<File Name="object_ganon" Segment="6"> <File Name="object_ganon" Segment="6">
<DList Name="object_ganon_DL_0049C0" Offset="0x49C0"/> <!-- Ganondorf Limb DisplayLists -->
<DList Name="object_ganon_DL_004C08" Offset="0x4C08"/> <DList Name="gGanondorfPelvisDL" Offset="0x49C0"/>
<DList Name="object_ganon_DL_004E08" Offset="0x4E08"/> <DList Name="gGanondorfRightShinDL" Offset="0x4C08"/>
<DList Name="object_ganon_DL_004F20" Offset="0x4F20"/> <DList Name="gGanondorfRightFootDL" Offset="0x4E08"/>
<DList Name="object_ganon_DL_005070" Offset="0x5070"/> <DList Name="gGanondorfRightThighDL" Offset="0x4F20"/>
<DList Name="object_ganon_DL_005270" Offset="0x5270"/> <DList Name="gGanondorfLeftShinDL" Offset="0x5070"/>
<DList Name="object_ganon_DL_005388" Offset="0x5388"/> <DList Name="gGanondorfLeftFootDL" Offset="0x5270"/>
<DList Name="object_ganon_DL_0054D8" Offset="0x54D8"/> <DList Name="gGanondorfLeftThighDL" Offset="0x5388"/>
<DList Name="object_ganon_DL_006030" Offset="0x6030"/> <DList Name="gGanondorfHeadDL" Offset="0x54D8"/>
<DList Name="object_ganon_DL_006198" Offset="0x6198"/> <DList Name="gGanondorfRightUpperLipDL" Offset="0x6030"/>
<DList Name="object_ganon_DL_0062F0" Offset="0x62F0"/> <DList Name="gGanondorfLowerHairEndDL" Offset="0x6198"/>
<DList Name="object_ganon_DL_006460" Offset="0x6460"/> <DList Name="gGanondorfUpperHairEndDL" Offset="0x62F0"/>
<DList Name="object_ganon_DL_0066E8" Offset="0x66E8"/> <DList Name="gGanondorfJawDL" Offset="0x6460"/>
<DList Name="object_ganon_DL_006A28" Offset="0x6A28"/> <DList Name="gGanondorfMouthDL" Offset="0x66E8"/>
<DList Name="object_ganon_DL_006B90" Offset="0x6B90"/> <DList Name="gGanondorfLeftUpperLipDL" Offset="0x6A28"/>
<DList Name="object_ganon_DL_006F20" Offset="0x6F20"/> <DList Name="gGanondorfTorsoDL" Offset="0x6B90"/>
<DList Name="object_ganon_DL_007048" Offset="0x7048"/> <DList Name="gGanondorfRightForearmDL" Offset="0x6F20"/>
<DList Name="object_ganon_DL_007310" Offset="0x7310"/> <DList Name="gGanondorfRightUpperArmDL" Offset="0x7048"/>
<DList Name="object_ganon_DL_007518" Offset="0x7518"/> <DList Name="gGanondorfRightShoulderDL" Offset="0x7310"/>
<DList Name="object_ganon_DL_007640" Offset="0x7640"/> <DList Name="gGanondorfLeftForearmDL" Offset="0x7518"/>
<DList Name="object_ganon_DL_007908" Offset="0x7908"/> <DList Name="gGanondorfLeftUpperArmDL" Offset="0x7640"/>
<DList Name="gGanondorfLeftShoulderDL" Offset="0x7908"/>
<Texture Name="object_ganon_TLUT_007B10" OutName="tlut_00007B10" Format="rgba16" Width="16" Height="16" Offset="0x7B10"/> <!-- Ganondorf Textures -->
<Texture Name="object_ganon_TLUT_007D10" OutName="tlut_00007D10" Format="rgba16" Width="16" Height="16" Offset="0x7D10"/> <Texture Name="gGanondorfSkinTLUT" OutName="ganondorf_skin_tlut" Format="rgba16" Width="16" Height="16" Offset="0x7B10"/>
<Texture Name="object_ganon_Tex_007F10" OutName="tex_00007F10" Format="rgba16" Width="8" Height="8" Offset="0x7F10"/> <Texture Name="gGanondorfHairTLUT" OutName="ganondorf_hair_tlut" Format="rgba16" Width="16" Height="16" Offset="0x7D10"/>
<Texture Name="object_ganon_Tex_007F90" OutName="tex_00007F90" Format="ci8" Width="16" Height="16" Offset="0x7F90" TlutOffset="0x7B10"/> <Texture Name="gGanondorfInnerMouthTex" OutName="ganondorf_inner_mouth" Format="rgba16" Width="8" Height="8" Offset="0x7F10"/>
<Texture Name="object_ganon_Tex_008090" OutName="tex_00008090" Format="ci8" Width="16" Height="16" Offset="0x8090" TlutOffset="0x7D10"/> <Texture Name="gGanondorfJawTex" OutName="ganondorf_jaw" Format="ci8" Width="16" Height="16" Offset="0x7F90" TlutOffset="0x7B10"/>
<Texture Name="object_ganon_Tex_008190" OutName="tex_00008190" Format="rgba16" Width="4" Height="8" Offset="0x8190"/> <Texture Name="gGanondorfSideburnTex" OutName="ganondorf_sideburn" Format="ci8" Width="16" Height="16" Offset="0x8090" TlutOffset="0x7D10"/>
<Texture Name="object_ganon_Tex_0081D0" OutName="tex_000081D0" Format="ci8" Width="16" Height="16" Offset="0x81D0" TlutOffset="0x7B10"/> <Texture Name="gGanondorfOuterMouthTex" OutName="ganondorf_outer_mouth" Format="rgba16" Width="4" Height="8" Offset="0x8190"/>
<Texture Name="object_ganon_Tex_0082D0" OutName="tex_000082D0" Format="ci8" Width="16" Height="16" Offset="0x82D0" TlutOffset="0x7D10"/> <Texture Name="gGanondorfUpperLipTex" OutName="ganondorf_upper_lip" Format="ci8" Width="16" Height="16" Offset="0x81D0" TlutOffset="0x7B10"/>
<Texture Name="object_ganon_Tex_0083D0" OutName="tex_000083D0" Format="rgba16" Width="4" Height="4" Offset="0x83D0"/> <Texture Name="gGanondorfHairTex" OutName="ganondorf_hair" Format="ci8" Width="16" Height="16" Offset="0x82D0" TlutOffset="0x7D10"/>
<Texture Name="object_ganon_Tex_0083F0" OutName="tex_000083F0" Format="ci8" Width="16" Height="8" Offset="0x83F0" TlutOffset="0x7D10"/> <Texture Name="gGanondorfTeethTex" OutName="ganondorf_teeth" Format="rgba16" Width="4" Height="4" Offset="0x83D0"/>
<Texture Name="object_ganon_Tex_008470" OutName="tex_00008470" Format="ci8" Width="16" Height="16" Offset="0x8470" TlutOffset="0x7D10"/> <Texture Name="gGanondorfEyebrowTex" OutName="ganondorf_eyebrow" Format="ci8" Width="16" Height="8" Offset="0x83F0" TlutOffset="0x7D10"/>
<Texture Name="object_ganon_Tex_008570" OutName="tex_00008570" Format="rgba16" Width="4" Height="16" Offset="0x8570"/> <Texture Name="gGanondorfHairFringeTex" OutName="ganondorf_hair_fringe" Format="ci8" Width="16" Height="16" Offset="0x8470" TlutOffset="0x7D10"/>
<Texture Name="object_ganon_Tex_0085F0" OutName="tex_000085F0" Format="ci8" Width="8" Height="8" Offset="0x85F0" TlutOffset="0x7B10"/> <Texture Name="gGanondorfNoseBridgeTex" OutName="ganondorf_nose_bridge" Format="rgba16" Width="4" Height="16" Offset="0x8570"/>
<Texture Name="object_ganon_Tex_008630" OutName="tex_00008630" Format="rgba16" Width="8" Height="16" Offset="0x8630"/> <Texture Name="gGanondorfNoseTex" OutName="ganondorf_nose" Format="ci8" Width="8" Height="8" Offset="0x85F0" TlutOffset="0x7B10"/>
<Texture Name="object_ganon_Tex_008730" OutName="tex_00008730" Format="ci8" Width="32" Height="16" Offset="0x8730" TlutOffset="0x7B10"/> <Texture Name="gGanondorfEarTex" OutName="ganondorf_ear" Format="rgba16" Width="8" Height="16" Offset="0x8630"/>
<Texture Name="object_ganon_Tex_008930" OutName="tex_00008930" Format="rgba16" Width="16" Height="16" Offset="0x8930"/> <Texture Name="gGanondorfEyeOrbitTex" OutName="ganondorf_eye_orbit" Format="ci8" Width="32" Height="16" Offset="0x8730" TlutOffset="0x7B10"/>
<Texture Name="object_ganon_Tex_008B30" OutName="tex_00008B30" Format="rgba16" Width="16" Height="16" Offset="0x8B30"/> <Texture Name="gGanondorfGerudoFabricTex" OutName="ganondorf_gerudo_fabric" Format="rgba16" Width="16" Height="16" Offset="0x8930"/>
<Texture Name="object_ganon_Tex_008D30" OutName="tex_00008D30" Format="rgba16" Width="8" Height="8" Offset="0x8D30"/> <Texture Name="gGanondorfRedFabricTex" OutName="ganondorf_red_fabric" Format="rgba16" Width="16" Height="16" Offset="0x8B30"/>
<Texture Name="object_ganon_Tex_008DB0" OutName="tex_00008DB0" Format="rgba16" Width="16" Height="16" Offset="0x8DB0"/> <Texture Name="gGanondorfBodysuitTex" OutName="ganondorf_bodysuit" Format="rgba16" Width="8" Height="8" Offset="0x8D30"/>
<Texture Name="object_ganon_Tex_008FB0" OutName="tex_00008FB0" Format="rgba16" Width="16" Height="16" Offset="0x8FB0"/> <Texture Name="gGanondorfLeatherTex" OutName="ganondorf_leather" Format="rgba16" Width="16" Height="16" Offset="0x8DB0"/>
<Texture Name="object_ganon_Tex_0091B0" OutName="tex_000091B0" Format="rgba16" Width="32" Height="16" Offset="0x91B0"/> <Texture Name="gGanondorfCapeFasteningTex" OutName="ganondorf_cape_fastening" Format="rgba16" Width="16" Height="16" Offset="0x8FB0"/>
<Texture Name="object_ganon_TLUT_0095B0" OutName="tlut_000095B0" Format="rgba16" Width="56" Height="1" Offset="0x95B0"/> <Texture Name="gGanondorfGerudoFabricWithSunTex" OutName="ganondorf_gerudo_fabric_with_sun" Format="rgba16" Width="32" Height="16" Offset="0x91B0"/>
<Texture Name="object_ganon_Tex_009620" OutName="tex_00009620" Format="rgba16" Width="16" Height="32" Offset="0x9620"/> <Texture Name="gGanondorfHandTLUT" OutName="ganondorf_hand_tlut" Format="rgba16" Width="56" Height="1" Offset="0x95B0"/>
<Texture Name="gDorfEyeTex" OutName="dorf_eye" Format="rgba16" Width="32" Height="16" Offset="0x9A20"/> <Texture Name="gGanondorfJewelTex" OutName="ganondorf_jewel" Format="rgba16" Width="16" Height="32" Offset="0x9620"/>
<Texture Name="object_ganon_Tex_009E20" OutName="tex_00009E20" Format="rgba16" Width="16" Height="16" Offset="0x9E20"/> <Texture Name="gGanondorfNormalEyeTex" OutName="ganondorf_normal_eye" Format="rgba16" Width="32" Height="16" Offset="0x9A20"/>
<Texture Name="object_ganon_Tex_00A020" OutName="tex_0000A020" Format="rgba16" Width="16" Height="16" Offset="0xA020"/> <Texture Name="gGanondorfChestJewelTex" OutName="ganondorf_chest_jewel" Format="rgba16" Width="16" Height="16" Offset="0x9E20"/>
<Texture Name="object_ganon_Tex_00A220" OutName="tex_0000A220" Format="ci8" Width="8" Height="8" Offset="0xA220" TlutOffset="0x95B0"/> <Texture Name="gGanondorfBlackLeatherTex" OutName="ganondorf_black_leather" Format="rgba16" Width="16" Height="16" Offset="0xA020"/>
<Texture Name="object_ganon_Tex_00A260" OutName="tex_0000A260" Format="rgba16" Width="16" Height="16" Offset="0xA260"/> <Texture Name="gGanondorfThumbTex" OutName="ganondorf_thumb" Format="ci8" Width="8" Height="8" Offset="0xA220" TlutOffset="0x95B0"/>
<Texture Name="object_ganon_Tex_00A460" OutName="tex_0000A460" Format="ci8" Width="8" Height="8" Offset="0xA460" TlutOffset="0x95B0"/> <Texture Name="gGanondorfGauntletAndPauldronTex" OutName="ganondorf_gauntlet_and_pauldron" Format="rgba16" Width="16" Height="16" Offset="0xA260"/>
<Texture Name="object_ganon_Tex_00A4A0" OutName="tex_0000A4A0" Format="ci8" Width="8" Height="8" Offset="0xA4A0" TlutOffset="0x95B0"/> <Texture Name="gGanondorfHandSideTex" OutName="ganondorf_hand_side" Format="ci8" Width="8" Height="8" Offset="0xA460" TlutOffset="0x95B0"/>
<Texture Name="object_ganon_Tex_00A4E0" OutName="tex_0000A4E0" Format="rgba16" Width="32" Height="16" Offset="0xA4E0"/> <Texture Name="gGanondorfFingerTex" OutName="ganondorf_finger" Format="ci8" Width="8" Height="8" Offset="0xA4A0" TlutOffset="0x95B0"/>
<Texture Name="object_ganon_Tex_00A8E0" OutName="tex_0000A8E0" Format="rgba16" Width="32" Height="16" Offset="0xA8E0"/> <Texture Name="gGanondorfCrazedEyeTex" OutName="ganondorf_crazed_eye" Format="rgba16" Width="32" Height="16" Offset="0xA4E0"/>
<Texture Name="gGanondorfEmptyEyeTex" OutName="ganondorf_empty_eye" Format="rgba16" Width="32" Height="16" Offset="0xA8E0"/>
<DList Name="object_ganon_DL_00BE90" Offset="0xBE90"/> <!-- DisplayList for Ganondorf's eyes -->
<DList Name="object_ganon_DL_00BF40" Offset="0xBF40"/> <DList Name="gGanondorfEyesDL" Offset="0xBE90"/>
<DList Name="object_ganon_DL_00C048" Offset="0xC048"/>
<DList Name="object_ganon_DL_00C518" Offset="0xC518"/>
<DList Name="gDorfOpenHandDL" Offset="0xC9E8"/>
<Texture Name="gDorfTitleCardTex" OutName="ganondorf_title_card" Format="i8" Width="128" Height="40" Offset="0xCF00"/> <!-- Ganondorf Limb DisplayLists -->
<DList Name="gGanondorfJewelDL" Offset="0xBF40"/>
<DList Name="gGanondorfLeftHandDL" Offset="0xC048"/>
<DList Name="gGanondorfRightHandClosedDL" Offset="0xC518"/>
<DList Name="gGanondorfRightHandOpenDL" Offset="0xC9E8"/>
<Animation Name="object_ganon_Anim_011348" Offset="0x11348"/> <!-- Ganondorf Title Card Texture -->
<Texture Name="gGanondorfTitleCardTex" OutName="ganondorf_title_card" Format="i8" Width="128" Height="40" Offset="0xCF00"/>
<Limb Name="object_ganon_Limb_011358" LimbType="Standard" Offset="0x11358"/> <!-- Ganondorf Animation -->
<Limb Name="object_ganon_Limb_011364" LimbType="Standard" Offset="0x11364"/> <Animation Name="gGanondorfEndingFloatAnim" Offset="0x11348"/> <!-- Original name is "ONOLEE" (lit. "Curse you!" from his in-game dialogue) -->
<Limb Name="object_ganon_Limb_011370" LimbType="Standard" Offset="0x11370"/>
<Limb Name="object_ganon_Limb_01137C" LimbType="Standard" Offset="0x1137C"/>
<Limb Name="object_ganon_Limb_011388" LimbType="Standard" Offset="0x11388"/>
<Limb Name="object_ganon_Limb_011394" LimbType="Standard" Offset="0x11394"/>
<Limb Name="object_ganon_Limb_0113A0" LimbType="Standard" Offset="0x113A0"/>
<Limb Name="object_ganon_Limb_0113AC" LimbType="Standard" Offset="0x113AC"/>
<Limb Name="object_ganon_Limb_0113B8" LimbType="Standard" Offset="0x113B8"/>
<Limb Name="object_ganon_Limb_0113C4" LimbType="Standard" Offset="0x113C4"/>
<Limb Name="object_ganon_Limb_0113D0" LimbType="Standard" Offset="0x113D0"/>
<Limb Name="object_ganon_Limb_0113DC" LimbType="Standard" Offset="0x113DC"/>
<Limb Name="object_ganon_Limb_0113E8" LimbType="Standard" Offset="0x113E8"/>
<Limb Name="object_ganon_Limb_0113F4" LimbType="Standard" Offset="0x113F4"/>
<Limb Name="object_ganon_Limb_011400" LimbType="Standard" Offset="0x11400"/>
<Limb Name="object_ganon_Limb_01140C" LimbType="Standard" Offset="0x1140C"/>
<Limb Name="object_ganon_Limb_011418" LimbType="Standard" Offset="0x11418"/>
<Limb Name="object_ganon_Limb_011424" LimbType="Standard" Offset="0x11424"/>
<Limb Name="object_ganon_Limb_011430" LimbType="Standard" Offset="0x11430"/>
<Limb Name="object_ganon_Limb_01143C" LimbType="Standard" Offset="0x1143C"/>
<Limb Name="object_ganon_Limb_011448" LimbType="Standard" Offset="0x11448"/>
<Limb Name="object_ganon_Limb_011454" LimbType="Standard" Offset="0x11454"/>
<Limb Name="object_ganon_Limb_011460" LimbType="Standard" Offset="0x11460"/>
<Limb Name="object_ganon_Limb_01146C" LimbType="Standard" Offset="0x1146C"/>
<Limb Name="object_ganon_Limb_011478" LimbType="Standard" Offset="0x11478"/>
<Skeleton Name="gDorfSkel" Type="Flex" LimbType="Standard" Offset="0x114E8"/> <!-- Ganondorf Limbs -->
<Limb Name="gGanondorfRootLimb" LimbType="Standard" Offset="0x11358"/>
<Limb Name="gGanondorfTorsoLimb" LimbType="Standard" Offset="0x11364"/>
<Limb Name="gGanondorfLeftShoulderLimb" LimbType="Standard" Offset="0x11370"/>
<Limb Name="gGanondorfLeftUpperArmLimb" LimbType="Standard" Offset="0x1137C"/>
<Limb Name="gGanondorfLeftForearmLimb" LimbType="Standard" Offset="0x11388"/>
<Limb Name="gGanondorfLeftHandLimb" LimbType="Standard" Offset="0x11394"/>
<Limb Name="gGanondorfRightShoulderLimb" LimbType="Standard" Offset="0x113A0"/>
<Limb Name="gGanondorfRightUpperArmLimb" LimbType="Standard" Offset="0x113AC"/>
<Limb Name="gGanondorfRightForearmLimb" LimbType="Standard" Offset="0x113B8"/>
<Limb Name="gGanondorfRightHandLimb" LimbType="Standard" Offset="0x113C4"/>
<Limb Name="gGanondorfJewelLimb" LimbType="Standard" Offset="0x113D0"/>
<Limb Name="gGanondorfLeftUpperLipLimb" LimbType="Standard" Offset="0x113DC"/>
<Limb Name="gGanondorfMouthLimb" LimbType="Standard" Offset="0x113E8"/>
<Limb Name="gGanondorfJawLimb" LimbType="Standard" Offset="0x113F4"/>
<Limb Name="gGanondorfUpperHairEndLimb" LimbType="Standard" Offset="0x11400"/>
<Limb Name="gGanondorfLowerHairEndLimb" LimbType="Standard" Offset="0x1140C"/>
<Limb Name="gGanondorfRightUpperLipLimb" LimbType="Standard" Offset="0x11418"/>
<Limb Name="gGanondorfHeadLimb" LimbType="Standard" Offset="0x11424"/>
<Limb Name="gGanondorfPelvisLimb" LimbType="Standard" Offset="0x11430"/>
<Limb Name="gGanondorfLeftThighLimb" LimbType="Standard" Offset="0x1143C"/>
<Limb Name="gGanondorfLeftShinLimb" LimbType="Standard" Offset="0x11448"/>
<Limb Name="gGanondorfLeftFootLimb" LimbType="Standard" Offset="0x11454"/>
<Limb Name="gGanondorfRightThighLimb" LimbType="Standard" Offset="0x11460"/>
<Limb Name="gGanondorfRightShinLimb" LimbType="Standard" Offset="0x1146C"/>
<Limb Name="gGanondorfRightFootLimb" LimbType="Standard" Offset="0x11478"/>
<!-- Ganondorf Skeleton -->
<Skeleton Name="gGanondorfSkel" Type="Flex" LimbType="Standard" Offset="0x114E8"/>
</File> </File>
</Root> </Root>

View file

@ -1,158 +1,174 @@
<Root> <Root>
<!-- Assets for Ganon -->
<File Name="object_ganon2" Segment="6"> <File Name="object_ganon2" Segment="6">
<Animation Name="object_ganon2_Anim_003B1C" Offset="0x3B1C"/> <!-- Ganon Animations -->
<Animation Name="object_ganon2_Anim_007288" Offset="0x7288"/> <Animation Name="gGanonFinalBlowAnim" Offset="0x3B1C"/> <!-- Original name is "Last_hit_motion1" -->
<Animation Name="object_ganon2_Anim_008EB8" Offset="0x8EB8"/> <Animation Name="gGanonDeadStartAnim" Offset="0x7288"/> <!-- Original name is "Last_hit_motion2" -->
<Animation Name="object_ganon2_Anim_009654" Offset="0x9654"/> <Animation Name="gGanonDeadLoopAnim" Offset="0x8EB8"/> <!-- Original name is "Last_mogaki" ("writhing") -->
<Animation Name="object_ganon2_Anim_00ADD0" Offset="0xADD0"/> <Animation Name="gGanonGuardToWalk" Offset="0x9654"/> <!-- Unused. Original name is "gn2_K_to_walk" -->
<Animation Name="object_ganon2_Anim_00CAF8" Offset="0xCAF8"/> <Animation Name="gGanonLeftSwordSwingAnim" Offset="0xADD0"/> <!-- Original name is "gn2_Katack01L" -->
<Animation Name="object_ganon2_Anim_00DFF0" Offset="0xDFF0"/> <Animation Name="gGanonRightSwordSwingAnim" Offset="0xCAF8"/> <!-- Original name is "gn2_Katack01R" -->
<Animation Name="object_ganon2_Anim_00E8EC" Offset="0xE8EC"/> <Animation Name="gGanonDamageAnim" Offset="0xDFF0"/> <!-- Original name is "gn2_Kdamage" -->
<Animation Name="object_ganon2_Anim_00F1D0" Offset="0xF1D0"/> <Animation Name="gGanonGuardWalkAnim" Offset="0xE8EC"/> <!-- Original name is "gn2_Kfrontwalk" -->
<Animation Name="object_ganon2_Anim_00FFE4" Offset="0xFFE4"/> <Animation Name="gGanonGuardSidestepAnim" Offset="0xF1D0"/> <!-- Unused. Original name is "gn2_Ksidewalk" -->
<DList Name="object_ganon2_DL_0163F0" Offset="0x163F0"/> <Animation Name="gGanonGuardIdleAnim" Offset="0xFFE4"/> <!-- Original name is "gn2_Kwait" -->
<DList Name="object_ganon2_DL_016630" Offset="0x16630"/>
<DList Name="object_ganon2_DL_016740" Offset="0x16740"/> <!-- Ganon Limb DisplayLists -->
<DList Name="object_ganon2_DL_0168E0" Offset="0x168E0"/> <DList Name="gGanonPelvisDL" Offset="0x163F0"/>
<DList Name="object_ganon2_DL_016AA8" Offset="0x16AA8"/> <DList Name="gGanonTail1DL" Offset="0x16630"/>
<DList Name="object_ganon2_DL_016BE8" Offset="0x16BE8"/> <DList Name="gGanonTail2DL" Offset="0x16740"/>
<DList Name="object_ganon2_DL_016D10" Offset="0x16D10"/> <DList Name="gGanonTail3DL" Offset="0x168E0"/>
<DList Name="object_ganon2_DL_016F80" Offset="0x16F80"/> <DList Name="gGanonTail4DL" Offset="0x16AA8"/>
<DList Name="object_ganon2_DL_017160" Offset="0x17160"/> <DList Name="gGanonTail5DL" Offset="0x16BE8"/>
<DList Name="object_ganon2_DL_017620" Offset="0x17620"/> <DList Name="gGanonRightShinDL" Offset="0x16D10"/>
<DList Name="object_ganon2_DL_017910" Offset="0x17910"/> <DList Name="gGanonRightFootDL" Offset="0x16F80"/>
<DList Name="object_ganon2_DL_017AF0" Offset="0x17AF0"/> <DList Name="gGanonRightThighDL" Offset="0x17160"/>
<DList Name="object_ganon2_DL_017FB0" Offset="0x17FB0"/> <DList Name="gGanonLeftShinDL" Offset="0x17620"/>
<DList Name="object_ganon2_DL_0180E0" Offset="0x180E0"/> <DList Name="gGanonLeftFootDL" Offset="0x17910"/>
<DList Name="object_ganon2_DL_018650" Offset="0x18650"/> <DList Name="gGanonLeftThighDL" Offset="0x17AF0"/>
<DList Name="object_ganon2_DL_018740" Offset="0x18740"/> <DList Name="gGanonNeckDL" Offset="0x17FB0"/>
<DList Name="object_ganon2_DL_018828" Offset="0x18828"/> <DList Name="gGanonHeadDL" Offset="0x180E0"/>
<DList Name="object_ganon2_DL_0188D8" Offset="0x188D8"/> <DList Name="gGanonRightHair3DL" Offset="0x18650"/>
<DList Name="object_ganon2_DL_0189C8" Offset="0x189C8"/> <DList Name="gGanonRightHair2DL" Offset="0x18740"/>
<DList Name="object_ganon2_DL_018AB0" Offset="0x18AB0"/> <DList Name="gGanonRightHair1DL" Offset="0x18828"/>
<DList Name="object_ganon2_DL_018B60" Offset="0x18B60"/> <DList Name="gGanonLeftHair3DL" Offset="0x188D8"/>
<DList Name="object_ganon2_DL_018EA0" Offset="0x18EA0"/> <DList Name="gGanonLeftHair2DL" Offset="0x189C8"/>
<DList Name="object_ganon2_DL_019210" Offset="0x19210"/> <DList Name="gGanonLeftHair1DL" Offset="0x18AB0"/>
<DList Name="object_ganon2_DL_019330" Offset="0x19330"/> <DList Name="gGanonJawDL" Offset="0x18B60"/>
<DList Name="object_ganon2_DL_019420" Offset="0x19420"/> <DList Name="gGanonMouthDL" Offset="0x18EA0"/>
<DList Name="object_ganon2_DL_019510" Offset="0x19510"/> <DList Name="gGanonSnoutDL" Offset="0x19210"/>
<DList Name="object_ganon2_DL_0195C0" Offset="0x195C0"/> <DList Name="gGanonMiddleHair3DL" Offset="0x19330"/>
<DList Name="object_ganon2_DL_019A40" Offset="0x19A40"/> <DList Name="gGanonMiddleHair2DL" Offset="0x19420"/>
<DList Name="object_ganon2_DL_019C68" Offset="0x19C68"/> <DList Name="gGanonMiddleHair1DL" Offset="0x19510"/>
<DList Name="object_ganon2_DL_019F48" Offset="0x19F48"/> <DList Name="gGanonTorsoDL" Offset="0x195C0"/>
<DList Name="object_ganon2_DL_01A050" Offset="0x1A050"/> <DList Name="gGanonRightShoulderDL" Offset="0x19A40"/>
<DList Name="object_ganon2_DL_01A4E0" Offset="0x1A4E0"/> <DList Name="gGanonRightForearmDL" Offset="0x19C68"/>
<DList Name="object_ganon2_DL_01A708" Offset="0x1A708"/> <DList Name="gGanonRightWristDL" Offset="0x19F48"/>
<DList Name="object_ganon2_DL_01A9E8" Offset="0x1A9E8"/> <DList Name="gGanonRightUpperArmDL" Offset="0x1A050"/>
<DList Name="object_ganon2_DL_01AAF0" Offset="0x1AAF0"/> <DList Name="gGanonLeftShoulderDL" Offset="0x1A4E0"/>
<Texture Name="object_ganon2_TLUT_01AF80" OutName="tlut_0001AF80" Format="rgba16" Width="16" Height="16" Offset="0x1AF80"/> <DList Name="gGanonLeftForearmDL" Offset="0x1A708"/>
<Texture Name="object_ganon2_TLUT_01B180" OutName="tlut_0001B180" Format="rgba16" Width="16" Height="16" Offset="0x1B180"/> <DList Name="gGanonLeftWristDL" Offset="0x1A9E8"/>
<Blob Name="object_ganon2_Blob_01B380" Size="0x200" Offset="0x1B380"/> <DList Name="gGanonLeftUpperArmDL" Offset="0x1AAF0"/>
<Texture Name="object_ganon2_TLUT_01B580" OutName="tlut_0001B580" Format="rgba16" Width="16" Height="16" Offset="0x1B580"/>
<Texture Name="object_ganon2_TLUT_01B780" OutName="tlut_0001B780" Format="rgba16" Width="16" Height="16" Offset="0x1B780"/> <!-- Ganon Textures -->
<Texture Name="object_ganon2_TLUT_01B980" OutName="tlut_0001B980" Format="rgba16" Width="16" Height="16" Offset="0x1B980"/> <Texture Name="gGanonBodyTLUT" OutName="ganon_body_tlut" Format="rgba16" Width="16" Height="16" Offset="0x1AF80"/>
<Texture Name="object_ganon2_TLUT_01BB80" OutName="tlut_0001BB80" Format="rgba16" Width="16" Height="16" Offset="0x1BB80"/> <Texture Name="gGanonHairFringeTLUT" OutName="ganon_hair_fringe_tlut" Format="rgba16" Width="16" Height="16" Offset="0x1B180"/>
<Texture Name="object_ganon2_TLUT_01BD80" OutName="tlut_0001BD80" Format="rgba16" Width="16" Height="16" Offset="0x1BD80"/> <Texture Name="gGanonUnusedTLUT" OutName="ganon_unused_tlut" Format="rgba16" Width="16" Height="16" Offset="0x1B380"/>
<Texture Name="object_ganon2_TLUT_01BF80" OutName="tlut_0001BF80" Format="rgba16" Width="16" Height="16" Offset="0x1BF80"/> <Texture Name="gGanonGerudoFabricTLUT" OutName="ganon_gerudo_fabric_tlut" Format="rgba16" Width="16" Height="16" Offset="0x1B580"/>
<Texture Name="object_ganon2_Tex_01C180" OutName="tex_0001C180" Format="rgba16" Width="8" Height="16" Offset="0x1C180"/> <Texture Name="gGanonRedFabricTLUT" OutName="ganon_red_fabric_tlut" Format="rgba16" Width="16" Height="16" Offset="0x1B780"/>
<Texture Name="object_ganon2_Tex_01C280" OutName="tex_0001C280" Format="rgba16" Width="8" Height="16" Offset="0x1C280"/> <Texture Name="gGanonBlackLeatherAndPauldronTLUT" OutName="ganon_black_metal_and_pauldron_tlut" Format="rgba16" Width="16" Height="16" Offset="0x1B980"/>
<Texture Name="object_ganon2_Tex_01C380" OutName="tex_0001C380" Format="rgba16" Width="8" Height="8" Offset="0x1C380"/> <Texture Name="gGanonLeatherTLUT" OutName="ganon_leather_tlut" Format="rgba16" Width="16" Height="16" Offset="0x1BB80"/>
<Texture Name="object_ganon2_Tex_01C400" OutName="tex_0001C400" Format="ci8" Width="32" Height="32" Offset="0x1C400" TlutOffset="0x1AF80"/> <Texture Name="gGanonHoofTLUT" OutName="ganon_hoof_tlut" Format="rgba16" Width="16" Height="16" Offset="0x1BD80"/>
<Texture Name="object_ganon2_Tex_01C800" OutName="tex_0001C800" Format="rgba16" Width="8" Height="16" Offset="0x1C800"/> <Texture Name="gGanonTailTLUT" OutName="ganon_tail_tlut" Format="rgba16" Width="16" Height="16" Offset="0x1BF80"/>
<Texture Name="object_ganon2_Tex_01C900" OutName="tex_0001C900" Format="rgba16" Width="8" Height="16" Offset="0x1C900"/> <Texture Name="gGanonHairTex" OutName="ganon_hair" Format="rgba16" Width="8" Height="16" Offset="0x1C180"/>
<Texture Name="object_ganon2_Tex_01CA00" OutName="tex_0001CA00" Format="ci8" Width="32" Height="16" Offset="0x1CA00" TlutOffset="0x1B180"/> <Texture Name="gGanonMouthTex" OutName="ganon_mouth" Format="rgba16" Width="8" Height="16" Offset="0x1C280"/>
<Texture Name="object_ganon2_Tex_01CC00" OutName="tex_0001CC00" Format="ci8" Width="16" Height="16" Offset="0x1CC00" TlutOffset="0x1B580"/> <Texture Name="gGanonFacialHairTex" OutName="ganon_facial_hair" Format="rgba16" Width="8" Height="8" Offset="0x1C380"/>
<Texture Name="object_ganon2_Tex_01CD00" OutName="tex_0001CD00" Format="rgba16" Width="16" Height="16" Offset="0x1CD00"/> <Texture Name="gGanonBodyTex" OutName="ganon_body" Format="ci8" Width="32" Height="32" Offset="0x1C400" TlutOffset="0x1AF80"/>
<Texture Name="object_ganon2_Tex_01CF00" OutName="tex_0001CF00" Format="ci8" Width="16" Height="16" Offset="0x1CF00" TlutOffset="0x1B780"/> <Texture Name="gGanonSnoutFrontTex" OutName="ganon_snout_front" Format="rgba16" Width="8" Height="16" Offset="0x1C800"/>
<Texture Name="object_ganon2_Tex_01D000" OutName="tex_0001D000" Format="ci8" Width="16" Height="16" Offset="0x1D000" TlutOffset="0x1B980"/> <Texture Name="gGanonSnoutSideTex" OutName="ganon_snout_side" Format="rgba16" Width="8" Height="16" Offset="0x1C900"/>
<Texture Name="object_ganon2_Tex_01D100" OutName="tex_0001D100" Format="ci8" Width="16" Height="16" Offset="0x1D100" TlutOffset="0x1B780"/> <Texture Name="gGanonHairFringeTex" OutName="ganon_hair_fringe" Format="ci8" Width="32" Height="16" Offset="0x1CA00" TlutOffset="0x1B180"/>
<Texture Name="object_ganon2_Tex_01D200" OutName="tex_0001D200" Format="ci8" Width="16" Height="16" Offset="0x1D200" TlutOffset="0x1B980"/> <Texture Name="gGanonGerudoFabricTex" OutName="ganon_gerudo_fabric" Format="ci8" Width="16" Height="16" Offset="0x1CC00" TlutOffset="0x1B580"/>
<Texture Name="object_ganon2_Tex_01D300" OutName="tex_0001D300" Format="ci8" Width="16" Height="16" Offset="0x1D300" TlutOffset="0x1BB80"/> <Texture Name="gGanonFurTuftTex" OutName="ganon_fur_tuft" Format="rgba16" Width="16" Height="16" Offset="0x1CD00"/>
<Texture Name="object_ganon2_Tex_01D400" OutName="tex_0001D400" Format="ci8" Width="16" Height="16" Offset="0x1D400" TlutOffset="0x1BD80"/> <Texture Name="gGanonRedFabricTex" OutName="ganon_red_fabric" Format="ci8" Width="16" Height="16" Offset="0x1CF00" TlutOffset="0x1B780"/>
<Texture Name="object_ganon2_Tex_01D500" OutName="tex_0001D500" Format="rgba16" Width="4" Height="16" Offset="0x1D500"/> <Texture Name="gGanonPauldronTex" OutName="ganon_pauldron" Format="ci8" Width="16" Height="16" Offset="0x1D000" TlutOffset="0x1B980"/>
<Texture Name="object_ganon2_Tex_01D580" OutName="tex_0001D580" Format="ci8" Width="16" Height="32" Offset="0x1D580" TlutOffset="0x1BF80"/> <Texture Name="gGanonCapeFasteningTex" OutName="ganon_cape_fastening" Format="ci8" Width="16" Height="16" Offset="0x1D100" TlutOffset="0x1B780"/>
<Texture Name="object_ganon2_TLUT_01D780" OutName="tlut_0001D780" Format="rgba16" Width="4" Height="4" Offset="0x1D780"/> <Texture Name="gGanonBlackLeatherTex" OutName="ganon_black_leather" Format="ci8" Width="16" Height="16" Offset="0x1D200" TlutOffset="0x1B980"/>
<Texture Name="object_ganon2_TLUT_01D7A8" OutName="tlut_0001D7A8" Format="rgba16" Width="16" Height="11" Offset="0x1D7A8"/> <Texture Name="gGanonLeatherTex" OutName="ganon_leather" Format="ci8" Width="16" Height="16" Offset="0x1D300" TlutOffset="0x1BB80"/>
<Texture Name="object_ganon2_Tex_01D908" OutName="tex_0001D908" Format="ci8" Width="32" Height="32" Offset="0x1D908" TlutOffset="0x1D7A8"/> <Texture Name="gGanonHoofTex" OutName="ganon_hoof" Format="ci8" Width="16" Height="16" Offset="0x1D400" TlutOffset="0x1BD80"/>
<Texture Name="object_ganon2_Tex_01DD08" OutName="tex_0001DD08" Format="rgba16" Width="16" Height="32" Offset="0x1DD08"/> <Texture Name="gGanonUnderSkirtTex" OutName="ganon_under_skirt" Format="rgba16" Width="4" Height="16" Offset="0x1D500"/>
<Texture Name="object_ganon2_Tex_01E108" OutName="tex_0001E108" Format="rgba16" Width="8" Height="8" Offset="0x1E108"/> <Texture Name="gGanonTailTex" OutName="ganon_tail" Format="ci8" Width="16" Height="32" Offset="0x1D580" TlutOffset="0x1BF80"/>
<Texture Name="object_ganon2_Tex_01E188" Format="ci4" Width="16" Height="16" Offset="0x1E188" TlutOffset="0x1D780"/> <!-- eye open --> <Texture Name="gGanonEyesTLUT" OutName="ganon_eyes_tlut" Format="rgba16" Width="4" Height="4" Offset="0x1D780"/>
<Texture Name="object_ganon2_Tex_01E208" OutName="tex_0001E208" Format="rgba16" Width="8" Height="8" Offset="0x1E208"/> <Texture Name="gGanonHandTLUT" OutName="ganon_hand_tlut" Format="rgba16" Width="16" Height="11" Offset="0x1D7A8"/>
<Texture Name="object_ganon2_Tex_01E288" OutName="tex_0001E288" Format="rgba16" Width="16" Height="16" Offset="0x1E288"/> <Texture Name="gGanonHandTex" OutName="ganon_hand" Format="ci8" Width="32" Height="32" Offset="0x1D908" TlutOffset="0x1D7A8"/>
<Texture Name="object_ganon2_Tex_01E488" OutName="tex_0001E488" Format="rgba16" Width="16" Height="8" Offset="0x1E488"/> <Texture Name="gGanonJewelTex" OutName="ganon_jewel" Format="rgba16" Width="16" Height="32" Offset="0x1DD08"/>
<Texture Name="object_ganon2_Tex_01E588" OutName="tex_0001E588" Format="i4" Width="32" Height="32" Offset="0x1E588"/> <Texture Name="gGanonClawAndTeethTex" OutName="ganon_claw_and_teeth" Format="rgba16" Width="8" Height="8" Offset="0x1E108"/>
<Texture Name="object_ganon2_Tex_01E788" OutName="tex_0001E788" Format="rgba16" Width="8" Height="16" Offset="0x1E788"/> <Texture Name="gGanonEyeOpenTex" OutName="ganon_eye_open" Format="ci4" Width="16" Height="16" Offset="0x1E188" TlutOffset="0x1D780"/>
<Texture Name="object_ganon2_Tex_01E888" OutName="tex_0001E888" Format="rgba16" Width="8" Height="16" Offset="0x1E888"/> <Texture Name="gGanonLipsTex" OutName="ganon_lips" Format="rgba16" Width="8" Height="8" Offset="0x1E208"/>
<Texture Name="object_ganon2_Tex_01E988" Format="ci4" Width="16" Height="16" Offset="0x1E988" TlutOffset="0x1D780"/> <!-- eye half closed --> <Texture Name="gGanonHornBaseTex" OutName="ganon_horn_base" Format="rgba16" Width="16" Height="16" Offset="0x1E288"/>
<Texture Name="object_ganon2_Tex_01EA08" Format="ci4" Width="16" Height="16" Offset="0x1EA08" TlutOffset="0x1D780"/> <!-- eye closed --> <Texture Name="gGanonHornTex" OutName="ganon_horn" Format="rgba16" Width="16" Height="8" Offset="0x1E488"/>
<DList Name="object_ganon2_DL_020B18" Offset="0x20B18"/> <Texture Name="gGanonSwordBladeTex" OutName="ganon_sword_blade" Format="i4" Width="32" Height="32" Offset="0x1E588"/>
<DList Name="object_ganon2_DL_020BE0" Offset="0x20BE0"/> <Texture Name="gGanonSwordGuardTex" OutName="ganon_sword_guard" Format="rgba16" Width="8" Height="16" Offset="0x1E788"/>
<DList Name="object_ganon2_DL_020C80" Offset="0x20C80"/> <Texture Name="gGanonSwordGripTex" OutName="ganon_sword_grip" Format="rgba16" Width="8" Height="16" Offset="0x1E888"/>
<DList Name="object_ganon2_DL_020DE8" Offset="0x20DE8"/> <Texture Name="gGanonEyeHalfTex" OutName="ganon_eye_half" Format="ci4" Width="16" Height="16" Offset="0x1E988" TlutOffset="0x1D780"/>
<DList Name="object_ganon2_DL_020F50" Offset="0x20F50"/> <Texture Name="gGanonEyeClosedTex" OutName="ganon_eye_closed" Format="ci4" Width="16" Height="16" Offset="0x1EA08" TlutOffset="0x1D780"/>
<DList Name="object_ganon2_DL_021120" Offset="0x21120"/>
<DList Name="object_ganon2_DL_0212F0" Offset="0x212F0"/> <!-- Ganon Limb DisplayLists -->
<DList Name="object_ganon2_DL_0215D0" Offset="0x215D0"/> <DList Name="gGanonEyesDL" Offset="0x20B18"/>
<DList Name="object_ganon2_DL_0218B8" Offset="0x218B8"/> <DList Name="gGanonJewelDL" Offset="0x20BE0"/>
<DList Name="object_ganon2_DL_0219D8" Offset="0x219D8"/> <DList Name="gGanonRightHornDL" Offset="0x20C80"/>
<Texture Name="object_ganon2_Tex_021A90" Format="ia8" Width="128" Height="120" Offset="0x21A90"/> <DList Name="gGanonLeftHornDL" Offset="0x20DE8"/>
<Limb Name="object_ganon2_Limb_025690" LimbType="Standard" Offset="0x25690"/> <DList Name="gGanonRightHandDL" Offset="0x20F50"/>
<Limb Name="object_ganon2_Limb_02569C" LimbType="Standard" Offset="0x2569C"/> <DList Name="gGanonLeftHandDL" Offset="0x21120"/>
<Limb Name="object_ganon2_Limb_0256A8" LimbType="Standard" Offset="0x256A8"/> <DList Name="gGanonRightSwordDL" Offset="0x212F0"/>
<Limb Name="object_ganon2_Limb_0256B4" LimbType="Standard" Offset="0x256B4"/> <DList Name="gGanonLeftSwordDL" Offset="0x215D0"/>
<Limb Name="object_ganon2_Limb_0256C0" LimbType="Standard" Offset="0x256C0"/> <DList Name="gGanonOuterTeethDL" Offset="0x218B8"/>
<Limb Name="object_ganon2_Limb_0256CC" LimbType="Standard" Offset="0x256CC"/> <DList Name="gGanonInnerTeethDL" Offset="0x219D8"/>
<Limb Name="object_ganon2_Limb_0256D8" LimbType="Standard" Offset="0x256D8"/>
<Limb Name="object_ganon2_Limb_0256E4" LimbType="Standard" Offset="0x256E4"/> <!-- Ganon Title Card Texture -->
<Limb Name="object_ganon2_Limb_0256F0" LimbType="Standard" Offset="0x256F0"/> <Texture Name="gGanonTitleCardTex" OutName="ganon_title_card" Format="ia8" Width="128" Height="120" Offset="0x21A90"/>
<Limb Name="object_ganon2_Limb_0256FC" LimbType="Standard" Offset="0x256FC"/>
<Limb Name="object_ganon2_Limb_025708" LimbType="Standard" Offset="0x25708"/> <!-- Ganon Limbs -->
<Limb Name="object_ganon2_Limb_025714" LimbType="Standard" Offset="0x25714"/> <Limb Name="gGanonRootLimb" LimbType="Standard" Offset="0x25690"/>
<Limb Name="object_ganon2_Limb_025720" LimbType="Standard" Offset="0x25720"/> <Limb Name="gGanonTorsoLimb" LimbType="Standard" Offset="0x2569C"/>
<Limb Name="object_ganon2_Limb_02572C" LimbType="Standard" Offset="0x2572C"/> <Limb Name="gGanonLeftShoulderLimb" LimbType="Standard" Offset="0x256A8"/>
<Limb Name="object_ganon2_Limb_025738" LimbType="Standard" Offset="0x25738"/> <Limb Name="gGanonLeftUpperArmLimb" LimbType="Standard" Offset="0x256B4"/>
<Limb Name="object_ganon2_Limb_025744" LimbType="Standard" Offset="0x25744"/> <Limb Name="gGanonLeftForearmLimb" LimbType="Standard" Offset="0x256C0"/>
<Limb Name="object_ganon2_Limb_025750" LimbType="Standard" Offset="0x25750"/> <Limb Name="gGanonLeftWristLimb" LimbType="Standard" Offset="0x256CC"/>
<Limb Name="object_ganon2_Limb_02575C" LimbType="Standard" Offset="0x2575C"/> <Limb Name="gGanonLeftSwordLimb" LimbType="Standard" Offset="0x256D8"/>
<Limb Name="object_ganon2_Limb_025768" LimbType="Standard" Offset="0x25768"/> <Limb Name="gGanonLeftHandLimb" LimbType="Standard" Offset="0x256E4"/>
<Limb Name="object_ganon2_Limb_025774" LimbType="Standard" Offset="0x25774"/> <Limb Name="gGanonRightShoulderLimb" LimbType="Standard" Offset="0x256F0"/>
<Limb Name="object_ganon2_Limb_025780" LimbType="Standard" Offset="0x25780"/> <Limb Name="gGanonRightUpperArmLimb" LimbType="Standard" Offset="0x256FC"/>
<Limb Name="object_ganon2_Limb_02578C" LimbType="Standard" Offset="0x2578C"/> <Limb Name="gGanonRightForearmLimb" LimbType="Standard" Offset="0x25708"/>
<Limb Name="object_ganon2_Limb_025798" LimbType="Standard" Offset="0x25798"/> <Limb Name="gGanonRightWristLimb" LimbType="Standard" Offset="0x25714"/>
<Limb Name="object_ganon2_Limb_0257A4" LimbType="Standard" Offset="0x257A4"/> <Limb Name="gGanonRightSwordLimb" LimbType="Standard" Offset="0x25720"/>
<Limb Name="object_ganon2_Limb_0257B0" LimbType="Standard" Offset="0x257B0"/> <Limb Name="gGanonRightHandLimb" LimbType="Standard" Offset="0x2572C"/>
<Limb Name="object_ganon2_Limb_0257BC" LimbType="Standard" Offset="0x257BC"/> <Limb Name="gGanonNeckLimb" LimbType="Standard" Offset="0x25738"/>
<Limb Name="object_ganon2_Limb_0257C8" LimbType="Standard" Offset="0x257C8"/> <Limb Name="gGanonJewelLimb" LimbType="Standard" Offset="0x25744"/>
<Limb Name="object_ganon2_Limb_0257D4" LimbType="Standard" Offset="0x257D4"/> <Limb Name="gGanonSnoutLimb" LimbType="Standard" Offset="0x25750"/>
<Limb Name="object_ganon2_Limb_0257E0" LimbType="Standard" Offset="0x257E0"/> <Limb Name="gGanonOuterTeethLimb" LimbType="Standard" Offset="0x2575C"/>
<Limb Name="object_ganon2_Limb_0257EC" LimbType="Standard" Offset="0x257EC"/> <Limb Name="gGanonMouthLimb" LimbType="Standard" Offset="0x25768"/>
<Limb Name="object_ganon2_Limb_0257F8" LimbType="Standard" Offset="0x257F8"/> <Limb Name="gGanonInnerTeethLimb" LimbType="Standard" Offset="0x25774"/>
<Limb Name="object_ganon2_Limb_025804" LimbType="Standard" Offset="0x25804"/> <Limb Name="gGanonJawLimb" LimbType="Standard" Offset="0x25780"/>
<Limb Name="object_ganon2_Limb_025810" LimbType="Standard" Offset="0x25810"/> <Limb Name="gGanonMiddleHair1Limb" LimbType="Standard" Offset="0x2578C"/>
<Limb Name="object_ganon2_Limb_02581C" LimbType="Standard" Offset="0x2581C"/> <Limb Name="gGanonMiddleHair2Limb" LimbType="Standard" Offset="0x25798"/>
<Limb Name="object_ganon2_Limb_025828" LimbType="Standard" Offset="0x25828"/> <Limb Name="gGanonMiddleHair3Limb" LimbType="Standard" Offset="0x257A4"/>
<Limb Name="object_ganon2_Limb_025834" LimbType="Standard" Offset="0x25834"/> <Limb Name="gGanonLeftHair1Limb" LimbType="Standard" Offset="0x257B0"/>
<Limb Name="object_ganon2_Limb_025840" LimbType="Standard" Offset="0x25840"/> <Limb Name="gGanonLeftHair2Limb" LimbType="Standard" Offset="0x257BC"/>
<Limb Name="object_ganon2_Limb_02584C" LimbType="Standard" Offset="0x2584C"/> <Limb Name="gGanonLeftHair3Limb" LimbType="Standard" Offset="0x257C8"/>
<Limb Name="object_ganon2_Limb_025858" LimbType="Standard" Offset="0x25858"/> <Limb Name="gGanonRightHair1Limb" LimbType="Standard" Offset="0x257D4"/>
<Limb Name="object_ganon2_Limb_025864" LimbType="Standard" Offset="0x25864"/> <Limb Name="gGanonRightHair2Limb" LimbType="Standard" Offset="0x257E0"/>
<Limb Name="object_ganon2_Limb_025870" LimbType="Standard" Offset="0x25870"/> <Limb Name="gGanonRightHair3Limb" LimbType="Standard" Offset="0x257EC"/>
<Limb Name="object_ganon2_Limb_02587C" LimbType="Standard" Offset="0x2587C"/> <Limb Name="gGanonEyesLimb" LimbType="Standard" Offset="0x257F8"/>
<Limb Name="object_ganon2_Limb_025888" LimbType="Standard" Offset="0x25888"/> <Limb Name="gGanonHeadLimb" LimbType="Standard" Offset="0x25804"/>
<Limb Name="object_ganon2_Limb_025894" LimbType="Standard" Offset="0x25894"/> <Limb Name="gGanonLeftHornLimb" LimbType="Standard" Offset="0x25810"/>
<Limb Name="object_ganon2_Limb_0258A0" LimbType="Standard" Offset="0x258A0"/> <Limb Name="gGanonRightHornLimb" LimbType="Standard" Offset="0x2581C"/>
<Limb Name="object_ganon2_Limb_0258AC" LimbType="Standard" Offset="0x258AC"/> <Limb Name="gGanonPelvisLimb" LimbType="Standard" Offset="0x25828"/>
<Skeleton Name="object_ganon2_Skel_025970" Type="Flex" LimbType="Standard" Offset="0x25970"/> <Limb Name="gGanonLeftThighLimb" LimbType="Standard" Offset="0x25834"/>
<Animation Name="object_ganon2_Anim_026510" Offset="0x26510"/> <Limb Name="gGanonLeftShinLimb" LimbType="Standard" Offset="0x25840"/>
<Animation Name="object_ganon2_Anim_026AF4" Offset="0x26AF4"/> <Limb Name="gGanonLeftFootLimb" LimbType="Standard" Offset="0x2584C"/>
<Animation Name="object_ganon2_Anim_027824" Offset="0x27824"/> <Limb Name="gGanonRightThighLimb" LimbType="Standard" Offset="0x25858"/>
<Animation Name="object_ganon2_Anim_02A848" Offset="0x2A848"/> <Limb Name="gGanonRightShinLimb" LimbType="Standard" Offset="0x25864"/>
<Animation Name="object_ganon2_Anim_02B528" Offset="0x2B528"/> <Limb Name="gGanonRightFootLimb" LimbType="Standard" Offset="0x25870"/>
<Animation Name="object_ganon2_Anim_02C0D0" Offset="0x2C0D0"/> <Limb Name="gGanonTail1Limb" LimbType="Standard" Offset="0x2587C"/>
<Animation Name="object_ganon2_Anim_02C6B4" Offset="0x2C6B4"/> <Limb Name="gGanonTail2Limb" LimbType="Standard" Offset="0x25888"/>
<Animation Name="object_ganon2_Anim_0334F8" Offset="0x334F8"/> <Limb Name="gGanonTail3Limb" LimbType="Standard" Offset="0x25894"/>
<Animation Name="object_ganon2_Anim_034278" Offset="0x34278"/> <Limb Name="gGanonTail4Limb" LimbType="Standard" Offset="0x258A0"/>
<Animation Name="object_ganon2_Anim_0353C0" Offset="0x353C0"/> <Limb Name="gGanonTail5Limb" LimbType="Standard" Offset="0x258AC"/>
<Animation Name="object_ganon2_Anim_035BDC" Offset="0x35BDC"/>
<!-- Ganon Skeleton -->
<Skeleton Name="gGanonSkel" Type="Flex" LimbType="Standard" Offset="0x25970"/>
<!-- Ganon Animations -->
<Animation Name="gGanonStunStartAnim" Offset="0x26510"/> <!-- Original name is "gn2_Lhit" -->
<Animation Name="gGanonStunLoopAnim" Offset="0x26AF4"/> <!-- Original name is "gn2_Lmahi" ("paralysis, stupor") -->
<Animation Name="gGanonStunEndAnim" Offset="0x27824"/> <!-- Original name is "gn2_Lmahi_to_K" -->
<Animation Name="gGanonDownedStartAnim" Offset="0x2A848"/> <!-- Original name is "gn2_downDEMO" -->
<Animation Name="gGanonStunEndToWalkAnim" Offset="0x2B528"/> <!-- Unused, similar to gGanonStunEndAnim. Transitions into walk instead of guard. -->
<Animation Name="gGanonDuplicateStunStartAnim" Offset="0x2C0D0"/> <!-- Unused duplicate of gGanonStunStartAnim -->
<Animation Name="gGanonDuplicateStunLoopAnim" Offset="0x2C6B4"/> <!-- Unused duplicate of gGanonStunLoopAnim -->
<Animation Name="gGanonGetUpAnim" Offset="0x334F8"/> <!-- Original name is "gn2_hukkiDEMO" ("return, comeback") -->
<Animation Name="gGanonDownedLoopAnim" Offset="0x34278"/> <!-- Original name is "gn2_mahiDEMO" -->
<Animation Name="gGanonWalkAnim" Offset="0x353C0"/> <!-- Original name is "gn2_walk" -->
<Animation Name="gGanonWalkToGuardAnim" Offset="0x35BDC"/> <!-- Unused. Original name is "gn2_walk_to_K" -->
</File> </File>
</Root> </Root>

View file

@ -1,29 +1,30 @@
<Root> <Root>
<!-- Animations used during the Ganondorf fight. -->
<File Name="object_ganon_anime1" Segment="6"> <File Name="object_ganon_anime1" Segment="6">
<Animation Name="gDorfBigMagicWindupAnim" Offset="0x0540"/> <Animation Name="gGanondorfBigMagicWindupAnim" Offset="0x0540"/> <!-- Original name is "gn1_BAatack01" -->
<Animation Name="gDorfBigMagicThrowAnim" Offset="0x0FE8"/> <Animation Name="gGanondorfBigMagicThrowAnim" Offset="0x0FE8"/> <!-- Original name is "gn1_BAatack02" -->
<Animation Name="gDorfBigMagicThrowEndAnim" Offset="0x1440"/> <Animation Name="gGanondorfBigMagicThrowEndAnim" Offset="0x1440"/> <!-- Original name is "gn1_BAhukki" ("return, comeback") -->
<Animation Name="gDorfBigMagicChargeStartAnim" Offset="0x1B0C"/> <Animation Name="gGanondorfBigMagicChargeStartAnim" Offset="0x1B0C"/> <!-- Original name is "gn1_BAjunbi" ("preparation") -->
<Animation Name="gDorfBigMagicChargeHoldAnim" Offset="0x1FF8"/> <Animation Name="gGanondorfBigMagicChargeHoldAnim" Offset="0x1FF8"/> <!-- Original name is "gn1_BAtame" ("to amass, to accumulate") -->
<Animation Name="gDorfPoundAnim" Offset="0x2D2C"/> <Animation Name="gGanondorfPoundAnim" Offset="0x2D2C"/> <!-- Original name is "gn1_Patack" -->
<Animation Name="gDorfPoundEndAnim" Offset="0x343C"/> <Animation Name="gGanondorfPoundEndAnim" Offset="0x343C"/> <!-- Original name is "gn1_Phukki" -->
<Animation Name="gDorfKneelVulnerableAnim" Offset="0x3D40"/> <Animation Name="gGanondorfDownedAnim" Offset="0x3D40"/> <!-- Original name is "gn1_YAdown" -->
<Animation Name="gDorfLightArrowHitAnim" Offset="0x4884"/> <Animation Name="gGanondorfLightArrowHitAnim" Offset="0x4884"/> <!-- Original name is "gn1_YAhit01" -->
<Animation Name="gDorfLightEnergyHitAnim" Offset="0x4DA8"/> <Animation Name="gGanondorfLightEnergyHitAnim" Offset="0x4DA8"/> <!-- Original name is "gn1_YAhit02" -->
<Animation Name="gDorfGetUp1Anim" Offset="0x58C4"/> <Animation Name="gGanondorfGetUp1Anim" Offset="0x58C4"/> <!-- Original name is "gn1_YAhukki01" -->
<Animation Name="gDorfGetUp2Anim" Offset="0x6028"/> <Animation Name="gGanondorfGetUp2Anim" Offset="0x6028"/> <!-- Original name is "gn1_YAhukki02" -->
<Animation Name="gDorfLandAnim" Offset="0x63CC"/> <Animation Name="gGanondorfLandAnim" Offset="0x63CC"/> <!-- Original name is "gn1_YAlanding" -->
<Animation Name="gDorfVulnerableAnim" Offset="0x69A0"/> <Animation Name="gGanondorfVulnerableAnim" Offset="0x69A0"/> <!-- Original name is "gn1_YAmahi" ("paralysis, stupor") -->
<Animation Name="gDorfThrowAnim" Offset="0x738C"/> <Animation Name="gGanondorfThrowAnim" Offset="0x738C"/> <!-- Original name is "gn1_atack" -->
<Animation Name="gDorfBigMagicHitAnim" Offset="0x8128"/> <Animation Name="gGanondorfBigMagicHitAnim" Offset="0x8128"/> <!-- Original name is "gn1_ballhit" -->
<Animation Name="gDorfGetUp3Anim" Offset="0x8A88"/> <Animation Name="gGanondorfGetUp3Anim" Offset="0x8A88"/> <!-- Original name is "gn1_ballhukki" -->
<Animation Name="gDorfLightArrowWaitAnim" Offset="0x8F44"/> <Animation Name="gGanondorfLightArrowWaitAnim" Offset="0x8F44"/> <!-- Original name is "gn1_ballmahi" -->
<Animation Name="gDorfDamageAnim" Offset="0x96B0"/> <Animation Name="gGanondorfDamageAnim" Offset="0x96B0"/> <!-- Original name is "gn1_damage" -->
<Animation Name="gDorfFloatAnim" Offset="0x9A14"/> <Animation Name="gGanondorfFloatAnim" Offset="0x9A14"/> <!-- Original name is "gn1_fly" -->
<Animation Name="gDorfBlockAnim" Offset="0x9D5C"/> <Animation Name="gGanondorfBlockAnim" Offset="0x9D5C"/> <!-- Original name is "gn1_guard01" -->
<Animation Name="gDorfBlockReleaseAnim" Offset="0xA598"/> <Animation Name="gGanondorfBlockReleaseAnim" Offset="0xA598"/> <!-- Original name is "gn1_guard02" -->
<Animation Name="gDorfChargeLightBallAnim" Offset="0xAA24"/> <Animation Name="gGanondorfChargeLightBallAnim" Offset="0xAA24"/> <!-- Original name is "gn1_preatack" -->
<Animation Name="gDorfVolleyLeftAnim" Offset="0xB4AC"/> <Animation Name="gGanondorfVolleyLeftAnim" Offset="0xB4AC"/> <!-- Original name is "gn1_resieve01" -->
<Animation Name="gDorfVolleyRightAnim" Offset="0xBC28"/> <Animation Name="gGanondorfVolleyRightAnim" Offset="0xBC28"/> <!-- Original name is "gn1_resieve02" -->
</File> </File>
</Root> </Root>

View file

@ -1,21 +1,22 @@
<Root> <Root>
<!-- Animations used during the intro and ending cutscenes for the Ganondorf fight. -->
<File Name="object_ganon_anime2" Segment="6"> <File Name="object_ganon_anime2" Segment="6">
<Animation Name="object_ganon_anime2_Anim_001F58" Offset="0x1F58"/> <Animation Name="gGanondorfTurnAroundAnim" Offset="0x1F58"/> <!-- Original name is "G_furimuku" ("to turn around") -->
<Animation Name="object_ganon_anime2_Anim_003018" Offset="0x3018"/> <Animation Name="gGanondorfStandIdleAnim" Offset="0x3018"/> <!-- Original name is "G_n_wait" -->
<Animation Name="object_ganon_anime2_Anim_004304" Offset="0x4304"/> <Animation Name="gGanondorfStandUpFromOrganAnim" Offset="0x4304"/> <!-- Original name is "G_okosu" ("to stand up") -->
<Animation Name="object_ganon_anime2_Anim_004F64" Offset="0x4F64"/> <Animation Name="gGanondorfStopPlayingOrganAnim" Offset="0x4F64"/> <!-- Original name is "G_or_end" -->
<Animation Name="object_ganon_anime2_Anim_005FFC" Offset="0x5FFC"/> <Animation Name="gGanondorfPlayOrganAnim" Offset="0x5FFC"/> <!-- Original name is "G_or_hikuL" ("to play (a keyboard instrument)") -->
<Animation Name="object_ganon_anime2_Anim_006AF4" Offset="0x6AF4"/> <Animation Name="gGanondorfLeanOnOrganAnim" Offset="0x6AF4"/> <!-- Original name is "G_tame" ("to hesitate") -->
<Animation Name="object_ganon_anime2_Anim_007268" Offset="0x7268"/> <Animation Name="gGanondorfRaiseHandStartAnim" Offset="0x7268"/> <!-- Original name is "G_te_ageru" ("to raise") -->
<Animation Name="object_ganon_anime2_Anim_007A64" Offset="0x7A64"/> <Animation Name="gGanondorfRaiseHandLoopAnim" Offset="0x7A64"/> <!-- Original name is "G_te_hikaru" ("to shine") -->
<Animation Name="object_ganon_anime2_Anim_0089F8" Offset="0x89F8"/> <Animation Name="gGanondorfStandBackwardsAnim" Offset="0x89F8"/> <!-- Original name is "G_usiro_wait" ("back-facing") -->
<Animation Name="object_ganon_anime2_Anim_009AE0" Offset="0x9AE0"/> <Animation Name="gGanondorfLaughWhileLeaningAnim" Offset="0x9AE0"/> <!-- Unused. Original name is "G_warau" ("to laugh") -->
<Animation Name="object_ganon_anime2_Anim_00ADDC" Offset="0xADDC"/> <Animation Name="gGanondorfCollapseAnim" Offset="0xADDC"/> <!-- Original name is "g_demo_down" -->
<Animation Name="object_ganon_anime2_Anim_00B668" Offset="0xB668"/> <Animation Name="gGanondorfVomitStartAnim" Offset="0xB668"/> <!-- Original name is "g_demo_hedohaki" ("to vomit") -->
<Animation Name="object_ganon_anime2_Anim_00BE38" Offset="0xBE38"/> <Animation Name="gGanondorfVomitLoopAnim" Offset="0xBE38"/> <!-- Original name is "g_demo_hedohaki_wait" -->
<Animation Name="object_ganon_anime2_Anim_00EA00" Offset="0xEA00"/> <Animation Name="gGanondorfDefeatedStartAnim" Offset="0xEA00"/> <!-- Original name is "g_demo_hizaoti" ("fall on your knees") -->
<Animation Name="object_ganon_anime2_Anim_00F19C" Offset="0xF19C"/> <Animation Name="gGanondorfDefeatedLoopAnim" Offset="0xF19C"/> <!-- Original name is "g_demo_hizaoti_wait" -->
<Animation Name="object_ganon_anime2_Anim_010298" Offset="0x10298"/> <Animation Name="gGanondorfYellStartAnim" Offset="0x10298"/> <!-- Original name is "g_demo_sakebi" ("shout, yell") -->
<Animation Name="object_ganon_anime2_Anim_010514" Offset="0x10514"/> <Animation Name="gGanondorfYellLoopAnim" Offset="0x10514"/> <!-- Original name is "g_demo_sakebi_wait" -->
</File> </File>
</Root> </Root>

View file

@ -1,13 +1,17 @@
<Root> <Root>
<!-- Animations used in the intro to the Ganon fight. -->
<File Name="object_ganon_anime3" Segment="6"> <File Name="object_ganon_anime3" Segment="6">
<Animation Name="object_ganon_anime3_Anim_000BFC" Offset="0xBFC"/> <!-- Ganondorf Animations -->
<Animation Name="object_ganon_anime3_Anim_002168" Offset="0x2168"/> <Animation Name="gGanondorfShowTriforceStartAnim" Offset="0xBFC"/> <!-- Original name is "GF_aw" -->
<Animation Name="object_ganon_anime3_Anim_0028A8" Offset="0x28A8"/> <Animation Name="gGanondorfBurstOutAnim" Offset="0x2168"/> <!-- Original name is "GF_f" -->
<Animation Name="object_ganon_anime3_Anim_002E6C" Offset="0x2E6C"/> <Animation Name="gGanondorfTransformEndAnim" Offset="0x28A8"/> <!-- Original name is "GF_hen_shin" ("transformation") -->
<Animation Name="object_ganon_anime3_Anim_003754" Offset="0x3754"/> <Animation Name="gGanondorfFloatingHeavyBreathingAnim" Offset="0x2E6C"/> <!-- Original name is "GF_sw" -->
<Animation Name="object_ganon_anime3_Anim_003884" Offset="0x3884"/> <Animation Name="gGanondorfTransformStartAnim" Offset="0x3754"/> <!-- Original name is "GF_tijimu" ("to shrink, to contract") -->
<Animation Name="object_ganon_anime3_Anim_003F38" Offset="0x3F38"/> <Animation Name="gGanondorfTransformLoopAnim" Offset="0x3884"/> <!-- Original name is "GF_tijimu_wait" -->
<Animation Name="object_ganon_anime3_Anim_010380" Offset="0x10380"/> <Animation Name="gGanondorfShowTriforceLoopAnim" Offset="0x3F38"/> <!-- Original name is "GF_tw" -->
<Animation Name="object_ganon_anime3_Anim_0147E0" Offset="0x147E0"/>
<!-- Ganon Animations -->
<Animation Name="gGanonUncurlAndFlailAnim" Offset="0x10380"/> <!-- Original name is "LG_DANGO" ("ball-shaped") -->
<Animation Name="gGanonRoarAnim" Offset="0x147E0"/> <!-- Original name is "LG_Hoeru" ("howl") -->
</File> </File>
</Root> </Root>

View file

@ -1,96 +1,106 @@
<Root> <Root>
<!-- Assets for the young version of Ganondorf (the one before the seven-year timeskip). -->
<File Name="object_gndd" Segment="6"> <File Name="object_gndd" Segment="6">
<Animation Name="object_gndd_Anim_0005B4" Offset="0x5B4"/> <!-- Young Ganondorf Animations -->
<Animation Name="object_gndd_Anim_0008A0" Offset="0x8A0"/> <Animation Name="gYoungGanondorfHorsebackRideAnim" Offset="0x5B4"/> <!-- Original name is "gnd_anim_fastrun" -->
<Animation Name="object_gndd_Anim_000BC8" Offset="0xBC8"/> <Animation Name="gYoungGanondorfHorsebackMagicChargeUpStartAnim" Offset="0x8A0"/> <!-- Original name is "gnd_anim_mahou" ("magic, sorcery") -->
<Animation Name="object_gndd_Anim_000F54" Offset="0xF54"/> <Animation Name="gYoungGanondorfHorsebackMagicChargeUpLoopAnim" Offset="0xBC8"/> <!-- Original name is "gnd_anim_mahou_wait" -->
<Animation Name="object_gndd_Anim_0014F4" Offset="0x14F4"/> <Animation Name="gYoungGanondorfHorsebackLookSidewaysStartAnim" Offset="0xF54"/> <!-- Original name is "gnd_anim_nirami" ("glare, sharp look") -->
<Animation Name="object_gndd_Anim_001D28" Offset="0x1D28"/> <Animation Name="gYoungGanondorfHorsebackLookSidewaysLoopAnim" Offset="0x14F4"/> <!-- Original name is "gnd_anim_nirami_wait" -->
<Animation Name="object_gndd_Anim_002928" Offset="0x2928"/> <Animation Name="gYoungGanondorfHorsebackRearAnim" Offset="0x1D28"/> <!-- Original name is "gnd_anim_stand" -->
<Animation Name="object_gndd_Anim_003284" Offset="0x3284"/> <Animation Name="gYoungGanondorfHorsebackIdleAnim" Offset="0x2928"/> <!-- Original name is "gnd_anim_wait" -->
<Animation Name="object_gndd_Anim_003428" Offset="0x3428"/> <Animation Name="gYoungGanondorfKneelStartAnim" Offset="0x3284"/> <!-- Original name is "gnd_demo_ojigi" ("bowing") -->
<Animation Name="object_gndd_Anim_003D84" Offset="0x3D84"/> <Animation Name="gYoungGanondorfKneelLookSidewaysAnim" Offset="0x3428"/> <!-- Original name is "gnd_demo_ojigi_furimuki" ("to turn one's face") -->
<Animation Name="object_gndd_Anim_004260" Offset="0x4260"/> <Animation Name="gYoungGanondorfKneelLoopAnim" Offset="0x3D84"/> <!-- Original name is "gnd_demo_ojigi_wait" -->
<Animation Name="object_gndd_Anim_004534" Offset="0x4534"/> <Animation Name="gYoungGanondorfArmsCrossedAnim" Offset="0x4260"/> <!-- Original name is "gnd_demo_ukabi_wait" ("to emerge (from obscurity)") -->
<Animation Name="object_gndd_Anim_0048B0" Offset="0x48B0"/> <Animation Name="gYoungGanondorfLaughStartAnim" Offset="0x4534"/> <!-- Original name is "gnd_demo_ukabi_warai" ("laughter") -->
<Animation Name="object_gndd_Anim_0050A8" Offset="0x50A8"/> <Animation Name="gYoungGanondorfLaughLoopAnim" Offset="0x48B0"/> <!-- Original name is "gnd_demo_ukabi_warai_wait" -->
<DList Name="object_gndd_DL_0061C0" Offset="0x61C0"/> <Animation Name="gYoungGanondorfWalkAnim" Offset="0x50A8"/> <!-- Original name is "gnd_walk" -->
<DList Name="object_gndd_DL_0069F8" Offset="0x69F8"/>
<DList Name="object_gndd_DL_006B78" Offset="0x6B78"/> <!-- Young Ganondorf Limb DisplayLists -->
<DList Name="object_gndd_DL_006D90" Offset="0x6D90"/> <DList Name="gYoungGanondorfHeadDL" Offset="0x61C0"/>
<DList Name="object_gndd_DL_006FC8" Offset="0x6FC8"/> <DList Name="gYoungGanondorfRightUpperLipDL" Offset="0x69F8"/>
<DList Name="object_gndd_DL_00A6A8" Offset="0xA6A8"/> <DList Name="gYoungGanondorfChinDL" Offset="0x6B78"/>
<DList Name="object_gndd_DL_00AB10" Offset="0xAB10"/> <DList Name="gYoungGanondorfJawDL" Offset="0x6D90"/>
<DList Name="object_gndd_DL_00B410" Offset="0xB410"/> <DList Name="gYoungGanondorfLeftUpperLipDL" Offset="0x6FC8"/>
<DList Name="object_gndd_DL_00B4B0" Offset="0xB4B0"/> <DList Name="gYoungGanondorfPelvisDL" Offset="0xA6A8"/>
<DList Name="object_gndd_DL_00B918" Offset="0xB918"/> <DList Name="gYoungGanondorfTorsoDL" Offset="0xAB10"/>
<DList Name="object_gndd_DL_00BA90" Offset="0xBA90"/> <DList Name="gYoungGanondorfJewelDL" Offset="0xB410"/>
<DList Name="object_gndd_DL_00BC08" Offset="0xBC08"/> <DList Name="gYoungGanondorfKnifeDL" Offset="0xB4B0"/>
<DList Name="object_gndd_DL_00BEA0" Offset="0xBEA0"/> <DList Name="gYoungGanondorfLeftUpperArmDL" Offset="0xB918"/>
<DList Name="object_gndd_DL_00C138" Offset="0xC138"/> <DList Name="gYoungGanondorfRightUpperArmDL" Offset="0xBA90"/>
<DList Name="object_gndd_DL_00C550" Offset="0xC550"/> <DList Name="gYoungGanondorfLeftForearmDL" Offset="0xBC08"/>
<DList Name="object_gndd_DL_00C968" Offset="0xC968"/> <DList Name="gYoungGanondorfRightForearmDL" Offset="0xBEA0"/>
<DList Name="object_gndd_DL_00CBF8" Offset="0xCBF8"/> <DList Name="gYoungGanondorfLeftHandDL" Offset="0xC138"/>
<DList Name="object_gndd_DL_00CE88" Offset="0xCE88"/> <DList Name="gYoungGanondorfRightHandDL" Offset="0xC550"/>
<DList Name="object_gndd_DL_00D080" Offset="0xD080"/> <DList Name="gYoungGanondorfLeftFootDL" Offset="0xC968"/>
<DList Name="object_gndd_DL_00D278" Offset="0xD278"/> <DList Name="gYoungGanondorfRightFootDL" Offset="0xCBF8"/>
<DList Name="object_gndd_DL_00D470" Offset="0xD470"/> <DList Name="gYoungGanondorfLeftThighDL" Offset="0xCE88"/>
<DList Name="object_gndd_DL_00D668" Offset="0xD668"/> <DList Name="gYoungGanondorfLeftShinDL" Offset="0xD080"/>
<DList Name="object_gndd_DL_00E1A8" Offset="0xE1A8"/> <DList Name="gYoungGanondorfRightThighDL" Offset="0xD278"/>
<Texture Name="object_gndd_TLUT_00ECB8" OutName="tlut_0000ECB8" Format="rgba16" Width="16" Height="16" Offset="0xECB8"/> <DList Name="gYoungGanondorfRightShinDL" Offset="0xD470"/>
<Texture Name="object_gndd_Tex_00EEB8" OutName="tex_0000EEB8" Format="rgba16" Width="8" Height="8" Offset="0xEEB8"/> <DList Name="gYoungGanondorfTeethDL" Offset="0xD668"/>
<Texture Name="object_gndd_Tex_00EF38" OutName="tex_0000EF38" Format="rgba16" Width="16" Height="16" Offset="0xEF38"/> <DList Name="gYoungGanondorfOpenLeftHandDL" Offset="0xE1A8"/>
<Texture Name="object_gndd_Tex_00F138" OutName="tex_0000F138" Format="rgba16" Width="4" Height="8" Offset="0xF138"/>
<Texture Name="object_gndd_Tex_00F178" OutName="tex_0000F178" Format="ci8" Width="32" Height="16" Offset="0xF178" TlutOffset="0xECB8"/> <!-- Young Ganondorf Textures -->
<Texture Name="object_gndd_Tex_00F378" OutName="tex_0000F378" Format="ci8" Width="32" Height="16" Offset="0xF378" TlutOffset="0xECB8"/> <Texture Name="gYoungGanondorfEyeTLUT" OutName="young_ganondorf_eye_tlut" Format="rgba16" Width="16" Height="16" Offset="0xECB8"/>
<Texture Name="object_gndd_Tex_00F578" OutName="tex_0000F578" Format="ci8" Width="32" Height="16" Offset="0xF578" TlutOffset="0xECB8"/> <Texture Name="gYoungGanondorfInnerMouthTex" OutName="young_ganondorf_inner_mouth" Format="rgba16" Width="8" Height="8" Offset="0xEEB8"/>
<Texture Name="object_gndd_Tex_00F778" OutName="tex_0000F778" Format="ci8" Width="32" Height="16" Offset="0xF778" TlutOffset="0xECB8"/> <Texture Name="gYoungGanondorfSideburnTex" OutName="young_ganondorf_sideburn" Format="rgba16" Width="16" Height="16" Offset="0xEF38"/>
<Texture Name="object_gndd_Tex_00F978" OutName="tex_0000F978" Format="rgba16" Width="16" Height="16" Offset="0xF978"/> <Texture Name="gYoungGanondorfOuterMouthTex" OutName="young_ganondorf_outer_mouth" Format="rgba16" Width="4" Height="8" Offset="0xF138"/>
<Texture Name="object_gndd_Tex_00FB78" OutName="tex_0000FB78" Format="rgba16" Width="8" Height="16" Offset="0xFB78"/> <Texture Name="gYoungGanondorfEyeOpenTex" OutName="young_ganondorf_eye_open" Format="ci8" Width="32" Height="16" Offset="0xF178" TlutOffset="0xECB8"/>
<Texture Name="object_gndd_Tex_00FC78" OutName="tex_0000FC78" Format="rgba16" Width="8" Height="8" Offset="0xFC78"/> <Texture Name="gYoungGanondorfEyeHalfTex" OutName="young_ganondorf_eye_half" Format="ci8" Width="32" Height="16" Offset="0xF378" TlutOffset="0xECB8"/>
<Texture Name="object_gndd_Tex_00FCF8" OutName="tex_0000FCF8" Format="rgba16" Width="4" Height="16" Offset="0xFCF8"/> <Texture Name="gYoungGanondorfEyeClosedTex" OutName="young_ganondorf_eye_closed" Format="ci8" Width="32" Height="16" Offset="0xF578" TlutOffset="0xECB8"/>
<Texture Name="object_gndd_Tex_00FD78" OutName="tex_0000FD78" Format="rgba16" Width="16" Height="8" Offset="0xFD78"/> <Texture Name="gYoungGanondorfEyeLookingDownTex" OutName="young_ganondorf_eye_looking_down" Format="ci8" Width="32" Height="16" Offset="0xF778" TlutOffset="0xECB8"/>
<Texture Name="object_gndd_Tex_00FE78" OutName="tex_0000FE78" Format="rgba16" Width="16" Height="16" Offset="0xFE78"/> <Texture Name="gYoungGanondorfUpperLipTex" OutName="young_ganondorf_upper_lip" Format="rgba16" Width="16" Height="16" Offset="0xF978"/>
<Texture Name="object_gndd_Tex_010078" OutName="tex_00010078" Format="rgba16" Width="16" Height="16" Offset="0x10078"/> <Texture Name="gYoungGanondorfEarTex" OutName="young_ganondorf_ear" Format="rgba16" Width="8" Height="16" Offset="0xFB78"/>
<Texture Name="object_gndd_Tex_010278" OutName="tex_00010278" Format="rgba16" Width="32" Height="16" Offset="0x10278"/> <Texture Name="gYoungGanondorfNoseTex" OutName="young_ganondorf_nose" Format="rgba16" Width="8" Height="8" Offset="0xFC78"/>
<Texture Name="object_gndd_Tex_010678" OutName="tex_00010678" Format="rgba16" Width="16" Height="16" Offset="0x10678"/> <Texture Name="gYoungGanondorfNoseBridgeTex" OutName="young_ganondorf_nose_bridge" Format="rgba16" Width="4" Height="16" Offset="0xFCF8"/>
<Texture Name="object_gndd_Tex_010878" OutName="tex_00010878" Format="rgba16" Width="8" Height="8" Offset="0x10878"/> <Texture Name="gYoungGanondorfEyebrowTex" OutName="young_ganondorf_eyebrow" Format="rgba16" Width="16" Height="8" Offset="0xFD78"/>
<Texture Name="object_gndd_Tex_0108F8" OutName="tex_000108F8" Format="rgba16" Width="8" Height="8" Offset="0x108F8"/> <Texture Name="gYoungGanondorfJawTex" OutName="young_ganondorf_jaw" Format="rgba16" Width="16" Height="16" Offset="0xFE78"/>
<Texture Name="object_gndd_Tex_010978" OutName="tex_00010978" Format="rgba16" Width="16" Height="16" Offset="0x10978"/> <Texture Name="gYoungGanondorfBlackLeatherTex" OutName="young_ganondorf_black_leather" Format="rgba16" Width="16" Height="16" Offset="0x10078"/>
<Texture Name="object_gndd_Tex_010B78" OutName="tex_00010B78" Format="rgba16" Width="16" Height="16" Offset="0x10B78"/> <Texture Name="gYoungGanondorfGerudoFabricWithSunTex" OutName="young_ganondorf_gerudo_fabric_with_sun" Format="rgba16" Width="32" Height="16" Offset="0x10278"/>
<Texture Name="object_gndd_Tex_010D78" OutName="tex_00010D78" Format="rgba16" Width="16" Height="16" Offset="0x10D78"/> <Texture Name="gYoungGanondorfLeatherTex" OutName="young_ganondorf_leather" Format="rgba16" Width="16" Height="16" Offset="0x10678"/>
<Texture Name="object_gndd_Tex_010F78" OutName="tex_00010F78" Format="rgba16" Width="16" Height="32" Offset="0x10F78"/> <Texture Name="gYoungGanondorfBodysuitTex" OutName="young_ganondorf_bodysuit" Format="rgba16" Width="8" Height="8" Offset="0x10878"/>
<Texture Name="object_gndd_Tex_011378" OutName="tex_00011378" Format="rgba16" Width="16" Height="16" Offset="0x11378"/> <Texture Name="gYoungGanondorfNeckTex" OutName="young_ganondorf_neck" Format="rgba16" Width="8" Height="8" Offset="0x108F8"/>
<Texture Name="object_gndd_Tex_011578" OutName="tex_00011578" Format="rgba16" Width="8" Height="8" Offset="0x11578"/> <Texture Name="gYoungGanondorfChestAndKnifeJewelTex" OutName="young_ganondorf_chest_and_knife_jewel" Format="rgba16" Width="16" Height="16" Offset="0x10978"/>
<Texture Name="object_gndd_Tex_0115F8" OutName="tex_000115F8" Format="rgba16" Width="8" Height="8" Offset="0x115F8"/> <Texture Name="gYoungGanondorfGerudoFabricTex" OutName="young_ganondorf_gerudo_fabric" Format="rgba16" Width="16" Height="16" Offset="0x10B78"/>
<Texture Name="object_gndd_Tex_011678" OutName="tex_00011678" Format="rgba16" Width="8" Height="8" Offset="0x11678"/> <Texture Name="gYoungGanondorfHairFringeTex" OutName="young_ganondorf_hair_fringe" Format="rgba16" Width="16" Height="16" Offset="0x10D78"/>
<Texture Name="object_gndd_Tex_0116F8" OutName="tex_000116F8" Format="rgba16" Width="4" Height="4" Offset="0x116F8"/> <Texture Name="gYoungGanondorfJewelTex" OutName="young_ganondorf_jewel" Format="rgba16" Width="16" Height="32" Offset="0x10F78"/>
<Texture Name="object_gndd_Tex_011718" OutName="tex_00011718" Format="i8" Width="16" Height="16" Offset="0x11718"/> <Texture Name="gYoungGanondorfPauldronTex" OutName="young_ganondorf_pauldron" Format="rgba16" Width="16" Height="16" Offset="0x11378"/> <!-- Also used for the sides of his gauntlets and knee guards. -->
<Texture Name="object_gndd_Tex_011818" OutName="tex_00011818" Format="rgba16" Width="4" Height="8" Offset="0x11818"/> <Texture Name="gYoungGanondorfThumbTex" OutName="young_ganondorf_thumb" Format="rgba16" Width="8" Height="8" Offset="0x11578"/>
<Texture Name="object_gndd_Tex_011858" OutName="tex_00011858" Format="rgba16" Width="4" Height="4" Offset="0x11858"/> <Texture Name="gYoungGanondorfHandSideTex" OutName="young_ganondorf_hand_side" Format="rgba16" Width="8" Height="8" Offset="0x115F8"/>
<Limb Name="object_gndd_Limb_011878" LimbType="Standard" Offset="0x11878"/> <Texture Name="gYoungGanondorfFingerTex" OutName="young_ganondorf_finger" Format="rgba16" Width="8" Height="8" Offset="0x11678"/>
<Limb Name="object_gndd_Limb_011884" LimbType="Standard" Offset="0x11884"/> <Texture Name="gYoungGanondorfTeethTex" OutName="young_ganondorf_teeth" Format="rgba16" Width="4" Height="4" Offset="0x116F8"/>
<Limb Name="object_gndd_Limb_011890" LimbType="Standard" Offset="0x11890"/> <Texture Name="gYoungGanondorfPalmMaskTex" OutName="young_ganondorf_palm_mask" Format="i8" Width="16" Height="16" Offset="0x11718"/>
<Limb Name="object_gndd_Limb_01189C" LimbType="Standard" Offset="0x1189C"/> <Texture Name="gYoungGanondorfFingerUndersideTex" OutName="young_ganondorf_finger_underside" Format="rgba16" Width="4" Height="8" Offset="0x11818"/>
<Limb Name="object_gndd_Limb_0118A8" LimbType="Standard" Offset="0x118A8"/> <Texture Name="gYoungGanondorfFingernailTex" OutName="young_ganondorf_fingernail" Format="rgba16" Width="4" Height="4" Offset="0x11858"/>
<Limb Name="object_gndd_Limb_0118B4" LimbType="Standard" Offset="0x118B4"/>
<Limb Name="object_gndd_Limb_0118C0" LimbType="Standard" Offset="0x118C0"/> <!-- Young Ganondorf Limbs -->
<Limb Name="object_gndd_Limb_0118CC" LimbType="Standard" Offset="0x118CC"/> <Limb Name="gYoungGanondorfRootLimb" LimbType="Standard" Offset="0x11878"/>
<Limb Name="object_gndd_Limb_0118D8" LimbType="Standard" Offset="0x118D8"/> <Limb Name="gYoungGanondorfTorsoLimb" LimbType="Standard" Offset="0x11884"/>
<Limb Name="object_gndd_Limb_0118E4" LimbType="Standard" Offset="0x118E4"/> <Limb Name="gYoungGanondorfLeftUpperArmLimb" LimbType="Standard" Offset="0x11890"/>
<Limb Name="object_gndd_Limb_0118F0" LimbType="Standard" Offset="0x118F0"/> <Limb Name="gYoungGanondorfLeftForearmLimb" LimbType="Standard" Offset="0x1189C"/>
<Limb Name="object_gndd_Limb_0118FC" LimbType="Standard" Offset="0x118FC"/> <Limb Name="gYoungGanondorfLeftHandLimb" LimbType="Standard" Offset="0x118A8"/>
<Limb Name="object_gndd_Limb_011908" LimbType="Standard" Offset="0x11908"/> <Limb Name="gYoungGanondorfRightUpperArmLimb" LimbType="Standard" Offset="0x118B4"/>
<Limb Name="object_gndd_Limb_011914" LimbType="Standard" Offset="0x11914"/> <Limb Name="gYoungGanondorfRightForearmLimb" LimbType="Standard" Offset="0x118C0"/>
<Limb Name="object_gndd_Limb_011920" LimbType="Standard" Offset="0x11920"/> <Limb Name="gYoungGanondorfRightHandLimb" LimbType="Standard" Offset="0x118CC"/>
<Limb Name="object_gndd_Limb_01192C" LimbType="Standard" Offset="0x1192C"/> <Limb Name="gYoungGanondorfJewelLimb" LimbType="Standard" Offset="0x118D8"/>
<Limb Name="object_gndd_Limb_011938" LimbType="Standard" Offset="0x11938"/> <Limb Name="gYoungGanondorfLeftUpperLipLimb" LimbType="Standard" Offset="0x118E4"/>
<Limb Name="object_gndd_Limb_011944" LimbType="Standard" Offset="0x11944"/> <Limb Name="gYoungGanondorfJawLimb" LimbType="Standard" Offset="0x118F0"/>
<Limb Name="object_gndd_Limb_011950" LimbType="Standard" Offset="0x11950"/> <Limb Name="gYoungGanondorfChinLimb" LimbType="Standard" Offset="0x118FC"/>
<Limb Name="object_gndd_Limb_01195C" LimbType="Standard" Offset="0x1195C"/> <Limb Name="gYoungGanondorfRightUpperLipLimb" LimbType="Standard" Offset="0x11908"/>
<Limb Name="object_gndd_Limb_011968" LimbType="Standard" Offset="0x11968"/> <Limb Name="gYoungGanondorfTeethLimb" LimbType="Standard" Offset="0x11914"/>
<Limb Name="object_gndd_Limb_011974" LimbType="Standard" Offset="0x11974"/> <Limb Name="gYoungGanondorfHeadLimb" LimbType="Standard" Offset="0x11920"/>
<Limb Name="object_gndd_Limb_011980" LimbType="Standard" Offset="0x11980"/> <Limb Name="gYoungGanondorfPelvisLimb" LimbType="Standard" Offset="0x1192C"/>
<Skeleton Name="object_gndd_Skel_0119E8" Type="Flex" LimbType="Standard" Offset="0x119E8"/> <Limb Name="gYoungGanondorfLeftThighLimb" LimbType="Standard" Offset="0x11938"/>
<Limb Name="gYoungGanondorfLeftShinLimb" LimbType="Standard" Offset="0x11944"/>
<Limb Name="gYoungGanondorfLeftFootLimb" LimbType="Standard" Offset="0x11950"/>
<Limb Name="gYoungGanondorfKnifeLimb" LimbType="Standard" Offset="0x1195C"/>
<Limb Name="gYoungGanondorfRightThighLimb" LimbType="Standard" Offset="0x11968"/>
<Limb Name="gYoungGanondorfRightShinLimb" LimbType="Standard" Offset="0x11974"/>
<Limb Name="gYoungGanondorfRightFootLimb" LimbType="Standard" Offset="0x11980"/>
<!-- Young Ganondorf Skeleton -->
<Skeleton Name="gYoungGanondorfSkel" Type="Flex" LimbType="Standard" Offset="0x119E8"/>
</File> </File>
</Root> </Root>

View file

@ -1,53 +1,53 @@
<Root> <Root>
<ExternalFile XmlPath="objects/gameplay_keep.xml" OutPath="assets/objects/gameplay_keep/"/> <ExternalFile XmlPath="objects/gameplay_keep.xml" OutPath="assets/objects/gameplay_keep/"/>
<File Name="ovl_Boss_Ganon" BaseAddress="0x808D6870" RangeStart="0xE6B8" RangeEnd="0x211D8"> <File Name="ovl_Boss_Ganon" BaseAddress="0x808D6870" RangeStart="0xE6B8" RangeEnd="0x211D8">
<Texture Name="gDorfLightning1Tex" OutName="lightning_1" Format="i8" Width="32" Height="96" Offset="0x11600" Static="Off"/> <Texture Name="gGanondorfLightning1Tex" OutName="lightning_1" Format="i8" Width="32" Height="96" Offset="0x11600" Static="Off"/>
<Texture Name="gDorfLightning2Tex" OutName="lightning_2" Format="i8" Width="32" Height="96" Offset="0x12200" Static="Off"/> <Texture Name="gGanondorfLightning2Tex" OutName="lightning_2" Format="i8" Width="32" Height="96" Offset="0x12200" Static="Off"/>
<Texture Name="gDorfLightning3Tex" OutName="lightning_3" Format="i8" Width="32" Height="96" Offset="0x12E00" Static="Off"/> <Texture Name="gGanondorfLightning3Tex" OutName="lightning_3" Format="i8" Width="32" Height="96" Offset="0x12E00" Static="Off"/>
<Texture Name="gDorfLightning4Tex" OutName="lightning_4" Format="i8" Width="32" Height="96" Offset="0x13A00" Static="Off"/> <Texture Name="gGanondorfLightning4Tex" OutName="lightning_4" Format="i8" Width="32" Height="96" Offset="0x13A00" Static="Off"/>
<Texture Name="gDorfLightning5Tex" OutName="lightning_5" Format="i8" Width="32" Height="96" Offset="0x14600" Static="Off"/> <Texture Name="gGanondorfLightning5Tex" OutName="lightning_5" Format="i8" Width="32" Height="96" Offset="0x14600" Static="Off"/>
<Texture Name="gDorfLightning6Tex" OutName="lightning_6" Format="i8" Width="32" Height="96" Offset="0x15200" Static="Off"/> <Texture Name="gGanondorfLightning6Tex" OutName="lightning_6" Format="i8" Width="32" Height="96" Offset="0x15200" Static="Off"/>
<Texture Name="gDorfLightning7Tex" OutName="lightning_7" Format="i8" Width="32" Height="96" Offset="0x15E00" Static="Off"/> <Texture Name="gGanondorfLightning7Tex" OutName="lightning_7" Format="i8" Width="32" Height="96" Offset="0x15E00" Static="Off"/>
<Texture Name="gDorfLightning8Tex" OutName="lightning_8" Format="i8" Width="32" Height="96" Offset="0x16A00" Static="Off"/> <Texture Name="gGanondorfLightning8Tex" OutName="lightning_8" Format="i8" Width="32" Height="96" Offset="0x16A00" Static="Off"/>
<Texture Name="gDorfLightning9Tex" OutName="lightning_9" Format="i8" Width="32" Height="96" Offset="0x17600" Static="Off"/> <Texture Name="gGanondorfLightning9Tex" OutName="lightning_9" Format="i8" Width="32" Height="96" Offset="0x17600" Static="Off"/>
<Texture Name="gDorfLightning10Tex" OutName="lightning_10" Format="i8" Width="32" Height="96" Offset="0x18200" Static="Off"/> <Texture Name="gGanondorfLightning10Tex" OutName="lightning_10" Format="i8" Width="32" Height="96" Offset="0x18200" Static="Off"/>
<Texture Name="gDorfLightning11Tex" OutName="lightning_11" Format="i8" Width="32" Height="96" Offset="0x18E00" Static="Off"/> <Texture Name="gGanondorfLightning11Tex" OutName="lightning_11" Format="i8" Width="32" Height="96" Offset="0x18E00" Static="Off"/>
<Texture Name="gDorfLightning12Tex" OutName="lightning_12" Format="i8" Width="32" Height="96" Offset="0x19A00" Static="Off"/> <Texture Name="gGanondorfLightning12Tex" OutName="lightning_12" Format="i8" Width="32" Height="96" Offset="0x19A00" Static="Off"/>
<Texture Name="gDorfWindowShatterTemplateTex" OutName="window_shatter_template" Format="i8" Width="32" Height="64" Offset="0xFD38" Static="Off"/> <Texture Name="gGanondorfWindowShatterTemplateTex" OutName="window_shatter_template" Format="i8" Width="32" Height="64" Offset="0xFD38" Static="Off"/>
<DList Name="gDorfLightStreak1DL" Offset="0x1FCF0" Static="Off"/> <DList Name="gGanondorfLightStreak1DL" Offset="0x1FCF0" Static="Off"/>
<DList Name="gDorfLightStreak2DL" Offset="0x1FD28" Static="Off"/> <DList Name="gGanondorfLightStreak2DL" Offset="0x1FD28" Static="Off"/>
<DList Name="gDorfLightStreak3DL" Offset="0x1FD60" Static="Off"/> <DList Name="gGanondorfLightStreak3DL" Offset="0x1FD60" Static="Off"/>
<DList Name="gDorfLightStreak4DL" Offset="0x1FD98" Static="Off"/> <DList Name="gGanondorfLightStreak4DL" Offset="0x1FD98" Static="Off"/>
<DList Name="gDorfLightStreak5DL" Offset="0x1FDD0" Static="Off"/> <DList Name="gGanondorfLightStreak5DL" Offset="0x1FDD0" Static="Off"/>
<DList Name="gDorfLightStreak6DL" Offset="0x1FE08" Static="Off"/> <DList Name="gGanondorfLightStreak6DL" Offset="0x1FE08" Static="Off"/>
<DList Name="gDorfLightStreak7DL" Offset="0x1FE40" Static="Off"/> <DList Name="gGanondorfLightStreak7DL" Offset="0x1FE40" Static="Off"/>
<DList Name="gDorfLightStreak8DL" Offset="0x1FE78" Static="Off"/> <DList Name="gGanondorfLightStreak8DL" Offset="0x1FE78" Static="Off"/>
<DList Name="gDorfLightStreak9DL" Offset="0x1FEB0" Static="Off"/> <DList Name="gGanondorfLightStreak9DL" Offset="0x1FEB0" Static="Off"/>
<DList Name="gDorfLightStreak10DL" Offset="0x1FEE8" Static="Off"/> <DList Name="gGanondorfLightStreak10DL" Offset="0x1FEE8" Static="Off"/>
<DList Name="gDorfLightStreak11DL" Offset="0x1FF20" Static="Off"/> <DList Name="gGanondorfLightStreak11DL" Offset="0x1FF20" Static="Off"/>
<DList Name="gDorfLightStreak12DL" Offset="0x1FF58" Static="Off"/> <DList Name="gGanondorfLightStreak12DL" Offset="0x1FF58" Static="Off"/>
<DList Name="gDorfShadowSetupDL" Offset="0xE6F8" Static="Off"/> <DList Name="gGanondorfShadowSetupDL" Offset="0xE6F8" Static="Off"/>
<DList Name="gDorfShadowModelDL" Offset="0xE718" Static="Off"/> <DList Name="gGanondorfShadowModelDL" Offset="0xE718" Static="Off"/>
<DList Name="gDorfTriforceDL" Offset="0xF788" Static="Off"/> <DList Name="gGanondorfTriforceDL" Offset="0xF788" Static="Off"/>
<DList Name="gDorfWindowShardMaterialDL" Offset="0xFC78" Static="Off"/> <DList Name="gGanondorfWindowShardMaterialDL" Offset="0xFC78" Static="Off"/>
<DList Name="gDorfWindowShardModelDL" Offset="0xFD20" Static="Off"/> <DList Name="gGanondorfWindowShardModelDL" Offset="0xFD20" Static="Off"/>
<DList Name="gDorfLightBallMaterialDL" Offset="0x11578" Static="Off"/> <DList Name="gGanondorfLightBallMaterialDL" Offset="0x11578" Static="Off"/>
<DList Name="gDorfSquareDL" Offset="0x115E8" Static="Off"/> <DList Name="gGanondorfSquareDL" Offset="0x115E8" Static="Off"/>
<DList Name="gDorfLightningDL" Offset="0x1A640" Static="Off"/> <DList Name="gGanondorfLightningDL" Offset="0x1A640" Static="Off"/>
<DList Name="gDorfUnusedDL" Offset="0x1A6F0" Static="Off"/> <DList Name="gGanondorfUnusedDL" Offset="0x1A6F0" Static="Off"/>
<DList Name="gDorfLightRayTriDL" Offset="0x1A768" Static="Off"/> <DList Name="gGanondorfLightRayTriDL" Offset="0x1A768" Static="Off"/>
<DList Name="gDorfLightFlecksDL" Offset="0x1C1C0" Static="Off"/> <DList Name="gGanondorfLightFlecksDL" Offset="0x1C1C0" Static="Off"/>
<DList Name="gDorfBigMagicBGCircleDL" Offset="0x1C2B0" Static="Off"/> <DList Name="gGanondorfBigMagicBGCircleDL" Offset="0x1C2B0" Static="Off"/>
<DList Name="gDorfDotDL" Offset="0x1C358" Static="Off"/> <DList Name="gGanondorfDotDL" Offset="0x1C358" Static="Off"/>
<DList Name="gDorfShockwaveDL" Offset="0x1CDC0" Static="Off"/> <DList Name="gGanondorfShockwaveDL" Offset="0x1CDC0" Static="Off"/>
<DList Name="gDorfImpactDarkDL" Offset="0x1DC58" Static="Off"/> <DList Name="gGanondorfImpactDarkDL" Offset="0x1DC58" Static="Off"/>
<DList Name="gDorfImpactLightDL" Offset="0x1DD70" Static="Off"/> <DList Name="gGanondorfImpactLightDL" Offset="0x1DD70" Static="Off"/>
<DList Name="gDorfShockGlowDL" Offset="0x1EEC8" Static="Off"/> <DList Name="gGanondorfShockGlowDL" Offset="0x1EEC8" Static="Off"/>
<DList Name="gDorfLightCoreDL" Offset="0x20228" Static="Off"/> <DList Name="gGanondorfLightCoreDL" Offset="0x20228" Static="Off"/>
<DList Name="gDorfShockDL" Offset="0x202F0" Static="Off"/> <DList Name="gGanondorfShockDL" Offset="0x202F0" Static="Off"/>
<DList Name="gDorfVortexDL" Offset="0x210D0" Static="Off"/> <DList Name="gGanondorfVortexDL" Offset="0x210D0" Static="Off"/>
</File> </File>
</Root> </Root>

View file

@ -534,35 +534,25 @@ s32 Actor_TrackPlayer(PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* tors
void ActorOverlayTable_LogPrint(void); void ActorOverlayTable_LogPrint(void);
void ActorOverlayTable_Init(void); void ActorOverlayTable_Init(void);
void ActorOverlayTable_Cleanup(void); void ActorOverlayTable_Cleanup(void);
u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* nodeList);
void func_80038A28(CollisionPoly* poly, f32 tx, f32 ty, f32 tz, MtxF* dest); void func_80038A28(CollisionPoly* poly, f32 tx, f32 ty, f32 tz, MtxF* dest);
f32 CollisionPoly_GetPointDistanceFromPlane(CollisionPoly* poly, Vec3f* point); f32 CollisionPoly_GetPointDistanceFromPlane(CollisionPoly* poly, Vec3f* point);
void CollisionPoly_GetVerticesByBgId(CollisionPoly* poly, s32 bgId, CollisionContext* colCtx, Vec3f* dest); void CollisionPoly_GetVerticesByBgId(CollisionPoly* poly, s32 bgId, CollisionContext* colCtx, Vec3f* dest);
s32 BgCheck_CheckStaticCeiling(StaticLookup* lookup, u16 xpFlags, CollisionContext* colCtx, f32* outY, Vec3f* pos,
f32 checkHeight, CollisionPoly** outPoly);
s32 BgCheck_CheckLineAgainstSSList(SSList* ssList, CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2, Vec3f* posA,
Vec3f* posB, Vec3f* outPos, CollisionPoly** outPoly, f32* outDistSq, f32 chkDist,
s32 bccFlags);
void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector);
void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader* colHeader); void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader* colHeader);
s32 BgCheck_PosInStaticBoundingBox(CollisionContext* colCtx, Vec3f* pos); f32 BgCheck_EntityRaycastDown1(CollisionContext* colCtx, CollisionPoly** outGroundPoly, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor1(CollisionContext* colCtx, CollisionPoly** outPoly, Vec3f* pos); f32 BgCheck_EntityRaycastDown2(PlayState* play, CollisionContext* colCtx, CollisionPoly** outGroundPoly, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor2(PlayState* play, CollisionContext* colCtx, CollisionPoly** outPoly, f32 BgCheck_EntityRaycastDown3(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, Vec3f* pos);
Vec3f* pos); f32 BgCheck_EntityRaycastDown4(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, Actor* actor,
f32 BgCheck_EntityRaycastFloor3(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos); Vec3f* pos);
f32 BgCheck_EntityRaycastFloor4(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos); f32 BgCheck_EntityRaycastDown5(PlayState* play, CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId,
f32 BgCheck_EntityRaycastFloor5(PlayState* play, CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
Actor* actor, Vec3f* pos); f32 BgCheck_EntityRaycastDown6(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, Actor* actor,
f32 BgCheck_EntityRaycastFloor6(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos, Vec3f* pos, f32 chkDist);
f32 chkDist); f32 BgCheck_EntityRaycastDown7(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor7(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos); f32 BgCheck_AnyRaycastDown1(CollisionContext* colCtx, CollisionPoly* outGroundPoly, Vec3f* pos);
f32 BgCheck_AnyRaycastFloor1(CollisionContext* colCtx, CollisionPoly* outPoly, Vec3f* pos); f32 BgCheck_AnyRaycastDown2(CollisionContext* colCtx, CollisionPoly* outGroundPoly, s32* bgId, Vec3f* pos);
f32 BgCheck_AnyRaycastFloor2(CollisionContext* colCtx, CollisionPoly* outPoly, s32* bgId, Vec3f* pos); f32 BgCheck_CameraRaycastDown2(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
f32 BgCheck_CameraRaycastFloor2(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos); f32 BgCheck_EntityRaycastDownWalls(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor8(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos); f32 BgCheck_EntityRaycastDown9(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor9(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev,
f32 radius, CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight, u8 argA);
s32 BgCheck_EntitySphVsWall1(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, s32 BgCheck_EntitySphVsWall1(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
CollisionPoly** outPoly, f32 checkHeight); CollisionPoly** outPoly, f32 checkHeight);
s32 BgCheck_EntitySphVsWall2(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, s32 BgCheck_EntitySphVsWall2(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
@ -574,9 +564,6 @@ s32 BgCheck_EntitySphVsWall4(CollisionContext* colCtx, Vec3f* posResult, Vec3f*
s32 BgCheck_AnyCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight); s32 BgCheck_AnyCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight);
s32 BgCheck_EntityCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight, s32 BgCheck_EntityCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight,
CollisionPoly** outPoly, s32* outBgId, Actor* actor); CollisionPoly** outPoly, s32* outBgId, Actor* actor);
s32 BgCheck_CheckLineImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2, Vec3f* posA, Vec3f* posB,
Vec3f* posResult, CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 chkDist,
u32 bccFlags);
s32 BgCheck_CameraLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, s32 BgCheck_CameraLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId); CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
s32 BgCheck_CameraLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, s32 BgCheck_CameraLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
@ -599,12 +586,7 @@ s32 BgCheck_AnyLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec
s32 BgCheck_AnyLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 BgCheck_AnyLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId); s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
s32 BgCheck_SphVsFirstPoly(CollisionContext* colCtx, Vec3f* center, f32 radius); s32 BgCheck_SphVsFirstPoly(CollisionContext* colCtx, Vec3f* center, f32 radius);
void SSNodeList_Initialize(SSNodeList*);
void SSNodeList_Alloc(PlayState* play, SSNodeList* this, s32 tblMax, s32 numPolys);
u16 SSNodeList_GetNextNodeIdx(SSNodeList* this);
s32 DynaPoly_IsBgIdBgActor(s32 bgId); s32 DynaPoly_IsBgIdBgActor(s32 bgId);
void DynaPoly_Init(PlayState* play, DynaCollisionContext* dyna);
void DynaPoly_Alloc(PlayState* play, DynaCollisionContext* dyna);
void DynaPoly_DisableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId); void DynaPoly_DisableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId);
void DynaPoly_EnableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId); void DynaPoly_EnableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId);
void DynaPoly_DisableCeilingCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId); void DynaPoly_DisableCeilingCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId);
@ -615,19 +597,8 @@ void DynaPoly_InvalidateLookup(PlayState* play, DynaCollisionContext* dyna);
void DynaPoly_UnsetAllInteractFlags(PlayState* play, DynaCollisionContext* dyna, Actor* actor); void DynaPoly_UnsetAllInteractFlags(PlayState* play, DynaCollisionContext* dyna, Actor* actor);
void DynaPoly_UpdateContext(PlayState* play, DynaCollisionContext* dyna); void DynaPoly_UpdateContext(PlayState* play, DynaCollisionContext* dyna);
void DynaPoly_UpdateBgActorTransforms(PlayState* play, DynaCollisionContext* dyna); void DynaPoly_UpdateBgActorTransforms(PlayState* play, DynaCollisionContext* dyna);
f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast);
s32 BgCheck_SphVsDynaWall(CollisionContext* colCtx, u16 xpFlags, f32* outX, f32* outZ, Vec3f* pos, f32 radius,
CollisionPoly** outPoly, s32* outBgId, Actor* actor);
s32 BgCheck_CheckDynaCeiling(CollisionContext* colCtx, u16 xpFlags, f32* outY, Vec3f* pos, f32 chkDist,
CollisionPoly** outPoly, s32* outBgId, Actor* actor);
s32 BgCheck_CheckLineAgainstDyna(CollisionContext* colCtx, u16 xpFlags, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
CollisionPoly** outPoly, f32* distSq, s32* outBgId, Actor* actor, f32 chkDist,
s32 bccFlags);
s32 BgCheck_SphVsFirstDynaPoly(CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly, s32* outBgId,
Vec3f* center, f32 radius, Actor* actor, u16 bciFlags);
void CollisionHeader_GetVirtual(void* colHeader, CollisionHeader** dest); void CollisionHeader_GetVirtual(void* colHeader, CollisionHeader** dest);
void func_800418D0(CollisionContext* colCtx, PlayState* play); void func_800418D0(CollisionContext* colCtx, PlayState* play);
void BgCheck_ResetPolyCheckTbl(SSNodeList* nodeList, s32 numPolys);
u32 SurfaceType_GetBgCamIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); u32 SurfaceType_GetBgCamIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u16 BgCheck_GetBgCamSettingImpl(CollisionContext* colCtx, u32 bgCamIndex, s32 bgId); u16 BgCheck_GetBgCamSettingImpl(CollisionContext* colCtx, u32 bgCamIndex, s32 bgId);
u16 BgCheck_GetBgCamSetting(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); u16 BgCheck_GetBgCamSetting(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
@ -664,7 +635,7 @@ s32 WaterBox_GetSurfaceImpl(PlayState* play, CollisionContext* colCtx, f32 x, f3
WaterBox** outWaterBox); WaterBox** outWaterBox);
u32 WaterBox_GetBgCamIndex(CollisionContext* colCtx, WaterBox* waterBox); u32 WaterBox_GetBgCamIndex(CollisionContext* colCtx, WaterBox* waterBox);
u16 WaterBox_GetBgCamSetting(CollisionContext* colCtx, WaterBox* waterBox); u16 WaterBox_GetBgCamSetting(CollisionContext* colCtx, WaterBox* waterBox);
u32 WaterBox_GetLightSettingIndex(CollisionContext* colCtx, WaterBox* waterBox); u32 WaterBox_GetLightIndex(CollisionContext* colCtx, WaterBox* waterBox);
s32 func_80042708(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* point, Vec3f* closestPoint); s32 func_80042708(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* point, Vec3f* closestPoint);
s32 func_800427B4(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* pointA, Vec3f* pointB, Vec3f* closestPoint); s32 func_800427B4(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* pointA, Vec3f* pointB, Vec3f* closestPoint);
void BgCheck_DrawDynaCollision(PlayState*, CollisionContext*); void BgCheck_DrawDynaCollision(PlayState*, CollisionContext*);
@ -1483,7 +1454,7 @@ void Play_Destroy(GameState* thisx);
void Play_Init(GameState* thisx); void Play_Init(GameState* thisx);
void Play_Main(GameState* thisx); void Play_Main(GameState* thisx);
s32 Play_InCsMode(PlayState* this); s32 Play_InCsMode(PlayState* this);
f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* vec); f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* pos);
void* Play_LoadFile(PlayState* this, RomFile* file); void* Play_LoadFile(PlayState* this, RomFile* file);
void Play_GetScreenPos(PlayState* this, Vec3f* src, Vec3f* dest); void Play_GetScreenPos(PlayState* this, Vec3f* src, Vec3f* dest);
s16 Play_CreateSubCamera(PlayState* this); s16 Play_CreateSubCamera(PlayState* this);

View file

@ -1346,8 +1346,8 @@ typedef struct {
/* 0x1CAB4 */ s16 inputTimerY; /* 0x1CAB4 */ s16 inputTimerY;
/* 0x1CAB6 */ s16 stickXDir; /* 0x1CAB6 */ s16 stickXDir;
/* 0x1CAB8 */ s16 stickYDir; /* 0x1CAB8 */ s16 stickYDir;
/* 0x1CABA */ s16 stickRelX; /* 0x1CABA */ s16 stickAdjX;
/* 0x1CABC */ s16 stickRelY; /* 0x1CABC */ s16 stickAdjY;
/* 0x1CABE */ s16 nameEntryBoxPosX; /* 0x1CABE */ s16 nameEntryBoxPosX;
/* 0x1CAC0 */ s16 windowPosX; /* 0x1CAC0 */ s16 windowPosX;
/* 0x1CAC4 */ f32 windowRot; /* 0x1CAC4 */ f32 windowRot;

View file

@ -26,8 +26,6 @@ struct DynaPolyActor;
#define FUNC_80041EA4_STOP 8 #define FUNC_80041EA4_STOP 8
#define FUNC_80041EA4_VOID_OUT 12 #define FUNC_80041EA4_VOID_OUT 12
#define WATERBOX_ROOM(p) ((p >> 13) & 0x3F)
typedef struct { typedef struct {
Vec3f scale; Vec3f scale;
Vec3s rot; Vec3s rot;
@ -73,6 +71,32 @@ typedef struct {
/* 0x10 */ s16 unk_10; // unused /* 0x10 */ s16 unk_10; // unused
} BgCamFuncData; // size = 0x12 } BgCamFuncData; // size = 0x12
// Macros for `WaterBox.properties`
#define WATERBOX_BGCAM_INDEX_SHIFT 0
#define WATERBOX_BGCAM_INDEX_MASK 0x000000FF
#define WATERBOX_BGCAM_INDEX(properties) \
(((properties) >> WATERBOX_BGCAM_INDEX_SHIFT) & (WATERBOX_BGCAM_INDEX_MASK >> WATERBOX_BGCAM_INDEX_SHIFT))
#define WATERBOX_LIGHT_INDEX_SHIFT 8
#define WATERBOX_LIGHT_INDEX_MASK 0x00001F00
#define WATERBOX_LIGHT_INDEX(properties) \
(((properties) >> WATERBOX_LIGHT_INDEX_SHIFT) & (WATERBOX_LIGHT_INDEX_MASK >> WATERBOX_LIGHT_INDEX_SHIFT))
#define WATERBOX_LIGHT_INDEX_NONE 0x1F // warns and defaults to 0
#define WATERBOX_ROOM_SHIFT 13
#define WATERBOX_ROOM_MASK 0x0007E000
#define WATERBOX_ROOM(properties) (((properties) >> WATERBOX_ROOM_SHIFT) & (WATERBOX_ROOM_MASK >> WATERBOX_ROOM_SHIFT))
#define WATERBOX_ROOM_ALL 0x3F // value for "room index" indicating "all rooms"
#define WATERBOX_FLAG_19_SHIFT 19
#define WATERBOX_FLAG_19 (1 << WATERBOX_FLAG_19_SHIFT)
#define WATERBOX_PROPERTIES(bgCamIndex, lightIndex, room, setFlag19) \
((((bgCamIndex) << WATERBOX_BGCAM_INDEX_SHIFT) & WATERBOX_BGCAM_INDEX_MASK) | \
(((lightIndex) << WATERBOX_LIGHT_INDEX_SHIFT) & WATERBOX_LIGHT_INDEX_MASK) | \
(((room) << WATERBOX_ROOM_SHIFT) & WATERBOX_ROOM_MASK) | (((setFlag19) & 1) << WATERBOX_FLAG_19_SHIFT))
typedef struct { typedef struct {
/* 0x00 */ s16 xMin; /* 0x00 */ s16 xMin;
/* 0x02 */ s16 ySurface; /* 0x02 */ s16 ySurface;
@ -80,11 +104,6 @@ typedef struct {
/* 0x06 */ s16 xLength; /* 0x06 */ s16 xLength;
/* 0x08 */ s16 zLength; /* 0x08 */ s16 zLength;
/* 0x0C */ u32 properties; /* 0x0C */ u32 properties;
// 0x0008_0000 = ?
// 0x0007_E000 = Room Index, 0x3F = all rooms
// 0x0000_1F00 = Lighting Settings Index
// 0x0000_00FF = BgCam Index
} WaterBox; // size = 0x10 } WaterBox; // size = 0x10
typedef enum { typedef enum {
@ -277,11 +296,11 @@ typedef struct {
/* 0x14 */ Vec3f* pos; /* 0x14 */ Vec3f* pos;
/* 0x18 */ s32* bgId; /* 0x18 */ s32* bgId;
/* 0x1C */ struct Actor* actor; /* 0x1C */ struct Actor* actor;
/* 0x20 */ u32 unk_20; /* 0x20 */ u32 downChkFlags;
/* 0x24 */ f32 chkDist; /* 0x24 */ f32 chkDist;
/* 0x28 */ DynaCollisionContext* dyna; /* 0x28 */ DynaCollisionContext* dyna;
/* 0x2C */ SSList* ssList; /* 0x2C */ SSList* ssList;
} DynaRaycast; } DynaRaycastDown;
typedef struct { typedef struct {
/* 0x00 */ struct CollisionContext* colCtx; /* 0x00 */ struct CollisionContext* colCtx;

View file

@ -1246,7 +1246,7 @@ OcarinaStaff sPlayingStaff;
OcarinaStaff sPlaybackStaff; OcarinaStaff sPlaybackStaff;
OcarinaStaff sRecordingStaff; OcarinaStaff sRecordingStaff;
u32 sOcarinaUpdateTaskStart; u32 sOcarinaUpdateTaskStart;
OcarinaStick sOcarinaInputStickRel; OcarinaStick sOcarinaInputStickAdj;
u32 sOcarinaInputButtonCur; u32 sOcarinaInputButtonCur;
u32 sOcarinaInputButtonStart; u32 sOcarinaInputButtonStart;
u32 sOcarinaInputButtonPrev; u32 sOcarinaInputButtonPrev;
@ -1299,8 +1299,8 @@ void AudioOcarina_ReadControllerInput(void) {
PadMgr_RequestPadData(&gPadMgr, inputs, 0); PadMgr_RequestPadData(&gPadMgr, inputs, 0);
sOcarinaInputButtonCur = input->cur.button; sOcarinaInputButtonCur = input->cur.button;
sOcarinaInputButtonPrev = ocarinaInputButtonPrev; sOcarinaInputButtonPrev = ocarinaInputButtonPrev;
sOcarinaInputStickRel.x = input->rel.stick_x; sOcarinaInputStickAdj.x = input->rel.stick_x;
sOcarinaInputStickRel.y = input->rel.stick_y; sOcarinaInputStickAdj.y = input->rel.stick_y;
} }
/** /**
@ -1719,11 +1719,11 @@ void AudioOcarina_PlayControllerInput(u8 unused) {
if (sRecordingState != OCARINA_RECORD_SCARECROW_SPAWN) { if (sRecordingState != OCARINA_RECORD_SCARECROW_SPAWN) {
// Bend the pitch of the note based on y control stick // Bend the pitch of the note based on y control stick
sCurOcarinaBendIndex = sOcarinaInputStickRel.y; sCurOcarinaBendIndex = sOcarinaInputStickAdj.y;
sCurOcarinaBendFreq = AudioOcarina_BendPitchTwoSemitones(sCurOcarinaBendIndex); sCurOcarinaBendFreq = AudioOcarina_BendPitchTwoSemitones(sCurOcarinaBendIndex);
// Add vibrato of the ocarina note based on the x control stick // Add vibrato of the ocarina note based on the x control stick
sCurOcarinaVibrato = ABS_ALT(sOcarinaInputStickRel.x) >> 2; sCurOcarinaVibrato = ABS_ALT(sOcarinaInputStickAdj.x) >> 2;
// Sets vibrato to io port 6 // Sets vibrato to io port 6
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 6, sCurOcarinaVibrato); Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 6, sCurOcarinaVibrato);
} else { } else {

View file

@ -1168,13 +1168,13 @@ s32 func_8002E234(Actor* actor, f32 arg1, s32 arg2) {
return true; return true;
} }
s32 func_8002E2AC(PlayState* play, Actor* actor, Vec3f* arg2, s32 arg3) { s32 func_8002E2AC(PlayState* play, Actor* actor, Vec3f* pos, s32 arg3) {
f32 floorHeightDiff; f32 floorHeightDiff;
s32 floorBgId; s32 floorBgId;
arg2->y += 50.0f; pos->y += 50.0f;
actor->floorHeight = BgCheck_EntityRaycastFloor5(play, &play->colCtx, &actor->floorPoly, &floorBgId, actor, arg2); actor->floorHeight = BgCheck_EntityRaycastDown5(play, &play->colCtx, &actor->floorPoly, &floorBgId, actor, pos);
actor->bgCheckFlags &= ~(BGCHECKFLAG_GROUND_TOUCH | BGCHECKFLAG_GROUND_LEAVE | BGCHECKFLAG_GROUND_STRICT); actor->bgCheckFlags &= ~(BGCHECKFLAG_GROUND_TOUCH | BGCHECKFLAG_GROUND_LEAVE | BGCHECKFLAG_GROUND_STRICT);
if (actor->floorHeight <= BGCHECK_Y_MIN) { if (actor->floorHeight <= BGCHECK_Y_MIN) {
@ -3472,9 +3472,9 @@ f32 func_80033AEC(Vec3f* arg0, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4, f32 ar
void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play) { void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play) {
MtxF sp60; MtxF sp60;
f32 var; f32 yIntersect;
Vec3f sp50; Vec3f checkPos;
CollisionPoly* sp4C; CollisionPoly* groundPoly;
OPEN_DISPS(play->state.gfxCtx, "../z_actor.c", 8120); OPEN_DISPS(play->state.gfxCtx, "../z_actor.c", 8120);
@ -3484,14 +3484,14 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, alpha); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, alpha);
sp50.x = arg0->x; checkPos.x = arg0->x;
sp50.y = arg0->y + 1.0f; checkPos.y = arg0->y + 1.0f;
sp50.z = arg0->z; checkPos.z = arg0->z;
var = BgCheck_EntityRaycastFloor2(play, &play->colCtx, &sp4C, &sp50); yIntersect = BgCheck_EntityRaycastDown2(play, &play->colCtx, &groundPoly, &checkPos);
if (sp4C != NULL) { if (groundPoly != NULL) {
func_80038A28(sp4C, arg0->x, var, arg0->z, &sp60); func_80038A28(groundPoly, arg0->x, yIntersect, arg0->z, &sp60);
Matrix_Put(&sp60); Matrix_Put(&sp60);
} else { } else {
Matrix_Translate(arg0->x, arg0->y, arg0->z, MTXMODE_NEW); Matrix_Translate(arg0->x, arg0->y, arg0->z, MTXMODE_NEW);

View file

@ -1,6 +1,29 @@
#include "global.h" #include "global.h"
#include "vt.h" #include "vt.h"
u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* nodeList);
void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector);
s32 BgCheck_PosInStaticBoundingBox(CollisionContext* colCtx, Vec3f* pos);
s32 BgCheck_CheckLineImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2, Vec3f* posA, Vec3f* posB,
Vec3f* posResult, CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 chkDist,
u32 bccFlags);
void SSNodeList_Initialize(SSNodeList* this);
void SSNodeList_Alloc(PlayState* play, SSNodeList* this, s32 tblMax, s32 numPolys);
u16 SSNodeList_GetNextNodeIdx(SSNodeList* this);
void DynaPoly_Init(PlayState* play, DynaCollisionContext* dyna);
void DynaPoly_Alloc(PlayState* play, DynaCollisionContext* dyna);
f32 BgCheck_RaycastDownDyna(DynaRaycastDown* dynaRaycastDown);
s32 BgCheck_SphVsDynaWall(CollisionContext* colCtx, u16 xpFlags, f32* outX, f32* outZ, Vec3f* pos, f32 radius,
CollisionPoly** outPoly, s32* outBgId, Actor* actor);
s32 BgCheck_CheckDynaCeiling(CollisionContext* colCtx, u16 xpFlags, f32* outY, Vec3f* pos, f32 chkDist,
CollisionPoly** outPoly, s32* outBgId, Actor* actor);
s32 BgCheck_CheckLineAgainstDyna(CollisionContext* colCtx, u16 xpFlags, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
CollisionPoly** outPoly, f32* distSq, s32* outBgId, Actor* actor, f32 chkDist,
s32 bccFlags);
s32 BgCheck_SphVsFirstDynaPoly(CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly, s32* outBgId,
Vec3f* center, f32 radius, Actor* actor, u16 bciFlags);
void BgCheck_ResetPolyCheckTbl(SSNodeList* nodeList, s32 numPolys);
#define SS_NULL 0xFFFF #define SS_NULL 0xFFFF
// bccFlags // bccFlags
@ -24,6 +47,16 @@
#define COLPOLY_IGNORE_ENTITY (1 << 1) #define COLPOLY_IGNORE_ENTITY (1 << 1)
#define COLPOLY_IGNORE_PROJECTILES (1 << 2) #define COLPOLY_IGNORE_PROJECTILES (1 << 2)
// raycast down flags (downChkFlags)
#define BGCHECK_RAYCAST_DOWN_CHECK_CEILINGS (1 << 0)
#define BGCHECK_RAYCAST_DOWN_CHECK_WALLS (1 << 1)
#define BGCHECK_RAYCAST_DOWN_CHECK_FLOORS (1 << 2)
#define BGCHECK_RAYCAST_DOWN_CHECK_WALLS_SIMPLE (1 << 3) // stops checking dyna walls on finding first candidate result
#define BGCHECK_RAYCAST_DOWN_CHECK_GROUND_ONLY (1 << 4) // skips walls and ceilings with normal.y < 0
// raycast down groundChk flag. When enabled, search range is limited to floors and walls with a normal.y >= 0
#define BGCHECK_GROUND_CHECK_ON (1 << 0)
s32 D_80119D90[WALL_TYPE_MAX] = { s32 D_80119D90[WALL_TYPE_MAX] = {
0, // WALL_TYPE_0 0, // WALL_TYPE_0
WALL_FLAG_0, // WALL_TYPE_1 WALL_FLAG_0, // WALL_TYPE_1
@ -527,10 +560,10 @@ void StaticLookup_AddPoly(StaticLookup* lookup, CollisionContext* colCtx, Collis
* Locates the closest static poly directly underneath `pos`, starting at list `ssList` * Locates the closest static poly directly underneath `pos`, starting at list `ssList`
* returns yIntersect of the closest poly, or `yIntersectMin` * returns yIntersect of the closest poly, or `yIntersectMin`
* stores the pointer of the closest poly to `outPoly` * stores the pointer of the closest poly to `outPoly`
* if (flags & 1), ignore polys with a normal.y < 0 (from vertical walls to ceilings) * if BGCHECK_GROUND_CHECK_ON is set, ignore polys with a normal.y < 0 (from vertical walls to ceilings)
*/ */
f32 BgCheck_RaycastFloorStaticList(CollisionContext* colCtx, u16 xpFlags, SSList* ssList, CollisionPoly** outPoly, f32 BgCheck_RaycastDownStaticList(CollisionContext* colCtx, u16 xpFlags, SSList* ssList, CollisionPoly** outPoly,
Vec3f* pos, f32 yIntersectMin, f32 chkDist, s32 flags) { Vec3f* pos, f32 yIntersectMin, f32 chkDist, s32 groundChk) {
SSNode* curNode; SSNode* curNode;
s32 polyId; s32 polyId;
f32 result; f32 result;
@ -547,7 +580,7 @@ f32 BgCheck_RaycastFloorStaticList(CollisionContext* colCtx, u16 xpFlags, SSList
polyId = curNode->polyId; polyId = curNode->polyId;
if (COLPOLY_VIA_FLAG_TEST(colCtx->colHeader->polyList[polyId].flags_vIA, xpFlags) || if (COLPOLY_VIA_FLAG_TEST(colCtx->colHeader->polyList[polyId].flags_vIA, xpFlags) ||
((flags & 1) && colCtx->colHeader->polyList[polyId].normal.y < 0)) { ((groundChk & BGCHECK_GROUND_CHECK_ON) && colCtx->colHeader->polyList[polyId].normal.y < 0)) {
if (curNode->next == SS_NULL) { if (curNode->next == SS_NULL) {
break; break;
} }
@ -565,7 +598,6 @@ f32 BgCheck_RaycastFloorStaticList(CollisionContext* colCtx, u16 xpFlags, SSList
pos->z, &yIntersect, chkDist) == true) { pos->z, &yIntersect, chkDist) == true) {
// if poly is closer to pos without going over // if poly is closer to pos without going over
if (yIntersect < pos->y && result < yIntersect) { if (yIntersect < pos->y && result < yIntersect) {
result = yIntersect; result = yIntersect;
*outPoly = &colCtx->colHeader->polyList[polyId]; *outPoly = &colCtx->colHeader->polyList[polyId];
} }
@ -584,31 +616,31 @@ f32 BgCheck_RaycastFloorStaticList(CollisionContext* colCtx, u16 xpFlags, SSList
* returns yIntersect of the closest poly, or `yIntersectMin` * returns yIntersect of the closest poly, or `yIntersectMin`
* stores the pointer of the closest poly to `outPoly` * stores the pointer of the closest poly to `outPoly`
*/ */
f32 BgCheck_RaycastFloorStatic(StaticLookup* lookup, CollisionContext* colCtx, u16 xpFlags, CollisionPoly** poly, f32 BgCheck_RaycastDownStatic(StaticLookup* lookup, CollisionContext* colCtx, u16 xpFlags, CollisionPoly** poly,
Vec3f* pos, u32 arg5, f32 chkDist, f32 yIntersectMin) { Vec3f* pos, u32 downChkFlags, f32 chkDist, f32 yIntersectMin) {
s32 flag; // skip polys with normal.y < 0
f32 yIntersect = yIntersectMin; f32 yIntersect = yIntersectMin;
s32 groundChk;
if (arg5 & 4) { if (downChkFlags & BGCHECK_RAYCAST_DOWN_CHECK_FLOORS) {
yIntersect = BgCheck_RaycastFloorStaticList(colCtx, xpFlags, &lookup->floor, poly, pos, yIntersect, chkDist, 0); yIntersect = BgCheck_RaycastDownStaticList(colCtx, xpFlags, &lookup->floor, poly, pos, yIntersect, chkDist, 0);
} }
if ((arg5 & 2) || (arg5 & 8)) { if ((downChkFlags & BGCHECK_RAYCAST_DOWN_CHECK_WALLS) || (downChkFlags & BGCHECK_RAYCAST_DOWN_CHECK_WALLS_SIMPLE)) {
flag = 0; groundChk = 0;
if (arg5 & 0x10) { if (downChkFlags & BGCHECK_RAYCAST_DOWN_CHECK_GROUND_ONLY) {
flag = 1; groundChk |= BGCHECK_GROUND_CHECK_ON;
} }
yIntersect = yIntersect =
BgCheck_RaycastFloorStaticList(colCtx, xpFlags, &lookup->wall, poly, pos, yIntersect, chkDist, flag); BgCheck_RaycastDownStaticList(colCtx, xpFlags, &lookup->wall, poly, pos, yIntersect, chkDist, groundChk);
} }
if (arg5 & 1) { if (downChkFlags & BGCHECK_RAYCAST_DOWN_CHECK_CEILINGS) {
flag = 0; groundChk = 0;
if (arg5 & 0x10) { if (downChkFlags & BGCHECK_RAYCAST_DOWN_CHECK_GROUND_ONLY) {
flag = 1; groundChk |= BGCHECK_GROUND_CHECK_ON;
} }
yIntersect = yIntersect =
BgCheck_RaycastFloorStaticList(colCtx, xpFlags, &lookup->ceiling, poly, pos, yIntersect, chkDist, flag); BgCheck_RaycastDownStaticList(colCtx, xpFlags, &lookup->ceiling, poly, pos, yIntersect, chkDist, groundChk);
} }
return yIntersect; return yIntersect;
@ -1662,19 +1694,19 @@ s32 BgCheck_PosInStaticBoundingBox(CollisionContext* colCtx, Vec3f* pos) {
} }
/** /**
* Raycast Toward Floor * Raycast Downward
* If `actor` != null, bgcheck will be skipped for that actor
* returns the yIntersect of the nearest poly found directly below `pos`, or BGCHECK_Y_MIN if no floor detected * returns the yIntersect of the nearest poly found directly below `pos`, or BGCHECK_Y_MIN if no floor detected
* returns the poly found in `outPoly`, and the bgId of the entity in `outBgId` * returns the poly found in `outPoly`, and the bgId of the entity in `outBgId`
*/ */
f32 BgCheck_RaycastFloorImpl(PlayState* play, CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly, f32 BgCheck_RaycastDownImpl(PlayState* play, CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly,
s32* outBgId, Vec3f* pos, Actor* actor, u32 arg7, f32 chkDist) { s32* outBgId, Vec3f* pos, Actor* actor, u32 downChkFlags, f32 chkDist) {
f32 yIntersectDyna; f32 yIntersectDyna;
s32* temp_a0; s32* temp_a0;
StaticLookup* lookupTbl; StaticLookup* lookupTbl;
Vec3f checkPos; Vec3f checkPos;
StaticLookup* lookup; StaticLookup* lookup;
DynaRaycast dynaRaycast; DynaRaycastDown dynaRaycastDown;
f32 yIntersect; f32 yIntersect;
*outBgId = BGCHECK_SCENE; *outBgId = BGCHECK_SCENE;
@ -1697,25 +1729,26 @@ f32 BgCheck_RaycastFloorImpl(PlayState* play, CollisionContext* colCtx, u16 xpFl
checkPos.y -= colCtx->subdivLength.y; checkPos.y -= colCtx->subdivLength.y;
continue; continue;
} }
yIntersect = BgCheck_RaycastFloorStatic(lookup, colCtx, xpFlags, outPoly, pos, arg7, chkDist, BGCHECK_Y_MIN); yIntersect =
BgCheck_RaycastDownStatic(lookup, colCtx, xpFlags, outPoly, pos, downChkFlags, chkDist, BGCHECK_Y_MIN);
if (yIntersect > BGCHECK_Y_MIN) { if (yIntersect > BGCHECK_Y_MIN) {
break; break;
} }
checkPos.y -= colCtx->subdivLength.y; checkPos.y -= colCtx->subdivLength.y;
} }
dynaRaycast.colCtx = colCtx; dynaRaycastDown.colCtx = colCtx;
dynaRaycast.xpFlags = xpFlags; dynaRaycastDown.xpFlags = xpFlags;
dynaRaycast.yIntersect = yIntersect; dynaRaycastDown.yIntersect = yIntersect;
dynaRaycast.pos = pos; dynaRaycastDown.pos = pos;
dynaRaycast.actor = actor; dynaRaycastDown.actor = actor;
dynaRaycast.unk_20 = arg7; dynaRaycastDown.downChkFlags = downChkFlags;
dynaRaycast.chkDist = chkDist; dynaRaycastDown.chkDist = chkDist;
dynaRaycast.play = play; dynaRaycastDown.play = play;
dynaRaycast.resultPoly = outPoly; dynaRaycastDown.resultPoly = outPoly;
dynaRaycast.bgId = outBgId; dynaRaycastDown.bgId = outBgId;
yIntersectDyna = BgCheck_RaycastFloorDyna(&dynaRaycast); yIntersectDyna = BgCheck_RaycastDownDyna(&dynaRaycastDown);
if (yIntersect < yIntersectDyna) { if (yIntersect < yIntersectDyna) {
yIntersect = yIntersectDyna; yIntersect = yIntersectDyna;
@ -1728,133 +1761,171 @@ f32 BgCheck_RaycastFloorImpl(PlayState* play, CollisionContext* colCtx, u16 xpFl
} }
/** /**
* Public raycast toward floor * Public raycast downward, ground check (UNUSED)
* returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected * returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected
*/ */
f32 BgCheck_CameraRaycastFloor1(CollisionContext* colCtx, CollisionPoly** outPoly, Vec3f* pos) { f32 BgCheck_CameraRaycastDown1(CollisionContext* colCtx, CollisionPoly** outGroundPoly, Vec3f* pos) {
s32 bgId; s32 bgId;
return BgCheck_RaycastFloorImpl(NULL, colCtx, COLPOLY_IGNORE_CAMERA, outPoly, &bgId, pos, NULL, 0x1C, 1.0f); return BgCheck_RaycastDownImpl(NULL, colCtx, COLPOLY_IGNORE_CAMERA, outGroundPoly, &bgId, pos, NULL,
BGCHECK_RAYCAST_DOWN_CHECK_WALLS_SIMPLE | BGCHECK_RAYCAST_DOWN_CHECK_FLOORS |
BGCHECK_RAYCAST_DOWN_CHECK_GROUND_ONLY,
1.0f);
} }
/** /**
* Public raycast toward floor * Public raycast downward, ground check
* returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected * returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected
*/ */
f32 BgCheck_EntityRaycastFloor1(CollisionContext* colCtx, CollisionPoly** outPoly, Vec3f* pos) { f32 BgCheck_EntityRaycastDown1(CollisionContext* colCtx, CollisionPoly** outGroundPoly, Vec3f* pos) {
s32 bgId; s32 bgId;
return BgCheck_RaycastFloorImpl(NULL, colCtx, COLPOLY_IGNORE_ENTITY, outPoly, &bgId, pos, NULL, 0x1C, 1.0f); return BgCheck_RaycastDownImpl(NULL, colCtx, COLPOLY_IGNORE_ENTITY, outGroundPoly, &bgId, pos, NULL,
BGCHECK_RAYCAST_DOWN_CHECK_WALLS_SIMPLE | BGCHECK_RAYCAST_DOWN_CHECK_FLOORS |
BGCHECK_RAYCAST_DOWN_CHECK_GROUND_ONLY,
1.0f);
} }
/** /**
* Public raycast toward floor * Public raycast downward, ground check
* returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected * returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected
*/ */
f32 BgCheck_EntityRaycastFloor2(PlayState* play, CollisionContext* colCtx, CollisionPoly** outPoly, Vec3f* pos) { f32 BgCheck_EntityRaycastDown2(PlayState* play, CollisionContext* colCtx, CollisionPoly** outGroundPoly, Vec3f* pos) {
s32 bgId; s32 bgId;
return BgCheck_RaycastFloorImpl(play, colCtx, COLPOLY_IGNORE_ENTITY, outPoly, &bgId, pos, NULL, 0x1C, 1.0f); return BgCheck_RaycastDownImpl(play, colCtx, COLPOLY_IGNORE_ENTITY, outGroundPoly, &bgId, pos, NULL,
BGCHECK_RAYCAST_DOWN_CHECK_WALLS_SIMPLE | BGCHECK_RAYCAST_DOWN_CHECK_FLOORS |
BGCHECK_RAYCAST_DOWN_CHECK_GROUND_ONLY,
1.0f);
} }
/** /**
* Public raycast toward floor * Public raycast downward, ground check
* returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected * returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected
*/ */
f32 BgCheck_EntityRaycastFloor3(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos) { f32 BgCheck_EntityRaycastDown3(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, Vec3f* pos) {
return BgCheck_RaycastFloorImpl(NULL, colCtx, COLPOLY_IGNORE_ENTITY, outPoly, bgId, pos, NULL, 0x1C, 1.0f); return BgCheck_RaycastDownImpl(NULL, colCtx, COLPOLY_IGNORE_ENTITY, outGroundPoly, bgId, pos, NULL,
BGCHECK_RAYCAST_DOWN_CHECK_WALLS_SIMPLE | BGCHECK_RAYCAST_DOWN_CHECK_FLOORS |
BGCHECK_RAYCAST_DOWN_CHECK_GROUND_ONLY,
1.0f);
} }
/** /**
* Public raycast toward floor * Public raycast downward, ground check
* If `actor` != null, bgcheck will be skipped for that actor
* returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected * returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected
*/ */
f32 BgCheck_EntityRaycastFloor4(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, f32 BgCheck_EntityRaycastDown4(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, Actor* actor,
Vec3f* pos) { Vec3f* pos) {
return BgCheck_RaycastFloorImpl(NULL, colCtx, COLPOLY_IGNORE_ENTITY, outPoly, bgId, pos, actor, 0x1C, 1.0f); return BgCheck_RaycastDownImpl(NULL, colCtx, COLPOLY_IGNORE_ENTITY, outGroundPoly, bgId, pos, actor,
BGCHECK_RAYCAST_DOWN_CHECK_WALLS_SIMPLE | BGCHECK_RAYCAST_DOWN_CHECK_FLOORS |
BGCHECK_RAYCAST_DOWN_CHECK_GROUND_ONLY,
1.0f);
} }
/** /**
* Public raycast toward floor * Public raycast downward, ground check
* If `actor` != null, bgcheck will be skipped for that actor
* returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected * returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected
*/ */
f32 BgCheck_EntityRaycastFloor5(PlayState* play, CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, f32 BgCheck_EntityRaycastDown5(PlayState* play, CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId,
Actor* actor, Vec3f* pos) { Actor* actor, Vec3f* pos) {
return BgCheck_RaycastFloorImpl(play, colCtx, COLPOLY_IGNORE_ENTITY, outPoly, bgId, pos, actor, 0x1C, 1.0f); return BgCheck_RaycastDownImpl(play, colCtx, COLPOLY_IGNORE_ENTITY, outGroundPoly, bgId, pos, actor,
BGCHECK_RAYCAST_DOWN_CHECK_WALLS_SIMPLE | BGCHECK_RAYCAST_DOWN_CHECK_FLOORS |
BGCHECK_RAYCAST_DOWN_CHECK_GROUND_ONLY,
1.0f);
} }
/** /**
* Public raycast toward floor * Public raycast downward, ground check
* If `actor` != null, bgcheck will be skipped for that actor
* `chkDist` is the distance beyond the poly's boundary where the check will still pass
* returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected * returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected
*/ */
f32 BgCheck_EntityRaycastFloor6(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos, f32 BgCheck_EntityRaycastDown6(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, Actor* actor,
f32 chkDist) { Vec3f* pos, f32 chkDist) {
return BgCheck_RaycastFloorImpl(NULL, colCtx, COLPOLY_IGNORE_ENTITY, outPoly, bgId, pos, actor, 0x1C, chkDist); return BgCheck_RaycastDownImpl(NULL, colCtx, COLPOLY_IGNORE_ENTITY, outGroundPoly, bgId, pos, actor,
BGCHECK_RAYCAST_DOWN_CHECK_WALLS_SIMPLE | BGCHECK_RAYCAST_DOWN_CHECK_FLOORS |
BGCHECK_RAYCAST_DOWN_CHECK_GROUND_ONLY,
chkDist);
} }
/** /**
* Public raycast toward floor * Public raycast downward, floor and exhaustive wall check (UNUSED)
* If `actor` != null, bgcheck will be skipped for that actor
* returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected * returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected
*/ */
f32 BgCheck_EntityRaycastFloor7(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, f32 BgCheck_EntityRaycastDown7(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos) {
Vec3f* pos) { return BgCheck_RaycastDownImpl(NULL, colCtx, COLPOLY_IGNORE_ENTITY, outPoly, bgId, pos, actor,
return BgCheck_RaycastFloorImpl(NULL, colCtx, COLPOLY_IGNORE_ENTITY, outPoly, bgId, pos, actor, 0x06, 1.0f); BGCHECK_RAYCAST_DOWN_CHECK_WALLS | BGCHECK_RAYCAST_DOWN_CHECK_FLOORS, 1.0f);
} }
/** /**
* Public raycast toward floor * Public raycast downward, ground check
* `outGroundPoly` returns original value if no poly detected
* returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected * returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected
*/ */
f32 BgCheck_AnyRaycastFloor1(CollisionContext* colCtx, CollisionPoly* outPoly, Vec3f* pos) { f32 BgCheck_AnyRaycastDown1(CollisionContext* colCtx, CollisionPoly* outGroundPoly, Vec3f* pos) {
CollisionPoly* tempPoly; CollisionPoly* checkResultPoly;
f32 result; f32 result;
s32 bgId; s32 bgId;
result = BgCheck_RaycastFloorImpl(NULL, colCtx, COLPOLY_IGNORE_NONE, &tempPoly, &bgId, pos, NULL, 0x1C, 1.0f); result = BgCheck_RaycastDownImpl(NULL, colCtx, COLPOLY_IGNORE_NONE, &checkResultPoly, &bgId, pos, NULL,
BGCHECK_RAYCAST_DOWN_CHECK_WALLS_SIMPLE | BGCHECK_RAYCAST_DOWN_CHECK_FLOORS |
BGCHECK_RAYCAST_DOWN_CHECK_GROUND_ONLY,
1.0f);
if (tempPoly != NULL) { if (checkResultPoly != NULL) {
*outPoly = *tempPoly; *outGroundPoly = *checkResultPoly;
} }
return result; return result;
} }
/** /**
* Public raycast toward floor * Public raycast downward, ground check (UNUSED)
* `outGroundPoly` returns original value if no poly detected
* returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected * returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected
*/ */
f32 BgCheck_AnyRaycastFloor2(CollisionContext* colCtx, CollisionPoly* outPoly, s32* bgId, Vec3f* pos) { f32 BgCheck_AnyRaycastDown2(CollisionContext* colCtx, CollisionPoly* outGroundPoly, s32* bgId, Vec3f* pos) {
CollisionPoly* tempPoly; CollisionPoly* checkResultPoly;
f32 result = BgCheck_RaycastFloorImpl(NULL, colCtx, COLPOLY_IGNORE_NONE, &tempPoly, bgId, pos, NULL, 0x1C, 1.0f); f32 result = BgCheck_RaycastDownImpl(NULL, colCtx, COLPOLY_IGNORE_NONE, &checkResultPoly, bgId, pos, NULL,
BGCHECK_RAYCAST_DOWN_CHECK_WALLS_SIMPLE | BGCHECK_RAYCAST_DOWN_CHECK_FLOORS |
BGCHECK_RAYCAST_DOWN_CHECK_GROUND_ONLY,
1.0f);
if (tempPoly != NULL) { if (checkResultPoly != NULL) {
*outPoly = *tempPoly; *outGroundPoly = *checkResultPoly;
} }
return result; return result;
} }
/** /**
* Public raycast toward floor * Public raycast downward, floor and exhaustive wall check
* returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected * returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected
*/ */
f32 BgCheck_CameraRaycastFloor2(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos) { f32 BgCheck_CameraRaycastDown2(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos) {
return BgCheck_RaycastFloorImpl(NULL, colCtx, COLPOLY_IGNORE_CAMERA, outPoly, bgId, pos, NULL, 0x06, 1.0f); return BgCheck_RaycastDownImpl(NULL, colCtx, COLPOLY_IGNORE_CAMERA, outPoly, bgId, pos, NULL,
BGCHECK_RAYCAST_DOWN_CHECK_WALLS | BGCHECK_RAYCAST_DOWN_CHECK_FLOORS, 1.0f);
} }
/** /**
* Public raycast toward floor * Public raycast downward, exhaustive wall check (UNUSED)
* If `actor` != null, bgcheck will be skipped for that actor
* returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected * returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected
*/ */
f32 BgCheck_EntityRaycastFloor8(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, f32 BgCheck_EntityRaycastDownWalls(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor,
Vec3f* pos) { Vec3f* pos) {
return BgCheck_RaycastFloorImpl(NULL, colCtx, COLPOLY_IGNORE_ENTITY, outPoly, bgId, pos, actor, 0x02, 1.0f); return BgCheck_RaycastDownImpl(NULL, colCtx, COLPOLY_IGNORE_ENTITY, outPoly, bgId, pos, actor,
BGCHECK_RAYCAST_DOWN_CHECK_WALLS, 1.0f);
} }
/** /**
* Public raycast toward floor * Public raycast downward, floor and exhaustive wall check (UNUSED)
* returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected * returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected
*/ */
f32 BgCheck_EntityRaycastFloor9(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos) { f32 BgCheck_EntityRaycastDown9(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos) {
return BgCheck_RaycastFloorImpl(NULL, colCtx, COLPOLY_IGNORE_ENTITY, outPoly, bgId, pos, NULL, 0x06, 1.0f); return BgCheck_RaycastDownImpl(NULL, colCtx, COLPOLY_IGNORE_ENTITY, outPoly, bgId, pos, NULL,
BGCHECK_RAYCAST_DOWN_CHECK_WALLS | BGCHECK_RAYCAST_DOWN_CHECK_FLOORS, 1.0f);
} }
/** /**
@ -3014,52 +3085,54 @@ void DynaPoly_UpdateBgActorTransforms(PlayState* play, DynaCollisionContext* dyn
#define DYNA_RAYCAST_CEILINGS 4 #define DYNA_RAYCAST_CEILINGS 4
/** /**
* Perform dyna poly raycast toward floor on a list of floor, wall, or ceiling polys * Performs a downward raycast check on a list of floor, wall, or ceiling dyna polys
* `listType` specifies the poly list type (e.g. DYNA_RAYCAST_FLOORS) * `listType` specifies the poly list type (e.g. DYNA_RAYCAST_FLOORS)
*/ */
f32 BgCheck_RaycastFloorDynaList(DynaRaycast* dynaRaycast, u32 listType) { f32 BgCheck_RaycastDownDynaList(DynaRaycastDown* dynaRaycastDown, u32 listType) {
CollisionPoly* polyList; CollisionPoly* polyList;
SSNode* curNode; SSNode* curNode;
f32 result; f32 result;
f32 yIntersect; f32 yIntersect;
s16 id; s16 id;
result = dynaRaycast->yIntersect; result = dynaRaycastDown->yIntersect;
if (dynaRaycast->ssList->head == SS_NULL) { if (dynaRaycastDown->ssList->head == SS_NULL) {
return result; return result;
} }
polyList = dynaRaycast->dyna->polyList; polyList = dynaRaycastDown->dyna->polyList;
curNode = &dynaRaycast->dyna->polyNodes.tbl[dynaRaycast->ssList->head]; curNode = &dynaRaycastDown->dyna->polyNodes.tbl[dynaRaycastDown->ssList->head];
while (true) { while (true) {
id = curNode->polyId; id = curNode->polyId;
if (COLPOLY_VIA_FLAG_TEST(polyList[id].flags_vIA, dynaRaycast->xpFlags)) { if (COLPOLY_VIA_FLAG_TEST(polyList[id].flags_vIA, dynaRaycastDown->xpFlags)) {
if (curNode->next == SS_NULL) { if (curNode->next == SS_NULL) {
break; break;
} else { } else {
curNode = &dynaRaycast->dyna->polyNodes.tbl[curNode->next]; curNode = &dynaRaycastDown->dyna->polyNodes.tbl[curNode->next];
continue; continue;
} }
} }
if ((listType & (DYNA_RAYCAST_WALLS | DYNA_RAYCAST_CEILINGS)) && (dynaRaycast->unk_20 & 0x10) && if ((listType & (DYNA_RAYCAST_WALLS | DYNA_RAYCAST_CEILINGS)) &&
(dynaRaycastDown->downChkFlags & BGCHECK_RAYCAST_DOWN_CHECK_GROUND_ONLY) &&
COLPOLY_GET_NORMAL(polyList[id].normal.y) < 0.0f) { COLPOLY_GET_NORMAL(polyList[id].normal.y) < 0.0f) {
if (curNode->next == SS_NULL) { if (curNode->next == SS_NULL) {
break; break;
} else { } else {
curNode = &dynaRaycast->dyna->polyNodes.tbl[curNode->next]; curNode = &dynaRaycastDown->dyna->polyNodes.tbl[curNode->next];
continue; continue;
} }
} }
if (CollisionPoly_CheckYIntersectApprox1(&polyList[id], dynaRaycast->dyna->vtxList, dynaRaycast->pos->x, if (CollisionPoly_CheckYIntersectApprox1(&polyList[id], dynaRaycastDown->dyna->vtxList, dynaRaycastDown->pos->x,
dynaRaycast->pos->z, &yIntersect, dynaRaycast->chkDist) == true && dynaRaycastDown->pos->z, &yIntersect,
yIntersect < dynaRaycast->pos->y && result < yIntersect) { dynaRaycastDown->chkDist) == true &&
yIntersect < dynaRaycastDown->pos->y && result < yIntersect) {
result = yIntersect; result = yIntersect;
*dynaRaycast->resultPoly = &dynaRaycast->dyna->polyList[id]; *dynaRaycastDown->resultPoly = &dynaRaycastDown->dyna->polyList[id];
} }
if (curNode->next == SS_NULL) { if (curNode->next == SS_NULL) {
break; break;
} else { } else {
curNode = &dynaRaycast->dyna->polyNodes.tbl[curNode->next]; curNode = &dynaRaycastDown->dyna->polyNodes.tbl[curNode->next];
continue; continue;
} }
} }
@ -3067,10 +3140,10 @@ f32 BgCheck_RaycastFloorDynaList(DynaRaycast* dynaRaycast, u32 listType) {
} }
/** /**
* Perform dyna poly raycast toward floor * Performs a downward raycast check on dyna polys
* returns the yIntersect of the poly found, or BGCHECK_Y_MIN if no poly is found * returns the yIntersect of the poly found, or BGCHECK_Y_MIN if no poly is found
*/ */
f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast) { f32 BgCheck_RaycastDownDyna(DynaRaycastDown* dynaRaycastDown) {
s32 i; s32 i;
f32 result; f32 result;
f32 intersect2; f32 intersect2;
@ -3092,75 +3165,76 @@ f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast) {
CollisionPoly* poly; CollisionPoly* poly;
result = BGCHECK_Y_MIN; result = BGCHECK_Y_MIN;
*dynaRaycast->bgId = BGCHECK_SCENE; *dynaRaycastDown->bgId = BGCHECK_SCENE;
for (i = 0; i < BG_ACTOR_MAX; i++) { for (i = 0; i < BG_ACTOR_MAX; i++) {
if (!(dynaRaycast->colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE)) { if (!(dynaRaycastDown->colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE)) {
continue; continue;
} }
if (dynaRaycast->actor == dynaRaycast->colCtx->dyna.bgActors[i].actor || if (dynaRaycastDown->actor == dynaRaycastDown->colCtx->dyna.bgActors[i].actor ||
dynaRaycast->pos->y < dynaRaycast->colCtx->dyna.bgActors[i].minY || dynaRaycastDown->pos->y < dynaRaycastDown->colCtx->dyna.bgActors[i].minY ||
Math3D_XZInSphere(&dynaRaycast->colCtx->dyna.bgActors[i].boundingSphere, dynaRaycast->pos->x, Math3D_XZInSphere(&dynaRaycastDown->colCtx->dyna.bgActors[i].boundingSphere, dynaRaycastDown->pos->x,
dynaRaycast->pos->z) == false) { dynaRaycastDown->pos->z) == false) {
continue; continue;
} }
dynaRaycast->dyna = &dynaRaycast->colCtx->dyna; dynaRaycastDown->dyna = &dynaRaycastDown->colCtx->dyna;
if (dynaRaycast->unk_20 & BGCHECK_IGNORE_FLOOR) { if (dynaRaycastDown->downChkFlags & BGCHECK_RAYCAST_DOWN_CHECK_FLOORS) {
dynaRaycast->ssList = &dynaRaycast->colCtx->dyna.bgActors[i].dynaLookup.floor; dynaRaycastDown->ssList = &dynaRaycastDown->colCtx->dyna.bgActors[i].dynaLookup.floor;
intersect2 = BgCheck_RaycastFloorDynaList(dynaRaycast, DYNA_RAYCAST_FLOORS); intersect2 = BgCheck_RaycastDownDynaList(dynaRaycastDown, DYNA_RAYCAST_FLOORS);
if (dynaRaycast->yIntersect < intersect2) { if (dynaRaycastDown->yIntersect < intersect2) {
dynaRaycastDown->yIntersect = intersect2;
dynaRaycast->yIntersect = intersect2; *dynaRaycastDown->bgId = i;
*dynaRaycast->bgId = i;
result = intersect2; result = intersect2;
} }
} }
if ((dynaRaycast->unk_20 & BGCHECK_IGNORE_WALL) || if ((dynaRaycastDown->downChkFlags & BGCHECK_RAYCAST_DOWN_CHECK_WALLS) ||
(*dynaRaycast->resultPoly == NULL && (dynaRaycast->unk_20 & 8))) { (*dynaRaycastDown->resultPoly == NULL &&
dynaRaycast->ssList = &dynaRaycast->colCtx->dyna.bgActors[i].dynaLookup.wall; (dynaRaycastDown->downChkFlags & BGCHECK_RAYCAST_DOWN_CHECK_WALLS_SIMPLE))) {
intersect2 = BgCheck_RaycastFloorDynaList(dynaRaycast, DYNA_RAYCAST_WALLS); dynaRaycastDown->ssList = &dynaRaycastDown->colCtx->dyna.bgActors[i].dynaLookup.wall;
if (dynaRaycast->yIntersect < intersect2) { intersect2 = BgCheck_RaycastDownDynaList(dynaRaycastDown, DYNA_RAYCAST_WALLS);
dynaRaycast->yIntersect = intersect2; if (dynaRaycastDown->yIntersect < intersect2) {
*dynaRaycast->bgId = i; dynaRaycastDown->yIntersect = intersect2;
*dynaRaycastDown->bgId = i;
result = intersect2; result = intersect2;
} }
} }
if (dynaRaycast->unk_20 & BGCHECK_IGNORE_CEILING) { if (dynaRaycastDown->downChkFlags & BGCHECK_RAYCAST_DOWN_CHECK_CEILINGS) {
dynaRaycast->ssList = &dynaRaycast->colCtx->dyna.bgActors[i].dynaLookup.ceiling; dynaRaycastDown->ssList = &dynaRaycastDown->colCtx->dyna.bgActors[i].dynaLookup.ceiling;
intersect2 = BgCheck_RaycastFloorDynaList(dynaRaycast, DYNA_RAYCAST_CEILINGS); intersect2 = BgCheck_RaycastDownDynaList(dynaRaycastDown, DYNA_RAYCAST_CEILINGS);
if (dynaRaycast->yIntersect < intersect2) {
dynaRaycast->yIntersect = intersect2; if (dynaRaycastDown->yIntersect < intersect2) {
*dynaRaycast->bgId = i; dynaRaycastDown->yIntersect = intersect2;
*dynaRaycastDown->bgId = i;
result = intersect2; result = intersect2;
} }
} }
} }
dynaActor = DynaPoly_GetActor(dynaRaycast->colCtx, *dynaRaycast->bgId); dynaActor = DynaPoly_GetActor(dynaRaycastDown->colCtx, *dynaRaycastDown->bgId);
if ((result != BGCHECK_Y_MIN) && (dynaActor != NULL) && (dynaRaycast->play != NULL)) { if ((result != BGCHECK_Y_MIN) && (dynaActor != NULL) && (dynaRaycastDown->play != NULL)) {
pauseState = dynaRaycast->play->pauseCtx.state != PAUSE_STATE_OFF; pauseState = dynaRaycastDown->play->pauseCtx.state != PAUSE_STATE_OFF;
if (!pauseState) { if (!pauseState) {
pauseState = dynaRaycast->play->pauseCtx.debugState != 0; pauseState = dynaRaycastDown->play->pauseCtx.debugState != 0;
} }
if (!pauseState && (dynaRaycast->colCtx->dyna.bgActorFlags[*dynaRaycast->bgId] & BGACTOR_1)) { if (!pauseState && (dynaRaycastDown->colCtx->dyna.bgActorFlags[*dynaRaycastDown->bgId] & BGACTOR_1)) {
curTransform = &dynaRaycast->dyna->bgActors[*dynaRaycast->bgId].curTransform; curTransform = &dynaRaycastDown->dyna->bgActors[*dynaRaycastDown->bgId].curTransform;
polyMin = polyMin =
&dynaRaycast->dyna->polyList[dynaRaycast->dyna->bgActors[*dynaRaycast->bgId].dynaLookup.polyStartIndex]; &dynaRaycastDown->dyna
polyIndex = *dynaRaycast->resultPoly - polyMin; ->polyList[dynaRaycastDown->dyna->bgActors[*dynaRaycastDown->bgId].dynaLookup.polyStartIndex];
poly = &dynaRaycast->dyna->bgActors[*dynaRaycast->bgId].colHeader->polyList[polyIndex]; polyIndex = *dynaRaycastDown->resultPoly - polyMin;
poly = &dynaRaycastDown->dyna->bgActors[*dynaRaycastDown->bgId].colHeader->polyList[polyIndex];
SkinMatrix_SetTranslateRotateYXZScale(&srpMtx, curTransform->scale.x, curTransform->scale.y, SkinMatrix_SetTranslateRotateYXZScale(&srpMtx, curTransform->scale.x, curTransform->scale.y,
curTransform->scale.z, curTransform->rot.x, curTransform->rot.y, curTransform->scale.z, curTransform->rot.x, curTransform->rot.y,
curTransform->rot.z, curTransform->pos.x, curTransform->pos.y, curTransform->rot.z, curTransform->pos.x, curTransform->pos.y,
curTransform->pos.z); curTransform->pos.z);
vtxList = dynaRaycast->dyna->bgActors[*dynaRaycast->bgId].colHeader->vtxList; vtxList = dynaRaycastDown->dyna->bgActors[*dynaRaycastDown->bgId].colHeader->vtxList;
for (i2 = 0; i2 < 3; i2++) { for (i2 = 0; i2 < 3; i2++) {
Math_Vec3s_ToVec3f(&vtx, &vtxList[COLPOLY_VTX_INDEX(poly->vtxData[i2])]); Math_Vec3s_ToVec3f(&vtx, &vtxList[COLPOLY_VTX_INDEX(poly->vtxData[i2])]);
@ -3174,9 +3248,9 @@ f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast) {
polyNorm.y *= 1.0f / magnitude; polyNorm.y *= 1.0f / magnitude;
polyNorm.z *= 1.0f / magnitude; polyNorm.z *= 1.0f / magnitude;
polyDist = -DOTXYZ(polyNorm, polyVtx[0]); polyDist = -DOTXYZ(polyNorm, polyVtx[0]);
if (Math3D_TriChkPointParaYIntersectInsideTri(&polyVtx[0], &polyVtx[1], &polyVtx[2], polyNorm.x, if (Math3D_TriChkPointParaYIntersectInsideTri(
polyNorm.y, polyNorm.z, polyDist, dynaRaycast->pos->z, &polyVtx[0], &polyVtx[1], &polyVtx[2], polyNorm.x, polyNorm.y, polyNorm.z, polyDist,
dynaRaycast->pos->x, &intersect, dynaRaycast->chkDist)) { dynaRaycastDown->pos->z, dynaRaycastDown->pos->x, &intersect, dynaRaycastDown->chkDist)) {
if (fabsf(intersect - result) < 1.0f) { if (fabsf(intersect - result) < 1.0f) {
result = intersect; result = intersect;
@ -4174,9 +4248,9 @@ s32 WaterBox_GetSurfaceImpl(PlayState* play, CollisionContext* colCtx, f32 x, f3
for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->numWaterBoxes; for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->numWaterBoxes;
curWaterBox++) { curWaterBox++) {
room = (curWaterBox->properties >> 13) & 0x3F; room = WATERBOX_ROOM(curWaterBox->properties);
if (room == (u32)play->roomCtx.curRoom.num || room == 0x3F) { if (room == (u32)play->roomCtx.curRoom.num || room == WATERBOX_ROOM_ALL) {
if ((curWaterBox->properties & 0x80000) == 0) { if (!(curWaterBox->properties & WATERBOX_FLAG_19)) {
if (curWaterBox->xMin < x && x < curWaterBox->xMin + curWaterBox->xLength) { if (curWaterBox->xMin < x && x < curWaterBox->xMin + curWaterBox->xLength) {
if (curWaterBox->zMin < z && z < curWaterBox->zMin + curWaterBox->zLength) { if (curWaterBox->zMin < z && z < curWaterBox->zMin + curWaterBox->zLength) {
*outWaterBox = curWaterBox; *outWaterBox = curWaterBox;
@ -4191,7 +4265,7 @@ s32 WaterBox_GetSurfaceImpl(PlayState* play, CollisionContext* colCtx, f32 x, f3
} }
/** /**
* Gets the first active WaterBox at `pos` where WaterBox.properties & 0x80000 == 0 * Gets the first active WaterBox at `pos` with WATERBOX_FLAG_19 not set
* `surfaceChkDist` is the absolute y distance from the water surface to check * `surfaceChkDist` is the absolute y distance from the water surface to check
* returns the index of the waterbox found, or -1 if no waterbox is found * returns the index of the waterbox found, or -1 if no waterbox is found
* `outWaterBox` returns the pointer to the waterbox found, or NULL if none is found * `outWaterBox` returns the pointer to the waterbox found, or NULL if none is found
@ -4213,10 +4287,10 @@ s32 WaterBox_GetSurface2(PlayState* play, CollisionContext* colCtx, Vec3f* pos,
waterBox = &colHeader->waterBoxes[i]; waterBox = &colHeader->waterBoxes[i];
room = WATERBOX_ROOM(waterBox->properties); room = WATERBOX_ROOM(waterBox->properties);
if (!(room == play->roomCtx.curRoom.num || room == 0x3F)) { if (!(room == play->roomCtx.curRoom.num || room == WATERBOX_ROOM_ALL)) {
continue; continue;
} }
if (waterBox->properties & 0x80000) { if (waterBox->properties & WATERBOX_FLAG_19) {
continue; continue;
} }
if (!(waterBox->xMin < pos->x && pos->x < waterBox->xMin + waterBox->xLength)) { if (!(waterBox->xMin < pos->x && pos->x < waterBox->xMin + waterBox->xLength)) {
@ -4239,9 +4313,9 @@ s32 WaterBox_GetSurface2(PlayState* play, CollisionContext* colCtx, Vec3f* pos,
* WaterBox get BgCam index * WaterBox get BgCam index
*/ */
u32 WaterBox_GetBgCamIndex(CollisionContext* colCtx, WaterBox* waterBox) { u32 WaterBox_GetBgCamIndex(CollisionContext* colCtx, WaterBox* waterBox) {
u32 prop = waterBox->properties >> 0; u32 bgCamIndex = WATERBOX_BGCAM_INDEX(waterBox->properties);
return prop & 0xFF; return bgCamIndex;
} }
/** /**
@ -4261,15 +4335,15 @@ u16 WaterBox_GetBgCamSetting(CollisionContext* colCtx, WaterBox* waterBox) {
/** /**
* WaterBox get lighting settings * WaterBox get lighting settings
*/ */
u32 WaterBox_GetLightSettingIndex(CollisionContext* colCtx, WaterBox* waterBox) { u32 WaterBox_GetLightIndex(CollisionContext* colCtx, WaterBox* waterBox) {
u32 prop = waterBox->properties >> 8; u32 lightIndex = WATERBOX_LIGHT_INDEX(waterBox->properties);
return prop & 0x1F; return lightIndex;
} }
/** /**
* Get the water surface at point (`x`, `ySurface`, `z`). `ySurface` doubles as position y input * Get the water surface at point (`x`, `ySurface`, `z`). `ySurface` doubles as position y input
* same as WaterBox_GetSurfaceImpl, but tests if WaterBox properties & 0x80000 != 0 * same as WaterBox_GetSurfaceImpl, but tests if WATERBOX_FLAG_19 is set
* returns true if point is within the xz boundaries of an active water box, else false * returns true if point is within the xz boundaries of an active water box, else false
* `ySurface` returns the water box's surface, while `outWaterBox` returns a pointer to the WaterBox * `ySurface` returns the water box's surface, while `outWaterBox` returns a pointer to the WaterBox
*/ */
@ -4284,9 +4358,9 @@ s32 func_800425B0(PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32*
for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->numWaterBoxes; for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->numWaterBoxes;
curWaterBox++) { curWaterBox++) {
room = (curWaterBox->properties >> 0xD) & 0x3F; room = WATERBOX_ROOM(curWaterBox->properties);
if ((room == (u32)play->roomCtx.curRoom.num) || (room == 0x3F)) { if ((room == (u32)play->roomCtx.curRoom.num) || (room == WATERBOX_ROOM_ALL)) {
if ((curWaterBox->properties & 0x80000) != 0) { if (curWaterBox->properties & WATERBOX_FLAG_19) {
if (curWaterBox->xMin < x && x < (curWaterBox->xMin + curWaterBox->xLength)) { if (curWaterBox->xMin < x && x < (curWaterBox->xMin + curWaterBox->xLength)) {
if (curWaterBox->zMin < z && z < (curWaterBox->zMin + curWaterBox->zLength)) { if (curWaterBox->zMin < z && z < (curWaterBox->zMin + curWaterBox->zLength)) {
*outWaterBox = curWaterBox; *outWaterBox = curWaterBox;

View file

@ -233,7 +233,7 @@ s32 Camera_BGCheckInfo(Camera* camera, Vec3f* from, CamColChk* to) {
toNewPos = to->pos; toNewPos = to->pos;
toNewPos.y += 5.0f; toNewPos.y += 5.0f;
floorPolyY = BgCheck_CameraRaycastFloor2(colCtx, &floorPoly, &floorBgId, &toNewPos); floorPolyY = BgCheck_CameraRaycastDown2(colCtx, &floorPoly, &floorBgId, &toNewPos);
if ((to->pos.y - floorPolyY) > 5.0f) { if ((to->pos.y - floorPolyY) > 5.0f) {
// if the y distance from the check point to the floor is more than 5 units // if the y distance from the check point to the floor is more than 5 units
@ -293,7 +293,7 @@ s32 func_80043F94(Camera* camera, Vec3f* from, CamColChk* to) {
to->norm.z = -fromToNorm.z; to->norm.z = -fromToNorm.z;
toNewPos = to->pos; toNewPos = to->pos;
toNewPos.y += 5.0f; toNewPos.y += 5.0f;
floorY = BgCheck_CameraRaycastFloor2(colCtx, &floorPoly, &bgId, &toNewPos); floorY = BgCheck_CameraRaycastDown2(colCtx, &floorPoly, &bgId, &toNewPos);
if ((to->pos.y - floorY) > 5.0f) { if ((to->pos.y - floorY) > 5.0f) {
// to is not on the ground or below it. // to is not on the ground or below it.
to->pos.x += to->norm.x; to->pos.x += to->norm.x;
@ -377,7 +377,7 @@ s32 Camera_CheckOOB(Camera* camera, Vec3f* from, Vec3f* to) {
f32 Camera_GetFloorYNorm(Camera* camera, Vec3f* floorNorm, Vec3f* chkPos, s32* bgId) { f32 Camera_GetFloorYNorm(Camera* camera, Vec3f* floorNorm, Vec3f* chkPos, s32* bgId) {
s32 pad; s32 pad;
CollisionPoly* floorPoly; CollisionPoly* floorPoly;
f32 floorY = BgCheck_EntityRaycastFloor3(&camera->play->colCtx, &floorPoly, bgId, chkPos); f32 floorY = BgCheck_EntityRaycastDown3(&camera->play->colCtx, &floorPoly, bgId, chkPos);
if (floorY == BGCHECK_Y_MIN) { if (floorY == BGCHECK_Y_MIN) {
// no floor // no floor
@ -418,7 +418,7 @@ f32 Camera_GetFloorYLayer(Camera* camera, Vec3f* norm, Vec3f* pos, s32* bgId) {
s32 i; s32 i;
for (i = 3; i > 0; i--) { for (i = 3; i > 0; i--) {
floorY = BgCheck_CameraRaycastFloor2(colCtx, &floorPoly, bgId, pos); floorY = BgCheck_CameraRaycastDown2(colCtx, &floorPoly, bgId, pos);
if (floorY == BGCHECK_Y_MIN || if (floorY == BGCHECK_Y_MIN ||
(camera->playerGroundY < floorY && !(COLPOLY_GET_NORMAL(floorPoly->normal.y) > 0.5f))) { (camera->playerGroundY < floorY && !(COLPOLY_GET_NORMAL(floorPoly->normal.y) > 0.5f))) {
// no floor, or player is below the floor and floor is not considered steep // no floor, or player is below the floor and floor is not considered steep
@ -492,7 +492,7 @@ Vec3s* Camera_GetBgCamFuncDataUnderPlayer(Camera* camera, u16* bgCamCount) {
Actor_GetWorldPosShapeRot(&playerPosShape, &camera->player->actor); Actor_GetWorldPosShapeRot(&playerPosShape, &camera->player->actor);
playerPosShape.pos.y += Player_GetHeight(camera->player); playerPosShape.pos.y += Player_GetHeight(camera->player);
if (BgCheck_EntityRaycastFloor3(&camera->play->colCtx, &floorPoly, &bgId, &playerPosShape.pos) == BGCHECK_Y_MIN) { if (BgCheck_EntityRaycastDown3(&camera->play->colCtx, &floorPoly, &bgId, &playerPosShape.pos) == BGCHECK_Y_MIN) {
// no floor // no floor
return NULL; return NULL;
} }
@ -540,11 +540,11 @@ s32 Camera_GetWaterBoxBgCamIndex(Camera* camera, f32* waterY) {
} }
/** /**
* Checks if `chkPos` is inside a waterbox. If there is no water box below `chkPos` * Checks if `chkPos` is inside a waterbox.
* or if `chkPos` is above the water surface, return BGCHECK_Y_MIN, output * If there is no water box below `chkPos` or if `chkPos` is above the water surface, return BGCHECK_Y_MIN.
* environment properites to `envProp` if `chkPos` is inside the waterbox. * If `chkPos` is inside the waterbox, output light index to `lightIndex`.
*/ */
f32 Camera_GetWaterSurface(Camera* camera, Vec3f* chkPos, s32* envProp) { f32 Camera_GetWaterSurface(Camera* camera, Vec3f* chkPos, s32* lightIndex) {
PosRot playerPosRot; PosRot playerPosRot;
f32 waterY; f32 waterY;
WaterBox* waterBox; WaterBox* waterBox;
@ -563,7 +563,7 @@ f32 Camera_GetWaterSurface(Camera* camera, Vec3f* chkPos, s32* envProp) {
return BGCHECK_Y_MIN; return BGCHECK_Y_MIN;
} }
*envProp = WaterBox_GetLightSettingIndex(&camera->play->colCtx, waterBox); *lightIndex = WaterBox_GetLightIndex(&camera->play->colCtx, waterBox);
return waterY; return waterY;
} }
@ -641,62 +641,55 @@ s16 func_80044ADC(Camera* camera, s16 yaw, s16 arg2) {
return temp_s0 + temp_s1; return temp_s0 + temp_s1;
} }
Vec3f* Camera_CalcUpFromPitchYawRoll(Vec3f* dest, s16 pitch, s16 yaw, s16 roll) { /**
f32 sinPitch; * Calculates a new Up vector from the pitch, yaw, roll
f32 cosPitch; */
f32 sinYaw; Vec3f* Camera_CalcUpFromPitchYawRoll(Vec3f* viewUp, s16 pitch, s16 yaw, s16 roll) {
f32 cosYaw; f32 sinP = Math_SinS(pitch);
f32 sinNegRoll; f32 cosP = Math_CosS(pitch);
f32 cosNegRoll; f32 sinY = Math_SinS(yaw);
Vec3f spA4; f32 cosY = Math_CosS(yaw);
f32 sinR = Math_SinS(-roll);
f32 cosR = Math_CosS(-roll);
Vec3f up;
Vec3f baseUp;
Vec3f u;
Vec3f rollMtxRow1;
Vec3f rollMtxRow2;
Vec3f rollMtxRow3;
f32 pad; f32 pad;
f32 sp54;
f32 sp4C;
f32 cosPitchCosYawSinRoll;
f32 negSinPitch;
f32 temp_f10_2;
f32 cosPitchcosYaw;
f32 temp_f14;
f32 negSinPitchSinYaw;
f32 negSinPitchCosYaw;
f32 cosPitchSinYaw;
f32 temp_f4_2;
f32 temp_f6;
f32 temp_f8;
f32 temp_f8_2;
f32 temp_f8_3;
sinPitch = Math_SinS(pitch); // Axis to roll around
cosPitch = Math_CosS(pitch); u.x = cosP * sinY;
sinYaw = Math_SinS(yaw); u.y = sinP;
cosYaw = Math_CosS(yaw); u.z = cosP * cosY;
negSinPitch = -sinPitch;
sinNegRoll = Math_SinS(-roll); // Matrix to apply the roll to the Up vector without roll
cosNegRoll = Math_CosS(-roll); rollMtxRow1.x = ((1.0f - SQ(u.x)) * cosR) + SQ(u.x);
negSinPitchSinYaw = negSinPitch * sinYaw; rollMtxRow1.y = ((u.x * u.y) * (1.0f - cosR)) - (u.z * sinR);
temp_f14 = 1.0f - cosNegRoll; rollMtxRow1.z = ((u.z * u.x) * (1.0f - cosR)) + (u.y * sinR);
cosPitchSinYaw = cosPitch * sinYaw;
sp54 = SQ(cosPitchSinYaw); rollMtxRow2.x = ((u.x * u.y) * (1.0f - cosR)) + (u.z * sinR);
sp4C = (cosPitchSinYaw * sinPitch) * temp_f14; rollMtxRow2.y = ((1.0f - SQ(u.y)) * cosR) + SQ(u.y);
cosPitchcosYaw = cosPitch * cosYaw; rollMtxRow2.z = ((u.y * u.z) * (1.0f - cosR)) - (u.x * sinR);
temp_f4_2 = ((1.0f - sp54) * cosNegRoll) + sp54;
cosPitchCosYawSinRoll = cosPitchcosYaw * sinNegRoll; rollMtxRow3.x = ((u.z * u.x) * (1.0f - cosR)) - (u.y * sinR);
negSinPitchCosYaw = negSinPitch * cosYaw; rollMtxRow3.y = ((u.y * u.z) * (1.0f - cosR)) + (u.x * sinR);
temp_f6 = (cosPitchcosYaw * cosPitchSinYaw) * temp_f14; rollMtxRow3.z = ((1.0f - SQ(u.z)) * cosR) + SQ(u.z);
temp_f10_2 = sinPitch * sinNegRoll;
spA4.x = ((negSinPitchSinYaw * temp_f4_2) + (cosPitch * (sp4C - cosPitchCosYawSinRoll))) + // Up without roll
(negSinPitchCosYaw * (temp_f6 + temp_f10_2)); baseUp.x = -sinP * sinY;
sp54 = SQ(sinPitch); baseUp.y = cosP;
temp_f4_2 = (sinPitch * cosPitchcosYaw) * temp_f14; baseUp.z = -sinP * cosY;
temp_f8_3 = cosPitchSinYaw * sinNegRoll;
temp_f8 = sp4C + cosPitchCosYawSinRoll; // rollMtx * baseUp
spA4.y = ((negSinPitchSinYaw * temp_f8) + (cosPitch * (((1.0f - sp54) * cosNegRoll) + sp54))) + up.x = DOTXYZ(baseUp, rollMtxRow1);
(negSinPitchCosYaw * (temp_f4_2 - temp_f8_3)); up.y = DOTXYZ(baseUp, rollMtxRow2);
temp_f8_2 = temp_f6 - temp_f10_2; up.z = DOTXYZ(baseUp, rollMtxRow3);
spA4.z = ((negSinPitchSinYaw * temp_f8_2) + (cosPitch * (temp_f4_2 + temp_f8_3))) +
(negSinPitchCosYaw * (((1.0f - SQ(cosPitchcosYaw)) * cosNegRoll) + SQ(cosPitchcosYaw))); *viewUp = up;
*dest = spA4;
return dest; return viewUp;
} }
f32 Camera_ClampLERPScale(Camera* camera, f32 maxLERPScale) { f32 Camera_ClampLERPScale(Camera* camera, f32 maxLERPScale) {
@ -3654,7 +3647,7 @@ s32 Camera_KeepOn4(Camera* camera) {
OLib_Vec3fDiffToVecSphGeo(&spA8, at, eyeNext); OLib_Vec3fDiffToVecSphGeo(&spA8, at, eyeNext);
D_8015BD50 = playerPosRot->pos; D_8015BD50 = playerPosRot->pos;
D_8015BD50.y += playerHeight; D_8015BD50.y += playerHeight;
temp_f0_2 = BgCheck_CameraRaycastFloor2(&camera->play->colCtx, &spC0, &i, &D_8015BD50); temp_f0_2 = BgCheck_CameraRaycastDown2(&camera->play->colCtx, &spC0, &i, &D_8015BD50);
if (temp_f0_2 > (roData->unk_00 + D_8015BD50.y)) { if (temp_f0_2 > (roData->unk_00 + D_8015BD50.y)) {
D_8015BD50.y = temp_f0_2 + 10.0f; D_8015BD50.y = temp_f0_2 + 10.0f;
} else { } else {
@ -7414,7 +7407,7 @@ Vec3s Camera_Update(Camera* camera) {
Vec3f viewEye; Vec3f viewEye;
Vec3f viewUp; Vec3f viewUp;
f32 viewFov; f32 viewFov;
Vec3f spAC; Vec3f pos;
s32 bgId; s32 bgId;
f32 playerGroundY; f32 playerGroundY;
f32 playerXZSpeed; f32 playerXZSpeed;
@ -7448,11 +7441,11 @@ Vec3s Camera_Update(Camera* camera) {
camera->playerPosDelta.x = curPlayerPosRot.pos.x - camera->playerPosRot.pos.x; camera->playerPosDelta.x = curPlayerPosRot.pos.x - camera->playerPosRot.pos.x;
camera->playerPosDelta.y = curPlayerPosRot.pos.y - camera->playerPosRot.pos.y; camera->playerPosDelta.y = curPlayerPosRot.pos.y - camera->playerPosRot.pos.y;
camera->playerPosDelta.z = curPlayerPosRot.pos.z - camera->playerPosRot.pos.z; camera->playerPosDelta.z = curPlayerPosRot.pos.z - camera->playerPosRot.pos.z;
spAC = curPlayerPosRot.pos; pos = curPlayerPosRot.pos;
spAC.y += Player_GetHeight(camera->player); pos.y += Player_GetHeight(camera->player);
playerGroundY = BgCheck_EntityRaycastFloor5(camera->play, &camera->play->colCtx, &playerFloorPoly, &bgId, playerGroundY = BgCheck_EntityRaycastDown5(camera->play, &camera->play->colCtx, &playerFloorPoly, &bgId,
&camera->player->actor, &spAC); &camera->player->actor, &pos);
if (playerGroundY != BGCHECK_Y_MIN) { if (playerGroundY != BGCHECK_Y_MIN) {
// player is above ground. // player is above ground.
sOOBTimer = 0; sOOBTimer = 0;

View file

@ -783,7 +783,7 @@ void Environment_UpdateSkybox(u8 skyboxId, EnvironmentContext* envCtx, SkyboxCon
} }
void Environment_EnableUnderwaterLights(PlayState* play, s32 waterLightsIndex) { void Environment_EnableUnderwaterLights(PlayState* play, s32 waterLightsIndex) {
if (waterLightsIndex == 0x1F) { if (waterLightsIndex == WATERBOX_LIGHT_INDEX_NONE) {
waterLightsIndex = 0; waterLightsIndex = 0;
// "Underwater color is not set in the water poly data!" // "Underwater color is not set in the water poly data!"
osSyncPrintf(VT_COL(YELLOW, BLACK) "\n水ポリゴンデータに水中カラーが設定されておりません!" VT_RST); osSyncPrintf(VT_COL(YELLOW, BLACK) "\n水ポリゴンデータに水中カラーが設定されておりません!" VT_RST);

View file

@ -39,11 +39,11 @@ s32 OnePointCutscene_BgCheckLineTest(CollisionContext* colCtx, Vec3f* vec1, Vec3
return BgCheck_CameraLineTest1(colCtx, vec1, vec2, &posResult, &outPoly, true, true, true, false, &bgId); return BgCheck_CameraLineTest1(colCtx, vec1, vec2, &posResult, &outPoly, true, true, true, false, &bgId);
} }
f32 OnePointCutscene_RaycastFloor(CollisionContext* colCtx, Vec3f* pos) { f32 OnePointCutscene_RaycastDown(CollisionContext* colCtx, Vec3f* pos) {
CollisionPoly* outPoly; CollisionPoly* outPoly;
s32 bgId; s32 bgId;
return BgCheck_EntityRaycastFloor3(colCtx, &outPoly, &bgId, pos); return BgCheck_EntityRaycastDown3(colCtx, &outPoly, &bgId, pos);
} }
void OnePointCutscene_SetCsCamPoints(Camera* camera, s16 actionParameters, s16 initTimer, CutsceneCameraPoint* atPoints, void OnePointCutscene_SetCsCamPoints(Camera* camera, s16 actionParameters, s16 initTimer, CutsceneCameraPoint* atPoints,
@ -292,7 +292,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
case 4500: case 4500:
Actor_GetFocus(&spA0, actor); Actor_GetFocus(&spA0, actor);
spC0 = spA0.pos; spC0 = spA0.pos;
spC0.y = OnePointCutscene_RaycastFloor(&play->colCtx, &spC0) + 40.0f; spC0.y = OnePointCutscene_RaycastDown(&play->colCtx, &spC0) + 40.0f;
spD0.r = 150.0f; spD0.r = 150.0f;
spD0.yaw = spA0.rot.y; spD0.yaw = spA0.rot.y;
spD0.pitch = 0x3E8; spD0.pitch = 0x3E8;

View file

@ -1324,7 +1324,7 @@ s32 Play_InCsMode(PlayState* this) {
return (this->csCtx.state != CS_STATE_IDLE) || Player_InCsMode(this); return (this->csCtx.state != CS_STATE_IDLE) || Player_InCsMode(this);
} }
f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* vec) { f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* pos) {
CollisionPoly poly; CollisionPoly poly;
f32 temp1; f32 temp1;
f32 temp2; f32 temp2;
@ -1335,7 +1335,7 @@ f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* vec) {
f32 nz; f32 nz;
s32 pad[5]; s32 pad[5];
floorY = BgCheck_AnyRaycastFloor1(&this->colCtx, &poly, vec); floorY = BgCheck_AnyRaycastDown1(&this->colCtx, &poly, pos);
if (floorY > BGCHECK_Y_MIN) { if (floorY > BGCHECK_Y_MIN) {
nx = COLPOLY_GET_NORMAL(poly.normal.x); nx = COLPOLY_GET_NORMAL(poly.normal.x);
@ -1364,9 +1364,9 @@ f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* vec) {
mf->wy = 0.0f; mf->wy = 0.0f;
mf->xz = 0.0f; mf->xz = 0.0f;
mf->wz = 0.0f; mf->wz = 0.0f;
mf->xw = vec->x; mf->xw = pos->x;
mf->yw = floorY; mf->yw = floorY;
mf->zw = vec->z; mf->zw = pos->z;
mf->ww = 1.0f; mf->ww = 1.0f;
} else { } else {
mf->xy = 0.0f; mf->xy = 0.0f;
@ -1381,9 +1381,9 @@ f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* vec) {
mf->yz = 0.0f; mf->yz = 0.0f;
mf->zy = 0.0f; mf->zy = 0.0f;
mf->yy = 1.0f; mf->yy = 1.0f;
mf->xw = vec->x; mf->xw = pos->x;
mf->yw = vec->y; mf->yw = pos->y;
mf->zw = vec->z; mf->zw = pos->z;
mf->ww = 1.0f; mf->ww = 1.0f;
} }
@ -1785,7 +1785,7 @@ s32 func_800C0DB4(PlayState* this, Vec3f* pos) {
if (WaterBox_GetSurface1(this, &this->colCtx, waterSurfacePos.x, waterSurfacePos.z, &waterSurfacePos.y, if (WaterBox_GetSurface1(this, &this->colCtx, waterSurfacePos.x, waterSurfacePos.z, &waterSurfacePos.y,
&waterBox) == true && &waterBox) == true &&
pos->y < waterSurfacePos.y && pos->y < waterSurfacePos.y &&
BgCheck_EntityRaycastFloor3(&this->colCtx, &poly, &bgId, &waterSurfacePos) != BGCHECK_Y_MIN) { BgCheck_EntityRaycastDown3(&this->colCtx, &poly, &bgId, &waterSurfacePos) != BGCHECK_Y_MIN) {
return true; return true;
} else { } else {
return false; return false;

View file

@ -997,7 +997,7 @@ void func_8008F87C(PlayState* play, Player* this, SkelAnime* skelAnime, Vec3f* p
footprintPos.y += 15.0f; footprintPos.y += 15.0f;
sp80 = BgCheck_EntityRaycastFloor4(&play->colCtx, &sp88, &sp84, &this->actor, &footprintPos) + sp74; sp80 = BgCheck_EntityRaycastDown4(&play->colCtx, &sp88, &sp84, &this->actor, &footprintPos) + sp74;
if (sp98.y < sp80) { if (sp98.y < sp80) {
sp70 = sp98.x - spA4.x; sp70 = sp98.x - spA4.x;

View file

@ -349,10 +349,9 @@ void func_808805C0(BgHakaTrap* this, PlayState* play) {
void func_808806BC(BgHakaTrap* this, PlayState* play) { void func_808806BC(BgHakaTrap* this, PlayState* play) {
Vec3f vector; Vec3f vector;
f32 tempf20; f32 floorHeight;
f32 temp; f32 yIntersect;
s32 i; s32 i;
s32 sp64;
this->dyna.actor.velocity.y *= 1.6f; this->dyna.actor.velocity.y *= 1.6f;
@ -364,20 +363,22 @@ void func_808806BC(BgHakaTrap* this, PlayState* play) {
vector.y = (this->dyna.actor.world.pos.y + 1.0f) + 25.0f; vector.y = (this->dyna.actor.world.pos.y + 1.0f) + 25.0f;
vector.z = this->dyna.actor.world.pos.z; vector.z = this->dyna.actor.world.pos.z;
tempf20 = this->dyna.actor.floorHeight; floorHeight = this->dyna.actor.floorHeight;
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
temp = s32 bgId;
BgCheck_EntityRaycastFloor4(&play->colCtx, &this->dyna.actor.floorPoly, &sp64, &this->dyna.actor, &vector) -
yIntersect =
BgCheck_EntityRaycastDown4(&play->colCtx, &this->dyna.actor.floorPoly, &bgId, &this->dyna.actor, &vector) -
25.0f; 25.0f;
if (tempf20 < temp) { if (floorHeight < yIntersect) {
tempf20 = temp; floorHeight = yIntersect;
} }
vector.x -= 90.0f; vector.x -= 90.0f;
} }
if (Math_StepToF(&this->dyna.actor.world.pos.y, tempf20, this->dyna.actor.velocity.y)) { if (Math_StepToF(&this->dyna.actor.world.pos.y, floorHeight, this->dyna.actor.velocity.y)) {
if (this->dyna.actor.velocity.y > 0.01f) { if (this->dyna.actor.velocity.y > 0.01f) {
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_TRAP_BOUND); Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_TRAP_BOUND);
} }

View file

@ -378,18 +378,18 @@ void BgHeavyBlock_LiftedUp(BgHeavyBlock* this, PlayState* play) {
void BgHeavyBlock_Fly(BgHeavyBlock* this, PlayState* play) { void BgHeavyBlock_Fly(BgHeavyBlock* this, PlayState* play) {
s32 bgId; s32 bgId;
s32 quakeIndex; s32 quakeIndex;
Vec3f pos; Vec3f checkPos;
f32 raycastResult; f32 yIntersect;
Actor_MoveForward(&this->dyna.actor); Actor_MoveForward(&this->dyna.actor);
pos.x = this->dyna.actor.home.pos.x; checkPos.x = this->dyna.actor.home.pos.x;
pos.y = this->dyna.actor.home.pos.y + 1000.0f; checkPos.y = this->dyna.actor.home.pos.y + 1000.0f;
pos.z = this->dyna.actor.home.pos.z; checkPos.z = this->dyna.actor.home.pos.z;
raycastResult = yIntersect =
BgCheck_EntityRaycastFloor4(&play->colCtx, &this->dyna.actor.floorPoly, &bgId, &this->dyna.actor, &pos); BgCheck_EntityRaycastDown4(&play->colCtx, &this->dyna.actor.floorPoly, &bgId, &this->dyna.actor, &checkPos);
this->dyna.actor.floorHeight = raycastResult; this->dyna.actor.floorHeight = yIntersect;
if (this->dyna.actor.home.pos.y <= raycastResult) { if (this->dyna.actor.home.pos.y <= yIntersect) {
func_800AA000(0.0f, 0xFF, 0x3C, 4); func_800AA000(0.0f, 0xFF, 0x3C, 4);
switch (this->dyna.actor.params & 0xFF) { switch (this->dyna.actor.params & 0xFF) {

View file

@ -198,16 +198,16 @@ void BgJyaGoroiwa_Update(Actor* thisx, PlayState* play) {
BgJyaGoroiwa* this = (BgJyaGoroiwa*)thisx; BgJyaGoroiwa* this = (BgJyaGoroiwa*)thisx;
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
s32 bgId; s32 bgId;
Vec3f pos; Vec3f checkPos;
if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28 | PLAYER_STATE1_29))) { if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
this->actionFunc(this, play); this->actionFunc(this, play);
BgJyaGoroiwa_UpdateRotation(this); BgJyaGoroiwa_UpdateRotation(this);
pos.x = this->actor.world.pos.x; checkPos.x = this->actor.world.pos.x;
pos.y = this->actor.world.pos.y + 59.5f; checkPos.y = this->actor.world.pos.y + 59.5f;
pos.z = this->actor.world.pos.z; checkPos.z = this->actor.world.pos.z;
this->actor.floorHeight = this->actor.floorHeight =
BgCheck_EntityRaycastFloor4(&play->colCtx, &this->actor.floorPoly, &bgId, &this->actor, &pos); BgCheck_EntityRaycastDown4(&play->colCtx, &this->actor.floorPoly, &bgId, &this->actor, &checkPos);
BgJyaGoroiwa_UpdateCollider(this); BgJyaGoroiwa_UpdateCollider(this);
if (this->collider.base.atFlags & AT_ON) { if (this->collider.base.atFlags & AT_ON) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);

View file

@ -182,8 +182,8 @@ void BgPoEvent_InitBlocks(BgPoEvent* this, PlayState* play) {
} }
} }
this->dyna.actor.world.pos.y = 833.0f; this->dyna.actor.world.pos.y = 833.0f;
this->dyna.actor.floorHeight = BgCheck_EntityRaycastFloor4(&play->colCtx, &this->dyna.actor.floorPoly, &bgId, this->dyna.actor.floorHeight = BgCheck_EntityRaycastDown4(&play->colCtx, &this->dyna.actor.floorPoly, &bgId,
&this->dyna.actor, &this->dyna.actor.world.pos); &this->dyna.actor, &this->dyna.actor.world.pos);
this->actionFunc = BgPoEvent_BlockWait; this->actionFunc = BgPoEvent_BlockWait;
} }

View file

@ -49,7 +49,8 @@ static Vec3f D_808B45C4[] = {
{ 770.0f, 1550.0f, -299.0f }, { 770.0f, 1550.0f, -299.0f },
}; };
static Vec3f D_808B45DC[] = { // list of ground check positions, relative to 1/10th model space
static Vec3f sBoxGroundCheckPoints[] = {
{ 29.99f, 0.01f, -29.99f }, { -29.99f, 0.01f, -29.99f }, { -29.99f, 0.01f, 29.99f }, { 29.99f, 0.01f, -29.99f }, { -29.99f, 0.01f, -29.99f }, { -29.99f, 0.01f, 29.99f },
{ 29.99f, 0.01f, 29.99f }, { 0.0f, 0.01f, 0.0f }, { 29.99f, 0.01f, 29.99f }, { 0.0f, 0.01f, 0.0f },
}; };
@ -70,10 +71,10 @@ void func_808B3960(BgSpot15Rrbox* this, PlayState* play, CollisionHeader* collis
} }
} }
void func_808B39E8(Vec3f* arg0, Vec3f* arg1, f32 arg2, f32 arg3) { void BgSpot15Rrbox_RotatePoint(Vec3f* outPos, Vec3f* pos, f32 arg2, f32 arg3) {
arg0->x = (arg1->z * arg2) + (arg1->x * arg3); outPos->x = (pos->z * arg2) + (pos->x * arg3);
arg0->y = arg1->y; outPos->y = pos->y;
arg0->z = (arg1->z * arg3) - (arg1->x * arg2); outPos->z = (pos->z * arg3) - (pos->x * arg2);
} }
void func_808B3A34(BgSpot15Rrbox* this) { void func_808B3A34(BgSpot15Rrbox* this) {
@ -140,25 +141,25 @@ void BgSpot15Rrbox_Destroy(Actor* thisx, PlayState* play) {
D_808B4590 = 0; D_808B4590 = 0;
} }
s32 func_808B3CA0(BgSpot15Rrbox* this, PlayState* play, s32 arg2) { s32 BgSpot15Rrbox_TrySnapToCheckedPoint(BgSpot15Rrbox* this, PlayState* play, s32 checkIndex) {
f32 chkDist = 0.0f; f32 chkDist = 0.0f;
Vec3f actorPosition; Vec3f checkPos;
Vec3f actorScale; Vec3f relCheckPos;
func_808B3A34(this); func_808B3A34(this);
actorScale.x = D_808B45DC[arg2].x * (this->dyna.actor.scale.x * 10.0f); relCheckPos.x = sBoxGroundCheckPoints[checkIndex].x * (this->dyna.actor.scale.x * 10.0f);
actorScale.y = D_808B45DC[arg2].y * (this->dyna.actor.scale.y * 10.0f); relCheckPos.y = sBoxGroundCheckPoints[checkIndex].y * (this->dyna.actor.scale.y * 10.0f);
actorScale.z = D_808B45DC[arg2].z * (this->dyna.actor.scale.z * 10.0f); relCheckPos.z = sBoxGroundCheckPoints[checkIndex].z * (this->dyna.actor.scale.z * 10.0f);
func_808B39E8(&actorPosition, &actorScale, this->unk_16C, this->unk_170); BgSpot15Rrbox_RotatePoint(&checkPos, &relCheckPos, this->unk_16C, this->unk_170);
actorPosition.x += this->dyna.actor.world.pos.x; checkPos.x += this->dyna.actor.world.pos.x;
actorPosition.y += this->dyna.actor.prevPos.y; checkPos.y += this->dyna.actor.prevPos.y;
actorPosition.z += this->dyna.actor.world.pos.z; checkPos.z += this->dyna.actor.world.pos.z;
this->dyna.actor.floorHeight = BgCheck_EntityRaycastFloor6(&play->colCtx, &this->dyna.actor.floorPoly, &this->bgId, this->dyna.actor.floorHeight = BgCheck_EntityRaycastDown6(&play->colCtx, &this->dyna.actor.floorPoly, &this->bgId,
&this->dyna.actor, &actorPosition, chkDist); &this->dyna.actor, &checkPos, chkDist);
if ((this->dyna.actor.floorHeight - this->dyna.actor.world.pos.y) >= -0.001f) { if ((this->dyna.actor.floorHeight - this->dyna.actor.world.pos.y) >= -0.001f) {
this->dyna.actor.world.pos.y = this->dyna.actor.floorHeight; this->dyna.actor.world.pos.y = this->dyna.actor.floorHeight;
@ -167,51 +168,51 @@ s32 func_808B3CA0(BgSpot15Rrbox* this, PlayState* play, s32 arg2) {
return false; return false;
} }
f32 func_808B3DDC(BgSpot15Rrbox* this, PlayState* play) { f32 BgSpot15Rrbox_GetFloorHeight(BgSpot15Rrbox* this, PlayState* play) {
s32 i; s32 i;
Vec3f position; Vec3f checkPos;
Vec3f scale; Vec3f relCheckPos;
Actor* actor = &this->dyna.actor; Actor* actor = &this->dyna.actor;
f32 yIntersect; f32 yIntersect;
f32 returnValue = BGCHECK_Y_MIN; f32 floorY = BGCHECK_Y_MIN;
s32 bgId; s32 bgId;
func_808B3A34(this); func_808B3A34(this);
for (i = 0; i < ARRAY_COUNT(D_808B45DC); i++) { for (i = 0; i < ARRAY_COUNT(sBoxGroundCheckPoints); i++) {
scale.x = D_808B45DC[i].x * (actor->scale.x * 10.0f); relCheckPos.x = sBoxGroundCheckPoints[i].x * (actor->scale.x * 10.0f);
scale.y = D_808B45DC[i].y * (actor->scale.y * 10.0f); relCheckPos.y = sBoxGroundCheckPoints[i].y * (actor->scale.y * 10.0f);
scale.z = D_808B45DC[i].z * (actor->scale.z * 10.0f); relCheckPos.z = sBoxGroundCheckPoints[i].z * (actor->scale.z * 10.0f);
func_808B39E8(&position, &scale, this->unk_16C, this->unk_170); BgSpot15Rrbox_RotatePoint(&checkPos, &relCheckPos, this->unk_16C, this->unk_170);
position.x += actor->world.pos.x; checkPos.x += actor->world.pos.x;
position.y += actor->prevPos.y; checkPos.y += actor->prevPos.y;
position.z += actor->world.pos.z; checkPos.z += actor->world.pos.z;
yIntersect = BgCheck_EntityRaycastFloor6(&play->colCtx, &actor->floorPoly, &bgId, actor, &position, 0); yIntersect = BgCheck_EntityRaycastDown6(&play->colCtx, &actor->floorPoly, &bgId, actor, &checkPos, 0);
if (returnValue < yIntersect) { if (floorY < yIntersect) {
returnValue = yIntersect; floorY = yIntersect;
this->bgId = bgId; this->bgId = bgId;
} }
} }
return returnValue; return floorY;
} }
s32 func_808B3F58(BgSpot15Rrbox* this, PlayState* play) { s32 BgSpot15Rrbox_TrySnapToFloor(BgSpot15Rrbox* this, PlayState* play) {
if (func_808B3CA0(this, play, 0)) { if (BgSpot15Rrbox_TrySnapToCheckedPoint(this, play, 0)) {
return true; return true;
} }
if (func_808B3CA0(this, play, 1)) { if (BgSpot15Rrbox_TrySnapToCheckedPoint(this, play, 1)) {
return true; return true;
} }
if (func_808B3CA0(this, play, 2)) { if (BgSpot15Rrbox_TrySnapToCheckedPoint(this, play, 2)) {
return true; return true;
} }
if (func_808B3CA0(this, play, 3)) { if (BgSpot15Rrbox_TrySnapToCheckedPoint(this, play, 3)) {
return true; return true;
} }
if (func_808B3CA0(this, play, 4)) { if (BgSpot15Rrbox_TrySnapToCheckedPoint(this, play, 4)) {
return true; return true;
} }
return false; return false;
@ -271,7 +272,7 @@ void func_808B4194(BgSpot15Rrbox* this, PlayState* play) {
actor->world.pos.x = actor->home.pos.x + (tempUnk178 * this->unk_16C); actor->world.pos.x = actor->home.pos.x + (tempUnk178 * this->unk_16C);
actor->world.pos.z = actor->home.pos.z + (tempUnk178 * this->unk_170); actor->world.pos.z = actor->home.pos.z + (tempUnk178 * this->unk_170);
if (!func_808B3F58(this, play)) { if (!BgSpot15Rrbox_TrySnapToFloor(this, play)) {
actor->home.pos.x = actor->world.pos.x; actor->home.pos.x = actor->world.pos.x;
actor->home.pos.z = actor->world.pos.z; actor->home.pos.z = actor->world.pos.z;
player->stateFlags2 &= ~PLAYER_STATE2_4; player->stateFlags2 &= ~PLAYER_STATE2_4;
@ -304,7 +305,7 @@ void func_808B4380(BgSpot15Rrbox* this, PlayState* play) {
this->dyna.actor.velocity.y = 0.0f; this->dyna.actor.velocity.y = 0.0f;
this->dyna.actor.velocity.z = 0.0f; this->dyna.actor.velocity.z = 0.0f;
this->dyna.actor.gravity = -1.0f; this->dyna.actor.gravity = -1.0f;
this->dyna.actor.floorHeight = func_808B3DDC(this, play); this->dyna.actor.floorHeight = BgSpot15Rrbox_GetFloorHeight(this, play);
this->actionFunc = func_808B43D0; this->actionFunc = func_808B43D0;
} }

View file

@ -431,8 +431,8 @@ void BgSpot18Basket_Update(Actor* thisx, PlayState* play) {
this->unk_216++; this->unk_216++;
this->actionFunc(this, play); this->actionFunc(this, play);
this->dyna.actor.floorHeight = BgCheck_EntityRaycastFloor4(&play->colCtx, &this->dyna.actor.floorPoly, &bgId, this->dyna.actor.floorHeight = BgCheck_EntityRaycastDown4(&play->colCtx, &this->dyna.actor.floorPoly, &bgId,
&this->dyna.actor, &this->dyna.actor.world.pos); &this->dyna.actor, &this->dyna.actor.world.pos);
if (this->actionFunc != func_808B7AFC) { if (this->actionFunc != func_808B7AFC) {
CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base); CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base);
if (this->actionFunc != func_808B7B6C) { if (this->actionFunc != func_808B7B6C) {

View file

@ -355,7 +355,7 @@ void BossGanon_Init(Actor* thisx, PlayState* play2) {
Actor_ProcessInitChain(thisx, sInitChain); Actor_ProcessInitChain(thisx, sInitChain);
ActorShape_Init(&thisx->shape, 0, NULL, 0); ActorShape_Init(&thisx->shape, 0, NULL, 0);
Actor_SetScale(thisx, 0.01f); Actor_SetScale(thisx, 0.01f);
SkelAnime_InitFlex(play, &this->skelAnime, &gDorfSkel, NULL, NULL, NULL, 0); SkelAnime_InitFlex(play, &this->skelAnime, &gGanondorfSkel, NULL, NULL, NULL, 0);
Collider_InitCylinder(play, &this->collider); Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, thisx, &sDorfCylinderInit); Collider_SetCylinder(play, &this->collider, thisx, &sDorfCylinderInit);
@ -485,7 +485,7 @@ void BossGanon_SetupIntroCutscene(BossGanon* this, PlayState* play) {
this->unk_198 = 1; this->unk_198 = 1;
this->animBankIndex = animBankIndex; this->animBankIndex = animBankIndex;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[animBankIndex].segment); gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[animBankIndex].segment);
Animation_MorphToLoop(&this->skelAnime, &object_ganon_anime2_Anim_005FFC, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfPlayOrganAnim, 0.0f);
} else { } else {
this->actionFunc = BossGanon_SetupIntroCutscene; this->actionFunc = BossGanon_SetupIntroCutscene;
} }
@ -569,7 +569,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->csTimer = 0; this->csTimer = 0;
player->actor.world.pos.z = 20.0f; player->actor.world.pos.z = 20.0f;
this->useOpenHand = false; this->useOpenHand = false;
Animation_MorphToLoop(&this->skelAnime, &object_ganon_anime2_Anim_0089F8, -5.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfStandBackwardsAnim, -5.0f);
this->fwork[GDF_FWORK_1] = 1000.0f; this->fwork[GDF_FWORK_1] = 1000.0f;
BossGanon_SetIntroCsCamera(this, 11); BossGanon_SetIntroCsCamera(this, 11);
this->unk_198 = 2; this->unk_198 = 2;
@ -808,12 +808,12 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
if (this->csTimer == 30) { if (this->csTimer == 30) {
Audio_QueueSeqCmd(0x100100FF); Audio_QueueSeqCmd(0x100100FF);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&object_ganon_anime2_Anim_004F64); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfStopPlayingOrganAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime2_Anim_004F64, -5.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfStopPlayingOrganAnim, -5.0f);
} }
if ((this->csTimer > 30) && Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { if ((this->csTimer > 30) && Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
Animation_MorphToLoop(&this->skelAnime, &object_ganon_anime2_Anim_006AF4, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfLeanOnOrganAnim, 0.0f);
this->fwork[GDF_FWORK_1] = 1000.0f; this->fwork[GDF_FWORK_1] = 1000.0f;
} }
@ -853,12 +853,12 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
if (this->csTimer <= 20) { if (this->csTimer <= 20) {
if (this->csTimer == 20) { if (this->csTimer == 20) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime2_Anim_004304, -5.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfStandUpFromOrganAnim, -5.0f);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&object_ganon_anime2_Anim_004304); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfStandUpFromOrganAnim);
} }
} else if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { } else if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
Message_StartTextbox(play, 0x70CA, NULL); Message_StartTextbox(play, 0x70CA, NULL);
Animation_MorphToLoop(&this->skelAnime, &object_ganon_anime2_Anim_0089F8, -5.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfStandBackwardsAnim, -5.0f);
this->fwork[GDF_FWORK_1] = 1000.0f; this->fwork[GDF_FWORK_1] = 1000.0f;
} }
@ -872,8 +872,8 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->envLightMode = 3; this->envLightMode = 3;
if (this->csTimer == 20) { if (this->csTimer == 20) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime2_Anim_001F58, -5.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfTurnAroundAnim, -5.0f);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&object_ganon_anime2_Anim_001F58); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfTurnAroundAnim);
} }
if (this->csTimer > 10) { if (this->csTimer > 10) {
@ -906,7 +906,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->csCamEye.z += 6.0f; this->csCamEye.z += 6.0f;
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1] - 5.0f)) { if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1] - 5.0f)) {
Animation_MorphToLoop(&this->skelAnime, &object_ganon_anime2_Anim_003018, -5.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfStandIdleAnim, -5.0f);
this->fwork[GDF_FWORK_1] = 1000.0f; this->fwork[GDF_FWORK_1] = 1000.0f;
} }
@ -917,7 +917,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->csState = 19; this->csState = 19;
this->csTimer = 0; this->csTimer = 0;
Message_StartTextbox(play, 0x70CC, NULL); Message_StartTextbox(play, 0x70CC, NULL);
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime2_Anim_007268, -5.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfRaiseHandStartAnim, -5.0f);
this->triforceType = GDF_TRIFORCE_DORF; this->triforceType = GDF_TRIFORCE_DORF;
this->fwork[GDF_TRIFORCE_SCALE] = 10.0f; this->fwork[GDF_TRIFORCE_SCALE] = 10.0f;
this->fwork[GDF_TRIFORCE_PRIM_A] = 0.0f; this->fwork[GDF_TRIFORCE_PRIM_A] = 0.0f;
@ -953,7 +953,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
} }
if (this->csTimer == 17) { if (this->csTimer == 17) {
Animation_MorphToLoop(&this->skelAnime, &object_ganon_anime2_Anim_007A64, -5.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfRaiseHandLoopAnim, -5.0f);
} }
if ((this->csTimer > 80) && (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) { if ((this->csTimer > 80) && (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) {
@ -1068,7 +1068,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
if (this->csTimer == 20) { if (this->csTimer == 20) {
BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1); BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfGetUp3Anim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfGetUp3Anim, 0.0f);
SkelAnime_Update(&this->skelAnime); SkelAnime_Update(&this->skelAnime);
this->actor.shape.yOffset = 0.0f; this->actor.shape.yOffset = 0.0f;
sCape->attachShouldersTimer = 18.0f; sCape->attachShouldersTimer = 18.0f;
@ -1082,8 +1082,8 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
play->objectCtx.status[Object_GetIndex(&play->objectCtx, OBJECT_GANON)].segment); play->objectCtx.status[Object_GetIndex(&play->objectCtx, OBJECT_GANON)].segment);
if (!GET_EVENTCHKINF(EVENTCHKINF_78)) { if (!GET_EVENTCHKINF(EVENTCHKINF_78)) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gDorfTitleCardTex), 160, TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gGanondorfTitleCardTex),
180, 128, 40); 160, 180, 128, 40);
} }
SET_EVENTCHKINF(EVENTCHKINF_78); SET_EVENTCHKINF(EVENTCHKINF_78);
@ -1170,8 +1170,8 @@ void BossGanon_SetupDeathCutscene(BossGanon* this, PlayState* play) {
this->unk_198 = 1; this->unk_198 = 1;
this->animBankIndex = animBankIndex; this->animBankIndex = animBankIndex;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[animBankIndex].segment); gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[animBankIndex].segment);
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime2_Anim_00EA00, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfDefeatedStartAnim, 0.0f);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&object_ganon_anime2_Anim_00EA00); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfDefeatedStartAnim);
this->unk_508 = 0.0f; this->unk_508 = 0.0f;
} }
} }
@ -1183,8 +1183,8 @@ void BossGanon_SetupTowerCutscene(BossGanon* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, animBankIndex)) { if (Object_IsLoaded(&play->objectCtx, animBankIndex)) {
this->animBankIndex = animBankIndex; this->animBankIndex = animBankIndex;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[animBankIndex].segment); gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[animBankIndex].segment);
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime2_Anim_00EA00, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfDefeatedStartAnim, 0.0f);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&object_ganon_anime2_Anim_00EA00); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfDefeatedStartAnim);
this->actionFunc = BossGanon_DeathAndTowerCutscene; this->actionFunc = BossGanon_DeathAndTowerCutscene;
this->csTimer = 0; this->csTimer = 0;
this->csState = 100; this->csState = 100;
@ -1203,7 +1203,8 @@ void BossGanon_ShatterWindows(u8 windowShatterState) {
for (i = 0; i < 2048; i++) { for (i = 0; i < 2048; i++) {
if ((tex1[i] != 0) && (Rand_ZeroOne() < 0.03f)) { if ((tex1[i] != 0) && (Rand_ZeroOne() < 0.03f)) {
if ((((u8*)gDorfWindowShatterTemplateTex)[i] == 0) || (windowShatterState == GDF_WINDOW_SHATTER_FULL)) { if ((((u8*)gGanondorfWindowShatterTemplateTex)[i] == 0) ||
(windowShatterState == GDF_WINDOW_SHATTER_FULL)) {
tex1[i] = tex2[i] = 1; tex1[i] = tex2[i] = 1;
} }
} }
@ -1274,7 +1275,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
this->csCamAt.z = this->unk_1FC.z; this->csCamAt.z = this->unk_1FC.z;
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
Animation_MorphToLoop(&this->skelAnime, &object_ganon_anime2_Anim_00F19C, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfDefeatedLoopAnim, 0.0f);
this->csState = 2; this->csState = 2;
this->csTimer = 0; this->csTimer = 0;
} }
@ -1320,8 +1321,8 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
if ((this->fwork[GDF_FWORK_1] > 100.0f) && (this->csTimer > 100) && if ((this->fwork[GDF_FWORK_1] > 100.0f) && (this->csTimer > 100) &&
(Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) { (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime2_Anim_00B668, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfVomitStartAnim, 0.0f);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&object_ganon_anime2_Anim_00B668); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfVomitStartAnim);
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GANON_TOKETU); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GANON_TOKETU);
} else { } else {
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1] - 16.0f)) { if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1] - 16.0f)) {
@ -1344,7 +1345,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
} }
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
Animation_MorphToLoop(&this->skelAnime, &object_ganon_anime2_Anim_00BE38, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfVomitLoopAnim, 0.0f);
this->csState = 4; this->csState = 4;
this->csTimer = 0; this->csTimer = 0;
} }
@ -1367,8 +1368,8 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
if ((this->csTimer > 70) && (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) { if ((this->csTimer > 70) && (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) {
this->csState = 6; this->csState = 6;
this->csTimer = 0; this->csTimer = 0;
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime2_Anim_010298, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfYellStartAnim, 0.0f);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&object_ganon_anime2_Anim_010298); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfYellStartAnim);
this->csCamMovementScale = 0.05f; this->csCamMovementScale = 0.05f;
this->csCamMaxStepScale = 0.0f; this->csCamMaxStepScale = 0.0f;
@ -1399,7 +1400,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
Math_ApproachF(&this->csCamMaxStepScale, 0.2f, 1.0f, 0.01f); Math_ApproachF(&this->csCamMaxStepScale, 0.2f, 1.0f, 0.01f);
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
Animation_MorphToLoop(&this->skelAnime, &object_ganon_anime2_Anim_010514, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfYellLoopAnim, 0.0f);
this->csState = 7; this->csState = 7;
this->csTimer = 0; this->csTimer = 0;
this->unk_2E8 = 0; this->unk_2E8 = 0;
@ -1507,8 +1508,8 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
this->csCamIndex = Play_CreateSubCamera(play); this->csCamIndex = Play_CreateSubCamera(play);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT);
Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE); Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE);
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime2_Anim_00ADDC, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfCollapseAnim, 0.0f);
this->fwork[1] = Animation_GetLastFrame(&object_ganon_anime2_Anim_00EA00); this->fwork[1] = Animation_GetLastFrame(&gGanondorfDefeatedStartAnim);
this->csState = 101; this->csState = 101;
this->skelAnime.playSpeed = 0.0f; this->skelAnime.playSpeed = 0.0f;
sZelda = (EnZl3*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_ZL3, 0.0f, 6000.0f, 0.0f, sZelda = (EnZl3*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_ZL3, 0.0f, 6000.0f, 0.0f,
@ -1875,8 +1876,8 @@ void BossGanon_PoundFloor(BossGanon* this, PlayState* play) {
Math_ApproachF(&this->actor.velocity.y, 20.0f, 1.0f, 1.0f); Math_ApproachF(&this->actor.velocity.y, 20.0f, 1.0f, 1.0f);
if (this->timers[0] == 14) { if (this->timers[0] == 14) {
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfPoundAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfPoundAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfPoundAnim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfPoundAnim, 0.0f);
this->actor.velocity.y = 0.0f; this->actor.velocity.y = 0.0f;
} }
@ -1918,8 +1919,8 @@ void BossGanon_PoundFloor(BossGanon* this, PlayState* play) {
this->envLightMode = 1; this->envLightMode = 1;
if (this->timers[0] == 0) { if (this->timers[0] == 0) {
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfPoundEndAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfPoundEndAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfPoundEndAnim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfPoundEndAnim, 0.0f);
this->unk_1C2 = 3; this->unk_1C2 = 3;
this->unk_19F = 1; this->unk_19F = 1;
this->actor.velocity.y = 0.0f; this->actor.velocity.y = 0.0f;
@ -1931,8 +1932,8 @@ void BossGanon_PoundFloor(BossGanon* this, PlayState* play) {
Math_ApproachF(&this->actor.velocity.y, 20.0f, 1.0f, 1.0f); Math_ApproachF(&this->actor.velocity.y, 20.0f, 1.0f, 1.0f);
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfGetUp3Anim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfGetUp3Anim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfGetUp3Anim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfGetUp3Anim, 0.0f);
SkelAnime_Update(&this->skelAnime); SkelAnime_Update(&this->skelAnime);
sCape->attachShouldersTimer = 18.0f; sCape->attachShouldersTimer = 18.0f;
Audio_PlayActorSfx2(&this->actor, NA_SE_EV_GANON_MANTLE); Audio_PlayActorSfx2(&this->actor, NA_SE_EV_GANON_MANTLE);
@ -2001,16 +2002,16 @@ void BossGanon_ChargeBigMagic(BossGanon* this, PlayState* play) {
switch (this->unk_1C2) { switch (this->unk_1C2) {
case 0: case 0:
if (this->timers[0] == 0) { if (this->timers[0] == 0) {
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfBigMagicChargeStartAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfBigMagicChargeStartAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfBigMagicChargeStartAnim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfBigMagicChargeStartAnim, 0.0f);
this->unk_1C2 = 1; this->unk_1C2 = 1;
} }
break; break;
case 1: case 1:
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfBigMagicChargeHoldAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfBigMagicChargeHoldAnim);
Animation_MorphToLoop(&this->skelAnime, &gDorfBigMagicChargeHoldAnim, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfBigMagicChargeHoldAnim, 0.0f);
this->unk_1C2 = 2; this->unk_1C2 = 2;
this->timers[0] = 100; this->timers[0] = 100;
} }
@ -2032,8 +2033,8 @@ void BossGanon_ChargeBigMagic(BossGanon* this, PlayState* play) {
} }
if (this->timers[0] == 0) { if (this->timers[0] == 0) {
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfBigMagicWindupAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfBigMagicWindupAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfBigMagicWindupAnim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfBigMagicWindupAnim, 0.0f);
this->unk_1C2 = 3; this->unk_1C2 = 3;
this->timers[0] = 6; this->timers[0] = 6;
this->timers[1] = 15; this->timers[1] = 15;
@ -2132,8 +2133,8 @@ void BossGanon_ChargeBigMagic(BossGanon* this, PlayState* play) {
} }
if (this->timers[1] == 0) { if (this->timers[1] == 0) {
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfBigMagicThrowAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfBigMagicThrowAnim);
Animation_MorphToLoop(&this->skelAnime, &gDorfBigMagicThrowAnim, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfBigMagicThrowAnim, 0.0f);
this->unk_1C2 = 4; this->unk_1C2 = 4;
this->unk_288 = 0.0f; this->unk_288 = 0.0f;
this->unk_290 = 0.0f; this->unk_290 = 0.0f;
@ -2161,8 +2162,8 @@ void BossGanon_ChargeBigMagic(BossGanon* this, PlayState* play) {
} }
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfBigMagicThrowEndAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfBigMagicThrowEndAnim);
Animation_MorphToLoop(&this->skelAnime, &gDorfBigMagicThrowEndAnim, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfBigMagicThrowEndAnim, 0.0f);
this->unk_1C2 = 5; this->unk_1C2 = 5;
} }
break; break;
@ -2179,7 +2180,7 @@ void BossGanon_ChargeBigMagic(BossGanon* this, PlayState* play) {
void BossGanon_SetupWait(BossGanon* this, PlayState* play) { void BossGanon_SetupWait(BossGanon* this, PlayState* play) {
BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1); BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1);
Animation_MorphToLoop(&this->skelAnime, &gDorfFloatAnim, -10.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfFloatAnim, -10.0f);
this->actionFunc = BossGanon_Wait; this->actionFunc = BossGanon_Wait;
this->fwork[GDF_FWORK_0] = 0.0f; this->fwork[GDF_FWORK_0] = 0.0f;
this->timers[0] = (s16)Rand_ZeroFloat(64.0f) + 30; this->timers[0] = (s16)Rand_ZeroFloat(64.0f) + 30;
@ -2244,8 +2245,8 @@ void BossGanon_Wait(BossGanon* this, PlayState* play) {
void BossGanon_SetupChargeLightBall(BossGanon* this, PlayState* play) { void BossGanon_SetupChargeLightBall(BossGanon* this, PlayState* play) {
BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1); BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfChargeLightBallAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfChargeLightBallAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfChargeLightBallAnim, -3.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfChargeLightBallAnim, -3.0f);
this->actionFunc = BossGanon_ChargeLightBall; this->actionFunc = BossGanon_ChargeLightBall;
this->timers[0] = 25; this->timers[0] = 25;
} }
@ -2291,13 +2292,13 @@ void BossGanon_ChargeLightBall(BossGanon* this, PlayState* play) {
void BossGanon_SetupPlayTennis(BossGanon* this, PlayState* play) { void BossGanon_SetupPlayTennis(BossGanon* this, PlayState* play) {
BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1); BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfThrowAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfThrowAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfThrowAnim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfThrowAnim, 0.0f);
this->actionFunc = BossGanon_PlayTennis; this->actionFunc = BossGanon_PlayTennis;
} }
void BossGanon_PlayTennis(BossGanon* this, PlayState* play) { void BossGanon_PlayTennis(BossGanon* this, PlayState* play) {
static AnimationHeader* volleyAnims[] = { &gDorfVolleyLeftAnim, &gDorfVolleyRightAnim }; static AnimationHeader* volleyAnims[] = { &gGanondorfVolleyLeftAnim, &gGanondorfVolleyRightAnim };
static s16 capeRightArmDurations[] = { 26, 20 }; static s16 capeRightArmDurations[] = { 26, 20 };
s16 rand; s16 rand;
@ -2310,7 +2311,7 @@ void BossGanon_PlayTennis(BossGanon* this, PlayState* play) {
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
this->unk_1C2 = 1; this->unk_1C2 = 1;
Animation_MorphToLoop(&this->skelAnime, &gDorfFloatAnim, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfFloatAnim, 0.0f);
} }
if (this->skelAnime.curFrame <= 12.0f) { if (this->skelAnime.curFrame <= 12.0f) {
@ -2359,8 +2360,8 @@ void BossGanon_PlayTennis(BossGanon* this, PlayState* play) {
void BossGanon_SetupBlock(BossGanon* this, PlayState* play) { void BossGanon_SetupBlock(BossGanon* this, PlayState* play) {
if ((this->actionFunc != BossGanon_Block) || (this->unk_1C2 != 0)) { if ((this->actionFunc != BossGanon_Block) || (this->unk_1C2 != 0)) {
BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1); BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfBlockAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfBlockAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfBlockAnim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfBlockAnim, 0.0f);
this->actionFunc = BossGanon_Block; this->actionFunc = BossGanon_Block;
} }
@ -2381,8 +2382,8 @@ void BossGanon_Block(BossGanon* this, PlayState* play) {
if (this->unk_1C2 == 0) { if (this->unk_1C2 == 0) {
if (this->timers[0] == 0) { if (this->timers[0] == 0) {
this->unk_1C2 = 1; this->unk_1C2 = 1;
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfBlockReleaseAnim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfBlockReleaseAnim, 0.0f);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfBlockReleaseAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfBlockReleaseAnim);
SkelAnime_Update(&this->skelAnime); SkelAnime_Update(&this->skelAnime);
sCape->attachShouldersTimer = 15.0f; sCape->attachShouldersTimer = 15.0f;
Audio_PlayActorSfx2(&this->actor, NA_SE_EV_GANON_MANTLE); Audio_PlayActorSfx2(&this->actor, NA_SE_EV_GANON_MANTLE);
@ -2408,8 +2409,8 @@ void BossGanon_SetupHitByLightBall(BossGanon* this, PlayState* play) {
s16 i; s16 i;
BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1); BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfBigMagicHitAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfBigMagicHitAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfBigMagicHitAnim, 0); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfBigMagicHitAnim, 0);
this->timers[0] = 70; this->timers[0] = 70;
sCape->attachRightArmTimer = sCape->attachLeftArmTimer = 0; sCape->attachRightArmTimer = sCape->attachLeftArmTimer = 0;
@ -2436,16 +2437,16 @@ void BossGanon_HitByLightBall(BossGanon* this, PlayState* play) {
BossGanonEff_SpawnShock(play, 1500.0f, GDF_SHOCK_DORF_YELLOW); BossGanonEff_SpawnShock(play, 1500.0f, GDF_SHOCK_DORF_YELLOW);
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfLightArrowWaitAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfLightArrowWaitAnim);
Animation_MorphToLoop(&this->skelAnime, &gDorfLightArrowWaitAnim, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfLightArrowWaitAnim, 0.0f);
this->unk_1C2 = 1; this->unk_1C2 = 1;
} }
} else if (this->unk_1C2 == 1) { } else if (this->unk_1C2 == 1) {
BossGanonEff_SpawnShock(play, 1000.0f, GDF_SHOCK_DORF_YELLOW); BossGanonEff_SpawnShock(play, 1000.0f, GDF_SHOCK_DORF_YELLOW);
if (this->timers[0] == 0) { if (this->timers[0] == 0) {
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfGetUp3Anim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfGetUp3Anim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfGetUp3Anim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfGetUp3Anim, 0.0f);
this->unk_1C2 = 2; this->unk_1C2 = 2;
SkelAnime_Update(&this->skelAnime); SkelAnime_Update(&this->skelAnime);
sCape->attachShouldersTimer = 18.0f; sCape->attachShouldersTimer = 18.0f;
@ -2480,8 +2481,8 @@ void BossGanon_SetupVulnerable(BossGanon* this, PlayState* play) {
if (this->actionFunc != BossGanon_Vulnerable) { if (this->actionFunc != BossGanon_Vulnerable) {
BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1); BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfLightArrowHitAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfLightArrowHitAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfLightArrowHitAnim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfLightArrowHitAnim, 0.0f);
sCape->attachRightArmTimer = sCape->attachLeftArmTimer = 0; sCape->attachRightArmTimer = sCape->attachLeftArmTimer = 0;
this->actionFunc = BossGanon_Vulnerable; this->actionFunc = BossGanon_Vulnerable;
@ -2539,16 +2540,16 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) {
case 0: case 0:
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
this->unk_1C2 = 1; this->unk_1C2 = 1;
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfLightEnergyHitAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfLightEnergyHitAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfLightEnergyHitAnim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfLightEnergyHitAnim, 0.0f);
} }
break; break;
case 1: case 1:
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
this->unk_1C2 = 2; this->unk_1C2 = 2;
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfKneelVulnerableAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfDownedAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfKneelVulnerableAnim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfDownedAnim, 0.0f);
} }
break; break;
@ -2560,8 +2561,8 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) {
this->actor.world.pos.y = 40.0f; this->actor.world.pos.y = 40.0f;
this->actor.velocity.y = 0.0f; this->actor.velocity.y = 0.0f;
this->unk_1C2 = 3; this->unk_1C2 = 3;
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfLandAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfLandAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfLandAnim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfLandAnim, 0.0f);
this->timers[0] = 70; this->timers[0] = 70;
this->actor.flags |= ACTOR_FLAG_10; this->actor.flags |= ACTOR_FLAG_10;
} }
@ -2574,8 +2575,8 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) {
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
this->unk_1C2 = 4; this->unk_1C2 = 4;
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfVulnerableAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfVulnerableAnim);
Animation_MorphToLoop(&this->skelAnime, &gDorfVulnerableAnim, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfVulnerableAnim, 0.0f);
} }
break; break;
@ -2586,8 +2587,8 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) {
if (this->timers[0] == 0) { if (this->timers[0] == 0) {
this->unk_1C2 = 5; this->unk_1C2 = 5;
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfGetUp1Anim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfGetUp1Anim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfGetUp1Anim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfGetUp1Anim, 0.0f);
this->unk_2D4 = 80; this->unk_2D4 = 80;
for (i = 1; i < 15; i++) { for (i = 1; i < 15; i++) {
@ -2605,8 +2606,8 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) {
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
this->unk_1C2 = 6; this->unk_1C2 = 6;
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfGetUp2Anim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfGetUp2Anim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfGetUp2Anim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfGetUp2Anim, 0.0f);
sCape->minDist = 20.0f; sCape->minDist = 20.0f;
this->unk_19F = 1; this->unk_19F = 1;
} }
@ -2624,8 +2625,8 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) {
case 7: case 7:
this->envLightMode = 0; this->envLightMode = 0;
Math_ApproachF(&this->actor.world.pos.y, 150.0f, 0.05f, 30.0f); Math_ApproachF(&this->actor.world.pos.y, 150.0f, 0.05f, 30.0f);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfGetUp3Anim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfGetUp3Anim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfGetUp3Anim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfGetUp3Anim, 0.0f);
this->unk_1C2 = 8; this->unk_1C2 = 8;
SkelAnime_Update(&this->skelAnime); SkelAnime_Update(&this->skelAnime);
sCape->attachShouldersTimer = 18.0f; sCape->attachShouldersTimer = 18.0f;
@ -2658,8 +2659,8 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) {
void BossGanon_SetupDamaged(BossGanon* this, PlayState* play) { void BossGanon_SetupDamaged(BossGanon* this, PlayState* play) {
BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1); BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfDamageAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfDamageAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &gDorfDamageAnim, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfDamageAnim, 0.0f);
this->actionFunc = BossGanon_Damaged; this->actionFunc = BossGanon_Damaged;
} }
@ -2676,8 +2677,8 @@ void BossGanon_Damaged(BossGanon* this, PlayState* play) {
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
this->actionFunc = BossGanon_Vulnerable; this->actionFunc = BossGanon_Vulnerable;
this->unk_1C2 = 4; this->unk_1C2 = 4;
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfVulnerableAnim); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfVulnerableAnim);
Animation_MorphToLoop(&this->skelAnime, &gDorfVulnerableAnim, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfVulnerableAnim, 0.0f);
} }
} }
@ -3191,40 +3192,40 @@ s32 BossGanon_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3
BossGanon* this = (BossGanon*)thisx; BossGanon* this = (BossGanon*)thisx;
switch (limbIndex) { switch (limbIndex) {
case 10: case GANONDORF_LIMB_RIGHT_HAND:
if (this->useOpenHand) { if (this->useOpenHand) {
*dList = gDorfOpenHandDL; *dList = gGanondorfRightHandOpenDL;
} }
break; break;
case 20: case GANONDORF_LIMB_LEFT_THIGH:
rot->y += this->legRot.x + this->legRot.z; rot->y += this->legRot.x + this->legRot.z;
rot->z += this->legRot.y; rot->z += this->legRot.y;
break; break;
case 21: case GANONDORF_LIMB_LEFT_SHIN:
if (this->legRot.y > 0.0f) { if (this->legRot.y > 0.0f) {
rot->z += this->legRot.y; rot->z += this->legRot.y;
} }
break; break;
case 22: case GANONDORF_LIMB_LEFT_FOOT:
rot->y += this->legRot.x + this->legRot.z; rot->y += this->legRot.x + this->legRot.z;
rot->z += this->legRot.y; rot->z += this->legRot.y;
break; break;
case 23: case GANONDORF_LIMB_RIGHT_THIGH:
rot->y += this->legRot.x - this->legRot.z; rot->y += this->legRot.x - this->legRot.z;
rot->z += this->legRot.y; rot->z += this->legRot.y;
break; break;
case 24: case GANONDORF_LIMB_RIGHT_SHIN:
if (this->legRot.y > 0.0f) { if (this->legRot.y > 0.0f) {
rot->z += this->legRot.y; rot->z += this->legRot.y;
} }
break; break;
case 25: case GANONDORF_LIMB_RIGHT_FOOT:
rot->y += this->legRot.x - this->legRot.z; rot->y += this->legRot.x - this->legRot.z;
rot->z += this->legRot.y; rot->z += this->legRot.y;
break; break;
@ -3255,22 +3256,22 @@ void BossGanon_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
Matrix_MultVec3f(&D_808E4DB8, &this->unk_2EC[bodyPart]); Matrix_MultVec3f(&D_808E4DB8, &this->unk_2EC[bodyPart]);
} }
if (limbIndex == 2) { if (limbIndex == GANONDORF_LIMB_TORSO) {
Matrix_MultVec3f(&D_808E4DB8, &this->unk_1FC); Matrix_MultVec3f(&D_808E4DB8, &this->unk_1FC);
} else if (limbIndex == 19) { } else if (limbIndex == GANONDORF_LIMB_PELVIS) {
Matrix_MultVec3f(&D_808E4DB8, &this->actor.focus.pos); Matrix_MultVec3f(&D_808E4DB8, &this->actor.focus.pos);
} else if (limbIndex == 11) { } else if (limbIndex == GANONDORF_LIMB_JEWEL) {
OPEN_DISPS(play->state.gfxCtx, "../z_boss_ganon.c", 7191); OPEN_DISPS(play->state.gfxCtx, "../z_boss_ganon.c", 7191);
Matrix_MultVec3f(&D_808E4DB8, &this->unk_208); Matrix_MultVec3f(&D_808E4DB8, &this->unk_208);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 7196), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 7196),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_ganon_DL_00BE90)); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gGanondorfEyesDL));
CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon.c", 7198); CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon.c", 7198);
} else if (limbIndex == 6) { } else if (limbIndex == GANONDORF_LIMB_LEFT_HAND) {
Matrix_MultVec3f(&D_808E4DC4, &this->unk_238); Matrix_MultVec3f(&D_808E4DC4, &this->unk_238);
} else if (limbIndex == 10) { } else if (limbIndex == GANONDORF_LIMB_RIGHT_HAND) {
Matrix_MultVec3f(&D_808E4DD0, &this->unk_22C); Matrix_MultVec3f(&D_808E4DD0, &this->unk_22C);
if (this->unk_25C == 0) { if (this->unk_25C == 0) {
@ -3282,7 +3283,7 @@ void BossGanon_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
if (this->triforceType == GDF_TRIFORCE_DORF) { if (this->triforceType == GDF_TRIFORCE_DORF) {
Matrix_MultVec3f(&D_808E4DE8, &this->triforcePos); Matrix_MultVec3f(&D_808E4DE8, &this->triforcePos);
} }
} else if (limbIndex == 4) { } else if (limbIndex == GANONDORF_LIMB_LEFT_UPPER_ARM) {
Vec3f sp28 = D_808E4DA0; Vec3f sp28 = D_808E4DA0;
if (this->unk_198 == 1) { if (this->unk_198 == 1) {
@ -3295,7 +3296,7 @@ void BossGanon_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
} }
Matrix_MultVec3f(&sp28, &this->unk_220); Matrix_MultVec3f(&sp28, &this->unk_220);
} else if (limbIndex == 8) { } else if (limbIndex == GANONDORF_LIMB_RIGHT_UPPER_ARM) {
Vec3f sp1C = D_808E4DAC; Vec3f sp1C = D_808E4DAC;
if (this->unk_198 == 1) { if (this->unk_198 == 1) {
@ -3346,7 +3347,7 @@ void BossGanon_DrawShock(BossGanon* this, PlayState* play) {
Gfx_SetupDL_25Xlu(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 0); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 0);
gSPDisplayList(POLY_XLU_DISP++, gDorfLightBallMaterialDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfLightBallMaterialDL);
if (this->unk_2E8 != 0) { if (this->unk_2E8 != 0) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
@ -3359,7 +3360,7 @@ void BossGanon_DrawShock(BossGanon* this, PlayState* play) {
Matrix_RotateZ(Rand_CenteredFloat(M_PI), MTXMODE_APPLY); Matrix_RotateZ(Rand_CenteredFloat(M_PI), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 7384), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 7384),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfSquareDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfSquareDL);
} }
} else { } else {
for (i = 1; i < 15; i++) { for (i = 1; i < 15; i++) {
@ -3380,9 +3381,9 @@ void BossGanon_DrawShock(BossGanon* this, PlayState* play) {
(this->unk_1A2 + i) * -15, 32, 64)); (this->unk_1A2 + i) * -15, 32, 64));
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 200, 255, 170, 255); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 200, 255, 170, 255);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 128); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 128);
gSPDisplayList(POLY_XLU_DISP++, gDorfShockGlowDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfShockGlowDL);
} else { } else {
gSPDisplayList(POLY_XLU_DISP++, gDorfSquareDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfSquareDL);
} }
} }
} }
@ -3408,7 +3409,7 @@ void BossGanon_DrawHandLightBall(BossGanon* this, PlayState* play) {
gDPSetEnvColor(POLY_XLU_DISP++, 100, 255, 0, 0); gDPSetEnvColor(POLY_XLU_DISP++, 100, 255, 0, 0);
} }
gSPDisplayList(POLY_XLU_DISP++, gDorfLightBallMaterialDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfLightBallMaterialDL);
Matrix_Translate(this->unk_260.x, this->unk_260.y, this->unk_260.z, MTXMODE_NEW); Matrix_Translate(this->unk_260.x, this->unk_260.y, this->unk_260.z, MTXMODE_NEW);
Matrix_ReplaceRotation(&play->billboardMtxF); Matrix_ReplaceRotation(&play->billboardMtxF);
@ -3416,7 +3417,7 @@ void BossGanon_DrawHandLightBall(BossGanon* this, PlayState* play) {
Matrix_RotateZ(this->unk_258, 1); Matrix_RotateZ(this->unk_258, 1);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 7510), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 7510),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfSquareDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfSquareDL);
alpha = ((this->unk_1A2 % 2) != 0) ? 100 : 80; alpha = ((this->unk_1A2 % 2) != 0) ? 100 : 80;
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);
@ -3425,7 +3426,7 @@ void BossGanon_DrawHandLightBall(BossGanon* this, PlayState* play) {
Matrix_Scale(this->handLightBallScale * 0.75f, 1.0f, this->handLightBallScale * 0.75f, MTXMODE_APPLY); Matrix_Scale(this->handLightBallScale * 0.75f, 1.0f, this->handLightBallScale * 0.75f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 7531), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 7531),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfLightCoreDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfLightCoreDL);
CLOSE_DISPS(gfxCtx, "../z_boss_ganon.c", 7534); CLOSE_DISPS(gfxCtx, "../z_boss_ganon.c", 7534);
} }
@ -3453,7 +3454,7 @@ void BossGanon_DrawBigMagicCharge(BossGanon* this, PlayState* play) {
Matrix_Scale(this->unk_28C, this->unk_28C, this->unk_28C, MTXMODE_APPLY); Matrix_Scale(this->unk_28C, this->unk_28C, this->unk_28C, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 7588), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 7588),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfLightFlecksDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfLightFlecksDL);
// background circle texture // background circle texture
Matrix_Translate(this->unk_278.x, this->unk_278.y, this->unk_278.z, MTXMODE_NEW); Matrix_Translate(this->unk_278.x, this->unk_278.y, this->unk_278.z, MTXMODE_NEW);
@ -3465,19 +3466,19 @@ void BossGanon_DrawBigMagicCharge(BossGanon* this, PlayState* play) {
gSPSegment(POLY_XLU_DISP++, 0x09, gSPSegment(POLY_XLU_DISP++, 0x09,
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x20, 1, 0, this->unk_1A2 * -4, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x20, 1, 0, this->unk_1A2 * -4,
0x20, 0x20)); 0x20, 0x20));
gSPDisplayList(POLY_XLU_DISP++, gDorfBigMagicBGCircleDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfBigMagicBGCircleDL);
// yellow background dot // yellow background dot
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 150, 170, 0, (s8)this->unk_288); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 150, 170, 0, (s8)this->unk_288);
gSPSegment(POLY_XLU_DISP++, 0x0A, gSPSegment(POLY_XLU_DISP++, 0x0A,
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x20, 1, this->unk_1A2 * 2, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x20, 1, this->unk_1A2 * 2,
this->unk_1A2 * -0x14, 0x40, 0x40)); this->unk_1A2 * -0x14, 0x40, 0x40));
gSPDisplayList(POLY_XLU_DISP++, gDorfDotDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfDotDL);
// light ball material // light ball material
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 100, 0); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 100, 0);
gSPDisplayList(POLY_XLU_DISP++, gDorfLightBallMaterialDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfLightBallMaterialDL);
// light ball geometry // light ball geometry
Matrix_Translate(this->unk_278.x, this->unk_278.y, this->unk_278.z, MTXMODE_NEW); Matrix_Translate(this->unk_278.x, this->unk_278.y, this->unk_278.z, MTXMODE_NEW);
@ -3486,7 +3487,7 @@ void BossGanon_DrawBigMagicCharge(BossGanon* this, PlayState* play) {
Matrix_RotateZ((this->unk_1A2 * 10.0f) / 1000.0f, MTXMODE_APPLY); Matrix_RotateZ((this->unk_1A2 * 10.0f) / 1000.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 7673), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 7673),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfSquareDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfSquareDL);
BossGanon_InitRand(this->unk_1AA + 1, 0x71AC, 0x263A); BossGanon_InitRand(this->unk_1AA + 1, 0x71AC, 0x263A);
Matrix_Translate(this->unk_278.x, this->unk_278.y, this->unk_278.z, MTXMODE_NEW); Matrix_Translate(this->unk_278.x, this->unk_278.y, this->unk_278.z, MTXMODE_NEW);
@ -3507,7 +3508,7 @@ void BossGanon_DrawBigMagicCharge(BossGanon* this, PlayState* play) {
Matrix_Scale(4.0f, 4.0f, 1.0f, MTXMODE_APPLY); Matrix_Scale(4.0f, 4.0f, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 7713), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 7713),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfLightRayTriDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfLightRayTriDL);
Matrix_Pop(); Matrix_Pop();
} }
@ -3560,7 +3561,7 @@ void BossGanon_DrawTriforce(BossGanon* this, PlayState* play) {
Matrix_Scale(this->fwork[GDF_TRIFORCE_SCALE], this->fwork[GDF_TRIFORCE_SCALE], 1.0f, MTXMODE_APPLY); Matrix_Scale(this->fwork[GDF_TRIFORCE_SCALE], this->fwork[GDF_TRIFORCE_SCALE], 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 7779), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 7779),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gDorfTriforceDL)); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gGanondorfTriforceDL));
Matrix_Pop(); Matrix_Pop();
@ -3595,7 +3596,7 @@ void BossGanon_DrawDarkVortex(BossGanon* this, PlayState* play) {
MTXMODE_APPLY); MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 7841), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 7841),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gDorfVortexDL)); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gGanondorfVortexDL));
Matrix_Pop(); Matrix_Pop();
@ -3769,10 +3770,10 @@ void BossGanon_DrawShadowTexture(void* tex, BossGanon* this, PlayState* play) {
Matrix_Scale(0.95000005f, 1.0f, 0.95000005f, MTXMODE_APPLY); Matrix_Scale(0.95000005f, 1.0f, 0.95000005f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 8396), gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 8396),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gDorfShadowSetupDL); gSPDisplayList(POLY_OPA_DISP++, gGanondorfShadowSetupDL);
gDPLoadTextureBlock(POLY_OPA_DISP++, tex, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0, G_TX_NOMIRROR | G_TX_CLAMP, gDPLoadTextureBlock(POLY_OPA_DISP++, tex, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0, G_TX_NOMIRROR | G_TX_CLAMP,
G_TX_NOMIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD); G_TX_NOMIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD);
gSPDisplayList(POLY_OPA_DISP++, gDorfShadowModelDL); gSPDisplayList(POLY_OPA_DISP++, gGanondorfShadowModelDL);
CLOSE_DISPS(gfxCtx, "../z_boss_ganon.c", 8426); CLOSE_DISPS(gfxCtx, "../z_boss_ganon.c", 8426);
} }
@ -3793,7 +3794,7 @@ void BossGanon_Draw(Actor* thisx, PlayState* play) {
POLY_OPA_DISP = Gfx_SetFog(POLY_OPA_DISP, 255, 50, 0, 0, 900, 1099); POLY_OPA_DISP = Gfx_SetFog(POLY_OPA_DISP, 255, 50, 0, 0, 900, 1099);
} }
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gDorfEyeTex)); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gGanondorfNormalEyeTex));
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
BossGanon_OverrideLimbDraw, BossGanon_PostLimbDraw, &this->actor); BossGanon_OverrideLimbDraw, BossGanon_PostLimbDraw, &this->actor);
@ -4137,10 +4138,10 @@ void BossGanon_LightBall_Draw(Actor* thisx, PlayState* play) {
Matrix_Scale(this->actor.scale.x * 0.75f, 1.0f, this->actor.scale.z * 0.75f, MTXMODE_APPLY); Matrix_Scale(this->actor.scale.x * 0.75f, 1.0f, this->actor.scale.z * 0.75f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 9875), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 9875),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfLightCoreDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfLightCoreDL);
Matrix_Pop(); Matrix_Pop();
gSPDisplayList(POLY_XLU_DISP++, gDorfLightBallMaterialDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfLightBallMaterialDL);
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s8)this->fwork[GDF_FWORK_1]); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s8)this->fwork[GDF_FWORK_1]);
@ -4154,7 +4155,7 @@ void BossGanon_LightBall_Draw(Actor* thisx, PlayState* play) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 9899), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 9899),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfSquareDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfSquareDL);
Matrix_Pop(); Matrix_Pop();
} }
} else if (this->unk_1A8 == 0) { } else if (this->unk_1A8 == 0) {
@ -4162,7 +4163,7 @@ void BossGanon_LightBall_Draw(Actor* thisx, PlayState* play) {
Matrix_RotateZ((this->actor.shape.rot.z / 32768.0f) * 3.1416f, MTXMODE_APPLY); Matrix_RotateZ((this->actor.shape.rot.z / 32768.0f) * 3.1416f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 9907), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 9907),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfSquareDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfSquareDL);
} }
CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon.c", 9911); CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon.c", 9911);
@ -4276,7 +4277,7 @@ void func_808E229C(Actor* thisx, PlayState* play2) {
Gfx_SetupDL_25Xlu(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 0); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 0);
gSPDisplayList(POLY_XLU_DISP++, gDorfLightBallMaterialDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfLightBallMaterialDL);
for (i = 9; i >= 0; i--) { for (i = 9; i >= 0; i--) {
temp = (s16)(((this->unk_1A6 - i) + 0xF) % 15); temp = (s16)(((this->unk_1A6 - i) + 0xF) % 15);
@ -4287,7 +4288,7 @@ void func_808E229C(Actor* thisx, PlayState* play2) {
Matrix_RotateZ(((2.0f * (i * M_PI)) / 10.0f) + BINANG_TO_RAD_ALT(this->actor.shape.rot.z), MTXMODE_APPLY); Matrix_RotateZ(((2.0f * (i * M_PI)) / 10.0f) + BINANG_TO_RAD_ALT(this->actor.shape.rot.z), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 10109), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 10109),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfSquareDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfSquareDL);
} }
CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon.c", 10113); CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon.c", 10113);
@ -4541,9 +4542,9 @@ void func_808E2544(Actor* thisx, PlayState* play) {
} }
static Gfx* sBigMagicLightStreakDLists[] = { static Gfx* sBigMagicLightStreakDLists[] = {
gDorfLightStreak12DL, gDorfLightStreak11DL, gDorfLightStreak10DL, gDorfLightStreak9DL, gGanondorfLightStreak12DL, gGanondorfLightStreak11DL, gGanondorfLightStreak10DL, gGanondorfLightStreak9DL,
gDorfLightStreak8DL, gDorfLightStreak7DL, gDorfLightStreak6DL, gDorfLightStreak5DL, gGanondorfLightStreak8DL, gGanondorfLightStreak7DL, gGanondorfLightStreak6DL, gGanondorfLightStreak5DL,
gDorfLightStreak4DL, gDorfLightStreak3DL, gDorfLightStreak2DL, gDorfLightStreak1DL, gGanondorfLightStreak4DL, gGanondorfLightStreak3DL, gGanondorfLightStreak2DL, gGanondorfLightStreak1DL,
}; };
void func_808E324C(Actor* thisx, PlayState* play) { void func_808E324C(Actor* thisx, PlayState* play) {
@ -4580,9 +4581,9 @@ void func_808E324C(Actor* thisx, PlayState* play) {
Matrix_RotateZ(Rand_CenteredFloat(M_PI), MTXMODE_APPLY); Matrix_RotateZ(Rand_CenteredFloat(M_PI), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 10534), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon.c", 10534),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfLightBallMaterialDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfLightBallMaterialDL);
gSPDisplayList(POLY_XLU_DISP++, gDorfSquareDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfSquareDL);
CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon.c", 10541); CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon.c", 10541);
} }
@ -4786,9 +4787,10 @@ void BossGanon_UpdateEffects(PlayState* play) {
} }
static void* sLightningTextures[] = { static void* sLightningTextures[] = {
gDorfLightning1Tex, gDorfLightning1Tex, gDorfLightning2Tex, gDorfLightning3Tex, gDorfLightning4Tex, gGanondorfLightning1Tex, gGanondorfLightning1Tex, gGanondorfLightning2Tex, gGanondorfLightning3Tex,
gDorfLightning5Tex, gDorfLightning6Tex, gDorfLightning7Tex, gDorfLightning8Tex, gDorfLightning9Tex, gGanondorfLightning4Tex, gGanondorfLightning5Tex, gGanondorfLightning6Tex, gGanondorfLightning7Tex,
gDorfLightning10Tex, gDorfLightning11Tex, gDorfLightning12Tex, gGanondorfLightning8Tex, gGanondorfLightning9Tex, gGanondorfLightning10Tex, gGanondorfLightning11Tex,
gGanondorfLightning12Tex,
}; };
static u8 sLightningPrimColors[] = { static u8 sLightningPrimColors[] = {
@ -4817,7 +4819,7 @@ void BossGanon_DrawEffects(PlayState* play) {
if (eff->type == GDF_EFF_WINDOW_SHARD) { if (eff->type == GDF_EFF_WINDOW_SHARD) {
gDPPipeSync(POLY_OPA_DISP++); gDPPipeSync(POLY_OPA_DISP++);
if (materialFlag == 0) { if (materialFlag == 0) {
gSPDisplayList(POLY_OPA_DISP++, gDorfWindowShardMaterialDL); gSPDisplayList(POLY_OPA_DISP++, gGanondorfWindowShardMaterialDL);
materialFlag++; materialFlag++;
} }
if ((eff->timer & 7) != 0) { if ((eff->timer & 7) != 0) {
@ -4831,7 +4833,7 @@ void BossGanon_DrawEffects(PlayState* play) {
Matrix_RotateX(eff->unk_44, MTXMODE_APPLY); Matrix_RotateX(eff->unk_44, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 10898), gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 10898),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gDorfWindowShardModelDL); gSPDisplayList(POLY_OPA_DISP++, gGanondorfWindowShardModelDL);
} }
} }
@ -4843,7 +4845,7 @@ void BossGanon_DrawEffects(PlayState* play) {
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);
if (materialFlag == 0) { if (materialFlag == 0) {
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 0); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 0);
gSPDisplayList(POLY_XLU_DISP++, gDorfLightBallMaterialDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfLightBallMaterialDL);
materialFlag++; materialFlag++;
} }
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, eff->alpha); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, eff->alpha);
@ -4853,7 +4855,7 @@ void BossGanon_DrawEffects(PlayState* play) {
Matrix_RotateZ(eff->unk_3C, MTXMODE_APPLY); Matrix_RotateZ(eff->unk_3C, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 10932), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 10932),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfSquareDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfSquareDL);
} }
} }
@ -4865,7 +4867,7 @@ void BossGanon_DrawEffects(PlayState* play) {
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);
if (materialFlag == 0) { if (materialFlag == 0) {
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 0); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 0);
gSPDisplayList(POLY_XLU_DISP++, gDorfLightBallMaterialDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfLightBallMaterialDL);
materialFlag++; materialFlag++;
} }
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, eff->alpha); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, eff->alpha);
@ -4877,7 +4879,7 @@ void BossGanon_DrawEffects(PlayState* play) {
Matrix_RotateX(M_PI / 2, MTXMODE_APPLY); Matrix_RotateX(M_PI / 2, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 10971), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 10971),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfSquareDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfSquareDL);
} }
} }
@ -4903,7 +4905,7 @@ void BossGanon_DrawEffects(PlayState* play) {
Matrix_RotateZ(eff->unk_3C, MTXMODE_APPLY); Matrix_RotateZ(eff->unk_3C, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11023), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11023),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfShockDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfShockDL);
} }
} }
@ -4925,7 +4927,7 @@ void BossGanon_DrawEffects(PlayState* play) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11074), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11074),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sLightningTextures[eff->timer])); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sLightningTextures[eff->timer]));
gSPDisplayList(POLY_XLU_DISP++, gDorfLightningDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfLightningDL);
} }
} }
@ -4943,7 +4945,7 @@ void BossGanon_DrawEffects(PlayState* play) {
Matrix_Scale(eff->scale, eff->unk_40 * eff->scale, eff->scale, MTXMODE_APPLY); Matrix_Scale(eff->scale, eff->unk_40 * eff->scale, eff->scale, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11121), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11121),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfImpactDarkDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfImpactDarkDL);
} }
} }
@ -4961,7 +4963,7 @@ void BossGanon_DrawEffects(PlayState* play) {
Matrix_Scale(eff->scale, eff->unk_40 * eff->scale, eff->scale, MTXMODE_APPLY); Matrix_Scale(eff->scale, eff->unk_40 * eff->scale, eff->scale, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11165), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11165),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfImpactLightDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfImpactLightDL);
} }
} }
@ -4980,7 +4982,7 @@ void BossGanon_DrawEffects(PlayState* play) {
(eff->scale * 200.0f) / 1500.0f, MTXMODE_APPLY); (eff->scale * 200.0f) / 1500.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11209), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11209),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfShockwaveDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfShockwaveDL);
} }
} }
@ -4999,7 +5001,7 @@ void BossGanon_DrawEffects(PlayState* play) {
Matrix_Scale(eff->scale, eff->scale, 1.0f, MTXMODE_APPLY); Matrix_Scale(eff->scale, eff->scale, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11250), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11250),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gDorfDotDL); gSPDisplayList(POLY_XLU_DISP++, gGanondorfDotDL);
} }
} }

View file

@ -8,6 +8,36 @@ struct BossGanon;
typedef void (*BossGanonActionFunc)(struct BossGanon*, PlayState*); typedef void (*BossGanonActionFunc)(struct BossGanon*, PlayState*);
typedef enum {
/* 0 */ GANONDORF_LIMB_NONE,
/* 1 */ GANONDORF_LIMB_ROOT,
/* 2 */ GANONDORF_LIMB_TORSO,
/* 3 */ GANONDORF_LIMB_LEFT_SHOULDER,
/* 4 */ GANONDORF_LIMB_LEFT_UPPER_ARM,
/* 5 */ GANONDORF_LIMB_LEFT_FOREARM,
/* 6 */ GANONDORF_LIMB_LEFT_HAND,
/* 7 */ GANONDORF_LIMB_RIGHT_SHOULDER,
/* 8 */ GANONDORF_LIMB_RIGHT_UPPER_ARM,
/* 9 */ GANONDORF_LIMB_RIGHT_FOREARM,
/* 10 */ GANONDORF_LIMB_RIGHT_HAND,
/* 11 */ GANONDORF_LIMB_JEWEL,
/* 12 */ GANONDORF_LIMB_LEFT_UPPER_LIP,
/* 13 */ GANONDORF_LIMB_MOUTH,
/* 14 */ GANONDORF_LIMB_JAW,
/* 15 */ GANONDORF_LIMB_UPPER_HAIR_END,
/* 16 */ GANONDORF_LIMB_LOWER_HAIR_END,
/* 17 */ GANONDORF_LIMB_RIGHT_UPPER_LIP,
/* 18 */ GANONDORF_LIMB_HEAD,
/* 19 */ GANONDORF_LIMB_PELVIS,
/* 20 */ GANONDORF_LIMB_LEFT_THIGH,
/* 21 */ GANONDORF_LIMB_LEFT_SHIN,
/* 22 */ GANONDORF_LIMB_LEFT_FOOT,
/* 23 */ GANONDORF_LIMB_RIGHT_THIGH,
/* 24 */ GANONDORF_LIMB_RIGHT_SHIN,
/* 25 */ GANONDORF_LIMB_RIGHT_FOOT,
/* 26 */ GANONDORF_LIMB_MAX
} GanondorfLimb;
typedef enum { typedef enum {
/* 0 */ GDF_FWORK_0, /* 0 */ GDF_FWORK_0,
/* 1 */ GDF_FWORK_1, /* 1 */ GDF_FWORK_1,

View file

@ -1,4 +1,5 @@
#include "z_boss_ganon2.h" #include "z_boss_ganon2.h"
#include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h"
#include "overlays/actors/ovl_Demo_Gj/z_demo_gj.h" #include "overlays/actors/ovl_Demo_Gj/z_demo_gj.h"
#include "overlays/actors/ovl_En_Zl3/z_en_zl3.h" #include "overlays/actors/ovl_En_Zl3/z_en_zl3.h"
#include "assets/objects/object_ganon/object_ganon.h" #include "assets/objects/object_ganon/object_ganon.h"
@ -145,7 +146,7 @@ void BossGanon2_Init(Actor* thisx, PlayState* play) {
Collider_InitJntSph(play, &this->unk_444); Collider_InitJntSph(play, &this->unk_444);
Collider_SetJntSph(play, &this->unk_444, &this->actor, &sJntSphInit2, this->unk_864); Collider_SetJntSph(play, &this->unk_444, &this->actor, &sJntSphInit2, this->unk_864);
BossGanon2_SetObjectSegment(this, play, OBJECT_GANON, false); BossGanon2_SetObjectSegment(this, play, OBJECT_GANON, false);
SkelAnime_InitFlex(play, &this->skelAnime, &gDorfSkel, NULL, NULL, NULL, 0); SkelAnime_InitFlex(play, &this->skelAnime, &gGanondorfSkel, NULL, NULL, NULL, 0);
func_808FD5C4(this, play); func_808FD5C4(this, play);
this->actor.naviEnemyId = NAVI_ENEMY_GANON; this->actor.naviEnemyId = NAVI_ENEMY_GANON;
this->actor.gravity = 0.0f; this->actor.gravity = 0.0f;
@ -218,7 +219,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
player->actor.world.pos.y = 1086.0f; player->actor.world.pos.y = 1086.0f;
player->actor.world.pos.z = -186.0f; player->actor.world.pos.z = -186.0f;
player->actor.shape.rot.y = -0x5000; player->actor.shape.rot.y = -0x5000;
Animation_MorphToLoop(&this->skelAnime, &object_ganon_anime3_Anim_002168, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfBurstOutAnim, 0.0f);
play->envCtx.lightBlend = 0.0f; play->envCtx.lightBlend = 0.0f;
// fake, tricks the compiler into allocating more stack // fake, tricks the compiler into allocating more stack
if (zero) { if (zero) {
@ -406,8 +407,8 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
if (this->unk_398 == 50) { if (this->unk_398 == 50) {
this->unk_398 = 0; this->unk_398 = 0;
this->unk_39C = 12; this->unk_39C = 12;
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime3_Anim_002168, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfBurstOutAnim, 0.0f);
this->unk_194 = Animation_GetLastFrame(&object_ganon_anime3_Anim_002168); this->unk_194 = Animation_GetLastFrame(&gGanondorfBurstOutAnim);
this->actor.world.pos.x = this->actor.world.pos.z = -200.0f; this->actor.world.pos.x = this->actor.world.pos.z = -200.0f;
this->actor.world.pos.y = 1009.0f; this->actor.world.pos.y = 1009.0f;
this->actor.shape.yOffset = 7000.0f; this->actor.shape.yOffset = 7000.0f;
@ -440,7 +441,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
this->subCamAt.y = this->actor.world.pos.y + 70.0f; this->subCamAt.y = this->actor.world.pos.y + 70.0f;
} }
if (Animation_OnFrame(&this->skelAnime, this->unk_194)) { if (Animation_OnFrame(&this->skelAnime, this->unk_194)) {
Animation_MorphToLoop(&this->skelAnime, &object_ganon_anime3_Anim_002E6C, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfFloatingHeavyBreathingAnim, 0.0f);
this->unk_39C = 14; this->unk_39C = 14;
this->unk_398 = 0; this->unk_398 = 0;
this->actor.world.pos.x = -200.0f; this->actor.world.pos.x = -200.0f;
@ -493,12 +494,12 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
Math_ApproachF(&this->subCamAt.y, this->actor.world.pos.y + 77.0f, 0.05f, 5.0f); Math_ApproachF(&this->subCamAt.y, this->actor.world.pos.y + 77.0f, 0.05f, 5.0f);
if (this->unk_398 >= 50) { if (this->unk_398 >= 50) {
if (this->unk_398 == 50) { if (this->unk_398 == 50) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime3_Anim_000BFC, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfShowTriforceStartAnim, 0.0f);
this->unk_194 = Animation_GetLastFrame(&object_ganon_anime3_Anim_000BFC); this->unk_194 = Animation_GetLastFrame(&gGanondorfShowTriforceStartAnim);
this->unk_314 = 3; this->unk_314 = 3;
} }
if (Animation_OnFrame(&this->skelAnime, this->unk_194)) { if (Animation_OnFrame(&this->skelAnime, this->unk_194)) {
Animation_MorphToLoop(&this->skelAnime, &object_ganon_anime3_Anim_003F38, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanondorfShowTriforceLoopAnim, 0.0f);
this->unk_194 = 1000.0f; this->unk_194 = 1000.0f;
} }
} }
@ -508,8 +509,8 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
if (this->unk_398 == 140) { if (this->unk_398 == 140) {
this->unk_39C = 16; this->unk_39C = 16;
this->unk_398 = 0; this->unk_398 = 0;
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime3_Anim_003754, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfTransformStartAnim, 0.0f);
this->unk_194 = Animation_GetLastFrame(&object_ganon_anime3_Anim_003754); this->unk_194 = Animation_GetLastFrame(&gGanondorfTransformStartAnim);
this->unk_339 = 55; this->unk_339 = 55;
play->envCtx.lightBlend = 1.0f; play->envCtx.lightBlend = 1.0f;
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GANON_CASBREAK); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GANON_CASBREAK);
@ -531,7 +532,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
this->unk_1B4 = 0.0f; this->unk_1B4 = 0.0f;
SkelAnime_Update(&this->skelAnime); SkelAnime_Update(&this->skelAnime);
if (Animation_OnFrame(&this->skelAnime, this->unk_194)) { if (Animation_OnFrame(&this->skelAnime, this->unk_194)) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime3_Anim_0028A8, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfTransformEndAnim, 0.0f);
this->unk_194 = 1000.0f; this->unk_194 = 1000.0f;
} }
Math_ApproachF(&this->subCamEye.x, (this->actor.world.pos.x + 200.0f) - 90.0f, 0.1f, 6.3999996f); Math_ApproachF(&this->subCamEye.x, (this->actor.world.pos.x + 200.0f) - 90.0f, 0.1f, 6.3999996f);
@ -555,7 +556,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
this->unk_337 = 2; this->unk_337 = 2;
BossGanon2_SetObjectSegment(this, play, OBJECT_GANON2, false); BossGanon2_SetObjectSegment(this, play, OBJECT_GANON2, false);
SkelAnime_Free(&this->skelAnime, play); SkelAnime_Free(&this->skelAnime, play);
SkelAnime_InitFlex(play, &this->skelAnime, &object_ganon2_Skel_025970, NULL, NULL, NULL, 0); SkelAnime_InitFlex(play, &this->skelAnime, &gGanonSkel, NULL, NULL, NULL, 0);
BossGanon2_SetObjectSegment(this, play, OBJECT_GANON_ANIME3, false); BossGanon2_SetObjectSegment(this, play, OBJECT_GANON_ANIME3, false);
func_8002DF54(play, &this->actor, 0x54); func_8002DF54(play, &this->actor, 0x54);
this->unk_314 = 3; this->unk_314 = 3;
@ -577,7 +578,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
if (this->unk_398 == 25) { if (this->unk_398 == 25) {
this->unk_39C = 18; this->unk_39C = 18;
this->unk_398 = 0; this->unk_398 = 0;
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime3_Anim_010380, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanonUncurlAndFlailAnim, 0.0f);
this->skelAnime.playSpeed = 0.0f; this->skelAnime.playSpeed = 0.0f;
this->subCamEye.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) - 50.0f; this->subCamEye.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) - 50.0f;
this->subCamEye.y = this->actor.world.pos.y; this->subCamEye.y = this->actor.world.pos.y;
@ -640,7 +641,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
this->unk_398 = 0; this->unk_398 = 0;
this->unk_420 = 10.0f; this->unk_420 = 10.0f;
this->actor.velocity.y = 0.0f; this->actor.velocity.y = 0.0f;
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime3_Anim_010380, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanonUncurlAndFlailAnim, 0.0f);
func_808FD4D4(this, play, 0, 3); func_808FD4D4(this, play, 0, 3);
func_800A9F6C(0.0f, 0xC8, 0x14, 0x14); func_800A9F6C(0.0f, 0xC8, 0x14, 0x14);
} }
@ -673,8 +674,8 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
} }
if (this->unk_398 == 80) { if (this->unk_398 == 80) {
BossGanon2_SetObjectSegment(this, play, OBJECT_GANON2, false); BossGanon2_SetObjectSegment(this, play, OBJECT_GANON2, false);
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(object_ganon2_Tex_021A90), TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gGanonTitleCardTex), 160,
160, 180, 128, 40); 180, 128, 40);
} }
this->subCamEye.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) + 100.0f; this->subCamEye.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) + 100.0f;
this->subCamEye.y = this->actor.world.pos.y; this->subCamEye.y = this->actor.world.pos.y;
@ -843,8 +844,8 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
if ((this->unk_398 > 40) && (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) { if ((this->unk_398 > 40) && (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) {
this->unk_39C = 29; this->unk_39C = 29;
this->unk_398 = 0; this->unk_398 = 0;
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime3_Anim_0147E0, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanonRoarAnim, 0.0f);
this->unk_194 = Animation_GetLastFrame(&object_ganon_anime3_Anim_0147E0); this->unk_194 = Animation_GetLastFrame(&gGanonRoarAnim);
this->actor.shape.yOffset = 0.0f; this->actor.shape.yOffset = 0.0f;
this->actor.world.pos.y = 1086.0f; this->actor.world.pos.y = 1086.0f;
this->actor.gravity = -1.0f; this->actor.gravity = -1.0f;
@ -1043,7 +1044,7 @@ void func_808FFDB0(BossGanon2* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, objectIdx)) { if (Object_IsLoaded(&play->objectCtx, objectIdx)) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[objectIdx].segment); gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[objectIdx].segment);
Animation_MorphToLoop(&this->skelAnime, &object_ganon2_Anim_00FFE4, -10.0f); Animation_MorphToLoop(&this->skelAnime, &gGanonGuardIdleAnim, -10.0f);
this->actionFunc = func_808FFEBC; this->actionFunc = func_808FFEBC;
if (this->unk_334 != 0) { if (this->unk_334 != 0) {
@ -1081,7 +1082,7 @@ void func_808FFEBC(BossGanon2* this, PlayState* play) {
} }
void func_808FFF90(BossGanon2* this, PlayState* play) { void func_808FFF90(BossGanon2* this, PlayState* play) {
Animation_MorphToLoop(&this->skelAnime, &object_ganon2_Anim_00FFE4, -10.0f); Animation_MorphToLoop(&this->skelAnime, &gGanonGuardIdleAnim, -10.0f);
this->actionFunc = func_808FFFE0; this->actionFunc = func_808FFFE0;
this->unk_1A2[0] = 40; this->unk_1A2[0] = 40;
} }
@ -1106,8 +1107,8 @@ void func_808FFFE0(BossGanon2* this, PlayState* play) {
} }
void func_809000A0(BossGanon2* this, PlayState* play) { void func_809000A0(BossGanon2* this, PlayState* play) {
Animation_MorphToLoop(&this->skelAnime, &object_ganon2_Anim_026510, -2.0f); Animation_MorphToLoop(&this->skelAnime, &gGanonStunStartAnim, -2.0f);
this->unk_194 = Animation_GetLastFrame(&object_ganon2_Anim_026510); this->unk_194 = Animation_GetLastFrame(&gGanonStunStartAnim);
this->unk_1AC = 0; this->unk_1AC = 0;
this->actionFunc = func_80900104; this->actionFunc = func_80900104;
} }
@ -1120,15 +1121,15 @@ void func_80900104(BossGanon2* this, PlayState* play) {
case 0: case 0:
if (Animation_OnFrame(&this->skelAnime, this->unk_194)) { if (Animation_OnFrame(&this->skelAnime, this->unk_194)) {
this->unk_1AC = 1; this->unk_1AC = 1;
Animation_MorphToLoop(&this->skelAnime, &object_ganon2_Anim_026AF4, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanonStunLoopAnim, 0.0f);
this->unk_1A2[0] = 80; this->unk_1A2[0] = 80;
} }
break; break;
case 1: case 1:
if (this->unk_1A2[0] == 0) { if (this->unk_1A2[0] == 0) {
this->unk_1AC = 2; this->unk_1AC = 2;
Animation_MorphToLoop(&this->skelAnime, &object_ganon2_Anim_027824, -5.0f); Animation_MorphToLoop(&this->skelAnime, &gGanonStunEndAnim, -5.0f);
this->unk_194 = Animation_GetLastFrame(&object_ganon2_Anim_027824); this->unk_194 = Animation_GetLastFrame(&gGanonStunEndAnim);
} }
break; break;
case 2: case 2:
@ -1140,8 +1141,8 @@ void func_80900104(BossGanon2* this, PlayState* play) {
} }
void func_80900210(BossGanon2* this, PlayState* play) { void func_80900210(BossGanon2* this, PlayState* play) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon2_Anim_00DFF0, -3.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanonDamageAnim, -3.0f);
this->unk_194 = Animation_GetLastFrame(&object_ganon2_Anim_00DFF0); this->unk_194 = Animation_GetLastFrame(&gGanonDamageAnim);
this->actionFunc = func_8090026C; this->actionFunc = func_8090026C;
} }
@ -1155,7 +1156,7 @@ void func_8090026C(BossGanon2* this, PlayState* play) {
} }
void func_809002CC(BossGanon2* this, PlayState* play) { void func_809002CC(BossGanon2* this, PlayState* play) {
Animation_MorphToLoop(&this->skelAnime, &object_ganon2_Anim_00E8EC, -10.0f); Animation_MorphToLoop(&this->skelAnime, &gGanonGuardWalkAnim, -10.0f);
this->actionFunc = func_80900344; this->actionFunc = func_80900344;
this->unk_338 = 0; this->unk_338 = 0;
this->unk_1A2[0] = 100; this->unk_1A2[0] = 100;
@ -1180,7 +1181,7 @@ void func_80900344(BossGanon2* this, PlayState* play) {
} }
if (this->actor.xzDistToPlayer < 200.0f) { if (this->actor.xzDistToPlayer < 200.0f) {
this->unk_338 = 0; this->unk_338 = 0;
Animation_MorphToLoop(&this->skelAnime, &object_ganon2_Anim_00E8EC, -10.0f); Animation_MorphToLoop(&this->skelAnime, &gGanonGuardWalkAnim, -10.0f);
} else { } else {
this->skelAnime.playSpeed = ((this->actor.xzDistToPlayer - 300.0f) * 0.005f) + 1.0f; this->skelAnime.playSpeed = ((this->actor.xzDistToPlayer - 300.0f) * 0.005f) + 1.0f;
if (this->skelAnime.playSpeed > 2.0f) { if (this->skelAnime.playSpeed > 2.0f) {
@ -1195,7 +1196,7 @@ void func_80900344(BossGanon2* this, PlayState* play) {
phi_f0 = 2.0f; phi_f0 = 2.0f;
if (this->actor.xzDistToPlayer >= 200.0f) { if (this->actor.xzDistToPlayer >= 200.0f) {
this->unk_338 = 1; this->unk_338 = 1;
Animation_MorphToLoop(&this->skelAnime, &object_ganon2_Anim_0353C0, -10.0f); Animation_MorphToLoop(&this->skelAnime, &gGanonWalkAnim, -10.0f);
} }
} }
@ -1214,12 +1215,12 @@ void func_80900344(BossGanon2* this, PlayState* play) {
void func_80900580(BossGanon2* this, PlayState* play) { void func_80900580(BossGanon2* this, PlayState* play) {
if (this->unk_311 == 0) { if (this->unk_311 == 0) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon2_Anim_00ADD0, -5.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanonLeftSwordSwingAnim, -5.0f);
this->unk_194 = Animation_GetLastFrame(&object_ganon2_Anim_00ADD0); this->unk_194 = Animation_GetLastFrame(&gGanonLeftSwordSwingAnim);
this->unk_198 = (this->unk_194 - 15.0f) - 5.0f; this->unk_198 = (this->unk_194 - 15.0f) - 5.0f;
} else { } else {
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon2_Anim_00CAF8, -5.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanonRightSwordSwingAnim, -5.0f);
this->unk_194 = Animation_GetLastFrame(&object_ganon2_Anim_00CAF8); this->unk_194 = Animation_GetLastFrame(&gGanonRightSwordSwingAnim);
this->unk_198 = (this->unk_194 - 15.0f) - 5.0f; this->unk_198 = (this->unk_194 - 15.0f) - 5.0f;
} }
@ -1266,8 +1267,8 @@ void func_80900650(BossGanon2* this, PlayState* play) {
} }
void func_80900818(BossGanon2* this, PlayState* play) { void func_80900818(BossGanon2* this, PlayState* play) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon2_Anim_02A848, -5.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanonDownedStartAnim, -5.0f);
this->unk_194 = Animation_GetLastFrame(&object_ganon2_Anim_02A848); this->unk_194 = Animation_GetLastFrame(&gGanonDownedStartAnim);
this->actionFunc = func_80900890; this->actionFunc = func_80900890;
this->unk_1AC = 0; this->unk_1AC = 0;
this->unk_39C = 0; this->unk_39C = 0;
@ -1392,7 +1393,7 @@ void func_80900890(BossGanon2* this, PlayState* play) {
switch (this->unk_1AC) { switch (this->unk_1AC) {
case 0: case 0:
if (Animation_OnFrame(&this->skelAnime, this->unk_194)) { if (Animation_OnFrame(&this->skelAnime, this->unk_194)) {
Animation_MorphToLoop(&this->skelAnime, &object_ganon2_Anim_034278, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanonDownedLoopAnim, 0.0f);
this->unk_1AC = 1; this->unk_1AC = 1;
} }
break; break;
@ -1406,8 +1407,8 @@ void func_80900890(BossGanon2* this, PlayState* play) {
temp_f12 = -200.0f - player->actor.world.pos.z; temp_f12 = -200.0f - player->actor.world.pos.z;
if (sqrtf(SQ(temp_f2) + SQ(temp_f12)) <= 784.0f) { if (sqrtf(SQ(temp_f2) + SQ(temp_f12)) <= 784.0f) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon2_Anim_0334F8, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanonGetUpAnim, 0.0f);
this->unk_194 = Animation_GetLastFrame(&object_ganon2_Anim_0334F8); this->unk_194 = Animation_GetLastFrame(&gGanonGetUpAnim);
this->unk_1AC = 2; this->unk_1AC = 2;
this->unk_1A2[0] = 40; this->unk_1A2[0] = 40;
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MGANON_ROAR); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MGANON_ROAR);
@ -1431,8 +1432,8 @@ void func_80900890(BossGanon2* this, PlayState* play) {
} }
void func_80901020(BossGanon2* this, PlayState* play) { void func_80901020(BossGanon2* this, PlayState* play) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon2_Anim_02A848, -5.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanonDownedStartAnim, -5.0f);
this->unk_194 = Animation_GetLastFrame(&object_ganon2_Anim_02A848); this->unk_194 = Animation_GetLastFrame(&gGanonDownedStartAnim);
this->actionFunc = func_8090120C; this->actionFunc = func_8090120C;
this->unk_1AC = 0; this->unk_1AC = 0;
this->unk_39C = 0; this->unk_39C = 0;
@ -1642,8 +1643,8 @@ void func_8090120C(BossGanon2* this, PlayState* play) {
Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE);
this->unk_39C = 7; this->unk_39C = 7;
this->unk_398 = 0; this->unk_398 = 0;
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon2_Anim_003B1C, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanonFinalBlowAnim, 0.0f);
this->unk_194 = Animation_GetLastFrame(&object_ganon2_Anim_003B1C); this->unk_194 = Animation_GetLastFrame(&gGanonFinalBlowAnim);
play->startPlayerCutscene(play, &this->actor, 0x61); play->startPlayerCutscene(play, &this->actor, 0x61);
} else { } else {
break; break;
@ -1709,8 +1710,8 @@ void func_8090120C(BossGanon2* this, PlayState* play) {
case 75: case 75:
this->unk_339 = 23; this->unk_339 = 23;
if (this->unk_398 == 55) { if (this->unk_398 == 55) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon2_Anim_007288, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanonDeadStartAnim, 0.0f);
this->unk_194 = Animation_GetLastFrame(&object_ganon2_Anim_007288); this->unk_194 = Animation_GetLastFrame(&gGanonDeadStartAnim);
func_8002DF54(play, &this->actor, 0x62); func_8002DF54(play, &this->actor, 0x62);
this->unk_39C = 8; this->unk_39C = 8;
this->unk_398 = 1000; this->unk_398 = 1000;
@ -1734,7 +1735,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) {
play->envCtx.lightBlend = 0.0f; play->envCtx.lightBlend = 0.0f;
} }
if (Animation_OnFrame(&this->skelAnime, this->unk_194)) { if (Animation_OnFrame(&this->skelAnime, this->unk_194)) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon2_Anim_008EB8, 0.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gGanonDeadLoopAnim, 0.0f);
this->unk_398 = 0; this->unk_398 = 0;
this->unk_194 = 1000.0f; this->unk_194 = 1000.0f;
} }
@ -1819,7 +1820,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) {
switch (this->unk_1AC) { switch (this->unk_1AC) {
case 0: case 0:
if (Animation_OnFrame(&this->skelAnime, this->unk_194)) { if (Animation_OnFrame(&this->skelAnime, this->unk_194)) {
Animation_MorphToLoop(&this->skelAnime, &object_ganon2_Anim_034278, 0.0f); Animation_MorphToLoop(&this->skelAnime, &gGanonDownedLoopAnim, 0.0f);
this->unk_1AC = 1; this->unk_1AC = 1;
} }
break; break;
@ -2515,12 +2516,12 @@ s32 BossGanon2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec
OPEN_DISPS(play->state.gfxCtx, "../z_boss_ganon2.c", 5355); OPEN_DISPS(play->state.gfxCtx, "../z_boss_ganon2.c", 5355);
if (limbIndex == 15) { if (limbIndex == GANON_LIMB_NECK) {
rot->y += this->unk_31A; rot->y += this->unk_31A;
rot->z += this->unk_31C; rot->z += this->unk_31C;
} }
if (limbIndex >= 42) { if (limbIndex >= GANON_LIMB_TAIL1) {
rot->x += this->unk_2F4[limbIndex] + this->unk_346; rot->x += this->unk_2F4[limbIndex] + this->unk_346;
rot->y += this->unk_2FE[limbIndex]; rot->y += this->unk_2FE[limbIndex];
@ -2531,7 +2532,8 @@ s32 BossGanon2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec
} }
} }
if ((limbIndex == 7) || (limbIndex == 13) || (limbIndex == 33) || (limbIndex == 34)) { if ((limbIndex == GANON_LIMB_LEFT_SWORD) || (limbIndex == GANON_LIMB_RIGHT_SWORD) ||
(limbIndex == GANON_LIMB_LEFT_HORN) || (limbIndex == GANON_LIMB_RIGHT_HORN)) {
*dList = NULL; *dList = NULL;
} }
@ -2554,17 +2556,17 @@ void BossGanon2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
Matrix_MultVec3f(&D_80906D60, &this->unk_234[D_809070CC[limbIndex]]); Matrix_MultVec3f(&D_80906D60, &this->unk_234[D_809070CC[limbIndex]]);
} }
if (limbIndex == 15) { if (limbIndex == GANON_LIMB_NECK) {
Matrix_MultVec3f(&D_80906D60, &this->unk_1B8); Matrix_MultVec3f(&D_80906D60, &this->unk_1B8);
} else if (limbIndex == 3) { } else if (limbIndex == GANON_LIMB_LEFT_SHOULDER) {
Matrix_MultVec3f(&D_80907108, &this->unk_1F4); Matrix_MultVec3f(&D_80907108, &this->unk_1F4);
} else if (limbIndex == 9) { } else if (limbIndex == GANON_LIMB_RIGHT_SHOULDER) {
Matrix_MultVec3f(&D_80907114, &this->unk_1E8); Matrix_MultVec3f(&D_80907114, &this->unk_1E8);
} else if (limbIndex == 38) { } else if (limbIndex == GANON_LIMB_LEFT_FOOT) {
Matrix_MultVec3f(&D_80906D60, &this->unk_1DC); Matrix_MultVec3f(&D_80906D60, &this->unk_1DC);
} else if (limbIndex == 41) { } else if (limbIndex == GANON_LIMB_RIGHT_FOOT) {
Matrix_MultVec3f(&D_80906D60, &this->unk_1D0); Matrix_MultVec3f(&D_80906D60, &this->unk_1D0);
} else if (limbIndex == 45) { } else if (limbIndex == GANON_LIMB_TAIL4) {
Matrix_MultVec3f(&D_80907138, &this->unk_1C4); Matrix_MultVec3f(&D_80907138, &this->unk_1C4);
} }
@ -2574,14 +2576,14 @@ void BossGanon2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
func_808FD080(temp_v0, &this->unk_424, &sp4C); func_808FD080(temp_v0, &this->unk_424, &sp4C);
} }
if ((limbIndex == 7) || (limbIndex == 13)) { if ((limbIndex == GANON_LIMB_LEFT_SWORD) || (limbIndex == GANON_LIMB_RIGHT_SWORD)) {
Matrix_Push(); Matrix_Push();
Matrix_Scale(this->unk_224, this->unk_224, this->unk_224, MTXMODE_APPLY); Matrix_Scale(this->unk_224, this->unk_224, this->unk_224, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 5522), gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 5522),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, *dList); gSPDisplayList(POLY_OPA_DISP++, *dList);
Matrix_Pop(); Matrix_Pop();
} else if ((limbIndex == 33) || (limbIndex == 34)) { } else if ((limbIndex == GANON_LIMB_LEFT_HORN) || (limbIndex == GANON_LIMB_RIGHT_HORN)) {
Matrix_Push(); Matrix_Push();
Matrix_Scale(this->unk_228, this->unk_228, this->unk_228, MTXMODE_APPLY); Matrix_Scale(this->unk_228, this->unk_228, this->unk_228, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 5533), gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 5533),
@ -2591,12 +2593,12 @@ void BossGanon2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
} }
if (*dList != NULL) { if (*dList != NULL) {
if ((limbIndex == 7) && (this->unk_312 == 1)) { if ((limbIndex == GANON_LIMB_LEFT_SWORD) && (this->unk_312 == 1)) {
Matrix_MultVec3f(&D_809070FC, &this->unk_218); Matrix_MultVec3f(&D_809070FC, &this->unk_218);
func_808FD080(0, &this->unk_444, &this->unk_218); func_808FD080(0, &this->unk_444, &this->unk_218);
Matrix_MultVec3f(&D_80907120, &this->unk_200); Matrix_MultVec3f(&D_80907120, &this->unk_200);
Matrix_MultVec3f(&D_8090712C, &this->unk_20C); Matrix_MultVec3f(&D_8090712C, &this->unk_20C);
} else if ((limbIndex == 13) && (this->unk_312 == 2)) { } else if ((limbIndex == GANON_LIMB_RIGHT_SWORD) && (this->unk_312 == 2)) {
Matrix_MultVec3f(&D_809070FC, &this->unk_218); Matrix_MultVec3f(&D_809070FC, &this->unk_218);
func_808FD080(1, &this->unk_444, &this->unk_218); func_808FD080(1, &this->unk_444, &this->unk_218);
Matrix_MultVec3f(&D_80907120, &this->unk_200); Matrix_MultVec3f(&D_80907120, &this->unk_200);
@ -2709,15 +2711,15 @@ void BossGanon2_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s
if (temp_v1 >= 0) { if (temp_v1 >= 0) {
Matrix_MultVec3f(&D_80906D60, &this->unk_234[temp_v1]); Matrix_MultVec3f(&D_80906D60, &this->unk_234[temp_v1]);
} }
if (limbIndex == 11) { if (limbIndex == GANONDORF_LIMB_JEWEL) {
OPEN_DISPS(play->state.gfxCtx, "../z_boss_ganon2.c", 5749); OPEN_DISPS(play->state.gfxCtx, "../z_boss_ganon2.c", 5749);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 5752), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 5752),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_ganon_DL_00BE90)); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gGanondorfEyesDL));
CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon2.c", 5754); CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon2.c", 5754);
} else if (limbIndex == 10) { } else if (limbIndex == GANONDORF_LIMB_RIGHT_HAND) {
Matrix_MultVec3f(&D_80907164, &this->unk_1B8); Matrix_MultVec3f(&D_80907164, &this->unk_1B8);
} }
} }
@ -2762,8 +2764,8 @@ void BossGanon2_Draw(Actor* thisx, PlayState* play) {
switch (this->unk_337) { switch (this->unk_337) {
case 0: case 0:
BossGanon2_SetObjectSegment(this, play, OBJECT_GANON, true); BossGanon2_SetObjectSegment(this, play, OBJECT_GANON, true);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(object_ganon_Tex_00A8E0)); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gGanondorfEmptyEyeTex));
gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(object_ganon_Tex_00A8E0)); gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gGanondorfEmptyEyeTex));
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, NULL, BossGanon2_PostLimbDraw2, this); this->skelAnime.dListCount, NULL, BossGanon2_PostLimbDraw2, this);
break; break;

View file

@ -8,6 +8,57 @@ struct BossGanon2;
typedef void (*BossGanon2ActionFunc)(struct BossGanon2*, PlayState*); typedef void (*BossGanon2ActionFunc)(struct BossGanon2*, PlayState*);
typedef enum {
/* 0 */ GANON_LIMB_NONE,
/* 1 */ GANON_LIMB_ROOT,
/* 2 */ GANON_LIMB_TORSO,
/* 3 */ GANON_LIMB_LEFT_SHOULDER,
/* 4 */ GANON_LIMB_LEFT_UPPER_ARM,
/* 5 */ GANON_LIMB_LEFT_FOREARM,
/* 6 */ GANON_LIMB_LEFT_WRIST,
/* 7 */ GANON_LIMB_LEFT_SWORD,
/* 8 */ GANON_LIMB_LEFT_HAND,
/* 9 */ GANON_LIMB_RIGHT_SHOULDER,
/* 10 */ GANON_LIMB_RIGHT_UPPER_ARM,
/* 11 */ GANON_LIMB_RIGHT_FOREARM,
/* 12 */ GANON_LIMB_RIGHT_WRIST,
/* 13 */ GANON_LIMB_RIGHT_SWORD,
/* 14 */ GANON_LIMB_RIGHT_HAND,
/* 15 */ GANON_LIMB_NECK,
/* 16 */ GANON_LIMB_JEWEL,
/* 17 */ GANON_LIMB_SNOUT,
/* 18 */ GANON_LIMB_OUTER_TEETH,
/* 19 */ GANON_LIMB_MOUTH,
/* 20 */ GANON_LIMB_INNER_TEETH,
/* 21 */ GANON_LIMB_JAW,
/* 22 */ GANON_LIMB_MIDDLE_HAIR_1,
/* 23 */ GANON_LIMB_MIDDLE_HAIR_2,
/* 24 */ GANON_LIMB_MIDDLE_HAIR_3,
/* 25 */ GANON_LIMB_LEFT_HAIR_1,
/* 26 */ GANON_LIMB_LEFT_HAIR_2,
/* 27 */ GANON_LIMB_LEFT_HAIR_3,
/* 28 */ GANON_LIMB_RIGHT_HAIR_1,
/* 29 */ GANON_LIMB_RIGHT_HAIR_2,
/* 30 */ GANON_LIMB_RIGHT_HAIR_3,
/* 31 */ GANON_LIMB_EYES,
/* 32 */ GANON_LIMB_HEAD,
/* 33 */ GANON_LIMB_LEFT_HORN,
/* 34 */ GANON_LIMB_RIGHT_HORN,
/* 35 */ GANON_LIMB_PELVIS,
/* 36 */ GANON_LIMB_LEFT_THIGH,
/* 37 */ GANON_LIMB_LEFT_SHIN,
/* 38 */ GANON_LIMB_LEFT_FOOT,
/* 39 */ GANON_LIMB_RIGHT_THIGH,
/* 40 */ GANON_LIMB_RIGHT_SHIN,
/* 41 */ GANON_LIMB_RIGHT_FOOT,
/* 42 */ GANON_LIMB_TAIL1,
/* 43 */ GANON_LIMB_TAIL2,
/* 44 */ GANON_LIMB_TAIL3,
/* 45 */ GANON_LIMB_TAIL4,
/* 46 */ GANON_LIMB_TAIL5,
/* 47 */ GANON_LIMB_MAX
} GanonLimb;
typedef struct BossGanon2 { typedef struct BossGanon2 {
/* 0x0000 */ Actor actor; /* 0x0000 */ Actor actor;
/* 0x014C */ SkelAnime skelAnime; /* 0x014C */ SkelAnime skelAnime;

View file

@ -309,9 +309,9 @@ static s8 D_80907144[] = {
static Vec3f D_80907164 = { 800.0f, 420.0f, 100.0f }; static Vec3f D_80907164 = { 800.0f, 420.0f, 100.0f };
static void* sEyeTextures[] = { static void* sEyeTextures[] = {
object_ganon2_Tex_01E188, gGanonEyeOpenTex,
object_ganon2_Tex_01E988, gGanonEyeHalfTex,
object_ganon2_Tex_01EA08, gGanonEyeClosedTex,
}; };
static Vec3f D_8090717C = { 0.0f, -2000.0f, 0.0f }; static Vec3f D_8090717C = { 0.0f, -2000.0f, 0.0f };

View file

@ -3291,19 +3291,11 @@ void BossVa_UpdateEffects(PlayState* play) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
s16 spB6; s16 spB6;
s16 i; s16 i;
f32 floorY; f32 spB0;
s32 padAC; f32 spAC;
s16 pitch; s16 pitch;
s16 yaw;
BossVa* refActor2; BossVa* refActor2;
BossVa* refActor; BossVa* refActor;
Vec3f sp94;
CollisionPoly* sp90;
f32 pad8C;
Vec3f sp80;
CollisionPoly* sp7C;
f32 pad78;
f32 pad74;
for (i = 0; i < BOSS_VA_EFFECT_COUNT; i++, effect++) { for (i = 0; i < BOSS_VA_EFFECT_COUNT; i++, effect++) {
if (effect->type != VA_NONE) { if (effect->type != VA_NONE) {
@ -3325,12 +3317,12 @@ void BossVa_UpdateEffects(PlayState* play) {
if ((effect->mode == SPARK_TETHER) || (effect->mode == SPARK_UNUSED)) { if ((effect->mode == SPARK_TETHER) || (effect->mode == SPARK_UNUSED)) {
pitch = effect->rot.x - Math_Vec3f_Pitch(&refActor->actor.world.pos, &GET_BODY(refActor)->unk_1D8); pitch = effect->rot.x - Math_Vec3f_Pitch(&refActor->actor.world.pos, &GET_BODY(refActor)->unk_1D8);
pad8C = Math_SinS(refActor->actor.world.rot.y); spAC = Math_SinS(refActor->actor.world.rot.y);
effect->pos.x = refActor->actor.world.pos.x - (effect->offset.x * pad8C); effect->pos.x = refActor->actor.world.pos.x - (effect->offset.x * spAC);
pad74 = Math_CosS(refActor->actor.world.rot.y); spB0 = Math_CosS(refActor->actor.world.rot.y);
effect->pos.z = refActor->actor.world.pos.z - (effect->offset.x * pad74); effect->pos.z = refActor->actor.world.pos.z - (effect->offset.x * spB0);
pad78 = Math_CosS(-pitch); spB0 = Math_CosS(-pitch);
effect->pos.y = (effect->offset.y * pad78) + refActor->actor.world.pos.y; effect->pos.y = (effect->offset.y * spB0) + refActor->actor.world.pos.y;
} else if ((effect->mode == SPARK_BARI) || (effect->mode == SPARK_BODY)) { } else if ((effect->mode == SPARK_BARI) || (effect->mode == SPARK_BODY)) {
effect->pos.x = effect->offset.x + refActor->actor.world.pos.x; effect->pos.x = effect->offset.x + refActor->actor.world.pos.x;
effect->pos.y = effect->offset.y + refActor->actor.world.pos.y; effect->pos.y = effect->offset.y + refActor->actor.world.pos.y;
@ -3396,10 +3388,14 @@ void BossVa_UpdateEffects(PlayState* play) {
if (effect->type == VA_BLOOD) { if (effect->type == VA_BLOOD) {
if (effect->mode < BLOOD_SPOT) { if (effect->mode < BLOOD_SPOT) {
sp94 = effect->pos; Vec3f checkPos;
sp94.y -= effect->velocity.y + 4.0f; CollisionPoly* groundPoly;
floorY = BgCheck_EntityRaycastFloor1(&play->colCtx, &sp90, &sp94); f32 floorY;
if ((sp90 != NULL) && (effect->pos.y <= floorY)) {
checkPos = effect->pos;
checkPos.y -= effect->velocity.y + 4.0f;
floorY = BgCheck_EntityRaycastDown1(&play->colCtx, &groundPoly, &checkPos);
if ((groundPoly != NULL) && (effect->pos.y <= floorY)) {
effect->mode = BLOOD_SPOT; effect->mode = BLOOD_SPOT;
effect->pos.y = floorY + 1.0f; effect->pos.y = floorY + 1.0f;
if (sCsState <= DEATH_SHELL_BURST) { if (sCsState <= DEATH_SHELL_BURST) {
@ -3429,11 +3425,15 @@ void BossVa_UpdateEffects(PlayState* play) {
if (effect->type == VA_GORE) { if (effect->type == VA_GORE) {
if (effect->mode == GORE_PERMANENT) { if (effect->mode == GORE_PERMANENT) {
sp80 = effect->pos; Vec3f checkPos;
sp80.y -= effect->velocity.y + 4.0f; CollisionPoly* groundPoly;
f32 floorY;
checkPos = effect->pos;
checkPos.y -= effect->velocity.y + 4.0f;
effect->rot.x += 0x1770; effect->rot.x += 0x1770;
floorY = BgCheck_EntityRaycastFloor1(&play->colCtx, &sp7C, &sp80); floorY = BgCheck_EntityRaycastDown1(&play->colCtx, &groundPoly, &checkPos);
if ((sp7C != NULL) && (effect->pos.y <= floorY)) { if ((groundPoly != NULL) && (effect->pos.y <= floorY)) {
effect->mode = GORE_FLOOR; effect->mode = GORE_FLOOR;
effect->timer = 30; effect->timer = 30;
effect->pos.y = floorY + 1.0f; effect->pos.y = floorY + 1.0f;
@ -3462,6 +3462,8 @@ void BossVa_UpdateEffects(PlayState* play) {
} }
if (effect->type == VA_TUMOR) { if (effect->type == VA_TUMOR) {
s16 yaw;
refActor = effect->parent; refActor = effect->parent;
effect->rot.z += 0x157C; effect->rot.z += 0x157C;

View file

@ -79,11 +79,11 @@ void EnBox_ClipToGround(EnBox* this, PlayState* play) {
f32 newY; f32 newY;
CollisionPoly* poly; CollisionPoly* poly;
s32 bgId; s32 bgId;
Vec3f pos; Vec3f checkPos;
pos = this->dyna.actor.world.pos; checkPos = this->dyna.actor.world.pos;
pos.y += 1.0f; checkPos.y += 1.0f;
newY = BgCheck_EntityRaycastFloor4(&play->colCtx, &poly, &bgId, &this->dyna.actor, &pos); newY = BgCheck_EntityRaycastDown4(&play->colCtx, &poly, &bgId, &this->dyna.actor, &checkPos);
if (newY != BGCHECK_Y_MIN) { if (newY != BGCHECK_Y_MIN) {
this->dyna.actor.world.pos.y = newY; this->dyna.actor.world.pos.y = newY;
} }

View file

@ -402,8 +402,8 @@ void EnEiyer_Ambush(EnEiyer* this, PlayState* play) {
this->collider.base.acFlags |= AC_ON; this->collider.base.acFlags |= AC_ON;
EnEiyer_SetupGlide(this); EnEiyer_SetupGlide(this);
} else { } else {
this->actor.floorHeight = BgCheck_EntityRaycastFloor4(&play->colCtx, &this->actor.floorPoly, &bgId, this->actor.floorHeight = BgCheck_EntityRaycastDown4(&play->colCtx, &this->actor.floorPoly, &bgId, &this->actor,
&this->actor, &this->actor.world.pos); &this->actor.world.pos);
} }
} }

View file

@ -1209,9 +1209,9 @@ void func_80A04D90(EnElf* this, PlayState* play) {
s32 pad; s32 pad;
s32 bgId; s32 bgId;
this->actor.floorHeight = BgCheck_EntityRaycastFloor5(play, &play->colCtx, &this->actor.floorPoly, &bgId, this->actor.floorHeight = BgCheck_EntityRaycastDown5(play, &play->colCtx, &this->actor.floorPoly, &bgId,
&this->actor, &this->actor.world.pos); &this->actor, &this->actor.world.pos);
this->actor.shape.shadowAlpha = 0x32; this->actor.shape.shadowAlpha = 50;
} }
// move to talk to player // move to talk to player

View file

@ -131,7 +131,7 @@ void EnEncount1_SpawnLeevers(EnEncount1* this, PlayState* play) {
spawnPos.y = player->actor.floorHeight + 120.0f; spawnPos.y = player->actor.floorHeight + 120.0f;
spawnPos.z = player->actor.world.pos.z + Math_CosS(spawnAngle) * spawnDist; spawnPos.z = player->actor.world.pos.z + Math_CosS(spawnAngle) * spawnDist;
floorY = BgCheck_EntityRaycastFloor4(&play->colCtx, &floorPoly, &bgId, &this->actor, &spawnPos); floorY = BgCheck_EntityRaycastDown4(&play->colCtx, &floorPoly, &bgId, &this->actor, &spawnPos);
if (floorY <= BGCHECK_Y_MIN) { if (floorY <= BGCHECK_Y_MIN) {
break; break;
} }
@ -192,7 +192,7 @@ void EnEncount1_SpawnTektites(EnEncount1* this, PlayState* play) {
spawnPos.x = this->actor.world.pos.x + Rand_CenteredFloat(50.0f); spawnPos.x = this->actor.world.pos.x + Rand_CenteredFloat(50.0f);
spawnPos.y = this->actor.world.pos.y + 120.0f; spawnPos.y = this->actor.world.pos.y + 120.0f;
spawnPos.z = this->actor.world.pos.z + Rand_CenteredFloat(50.0f); spawnPos.z = this->actor.world.pos.z + Rand_CenteredFloat(50.0f);
floorY = BgCheck_EntityRaycastFloor4(&play->colCtx, &floorPoly, &bgId, &this->actor, &spawnPos); floorY = BgCheck_EntityRaycastDown4(&play->colCtx, &floorPoly, &bgId, &this->actor, &spawnPos);
if (floorY <= BGCHECK_Y_MIN) { if (floorY <= BGCHECK_Y_MIN) {
return; return;
} }
@ -266,7 +266,7 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, PlayState* play) {
spawnPos.y = player->actor.floorHeight + 120.0f; spawnPos.y = player->actor.floorHeight + 120.0f;
spawnPos.z = spawnPos.z =
player->actor.world.pos.z + (Math_CosS(spawnAngle) * spawnDist) + Rand_CenteredFloat(40.0f); player->actor.world.pos.z + (Math_CosS(spawnAngle) * spawnDist) + Rand_CenteredFloat(40.0f);
floorY = BgCheck_EntityRaycastFloor4(&play->colCtx, &floorPoly, &bgId, &this->actor, &spawnPos); floorY = BgCheck_EntityRaycastDown4(&play->colCtx, &floorPoly, &bgId, &this->actor, &spawnPos);
if (floorY <= BGCHECK_Y_MIN) { if (floorY <= BGCHECK_Y_MIN) {
break; break;
} }

View file

@ -669,7 +669,7 @@ void EnFish_UpdateCutscene(EnFish* this, PlayState* play) {
this->actor.world.pos.z = (endPos.z - startPos.z) * progress + startPos.z; this->actor.world.pos.z = (endPos.z - startPos.z) * progress + startPos.z;
this->actor.floorHeight = this->actor.floorHeight =
BgCheck_EntityRaycastFloor4(&play->colCtx, &this->actor.floorPoly, &bgId, &this->actor, &this->actor.world.pos); BgCheck_EntityRaycastDown4(&play->colCtx, &this->actor.floorPoly, &bgId, &this->actor, &this->actor.world.pos);
} }
// Update functions and Draw // Update functions and Draw

View file

@ -360,7 +360,7 @@ s32 EnGoroiwa_MoveDownToNextWaypoint(EnGoroiwa* this, PlayState* play) {
f32 yDistToFloor; f32 yDistToFloor;
s32 quakeIdx; s32 quakeIdx;
CollisionPoly* floorPoly; CollisionPoly* floorPoly;
Vec3f raycastFrom; Vec3f checkPos;
f32 floorY; f32 floorY;
s32 pad2; s32 pad2;
s32 floorBgId; s32 floorBgId;
@ -386,11 +386,11 @@ s32 EnGoroiwa_MoveDownToNextWaypoint(EnGoroiwa* this, PlayState* play) {
} }
this->rollRotSpeed = 0.0f; this->rollRotSpeed = 0.0f;
if (!(this->stateFlags & ENGOROIWA_IN_WATER)) { if (!(this->stateFlags & ENGOROIWA_IN_WATER)) {
raycastFrom.x = this->actor.world.pos.x; checkPos.x = this->actor.world.pos.x;
raycastFrom.y = this->actor.world.pos.y + 50.0f; checkPos.y = this->actor.world.pos.y + 50.0f;
raycastFrom.z = this->actor.world.pos.z; checkPos.z = this->actor.world.pos.z;
floorY = BgCheck_EntityRaycastFloor5(play, &play->colCtx, &floorPoly, &floorBgId, &this->actor, floorY =
&raycastFrom); BgCheck_EntityRaycastDown5(play, &play->colCtx, &floorPoly, &floorBgId, &this->actor, &checkPos);
yDistToFloor = floorY - (this->actor.world.pos.y - 59.5f); yDistToFloor = floorY - (this->actor.world.pos.y - 59.5f);
if (fabsf(yDistToFloor) < 15.0f) { if (fabsf(yDistToFloor) < 15.0f) {
dustPos.x = this->actor.world.pos.x; dustPos.x = this->actor.world.pos.x;
@ -723,7 +723,7 @@ void EnGoroiwa_Update(Actor* thisx, PlayState* play) {
EnGoroiwa* this = (EnGoroiwa*)thisx; EnGoroiwa* this = (EnGoroiwa*)thisx;
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
s32 pad; s32 pad;
s32 sp30; s32 bgId;
if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28 | PLAYER_STATE1_29))) { if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
if (this->collisionDisabledTimer > 0) { if (this->collisionDisabledTimer > 0) {
@ -736,8 +736,8 @@ void EnGoroiwa_Update(Actor* thisx, PlayState* play) {
UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 | UPDBGCHECKINFO_FLAG_4); UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 | UPDBGCHECKINFO_FLAG_4);
break; break;
case 0: case 0:
this->actor.floorHeight = BgCheck_EntityRaycastFloor4(&play->colCtx, &this->actor.floorPoly, &sp30, this->actor.floorHeight = BgCheck_EntityRaycastDown4(&play->colCtx, &this->actor.floorPoly, &bgId,
&this->actor, &this->actor.world.pos); &this->actor, &this->actor.world.pos);
break; break;
} }
EnGoroiwa_UpdateRotation(this, play); EnGoroiwa_UpdateRotation(this, play);

View file

@ -2841,7 +2841,7 @@ s32 EnHorse_CalcFloorHeight(EnHorse* this, PlayState* play, Vec3f* pos, Collisio
WaterBox* waterBox; WaterBox* waterBox;
*floorPoly = NULL; *floorPoly = NULL;
*floorHeight = BgCheck_EntityRaycastFloor3(&play->colCtx, floorPoly, &bgId, pos); *floorHeight = BgCheck_EntityRaycastDown3(&play->colCtx, floorPoly, &bgId, pos);
if (*floorHeight == BGCHECK_Y_MIN) { if (*floorHeight == BGCHECK_Y_MIN) {
return 1; // No floor return 1; // No floor
@ -2852,7 +2852,7 @@ s32 EnHorse_CalcFloorHeight(EnHorse* this, PlayState* play, Vec3f* pos, Collisio
return 2; // Water return 2; // Water
} }
if ((*floorPoly)->normal.y * COLPOLY_NORMAL_FRAC < 0.81915206f || // cos(35 degrees) if (COLPOLY_GET_NORMAL((*floorPoly)->normal.y) < 0.81915206f || // cos(35 degrees)
SurfaceType_IsHorseBlocked(&play->colCtx, *floorPoly, bgId) || SurfaceType_IsHorseBlocked(&play->colCtx, *floorPoly, bgId) ||
SurfaceType_GetFloorType(&play->colCtx, *floorPoly, bgId) == FLOOR_TYPE_7) { SurfaceType_GetFloorType(&play->colCtx, *floorPoly, bgId) == FLOOR_TYPE_7) {
return 3; // Horse blocked surface return 3; // Horse blocked surface
@ -2957,9 +2957,9 @@ void EnHorse_CheckFloors(EnHorse* this, PlayState* play) {
floorSlope = RAD_TO_BINANG(Math_FAtan2F(this->yBack - this->yFront, 60.0f)); floorSlope = RAD_TO_BINANG(Math_FAtan2F(this->yBack - this->yFront, 60.0f));
if (this->actor.floorPoly != 0) { if (this->actor.floorPoly != 0) {
nx = this->actor.floorPoly->normal.x * COLPOLY_NORMAL_FRAC; nx = COLPOLY_GET_NORMAL(this->actor.floorPoly->normal.x);
ny = this->actor.floorPoly->normal.y * COLPOLY_NORMAL_FRAC; ny = COLPOLY_GET_NORMAL(this->actor.floorPoly->normal.y);
nz = this->actor.floorPoly->normal.z * COLPOLY_NORMAL_FRAC; nz = COLPOLY_GET_NORMAL(this->actor.floorPoly->normal.z);
pos = frontPos; pos = frontPos;
pos.y = this->yFront; pos.y = this->yFront;
dist = Math3D_DistPlaneToPos(nx, ny, nz, this->actor.floorPoly->dist, &pos); dist = Math3D_DistPlaneToPos(nx, ny, nz, this->actor.floorPoly->dist, &pos);
@ -3225,7 +3225,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) {
obstaclePos.y = this->actor.world.pos.y + 120.0f; obstaclePos.y = this->actor.world.pos.y + 120.0f;
obstaclePos.z += intersectDist * Math_CosS(this->actor.world.rot.y); obstaclePos.z += intersectDist * Math_CosS(this->actor.world.rot.y);
obstacleTop = obstaclePos; obstacleTop = obstaclePos;
obstacleTop.y = BgCheck_EntityRaycastFloor3(&play->colCtx, &obstacleFloor, &bgId, &obstaclePos); obstacleTop.y = BgCheck_EntityRaycastDown3(&play->colCtx, &obstacleFloor, &bgId, &obstaclePos);
if (obstacleTop.y == BGCHECK_Y_MIN) { if (obstacleTop.y == BGCHECK_Y_MIN) {
return; return;
} }
@ -3234,13 +3234,12 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) {
return; return;
} }
if (Math3D_DistPlaneToPos(this->actor.floorPoly->normal.x * COLPOLY_NORMAL_FRAC, if (Math3D_DistPlaneToPos(
this->actor.floorPoly->normal.y * COLPOLY_NORMAL_FRAC, COLPOLY_GET_NORMAL(this->actor.floorPoly->normal.x), COLPOLY_GET_NORMAL(this->actor.floorPoly->normal.y),
this->actor.floorPoly->normal.z * COLPOLY_NORMAL_FRAC, this->actor.floorPoly->dist, COLPOLY_GET_NORMAL(this->actor.floorPoly->normal.z), this->actor.floorPoly->dist, &obstacleTop) < -40.0f &&
&obstacleTop) < -40.0f && Math3D_DistPlaneToPos(COLPOLY_GET_NORMAL(obstacleFloor->normal.x), COLPOLY_GET_NORMAL(obstacleFloor->normal.y),
Math3D_DistPlaneToPos( COLPOLY_GET_NORMAL(obstacleFloor->normal.z), obstacleFloor->dist,
obstacleFloor->normal.x * COLPOLY_NORMAL_FRAC, obstacleFloor->normal.y * COLPOLY_NORMAL_FRAC, &this->actor.world.pos) > 40.0f) {
obstacleFloor->normal.z * COLPOLY_NORMAL_FRAC, obstacleFloor->dist, &this->actor.world.pos) > 40.0f) {
if (movingFast == true && this->action != ENHORSE_ACT_STOPPING) { if (movingFast == true && this->action != ENHORSE_ACT_STOPPING) {
this->stateFlags |= ENHORSE_FORCE_REVERSING; this->stateFlags |= ENHORSE_FORCE_REVERSING;
EnHorse_StartBraking(this, play); EnHorse_StartBraking(this, play);
@ -3249,7 +3248,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) {
return; return;
} }
ny = obstacleFloor->normal.y * COLPOLY_NORMAL_FRAC; ny = COLPOLY_GET_NORMAL(obstacleFloor->normal.y);
if (ny < 0.81915206f || // cos(35 degrees) if (ny < 0.81915206f || // cos(35 degrees)
(SurfaceType_IsHorseBlocked(&play->colCtx, obstacleFloor, bgId) != 0) || (SurfaceType_IsHorseBlocked(&play->colCtx, obstacleFloor, bgId) != 0) ||
(SurfaceType_GetFloorType(&play->colCtx, obstacleFloor, bgId) == FLOOR_TYPE_7)) { (SurfaceType_GetFloorType(&play->colCtx, obstacleFloor, bgId) == FLOOR_TYPE_7)) {
@ -3275,7 +3274,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) {
} }
obstacleTop = obstaclePos; obstacleTop = obstaclePos;
obstacleTop.y = BgCheck_EntityRaycastFloor3(&play->colCtx, &obstacleFloor, &bgId, &obstaclePos); obstacleTop.y = BgCheck_EntityRaycastDown3(&play->colCtx, &obstacleFloor, &bgId, &obstaclePos);
if (obstacleTop.y == BGCHECK_Y_MIN) { if (obstacleTop.y == BGCHECK_Y_MIN) {
return; return;
} }
@ -3286,7 +3285,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) {
return; return;
} }
ny = obstacleFloor->normal.y * COLPOLY_NORMAL_FRAC; ny = COLPOLY_GET_NORMAL(obstacleFloor->normal.y);
if (ny < 0.81915206f || // cos(35 degrees) if (ny < 0.81915206f || // cos(35 degrees)
SurfaceType_IsHorseBlocked(&play->colCtx, obstacleFloor, bgId) || SurfaceType_IsHorseBlocked(&play->colCtx, obstacleFloor, bgId) ||
SurfaceType_GetFloorType(&play->colCtx, obstacleFloor, bgId) == FLOOR_TYPE_7) { SurfaceType_GetFloorType(&play->colCtx, obstacleFloor, bgId) == FLOOR_TYPE_7) {

View file

@ -270,19 +270,16 @@ void func_80A68DB0(EnHorseGanon* this, PlayState* play) {
void func_80A68E14(EnHorseGanon* this, PlayState* play) { void func_80A68E14(EnHorseGanon* this, PlayState* play) {
s32 pad; s32 pad;
CollisionPoly* col; CollisionPoly* poly;
f32 temp_ret; s32 pad2;
Vec3f v; Vec3f checkPos;
s32 temp1; s32 bgId;
v.x = Math_SinS(this->actor.shape.rot.y) * 30.0f + this->actor.world.pos.x; checkPos.x = Math_SinS(this->actor.shape.rot.y) * 30.0f + this->actor.world.pos.x;
v.y = this->actor.world.pos.y + 60.0f; checkPos.y = this->actor.world.pos.y + 60.0f;
v.z = Math_CosS(this->actor.shape.rot.y) * 30.0f + this->actor.world.pos.z; checkPos.z = Math_CosS(this->actor.shape.rot.y) * 30.0f + this->actor.world.pos.z;
this->unk_1F4 = BgCheck_EntityRaycastDown3(&play->colCtx, &poly, &bgId, &checkPos);
temp_ret = BgCheck_EntityRaycastFloor3(&play->colCtx, &col, &temp1, &v); this->actor.shape.rot.x = RAD_TO_BINANG(Math_FAtan2F(this->actor.world.pos.y - this->unk_1F4, 30.0f));
this->unk_1F4 = temp_ret;
this->actor.shape.rot.x = RAD_TO_BINANG(Math_FAtan2F(this->actor.world.pos.y - temp_ret, 30.0f));
} }
void EnHorseGanon_Update(Actor* thisx, PlayState* play) { void EnHorseGanon_Update(Actor* thisx, PlayState* play) {

View file

@ -557,15 +557,15 @@ void EnHorseNormal_WaitClone(EnHorseNormal* this, PlayState* play) {
void func_80A6C8E0(EnHorseNormal* this, PlayState* play) { void func_80A6C8E0(EnHorseNormal* this, PlayState* play) {
s32 pad; s32 pad;
CollisionPoly* sp38; CollisionPoly* groundPoly;
s32 pad2; s32 pad2;
Vec3f sp28; Vec3f checkPos;
s32 sp24; s32 bgId;
sp28.x = (Math_SinS(this->actor.shape.rot.y) * 30.0f) + this->actor.world.pos.x; checkPos.x = (Math_SinS(this->actor.shape.rot.y) * 30.0f) + this->actor.world.pos.x;
sp28.y = this->actor.world.pos.y + 60.0f; checkPos.y = this->actor.world.pos.y + 60.0f;
sp28.z = (Math_CosS(this->actor.shape.rot.y) * 30.0f) + this->actor.world.pos.z; checkPos.z = (Math_CosS(this->actor.shape.rot.y) * 30.0f) + this->actor.world.pos.z;
this->unk_220 = BgCheck_EntityRaycastFloor3(&play->colCtx, &sp38, &sp24, &sp28); this->unk_220 = BgCheck_EntityRaycastDown3(&play->colCtx, &groundPoly, &bgId, &checkPos);
this->actor.shape.rot.x = RAD_TO_BINANG(Math_FAtan2F(this->actor.world.pos.y - this->unk_220, 30.0f)); this->actor.shape.rot.x = RAD_TO_BINANG(Math_FAtan2F(this->actor.world.pos.y - this->unk_220, 30.0f));
} }

View file

@ -217,13 +217,13 @@ void func_80A6DE38(EnHorseZelda* this, PlayState* play) {
s32 pad; s32 pad;
CollisionPoly* poly; CollisionPoly* poly;
s32 pad2; s32 pad2;
Vec3f pos; Vec3f checkPos;
s32 bgId; s32 bgId;
pos.x = (Math_SinS(this->actor.shape.rot.y) * 30.0f) + this->actor.world.pos.x; checkPos.x = (Math_SinS(this->actor.shape.rot.y) * 30.0f) + this->actor.world.pos.x;
pos.y = this->actor.world.pos.y + 60.0f; checkPos.y = this->actor.world.pos.y + 60.0f;
pos.z = (Math_CosS(this->actor.shape.rot.y) * 30.0f) + this->actor.world.pos.z; checkPos.z = (Math_CosS(this->actor.shape.rot.y) * 30.0f) + this->actor.world.pos.z;
this->unk_1F4 = BgCheck_EntityRaycastFloor3(&play->colCtx, &poly, &bgId, &pos); this->unk_1F4 = BgCheck_EntityRaycastDown3(&play->colCtx, &poly, &bgId, &checkPos);
this->actor.shape.rot.x = RAD_TO_BINANG(Math_FAtan2F(this->actor.world.pos.y - this->unk_1F4, 30.0f)); this->actor.shape.rot.x = RAD_TO_BINANG(Math_FAtan2F(this->actor.world.pos.y - this->unk_1F4, 30.0f));
} }

View file

@ -112,14 +112,14 @@ void EnIshi_InitCollider(Actor* thisx, PlayState* play) {
s32 EnIshi_SnapToFloor(EnIshi* this, PlayState* play, f32 arg2) { s32 EnIshi_SnapToFloor(EnIshi* this, PlayState* play, f32 arg2) {
CollisionPoly* poly; CollisionPoly* poly;
Vec3f pos; Vec3f checkPos;
s32 bgId; s32 bgId;
f32 floorY; f32 floorY;
pos.x = this->actor.world.pos.x; checkPos.x = this->actor.world.pos.x;
pos.y = this->actor.world.pos.y + 30.0f; checkPos.y = this->actor.world.pos.y + 30.0f;
pos.z = this->actor.world.pos.z; checkPos.z = this->actor.world.pos.z;
floorY = BgCheck_EntityRaycastFloor4(&play->colCtx, &poly, &bgId, &this->actor, &pos); floorY = BgCheck_EntityRaycastDown4(&play->colCtx, &poly, &bgId, &this->actor, &checkPos);
if (floorY > BGCHECK_Y_MIN) { if (floorY > BGCHECK_Y_MIN) {
this->actor.world.pos.y = floorY + arg2; this->actor.world.pos.y = floorY + arg2;
Math_Vec3f_Copy(&this->actor.home.pos, &this->actor.world.pos); Math_Vec3f_Copy(&this->actor.home.pos, &this->actor.world.pos);

View file

@ -99,7 +99,7 @@ void EnKusa_SetupAction(EnKusa* this, EnKusaActionFunc actionFunc) {
s32 EnKusa_SnapToFloor(EnKusa* this, PlayState* play, f32 yOffset) { s32 EnKusa_SnapToFloor(EnKusa* this, PlayState* play, f32 yOffset) {
s32 pad; s32 pad;
CollisionPoly* poly; CollisionPoly* groundPoly;
Vec3f pos; Vec3f pos;
s32 bgId; s32 bgId;
f32 floorY; f32 floorY;
@ -108,7 +108,7 @@ s32 EnKusa_SnapToFloor(EnKusa* this, PlayState* play, f32 yOffset) {
pos.y = this->actor.world.pos.y + 30.0f; pos.y = this->actor.world.pos.y + 30.0f;
pos.z = this->actor.world.pos.z; pos.z = this->actor.world.pos.z;
floorY = BgCheck_EntityRaycastFloor4(&play->colCtx, &poly, &bgId, &this->actor, &pos); floorY = BgCheck_EntityRaycastDown4(&play->colCtx, &groundPoly, &bgId, &this->actor, &pos);
if (floorY > BGCHECK_Y_MIN) { if (floorY > BGCHECK_Y_MIN) {
this->actor.world.pos.y = floorY + yOffset; this->actor.world.pos.y = floorY + yOffset;

View file

@ -74,7 +74,7 @@ void EnNwc_ChickNoop(EnNwcChick* chick, EnNwc* this, PlayState* play) {
} }
void EnNwc_ChickBgCheck(EnNwcChick* chick, PlayState* play) { void EnNwc_ChickBgCheck(EnNwcChick* chick, PlayState* play) {
CollisionPoly* outPoly; CollisionPoly* groundPoly;
s32 bgId; s32 bgId;
Vec3f outPos; Vec3f outPos;
f32 dy; f32 dy;
@ -90,7 +90,7 @@ void EnNwc_ChickBgCheck(EnNwcChick* chick, PlayState* play) {
//! @bug The use of outPos here is totally wrong. Even if it didn't get overwritten //! @bug The use of outPos here is totally wrong. Even if it didn't get overwritten
// by the wall check, it should add an offset to the y-value so the raycast // by the wall check, it should add an offset to the y-value so the raycast
// doesn't go through the floor and cause the chicks to ignore all floors. // doesn't go through the floor and cause the chicks to ignore all floors.
chick->floorY = BgCheck_EntityRaycastFloor3(&play->colCtx, &outPoly, &bgId, &outPos); chick->floorY = BgCheck_EntityRaycastDown3(&play->colCtx, &groundPoly, &bgId, &outPos);
dy = chick->floorY - chick->pos.y; dy = chick->floorY - chick->pos.y;
if ((0.0f <= dy) && (dy < 40.0f)) { if ((0.0f <= dy) && (dy < 40.0f)) {
chick->pos.y = chick->floorY; chick->pos.y = chick->floorY;

View file

@ -133,7 +133,7 @@ void EnOkuta_Init(Actor* thisx, PlayState* play) {
this->numShots = 1; this->numShots = 1;
} }
thisx->floorHeight = thisx->floorHeight =
BgCheck_EntityRaycastFloor4(&play->colCtx, &thisx->floorPoly, &floorBgId, thisx, &thisx->world.pos); BgCheck_EntityRaycastDown4(&play->colCtx, &thisx->floorPoly, &floorBgId, thisx, &thisx->world.pos);
//! @bug calls WaterBox_GetSurfaceImpl directly //! @bug calls WaterBox_GetSurfaceImpl directly
if (!WaterBox_GetSurfaceImpl(play, &play->colCtx, thisx->world.pos.x, thisx->world.pos.z, &ySurface, if (!WaterBox_GetSurfaceImpl(play, &play->colCtx, thisx->world.pos.x, thisx->world.pos.z, &ySurface,
&outWaterBox) || &outWaterBox) ||

View file

@ -424,8 +424,8 @@ void EnPoField_WaitForSpawn(EnPoField* this, PlayState* play) {
this->actor.world.pos.x = Math_SinS(player->actor.shape.rot.y) * spawnDist + player->actor.world.pos.x; this->actor.world.pos.x = Math_SinS(player->actor.shape.rot.y) * spawnDist + player->actor.world.pos.x;
this->actor.world.pos.z = Math_CosS(player->actor.shape.rot.y) * spawnDist + player->actor.world.pos.z; this->actor.world.pos.z = Math_CosS(player->actor.shape.rot.y) * spawnDist + player->actor.world.pos.z;
this->actor.world.pos.y = player->actor.world.pos.y + 1000.0f; this->actor.world.pos.y = player->actor.world.pos.y + 1000.0f;
this->actor.world.pos.y = BgCheck_EntityRaycastFloor4(&play->colCtx, &this->actor.floorPoly, &bgId, this->actor.world.pos.y = BgCheck_EntityRaycastDown4(&play->colCtx, &this->actor.floorPoly, &bgId,
&this->actor, &this->actor.world.pos); &this->actor, &this->actor.world.pos);
if (this->actor.world.pos.y != BGCHECK_Y_MIN) { if (this->actor.world.pos.y != BGCHECK_Y_MIN) {
this->actor.shape.rot.y = Actor_WorldYawTowardActor(&this->actor, &player->actor); this->actor.shape.rot.y = Actor_WorldYawTowardActor(&this->actor, &player->actor);
EnPoField_SetupAppear(this); EnPoField_SetupAppear(this);

View file

@ -1195,14 +1195,14 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) {
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 0.0f, Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 0.0f,
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2); UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
} else { } else {
Vec3f vec; Vec3f checkPos;
s32 sp34; s32 bgId;
vec.x = this->actor.world.pos.x; checkPos.x = this->actor.world.pos.x;
vec.y = this->actor.world.pos.y + 10.0f; checkPos.y = this->actor.world.pos.y + 10.0f;
vec.z = this->actor.world.pos.z; checkPos.z = this->actor.world.pos.z;
this->actor.floorHeight = this->actor.floorHeight =
BgCheck_EntityRaycastFloor4(&play->colCtx, &this->actor.floorPoly, &sp34, &this->actor, &vec); BgCheck_EntityRaycastDown4(&play->colCtx, &this->actor.floorPoly, &bgId, &this->actor, &checkPos);
} }
Collider_UpdateCylinder(&this->actor, &this->collider); Collider_UpdateCylinder(&this->actor, &this->collider);

View file

@ -984,8 +984,8 @@ void func_80AE089C(EnPoh* this) {
void EnPoh_UpdateLiving(Actor* thisx, PlayState* play) { void EnPoh_UpdateLiving(Actor* thisx, PlayState* play) {
EnPoh* this = (EnPoh*)thisx; EnPoh* this = (EnPoh*)thisx;
s32 pad; s32 pad;
Vec3f vec; Vec3f checkPos;
s32 sp38; s32 bgId;
if (this->colliderSph.base.atFlags & AT_HIT) { if (this->colliderSph.base.atFlags & AT_HIT) {
this->colliderSph.base.atFlags &= ~AT_HIT; this->colliderSph.base.atFlags &= ~AT_HIT;
@ -1013,11 +1013,11 @@ void EnPoh_UpdateLiving(Actor* thisx, PlayState* play) {
this->actor.shape.rot.y = this->actor.world.rot.y; this->actor.shape.rot.y = this->actor.world.rot.y;
} }
} }
vec.x = this->actor.world.pos.x; checkPos.x = this->actor.world.pos.x;
vec.y = this->actor.world.pos.y + 20.0f; checkPos.y = this->actor.world.pos.y + 20.0f;
vec.z = this->actor.world.pos.z; checkPos.z = this->actor.world.pos.z;
this->actor.floorHeight = this->actor.floorHeight =
BgCheck_EntityRaycastFloor4(&play->colCtx, &this->actor.floorPoly, &sp38, &this->actor, &vec); BgCheck_EntityRaycastDown4(&play->colCtx, &this->actor.floorPoly, &bgId, &this->actor, &checkPos);
func_80AE089C(this); func_80AE089C(this);
this->actor.shape.shadowAlpha = this->lightColor.a; this->actor.shape.shadowAlpha = this->lightColor.a;
} }

View file

@ -204,7 +204,7 @@ void EnRiverSound_Update(Actor* thisx, PlayState* play) {
pos = &thisx->world.pos; pos = &thisx->world.pos;
if (EnRiverSound_GetSfxPos(SEGMENTED_TO_VIRTUAL(path->points), path->count, &player->actor.world.pos, pos)) { if (EnRiverSound_GetSfxPos(SEGMENTED_TO_VIRTUAL(path->points), path->count, &player->actor.world.pos, pos)) {
if (BgCheck_EntityRaycastFloor4(&play->colCtx, &thisx->floorPoly, &bgId, thisx, pos) != BGCHECK_Y_MIN) { if (BgCheck_EntityRaycastDown4(&play->colCtx, &thisx->floorPoly, &bgId, thisx, pos) != BGCHECK_Y_MIN) {
// Get the river sfx frequency based on the speed of the river current under the actor // Get the river sfx frequency based on the speed of the river current under the actor
this->sfxFreqIndex = SurfaceType_GetConveyorSpeed(&play->colCtx, thisx->floorPoly, bgId); this->sfxFreqIndex = SurfaceType_GetConveyorSpeed(&play->colCtx, thisx->floorPoly, bgId);
} else { } else {

View file

@ -156,7 +156,7 @@ void EnVali_Init(Actor* thisx, PlayState* play) {
this->actor.flags &= ~ACTOR_FLAG_0; this->actor.flags &= ~ACTOR_FLAG_0;
this->actor.floorHeight = this->actor.floorHeight =
BgCheck_EntityRaycastFloor4(&play->colCtx, &this->actor.floorPoly, &bgId, &this->actor, &this->actor.world.pos); BgCheck_EntityRaycastDown4(&play->colCtx, &this->actor.floorPoly, &bgId, &this->actor, &this->actor.world.pos);
this->actor.params = BARI_TYPE_NORMAL; this->actor.params = BARI_TYPE_NORMAL;
if (this->actor.floorHeight == BGCHECK_Y_MIN) { if (this->actor.floorHeight == BGCHECK_Y_MIN) {

View file

@ -5,6 +5,7 @@
*/ */
#include "z_en_viewer.h" #include "z_en_viewer.h"
#include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h"
#include "overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.h" #include "overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.h"
#include "assets/objects/object_zl4/object_zl4.h" #include "assets/objects/object_zl4/object_zl4.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/gameplay_keep/gameplay_keep.h"
@ -57,26 +58,26 @@ static EnViewerInitData sInitData[] = {
{ OBJECT_ZL4, OBJECT_OPENING_DEMO1, 1, 0, ENVIEWER_SHADOW_NONE, 10, ENVIEWER_DRAW_ZELDA, &gChildZeldaSkel, { OBJECT_ZL4, OBJECT_OPENING_DEMO1, 1, 0, ENVIEWER_SHADOW_NONE, 10, ENVIEWER_DRAW_ZELDA, &gChildZeldaSkel,
&object_opening_demo1_Anim_000450 }, &object_opening_demo1_Anim_000450 },
/* ENVIEWER_TYPE_3_GANONDORF */ /* ENVIEWER_TYPE_3_GANONDORF */
{ OBJECT_GNDD, OBJECT_GNDD, 1, -6, ENVIEWER_SHADOW_NONE, 10, ENVIEWER_DRAW_GANONDORF, &object_gndd_Skel_0119E8, { OBJECT_GNDD, OBJECT_GNDD, 1, -6, ENVIEWER_SHADOW_NONE, 10, ENVIEWER_DRAW_GANONDORF, &gYoungGanondorfSkel,
&object_gndd_Anim_002928 }, &gYoungGanondorfHorsebackIdleAnim },
/* ENVIEWER_TYPE_4_HORSE_GANONDORF */ /* ENVIEWER_TYPE_4_HORSE_GANONDORF */
{ OBJECT_HORSE_GANON, OBJECT_HORSE_GANON, 1, 0, ENVIEWER_SHADOW_HORSE, 20, ENVIEWER_DRAW_HORSE, &gHorseGanonSkel, { OBJECT_HORSE_GANON, OBJECT_HORSE_GANON, 1, 0, ENVIEWER_SHADOW_HORSE, 20, ENVIEWER_DRAW_HORSE, &gHorseGanonSkel,
&gHorseGanonRearingAnim }, &gHorseGanonRearingAnim },
/* ENVIEWER_TYPE_5_GANONDORF */ /* ENVIEWER_TYPE_5_GANONDORF */
{ OBJECT_GNDD, OBJECT_GNDD, 1, -6, ENVIEWER_SHADOW_NONE, 10, ENVIEWER_DRAW_GANONDORF, &object_gndd_Skel_0119E8, { OBJECT_GNDD, OBJECT_GNDD, 1, -6, ENVIEWER_SHADOW_NONE, 10, ENVIEWER_DRAW_GANONDORF, &gYoungGanondorfSkel,
&object_gndd_Anim_0005B4 }, &gYoungGanondorfHorsebackRideAnim },
/* ENVIEWER_TYPE_6_HORSE_GANONDORF */ /* ENVIEWER_TYPE_6_HORSE_GANONDORF */
{ OBJECT_HORSE_GANON, OBJECT_HORSE_GANON, 1, 0, ENVIEWER_SHADOW_HORSE, 20, ENVIEWER_DRAW_HORSE, &gHorseGanonSkel, { OBJECT_HORSE_GANON, OBJECT_HORSE_GANON, 1, 0, ENVIEWER_SHADOW_HORSE, 20, ENVIEWER_DRAW_HORSE, &gHorseGanonSkel,
&gHorseGanonGallopingAnim }, &gHorseGanonGallopingAnim },
/* ENVIEWER_TYPE_7_GANONDORF */ /* ENVIEWER_TYPE_7_GANONDORF */
{ OBJECT_GNDD, OBJECT_GNDD, 1, -6, ENVIEWER_SHADOW_NONE, 10, ENVIEWER_DRAW_GANONDORF, &object_gndd_Skel_0119E8, { OBJECT_GNDD, OBJECT_GNDD, 1, -6, ENVIEWER_SHADOW_NONE, 10, ENVIEWER_DRAW_GANONDORF, &gYoungGanondorfSkel,
&object_gndd_Anim_004260 }, &gYoungGanondorfArmsCrossedAnim },
/* ENVIEWER_TYPE_8_GANONDORF */ /* ENVIEWER_TYPE_8_GANONDORF */
{ OBJECT_GNDD, OBJECT_GNDD, 1, -6, ENVIEWER_SHADOW_NONE, 10, ENVIEWER_DRAW_GANONDORF, &object_gndd_Skel_0119E8, { OBJECT_GNDD, OBJECT_GNDD, 1, -6, ENVIEWER_SHADOW_NONE, 10, ENVIEWER_DRAW_GANONDORF, &gYoungGanondorfSkel,
&object_gndd_Anim_0050A8 }, &gYoungGanondorfWalkAnim },
/* ENVIEWER_TYPE_9_GANONDORF */ /* ENVIEWER_TYPE_9_GANONDORF */
{ OBJECT_GANON, OBJECT_GANON, 1, -6, ENVIEWER_SHADOW_NONE, 10, ENVIEWER_DRAW_GANONDORF, &gDorfSkel, { OBJECT_GANON, OBJECT_GANON, 1, -6, ENVIEWER_SHADOW_NONE, 10, ENVIEWER_DRAW_GANONDORF, &gGanondorfSkel,
&object_ganon_Anim_011348 }, &gGanondorfEndingFloatAnim },
}; };
static EnGanonMant* sGanondorfCape; static EnGanonMant* sGanondorfCape;
@ -281,8 +282,8 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) {
if (play->csCtx.state != CS_STATE_IDLE && play->csCtx.npcActions[1] != NULL) { if (play->csCtx.state != CS_STATE_IDLE && play->csCtx.npcActions[1] != NULL) {
if (play->csCtx.npcActions[1]->action == 2 && sTimer == 0) { if (play->csCtx.npcActions[1]->action == 2 && sTimer == 0) {
if (type == ENVIEWER_TYPE_3_GANONDORF) { if (type == ENVIEWER_TYPE_3_GANONDORF) {
if (this->skin.skelAnime.animation != &object_gndd_Anim_002928) { if (this->skin.skelAnime.animation != &gYoungGanondorfHorsebackIdleAnim) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &object_gndd_Anim_002928, 1.0f); Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &gYoungGanondorfHorsebackIdleAnim, 1.0f);
} }
} else if (this->skin.skelAnime.animation != &gHorseGanonIdleAnim) { } else if (this->skin.skelAnime.animation != &gHorseGanonIdleAnim) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &gHorseGanonIdleAnim, 1.0f); Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &gHorseGanonIdleAnim, 1.0f);
@ -290,8 +291,8 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) {
} else if (play->csCtx.npcActions[1]->action == 1) { } else if (play->csCtx.npcActions[1]->action == 1) {
sTimer = 100; sTimer = 100;
if (type == ENVIEWER_TYPE_3_GANONDORF) { if (type == ENVIEWER_TYPE_3_GANONDORF) {
if (this->skin.skelAnime.animation != &object_gndd_Anim_001D28) { if (this->skin.skelAnime.animation != &gYoungGanondorfHorsebackRearAnim) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &object_gndd_Anim_001D28, 1.0f); Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &gYoungGanondorfHorsebackRearAnim, 1.0f);
} }
} else if (this->skin.skelAnime.animation != &gHorseGanonRearingAnim) { } else if (this->skin.skelAnime.animation != &gHorseGanonRearingAnim) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &gHorseGanonRearingAnim, 1.0f); Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &gHorseGanonRearingAnim, 1.0f);
@ -300,44 +301,49 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) {
switch (this->state) { switch (this->state) {
case 0: case 0:
if (play->csCtx.npcActions[1]->action == 4) { if (play->csCtx.npcActions[1]->action == 4) {
Animation_MorphToPlayOnce(&this->skin.skelAnime, &object_gndd_Anim_000F54, -5.0f); Animation_MorphToPlayOnce(&this->skin.skelAnime,
&gYoungGanondorfHorsebackLookSidewaysStartAnim, -5.0f);
this->state++; this->state++;
} }
break; break;
case 1: case 1:
if (animationEnded) { if (animationEnded) {
Animation_MorphToLoop(&this->skin.skelAnime, &object_gndd_Anim_0014F4, -5.0f); Animation_MorphToLoop(&this->skin.skelAnime, &gYoungGanondorfHorsebackLookSidewaysLoopAnim,
-5.0f);
this->state++; this->state++;
} }
break; break;
case 2: case 2:
if (play->csCtx.npcActions[1]->action == 5) { if (play->csCtx.npcActions[1]->action == 5) {
Animation_MorphToPlayOnce(&this->skin.skelAnime, &object_gndd_Anim_0008A0, -5.0f); Animation_MorphToPlayOnce(&this->skin.skelAnime,
&gYoungGanondorfHorsebackMagicChargeUpStartAnim, -5.0f);
this->state++; this->state++;
} }
break; break;
case 3: case 3:
if (animationEnded) { if (animationEnded) {
Animation_MorphToLoop(&this->skin.skelAnime, &object_gndd_Anim_000BC8, -5.0f); Animation_MorphToLoop(&this->skin.skelAnime, &gYoungGanondorfHorsebackMagicChargeUpLoopAnim,
-5.0f);
this->state++; this->state++;
} }
break; break;
case 4: case 4:
if (play->csCtx.npcActions[1]->action == 11) { if (play->csCtx.npcActions[1]->action == 11) {
Animation_MorphToLoop(&this->skin.skelAnime, &object_gndd_Anim_0014F4, -20.0f); Animation_MorphToLoop(&this->skin.skelAnime, &gYoungGanondorfHorsebackLookSidewaysLoopAnim,
-20.0f);
this->state++; this->state++;
} }
break; break;
case 5: case 5:
if (play->csCtx.npcActions[1]->action == 8) { if (play->csCtx.npcActions[1]->action == 8) {
Animation_MorphToLoop(&this->skin.skelAnime, &object_gndd_Anim_002928, -15.0f); Animation_MorphToLoop(&this->skin.skelAnime, &gYoungGanondorfHorsebackIdleAnim, -15.0f);
this->state++; this->state++;
} }
break; break;
case 6: case 6:
if (play->csCtx.npcActions[1]->action == 12) { if (play->csCtx.npcActions[1]->action == 12) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GANON_VOICE_DEMO); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GANON_VOICE_DEMO);
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &object_gndd_Anim_0005B4, 3.0f); Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &gYoungGanondorfHorsebackRideAnim, 3.0f);
this->state++; this->state++;
} }
break; break;
@ -432,13 +438,13 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) {
play->csCtx.npcActions[1]->action == 7) { play->csCtx.npcActions[1]->action == 7) {
Audio_PlaySfxGeneral(NA_SE_EN_GANON_LAUGH, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_EN_GANON_LAUGH, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Animation_MorphToPlayOnce(&this->skin.skelAnime, &object_gndd_Anim_004534, -5.0f); Animation_MorphToPlayOnce(&this->skin.skelAnime, &gYoungGanondorfLaughStartAnim, -5.0f);
this->state++; this->state++;
} }
break; break;
case 1: case 1:
if (animationEnded) { if (animationEnded) {
Animation_MorphToLoop(&this->skin.skelAnime, &object_gndd_Anim_0048B0, -5.0f); Animation_MorphToLoop(&this->skin.skelAnime, &gYoungGanondorfLaughLoopAnim, -5.0f);
this->state++; this->state++;
} }
break; break;
@ -448,26 +454,26 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) {
case 0: case 0:
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
if (play->csCtx.npcActions[1] != NULL && play->csCtx.npcActions[1]->action == 9) { if (play->csCtx.npcActions[1] != NULL && play->csCtx.npcActions[1]->action == 9) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &object_gndd_Anim_0050A8, 1.0f); Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &gYoungGanondorfWalkAnim, 1.0f);
this->state++; this->state++;
} }
} }
break; break;
case 1: case 1:
if (play->csCtx.npcActions[1]->action == 10) { if (play->csCtx.npcActions[1]->action == 10) {
Animation_MorphToPlayOnce(&this->skin.skelAnime, &object_gndd_Anim_003284, -10.0f); Animation_MorphToPlayOnce(&this->skin.skelAnime, &gYoungGanondorfKneelStartAnim, -10.0f);
this->state++; this->state++;
} }
break; break;
case 2: case 2:
if (animationEnded) { if (animationEnded) {
Animation_MorphToLoop(&this->skin.skelAnime, &object_gndd_Anim_003D84, -5.0f); Animation_MorphToLoop(&this->skin.skelAnime, &gYoungGanondorfKneelLoopAnim, -5.0f);
this->state++; this->state++;
} }
break; break;
case 3: case 3:
if (play->csCtx.npcActions[1]->action == 4) { if (play->csCtx.npcActions[1]->action == 4) {
Animation_MorphToPlayOnce(&this->skin.skelAnime, &object_gndd_Anim_003428, -5.0f); Animation_MorphToPlayOnce(&this->skin.skelAnime, &gYoungGanondorfKneelLookSidewaysAnim, -5.0f);
this->state++; this->state++;
} }
break; break;
@ -489,14 +495,14 @@ s32 EnViewer_Ganondorf3OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dL
void* thisx) { void* thisx) {
if (gSaveContext.sceneLayer == 4) { if (gSaveContext.sceneLayer == 4) {
if (play->csCtx.frames >= 400) { if (play->csCtx.frames >= 400) {
if (limbIndex == 5) { if (limbIndex == YOUNG_GANONDORF_LIMB_LEFT_HAND) {
*dList = object_gndd_DL_00E1A8; *dList = gYoungGanondorfOpenLeftHandDL;
} }
} }
} else { } else {
if (play->csCtx.frames >= 1510 && play->csCtx.frames <= 1650) { if (play->csCtx.frames >= 1510 && play->csCtx.frames <= 1650) {
if (limbIndex == 5) { if (limbIndex == YOUNG_GANONDORF_LIMB_LEFT_HAND) {
*dList = object_gndd_DL_00E1A8; *dList = gYoungGanondorfOpenLeftHandDL;
} }
} }
} }
@ -504,12 +510,12 @@ s32 EnViewer_Ganondorf3OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dL
} }
void EnViewer_Ganondorf9PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { void EnViewer_Ganondorf9PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
if (limbIndex == 11) { if (limbIndex == GANONDORF_LIMB_JEWEL) {
OPEN_DISPS(play->state.gfxCtx, "../z_en_viewer.c", 1365); OPEN_DISPS(play->state.gfxCtx, "../z_en_viewer.c", 1365);
Gfx_SetupDL_25Xlu(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_viewer.c", 1370), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_viewer.c", 1370),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_ganon_DL_00BE90)); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gGanondorfEyesDL));
CLOSE_DISPS(play->state.gfxCtx, "../z_en_viewer.c", 1372); CLOSE_DISPS(play->state.gfxCtx, "../z_en_viewer.c", 1372);
} }
} }
@ -517,7 +523,7 @@ void EnViewer_Ganondorf9PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList
void EnViewer_GanondorfPostLimbDrawUpdateCapeVec(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { void EnViewer_GanondorfPostLimbDrawUpdateCapeVec(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
if (limbIndex == 15) { if (limbIndex == YOUNG_GANONDORF_LIMB_HEAD) {
Matrix_MultVec3f(&zeroVec, &sGanondorfNeckWorldPos); Matrix_MultVec3f(&zeroVec, &sGanondorfNeckWorldPos);
} }
} }
@ -535,23 +541,23 @@ void EnViewer_DrawGanondorf(EnViewer* this, PlayState* play) {
} }
if (frames + 1127 >= play->csCtx.frames) { if (frames + 1127 >= play->csCtx.frames) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&object_gndd_Tex_00F178)); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&gYoungGanondorfEyeOpenTex));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(&object_gndd_Tex_00F178)); gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(&gYoungGanondorfEyeOpenTex));
} else if (frames + 1128 >= play->csCtx.frames) { } else if (frames + 1128 >= play->csCtx.frames) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&object_gndd_Tex_00F378)); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&gYoungGanondorfEyeHalfTex));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(&object_gndd_Tex_00F378)); gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(&gYoungGanondorfEyeHalfTex));
} else if (frames + 1129 >= play->csCtx.frames) { } else if (frames + 1129 >= play->csCtx.frames) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&object_gndd_Tex_00F578)); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&gYoungGanondorfEyeClosedTex));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(&object_gndd_Tex_00F578)); gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(&gYoungGanondorfEyeClosedTex));
} else { } else {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&object_gndd_Tex_00F778)); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&gYoungGanondorfEyeLookingDownTex));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(&object_gndd_Tex_00F778)); gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(&gYoungGanondorfEyeLookingDownTex));
} }
} else if (type == ENVIEWER_TYPE_9_GANONDORF) { } else if (type == ENVIEWER_TYPE_9_GANONDORF) {
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&object_ganon_Tex_00A4E0)); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&gGanondorfCrazedEyeTex));
} }
if (type == ENVIEWER_TYPE_9_GANONDORF) { if (type == ENVIEWER_TYPE_9_GANONDORF) {

View file

@ -58,6 +58,34 @@ typedef struct {
/* 0x30 */ u8 state; /* 0x30 */ u8 state;
} EnViewerFireEffect; // size = 0x34 } EnViewerFireEffect; // size = 0x34
typedef enum {
/* 0 */ YOUNG_GANONDORF_LIMB_NONE,
/* 1 */ YOUNG_GANONDORF_LIMB_ROOT,
/* 2 */ YOUNG_GANONDORF_LIMB_TORSO,
/* 3 */ YOUNG_GANONDORF_LIMB_LEFT_UPPER_ARM,
/* 4 */ YOUNG_GANONDORF_LIMB_LEFT_FOREARM,
/* 5 */ YOUNG_GANONDORF_LIMB_LEFT_HAND,
/* 6 */ YOUNG_GANONDORF_LIMB_RIGHT_UPPER_ARM,
/* 7 */ YOUNG_GANONDORF_LIMB_RIGHT_FOREARM,
/* 8 */ YOUNG_GANONDORF_LIMB_RIGHT_HAND,
/* 9 */ YOUNG_GANONDORF_LIMB_JEWEL,
/* 10 */ YOUNG_GANONDORF_LIMB_LEFT_UPPER_LIP,
/* 11 */ YOUNG_GANONDORF_LIMB_JAW,
/* 12 */ YOUNG_GANONDORF_LIMB_CHIN,
/* 13 */ YOUNG_GANONDORF_LIMB_RIGHT_UPPER_LIP,
/* 14 */ YOUNG_GANONDORF_LIMB_TEETH,
/* 15 */ YOUNG_GANONDORF_LIMB_HEAD,
/* 16 */ YOUNG_GANONDORF_LIMB_PELVIS,
/* 17 */ YOUNG_GANONDORF_LIMB_LEFT_THIGH,
/* 18 */ YOUNG_GANONDORF_LIMB_LEFT_SHIN,
/* 19 */ YOUNG_GANONDORF_LIMB_LEFT_FOOT,
/* 20 */ YOUNG_GANONDORF_LIMB_KNIFE,
/* 21 */ YOUNG_GANONDORF_LIMB_RIGHT_THIGH,
/* 22 */ YOUNG_GANONDORF_LIMB_RIGHT_SHIN,
/* 23 */ YOUNG_GANONDORF_LIMB_RIGHT_FOOT,
/* 24 */ YOUNG_GANONDORF_LIMB_MAX
} YoungGanondorfLimb;
typedef struct EnViewer { typedef struct EnViewer {
/* 0x0000 */ Actor actor; /* 0x0000 */ Actor actor;
/* 0x014C */ Skin skin; /* 0x014C */ Skin skin;

View file

@ -218,7 +218,7 @@ void func_80B32804(EnWeiyer* this, PlayState* play) {
this->actor.world.pos.y += 0.5f; this->actor.world.pos.y += 0.5f;
this->actor.floorHeight = this->actor.floorHeight =
BgCheck_EntityRaycastFloor4(&play->colCtx, &this->actor.floorPoly, &bgId, &this->actor, &this->actor.world.pos); BgCheck_EntityRaycastDown4(&play->colCtx, &this->actor.floorPoly, &bgId, &this->actor, &this->actor.world.pos);
if (!WaterBox_GetSurfaceImpl(play, &play->colCtx, this->actor.world.pos.x, this->actor.world.pos.z, if (!WaterBox_GetSurfaceImpl(play, &play->colCtx, this->actor.world.pos.x, this->actor.world.pos.z,
&this->actor.home.pos.y, &waterBox) || &this->actor.home.pos.y, &waterBox) ||

View file

@ -162,7 +162,7 @@ void EnWood02_Init(Actor* thisx, PlayState* play2) {
f32 actorScale; f32 actorScale;
PlayState* play = play2; PlayState* play = play2;
EnWood02* this = (EnWood02*)thisx; EnWood02* this = (EnWood02*)thisx;
CollisionPoly* outPoly; CollisionPoly* poly;
s32 bgId; s32 bgId;
f32 floorY; f32 floorY;
s16 extraRot; s16 extraRot;
@ -280,7 +280,7 @@ void EnWood02_Init(Actor* thisx, PlayState* play2) {
// Snap to floor, or remove if over void // Snap to floor, or remove if over void
this->actor.world.pos.y += 200.0f; this->actor.world.pos.y += 200.0f;
floorY = BgCheck_EntityRaycastFloor4(&play->colCtx, &outPoly, &bgId, &this->actor, &this->actor.world.pos); floorY = BgCheck_EntityRaycastDown4(&play->colCtx, &poly, &bgId, &this->actor, &this->actor.world.pos);
if (floorY > BGCHECK_Y_MIN) { if (floorY > BGCHECK_Y_MIN) {
this->actor.world.pos.y = floorY; this->actor.world.pos.y = floorY;

View file

@ -151,14 +151,14 @@ void ObjBean_InitDynaPoly(ObjBean* this, PlayState* play, CollisionHeader* colli
} }
void ObjBean_FindFloor(ObjBean* this, PlayState* play) { void ObjBean_FindFloor(ObjBean* this, PlayState* play) {
Vec3f vec; Vec3f checkPos;
s32 sp20; s32 bgId;
vec.x = this->dyna.actor.world.pos.x; checkPos.x = this->dyna.actor.world.pos.x;
vec.y = this->dyna.actor.world.pos.y + 29.999998f; checkPos.y = this->dyna.actor.world.pos.y + 29.999998f;
vec.z = this->dyna.actor.world.pos.z; checkPos.z = this->dyna.actor.world.pos.z;
this->dyna.actor.floorHeight = this->dyna.actor.floorHeight =
BgCheck_EntityRaycastFloor4(&play->colCtx, &this->dyna.actor.floorPoly, &sp20, &this->dyna.actor, &vec); BgCheck_EntityRaycastDown4(&play->colCtx, &this->dyna.actor.floorPoly, &bgId, &this->dyna.actor, &checkPos);
} }
void func_80B8EBC8(ObjBean* this) { void func_80B8EBC8(ObjBean* this) {

View file

@ -189,13 +189,13 @@ void func_80B967C0(ObjLift* this) {
void func_80B96840(ObjLift* this, PlayState* play) { void func_80B96840(ObjLift* this, PlayState* play) {
s32 pad; s32 pad;
s32 bgId; s32 bgId;
Vec3f sp2C; Vec3f pos;
Actor_MoveForward(&this->dyna.actor); Actor_MoveForward(&this->dyna.actor);
Math_Vec3f_Copy(&sp2C, &this->dyna.actor.prevPos); Math_Vec3f_Copy(&pos, &this->dyna.actor.prevPos);
sp2C.y += sMaxFallDistances[(this->dyna.actor.params >> 1) & 1]; pos.y += sMaxFallDistances[(this->dyna.actor.params >> 1) & 1];
this->dyna.actor.floorHeight = this->dyna.actor.floorHeight =
BgCheck_EntityRaycastFloor4(&play->colCtx, &this->dyna.actor.floorPoly, &bgId, &this->dyna.actor, &sp2C); BgCheck_EntityRaycastDown4(&play->colCtx, &this->dyna.actor.floorPoly, &bgId, &this->dyna.actor, &pos);
if ((this->dyna.actor.floorHeight - this->dyna.actor.world.pos.y) >= if ((this->dyna.actor.floorHeight - this->dyna.actor.world.pos.y) >=
(sMaxFallDistances[(this->dyna.actor.params >> 1) & 1] - 0.001f)) { (sMaxFallDistances[(this->dyna.actor.params >> 1) & 1] - 0.001f)) {

View file

@ -333,7 +333,7 @@ void ObjOshihiki_SetFloors(ObjOshihiki* this, PlayState* play) {
floorPoly = &this->floorPolys[i]; floorPoly = &this->floorPolys[i];
floorBgId = &this->floorBgIds[i]; floorBgId = &this->floorBgIds[i];
this->floorHeights[i] = this->floorHeights[i] =
BgCheck_EntityRaycastFloor6(&play->colCtx, floorPoly, floorBgId, &this->dyna.actor, &colCheckPoint, 0.0f); BgCheck_EntityRaycastDown6(&play->colCtx, floorPoly, floorBgId, &this->dyna.actor, &colCheckPoint, 0.0f);
} }
} }

View file

@ -98,17 +98,17 @@ void ObjTsubo_ApplyGravity(ObjTsubo* this) {
} }
s32 ObjTsubo_SnapToFloor(ObjTsubo* this, PlayState* play) { s32 ObjTsubo_SnapToFloor(ObjTsubo* this, PlayState* play) {
CollisionPoly* floorPoly; CollisionPoly* groundPoly;
Vec3f pos; Vec3f pos;
s32 bgID; s32 bgId;
f32 floorY; f32 groundY;
pos.x = this->actor.world.pos.x; pos.x = this->actor.world.pos.x;
pos.y = this->actor.world.pos.y + 20.0f; pos.y = this->actor.world.pos.y + 20.0f;
pos.z = this->actor.world.pos.z; pos.z = this->actor.world.pos.z;
floorY = BgCheck_EntityRaycastFloor4(&play->colCtx, &floorPoly, &bgID, &this->actor, &pos); groundY = BgCheck_EntityRaycastDown4(&play->colCtx, &groundPoly, &bgId, &this->actor, &pos);
if (floorY > BGCHECK_Y_MIN) { if (groundY > BGCHECK_Y_MIN) {
this->actor.world.pos.y = floorY; this->actor.world.pos.y = groundY;
Math_Vec3f_Copy(&this->actor.home.pos, &this->actor.world.pos); Math_Vec3f_Copy(&this->actor.home.pos, &this->actor.world.pos);
return true; return true;
} else { } else {

View file

@ -4274,7 +4274,7 @@ Actor* Player_SpawnFairy(PlayState* play, Player* this, Vec3f* arg2, Vec3f* arg3
f32 func_808396F4(PlayState* play, Player* this, Vec3f* arg2, Vec3f* arg3, CollisionPoly** arg4, s32* arg5) { f32 func_808396F4(PlayState* play, Player* this, Vec3f* arg2, Vec3f* arg3, CollisionPoly** arg4, s32* arg5) {
func_808395DC(this, &this->actor.world.pos, arg2, arg3); func_808395DC(this, &this->actor.world.pos, arg2, arg3);
return BgCheck_EntityRaycastFloor3(&play->colCtx, arg4, arg5, arg3); return BgCheck_EntityRaycastDown3(&play->colCtx, arg4, arg5, arg3);
} }
f32 func_8083973C(PlayState* play, Player* this, Vec3f* arg2, Vec3f* arg3) { f32 func_8083973C(PlayState* play, Player* this, Vec3f* arg2, Vec3f* arg3) {
@ -4309,8 +4309,8 @@ s32 func_80839800(Player* this, PlayState* play) {
s32 frontRoom; s32 frontRoom;
Actor* attachedActor; Actor* attachedActor;
LinkAnimationHeader* sp5C; LinkAnimationHeader* sp5C;
CollisionPoly* sp58; CollisionPoly* groundPoly;
Vec3f sp4C; Vec3f checkPos;
if ((this->doorType != PLAYER_DOORTYPE_NONE) && if ((this->doorType != PLAYER_DOORTYPE_NONE) &&
(!(this->stateFlags1 & PLAYER_STATE1_11) || (!(this->stateFlags1 & PLAYER_STATE1_11) ||
@ -4428,13 +4428,14 @@ s32 func_80839800(Player* this, PlayState* play) {
Actor_DisableLens(play); Actor_DisableLens(play);
if (ENDOOR_GET_TYPE(doorActor) == DOOR_SCENEEXIT) { if (ENDOOR_GET_TYPE(doorActor) == DOOR_SCENEEXIT) {
sp4C.x = doorActor->world.pos.x - (sp6C * sp74); checkPos.x = doorActor->world.pos.x - (sp6C * sp74);
sp4C.y = doorActor->world.pos.y + 10.0f; checkPos.y = doorActor->world.pos.y + 10.0f;
sp4C.z = doorActor->world.pos.z - (sp6C * sp78); checkPos.z = doorActor->world.pos.z - (sp6C * sp78);
BgCheck_EntityRaycastFloor1(&play->colCtx, &sp58, &sp4C); BgCheck_EntityRaycastDown1(&play->colCtx, &groundPoly, &checkPos);
if (func_80839034(play, this, sp58, BGCHECK_SCENE)) { //! @bug groundPoly's bgId is not guaranteed to be BGCHECK_SCENE
if (func_80839034(play, this, groundPoly, BGCHECK_SCENE)) {
gSaveContext.entranceSpeed = 2.0f; gSaveContext.entranceSpeed = 2.0f;
gSaveContext.entranceSound = NA_SE_OC_DOOR_OPEN; gSaveContext.entranceSound = NA_SE_OC_DOOR_OPEN;
} }
@ -9766,7 +9767,7 @@ void func_80847BA0(PlayState* play, Player* this) {
f32 wallPolyNormalY = COLPOLY_GET_NORMAL(wallPoly->normal.y); f32 wallPolyNormalY = COLPOLY_GET_NORMAL(wallPoly->normal.y);
f32 wallPolyNormalZ = COLPOLY_GET_NORMAL(wallPoly->normal.z); f32 wallPolyNormalZ = COLPOLY_GET_NORMAL(wallPoly->normal.z);
f32 wallHeight; f32 wallHeight;
CollisionPoly* sp7C; CollisionPoly* groundPoly;
CollisionPoly* sp78; CollisionPoly* sp78;
s32 sp74; s32 sp74;
Vec3f sp68; Vec3f sp68;
@ -9782,7 +9783,7 @@ void func_80847BA0(PlayState* play, Player* this) {
sp68.z = this->actor.world.pos.z - (spB0 * wallPolyNormalZ); sp68.z = this->actor.world.pos.z - (spB0 * wallPolyNormalZ);
sp68.y = this->actor.world.pos.y + this->ageProperties->unk_0C; sp68.y = this->actor.world.pos.y + this->ageProperties->unk_0C;
sp64 = BgCheck_EntityRaycastFloor1(&play->colCtx, &sp7C, &sp68); sp64 = BgCheck_EntityRaycastDown1(&play->colCtx, &groundPoly, &sp68);
wallHeight = sp64 - this->actor.world.pos.y; wallHeight = sp64 - this->actor.world.pos.y;
this->wallHeight = wallHeight; this->wallHeight = wallHeight;
@ -9800,7 +9801,7 @@ void func_80847BA0(PlayState* play, Player* this) {
this->wallHeight = 399.96002f; this->wallHeight = 399.96002f;
} else if (SurfaceType_CheckWallFlag0(&play->colCtx, wallPoly, this->actor.wallBgId) == 0) { } else if (SurfaceType_CheckWallFlag0(&play->colCtx, wallPoly, this->actor.wallBgId) == 0) {
if (this->ageProperties->unk_1C <= this->wallHeight) { if (this->ageProperties->unk_1C <= this->wallHeight) {
if (ABS(sp7C->normal.y) > 28000) { if (ABS(groundPoly->normal.y) > 28000) {
if (this->ageProperties->unk_14 <= this->wallHeight) { if (this->ageProperties->unk_14 <= this->wallHeight) {
spC7 = 4; spC7 = 4;
} else if (this->ageProperties->unk_18 <= this->wallHeight) { } else if (this->ageProperties->unk_18 <= this->wallHeight) {
@ -11386,7 +11387,7 @@ static struct_80832924 D_808548A8[] = {
void func_8084C5F8(Player* this, PlayState* play) { void func_8084C5F8(Player* this, PlayState* play) {
s32 temp; s32 temp;
f32* sp38; f32* sp38;
CollisionPoly* sp34; CollisionPoly* groundPoly;
s32 sp30; s32 sp30;
Vec3f sp24; Vec3f sp24;
@ -11416,8 +11417,8 @@ void func_8084C5F8(Player* this, PlayState* play) {
sp24.x = this->actor.world.pos.x; sp24.x = this->actor.world.pos.x;
sp24.y = this->actor.world.pos.y + 20.0f; sp24.y = this->actor.world.pos.y + 20.0f;
sp24.z = this->actor.world.pos.z; sp24.z = this->actor.world.pos.z;
if (BgCheck_EntityRaycastFloor3(&play->colCtx, &sp34, &sp30, &sp24) != 0.0f) { if (BgCheck_EntityRaycastDown3(&play->colCtx, &groundPoly, &sp30, &sp24) != 0.0f) {
this->unk_89E = SurfaceType_GetSfxType(&play->colCtx, sp34, sp30); this->unk_89E = SurfaceType_GetSfxType(&play->colCtx, groundPoly, sp30);
func_808328A0(this); func_808328A0(this);
} }
} }

View file

@ -51,9 +51,9 @@ void EffectSsDeadDs_Draw(PlayState* play, u32 index, EffectSs* this) {
s32 pad1; s32 pad1;
s32 pad2; s32 pad2;
MtxF mf; MtxF mf;
f32 temp; f32 yIntersect;
Vec3f pos; Vec3f pos;
CollisionPoly* floorPoly; CollisionPoly* groundPoly;
OPEN_DISPS(play->state.gfxCtx, "../z_eff_ss_dead_ds.c", 157); OPEN_DISPS(play->state.gfxCtx, "../z_eff_ss_dead_ds.c", 157);
@ -65,21 +65,21 @@ void EffectSsDeadDs_Draw(PlayState* play, u32 index, EffectSs* this) {
if (this->rTimer == 0) { if (this->rTimer == 0) {
Vec3s rpy; Vec3s rpy;
Vec3f sp44; Vec3f prevPos;
sp44.x = pos.x - this->velocity.x; prevPos.x = pos.x - this->velocity.x;
sp44.y = pos.y - this->velocity.y; prevPos.y = pos.y - this->velocity.y;
sp44.z = pos.z - this->velocity.z; prevPos.z = pos.z - this->velocity.z;
if (BgCheck_EntitySphVsWall1(&play->colCtx, &this->pos, &pos, &sp44, 1.5f, &floorPoly, 1.0f)) { if (BgCheck_EntitySphVsWall1(&play->colCtx, &this->pos, &pos, &prevPos, 1.5f, &groundPoly, 1.0f)) {
func_80038A28(floorPoly, this->pos.x, this->pos.y, this->pos.z, &mf); func_80038A28(groundPoly, this->pos.x, this->pos.y, this->pos.z, &mf);
Matrix_Put(&mf); Matrix_Put(&mf);
} else { } else {
pos.y++; pos.y++;
temp = BgCheck_EntityRaycastFloor1(&play->colCtx, &floorPoly, &pos); yIntersect = BgCheck_EntityRaycastDown1(&play->colCtx, &groundPoly, &pos);
if (floorPoly != NULL) { if (groundPoly != NULL) {
func_80038A28(floorPoly, this->pos.x, temp + 1.5f, this->pos.z, &mf); func_80038A28(groundPoly, this->pos.x, yIntersect + 1.5f, this->pos.z, &mf);
Matrix_Put(&mf); Matrix_Put(&mf);
} else { } else {
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW); Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);

View file

@ -235,11 +235,11 @@ void FileSelect_UpdateMainMenu(GameState* thisx) {
} }
} }
} else { } else {
if (ABS(this->stickRelY) > 30) { if (ABS(this->stickAdjY) > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (this->stickRelY > 30) { if (this->stickAdjY > 30) {
this->buttonIndex--; this->buttonIndex--;
if (this->buttonIndex < FS_BTN_MAIN_FILE_1) { if (this->buttonIndex < FS_BTN_MAIN_FILE_1) {
this->buttonIndex = FS_BTN_MAIN_OPTIONS; this->buttonIndex = FS_BTN_MAIN_OPTIONS;
@ -1337,7 +1337,7 @@ void FileSelect_ConfirmFile(GameState* thisx) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->selectMode++; this->selectMode++;
} else if (ABS(this->stickRelY) >= 30) { } else if (ABS(this->stickAdjY) >= 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->confirmButtonIndex ^= 1; this->confirmButtonIndex ^= 1;
@ -1611,28 +1611,28 @@ void FileSelect_Main(GameState* thisx) {
Gfx_SetupFrame(this->state.gfxCtx, 0, 0, 0); Gfx_SetupFrame(this->state.gfxCtx, 0, 0, 0);
this->stickRelX = input->rel.stick_x; this->stickAdjX = input->rel.stick_x;
this->stickRelY = input->rel.stick_y; this->stickAdjY = input->rel.stick_y;
if (this->stickRelX < -30) { if (this->stickAdjX < -30) {
if (this->stickXDir == -1) { if (this->stickXDir == -1) {
this->inputTimerX--; this->inputTimerX--;
if (this->inputTimerX < 0) { if (this->inputTimerX < 0) {
this->inputTimerX = 2; this->inputTimerX = 2;
} else { } else {
this->stickRelX = 0; this->stickAdjX = 0;
} }
} else { } else {
this->inputTimerX = 10; this->inputTimerX = 10;
this->stickXDir = -1; this->stickXDir = -1;
} }
} else if (this->stickRelX > 30) { } else if (this->stickAdjX > 30) {
if (this->stickXDir == 1) { if (this->stickXDir == 1) {
this->inputTimerX--; this->inputTimerX--;
if (this->inputTimerX < 0) { if (this->inputTimerX < 0) {
this->inputTimerX = 2; this->inputTimerX = 2;
} else { } else {
this->stickRelX = 0; this->stickAdjX = 0;
} }
} else { } else {
this->inputTimerX = 10; this->inputTimerX = 10;
@ -1642,25 +1642,25 @@ void FileSelect_Main(GameState* thisx) {
this->stickXDir = 0; this->stickXDir = 0;
} }
if (this->stickRelY < -30) { if (this->stickAdjY < -30) {
if (this->stickYDir == -1) { if (this->stickYDir == -1) {
this->inputTimerY -= 1; this->inputTimerY -= 1;
if (this->inputTimerY < 0) { if (this->inputTimerY < 0) {
this->inputTimerY = 2; this->inputTimerY = 2;
} else { } else {
this->stickRelY = 0; this->stickAdjY = 0;
} }
} else { } else {
this->inputTimerY = 10; this->inputTimerY = 10;
this->stickYDir = -1; this->stickYDir = -1;
} }
} else if (this->stickRelY > 30) { } else if (this->stickAdjY > 30) {
if (this->stickYDir == 1) { if (this->stickYDir == 1) {
this->inputTimerY -= 1; this->inputTimerY -= 1;
if (this->inputTimerY < 0) { if (this->inputTimerY < 0) {
this->inputTimerY = 2; this->inputTimerY = 2;
} else { } else {
this->stickRelY = 0; this->stickAdjY = 0;
} }
} else { } else {
this->inputTimerY = 10; this->inputTimerY = 10;

View file

@ -85,11 +85,11 @@ void FileSelect_SelectCopySource(GameState* thisx) {
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} else { } else {
if (ABS(this->stickRelY) >= 30) { if (ABS(this->stickAdjY) >= 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (this->stickRelY >= 30) { if (this->stickAdjY >= 30) {
this->buttonIndex--; this->buttonIndex--;
if (this->buttonIndex < FS_BTN_COPY_FILE_1) { if (this->buttonIndex < FS_BTN_COPY_FILE_1) {
@ -201,11 +201,11 @@ void FileSelect_SelectCopyDest(GameState* thisx) {
} }
} else { } else {
if (ABS(this->stickRelY) >= 30) { if (ABS(this->stickAdjY) >= 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (this->stickRelY >= 30) { if (this->stickAdjY >= 30) {
this->buttonIndex--; this->buttonIndex--;
if (this->buttonIndex == this->selectedFileIndex) { if (this->buttonIndex == this->selectedFileIndex) {
@ -387,7 +387,7 @@ void FileSelect_CopyConfirm(GameState* thisx) {
func_800AA000(300.0f, 0xB4, 0x14, 0x64); func_800AA000(300.0f, 0xB4, 0x14, 0x64);
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (ABS(this->stickRelY) >= 30) { } else if (ABS(this->stickAdjY) >= 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->buttonIndex ^= 1; this->buttonIndex ^= 1;
@ -716,11 +716,11 @@ void FileSelect_EraseSelect(GameState* thisx) {
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} else { } else {
if (ABS(this->stickRelY) >= 30) { if (ABS(this->stickAdjY) >= 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (this->stickRelY >= 30) { if (this->stickAdjY >= 30) {
this->buttonIndex--; this->buttonIndex--;
if (this->buttonIndex < FS_BTN_ERASE_FILE_1) { if (this->buttonIndex < FS_BTN_ERASE_FILE_1) {
this->buttonIndex = FS_BTN_ERASE_QUIT; this->buttonIndex = FS_BTN_ERASE_QUIT;
@ -852,7 +852,7 @@ void FileSelect_EraseConfirm(GameState* thisx) {
this->nextTitleLabel = FS_TITLE_ERASE_COMPLETE; this->nextTitleLabel = FS_TITLE_ERASE_COMPLETE;
func_800AA000(200.0f, 0xFF, 0x14, 0x96); func_800AA000(200.0f, 0xFF, 0x14, 0x96);
sEraseDelayTimer = 15; sEraseDelayTimer = 15;
} else if (ABS(this->stickRelY) >= 30) { } else if (ABS(this->stickAdjY) >= 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->buttonIndex ^= 1; this->buttonIndex ^= 1;

View file

@ -520,7 +520,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
this->kbdButton = 99; this->kbdButton = 99;
if (this->kbdY != 5) { if (this->kbdY != 5) {
if (this->stickRelX < -30) { if (this->stickAdjX < -30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->charIndex--; this->charIndex--;
@ -529,7 +529,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
this->kbdX = 12; this->kbdX = 12;
this->charIndex = (this->kbdY * 13) + this->kbdX; this->charIndex = (this->kbdY * 13) + this->kbdX;
} }
} else if (this->stickRelX > 30) { } else if (this->stickAdjX > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->charIndex++; this->charIndex++;
@ -540,14 +540,14 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
} }
} }
} else { } else {
if (this->stickRelX < -30) { if (this->stickAdjX < -30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->kbdX--; this->kbdX--;
if (this->kbdX < 3) { if (this->kbdX < 3) {
this->kbdX = 4; this->kbdX = 4;
} }
} else if (this->stickRelX > 30) { } else if (this->stickAdjX > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->kbdX++; this->kbdX++;
@ -557,7 +557,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
} }
} }
if (this->stickRelY > 30) { if (this->stickAdjY > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->kbdY--; this->kbdY--;
@ -589,7 +589,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
this->charIndex += this->kbdX; this->charIndex += this->kbdX;
} }
} }
} else if (this->stickRelY < -30) { } else if (this->stickAdjY < -30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->kbdY++; this->kbdY++;
@ -688,7 +688,7 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) {
return; return;
} }
if (this->stickRelX < -30) { if (this->stickAdjX < -30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@ -702,7 +702,7 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) {
} else { } else {
gSaveContext.zTargetSetting ^= 1; gSaveContext.zTargetSetting ^= 1;
} }
} else if (this->stickRelX > 30) { } else if (this->stickAdjX > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@ -717,7 +717,7 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) {
} }
} }
if ((this->stickRelY < -30) || (this->stickRelY > 30)) { if ((this->stickAdjY < -30) || (this->stickAdjY > 30)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sSelectedSetting ^= 1; sSelectedSetting ^= 1;

View file

@ -384,6 +384,10 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
// QUEST_MEDALLION_FOREST, QUEST_MEDALLION_FIRE, QUEST_MEDALLION_WATER, QUEST_MEDALLION_SPIRIT, // QUEST_MEDALLION_FOREST, QUEST_MEDALLION_FIRE, QUEST_MEDALLION_WATER, QUEST_MEDALLION_SPIRIT,
// QUEST_MEDALLION_SHADOW, QUEST_MEDALLION_LIGHT // QUEST_MEDALLION_SHADOW, QUEST_MEDALLION_LIGHT
// Draw medallions
// QUEST_MEDALLION_FOREST, QUEST_MEDALLION_FIRE, QUEST_MEDALLION_WATER, QUEST_MEDALLION_SPIRIT,
// QUEST_MEDALLION_SHADOW, QUEST_MEDALLION_LIGHT
gDPPipeSync(POLY_OPA_DISP++); gDPPipeSync(POLY_OPA_DISP++);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE,

View file

@ -5,18 +5,18 @@ static s16 sKaleidoPromptCursorAlphaVals[] = { 100, 255 };
void KaleidoScope_UpdatePrompt(PlayState* play) { void KaleidoScope_UpdatePrompt(PlayState* play) {
PauseContext* pauseCtx = &play->pauseCtx; PauseContext* pauseCtx = &play->pauseCtx;
Input* input = &play->state.input[0]; Input* input = &play->state.input[0];
s8 relStickX = input->rel.stick_x; s8 stickAdjX = input->rel.stick_x;
s16 step; s16 step;
if (((pauseCtx->state == PAUSE_STATE_SAVE_PROMPT) && if (((pauseCtx->state == PAUSE_STATE_SAVE_PROMPT) &&
(pauseCtx->savePromptSubState == PAUSE_SAVE_PROMPT_STATE_WAIT_CHOICE)) || (pauseCtx->savePromptSubState == PAUSE_SAVE_PROMPT_STATE_WAIT_CHOICE)) ||
(pauseCtx->state == PAUSE_STATE_14) || (pauseCtx->state == PAUSE_STATE_16)) { (pauseCtx->state == PAUSE_STATE_14) || (pauseCtx->state == PAUSE_STATE_16)) {
if ((pauseCtx->promptChoice == 0) && (relStickX >= 30)) { if ((pauseCtx->promptChoice == 0) && (stickAdjX >= 30)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
pauseCtx->promptChoice = 4; pauseCtx->promptChoice = 4;
} else if ((pauseCtx->promptChoice != 0) && (relStickX <= -30)) { } else if ((pauseCtx->promptChoice != 0) && (stickAdjX <= -30)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
pauseCtx->promptChoice = 0; pauseCtx->promptChoice = 0;