diff --git a/assets/xml/objects/object_firefly.xml b/assets/xml/objects/object_firefly.xml index acdcedb1de..93e5640b63 100644 --- a/assets/xml/objects/object_firefly.xml +++ b/assets/xml/objects/object_firefly.xml @@ -1,54 +1,83 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c index fd3b723d83..131b714d1e 100644 --- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c +++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c @@ -6,7 +6,6 @@ #include "z_en_firefly.h" #include "overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h" -#include "objects/object_firefly/object_firefly.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_4000) @@ -134,8 +133,8 @@ void EnFirefly_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); - SkelAnime_Init(play, &this->skelAnime, &object_firefly_Skel_0018B8, &object_firefly_Anim_00017C, this->jointTable, - this->morphTable, 28); + SkelAnime_Init(play, &this->skelAnime, &gFireKeeseSkel, &gFireKeeseFlyAnim, this->jointTable, this->morphTable, + FIRE_KEESE_LIMB_MAX); Collider_InitAndSetSphere(play, &this->collider, &this->actor, &sSphereInit); CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); @@ -340,7 +339,7 @@ void EnFirefly_FlyIdle(EnFirefly* this, PlayState* play) { void EnFirefly_SetupFall(EnFirefly* this, PlayState* play) { this->timer = 40; this->actor.velocity.y = 0.0f; - Animation_Change(&this->skelAnime, &object_firefly_Anim_00017C, 0.0f, 6.0f, 6.0f, ANIMMODE_ONCE, 0.0f); + Animation_Change(&this->skelAnime, &gFireKeeseFlyAnim, 0.0f, 6.0f, 6.0f, ANIMMODE_ONCE, 0.0f); Actor_PlaySfx(&this->actor, NA_SE_EN_FFLY_DEAD); this->actor.flags |= ACTOR_FLAG_10; @@ -747,7 +746,7 @@ s32 EnFirefly_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3 if (this->isInvisible && (play->actorCtx.lensMaskSize != LENS_MASK_ACTIVE_SIZE)) { *dList = NULL; - } else if (limbIndex == 1) { + } else if (limbIndex == FIRE_KEESE_LIMB_ROOT) { pos->y += 2300.0f; } return false; @@ -768,11 +767,11 @@ void EnFirefly_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* s32 pad; EnFirefly* this = THIS; - if ((this->currentType != KEESE_FIRE) && (limbIndex == 27)) { - gSPDisplayList((*gfx)++, object_firefly_DL_001678); + if ((this->currentType != KEESE_FIRE) && (limbIndex == FIRE_KEESE_LIMB_HEAD)) { + gSPDisplayList((*gfx)++, gKeeseRedEyesDL); } else if ((this->lastDrawnFrame != play->gameplayFrames) && ((this->auraType == KEESE_AURA_FIRE) || (this->auraType == KEESE_AURA_ICE)) && - ((limbIndex == 15) || (limbIndex == 21))) { + ((limbIndex == FIRE_KEESE_LIMB_LEFT_WING_END) || (limbIndex == FIRE_KEESE_LIMB_RIGHT_WING_END_ROOT))) { if (this->actionFunc != EnFirefly_Die) { Matrix_MultZero(&auraPos); auraPos.x += Rand_ZeroFloat(5.0f); @@ -781,7 +780,7 @@ void EnFirefly_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* auraScaleStep = -40; auraLife = 3; } else { - if (limbIndex == 15) { + if (limbIndex == FIRE_KEESE_LIMB_LEFT_WING_END) { auraPos.x = Math_SinS(9100 * this->timer) * this->timer + this->actor.world.pos.x; auraPos.z = Math_CosS(9100 * this->timer) * this->timer + this->actor.world.pos.z; } else { @@ -806,11 +805,11 @@ void EnFirefly_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* auraLife); } - if (limbIndex == 15) { + if (limbIndex == FIRE_KEESE_LIMB_LEFT_WING_END) { Matrix_MultZero(&this->limbPos[0]); - } else if (limbIndex == 21) { + } else if (limbIndex == FIRE_KEESE_LIMB_RIGHT_WING_END_ROOT) { Matrix_MultZero(&this->limbPos[1]); - } else if (limbIndex == 10) { + } else if (limbIndex == FIRE_KEESE_LIMB_BODY) { Matrix_MultZero(&this->limbPos[2]); } } diff --git a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.h b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.h index 6ac9fb008f..429cec7c32 100644 --- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.h +++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.h @@ -2,6 +2,7 @@ #define Z_EN_FIREFLY_H #include "global.h" +#include "objects/object_firefly/object_firefly.h" struct EnFirefly; @@ -27,8 +28,8 @@ typedef struct EnFirefly { /* 0x18F */ u8 drawDmgEffType; /* 0x190 */ s16 timer; /* 0x192 */ s16 pitchTarget; - /* 0x194 */ Vec3s jointTable[28]; - /* 0x23C */ Vec3s morphTable[28]; + /* 0x194 */ Vec3s jointTable[FIRE_KEESE_LIMB_MAX]; + /* 0x23C */ Vec3s morphTable[FIRE_KEESE_LIMB_MAX]; /* 0x2E4 */ f32 maxAltitude; /* 0x2E8 */ f32 drawDmgEffAlpha; /* 0x2E8 */ f32 drawDmgEffScale;