Document object_boss03 (#559)

* Document object_boss03

* Actually run ./format.sh

* Preserve ordering

* Move Tanron3 limb enum to object

* Don't name the limb enum after the actor
This commit is contained in:
Tom Overton 2022-01-30 12:07:22 -08:00 committed by GitHub
parent 06a14e73ea
commit 5f425bf73c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 172 additions and 120 deletions

View File

@ -1,93 +1,138 @@
<Root> <Root>
<!--
Gyorg, his title card, the small fishes he summons, the seaweed in his boss arena,
and the bubbles in his intro cutscene. Also contains an unused copy of Majora's Wrath's
whip assets, along with an unused duplicate of the small fishes.
-->
<File Name="object_boss03" Segment="6"> <File Name="object_boss03" Segment="6">
<Animation Name="object_boss03_Anim_000088" Offset="0x88" /> <Animation Name="gGyorgIdleAnim" Offset="0x88" /> <!-- Original name is "bus_base". Maybe unused? -->
<Texture Name="object_boss03_Tex_0000A0" OutName="tex_0000A0" Format="rgba16" Width="8" Height="16" Offset="0xA0" />
<DList Name="object_boss03_DL_000200" Offset="0x200" /> <!-- Unused Majora's Wrath Whip Texture -->
<DList Name="object_boss03_DL_000278" Offset="0x278" /> <Texture Name="gGyorgUnusedMajorasWrathWhipTex" OutName="unused_majoras_wrath_whip" Format="rgba16" Width="8" Height="16" Offset="0xA0" />
<DList Name="object_boss03_DL_0002A8" Offset="0x2A8" />
<DList Name="object_boss03_DL_003398" Offset="0x3398" /> <!-- Unused Majora's Wrath Whip DisplayLists -->
<DList Name="object_boss03_DL_003A78" Offset="0x3A78" /> <DList Name="gGyorgUnusedMajorasWrathWhipDL1" Offset="0x200" />
<DList Name="object_boss03_DL_003E38" Offset="0x3E38" /> <DList Name="gGyorgUnusedMajorasWrathWhipDL2" Offset="0x278" />
<DList Name="object_boss03_DL_003FB8" Offset="0x3FB8" /> <DList Name="gGyorgUnusedMajorasWrathWhipDL3" Offset="0x2A8" />
<DList Name="object_boss03_DL_0042D0" Offset="0x42D0" />
<DList Name="object_boss03_DL_004450" Offset="0x4450" /> <!--Gyorg Limb DisplayLists -->
<DList Name="object_boss03_DL_004768" Offset="0x4768" /> <DList Name="gGyorgHeadDL" Offset="0x3398" />
<DList Name="object_boss03_DL_004AC0" Offset="0x4AC0" /> <DList Name="gGyorgJawDL" Offset="0x3A78" />
<DList Name="object_boss03_DL_005010" Offset="0x5010" /> <DList Name="gGyorgUpperLeftFinDL" Offset="0x3E38" />
<!-- <Blob Name="object_boss03_Blob_005388" Size="0x8" Offset="0x5388" /> --> <DList Name="gGyorgLowerLeftFinDL" Offset="0x3FB8" />
<Texture Name="object_boss03_TLUT_005390" OutName="tlut_005390" Format="rgba16" Width="4" Height="4" Offset="0x5390" /> <DList Name="gGyorgUpperRightFinDL" Offset="0x42D0" />
<Texture Name="object_boss03_TLUT_0053B0" OutName="tlut_0053B0" Format="rgba16" Width="4" Height="4" Offset="0x53B0" /> <DList Name="gGyorgLowerRightFinDL" Offset="0x4450" />
<Texture Name="object_boss03_TLUT_0053D0" OutName="tlut_0053D0" Format="rgba16" Width="4" Height="4" Offset="0x53D0" /> <DList Name="gGyorgUpperTrunkDL" Offset="0x4768" />
<Texture Name="object_boss03_TLUT_0053F0" OutName="tlut_0053F0" Format="rgba16" Width="4" Height="4" Offset="0x53F0" /> <DList Name="gGyorgLowerTrunkDL" Offset="0x4AC0" />
<Texture Name="object_boss03_Tex_005410" OutName="tex_005410" Format="rgba16" Width="32" Height="32" Offset="0x5410" /> <DList Name="gGyorgTailDL" Offset="0x5010" />
<Texture Name="object_boss03_Tex_005C10" OutName="tex_005C10" Format="ci4" Width="64" Height="64" Offset="0x5C10" />
<Texture Name="object_boss03_Tex_006410" OutName="tex_006410" Format="ci4" Width="64" Height="64" Offset="0x6410" /> <!-- Unused Empty Texture Animation -->
<Texture Name="object_boss03_Tex_006C10" OutName="tex_006C10" Format="ci4" Width="64" Height="64" Offset="0x6C10" /> <TextureAnimation Name="gGyorgUnused5388TexAnim" Offset="0x5388" />
<Texture Name="object_boss03_Tex_007410" OutName="tex_007410" Format="ci4" Width="64" Height="64" Offset="0x7410" />
<Texture Name="object_boss03_Tex_007C10" OutName="tex_007C10" Format="rgba16" Width="16" Height="16" Offset="0x7C10" /> <!-- Gyorg Textures -->
<DList Name="object_boss03_DL_007E50" Offset="0x7E50" /> <Texture Name="gGyorgFinsSpikesAndJawTLUT" OutName="gyorg_fins_spikes_and_jaw_tlut" Format="rgba16" Width="4" Height="4" Offset="0x5390" />
<DList Name="object_boss03_DL_007EB0" Offset="0x7EB0" /> <Texture Name="gGyorgSidesTLUT" OutName="gyorg_sides_tlut" Format="rgba16" Width="4" Height="4" Offset="0x53B0" />
<!-- <Blob Name="object_boss03_Blob_007EC8" Size="0x1400" Offset="0x7EC8" /> --> <Texture Name="gGyorgMouthAndSpikeBacksideTLUT" OutName="gyorg_mouth_and_spike_backside_tlut" Format="rgba16" Width="4" Height="4" Offset="0x53D0" />
<Limb Name="object_boss03_Standardlimb_0092C8" Type="Standard" Offset="0x92C8" /> <Texture Name="gGyorgBellyAndFinFleshTLUT" OutName="gyorg_belly_and_fin_flesh_tlut" Format="rgba16" Width="4" Height="4" Offset="0x53F0" />
<Limb Name="object_boss03_Standardlimb_0092D4" Type="Standard" Offset="0x92D4" /> <Texture Name="gGyorgEyeTex" OutName="gyorg_eye" Format="rgba16" Width="32" Height="32" Offset="0x5410" />
<Limb Name="object_boss03_Standardlimb_0092E0" Type="Standard" Offset="0x92E0" /> <Texture Name="gGyorgFinsSpikesAndJawTex" OutName="gyorg_fins_spikes_and_jaw" Format="ci4" Width="64" Height="64" Offset="0x5C10" />
<Limb Name="object_boss03_Standardlimb_0092EC" Type="Standard" Offset="0x92EC" /> <Texture Name="gGyorgSidesTex" OutName="gyorg_sides" Format="ci4" Width="64" Height="64" Offset="0x6410" />
<Limb Name="object_boss03_Standardlimb_0092F8" Type="Standard" Offset="0x92F8" /> <Texture Name="gGyorgMouthAndSpikeBacksideTex" OutName="gyorg_mouth_and_spike_backside" Format="ci4" Width="64" Height="64" Offset="0x6C10" />
<Limb Name="object_boss03_Standardlimb_009304" Type="Standard" Offset="0x9304" /> <Texture Name="gGyorgBellyAndFinFleshTex" OutName="gyorg_belly_and_fin_flesh" Format="ci4" Width="64" Height="64" Offset="0x7410" />
<Limb Name="object_boss03_Standardlimb_009310" Type="Standard" Offset="0x9310" /> <Texture Name="gGyorgHornsTeethAndClawsTex" OutName="gyorg_horns_teeth_claws" Format="rgba16" Width="16" Height="16" Offset="0x7C10" />
<Limb Name="object_boss03_Standardlimb_00931C" Type="Standard" Offset="0x931C" />
<Limb Name="object_boss03_Standardlimb_009328" Type="Standard" Offset="0x9328" /> <!-- Bubble DisplayLists (texture comes from gameplay_keep) -->
<Limb Name="object_boss03_Standardlimb_009334" Type="Standard" Offset="0x9334" /> <DList Name="gGyorgBubbleMaterialDL" Offset="0x7E50" />
<Limb Name="object_boss03_Standardlimb_009340" Type="Standard" Offset="0x9340" /> <DList Name="gGyorgBubbleModelDL" Offset="0x7EB0" />
<Limb Name="object_boss03_Standardlimb_00934C" Type="Standard" Offset="0x934C" />
<Limb Name="object_boss03_Standardlimb_009358" Type="Standard" Offset="0x9358" /> <!-- Gyorg Title Card -->
<Limb Name="object_boss03_Standardlimb_009364" Type="Standard" Offset="0x9364" /> <Texture Name="gGyorgTitleCardTex" OutName="gyorg_title_card" Format="i8" Width="128" Height="40" Offset="0x7EC8" />
<Skeleton Name="object_boss03_Skel_0093A8" Type="Flex" LimbType="Standard" Offset="0x93A8" />
<Animation Name="object_boss03_Anim_009554" Offset="0x9554" /> <!-- Gyorg Limbs -->
<Animation Name="object_boss03_Anim_0098F0" Offset="0x98F0" /> <Limb Name="gGyorgRootLimb" Type="Standard" Offset="0x92C8" />
<Animation Name="object_boss03_Anim_0099D0" Offset="0x99D0" /> <Limb Name="gGyorgHeadLimb" Type="Standard" Offset="0x92D4" />
<Animation Name="object_boss03_Anim_009C14" Offset="0x9C14" /> <Limb Name="gGyorgBodyRootLimb" Type="Standard" Offset="0x92E0" />
<Animation Name="object_boss03_Anim_009CF8" Offset="0x9CF8" /> <Limb Name="gGyorgUpperTrunkLimb" Type="Standard" Offset="0x92EC" />
<Animation Name="object_boss03_Anim_00A020" Offset="0xA020" /> <Limb Name="gGyorgLowerTrunkLimb" Type="Standard" Offset="0x92F8" />
<Animation Name="object_boss03_Anim_00A134" Offset="0xA134" /> <Limb Name="gGyorgTailLimb" Type="Standard" Offset="0x9304" />
<Animation Name="object_boss03_Anim_00A6C8" Offset="0xA6C8" /> <Limb Name="gGyorgRightFinRootLimb" Type="Standard" Offset="0x9310" />
<DList Name="object_boss03_DL_00A8B0" Offset="0xA8B0" /> <Limb Name="gGyorgUpperRightFinLimb" Type="Standard" Offset="0x931C" />
<DList Name="object_boss03_DL_00A948" Offset="0xA948" /> <Limb Name="gGyorgLowerRightFinLimb" Type="Standard" Offset="0x9328" />
<DList Name="object_boss03_DL_00A978" Offset="0xA978" /> <Limb Name="gGyorgLeftFinRootLimb" Type="Standard" Offset="0x9334" />
<DList Name="object_boss03_DL_00A9A8" Offset="0xA9A8" /> <Limb Name="gGyorgUpperLeftFinLimb" Type="Standard" Offset="0x9340" />
<DList Name="object_boss03_DL_00A9D8" Offset="0xA9D8" /> <Limb Name="gGyorgLowerLeftFinLimb" Type="Standard" Offset="0x934C" />
<DList Name="object_boss03_DL_00AA08" Offset="0xAA08" /> <Limb Name="gGyorgJawRootLimb" Type="Standard" Offset="0x9358" />
<Texture Name="object_boss03_TLUT_00AAC0" OutName="tlut_00AAC0" Format="rgba16" Width="4" Height="4" Offset="0xAAC0" /> <Limb Name="gGyorgJawLimb" Type="Standard" Offset="0x9364" />
<Texture Name="object_boss03_TLUT_00AAE0" OutName="tlut_00AAE0" Format="rgba16" Width="4" Height="4" Offset="0xAAE0" />
<Texture Name="object_boss03_Tex_00AB00" OutName="tex_00AB00" Format="ci4" Width="64" Height="64" Offset="0xAB00" /> <!-- Gyorg Skeleton-->
<Texture Name="object_boss03_Tex_00B300" OutName="tex_00B300" Format="ci4" Width="64" Height="64" Offset="0xB300" /> <Skeleton Name="gGyorgSkel" Type="Flex" LimbType="Standard" Offset="0x93A8" />
<!-- <Blob Name="object_boss03_Blob_00BB00" Size="0x10" Offset="0xBB00" /> -->
<DList Name="object_boss03_DL_00BD80" Offset="0xBD80" /> <!-- Gyorg Animations -->
<DList Name="object_boss03_DL_00BE40" Offset="0xBE40" /> <Animation Name="gGyorgFloppingAnim" Offset="0x9554" /> <!-- Original name is "bus_dead" -->
<DList Name="object_boss03_DL_00BF20" Offset="0xBF20" /> <Animation Name="gGyorgJumpingAnim" Offset="0x98F0" /> <!-- Original name is "bus_jump". Maybe unused? -->
<DList Name="object_boss03_DL_00BFD8" Offset="0xBFD8" /> <Animation Name="gGyorgStunnedAnim" Offset="0x99D0" /> <!-- Original name is "bus_sibire" ("paralyzed") -->
<DList Name="object_boss03_DL_00C0A8" Offset="0xC0A8" /> <Animation Name="gGyorgBackingUpAnim" Offset="0x9C14" /> <!-- Original name is "bus_stop" -->
<DList Name="object_boss03_DL_00C160" Offset="0xC160" /> <Animation Name="gGyorgFastSwimmingAnim" Offset="0x9CF8" /> <!-- Original name is "bus_swim" -->
<Texture Name="object_boss03_TLUT_00C230" OutName="tlut_00C230" Format="rgba16" Width="4" Height="4" Offset="0xC230" /> <Animation Name="gGyorgGentleSwimmingAnim" Offset="0xA020" /> <!-- Maybe unused? -->
<Texture Name="object_boss03_Tex_00C250" OutName="tex_00C250" Format="ci4" Width="64" Height="64" Offset="0xC250" /> <Animation Name="gGyorgTailSweepAnim" Offset="0xA134" /> <!-- Maybe unused? -->
<DList Name="object_boss03_DL_00CCC0" Offset="0xCCC0" /> <Animation Name="gGyorgCrawlingAnim" Offset="0xA6C8" />
<DList Name="object_boss03_DL_00CD80" Offset="0xCD80" />
<DList Name="object_boss03_DL_00CE60" Offset="0xCE60" /> <!-- Seaweed DisplayLists -->
<DList Name="object_boss03_DL_00CF18" Offset="0xCF18" /> <DList Name="gGyorgSeaweedPiece1DL" Offset="0xA8B0" />
<DList Name="object_boss03_DL_00CFE8" Offset="0xCFE8" /> <DList Name="gGyorgSeaweedPiece2DL" Offset="0xA948" />
<DList Name="object_boss03_DL_00D0A0" Offset="0xD0A0" /> <DList Name="gGyorgSeaweedPiece3DL" Offset="0xA978" />
<Texture Name="object_boss03_TLUT_00D170" OutName="tlut_00D170" Format="rgba16" Width="4" Height="4" Offset="0xD170" /> <DList Name="gGyorgSeaweedPiece4DL" Offset="0xA9A8" />
<Texture Name="object_boss03_Tex_00D190" OutName="tex_00D190" Format="ci4" Width="64" Height="64" Offset="0xD190" /> <DList Name="gGyorgSeaweedPiece5DL" Offset="0xA9D8" />
<Limb Name="object_boss03_Standardlimb_00D990" Type="Standard" Offset="0xD990" /> <DList Name="gGyorgSeaweedTopDL" Offset="0xAA08" />
<Limb Name="object_boss03_Standardlimb_00D99C" Type="Standard" Offset="0xD99C" />
<Limb Name="object_boss03_Standardlimb_00D9A8" Type="Standard" Offset="0xD9A8" /> <!-- Seaweed Textures -->
<Limb Name="object_boss03_Standardlimb_00D9B4" Type="Standard" Offset="0xD9B4" /> <Texture Name="gGyorgSeaweedTopTLUT" OutName="gyorg_seaweed_top_tlut" Format="rgba16" Width="4" Height="4" Offset="0xAAC0" />
<Limb Name="object_boss03_Standardlimb_00D9C0" Type="Standard" Offset="0xD9C0" /> <Texture Name="gGyorgSeaweedTLUT" OutName="gyord_seaweed_tlut" Format="rgba16" Width="4" Height="4" Offset="0xAAE0" />
<Limb Name="object_boss03_Standardlimb_00D9CC" Type="Standard" Offset="0xD9CC" /> <Texture Name="gGyorgSeaweedTopTex" OutName="gyorg_seaweed_top" Format="ci4" Width="64" Height="64" Offset="0xAB00" />
<Limb Name="object_boss03_Standardlimb_00D9D8" Type="Standard" Offset="0xD9D8" /> <Texture Name="gGyorgSeaweedTex" OutName="gyorg_seaweed" Format="ci4" Width="64" Height="64" Offset="0xB300" />
<Limb Name="object_boss03_Standardlimb_00D9E4" Type="Standard" Offset="0xD9E4" />
<Limb Name="object_boss03_Standardlimb_00D9F0" Type="Standard" Offset="0xD9F0" /> <!-- Unused Empty Texture Animation -->
<Skeleton Name="object_boss03_Skel_00DA20" Type="Flex" LimbType="Standard" Offset="0xDA20" /> <TextureAnimation Name="gGyorgUnusedBB00TexAnim" Offset="0xBB00" />
<Animation Name="object_boss03_Anim_00DAAC" Offset="0xDAAC" />
<!-- Unused Duplicate of Small Fish Limb DisplayLists -->
<DList Name="gUnusedGyorgSmallFishHeadDL" Offset="0xBD80" />
<DList Name="gUnusedGyorgSmallFishTrunkDL" Offset="0xBE40" />
<DList Name="gUnusedGyorgSmallFishRightFinDL" Offset="0xBF20" />
<DList Name="gUnusedGyorgSmallFishDorsalFinDL" Offset="0xBFD8" />
<DList Name="gUnusedGyorgSmallFishLeftFinDL" Offset="0xC0A8" />
<DList Name="gUnusedGyorgSmallFishTailFinDL" Offset="0xC160" />
<!-- Unused Duplicate of Small Fish Textures -->
<Texture Name="gUnusedGyorgSmallFishTLUT" OutName="unused_small_fish_tlut" Format="rgba16" Width="4" Height="4" Offset="0xC230" />
<Texture Name="gUnusedGyorgSmallFishTex" OutName="unused_small_fish" Format="ci4" Width="64" Height="64" Offset="0xC250" />
<!-- Small Fishes Limb DisplayLists -->
<DList Name="gGyorgSmallFishHeadDL" Offset="0xCCC0" />
<DList Name="gGyorgSmallFishTrunkDL" Offset="0xCD80" />
<DList Name="gGyorgSmallFishRightFinDL" Offset="0xCE60" />
<DList Name="gGyorgSmallFishDorsalFinDL" Offset="0xCF18" />
<DList Name="gGyorgSmallFishLeftFinDL" Offset="0xCFE8" />
<DList Name="gGyorgSmallFishTailFinDL" Offset="0xD0A0" />
<!-- Small Fishes Textures -->
<Texture Name="gGyorgSmallFishTLUT" OutName="small_fish_tlut" Format="rgba16" Width="4" Height="4" Offset="0xD170" />
<Texture Name="gGyorgSmallFishTex" OutName="small_fish" Format="ci4" Width="64" Height="64" Offset="0xD190" />
<!-- Small Fishes Limbs -->
<Limb Name="gGyorgSmallFishRootLimb" Type="Standard" EnumName="GYORG_SMALL_FISH_LIMB_ROOT" Offset="0xD990" />
<Limb Name="gGyorgSmallFishBodyRootLimb" Type="Standard" EnumName="GYORG_SMALL_FISH_LIMB_BODY_ROOT" Offset="0xD99C" />
<Limb Name="gGyorgSmallFishTrunkRootLimb" Type="Standard" EnumName="GYORG_SMALL_FISH_LIMB_TRUNK_ROOT" Offset="0xD9A8" />
<Limb Name="gGyorgSmallFishTailFinLimb" Type="Standard" EnumName="GYORG_SMALL_FISH_LIMB_TAIL_FIN" Offset="0xD9B4" />
<Limb Name="gGyorgSmallFishTrunkLimb" Type="Standard" EnumName="GYORG_SMALL_FISH_LIMB_TRUNK" Offset="0xD9C0" />
<Limb Name="gGyorgSmallFishLeftFinLimb" Type="Standard" EnumName="GYORG_SMALL_FISH_LIMB_LEFT_FIN" Offset="0xD9CC" />
<Limb Name="gGyorgSmallFishDorsalFinLimb" Type="Standard" EnumName="GYORG_SMALL_FISH_LIMB_DORSAL_FIN" Offset="0xD9D8" />
<Limb Name="gGyorgSmallFishRightFinLimb" Type="Standard" EnumName="GYORG_SMALL_FISH_LIMB_RIGHT_FIN" Offset="0xD9E4" />
<Limb Name="gGyorgSmallFishHeadLimb" Type="Standard" EnumName="GYORG_SMALL_FISH_LIMB_HEAD" Offset="0xD9F0" />
<!-- Small Fishes Skeleton -->
<Skeleton Name="gGyorgSmallFishSkel" Type="Flex" LimbType="Standard" LimbNone="GYORG_SMALL_FISH_LIMB_NONE" LimbMax="GYORG_SMALL_FISH_LIMB_MAX" EnumName="GyorgSmallFishLimbs" Offset="0xDA20" />
<!-- Small Fishes Animation -->
<Animation Name="gGyorgSmallFishSwimAnim" Offset="0xDAAC" /> <!-- Original name is "minibus_b_swim" -->
</File> </File>
</Root> </Root>

View File

@ -12,6 +12,12 @@
#define THIS ((EnTanron3*)thisx) #define THIS ((EnTanron3*)thisx)
#define WORK_TIMER_PICK_NEW_DEVIATION 0
#define WORK_TIMER_DIE 0
#define WORK_TIMER_OUT_OF_WATER 1
#define WORK_TIMER_ATTACK 2
#define WORK_TIMER_WAIT 2
void EnTanron3_Init(Actor* thisx, GlobalContext* globalCtx); void EnTanron3_Init(Actor* thisx, GlobalContext* globalCtx);
void EnTanron3_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnTanron3_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnTanron3_Update(Actor* thisx, GlobalContext* globalCtx); void EnTanron3_Update(Actor* thisx, GlobalContext* globalCtx);
@ -107,8 +113,8 @@ void EnTanron3_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.gravity = -1.0f; this->actor.gravity = -1.0f;
Collider_InitAndSetCylinder(globalCtx, &this->atCollider, &this->actor, &sCylinderInit); Collider_InitAndSetCylinder(globalCtx, &this->atCollider, &this->actor, &sCylinderInit);
Collider_InitAndSetCylinder(globalCtx, &this->acCollider, &this->actor, &sCylinderInit); Collider_InitAndSetCylinder(globalCtx, &this->acCollider, &this->actor, &sCylinderInit);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_boss03_Skel_00DA20, &object_boss03_Anim_00DAAC, SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGyorgSmallFishSkel, &gGyorgSmallFishSwimAnim, this->jointTable,
this->jointTable, this->morphTable, 10); this->morphTable, GYORG_SMALL_FISH_LIMB_MAX);
Actor_SetScale(&this->actor, 0.02f); Actor_SetScale(&this->actor, 0.02f);
EnTanron3_SetupLive(this, globalCtx); EnTanron3_SetupLive(this, globalCtx);
this->actor.flags &= ~1; this->actor.flags &= ~1;
@ -142,10 +148,10 @@ void EnTanron3_SpawnBubbles(EnTanron3* this, GlobalContext* globalCtx) {
void EnTanron3_SetupLive(EnTanron3* this, GlobalContext* globalCtx) { void EnTanron3_SetupLive(EnTanron3* this, GlobalContext* globalCtx) {
this->actionFunc = EnTanron3_Live; this->actionFunc = EnTanron3_Live;
Animation_MorphToLoop(&this->skelAnime, &object_boss03_Anim_00DAAC, -10.0f); Animation_MorphToLoop(&this->skelAnime, &gGyorgSmallFishSwimAnim, -10.0f);
this->rotationStep = 0; this->rotationStep = 0;
this->rotationScale = 5; this->rotationScale = 5;
this->workTimer[TANRON3_WORK_TIMER_PICK_NEW_DEVIATION] = 50; this->workTimer[WORK_TIMER_PICK_NEW_DEVIATION] = 50;
this->actor.speedXZ = 5.0f; this->actor.speedXZ = 5.0f;
this->speedMaxStep = 0.5f; this->speedMaxStep = 0.5f;
this->deviation.x = randPlusMinusPoint5Scaled(500.0f); this->deviation.x = randPlusMinusPoint5Scaled(500.0f);
@ -176,13 +182,13 @@ void EnTanron3_Live(EnTanron3* this, GlobalContext* globalCtx) {
if ((player->actor.bgCheckFlags & 1) && player->actor.shape.feetPos[0].y >= 438.0f) { if ((player->actor.bgCheckFlags & 1) && player->actor.shape.feetPos[0].y >= 438.0f) {
// Player is standing on the central platform, so stop chasing them // Player is standing on the central platform, so stop chasing them
this->isNonHostile = true; this->isNonHostile = true;
} else if (this->isNonHostile && this->workTimer[TANRON3_WORK_TIMER_WAIT] == 0 && !(this->timer & 0x1F)) { } else if (this->isNonHostile && this->workTimer[WORK_TIMER_WAIT] == 0 && !(this->timer & 0x1F)) {
xDistance = this->targetPos.x - player->actor.world.pos.x; xDistance = this->targetPos.x - player->actor.world.pos.x;
zDistance = this->targetPos.z - player->actor.world.pos.z; zDistance = this->targetPos.z - player->actor.world.pos.z;
if (sqrtf(SQ(xDistance) + SQ(zDistance)) < 500.0f) { if (sqrtf(SQ(xDistance) + SQ(zDistance)) < 500.0f) {
// Player is in the water and close enough, so start chasing them // Player is in the water and close enough, so start chasing them
this->isNonHostile = false; this->isNonHostile = false;
this->workTimer[TANRON3_WORK_TIMER_ATTACK] = 150; this->workTimer[WORK_TIMER_ATTACK] = 150;
} }
} }
@ -204,8 +210,8 @@ void EnTanron3_Live(EnTanron3* this, GlobalContext* globalCtx) {
// If the player gets eaten by Gyorg, or if the attack timer ran out, // If the player gets eaten by Gyorg, or if the attack timer ran out,
// stop chasing the player for a little bit. // stop chasing the player for a little bit.
if (this->workTimer[TANRON3_WORK_TIMER_ATTACK] == 0 || (player->stateFlags2 & 0x80)) { if (this->workTimer[WORK_TIMER_ATTACK] == 0 || (player->stateFlags2 & 0x80)) {
this->workTimer[TANRON3_WORK_TIMER_WAIT] = 150; this->workTimer[WORK_TIMER_WAIT] = 150;
this->isNonHostile = true; this->isNonHostile = true;
} }
break; break;
@ -234,9 +240,9 @@ void EnTanron3_Live(EnTanron3* this, GlobalContext* globalCtx) {
break; break;
} }
if (this->workTimer[TANRON3_WORK_TIMER_OUT_OF_WATER] == 0) { if (this->workTimer[WORK_TIMER_OUT_OF_WATER] == 0) {
if (this->workTimer[TANRON3_WORK_TIMER_PICK_NEW_DEVIATION] == 0 && this->actor.speedXZ > 1.0f) { if (this->workTimer[WORK_TIMER_PICK_NEW_DEVIATION] == 0 && this->actor.speedXZ > 1.0f) {
this->workTimer[TANRON3_WORK_TIMER_PICK_NEW_DEVIATION] = Rand_ZeroFloat(20.0f); this->workTimer[WORK_TIMER_PICK_NEW_DEVIATION] = Rand_ZeroFloat(20.0f);
this->deviation.x = randPlusMinusPoint5Scaled(100.0f); this->deviation.x = randPlusMinusPoint5Scaled(100.0f);
this->deviation.y = randPlusMinusPoint5Scaled(50.0f + extraScaleY); this->deviation.y = randPlusMinusPoint5Scaled(50.0f + extraScaleY);
this->deviation.z = randPlusMinusPoint5Scaled(100.0f); this->deviation.z = randPlusMinusPoint5Scaled(100.0f);
@ -266,7 +272,7 @@ void EnTanron3_Live(EnTanron3* this, GlobalContext* globalCtx) {
// Fish is above water but hasn't touched land before // Fish is above water but hasn't touched land before
this->actor.gravity = -1.0f; this->actor.gravity = -1.0f;
this->targetPosWithDeviation.y = this->waterSurfaceYPos - 50.0f; this->targetPosWithDeviation.y = this->waterSurfaceYPos - 50.0f;
this->workTimer[TANRON3_WORK_TIMER_OUT_OF_WATER] = 25; this->workTimer[WORK_TIMER_OUT_OF_WATER] = 25;
Math_ApproachS(&this->actor.world.rot.x, 0x3000, 5, 0xBD0); Math_ApproachS(&this->actor.world.rot.x, 0x3000, 5, 0xBD0);
if (this->actor.bgCheckFlags & 8) { if (this->actor.bgCheckFlags & 8) {
this->actor.speedXZ = 0.0f; this->actor.speedXZ = 0.0f;
@ -318,9 +324,9 @@ void EnTanron3_Live(EnTanron3* this, GlobalContext* globalCtx) {
} }
this->currentRotationAngle += this->nextRotationAngle; this->currentRotationAngle += this->nextRotationAngle;
this->trunkRotation = Math_SinS(this->currentRotationAngle) * 5000.0f;
this->bodyRotation = Math_SinS(this->currentRotationAngle + 0x6978) * 5000.0f;
this->tailRotation = Math_SinS(this->currentRotationAngle) * 5000.0f; this->tailRotation = Math_SinS(this->currentRotationAngle) * 5000.0f;
this->bodyRotation = Math_SinS(this->currentRotationAngle + 0x6978) * 5000.0f;
this->trunkRotation = Math_SinS(this->currentRotationAngle) * 5000.0f;
if (!this->isBeached) { if (!this->isBeached) {
this->actor.shape.rot = this->actor.world.rot; this->actor.shape.rot = this->actor.world.rot;
} }
@ -338,14 +344,14 @@ void EnTanron3_SetupDie(EnTanron3* this, GlobalContext* globalCtx) {
zDistance = this->actor.world.pos.z - player->actor.world.pos.z; zDistance = this->actor.world.pos.z - player->actor.world.pos.z;
this->actor.world.rot.x = Math_FAtan2F(sqrtf(SQ(xDistance) + SQ(zDistance)), -yDistance); this->actor.world.rot.x = Math_FAtan2F(sqrtf(SQ(xDistance) + SQ(zDistance)), -yDistance);
this->actor.world.rot.y = Math_FAtan2F(zDistance, xDistance); this->actor.world.rot.y = Math_FAtan2F(zDistance, xDistance);
this->workTimer[TANRON3_WORK_TIMER_DIE] = 6; this->workTimer[WORK_TIMER_DIE] = 6;
this->actor.speedXZ = 10.0f; this->actor.speedXZ = 10.0f;
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_KONB_MINI_DEAD); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_KONB_MINI_DEAD);
} }
void EnTanron3_Die(EnTanron3* this, GlobalContext* globalCtx) { void EnTanron3_Die(EnTanron3* this, GlobalContext* globalCtx) {
Actor_MoveWithoutGravityReverse(&this->actor); Actor_MoveWithoutGravityReverse(&this->actor);
if (this->workTimer[TANRON3_WORK_TIMER_DIE] == 0) { if (this->workTimer[WORK_TIMER_DIE] == 0) {
EnTanron3_SpawnBubbles(this, globalCtx); EnTanron3_SpawnBubbles(this, globalCtx);
Actor_MarkForDeath(&this->actor); Actor_MarkForDeath(&this->actor);
if (Rand_ZeroOne() < 0.3f) { if (Rand_ZeroOne() < 0.3f) {
@ -418,7 +424,7 @@ void EnTanron3_Update(Actor* thisx, GlobalContext* globalCtx) {
if ((s8)sGyorg->actor.colChkInfo.health <= 0 && this->actionFunc != EnTanron3_Die) { if ((s8)sGyorg->actor.colChkInfo.health <= 0 && this->actionFunc != EnTanron3_Die) {
EnTanron3_SetupDie(this, globalCtx); EnTanron3_SetupDie(this, globalCtx);
this->workTimer[TANRON3_WORK_TIMER_DIE] = 0; this->workTimer[WORK_TIMER_DIE] = 0;
} }
} }
@ -426,15 +432,18 @@ s32 EnTanron3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL
Actor* thisx) { Actor* thisx) {
EnTanron3* this = THIS; EnTanron3* this = THIS;
if (limbIndex == 1) { if (limbIndex == GYORG_SMALL_FISH_LIMB_ROOT) {
rot->y += this->bodyRotation; rot->y += this->bodyRotation;
} }
if (limbIndex == 3) {
rot->y += this->tailRotation; if (limbIndex == GYORG_SMALL_FISH_LIMB_TRUNK_ROOT) {
}
if (limbIndex == 4) {
rot->y += this->trunkRotation; rot->y += this->trunkRotation;
} }
if (limbIndex == GYORG_SMALL_FISH_LIMB_TAIL_FIN) {
rot->y += this->tailRotation;
}
return false; return false;
} }
@ -442,6 +451,7 @@ void EnTanron3_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnTanron3* this = THIS; EnTanron3* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);
func_8012C28C(globalCtx->state.gfxCtx); func_8012C28C(globalCtx->state.gfxCtx);
if ((this->fogTimer % 2) != 0) { if ((this->fogTimer % 2) != 0) {
POLY_OPA_DISP = Gfx_SetFog(POLY_OPA_DISP, 255, 0, 0, 255, 900, 1099); POLY_OPA_DISP = Gfx_SetFog(POLY_OPA_DISP, 255, 0, 0, 255, 900, 1099);
@ -449,5 +459,6 @@ void EnTanron3_Draw(Actor* thisx, GlobalContext* globalCtx) {
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnTanron3_OverrideLimbDraw, NULL, &this->actor); EnTanron3_OverrideLimbDraw, NULL, &this->actor);
POLY_OPA_DISP = func_801660B8(globalCtx, POLY_OPA_DISP); POLY_OPA_DISP = func_801660B8(globalCtx, POLY_OPA_DISP);
CLOSE_DISPS(globalCtx->state.gfxCtx); CLOSE_DISPS(globalCtx->state.gfxCtx);
} }

View File

@ -2,16 +2,12 @@
#define Z_EN_TANRON3_H #define Z_EN_TANRON3_H
#include "global.h" #include "global.h"
#include "objects/object_boss03/object_boss03.h"
struct EnTanron3; struct EnTanron3;
typedef void (*EnTanron3ActionFunc)(struct EnTanron3*, GlobalContext*); typedef void (*EnTanron3ActionFunc)(struct EnTanron3*, GlobalContext*);
#define TANRON3_WORK_TIMER_PICK_NEW_DEVIATION 0
#define TANRON3_WORK_TIMER_DIE 0
#define TANRON3_WORK_TIMER_OUT_OF_WATER 1
#define TANRON3_WORK_TIMER_ATTACK 2
#define TANRON3_WORK_TIMER_WAIT 2
#define TANRON3_WORK_TIMER_MAX 3 #define TANRON3_WORK_TIMER_MAX 3
typedef struct { typedef struct {
@ -28,8 +24,8 @@ typedef struct {
typedef struct EnTanron3 { typedef struct EnTanron3 {
/* 0x000 */ Actor actor; /* 0x000 */ Actor actor;
/* 0x144 */ SkelAnime skelAnime; /* 0x144 */ SkelAnime skelAnime;
/* 0x188 */ Vec3s jointTable[10]; /* 0x188 */ Vec3s jointTable[GYORG_SMALL_FISH_LIMB_MAX];
/* 0x1C4 */ Vec3s morphTable[10]; /* 0x1C4 */ Vec3s morphTable[GYORG_SMALL_FISH_LIMB_MAX];
/* 0x200 */ s16 timer; /* 0x200 */ s16 timer;
/* 0x202 */ u8 isNonHostile; // If true, the fish will not move towards the player to attack them /* 0x202 */ u8 isNonHostile; // If true, the fish will not move towards the player to attack them
/* 0x203 */ u8 isBeached; // If true, the fish is on the central platform flopping around /* 0x203 */ u8 isBeached; // If true, the fish is on the central platform flopping around
@ -48,8 +44,8 @@ typedef struct EnTanron3 {
/* 0x248 */ Vec3s targetShapeRotation; /* 0x248 */ Vec3s targetShapeRotation;
/* 0x250 */ s32 currentRotationAngle; /* 0x250 */ s32 currentRotationAngle;
/* 0x254 */ s32 nextRotationAngle; /* 0x254 */ s32 nextRotationAngle;
/* 0x258 */ s16 tailRotation; /* 0x258 */ s16 trunkRotation;
/* 0x25A */ s16 trunkRotation; /* 0x25A */ s16 tailRotation;
/* 0x25C */ s16 bodyRotation; /* 0x25C */ s16 bodyRotation;
/* 0x260 */ ColliderCylinder atCollider; /* 0x260 */ ColliderCylinder atCollider;
/* 0x2AC */ ColliderCylinder acCollider; /* 0x2AC */ ColliderCylinder acCollider;