diff --git a/assets/xml/objects/gameplay_keep.xml b/assets/xml/objects/gameplay_keep.xml index 892749e732..f3ed5c8984 100644 --- a/assets/xml/objects/gameplay_keep.xml +++ b/assets/xml/objects/gameplay_keep.xml @@ -1324,11 +1324,11 @@ - + - + - + diff --git a/assets/xml/objects/object_bigpo.xml b/assets/xml/objects/object_bigpo.xml index 5a930c9ac5..c41d5ff793 100644 --- a/assets/xml/objects/object_bigpo.xml +++ b/assets/xml/objects/object_bigpo.xml @@ -1,46 +1,46 @@  - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/include/variables.h b/include/variables.h index 05ea5c2592..3d3a9c4a43 100644 --- a/include/variables.h +++ b/include/variables.h @@ -3991,7 +3991,7 @@ extern UNK_TYPE D_04079B10; extern Gfx D_0407AB10[]; // sun (sparkles when small) displaylist extern Gfx D_0407AB58[]; extern UNK_TYPE D_0407AFB0; -extern Gfx D_0407D590[]; +extern Gfx gGameplayKeepDrawFlameDL[]; extern UNK_TYPE D_0407D650; extern UNK_TYPE D_0407F218; extern UNK_TYPE D_040815D0; diff --git a/src/code/z_fireobj.c b/src/code/z_fireobj.c index 6e543d115a..7c5de646a8 100644 --- a/src/code/z_fireobj.c +++ b/src/code/z_fireobj.c @@ -1,5 +1,6 @@ #include "global.h" #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" +#include "objects/gameplay_keep/gameplay_keep.h" typedef enum { FIRE_STATE_0, @@ -162,7 +163,7 @@ void FireObj_Draw(GlobalContext* globalCtx, FireObj* fire) { Matrix_Scale(fire->xScale, fire->yScale, 1.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, D_0407D590); + gSPDisplayList(POLY_XLU_DISP++, gGameplayKeepDrawFlameDL); CLOSE_DISPS(globalCtx->state.gfxCtx); } } diff --git a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c index ddc5742423..7c72083052 100644 --- a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c +++ b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c @@ -5,6 +5,8 @@ */ #include "z_en_bigpo.h" +#include "objects/object_bigpo/object_bigpo.h" +#include "objects/gameplay_keep/gameplay_keep.h" #define FLAGS 0x00001215 @@ -32,6 +34,7 @@ void EnBigpo_SpawnCutsceneStage6(EnBigpo* this, GlobalContext* globalCtx); void EnBigpo_SpawnCutsceneStage7(EnBigpo* this); void EnBigpo_SpawnCutsceneStage8(EnBigpo* this, GlobalContext* globalCtx); +s32 EnBigpo_ApplyDamage(EnBigpo* this, GlobalContext* globalCtx); void EnBigpo_LowerCutsceneSubCamera(EnBigpo* this, GlobalContext* globalCtx); void EnBigpo_WellWaitForProximity(EnBigpo* this, GlobalContext* globalCtx); void EnBigpo_WaitCutsceneQueue(EnBigpo* this, GlobalContext* globalCtx); @@ -48,7 +51,6 @@ void EnBigpo_SpinAttack(EnBigpo* this, GlobalContext* globalCtx); void EnBigpo_SetupSpinDown(EnBigpo* this); void EnBigpo_SpinningDown(EnBigpo* this, GlobalContext* globalCtx); void EnBigpo_CheckHealth(EnBigpo* this, GlobalContext* globalCtx); -s32 EnBigpo_ApplyDamage(EnBigpo* this, GlobalContext* globalCtx); void EnBigpo_SetupDeath(EnBigpo* this); void EnBigpo_BurnAwayDeath(EnBigpo* this, GlobalContext* globalCtx); void EnBigpo_SetupLanternDrop(EnBigpo* this, GlobalContext* globalCtx); @@ -80,17 +82,6 @@ void EnBigpo_DrawLantern(Actor* thisx, GlobalContext* globalCtx); void EnBigpo_DrawCircleFlames(Actor* thisx, GlobalContext* globalCtx); void EnBigpo_RevealedFire(Actor* thisx, GlobalContext* globalCtx); -extern AnimationHeader D_06001360; -extern SkeletonHeader D_06005C18; -extern AnimationHeader D_06000924; -extern AnimationHeader D_06000924; -extern AnimationHeader D_06000454; -extern Gfx D_060041A0; -extern Gfx D_06001BB0; -extern Gfx D_060058B8; -extern Gfx D_060042C8; -extern Gfx D_060043F8; - extern const ActorInit En_Bigpo_InitVars; const ActorInit En_Bigpo_InitVars = { @@ -203,7 +194,7 @@ void EnBigpo_Init(Actor* thisx, GlobalContext* globalCtx2) { return; } - SkelAnime_Init(globalCtx, &this->skelAnime, &D_06005C18, &D_06000924, this->jointTable, this->morphTable, + SkelAnime_Init(globalCtx, &this->skelAnime, &gBigpoSkeleton, &gBigpoFloatAnim, this->jointTable, this->morphTable, ENBIGPO_LIMBCOUNT); Collider_InitAndSetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo(&thisx->colChkInfo, &sDamageTable, &sColChkInfoInit); @@ -244,7 +235,7 @@ void EnBigpo_Destroy(Actor* thisx, GlobalContext* globalCtx) { if ((this->actor.params != ENBIGPO_POSSIBLEFIRE) && (this->actor.params != ENBIGPO_CHOSENFIRE) && (this->actor.params != ENBIGPO_REVEALEDFIRE) && (this->actor.params != ENBIGPO_UNK5)) { - // if NOT a fire type, *ENBIGPO_REGULAR and ENBIGPO_SUMMONED combat types only) + // if NOT a fire type, *ENBIGPO_REGULAR and ENBIGPO_SUMMONED (combat types only) if (1) {} globalCtx2 = globalCtx; for (fireCount = 0; fireCount < ARRAY_COUNT(this->fires); fireCount++) { @@ -254,7 +245,7 @@ void EnBigpo_Destroy(Actor* thisx, GlobalContext* globalCtx) { } } -void func_80B61914(EnBigpo* this) { +void EnBigpo_RotateSpawnCutsceneFires(EnBigpo* this) { EnBigpoFireEffect* firePtr; s32 i; @@ -275,7 +266,9 @@ void EnBigpo_UpdateSpin(EnBigpo* this) { } } -// Lowers the position/eye of the camera during the Big Poe spawn cutscene +/* + * Lowers the position/eye of the camera during the Big Poe spawn cutscene + */ void EnBigpo_LowerCutsceneSubCamera(EnBigpo* this, GlobalContext* globalContext) { Camera* subCam; @@ -330,7 +323,7 @@ void EnBigpo_SpawnCutsceneStage1(EnBigpo* this, GlobalContext* globalCtx) { this->actor.draw = EnBigpo_DrawCircleFlames; this->actor.shape.rot.y = BINANG_ROT180(this->actor.yawTowardsPlayer); - func_80B61914(this); + EnBigpo_RotateSpawnCutsceneFires(this); for (i = 0; i < ARRAY_COUNT(this->fires); i++) { this->fires[i].pos.y = this->actor.world.pos.y; @@ -383,7 +376,7 @@ void EnBigpo_SpawnCutsceneStage4(EnBigpo* this, GlobalContext* globalCtx) { this->actor.velocity.y += 0.25f; } this->actor.shape.rot.y += this->rotVelocity; - func_80B61914(this); + EnBigpo_RotateSpawnCutsceneFires(this); if (1) {} for (i = 0; i < ARRAY_COUNT(this->fires); i++) { @@ -402,7 +395,7 @@ void EnBigpo_SpawnCutsceneStage4(EnBigpo* this, GlobalContext* globalCtx) { * big poe starts to visibly appear */ void EnBigpo_SpawnCutsceneStage5(EnBigpo* this) { - Animation_PlayLoop(&this->skelAnime, &D_06001360); + Animation_PlayLoop(&this->skelAnime, &gBigpoAwakenStretchAnim); this->actor.draw = EnBigpo_DrawMainBigpo; Actor_SetScale(&this->actor, 0.014f); Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_APPEAR); @@ -420,7 +413,7 @@ void EnBigpo_SpawnCutsceneStage6(EnBigpo* this, GlobalContext* globalCtx) { SkelAnime_Update(&this->skelAnime); this->actor.shape.rot.y += this->rotVelocity; alphaPlus = this->mainColor.a + 10; // decrease transparency - func_80B61914(this); + EnBigpo_RotateSpawnCutsceneFires(this); if (alphaPlus >= 90) { this->rotVelocity -= 0x80; this->actor.velocity.y -= 0.25f; @@ -516,7 +509,7 @@ void EnBigpo_SetupWarpIn(EnBigpo* this, GlobalContext* globalCtx) { s16 randomYaw = (Rand_Next() >> 0x14) + this->actor.yawTowardsPlayer; Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_APPEAR); - Animation_PlayLoop(&this->skelAnime, &D_06001360); + Animation_PlayLoop(&this->skelAnime, &gBigpoAwakenStretchAnim); this->rotVelocity = 0x2000; this->actor.world.pos.x = (Math_SinS(randomYaw) * distance) + player->actor.world.pos.x; this->actor.world.pos.z = (Math_CosS(randomYaw) * distance) + player->actor.world.pos.z; @@ -543,7 +536,7 @@ void EnBigpo_WarpingIn(EnBigpo* this, GlobalContext* globalCtx) { } void EnBigpo_SetupIdleFlying(EnBigpo* this) { - Animation_MorphToLoop(&this->skelAnime, &D_06000924, -5.0f); + Animation_MorphToLoop(&this->skelAnime, &gBigpoFloatAnim, -5.0f); // if poe missed attack, idle 4 seconds, otherwise its reappearing: attack immediately this->idleTimer = (this->actionFunc == EnBigpo_SpinningDown) ? 80 : 0; this->hoverHeightCycleTimer = 40; @@ -654,7 +647,7 @@ void EnBigpo_SpinningDown(EnBigpo* this, GlobalContext* globalCtx) { * called by EnBigpo_ApplyDamage */ void EnBigpo_HitStun(EnBigpo* this) { - Animation_MorphToPlayOnce(&this->skelAnime, &D_06000454, -6.0f); + Animation_MorphToPlayOnce(&this->skelAnime, &gBigpoShockAnim, -6.0f); func_800BCB70(&this->actor, 0x4000, 0xFF, 0, 0x10); this->collider.base.acFlags &= ~AC_ON; func_800BE504(&this->actor, &this->collider); @@ -764,7 +757,8 @@ void EnBigpo_LanternFalling(EnBigpo* this, GlobalContext* globalCtx) { Actor_SetSwitchFlag(globalCtx, this->switchFlags); } - EffectSsHahen_SpawnBurst(globalCtx, &this->actor.world.pos, 6.0f, 0, 1, 1, 15, OBJECT_BIGPO, 10, &D_060041A0); + EffectSsHahen_SpawnBurst(globalCtx, &this->actor.world.pos, 6.0f, 0, 1, 1, 15, OBJECT_BIGPO, 10, + gBigpoDrawLanternFallingDL); EnBigpo_SpawnScoopSoul(this); } } @@ -1252,7 +1246,7 @@ void EnBigpo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, if ((this->actionFunc == EnBigpo_BurnAwayDeath) && (this->idleTimer >= 2) && (limbIndex == 8)) { gSPMatrix((*gfx)++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList((*gfx)++, &D_060058B8); + gSPDisplayList((*gfx)++, &gBigpoDrawCrispyBodyDL); } if (limbIndex == 7) { @@ -1305,7 +1299,7 @@ void EnBigpo_DrawMainBigpo(Actor* thisx, GlobalContext* globalCtx) { // fully visible OR fully transparent dispHead = POLY_OPA_DISP; gSPDisplayList(dispHead, &sSetupDL[6 * 0x19]); - gSPSegment(&dispHead[1], 0x0C, &D_801AEFA0); + gSPSegment(&dispHead[1], 0x0C, &D_801AEFA0); // empty display list for no transparency gSPSegment(&dispHead[2], 0x08, Gfx_EnvColor(globalCtx->state.gfxCtx, this->mainColor.r, this->mainColor.g, this->mainColor.b, this->mainColor.a)); @@ -1315,7 +1309,7 @@ void EnBigpo_DrawMainBigpo(Actor* thisx, GlobalContext* globalCtx) { } else { dispHead = POLY_XLU_DISP; gSPDisplayList(dispHead, &sSetupDL[6 * 0x19]); - gSPSegment(&dispHead[1], 0x0C, &D_801AEF88); + gSPSegment(&dispHead[1], 0x0C, &D_801AEF88); // transparency display list gSPSegment(&dispHead[2], 0x08, Gfx_EnvColor(globalCtx->state.gfxCtx, this->mainColor.r, this->mainColor.g, this->mainColor.b, this->mainColor.a)); @@ -1360,7 +1354,7 @@ void EnBigpo_DrawScoopSoul(Actor* thisx, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, &D_06001BB0); + gSPDisplayList(POLY_XLU_DISP++, &gBigpoDrawSoulDL); CLOSE_DISPS(globalCtx->state.gfxCtx); } @@ -1412,9 +1406,9 @@ void EnBigpo_DrawLantern(Actor* thisx, GlobalContext* globalCtx) { gSPMatrix(&dispHead[3], Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(&dispHead[4], &D_060042C8); + gSPDisplayList(&dispHead[4], &gBigpoDrawLanternMainDL); - gSPDisplayList(&dispHead[5], &D_060043F8); + gSPDisplayList(&dispHead[5], &gBigpoDrawLanternPurpleTopDL); // fully transparent OR fully invisible if ((this->mainColor.a == 255) || (this->mainColor.a == 0)) { @@ -1461,7 +1455,7 @@ void EnBigpo_DrawCircleFlames(Actor* thisx, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, &D_0407D590); // flame displaylist + gSPDisplayList(POLY_XLU_DISP++, &gGameplayKeepDrawFlameDL); } CLOSE_DISPS(globalCtx->state.gfxCtx); @@ -1488,7 +1482,7 @@ void EnBigpo_RevealedFire(Actor* thisx, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, &D_0407D590); // flame displaylist + gSPDisplayList(POLY_XLU_DISP++, &gGameplayKeepDrawFlameDL); CLOSE_DISPS(globalCtx->state.gfxCtx); } diff --git a/src/overlays/actors/ovl_En_Dno/z_en_dno.c b/src/overlays/actors/ovl_En_Dno/z_en_dno.c index 5a6b883685..2e82973da5 100644 --- a/src/overlays/actors/ovl_En_Dno/z_en_dno.c +++ b/src/overlays/actors/ovl_En_Dno/z_en_dno.c @@ -6,6 +6,7 @@ #include "z_en_dno.h" #include "overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.h" +#include "objects/gameplay_keep/gameplay_keep.h" #define FLAGS 0x00000039 @@ -1015,7 +1016,7 @@ void EnDno_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, -frames * 20, 0x20, 0x80)); gDPSetPrimColor(&gfxXlu[2], 0x80, 0x80, 255, 255, 0, 255); gDPSetEnvColor(&gfxXlu[3], 255, 0, 0, 0); - gSPDisplayList(&gfxXlu[4], D_0407D590); + gSPDisplayList(&gfxXlu[4], gGameplayKeepDrawFlameDL); POLY_XLU_DISP = gfxXlu + 5; diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 1bb44aa022..834830a687 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -5,6 +5,7 @@ */ #include "z_en_po_sisters.h" +#include "objects/gameplay_keep/gameplay_keep.h" #define FLAGS 0x00005015 @@ -1189,7 +1190,7 @@ void EnPoSisters_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_Scale(phi_f20, phi_f20, phi_f20, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, D_0407D590); + gSPDisplayList(POLY_XLU_DISP++, gGameplayKeepDrawFlameDL); } func_800BE680(globalCtx, &this->actor, this->unk_28C, ARRAY_COUNT(this->unk_28C), diff --git a/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c b/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c index a3073a7e0e..098d0503ea 100644 --- a/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c +++ b/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c @@ -5,6 +5,7 @@ */ #include "z_obj_aqua.h" +#include "objects/gameplay_keep/gameplay_keep.h" #define FLAGS 0x00000010 @@ -66,8 +67,6 @@ Vec3f D_80ACC308 = { 1.0f / 1000.0f, 7.0f / 10000.0f, 1.0f / 1000.0f }; Vec3f D_80ACC314 = { 8.6f / 1000.0f, 8.0f / 10000.0f, 8.6f / 1000.0f }; Vec3f D_80ACC320 = { 1.0f / 100.0f, 2.6f / 1000.0f, 1.0f / 100.0f }; -extern Gfx D_0407D590[]; - void func_80ACB6A0(ObjAqua* this, GlobalContext* globalCtx) { s32 pad; Vec3f sp58; @@ -292,6 +291,6 @@ void ObjAqua_Draw(Actor* thisx, GlobalContext* globalCtx) { } Matrix_RotateY(yaw, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, D_0407D590); + gSPDisplayList(POLY_XLU_DISP++, gGameplayKeepDrawFlameDL); CLOSE_DISPS(globalCtx->state.gfxCtx); } diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index 3eb50153be..b88dc23fae 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -5,6 +5,7 @@ */ #include "z_obj_syokudai.h" +#include "objects/gameplay_keep/gameplay_keep.h" #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" #define FLAGS 0x00000410 @@ -314,7 +315,7 @@ void ObjSyokudai_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_RotateY(BINANG_ROT180(func_800DFCDC(GET_ACTIVE_CAM(globalCtx)) - thisx->shape.rot.y), MTXMODE_APPLY); Matrix_Scale(flameScale, flameScale, flameScale, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, D_0407D590); + gSPDisplayList(POLY_XLU_DISP++, gGameplayKeepDrawFlameDL); } CLOSE_DISPS(globalCtx->state.gfxCtx); } diff --git a/tools/actorfixer.py b/tools/actorfixer.py index 42d1c5bf8e..eb78c31462 100755 --- a/tools/actorfixer.py +++ b/tools/actorfixer.py @@ -304,6 +304,7 @@ animdict = { "func_800A81F0": "EffectBlure_AddVertex", "func_800A8514": "EffectBlure_AddSpace", "Effect_GetParams": "Effect_GetByIndex", + "D_0407D590": "gGameplayKeepDrawFlameDL" "skelanime.unk03": "skelanime.taper", diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index bfdce1e060..bf36e9da57 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -14161,7 +14161,7 @@ 0x80B610B8:("ObjDora_Draw",), 0x80B615E0:("EnBigpo_Init",), 0x80B6186C:("EnBigpo_Destroy",), - 0x80B61914:("func_80B61914",), + 0x80B61914:("EnBigpo_RotateSpawnCutsceneFires",), 0x80B619B4:("func_80B619B4",), 0x80B619FC:("func_80B619FC",), 0x80B61AC8:("EnBigPo_InitWellBigPo",), diff --git a/undefined_syms.txt b/undefined_syms.txt index bf888b7ac5..525e3dcafc 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -1667,18 +1667,6 @@ D_06004210 = 0x06004210; D_06007C70 = 0x06007C70; D_0600823C = 0x0600823C; -// ovl_En_Bigpo - -D_06000454 = 0x06000454; -D_06000924 = 0x06000924; -D_06001360 = 0x06001360; -D_06001BB0 = 0x06001BB0; -D_060041A0 = 0x060041A0; -D_060042C8 = 0x060042C8; -D_060043F8 = 0x060043F8; -D_060058B8 = 0x060058B8; -D_06005C18 = 0x06005C18; - // ovl_En_Bigslime D_060010F4 = 0x060010F4;