EnEgol (Eyegore), object_eg, and related actors EnEstone and EnEgblock (#1041)

* EnEgol (Eyegore), object_eg, and related actors EnEstone and EnEgblock

Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>

* merge fixes
This commit is contained in:
petrie911 2022-11-05 22:16:55 -05:00 committed by GitHub
parent fdae305a0a
commit 122a050d44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 2335 additions and 332 deletions

View File

@ -1,106 +1,154 @@
<Root>
<!-- Assets for the Eyegore enemy and associated props -->
<File Name="object_eg" Segment="6">
<DList Name="object_eg_DL_000040" Offset="0x40" />
<Texture Name="object_eg_Tex_0000C0" OutName="tex_0000C0" Format="ia8" Width="64" Height="64" Offset="0xC0" />
<!-- <Blob Name="object_eg_Blob_0010C0" Size="0x10" Offset="0x10C0" /> -->
<DList Name="object_eg_DL_001170" Offset="0x1170" />
<Texture Name="object_eg_Tex_001210" OutName="tex_001210" Format="rgba16" Width="8" Height="16" Offset="0x1210" />
<DList Name="object_eg_DL_0013B0" Offset="0x13B0" />
<Texture Name="object_eg_Tex_001450" OutName="tex_001450" Format="rgba16" Width="8" Height="16" Offset="0x1450" />
<DList Name="object_eg_DL_001690" Offset="0x1690" />
<DList Name="object_eg_DL_001698" Offset="0x1698" />
<Collision Name="object_eg_Colheader_001820" Offset="0x1820" />
<DList Name="object_eg_DL_001910" Offset="0x1910" />
<DList Name="object_eg_DL_001918" Offset="0x1918" />
<Texture Name="object_eg_Tex_0019B0" OutName="tex_0019B0" Format="rgba16" Width="16" Height="16" Offset="0x19B0" />
<!-- <Blob Name="object_eg_Blob_001BB0" Size="0x10" Offset="0x1BB0" /> -->
<DList Name="object_eg_DL_001BF0" Offset="0x1BF0" />
<DList Name="object_eg_DL_001BF8" Offset="0x1BF8" />
<Texture Name="object_eg_Tex_001C78" OutName="tex_001C78" Format="rgba16" Width="16" Height="16" Offset="0x1C78" />
<!-- <Blob Name="object_eg_Blob_001E80" Size="0x18" Offset="0x1E80" /> -->
<Animation Name="object_eg_Anim_002460" Offset="0x2460" />
<!-- <Blob Name="object_eg_Blob_002470" Size="0x1D00" Offset="0x2470" /> -->
<DList Name="object_eg_DL_0041F0" Offset="0x41F0" />
<!-- <Blob Name="object_eg_Blob_004280" Size="0xE80" Offset="0x4280" /> -->
<Texture Name="object_eg_Tex_005100" OutName="tex_005100" Format="rgba16" Width="8" Height="8" Offset="0x5100" />
<!-- <Blob Name="object_eg_Blob_005180" Size="0x800" Offset="0x5180" /> -->
<DList Name="object_eg_DL_007C80" Offset="0x7C80" />
<DList Name="object_eg_DL_007DF8" Offset="0x7DF8" />
<DList Name="object_eg_DL_007EB0" Offset="0x7EB0" />
<DList Name="object_eg_DL_007FF0" Offset="0x7FF0" />
<DList Name="object_eg_DL_008180" Offset="0x8180" />
<DList Name="object_eg_DL_0082F0" Offset="0x82F0" />
<DList Name="object_eg_DL_008430" Offset="0x8430" />
<DList Name="object_eg_DL_0085C0" Offset="0x85C0" />
<DList Name="object_eg_DL_008730" Offset="0x8730" />
<DList Name="object_eg_DL_0088E0" Offset="0x88E0" />
<DList Name="object_eg_DL_0089F8" Offset="0x89F8" />
<DList Name="object_eg_DL_008A40" Offset="0x8A40" />
<DList Name="object_eg_DL_008A88" Offset="0x8A88" />
<DList Name="object_eg_DL_008B28" Offset="0x8B28" />
<DList Name="object_eg_DL_008C28" Offset="0x8C28" />
<DList Name="object_eg_DL_008D28" Offset="0x8D28" />
<DList Name="object_eg_DL_008E40" Offset="0x8E40" />
<DList Name="object_eg_DL_008ED8" Offset="0x8ED8" />
<DList Name="object_eg_DL_0090A0" Offset="0x90A0" />
<DList Name="object_eg_DL_0091B8" Offset="0x91B8" />
<DList Name="object_eg_DL_009250" Offset="0x9250" />
<DList Name="object_eg_DL_009418" Offset="0x9418" />
<TextureAnimation Name="object_eg_Matanimheader_0094E4" Offset="0x94E4" />
<Limb Name="object_eg_Standardlimb_0094F4" Type="Standard" EnumName="OBJECT_EG_LIMB_01" Offset="0x94F4" />
<Limb Name="object_eg_Standardlimb_009500" Type="Standard" EnumName="OBJECT_EG_LIMB_02" Offset="0x9500" />
<Limb Name="object_eg_Standardlimb_00950C" Type="Standard" EnumName="OBJECT_EG_LIMB_03" Offset="0x950C" />
<Limb Name="object_eg_Standardlimb_009518" Type="Standard" EnumName="OBJECT_EG_LIMB_04" Offset="0x9518" />
<Limb Name="object_eg_Standardlimb_009524" Type="Standard" EnumName="OBJECT_EG_LIMB_05" Offset="0x9524" />
<Limb Name="object_eg_Standardlimb_009530" Type="Standard" EnumName="OBJECT_EG_LIMB_06" Offset="0x9530" />
<Limb Name="object_eg_Standardlimb_00953C" Type="Standard" EnumName="OBJECT_EG_LIMB_07" Offset="0x953C" />
<Limb Name="object_eg_Standardlimb_009548" Type="Standard" EnumName="OBJECT_EG_LIMB_08" Offset="0x9548" />
<Limb Name="object_eg_Standardlimb_009554" Type="Standard" EnumName="OBJECT_EG_LIMB_09" Offset="0x9554" />
<Limb Name="object_eg_Standardlimb_009560" Type="Standard" EnumName="OBJECT_EG_LIMB_0A" Offset="0x9560" />
<Limb Name="object_eg_Standardlimb_00956C" Type="Standard" EnumName="OBJECT_EG_LIMB_0B" Offset="0x956C" />
<Limb Name="object_eg_Standardlimb_009578" Type="Standard" EnumName="OBJECT_EG_LIMB_0C" Offset="0x9578" />
<Limb Name="object_eg_Standardlimb_009584" Type="Standard" EnumName="OBJECT_EG_LIMB_0D" Offset="0x9584" />
<Limb Name="object_eg_Standardlimb_009590" Type="Standard" EnumName="OBJECT_EG_LIMB_0E" Offset="0x9590" />
<Limb Name="object_eg_Standardlimb_00959C" Type="Standard" EnumName="OBJECT_EG_LIMB_0F" Offset="0x959C" />
<Limb Name="object_eg_Standardlimb_0095A8" Type="Standard" EnumName="OBJECT_EG_LIMB_10" Offset="0x95A8" />
<Limb Name="object_eg_Standardlimb_0095B4" Type="Standard" EnumName="OBJECT_EG_LIMB_11" Offset="0x95B4" />
<Limb Name="object_eg_Standardlimb_0095C0" Type="Standard" EnumName="OBJECT_EG_LIMB_12" Offset="0x95C0" />
<Limb Name="object_eg_Standardlimb_0095CC" Type="Standard" EnumName="OBJECT_EG_LIMB_13" Offset="0x95CC" />
<Limb Name="object_eg_Standardlimb_0095D8" Type="Standard" EnumName="OBJECT_EG_LIMB_14" Offset="0x95D8" />
<Limb Name="object_eg_Standardlimb_0095E4" Type="Standard" EnumName="OBJECT_EG_LIMB_15" Offset="0x95E4" />
<Limb Name="object_eg_Standardlimb_0095F0" Type="Standard" EnumName="OBJECT_EG_LIMB_16" Offset="0x95F0" />
<Limb Name="object_eg_Standardlimb_0095FC" Type="Standard" EnumName="OBJECT_EG_LIMB_17" Offset="0x95FC" />
<Skeleton Name="object_eg_Skel_009664" Type="Flex" LimbType="Standard" LimbNone="OBJECT_EG_LIMB_NONE" LimbMax="OBJECT_EG_LIMB_MAX" EnumName="ObjectEgLimb" Offset="0x9664" />
<Animation Name="object_eg_Anim_009D2C" Offset="0x9D2C" />
<Animation Name="object_eg_Anim_00A204" Offset="0xA204" />
<Animation Name="object_eg_Anim_00A484" Offset="0xA484" />
<Animation Name="object_eg_Anim_00A73C" Offset="0xA73C" />
<Animation Name="object_eg_Anim_00ADF8" Offset="0xADF8" />
<Animation Name="object_eg_Anim_00BC60" Offset="0xBC60" />
<Animation Name="object_eg_Anim_00BEB8" Offset="0xBEB8" />
<Animation Name="object_eg_Anim_00C434" Offset="0xC434" />
<Animation Name="object_eg_Anim_00C9B4" Offset="0xC9B4" />
<Animation Name="object_eg_Anim_00CC4C" Offset="0xCC4C" />
<Animation Name="object_eg_Anim_00CE54" Offset="0xCE54" />
<Animation Name="object_eg_Anim_00D3D8" Offset="0xD3D8" />
<DList Name="object_eg_DL_00DCC0" Offset="0xDCC0" />
<Texture Name="object_eg_Tex_00DEA8" OutName="tex_00DEA8" Format="i4" Width="64" Height="64" Offset="0xDEA8" />
<Animation Name="object_eg_Anim_00EA10" Offset="0xEA10" />
<Animation Name="object_eg_Anim_00EE4C" Offset="0xEE4C" />
<Animation Name="object_eg_Anim_00F524" Offset="0xF524" />
<Animation Name="object_eg_Anim_00FB0C" Offset="0xFB0C" />
<Animation Name="object_eg_Anim_0100C0" Offset="0x100C0" />
<DList Name="object_eg_DL_010240" Offset="0x10240" />
<Texture Name="object_eg_Tex_010310" OutName="tex_010310" Format="rgba16" Width="36" Height="36" Offset="0x10310" />
<!-- <Blob Name="object_eg_Blob_010D30" Size="0x1000" Offset="0x10D30" /> -->
<Texture Name="object_eg_Tex_011D30" OutName="tex_011D30" Format="rgba16" Width="8" Height="16" Offset="0x11D30" />
<Texture Name="object_eg_Tex_011E30" OutName="tex_011E30" Format="rgba16" Width="16" Height="16" Offset="0x11E30" />
<Texture Name="object_eg_Tex_012030" OutName="tex_012030" Format="rgba16" Width="4" Height="4" Offset="0x12030" />
<Texture Name="object_eg_Tex_012050" OutName="tex_012050" Format="rgba16" Width="8" Height="16" Offset="0x12050" />
<Texture Name="object_eg_Tex_012150" OutName="tex_012150" Format="rgba16" Width="8" Height="8" Offset="0x12150" />
<Texture Name="object_eg_Tex_0121D0" OutName="tex_0121D0" Format="i4" Width="16" Height="32" Offset="0x121D0" />
<Texture Name="object_eg_Tex_0122D0" OutName="tex_0122D0" Format="rgba16" Width="16" Height="32" Offset="0x122D0" />
<!-- <Blob Name="object_eg_Blob_0126D0" Size="0xA20" Offset="0x126D0" /> -->
<Texture Name="object_eg_Tex_0130F0" OutName="tex_0130F0" Format="i4" Width="16" Height="32" Offset="0x130F0" />
<!-- Display lists and textures for Eyegore's effects -->
<DList Name="gEyegoreEffectImpactDL" Offset="0x40" />
<Texture Name="gEyegoreEffectImpactTex" OutName="eyegore_effect_impact" Format="ia8" Width="64" Height="64" Offset="0xC0" />
<TextureAnimation Name="gEyegoreEmpty1TexAnim" Offset="0x10C0" />
<DList Name="gEyegoreEffectLargeBodyPieceDL" Offset="0x1170" />
<Texture Name="gEyegoreEffectLargeBodyPieceTex" OutName="eyegore_effect_large_piece" Format="rgba16" Width="8" Height="16" Offset="0x1210" />
<DList Name="gEyegoreEffectSmallBodyPieceDL" Offset="0x13B0" />
<Texture Name="gEyegoreEffectSmallBodyPieceTex" OutName="eyegore_effect_small_piece" Format="rgba16" Width="8" Height="16" Offset="0x1450" />
<DList Name="gEyegoreEmpty1DL" Offset="0x1690" />
<!-- Assets for Eyegore's destructible pillars (unused) -->
<DList Name="gEyegoreBlockDL" Offset="0x1698" />
<Collision Name="gEyegoreBlockCol" Offset="0x1820" />
<DList Name="gEyegoreEmpty2DL" Offset="0x1910" />
<DList Name="gEyegoreEffectSolidDebrisDL" Offset="0x1918" />
<Texture Name="gEyegoreEffectSolidDebrisTex" OutName="eyegore_effect_solid_debris" Format="rgba16" Width="16" Height="16" Offset="0x19B0" />
<TextureAnimation Name="gEyegoreEmpty2TexAnim" Offset="0x1BB0" />
<DList Name="gEyegoreEmpty3DL" Offset="0x1BF0" />
<DList Name="gEyegoreEffectFlatDebrisDL" Offset="0x1BF8" />
<Texture Name="gEyegoreEffectFlatDebrisTex" OutName="eyegore_effect_flat_debris" Format="rgba16" Width="16" Height="16" Offset="0x1C78" />
<TextureAnimation Name="gEyegoreEmpty3TexAnim" Offset="0x1E80" />
<!-- Slam attack animation -->
<Animation Name="gEyegoreSlamAnim" Offset="0x2460" />
<!-- Unused vertex mesh. Purpose unknown. -->
<Array Name="gEyegoreUnusedVtx" Count="464" Offset="0x2470"> <!-- type is uncertain -->
<Vtx/>
</Array>
<!-- Display list for Eyegore's laser attack -->
<DList Name="gEyegoreLaserDL" Offset="0x41F0" />
<!-- Several unused textures. Purpose unknown. -->
<Texture Name="gEyegoreUnusedUnknown1Tex" OutName="eyegore_unused_unknown_1" Format="rgba16" Width="8" Height="8" Offset="0x4280" /> <!-- unused -->
<Texture Name="gEyegoreUnusedUnknown2Tex" OutName="eyegore_unused_unknown_2" Format="i4" Width="16" Height="32" Offset="0x4300" /> <!-- type is uncertain -->
<Texture Name="gEyegoreUnusedUnknown3Tex" OutName="eyegore_unused_unknown_3" Format="rgba16" Width="16" Height="32" Offset="0x4400" /> <!-- unused -->
<Texture Name="gEyegoreUnusedUnknown4Tex" OutName="eyegore_unused_unknown_4" Format="rgba16" Width="16" Height="8" Offset="0x4800" /> <!-- unused -->
<Texture Name="gEyegoreUnusedUnknown5Tex" OutName="eyegore_unused_unknown_5" Format="rgba16" Width="16" Height="16" Offset="0x4900" /> <!-- unused -->
<Texture Name="gEyegoreUnusedEyeTex" OutName="eyegore_unused_eye" Format="rgba16" Width="32" Height="16" Offset="0x4B00" /> <!-- unused -->
<Texture Name="gEyegoreUnusedUnknown6Tex" OutName="eyegore_unused_unknown_6" Format="rgba16" Width="16" Height="16" Offset="0x4F00" /> <!-- unused -->
<!-- Animated texture for Eyegore's laser attack. Uses gEyegoreEyeLaserTexAnim. -->
<Texture Name="gEyegoreLaserTex" OutName="eyegore_laser" Format="rgba16" Width="8" Height="8" Offset="0x5100" />
<!-- Unused teeth texture. Purpose unknown. -->
<Texture Name="gEyegoreUnusedTeethTex" OutName="eyegore_unused_teeth" Format="rgba16" Width="32" Height="32" Offset="0x5180" /> <!-- unused -->
<!-- Eyegore limb display lists -->
<DList Name="gEyegoreHipsDL" Offset="0x7C80" />
<DList Name="gEyegoreFauldsDL" Offset="0x7DF8" />
<DList Name="gEyegoreRightShinDL" Offset="0x7EB0" />
<DList Name="gEyegoreRightFootDL" Offset="0x7FF0" />
<DList Name="gEyegoreRightThighDL" Offset="0x8180" />
<DList Name="gEyegoreLeftShinDL" Offset="0x82F0" />
<DList Name="gEyegoreLeftFootDL" Offset="0x8430" />
<DList Name="gEyegoreLeftThighDL" Offset="0x85C0" />
<DList Name="gEyegoreHeadDL" Offset="0x8730" />
<DList Name="gEyegoreEyeballDL" Offset="0x88E0" />
<DList Name="gEyegoreEyeColliderLimbDL" Offset="0x89F8" />
<DList Name="gEyegoreLaserAttachLimbDL" Offset="0x8A40" />
<DList Name="gEyegorePupilDL" Offset="0x8A88" />
<DList Name="gEyegoreLowerEyelidDL" Offset="0x8B28" />
<DList Name="gEyegoreUpperEyelidDL" Offset="0x8C28" />
<DList Name="gEyegoreRightHandDL" Offset="0x8D28" />
<DList Name="gEyegoreRightShoulderDL" Offset="0x8E40" />
<DList Name="gEyegoreRightArmDL" Offset="0x8ED8" />
<DList Name="gEyegoreLeftHandDL" Offset="0x90A0" />
<DList Name="gEyegoreLeftShoulderDL" Offset="0x91B8" />
<DList Name="gEyegoreLeftArmDL" Offset="0x9250" />
<DList Name="gEyegoreTorsoDL" Offset="0x9418" />
<!-- Texture animation for Eyegore's eye and laser -->
<TextureAnimation Name="gEyegoreEyeLaserTexAnim" Offset="0x94E4" />
<!-- Eyegore limbs -->
<Limb Name="gEyegoreRootLimb" Type="Standard" EnumName="EYEGORE_LIMB_ROOT" Offset="0x94F4" />
<Limb Name="gEyegoreTorsoLimb" Type="Standard" EnumName="EYEGORE_LIMB_TORSO" Offset="0x9500" />
<Limb Name="gEyegoreHeadLimb" Type="Standard" EnumName="EYEGORE_LIMB_HEAD" Offset="0x950C" />
<Limb Name="gEyegoreLeftShoulderLimb" Type="Standard" EnumName="EYEGORE_LIMB_LEFT_SHOULDER" Offset="0x9518" />
<Limb Name="gEyegoreLeftArmLimb" Type="Standard" EnumName="EYEGORE_LIMB_LEFT_ARM" Offset="0x9524" />
<Limb Name="gEyegoreLeftHandLimb" Type="Standard" EnumName="EYEGORE_LIMB_LEFT_HAND" Offset="0x9530" />
<Limb Name="gEyegoreRightShoulderLimb" Type="Standard" EnumName="EYEGORE_LIMB_RIGHT_SHOULDER" Offset="0x953C" />
<Limb Name="gEyegoreRightArmLimb" Type="Standard" EnumName="EYEGORE_LIMB_RIGHT_ARM" Offset="0x9548" />
<Limb Name="gEyegoreRightHandLimb" Type="Standard" EnumName="EYEGORE_LIMB_RIGHT_HAND" Offset="0x9554" />
<Limb Name="gEyegoreUpperEyelidLimb" Type="Standard" EnumName="EYEGORE_LIMB_UPPER_EYELID" Offset="0x9560" />
<Limb Name="gEyegoreLowerEyelidLimb" Type="Standard" EnumName="EYEGORE_LIMB_LOWER_EYELID" Offset="0x956C" />
<Limb Name="gEyegorePupilLimb" Type="Standard" EnumName="EYEGORE_LIMB_PUPIL" Offset="0x9578" />
<Limb Name="gEyegoreLaserAttachLimb" Type="Standard" EnumName="EYEGORE_LIMB_LASER_ATTACH" Offset="0x9584" />
<Limb Name="gEyegoreEyeColliderLimb" Type="Standard" EnumName="EYEGORE_LIMB_EYE_COLLIDER" Offset="0x9590" />
<Limb Name="gEyegoreEyeballLimb" Type="Standard" EnumName="EYEGORE_LIMB_EYEBALL" Offset="0x959C" />
<Limb Name="gEyegoreHipsLimb" Type="Standard" EnumName="EYEGORE_LIMB_HIPS" Offset="0x95A8" />
<Limb Name="gEyegoreLeftThighLimb" Type="Standard" EnumName="EYEGORE_LIMB_LEFT_THIGH" Offset="0x95B4" />
<Limb Name="gEyegoreLeftShinLimb" Type="Standard" EnumName="EYEGORE_LIMB_LEFT_SHIN" Offset="0x95C0" />
<Limb Name="gEyegoreLeftFootLimb" Type="Standard" EnumName="EYEGORE_LIMB_LEFT_FOOT" Offset="0x95CC" />
<Limb Name="gEyegoreRightThighLimb" Type="Standard" EnumName="EYEGORE_LIMB_RIGHT_THIGH" Offset="0x95D8" />
<Limb Name="gEyegoreRightShinLimb" Type="Standard" EnumName="EYEGORE_LIMB_RIGHT_SHIN" Offset="0x95E4" />
<Limb Name="gEyegoreRightFootLimb" Type="Standard" EnumName="EYEGORE_LIMB_RIGHT_FOOT" Offset="0x95F0" />
<Limb Name="gEyegoreFauldsLimb" Type="Standard" EnumName="EYEGORE_LIMB_FAULDS" Offset="0x95FC" />
<!-- Eyegore skeleton -->
<Skeleton Name="gEyegoreSkel" Type="Flex" LimbType="Standard" LimbNone="EYEGORE_LIMB_NONE" LimbMax="EYEGORE_LIMB_MAX" EnumName="EyegoreLimb" Offset="0x9664" />
<!-- Various fight animations -->
<Animation Name="gEyegoreSlamWaitAnim" Offset="0x9D2C" />
<Animation Name="gEyegoreSlamEndAnim" Offset="0xA204" />
<Animation Name="gEyegoreLaserAnim" Offset="0xA484" />
<Animation Name="gEyegoreUnusedLaserEndAnim" Offset="0xA73C" />
<Animation Name="gEyegoreDamagedAnim" Offset="0xADF8" />
<Animation Name="gEyegoreDeathAnim" Offset="0xBC60" />
<Animation Name="gEyegoreRetreatAnim" Offset="0xBEB8" />
<Animation Name="gEyegoreLeftPunchAnim" Offset="0xC434" />
<Animation Name="gEyegoreRightPunchAnim" Offset="0xC9B4" />
<Animation Name="gEyegoreStunnedAnim" Offset="0xCC4C" />
<Animation Name="gEyegoreStunEndAnim" Offset="0xCE54" />
<Animation Name="gEyegoreSitAnim" Offset="0xD3D8" />
<!-- Unused stone display list and texture. Could be prototype of final stone assets. -->
<DList Name="gEyegoreUnusedStoneDL" Offset="0xDCC0" />
<Texture Name="gEyegoreUnusedStoneTex" OutName="eyegore_unused_stone" Format="i4" Width="64" Height="64" Offset="0xDEA8" />
<!-- Various walking and idle animations. Contains several unused ones. -->
<Animation Name="gEyegoreUnusedChaseAnim" Offset="0xEA10" />
<Animation Name="gEyegoreStandAnim" Offset="0xEE4C" />
<Animation Name="gEyegoreUnusedWalkAnim" Offset="0xF524" />
<Animation Name="gEyegoreUnusedIdleAnim" Offset="0xFB0C" />
<Animation Name="gEyegoreWalkAnim" Offset="0x100C0" />
<!-- Display list and texture for the stones created by Eyegore's attacks -->
<DList Name="gEyegoreStoneDL" Offset="0x10240" />
<Texture Name="gEyegoreStoneTex" OutName="eyegore_stone" Format="rgba16" Width="36" Height="36" Offset="0x10310" />
<!-- Duplicate of gEyegoreEffectImpactTex -->
<Texture Name="gEyegoreDuplicateEffectImpactTex" OutName="eyegore_duplicate_effect_impact" Format="ia8" Width="64" Height="64" Offset="0x10D30" />
<!-- Textures for Eyegore's body -->
<Texture Name="gEyegoreDarkBodyTex" OutName="eyegore_dark_body" Format="rgba16" Width="8" Height="16" Offset="0x11D30" />
<Texture Name="gEyegoreBlockTex" OutName="eyegore_block" Format="rgba16" Width="16" Height="16" Offset="0x11E30" />
<Texture Name="gEyegoreClawTex" OutName="eyegore_claw" Format="rgba16" Width="4" Height="4" Offset="0x12030" />
<Texture Name="gEyegoreLightBodyTex" OutName="eyegore_light_body" Format="rgba16" Width="8" Height="16" Offset="0x12050" />
<Texture Name="gEyegoreArmorTex" OutName="eyegore_armor" Format="rgba16" Width="8" Height="8" Offset="0x12150" />
<Texture Name="gEyegoreHeadTex" OutName="eyegore_head" Format="i4" Width="16" Height="32" Offset="0x121D0" />
<Texture Name="gEyegorePupilTex" OutName="eyegore_pupil" Format="rgba16" Width="16" Height="32" Offset="0x122D0" />
<!-- Duplicate of gEyegoreStoneTex -->
<Texture Name="gEyegoreDuplicateStoneTex" OutName="eyegore_duplicate_stone" Format="rgba16" Width="36" Height="36" Offset="0x126D0" />
<!-- Animated texture for Eyegore's eye. Uses gEyegoreEyeLaserTexAnim. -->
<Texture Name="gEyegoreEyeballTex" OutName="eyegore_eyeball" Format="i4" Width="16" Height="32" Offset="0x130F0" />
</File>
</Root>

9
spec
View File

@ -2948,8 +2948,7 @@ beginseg
name "ovl_En_Egol"
compress
include "build/src/overlays/actors/ovl_En_Egol/z_en_egol.o"
include "build/data/ovl_En_Egol/ovl_En_Egol.data.o"
include "build/data/ovl_En_Egol/ovl_En_Egol.reloc.o"
include "build/src/overlays/actors/ovl_En_Egol/ovl_En_Egol_reloc.o"
endseg
beginseg
@ -3011,8 +3010,7 @@ beginseg
name "ovl_En_Estone"
compress
include "build/src/overlays/actors/ovl_En_Estone/z_en_estone.o"
include "build/data/ovl_En_Estone/ovl_En_Estone.data.o"
include "build/data/ovl_En_Estone/ovl_En_Estone.reloc.o"
include "build/src/overlays/actors/ovl_En_Estone/ovl_En_Estone_reloc.o"
endseg
beginseg
@ -3125,8 +3123,7 @@ beginseg
name "ovl_En_Egblock"
compress
include "build/src/overlays/actors/ovl_En_Egblock/z_en_egblock.o"
include "build/data/ovl_En_Egblock/ovl_En_Egblock.data.o"
include "build/data/ovl_En_Egblock/ovl_En_Egblock.reloc.o"
include "build/src/overlays/actors/ovl_En_Egblock/ovl_En_Egblock_reloc.o"
endseg
beginseg

View File

@ -1,21 +1,34 @@
/*
* File: z_en_egblock.c
* Overlay: ovl_En_Egblock
* Description: Eyegore Block
* Description: Unused pillar. Eyegore can destroy it.
*/
#include "z_en_egblock.h"
#include "objects/object_eg/object_eg.h"
#define FLAGS (ACTOR_FLAG_8000000)
#define THIS ((EnEgblock*)thisx)
typedef enum {
/* 0 */ EGBLOCK_EFFECT_DEBRIS_SOLID,
/* 1 */ EGBLOCK_EFFECT_DEBRIS_FLAT,
} EnEgblockEffectType;
void EnEgblock_Init(Actor* thisx, PlayState* play);
void EnEgblock_Destroy(Actor* thisx, PlayState* play);
void EnEgblock_Update(Actor* thisx, PlayState* play);
void EnEgblock_Draw(Actor* thisx, PlayState* play);
void EnEgblock_Draw(Actor* thisx, PlayState* play2);
void EnEgblock_Active(EnEgblock* this, PlayState* play);
void EnEgblock_DoNothing(EnEgblock* this, PlayState* play);
void EnEgblock_Inactive(EnEgblock* this, PlayState* play);
void EnEgblock_SpawnEffect(EnEgblock* this, Vec3f* pos, s16 lifetime, s16 arg3);
void EnEgblock_UpdateEffects(EnEgblock* this, PlayState* play);
void EnEgblock_DrawEffects(EnEgblock* this, PlayState* play);
#if 0
ActorInit En_Egblock_InitVars = {
ACTOR_EN_EGBLOCK,
ACTORCAT_PROP,
@ -28,28 +41,191 @@ ActorInit En_Egblock_InitVars = {
(ActorFunc)EnEgblock_Draw,
};
#endif
void EnEgblock_Init(Actor* thisx, PlayState* play) {
EnEgblock* this = THIS;
CollisionHeader* colHeader = NULL;
s32 pad;
extern UNK_TYPE D_06001698;
extern UNK_TYPE D_06001820;
extern UNK_TYPE D_06001BF8;
DynaPolyActor_Init(&this->dyna, 0);
CollisionHeader_GetVirtual(&gEyegoreBlockCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE;
this->inactive = false;
Actor_SetScale(&this->dyna.actor, 0.5f);
this->type = EGBLOCK_GET_TYPE(&this->dyna.actor);
this->paramF80 = EGBLOCK_GET_PARAM_F80(&this->dyna.actor);
this->param7F = EGBLOCK_GET_PARAM_7F(&this->dyna.actor);
if (this->type == EGBLOCK_TYPE_ACTIVE) {
this->dyna.actor.colChkInfo.health = 1;
this->actionFunc = EnEgblock_Active;
} else {
this->actionFunc = EnEgblock_DoNothing;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Egblock/EnEgblock_Init.s")
void EnEgblock_Destroy(Actor* thisx, PlayState* play) {
EnEgblock* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Egblock/EnEgblock_Destroy.s")
if (this->dyna.actor.colChkInfo.health == 1) {
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Egblock/func_80ABA8A4.s")
void EnEgblock_Active(EnEgblock* this, PlayState* play) {
if (this->dyna.actor.colChkInfo.health <= 0) {
s32 i;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Egblock/func_80ABA988.s")
//! @bug Egblock doesn't have an effect with index 2, so half of these spawns do nothing.
for (i = 0; i < ARRAY_COUNT(this->effects); i++) {
EnEgblock_SpawnEffect(this, &this->dyna.actor.world.pos, 30, (i & 1) + EGBLOCK_EFFECT_DEBRIS_FLAT);
}
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
Actor_SpawnFloorDustRing(play, &this->dyna.actor, &this->dyna.actor.world.pos, 30.0f, 30, 10.0f, 100, 30, true);
this->inactive = true;
this->timer = 50;
this->actionFunc = EnEgblock_Inactive;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Egblock/func_80ABA9B8.s")
void EnEgblock_Inactive(EnEgblock* this, PlayState* play) {
if (this->timer == 0) {
Actor_Kill(&this->dyna.actor);
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Egblock/EnEgblock_Update.s")
void EnEgblock_DoNothing(EnEgblock* this, PlayState* play) {
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Egblock/EnEgblock_Draw.s")
void EnEgblock_Update(Actor* thisx, PlayState* play) {
EnEgblock* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Egblock/func_80ABAAF4.s")
this->actionFunc(this, play);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Egblock/func_80ABACB4.s")
DECR(this->timer);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Egblock/func_80ABAE64.s")
EnEgblock_UpdateEffects(this, play);
}
void EnEgblock_Draw(Actor* thisx, PlayState* play2) {
PlayState* play = play2;
EnEgblock* this = THIS;
func_8012C28C(play->state.gfxCtx);
if (this->inactive != true) {
OPEN_DISPS(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x80, 255, 255, 255, 255);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 255);
gSPDisplayList(POLY_OPA_DISP++, gEyegoreBlockDL);
CLOSE_DISPS(play->state.gfxCtx);
}
EnEgblock_DrawEffects(this, play);
}
void EnEgblock_SpawnEffect(EnEgblock* this, Vec3f* pos, s16 lifetime, s16 arg3) {
EnEgblockEffect* effect = this->effects;
s16 i;
for (i = 0; i < ARRAY_COUNT(this->effects); i++, effect++) {
if (!effect->isActive) {
effect->isActive = true;
effect->pos = *pos;
effect->pos.x += randPlusMinusPoint5Scaled(50.0f);
effect->pos.z += randPlusMinusPoint5Scaled(50.0f);
effect->timer = lifetime;
effect->alpha = 255;
effect->type = arg3;
effect->accel.x = Rand_ZeroOne() - 0.5f;
effect->accel.y = -1.0f;
effect->accel.z = Rand_ZeroOne() - 0.5f;
effect->velocity.x = 2.0f * (Rand_ZeroOne() - 0.5f);
effect->velocity.y = 5.0f + (10.0f * Rand_ZeroOne());
effect->velocity.z = 2.0f * (Rand_ZeroOne() - 0.5f);
effect->scale = 0.5f + (0.2f * Rand_ZeroFloat(1.0f));
effect->rot.x = randPlusMinusPoint5Scaled(0x7530);
effect->rot.y = randPlusMinusPoint5Scaled(0x7530);
effect->rot.z = randPlusMinusPoint5Scaled(0x7530);
break;
}
}
}
void EnEgblock_UpdateEffects(EnEgblock* this, PlayState* play) {
EnEgblockEffect* effect = this->effects;
s32 i;
for (i = 0; i < ARRAY_COUNT(this->effects); i++, effect++) {
if (effect->isActive) {
if (effect->type != EGBLOCK_EFFECT_DEBRIS_SOLID) {
effect->rot.x -= 0x64;
effect->rot.y -= 0x64;
effect->rot.z -= 0x64;
}
effect->pos.x += effect->velocity.x;
effect->pos.y += effect->velocity.y;
effect->pos.z += effect->velocity.z;
effect->velocity.x += effect->accel.x;
effect->velocity.y += effect->accel.y;
effect->velocity.z += effect->accel.z;
if (effect->timer) {
effect->timer--;
} else {
effect->alpha -= 10;
if (effect->alpha < 10) {
effect->isActive = false;
}
}
}
}
}
void EnEgblock_DrawEffects(EnEgblock* this, PlayState* play) {
GraphicsContext* gfxCtx = play->state.gfxCtx;
EnEgblockEffect* effect = this->effects;
s16 i;
OPEN_DISPS(gfxCtx);
func_8012C28C(play->state.gfxCtx);
for (i = 0; i < ARRAY_COUNT(this->effects); i++, effect++) {
if (effect->isActive) {
switch (effect->type) {
case EGBLOCK_EFFECT_DEBRIS_SOLID:
case EGBLOCK_EFFECT_DEBRIS_FLAT:
Matrix_Push();
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
Matrix_Scale(effect->scale, effect->scale, effect->scale, MTXMODE_APPLY);
Matrix_RotateYS(effect->rot.y, MTXMODE_APPLY);
Matrix_RotateXS(effect->rot.x, MTXMODE_APPLY);
Matrix_RotateZS(effect->rot.z, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x80, 255, 255, 255, 255);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, effect->alpha);
if (effect->type == EGBLOCK_EFFECT_DEBRIS_SOLID) {
gSPDisplayList(POLY_OPA_DISP++, gEyegoreEffectSolidDebrisDL);
} else {
gSPDisplayList(POLY_OPA_DISP++, gEyegoreEffectFlatDebrisDL);
}
Matrix_Pop();
break;
default:
break;
}
}
}
CLOSE_DISPS(gfxCtx);
}

View File

@ -7,11 +7,40 @@ struct EnEgblock;
typedef void (*EnEgblockActionFunc)(struct EnEgblock*, PlayState*);
#define EGBLOCK_GET_PARAM_7F(thisx) ((thisx)->params & 0x7F)
#define EGBLOCK_GET_PARAM_F80(thisx) (((thisx)->params >> 7) & 0x1F)
#define EGBLOCK_GET_TYPE(thisx) (((thisx)->params >> 12) & 0xF)
#define EGBLOCK_PARAMS(type, param1, param2) ((((type) & 0xF) << 12) | (((param1) & 0x1F) << 7) | ((param2) & 0x7F))
#define EGBLOCK_TYPE_ACTIVE 0
#define EGBLOCK_EFFECT_COUNT 50
typedef struct {
/* 0x00 */ u8 isActive;
/* 0x04 */ Vec3f pos;
/* 0x10 */ s16 alpha;
/* 0x12 */ s16 timer;
/* 0x14 */ s16 type;
/* 0x18 */ Vec3f velocity;
/* 0x24 */ Vec3f accel;
/* 0x30 */ Vec3s rot;
/* 0x38 */ f32 scale;
} EnEgblockEffect; // size = 0x3C
typedef struct EnEgblock {
/* 0x000 */ Actor actor;
/* 0x144 */ char unk_144[0x5C];
/* 0x000 */ DynaPolyActor dyna;
/* 0x15C */ UNK_TYPE1 unk_15C[0x44]; // SkelAnime?
/* 0x1A0 */ EnEgblockActionFunc actionFunc;
/* 0x1A4 */ char unk_1A4[0xC10];
/* 0x1A4 */ s16 type;
/* 0x1A6 */ s16 paramF80;
/* 0x1A8 */ s16 param7F;
/* 0x1AA */ s16 timer;
/* 0x1AC */ s16 inactive;
/* 0x1AE */ UNK_TYPE1 unk_1AE[2];
/* 0x1B0 */ UNK_TYPE1 unk_1B0[0x4C]; // ColliderCylinder?
/* 0x1FC */ EnEgblockEffect effects[EGBLOCK_EFFECT_COUNT];
} EnEgblock; // size = 0xDB4
#endif // Z_EN_EGBLOCK_H

File diff suppressed because it is too large Load Diff

View File

@ -2,16 +2,94 @@
#define Z_EN_EGOL_H
#include "global.h"
#include "objects/object_eg/object_eg.h"
struct EnEgol;
typedef void (*EnEgolActionFunc)(struct EnEgol*, PlayState*);
#define EYEGORE_GET_PATH(thisx) ((thisx)->params & 0x3F)
#define EYEGORE_GET_SWITCH(thisx) (((thisx)->params >> 6) & 0x7F)
#define EYEGORE_PARAMS(switch, path) ((((switch) & 0x7F) << 6) | ((path) & 0x3F))
#define EYEGORE_EFFECT_COUNT 100
typedef struct {
/* 0x00 */ u8 isActive;
/* 0x04 */ Vec3f pos;
/* 0x10 */ s16 alpha;
/* 0x12 */ s16 timer;
/* 0x14 */ s16 type;
/* 0x18 */ Vec3f velocity;
/* 0x24 */ Vec3f accel;
/* 0x30 */ Vec3s rot;
/* 0x38 */ f32 scale;
} EnEgolEffect; // size = 0x3C
typedef struct EnEgol {
/* 0x0000 */ Actor actor;
/* 0x0144 */ char unk_144[0x164];
/* 0x0144 */ SkelAnime skelAnime;
/* 0x0188 */ Vec3s jointTable[EYEGORE_LIMB_MAX];
/* 0x0218 */ Vec3s morphTable[EYEGORE_LIMB_MAX];
/* 0x02A8 */ EnEgolActionFunc actionFunc;
/* 0x02AC */ char unk_2AC[0x1BC4];
/* 0x02AC */ Path* path;
/* 0x02B0 */ s16 waypoint;
/* 0x02B2 */ s16 action;
/* 0x02B4 */ s16 waitTimer;
/* 0x02B6 */ s16 eyeShutTimer;
/* 0x02B4 */ s16 headRot;
/* 0x02BA */ s16 switchFlag;
/* 0x02BC */ s16 dmgEffectTimer;
/* 0x02C0 */ Vec3f limbPos[12];
/* 0x0350 */ s16 limbPosIndex;
/* 0x0352 */ s16 pathIndex;
/* 0x0354 */ s32 animation;
/* 0x0358 */ u8 isRetreating;
/* 0x035C */ f32 animEndFrame;
/* 0x0360 */ f32 wakeupRange;
/* 0x0364 */ f32 minLaserRange;
/* 0x0368 */ UNK_TYPE1 unk_368[4]; // f32?
/* 0x036C */ f32 laserLightScale;
/* 0x0370 */ f32 chargeLightScale;
/* 0x0374 */ s16 eyelidRot;
/* 0x0376 */ s16 eyelidRotTarget;
/* 0x0378 */ s16 actionTimer;
/* 0x037C */ s32 laserCount;
/* 0x0380 */ s32 chargingLaser;
/* 0x0384 */ s16 chargeLightRot;
/* 0x0388 */ s32 chargeLevel;
/* 0x038C */ s32 hitPlayer;
/* 0x0390 */ UNK_TYPE1 unk_390[0xC]; // Vec3f?
/* 0x039C */ Vec3f eyePos;
/* 0x03A8 */ Vec3f laserBase;
/* 0x03B4 */ Vec3f laserScale;
/* 0x03C0 */ Vec3f laserScaleTarget;
/* 0x03CC */ UNK_TYPE1 unk_3CC[0xC]; // Vec3f?
/* 0x03D8 */ Vec3f leftFootPos;
/* 0x03E4 */ Vec3f rightFootPos;
/* 0x03F0 */ Vec3f leftHandPos;
/* 0x03FC */ Vec3f rightHandPos;
/* 0x0408 */ Vec3f waypointPos;
/* 0x0414 */ Vec3s pupilRot;
/* 0x041A */ Vec3s laserRot;
/* 0x0420 */ Color_RGB16 eyePrimColor;
/* 0x0426 */ Color_RGB16 eyeEnvColor;
/* 0x042C */ s16 laserState;
/* 0x0430 */ s32 texScroll;
/* 0x0434 */ EnEgolEffect effects[EYEGORE_EFFECT_COUNT];
/* 0x1BA4 */ ColliderJntSph bodyCollider;
/* 0x1BC4 */ ColliderJntSphElement bodyElements[6];
/* 0x1D44 */ ColliderJntSph eyeCollider;
/* 0x1D64 */ ColliderJntSphElement eyeElements[1];
/* 0x1DA4 */ ColliderQuad laserCollider;
/* 0x1E24 */ UNK_TYPE1 unk_1E24[4];
/* 0x1E28 */ s16 subCamId;
/* 0x1E2C */ f32 subCamFov;
/* 0x1E30 */ f32 subCamFovTarget;
/* 0x1E34 */ Vec3f subCamAt;
/* 0x1E40 */ Vec3f subCamEye;
/* 0x1E4C */ UNK_TYPE1 unk_1E4C[0x24]; // Vec3f[3]?
} EnEgol; // size = 0x1E70
#endif // Z_EN_EGOL_H

View File

@ -1,10 +1,12 @@
/*
* File: z_en_estone.c
* Overlay: ovl_En_Estone
* Description: Eyegore Rubble
* Description: Rubble from Eyegore's attacks
*/
#include "z_en_estone.h"
#include "objects/object_eg/object_eg.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20)
@ -12,13 +14,15 @@
void EnEstone_Init(Actor* thisx, PlayState* play);
void EnEstone_Destroy(Actor* thisx, PlayState* play);
void EnEstone_Update(Actor* thisx, PlayState* play);
void EnEstone_Draw(Actor* thisx, PlayState* play);
void EnEstone_Update(Actor* thisx, PlayState* play2);
void EnEstone_Draw(Actor* thisx, PlayState* play2);
void func_80A9A1DC(EnEstone* this, PlayState* play);
void func_80A9A4B0(EnEstone* this, PlayState* play);
void EnEstone_Active(EnEstone* this, PlayState* play);
void EnEstone_Inactive(EnEstone* this, PlayState* play);
void EnEstone_SpawnEffect(EnEstone* this, Vec3f* pos, Vec3f* velocity, Vec3f* accel, f32 scale, s16 lifetime);
void EnEstone_UpdateEffects(EnEstone* this, PlayState* play);
void EnEstone_DrawEffects(EnEstone* this, PlayState* play);
#if 0
ActorInit En_Estone_InitVars = {
ACTOR_EN_ESTONE,
ACTORCAT_PROP,
@ -31,33 +35,250 @@ ActorInit En_Estone_InitVars = {
(ActorFunc)EnEstone_Draw,
};
// static ColliderCylinderInit sCylinderInit = {
static ColliderCylinderInit D_80A9AB70 = {
{ COLTYPE_HARD, AT_ON | AT_TYPE_ENEMY, AC_ON | AC_TYPE_PLAYER, OC1_NONE, OC2_TYPE_2, COLSHAPE_CYLINDER, },
{ ELEMTYPE_UNK0, { 0xF7CFFFFF, 0x00, 0x04 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_ON | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_NONE, },
static ColliderCylinderInit sCylinderInit = {
{
COLTYPE_HARD,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xF7CFFFFF, 0x00, 0x04 },
{ 0xF7CFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_NONE,
},
{ 30, 30, -10, { 0, 0, 0 } },
};
#endif
void EnEstone_Init(Actor* thisx, PlayState* play) {
EnEstone* this = THIS;
Vec3f accel;
Vec3f velocity;
f32 scale;
s32 i;
s32 pad;
extern ColliderCylinderInit D_80A9AB70;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 15.0f);
this->rotVel.x = this->rotVel.y = this->rotVel.z = randPlusMinusPoint5Scaled(1.0f) * 20.0f;
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.world.rot.y += (s16)randPlusMinusPoint5Scaled(0x2710);
this->actor.shape.rot.y = this->actor.world.rot.y;
extern UNK_TYPE D_06010240;
if (this->actor.params == ENESTONE_TYPE_LARGE) {
this->actor.speedXZ = Rand_ZeroFloat(5.0f) + 2.0f;
this->scale = (Rand_ZeroFloat(1.0f) * 0.005f) + 0.005f;
this->actor.velocity.y = Rand_ZeroFloat(10.0f) + 15.0f;
this->actor.gravity = -2.0f;
} else {
this->actor.speedXZ = Rand_ZeroFloat(3.0f) + 1.0f;
this->scale = (Rand_ZeroFloat(1.0f) * 0.003f) + 0.003f;
this->actor.velocity.y = Rand_ZeroFloat(5.0f) + 7.0f;
this->actor.gravity = -1.0f;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Estone/EnEstone_Init.s")
this->collider.dim.radius = this->scale * 3000.0f;
this->collider.dim.height = this->scale * 3000.0f;
this->collider.dim.yShift = this->scale * -1300.0f;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Estone/EnEstone_Destroy.s")
for (i = 0; i < 7; i++) {
accel.x = 0.5f * (Rand_ZeroOne() - 0.5f);
accel.y = -1.0f;
accel.z = 0.5f * (Rand_ZeroOne() - 0.5f);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Estone/func_80A9A1DC.s")
velocity.x = 2.0f * (Rand_ZeroOne() - 0.5f);
velocity.y = 8.0f + (Rand_ZeroOne() * 10.0f);
velocity.z = 2.0f * (Rand_ZeroOne() - 0.5f);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Estone/func_80A9A4B0.s")
scale = (Rand_ZeroFloat(1.0f) * 0.001f) + 0.001f;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Estone/EnEstone_Update.s")
EnEstone_SpawnEffect(this, &this->actor.world.pos, &velocity, &accel, scale, 70);
}
this->timer = 5;
this->inactive = false;
Actor_SetScale(&this->actor, 1.0f);
this->actionFunc = EnEstone_Active;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Estone/EnEstone_Draw.s")
void EnEstone_Destroy(Actor* thisx, PlayState* play) {
EnEstone* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Estone/func_80A9A774.s")
Collider_DestroyCylinder(play, &this->collider);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Estone/func_80A9A870.s")
void EnEstone_Active(EnEstone* this, PlayState* play) {
Player* player = GET_PLAYER(play);
Vec3f accel;
Vec3f velocity;
s32 i;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Estone/func_80A9A9C0.s")
if ((this->actor.floorHeight == -10000.0f) || ((player->actor.world.pos.y - 200.0f) > this->actor.world.pos.y)) {
Actor_Kill(&this->actor);
return;
}
if (((this->actor.bgCheckFlags & 1) && (this->actor.velocity.y < 0.0f)) || (this->collider.base.atFlags & 4)) {
this->collider.base.atFlags &= ~4;
if (this->actor.params == ENESTONE_TYPE_LARGE) {
for (i = 0; i < 2; i++) {
accel.x = 2.0f * (Rand_ZeroOne() - 0.5f);
accel.y = -1.0f;
accel.z = 2.0f * (Rand_ZeroOne() - 0.5f);
velocity.x = 3.0f * (Rand_ZeroOne() - 0.5f);
velocity.y = 5.0f + (Rand_ZeroOne() * 10.0f);
velocity.z = 3.0f * (Rand_ZeroOne() - 0.5f);
EnEstone_SpawnEffect(this, &this->actor.world.pos, &velocity, &accel,
0.003f + (0.002f * Rand_ZeroFloat(1.0f)), 20);
}
}
Math_Vec3f_Copy(&velocity, &this->actor.world.pos);
velocity.y = this->actor.floorHeight;
Actor_SpawnFloorDustRing(play, &this->actor, &velocity, 0.0f, 10, 6.0f, 50, 30, true);
this->actor.velocity.y = this->actor.gravity = 0.0f;
this->actor.speedXZ *= 0.3f;
this->actor.shape.shadowScale = 0.0f;
this->inactive = true;
this->timer = 50;
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_WALL_BROKEN);
this->actionFunc = EnEstone_Inactive;
} else {
//! FAKE: https://decomp.me/scratch/YiPVN
label:
this->actor.shape.shadowScale = 4500.0f * this->scale;
Actor_SetScale(&this->actor, this->scale);
}
}
void EnEstone_Inactive(EnEstone* this, PlayState* play) {
if (this->timer == 0) {
Actor_Kill(&this->actor);
}
}
void EnEstone_Update(Actor* thisx, PlayState* play2) {
PlayState* play = play2;
EnEstone* this = THIS;
DECR(this->timer);
this->actionFunc(this, play);
this->rot.x -= this->rotVel.x;
this->rot.y -= this->rotVel.y;
this->rot.z -= this->rotVel.z;
Actor_MoveWithGravity(&this->actor);
if ((this->timer == 0) && !this->inactive) {
Actor_UpdateBgCheckInfo(play, &this->actor, 50.0f, 50.0f, 100.0f, 0x1C);
}
if (!this->inactive) {
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
}
EnEstone_UpdateEffects(this, play);
}
void EnEstone_Draw(Actor* thisx, PlayState* play2) {
PlayState* play = play2;
EnEstone* this = THIS;
if (this->inactive != true) {
Matrix_Push();
OPEN_DISPS(play->state.gfxCtx);
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
Matrix_RotateXFApply(this->rot.x * (M_PI / 180.0f));
Matrix_RotateYF(this->rot.y * (M_PI / 180.0f), MTXMODE_APPLY);
Matrix_RotateZF(this->rot.z * (M_PI / 180.0f), MTXMODE_APPLY);
Matrix_Scale(this->scale, this->scale, this->scale, MTXMODE_APPLY);
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0x80, 255, 255, 255, 255);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 255);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gEyegoreStoneDL);
CLOSE_DISPS(play->state.gfxCtx);
Matrix_Pop();
}
EnEstone_DrawEffects(this, play);
}
void EnEstone_SpawnEffect(EnEstone* this, Vec3f* pos, Vec3f* velocity, Vec3f* accel, f32 scale, s16 lifetime) {
EnEstoneEffect* effect = this->effects;
s16 i;
for (i = 0; i < ARRAY_COUNT(this->effects); i++, effect++) {
if (!effect->isActive) {
effect->isActive = true;
effect->pos = *pos;
effect->velocity = *velocity;
effect->accel = *accel;
effect->scale = scale;
effect->timer = lifetime;
effect->rot.x = randPlusMinusPoint5Scaled(0x7530);
effect->rot.y = randPlusMinusPoint5Scaled(0x7530);
effect->rot.z = randPlusMinusPoint5Scaled(0x7530);
break;
}
}
}
void EnEstone_UpdateEffects(EnEstone* this, PlayState* play) {
EnEstoneEffect* effect = this->effects;
s32 i;
for (i = 0; i < ARRAY_COUNT(this->effects); i++, effect++) {
if (effect->isActive) {
effect->rot.x += 0x100;
effect->rot.z += 0x130;
effect->pos.x += effect->velocity.x;
effect->pos.y += effect->velocity.y;
effect->pos.z += effect->velocity.z;
effect->velocity.y += effect->accel.y;
if ((effect->pos.y < this->actor.floorHeight) && (effect->velocity.y < 0.0f)) {
effect->timer = 0;
Actor_SpawnFloorDustRing(play, &this->actor, &effect->pos, 0.0f, 5, 3.0f, 30, 15, true);
}
if (effect->timer != 0) {
effect->timer--;
} else {
effect->isActive = false;
}
}
}
}
void EnEstone_DrawEffects(EnEstone* this, PlayState* play) {
EnEstoneEffect* effect = this->effects;
GraphicsContext* gfxCtx = play->state.gfxCtx;
s16 i;
OPEN_DISPS(gfxCtx);
func_8012C28C(play->state.gfxCtx);
for (i = 0; i < ARRAY_COUNT(this->effects); i++, effect++) {
if (effect->isActive) {
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
Matrix_RotateXS(effect->rot.x, MTXMODE_APPLY);
Matrix_RotateYS(effect->rot.y, MTXMODE_APPLY);
Matrix_RotateZS(effect->rot.z, MTXMODE_APPLY);
Matrix_Scale(effect->scale, effect->scale, effect->scale, MTXMODE_APPLY);
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x80, 255, 255, 255, 255);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 255);
gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_06AB30);
}
}
CLOSE_DISPS(gfxCtx);
}

View File

@ -7,10 +7,33 @@ struct EnEstone;
typedef void (*EnEstoneActionFunc)(struct EnEstone*, PlayState*);
#define ENESTONE_EFFECT_COUNT 200
typedef enum {
/* 0 */ ENESTONE_TYPE_LARGE,
/* 1 */ ENESTONE_TYPE_SMALL,
} EnEstoneType;
typedef struct {
/* 0x00 */ u8 isActive;
/* 0x04 */ Vec3f pos;
/* 0x10 */ Vec3f velocity;
/* 0x1C */ Vec3f accel;
/* 0x28 */ Vec3s rot;
/* 0x30 */ f32 scale;
/* 0x34 */ s16 timer;
} EnEstoneEffect; // size = 0x38
typedef struct EnEstone {
/* 0x0000 */ Actor actor;
/* 0x0144 */ EnEstoneActionFunc actionFunc;
/* 0x0148 */ char unk_148[0x2C2C];
/* 0x0148 */ f32 scale;
/* 0x014C */ Vec3f rot;
/* 0x0158 */ Vec3f rotVel;
/* 0x0164 */ s16 timer;
/* 0x0166 */ s16 inactive;
/* 0x0168 */ ColliderCylinder collider;
/* 0x01B4 */ EnEstoneEffect effects[ENESTONE_EFFECT_COUNT];
} EnEstone; // size = 0x2D74
#endif // Z_EN_ESTONE_H

View File

@ -11108,48 +11108,48 @@
0x80A7C5EC:("ObjEtcetera_Update",),
0x80A7C690:("ObjEtcetera_DrawIdle",),
0x80A7C718:("ObjEtcetera_DrawAnimated",),
0x80A7C990:("func_80A7C990",),
0x80A7CA18:("func_80A7CA18",),
0x80A7CBC4:("func_80A7CBC4",),
0x80A7CD08:("func_80A7CD08",),
0x80A7C990:("EnEgol_ChangeAnim",),
0x80A7CA18:("EnEgol_FootstepEffects",),
0x80A7CBC4:("EnEgol_DestroyBlocks",),
0x80A7CD08:("EnEgol_GetWaypoint",),
0x80A7CD60:("EnEgol_Init",),
0x80A7D0F0:("EnEgol_Destroy",),
0x80A7D140:("func_80A7D140",),
0x80A7D168:("func_80A7D168",),
0x80A7D1E4:("func_80A7D1E4",),
0x80A7D240:("func_80A7D240",),
0x80A7D27C:("func_80A7D27C",),
0x80A7D2C4:("func_80A7D2C4",),
0x80A7D710:("func_80A7D710",),
0x80A7D780:("func_80A7D780",),
0x80A7DAAC:("func_80A7DAAC",),
0x80A7DAF0:("func_80A7DAF0",),
0x80A7E2E8:("func_80A7E2E8",),
0x80A7E344:("func_80A7E344",),
0x80A7E478:("func_80A7E478",),
0x80A7E4B4:("func_80A7E4B4",),
0x80A7E7EC:("func_80A7E7EC",),
0x80A7E820:("func_80A7E820",),
0x80A7E924:("func_80A7E924",),
0x80A7E970:("func_80A7E970",),
0x80A7E9D0:("func_80A7E9D0",),
0x80A7EA28:("func_80A7EA28",),
0x80A7EA88:("func_80A7EA88",),
0x80A7EAD8:("func_80A7EAD8",),
0x80A7EB14:("func_80A7EB14",),
0x80A7EB54:("func_80A7EB54",),
0x80A7EB90:("func_80A7EB90",),
0x80A7EBDC:("func_80A7EBDC",),
0x80A7EC84:("func_80A7EC84",),
0x80A7ED14:("func_80A7ED14",),
0x80A7EFB8:("func_80A7EFB8",),
0x80A7D140:("EnEgol_SetupWait",),
0x80A7D168:("EnEgol_Wait",),
0x80A7D1E4:("EnEgol_SetupStand",),
0x80A7D240:("EnEgol_Stand",),
0x80A7D27C:("EnEgol_SetupWalk",),
0x80A7D2C4:("EnEgol_Walk",),
0x80A7D710:("EnEgol_SetupRetreat",),
0x80A7D780:("EnEgol_Retreat",),
0x80A7DAAC:("EnEgol_SetupLaser",),
0x80A7DAF0:("EnEgol_Laser",),
0x80A7E2E8:("EnEgol_SetupStop",),
0x80A7E344:("EnEgol_Stop",),
0x80A7E478:("EnEgol_SetupSlam",),
0x80A7E4B4:("EnEgol_Slam",),
0x80A7E7EC:("EnEgol_SetupPunch",),
0x80A7E820:("EnEgol_Punch",),
0x80A7E924:("EnEgol_SetupSlamWait",),
0x80A7E970:("EnEgol_SlamWait",),
0x80A7E9D0:("EnEgol_SetupStunned",),
0x80A7EA28:("EnEgol_Stunned",),
0x80A7EA88:("EnEgol_SetupStunEnd",),
0x80A7EAD8:("EnEgol_StunEnd",),
0x80A7EB14:("EnEgol_SetupSlamEnd",),
0x80A7EB54:("EnEgol_SlamEnd",),
0x80A7EB90:("EnEgol_SetupDamaged",),
0x80A7EBDC:("EnEgol_Damaged",),
0x80A7EC84:("EnEgol_StartDeathCutscene",),
0x80A7ED14:("EnEgol_Death",),
0x80A7EFB8:("EnEgol_CollisionCheck",),
0x80A7F354:("EnEgol_Update",),
0x80A7F8E8:("func_80A7F8E8",),
0x80A7FAFC:("func_80A7FAFC",),
0x80A7F8E8:("EnEgol_OverrideLimbDraw",),
0x80A7FAFC:("EnEgol_PostLimbDraw",),
0x80A7FFB8:("EnEgol_Draw",),
0x80A80508:("func_80A80508",),
0x80A80750:("func_80A80750",),
0x80A80904:("func_80A80904",),
0x80A80508:("EnEgol_SpawnEffect",),
0x80A80750:("EnEgol_UpdateEffects",),
0x80A80904:("EnEgol_DrawEffects",),
0x80A811D0:("func_80A811D0",),
0x80A8120C:("func_80A8120C",),
0x80A81288:("func_80A81288",),
@ -11409,13 +11409,13 @@
0x80A98F94:("func_80A98F94",),
0x80A99EA0:("EnEstone_Init",),
0x80A9A1B0:("EnEstone_Destroy",),
0x80A9A1DC:("func_80A9A1DC",),
0x80A9A4B0:("func_80A9A4B0",),
0x80A9A1DC:("EnEstone_Active",),
0x80A9A4B0:("EnEstone_Inactive",),
0x80A9A4E0:("EnEstone_Update",),
0x80A9A600:("EnEstone_Draw",),
0x80A9A774:("func_80A9A774",),
0x80A9A870:("func_80A9A870",),
0x80A9A9C0:("func_80A9A9C0",),
0x80A9A774:("EnEstone_SpawnEffect",),
0x80A9A870:("EnEstone_UpdateEffects",),
0x80A9A9C0:("EnEstone_DrawEffects",),
0x80A9ACD0:("func_80A9ACD0",),
0x80A9ACF0:("func_80A9ACF0",),
0x80A9AD18:("func_80A9AD18",),
@ -11794,14 +11794,14 @@
0x80AB9C4C:("func_80AB9C4C",),
0x80ABA7A0:("EnEgblock_Init",),
0x80ABA868:("EnEgblock_Destroy",),
0x80ABA8A4:("func_80ABA8A4",),
0x80ABA988:("func_80ABA988",),
0x80ABA9B8:("func_80ABA9B8",),
0x80ABA8A4:("EnEgblock_Active",),
0x80ABA988:("EnEgblock_Inactive",),
0x80ABA9B8:("EnEgblock_DoNothing",),
0x80ABA9C8:("EnEgblock_Update",),
0x80ABAA14:("EnEgblock_Draw",),
0x80ABAAF4:("func_80ABAAF4",),
0x80ABACB4:("func_80ABACB4",),
0x80ABAE64:("func_80ABAE64",),
0x80ABAAF4:("EnEgblock_SpawnEffect",),
0x80ABACB4:("EnEgblock_UpdateEffects",),
0x80ABAE64:("EnEgblock_DrawEffects",),
0x80ABB0E0:("EnGuardNuts_Init",),
0x80ABB1E4:("EnGuardNuts_Destroy",),
0x80ABB210:("EnGuardNuts_ChangeAnim",),