diff --git a/assets/xml/objects/object_tl.xml b/assets/xml/objects/object_tl.xml index 7f0cfd7565..3230f87f20 100644 --- a/assets/xml/objects/object_tl.xml +++ b/assets/xml/objects/object_tl.xml @@ -1,61 +1,87 @@  + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c index e74c4c24e2..f1bd9ae9b7 100644 --- a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c +++ b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c @@ -116,10 +116,10 @@ static DamageTable sDamageTable = { }; TexturePtr D_80A29754[] = { - object_tl_Tex_0055A0, - object_tl_Tex_0057A0, - object_tl_Tex_0059A0, - object_tl_Tex_0057A0, + gSnapperEyeOpenTex, + gSnapperEyeHalfTex, + gSnapperEyeClosedTex, + gSnapperEyeHalfTex, }; static InitChainEntry sInitChain[] = { @@ -139,10 +139,10 @@ void EnBigpamet_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChain); - SkelAnime_InitFlex(play, &this->skelAnime2, &object_tl_Skel_007C70, &object_tl_Anim_004210, this->jointTable2, - this->morphTable2, OBJECT_TL_2_LIMB_MAX); - SkelAnime_InitFlex(play, &this->skelAnime1, &object_tl_Skel_001A50, &object_tl_Anim_000B30, this->jointTable1, - this->morphTable1, OBJECT_TL_1_LIMB_MAX); + SkelAnime_InitFlex(play, &this->snapperSkelAnime, &gSnapperSkel, &gSnapperIdleAnim, this->snapperJointTable, + this->snapperMorphTable, SNAPPER_LIMB_MAX); + SkelAnime_InitFlex(play, &this->spikedSnapperSkelAnime, &gSpikedSnapperSkel, &gSpikedSnapperIdleAnim, + this->spikedSnapperJointTable, this->spikedSnapperMorphTable, SPIKED_SNAPPER_LIMB_MAX); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 55.0f); @@ -386,7 +386,7 @@ void func_80A281DC(EnBigpamet* this, PlayState* play) { } void func_80A28274(EnBigpamet* this) { - Animation_PlayLoop(&this->skelAnime2, &object_tl_Anim_004210); + Animation_PlayLoop(&this->snapperSkelAnime, &gSnapperIdleAnim); this->actor.draw = EnBigpamet_Draw; this->unk_29E = 20; this->actionFunc = func_80A282C8; @@ -413,14 +413,14 @@ void func_80A28378(EnBigpamet* this) { } void func_80A283A0(EnBigpamet* this, PlayState* play) { - SkelAnime_Update(&this->skelAnime2); + SkelAnime_Update(&this->snapperSkelAnime); if (this->actor.parent->params == GEKKO_ON_SNAPPER) { func_80A28E40(this); } } void func_80A283F0(EnBigpamet* this) { - Animation_PlayLoop(&this->skelAnime2, &object_tl_Anim_00823C); + Animation_PlayLoop(&this->snapperSkelAnime, &gSnapperWalkAnim); this->actor.speed = 1.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actor.params = ENBIGPAMET_1; @@ -428,7 +428,7 @@ void func_80A283F0(EnBigpamet* this) { } void func_80A2844C(EnBigpamet* this, PlayState* play) { - SkelAnime_Update(&this->skelAnime2); + SkelAnime_Update(&this->snapperSkelAnime); if (this->actor.parent->params == GEKKO_RETURN_TO_SNAPPER) { Math_ScaledStepToS(&this->actor.shape.rot.y, Actor_WorldYawTowardActor(&this->actor, this->actor.parent), @@ -442,7 +442,7 @@ void func_80A2844C(EnBigpamet* this, PlayState* play) { } void func_80A284E4(EnBigpamet* this) { - Animation_MorphToPlayOnce(&this->skelAnime2, &object_tl_Anim_001C68, -3.0f); + Animation_MorphToPlayOnce(&this->snapperSkelAnime, &gSnapperRetreatIntoShellAnim, -3.0f); this->unk_29E = 0; this->unk_2A8 = 1.0f; this->unk_2A4 = 1.0f; @@ -453,13 +453,13 @@ void func_80A284E4(EnBigpamet* this) { } void func_80A2855C(EnBigpamet* this, PlayState* play) { - if (SkelAnime_Update(&this->skelAnime2)) { + if (SkelAnime_Update(&this->snapperSkelAnime)) { func_80A28618(this); - } else if (this->skelAnime2.curFrame > 2.0f) { - this->unk_2A8 = 1.5f - ((this->skelAnime2.curFrame - 2.0f) * 0.23333333f); - this->unk_2A4 = 1.5f - ((this->skelAnime2.curFrame - 2.0f) * 0.083333336f); + } else if (this->snapperSkelAnime.curFrame > 2.0f) { + this->unk_2A8 = 1.5f - ((this->snapperSkelAnime.curFrame - 2.0f) * 0.23333333f); + this->unk_2A4 = 1.5f - ((this->snapperSkelAnime.curFrame - 2.0f) * 0.083333336f); } else { - f32 curFrame = this->skelAnime2.curFrame; + f32 curFrame = this->snapperSkelAnime.curFrame; this->unk_2A4 = this->unk_2A8 = (0.25f * curFrame) + 1.0f; } @@ -575,7 +575,7 @@ void func_80A289C8(EnBigpamet* this, PlayState* play) { void func_80A28A28(EnBigpamet* this) { this->actor.draw = EnBigpamet_Draw; - Animation_MorphToPlayOnce(&this->skelAnime2, &object_tl_Anim_0031DC, -3.0f); + Animation_MorphToPlayOnce(&this->snapperSkelAnime, &gSnapperEmergeFromShellAnim, -3.0f); this->unk_2A8 = 0.1f; this->unk_2A4 = 1.0f; this->actor.world.rot.y = this->actor.shape.rot.y; @@ -587,7 +587,7 @@ void func_80A28A98(EnBigpamet* this, PlayState* play) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x600); - if (SkelAnime_Update(&this->skelAnime2)) { + if (SkelAnime_Update(&this->snapperSkelAnime)) { if ((this->actor.parent->params == GEKKO_RETURN_TO_SNAPPER) || (this->actor.parent->params == GEKKO_JUMP_ON_SNAPPER)) { func_80A283F0(this); @@ -595,7 +595,7 @@ void func_80A28A98(EnBigpamet* this, PlayState* play) { func_80A284E4(this); } } else { - curFrame = this->skelAnime2.curFrame; + curFrame = this->snapperSkelAnime.curFrame; if (curFrame > 7.0f) { this->unk_2A8 = 1.5f - ((curFrame - 7.0f) * (1.0f / 6.0f)); @@ -610,7 +610,7 @@ void func_80A28A98(EnBigpamet* this, PlayState* play) { void func_80A28B98(EnBigpamet* this, PlayState* play) { Actor* collectible; - Animation_PlayLoop(&this->skelAnime2, &object_tl_Anim_000AF4); + Animation_PlayLoop(&this->snapperSkelAnime, &gSnapperDeathAnim); this->collider.base.atFlags &= ~AT_ON; this->collider.info.bumper.dmgFlags = 0xF7CFFFFF; @@ -647,7 +647,7 @@ void func_80A28B98(EnBigpamet* this, PlayState* play) { } void func_80A28D0C(EnBigpamet* this, PlayState* play) { - SkelAnime_Update(&this->skelAnime2); + SkelAnime_Update(&this->snapperSkelAnime); if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { Actor_PlaySfx(&this->actor, NA_SE_EN_HIPLOOP_LAND); func_80A27FE8(this, play); @@ -679,14 +679,14 @@ void func_80A28DC0(EnBigpamet* this, PlayState* play) { } void func_80A28E40(EnBigpamet* this) { - Animation_MorphToPlayOnce(&this->skelAnime2, &object_tl_Anim_000440, -2.0f); + Animation_MorphToPlayOnce(&this->snapperSkelAnime, &gSnapperRearUpAnim, -2.0f); this->actor.flags |= ACTOR_FLAG_1; this->actor.speed = 0.0f; this->actionFunc = func_80A28E98; } void func_80A28E98(EnBigpamet* this, PlayState* play) { - if (SkelAnime_Update(&this->skelAnime2)) { + if (SkelAnime_Update(&this->snapperSkelAnime)) { func_80A284E4(this); } } @@ -811,10 +811,10 @@ s32 EnBigpamet_OverrideLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Ve EnBigpamet* this = THIS; if ((this->actionFunc == func_80A2855C) || (this->actionFunc == func_80A28A98)) { - if (limbIndex == OBJECT_TL_2_LIMB_02) { + if (limbIndex == SNAPPER_LIMB_HEAD) { Matrix_Scale(this->unk_2A4, this->unk_2A8, this->unk_2A4, MTXMODE_APPLY); - } else if ((limbIndex == OBJECT_TL_2_LIMB_0B) || (limbIndex == OBJECT_TL_2_LIMB_09) || - (limbIndex == OBJECT_TL_2_LIMB_07) || (limbIndex == OBJECT_TL_2_LIMB_05)) { + } else if ((limbIndex == SNAPPER_LIMB_BACK_RIGHT_LEG) || (limbIndex == SNAPPER_LIMB_BACK_LEFT_LEG) || + (limbIndex == SNAPPER_LIMB_FRONT_RIGHT_LEG) || (limbIndex == SNAPPER_LIMB_FRONT_LEFT_LEG)) { Matrix_Scale(this->unk_2A4, this->unk_2A8, this->unk_2A8, MTXMODE_APPLY); } } @@ -824,7 +824,7 @@ s32 EnBigpamet_OverrideLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Ve void EnBigpamet_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { EnBigpamet* this = THIS; - if (limbIndex == OBJECT_TL_2_LIMB_01) { + if (limbIndex == SNAPPER_LIMB_BODY) { this->unk_2AC = Matrix_GetCurrent()->yw; } } @@ -838,8 +838,9 @@ void EnBigpamet_Draw(Actor* thisx, PlayState* play) { gSPSegment(POLY_OPA_DISP++, 0x08, D_80A29754[this->unk_29C]); - SkelAnime_DrawFlexOpa(play, this->skelAnime2.skeleton, this->skelAnime2.jointTable, this->skelAnime2.dListCount, - EnBigpamet_OverrideLimbDraw2, EnBigpamet_PostLimbDraw2, &this->actor); + SkelAnime_DrawFlexOpa(play, this->snapperSkelAnime.skeleton, this->snapperSkelAnime.jointTable, + this->snapperSkelAnime.dListCount, EnBigpamet_OverrideLimbDraw2, EnBigpamet_PostLimbDraw2, + &this->actor); func_80A292A8(this, play); CLOSE_DISPS(play->state.gfxCtx); @@ -848,7 +849,7 @@ void EnBigpamet_Draw(Actor* thisx, PlayState* play) { s32 EnBigpamet_OverrideLimbDraw1(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { EnBigpamet* this = THIS; - if (limbIndex == OBJECT_TL_1_LIMB_01) { + if (limbIndex == SPIKED_SNAPPER_LIMB_BODY) { if (this->actionFunc == func_80A28D0C) { pos->y -= 2500.0f; } else { @@ -856,7 +857,7 @@ s32 EnBigpamet_OverrideLimbDraw1(PlayState* play, s32 limbIndex, Gfx** dList, Ve } } - if ((this->unk_2A8 != 1.0f) && (limbIndex == OBJECT_TL_1_LIMB_03)) { + if ((this->unk_2A8 != 1.0f) && (limbIndex == SPIKED_SNAPPER_LIMB_SPIKES)) { Matrix_Scale(1.0f, this->unk_2A8, this->unk_2A8, MTXMODE_APPLY); } @@ -866,7 +867,7 @@ s32 EnBigpamet_OverrideLimbDraw1(PlayState* play, s32 limbIndex, Gfx** dList, Ve void EnBigpamet_PostLimbDraw1(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { EnBigpamet* this = THIS; - if (limbIndex == OBJECT_TL_1_LIMB_01) { + if (limbIndex == SPIKED_SNAPPER_LIMB_BODY) { this->unk_2AC = Matrix_GetCurrent()->yw; } } @@ -875,7 +876,8 @@ void func_80A2966C(Actor* thisx, PlayState* play) { EnBigpamet* this = THIS; Gfx_SetupDL25_Opa(play->state.gfxCtx); - SkelAnime_DrawFlexOpa(play, this->skelAnime1.skeleton, this->skelAnime1.jointTable, this->skelAnime1.dListCount, - EnBigpamet_OverrideLimbDraw1, EnBigpamet_PostLimbDraw1, &this->actor); + SkelAnime_DrawFlexOpa(play, this->spikedSnapperSkelAnime.skeleton, this->spikedSnapperSkelAnime.jointTable, + this->spikedSnapperSkelAnime.dListCount, EnBigpamet_OverrideLimbDraw1, + EnBigpamet_PostLimbDraw1, &this->actor); func_80A292A8(this, play); } diff --git a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.h b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.h index a3561c33ba..eeb97566e8 100644 --- a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.h +++ b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.h @@ -22,12 +22,12 @@ typedef struct { typedef struct EnBigpamet { /* 0x000 */ Actor actor; - /* 0x144 */ SkelAnime skelAnime2; - /* 0x188 */ Vec3s jointTable2[OBJECT_TL_2_LIMB_MAX]; - /* 0x1D6 */ Vec3s morphTable2[OBJECT_TL_2_LIMB_MAX]; - /* 0x224 */ SkelAnime skelAnime1; - /* 0x268 */ Vec3s jointTable1[OBJECT_TL_1_LIMB_MAX]; - /* 0x280 */ Vec3s morphTable1[OBJECT_TL_1_LIMB_MAX]; + /* 0x144 */ SkelAnime snapperSkelAnime; + /* 0x188 */ Vec3s snapperJointTable[SNAPPER_LIMB_MAX]; + /* 0x1D6 */ Vec3s snapperMorphTable[SNAPPER_LIMB_MAX]; + /* 0x224 */ SkelAnime spikedSnapperSkelAnime; + /* 0x268 */ Vec3s spikedSnapperJointTable[SPIKED_SNAPPER_LIMB_MAX]; + /* 0x280 */ Vec3s spikedSnapperMorphTable[SPIKED_SNAPPER_LIMB_MAX]; /* 0x298 */ EnBigpametActionFunc actionFunc; /* 0x29C */ u8 unk_29C; /* 0x29E */ s16 unk_29E; diff --git a/src/overlays/actors/ovl_En_Kame/z_en_kame.c b/src/overlays/actors/ovl_En_Kame/z_en_kame.c index c46e97750b..49b3e44520 100644 --- a/src/overlays/actors/ovl_En_Kame/z_en_kame.c +++ b/src/overlays/actors/ovl_En_Kame/z_en_kame.c @@ -6,7 +6,6 @@ #include "z_en_kame.h" #include "overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h" -#include "objects/object_tl/object_tl.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_400) @@ -111,8 +110,7 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(1, 0xF), }; -static TexturePtr D_80AD8E34[] = { object_tl_Tex_0055A0, object_tl_Tex_0057A0, object_tl_Tex_0059A0, - object_tl_Tex_0057A0 }; +static TexturePtr D_80AD8E34[] = { gSnapperEyeOpenTex, gSnapperEyeHalfTex, gSnapperEyeClosedTex, gSnapperEyeHalfTex }; static InitChainEntry sInitChain[] = { ICHAIN_S8(hintId, TATL_HINT_ID_SNAPPER, ICHAIN_CONTINUE), @@ -126,10 +124,10 @@ void EnKame_Init(Actor* thisx, PlayState* play) { EnKame* this = THIS; Actor_ProcessInitChain(&this->actor, sInitChain); - SkelAnime_InitFlex(play, &this->skelAnime1, &object_tl_Skel_007C70, &object_tl_Anim_004210, this->jointTable1, - this->morphTable1, 13); - SkelAnime_InitFlex(play, &this->skelAnime2, &object_tl_Skel_001A50, &object_tl_Anim_000B30, this->jointTable2, - this->morphTable2, 4); + SkelAnime_InitFlex(play, &this->snapperSkelAnime, &gSnapperSkel, &gSnapperIdleAnim, this->snapperJointTable, + this->snapperMorphTable, SNAPPER_LIMB_MAX); + SkelAnime_InitFlex(play, &this->spikedSnapperSkelAnime, &gSpikedSnapperSkel, &gSpikedSnapperIdleAnim, + this->spikedSnapperJointTable, this->spikedSnapperMorphTable, SPIKED_SNAPPER_LIMB_MAX); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 55.0f); Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); @@ -185,7 +183,7 @@ void func_80AD7018(EnKame* this, PlayState* play) { } void func_80AD70A0(EnKame* this) { - Animation_MorphToPlayOnce(&this->skelAnime1, &object_tl_Anim_004210, -5.0f); + Animation_MorphToPlayOnce(&this->snapperSkelAnime, &gSnapperIdleAnim, -5.0f); this->actor.speed = 0.0f; this->actionFunc = func_80AD70EC; } @@ -193,7 +191,7 @@ void func_80AD70A0(EnKame* this) { void func_80AD70EC(EnKame* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (Animation_OnFrame(&this->skelAnime1, 10.0f)) { + if (Animation_OnFrame(&this->snapperSkelAnime, 10.0f)) { Actor_PlaySfx(&this->actor, NA_SE_EN_PAMET_VOICE); this->unk_2A0 = 40; } @@ -201,15 +199,15 @@ void func_80AD70EC(EnKame* this, PlayState* play) { if ((Player_GetMask(play) != PLAYER_MASK_STONE) && !(player->stateFlags1 & PLAYER_STATE1_800000) && (this->actor.xzDistToPlayer < 240.0f)) { func_80AD73A8(this); - } else if (SkelAnime_Update(&this->skelAnime1)) { + } else if (SkelAnime_Update(&this->snapperSkelAnime)) { func_80AD71B4(this); } } void func_80AD71B4(EnKame* this) { - Animation_MorphToLoop(&this->skelAnime1, &object_tl_Anim_00823C, -5.0f); + Animation_MorphToLoop(&this->snapperSkelAnime, &gSnapperWalkAnim, -5.0f); this->actor.speed = 0.5f; - this->unk_29E = Animation_GetLastFrame(&object_tl_Anim_00823C) * ((s32)Rand_ZeroFloat(5.0f) + 3); + this->unk_29E = Animation_GetLastFrame(&gSnapperWalkAnim) * ((s32)Rand_ZeroFloat(5.0f) + 3); this->unk_2A4 = this->actor.shape.rot.y; this->collider.base.acFlags |= (AC_HARD | AC_ON); this->collider.base.colType = COLTYPE_HARD; @@ -225,7 +223,7 @@ void func_80AD7254(EnKame* this, PlayState* play) { return; } - SkelAnime_Update(&this->skelAnime1); + SkelAnime_Update(&this->snapperSkelAnime); if (this->unk_2A4 != this->actor.shape.rot.y) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->unk_2A4, 0x100); @@ -237,13 +235,13 @@ void func_80AD7254(EnKame* this, PlayState* play) { this->unk_29E--; if (this->unk_29E == 0) { func_80AD70A0(this); - } else if (Animation_OnFrame(&this->skelAnime1, 0.0f) || Animation_OnFrame(&this->skelAnime1, 15.0f)) { + } else if (Animation_OnFrame(&this->snapperSkelAnime, 0.0f) || Animation_OnFrame(&this->snapperSkelAnime, 15.0f)) { Actor_PlaySfx(&this->actor, NA_SE_EN_PAMET_WALK); } } void func_80AD73A8(EnKame* this) { - Animation_MorphToPlayOnce(&this->skelAnime1, &object_tl_Anim_001C68, -3.0f); + Animation_MorphToPlayOnce(&this->snapperSkelAnime, &gSnapperRetreatIntoShellAnim, -3.0f); this->unk_29E = 0; this->unk_2AC = 1.0f; this->unk_2A8 = 1.0f; @@ -257,7 +255,7 @@ void func_80AD73A8(EnKame* this) { void func_80AD7424(EnKame* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (SkelAnime_Update(&this->skelAnime1)) { + if (SkelAnime_Update(&this->snapperSkelAnime)) { if ((Player_GetMask(play) != PLAYER_MASK_STONE) && !(player->stateFlags1 & PLAYER_STATE1_800000) && ((this->unk_29E == 0) || (this->actor.xzDistToPlayer < 120.0f))) { func_80AD76CC(this); @@ -267,11 +265,11 @@ void func_80AD7424(EnKame* this, PlayState* play) { func_80AD7B18(this); } } - } else if (this->skelAnime1.curFrame > 2.0f) { - this->unk_2AC = 1.5f - ((this->skelAnime1.curFrame - 2.0f) * (7.0f / 30)); - this->unk_2A8 = 1.5f - ((this->skelAnime1.curFrame - 2.0f) * (1.0f / 12)); + } else if (this->snapperSkelAnime.curFrame > 2.0f) { + this->unk_2AC = 1.5f - ((this->snapperSkelAnime.curFrame - 2.0f) * (7.0f / 30)); + this->unk_2A8 = 1.5f - ((this->snapperSkelAnime.curFrame - 2.0f) * (1.0f / 12)); } else { - f32 frame = this->skelAnime1.curFrame; + f32 frame = this->snapperSkelAnime.curFrame; this->unk_2AC = (0.25f * frame) + 1.0f; this->unk_2A8 = (0.25f * frame) + 1.0f; @@ -402,7 +400,7 @@ void func_80AD7948(EnKame* this, PlayState* play) { void func_80AD7B18(EnKame* this) { this->actor.draw = EnKame_Draw; - Animation_MorphToPlayOnce(&this->skelAnime1, &object_tl_Anim_0031DC, -3.0f); + Animation_MorphToPlayOnce(&this->snapperSkelAnime, &gSnapperEmergeFromShellAnim, -3.0f); this->actor.speed = 0.0f; this->unk_2AC = 0.1f; this->unk_2A8 = 1.0f; @@ -411,13 +409,13 @@ void func_80AD7B18(EnKame* this) { } void func_80AD7B90(EnKame* this, PlayState* play) { - if (SkelAnime_Update(&this->skelAnime1)) { + if (SkelAnime_Update(&this->snapperSkelAnime)) { func_80AD71B4(this); - } else if (this->skelAnime1.curFrame > 7.0f) { - this->unk_2AC = 1.5f - ((this->skelAnime1.curFrame - 7.0f) * (1.0f / 6)); - this->unk_2A8 = 1.5f - ((this->skelAnime1.curFrame - 7.0f) * (1.0f / 6)); + } else if (this->snapperSkelAnime.curFrame > 7.0f) { + this->unk_2AC = 1.5f - ((this->snapperSkelAnime.curFrame - 7.0f) * (1.0f / 6)); + this->unk_2A8 = 1.5f - ((this->snapperSkelAnime.curFrame - 7.0f) * (1.0f / 6)); } else { - f32 frame = this->skelAnime1.curFrame; + f32 frame = this->snapperSkelAnime.curFrame; this->unk_2AC = (0.2f * frame) + 0.1f; this->unk_2A8 = ((1.0f / 14) * frame) + 1.0f; @@ -426,11 +424,11 @@ void func_80AD7B90(EnKame* this, PlayState* play) { void func_80AD7C54(EnKame* this) { if (this->actionFunc == func_80AD7E0C) { - Animation_MorphToPlayOnce(&this->skelAnime1, &object_tl_Anim_0035EC, -3.0f); + Animation_MorphToPlayOnce(&this->snapperSkelAnime, &gSnapperBouncedUprightAnim, -3.0f); this->unk_29E = 1; this->collider.info.bumper.dmgFlags &= ~0x8000; } else { - Animation_MorphToPlayOnce(&this->skelAnime1, &object_tl_Anim_0039C0, -3.0f); + Animation_MorphToPlayOnce(&this->snapperSkelAnime, &gSnapperFlipOverAnim, -3.0f); this->unk_29E = 0; this->collider.info.bumper.dmgFlags |= 0x8000; } @@ -447,7 +445,7 @@ void func_80AD7C54(EnKame* this) { } void func_80AD7D40(EnKame* this, PlayState* play) { - if (SkelAnime_Update(&this->skelAnime1)) { + if (SkelAnime_Update(&this->snapperSkelAnime)) { if (this->unk_29E == 1) { func_80AD71B4(this); } else { @@ -458,7 +456,7 @@ void func_80AD7D40(EnKame* this, PlayState* play) { } void func_80AD7DA4(EnKame* this) { - Animation_MorphToPlayOnce(&this->skelAnime1, &object_tl_Anim_0027D8, -3.0f); + Animation_MorphToPlayOnce(&this->snapperSkelAnime, &gSnapperWiggleLegsAnim, -3.0f); this->collider.base.acFlags |= AC_ON; this->collider.base.acFlags &= ~AC_HARD; this->collider.base.colType = COLTYPE_HIT6; @@ -469,11 +467,11 @@ void func_80AD7DA4(EnKame* this) { void func_80AD7E0C(EnKame* this, PlayState* play) { if (this->unk_29E > 0) { this->unk_29E--; - if (SkelAnime_Update(&this->skelAnime1)) { + if (SkelAnime_Update(&this->snapperSkelAnime)) { if (Rand_ZeroOne() > 0.5f) { - Animation_PlayOnce(&this->skelAnime1, &object_tl_Anim_0027D8); + Animation_PlayOnce(&this->snapperSkelAnime, &gSnapperWiggleLegsAnim); } else { - Animation_PlayOnce(&this->skelAnime1, &object_tl_Anim_002F88); + Animation_PlayOnce(&this->snapperSkelAnime, &gSnapperFailToFlipUprightAnim); Actor_PlaySfx(&this->actor, NA_SE_EN_PAMET_ROAR); } } @@ -483,16 +481,16 @@ void func_80AD7E0C(EnKame* this, PlayState* play) { } void func_80AD7EC0(EnKame* this) { - Animation_MorphToPlayOnce(&this->skelAnime1, &object_tl_Anim_002510, -3.0f); + Animation_MorphToPlayOnce(&this->snapperSkelAnime, &gSnapperFlipUprightAnim, -3.0f); Actor_PlaySfx(&this->actor, NA_SE_EN_PAMET_WAKEUP); this->actionFunc = func_80AD7F10; } void func_80AD7F10(EnKame* this, PlayState* play) { - if (SkelAnime_Update(&this->skelAnime1)) { + if (SkelAnime_Update(&this->snapperSkelAnime)) { this->actor.shape.shadowDraw = ActorShadow_DrawCircle; func_80AD71B4(this); - } else if (this->skelAnime1.curFrame >= 10.0f) { + } else if (this->snapperSkelAnime.curFrame >= 10.0f) { this->actor.shape.shadowDraw = NULL; this->collider.base.acFlags &= ~AC_ON; this->collider.info.bumper.dmgFlags &= ~0x8000; @@ -525,9 +523,9 @@ void func_80AD7FF8(EnKame* this, PlayState* play) { } void func_80AD8060(EnKame* this) { - s16 lastFrame = Animation_GetLastFrame(&object_tl_Anim_0008B4); + s16 lastFrame = Animation_GetLastFrame(&gSnapperDamageAnim); - Animation_Change(&this->skelAnime1, &object_tl_Anim_0008B4, 1.0f, 0.0f, lastFrame, ANIMMODE_ONCE, -3.0f); + Animation_Change(&this->snapperSkelAnime, &gSnapperDamageAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_ONCE, -3.0f); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, lastFrame); Actor_PlaySfx(&this->actor, NA_SE_EN_PAMET_DAMAGE); this->collider.base.acFlags &= ~AC_ON; @@ -535,13 +533,13 @@ void func_80AD8060(EnKame* this) { } void func_80AD810C(EnKame* this, PlayState* play) { - if (SkelAnime_Update(&this->skelAnime1)) { + if (SkelAnime_Update(&this->snapperSkelAnime)) { func_80AD7DA4(this); } } void func_80AD8148(EnKame* this, PlayState* play) { - Animation_PlayLoop(&this->skelAnime1, &object_tl_Anim_000AF4); + Animation_PlayLoop(&this->snapperSkelAnime, &gSnapperDeathAnim); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 20); this->collider.base.acFlags &= ~AC_ON; this->collider.base.atFlags &= ~AT_ON; @@ -565,7 +563,7 @@ void func_80AD8148(EnKame* this, PlayState* play) { } void func_80AD825C(EnKame* this, PlayState* play) { - SkelAnime_Update(&this->skelAnime1); + SkelAnime_Update(&this->snapperSkelAnime); if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (this->actor.velocity.y < 0.0f)) { Actor_PlaySfx(&this->actor, NA_SE_EN_HIPLOOP_LAND); func_80AD8364(this); @@ -590,7 +588,7 @@ void func_80AD8364(EnKame* this) { void func_80AD8388(EnKame* this, PlayState* play) { Vec3f sp34; - SkelAnime_Update(&this->skelAnime1); + SkelAnime_Update(&this->snapperSkelAnime); this->actor.colorFilterTimer = 100; if (this->unk_29E > 0) { this->unk_29E--; @@ -756,9 +754,10 @@ s32 func_80AD8A48(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s EnKame* this = THIS; if ((this->actionFunc == func_80AD7424) || (this->actionFunc == func_80AD7B90)) { - if (limbIndex == 2) { + if (limbIndex == SNAPPER_LIMB_HEAD) { Matrix_Scale(this->unk_2A8, this->unk_2AC, this->unk_2A8, MTXMODE_APPLY); - } else if ((limbIndex == 11) || (limbIndex == 9) || (limbIndex == 7) || (limbIndex == 5)) { + } else if ((limbIndex == SNAPPER_LIMB_BACK_RIGHT_LEG) || (limbIndex == SNAPPER_LIMB_BACK_LEFT_LEG) || + (limbIndex == SNAPPER_LIMB_FRONT_RIGHT_LEG) || (limbIndex == SNAPPER_LIMB_FRONT_LEFT_LEG)) { Matrix_Scale(this->unk_2A8, this->unk_2AC, this->unk_2AC, MTXMODE_APPLY); } } @@ -777,7 +776,7 @@ void func_80AD8AF8(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Acto Matrix_MultZero(&this->limbPos[D_80AD8EA4[limbIndex]]); } - if (limbIndex == 1) { + if (limbIndex == SNAPPER_LIMB_BODY) { s32 i; Vec3f* ptr; Vec3f* ptr2; @@ -810,8 +809,8 @@ void EnKame_Draw(Actor* thisx, PlayState* play) { gSPSegment(POLY_OPA_DISP++, 0x08, D_80AD8E34[this->unk_29C]); - SkelAnime_DrawFlexOpa(play, this->skelAnime1.skeleton, this->skelAnime1.jointTable, this->skelAnime1.dListCount, - func_80AD8A48, func_80AD8AF8, &this->actor); + SkelAnime_DrawFlexOpa(play, this->snapperSkelAnime.skeleton, this->snapperSkelAnime.jointTable, + this->snapperSkelAnime.dListCount, func_80AD8A48, func_80AD8AF8, &this->actor); Actor_DrawDamageEffects(play, &this->actor, this->limbPos, ARRAY_COUNT(this->limbPos), this->drawDmgEffScale, this->drawDmgEffFrozenSteamScale, this->drawDmgEffAlpha, this->drawDmgEffType); @@ -828,11 +827,11 @@ void EnKame_Draw(Actor* thisx, PlayState* play) { s32 Enkame_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { EnKame* this = THIS; - if (limbIndex == 1) { + if (limbIndex == SPIKED_SNAPPER_LIMB_BODY) { pos->y -= 700.0f; } - if ((this->unk_2AC != 1.0f) && (limbIndex == 3)) { + if ((this->unk_2AC != 1.0f) && (limbIndex == SPIKED_SNAPPER_LIMB_SPIKES)) { Matrix_Scale(1.0f, this->unk_2AC, this->unk_2AC, MTXMODE_APPLY); } return false; @@ -842,6 +841,6 @@ void func_80AD8D64(Actor* thisx, PlayState* play) { EnKame* this = THIS; Gfx_SetupDL25_Opa(play->state.gfxCtx); - SkelAnime_DrawFlexOpa(play, this->skelAnime2.skeleton, this->skelAnime2.jointTable, this->skelAnime2.dListCount, - Enkame_OverrideLimbDraw, NULL, &this->actor); + SkelAnime_DrawFlexOpa(play, this->spikedSnapperSkelAnime.skeleton, this->spikedSnapperSkelAnime.jointTable, + this->spikedSnapperSkelAnime.dListCount, Enkame_OverrideLimbDraw, NULL, &this->actor); } diff --git a/src/overlays/actors/ovl_En_Kame/z_en_kame.h b/src/overlays/actors/ovl_En_Kame/z_en_kame.h index b6ebc3a23a..f721e3ed83 100644 --- a/src/overlays/actors/ovl_En_Kame/z_en_kame.h +++ b/src/overlays/actors/ovl_En_Kame/z_en_kame.h @@ -2,6 +2,7 @@ #define Z_EN_KAME_H #include "global.h" +#include "objects/object_tl/object_tl.h" struct EnKame; @@ -9,12 +10,12 @@ typedef void (*EnKameActionFunc)(struct EnKame*, PlayState*); typedef struct EnKame { /* 0x000 */ Actor actor; - /* 0x144 */ SkelAnime skelAnime1; - /* 0x188 */ Vec3s jointTable1[13]; - /* 0x1D6 */ Vec3s morphTable1[13]; - /* 0x224 */ SkelAnime skelAnime2; - /* 0x268 */ Vec3s jointTable2[4]; - /* 0x280 */ Vec3s morphTable2[4]; + /* 0x144 */ SkelAnime snapperSkelAnime; + /* 0x188 */ Vec3s snapperJointTable[SNAPPER_LIMB_MAX]; + /* 0x1D6 */ Vec3s snapperMorphTable[SNAPPER_LIMB_MAX]; + /* 0x224 */ SkelAnime spikedSnapperSkelAnime; + /* 0x268 */ Vec3s spikedSnapperJointTable[SPIKED_SNAPPER_LIMB_MAX]; + /* 0x280 */ Vec3s spikedSnapperMorphTable[SPIKED_SNAPPER_LIMB_MAX]; /* 0x298 */ EnKameActionFunc actionFunc; /* 0x29C */ u8 unk_29C; /* 0x29D */ u8 drawDmgEffType;