mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Merge remote-tracking branch 'upstream/main' into ovl_En_An
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<Root>
|
||||
<!-- Object for Icicles -->
|
||||
<File Name="object_icicle" Segment="6">
|
||||
<DList Name="object_icicle_DL_0000D0" Offset="0xD0" /> <!-- Original name is "ice_turara_model" -->
|
||||
<Collision Name="object_icicle_Colheader_000294" Offset="0x294" /> <!-- Original name is "ice_turara_bgdatainfo" -->
|
||||
<Texture Name="object_icicle_Tex_0002C0" OutName="tex_0002C0" Format="i8" Width="64" Height="64" Offset="0x2C0" />
|
||||
<DList Name="gIcicleDL" Offset="0xD0" /> <!-- Original name is "ice_turara_model" -->
|
||||
<Collision Name="gIcicleCol" Offset="0x294" /> <!-- Original name is "ice_turara_bgdatainfo" -->
|
||||
<Texture Name="gIcicleTex" OutName="icicle" Format="i8" Width="64" Height="64" Offset="0x2C0" />
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
+143
-118
@@ -1,122 +1,147 @@
|
||||
<Root>
|
||||
<!-- Assets for Garos and the Garo Master -->
|
||||
<File Name="object_jso" Segment="6">
|
||||
<!-- <Blob Name="object_jso_Blob_000000" Size="0x20" Offset="0x0" /> -->
|
||||
<DList Name="object_jso_DL_001210" Offset="0x1210" />
|
||||
<DList Name="object_jso_DL_001348" Offset="0x1348" />
|
||||
<DList Name="object_jso_DL_0013F8" Offset="0x13F8" />
|
||||
<DList Name="object_jso_DL_001508" Offset="0x1508" />
|
||||
<DList Name="object_jso_DL_001640" Offset="0x1640" />
|
||||
<DList Name="object_jso_DL_0016F0" Offset="0x16F0" />
|
||||
<DList Name="object_jso_DL_001800" Offset="0x1800" />
|
||||
<DList Name="object_jso_DL_001908" Offset="0x1908" />
|
||||
<DList Name="object_jso_DL_001A18" Offset="0x1A18" />
|
||||
<DList Name="object_jso_DL_001B00" Offset="0x1B00" />
|
||||
<DList Name="object_jso_DL_001C48" Offset="0x1C48" />
|
||||
<DList Name="object_jso_DL_001D78" Offset="0x1D78" />
|
||||
<DList Name="object_jso_DL_001EA8" Offset="0x1EA8" />
|
||||
<DList Name="object_jso_DL_001FA8" Offset="0x1FA8" />
|
||||
<DList Name="object_jso_DL_001FF8" Offset="0x1FF8" />
|
||||
<DList Name="object_jso_DL_0020B0" Offset="0x20B0" />
|
||||
<DList Name="object_jso_DL_002100" Offset="0x2100" />
|
||||
<!-- <Blob Name="object_jso_Blob_0021B8" Size="0x100" Offset="0x21B8" /> -->
|
||||
<Texture Name="object_jso_Tex_0022B8" OutName="tex_0022B8" Format="rgba16" Width="16" Height="16" Offset="0x22B8" />
|
||||
<Texture Name="object_jso_Tex_0024B8" OutName="tex_0024B8" Format="rgba16" Width="8" Height="16" Offset="0x24B8" />
|
||||
<!-- <Blob Name="object_jso_Blob_0025B8" Size="0x80" Offset="0x25B8" /> -->
|
||||
<Texture Name="object_jso_Tex_002638" OutName="tex_002638" Format="rgba16" Width="4" Height="4" Offset="0x2638" />
|
||||
<Texture Name="object_jso_Tex_002658" OutName="tex_002658" Format="rgba16" Width="8" Height="32" Offset="0x2658" />
|
||||
<Texture Name="object_jso_TLUT_002858" OutName="tlut_002858" Format="rgba16" Width="16" Height="16" Offset="0x2858" />
|
||||
<Texture Name="object_jso_TLUT_002A58" OutName="tlut_002A58" Format="rgba16" Width="16" Height="16" Offset="0x2A58" />
|
||||
<Texture Name="object_jso_Tex_002C58" OutName="tex_002C58" Format="ci8" Width="16" Height="16" Offset="0x2C58" />
|
||||
<Texture Name="object_jso_Tex_002D58" OutName="tex_002D58" Format="ci8" Width="16" Height="16" Offset="0x2D58" />
|
||||
<DList Name="object_jso_DL_002ED8" Offset="0x2ED8" />
|
||||
<Texture Name="object_jso_Tex_002FB8" OutName="tex_002FB8" Format="rgba16" Width="8" Height="8" Offset="0x2FB8" />
|
||||
<Limb Name="object_jso_Standardlimb_003038" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_01" Offset="0x3038" />
|
||||
<Limb Name="object_jso_Standardlimb_003044" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_02" Offset="0x3044" />
|
||||
<Limb Name="object_jso_Standardlimb_003050" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_03" Offset="0x3050" />
|
||||
<Limb Name="object_jso_Standardlimb_00305C" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_04" Offset="0x305C" />
|
||||
<Limb Name="object_jso_Standardlimb_003068" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_05" Offset="0x3068" />
|
||||
<Limb Name="object_jso_Standardlimb_003074" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_06" Offset="0x3074" />
|
||||
<Limb Name="object_jso_Standardlimb_003080" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_07" Offset="0x3080" />
|
||||
<Limb Name="object_jso_Standardlimb_00308C" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_08" Offset="0x308C" />
|
||||
<Limb Name="object_jso_Standardlimb_003098" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_09" Offset="0x3098" />
|
||||
<Limb Name="object_jso_Standardlimb_0030A4" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_0A" Offset="0x30A4" />
|
||||
<Limb Name="object_jso_Standardlimb_0030B0" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_0B" Offset="0x30B0" />
|
||||
<Limb Name="object_jso_Standardlimb_0030BC" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_0C" Offset="0x30BC" />
|
||||
<Limb Name="object_jso_Standardlimb_0030C8" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_0D" Offset="0x30C8" />
|
||||
<Limb Name="object_jso_Standardlimb_0030D4" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_0E" Offset="0x30D4" />
|
||||
<Limb Name="object_jso_Standardlimb_0030E0" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_0F" Offset="0x30E0" />
|
||||
<Limb Name="object_jso_Standardlimb_0030EC" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_10" Offset="0x30EC" />
|
||||
<Limb Name="object_jso_Standardlimb_0030F8" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_11" Offset="0x30F8" />
|
||||
<Limb Name="object_jso_Standardlimb_003104" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_12" Offset="0x3104" />
|
||||
<Limb Name="object_jso_Standardlimb_003110" Type="Standard" EnumName="OBJECT_JSO_1_LIMB_13" Offset="0x3110" />
|
||||
<Skeleton Name="object_jso_Skel_003168" Type="Flex" LimbType="Standard" LimbNone="OBJECT_JSO_1_LIMB_NONE" LimbMax="OBJECT_JSO_1_LIMB_MAX" EnumName="ObjectJso1Limb" Offset="0x3168" />
|
||||
<Animation Name="object_jso_Anim_003238" Offset="0x3238" /> <!-- Original name is "jsk_pose" -->
|
||||
<Animation Name="object_jso_Anim_003530" Offset="0x3530" /> <!-- Original name is "jso_attack1" -->
|
||||
<Animation Name="object_jso_Anim_00378C" Offset="0x378C" /> <!-- Original name is "jso_attack2" -->
|
||||
<Animation Name="object_jso_Anim_0038AC" Offset="0x38AC" /> <!-- Original name is "jso_attack_wait" -->
|
||||
<Animation Name="object_jso_Anim_003D5C" Offset="0x3D5C" /> <!-- Original name is "jso_back" -->
|
||||
<Animation Name="object_jso_Anim_004018" Offset="0x4018" /> <!-- Original name is "jso_bomb" -->
|
||||
<Animation Name="object_jso_Anim_004384" Offset="0x4384" /> <!-- Original name is "jso_chakuchiD" -->
|
||||
<Animation Name="object_jso_Anim_0044F8" Offset="0x44F8" /> <!-- Original name is "jso_damage" -->
|
||||
<Animation Name="object_jso_Anim_004858" Offset="0x4858" /> <!-- Original name is "jso_defense" -->
|
||||
<Animation Name="object_jso_Anim_005778" Offset="0x5778" /> <!-- Original name is "jso_demo_start" -->
|
||||
<Animation Name="object_jso_Anim_005D5C" Offset="0x5D5C" /> <!-- Original name is "jso_down" -->
|
||||
<Animation Name="object_jso_Anim_00603C" Offset="0x603C" /> <!-- Original name is "jso_hajiku" -->
|
||||
<Animation Name="object_jso_Anim_0063A4" Offset="0x63A4" /> <!-- Original name is "jso_henahena" -->
|
||||
<Animation Name="object_jso_Anim_0067F0" Offset="0x67F0" /> <!-- Original name is "jso_hetari" -->
|
||||
<Animation Name="object_jso_Anim_0070BC" Offset="0x70BC" /> <!-- Original name is "jso_jakin" -->
|
||||
<Animation Name="object_jso_Anim_0071E0" Offset="0x71E0" /> <!-- Original name is "jso_jumpD" -->
|
||||
<Animation Name="object_jso_Anim_0072AC" Offset="0x72AC" /> <!-- Original name is "jso_kaiten" -->
|
||||
<Animation Name="object_jso_Anim_00788C" Offset="0x788C" /> <!-- Original name is "jso_kyoro" -->
|
||||
<Animation Name="object_jso_Anim_007B04" Offset="0x7B04" /> <!-- Original name is "jso_ororo" -->
|
||||
<Animation Name="object_jso_Anim_0081F4" Offset="0x81F4" /> <!-- Original name is "jso_start" -->
|
||||
<DList Name="object_jso_DL_008F50" Offset="0x8F50" />
|
||||
<DList Name="object_jso_DL_009008" Offset="0x9008" />
|
||||
<DList Name="object_jso_DL_0090C0" Offset="0x90C0" />
|
||||
<DList Name="object_jso_DL_009190" Offset="0x9190" />
|
||||
<DList Name="object_jso_DL_009248" Offset="0x9248" />
|
||||
<DList Name="object_jso_DL_009300" Offset="0x9300" />
|
||||
<DList Name="object_jso_DL_0093D0" Offset="0x93D0" />
|
||||
<DList Name="object_jso_DL_009428" Offset="0x9428" />
|
||||
<DList Name="object_jso_DL_0094E0" Offset="0x94E0" />
|
||||
<DList Name="object_jso_DL_009758" Offset="0x9758" />
|
||||
<DList Name="object_jso_DL_0098C8" Offset="0x98C8" />
|
||||
<DList Name="object_jso_DL_0099B8" Offset="0x99B8" />
|
||||
<DList Name="object_jso_DL_009AA8" Offset="0x9AA8" />
|
||||
<DList Name="object_jso_DL_009B80" Offset="0x9B80" />
|
||||
<DList Name="object_jso_DL_009BD8" Offset="0x9BD8" />
|
||||
<DList Name="object_jso_DL_009C98" Offset="0x9C98" />
|
||||
<DList Name="object_jso_DL_009CF0" Offset="0x9CF0" />
|
||||
<Texture Name="object_jso_Tex_009DB0" OutName="tex_009DB0" Format="rgba16" Width="8" Height="16" Offset="0x9DB0" />
|
||||
<Texture Name="object_jso_Tex_009EB0" OutName="tex_009EB0" Format="rgba16" Width="8" Height="8" Offset="0x9EB0" />
|
||||
<Texture Name="object_jso_Tex_009F30" OutName="tex_009F30" Format="rgba16" Width="16" Height="32" Offset="0x9F30" />
|
||||
<Texture Name="object_jso_Tex_00A330" OutName="tex_00A330" Format="rgba16" Width="16" Height="16" Offset="0xA330" />
|
||||
<Texture Name="object_jso_Tex_00A530" OutName="tex_00A530" Format="rgba16" Width="16" Height="8" Offset="0xA530" />
|
||||
<Texture Name="object_jso_Tex_00A630" OutName="tex_00A630" Format="rgba16" Width="8" Height="8" Offset="0xA630" />
|
||||
<Texture Name="object_jso_Tex_00A6B0" OutName="tex_00A6B0" Format="rgba16" Width="16" Height="16" Offset="0xA6B0" />
|
||||
<Texture Name="object_jso_Tex_00A8B0" OutName="tex_00A8B0" Format="rgba16" Width="4" Height="4" Offset="0xA8B0" />
|
||||
<Limb Name="object_jso_Standardlimb_00A8D0" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_01" Offset="0xA8D0" />
|
||||
<Limb Name="object_jso_Standardlimb_00A8DC" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_02" Offset="0xA8DC" />
|
||||
<Limb Name="object_jso_Standardlimb_00A8E8" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_03" Offset="0xA8E8" />
|
||||
<Limb Name="object_jso_Standardlimb_00A8F4" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_04" Offset="0xA8F4" />
|
||||
<Limb Name="object_jso_Standardlimb_00A900" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_05" Offset="0xA900" />
|
||||
<Limb Name="object_jso_Standardlimb_00A90C" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_06" Offset="0xA90C" />
|
||||
<Limb Name="object_jso_Standardlimb_00A918" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_07" Offset="0xA918" />
|
||||
<Limb Name="object_jso_Standardlimb_00A924" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_08" Offset="0xA924" />
|
||||
<Limb Name="object_jso_Standardlimb_00A930" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_09" Offset="0xA930" />
|
||||
<Limb Name="object_jso_Standardlimb_00A93C" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_0A" Offset="0xA93C" />
|
||||
<Limb Name="object_jso_Standardlimb_00A948" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_0B" Offset="0xA948" />
|
||||
<Limb Name="object_jso_Standardlimb_00A954" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_0C" Offset="0xA954" />
|
||||
<Limb Name="object_jso_Standardlimb_00A960" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_0D" Offset="0xA960" />
|
||||
<Limb Name="object_jso_Standardlimb_00A96C" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_0E" Offset="0xA96C" />
|
||||
<Limb Name="object_jso_Standardlimb_00A978" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_0F" Offset="0xA978" />
|
||||
<Limb Name="object_jso_Standardlimb_00A984" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_10" Offset="0xA984" />
|
||||
<Limb Name="object_jso_Standardlimb_00A990" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_11" Offset="0xA990" />
|
||||
<Limb Name="object_jso_Standardlimb_00A99C" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_12" Offset="0xA99C" />
|
||||
<Limb Name="object_jso_Standardlimb_00A9A8" Type="Standard" EnumName="OBJECT_JSO_2_LIMB_13" Offset="0xA9A8" />
|
||||
<Skeleton Name="object_jso_Skel_00AA00" Type="Flex" LimbType="Standard" LimbNone="OBJECT_JSO_2_LIMB_NONE" LimbMax="OBJECT_JSO_2_LIMB_MAX" EnumName="ObjectJso2Limb" Offset="0xAA00" />
|
||||
<Animation Name="object_jso_Anim_00AE80" Offset="0xAE80" /> <!-- Original name is "jso_wait" -->
|
||||
<Animation Name="object_jso_Anim_00B1DC" Offset="0xB1DC" /> <!-- Original name is "jso_waitD" -->
|
||||
<Animation Name="object_jso_Anim_00B5F0" Offset="0xB5F0" /> <!-- Original name is "jso_walk" -->
|
||||
<!-- Unused Empty Texture Animations -->
|
||||
<TextureAnimation Name="gGaroEmpty1TexAnim" Offset="0x0" />
|
||||
<TextureAnimation Name="gGaroEmpty2TexAnim" Offset="0x10" />
|
||||
|
||||
<!-- Garo Master Limb DisplayLists -->
|
||||
<DList Name="gGaroMasterLeftThighDL" Offset="0x1210" />
|
||||
<DList Name="gGaroMasterLeftShinDL" Offset="0x1348" />
|
||||
<DList Name="gGaroMasterLeftFootDL" Offset="0x13F8" />
|
||||
<DList Name="gGaroMasterRightThighDL" Offset="0x1508" />
|
||||
<DList Name="gGaroMasterRightShinDL" Offset="0x1640" />
|
||||
<DList Name="gGaroMasterRightFootDL" Offset="0x16F0" />
|
||||
<DList Name="gGaroMasterTorsoDL" Offset="0x1800" />
|
||||
<DList Name="gGaroMasterHeadDL" Offset="0x1908" />
|
||||
<DList Name="gGaroMasterRobeTopDL" Offset="0x1A18" />
|
||||
<DList Name="gGaroMasterRobeFrontDL" Offset="0x1B00" />
|
||||
<DList Name="gGaroMasterRobeRightDL" Offset="0x1C48" />
|
||||
<DList Name="gGaroMasterRobeLeftDL" Offset="0x1D78" />
|
||||
<DList Name="gGaroMasterRobeBackDL" Offset="0x1EA8" />
|
||||
<DList Name="gGaroMasterRightArmDL" Offset="0x1FA8" />
|
||||
<DList Name="gGaroMasterRightSwordDL" Offset="0x1FF8" />
|
||||
<DList Name="gGaroMasterLeftArmDL" Offset="0x20B0" />
|
||||
<DList Name="gGaroMasterLeftSwordDL" Offset="0x2100" />
|
||||
|
||||
<!-- Garo Master Textures -->
|
||||
<Texture Name="gGaroMasterUnusedLegWrappingTex" OutName="garo_master_unused_leg_wrapping" Format="rgba16" Width="8" Height="16" Offset="0x21B8" /> <!-- unused duplicate of gGaroLegWrappingTex -->
|
||||
<Texture Name="gGaroMasterRobeFrontTex" OutName="garo_master_robe_front" Format="rgba16" Width="16" Height="16" Offset="0x22B8" />
|
||||
<Texture Name="gGaroMasterShinTex" OutName="garo_master_shin" Format="rgba16" Width="8" Height="16" Offset="0x24B8" />
|
||||
<Texture Name="gGaroMasterDuplicateEyeTex" OutName="garo_master_duplicate_eye" Format="rgba16" Width="8" Height="8" Offset="0x25B8" /> <!-- unused duplicate of gGaroMasterEyeTex -->
|
||||
<Texture Name="gGaroMasterSwordTex" OutName="garo_master_sword" Format="rgba16" Width="4" Height="4" Offset="0x2638" />
|
||||
<Texture Name="gGaroMasterRobeTex" OutName="garo_master_robe" Format="rgba16" Width="8" Height="32" Offset="0x2658" />
|
||||
<Texture Name="gGaroMasterClothingTLUT" OutName="garo_master_clothing_tlut" Format="rgba16" Width="16" Height="16" Offset="0x2858" />
|
||||
<Texture Name="gGaroMasterMaskTLUT" OutName="garo_master_mask_tlut" Format="rgba16" Width="16" Height="16" Offset="0x2A58" />
|
||||
<Texture Name="gGaroMasterClothingTex" OutName="garo_master_clothing" Format="ci8" Width="16" Height="16" Offset="0x2C58" />
|
||||
<Texture Name="gGaroMasterMaskTex" OutName="garo_master_mask" Format="ci8" Width="16" Height="16" Offset="0x2D58" />
|
||||
|
||||
<!-- Garo Master Eyes Texture and DisplayList -->
|
||||
<DList Name="gGaroMasterEyesDL" Offset="0x2ED8" />
|
||||
<Texture Name="gGaroMasterEyeTex" OutName="garo_master_eye" Format="rgba16" Width="8" Height="8" Offset="0x2FB8" />
|
||||
|
||||
<!-- Garo Master Limbs -->
|
||||
<Limb Name="gGaroMasterRootLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_ROOT" Offset="0x3038" />
|
||||
<Limb Name="gGaroMasterTorsoLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_TORSO" Offset="0x3044" />
|
||||
<Limb Name="gGaroMasterLeftArmLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_LEFT_ARM" Offset="0x3050" /> <!-- Renders a single triangle instead of a normal-looking limb -->
|
||||
<Limb Name="gGaroMasterLeftSwordLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_LEFT_SWORD" Offset="0x305C" />
|
||||
<Limb Name="gGaroMasterRightArmLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_RIGHT_ARM" Offset="0x3068" /> <!-- Renders a single triangle instead of a normal-looking limb -->
|
||||
<Limb Name="gGaroMasterRightSwordLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_RIGHT_SWORD" Offset="0x3074" />
|
||||
<Limb Name="gGaroMasterRobeTopLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_ROBE_TOP" Offset="0x3080" />
|
||||
<Limb Name="gGaroMasterRobeBackLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_ROBE_BACK" Offset="0x308C" />
|
||||
<Limb Name="gGaroMasterRobeLeftLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_ROBE_LEFT" Offset="0x3098" />
|
||||
<Limb Name="gGaroMasterRobeRightLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_ROBE_RIGHT" Offset="0x30A4" />
|
||||
<Limb Name="gGaroMasterRobeFrontLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_ROBE_FRONT" Offset="0x30B0" />
|
||||
<Limb Name="gGaroMasterHeadLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_HEAD" Offset="0x30BC" />
|
||||
<Limb Name="gGaroMasterLowerBodyRootLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_LOWER_BODY_ROOT" Offset="0x30C8" />
|
||||
<Limb Name="gGaroMasterRightThighLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_RIGHT_THIGH" Offset="0x30D4" />
|
||||
<Limb Name="gGaroMasterRightShinLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_RIGHT_SHIN" Offset="0x30E0" />
|
||||
<Limb Name="gGaroMasterRightFootLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_RIGHT_FOOT" Offset="0x30EC" />
|
||||
<Limb Name="gGaroMasterLeftThighLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_LEFT_THIGH" Offset="0x30F8" />
|
||||
<Limb Name="gGaroMasterLeftShinLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_LEFT_SHIN" Offset="0x3104" />
|
||||
<Limb Name="gGaroMasterLeftFootLimb" Type="Standard" EnumName="GARO_MASTER_LIMB_LEFT_FOOT" Offset="0x3110" />
|
||||
|
||||
<!-- Garo Master Skeleton -->
|
||||
<Skeleton Name="gGaroMasterSkel" Type="Flex" LimbType="Standard" LimbNone="GARO_MASTER_LIMB_NONE" LimbMax="GARO_MASTER_LIMB_MAX" EnumName="GaroMasterLimb" Offset="0x3168" />
|
||||
|
||||
<!-- Garo and Garo Master Animations -->
|
||||
<Animation Name="gGaroStaticJumpPoseAnim" Offset="0x3238" /> <!-- Unused, one-frame long animation of the Garo jumping or falling. Original name is "jsk_pose" -->
|
||||
<Animation Name="gGaroDashAttackAnim" Offset="0x3530" /> <!-- Original name is "jso_attack1" -->
|
||||
<Animation Name="gGaroSlashStartAnim" Offset="0x378C" /> <!-- Original name is "jso_attack2" -->
|
||||
<Animation Name="gGaroSlashLoopAnim" Offset="0x38AC" /> <!-- Original name is "jso_attack_wait" -->
|
||||
<Animation Name="gGaroJumpBackAnim" Offset="0x3D5C" /> <!-- Original name is "jso_back" -->
|
||||
<Animation Name="gGaroTakeOutBombAnim" Offset="0x4018" /> <!-- Original name is "jso_bomb" -->
|
||||
<Animation Name="gGaroLandAnim" Offset="0x4384" /> <!-- Original name is "jso_chakuchiD" ("chakuchi" = "landing", "D" is probably short for "demo") -->
|
||||
<Animation Name="gGaroDamagedAnim" Offset="0x44F8" /> <!-- Original name is "jso_damage" -->
|
||||
<Animation Name="gGaroGuardAnim" Offset="0x4858" /> <!-- Original name is "jso_defense" -->
|
||||
<Animation Name="gGaroAppearAndDrawSwordsAnim" Offset="0x5778" /> <!-- Original name is "jso_demo_start" -->
|
||||
<Animation Name="gGaroFallDownAnim" Offset="0x5D5C" /> <!-- Original name is "jso_down" -->
|
||||
<Animation Name="gGaroKnockedBackAnim" Offset="0x603C" /> <!-- Original name is "jso_hajiku" ("repelled" or "bounced back") -->
|
||||
<Animation Name="gGaroTrembleAnim" Offset="0x63A4" /> <!-- Original name is "jso_henahena" (onomatopoeic for "weakly; helplessly") -->
|
||||
<Animation Name="gGaroCollapseAnim" Offset="0x67F0" /> <!-- Original name is "jso_hetari" ("to sink down to the floor") -->
|
||||
<Animation Name="gGaroDrawSwordsAnim" Offset="0x70BC" /> <!-- Original name is "jso_jakin" (possibly onomatopoeic for drawing a sword from a sheath) -->
|
||||
<Animation Name="gGaroJumpDownAnim" Offset="0x71E0" /> <!-- Original name is "jso_jumpD" -->
|
||||
<Animation Name="gGaroSpinAttackAnim" Offset="0x72AC" /> <!-- Original name is "jso_kaiten" ("rotation; turn; spin") -->
|
||||
<Animation Name="gGaroLookAroundAnim" Offset="0x788C" /> <!-- Original name is "jso_kyoro" (onomatopoeic for "looking around restlessly") -->
|
||||
<Animation Name="gGaroCowerAnim" Offset="0x7B04" /> <!-- Original name is "jso_ororo" (possibly onomatopoeic for "in a panic; helplessly" or "sobbing; tearfully") -->
|
||||
<Animation Name="gGaroAppearAnim" Offset="0x81F4" /> <!-- Original name is "jso_start" -->
|
||||
|
||||
<!-- Garo Limb DisplayLists -->
|
||||
<DList Name="gGaroLeftThighDL" Offset="0x8F50" />
|
||||
<DList Name="gGaroLeftShinDL" Offset="0x9008" />
|
||||
<DList Name="gGaroLeftFootDL" Offset="0x90C0" />
|
||||
<DList Name="gGaroRightThighDL" Offset="0x9190" />
|
||||
<DList Name="gGaroRightShinDL" Offset="0x9248" />
|
||||
<DList Name="gGaroRightFootDL" Offset="0x9300" />
|
||||
<DList Name="gGaroTorsoDL" Offset="0x93D0" /> <!-- Renders a single triangle instead of a normal-looking limb -->
|
||||
<DList Name="gGaroHeadDL" Offset="0x9428" />
|
||||
<DList Name="gGaroRobeTopDL" Offset="0x94E0" />
|
||||
<DList Name="gGaroRobeFrontDL" Offset="0x9758" />
|
||||
<DList Name="gGaroRobeRightDL" Offset="0x98C8" />
|
||||
<DList Name="gGaroRobeLeftDL" Offset="0x99B8" />
|
||||
<DList Name="gGaroRobeBackDL" Offset="0x9AA8" />
|
||||
<DList Name="gGaroRightArmDL" Offset="0x9B80" /> <!-- Renders a single triangle instead of a normal-looking limb -->
|
||||
<DList Name="gGaroRightSwordDL" Offset="0x9BD8" />
|
||||
<DList Name="gGaroLeftArmDL" Offset="0x9C98" /> <!-- Renders a single triangle instead of a normal-looking limb -->
|
||||
<DList Name="gGaroLeftSwordDL" Offset="0x9CF0" />
|
||||
|
||||
<!-- Garo Textures -->
|
||||
<Texture Name="gGaroLegWrappingTex" OutName="garo_leg_wrapping" Format="rgba16" Width="8" Height="16" Offset="0x9DB0" />
|
||||
<Texture Name="gGaroThighTex" OutName="garo_thigh" Format="rgba16" Width="8" Height="8" Offset="0x9EB0" />
|
||||
<Texture Name="gGaroRobeFrontTex" OutName="garo_robe_front" Format="rgba16" Width="16" Height="32" Offset="0x9F30" />
|
||||
<Texture Name="gGaroRobeTex" OutName="garo_robe" Format="rgba16" Width="16" Height="16" Offset="0xA330" />
|
||||
<Texture Name="gGaroRobeStitchingTex" OutName="garo_robe_stitching" Format="rgba16" Width="16" Height="8" Offset="0xA530" />
|
||||
<Texture Name="gGaroRobeTopTex" OutName="garo_robe_top" Format="rgba16" Width="8" Height="8" Offset="0xA630" />
|
||||
<Texture Name="gGaroEyesTex" OutName="garo_eyes" Format="rgba16" Width="16" Height="16" Offset="0xA6B0" />
|
||||
<Texture Name="gGaroSwordTex" OutName="garo_sword" Format="rgba16" Width="4" Height="4" Offset="0xA8B0" />
|
||||
|
||||
<!-- Garo Limbs -->
|
||||
<Limb Name="gGaroRootLimb" Type="Standard" EnumName="GARO_LIMB_ROOT" Offset="0xA8D0" />
|
||||
<Limb Name="gGaroTorsoLimb" Type="Standard" EnumName="GARO_LIMB_TORSO" Offset="0xA8DC" />
|
||||
<Limb Name="gGaroLeftArmLimb" Type="Standard" EnumName="GARO_LIMB_LEFT_ARM" Offset="0xA8E8" />
|
||||
<Limb Name="gGaroLeftSwordLimb" Type="Standard" EnumName="GARO_LIMB_LEFT_SWORD" Offset="0xA8F4" />
|
||||
<Limb Name="gGaroRightArmLimb" Type="Standard" EnumName="GARO_LIMB_RIGHT_ARM" Offset="0xA900" />
|
||||
<Limb Name="gGaroRightSwordLimb" Type="Standard" EnumName="GARO_LIMB_RIGHT_SWORD" Offset="0xA90C" />
|
||||
<Limb Name="gGaroRobeTopLimb" Type="Standard" EnumName="GARO_LIMB_ROBE_TOP" Offset="0xA918" />
|
||||
<Limb Name="gGaroRobeBackLimb" Type="Standard" EnumName="GARO_LIMB_ROBE_BACK" Offset="0xA924" />
|
||||
<Limb Name="gGaroRobeLeftLimb" Type="Standard" EnumName="GARO_LIMB_ROBE_LEFT" Offset="0xA930" />
|
||||
<Limb Name="gGaroRobeRightLimb" Type="Standard" EnumName="GARO_LIMB_ROBE_RIGHT" Offset="0xA93C" />
|
||||
<Limb Name="gGaroRobeFrontLimb" Type="Standard" EnumName="GARO_LIMB_ROBE_FRONT" Offset="0xA948" />
|
||||
<Limb Name="gGaroHeadLimb" Type="Standard" EnumName="GARO_LIMB_HEAD" Offset="0xA954" />
|
||||
<Limb Name="gGaroLowerBodyRootLimb" Type="Standard" EnumName="GARO_LIMB_LOWER_BODY_ROOT" Offset="0xA960" />
|
||||
<Limb Name="gGaroRightThighLimb" Type="Standard" EnumName="GARO_LIMB_RIGHT_THIGH" Offset="0xA96C" />
|
||||
<Limb Name="gGaroRightShinLimb" Type="Standard" EnumName="GARO_LIMB_RIGHT_SHIN" Offset="0xA978" />
|
||||
<Limb Name="gGaroRightFootLimb" Type="Standard" EnumName="GARO_LIMB_RIGHT_FOOT" Offset="0xA984" />
|
||||
<Limb Name="gGaroLeftThighLimb" Type="Standard" EnumName="GARO_LIMB_LEFT_THIGH" Offset="0xA990" />
|
||||
<Limb Name="gGaroLeftShinLimb" Type="Standard" EnumName="GARO_LIMB_LEFT_SHIN" Offset="0xA99C" />
|
||||
<Limb Name="gGaroLeftFootLimb" Type="Standard" EnumName="GARO_LIMB_LEFT_FOOT" Offset="0xA9A8" />
|
||||
|
||||
<!-- Garo Skeleton -->
|
||||
<Skeleton Name="gGaroSkel" Type="Flex" LimbType="Standard" LimbNone="GARO_LIMB_NONE" LimbMax="GARO_LIMB_MAX" EnumName="GaroLimb" Offset="0xAA00" />
|
||||
|
||||
<!-- Garo and Garo Master Animations -->
|
||||
<Animation Name="gGaroIdleAnim" Offset="0xAE80" /> <!-- Original name is "jso_wait" -->
|
||||
<Animation Name="gGaroLaughAnim" Offset="0xB1DC" /> <!-- Original name is "jso_waitD" -->
|
||||
<Animation Name="gGaroBounceAnim" Offset="0xB5F0" /> <!-- Original name is "jso_walk" -->
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
+7
-2
@@ -39,6 +39,11 @@ typedef struct {
|
||||
/* 0x8 */ s32 z;
|
||||
} Vec3i; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ f32 distance;
|
||||
/* 0x4 */ s16 angle;
|
||||
} VecPolar; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ Vec3s center;
|
||||
/* 0x6 */ s16 radius;
|
||||
@@ -49,8 +54,8 @@ typedef struct {
|
||||
/* 0xC */ f32 radius;
|
||||
} Spheref; // size = 0x10
|
||||
|
||||
/*
|
||||
The plane paramaters are of form `ax + by + cz + d = 0`
|
||||
/*
|
||||
The plane paramaters are of form `ax + by + cz + d = 0`
|
||||
where `(a,b,c)` is the plane's normal vector and d is the originDist
|
||||
*/
|
||||
typedef struct {
|
||||
|
||||
@@ -2137,8 +2137,7 @@ beginseg
|
||||
name "ovl_Obj_Grass_Unit"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Obj_Grass_Unit/z_obj_grass_unit.o"
|
||||
include "build/data/ovl_Obj_Grass_Unit/ovl_Obj_Grass_Unit.data.o"
|
||||
include "build/data/ovl_Obj_Grass_Unit/ovl_Obj_Grass_Unit.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Obj_Grass_Unit/ovl_Obj_Grass_Unit_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
||||
@@ -69,7 +69,7 @@ void BgIcicle_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, &object_icicle_Colheader_000294);
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, &gIcicleCol);
|
||||
|
||||
Collider_InitAndSetCylinder(play, &this->collider, thisx, &sCylinderInit);
|
||||
Collider_UpdateCylinder(thisx, &this->collider);
|
||||
@@ -242,5 +242,5 @@ void BgIcicle_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void BgIcicle_Draw(Actor* thisx, PlayState* play) {
|
||||
Gfx_DrawDListOpa(play, object_icicle_DL_0000D0);
|
||||
Gfx_DrawDListOpa(play, gIcicleDL);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,40 +7,52 @@
|
||||
struct ObjGrass;
|
||||
struct ObjGrassCarry;
|
||||
|
||||
typedef struct ObjGrassStruct1_1 {
|
||||
/* 0x00 */ Vec3f unk_00;
|
||||
/* 0x0C */ s16 unk_0C;
|
||||
/* 0x0E */ s8 unk_0E;
|
||||
/* 0x0F */ u8 unk_0F;
|
||||
/* 0x10 */ u8 unk_10;
|
||||
} ObjGrassStruct1_1; // size = 0x14
|
||||
#define OBJ_GRASS_NEAREST_GROUP_MAX 4
|
||||
#define OBJ_GRASS_NEAREST_ELEM_MAX 20
|
||||
|
||||
#define OBJ_GRASS_GROUP_ELEM_COUNT_MAX 12
|
||||
|
||||
#define OBJ_GRASS_GROUP_DRAW 1
|
||||
|
||||
#define OBJ_GRASS_ELEM_DRAW 1
|
||||
#define OBJ_GRASS_ELEM_ANIM 2
|
||||
#define OBJ_GRASS_ELEM_REMOVED 4
|
||||
#define OBJ_GRASS_ELEM_UNDERWATER 8
|
||||
|
||||
typedef struct ObjGrassElement {
|
||||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ s16 rotY;
|
||||
/* 0x0E */ s8 dropTable;
|
||||
/* 0x0F */ u8 flags;
|
||||
/* 0x10 */ u8 alpha;
|
||||
} ObjGrassElement; // size = 0x14
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f unk_00;
|
||||
/* 0x0C */ ObjGrassStruct1_1 unk_0C[12];
|
||||
/* 0xFC */ s16 unk_FC;
|
||||
/* 0xFE */ u8 unk_FE;
|
||||
} ObjGrassStruct1; // size = 0x100
|
||||
/* 0x00 */ Vec3f homePos;
|
||||
/* 0x0C */ ObjGrassElement elements[OBJ_GRASS_GROUP_ELEM_COUNT_MAX];
|
||||
/* 0xFC */ s16 count;
|
||||
/* 0xFE */ u8 flags;
|
||||
} ObjGrassGroup; // size = 0x100
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderCylinder collider;
|
||||
/* 0x4C */ ObjGrassStruct1_1* unk_4C;
|
||||
} ObjGrassStruct2; // size = 0x50
|
||||
/* 0x4C */ ObjGrassElement* entity;
|
||||
} ObjGrassCollider; // size = 0x50
|
||||
|
||||
typedef struct ObjGrass {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x0144 */ ObjGrassStruct1 unk_144[40];
|
||||
/* 0x2944 */ s16 unk_2944;
|
||||
/* 0x2948 */ ObjGrassStruct2 unk_2948[20];
|
||||
/* 0x2F88 */ MtxF unk_2F88[12];
|
||||
/* 0x0144 */ ObjGrassGroup grassGroups[40];
|
||||
/* 0x2944 */ s16 activeGrassGroups;
|
||||
/* 0x2948 */ ObjGrassCollider grassElemColliders[OBJ_GRASS_NEAREST_ELEM_MAX];
|
||||
/* 0x2F88 */ MtxF distortionMtx[OBJ_GRASS_GROUP_ELEM_COUNT_MAX];
|
||||
/* 0x3288 */ s16 unk_3288;
|
||||
/* 0x328A */ s16 unk_328A;
|
||||
/* 0x328C */ s16 unk_328C;
|
||||
/* 0x328E */ s16 unk_328E;
|
||||
/* 0x3290 */ s16 unk_3290;
|
||||
/* 0x3292 */ s16 unk_3292;
|
||||
/* 0x3294 */ ObjGrassStruct1_1* unk_3294;
|
||||
/* 0x3298 */ struct ObjGrassCarry* unk_3298[2];
|
||||
/* 0x3292 */ s16 activeGrassCarry;
|
||||
/* 0x3294 */ ObjGrassElement* carryGrassElem;
|
||||
/* 0x3298 */ struct ObjGrassCarry* grassCarry[2];
|
||||
} ObjGrass; // size = 0x32A0
|
||||
|
||||
#endif // Z_OBJ_GRASS_H
|
||||
|
||||
@@ -17,17 +17,17 @@ void ObjGrassCarry_Init(Actor* thisx, PlayState* play);
|
||||
void ObjGrassCarry_Destroy(Actor* thisx, PlayState* play);
|
||||
void ObjGrassCarry_Update(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_809AB3C4(ObjGrassCarry* this);
|
||||
void func_809AB3D8(ObjGrassCarry* this, PlayState* play);
|
||||
void func_809AB428(ObjGrassCarry* this);
|
||||
void func_809AB43C(ObjGrassCarry* this, PlayState* play);
|
||||
void func_809AB474(ObjGrassCarry* this);
|
||||
void func_809AB4A8(ObjGrassCarry* this, PlayState* play);
|
||||
void func_809AB5FC(ObjGrassCarry* this);
|
||||
void func_809AB610(ObjGrassCarry* this, PlayState* play);
|
||||
void func_809AB6FC(ObjGrassCarry* this);
|
||||
void func_809AB77C(ObjGrassCarry* this, PlayState* play);
|
||||
void func_809ABB7C(Actor* this, PlayState* play);
|
||||
void ObjGrassCarry_SetupAwaitSpawnManager(ObjGrassCarry* this);
|
||||
void ObjGrassCarry_AwaitSpawnManager(ObjGrassCarry* this, PlayState* play);
|
||||
void ObjGrassCarry_SetupIdle(ObjGrassCarry* this);
|
||||
void ObjGrassCarry_Idle(ObjGrassCarry* this, PlayState* play);
|
||||
void ObjGrassCarry_Reset(ObjGrassCarry* this);
|
||||
void ObjGrassCarry_Main(ObjGrassCarry* this, PlayState* play);
|
||||
void ObjGrassCarry_SetupLiftedUp(ObjGrassCarry* this);
|
||||
void ObjGrassCarry_LiftedUp(ObjGrassCarry* this, PlayState* play);
|
||||
void ObjGrassCarry_SetupFall(ObjGrassCarry* this);
|
||||
void ObjGrassCarry_Fall(ObjGrassCarry* this, PlayState* play);
|
||||
void ObjGrassCarry_Draw(Actor* this, PlayState* play);
|
||||
|
||||
ActorInit Obj_Grass_Carry_InitVars = {
|
||||
ACTOR_OBJ_GRASS_CARRY,
|
||||
@@ -61,19 +61,19 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
{ 10, 44, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
s16 D_809ABBFC = 0;
|
||||
s16 D_809ABC00 = 0;
|
||||
s16 D_809ABC04 = 0;
|
||||
s16 D_809ABC08 = 0;
|
||||
static s16 sRotSpeedXTarget = 0;
|
||||
static s16 sRotSpeedX = 0;
|
||||
static s16 sRotSpeedYTarget = 0;
|
||||
static s16 sRotSpeedY = 0;
|
||||
|
||||
Vec3f D_809ABC0C[] = {
|
||||
static Vec3f sUnitDirections[] = {
|
||||
{ 0.0f, 0.7071f, 0.7071f },
|
||||
{ 0.7071f, 0.7071f, 0.0f },
|
||||
{ 0.0f, 0.7071f, -0.7071f },
|
||||
{ -0.7071f, 0.7071f, 0.0f },
|
||||
};
|
||||
|
||||
s16 D_809ABC3C[] = { 0x6C, 0x66, 0x60, 0x54, 0x42, 0x37, 0x2A, 0x26 };
|
||||
static s16 sFragmentScales[] = { 108, 102, 96, 84, 66, 55, 42, 38 };
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_F32_DIV1000(gravity, -3200, ICHAIN_CONTINUE),
|
||||
@@ -81,69 +81,71 @@ static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 400, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
void func_809AAE60(ObjGrassCarry* this) {
|
||||
void ObjGrassCarry_UpdateVelY(ObjGrassCarry* this) {
|
||||
this->actor.velocity.y += this->actor.gravity;
|
||||
if (this->actor.velocity.y < this->actor.terminalVelocity) {
|
||||
this->actor.velocity.y = this->actor.terminalVelocity;
|
||||
}
|
||||
}
|
||||
|
||||
void func_809AAE94(Vec3f* arg0, f32 arg1) {
|
||||
arg1 += ((Rand_ZeroOne() * 0.2f) - 0.1f) * arg1;
|
||||
void ObjGrassCarry_RandScaleVecToZero(Vec3f* velocity, f32 scale) {
|
||||
scale += ((Rand_ZeroOne() * 0.2f) - 0.1f) * scale;
|
||||
|
||||
arg0->x -= (arg0->x * arg1);
|
||||
arg0->y -= (arg0->y * arg1);
|
||||
arg0->z -= (arg0->z * arg1);
|
||||
velocity->x -= velocity->x * scale;
|
||||
velocity->y -= velocity->y * scale;
|
||||
velocity->z -= velocity->z * scale;
|
||||
}
|
||||
|
||||
void func_809AAF18(ObjGrassCarry* this) {
|
||||
func_809AAE60(this);
|
||||
func_809AAE94(&this->actor.velocity, 0.05f);
|
||||
void ObjGrassCarry_UpdatePos(ObjGrassCarry* this) {
|
||||
ObjGrassCarry_UpdateVelY(this);
|
||||
ObjGrassCarry_RandScaleVecToZero(&this->actor.velocity, 0.05f);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
}
|
||||
|
||||
void func_809AAF58(ObjGrassCarry* this, PlayState* play) {
|
||||
void ObjGrassCarry_UpdateBgCheckInfo(ObjGrassCarry* this, PlayState* play) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 7.5f, 35.0f, 0.0f,
|
||||
UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_4 | UPDBGCHECKINFO_FLAG_40 |
|
||||
UPDBGCHECKINFO_FLAG_80);
|
||||
}
|
||||
|
||||
void func_809AAF9C(Vec3f* arg0, s16 arg1, PlayState* play) {
|
||||
if (!(arg1 & 0x10)) {
|
||||
Item_DropCollectibleRandom(play, NULL, arg0, arg1 * 0x10);
|
||||
void ObjGrassCarry_DropCollectible(Vec3f* pos, s16 dropTable, PlayState* play) {
|
||||
if ((dropTable & 0x10) == 0) {
|
||||
Item_DropCollectibleRandom(play, NULL, pos, dropTable * 0x10);
|
||||
}
|
||||
}
|
||||
|
||||
void func_809AAFE8(Vec3f* arg0, PlayState* play) {
|
||||
Vec3f spBC;
|
||||
Vec3f spB0;
|
||||
void ObjGrassCarry_SpawnFragments(Vec3f* basePos, PlayState* play) {
|
||||
Vec3f velocity;
|
||||
Vec3f pos;
|
||||
s32 i;
|
||||
Vec3f* ptr;
|
||||
Vec3f* dir;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_809ABC0C); i++) {
|
||||
ptr = &D_809ABC0C[i];
|
||||
for (i = 0; i < ARRAY_COUNT(sUnitDirections); i++) {
|
||||
dir = &sUnitDirections[i];
|
||||
|
||||
spB0.x = arg0->x + (ptr->x * 8.0f);
|
||||
spB0.y = arg0->y + (ptr->y * 8.0f) + 10.0f;
|
||||
spB0.z = arg0->z + (ptr->z * 8.0f);
|
||||
pos.x = basePos->x + (dir->x * 8.0f);
|
||||
pos.y = basePos->y + (dir->y * 8.0f) + 10.0f;
|
||||
pos.z = basePos->z + (dir->z * 8.0f);
|
||||
|
||||
spBC.x = (Rand_ZeroOne() - 0.5f) * 8.0f;
|
||||
spBC.y = Rand_ZeroOne() * 10.0f;
|
||||
spBC.z = (Rand_ZeroOne() - 0.5f) * 8.0f;
|
||||
velocity.x = (Rand_ZeroOne() - 0.5f) * 8.0f;
|
||||
velocity.y = Rand_ZeroOne() * 10.0f;
|
||||
velocity.z = (Rand_ZeroOne() - 0.5f) * 8.0f;
|
||||
|
||||
EffectSsKakera_Spawn(play, &spB0, &spBC, &spB0, -100, 64, 40, 3, 0,
|
||||
D_809ABC3C[(s32)(Rand_ZeroOne() * 111.1f) & 7], 0, 0, 80, -1, 1, gKakeraLeafMiddleDL);
|
||||
EffectSsKakera_Spawn(play, &pos, &velocity, &pos, -100, 64, 40, 3, 0,
|
||||
sFragmentScales[(s32)(Rand_ZeroOne() * 111.1f) & 7], 0, 0, 80, -1, GAMEPLAY_KEEP,
|
||||
gKakeraLeafMiddleDL);
|
||||
|
||||
spB0.x = arg0->x + (ptr->x * 16.0f);
|
||||
spB0.y = arg0->y + (ptr->y * 16.0f) + 10.0f;
|
||||
spB0.z = arg0->z + (ptr->z * 16.0f);
|
||||
pos.x = basePos->x + (dir->x * 16.0f);
|
||||
pos.y = basePos->y + (dir->y * 16.0f) + 10.0f;
|
||||
pos.z = basePos->z + (dir->z * 16.0f);
|
||||
|
||||
spBC.x = (Rand_ZeroOne() - 0.5f) * 6.0f;
|
||||
spBC.y = Rand_ZeroOne() * 10.0f;
|
||||
spBC.z = (Rand_ZeroOne() - 0.5f) * 6.0f;
|
||||
velocity.x = (Rand_ZeroOne() - 0.5f) * 6.0f;
|
||||
velocity.y = Rand_ZeroOne() * 10.0f;
|
||||
velocity.z = (Rand_ZeroOne() - 0.5f) * 6.0f;
|
||||
|
||||
EffectSsKakera_Spawn(play, &spB0, &spBC, &spB0, -100, 64, 40, 3, 0,
|
||||
D_809ABC3C[(s32)(Rand_ZeroOne() * 111.1f) % 7], 0, 0, 80, -1, 1, gKakeraLeafTipDL);
|
||||
EffectSsKakera_Spawn(play, &pos, &velocity, &pos, -100, 64, 40, 3, 0,
|
||||
sFragmentScales[(s32)(Rand_ZeroOne() * 111.1f) % 7], 0, 0, 80, -1, GAMEPLAY_KEEP,
|
||||
gKakeraLeafTipDL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +156,7 @@ void ObjGrassCarry_Init(Actor* thisx, PlayState* play) {
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->actor.colChkInfo.mass = 80;
|
||||
func_809AB3C4(this);
|
||||
ObjGrassCarry_SetupAwaitSpawnManager(this);
|
||||
}
|
||||
|
||||
void ObjGrassCarry_Destroy(Actor* thisx, PlayState* play) {
|
||||
@@ -162,73 +164,69 @@ void ObjGrassCarry_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
||||
Collider_DestroyCylinder(play, &this->collider);
|
||||
|
||||
if (this->unk_190 != NULL) {
|
||||
ObjGrassCarry** carry = &this->unk_190->unk_3298[this->actor.params];
|
||||
if (this->grassManager != NULL) {
|
||||
ObjGrassCarry** carry = &this->grassManager->grassCarry[this->actor.params];
|
||||
|
||||
if (this == *carry) {
|
||||
*carry = NULL;
|
||||
this->unk_190 = NULL;
|
||||
this->grassManager = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_809AB3C4(ObjGrassCarry* this) {
|
||||
this->actionFunc = func_809AB3D8;
|
||||
void ObjGrassCarry_SetupAwaitSpawnManager(ObjGrassCarry* this) {
|
||||
this->actionFunc = ObjGrassCarry_AwaitSpawnManager;
|
||||
}
|
||||
|
||||
void func_809AB3D8(ObjGrassCarry* this, PlayState* play) {
|
||||
if (this->unk_190 != NULL) {
|
||||
if (this->actor.params != this->unk_190->unk_3292) {
|
||||
func_809AB474(this);
|
||||
void ObjGrassCarry_AwaitSpawnManager(ObjGrassCarry* this, PlayState* play) {
|
||||
if (this->grassManager != NULL) {
|
||||
if (this->actor.params != this->grassManager->activeGrassCarry) {
|
||||
ObjGrassCarry_Reset(this);
|
||||
} else {
|
||||
func_809AB428(this);
|
||||
ObjGrassCarry_SetupIdle(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_809AB428(ObjGrassCarry* this) {
|
||||
this->actionFunc = func_809AB43C;
|
||||
void ObjGrassCarry_SetupIdle(ObjGrassCarry* this) {
|
||||
this->actionFunc = ObjGrassCarry_Idle;
|
||||
}
|
||||
|
||||
void func_809AB43C(ObjGrassCarry* this, PlayState* play) {
|
||||
if (this->actor.params != this->unk_190->unk_3292) {
|
||||
func_809AB474(this);
|
||||
void ObjGrassCarry_Idle(ObjGrassCarry* this, PlayState* play) {
|
||||
if (this->actor.params != this->grassManager->activeGrassCarry) {
|
||||
ObjGrassCarry_Reset(this);
|
||||
}
|
||||
}
|
||||
|
||||
void func_809AB474(ObjGrassCarry* this) {
|
||||
this->actor.shape.rot.z = 0;
|
||||
this->actionFunc = func_809AB4A8;
|
||||
this->unk_194 = NULL;
|
||||
this->actor.shape.rot.y = this->actor.shape.rot.z;
|
||||
this->actor.shape.rot.x = this->actor.shape.rot.z;
|
||||
this->actor.world.rot.z = this->actor.shape.rot.z;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.z;
|
||||
this->actor.world.rot.x = this->actor.shape.rot.z;
|
||||
void ObjGrassCarry_Reset(ObjGrassCarry* this) {
|
||||
this->actionFunc = ObjGrassCarry_Main;
|
||||
this->grassElem = NULL;
|
||||
this->actor.world.rot.x = this->actor.world.rot.y = this->actor.world.rot.z = this->actor.shape.rot.x =
|
||||
this->actor.shape.rot.y = this->actor.shape.rot.z = 0;
|
||||
}
|
||||
|
||||
void func_809AB4A8(ObjGrassCarry* this, PlayState* play) {
|
||||
void ObjGrassCarry_Main(ObjGrassCarry* this, PlayState* play) {
|
||||
Actor* thisx = &this->actor;
|
||||
|
||||
if (Actor_HasParent(thisx, play)) {
|
||||
func_809AB5FC(this);
|
||||
if (this->unk_194 != NULL) {
|
||||
this->unk_194->unk_0F |= 4;
|
||||
ObjGrassCarry_SetupLiftedUp(this);
|
||||
if (this->grassElem != NULL) {
|
||||
this->grassElem->flags |= OBJ_GRASS_ELEM_REMOVED;
|
||||
}
|
||||
thisx->draw = func_809ABB7C;
|
||||
thisx->draw = ObjGrassCarry_Draw;
|
||||
thisx->shape.shadowDraw = ActorShadow_DrawCircle;
|
||||
thisx->shape.shadowAlpha = 60;
|
||||
thisx->shape.shadowScale = 1.0f;
|
||||
this->unk_190->unk_3292 ^= 1;
|
||||
this->grassManager->activeGrassCarry ^= 1;
|
||||
thisx->room = -1;
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &thisx->world.pos, 20, NA_SE_PL_PULL_UP_PLANT);
|
||||
} else if (this->unk_190->unk_3294 != NULL) {
|
||||
} else if (this->grassManager->carryGrassElem != NULL) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
this->unk_194 = this->unk_190->unk_3294;
|
||||
Math_Vec3f_Copy(&thisx->world.pos, &this->unk_194->unk_00);
|
||||
thisx->shape.rot.y = thisx->world.rot.y = this->unk_194->unk_0C;
|
||||
this->unk_198 = this->unk_194->unk_0E;
|
||||
this->grassElem = this->grassManager->carryGrassElem;
|
||||
Math_Vec3f_Copy(&thisx->world.pos, &this->grassElem->pos);
|
||||
thisx->shape.rot.y = thisx->world.rot.y = this->grassElem->rotY;
|
||||
this->dropTable = this->grassElem->dropTable;
|
||||
thisx->xzDistToPlayer = Actor_WorldDistXZToActor(&this->actor, &player->actor);
|
||||
thisx->playerHeightRel = Actor_HeightDiff(&this->actor, &player->actor);
|
||||
thisx->xyzDistToPlayerSq = SQ(thisx->xzDistToPlayer) + SQ(thisx->playerHeightRel);
|
||||
@@ -237,87 +235,88 @@ void func_809AB4A8(ObjGrassCarry* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_809AB5FC(ObjGrassCarry* this) {
|
||||
this->actionFunc = func_809AB610;
|
||||
void ObjGrassCarry_SetupLiftedUp(ObjGrassCarry* this) {
|
||||
this->actionFunc = ObjGrassCarry_LiftedUp;
|
||||
}
|
||||
|
||||
void func_809AB610(ObjGrassCarry* this, PlayState* play) {
|
||||
void ObjGrassCarry_LiftedUp(ObjGrassCarry* this, PlayState* play) {
|
||||
s32 pad;
|
||||
Vec3f sp30;
|
||||
s32 sp2C;
|
||||
|
||||
if (Actor_HasNoParent(&this->actor, play)) {
|
||||
func_809AB6FC(this);
|
||||
ObjGrassCarry_SetupFall(this);
|
||||
this->actor.velocity.x = Math_SinS(this->actor.world.rot.y) * this->actor.speed;
|
||||
this->actor.velocity.z = Math_CosS(this->actor.world.rot.y) * this->actor.speed;
|
||||
this->actor.gravity = -0.1f;
|
||||
this->actor.terminalVelocity = -17.0f;
|
||||
func_809AAF18(this);
|
||||
func_809AAF58(this, play);
|
||||
ObjGrassCarry_UpdatePos(this);
|
||||
ObjGrassCarry_UpdateBgCheckInfo(this, play);
|
||||
this->actor.gravity = -3.2f;
|
||||
} else {
|
||||
sp30.x = this->actor.world.pos.x;
|
||||
sp30.y = this->actor.world.pos.y + 20.0f;
|
||||
sp30.z = this->actor.world.pos.z;
|
||||
Vec3f pos;
|
||||
s32 bgId;
|
||||
|
||||
pos.x = this->actor.world.pos.x;
|
||||
pos.y = this->actor.world.pos.y + 20.0f;
|
||||
pos.z = this->actor.world.pos.z;
|
||||
this->actor.floorHeight =
|
||||
BgCheck_EntityRaycastFloor5(&play->colCtx, &this->actor.floorPoly, &sp2C, &this->actor, &sp30);
|
||||
BgCheck_EntityRaycastFloor5(&play->colCtx, &this->actor.floorPoly, &bgId, &this->actor, &pos);
|
||||
}
|
||||
}
|
||||
|
||||
void func_809AB6FC(ObjGrassCarry* this) {
|
||||
this->actionFunc = func_809AB77C;
|
||||
D_809ABBFC = -0xBB8;
|
||||
D_809ABC04 = (Rand_ZeroOne() - 0.5f) * 1600.0f;
|
||||
D_809ABC00 = 0;
|
||||
D_809ABC08 = 0;
|
||||
this->unk_19A = 60;
|
||||
void ObjGrassCarry_SetupFall(ObjGrassCarry* this) {
|
||||
this->actionFunc = ObjGrassCarry_Fall;
|
||||
sRotSpeedXTarget = -0xBB8;
|
||||
sRotSpeedYTarget = (Rand_ZeroOne() - 0.5f) * 1600.0f;
|
||||
sRotSpeedX = 0;
|
||||
sRotSpeedY = 0;
|
||||
this->fallTimer = 60;
|
||||
}
|
||||
|
||||
void func_809AB77C(ObjGrassCarry* this, PlayState* play) {
|
||||
s16 phi_s0;
|
||||
s32 temp_v0 = (this->collider.base.atFlags & AT_HIT) != 0;
|
||||
Vec3f sp5C;
|
||||
void ObjGrassCarry_Fall(ObjGrassCarry* this, PlayState* play) {
|
||||
s16 angle;
|
||||
s32 atHit = (this->collider.base.atFlags & AT_HIT) != 0;
|
||||
Vec3f pos;
|
||||
s32 i;
|
||||
|
||||
if (temp_v0) {
|
||||
if (atHit) {
|
||||
this->collider.base.atFlags &= ~AT_HIT;
|
||||
}
|
||||
|
||||
this->unk_19A--;
|
||||
this->fallTimer--;
|
||||
|
||||
if ((this->actor.bgCheckFlags & (BGCHECKFLAG_GROUND | BGCHECKFLAG_GROUND_TOUCH | BGCHECKFLAG_WALL)) || temp_v0 ||
|
||||
(this->unk_19A <= 0)) {
|
||||
func_809AAFE8(&this->actor.world.pos, play);
|
||||
func_809AAF9C(&this->actor.world.pos, this->unk_198, play);
|
||||
if ((this->actor.bgCheckFlags & (BGCHECKFLAG_GROUND | BGCHECKFLAG_GROUND_TOUCH | BGCHECKFLAG_WALL)) || atHit ||
|
||||
(this->fallTimer <= 0)) {
|
||||
ObjGrassCarry_SpawnFragments(&this->actor.world.pos, play);
|
||||
ObjGrassCarry_DropCollectible(&this->actor.world.pos, this->dropTable, play);
|
||||
|
||||
this->actor.draw = NULL;
|
||||
this->actor.shape.shadowDraw = NULL;
|
||||
|
||||
if (this->unk_190 != NULL) {
|
||||
this->actor.room = this->unk_190->actor.room;
|
||||
if (this->grassManager != NULL) {
|
||||
this->actor.room = this->grassManager->actor.room;
|
||||
}
|
||||
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_WATER)) {
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EV_PLANT_BROKEN);
|
||||
}
|
||||
func_809AB428(this);
|
||||
ObjGrassCarry_SetupIdle(this);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WATER_TOUCH) {
|
||||
sp5C.y = this->actor.world.pos.y + this->actor.depthInWater;
|
||||
pos.y = this->actor.world.pos.y + this->actor.depthInWater;
|
||||
|
||||
for (phi_s0 = 0, i = 0; i < 4; i++, phi_s0 += 0x4000) {
|
||||
sp5C.x = (Math_SinS((s32)(Rand_ZeroOne() * 7200.0f) + phi_s0) * 15.0f) + this->actor.world.pos.x;
|
||||
sp5C.z = (Math_CosS((s32)(Rand_ZeroOne() * 7200.0f) + phi_s0) * 15.0f) + this->actor.world.pos.z;
|
||||
EffectSsGSplash_Spawn(play, &sp5C, NULL, NULL, 0, 190);
|
||||
for (angle = 0, i = 0; i < 4; i++, angle += 0x4000) {
|
||||
pos.x = (Math_SinS((s32)(Rand_ZeroOne() * 7200.0f) + angle) * 15.0f) + this->actor.world.pos.x;
|
||||
pos.z = (Math_CosS((s32)(Rand_ZeroOne() * 7200.0f) + angle) * 15.0f) + this->actor.world.pos.z;
|
||||
EffectSsGSplash_Spawn(play, &pos, NULL, NULL, 0, 190);
|
||||
}
|
||||
|
||||
sp5C.x = this->actor.world.pos.x;
|
||||
sp5C.z = this->actor.world.pos.z;
|
||||
pos.x = this->actor.world.pos.x;
|
||||
pos.z = this->actor.world.pos.z;
|
||||
|
||||
EffectSsGSplash_Spawn(play, &sp5C, NULL, NULL, 0, 280);
|
||||
EffectSsGRipple_Spawn(play, &sp5C, 300, 700, 0);
|
||||
EffectSsGSplash_Spawn(play, &pos, NULL, NULL, 0, 280);
|
||||
EffectSsGRipple_Spawn(play, &pos, 300, 700, 0);
|
||||
|
||||
this->actor.terminalVelocity = -3.0f;
|
||||
this->actor.velocity.x *= 0.1f;
|
||||
@@ -325,20 +324,20 @@ void func_809AB77C(ObjGrassCarry* this, PlayState* play) {
|
||||
this->actor.velocity.z *= 0.1f;
|
||||
this->actor.gravity *= 0.5f;
|
||||
|
||||
D_809ABC00 = D_809ABC00 >> 1;
|
||||
D_809ABBFC = D_809ABBFC >> 1;
|
||||
D_809ABC08 = D_809ABC08 >> 1;
|
||||
D_809ABC04 = D_809ABC04 >> 1;
|
||||
sRotSpeedX >>= 1;
|
||||
sRotSpeedXTarget >>= 1;
|
||||
sRotSpeedY >>= 1;
|
||||
sRotSpeedYTarget >>= 1;
|
||||
this->actor.bgCheckFlags &= ~BGCHECKFLAG_WATER_TOUCH;
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
|
||||
}
|
||||
|
||||
Math_StepToS(&D_809ABC00, D_809ABBFC, 0x1F4);
|
||||
Math_StepToS(&D_809ABC08, D_809ABC04, 0xAA);
|
||||
this->actor.shape.rot.x += D_809ABC00;
|
||||
this->actor.shape.rot.y += D_809ABC08;
|
||||
func_809AAF18(this);
|
||||
func_809AAF58(this, play);
|
||||
Math_StepToS(&sRotSpeedX, sRotSpeedXTarget, 0x1F4);
|
||||
Math_StepToS(&sRotSpeedY, sRotSpeedYTarget, 0xAA);
|
||||
this->actor.shape.rot.x += sRotSpeedX;
|
||||
this->actor.shape.rot.y += sRotSpeedY;
|
||||
ObjGrassCarry_UpdatePos(this);
|
||||
ObjGrassCarry_UpdateBgCheckInfo(this, play);
|
||||
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
@@ -348,8 +347,8 @@ void func_809AB77C(ObjGrassCarry* this, PlayState* play) {
|
||||
void ObjGrassCarry_Update(Actor* thisx, PlayState* play) {
|
||||
ObjGrassCarry* this = THIS;
|
||||
|
||||
if (this->unk_190 == NULL) {
|
||||
if ((this->actionFunc != func_809AB610) && (this->actionFunc != func_809AB77C)) {
|
||||
if (this->grassManager == NULL) {
|
||||
if ((this->actionFunc != ObjGrassCarry_LiftedUp) && (this->actionFunc != ObjGrassCarry_Fall)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
@@ -358,6 +357,6 @@ void ObjGrassCarry_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
}
|
||||
|
||||
void func_809ABB7C(Actor* this, PlayState* play) {
|
||||
void ObjGrassCarry_Draw(Actor* this, PlayState* play) {
|
||||
Gfx_DrawDListOpa(play, gKusaBushType1DL);
|
||||
}
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
|
||||
struct ObjGrassCarry;
|
||||
struct ObjGrass;
|
||||
struct ObjGrassStruct1_1;
|
||||
struct ObjGrassElement;
|
||||
|
||||
typedef void (*ObjGrassCarryActionFunc)(struct ObjGrassCarry*, PlayState*);
|
||||
|
||||
typedef struct ObjGrassCarry {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ ColliderCylinder collider;
|
||||
/* 0x190 */ struct ObjGrass* unk_190;
|
||||
/* 0x194 */ struct ObjGrassStruct1_1* unk_194;
|
||||
/* 0x198 */ s16 unk_198;
|
||||
/* 0x19A */ s16 unk_19A;
|
||||
/* 0x190 */ struct ObjGrass* grassManager;
|
||||
/* 0x194 */ struct ObjGrassElement* grassElem;
|
||||
/* 0x198 */ s16 dropTable;
|
||||
/* 0x19A */ s16 fallTimer;
|
||||
/* 0x19C */ ObjGrassCarryActionFunc actionFunc;
|
||||
} ObjGrassCarry; // size = 0x1A0
|
||||
|
||||
|
||||
@@ -1,38 +1,168 @@
|
||||
/*
|
||||
* File: z_obj_grass_unit.c
|
||||
* Overlay: ovl_Obj_Grass_Unit
|
||||
* Description: Spawner for circular patch of grass
|
||||
* Description: Initializes a pattern of grass to be passed to an ObjGrass instance.
|
||||
*
|
||||
* ObjGrassUnit instances are intended to be spawned from room data so that just one ObjGrass instance manages the grass
|
||||
* for that room. When a room with ObjGrassUnit spawns loads, it allocates ovl_Obj_Grass_Unit and creates N instances of
|
||||
* ObjGrassUnit. The first instance processed initializes sGrassManager, then all instances live on that cycle pass type
|
||||
* and position data to that ObjGrass instance before calling Actor_Kill. Since ovl_Obj_Grass_Unit uses
|
||||
* ALLOCTYPE_NORMAL, it is deleted and loses the reference to the newly created ObjGrass. This allows for ObjGrassUnit
|
||||
* spawned in a different room to be associated to a new ObjGrass instance.
|
||||
*/
|
||||
|
||||
#include "z_obj_grass_unit.h"
|
||||
#include "overlays/actors/ovl_Obj_Grass/z_obj_grass.h"
|
||||
#include "overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.h"
|
||||
|
||||
#define FLAGS 0x00000000
|
||||
|
||||
#define THIS ((ObjGrassUnit*)thisx)
|
||||
|
||||
void ObjGrassUnit_Init(Actor* thisx, PlayState* play);
|
||||
void ObjGrassUnit_Init(Actor* this, PlayState* play2);
|
||||
|
||||
#if 0
|
||||
ActorInit Obj_Grass_Unit_InitVars = {
|
||||
ACTOR_OBJ_GRASS_UNIT,
|
||||
ACTORCAT_BG,
|
||||
FLAGS,
|
||||
GAMEPLAY_FIELD_KEEP,
|
||||
sizeof(ObjGrassUnit),
|
||||
(ActorFunc)ObjGrassUnit_Init,
|
||||
(ActorFunc)Actor_Noop,
|
||||
(ActorFunc)Actor_Noop,
|
||||
(ActorFunc)NULL,
|
||||
ACTOR_OBJ_GRASS_UNIT, ACTORCAT_BG, FLAGS,
|
||||
GAMEPLAY_FIELD_KEEP, sizeof(ObjGrassUnit), (ActorFunc)ObjGrassUnit_Init,
|
||||
(ActorFunc)Actor_Noop, (ActorFunc)Actor_Noop, (ActorFunc)NULL,
|
||||
};
|
||||
|
||||
#endif
|
||||
// Neat circular pattern with a single bush in the center
|
||||
static VecPolar sGrassPatternCircle[] = {
|
||||
{ 0.0f, 0x0000 }, { 80.0f, 0x0000 }, { 80.0f, 0x2000 }, { 80.0f, 0x4000 }, { 80.0f, 0x6000 },
|
||||
{ 80.0f, 0x8000 }, { 80.0f, 0xA000 }, { 80.0f, 0xC000 }, { 80.0f, 0xE000 },
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Grass_Unit/func_809ABDE0.s")
|
||||
// "Random" looking pattern
|
||||
static VecPolar sGrassPatternMixed[] = {
|
||||
{ 40.0f, 0x0666 }, { 40.0f, 0x2CCC }, { 40.0f, 0x5999 }, { 40.0f, 0x8667 }, { 20.0f, 0xC000 }, { 80.0f, 0x1333 },
|
||||
{ 80.0f, 0x4000 }, { 80.0f, 0x6CCC }, { 80.0f, 0x9334 }, { 80.0f, 0xACCD }, { 80.0f, 0xC667 }, { 60.0f, 0xE000 },
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Grass_Unit/func_809ABE54.s")
|
||||
typedef struct {
|
||||
/* 0x0 */ s32 count;
|
||||
/* 0x4 */ VecPolar* positions;
|
||||
} ObjGrassUnitPattern; // size = 0x8
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Grass_Unit/func_809ABEC4.s")
|
||||
static ObjGrassUnitPattern sGrassPatterns[2] = {
|
||||
{ ARRAY_COUNT(sGrassPatternCircle), sGrassPatternCircle },
|
||||
{ ARRAY_COUNT(sGrassPatternMixed), sGrassPatternMixed },
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Grass_Unit/func_809ABF38.s")
|
||||
ObjGrass* sGrassManager = NULL;
|
||||
ObjGrassCarry* sGrassCarry0 = NULL;
|
||||
ObjGrassCarry* sGrassCarry1 = NULL;
|
||||
s32 sInitialized = false;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Grass_Unit/ObjGrassUnit_Init.s")
|
||||
s32 ObjGrassUnit_SpawnObjGrass(Actor* this, PlayState* play) {
|
||||
sGrassManager = (ObjGrass*)Actor_Spawn(&play->actorCtx, play, ACTOR_OBJ_GRASS, 0.0f, 0.0f, 0.0f, 0, 0, 0, -1);
|
||||
if (sGrassManager != NULL) {
|
||||
sGrassManager->actor.room = this->room;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 ObjGrassUnit_SpawnObjGrassCarry0(Actor* this, PlayState* play) {
|
||||
sGrassCarry0 =
|
||||
(ObjGrassCarry*)Actor_Spawn(&play->actorCtx, play, ACTOR_OBJ_GRASS_CARRY, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0);
|
||||
if (sGrassCarry0 != NULL) {
|
||||
sGrassCarry0->actor.room = this->room;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 ObjGrassUnit_SpawnObjGrassCarry1(Actor* this, PlayState* play) {
|
||||
sGrassCarry1 =
|
||||
(ObjGrassCarry*)Actor_Spawn(&play->actorCtx, play, ACTOR_OBJ_GRASS_CARRY, 0.0f, 0.0f, 0.0f, 0, 0, 0, 1);
|
||||
if (sGrassCarry1 != NULL) {
|
||||
sGrassCarry1->actor.room = this->room;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 ObjGrassUnit_IsUnderwater(PlayState* play, Vec3f* pos) {
|
||||
WaterBox* waterBox;
|
||||
f32 ySurface;
|
||||
s32 bgId;
|
||||
|
||||
if (WaterBox_GetSurfaceImpl(play, &play->colCtx, pos->x, pos->z, &ySurface, &waterBox, &bgId) &&
|
||||
(pos->y < ySurface)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ObjGrassUnit_Init(Actor* this, PlayState* play2) {
|
||||
PlayState* play = play2;
|
||||
ObjGrassGroup* grassGroup;
|
||||
ObjGrass* grassManager;
|
||||
f32 homePosYSum;
|
||||
f32 tmp;
|
||||
s32 i;
|
||||
VecPolar* grassPos;
|
||||
CollisionPoly* poly;
|
||||
s32 bgId;
|
||||
ObjGrassElement* grassElem;
|
||||
ObjGrassUnitPattern* grassPattern;
|
||||
s8 dropTable = OBJGRASSUNIT_GET_DROPTABLE(this);
|
||||
|
||||
if ((sGrassManager == NULL) && !ObjGrassUnit_SpawnObjGrass(this, play)) {
|
||||
Actor_Kill(this);
|
||||
return;
|
||||
}
|
||||
if ((sGrassCarry0 == NULL) && ObjGrassUnit_SpawnObjGrassCarry0(this, play)) {
|
||||
sGrassCarry0->grassManager = sGrassManager;
|
||||
}
|
||||
if ((sGrassCarry1 == NULL) && ObjGrassUnit_SpawnObjGrassCarry1(this, play)) {
|
||||
sGrassCarry1->grassManager = sGrassManager;
|
||||
}
|
||||
if (!sInitialized && (sGrassManager != NULL) && (sGrassCarry0 != NULL) && (sGrassCarry1 != NULL)) {
|
||||
sInitialized = true;
|
||||
sGrassManager->grassCarry[0] = sGrassCarry0;
|
||||
sGrassManager->grassCarry[1] = sGrassCarry1;
|
||||
sGrassCarry0->grassManager = sGrassManager;
|
||||
sGrassCarry1->grassManager = sGrassManager;
|
||||
}
|
||||
|
||||
grassManager = sGrassManager;
|
||||
if (sGrassManager->activeGrassGroups >= ARRAY_COUNT(sGrassManager->grassGroups)) {
|
||||
Actor_Kill(this);
|
||||
return;
|
||||
}
|
||||
|
||||
homePosYSum = 0.0f;
|
||||
grassGroup = &grassManager->grassGroups[sGrassManager->activeGrassGroups];
|
||||
grassGroup->count = 0;
|
||||
grassPattern = &sGrassPatterns[OBJGRASSUNIT_GET_PATTERN(this)];
|
||||
|
||||
for (i = 0; i < grassPattern->count; i++) {
|
||||
grassElem = &grassGroup->elements[grassGroup->count];
|
||||
grassPos = &grassPattern->positions[i];
|
||||
|
||||
grassElem->pos.x = (Math_CosS((this->home.rot.y + grassPos->angle)) * grassPos->distance) + this->home.pos.x;
|
||||
grassElem->pos.y = this->home.pos.y + 100.0f;
|
||||
grassElem->pos.z = (Math_SinS((this->home.rot.y + grassPos->angle)) * grassPos->distance) + this->home.pos.z;
|
||||
|
||||
grassElem->pos.y = BgCheck_EntityRaycastFloor5(&play->colCtx, &poly, &bgId, this, &grassElem->pos);
|
||||
tmp = grassElem->pos.y - this->home.pos.y;
|
||||
if ((fabsf(tmp) < 80.0f) && (grassElem->pos.y > BGCHECK_Y_MIN)) {
|
||||
grassGroup->count++;
|
||||
grassElem->rotY = (s16)(Rand_Next() >> 0x10);
|
||||
grassElem->dropTable = dropTable;
|
||||
if (ObjGrassUnit_IsUnderwater(play, &grassElem->pos)) {
|
||||
grassElem->flags |= OBJ_GRASS_ELEM_UNDERWATER;
|
||||
}
|
||||
homePosYSum += grassElem->pos.y;
|
||||
}
|
||||
}
|
||||
if (grassGroup->count > 0) {
|
||||
grassManager->activeGrassGroups++;
|
||||
grassGroup->homePos.x = this->home.pos.x;
|
||||
grassGroup->homePos.y = (homePosYSum / grassGroup->count);
|
||||
grassGroup->homePos.z = this->home.pos.z;
|
||||
}
|
||||
Actor_Kill(this);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#define OBJGRASSUNIT_GET_DROPTABLE(thisx) (((thisx)->params >> 8) & 0x1F)
|
||||
#define OBJGRASSUNIT_GET_PATTERN(thisx) ((thisx)->params & 1)
|
||||
|
||||
struct ObjGrassUnit;
|
||||
|
||||
typedef struct ObjGrassUnit {
|
||||
|
||||
Reference in New Issue
Block a user