diff --git a/assets/xml/objects/object_po.xml b/assets/xml/objects/object_po.xml index 98dbc61b1..a430d178b 100644 --- a/assets/xml/objects/object_po.xml +++ b/assets/xml/objects/object_po.xml @@ -1,53 +1,65 @@  + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index 1c301a8bf..f0109b40a 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -7,7 +7,6 @@ #include "prevent_bss_reordering.h" #include "z_en_poh.h" #include "overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h" -#include "objects/object_po/object_po.h" #define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UNFRIENDLY | ACTOR_FLAG_200 | ACTOR_FLAG_IGNORE_QUAKE) @@ -167,8 +166,7 @@ void EnPoh_Init(Actor* thisx, PlayState* play) { this->lightNode = LightContext_InsertLight(play, &play->lightCtx, &this->lightInfo); Lights_PointGlowSetInfo(&this->lightInfo, this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z, 255, 255, 255, 0); - SkelAnime_Init(play, &this->skelAnime, &object_po_Skel_0050D0, &object_po_Anim_000A60, this->jointTable, - this->morphTable, 21); + SkelAnime_Init(play, &this->skelAnime, &gPoeSkel, &gPoeFloatAnim, this->jointTable, this->morphTable, POE_LIMB_MAX); this->actor.bgCheckFlags |= BGCHECKFLAG_PLAYER_400; func_80B2D0E8(this); } @@ -215,7 +213,7 @@ void func_80B2C9B8(EnPoh* this, PlayState* play) { } void func_80B2CA4C(EnPoh* this) { - Animation_PlayLoop(&this->skelAnime, &object_po_Anim_0015B0); + Animation_PlayLoop(&this->skelAnime, &gPoeDisappearAnim); this->unk_18E = Rand_S16Offset(2, 3); this->actionFunc = func_80B2CAA4; this->actor.speed = 0.0f; @@ -241,7 +239,7 @@ void func_80B2CAA4(EnPoh* this, PlayState* play) { } void func_80B2CB60(EnPoh* this) { - Animation_PlayLoop(&this->skelAnime, &object_po_Anim_000A60); + Animation_PlayLoop(&this->skelAnime, &gPoeFloatAnim); this->unk_18E = Rand_S16Offset(15, 3); this->colliderCylinder.base.acFlags |= AC_ON; this->actionFunc = func_80B2CBBC; @@ -276,7 +274,7 @@ void func_80B2CBBC(EnPoh* this, PlayState* play) { } void func_80B2CD14(EnPoh* this) { - Animation_PlayLoop(&this->skelAnime, &object_po_Anim_000A60); + Animation_PlayLoop(&this->skelAnime, &gPoeFloatAnim); this->actionFunc = func_80B2CD64; this->unk_18E = 0; this->actor.speed = 2.0f; @@ -315,7 +313,7 @@ void func_80B2CD64(EnPoh* this, PlayState* play) { } void func_80B2CEC8(EnPoh* this) { - Animation_MorphToLoop(&this->skelAnime, &object_po_Anim_0001A8, -6.0f); + Animation_MorphToLoop(&this->skelAnime, &gPoeAttackAnim, -6.0f); this->unk_18E = 12; this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH); @@ -344,7 +342,7 @@ void func_80B2CF28(EnPoh* this, PlayState* play) { } void func_80B2CFF8(EnPoh* this) { - Animation_MorphToPlayOnce(&this->skelAnime, &object_po_Anim_0004EC, -6.0f); + Animation_MorphToPlayOnce(&this->skelAnime, &gPoeDamagedAnim, -6.0f); func_800BE504(&this->actor, &this->colliderCylinder); this->colliderCylinder.base.acFlags &= ~AC_ON; this->actor.speed = 5.0f; @@ -366,7 +364,7 @@ void func_80B2D07C(EnPoh* this, PlayState* play) { void func_80B2D0E8(EnPoh* this) { this->unk_197 = 0; this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; - Animation_PlayOnceSetSpeed(&this->skelAnime, &object_po_Anim_0011C4, 0.0f); + Animation_PlayOnceSetSpeed(&this->skelAnime, &gPoeAppearAnim, 0.0f); this->actionFunc = func_80B2D140; } @@ -445,7 +443,7 @@ void func_80B2D300(EnPoh* this, PlayState* play) { } void func_80B2D5DC(EnPoh* this) { - Animation_PlayOnce(&this->skelAnime, &object_po_Anim_000A60); + Animation_PlayOnce(&this->skelAnime, &gPoeFloatAnim); this->actionFunc = func_80B2D628; this->actor.speed = -5.0f; } @@ -462,7 +460,7 @@ void func_80B2D628(EnPoh* this, PlayState* play) { } void func_80B2D694(EnPoh* this) { - Animation_PlayLoop(&this->skelAnime, &object_po_Anim_0015B0); + Animation_PlayLoop(&this->skelAnime, &gPoeDisappearAnim); this->unk_192 = BINANG_ROT180(this->actor.world.rot.y); this->actionFunc = func_80B2D6EC; this->actor.speed = 0.0f; @@ -540,7 +538,7 @@ void func_80B2D980(EnPoh* this, PlayState* play) { } void func_80B2DAD0(EnPoh* this) { - Animation_MorphToLoop(&this->skelAnime, &object_po_Anim_0006E0, -5.0f); + Animation_MorphToLoop(&this->skelAnime, &gPoeFleeAnim, -5.0f); this->actor.speed = 5.0f; this->actor.world.rot.y = BINANG_ROT180(this->actor.shape.rot.y); this->colliderCylinder.base.acFlags |= AC_ON; @@ -585,7 +583,7 @@ void func_80B2DC50(EnPoh* this, PlayState* play) { void func_80B2DD2C(EnPoh* this, PlayState* play) { if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.floorHeight <= BGCHECK_Y_MIN)) { - EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 6.0f, 0, 1, 1, 15, OBJECT_PO, 10, object_po_DL_002D28); + EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 6.0f, 0, 1, 1, 15, OBJECT_PO, 10, gPoeLanternDL); func_80B2E0B0(this); } @@ -864,34 +862,34 @@ s32 EnPoh_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p return false; } -static s8 sLimbToBodyParts[OBJECT_PO_LIMB_MAX] = { - BODYPART_NONE, // OBJECT_PO_LIMB_NONE - BODYPART_NONE, // OBJECT_PO_LIMB_01 - BODYPART_NONE, // OBJECT_PO_LIMB_02 - BODYPART_NONE, // OBJECT_PO_LIMB_03 - ENPOH_BODYPART_4, // OBJECT_PO_LIMB_04 - ENPOH_BODYPART_5, // OBJECT_PO_LIMB_05 - BODYPART_NONE, // OBJECT_PO_LIMB_06 - BODYPART_NONE, // OBJECT_PO_LIMB_07 - BODYPART_NONE, // OBJECT_PO_LIMB_08 - ENPOH_BODYPART_0, // OBJECT_PO_LIMB_09 - ENPOH_BODYPART_1, // OBJECT_PO_LIMB_0A - BODYPART_NONE, // OBJECT_PO_LIMB_0B - BODYPART_NONE, // OBJECT_PO_LIMB_0C - BODYPART_NONE, // OBJECT_PO_LIMB_0D - BODYPART_NONE, // OBJECT_PO_LIMB_0E - BODYPART_NONE, // OBJECT_PO_LIMB_0F - ENPOH_BODYPART_2, // OBJECT_PO_LIMB_10 - BODYPART_NONE, // OBJECT_PO_LIMB_11 - BODYPART_NONE, // OBJECT_PO_LIMB_12 - ENPOH_BODYPART_3, // OBJECT_PO_LIMB_13 - BODYPART_NONE, // OBJECT_PO_LIMB_14 +static s8 sLimbToBodyParts[POE_LIMB_MAX] = { + BODYPART_NONE, // POE_LIMB_NONE + BODYPART_NONE, // POE_LIMB_ROOT + BODYPART_NONE, // POE_LIMB_ROOT_WRAPPER + BODYPART_NONE, // POE_LIMB_BOTTOM_CLOAK_ROOT + POE_BODYPART_BOTTOM_CLOAK, // POE_LIMB_BOTTOM_CLOAK + POE_BODYPART_TOP_CLOAK, // POE_LIMB_TOP_CLOAK + BODYPART_NONE, // POE_LIMB_LEFT_ARM_ROOT + BODYPART_NONE, // POE_LIMB_LEFT_ARM_WRAPPER + BODYPART_NONE, // POE_LIMB_LEFT_FOREARM_ROOT + POE_BODYPART_LEFT_FOREARM, // POE_LIMB_LEFT_FOREARM + POE_BODYPART_LEFT_UPPER_ARM, // POE_LIMB_LEFT_UPPER_ARM + BODYPART_NONE, // POE_LIMB_FACE + BODYPART_NONE, // POE_LIMB_RIGHT_ARM_ROOT + BODYPART_NONE, // POE_LIMB_RIGHT_ARM_WRAPPER + BODYPART_NONE, // POE_LIMB_RIGHT_FOREARM_ROOT + BODYPART_NONE, // POE_LIMB_RIGHT_ARM_HAND_ROOT + POE_BODYPART_RIGHT_ARM_HAND, // POE_LIMB_RIGHT_ARM_HAND + BODYPART_NONE, // POE_LIMB_LANTERN_ROOT + BODYPART_NONE, // POE_LIMB_LANTERN + POE_BODYPART_RIGHT_FOREARM, // POE_LIMB_RIGHT_FOREARM + BODYPART_NONE, // POE_LIMB_RIGHT_UPPER_ARM }; static Vec3f D_80B2F734[] = { - { -600.0f, 500.0f, 1700.0f }, // ENPOH_BODYPART_7 - { -600.0f, 500.0f, -1700.0f }, // ENPOH_BODYPART_8 - { 1000.0f, 1700.0f, 0.0f }, // ENPOH_BODYPART_9 + { -600.0f, 500.0f, 1700.0f }, // POE_BODYPART_7 + { -600.0f, 500.0f, -1700.0f }, // POE_BODYPART_8 + { 1000.0f, 1700.0f, 0.0f }, // POE_BODYPART_9 }; void EnPoh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { @@ -903,7 +901,7 @@ void EnPoh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Collider_UpdateSpheres(limbIndex, &this->colliderSph); if ((this->actionFunc == func_80B2D300) && (this->unk_18E >= 2) && (limbIndex == 5)) { gSPMatrix((*gfx)++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList((*gfx)++, object_po_DL_002608); + gSPDisplayList((*gfx)++, gPoeBurnDL); } if (limbIndex == 18) { @@ -921,19 +919,19 @@ void EnPoh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, bodyPartIndex = sLimbToBodyParts[limbIndex]; if (bodyPartIndex != BODYPART_NONE) { - if (bodyPartIndex <= ENPOH_BODYPART_3) { + if (bodyPartIndex <= POE_BODYPART_RIGHT_FOREARM) { Matrix_MultZero(&this->bodyPartsPos[bodyPartIndex]); - } else if (bodyPartIndex == ENPOH_BODYPART_4) { + } else if (bodyPartIndex == POE_BODYPART_BOTTOM_CLOAK) { Matrix_MultVecX(2000.0f, &this->bodyPartsPos[bodyPartIndex]); } else { s32 i; Vec3f* vec = &this->bodyPartsPos[bodyPartIndex + 2]; Vec3f* vec2 = &D_80B2F734[0]; - Matrix_MultVecX(-2000.0f, &this->bodyPartsPos[bodyPartIndex]); // ENPOH_BODYPART_5 - Matrix_MultVecY(-2000.0f, &this->bodyPartsPos[bodyPartIndex + 1]); // ENPOH_BODYPART_6 + Matrix_MultVecX(-2000.0f, &this->bodyPartsPos[bodyPartIndex]); // POE_BODYPART_TOP_CLOAK + Matrix_MultVecY(-2000.0f, &this->bodyPartsPos[bodyPartIndex + 1]); // POE_BODYPART_6 - for (i = bodyPartIndex + 2; i < ENPOH_BODYPART_MAX; i++, vec++, vec2++) { + for (i = bodyPartIndex + 2; i < POE_BODYPART_MAX; i++, vec++, vec2++) { Matrix_MultVec3f(vec2, vec); } } @@ -978,10 +976,10 @@ void EnPoh_Draw(Actor* thisx, PlayState* play) { Matrix_Put(&this->unk_3D8); gSPMatrix(&gfx[2], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(&gfx[3], object_po_DL_002D28); + gSPDisplayList(&gfx[3], gPoeLanternDL); POLY_OPA_DISP = &gfx[4]; - Actor_DrawDamageEffects(play, &this->actor, this->bodyPartsPos, ENPOH_BODYPART_MAX, + Actor_DrawDamageEffects(play, &this->actor, this->bodyPartsPos, POE_BODYPART_MAX, this->actor.scale.x * 100.0f * this->drawDmgEffScale, 0.0f, this->drawDmgEffAlpha, ACTOR_DRAW_DMGEFF_LIGHT_ORBS); @@ -1018,7 +1016,7 @@ void func_80B2F37C(Actor* thisx, PlayState* play) { this->actor.world.pos.z + sp7C.z, this->unk_198, this->unk_199, this->unk_19A, 200); gSPMatrix(&gfx[2], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(&gfx[3], object_po_DL_002D28); + gSPDisplayList(&gfx[3], gPoeLanternDL); POLY_OPA_DISP = &gfx[4]; } else { @@ -1033,7 +1031,7 @@ void func_80B2F37C(Actor* thisx, PlayState* play) { Matrix_RotateYF(BINANG_TO_RAD(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x8000), MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, object_po_DL_003850); + gSPDisplayList(POLY_XLU_DISP++, gPoeSoulDL); } CLOSE_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.h b/src/overlays/actors/ovl_En_Poh/z_en_poh.h index 5f7439e4a..7c3e47eed 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.h +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.h @@ -2,23 +2,24 @@ #define Z_EN_POH_H #include "global.h" +#include "objects/object_po/object_po.h" struct EnPoh; typedef void (*EnPohActionFunc)(struct EnPoh*, PlayState*); typedef enum EnPohBodyPart { - /* 0 */ ENPOH_BODYPART_0, - /* 1 */ ENPOH_BODYPART_1, - /* 2 */ ENPOH_BODYPART_2, - /* 3 */ ENPOH_BODYPART_3, - /* 4 */ ENPOH_BODYPART_4, - /* 5 */ ENPOH_BODYPART_5, - /* 6 */ ENPOH_BODYPART_6, - /* 7 */ ENPOH_BODYPART_7, - /* 8 */ ENPOH_BODYPART_8, - /* 9 */ ENPOH_BODYPART_9, - /* 10 */ ENPOH_BODYPART_MAX + /* 0 */ POE_BODYPART_LEFT_FOREARM, + /* 1 */ POE_BODYPART_LEFT_UPPER_ARM, + /* 2 */ POE_BODYPART_RIGHT_ARM_HAND, + /* 3 */ POE_BODYPART_RIGHT_FOREARM, + /* 4 */ POE_BODYPART_BOTTOM_CLOAK, + /* 5 */ POE_BODYPART_TOP_CLOAK, + /* 6 */ POE_BODYPART_6, + /* 7 */ POE_BODYPART_7, + /* 8 */ POE_BODYPART_8, + /* 9 */ POE_BODYPART_9, + /* 10 */ POE_BODYPART_MAX } EnPohBodyPart; typedef struct EnPoh { @@ -38,11 +39,11 @@ typedef struct EnPoh { /* 0x199 */ u8 unk_199; /* 0x19A */ u8 unk_19A; /* 0x19B */ u8 unk_19B; - /* 0x19C */ Vec3s jointTable[21]; - /* 0x21A */ Vec3s morphTable[21]; + /* 0x19C */ Vec3s jointTable[POE_LIMB_MAX]; + /* 0x21A */ Vec3s morphTable[POE_LIMB_MAX]; /* 0x298 */ f32 drawDmgEffAlpha; /* 0x29C */ f32 drawDmgEffScale; - /* 0x2A0 */ Vec3f bodyPartsPos[ENPOH_BODYPART_MAX]; + /* 0x2A0 */ Vec3f bodyPartsPos[POE_BODYPART_MAX]; /* 0x318 */ LightNode* lightNode; /* 0x31C */ LightInfo lightInfo; /* 0x32C */ ColliderCylinder colliderCylinder;