From e48e565ffeb7f03f7e17412335366b4e086983cd Mon Sep 17 00:00:00 2001 From: Anghelo Carvajal Date: Thu, 18 Mar 2021 04:23:59 -0300 Subject: object_hidan_objects OK (#695) * xml Signed-off-by: angie * add to spec and remove repetaed entries Signed-off-by: Angie * add some dlists Signed-off-by: Angie * add a few offsets Signed-off-by: Angie * fireballs textures Signed-off-by: Angie * add some unused dlists Signed-off-by: Angie * change the references in decompiled objects Signed-off-by: angie * change the references from non matching actors Signed-off-by: angie * add blob Signed-off-by: angie * changes requested by @Zelllll Signed-off-by: angie * why is this object so big? Signed-off-by: angie * rename a lot of stuff Signed-off-by: Angie * this object never ends Signed-off-by: angie * Some floats Signed-off-by: angie * stones blocks Signed-off-by: angie * rename fireball and stuff Signed-off-by: Angie * Stationary flame thrower Signed-off-by: Angie * SpinningFlamethrower Signed-off-by: Angie * Rename the lasts textures Signed-off-by: Angie * some random renamings Signed-off-by: Angie * run format Signed-off-by: Angie * Remove .gitkeep Signed-off-by: angie --- .../actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c | 11 +++--- .../ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c | 16 ++++----- .../actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c | 8 ++--- .../actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c | 13 ++++++-- .../ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c | 14 +++----- .../actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c | 14 ++++---- .../actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c | 25 ++++++-------- .../z_bg_hidan_kowarerukabe.c | 13 ++++++-- .../actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c | 39 ++++++++++++---------- .../ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c | 31 +++++++++-------- .../ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c | 12 ++++--- .../actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c | 34 ++++++++++--------- .../actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c | 8 ++--- .../actors/ovl_Door_Shutter/z_door_shutter.c | 5 +-- src/overlays/actors/ovl_En_Door/z_en_door.c | 6 ++-- 15 files changed, 136 insertions(+), 113 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c index 27bb393c5..fc3aa9ee7 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c @@ -5,6 +5,7 @@ */ #include "z_bg_hidan_dalm.h" +#include "objects/object_hidan_objects/object_hidan_objects.h" #define FLAGS 0x00000000 @@ -95,10 +96,6 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32_DIV1000(gravity, -200, ICHAIN_STOP), }; -extern Gfx D_0600BBF0[]; -extern Gfx D_0600BDF0[]; -extern CollisionHeader D_0600DA10; - void BgHidanDalm_Init(Actor* thisx, GlobalContext* globalCtx) { BgHidanDalm* this = THIS; s32 pad; @@ -106,7 +103,7 @@ void BgHidanDalm_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_ProcessInitChain(thisx, sInitChain); DynaPolyActor_Init(&this->dyna, DPM_UNK); - CollisionHeader_GetVirtual(&D_0600DA10, &colHeader); + CollisionHeader_GetVirtual(&gFireTempleHammerableTotemCol, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader); Collider_InitTris(globalCtx, &this->collider); Collider_SetTris(globalCtx, &this->collider, thisx, &sTrisInit, this->colliderItems); @@ -216,9 +213,9 @@ void BgHidanDalm_Draw(Actor* thisx, GlobalContext* globalCtx) { BgHidanDalm* this = THIS; if (this->dyna.actor.params == 0) { - Gfx_DrawDListOpa(globalCtx, D_0600BBF0); + Gfx_DrawDListOpa(globalCtx, gFireTempleHammerableTotemBodyDL); } else { - Gfx_DrawDListOpa(globalCtx, D_0600BDF0); + Gfx_DrawDListOpa(globalCtx, gFireTempleHammerableTotemHeadDL); } if (this->actionFunc == BgHidanDalm_Wait) { diff --git a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c index b406f8c02..1a094f207 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c @@ -5,6 +5,7 @@ */ #include "z_bg_hidan_firewall.h" +#include "objects/object_hidan_objects/object_hidan_objects.h" #define FLAGS 0x00000000 @@ -22,8 +23,6 @@ void BgHidanFirewall_Erupt(BgHidanFirewall* this, GlobalContext* globalCtx); void BgHidanFirewall_Collide(BgHidanFirewall* this, GlobalContext* globalCtx); void BgHidanFirewall_ColliderFollowPlayer(BgHidanFirewall* this, GlobalContext* globalCtx); -extern Gfx D_0600DA80[]; - const ActorInit Bg_Hidan_Firewall_InitVars = { ACTOR_BG_HIDAN_FIREWALL, ACTORCAT_BG, @@ -58,10 +57,6 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit sColChkInfoInit = { 1, 80, 100, MASS_IMMOVABLE }; -static UNK_PTR D_80886D04[] = { - 0x06015D20, 0x06016120, 0x06016520, 0x06016920, 0x06016D20, 0x06017120, 0x06017520, 0x06017920, -}; - void BgHidanFirewall_Init(Actor* thisx, GlobalContext* globalCtx) { BgHidanFirewall* this = THIS; @@ -199,6 +194,11 @@ void BgHidanFirewall_Update(Actor* thisx, GlobalContext* globalCtx) { } } +static u64* sFireballTexs[] = { + gFireTempleFireball0Tex, gFireTempleFireball1Tex, gFireTempleFireball2Tex, gFireTempleFireball3Tex, + gFireTempleFireball4Tex, gFireTempleFireball5Tex, gFireTempleFireball6Tex, gFireTempleFireball7Tex, +}; + void BgHidanFirewall_Draw(Actor* thisx, GlobalContext* globalCtx) { BgHidanFirewall* this = THIS; @@ -206,12 +206,12 @@ void BgHidanFirewall_Draw(Actor* thisx, GlobalContext* globalCtx) { POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x14); - gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80886D04[this->unk_150])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sFireballTexs[this->unk_150])); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x01, 255, 255, 0, 150); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 255); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_firewall.c", 458), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, D_0600DA80); + gSPDisplayList(POLY_XLU_DISP++, gFireTempleFireballUpperHalfDL); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_firewall.c", 463); } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c b/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c index 61970d412..313137a27 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c @@ -5,6 +5,7 @@ */ #include "z_bg_hidan_fslift.h" +#include "objects/object_hidan_objects/object_hidan_objects.h" #define FLAGS 0x00000010 @@ -19,9 +20,6 @@ void func_80886FCC(BgHidanFslift* this, GlobalContext* globalCtx); void func_8088706C(BgHidanFslift* this, GlobalContext* globalCtx); void func_808870D8(BgHidanFslift* this, GlobalContext* globalCtx); -extern Gfx D_0600B630[]; -extern CollisionHeader D_0600E1E8; - const ActorInit Bg_Hidan_Fslift_InitVars = { ACTOR_BG_HIDAN_FSLIFT, ACTORCAT_BG, @@ -49,7 +47,7 @@ void BgHidanFslift_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, DPM_PLAYER); - CollisionHeader_GetVirtual(&D_0600E1E8, &colHeader); + CollisionHeader_GetVirtual(&gFireTempleHookshotElevatorCol, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader); if (Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_OBJ_HSBLOCK, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y + 40.0f, @@ -143,5 +141,5 @@ void BgHidanFslift_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgHidanFslift_Draw(Actor* thisx, GlobalContext* globalCtx) { - Gfx_DrawDListOpa(globalCtx, D_0600B630); + Gfx_DrawDListOpa(globalCtx, gFireTempleHookshotElevatorDL); } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c index 65e53b04f..61ba45610 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c @@ -1,5 +1,13 @@ +/* + * File: z_bg_hidan_fwbig.c + * Overlay: ovl_Bg_Hidan_Fwbig + * Description: Large fire walls at Fire Temple (flame wall before bombable door and the one that chases the player in + * the lava room) + */ + #include "z_bg_hidan_fwbig.h" #include "objects/gameplay_keep/gameplay_keep.h" +#include "objects/object_hidan_objects/object_hidan_objects.h" #define FLAGS 0x00000010 @@ -25,8 +33,6 @@ void BgHidanFwbig_WaitForTimer(BgHidanFwbig* this, GlobalContext* globalCtx); void BgHidanFwbig_WaitForPlayer(BgHidanFwbig* this, GlobalContext* globalCtx); void BgHidanFwbig_Move(BgHidanFwbig* this, GlobalContext* globalCtx); -extern Gfx D_0600DB20[]; - const ActorInit Bg_Hidan_Fwbig_InitVars = { ACTOR_BG_HIDAN_FWBIG, ACTORCAT_PROP, @@ -247,6 +253,7 @@ void BgHidanFwbig_Draw(Actor* thisx, GlobalContext* globalCtx) { f32 height; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_fwbig.c", 630); + func_80093D84(globalCtx->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gEffUnknown4Tex)); @@ -266,7 +273,7 @@ void BgHidanFwbig_Draw(Actor* thisx, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_fwbig.c", 660), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, D_0600DB20); + gSPDisplayList(POLY_XLU_DISP++, gFireTempleBigFireWallDL); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_fwbig.c", 664); } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c b/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c index a8959d832..e5408c015 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c @@ -5,6 +5,7 @@ */ #include "z_bg_hidan_hamstep.h" +#include "objects/object_hidan_objects/object_hidan_objects.h" #define FLAGS 0x00000000 @@ -21,11 +22,6 @@ void func_808889B8(BgHidanHamstep* this, GlobalContext* globalCtx); void func_80888A58(BgHidanHamstep* this, GlobalContext* globalCtx); void BgHidanHamstep_DoNothing(BgHidanHamstep* this, GlobalContext* globalCtx); -extern Gfx D_0600A548[]; -extern Gfx D_0600A668[]; -extern CollisionHeader D_0600DE44; -extern CollisionHeader D_0600DD1C; - static f32 sYPosOffsets[] = { -20.0f, -120.0f, -220.0f, -320.0f, -420.0f, }; @@ -158,9 +154,9 @@ void BgHidanHamstep_Init(Actor* thisx, GlobalContext* globalCtx) { } if ((this->dyna.actor.params & 0xFF) == 0) { - CollisionHeader_GetVirtual(&D_0600DE44, &colHeader); + CollisionHeader_GetVirtual(&gFireTempleStoneStep1Col, &colHeader); } else { - CollisionHeader_GetVirtual(&D_0600DD1C, &colHeader); + CollisionHeader_GetVirtual(&gFireTempleStoneStep2Col, &colHeader); } this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader); @@ -410,9 +406,9 @@ void BgHidanHamstep_Draw(Actor* thisx, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if ((thisx->params & 0xFF) == 0) { - gSPDisplayList(POLY_OPA_DISP++, D_0600A668); + gSPDisplayList(POLY_OPA_DISP++, gFireTempleStoneStep1DL); } else { - gSPDisplayList(POLY_OPA_DISP++, D_0600A548); + gSPDisplayList(POLY_OPA_DISP++, gFireTempleStoneStep2DL); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_hamstep.c", 796); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c index bc67de48b..617e50bd9 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c @@ -5,6 +5,7 @@ */ #include "z_bg_hidan_hrock.h" +#include "objects/object_hidan_objects/object_hidan_objects.h" #define FLAGS 0x00000000 @@ -19,9 +20,6 @@ void func_8088960C(BgHidanHrock* this, GlobalContext* globalCtx); void func_808896B8(BgHidanHrock* this, GlobalContext* globalCtx); void func_808894A4(BgHidanHrock* this, GlobalContext* globalCtx); -extern UNK_TYPE D_0600D054; -extern UNK_TYPE D_0600D188; - const ActorInit Bg_Hidan_Hrock_InitVars = { ACTOR_BG_HIDAN_HROCK, ACTORCAT_BG, @@ -136,9 +134,9 @@ void BgHidanHrock_Init(Actor* thisx, GlobalContext* globalCtx) { } if (thisx->params == 0) { - CollisionHeader_GetVirtual(&D_0600D054, &collisionHeader); + CollisionHeader_GetVirtual(&gFireTempleTallestPillarAboveRoomBeforeBossCol, &collisionHeader); } else { - CollisionHeader_GetVirtual(&D_0600D188, &collisionHeader); + CollisionHeader_GetVirtual(&gFireTemplePillarInsertedInGroundCol, &collisionHeader); } this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, collisionHeader); @@ -233,7 +231,11 @@ void BgHidanHrock_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgHidanHrock_Draw(Actor* thisx, GlobalContext* globalCtx) { - static Gfx* dlists[] = { 0x0600A240, 0x0600C838, 0x0600C838 }; + static Gfx* dlists[] = { + gFireTempleTallestPillarAboveRoomBeforeBossDL, + gFireTemplePillarInsertedInGroundDL, + gFireTemplePillarInsertedInGroundDL, + }; Gfx_DrawDListOpa(globalCtx, dlists[thisx->params]); } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c index 85011f8cd..1ed544dd4 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c @@ -5,6 +5,7 @@ */ #include "z_bg_hidan_kousi.h" +#include "objects/object_hidan_objects/object_hidan_objects.h" #define FLAGS 0x00000010 @@ -40,14 +41,10 @@ static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), }; -extern CollisionHeader D_0600E2CC; -extern CollisionHeader D_0600E380; -extern CollisionHeader D_0600E430; - -static CollisionHeader* D_80889E70[] = { - &D_0600E2CC, - &D_0600E380, - &D_0600E430, +static CollisionHeader* sMetalFencesCollisions[] = { + &gFireTempleMetalFenceWithSlantCol, + &gFireTempleMetalFenceCol, + &gFireTempleMetalFence2Col, }; static s16 D_80889E7C[] = { @@ -57,10 +54,10 @@ static s16 D_80889E7C[] = { 0x0000, }; -static Gfx* D_80889E84[] = { - 0x0600C798, - 0x0600BFA8, - 0x0600BB58, +static Gfx* sMetalFencesDLs[] = { + gFireTempleMetalFenceWithSlantDL, + gFireTempleMetalFenceDL, + gFireTempleMetalFence2DL, }; void BgHidanKousi_SetupAction(BgHidanKousi* this, BgHidanKousiActionFunc actionFunc) { @@ -82,7 +79,7 @@ void BgHidanKousi_Init(Actor* thisx, GlobalContext* globalCtx) { osSyncPrintf("arg_data おかしい 【格子】\n"); } - CollisionHeader_GetVirtual(D_80889E70[thisx->params & 0xFF], &colHeader); + CollisionHeader_GetVirtual(sMetalFencesCollisions[thisx->params & 0xFF], &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader); thisx->world.rot.y = D_80889E7C[this->dyna.actor.params & 0xFF] + thisx->shape.rot.y; if (Flags_GetSwitch(globalCtx, (thisx->params >> 8) & 0xFF)) { @@ -161,7 +158,7 @@ void BgHidanKousi_Draw(Actor* thisx, GlobalContext* globalCtx) { gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_kousi.c", 354), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_OPA_DISP++, D_80889E84[thisx->params & 0xFF]); + gSPDisplayList(POLY_OPA_DISP++, sMetalFencesDLs[thisx->params & 0xFF]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_kousi.c", 359); } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c b/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c index 37ba9d205..4d909fa74 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c @@ -7,6 +7,7 @@ #include "z_bg_hidan_kowarerukabe.h" #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" +#include "objects/object_hidan_objects/object_hidan_objects.h" #define FLAGS 0x00000000 @@ -35,7 +36,11 @@ const ActorInit Bg_Hidan_Kowarerukabe_InitVars = { (ActorFunc)BgHidanKowarerukabe_Draw, }; -static Gfx* sBreakableWallDLists[] = { 0x0600B9C0, 0x0600C038, 0x0600B900 }; +static Gfx* sBreakableWallDLists[] = { + gFireTempleCrackedStoneFloorDL, + gFireTempleBombableWallDL, + gFireTempleLargeBombableWallDL, +}; static ColliderJntSphElementInit sJntSphElementsInit[1] = { { @@ -65,7 +70,11 @@ static ColliderJntSphInit sJntSphInit = { }; void BgHidanKowarerukabe_InitDynaPoly(BgHidanKowarerukabe* this, GlobalContext* globalCtx) { - static CollisionHeader* collisionHeaders[] = { 0x0600D800, 0x0600D878, 0x0600D8F8 }; + static CollisionHeader* collisionHeaders[] = { + &gFireTempleCrackedStoneFloorCol, + &gFireTempleBombableWallCol, + &gFireTempleLargeBombableWallCol, + }; s32 pad; CollisionHeader* colHeader = NULL; s32 pad2; diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c index 43bed22a9..6966a6c41 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c @@ -1,4 +1,11 @@ +/* + * File: z_bg_hidan_rock.c + * Overlay: ovl_Bg_Hidan_Rock + * Description: Stone blocks (Fire Temple) + */ + #include "z_bg_hidan_rock.h" +#include "objects/object_hidan_objects/object_hidan_objects.h" #define FLAGS 0x00000000 @@ -22,12 +29,6 @@ void func_8088B990(BgHidanRock* this, GlobalContext* globalCtx); void func_8088BC40(GlobalContext* globalCtx, BgHidanRock* this); -extern Gfx D_0600C100[]; -extern Gfx D_0600C1F0[]; -extern Gfx D_0600CA10[]; -extern CollisionHeader* D_0600CB80; -extern CollisionHeader* D_0600DF78; - static Vec3f D_8088BF60 = { 3310.0f, 120.0f, 0.0f }; const ActorInit Bg_Hidan_Rock_InitVars = { @@ -42,7 +43,7 @@ const ActorInit Bg_Hidan_Rock_InitVars = { (ActorFunc)BgHidanRock_Draw, }; -static ColliderCylinderInit D_8088BF8C = { +static ColliderCylinderInit sCylinderInit = { { COLTYPE_NONE, AT_ON | AT_TYPE_ENEMY, @@ -81,7 +82,7 @@ void BgHidanRock_Init(Actor* thisx, GlobalContext* globalCtx) { thisx->params = ((thisx->params) >> 8) & 0xFF; Collider_InitCylinder(globalCtx, &this->collider); - Collider_SetCylinder(globalCtx, &this->collider, thisx, &D_8088BF8C); + Collider_SetCylinder(globalCtx, &this->collider, thisx, &sCylinderInit); if (this->type == 0) { if (Flags_GetSwitch(globalCtx, thisx->params)) { @@ -93,9 +94,9 @@ void BgHidanRock_Init(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc = func_8088B268; } thisx->flags |= 0x30; - CollisionHeader_GetVirtual(&D_0600CB80, &colHeader); + CollisionHeader_GetVirtual(&gFireTempleStoneBlock1Col, &colHeader); } else { - CollisionHeader_GetVirtual(&D_0600DF78, &colHeader); + CollisionHeader_GetVirtual(&gFireTempleStoneBlock2Col, &colHeader); this->collider.dim.pos.x = thisx->home.pos.x; this->collider.dim.pos.y = thisx->home.pos.y; this->collider.dim.pos.z = thisx->home.pos.z; @@ -338,14 +339,18 @@ void BgHidanRock_Update(Actor* thisx, GlobalContext* globalCtx) { } if (this->unk_16C > 0.0f) { - this->collider.dim.height = D_8088BF8C.dim.height * this->unk_16C; + this->collider.dim.height = sCylinderInit.dim.height * this->unk_16C; CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base); } } +static u64* sVerticalFlamesTexs[] = { + gFireTempleBigVerticalFlame0Tex, gFireTempleBigVerticalFlame1Tex, gFireTempleBigVerticalFlame2Tex, + gFireTempleBigVerticalFlame3Tex, gFireTempleBigVerticalFlame4Tex, gFireTempleBigVerticalFlame5Tex, + gFireTempleBigVerticalFlame6Tex, gFireTempleBigVerticalFlame7Tex, +}; + void func_8088BC40(GlobalContext* globalCtx, BgHidanRock* this) { - static UNK_PTR D_8088BFC4[] = { 0x06012120, 0x060128A0, 0x06013020, 0x060137A0, - 0x06013F20, 0x060146A0, 0x06014E20, 0x060155A0 }; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_rock.c", 808); @@ -365,10 +370,10 @@ void func_8088BC40(GlobalContext* globalCtx, BgHidanRock* this) { Matrix_Translate(-10.5f, 0.0f, 0.0f, MTXMODE_APPLY); Matrix_Scale(6.0f, this->unk_16C, 6.0f, MTXMODE_APPLY); - gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8088BFC4[globalCtx->gameplayFrames & 7])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sVerticalFlamesTexs[globalCtx->gameplayFrames & 7])); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_rock.c", 853), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, D_0600CA10); + gSPDisplayList(POLY_XLU_DISP++, gFireTempleBigVerticalFlameDL); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_rock.c", 857); } @@ -378,9 +383,9 @@ void BgHidanRock_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; if (this->type == 0) { - Gfx_DrawDListOpa(globalCtx, D_0600C100); + Gfx_DrawDListOpa(globalCtx, gFireTempleStoneBlock1DL); } else { - Gfx_DrawDListOpa(globalCtx, D_0600C1F0); + Gfx_DrawDListOpa(globalCtx, gFireTempleStoneBlock2DL); } if (this->unk_16C > 0.0f) { diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c index 5aaf3b9bb..8c3807a27 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c @@ -1,4 +1,11 @@ +/* + * File: z_bg_hidan_rsekizou.c + * Overlay: ovl_Bg_Hidan_Rsekizou + * Description: Spinning Stone flamethrower + */ + #include "z_bg_hidan_rsekizou.h" +#include "objects/object_hidan_objects/object_hidan_objects.h" #define FLAGS 0x00000000 @@ -109,12 +116,10 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneForward, 1500, ICHAIN_STOP), }; -static UNK_PTR D_8088CD74[] = { 0x06015D20, 0x06016120, 0x06016520, 0x06016920, - 0x06016D20, 0x06017120, 0x06017520, 0x06017920 }; - -extern CollisionHeader D_0600D5C0; -extern Gfx D_0600AD00[]; // Display List -extern Gfx D_0600DC30[]; // Display List +static u64* sFireballsTexs[] = { + gFireTempleFireball0Tex, gFireTempleFireball1Tex, gFireTempleFireball2Tex, gFireTempleFireball3Tex, + gFireTempleFireball4Tex, gFireTempleFireball5Tex, gFireTempleFireball6Tex, gFireTempleFireball7Tex, +}; void BgHidanRsekizou_Init(Actor* thisx, GlobalContext* globalCtx) { BgHidanRsekizou* this = THIS; @@ -125,7 +130,7 @@ void BgHidanRsekizou_Init(Actor* thisx, GlobalContext* globalCtx) { colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, DPM_UNK); - CollisionHeader_GetVirtual(&D_0600D5C0, &colHeader); + CollisionHeader_GetVirtual(&gFireTempleSpinningFlamethrowerCol, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader); Collider_InitJntSph(globalCtx, &this->collider); Collider_SetJntSph(globalCtx, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderItems); @@ -186,11 +191,11 @@ Gfx* BgHidanRsekizou_DrawFireball(GlobalContext* globalCtx, BgHidanRsekizou* thi f32 fVar6; f32 tmpf7; - temp = (((this->burnFrame + frame) % 8) * 7) * 0.14285715f; - gSPSegment(displayList++, 0x09, SEGMENTED_TO_VIRTUAL(D_8088CD74[temp])); + temp = (((this->burnFrame + frame) % 8) * 7) * (1.0f / 7.0f); + gSPSegment(displayList++, 0x09, SEGMENTED_TO_VIRTUAL(sFireballsTexs[temp])); frame++; - fVar6 = (frame != 4) ? frame + ((3 - this->bendFrame) * 0.33333334f) : frame; + fVar6 = (frame != 4) ? frame + ((3 - this->bendFrame) * (1.0f / 3.0f)) : frame; gDPSetPrimColor(displayList++, 0, 1, 255, 255, 0, 150); gDPSetEnvColor(displayList++, 255, 0, 0, 255); @@ -207,14 +212,14 @@ Gfx* BgHidanRsekizou_DrawFireball(GlobalContext* globalCtx, BgHidanRsekizou* thi tmpf7 = (((((0.7f * fVar6) + 0.5f) * 10.0f) * fVar6) + 20.0f); mf->wx = (tmpf7 * sins) + this->dyna.actor.world.pos.x; - mf->wy = (this->dyna.actor.world.pos.y + 30.0f) + (0.699999988079f * fVar6); + mf->wy = (this->dyna.actor.world.pos.y + 30.0f) + ((7.0f / 10.0f) * fVar6); mf->wz = (tmpf7 * coss) + this->dyna.actor.world.pos.z; gSPMatrix(displayList++, Matrix_MtxFToMtx(Matrix_CheckFloats(mf, "../z_bg_hidan_rsekizou.c", 543), Graph_Alloc(globalCtx->state.gfxCtx, sizeof(Mtx))), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(displayList++, D_0600DC30); + gSPDisplayList(displayList++, gFireTempleFireballDL); return displayList; } @@ -231,7 +236,7 @@ void BgHidanRsekizou_Draw(Actor* thisx, GlobalContext* globalCtx) { gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_rsekizou.c", 568), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_OPA_DISP++, D_0600AD00); + gSPDisplayList(POLY_OPA_DISP++, gFireTempleSpinningFlamethrowerDL); Matrix_MtxFCopy(&mf, &gMtxFClear); POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x14); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c index 94d572166..376153dcf 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c @@ -1,4 +1,11 @@ +/* + * File: z_bg_hidan_sekizou.c + * Overlay: ovl_Bg_Hidan_Sekizou + * Description: Stationary flame thrower statue + */ + #include "z_bg_hidan_sekizou.h" +#include "objects/object_hidan_objects/object_hidan_objects.h" #define FLAGS 0x00000000 @@ -9,11 +16,6 @@ void BgHidanSekizou_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanSekizou_Update(Actor* thisx, GlobalContext* globalCtx); void BgHidanSekizou_Draw(Actor* thisx, GlobalContext* globalCtx); -extern UNK_TYPE D_0600ABC8; -extern UNK_TYPE D_0600B0F8; -extern UNK_TYPE D_0600CC90; -extern UNK_TYPE D_0600DC30; - /* const ActorInit Bg_Hidan_Sekizou_InitVars = { ACTOR_BG_HIDAN_SEKIZOU, diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c index b970c50a1..fcfef6bf1 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c @@ -1,4 +1,11 @@ +/* + * File: z_bg_hidan_sima.c + * Overlay: ovl_Bg_Hidan_Sima + * Description: Stone platform (Fire Temple) + */ + #include "z_bg_hidan_sima.h" +#include "objects/object_hidan_objects/object_hidan_objects.h" #define FLAGS 0x00000000 @@ -16,12 +23,6 @@ void func_8088E760(BgHidanSima* this, GlobalContext* globalCtx); void func_8088E7A8(BgHidanSima* this, GlobalContext* globalCtx); void func_8088E90C(BgHidanSima* this); -extern Gfx D_0600C338[]; -extern Gfx D_0600C470[]; -extern Gfx D_0600DC30[]; -extern CollisionHeader D_0600FAE8; -extern CollisionHeader D_060120E8; - const ActorInit Bg_Hidan_Sima_InitVars = { ACTOR_BG_HIDAN_SIMA, ACTORCAT_BG, @@ -76,7 +77,10 @@ static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), }; -u64* D_8088F1FC[] = { 0x06015D20, 0x06016120, 0x06016520, 0x06016920, 0x06016D20, 0x06017120, 0x06017520, 0x06017920 }; +static u64* sFireballsTexs[] = { + gFireTempleFireball0Tex, gFireTempleFireball1Tex, gFireTempleFireball2Tex, gFireTempleFireball3Tex, + gFireTempleFireball4Tex, gFireTempleFireball5Tex, gFireTempleFireball6Tex, gFireTempleFireball7Tex, +}; void BgHidanSima_Init(Actor* thisx, GlobalContext* globalCtx) { BgHidanSima* this = THIS; @@ -87,9 +91,9 @@ void BgHidanSima_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, DPM_PLAYER); if (this->dyna.actor.params == 0) { - CollisionHeader_GetVirtual(&D_060120E8, &colHeader); + CollisionHeader_GetVirtual(&gFireTempleStonePlatform1Col, &colHeader); } else { - CollisionHeader_GetVirtual(&D_0600FAE8, &colHeader); + CollisionHeader_GetVirtual(&gFireTempleStonePlatform2Col, &colHeader); } this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader); Collider_InitJntSph(globalCtx, &this->collider); @@ -254,21 +258,21 @@ Gfx* func_8088EB54(GlobalContext* globalCtx, BgHidanSima* this, Gfx* gfx) { mtxF.yy += 0.4f; mtxF.zz += 0.4f; - gSPSegment(gfx++, 0x09, SEGMENTED_TO_VIRTUAL(D_8088F1FC[(this->timer + s3) % 7])); + gSPSegment(gfx++, 0x09, SEGMENTED_TO_VIRTUAL(sFireballsTexs[(this->timer + s3) % 7])); gSPMatrix(gfx++, Matrix_MtxFToMtx(Matrix_CheckFloats(&mtxF, "../z_bg_hidan_sima.c", 611), Graph_Alloc(globalCtx->state.gfxCtx, sizeof(Mtx))), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfx++, D_0600DC30); + gSPDisplayList(gfx++, gFireTempleFireballDL); } mtxF.wx = this->dyna.actor.world.pos.x + (phi_s5 * 25 + 80) * sin; mtxF.wz = this->dyna.actor.world.pos.z + (phi_s5 * 25 + 80) * cos; - gSPSegment(gfx++, 0x09, SEGMENTED_TO_VIRTUAL(D_8088F1FC[(this->timer + s3) % 7])); + gSPSegment(gfx++, 0x09, SEGMENTED_TO_VIRTUAL(sFireballsTexs[(this->timer + s3) % 7])); gSPMatrix(gfx++, Matrix_MtxFToMtx(Matrix_CheckFloats(&mtxF, "../z_bg_hidan_sima.c", 624), Graph_Alloc(globalCtx->state.gfxCtx, sizeof(Mtx))), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfx++, D_0600DC30); + gSPDisplayList(gfx++, gFireTempleFireballDL); return gfx; } @@ -280,9 +284,9 @@ void BgHidanSima_Draw(Actor* thisx, GlobalContext* globalCtx) { gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_sima.c", 645), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->dyna.actor.params == 0) { - gSPDisplayList(POLY_OPA_DISP++, D_0600C338); + gSPDisplayList(POLY_OPA_DISP++, gFireTempleStonePlatform1DL); } else { - gSPDisplayList(POLY_OPA_DISP++, D_0600C470); + gSPDisplayList(POLY_OPA_DISP++, gFireTempleStonePlatform2DL); if (this->actionFunc == func_8088E7A8) { POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x14); gDPSetPrimColor(POLY_XLU_DISP++, 0, 1, 255, 255, 0, 150); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c b/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c index 72d693df3..4fa9ad10e 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c @@ -5,6 +5,7 @@ */ #include "z_bg_hidan_syoku.h" +#include "objects/object_hidan_objects/object_hidan_objects.h" #define FLAGS 0x00000010 @@ -35,9 +36,6 @@ static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), }; -extern Gfx D_0600A7E0[]; -extern CollisionHeader* D_0600E568; - void BgHidanSyoku_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; BgHidanSyoku* this = THIS; @@ -45,7 +43,7 @@ void BgHidanSyoku_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, DPM_PLAYER); - CollisionHeader_GetVirtual(&D_0600E568, &colHeader); + CollisionHeader_GetVirtual(&gFireTempleFlareDancerPlatformCol, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader); this->actionFunc = func_8088F4B8; this->dyna.actor.home.pos.y += 540.0f; @@ -126,5 +124,5 @@ void BgHidanSyoku_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgHidanSyoku_Draw(Actor* thisx, GlobalContext* globalCtx) { - Gfx_DrawDListOpa(globalCtx, D_0600A7E0); + Gfx_DrawDListOpa(globalCtx, gFireTempleFlareDancerPlatformDL); } diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c index e22a901ac..e6bbcc4d4 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -8,6 +8,7 @@ #include "objects/object_demo_kekkai/object_demo_kekkai.h" #include "overlays/actors/ovl_Boss_Goma/z_boss_goma.h" #include "objects/gameplay_keep/gameplay_keep.h" +#include "objects/object_hidan_objects/object_hidan_objects.h" #define FLAGS 0x00000010 @@ -91,8 +92,8 @@ static ShutterInfo D_80998134[] = { { 0x06000100, 0x060001F0, 240, 14, 50, 15 }, { 0x060010C0, NULL, 130, 12, 50, 15 }, { gDoorMetalBarsDL, gDungeonDoorDL, 130, 12, 20, 15 }, - { 0x06010CB0, gDungeonDoorDL, 130, 12, 20, 15 }, - { 0x06011F20, gDungeonDoorDL, 130, 12, 20, 15 }, + { gFireTempleDoorFrontDL, gDungeonDoorDL, 130, 12, 20, 15 }, + { gFireTempleDoorBackDL, gDungeonDoorDL, 130, 12, 20, 15 }, { 0x060000C0, gDungeonDoorDL, 130, 12, 20, 15 }, { 0x06005D90, gDungeonDoorDL, 130, 12, 20, 15 }, { 0x06007000, gDungeonDoorDL, 130, 12, 20, 15 }, diff --git a/src/overlays/actors/ovl_En_Door/z_en_door.c b/src/overlays/actors/ovl_En_Door/z_en_door.c index e6b215285..ed6e12f2c 100644 --- a/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -6,6 +6,7 @@ #include "z_en_door.h" #include "objects/gameplay_keep/gameplay_keep.h" +#include "objects/object_hidan_objects/object_hidan_objects.h" #define FLAGS 0x00000010 @@ -67,8 +68,9 @@ static u8 sDoorAnimOpenFrames[] = { 25, 25, 25, 25 }; static u8 sDoorAnimCloseFrames[] = { 60, 70, 60, 70 }; static Gfx* D_809FCEE4[5][2] = { - { gDoorLeftDL, gDoorRightDL }, { 0x0600F998, 0x0600F938 }, { 0x06004958, 0x06004A10 }, - { 0x060013B8, 0x06001420 }, { 0x050047A0, 0x05004978 }, + { gDoorLeftDL, gDoorRightDL }, { gFireTempleBombableDoorDL2, gFireTempleBombableDoorDL1 }, + { 0x06004958, 0x06004A10 }, { 0x060013B8, 0x06001420 }, + { 0x050047A0, 0x05004978 }, }; void EnDoor_Init(Actor* thisx, GlobalContext* globalCtx2) { -- cgit v1.2.3