Merge branch 'master' into parameter

This commit is contained in:
engineer124
2022-09-14 14:42:54 -04:00
30 changed files with 4232 additions and 356 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
<Root>
<File Name="object_bubble" Segment="6">
<Texture Name="object_bubble_Tex_000000" OutName="tex_000000" Format="ia8" Width="64" Height="64" Offset="0x0" />
<DList Name="object_bubble_DL_001000" Offset="0x1000" />
<Texture Name="gBubbleTex" OutName="bubble" Format="ia8" Width="64" Height="64" Offset="0x0" />
<DList Name="gBubbleDL" Offset="0x1000" />
</File>
</Root>
+97 -80
View File
@@ -1,84 +1,101 @@
<Root>
<!-- Object for MoonChild and his four Masks -->
<File Name="object_ob" Segment="6">
<DList Name="object_ob_DL_000690" Offset="0x690" />
<DList Name="object_ob_DL_001D80" Offset="0x1D80" />
<DList Name="object_ob_DL_003AD0" Offset="0x3AD0" />
<DList Name="object_ob_DL_005020" Offset="0x5020" />
<DList Name="object_ob_DL_006380" Offset="0x6380" />
<DList Name="object_ob_DL_006730" Offset="0x6730" />
<Texture Name="object_ob_Tex_0067E0" OutName="tex_0067E0" Format="rgba16" Width="32" Height="64" Offset="0x67E0" />
<Texture Name="object_ob_Tex_0077E0" OutName="tex_0077E0" Format="rgba16" Width="16" Height="16" Offset="0x77E0" />
<Texture Name="object_ob_Tex_0079E0" OutName="tex_0079E0" Format="rgba16" Width="16" Height="16" Offset="0x79E0" />
<Texture Name="object_ob_Tex_007BE0" OutName="tex_007BE0" Format="rgba16" Width="16" Height="16" Offset="0x7BE0" />
<Texture Name="object_ob_Tex_007DE0" OutName="tex_007DE0" Format="rgba16" Width="16" Height="16" Offset="0x7DE0" />
<Texture Name="object_ob_Tex_007FE0" OutName="tex_007FE0" Format="rgba16" Width="32" Height="32" Offset="0x7FE0" />
<Texture Name="object_ob_Tex_0087E0" OutName="tex_0087E0" Format="rgba16" Width="32" Height="32" Offset="0x87E0" />
<Texture Name="object_ob_TLUT_008FE0" OutName="tlut_008FE0" Format="rgba16" Width="4" Height="4" Offset="0x8FE0" />
<Texture Name="object_ob_TLUT_009000" OutName="tlut_009000" Format="rgba16" Width="4" Height="4" Offset="0x9000" />
<Texture Name="object_ob_TLUT_009020" OutName="tlut_009020" Format="rgba16" Width="4" Height="4" Offset="0x9020" />
<Texture Name="object_ob_TLUT_009040" OutName="tlut_009040" Format="rgba16" Width="4" Height="4" Offset="0x9040" />
<Texture Name="object_ob_TLUT_009060" OutName="tlut_009060" Format="rgba16" Width="4" Height="4" Offset="0x9060" />
<Texture Name="object_ob_TLUT_009080" OutName="tlut_009080" Format="rgba16" Width="4" Height="4" Offset="0x9080" />
<Texture Name="object_ob_TLUT_0090A0" OutName="tlut_0090A0" Format="rgba16" Width="4" Height="4" Offset="0x90A0" />
<Texture Name="object_ob_Tex_0090C0" OutName="tex_0090C0" Format="rgba16" Width="16" Height="16" Offset="0x90C0" />
<Texture Name="object_ob_Tex_0092C0" OutName="tex_0092C0" Format="ci4" Width="64" Height="64" Offset="0x92C0" />
<Texture Name="object_ob_Tex_009AC0" OutName="tex_009AC0" Format="ci4" Width="64" Height="64" Offset="0x9AC0" />
<Texture Name="object_ob_Tex_00A2C0" OutName="tex_00A2C0" Format="rgba16" Width="32" Height="32" Offset="0xA2C0" />
<Texture Name="object_ob_Tex_00AAC0" OutName="tex_00AAC0" Format="ci4" Width="64" Height="64" Offset="0xAAC0" />
<Texture Name="object_ob_Tex_00B2C0" OutName="tex_00B2C0" Format="ci4" Width="64" Height="64" Offset="0xB2C0" />
<Texture Name="object_ob_Tex_00BAC0" OutName="tex_00BAC0" Format="ci4" Width="16" Height="16" Offset="0xBAC0" />
<Texture Name="object_ob_Tex_00BB40" OutName="tex_00BB40" Format="rgba16" Width="32" Height="64" Offset="0xBB40" />
<Texture Name="object_ob_Tex_00CB40" OutName="tex_00CB40" Format="rgba16" Width="32" Height="64" Offset="0xCB40" />
<Texture Name="object_ob_Tex_00DB40" OutName="tex_00DB40" Format="rgba16" Width="32" Height="64" Offset="0xDB40" />
<Texture Name="object_ob_Tex_00EB40" OutName="tex_00EB40" Format="rgba16" Width="32" Height="32" Offset="0xEB40" />
<Texture Name="object_ob_Tex_00F340" OutName="tex_00F340" Format="ci4" Width="64" Height="64" Offset="0xF340" />
<Texture Name="object_ob_Tex_00FB40" OutName="tex_00FB40" Format="ci4" Width="64" Height="64" Offset="0xFB40" />
<Animation Name="object_ob_Anim_010880" Offset="0x10880" />
<Animation Name="object_ob_Anim_010CD8" Offset="0x10CD8" />
<DList Name="object_ob_DL_014190" Offset="0x14190" />
<DList Name="object_ob_DL_0142C0" Offset="0x142C0" />
<DList Name="object_ob_DL_0144D0" Offset="0x144D0" />
<DList Name="object_ob_DL_014638" Offset="0x14638" />
<DList Name="object_ob_DL_0147A0" Offset="0x147A0" />
<DList Name="object_ob_DL_0149B0" Offset="0x149B0" />
<DList Name="object_ob_DL_014B18" Offset="0x14B18" />
<DList Name="object_ob_DL_014C80" Offset="0x14C80" />
<DList Name="object_ob_DL_014DA0" Offset="0x14DA0" />
<DList Name="object_ob_DL_014F18" Offset="0x14F18" />
<DList Name="object_ob_DL_015380" Offset="0x15380" />
<DList Name="object_ob_DL_0154B0" Offset="0x154B0" />
<DList Name="object_ob_DL_0155D0" Offset="0x155D0" />
<DList Name="object_ob_DL_015758" Offset="0x15758" />
<DList Name="object_ob_DL_015888" Offset="0x15888" />
<DList Name="object_ob_DL_0159A8" Offset="0x159A8" />
<Texture Name="object_ob_TLUT_015B28" OutName="tlut_015B28" Format="rgba16" Width="16" Height="16" Offset="0x15B28" />
<Texture Name="object_ob_Tex_015D28" OutName="tex_015D28" Format="ci8" Width="16" Height="16" Offset="0x15D28" />
<Texture Name="object_ob_Tex_015E28" OutName="tex_015E28" Format="ci8" Width="8" Height="8" Offset="0x15E28" />
<Texture Name="object_ob_Tex_015E68" OutName="tex_015E68" Format="ci8" Width="16" Height="32" Offset="0x15E68" />
<Texture Name="object_ob_Tex_016068" OutName="tex_016068" Format="ci8" Width="8" Height="16" Offset="0x16068" />
<Texture Name="object_ob_Tex_0160E8" OutName="tex_0160E8" Format="ci8" Width="8" Height="8" Offset="0x160E8" />
<Texture Name="object_ob_Tex_016128" OutName="tex_016128" Format="ci8" Width="8" Height="16" Offset="0x16128" />
<Texture Name="object_ob_Tex_0161A8" OutName="tex_0161A8" Format="ci8" Width="16" Height="32" Offset="0x161A8" />
<Limb Name="object_ob_Standardlimb_0163A8" Type="Standard" EnumName="OBJECT_OB_LIMB_01" Offset="0x163A8" />
<Limb Name="object_ob_Standardlimb_0163B4" Type="Standard" EnumName="OBJECT_OB_LIMB_02" Offset="0x163B4" />
<Limb Name="object_ob_Standardlimb_0163C0" Type="Standard" EnumName="OBJECT_OB_LIMB_03" Offset="0x163C0" />
<Limb Name="object_ob_Standardlimb_0163CC" Type="Standard" EnumName="OBJECT_OB_LIMB_04" Offset="0x163CC" />
<Limb Name="object_ob_Standardlimb_0163D8" Type="Standard" EnumName="OBJECT_OB_LIMB_05" Offset="0x163D8" />
<Limb Name="object_ob_Standardlimb_0163E4" Type="Standard" EnumName="OBJECT_OB_LIMB_06" Offset="0x163E4" />
<Limb Name="object_ob_Standardlimb_0163F0" Type="Standard" EnumName="OBJECT_OB_LIMB_07" Offset="0x163F0" />
<Limb Name="object_ob_Standardlimb_0163FC" Type="Standard" EnumName="OBJECT_OB_LIMB_08" Offset="0x163FC" />
<Limb Name="object_ob_Standardlimb_016408" Type="Standard" EnumName="OBJECT_OB_LIMB_09" Offset="0x16408" />
<Limb Name="object_ob_Standardlimb_016414" Type="Standard" EnumName="OBJECT_OB_LIMB_0A" Offset="0x16414" />
<Limb Name="object_ob_Standardlimb_016420" Type="Standard" EnumName="OBJECT_OB_LIMB_0B" Offset="0x16420" />
<Limb Name="object_ob_Standardlimb_01642C" Type="Standard" EnumName="OBJECT_OB_LIMB_0C" Offset="0x1642C" />
<Limb Name="object_ob_Standardlimb_016438" Type="Standard" EnumName="OBJECT_OB_LIMB_0D" Offset="0x16438" />
<Limb Name="object_ob_Standardlimb_016444" Type="Standard" EnumName="OBJECT_OB_LIMB_0E" Offset="0x16444" />
<Limb Name="object_ob_Standardlimb_016450" Type="Standard" EnumName="OBJECT_OB_LIMB_0F" Offset="0x16450" />
<Limb Name="object_ob_Standardlimb_01645C" Type="Standard" EnumName="OBJECT_OB_LIMB_10" Offset="0x1645C" />
<Limb Name="object_ob_Standardlimb_016468" Type="Standard" EnumName="OBJECT_OB_LIMB_11" Offset="0x16468" />
<Skeleton Name="object_ob_Skel_0164B8" Type="Flex" LimbType="Standard" LimbNone="OBJECT_OB_LIMB_NONE" LimbMax="OBJECT_OB_LIMB_MAX" EnumName="ObjectObLimb" Offset="0x164B8" />
<Animation Name="object_ob_Anim_016F58" Offset="0x16F58" />
<Animation Name="object_ob_Anim_01764C" Offset="0x1764C" />
<Animation Name="object_ob_Anim_017E98" Offset="0x17E98" />
<!-- Moonchild Mask DisplayLists -->
<DList Name="gMoonChildOdalwasMaskDL" Offset="0x690" />
<DList Name="gMoonChildGyorgsMaskDL" Offset="0x1D80" />
<DList Name="gMoonChildGohtsMaskDL" Offset="0x3AD0" />
<DList Name="gMoonChildTwinmoldsMaskDL" Offset="0x5020" />
<DList Name="gMoonChildMajorasMaskDL" Offset="0x6380" />
<DList Name="gMoonChildMajorasMaskEyesDL" Offset="0x6730" />
<!-- Moonchild Mask Textures -->
<Texture Name="gMoonChildMajorasMaskTex" OutName="moonchild_majoras_mask" Format="rgba16" Width="32" Height="64" Offset="0x67E0" />
<Texture Name="gMoonChildMajorasMaskSpike1Tex" OutName="moonchild_majoras_mask_spike_1" Format="rgba16" Width="16" Height="16" Offset="0x77E0" />
<Texture Name="gMoonChildMajorasMaskSpike2Tex" OutName="moonchild_majoras_mask_spike_2" Format="rgba16" Width="16" Height="16" Offset="0x79E0" />
<Texture Name="gMoonChildMajorasMaskSpike3Tex" OutName="moonchild_majoras_mask_spike_3" Format="rgba16" Width="16" Height="16" Offset="0x7BE0" />
<Texture Name="gMoonChildMajorasMaskSpike4Tex" OutName="moonchild_majoras_mask_spike_4" Format="rgba16" Width="16" Height="16" Offset="0x7DE0" />
<Texture Name="gMoonChildMajorasMaskBackTex" OutName="moonchild_majoras_mask_back" Format="rgba16" Width="32" Height="32" Offset="0x7FE0" />
<Texture Name="gMoonChildMajorasMaskEyesTex" OutName="moonchild_majoras_mask_eyes" Format="rgba16" Width="32" Height="32" Offset="0x87E0" />
<Texture Name="gMoonChildOdalwasMaskFaceTLUT" OutName="moonchild_odalwas_mask_face_tlut" Format="rgba16" Width="4" Height="4" Offset="0x8FE0" />
<Texture Name="gMoonChildOdalwasMaskEarTLUT" OutName="moonchild_odalwas_mask_ear_tlut" Format="rgba16" Width="4" Height="4" Offset="0x9000" />
<Texture Name="gMoonChildGyorgsMaskSkinTLUT" OutName="moonchild_gyorgs_mask_skin_tlut" Format="rgba16" Width="4" Height="4" Offset="0x9020" />
<Texture Name="gMoonChildGyorgsMaskMouthTLUT" OutName="moonchild_gyorgs_mask_mouth_tlut" Format="rgba16" Width="4" Height="4" Offset="0x9040" />
<Texture Name="gMoonChildGyorgsMaskToothHornTLUT" OutName="moonchild_gyorgs_mask_tooth_horn_tlut" Format="rgba16" Width="4" Height="4" Offset="0x9060" />
<Texture Name="gMoonChildTwinmoldsMaskSkinTLUT" OutName="moonchild_twinmolds_mask_skin_tlut" Format="rgba16" Width="4" Height="4" Offset="0x9080" />
<Texture Name="gMoonChildTwinmoldsMaskSnoutTLUT" OutName="moonchild_twinmolds_snout_tlut" Format="rgba16" Width="4" Height="4" Offset="0x90A0" />
<Texture Name="gMoonChildOdalwasMaskHairTex" OutName="moonchild_odalwas_mask_hair" Format="rgba16" Width="16" Height="16" Offset="0x90C0" />
<Texture Name="gMoonChildOdalwasMaskFaceTex" OutName="moonchild_odalwas_mask_face" Format="ci4" Width="64" Height="64" Offset="0x92C0" />
<Texture Name="gMoonChildOdalwasMaskEarTex" OutName="moonchild_odalwas_mask_ear" Format="ci4" Width="64" Height="64" Offset="0x9AC0" />
<Texture Name="gMoonChildGyorgsTwinmoldsMaskEyeTex" OutName="moonchild_gyorgs_twinmolds_mask_eye" Format="rgba16" Width="32" Height="32" Offset="0xA2C0" />
<Texture Name="gMoonChildGyorgsMaskSkinTex" OutName="moonchild_gyorgs_mask_skin" Format="ci4" Width="64" Height="64" Offset="0xAAC0" />
<Texture Name="gMoonChildGyorgsMaskMouthTex" OutName="moonchild_gyorgs_mask_mouth" Format="ci4" Width="64" Height="64" Offset="0xB2C0" />
<Texture Name="gMoonChildGyorgsMaskToothHornTex" OutName="moonchild_gyorgs_mask_tooth_horn" Format="ci4" Width="16" Height="16" Offset="0xBAC0" />
<Texture Name="gMoonChildGohtsMaskEyeTex" OutName="moonchild_gohts_mask_eye" Format="rgba16" Width="32" Height="64" Offset="0xBB40" />
<Texture Name="gMoonChildGohtsMaskTopPatternTex" OutName="moonchild_gohts_mask_top_pattern" Format="rgba16" Width="32" Height="64" Offset="0xCB40" />
<Texture Name="gMoonChildGohtsTwinmoldsMaskPatternTex" OutName="moonchild_goht_twinmold_mask_pattern" Format="rgba16" Width="32" Height="64" Offset="0xDB40" />
<Texture Name="gMoonChildGohtsMaskSpikeTwinmoldsMaskMandibleTex" OutName="moonchild_gohts_mask_spike_twinmolds_mask_mandible" Format="rgba16" Width="32" Height="32" Offset="0xEB40" />
<Texture Name="gMoonChildTwinmoldsMaskSkinTex" OutName="moonchild_twinmolds_mask_skin" Format="ci4" Width="64" Height="64" Offset="0xF340" />
<Texture Name="gMoonChildTwinmoldsMaskSnoutTex" OutName="moonchild_twinmolds_mask_snout" Format="ci4" Width="64" Height="64" Offset="0xFB40" />
<!-- Moonchild Moving Animations -->
<Animation Name="gMoonChildWalkingAnim" Offset="0x10880" />
<Animation Name="gMoonChildRunningAnim" Offset="0x10CD8" />
<!-- Moonchild DisplayLists -->
<DList Name="gMoonChildPelvisDL" Offset="0x14190" />
<DList Name="gMoonChildLeftThighDL" Offset="0x142C0" />
<DList Name="gMoonChildLeftLegDL" Offset="0x144D0" />
<DList Name="gMoonChildLeftFootDL" Offset="0x14638" />
<DList Name="gMoonChildRightThighDL" Offset="0x147A0" />
<DList Name="gMoonChildRightLegDL" Offset="0x149B0" />
<DList Name="gMoonChildRightFootDL" Offset="0x14B18" />
<DList Name="gMoonChildChestBottomDL" Offset="0x14C80" />
<DList Name="gMoonChildChestDL" Offset="0x14DA0" />
<DList Name="gMoonChildHeadDL" Offset="0x14F18" />
<DList Name="gMoonChildLeftArmDL" Offset="0x15380" />
<DList Name="gMoonChildLeftForeArmDL" Offset="0x154B0" />
<DList Name="gMoonChildLeftHandDL" Offset="0x155D0" />
<DList Name="gMoonChildRightArmDL" Offset="0x15758" />
<DList Name="gMoonChildRightForeArmDL" Offset="0x15888" />
<DList Name="gMoonChildRightHandDL" Offset="0x159A8" />
<!-- Moonchild Textures -->
<Texture Name="gMoonChildTLUT" OutName="moonchild_tlut" Format="rgba16" Width="16" Height="16" Offset="0x15B28" />
<Texture Name="gMoonChildFingersTex" OutName="moonchild_fingers" Format="ci8" Width="16" Height="16" Offset="0x15D28" />
<Texture Name="gMoonChildThighSkinTex" OutName="moonchild_thigh_skin" Format="ci8" Width="8" Height="8" Offset="0x15E28" />
<Texture Name="gMoonChildTshirtDetailTex" OutName="moonchild_tshirt_detail_tex" Format="ci8" Width="16" Height="32" Offset="0x15E68" />
<Texture Name="gMoonChildHairTex" OutName="moonchild_hair" Format="ci8" Width="8" Height="16" Offset="0x16068" />
<Texture Name="gMoonChildEarTex" OutName="moonchild_ear" Format="ci8" Width="8" Height="8" Offset="0x160E8" />
<Texture Name="gMoonChildBackHair" OutName="moonchild_back_hair" Format="ci8" Width="8" Height="16" Offset="0x16128" />
<Texture Name="gMoonChildTshirtNecklineTex" OutName="moonchild_tshirt_neckline" Format="ci8" Width="16" Height="32" Offset="0x161A8" />
<!-- Moonchild Limbs -->
<Limb Name="gMoonChildRootLimb" Type="Standard" EnumName="MOONCHILD_LIMB_ROOT" Offset="0x163A8" />
<Limb Name="gMoonChildWaistLimb" Type="Standard" EnumName="MOONCHILD_LIMB_WAIST" Offset="0x163B4" />
<Limb Name="gMoonChildTorsoLimb" Type="Standard" EnumName="MOONCHILD_LIMB_TORSO" Offset="0x163C0" />
<Limb Name="gMoonChildLeftUpperArmLimb" Type="Standard" EnumName="MOONCHILD_LIMB_LEFT_UPPER_ARM" Offset="0x163CC" />
<Limb Name="gMoonChildLeftForearmLimb" Type="Standard" EnumName="MOONCHILD_LIMB_LEFT_FOREARM" Offset="0x163D8" />
<Limb Name="gMoonChildLeftHandLimb" Type="Standard" EnumName="MOONCHILD_LIMB_LEFT_HAND" Offset="0x163E4" />
<Limb Name="gMoonChildRightUpperArmLimb" Type="Standard" EnumName="MOONCHILD_LIMB_RIGHT_UPPER_ARM" Offset="0x163F0" />
<Limb Name="gMoonChildRightForearmLimb" Type="Standard" EnumName="MOONCHILD_LIMB_RIGHT_FOREARM" Offset="0x163FC" />
<Limb Name="gMoonChildRightHandLimb" Type="Standard" EnumName="MOONCHILD_LIMB_RIGHT_HAND" Offset="0x16408" />
<Limb Name="gMoonChildHeadLimb" Type="Standard" EnumName="MOONCHILD_LIMB_HEAD" Offset="0x16414" />
<Limb Name="gMoonChildPelvisLimb" Type="Standard" EnumName="MOONCHILD_LIMB_PELVIS" Offset="0x16420" />
<Limb Name="gMoonChildLeftThighLimb" Type="Standard" EnumName="MOONCHILD_LIMB_LEFT_THIGH" Offset="0x1642C" />
<Limb Name="gMoonChildLeftShinLimb" Type="Standard" EnumName="MOONCHILD_LIMB_LEFT_SHIN" Offset="0x16438" />
<Limb Name="gMoonChildLeftFootLimb" Type="Standard" EnumName="MOONCHILD_LIMB_LEFT_FOOT" Offset="0x16444" />
<Limb Name="gMoonChildRightThighLimb" Type="Standard" EnumName="MOONCHILD_LIMB_RIGHT_THIGH" Offset="0x16450" />
<Limb Name="gMoonChildRightShinLimb" Type="Standard" EnumName="MOONCHILD_LIMB_RIGHT_SHIN" Offset="0x1645C" />
<Limb Name="gMoonChildRightFootLimb" Type="Standard" EnumName="MOONCHILD_LIMB_RIGHT_FOOT" Offset="0x16468" />
<!-- Moonchild Skeleton -->
<Skeleton Name="gMoonChildSkel" Type="Flex" LimbType="Standard" LimbNone="MOONCHILD_LIMB_NONE" LimbMax="MOONCHILD_LIMB_MAX" EnumName="MoonchildLimb" Offset="0x164B8" />
<!-- Moonchild Mask Still Animations -->
<Animation Name="gMoonChildGettingUpAnim" Offset="0x16F58" />
<Animation Name="gMoonChildSittingAnim" Offset="0x1764C" />
<Animation Name="gMoonChildStandingAnim" Offset="0x17E98" />
</File>
</Root>
+7
View File
@@ -0,0 +1,7 @@
<Root>
<File Name="ovl_Oceff_Spot" BaseAddress="0x80972680" RangeStart="0x720" RangeEnd="0xDF8">
<Texture Name="sSunSongEffectTex" OutName="sun_song_effect" Format="i8" Width="32" Height="32" Offset="0x720"/>
<DList Name="sSunSongEffectCylinderMaterialDL" Offset="0xCD0"/>
<DList Name="sSunSongEffectCylinderModelDL" Offset="0xD68"/>
</File>
</Root>
+11
View File
@@ -0,0 +1,11 @@
<Root>
<File Name="ovl_Oceff_Wipe2" BaseAddress="0x80986270" RangeStart="0x420" RangeEnd="0x1688">
<Texture Name="sEponaSongEffect1Tex" OutName="eponas_song_effect_1" Format="i4" Width="64" Height="64" Offset="0x420"/>
<Texture Name="sEponaSongEffect2Tex" OutName="eponas_song_effect_2" Format="i4" Width="64" Height="64" Offset="0xC20"/>
<Array Name="sEponaSongFrustumVtx" Count="22" Offset="0x1420">
<Vtx/>
</Array>
<DList Name="sEponaSongFrustumMaterialDL" Offset="0x1580"/>
<DList Name="sEponaSongFrustumModelDL" Offset="0x1628"/>
</File>
</Root>
+10
View File
@@ -0,0 +1,10 @@
<Root>
<File Name="ovl_Oceff_Wipe3" BaseAddress="0x809879E0" RangeStart="0x430" RangeEnd="0x1678">
<Texture Name="sSariaSongEffectTex" OutName="saria_song_effect" Format="i8" Width="64" Height="64" Offset="0x430"/>
<Array Name="sSariaSongFrustumVtx" Count="22" Offset="0x1430">
<Vtx/>
</Array>
<DList Name="sSariaSongFrustrumMaterialDL" Offset="0x1590"/>
<DList Name="sSariaSongFrustumModelDL" Offset="0x1618"/>
</File>
</Root>
+1 -1
View File
@@ -83,7 +83,7 @@ typedef struct {
typedef struct {
/* 0x0 */ s16 unk_0; // frame?
/* 0x2 */ Vec3s unk_2; // pos?
/* 0x2 */ Vec3s unk_2; // scale
} struct_80124618; // size = 0x8
typedef struct {
+3
View File
@@ -101,6 +101,9 @@ typedef struct {
#define BINANG_LERPIMP(v0, v1, t) ((v0) + (s16)(BINANG_SUB((v1), (v0)) * (t)))
#define BINANG_LERPIMPINV(v0, v1, t) ((v0) + BINANG_SUB((v1), (v0)) / (t))
#define LERPWEIGHT(val, prev, next) (((val) - (prev)) / ((next) - (prev)))
#define F32_LERPWEIGHT(val, prev, next) (((f32)(val) - (f32)(prev)) / ((f32)(next) - (f32)(prev)))
#define VEC3F_LERPIMPDST(dst, v0, v1, t){ \
(dst)->x = (v0)->x + (((v1)->x - (v0)->x) * t); \
(dst)->y = (v0)->y + (((v1)->y - (v0)->y) * t); \
+9 -22
View File
@@ -883,8 +883,7 @@ beginseg
name "ovl_En_Bubble"
compress
include "build/src/overlays/actors/ovl_En_Bubble/z_en_bubble.o"
include "build/data/ovl_En_Bubble/ovl_En_Bubble.data.o"
include "build/data/ovl_En_Bubble/ovl_En_Bubble.reloc.o"
include "build/src/overlays/actors/ovl_En_Bubble/ovl_En_Bubble_reloc.o"
endseg
beginseg
@@ -1163,8 +1162,7 @@ beginseg
name "ovl_En_Encount1"
compress
include "build/src/overlays/actors/ovl_En_Encount1/z_en_encount1.o"
include "build/data/ovl_En_Encount1/ovl_En_Encount1.data.o"
include "build/data/ovl_En_Encount1/ovl_En_Encount1.reloc.o"
include "build/src/overlays/actors/ovl_En_Encount1/ovl_En_Encount1_reloc.o"
endseg
beginseg
@@ -1644,8 +1642,7 @@ beginseg
name "ovl_En_Js"
compress
include "build/src/overlays/actors/ovl_En_Js/z_en_js.o"
include "build/data/ovl_En_Js/ovl_En_Js.data.o"
include "build/data/ovl_En_Js/ovl_En_Js.reloc.o"
include "build/src/overlays/actors/ovl_En_Js/ovl_En_Js_reloc.o"
endseg
beginseg
@@ -1696,8 +1693,7 @@ beginseg
name "ovl_Oceff_Spot"
compress
include "build/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.o"
include "build/data/ovl_Oceff_Spot/ovl_Oceff_Spot.data.o"
include "build/data/ovl_Oceff_Spot/ovl_Oceff_Spot.reloc.o"
include "build/src/overlays/actors/ovl_Oceff_Spot/ovl_Oceff_Spot_reloc.o"
endseg
beginseg
@@ -1981,18 +1977,14 @@ beginseg
name "ovl_Oceff_Wipe2"
compress
include "build/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.o"
include "build/data/ovl_Oceff_Wipe2/ovl_Oceff_Wipe2.data.o"
include "build/data/ovl_Oceff_Wipe2/ovl_Oceff_Wipe2.bss.o"
include "build/data/ovl_Oceff_Wipe2/ovl_Oceff_Wipe2.reloc.o"
include "build/src/overlays/actors/ovl_Oceff_Wipe2/ovl_Oceff_Wipe2_reloc.o"
endseg
beginseg
name "ovl_Oceff_Wipe3"
compress
include "build/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.o"
include "build/data/ovl_Oceff_Wipe3/ovl_Oceff_Wipe3.data.o"
include "build/data/ovl_Oceff_Wipe3/ovl_Oceff_Wipe3.bss.o"
include "build/data/ovl_Oceff_Wipe3/ovl_Oceff_Wipe3.reloc.o"
include "build/src/overlays/actors/ovl_Oceff_Wipe3/ovl_Oceff_Wipe3_reloc.o"
endseg
beginseg
@@ -3040,9 +3032,7 @@ beginseg
name "ovl_En_Az"
compress
include "build/src/overlays/actors/ovl_En_Az/z_en_az.o"
include "build/data/ovl_En_Az/ovl_En_Az.data.o"
include "build/data/ovl_En_Az/ovl_En_Az.bss.o"
include "build/data/ovl_En_Az/ovl_En_Az.reloc.o"
include "build/src/overlays/actors/ovl_En_Az/ovl_En_Az_reloc.o"
endseg
beginseg
@@ -3208,9 +3198,7 @@ beginseg
name "ovl_En_Twig"
compress
include "build/src/overlays/actors/ovl_En_Twig/z_en_twig.o"
include "build/data/ovl_En_Twig/ovl_En_Twig.data.o"
include "build/data/ovl_En_Twig/ovl_En_Twig.bss.o"
include "build/data/ovl_En_Twig/ovl_En_Twig.reloc.o"
include "build/src/overlays/actors/ovl_En_Twig/ovl_En_Twig_reloc.o"
endseg
beginseg
@@ -4850,8 +4838,7 @@ beginseg
name "ovl_Obj_Usiyane"
compress
include "build/src/overlays/actors/ovl_Obj_Usiyane/z_obj_usiyane.o"
include "build/data/ovl_Obj_Usiyane/ovl_Obj_Usiyane.data.o"
include "build/data/ovl_Obj_Usiyane/ovl_Obj_Usiyane.reloc.o"
include "build/src/overlays/actors/ovl_Obj_Usiyane/ovl_Obj_Usiyane_reloc.o"
endseg
beginseg
@@ -649,7 +649,7 @@ void DemoKankyo_DrawMoonAndGiant(Actor* thisx, PlayState* play2) {
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (this->actor.params == DEMO_KANKYO_TYPE_GIANTS) {
gSPDisplayList(POLY_XLU_DISP++, object_bubble_DL_001000);
gSPDisplayList(POLY_XLU_DISP++, gBubbleDL);
} else {
gSPDisplayList(POLY_XLU_DISP++, gLightOrbVtxDL);
}
File diff suppressed because it is too large Load Diff
+39 -1
View File
@@ -7,10 +7,48 @@ struct EnAz;
typedef void (*EnAzActionFunc)(struct EnAz*, PlayState*);
#define BEAVER_GET_PARAM_F00(thisx) (((thisx)->params >> 8) & 0xF)
#define BEAVER_GET_PARAM_FF(thisx) ((thisx)->params & 0xFF)
typedef struct EnAz {
/* 0x000 */ Actor actor;
/* 0x144 */ EnAzActionFunc actionFunc;
/* 0x148 */ char unk_148[0x290];
/* 0x148 */ SkelAnime skelAnime;
/* 0x18C */ ColliderCylinder collider;
/* 0x1D8 */ Vec3s jointTable[24];
/* 0x268 */ Vec3s morphTable[24];
/* 0x2F8 */ s16 unk_2F8;
/* 0x2FA */ s16 unk_2FA; // cutscene state?
/* 0x2FC */ s32 animIndex;
/* 0x300 */ ActorPathing unk_300;
/* 0x36C */ f32 unk_36C;
/* 0x370 */ UNK_TYPE1 unk370[4];
/* 0x374 */ u16 unk_374; // flags of some sort
/* 0x376 */ u16 unk_376; // flags of some sort
/* 0x378 */ u8 unk_378; // cutscene state?
/* 0x37A */ s16 unk_37A;
/* 0x37C */ s16 unk_37C;
/* 0x37E */ s16 unk_37E;
/* 0x380 */ s16 unk_380;
/* 0x382 */ s16 unk_382;
/* 0x384 */ s16 unk_384;
/* 0x388 */ struct EnAz* brother;
/* 0x38C */ UNK_TYPE1 unk38C[0x10];
/* 0x39C */ s16 unk_39C;
/* 0x39E */ s16 unk_39E; // some sort of rotation
/* 0x3A0 */ UNK_TYPE1 unk3A0[4];
/* 0x3A4 */ f32 unk_3A4;
/* 0x3A8 */ Vec3f unk_3A8;
/* 0x3B4 */ Vec3f unk_3B4; // translation
/* 0x3C0 */ s16 unk_3C0; // seems to do nothing
/* 0x3C2 */ s16 unk_3C2;
/* 0x3C4 */ s16 unk_3C4;
/* 0x3C6 */ UNK_TYPE1 unk3C6[6];
/* 0x3CC */ s32 getItemId;
/* 0x3D0 */ s16 unk_3D0[1];
/* 0x3D2 */ u16 unk_3D2;
/* 0x3D4 */ s16 unk_3D4;
/* 0x3D6 */ s16 unk_3D6;
} EnAz; // size = 0x3D8
extern const ActorInit En_Az_InitVars;
+362 -40
View File
@@ -15,11 +15,10 @@ void EnBubble_Destroy(Actor* thisx, PlayState* play);
void EnBubble_Update(Actor* thisx, PlayState* play);
void EnBubble_Draw(Actor* thisx, PlayState* play);
void func_808A029C(EnBubble* this, PlayState* play);
void func_808A0350(EnBubble* this, PlayState* play);
void func_808A03E8(EnBubble* this, PlayState* play);
void EnBubble_Wait(EnBubble* this, PlayState* play);
void EnBubble_Pop(EnBubble* this, PlayState* play);
void EnBubble_Regrow(EnBubble* this, PlayState* play);
#if 0
const ActorInit En_Bubble_InitVars = {
ACTOR_EN_BUBBLE,
ACTORCAT_ENEMY,
@@ -32,73 +31,396 @@ const ActorInit En_Bubble_InitVars = {
(ActorFunc)EnBubble_Draw,
};
// static ColliderJntSphElementInit sJntSphElementsInit[2] = {
static ColliderJntSphElementInit D_808A0700[2] = {
static ColliderJntSphElementInit sJntSphElementsInit[2] = {
{
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x04 }, { 0xF7CFD757, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x04 },
{ 0xF7CFD757, 0x00, 0x00 },
TOUCH_NONE | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 0, { { 0, 0, 0 }, 16 }, 100 },
},
{
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0x00002820, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON | BUMP_NO_AT_INFO | BUMP_NO_DAMAGE | BUMP_NO_SWORD_SFX | BUMP_NO_HITMARK, OCELEM_NONE, },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00002820, 0x00, 0x00 },
TOUCH_NONE | TOUCH_SFX_NORMAL,
BUMP_ON | BUMP_NO_AT_INFO | BUMP_NO_DAMAGE | BUMP_NO_SWORD_SFX | BUMP_NO_HITMARK,
OCELEM_NONE,
},
{ 0, { { 0, 0, 0 }, 16 }, 100 },
},
};
// static ColliderJntSphInit sJntSphInit = {
static ColliderJntSphInit D_808A0748 = {
{ COLTYPE_HIT6, AT_ON | AT_TYPE_ENEMY, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, OC2_TYPE_1, COLSHAPE_JNTSPH, },
ARRAY_COUNT(sJntSphElementsInit), D_808A0700, // sJntSphElementsInit,
static ColliderJntSphInit sJntSphInit = {
{
COLTYPE_HIT6,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
ARRAY_COUNT(sJntSphElementsInit),
sJntSphElementsInit,
};
// sColChkInfoInit
static CollisionCheckInfoInit2 D_808A0758 = { 1, 2, 25, 25, MASS_IMMOVABLE };
static CollisionCheckInfoInit2 sColChkInfoInit = { 1, 2, 25, 25, MASS_IMMOVABLE };
#endif
void EnBubble_SetDimensions(EnBubble* this, f32 dim) {
f32 x;
f32 y;
f32 z;
f32 norm;
extern ColliderJntSphElementInit D_808A0700[2];
extern ColliderJntSphInit D_808A0748;
extern CollisionCheckInfoInit2 D_808A0758;
this->actor.flags |= ACTOR_FLAG_1;
Actor_SetScale(&this->actor, 1.0f);
this->actor.shape.yOffset = 16.0f;
this->modelRotSpeed = 16.0f;
this->modelEllipticity = 0.08f;
this->modelWidth = dim;
this->modelHeight = dim;
x = Rand_ZeroOne();
y = Rand_ZeroOne();
z = Rand_ZeroOne();
this->unk_210 = 1.0f;
this->unk_214 = 1.0f;
norm = SQ(x) + SQ(y) + SQ(z);
this->unk1F8.x = x / norm;
this->unk1F8.y = y / norm;
this->unk1F8.z = z / norm;
}
extern UNK_TYPE D_06001000;
s32 func_8089F59C(EnBubble* this) {
ColliderInfo* info = &this->colliderSphere.elements[0].info;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_8089F4E0.s")
info->toucher.dmgFlags = DMG_EXPLOSIVES;
info->toucher.effect = 0;
info->toucher.damage = 4;
info->toucherFlags = TOUCH_ON;
this->actor.velocity.y = 0.0f;
return 6;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_8089F59C.s")
s32 func_8089F5D0(EnBubble* this) {
EnBubble_SetDimensions(this, -1.0f);
return 12;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_8089F5D0.s")
void EnBubble_DamagePlayer(EnBubble* this, PlayState* play) {
play->damagePlayer(play, -this->colliderSphere.elements[0].info.toucher.damage);
func_800B8E1C(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_8089F5F4.s")
s32 EnBubble_Explosion(EnBubble* this, PlayState* play) {
static Color_RGBA8 sEffectPrimColor = { 255, 255, 255, 255 };
static Color_RGBA8 sEffectEnvColor = { 150, 150, 150, 0 };
s32 i;
Vec3f effectAccel = { 0.0f, -0.5f, 0.0f };
Vec3f effectVel;
Vec3f effectPos;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_8089F660.s")
Math_SmoothStepToF(&this->modelWidth, 4.0f, 0.1f, 1000.0f, 0.0f);
Math_SmoothStepToF(&this->modelHeight, 4.0f, 0.1f, 1000.0f, 0.0f);
Math_SmoothStepToF(&this->modelRotSpeed, 54.0f, 0.1f, 1000.0f, 0.0f);
Math_SmoothStepToF(&this->modelEllipticity, 0.2f, 0.1f, 1000.0f, 0.0f);
this->actor.shape.yOffset = (this->modelHeight + 1.0f) * 16.0f;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_8089F8BC.s")
if (DECR(this->explosionCountdown) != 0) {
return -1;
}
effectPos.x = this->actor.world.pos.x;
effectPos.y = this->actor.world.pos.y + this->actor.shape.yOffset;
effectPos.z = this->actor.world.pos.z;
for (i = 0; i < 20; i++) {
effectVel.x = (Rand_ZeroOne() - 0.5f) * 7.0f;
effectVel.y = Rand_ZeroOne() * 7.0f;
effectVel.z = (Rand_ZeroOne() - 0.5f) * 7.0f;
EffectSsDtBubble_SpawnCustomColor(play, &effectPos, &effectVel, &effectAccel, &sEffectPrimColor,
&sEffectEnvColor, Rand_S16Offset(100, 50), 25, 0);
}
Item_DropCollectibleRandom(play, NULL, &this->actor.world.pos, 0x50);
this->actor.flags &= ~ACTOR_FLAG_1;
return Rand_S16Offset(90, 60);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_8089F908.s")
s32 func_8089F8BC(EnBubble* this) {
if (DECR(this->explosionCountdown) != 0) {
return -1;
} else {
return func_8089F5D0(this);
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_8089F95C.s")
s32 func_8089F908(EnBubble* this) {
this->modelWidth += 1.0f / 12.0f;
this->modelHeight += 1.0f / 12.0f;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_8089F9E4.s")
if (DECR(this->explosionCountdown) != 0) {
return false;
} else {
return true;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_8089FA54.s")
void EnBubble_Vec3fNormalizedReflect(Vec3f* vec1, Vec3f* vec2, Vec3f* dest) {
f32 norm;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_8089FF30.s")
func_80179F64(vec1, vec2, dest);
norm = sqrtf(SQ(dest->x) + SQ(dest->y) + SQ(dest->z));
if (norm != 0.0f) {
dest->x /= norm;
dest->y /= norm;
dest->z /= norm;
} else {
dest->x = dest->y = dest->z = 0.0f;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_8089FFCC.s")
void EnBubble_Vec3fNormalize(Vec3f* vec) {
f32 norm = sqrtf(SQ(vec->x) + SQ(vec->y) + SQ(vec->z));
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_808A005C.s")
if (norm != 0.0f) {
vec->x /= norm;
vec->y /= norm;
vec->z /= norm;
} else {
vec->x = vec->y = vec->z = 0.0f;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/EnBubble_Init.s")
void EnBubble_Fly(EnBubble* this, PlayState* play) {
CollisionPoly* poly;
Actor* bumpActor;
Vec3f sp84;
Vec3f sp78;
Vec3f sp6C;
Vec3f normal;
Vec3f bounceDirection;
f32 bounceSpeed;
s32 bgId;
u8 bounceCount;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/EnBubble_Destroy.s")
if (this->colliderSphere.elements[1].info.bumperFlags & BUMP_HIT) {
bumpActor = this->colliderSphere.base.ac;
this->normalizedBumpVelocity = bumpActor->velocity;
EnBubble_Vec3fNormalize(&this->normalizedBumpVelocity);
this->velocityFromBump.x += this->normalizedBumpVelocity.x * 3.0f;
this->velocityFromBump.y += this->normalizedBumpVelocity.y * 3.0f;
this->velocityFromBump.z += this->normalizedBumpVelocity.z * 3.0f;
}
this->yVelocity -= 0.1f;
if (this->yVelocity < this->actor.terminalVelocity) {
this->yVelocity = this->actor.terminalVelocity;
}
bounceDirection.x = this->velocityFromBounce.x + this->velocityFromBump.x;
bounceDirection.y = this->velocityFromBounce.y + this->velocityFromBump.y + this->yVelocity;
bounceDirection.z = this->velocityFromBounce.z + this->velocityFromBump.z;
EnBubble_Vec3fNormalize(&bounceDirection);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_808A029C.s")
sp78.x = this->actor.world.pos.x;
sp78.y = this->actor.world.pos.y + this->actor.shape.yOffset;
sp78.z = this->actor.world.pos.z;
sp6C = sp78;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_808A0350.s")
sp6C.x += (bounceDirection.x * 24.0f);
sp6C.y += (bounceDirection.y * 24.0f);
sp6C.z += (bounceDirection.z * 24.0f);
if (BgCheck_EntityLineTest1(&play->colCtx, &sp78, &sp6C, &sp84, &poly, true, true, true, false, &bgId)) {
normal.x = COLPOLY_GET_NORMAL(poly->normal.x);
normal.y = COLPOLY_GET_NORMAL(poly->normal.y);
normal.z = COLPOLY_GET_NORMAL(poly->normal.z);
EnBubble_Vec3fNormalizedReflect(&bounceDirection, &normal, &bounceDirection);
this->bounceDirection = bounceDirection;
bounceCount = this->bounceCount;
this->bounceCount = ++bounceCount;
if (bounceCount > (s16)(Rand_ZeroOne() * 10.0f)) {
this->bounceCount = 0;
}
bounceSpeed = (this->bounceCount == 0) ? 3.6000001f : 3.0f;
this->velocityFromBump.x = this->velocityFromBump.y = this->velocityFromBump.z = 0.0f;
this->velocityFromBounce.x = this->bounceDirection.x * bounceSpeed;
this->velocityFromBounce.y = this->bounceDirection.y * bounceSpeed;
this->velocityFromBounce.z = this->bounceDirection.z * bounceSpeed;
this->yVelocity = 0.0f;
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_AWA_BOUND);
this->modelRotSpeed = 128.0f;
this->modelEllipticity = 0.48f;
} else if ((this->actor.bgCheckFlags & 0x20) && (bounceDirection.y < 0.0f)) {
normal.x = normal.z = 0.0f;
normal.y = 1.0f;
EnBubble_Vec3fNormalizedReflect(&bounceDirection, &normal, &bounceDirection);
this->bounceDirection = bounceDirection;
bounceCount = this->bounceCount;
this->bounceCount = ++bounceCount;
if (bounceCount > (s16)(Rand_ZeroOne() * 10.0f)) {
this->bounceCount = 0;
}
bounceSpeed = (this->bounceCount == 0) ? 3.6000001f : 3.0f;
this->velocityFromBump.x = this->velocityFromBump.y = this->velocityFromBump.z = 0.0f;
this->velocityFromBounce.x = (this->bounceDirection.x * bounceSpeed);
this->velocityFromBounce.y = (this->bounceDirection.y * bounceSpeed);
this->velocityFromBounce.z = (this->bounceDirection.z * bounceSpeed);
this->yVelocity = 0.0f;
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_AWA_BOUND);
this->modelRotSpeed = 128.0f;
this->modelEllipticity = 0.48f;
}
this->actor.velocity.x = this->velocityFromBounce.x + this->velocityFromBump.x;
this->actor.velocity.y = this->velocityFromBounce.y + this->velocityFromBump.y + this->yVelocity;
this->actor.velocity.z = this->velocityFromBounce.z + this->velocityFromBump.z;
Math_ApproachF(&this->velocityFromBump.x, 0.0f, 0.3f, 0.1f);
Math_ApproachF(&this->velocityFromBump.y, 0.0f, 0.3f, 0.1f);
Math_ApproachF(&this->velocityFromBump.z, 0.0f, 0.3f, 0.1f);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_808A03A0.s")
s32 func_8089FF30(EnBubble* this) {
if (((this->colliderSphere.base.acFlags & AC_HIT) != 0) == false) {
return false;
}
this->colliderSphere.base.acFlags &= ~AC_HIT;
if (this->colliderSphere.elements[1].info.bumperFlags & BUMP_HIT) {
this->unk1F4.x = this->colliderSphere.base.ac->velocity.x / 10.0f;
this->unk1F4.y = this->colliderSphere.base.ac->velocity.y / 10.0f;
this->unk1F4.z = this->colliderSphere.base.ac->velocity.z / 10.0f;
this->modelRotSpeed = 128.0f;
this->modelEllipticity = 0.48f;
return false;
}
this->timer = 8;
return true;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/func_808A03E8.s")
s32 EnBubble_IsPopped(EnBubble* this, PlayState* play) {
if ((DECR(this->timer) != 0) || (this->actionFunc == EnBubble_Pop)) {
return false;
}
if (this->colliderSphere.base.ocFlags2 & OC2_HIT_PLAYER) {
this->colliderSphere.base.ocFlags2 &= ~OC2_HIT_PLAYER;
EnBubble_DamagePlayer(this, play);
this->timer = 8;
return true;
}
return func_8089FF30(this);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/EnBubble_Update.s")
void func_808A005C(EnBubble* this) {
ColliderJntSphElementDim* dim = &this->colliderSphere.elements[0].dim;
Vec3f src;
Vec3f dest;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Bubble/EnBubble_Draw.s")
src.x = dim->modelSphere.center.x;
src.y = dim->modelSphere.center.y;
src.z = dim->modelSphere.center.z;
Matrix_MultVec3f(&src, &dest);
dim->worldSphere.center.x = dest.x;
dim->worldSphere.center.y = dest.y;
dim->worldSphere.center.z = dest.z;
dim->worldSphere.radius = dim->modelSphere.radius * (1.0f + this->modelWidth);
this->colliderSphere.elements[1].dim = *dim;
}
void EnBubble_Init(Actor* thisx, PlayState* play) {
s32 pad;
EnBubble* this = THIS;
ActorShape_Init(&this->actor.shape, 16.0f, ActorShadow_DrawCircle, 0.2f);
Collider_InitJntSph(play, &this->colliderSphere);
Collider_SetJntSph(play, &this->colliderSphere, &this->actor, &sJntSphInit, this->colliderElements);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(9), &sColChkInfoInit);
this->actor.hintId = 0x16;
this->bounceDirection.x = Rand_ZeroOne();
this->bounceDirection.y = Rand_ZeroOne();
this->bounceDirection.z = Rand_ZeroOne();
EnBubble_Vec3fNormalize(&this->bounceDirection);
this->velocityFromBounce.x = this->bounceDirection.x * 3.0f;
this->velocityFromBounce.y = this->bounceDirection.y * 3.0f;
this->velocityFromBounce.z = this->bounceDirection.z * 3.0f;
EnBubble_SetDimensions(this, 0);
this->actionFunc = EnBubble_Wait;
}
void EnBubble_Destroy(Actor* thisx, PlayState* play) {
EnBubble* this = (EnBubble*)thisx;
Collider_DestroyJntSph(play, &this->colliderSphere);
}
void EnBubble_Wait(EnBubble* this, PlayState* play) {
if (EnBubble_IsPopped(this, play)) {
this->explosionCountdown = func_8089F59C(this);
this->actionFunc = EnBubble_Pop;
} else {
EnBubble_Fly(this, play);
this->actor.shape.yOffset = (this->modelHeight + 1.0f) * 16.0f;
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSphere.base);
CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderSphere.base);
}
}
void EnBubble_Pop(EnBubble* this, PlayState* play) {
if (EnBubble_Explosion(this, play) > -1) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 60, NA_SE_EN_AWA_BREAK);
Actor_MarkForDeath(&this->actor);
}
}
void EnBubble_Disappear(EnBubble* this, PlayState* play) {
s32 temp_v0 = func_8089F8BC(this);
if (temp_v0 >= 0) {
this->actor.shape.shadowDraw = ActorShadow_DrawCircle;
this->explosionCountdown = temp_v0;
this->actionFunc = EnBubble_Regrow;
}
}
void EnBubble_Regrow(EnBubble* this, PlayState* play) {
if (func_8089F908(this)) {
this->actionFunc = EnBubble_Wait;
}
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSphere.base);
CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderSphere.base);
}
void EnBubble_Update(Actor* thisx, PlayState* play) {
EnBubble* this = (EnBubble*)thisx;
Actor_UpdatePos(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 16.0f, 16.0f, 0.0f, 7);
this->actionFunc(this, play);
Actor_SetFocus(&this->actor, this->actor.shape.yOffset);
}
void EnBubble_Draw(Actor* thisx, PlayState* play) {
s32 pad;
EnBubble* this = (EnBubble*)thisx;
OPEN_DISPS(play->state.gfxCtx);
if (this->actionFunc != EnBubble_Disappear) {
func_8012C2DC(play->state.gfxCtx);
Math_SmoothStepToF(&this->modelRotSpeed, 16.0f, 0.2f, 1000.0f, 0.0f);
Math_SmoothStepToF(&this->modelEllipticity, 0.08f, 0.2f, 1000.0f, 0.0f);
Matrix_ReplaceRotation(&play->billboardMtxF);
Matrix_Scale(this->modelWidth + 1.0f, this->modelHeight + 1.0f, 1.0f, MTXMODE_APPLY);
Matrix_RotateZF(DEGF_TO_RADF((f32)play->state.frames) * this->modelRotSpeed, MTXMODE_APPLY);
Matrix_Scale(this->modelEllipticity + 1.0f, 1.0f, 1.0f, MTXMODE_APPLY);
Matrix_RotateZF(DEGF_TO_RADF(-(f32)play->state.frames) * this->modelRotSpeed, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gBubbleDL);
}
CLOSE_DISPS(play->state.gfxCtx);
if (this->actionFunc != EnBubble_Disappear) {
this->actor.shape.shadowScale = (this->modelWidth + 1.0f) * 0.2f;
func_808A005C(this);
}
}
@@ -2,6 +2,7 @@
#define Z_EN_BUBBLE_H
#include "global.h"
#include "objects/object_bubble/object_bubble.h"
struct EnBubble;
@@ -10,7 +11,25 @@ typedef void (*EnBubbleActionFunc)(struct EnBubble*, PlayState*);
typedef struct EnBubble {
/* 0x000 */ Actor actor;
/* 0x144 */ EnBubbleActionFunc actionFunc;
/* 0x148 */ char unk_148[0x110];
/* 0x148 */ ColliderJntSph colliderSphere;
/* 0x168 */ ColliderJntSphElement colliderElements[2];
/* 0x1F4 */ Vec3f unk1F4; // set but never used
/* 0x1F4 */ Vec3f unk1F8; // randomly generated, set but never used
/* 0x200 */ s16 timer; // set to 8 when about to pop
/* 0x202 */ s16 explosionCountdown;
/* 0x204 */ UNK_TYPE1 pad204[4]; // unused
/* 0x208 */ f32 modelRotSpeed;
/* 0x20C */ f32 modelEllipticity;
/* 0x210 */ f32 unk_210; // set to 1.0f, never used
/* 0x214 */ f32 unk_214; // set to 1.0f, never used
/* 0x218 */ f32 modelWidth;
/* 0x21C */ f32 modelHeight;
/* 0x220 */ u8 bounceCount;
/* 0x224 */ Vec3f bounceDirection;
/* 0x230 */ Vec3f velocityFromBounce;
/* 0x23C */ Vec3f normalizedBumpVelocity;
/* 0x248 */ Vec3f velocityFromBump;
/* 0x254 */ f32 yVelocity;
} EnBubble; // size = 0x258
extern const ActorInit En_Bubble_InitVars;
@@ -161,7 +161,7 @@ void EnElfbub_Draw(Actor* thisx, PlayState* play2) {
Matrix_RotateZS(this->zRot * -1, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, object_bubble_DL_001000);
gSPDisplayList(POLY_XLU_DISP++, gBubbleDL);
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -15,7 +15,6 @@ void EnEncount1_Update(Actor* thisx, PlayState* play);
void func_808E0954(EnEncount1* this, PlayState* play);
#if 0
const ActorInit En_Encount1_InitVars = {
ACTOR_EN_ENCOUNT1,
ACTORCAT_PROP,
@@ -28,10 +27,129 @@ const ActorInit En_Encount1_InitVars = {
(ActorFunc)NULL,
};
#endif
static s16 sActorList[] = {
ACTOR_EN_GRASSHOPPER,
ACTOR_EN_WALLMAS,
ACTOR_EN_PR2,
ACTOR_EN_PR2,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Encount1/EnEncount1_Init.s")
static s16 sActorParams[] = { 1, 0, 1, 3 };
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Encount1/func_808E0954.s")
void EnEncount1_Init(Actor* thisx, PlayState* play) {
EnEncount1* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Encount1/EnEncount1_Update.s")
if (this->actor.params <= 0) {
Actor_MarkForDeath(&this->actor);
return;
}
this->actorType = ENENCOUNT1_GET_TYPE(&this->actor);
this->unk_14C = ENENCOUNT1_GET_7C0(&this->actor);
this->unk_154 = ENENCOUNT1_GET_PATH(&this->actor);
this->unk_158 = this->actor.world.rot.x;
this->unk_15C = this->actor.world.rot.y;
this->unk_160 = (this->actor.world.rot.z * 40.0f) + 120.0f;
if (this->unk_154 >= 0x3F) {
this->unk_154 = -1;
}
if (this->actor.world.rot.z < 0) {
this->unk_160 = -1.0f;
}
if (this->actorType == EN_ENCOUNT1_SKULLFISH_2) {
this->unk_15A = ENENCOUNT1_GET_PATH(&this->actor);
this->path = SubS_GetPathByIndex(play, this->unk_15A, 0x3F);
this->unk_154 = -1;
this->unk_160 = -1.0f;
}
this->actor.flags &= ~ACTOR_FLAG_1;
this->actionFunc = func_808E0954;
}
void func_808E0954(EnEncount1* this, PlayState* play) {
Player* player = GET_PLAYER(play);
Vec3f spawnPos;
f32 sp64;
f32 temp_fv0_2;
s16 sp5E;
s16 actorList;
s32 actorParams;
CollisionPoly* sp54;
s32 sp50;
if (((this->unk_14E >= this->unk_14C) || ((this->unk_160 > 0.0f) && (this->unk_160 < this->actor.xzDistToPlayer)) ||
((this->unk_154 > 0) && (this->unk_154 <= this->unk_152)))) {
return;
} else if (this->unk_156 != 0) {
this->unk_156++;
if (this->unk_156 < this->unk_158) {
return;
}
}
this->unk_156 = 0;
switch (this->actorType) {
case EN_ENCOUNT1_GRASSHOPPER:
sp64 = randPlusMinusPoint5Scaled(40.0f) + 200.0f;
sp5E = player->actor.shape.rot.y;
if (this->unk_14E & 1) {
sp5E = -sp5E;
sp64 = randPlusMinusPoint5Scaled(20.0f) + 100.0f;
}
spawnPos.x = player->actor.world.pos.x + (Math_SinS(sp5E) * sp64) + randPlusMinusPoint5Scaled(40.0f);
spawnPos.y = player->actor.floorHeight + 120.0f;
spawnPos.z = player->actor.world.pos.z + (Math_CosS(sp5E) * sp64) + randPlusMinusPoint5Scaled(40.0f);
temp_fv0_2 = BgCheck_EntityRaycastFloor5(&play->colCtx, &sp54, &sp50, &this->actor, &spawnPos);
if ((temp_fv0_2 <= BGCHECK_Y_MIN) ||
((player->actor.depthInWater != BGCHECK_Y_MIN) &&
(temp_fv0_2 < (player->actor.world.pos.y - player->actor.depthInWater)))) {
return;
}
spawnPos.y = temp_fv0_2;
break;
case EN_ENCOUNT1_WALLMASTER:
Math_Vec3f_Copy(&spawnPos, &player->actor.world.pos);
break;
case EN_ENCOUNT1_SKULLFISH:
sp64 = randPlusMinusPoint5Scaled(250.0f) + 500.0f;
sp5E = player->actor.shape.rot.y;
spawnPos.x = player->actor.world.pos.x + Math_SinS(sp5E) * sp64 + randPlusMinusPoint5Scaled(40.0f);
spawnPos.y = player->actor.world.pos.y - Rand_ZeroFloat(20.0f);
spawnPos.z = player->actor.world.pos.z + (Math_CosS(sp5E) * sp64) + randPlusMinusPoint5Scaled(40.0f);
temp_fv0_2 = BgCheck_EntityRaycastFloor5(&play->colCtx, &sp54, &sp50, &this->actor, &spawnPos);
if ((!(player->stateFlags1 & 0x8000000) || (temp_fv0_2 <= (BGCHECK_Y_MIN)) ||
(player->actor.depthInWater < temp_fv0_2))) {
return;
}
break;
case EN_ENCOUNT1_SKULLFISH_2:
if ((this->path != NULL) && (!SubS_CopyPointFromPath(this->path, 0, &spawnPos))) {
Actor_MarkForDeath(&this->actor);
}
break;
}
actorList = sActorList[this->actorType];
actorParams = sActorParams[this->actorType];
if (Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, actorList, spawnPos.x, spawnPos.y, spawnPos.z, 0, 0, 0,
actorParams) != NULL) {
this->unk_14E++;
if (this->unk_154 > 0) {
this->unk_152++;
}
if ((this->unk_14E >= this->unk_14C) && (this->unk_158 != 0)) {
this->unk_156 = 1;
}
}
}
void EnEncount1_Update(Actor* thisx, PlayState* play) {
EnEncount1* this = THIS;
this->actionFunc(this, play);
}
@@ -3,6 +3,17 @@
#include "global.h"
#define ENENCOUNT1_GET_TYPE(thisx) (((thisx)->params >> 11) & 0x1F)
#define ENENCOUNT1_GET_7C0(thisx) (((thisx)->params >> 6) & 0x1F)
#define ENENCOUNT1_GET_PATH(thisx) ((thisx)->params & 0x3F)
typedef enum EnEncount1Enemy {
/* 0x0 */ EN_ENCOUNT1_GRASSHOPPER,
/* 0x1 */ EN_ENCOUNT1_WALLMASTER,
/* 0x2 */ EN_ENCOUNT1_SKULLFISH,
/* 0x3 */ EN_ENCOUNT1_SKULLFISH_2,
} EnEncount1Enemy;
struct EnEncount1;
typedef void (*EnEncount1ActionFunc)(struct EnEncount1*, PlayState*);
@@ -10,11 +21,17 @@ typedef void (*EnEncount1ActionFunc)(struct EnEncount1*, PlayState*);
typedef struct EnEncount1 {
/* 0x000 */ Actor actor;
/* 0x144 */ EnEncount1ActionFunc actionFunc;
/* 0x148 */ char unk_148[0x6];
/* 0x148 */ Path* path;
/* 0x14C */ s16 unk_14C;
/* 0x14E */ s16 unk_14E;
/* 0x150 */ char unk_150[0xA];
/* 0x150 */ s16 actorType;
/* 0x152 */ s16 unk_152;
/* 0x154 */ s16 unk_154;
/* 0x156 */ s16 unk_156;
/* 0x158 */ s16 unk_158;
/* 0x15A */ s16 unk_15A;
/* 0x15C */ char unk_15C[0x8];
/* 0x15C */ s32 unk_15C;
/* 0x160 */ f32 unk_160;
} EnEncount1; // size = 0x164
extern const ActorInit En_Encount1_InitVars;
File diff suppressed because it is too large Load Diff
+17 -1
View File
@@ -2,6 +2,11 @@
#define Z_EN_JS_H
#include "global.h"
#include "objects/object_ob/object_ob.h"
#define ENJS_GET_TYPE(thisx) ((thisx)->params & 0xF)
#define ENJS_GET_PATH_INDEX(thisx) (((thisx)->params & 0xFC00) >> 10)
#define ENJS_GET_EXIT_INDEX(thisx) (((thisx)->params & 0x3F0) >> 4)
struct EnJs;
@@ -9,7 +14,18 @@ typedef void (*EnJsActionFunc)(struct EnJs*, PlayState*);
typedef struct EnJs {
/* 0x000 */ Actor actor;
/* 0x144 */ char unk_144[0x180];
/* 0x144 */ SkelAnime skelAnime;
/* 0x188 */ ColliderCylinder collider;
/* 0x1D4 */ Vec3s jointTable[MOONCHILD_LIMB_MAX];
/* 0x240 */ Vec3s morphTable[MOONCHILD_LIMB_MAX];
/* 0x2AC */ Path* path;
/* 0x2B0 */ s32 unk_2B0;
/* 0x2B4 */ f32 unk_2B4;
/* 0x2B8 */ u16 unk_2B8;
/* 0x2BA */ s16 maskType;
/* 0x2BC */ s16 unk_2BC;
/* 0x2BE */ s16 cutscenes[2];
/* 0x2C2 */ s16 cutsceneIndex;
/* 0x2C4 */ EnJsActionFunc actionFunc;
} EnJs; // size = 0x2C8
+196 -18
View File
@@ -5,6 +5,7 @@
*/
#include "z_en_twig.h"
#include "objects/object_twig/object_twig.h"
#define FLAGS (ACTOR_FLAG_10)
@@ -12,10 +13,18 @@
void EnTwig_Init(Actor* thisx, PlayState* play);
void EnTwig_Destroy(Actor* thisx, PlayState* play);
void EnTwig_Update(Actor* thisx, PlayState* play);
void EnTwig_Draw(Actor* thisx, PlayState* play);
void EnTwig_Update(Actor* this, PlayState* play);
void EnTwig_Draw(EnTwig* this, PlayState* play);
void func_80AC0A54(EnTwig* this, PlayState* play);
void func_80AC0A6C(EnTwig* this, PlayState* play);
void func_80AC0A7C(EnTwig* this, PlayState* play);
void func_80AC0AC8(EnTwig* this, PlayState* play);
void func_80AC0CC4(EnTwig* this, PlayState* play);
void func_80AC0D2C(EnTwig* this, PlayState* play);
#if 0
const ActorInit En_Twig_InitVars = {
ACTOR_EN_TWIG,
ACTORCAT_MISC,
@@ -28,36 +37,205 @@ const ActorInit En_Twig_InitVars = {
(ActorFunc)EnTwig_Draw,
};
// static InitChainEntry sInitChain[] = {
static InitChainEntry D_80AC10C0[] = {
static s32 sCurrentRing;
static s16 sRingCount;
static s16 sRingNotCollected[25];
static CollisionHeader* sColHeaders[] = {
NULL,
&object_twig_Colheader_0020A0,
&object_twig_Colheader_0016C0,
};
static s16 sRingsHaveSpawned = false;
static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneScale, 40, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 40, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP),
};
#endif
void EnTwig_Init(Actor* thisx, PlayState* play2) {
PlayState* play = play2;
EnTwig* this = THIS;
s32 i;
extern InitChainEntry D_80AC10C0[];
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
this->unk_160 = RACERING_GET_PARAM_F(&this->dyna.actor);
DynaPolyActor_Init(&this->dyna, 1);
if (sColHeaders[this->unk_160] != NULL) {
DynaPolyActor_LoadMesh(play, &this->dyna, sColHeaders[this->unk_160]);
}
this->dyna.actor.bgCheckFlags |= 0x400;
switch (this->unk_160) {
case 0:
Actor_MarkForDeath(&this->dyna.actor);
break;
case 1:
if (!sRingsHaveSpawned) {
sRingCount = (gSaveContext.save.weekEventReg[24] & 4) ? 25 : 20;
for (i = 0; i < sRingCount; i++) {
sRingNotCollected[i] = false;
}
sRingsHaveSpawned = true;
}
if (RACERING_GET_PARAM_1F0(&this->dyna.actor) != 0) {
if (!(gSaveContext.save.weekEventReg[24] & 4)) {
Actor_MarkForDeath(&this->dyna.actor);
return;
}
} else if (gSaveContext.save.weekEventReg[24] & 4) {
Actor_MarkForDeath(&this->dyna.actor);
return;
}
Actor_SetScale(&this->dyna.actor, 4.2f);
this->dyna.actor.uncullZoneScale = this->dyna.actor.uncullZoneDownward = this->dyna.actor.scale.x * 60.0f;
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
func_80AC0A7C(this, play);
break;
case 2:
Actor_SetScale(&this->dyna.actor, 1.0f);
this->dyna.actor.uncullZoneScale = this->dyna.actor.uncullZoneDownward = this->dyna.actor.scale.x * 880.0f;
func_80AC0A54(this, play);
break;
}
}
extern UNK_TYPE D_06001C38;
void EnTwig_Destroy(Actor* thisx, PlayState* play2) {
PlayState* play = play2;
EnTwig* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Twig/EnTwig_Init.s")
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Twig/EnTwig_Destroy.s")
void func_80AC0A54(EnTwig* this, PlayState* play) {
this->actionFunc = func_80AC0A6C;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Twig/func_80AC0A54.s")
void func_80AC0A6C(EnTwig* this, PlayState* play) {
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Twig/func_80AC0A6C.s")
void func_80AC0A7C(EnTwig* this, PlayState* play) {
Player* player = GET_PLAYER(play);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Twig/func_80AC0A7C.s")
Math_Vec3f_Copy(&this->unk_180, &player->bodyPartsPos[0]);
this->unk_178 = 0;
this->unk_17A = 0;
this->actionFunc = func_80AC0AC8;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Twig/func_80AC0AC8.s")
void func_80AC0AC8(EnTwig* this, PlayState* play) {
static Vec3f D_80AC10D0 = { 0.0f, 0.0f, 1.0f };
Player* player = GET_PLAYER(play);
Plane sp4C;
Vec3f sp40;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Twig/func_80AC0CC4.s")
if (sCurrentRing == RACERING_GET_PARAM_FE0(&this->dyna.actor)) {
if (this->unk_17A == 3) {
this->unk_17A = 0;
this->dyna.actor.shape.rot.z += 0x2000;
} else {
this->unk_17A++;
}
}
SubS_ConstructPlane(&this->dyna.actor.world.pos, &D_80AC10D0, &this->dyna.actor.shape.rot, &sp4C);
if ((sCurrentRing == RACERING_GET_PARAM_FE0(&this->dyna.actor)) &&
Math3D_LineSegVsPlane(sp4C.normal.x, sp4C.normal.y, sp4C.normal.z, sp4C.originDist, &this->unk_180,
&player->bodyPartsPos[0], &sp40, 0)) {
if (Math3D_Vec3fDistSq(&this->dyna.actor.world.pos, &sp40) <= SQ(this->dyna.actor.scale.x * 0.345f * 40.0f)) {
func_80AC0CC4(this, play);
return;
}
} else {
if (this->dyna.actor.xyzDistToPlayerSq <= SQ((this->dyna.actor.scale.x * 40.0f) + 40)) {
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
} else {
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
}
if (this->dyna.actor.xyzDistToPlayerSq >= (this->dyna.actor.scale.x * 10.0f * 40.0f * 40.0f)) {
this->dyna.actor.shape.rot.y = this->dyna.actor.yawTowardsPlayer;
this->dyna.actor.world.rot.y = this->dyna.actor.yawTowardsPlayer;
}
}
Math_Vec3f_Copy(&this->unk_180, &player->bodyPartsPos[0]);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Twig/func_80AC0D2C.s")
void func_80AC0CC4(EnTwig* this, PlayState* play) {
this->unk_170 = 3458.0f;
this->unk_174 = 0.2f;
this->unk_16C |= 1;
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
this->actionFunc = func_80AC0D2C;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Twig/EnTwig_Update.s")
void func_80AC0D2C(EnTwig* this, PlayState* play) {
static Vec3f sKiraVel = { 0.0f, -0.05f, 0.0f };
static Vec3f sKiraAccel = { 0.0f, -0.025f, 0.0f };
static Color_RGBA8 sColorWhite = { 255, 255, 255, 130 };
static Color_RGBA8 sColorYellow = { 255, 255, 0, 0 };
Player* player = GET_PLAYER(play);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Twig/EnTwig_Draw.s")
Math_SmoothStepToF(&this->dyna.actor.world.pos.x, player->bodyPartsPos[0].x, 0.5f, 100.0f, 0.01f);
Math_SmoothStepToF(&this->dyna.actor.world.pos.y, player->bodyPartsPos[0].y, 0.5f, 100.0f, 0.01f);
Math_SmoothStepToF(&this->dyna.actor.world.pos.z, player->bodyPartsPos[0].z, 0.5f, 100.0f, 0.01f);
this->dyna.actor.shape.rot.z += (s16)this->unk_170;
this->dyna.actor.scale.x -= this->unk_174;
if (this->dyna.actor.scale.x < 0.0f) {
Actor_SetScale(&this->dyna.actor, 0.0f);
} else {
Actor_SetScale(&this->dyna.actor, this->dyna.actor.scale.x);
}
if (this->dyna.actor.scale.x <= 0.0f) {
s32 j;
Vec3f sp6C;
for (j = 0; j < 7; j++) {
sp6C.x = (Rand_Centered() * 10.0f) + this->dyna.actor.world.pos.x;
sp6C.y = (Rand_Centered() * 10.0f) + this->dyna.actor.world.pos.y;
sp6C.z = (Rand_Centered() * 10.0f) + this->dyna.actor.world.pos.z;
EffectSsKirakira_SpawnDispersed(play, &sp6C, &sKiraVel, &sKiraAccel, &sColorWhite, &sColorYellow, 1000,
(s32)(Rand_ZeroOne() * 10.0f) + 20);
}
play_sound(NA_SE_SY_GET_ITEM);
play->interfaceCtx.unk_25C--;
sRingNotCollected[RACERING_GET_PARAM_FE0(&this->dyna.actor)] = true;
if (sCurrentRing == RACERING_GET_PARAM_FE0(&this->dyna.actor)) {
s32 i;
for (i = 0; i < sRingCount; i++) {
if (!sRingNotCollected[i]) {
sCurrentRing = i;
break;
}
}
if (i == sRingCount) {
sCurrentRing = -1;
}
}
Actor_MarkForDeath(&this->dyna.actor);
return;
}
this->unk_170 += 180.0f / 0x10000;
this->unk_174 += 0.15f;
}
void EnTwig_Update(Actor* thisx, PlayState* play2) {
PlayState* play = play2;
EnTwig* this = THIS;
this->actionFunc(this, play);
}
void EnTwig_Draw(EnTwig* thisx, PlayState* play) {
EnTwig* this = THIS;
switch (this->unk_160) {
case 1:
Gfx_DrawDListOpa(play, object_twig_DL_001C38);
break;
case 2:
Gfx_DrawDListOpa(play, object_twig_DL_0014C8);
break;
}
}
+14 -3
View File
@@ -7,11 +7,22 @@ struct EnTwig;
typedef void (*EnTwigActionFunc)(struct EnTwig*, PlayState*);
#define RACERING_GET_PARAM_F(thisx) ((thisx)->params & 0xF)
#define RACERING_GET_PARAM_1F0(thisx) (((thisx)->params >> 4) & 0x1F)
#define RACERING_GET_PARAM_FE0(thisx) (((thisx)->params >> 9) & 0x7F)
typedef struct EnTwig {
/* 0x000 */ Actor actor;
/* 0x144 */ char unk_144[0x18];
/* 0x000 */ DynaPolyActor dyna;
/* 0x15C */ EnTwigActionFunc actionFunc;
/* 0x160 */ char unk_160[0x2C];
/* 0x160 */ s32 unk_160;
/* 0x160 */ UNK_TYPE1 unk164[8];
/* 0x16C */ s32 unk_16C;
/* 0x170 */ f32 unk_170;
/* 0x174 */ f32 unk_174;
/* 0x178 */ s16 unk_178;
/* 0x17A */ u16 unk_17A;
/* 0x17C */ UNK_TYPE1 unk17C[4];
/* 0x180 */ Vec3f unk_180;
} EnTwig; // size = 0x18C
extern const ActorInit En_Twig_InitVars;

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