From 873c55faad48a67f7544be713cc115e2b858a4e8 Mon Sep 17 00:00:00 2001 From: engineer124 <47598039+engineer124@users.noreply.github.com> Date: Mon, 25 Sep 2023 01:51:03 +1000 Subject: [PATCH 01/16] Improve Matches: Part 4 (#1545) * more improvements * small cleanup * PR Review --- .../actors/ovl_Arrow_Fire/z_arrow_fire.c | 92 ++--- .../actors/ovl_Arrow_Ice/z_arrow_ice.c | 93 ++--- .../actors/ovl_Arrow_Light/z_arrow_light.c | 93 ++--- .../ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c | 7 +- .../ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c | 7 +- .../actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c | 34 +- .../z_bg_spot00_hanebasi.c | 28 +- .../actors/ovl_Boss_Dodongo/z_boss_dodongo.c | 6 +- .../actors/ovl_Boss_Goma/z_boss_goma.c | 20 +- src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 20 +- src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c | 110 +++--- src/overlays/actors/ovl_Boss_Va/z_boss_va.c | 329 +++++++++--------- 12 files changed, 426 insertions(+), 413 deletions(-) diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index 7dd457a30d..22352d1272 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -200,50 +200,54 @@ void ArrowFire_Draw(Actor* thisx, PlayState* play2) { stateFrames = play->state.frames; arrow = (EnArrow*)this->actor.parent; - if (1) {} - if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) { - if (1) {} - transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor; - - OPEN_DISPS(play->state.gfxCtx, "../z_arrow_fire.c", 618); - - Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW); - Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY); - Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY); - Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY); - Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY); - - // Draw red effect over the screen when arrow hits - if (this->unk_15C > 0) { - POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP); - gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(40.0f * this->unk_15C) & 0xFF, 0, 0, - (s32)(150.0f * this->unk_15C) & 0xFF); - gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE); - gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE); - gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); - } - - // Draw fire on the arrow - Gfx_SetupDL_25Xlu(play->state.gfxCtx); - gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 200, 0, this->alpha); - gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 128); - Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY); - if (this->timer != 0) { - Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); - } else { - Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY); - } - Matrix_Scale(this->radius * 0.2f, this->unk_158 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY); - Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY); - gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_fire.c", 666), - G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, sMaterialDL); - gSPDisplayList(POLY_XLU_DISP++, - Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 255 - (stateFrames * 2) % 256, 0, 64, 32, - 1, 255 - stateFrames % 256, 511 - (stateFrames * 10) % 512, 64, 64)); - gSPDisplayList(POLY_XLU_DISP++, sModelDL); - - CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_fire.c", 682); + if ((arrow == NULL) || (arrow->actor.update == NULL)) { + return; } + + if (this->timer >= 255) { + return; + } + + transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor; + + OPEN_DISPS(play->state.gfxCtx, "../z_arrow_fire.c", 618); + + Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW); + Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY); + Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY); + Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY); + Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY); + + // Draw red effect over the screen when arrow hits + if (this->unk_15C > 0) { + POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(40.0f * this->unk_15C) & 0xFF, 0, 0, + (s32)(150.0f * this->unk_15C) & 0xFF); + gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE); + gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE); + gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); + } + + // Draw fire on the arrow + Gfx_SetupDL_25Xlu(play->state.gfxCtx); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 200, 0, this->alpha); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 128); + Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY); + if (this->timer != 0) { + Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); + } else { + Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY); + } + Matrix_Scale(this->radius * 0.2f, this->unk_158 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY); + Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_fire.c", 666), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_XLU_DISP++, sMaterialDL); + gSPDisplayList(POLY_XLU_DISP++, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 255 - (stateFrames * 2) % 256, 0, 64, 32, 1, + 255 - stateFrames % 256, 511 - (stateFrames * 10) % 512, 64, 64)); + gSPDisplayList(POLY_XLU_DISP++, sModelDL); + + CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_fire.c", 682); } diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index 42394e71aa..9ce2322060 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -199,50 +199,53 @@ void ArrowIce_Draw(Actor* thisx, PlayState* play) { u32 stateFrames = play->state.frames; EnArrow* arrow = (EnArrow*)this->actor.parent; - if (1) {} - - if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) { - if (1) {} - transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor; - - OPEN_DISPS(play->state.gfxCtx, "../z_arrow_ice.c", 610); - - Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW); - Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY); - Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY); - Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY); - Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY); - - // Draw blue effect over the screen when arrow hits - if (this->unk_164 > 0) { - POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP); - gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, (s32)(10.0f * this->unk_164) & 0xFF, - (s32)(50.0f * this->unk_164) & 0xFF, (s32)(150.0f * this->unk_164) & 0xFF); - gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE); - gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE); - gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); - } - - // Draw ice on the arrow - Gfx_SetupDL_25Xlu(play->state.gfxCtx); - gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 170, 255, 255, this->alpha); - gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 255, 128); - Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY); - if (this->timer != 0) { - Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); - } else { - Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY); - } - Matrix_Scale(this->radius * 0.2f, this->unk_160 * 3.0f, this->radius * 0.2f, MTXMODE_APPLY); - Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY); - gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_ice.c", 660), - G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, sMaterialDL); - gSPDisplayList(POLY_XLU_DISP++, - Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 511 - (stateFrames * 5) % 512, 0, 128, 32, - 1, 511 - (stateFrames * 10) % 512, 511 - (stateFrames * 10) % 512, 4, 16)); - gSPDisplayList(POLY_XLU_DISP++, sModelDL); - - CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_ice.c", 676); + if ((arrow == NULL) || (arrow->actor.update == NULL)) { + return; } + + if (this->timer >= 255) { + return; + } + + transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor; + + OPEN_DISPS(play->state.gfxCtx, "../z_arrow_ice.c", 610); + + Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW); + Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY); + Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY); + Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY); + Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY); + + // Draw blue effect over the screen when arrow hits + if (this->unk_164 > 0) { + POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, (s32)(10.0f * this->unk_164) & 0xFF, + (s32)(50.0f * this->unk_164) & 0xFF, (s32)(150.0f * this->unk_164) & 0xFF); + gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE); + gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE); + gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); + } + + // Draw ice on the arrow + Gfx_SetupDL_25Xlu(play->state.gfxCtx); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 170, 255, 255, this->alpha); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 255, 128); + Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY); + if (this->timer != 0) { + Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); + } else { + Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY); + } + Matrix_Scale(this->radius * 0.2f, this->unk_160 * 3.0f, this->radius * 0.2f, MTXMODE_APPLY); + Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_ice.c", 660), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_XLU_DISP++, sMaterialDL); + gSPDisplayList(POLY_XLU_DISP++, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 511 - (stateFrames * 5) % 512, 0, 128, 32, 1, + 511 - (stateFrames * 10) % 512, 511 - (stateFrames * 10) % 512, 4, 16)); + gSPDisplayList(POLY_XLU_DISP++, sModelDL); + + CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_ice.c", 676); } diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index 1be30f4fe3..b0bd02d3e2 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -197,50 +197,53 @@ void ArrowLight_Draw(Actor* thisx, PlayState* play) { EnArrow* arrow = (EnArrow*)this->actor.parent; Actor* transform; - if (1) {} - - if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) { - if (1) {} - transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor; - - OPEN_DISPS(play->state.gfxCtx, "../z_arrow_light.c", 598); - - Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW); - Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY); - Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY); - Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY); - Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY); - - // Draw yellow effect over the screen when arrow hits - if (this->unk_164 > 0) { - POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP); - gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(30.0f * this->unk_164) & 0xFF, - (s32)(40.0f * this->unk_164) & 0xFF, 0, (s32)(150.0f * this->unk_164) & 0xFF); - gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE); - gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE); - gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); - } - - // Draw light on the arrow - Gfx_SetupDL_25Xlu(play->state.gfxCtx); - gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 170, this->alpha); - gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 128); - Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY); - if (this->timer != 0) { - Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); - } else { - Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY); - } - Matrix_Scale(this->radius * 0.2f, this->unk_160 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY); - Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY); - gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_light.c", 648), - G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, sMaterialDL); - gSPDisplayList(POLY_XLU_DISP++, - Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 511 - (stateFrames * 5) % 512, 0, 4, 32, 1, - 511 - (stateFrames * 10) % 512, 511 - (stateFrames * 30) % 512, 8, 16)); - gSPDisplayList(POLY_XLU_DISP++, sModelDL); - - CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_light.c", 664); + if ((arrow == NULL) || (arrow->actor.update == NULL)) { + return; } + + if (this->timer >= 255) { + return; + } + + transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor; + + OPEN_DISPS(play->state.gfxCtx, "../z_arrow_light.c", 598); + + Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW); + Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY); + Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY); + Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY); + Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY); + + // Draw yellow effect over the screen when arrow hits + if (this->unk_164 > 0) { + POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(30.0f * this->unk_164) & 0xFF, (s32)(40.0f * this->unk_164) & 0xFF, + 0, (s32)(150.0f * this->unk_164) & 0xFF); + gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE); + gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE); + gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); + } + + // Draw light on the arrow + Gfx_SetupDL_25Xlu(play->state.gfxCtx); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 170, this->alpha); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 128); + Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY); + if (this->timer != 0) { + Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); + } else { + Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY); + } + Matrix_Scale(this->radius * 0.2f, this->unk_160 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY); + Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_light.c", 648), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_XLU_DISP++, sMaterialDL); + gSPDisplayList(POLY_XLU_DISP++, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 511 - (stateFrames * 5) % 512, 0, 4, 32, 1, + 511 - (stateFrames * 10) % 512, 511 - (stateFrames * 30) % 512, 8, 16)); + gSPDisplayList(POLY_XLU_DISP++, sModelDL); + + CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_light.c", 664); } diff --git a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c index 8fe9a62d83..4f405b6890 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c @@ -100,10 +100,11 @@ void BgGndDarkmeiro_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; BgGndDarkmeiro* this = (BgGndDarkmeiro*)thisx; - if ((this->dyna.actor.params & 0xFF) == 1) { - if (1) {} - DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); + if ((this->dyna.actor.params & 0xFF) != 1) { + return; } + + DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void BgGndDarkmeiro_Noop(BgGndDarkmeiro* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c index 3c83c2ef23..d8b5a08358 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c @@ -51,10 +51,11 @@ void BgGndFiremeiro_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; BgGndFiremeiro* this = (BgGndFiremeiro*)thisx; - if (this->dyna.actor.params == 0) { - if (1) {} - DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); + if (this->dyna.actor.params != 0) { + return; } + + DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void BgGndFiremeiro_Sink(BgGndFiremeiro* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c index df60eae994..f8a45cfc32 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c +++ b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c @@ -298,15 +298,16 @@ void BgJyaCobra_UpdateShadowFromSide(BgJyaCobra* this) { z = (88.0f - spBC.z) * 0.64f + 0.5f; for (k = 0; k < 11; k++) { temp_z = z - 5 + k; - if (!(temp_z & ~0x3F)) { - temp_z *= 0x40; - for (l = 0; l < 11; l++) { - temp_x = x - 5 + l; - if (!(temp_x & ~0x3F)) { - shadowTex[temp_z + temp_x] |= D_8089731C[k][l]; - } - if (1) {} + if (temp_z & ~0x3F) { + continue; + } + temp_z *= 0x40; + for (l = 0; l < 11; l++) { + temp_x = x - 5 + l; + if (temp_x & ~0x3F) { + continue; } + shadowTex[temp_z + temp_x] |= D_8089731C[k][l]; } } } @@ -326,14 +327,16 @@ void BgJyaCobra_UpdateShadowFromSide(BgJyaCobra* this) { z = (s32)(((88.0f - spBC.z) * 0.64f) + 0.5f); for (k = 0; k < 3; k++) { temp_z = z - 1 + k; - if (!(temp_z & ~0x3F)) { - temp_z *= 0x40; - for (l = 0; l < 3; l++) { - temp_x = x - 1 + l; - if (!(temp_x & ~0x3F)) { - shadowTex[temp_z + temp_x] |= D_80897398[k][l]; - } + if (temp_z & ~0x3F) { + continue; + } + temp_z *= 0x40; + for (l = 0; l < 3; l++) { + temp_x = x - 1 + l; + if (temp_x & ~0x3F) { + continue; } + shadowTex[temp_z + temp_x] |= D_80897398[k][l]; } } } @@ -348,7 +351,6 @@ void BgJyaCobra_UpdateShadowFromSide(BgJyaCobra* this) { shadowTex[j * 0x40 + 0] = 0; shadowTex[j * 0x40 + 0x3F] = 0; } - if (D_80897398[0][0]) {} } /* diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c index 7eec7fd178..13b2b4e203 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c @@ -137,23 +137,19 @@ void BgSpot00Hanebasi_Destroy(Actor* thisx, PlayState* play) { void BgSpot00Hanebasi_DrawbridgeWait(BgSpot00Hanebasi* this, PlayState* play) { BgSpot00Hanebasi* child = (BgSpot00Hanebasi*)this->dyna.actor.child; - if (IS_CUTSCENE_LAYER || !CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) || !CHECK_QUEST_ITEM(QUEST_GORON_RUBY) || - !CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) || GET_EVENTCHKINF(EVENTCHKINF_80)) { - if (this->dyna.actor.shape.rot.x != 0) { - if (CutsceneFlags_Get(play, 0) || (!IS_CUTSCENE_LAYER && IS_DAY)) { - this->actionFunc = BgSpot00Hanebasi_DrawbridgeRiseAndFall; - this->destAngle = 0; - child->destAngle = 0; - return; - } + if (!IS_CUTSCENE_LAYER && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) && + CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !GET_EVENTCHKINF(EVENTCHKINF_80)) { + return; + } - if (this) {} // required to match - } - if ((this->dyna.actor.shape.rot.x == 0) && !IS_CUTSCENE_LAYER && !LINK_IS_ADULT && !IS_DAY) { - this->actionFunc = BgSpot00Hanebasi_DrawbridgeRiseAndFall; - this->destAngle = -0x4000; - child->destAngle = -0xFE0; - } + if ((this->dyna.actor.shape.rot.x != 0) && (CutsceneFlags_Get(play, 0) || (!IS_CUTSCENE_LAYER && IS_DAY))) { + this->actionFunc = BgSpot00Hanebasi_DrawbridgeRiseAndFall; + this->destAngle = 0; + child->destAngle = 0; + } else if ((this->dyna.actor.shape.rot.x == 0) && !IS_CUTSCENE_LAYER && !LINK_IS_ADULT && !IS_DAY) { + this->actionFunc = BgSpot00Hanebasi_DrawbridgeRiseAndFall; + this->destAngle = -0x4000; + child->destAngle = -0xFE0; } } diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index 6f7efefd97..d8ab06a050 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -932,7 +932,6 @@ void BossDodongo_Update(Actor* thisx, PlayState* play2) { } else if (this->unk_224 > 1.7f) { phi_s0_3 = 3; sp90 = 1; - if (play) {} magma2DrawMode = 0; } else if (this->unk_224 > 1.4f) { phi_s0_3 = 7; @@ -1025,9 +1024,10 @@ void BossDodongo_Update(Actor* thisx, PlayState* play2) { this->collider.elements[0].dim.scale = (this->actionFunc == BossDodongo_Inhale) ? 0.0f : 1.0f; for (i = 6; i < 19; i++) { - if (i != 12) { - this->collider.elements[i].dim.scale = (this->actionFunc == BossDodongo_Roll) ? 0.0f : 1.0f; + if (i == 12) { + continue; } + this->collider.elements[i].dim.scale = (this->actionFunc == BossDodongo_Roll) ? 0.0f : 1.0f; } if (this->unk_244 != 0) { diff --git a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c index 106e44a15a..1fd4e00a8d 100644 --- a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -1914,8 +1914,6 @@ void BossGoma_Update(Actor* thisx, PlayState* play) { this->sfxFaintTimer--; } - if (1) {} - this->eyeState = EYESTATE_IRIS_FOLLOW_BONUS_IFRAMES; this->actionFunc(this, play); this->actor.shape.rot.y = this->actor.world.rot.y; @@ -1937,15 +1935,17 @@ void BossGoma_Update(Actor* thisx, PlayState* play) { BossGoma_UpdateEyeEnvColor(this); BossGoma_UpdateTailLimbsScale(this); - if (!this->disableGameplayLogic) { - BossGoma_UpdateHit(this, play); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); + if (this->disableGameplayLogic) { + return; + } - if (this->actionFunc != BossGoma_FloorStunned && this->actionFunc != BossGoma_FloorDamaged && - (this->actionFunc != BossGoma_FloorMain || this->timer == 0)) { - CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); - } + BossGoma_UpdateHit(this, play); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); + + if (this->actionFunc != BossGoma_FloorStunned && this->actionFunc != BossGoma_FloorDamaged && + (this->actionFunc != BossGoma_FloorMain || this->timer == 0)) { + CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); } } diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index d2bfcdf05a..7806a63dab 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -920,7 +920,6 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_0; Math_ApproachF(&this->baseAlpha, 0.0, 1.0f, 5.0f); for (indS1 = 0; indS1 < 40; indS1++) { - if (sMorphaTent2->tentSpawnPos) {} indT5 = Rand_ZeroFloat(20.9f); indS0 = sTentSpawnIndex[indT5]; spFC.x = 0; @@ -930,16 +929,17 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { Matrix_MultVec3f(&spFC, &spF0); spF0.x = player->actor.world.pos.x + spF0.x; spF0.z = player->actor.world.pos.z + spF0.z; - if ((fabsf(spF0.x - sTentSpawnPos[indS0].x) <= 320) && - (fabsf(spF0.z - sTentSpawnPos[indS0].y) <= 320) && - ((sMorphaTent2 == NULL) || (sMorphaTent2->tentSpawnPos != indS0))) { - this->targetPos.x = sTentSpawnPos[indS0].x; - this->targetPos.z = sTentSpawnPos[indS0].y; - this->tentSpawnPos = indS0; - this->timers[0] = (s16)Rand_ZeroFloat(20.0f) + 30; - this->work[MO_TENT_ACTION_STATE] = MO_TENT_DESPAWN; - break; + if (!(fabsf(spF0.x - sTentSpawnPos[indS0].x) <= 320) || + !(fabsf(spF0.z - sTentSpawnPos[indS0].y) <= 320) || + ((sMorphaTent2 != NULL) && (sMorphaTent2->tentSpawnPos == indS0))) { + continue; } + this->targetPos.x = sTentSpawnPos[indS0].x; + this->targetPos.z = sTentSpawnPos[indS0].y; + this->tentSpawnPos = indS0; + this->timers[0] = (s16)Rand_ZeroFloat(20.0f) + 30; + this->work[MO_TENT_ACTION_STATE] = MO_TENT_DESPAWN; + break; } } if ((this == sMorphaTent1) && (sMorphaCore->hitCount >= 3) && (sMorphaTent2 == NULL)) { diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index 1d3e2bd39e..df398b0979 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -2863,9 +2863,6 @@ void BossTw_Update(Actor* thisx, PlayState* play) { this->blastTailPos[this->work[TAIL_IDX]] = this->actor.world.pos; - if (1) {} - if (1) {} - for (i = 0; i < 5; i++) { if (this->timers[i] != 0) { this->timers[i]--; @@ -2890,68 +2887,62 @@ void BossTw_Update(Actor* thisx, PlayState* play) { this->actionFunc(this, play); - if (this->actionFunc != BossTw_Wait) { - this->collider.dim.radius = 45; + if (this->actionFunc == BossTw_Wait) { + return; + } - if (this->actionFunc == BossTw_Spin) { - this->collider.dim.radius *= 2; + this->collider.dim.radius = 45; + + if (this->actionFunc == BossTw_Spin) { + this->collider.dim.radius *= 2; + } + + this->collider.dim.height = 120; + this->collider.dim.yShift = -30; + + if (this->work[INVINC_TIMER] == 0) { + if (this->collider.base.acFlags & AC_HIT) { + this->collider.base.acFlags &= ~AC_HIT; } - this->collider.dim.height = 120; - this->collider.dim.yShift = -30; + Collider_UpdateCylinder(&this->actor, &this->collider); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); + } - if (this->work[INVINC_TIMER] == 0) { - if (this->collider.base.acFlags & AC_HIT) { - this->collider.base.acFlags &= ~AC_HIT; - } + if (this->actor.params == TW_KOTAKE) { + this->workf[OUTR_CRWN_TX_X2] += 1.0f; + this->workf[OUTR_CRWN_TX_Y2] -= 7.0f; + this->workf[INNR_CRWN_TX_Y1] += 1.0f; + } else { + this->workf[OUTR_CRWN_TX_X2] += 0.0f; + this->workf[INNR_CRWN_TX_X2] += 0.0f; + this->workf[OUTR_CRWN_TX_Y2] += -15.0f; + this->workf[INNR_CRWN_TX_Y2] += -10.0f; + } - Collider_UpdateCylinder(&this->actor, &this->collider); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); - CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); - } + if (((this->work[CS_TIMER_2] % 32) == 0) && (Rand_ZeroOne() < 0.3f)) { + this->work[BLINK_IDX] = 4; + } - if (this->actor.params == TW_KOTAKE) { - this->workf[OUTR_CRWN_TX_X2] += 1.0f; - this->workf[OUTR_CRWN_TX_Y2] -= 7.0f; - this->workf[INNR_CRWN_TX_Y1] += 1.0f; - } else { - this->workf[OUTR_CRWN_TX_X2] += 0.0f; - this->workf[INNR_CRWN_TX_X2] += 0.0f; - this->workf[OUTR_CRWN_TX_Y2] += -15.0f; - this->workf[INNR_CRWN_TX_Y2] += -10.0f; - } + this->eyeTexIdx = D_8094A900[this->work[BLINK_IDX]]; - if (((this->work[CS_TIMER_2] % 32) == 0) && (Rand_ZeroOne() < 0.3f)) { - this->work[BLINK_IDX] = 4; - } + if (this->work[BLINK_IDX] != 0) { + this->work[BLINK_IDX]--; + } - this->eyeTexIdx = D_8094A900[this->work[BLINK_IDX]]; + if ((this->actionFunc == BossTw_MergeCS) || (this->unk_5F8 == 0)) { + return; + } - if (this->work[BLINK_IDX] != 0) { - this->work[BLINK_IDX]--; - } - - if (this->actionFunc != BossTw_MergeCS && this->unk_5F8 != 0) { - Vec3f pos; - Vec3f velocity = { 0.0f, 0.0f, 0.0f }; - Vec3f accel = { 0.0f, 0.0f, 0.0f }; - - if (this->scepterAlpha > 0.0f) { - for (i = 0; i <= 0; i++) { - pos = this->scepterFlamePos[0]; - pos.x += Rand_CenteredFloat(70.0f); - pos.y += Rand_CenteredFloat(70.0f); - pos.z += Rand_CenteredFloat(70.0f); - accel.y = 0.4f; - accel.x = Rand_CenteredFloat(0.5f); - accel.z = Rand_CenteredFloat(0.5f); - BossTw_AddDotEffect(play, &pos, &velocity, &accel, (s16)Rand_ZeroFloat(2.0f) + 8, - this->actor.params, 37); - } - } + { + Vec3f pos; + Vec3f velocity = { 0.0f, 0.0f, 0.0f }; + Vec3f accel = { 0.0f, 0.0f, 0.0f }; + if (this->scepterAlpha > 0.0f) { for (i = 0; i <= 0; i++) { - pos = this->crownPos; + pos = this->scepterFlamePos[0]; pos.x += Rand_CenteredFloat(70.0f); pos.y += Rand_CenteredFloat(70.0f); pos.z += Rand_CenteredFloat(70.0f); @@ -2962,6 +2953,17 @@ void BossTw_Update(Actor* thisx, PlayState* play) { 37); } } + + for (i = 0; i <= 0; i++) { + pos = this->crownPos; + pos.x += Rand_CenteredFloat(70.0f); + pos.y += Rand_CenteredFloat(70.0f); + pos.z += Rand_CenteredFloat(70.0f); + accel.y = 0.4f; + accel.x = Rand_CenteredFloat(0.5f); + accel.z = Rand_CenteredFloat(0.5f); + BossTw_AddDotEffect(play, &pos, &velocity, &accel, (s16)Rand_ZeroFloat(2.0f) + 8, this->actor.params, 37); + } } } diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 9a7d0c55bc..1e32443a68 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -3285,201 +3285,202 @@ void BossVa_UpdateEffects(PlayState* play) { BossVa* refActor; for (i = 0; i < BOSS_VA_EFFECT_COUNT; i++, effect++) { - if (effect->type != VA_NONE) { - effect->timer--; + if (effect->type == VA_NONE) { + continue; + } - effect->pos.x += effect->velocity.x; - effect->pos.y += effect->velocity.y; - effect->pos.z += effect->velocity.z; + effect->timer--; - effect->velocity.x += effect->accel.x; - effect->velocity.y += effect->accel.y; - effect->velocity.z += effect->accel.z; + effect->pos.x += effect->velocity.x; + effect->pos.y += effect->velocity.y; + effect->pos.z += effect->velocity.z; - if ((effect->type == VA_LARGE_SPARK) || (effect->type == VA_SMALL_SPARK)) { - refActor = effect->parent; + effect->velocity.x += effect->accel.x; + effect->velocity.y += effect->accel.y; + effect->velocity.z += effect->accel.z; - effect->rot.z += (s16)(Rand_ZeroOne() * 0x4E20) + 0x2000; - effect->rot.y += (s16)(Rand_ZeroOne() * 0x2710) + 0x2000; + if ((effect->type == VA_LARGE_SPARK) || (effect->type == VA_SMALL_SPARK)) { + refActor = effect->parent; - if ((effect->mode == SPARK_TETHER) || (effect->mode == SPARK_UNUSED)) { - pitch = effect->rot.x - Math_Vec3f_Pitch(&refActor->actor.world.pos, &GET_BODY(refActor)->unk_1D8); - spAC = Math_SinS(refActor->actor.world.rot.y); - effect->pos.x = refActor->actor.world.pos.x - (effect->offset.x * spAC); - spB0 = Math_CosS(refActor->actor.world.rot.y); - effect->pos.z = refActor->actor.world.pos.z - (effect->offset.x * spB0); - spB0 = Math_CosS(-pitch); - effect->pos.y = (effect->offset.y * spB0) + refActor->actor.world.pos.y; - } else if ((effect->mode == SPARK_BARI) || (effect->mode == SPARK_BODY)) { - effect->pos.x = effect->offset.x + refActor->actor.world.pos.x; - effect->pos.y = effect->offset.y + refActor->actor.world.pos.y; - effect->pos.z = effect->offset.z + refActor->actor.world.pos.z; - } else { - spB6 = Rand_ZeroFloat(PLAYER_BODYPART_MAX - 0.1f); - effect->pos.x = player->bodyPartsPos[spB6].x + Rand_CenteredFloat(10.0f); - effect->pos.y = player->bodyPartsPos[spB6].y + Rand_CenteredFloat(15.0f); - effect->pos.z = player->bodyPartsPos[spB6].z + Rand_CenteredFloat(10.0f); - } + effect->rot.z += (s16)(Rand_ZeroOne() * 0x4E20) + 0x2000; + effect->rot.y += (s16)(Rand_ZeroOne() * 0x2710) + 0x2000; - if (effect->timer < 100) { - effect->primColor[3] -= 50; - if (effect->primColor[3] < 0) { - effect->primColor[3] = 0; - effect->timer = 0; - effect->type = VA_NONE; - } - } + if ((effect->mode == SPARK_TETHER) || (effect->mode == SPARK_UNUSED)) { + pitch = effect->rot.x - Math_Vec3f_Pitch(&refActor->actor.world.pos, &GET_BODY(refActor)->unk_1D8); + spAC = Math_SinS(refActor->actor.world.rot.y); + effect->pos.x = refActor->actor.world.pos.x - (effect->offset.x * spAC); + spB0 = Math_CosS(refActor->actor.world.rot.y); + effect->pos.z = refActor->actor.world.pos.z - (effect->offset.x * spB0); + spB0 = Math_CosS(-pitch); + effect->pos.y = (effect->offset.y * spB0) + refActor->actor.world.pos.y; + } else if ((effect->mode == SPARK_BARI) || (effect->mode == SPARK_BODY)) { + effect->pos.x = effect->offset.x + refActor->actor.world.pos.x; + effect->pos.y = effect->offset.y + refActor->actor.world.pos.y; + effect->pos.z = effect->offset.z + refActor->actor.world.pos.z; + } else { + spB6 = Rand_ZeroFloat(PLAYER_BODYPART_MAX - 0.1f); + effect->pos.x = player->bodyPartsPos[spB6].x + Rand_CenteredFloat(10.0f); + effect->pos.y = player->bodyPartsPos[spB6].y + Rand_CenteredFloat(15.0f); + effect->pos.z = player->bodyPartsPos[spB6].z + Rand_CenteredFloat(10.0f); } - if (effect->type == VA_BLAST_SPARK) { - effect->rot.z += (s16)(Rand_ZeroOne() * 0x4E20) + 0x4000; - if (effect->timer < 100) { - effect->primColor[3] -= 50; - if (effect->primColor[3] < 0) { - effect->primColor[3] = 0; - effect->timer = 0; - effect->type = VA_NONE; - } - } - } - - if (effect->type == VA_SPARK_BALL) { - refActor2 = effect->parent; - - effect->rot.z += (s16)(Rand_ZeroOne() * 0x2710) + 0x24A8; - effect->pos.x = effect->offset.x + refActor2->actor.world.pos.x; - effect->pos.y = - refActor2->actor.world.pos.y + 310.0f + (refActor2->actor.shape.yOffset * refActor2->actor.scale.y); - effect->pos.z = effect->offset.z + refActor2->actor.world.pos.z; - effect->mode = (effect->mode + 1) & 7; - - if (effect->timer < 100) { - effect->primColor[3] -= 50; - if (effect->primColor[3] < 0) { - effect->primColor[3] = 0; - effect->timer = 0; - effect->type = VA_NONE; - } - } - } - - if (effect->type == VA_ZAP_CHARGE) { - effect->mode = (effect->mode + 1) & 7; - effect->primColor[3] -= 20; - if (effect->primColor[3] <= 0) { + if (effect->timer < 100) { + effect->primColor[3] -= 50; + if (effect->primColor[3] < 0) { effect->primColor[3] = 0; effect->timer = 0; effect->type = VA_NONE; } } + } - if (effect->type == VA_BLOOD) { - if (effect->mode < BLOOD_SPOT) { - Vec3f checkPos; - CollisionPoly* groundPoly; - f32 floorY; + if (effect->type == VA_BLAST_SPARK) { + effect->rot.z += (s16)(Rand_ZeroOne() * 0x4E20) + 0x4000; + if (effect->timer < 100) { + effect->primColor[3] -= 50; + if (effect->primColor[3] < 0) { + effect->primColor[3] = 0; + effect->timer = 0; + effect->type = VA_NONE; + } + } + } - checkPos = effect->pos; - checkPos.y -= effect->velocity.y + 4.0f; - floorY = BgCheck_EntityRaycastDown1(&play->colCtx, &groundPoly, &checkPos); - if ((groundPoly != NULL) && (effect->pos.y <= floorY)) { - effect->mode = BLOOD_SPOT; - effect->pos.y = floorY + 1.0f; - if (sCsState <= DEATH_SHELL_BURST) { - effect->timer = 80; - } else { - effect->timer = 60000; - } + if (effect->type == VA_SPARK_BALL) { + refActor2 = effect->parent; - effect->accel = effect->velocity = sZeroVec; - } - if (!effect->timer) { - effect->type = VA_NONE; - } - } else { - if (effect->timer < 20) { - effect->envColor[3] = effect->timer * 5; - effect->primColor[3] = effect->timer * 10; - } else if (effect->timer > 50000) { - effect->timer++; + effect->rot.z += (s16)(Rand_ZeroOne() * 0x2710) + 0x24A8; + effect->pos.x = effect->offset.x + refActor2->actor.world.pos.x; + effect->pos.y = + refActor2->actor.world.pos.y + 310.0f + (refActor2->actor.shape.yOffset * refActor2->actor.scale.y); + effect->pos.z = effect->offset.z + refActor2->actor.world.pos.z; + effect->mode = (effect->mode + 1) & 7; + + if (effect->timer < 100) { + effect->primColor[3] -= 50; + if (effect->primColor[3] < 0) { + effect->primColor[3] = 0; + effect->timer = 0; + effect->type = VA_NONE; + } + } + } + + if (effect->type == VA_ZAP_CHARGE) { + effect->mode = (effect->mode + 1) & 7; + effect->primColor[3] -= 20; + if (effect->primColor[3] <= 0) { + effect->primColor[3] = 0; + effect->timer = 0; + effect->type = VA_NONE; + } + } + + if (effect->type == VA_BLOOD) { + if (effect->mode < BLOOD_SPOT) { + Vec3f checkPos; + CollisionPoly* groundPoly; + f32 floorY; + + checkPos = effect->pos; + checkPos.y -= effect->velocity.y + 4.0f; + floorY = BgCheck_EntityRaycastDown1(&play->colCtx, &groundPoly, &checkPos); + if ((groundPoly != NULL) && (effect->pos.y <= floorY)) { + effect->mode = BLOOD_SPOT; + effect->pos.y = floorY + 1.0f; + if (sCsState <= DEATH_SHELL_BURST) { + effect->timer = 80; + } else { + effect->timer = 60000; } + + effect->accel = effect->velocity = sZeroVec; + } + if (!effect->timer) { + effect->type = VA_NONE; + } + } else { + if (effect->timer < 20) { + effect->envColor[3] = effect->timer * 5; + effect->primColor[3] = effect->timer * 10; + } else if (effect->timer > 50000) { + effect->timer++; + } + } + + if (!effect->timer) { + effect->type = VA_NONE; + } + } + + if (effect->type == VA_GORE) { + if (effect->mode == GORE_PERMANENT) { + Vec3f checkPos; + CollisionPoly* groundPoly; + f32 floorY; + + checkPos = effect->pos; + checkPos.y -= effect->velocity.y + 4.0f; + effect->rot.x += 0x1770; + floorY = BgCheck_EntityRaycastDown1(&play->colCtx, &groundPoly, &checkPos); + if ((groundPoly != NULL) && (effect->pos.y <= floorY)) { + effect->mode = GORE_FLOOR; + effect->timer = 30; + effect->pos.y = floorY + 1.0f; + effect->accel = effect->velocity = sZeroVec; + effect->rot.x = -0x4000; } if (!effect->timer) { effect->type = VA_NONE; } + + } else if (effect->mode == GORE_FADING) { + if (effect->timer == 0) { + effect->type = VA_NONE; + if (1) {} + } + + } else { + Math_SmoothStepToF(&effect->scaleMod, 0.075f, 1.0f, 0.005f, 0.0f); + Math_SmoothStepToF(&effect->vaGorePulseRate, 0.0f, 0.6f, 0.005f, 0.0013f); + if ((play->gameplayFrames % 4) == 0) { + Math_SmoothStepToS(&effect->primColor[0], 95, 1, 1, 0); + } } + effect->vaGorePulse += effect->vaGorePulseRate; + } - if (effect->type == VA_GORE) { - if (effect->mode == GORE_PERMANENT) { - Vec3f checkPos; - CollisionPoly* groundPoly; - f32 floorY; + if (effect->type == VA_TUMOR) { + s16 yaw; - checkPos = effect->pos; - checkPos.y -= effect->velocity.y + 4.0f; - effect->rot.x += 0x1770; - floorY = BgCheck_EntityRaycastDown1(&play->colCtx, &groundPoly, &checkPos); - if ((groundPoly != NULL) && (effect->pos.y <= floorY)) { - effect->mode = GORE_FLOOR; - effect->timer = 30; - effect->pos.y = floorY + 1.0f; - effect->accel = effect->velocity = sZeroVec; - effect->rot.x = -0x4000; - } + refActor = effect->parent; - if (!effect->timer) { - effect->type = VA_NONE; - } + effect->rot.z += 0x157C; + effect->envColor[3] = (s16)(Math_SinS(effect->rot.z) * 50.0f) + 80; + Math_SmoothStepToF(&effect->scale, effect->scaleMod, 1.0f, 0.01f, 0.005f); + effect->pos.x = effect->offset.x + refActor->actor.world.pos.x; + effect->pos.y = effect->offset.y + refActor->actor.world.pos.y; + effect->pos.z = effect->offset.z + refActor->actor.world.pos.z; - } else if (effect->mode == GORE_FADING) { + switch (effect->mode) { + case TUMOR_UNUSED: if (effect->timer == 0) { + yaw = Math_Vec3f_Yaw(&refActor->actor.world.pos, &effect->pos); effect->type = VA_NONE; - if (1) {} + BossVa_BloodSplatter(play, effect, yaw, effect->scale * 4500.0f, 1); + BossVa_Gore(play, effect, yaw, effect->scale * 1.2f); } - - } else { - Math_SmoothStepToF(&effect->scaleMod, 0.075f, 1.0f, 0.005f, 0.0f); - Math_SmoothStepToF(&effect->vaGorePulseRate, 0.0f, 0.6f, 0.005f, 0.0013f); - if ((play->gameplayFrames % 4) == 0) { - Math_SmoothStepToS(&effect->primColor[0], 95, 1, 1, 0); + break; + case TUMOR_BODY: + case TUMOR_ARM: + if (refActor->burst) { + effect->type = VA_NONE; + yaw = Math_Vec3f_Yaw(&refActor->actor.world.pos, &effect->pos); + BossVa_BloodSplatter(play, effect, yaw, effect->scale * 4500.0f, 1); + BossVa_Gore(play, effect, yaw, effect->scale * 1.2f); } - } - effect->vaGorePulse += effect->vaGorePulseRate; - } - - if (effect->type == VA_TUMOR) { - s16 yaw; - - refActor = effect->parent; - - effect->rot.z += 0x157C; - effect->envColor[3] = (s16)(Math_SinS(effect->rot.z) * 50.0f) + 80; - Math_SmoothStepToF(&effect->scale, effect->scaleMod, 1.0f, 0.01f, 0.005f); - effect->pos.x = effect->offset.x + refActor->actor.world.pos.x; - effect->pos.y = effect->offset.y + refActor->actor.world.pos.y; - effect->pos.z = effect->offset.z + refActor->actor.world.pos.z; - - switch (effect->mode) { - case TUMOR_UNUSED: - if (effect->timer == 0) { - yaw = Math_Vec3f_Yaw(&refActor->actor.world.pos, &effect->pos); - effect->type = VA_NONE; - BossVa_BloodSplatter(play, effect, yaw, effect->scale * 4500.0f, 1); - BossVa_Gore(play, effect, yaw, effect->scale * 1.2f); - } - break; - case TUMOR_BODY: - case TUMOR_ARM: - if (refActor->burst) { - effect->type = VA_NONE; - yaw = Math_Vec3f_Yaw(&refActor->actor.world.pos, &effect->pos); - BossVa_BloodSplatter(play, effect, yaw, effect->scale * 4500.0f, 1); - BossVa_Gore(play, effect, yaw, effect->scale * 1.2f); - } - break; - } - if (1) {} + break; } } } From 4d7558df0d8fe489870e8619e0b3672104c04d4f Mon Sep 17 00:00:00 2001 From: Derek Hensley Date: Mon, 25 Sep 2023 03:29:15 -0700 Subject: [PATCH 02/16] Speedmeter Small cleanup (#1554) * Small cleanup * x --- include/speedmeter.h | 17 +---------------- src/code/speed_meter.c | 24 +++++++++++++++++------- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/include/speedmeter.h b/include/speedmeter.h index 02409ba931..ec4c3f799e 100644 --- a/include/speedmeter.h +++ b/include/speedmeter.h @@ -8,28 +8,13 @@ struct GameState; typedef struct { /* 0x00 */ char unk_00[0x18]; - /* 0x18 */ s32 unk_18; + /* 0x18 */ s32 x; // Unused /* 0x1C */ s32 y; } SpeedMeter; // size = 0x20 -typedef struct { - /* 0x00 */ s32 maxval; - /* 0x04 */ s32 val; - /* 0x08 */ u16 backColor; - /* 0x0A */ u16 foreColor; - /* 0x0C */ s32 ulx; - /* 0x10 */ s32 lrx; - /* 0x14 */ s32 uly; - /* 0x18 */ s32 lry; -} SpeedMeterAllocEntry; // size = 0x1C - -void SpeedMeter_InitImpl(SpeedMeter* this, u32 arg1, u32 y); void SpeedMeter_Init(SpeedMeter* this); void SpeedMeter_Destroy(SpeedMeter* this); void SpeedMeter_DrawTimeEntries(SpeedMeter* this, struct GraphicsContext* gfxCtx); -void SpeedMeter_InitAllocEntry(SpeedMeterAllocEntry* this, u32 maxval, u32 val, u16 backColor, u16 foreColor, u32 ulx, - u32 lrx, u32 uly, u32 lry); -void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, struct GraphicsContext* gfxCtx); void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, struct GraphicsContext* gfxCtx, struct GameState* state); #endif diff --git a/src/code/speed_meter.c b/src/code/speed_meter.c index dc1bc0596d..660a2ab647 100644 --- a/src/code/speed_meter.c +++ b/src/code/speed_meter.c @@ -74,15 +74,26 @@ SpeedMeterTimeEntry sSpeedMeterTimeEntryArray[] = { { &gGraphUpdatePeriod, 0, 10, GPACK_RGBA5551(255, 0, 255, 1) }, }; +typedef struct { + /* 0x00 */ s32 maxval; + /* 0x04 */ s32 val; + /* 0x08 */ u16 backColor; + /* 0x0A */ u16 foreColor; + /* 0x0C */ s32 ulx; + /* 0x10 */ s32 lrx; + /* 0x14 */ s32 uly; + /* 0x18 */ s32 lry; +} SpeedMeterAllocEntry; // size = 0x1C + #define gDrawRect(gfx, color, ulx, uly, lrx, lry) \ gDPPipeSync(gfx); \ gDPSetFillColor(gfx, ((color) << 16) | (color)); \ gDPFillRectangle(gfx, (ulx), (uly), (lrx), (lry)); \ gDPPipeSync(gfx) -void SpeedMeter_InitImpl(SpeedMeter* this, u32 arg1, u32 y) { +void SpeedMeter_InitImpl(SpeedMeter* this, u32 x, u32 y) { LogUtils_CheckNullPointer("this", this, "../speed_meter.c", 181); - this->unk_18 = arg1; + this->x = x; this->y = y; } @@ -207,7 +218,7 @@ void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, GraphicsContext* gfxCtx, Gam u32 ulx = 30; u32 lrx = 290; SpeedMeterAllocEntry entry; - u32 pad2; + TwoHeadArena* tha; s32 y; TwoHeadGfxArena* thga; u32 zeldaFreeMax; @@ -237,10 +248,9 @@ void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, GraphicsContext* gfxCtx, Gam y++; } - thga = (TwoHeadGfxArena*)&state->tha; - //! @bug THA_GetRemaining call should be THGA_GetRemaining like the others below, harmless as-is - SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THA_GetRemaining(&thga->tha), - GPACK_RGBA5551(0, 0, 255, 1), GPACK_RGBA5551(0, 255, 0, 1), ulx, lrx, y, y); + tha = &state->tha; + SpeedMeter_InitAllocEntry(&entry, tha->size, tha->size - THA_GetRemaining(tha), GPACK_RGBA5551(0, 0, 255, 1), + GPACK_RGBA5551(0, 255, 0, 1), ulx, lrx, y, y); SpeedMeter_DrawAllocEntry(&entry, gfxCtx); y++; From 092f6026384b193df93a9836548bc788dec7c81c Mon Sep 17 00:00:00 2001 From: Tharo <17233964+Thar0@users.noreply.github.com> Date: Tue, 26 Sep 2023 13:40:55 +0100 Subject: [PATCH 03/16] Fix gamestate overlay table size declaration (#1555) --- include/variables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/variables.h b/include/variables.h index b57e8f7d73..12b8e734b7 100644 --- a/include/variables.h +++ b/include/variables.h @@ -56,7 +56,7 @@ extern Gfx D_80116280[]; extern ActorOverlay gActorOverlayTable[ACTOR_ID_MAX]; // original name: "actor_dlftbls" 801162A0 extern s32 gMaxActorId; // original name: "MaxProfile" extern s32 gDebugCamEnabled; -extern GameStateOverlay gGameStateOverlayTable[6]; +extern GameStateOverlay gGameStateOverlayTable[GAMESTATE_ID_MAX]; extern u8 gWeatherMode; extern u8 gLightConfigAfterUnderwater; extern u8 gInterruptSongOfStorms; From 2cb4ff4fd3d36157dd03d68321dbeb99ba5c6845 Mon Sep 17 00:00:00 2001 From: fig02 Date: Tue, 26 Sep 2023 12:48:41 -0400 Subject: [PATCH 04/16] Player Docs: csMode -> csAction (#1547) * csmode -> cs action * format --- include/functions.h | 4 +- include/z64.h | 2 +- include/z64camera.h | 2 +- include/z64player.h | 214 +++---- src/code/z_actor.c | 10 +- src/code/z_camera.c | 18 +- src/code/z_onepointdemo.c | 96 +-- src/code/z_onepointdemo_data.inc.c | 126 ++-- src/code/z_parameter.c | 2 +- src/code/z_player_lib.c | 4 +- .../actors/ovl_Bg_Breakwall/z_bg_breakwall.c | 2 +- .../ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c | 18 +- .../ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c | 8 +- .../ovl_Bg_Heavy_Block/z_bg_heavy_block.c | 2 +- .../ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c | 4 +- .../ovl_Bg_Ice_Objects/z_bg_ice_objects.c | 6 +- .../ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c | 2 +- .../z_bg_mori_kaitenkabe.c | 4 +- .../actors/ovl_Bg_Po_Event/z_bg_po_event.c | 4 +- .../z_bg_spot00_hanebasi.c | 2 +- .../actors/ovl_Boss_Dodongo/z_boss_dodongo.c | 14 +- src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c | 12 +- src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c | 6 +- .../actors/ovl_Boss_Ganon/z_boss_ganon.c | 32 +- .../actors/ovl_Boss_Ganon2/z_boss_ganon2.c | 56 +- .../ovl_Boss_Ganondrof/z_boss_ganondrof.c | 4 +- .../actors/ovl_Boss_Goma/z_boss_goma.c | 14 +- src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 20 +- src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 8 +- src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c | 18 +- src/overlays/actors/ovl_Boss_Va/z_boss_va.c | 20 +- src/overlays/actors/ovl_Demo_Im/z_demo_im.c | 2 +- .../actors/ovl_Door_Shutter/z_door_shutter.c | 4 +- .../actors/ovl_Door_Warp1/z_door_warp1.c | 6 +- .../ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c | 10 +- .../ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c | 8 +- src/overlays/actors/ovl_En_Daiku/z_en_daiku.c | 4 +- .../ovl_En_Diving_Game/z_en_diving_game.c | 16 +- .../actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c | 4 +- .../actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c | 6 +- src/overlays/actors/ovl_En_Du/z_en_du.c | 8 +- .../actors/ovl_En_Ex_Item/z_en_ex_item.c | 2 +- src/overlays/actors/ovl_En_Ge1/z_en_ge1.c | 4 +- src/overlays/actors/ovl_En_Ge2/z_en_ge2.c | 2 +- src/overlays/actors/ovl_En_Ge3/z_en_ge3.c | 2 +- src/overlays/actors/ovl_En_GeldB/z_en_geldb.c | 2 +- src/overlays/actors/ovl_En_Go2/z_en_go2.c | 4 +- .../actors/ovl_En_Heishi1/z_en_heishi1.c | 4 +- .../actors/ovl_En_Heishi2/z_en_heishi2.c | 14 +- .../actors/ovl_En_Heishi3/z_en_heishi3.c | 4 +- .../actors/ovl_En_Heishi4/z_en_heishi4.c | 4 +- src/overlays/actors/ovl_En_In/z_en_in.c | 4 +- .../actors/ovl_En_Kakasi/z_en_kakasi.c | 6 +- .../actors/ovl_En_Kakasi3/z_en_kakasi3.c | 10 +- src/overlays/actors/ovl_En_Kz/z_en_kz.c | 4 +- src/overlays/actors/ovl_En_Owl/z_en_owl.c | 6 +- src/overlays/actors/ovl_En_Skj/z_en_skj.c | 4 +- src/overlays/actors/ovl_En_Ta/z_en_ta.c | 8 +- .../actors/ovl_En_Torch2/z_en_torch2.c | 2 +- .../actors/ovl_En_Wallmas/z_en_wallmas.c | 2 +- .../ovl_En_Wonder_Talk2/z_en_wonder_talk2.c | 4 +- src/overlays/actors/ovl_En_Zl1/z_en_zl1.c | 4 +- src/overlays/actors/ovl_En_Zl4/z_en_zl4.c | 8 +- src/overlays/actors/ovl_En_fHG/z_en_fhg.c | 8 +- src/overlays/actors/ovl_Fishing/z_fishing.c | 10 +- .../actors/ovl_player_actor/z_player.c | 547 +++++++++--------- 66 files changed, 737 insertions(+), 734 deletions(-) diff --git a/include/functions.h b/include/functions.h index 8ce39ff866..479281d033 100644 --- a/include/functions.h +++ b/include/functions.h @@ -385,8 +385,8 @@ void func_8002DE74(PlayState* play, Player* player); void Actor_MountHorse(PlayState* play, Player* player, Actor* horse); s32 func_8002DEEC(Player* player); void func_8002DF18(PlayState* play, Player* player); -s32 func_8002DF38(PlayState* play, Actor* actor, u8 csMode); -s32 func_8002DF54(PlayState* play, Actor* actor, u8 csMode); +s32 func_8002DF38(PlayState* play, Actor* actor, u8 csAction); +s32 func_8002DF54(PlayState* play, Actor* actor, u8 csAction); void func_8002DF90(DynaPolyActor* dynaActor); void func_8002DFA4(DynaPolyActor* dynaActor, f32 arg1, s16 arg2); s32 Player_IsFacingActor(Actor* actor, s16 maxAngle, PlayState* play); diff --git a/include/z64.h b/include/z64.h index 0e76981154..e962e4f33f 100644 --- a/include/z64.h +++ b/include/z64.h @@ -402,7 +402,7 @@ typedef struct PlayState { /* 0x11D44 */ s32 (*isPlayerDroppingFish)(struct PlayState* play); /* 0x11D48 */ s32 (*startPlayerFishing)(struct PlayState* play); /* 0x11D4C */ s32 (*grabPlayer)(struct PlayState* play, Player* player); - /* 0x11D50 */ s32 (*startPlayerCutscene)(struct PlayState* play, Actor* actor, s32 csMode); + /* 0x11D50 */ s32 (*startPlayerCutscene)(struct PlayState* play, Actor* actor, s32 csAction); /* 0x11D54 */ void (*func_11D54)(Player* player, struct PlayState* play); /* 0x11D58 */ s32 (*damagePlayer)(struct PlayState* play, s32 damage); /* 0x11D5C */ void (*talkWithPlayer)(struct PlayState* play, Actor* actor); diff --git a/include/z64camera.h b/include/z64camera.h index 48d4f1cc7c..f6c4589180 100644 --- a/include/z64camera.h +++ b/include/z64camera.h @@ -1254,7 +1254,7 @@ typedef enum { #define ONEPOINT_CS_INIT_FIELD_NONE 0xFF #define ONEPOINT_CS_INIT_FIELD_ACTORCAT(actorCat) (0x80 | ((actorCat) & 0x0F)) #define ONEPOINT_CS_INIT_FIELD_HUD_VISIBILITY(camHudVisibility) (0xC0 | ((camHudVisibility) & 0x0F)) -#define ONEPOINT_CS_INIT_FIELD_PLAYER_CS(csMode) ((csMode) & 0x7F) +#define ONEPOINT_CS_INIT_FIELD_PLAYER_CS(csAction) ((csAction) & 0x7F) #define ONEPOINT_CS_INIT_FIELD_IS_TYPE_ACTORCAT(field) ((field & 0xF0) == 0x80) #define ONEPOINT_CS_INIT_FIELD_IS_TYPE_HUD_VISIBILITY(field) ((field & 0xF0) == 0xC0) diff --git a/include/z64player.h b/include/z64player.h index 1796b47d82..ae497a395a 100644 --- a/include/z64player.h +++ b/include/z64player.h @@ -353,111 +353,111 @@ typedef enum { #define PLAYER_LIMB_BUF_COUNT LIMB_BUF_COUNT(PLAYER_LIMB_MAX) typedef enum { - /* 0x00 */ PLAYER_CSMODE_NONE, - /* 0x01 */ PLAYER_CSMODE_1, - /* 0x02 */ PLAYER_CSMODE_2, - /* 0x03 */ PLAYER_CSMODE_3, - /* 0x04 */ PLAYER_CSMODE_4, - /* 0x05 */ PLAYER_CSMODE_5, - /* 0x06 */ PLAYER_CSMODE_6, - /* 0x07 */ PLAYER_CSMODE_7, - /* 0x08 */ PLAYER_CSMODE_8, - /* 0x09 */ PLAYER_CSMODE_9, - /* 0x0A */ PLAYER_CSMODE_10, - /* 0x0B */ PLAYER_CSMODE_11, - /* 0x0C */ PLAYER_CSMODE_12, - /* 0x0D */ PLAYER_CSMODE_13, - /* 0x0E */ PLAYER_CSMODE_14, - /* 0x0F */ PLAYER_CSMODE_15, - /* 0x10 */ PLAYER_CSMODE_16, - /* 0x11 */ PLAYER_CSMODE_17, - /* 0x12 */ PLAYER_CSMODE_18, - /* 0x13 */ PLAYER_CSMODE_19, - /* 0x14 */ PLAYER_CSMODE_20, - /* 0x15 */ PLAYER_CSMODE_21, - /* 0x16 */ PLAYER_CSMODE_22, - /* 0x17 */ PLAYER_CSMODE_23, - /* 0x18 */ PLAYER_CSMODE_24, - /* 0x19 */ PLAYER_CSMODE_25, - /* 0x1A */ PLAYER_CSMODE_26, - /* 0x1B */ PLAYER_CSMODE_27, - /* 0x1C */ PLAYER_CSMODE_28, - /* 0x1D */ PLAYER_CSMODE_29, - /* 0x1E */ PLAYER_CSMODE_30, - /* 0x1F */ PLAYER_CSMODE_31, - /* 0x20 */ PLAYER_CSMODE_32, - /* 0x21 */ PLAYER_CSMODE_33, - /* 0x22 */ PLAYER_CSMODE_34, - /* 0x23 */ PLAYER_CSMODE_35, - /* 0x24 */ PLAYER_CSMODE_36, - /* 0x25 */ PLAYER_CSMODE_37, - /* 0x26 */ PLAYER_CSMODE_38, - /* 0x27 */ PLAYER_CSMODE_39, - /* 0x28 */ PLAYER_CSMODE_40, - /* 0x29 */ PLAYER_CSMODE_41, - /* 0x2A */ PLAYER_CSMODE_42, - /* 0x2B */ PLAYER_CSMODE_43, - /* 0x2C */ PLAYER_CSMODE_44, - /* 0x2D */ PLAYER_CSMODE_45, - /* 0x2E */ PLAYER_CSMODE_46, - /* 0x2F */ PLAYER_CSMODE_47, - /* 0x30 */ PLAYER_CSMODE_48, - /* 0x31 */ PLAYER_CSMODE_49, - /* 0x32 */ PLAYER_CSMODE_50, - /* 0x33 */ PLAYER_CSMODE_51, - /* 0x34 */ PLAYER_CSMODE_52, - /* 0x35 */ PLAYER_CSMODE_53, - /* 0x36 */ PLAYER_CSMODE_54, - /* 0x37 */ PLAYER_CSMODE_55, - /* 0x38 */ PLAYER_CSMODE_56, - /* 0x39 */ PLAYER_CSMODE_57, - /* 0x3A */ PLAYER_CSMODE_58, - /* 0x3B */ PLAYER_CSMODE_59, - /* 0x3C */ PLAYER_CSMODE_60, - /* 0x3D */ PLAYER_CSMODE_61, - /* 0x3E */ PLAYER_CSMODE_62, - /* 0x3F */ PLAYER_CSMODE_63, - /* 0x40 */ PLAYER_CSMODE_64, - /* 0x41 */ PLAYER_CSMODE_65, - /* 0x42 */ PLAYER_CSMODE_66, - /* 0x43 */ PLAYER_CSMODE_67, - /* 0x44 */ PLAYER_CSMODE_68, - /* 0x45 */ PLAYER_CSMODE_69, - /* 0x46 */ PLAYER_CSMODE_70, - /* 0x47 */ PLAYER_CSMODE_71, - /* 0x48 */ PLAYER_CSMODE_72, - /* 0x49 */ PLAYER_CSMODE_73, - /* 0x4A */ PLAYER_CSMODE_74, - /* 0x4B */ PLAYER_CSMODE_75, - /* 0x4C */ PLAYER_CSMODE_76, - /* 0x4D */ PLAYER_CSMODE_77, - /* 0x4E */ PLAYER_CSMODE_78, - /* 0x4F */ PLAYER_CSMODE_79, - /* 0x50 */ PLAYER_CSMODE_80, - /* 0x51 */ PLAYER_CSMODE_81, - /* 0x52 */ PLAYER_CSMODE_82, - /* 0x53 */ PLAYER_CSMODE_83, - /* 0x54 */ PLAYER_CSMODE_84, - /* 0x55 */ PLAYER_CSMODE_85, - /* 0x56 */ PLAYER_CSMODE_86, - /* 0x57 */ PLAYER_CSMODE_87, - /* 0x58 */ PLAYER_CSMODE_88, - /* 0x59 */ PLAYER_CSMODE_89, - /* 0x5A */ PLAYER_CSMODE_90, - /* 0x5B */ PLAYER_CSMODE_91, - /* 0x5C */ PLAYER_CSMODE_92, - /* 0x5D */ PLAYER_CSMODE_93, - /* 0x5E */ PLAYER_CSMODE_94, - /* 0x5F */ PLAYER_CSMODE_95, - /* 0x60 */ PLAYER_CSMODE_96, - /* 0x61 */ PLAYER_CSMODE_97, - /* 0x62 */ PLAYER_CSMODE_98, - /* 0x63 */ PLAYER_CSMODE_99, - /* 0x64 */ PLAYER_CSMODE_100, - /* 0x65 */ PLAYER_CSMODE_101, - /* 0x66 */ PLAYER_CSMODE_102, - /* 0x67 */ PLAYER_CSMODE_MAX -} PlayerCutsceneMode; + /* 0x00 */ PLAYER_CSACTION_NONE, + /* 0x01 */ PLAYER_CSACTION_1, + /* 0x02 */ PLAYER_CSACTION_2, + /* 0x03 */ PLAYER_CSACTION_3, + /* 0x04 */ PLAYER_CSACTION_4, + /* 0x05 */ PLAYER_CSACTION_5, + /* 0x06 */ PLAYER_CSACTION_6, + /* 0x07 */ PLAYER_CSACTION_7, + /* 0x08 */ PLAYER_CSACTION_8, + /* 0x09 */ PLAYER_CSACTION_9, + /* 0x0A */ PLAYER_CSACTION_10, + /* 0x0B */ PLAYER_CSACTION_11, + /* 0x0C */ PLAYER_CSACTION_12, + /* 0x0D */ PLAYER_CSACTION_13, + /* 0x0E */ PLAYER_CSACTION_14, + /* 0x0F */ PLAYER_CSACTION_15, + /* 0x10 */ PLAYER_CSACTION_16, + /* 0x11 */ PLAYER_CSACTION_17, + /* 0x12 */ PLAYER_CSACTION_18, + /* 0x13 */ PLAYER_CSACTION_19, + /* 0x14 */ PLAYER_CSACTION_20, + /* 0x15 */ PLAYER_CSACTION_21, + /* 0x16 */ PLAYER_CSACTION_22, + /* 0x17 */ PLAYER_CSACTION_23, + /* 0x18 */ PLAYER_CSACTION_24, + /* 0x19 */ PLAYER_CSACTION_25, + /* 0x1A */ PLAYER_CSACTION_26, + /* 0x1B */ PLAYER_CSACTION_27, + /* 0x1C */ PLAYER_CSACTION_28, + /* 0x1D */ PLAYER_CSACTION_29, + /* 0x1E */ PLAYER_CSACTION_30, + /* 0x1F */ PLAYER_CSACTION_31, + /* 0x20 */ PLAYER_CSACTION_32, + /* 0x21 */ PLAYER_CSACTION_33, + /* 0x22 */ PLAYER_CSACTION_34, + /* 0x23 */ PLAYER_CSACTION_35, + /* 0x24 */ PLAYER_CSACTION_36, + /* 0x25 */ PLAYER_CSACTION_37, + /* 0x26 */ PLAYER_CSACTION_38, + /* 0x27 */ PLAYER_CSACTION_39, + /* 0x28 */ PLAYER_CSACTION_40, + /* 0x29 */ PLAYER_CSACTION_41, + /* 0x2A */ PLAYER_CSACTION_42, + /* 0x2B */ PLAYER_CSACTION_43, + /* 0x2C */ PLAYER_CSACTION_44, + /* 0x2D */ PLAYER_CSACTION_45, + /* 0x2E */ PLAYER_CSACTION_46, + /* 0x2F */ PLAYER_CSACTION_47, + /* 0x30 */ PLAYER_CSACTION_48, + /* 0x31 */ PLAYER_CSACTION_49, + /* 0x32 */ PLAYER_CSACTION_50, + /* 0x33 */ PLAYER_CSACTION_51, + /* 0x34 */ PLAYER_CSACTION_52, + /* 0x35 */ PLAYER_CSACTION_53, + /* 0x36 */ PLAYER_CSACTION_54, + /* 0x37 */ PLAYER_CSACTION_55, + /* 0x38 */ PLAYER_CSACTION_56, + /* 0x39 */ PLAYER_CSACTION_57, + /* 0x3A */ PLAYER_CSACTION_58, + /* 0x3B */ PLAYER_CSACTION_59, + /* 0x3C */ PLAYER_CSACTION_60, + /* 0x3D */ PLAYER_CSACTION_61, + /* 0x3E */ PLAYER_CSACTION_62, + /* 0x3F */ PLAYER_CSACTION_63, + /* 0x40 */ PLAYER_CSACTION_64, + /* 0x41 */ PLAYER_CSACTION_65, + /* 0x42 */ PLAYER_CSACTION_66, + /* 0x43 */ PLAYER_CSACTION_67, + /* 0x44 */ PLAYER_CSACTION_68, + /* 0x45 */ PLAYER_CSACTION_69, + /* 0x46 */ PLAYER_CSACTION_70, + /* 0x47 */ PLAYER_CSACTION_71, + /* 0x48 */ PLAYER_CSACTION_72, + /* 0x49 */ PLAYER_CSACTION_73, + /* 0x4A */ PLAYER_CSACTION_74, + /* 0x4B */ PLAYER_CSACTION_75, + /* 0x4C */ PLAYER_CSACTION_76, + /* 0x4D */ PLAYER_CSACTION_77, + /* 0x4E */ PLAYER_CSACTION_78, + /* 0x4F */ PLAYER_CSACTION_79, + /* 0x50 */ PLAYER_CSACTION_80, + /* 0x51 */ PLAYER_CSACTION_81, + /* 0x52 */ PLAYER_CSACTION_82, + /* 0x53 */ PLAYER_CSACTION_83, + /* 0x54 */ PLAYER_CSACTION_84, + /* 0x55 */ PLAYER_CSACTION_85, + /* 0x56 */ PLAYER_CSACTION_86, + /* 0x57 */ PLAYER_CSACTION_87, + /* 0x58 */ PLAYER_CSACTION_88, + /* 0x59 */ PLAYER_CSACTION_89, + /* 0x5A */ PLAYER_CSACTION_90, + /* 0x5B */ PLAYER_CSACTION_91, + /* 0x5C */ PLAYER_CSACTION_92, + /* 0x5D */ PLAYER_CSACTION_93, + /* 0x5E */ PLAYER_CSACTION_94, + /* 0x5F */ PLAYER_CSACTION_95, + /* 0x60 */ PLAYER_CSACTION_96, + /* 0x61 */ PLAYER_CSACTION_97, + /* 0x62 */ PLAYER_CSACTION_98, + /* 0x63 */ PLAYER_CSACTION_99, + /* 0x64 */ PLAYER_CSACTION_100, + /* 0x65 */ PLAYER_CSACTION_101, + /* 0x66 */ PLAYER_CSACTION_102, + /* 0x67 */ PLAYER_CSACTION_MAX +} PlayerCsAction; typedef enum { /* 0 */ PLAYER_LEDGE_CLIMB_NONE, @@ -640,8 +640,8 @@ typedef struct Player { /* 0x043C */ s8 mountSide; /* 0x043D */ char unk_43D[0x003]; /* 0x0440 */ Actor* rideActor; - /* 0x0444 */ u8 csMode; - /* 0x0445 */ u8 prevCsMode; + /* 0x0444 */ u8 csAction; + /* 0x0445 */ u8 prevCsAction; /* 0x0446 */ u8 cueId; /* 0x0447 */ u8 unk_447; /* 0x0448 */ Actor* unk_448; diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 4ef0bf10f2..3edfbaeee7 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1050,27 +1050,27 @@ void Actor_MountHorse(PlayState* play, Player* player, Actor* horse) { } s32 func_8002DEEC(Player* player) { - return (player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (player->csMode != PLAYER_CSMODE_NONE); + return (player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (player->csAction != PLAYER_CSACTION_NONE); } void func_8002DF18(PlayState* play, Player* player) { func_8006DC68(play, player); } -s32 func_8002DF38(PlayState* play, Actor* actor, u8 csMode) { +s32 func_8002DF38(PlayState* play, Actor* actor, u8 csAction) { Player* player = GET_PLAYER(play); - player->csMode = csMode; + player->csAction = csAction; player->unk_448 = actor; player->doorBgCamIndex = 0; return true; } -s32 func_8002DF54(PlayState* play, Actor* actor, u8 csMode) { +s32 func_8002DF54(PlayState* play, Actor* actor, u8 csAction) { Player* player = GET_PLAYER(play); - func_8002DF38(play, actor, csMode); + func_8002DF38(play, actor, csAction); player->doorBgCamIndex = 1; return true; diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 9858cfdfa9..d62b945965 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -5263,10 +5263,10 @@ s32 Camera_Unique9(Camera* camera) { } else if (ONEPOINT_CS_INIT_FIELD_IS_TYPE_HUD_VISIBILITY(rwData->curKeyFrame->initField)) { Camera_UpdateInterface( CAM_INTERFACE_FIELD(CAM_LETTERBOX_IGNORE, rwData->curKeyFrame->initField, 0)); - } else { // initField is of type PlayerCsMode + } else { // initField is a PlayerCsAction if ((camera->player->stateFlags1 & PLAYER_STATE1_27) && (player->currentBoots != PLAYER_BOOTS_IRON)) { - func_8002DF38(camera->play, camera->target, PLAYER_CSMODE_8); + func_8002DF38(camera->play, camera->target, PLAYER_CSACTION_8); osSyncPrintf("camera: demo: player demo set WAIT\n"); } else { osSyncPrintf("camera: demo: player demo set %d\n", rwData->curKeyFrame->initField); @@ -6236,14 +6236,14 @@ s32 Camera_Demo5(Camera* camera) { framesDiff = camera->play->state.frames - sDemo5PrevAction12Frame; if (player->stateFlags1 & PLAYER_STATE1_11) { // holding object over head. - func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_8); + func_8002DF54(camera->play, camera->target, PLAYER_CSACTION_8); } else if (ABS(framesDiff) > 3000) { - func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_12); + func_8002DF54(camera->play, camera->target, PLAYER_CSACTION_12); } else { - func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_69); + func_8002DF54(camera->play, camera->target, PLAYER_CSACTION_69); } } else { - func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_1); + func_8002DF54(camera->play, camera->target, PLAYER_CSACTION_1); } } @@ -6305,7 +6305,7 @@ s32 Camera_Demo6(Camera* camera) { FALLTHROUGH; case 1: if (stateTimers[camera->animState] < rwData->animTimer) { - func_8002DF54(camera->play, &camera->player->actor, PLAYER_CSMODE_8); + func_8002DF54(camera->play, &camera->player->actor, PLAYER_CSACTION_8); Actor_GetWorld(&focusPosRot, camFocus); rwData->atTarget.x = focusPosRot.pos.x; rwData->atTarget.y = focusPosRot.pos.y - 20.0f; @@ -7841,8 +7841,8 @@ void Camera_Finish(Camera* camera) { player->actor.freezeTimer = 0; player->stateFlags1 &= ~PLAYER_STATE1_29; - if (player->csMode != PLAYER_CSMODE_NONE) { - func_8002DF54(camera->play, &player->actor, PLAYER_CSMODE_7); + if (player->csAction != PLAYER_CSACTION_NONE) { + func_8002DF54(camera->play, &player->actor, PLAYER_CSACTION_7); osSyncPrintf("camera: player demo end!!\n"); } diff --git a/src/code/z_onepointdemo.c b/src/code/z_onepointdemo.c index 61548559a7..fc7f7a5d4e 100644 --- a/src/code/z_onepointdemo.c +++ b/src/code/z_onepointdemo.c @@ -278,7 +278,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act case 2290: { Actor* rideActor = player->rideActor; - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); if (rideActor != NULL) { rideActor->freezeTimer = 180; } @@ -290,7 +290,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act } break; case 5120: - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); csInfo->keyFrames = D_80121314; csInfo->keyFrameCount = ARRAY_COUNT(D_80121314); @@ -301,7 +301,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act case 4510: D_8012133C[0].eyeTargetInit = actor->world.pos; D_8012133C[0].eyeTargetInit.y = player->actor.world.pos.y + 40.0f; - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); csInfo->keyFrames = D_8012133C; csInfo->keyFrameCount = ARRAY_COUNT(D_8012133C); @@ -320,7 +320,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0); Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2); Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); subCam->roll = 0; subCam->fov = 50.0f; if (subCam->childCamId != CAM_ID_MAIN) { @@ -335,7 +335,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act if (Rand_ZeroOne() < 0.0f) { D_801213B4[3].eyeTargetInit.x = -D_801213B4[3].eyeTargetInit.x; } - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); csInfo->keyFrames = D_801213B4; csInfo->keyFrameCount = ARRAY_COUNT(D_801213B4); @@ -382,11 +382,11 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 6; subCam->fov = 75.0f; - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); break; case 3040: - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); D_8012151C[0].timerInit = timer - 1; csInfo->keyFrames = D_8012151C; @@ -411,7 +411,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrameCount = ARRAY_COUNT(D_8012156C); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); break; case 3010: @@ -443,7 +443,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act break; case 3090: - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); csInfo->keyFrames = D_80121814; csInfo->keyFrameCount = ARRAY_COUNT(D_80121814); @@ -460,7 +460,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 70.0f; - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); break; case 3380: @@ -468,7 +468,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801218B4; csInfo->keyFrameCount = ARRAY_COUNT(D_801218B4); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -481,13 +481,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121904; csInfo->keyFrameCount = ARRAY_COUNT(D_80121904); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; case 3050: Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3); - func_8002DF54(play, &player->actor, PLAYER_CSMODE_5); + func_8002DF54(play, &player->actor, PLAYER_CSACTION_5); OnePointCutscene_SetCsCamPoints(subCam, D_80120304 | 0x2000, D_80120300, D_8012013C, D_8012021C); Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_8012013C[D_801202FC - 2].pos); @@ -517,7 +517,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act subCam->stateFlags |= CAM_STATE_1; csInfo->keyFrameCount = ARRAY_COUNT(D_80121954[0]); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -525,7 +525,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121A44; csInfo->keyFrameCount = ARRAY_COUNT(D_80121A44); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); subCam->stateFlags |= CAM_STATE_1; break; @@ -552,7 +552,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0x50; subCam->fov = 55.0f; - func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); break; case 3170: @@ -569,7 +569,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CopyCamera(play, CAM_ID_MAIN, subCamId); subCam->roll = -1; subCam->fov = 55.0f; - func_8002DF38(play, actor, PLAYER_CSMODE_1); + func_8002DF38(play, actor, PLAYER_CSACTION_1); break; case 3160: @@ -583,7 +583,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 55.0f; - func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); break; case 3180: @@ -598,13 +598,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 60.0f; - func_8002DF38(play, actor, PLAYER_CSMODE_1); + func_8002DF38(play, actor, PLAYER_CSACTION_1); break; case 3190: Play_ChangeCameraSetting(play, subCamId, CAM_SET_FOREST_DEFEAT_POE); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); - func_8002DF38(play, actor, PLAYER_CSMODE_12); + func_8002DF38(play, actor, PLAYER_CSACTION_12); break; case 3230: @@ -618,7 +618,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0x1E; subCam->fov = 75.0f; - func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); Actor_GetWorldPosShapeRot(&spA0, actor); Actor_GetFocus(&sp8C, &player->actor); spC0.x = sp8C.pos.x; @@ -648,7 +648,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 45.0f; - func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); break; case 3220: @@ -665,7 +665,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act subCam->roll = 0; subCam->fov = 75.0f; player->actor.shape.rot.y = player->actor.world.rot.y = player->yaw = spD0.yaw + 0x7FFF; - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); break; case 3240: @@ -674,13 +674,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121D3C; csInfo->keyFrameCount = ARRAY_COUNT(D_80121D3C); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; case 6001: Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Actor_GetWorld(&spA0, actor); if (spA0.pos.z > -750.0f) { OnePointCutscene_SetCsCamPoints(subCam, D_801208E8, D_801208E4, D_801206A0, D_80120820); @@ -696,7 +696,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act case 3400: Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3); - func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); OnePointCutscene_SetCsCamPoints(subCam, D_8012069C | 0x2000, D_80120698, D_801204D4, D_801205B4); OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_801205B4[D_80120694 - 2].pos); OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_801204D4[D_80120694 - 2].pos); @@ -713,13 +713,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121DB4; csInfo->keyFrameCount = ARRAY_COUNT(D_80121DB4); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; case 3310: Play_ChangeCameraSetting(play, subCamId, CAM_SET_FIRE_STAIRCASE); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Play_CopyCamera(play, subCamId, CAM_ID_MAIN); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -754,7 +754,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121FBC; csInfo->keyFrameCount = ARRAY_COUNT(D_80121FBC); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_3); @@ -767,7 +767,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012205C; csInfo->keyFrameCount = ARRAY_COUNT(D_8012205C); - func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -783,7 +783,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act D_801220D4[1].eyeTargetInit.y = 80.0f; D_801220D4[1].eyeTargetInit.x = -D_801220D4[1].eyeTargetInit.x; } - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); csInfo->keyFrames = D_801220D4; csInfo->keyFrameCount = ARRAY_COUNT(D_801220D4); @@ -795,7 +795,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012219C; csInfo->keyFrameCount = ARRAY_COUNT(D_8012219C); - func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -803,7 +803,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801222B4; csInfo->keyFrameCount = ARRAY_COUNT(D_801222B4); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -816,7 +816,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012237C; csInfo->keyFrameCount = ARRAY_COUNT(D_8012237C); - func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -829,7 +829,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801223CC; csInfo->keyFrameCount = ARRAY_COUNT(D_801223CC); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); player->stateFlags1 |= PLAYER_STATE1_29; player->actor.freezeTimer = 90; @@ -844,7 +844,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801224BC; csInfo->keyFrameCount = ARRAY_COUNT(D_801224BC); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -859,19 +859,19 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act player->actor.shape.rot.y = player->actor.world.rot.y = player->yaw = 0x3FFC; Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); break; case 4110: csInfo->keyFrames = D_8012269C; csInfo->keyFrameCount = ARRAY_COUNT(D_8012269C); - func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; case 4120: - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); D_80122714[1].timerInit = 80; csInfo->keyFrames = D_80122714; csInfo->keyFrameCount = ARRAY_COUNT(D_80122714); @@ -891,7 +891,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801228A4; csInfo->keyFrameCount = ARRAY_COUNT(D_801228A4); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -900,7 +900,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012296C; csInfo->keyFrameCount = ARRAY_COUNT(D_8012296C); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -909,7 +909,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122A0C; csInfo->keyFrameCount = ARRAY_COUNT(D_80122A0C); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -918,7 +918,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122A5C; csInfo->keyFrameCount = ARRAY_COUNT(D_80122A5C); - func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -927,7 +927,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122B9C; csInfo->keyFrameCount = ARRAY_COUNT(D_80122B9C); - func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -951,7 +951,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrameCount = ARRAY_COUNT(D_80122C3C); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); - func_8002DF38(play, &player->actor, PLAYER_CSMODE_1); + func_8002DF38(play, &player->actor, PLAYER_CSACTION_1); i = Quake_Request(subCam, QUAKE_TYPE_3); Quake_SetSpeed(i, 12000); @@ -963,12 +963,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122C8C; csInfo->keyFrameCount = ARRAY_COUNT(D_80122C8C); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; case 3260: - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); D_80122CB4[1].timerInit = timer - 5; csInfo->keyFrames = D_80122CB4; @@ -978,7 +978,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act break; case 3261: - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); D_80122D04[1].timerInit = timer - 10; csInfo->keyFrames = D_80122D04; diff --git a/src/code/z_onepointdemo_data.inc.c b/src/code/z_onepointdemo_data.inc.c index f88e9e39b8..be16be1cef 100644 --- a/src/code/z_onepointdemo_data.inc.c +++ b/src/code/z_onepointdemo_data.inc.c @@ -121,7 +121,7 @@ static s16 D_801208E8 = 8; static OnePointCsFull D_801208EC[3] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8), 0x0101, 1, 0, @@ -182,7 +182,7 @@ static OnePointCsFull D_80120964[2] = { static OnePointCsFull D_801209B4[4] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8), 0x0101, 1, 0, @@ -193,7 +193,7 @@ static OnePointCsFull D_801209B4[4] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x0100, 29, 0, @@ -287,7 +287,7 @@ static OnePointCsFull D_80120ACC[5] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x0442, 10, 0, @@ -323,7 +323,7 @@ static OnePointCsFull D_80120ACC[5] = { static OnePointCsFull D_80120B94[11] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x2142, 1, 0, @@ -447,7 +447,7 @@ static OnePointCsFull D_80120B94[11] = { static OnePointCsFull D_80120D4C[7] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x2142, 1, 0, @@ -527,7 +527,7 @@ static OnePointCsFull D_80120D4C[7] = { static OnePointCsFull D_80120E64[8] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x2142, 20, 0, @@ -618,7 +618,7 @@ static OnePointCsFull D_80120E64[8] = { static OnePointCsFull D_80120FA4[6] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x2143, 30, 0, @@ -687,7 +687,7 @@ static OnePointCsFull D_80120FA4[6] = { static OnePointCsFull D_80121094[3] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8), 0x2101, 20, 0, @@ -698,7 +698,7 @@ static OnePointCsFull D_80121094[3] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x2101, 50, 0, @@ -723,7 +723,7 @@ static OnePointCsFull D_80121094[3] = { static OnePointCsFull D_8012110C[3] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_5), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_5), 0x2142, 1, 0, @@ -759,7 +759,7 @@ static OnePointCsFull D_8012110C[3] = { static OnePointCsFull D_80121184[2] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x0101, 40, 0, @@ -784,7 +784,7 @@ static OnePointCsFull D_80121184[2] = { static OnePointCsFull D_801211D4[2] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8), 0x0101, 50, 0, @@ -809,7 +809,7 @@ static OnePointCsFull D_801211D4[2] = { static OnePointCsFull D_80121224[6] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x4141, 2, 0, @@ -831,7 +831,7 @@ static OnePointCsFull D_80121224[6] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_52), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_52), 0x4104, 80, 0, @@ -842,7 +842,7 @@ static OnePointCsFull D_80121224[6] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x0000, 20, 0, @@ -878,7 +878,7 @@ static OnePointCsFull D_80121224[6] = { static OnePointCsFull D_80121314[1] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8), 0x4141, 1000, 0, @@ -892,7 +892,7 @@ static OnePointCsFull D_80121314[1] = { static OnePointCsFull D_8012133C[3] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x0141, 40, 0, @@ -928,7 +928,7 @@ static OnePointCsFull D_8012133C[3] = { static OnePointCsFull D_801213B4[5] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8), 0xC2C2, 40, 0, @@ -939,7 +939,7 @@ static OnePointCsFull D_801213B4[5] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0xC2C2, 120, 0, @@ -950,7 +950,7 @@ static OnePointCsFull D_801213B4[5] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_83), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_83), 0xC2C2, 30, 0, @@ -961,7 +961,7 @@ static OnePointCsFull D_801213B4[5] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_69), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_69), 0x4222, 30, 0, @@ -986,7 +986,7 @@ static OnePointCsFull D_801213B4[5] = { static OnePointCsFull D_8012147C[4] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x0101, 40, 0, @@ -997,7 +997,7 @@ static OnePointCsFull D_8012147C[4] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x0142, 1, 0, @@ -1008,7 +1008,7 @@ static OnePointCsFull D_8012147C[4] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8), 0x0142, 89, -4, @@ -1033,7 +1033,7 @@ static OnePointCsFull D_8012147C[4] = { static OnePointCsFull D_8012151C[2] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x0101, 29, 0, @@ -1058,7 +1058,7 @@ static OnePointCsFull D_8012151C[2] = { static OnePointCsFull D_8012156C[2] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_77), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_77), 0x4242, 1, 0, @@ -1097,7 +1097,7 @@ static OnePointCsFull D_801215BC[1] = { static OnePointCsFull D_801215E4[10] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8), 0x4141, 20, 0, @@ -1108,7 +1108,7 @@ static OnePointCsFull D_801215E4[10] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x0101, 1, 4, @@ -1141,7 +1141,7 @@ static OnePointCsFull D_801215E4[10] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_9), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_9), 0x0101, 40, -5, @@ -1152,7 +1152,7 @@ static OnePointCsFull D_801215E4[10] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x0101, 1, 0, @@ -1210,7 +1210,7 @@ static OnePointCsFull D_801215E4[10] = { static OnePointCsFull D_80121774[4] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8), 0x0101, 1, -2, @@ -1221,7 +1221,7 @@ static OnePointCsFull D_80121774[4] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x0142, 39, 2, @@ -1232,7 +1232,7 @@ static OnePointCsFull D_80121774[4] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_5), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_5), 0x0121, 20, 0, @@ -1257,7 +1257,7 @@ static OnePointCsFull D_80121774[4] = { static OnePointCsFull D_80121814[4] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_76), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_76), 0x0101, 5, 0, @@ -1429,7 +1429,7 @@ static OnePointCsFull D_80121954[3][2] = { static OnePointCsFull D_80121A44[12] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_5), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_5), 0x2121, 10, 0, @@ -1440,7 +1440,7 @@ static OnePointCsFull D_80121A44[12] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, true, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x4242, 30, 0, @@ -1462,7 +1462,7 @@ static OnePointCsFull D_80121A44[12] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_5), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_5), 0x2222, 40, 5, @@ -1473,7 +1473,7 @@ static OnePointCsFull D_80121A44[12] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x4242, 40, 5, @@ -1517,7 +1517,7 @@ static OnePointCsFull D_80121A44[12] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x2242, 40, 0, @@ -1528,7 +1528,7 @@ static OnePointCsFull D_80121A44[12] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, true, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x22C2, 140, 0, @@ -1564,7 +1564,7 @@ static OnePointCsFull D_80121A44[12] = { static OnePointCsFull D_80121C24[7] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_5), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_5), 0x0101, 1, 0, @@ -1586,7 +1586,7 @@ static OnePointCsFull D_80121C24[7] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8), 0x0101, 40, 4, @@ -1724,7 +1724,7 @@ static OnePointCsFull D_80121DB4[9] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_57), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_57), 0x2121, 1, 8, @@ -1746,7 +1746,7 @@ static OnePointCsFull D_80121DB4[9] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_9, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_56), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_56), 0x2121, 149, -20, @@ -1782,7 +1782,7 @@ static OnePointCsFull D_80121DB4[9] = { static OnePointCsFull D_80121F1C[4] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8), 0x0101, 10, 0, @@ -1804,7 +1804,7 @@ static OnePointCsFull D_80121F1C[4] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_2), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_2), 0x2121, 23, 0, @@ -1898,7 +1898,7 @@ static OnePointCsFull D_8012205C[3] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x21A1, 10, 0, @@ -1912,7 +1912,7 @@ static OnePointCsFull D_8012205C[3] = { static OnePointCsFull D_801220D4[5] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x0101, 5, 0, @@ -2282,7 +2282,7 @@ static OnePointCsFull D_801224BC[7] = { static OnePointCsFull D_801225D4[5] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8), 0x0101, 1, 0, @@ -2293,7 +2293,7 @@ static OnePointCsFull D_801225D4[5] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_59), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_59), 0x0101, 60, 4, @@ -2315,7 +2315,7 @@ static OnePointCsFull D_801225D4[5] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8), 0x2323, 2, 0, @@ -2492,7 +2492,7 @@ static OnePointCsFull D_801227B4[6] = { static OnePointCsFull D_801228A4[5] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x0101, 20, 5, @@ -2514,7 +2514,7 @@ static OnePointCsFull D_801228A4[5] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8), 0x0101, 90, 2, @@ -2972,7 +2972,7 @@ static OnePointCsFull D_80122E44[2][7] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x4343, 160, 10, @@ -3051,7 +3051,7 @@ static OnePointCsFull D_80122E44[2][7] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x4343, 160, -10, @@ -3254,7 +3254,7 @@ static OnePointCsFull D_80123254[2] = { static OnePointCsFull D_801232A4[1] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_69), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_69), 0x0101, 9999, 0, @@ -3384,7 +3384,7 @@ static OnePointCsFull D_80123394[5] = { static OnePointCsFull D_8012345C[4] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x4242, 40, 0, @@ -3395,7 +3395,7 @@ static OnePointCsFull D_8012345C[4] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_77), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_77), 0x4242, 40, 0, @@ -3406,7 +3406,7 @@ static OnePointCsFull D_8012345C[4] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x2121, 10, 0, @@ -3431,7 +3431,7 @@ static OnePointCsFull D_8012345C[4] = { static OnePointCsFull D_801234FC[5] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_5), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_5), 0x0441, 10, 0, @@ -3453,7 +3453,7 @@ static OnePointCsFull D_801234FC[5] = { }, { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x0000, 1, 0, @@ -3489,7 +3489,7 @@ static OnePointCsFull D_801234FC[5] = { static OnePointCsFull D_801235C4[5] = { { ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), - ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1), + ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1), 0x4141, 1, 0, diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 86687ca92d..42644bbdae 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -3816,7 +3816,7 @@ void Interface_Draw(PlayState* play) { gSaveContext.subTimerState = SUBTIMER_STATE_RESPAWN; gSaveContext.save.cutsceneIndex = 0; Message_StartTextbox(play, 0x71B0, NULL); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); } else { sSubTimerStateTimer = 40; gSaveContext.subTimerState = SUBTIMER_STATE_STOP; diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 57fdfd532c..a14934d2c5 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -488,7 +488,7 @@ void Player_SetBootData(PlayState* play, Player* this) { } s32 Player_InBlockingCsMode(PlayState* play, Player* this) { - return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csMode != PLAYER_CSMODE_NONE) || + return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csAction != PLAYER_CSACTION_NONE) || (play->transitionTrigger == TRANS_TRIGGER_START) || (this->stateFlags1 & PLAYER_STATE1_0) || (this->stateFlags3 & PLAYER_STATE3_7) || ((gSaveContext.magicState != MAGIC_STATE_IDLE) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0)); @@ -578,7 +578,7 @@ void func_8008EC70(Player* this) { } void Player_SetEquipmentData(PlayState* play, Player* this) { - if (this->csMode != PLAYER_CSMODE_86) { + if (this->csAction != PLAYER_CSACTION_86) { this->currentShield = SHIELD_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD)); this->currentTunic = TUNIC_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC)); this->currentBoots = BOOTS_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_BOOTS)); diff --git a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c index 45ab8be192..bbc736e668 100644 --- a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c +++ b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c @@ -254,7 +254,7 @@ void BgBreakwall_Wait(BgBreakwall* this, PlayState* play) { gSaveContext.cutsceneTrigger = 1; Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - func_8002DF54(play, NULL, PLAYER_CSMODE_49); + func_8002DF54(play, NULL, PLAYER_CSACTION_49); } if (this->dyna.actor.params < 0) { diff --git a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c index 4104790c87..3b669514a6 100644 --- a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c +++ b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c @@ -191,7 +191,7 @@ void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) { return; } } - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); this->actionFunc = BgDyYoseizo_ChooseType; } } @@ -199,7 +199,7 @@ void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) { void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) { s32 givingReward; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); // "Mode" osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ もうど ☆☆☆☆☆ %d\n" VT_RST, play->msgCtx.ocarinaMode); givingReward = false; @@ -315,12 +315,12 @@ void BgDyYoseizo_SetupSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { } Actor_PlaySfx(&this->actor, NA_SE_VO_FR_LAUGH_0); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); this->actionFunc = BgDyYoseizo_SpinGrow_NoReward; } void BgDyYoseizo_SpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); Math_ApproachF(&this->actor.world.pos.y, this->grownHeight, this->heightFraction, 100.0f); Math_ApproachF(&this->scale, 0.035f, this->scaleFraction, 0.005f); Math_ApproachF(&this->heightFraction, 0.8f, 0.1f, 0.02f); @@ -346,7 +346,7 @@ void BgDyYoseizo_SpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { void BgDyYoseizo_CompleteSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { f32 curFrame = this->skelAnime.curFrame; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); if ((this->frameCount * 1273.0f) <= this->bobTimer) { this->bobTimer = 0.0f; @@ -360,7 +360,7 @@ void BgDyYoseizo_CompleteSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { } void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); if (play->sceneId == SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) { this->frameCount = Animation_GetLastFrame(&gGreatFairySittingAnim); @@ -380,7 +380,7 @@ void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { } void BgDyYoseizo_GreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); this->bobTimer = this->skelAnime.curFrame * 1273.0f; if ((this->frameCount * 1273.0f) <= this->bobTimer) { @@ -548,7 +548,7 @@ void BgDyYoseizo_Vanish(BgDyYoseizo* this, PlayState* play) { Actor* findOcarinaSpot; if (this->vanishTimer == 0) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); play->envCtx.lightSettingOverride = 0; findOcarinaSpot = play->actorCtx.actorLists[ACTORCAT_PROP].head; @@ -570,7 +570,7 @@ void BgDyYoseizo_SetupSpinGrow_Reward(BgDyYoseizo* this, PlayState* play) { if (play->csCtx.state != CS_STATE_IDLE) { if ((play->csCtx.actorCues[0] != NULL) && (play->csCtx.actorCues[0]->id == 2)) { this->actor.draw = BgDyYoseizo_Draw; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); this->finishedSpinGrow = false; if (play->sceneId == SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) { diff --git a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c index e9e5dd7158..101216e210 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c @@ -239,7 +239,7 @@ void BgGndIceblock_Idle(BgGndIceblock* this, PlayState* play) { if (this->dyna.unk_150 > 0.0f) { BgGndIceblock_SetNextPosition(this); if (Actor_WorldDistXZToPoint(&this->dyna.actor, &this->targetPos) > 1.0f) { - func_8002DF54(play, &this->dyna.actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->dyna.actor, PLAYER_CSACTION_8); this->actionFunc = BgGndIceblock_Slide; } } @@ -280,7 +280,7 @@ void BgGndIceblock_Fall(BgGndIceblock* this, PlayState* play) { thisx->world.pos.y = thisx->home.pos.y - 100.0f; thisx->world.pos.z = thisx->home.pos.z; if (Player_InCsMode(play)) { - func_8002DF54(play, thisx, PLAYER_CSMODE_7); + func_8002DF54(play, thisx, PLAYER_CSACTION_7); } this->actionFunc = BgGndIceblock_Reset; } @@ -293,7 +293,7 @@ void BgGndIceblock_Hole(BgGndIceblock* this, PlayState* play) { if (Math_StepToF(&thisx->world.pos.y, thisx->home.pos.y - 100.0f, thisx->velocity.y)) { thisx->velocity.y = 0.0f; if (Player_InCsMode(play)) { - func_8002DF54(play, thisx, PLAYER_CSMODE_7); + func_8002DF54(play, thisx, PLAYER_CSACTION_7); } this->actionFunc = BgGndIceblock_Idle; } @@ -317,7 +317,7 @@ void BgGndIceblock_Slide(BgGndIceblock* this, PlayState* play) { switch (BgGndIceblock_NextAction(this)) { case GNDICE_IDLE: this->actionFunc = BgGndIceblock_Idle; - func_8002DF54(play, thisx, PLAYER_CSMODE_7); + func_8002DF54(play, thisx, PLAYER_CSACTION_7); break; case GNDICE_FALL: this->actionFunc = BgGndIceblock_Fall; diff --git a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c index 100f842337..ca244bdff5 100644 --- a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c +++ b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c @@ -367,7 +367,7 @@ void BgHeavyBlock_LiftedUp(BgHeavyBlock* this, PlayState* play) { this->timer++; - func_8002DF54(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &player->actor, PLAYER_CSACTION_8); // if parent is NULL, link threw it if (Actor_HasNoParent(&this->dyna.actor, play)) { 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 b1367ae251..f02871bc7e 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 @@ -138,7 +138,7 @@ void BgHidanDalm_Wait(BgHidanDalm* this, PlayState* play) { this->dyna.actor.world.pos.x += 32.5f * Math_SinS(this->dyna.actor.world.rot.y); this->dyna.actor.world.pos.z += 32.5f * Math_CosS(this->dyna.actor.world.rot.y); - func_8002DF54(play, &this->dyna.actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->dyna.actor, PLAYER_CSACTION_8); this->dyna.actor.flags |= ACTOR_FLAG_4; this->actionFunc = BgHidanDalm_Shrink; this->dyna.actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND_TOUCH; @@ -159,7 +159,7 @@ void BgHidanDalm_Shrink(BgHidanDalm* this, PlayState* play) { Vec3f pos; if (Math_StepToF(&this->dyna.actor.scale.x, 0.0f, 0.004f)) { - func_8002DF54(play, &this->dyna.actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->dyna.actor, PLAYER_CSACTION_7); Actor_Kill(&this->dyna.actor); } diff --git a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c index ab05a463f8..c6ff42fdf8 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c +++ b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c @@ -125,7 +125,7 @@ void BgIceObjects_CheckPits(BgIceObjects* this, PlayState* play) { thisx->world.pos.y = thisx->home.pos.y - 60.0f; thisx->world.pos.z = thisx->home.pos.z; if (thisx->params != 0) { - func_8002DF54(play, thisx, PLAYER_CSMODE_7); + func_8002DF54(play, thisx, PLAYER_CSACTION_7); } this->actionFunc = BgIceObjects_Reset; } @@ -142,7 +142,7 @@ void BgIceObjects_Idle(BgIceObjects* this, PlayState* play) { BgIceObjects_SetNextTarget(this, play); if (Actor_WorldDistXZToPoint(thisx, &this->targetPos) > 1.0f) { thisx->flags |= ACTOR_FLAG_4; - func_8002DF54(play, thisx, PLAYER_CSMODE_8); + func_8002DF54(play, thisx, PLAYER_CSACTION_8); thisx->params = 1; this->actionFunc = BgIceObjects_Slide; } @@ -172,7 +172,7 @@ void BgIceObjects_Slide(BgIceObjects* this, PlayState* play) { thisx->flags &= ~ACTOR_FLAG_4; } thisx->params = 0; - func_8002DF54(play, thisx, PLAYER_CSMODE_7); + func_8002DF54(play, thisx, PLAYER_CSACTION_7); Actor_PlaySfx(thisx, NA_SE_EV_BLOCK_BOUND); if ((fabsf(thisx->world.pos.x + 1387.0f) < 1.0f) && (fabsf(thisx->world.pos.z + 260.0f) < 1.0f)) { this->actionFunc = BgIceObjects_Stuck; diff --git a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c index 5e27a7fc01..df798ea9e3 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c +++ b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c @@ -164,7 +164,7 @@ void BgMoriBigst_Fall(BgMoriBigst* this, PlayState* play) { BgMoriBigst_SetupLanding(this, play); Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_STONE_BOUND); OnePointCutscene_Init(play, 1020, 8, &this->dyna.actor, CAM_ID_MAIN); - func_8002DF38(play, NULL, PLAYER_CSMODE_60); + func_8002DF38(play, NULL, PLAYER_CSACTION_60); } } diff --git a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c index c3c4c391cf..efade085ad 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c +++ b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c @@ -95,7 +95,7 @@ void BgMoriKaitenkabe_Wait(BgMoriKaitenkabe* this, PlayState* play) { this->timer++; if ((this->timer > 28) && !Player_InCsMode(play)) { BgMoriKaitenkabe_SetupRotate(this); - func_8002DF54(play, &this->dyna.actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->dyna.actor, PLAYER_CSACTION_8); Math_Vec3f_Copy(&this->lockedPlayerPos, &player->actor.world.pos); push.x = Math_SinS(this->dyna.unk_158); push.y = 0.0f; @@ -129,7 +129,7 @@ void BgMoriKaitenkabe_Rotate(BgMoriKaitenkabe* this, PlayState* play) { Math_StepToF(&this->rotSpeed, 0.6f, 0.02f); if (Math_StepToF(&this->rotYdeg, this->rotDirection * 45.0f, this->rotSpeed)) { BgMoriKaitenkabe_SetupWait(this); - func_8002DF54(play, thisx, PLAYER_CSMODE_7); + func_8002DF54(play, thisx, PLAYER_CSACTION_7); if (this->rotDirection > 0.0f) { thisx->home.rot.y += 0x2000; } else { diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index af1e472525..d73e74c9ff 100644 --- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -320,7 +320,7 @@ void BgPoEvent_BlockFall(BgPoEvent* this, PlayState* play) { if (firstFall == 0) { firstFall = 1; } else { - func_8002DF54(play, &GET_PLAYER(play)->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &GET_PLAYER(play)->actor, PLAYER_CSACTION_7); } } this->direction = 0; @@ -356,7 +356,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, PlayState* play) { if (sPuzzleState == 0x10) { sPuzzleState = 0x40; Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BLOCK_RISING); - func_8002DF54(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &player->actor, PLAYER_CSACTION_8); } } else if (this->dyna.unk_150 != 0.0f) { if (this->direction == 0) { diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c index 13b2b4e203..a9268e1dc9 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c @@ -214,7 +214,7 @@ void BgSpot00Hanebasi_Update(Actor* thisx, PlayState* play) { SET_EVENTCHKINF(EVENTCHKINF_80); Flags_SetEventChkInf(EVENTCHKINF_82); this->actionFunc = BgSpot00Hanebasi_DoNothing; - func_8002DF54(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &player->actor, PLAYER_CSACTION_8); play->nextEntranceIndex = ENTR_HYRULE_FIELD_0; gSaveContext.nextCutsceneIndex = 0xFFF1; play->transitionTrigger = TRANS_TRIGGER_START; diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index d8ab06a050..6ad24aa7d1 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -269,7 +269,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) { break; case 1: Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); Play_ClearAllSubCameras(play); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); @@ -297,11 +297,11 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) { } if (this->unk_198 == 110) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_9); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_9); } if (this->unk_198 == 5) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_12); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_12); } if (this->unk_198 < 6) { @@ -416,7 +416,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); BossDodongo_SetupWalk(this); this->unk_1DA = 50; this->unk_1BC = 0; @@ -948,7 +948,7 @@ void BossDodongo_Update(Actor* thisx, PlayState* play2) { magmaScale = ((s16)(Rand_ZeroOne() * 50)) - 50; } - if (player2->csMode >= PLAYER_CSMODE_10) { + if (player2->csAction >= PLAYER_CSACTION_10) { phi_s0_3 = -1; } @@ -1302,7 +1302,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) { case 0: this->csState = 5; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_UNK3); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1612,7 +1612,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) { this->csState = 100; Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, -890.0f, -1523.76f, -3304.0f, 0, 0, 0, WARP_DUNGEON_CHILD); this->skelAnime.playSpeed = 0.0f; diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index bb739b45b9..bbc6c678da 100644 --- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -312,7 +312,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { this->introState = BFD_CS_START; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -389,7 +389,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { Math_ApproachF(&this->subCamShake, 2.0f, 1.0f, 0.8 * 0.01f); } if (this->timers[0] == 40) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_19); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_19); } if (this->timers[0] == 0) { this->introState = BFD_CS_LOOK_GROUND; @@ -418,7 +418,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { this->timers[0] = 170; this->subCamVelFactor = 0.0f; this->subCamAccel = 0.0f; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_20); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_20); } break; case BFD_CS_COLLAPSE: @@ -468,7 +468,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { if (this->timers[3] == 190) { this->subCamAtMaxVelFrac.x = this->subCamAtMaxVelFrac.y = this->subCamAtMaxVelFrac.z = 0.05f; this->platformSignal = VBSIMA_KILL; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); } if (this->actor.world.pos.y > 120.0f) { this->subCamAtNext = this->actor.world.pos; @@ -538,7 +538,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { // BFD_CS_NONE / BOSSFD_FLY_MAIN / SUB_CAM_ID_DONE this->introState = this->introFlyState = this->subCamId = 0; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); this->actionFunc = BossFd_Wait; this->handoffSignal = FD2_SIGNAL_GROUND; SET_EVENTCHKINF(EVENTCHKINF_73); @@ -847,7 +847,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { Audio_PlaySfxGeneral(NA_SE_EN_VALVAISA_LAND2, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_5); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_5); for (i1 = 0; i1 < 15; i1++) { Vec3f sp144 = { 0.0f, 0.0f, 0.0f }; Vec3f sp138 = { 0.0f, 0.0f, 0.0f }; diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index 727d00ef16..6839fb7a2a 100644 --- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -653,7 +653,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) { case DEATH_START: this->deathState = DEATH_RETREAT; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -747,7 +747,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) { this->work[FD2_ACTION_STATE]++; this->subCamVelFactor = 0.0f; this->subCamAccel = 0.02f; - func_8002DF54(play, &bossFd->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &bossFd->actor, PLAYER_CSACTION_1); } } if ((bossFd->work[BFD_ACTION_STATE] == BOSSFD_BONES_FALL) && (bossFd->timers[0] == 5)) { @@ -781,7 +781,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, 100.0f, 0.0f, 0, 0, 0, WARP_DUNGEON_ADULT); Flags_SetClear(play, play->roomCtx.curRoom.num); diff --git a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index b9d7cb6170..1254786bd6 100644 --- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -558,7 +558,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { this->actor.shape.rot.y = 0; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); this->csCamIndex = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE); @@ -600,7 +600,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { BossGanon_SetIntroCsCamera(this, 1); if (this->csTimer == 10) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_5); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_5); } if (this->csTimer == 13) { @@ -633,7 +633,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { break; } - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); this->csState = 4; BossGanon_SetIntroCsCamera(this, 2); this->csTimer = 0; @@ -665,7 +665,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { } if (this->csTimer == 10) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_75); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_75); } if (this->csTimer == 70) { @@ -731,7 +731,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { this->csState = 9; this->csTimer = 0; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); sZelda->unk_3C8 = 0; this->triforceType = GDF_TRIFORCE_ZELDA; this->fwork[GDF_TRIFORCE_SCALE] = 10.0f; @@ -785,7 +785,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { player->actor.world.pos.z = 20.0f; if (this->csTimer == 20) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_23); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_23); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_HEARTS); } @@ -1005,7 +1005,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { } if (this->csTimer == 30) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_74); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_74); } if (this->csTimer <= 50) { @@ -1128,7 +1128,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { Play_ReturnToMainCam(play, this->csCamIndex, 0); this->csState = this->csCamIndex = 0; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); BossGanon_SetupWait(this, play); } @@ -1234,7 +1234,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { switch (this->csState) { case 0: Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); this->csCamIndex = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE); @@ -1469,7 +1469,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_GANON_BODY_SPARK - SFX_FLAG); if (this->csTimer == 2) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_57); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_57); } if (this->csTimer > 50) { @@ -1505,7 +1505,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { case 100: Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); this->csCamIndex = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE); @@ -1594,11 +1594,11 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { this->csCamAt.z = -135.0f; if (this->csTimer == 5) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_76); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_76); } if (this->csTimer == 70) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_77); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_77); } if (this->csTimer == 90) { @@ -1683,7 +1683,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { if (this->csTimer == 20) { sZelda->unk_3C8 = 5; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_57); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_57); } if (this->csTimer == 40) { @@ -1750,7 +1750,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { this->csState = 107; this->csTimer = 0; Message_StartTextbox(play, 0x70D2, NULL); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_57); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_57); } break; @@ -1792,7 +1792,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { this->csState = 109; this->csCamIndex = 0; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); Flags_SetSwitch(play, 0x37); } break; diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 4189fffdbd..23a08ace97 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -196,7 +196,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_GANON_ANIME3); if (Object_IsLoaded(&play->objectCtx, objectSlot)) { Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -267,11 +267,11 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } if (this->unk_398 == 40) { sZelda->unk_3C8 = 1; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_78); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_78); } if (this->unk_398 == 85) { sZelda->unk_3C8 = 2; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_79); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_79); } this->subCamEye.x = 930.0f; this->subCamEye.y = 1129.0f; @@ -300,14 +300,14 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } if (this->unk_398 == 20) { sZelda->unk_3C8 = 3; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_80); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_80); } if (this->unk_398 == 55) { this->unk_39C = 4; this->unk_398 = 0; this->unk_410.x = 0.0f; sZelda->unk_3C8 = 4; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_80); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_80); } break; case 4: @@ -324,7 +324,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); this->unk_39C = 5; this->unk_398 = 0; } @@ -371,7 +371,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } if (this->unk_398 == 30) { sZelda->unk_3C8 = 5; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_81); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_81); } if (this->unk_398 == 50) { this->unk_398 = 0; @@ -402,7 +402,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { Sfx_PlaySfxCentered(NA_SE_EV_STONE_BOUND); } if (this->unk_398 == 30) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_82); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_82); } if (this->unk_398 == 50) { this->unk_398 = 0; @@ -469,7 +469,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { this->subCamAt.y = player->actor.world.pos.y; this->subCamAt.z = player->actor.world.pos.z - 200.0f; if (this->unk_398 == 20) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_30); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_30); } if (this->unk_398 == 60) { this->subCamEye.x = (this->actor.world.pos.x + 200.0f) - 154.0f; @@ -558,7 +558,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { SkelAnime_Free(&this->skelAnime, play); SkelAnime_InitFlex(play, &this->skelAnime, &gGanonSkel, NULL, NULL, NULL, 0); BossGanon2_SetObjectSegment(this, play, OBJECT_GANON_ANIME3, false); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_84); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_84); this->unk_314 = 3; } // fake, tricks the compiler into using stack the way we need it to @@ -614,7 +614,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { this->actor.world.pos.x += 250; this->actor.world.pos.y = 1886.0f; this->unk_394 = 0.0f; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_83); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_83); this->unk_30C = 5.0f; this->unk_228 = 1.0f; } @@ -699,7 +699,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { if (this->unk_398 == 215) { this->unk_39C = 23; this->unk_224 = 0.0f; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_85); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_85); } break; case 23: @@ -719,7 +719,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { this->subCamAt.z = player->actor.world.pos.z; if (this->unk_398 == 228) { Sfx_PlaySfxCentered(NA_SE_IT_SHIELD_REFLECT_SW); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_86); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_86); Rumble_Override(0.0f, 255, 10, 50); } if (this->unk_398 >= 229) { @@ -756,7 +756,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { Sfx_PlaySfxCentered(NA_SE_IT_SWORD_SWING); } if (this->unk_398 == 25) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_87); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_87); this->unk_39C = 25; this->unk_398 = 0; } @@ -804,7 +804,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { case 27: this->subCamUp.z = 0.0f; if (this->unk_398 == 4) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_88); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_88); } this->subCamEye.x = player->actor.world.pos.x - 20.0f; this->subCamEye.y = player->actor.world.pos.y + 50.0f; @@ -877,7 +877,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); this->unk_39C = 0; this->unk_337 = 1; func_808FFDB0(this, play); @@ -1299,7 +1299,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); this->unk_39C = 1; this->subCamEye = mainCam1->eye; this->subCamAt = mainCam1->at; @@ -1348,7 +1348,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); this->unk_39C = 3; } break; @@ -1359,7 +1359,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); this->unk_39C = 11; this->unk_334 = 1; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_96); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_96); this->unk_398 = 0; FALLTHROUGH; case 11: @@ -1381,7 +1381,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); } break; } @@ -1485,7 +1485,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); this->unk_39C = 1; this->unk_398 = 0; sZelda->unk_3C8 = 9; @@ -1522,7 +1522,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->skelAnime.playSpeed = 3.0f; } if (this->unk_398 == 120) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_99); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_99); } this->actor.world.rot.y = 0x4000; this->actor.world.pos.x = this->actor.world.pos.z = 0.0f; @@ -1590,7 +1590,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->unk_39C = 5; this->unk_398 = 40; this->skelAnime.playSpeed = 1.0f; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_100); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_100); } break; case 5: @@ -1604,10 +1604,10 @@ void func_8090120C(BossGanon2* this, PlayState* play) { Math_ApproachZeroF(&this->unk_38C, 1.0f, 8.0f); } if (this->unk_398 == 70) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_101); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_101); } if (this->unk_398 == 150) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_102); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_102); } this->unk_30C = 10.0f; player->actor.world.pos.x = 250.0f; @@ -1626,7 +1626,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); this->unk_39C = 6; } break; @@ -1645,7 +1645,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->unk_398 = 0; Animation_MorphToPlayOnce(&this->skelAnime, &gGanonFinalBlowAnim, 0.0f); this->unk_194 = Animation_GetLastFrame(&gGanonFinalBlowAnim); - play->startPlayerCutscene(play, &this->actor, PLAYER_CSMODE_97); + play->startPlayerCutscene(play, &this->actor, PLAYER_CSACTION_97); } else { break; } @@ -1712,7 +1712,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { if (this->unk_398 == 55) { Animation_MorphToPlayOnce(&this->skelAnime, &gGanonDeadStartAnim, 0.0f); this->unk_194 = Animation_GetLastFrame(&gGanonDeadStartAnim); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_98); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_98); this->unk_39C = 8; this->unk_398 = 1000; } diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index 9e2cb7d8c9..054a90c2f1 100644 --- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -956,7 +956,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) { switch (this->deathState) { case DEATH_START: Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); osSyncPrintf("7\n"); @@ -1118,7 +1118,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, GND_BOSSROOM_CENTER_X, GND_BOSSROOM_CENTER_Y, GND_BOSSROOM_CENTER_Z + 200.0f, 0, 0, 0, 0); this->actor.child = &horse->actor; diff --git a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c index 1fd4e00a8d..760a437012 100644 --- a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -629,7 +629,7 @@ void BossGoma_SetupEncounterState4(BossGoma* this, PlayState* play) { this->actionState = 4; this->actor.flags |= ACTOR_FLAG_0; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_UNK3); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -686,7 +686,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_SHUTTER, 164.72f, -480.0f, 397.68002f, 0, -0x705C, 0, DOORSHUTTER_PARAMS(SHUTTER_GOHMA_BLOCK, 0)); } else { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); this->actionState = 1; } } @@ -757,7 +757,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { } if (this->frameCount == 190) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_2); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_2); } if (this->frameCount >= 228) { @@ -768,7 +768,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); this->actionState = 3; } break; @@ -964,7 +964,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { this->disableGameplayLogic = false; this->patienceTimer = 200; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); } break; } @@ -1053,7 +1053,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) { case 0: this->actionState = 1; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_UNK3); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1181,7 +1181,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); Actor_Kill(&this->actor); } diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index 7806a63dab..0262a6ad56 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -835,7 +835,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { if (&this->actor == player->actor.parent) { player->actionVar2 = 0x65; player->actor.parent = NULL; - player->csMode = PLAYER_CSMODE_NONE; + player->csAction = PLAYER_CSACTION_NONE; if (this->timers[0] == 0) { func_8002F6D4(play, &this->actor, 20.0f, this->actor.shape.rot.y + 0x8000, 10.0f, 0); } @@ -865,7 +865,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { if (&this->actor == player->actor.parent) { player->actionVar2 = 0x65; player->actor.parent = NULL; - player->csMode = PLAYER_CSMODE_NONE; + player->csAction = PLAYER_CSACTION_NONE; } Math_ApproachF(&this->tentRippleSize, 0.15f, 0.5f, 0.01); if (this->meltIndex < 41) { @@ -1225,7 +1225,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) { (fabsf(player->actor.world.pos.x - -180.0f) < 40.0f))) { // checks if Link is on one of the four platforms Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1333,11 +1333,11 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) { Math_ApproachF(&this->actor.speed, sp80, 1.0f, sp78); Math_ApproachF(&this->subCamYawRate, sp7C, 1.0f, 128.0f); if (this->work[MO_TENT_MOVE_TIMER] == 525) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_2); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_2); } if (this->work[MO_TENT_MOVE_TIMER] > 540) { this->csState = MO_INTRO_REVEAL; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); sMorphaTent1->drawActor = true; player->actor.world.pos.x = 180.0f; player->actor.world.pos.z = -210.0f; @@ -1446,7 +1446,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) { // MO_BATTLE / SUB_CAM_ID_DONE this->csState = this->subCamId = 0; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); } break; } @@ -1511,7 +1511,7 @@ void BossMo_DeathCs(BossMo* this, PlayState* play) { switch (this->csState) { case MO_DEATH_START: Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1681,7 +1681,7 @@ void BossMo_DeathCs(BossMo* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); sMorphaTent1->actor.world.pos.y = -1000.0f; } } else { @@ -1786,7 +1786,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) { if (player->actor.parent != NULL) { player->actionVar2 = 0x65; player->actor.parent = NULL; - player->csMode = PLAYER_CSMODE_NONE; + player->csAction = PLAYER_CSACTION_NONE; } } else { this->actor.colChkInfo.health = 1; @@ -1805,7 +1805,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) { if (player->actor.parent == &sMorphaTent1->actor) { player->actionVar2 = 0x65; player->actor.parent = NULL; - player->csMode = PLAYER_CSMODE_NONE; + player->csAction = PLAYER_CSACTION_NONE; } } this->work[MO_TENT_ACTION_STATE] = MO_CORE_STUNNED; diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index e26d4b4100..53012fe9e8 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -371,7 +371,7 @@ void BossSst_HeadSetupIntro(BossSst* this, PlayState* play) { player->stateFlags1 |= PLAYER_STATE1_5; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); @@ -404,7 +404,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) { sHands[LEFT]->actor.flags |= ACTOR_FLAG_0; player->stateFlags1 &= ~PLAYER_STATE1_5; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); sSubCamAt.y += 30.0f; sSubCamAt.z += 300.0f; Play_SetCameraAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); @@ -1024,7 +1024,7 @@ void BossSst_HeadSetupDeath(BossSst* this, PlayState* play) { Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); Play_CopyCamera(play, sSubCamId, CAM_ID_MAIN); - func_8002DF54(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &player->actor, PLAYER_CSACTION_8); Cutscene_StartManual(play, &play->csCtx); Math_Vec3f_Copy(&sSubCamEye, &GET_ACTIVE_CAM(play)->eye); this->actionFunc = BossSst_HeadDeath; @@ -1187,7 +1187,7 @@ void BossSst_HeadFinish(BossSst* this, PlayState* play) { Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); Play_ClearCamera(play, sSubCamId); - func_8002DF54(play, &GET_PLAYER(play)->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &GET_PLAYER(play)->actor, PLAYER_CSACTION_7); Cutscene_StopManual(play, &play->csCtx); Actor_Kill(&this->actor); Actor_Kill(&sHands[LEFT]->actor); diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index df398b0979..bec9deb5ef 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -1499,7 +1499,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { case 0: this->csState2 = 1; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_57); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_57); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1639,7 +1639,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { Animation_MorphToPlayOnce(&this->skelAnime, &gTwinrovaIntroAnim, 0.0f); this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&gTwinrovaIntroAnim); this->timers[0] = 50; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_2); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_2); Actor_PlaySfx(&this->actor, NA_SE_EN_TWINROBA_TRANSFORM); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS); } @@ -1682,7 +1682,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { } if (this->timers[3] == 19) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_5); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_5); } if (this->timers[3] == 16) { @@ -1715,7 +1715,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { this->subCamId = SUB_CAM_ID_DONE; this->csState2 = this->subCamId; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); this->work[TW_PLLR_IDX] = 0; this->targetPos = sTwinrovaPillarPos[0]; BossTw_TwinrovaSetupFly(this, play); @@ -1795,7 +1795,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) { player->actor.world.pos.x = player->actor.world.pos.z = .0f; this->csState2 = 1; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_57); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_57); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -2278,7 +2278,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) { this->subCamId = SUB_CAM_ID_DONE; this->csState2 = this->subCamId; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); BossTw_SetupWait(this, play); } break; @@ -2682,7 +2682,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { case 0: this->csState2 = 1; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -2721,7 +2721,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { sKoumePtr->actor.world.pos.z = sKotakePtr->actor.world.pos.z; sKoumePtr->work[YAW_TGT] = sKotakePtr->work[YAW_TGT] = sKoumePtr->actor.shape.rot.x = sKotakePtr->actor.shape.rot.x = sKoumePtr->actor.shape.rot.y = sKotakePtr->actor.shape.rot.y = 0; - func_8002DF54(play, &sKoumePtr->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &sKoumePtr->actor, PLAYER_CSACTION_1); sKoumePtr->actor.flags |= ACTOR_FLAG_0; } break; @@ -2810,7 +2810,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { this->csState2 = 4; this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS_CLEAR); Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 600.0f, 230.0f, 0.0f, 0, 0, 0, WARP_DUNGEON_ADULT); diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 1e32443a68..65a892b1a3 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -640,7 +640,7 @@ void BossVa_Init(Actor* thisx, PlayState* play2) { if (GET_EVENTCHKINF(EVENTCHKINF_76)) { sCsState = INTRO_CALL_BARI; sDoorState = 100; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); play->envCtx.screenFillColor[0] = 0xDC; play->envCtx.screenFillColor[1] = 0xDC; play->envCtx.screenFillColor[2] = 0xBE; @@ -781,7 +781,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { play->envCtx.screenFillColor[1] = 0xDC; play->envCtx.screenFillColor[2] = 0xBE; play->envCtx.screenFillColor[3] = 0xD2; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); player->actor.world.rot.y = player->actor.shape.rot.y = 0x7FFF; sCsState++; break; @@ -809,7 +809,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { case INTRO_CLOSE_DOOR: this->timer--; if (this->timer == 0) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_2); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_2); sCsState++; this->timer = 30; } @@ -824,7 +824,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { } break; case INTRO_CRACKLE: - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); sCsState++; break; case INTRO_SPAWN_BARI: @@ -955,7 +955,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac; if (this->timer >= 45000) { play->envCtx.lightSettingOverride = 1; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); } else if (this->timer >= 35000) { SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS); } @@ -1012,7 +1012,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { sSubCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); sCsState++; SET_EVENTCHKINF(EVENTCHKINF_76); player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000; @@ -1530,7 +1530,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) { switch (sCsState) { case DEATH_START: - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); Cutscene_StartManual(play, &play->csCtx); sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); @@ -1592,7 +1592,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) { EffectSsDeadSound_SpawnStationary(play, &this->actor.projectedPos, NA_SE_EN_BALINADE_DEAD, 1, 1, 0x28); this->onCeiling = 2; // Not used by body BossVa_SetDeathEnv(play); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); } break; case DEATH_CORE_BURST: @@ -1633,7 +1633,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) { mainCam->at = sSubCamAt; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); sCsState++; Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x, this->actor.world.pos.y, @@ -2417,7 +2417,7 @@ void BossVa_BariIntro(BossVa* this, PlayState* play) { switch (sCsState) { case INTRO_LOOK_BARI: if (this->actor.params == BOSSVA_BARI_UPPER_1) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); if (Math_SmoothStepToF(&this->actor.world.pos.y, 60.0f, 0.3f, 1.0f, 0.15f) == 0.0f) { this->timer--; if (this->timer == 0) { diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index ced65628f6..cd1a897fbd 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -869,7 +869,7 @@ void func_80986B2C(PlayState* play) { play->nextEntranceIndex = ENTR_HYRULE_FIELD_0; play->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST); play->transitionTrigger = TRANS_TRIGGER_START; - func_8002DF54(play, &player->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &player->actor, PLAYER_CSACTION_8); } } 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 8cbe2cd2ef..1a412a6427 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -819,7 +819,7 @@ void DoorShutter_SetupClosed(DoorShutter* this, PlayState* play) { if (DoorShutter_SetupDoor(this, play) && !(player->stateFlags1 & PLAYER_STATE1_11)) { // The door is barred behind the player DoorShutter_SetupAction(this, DoorShutter_WaitPlayerSurprised); - func_8002DF54(play, NULL, PLAYER_CSMODE_2); + func_8002DF54(play, NULL, PLAYER_CSACTION_2); } } @@ -859,7 +859,7 @@ void DoorShutter_JabuDoorClose(DoorShutter* this, PlayState* play) { void DoorShutter_WaitPlayerSurprised(DoorShutter* this, PlayState* play) { if (this->actionTimer++ > 30) { - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); DoorShutter_SetupDoor(this, play); } } diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index 927521804c..e936df2fa6 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -466,7 +466,7 @@ void DoorWarp1_ChildWarpIdle(DoorWarp1* this, PlayState* play) { Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); OnePointCutscene_Init(play, 0x25E7, 999, &this->actor, CAM_ID_MAIN); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_10); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_10); player->unk_450.x = this->actor.world.pos.x; player->unk_450.z = this->actor.world.pos.z; @@ -542,7 +542,7 @@ void DoorWarp1_RutoWarpIdle(DoorWarp1* this, PlayState* play) { if (this->rutoWarpState != WARP_BLUE_RUTO_STATE_INITIAL && DoorWarp1_PlayerInRange(this, play)) { this->rutoWarpState = WARP_BLUE_RUTO_STATE_ENTERED; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_10); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_10); this->unk_1B2 = 1; DoorWarp1_SetupAction(this, func_80999EE0); } @@ -650,7 +650,7 @@ void DoorWarp1_AdultWarpIdle(DoorWarp1* this, PlayState* play) { player = GET_PLAYER(play); OnePointCutscene_Init(play, 0x25E8, 999, &this->actor, CAM_ID_MAIN); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_10); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_10); player->unk_450.x = this->actor.world.pos.x; player->unk_450.z = this->actor.world.pos.z; this->unk_1B2 = 20; diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c index 8fe6dfbb42..d808adbbb8 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c @@ -261,7 +261,7 @@ void EnBomBowMan_RunGame(EnBomBowlMan* this, PlayState* play) { Message_StartTextbox(play, this->actor.textId, NULL); if (this->gameResult == 2) { - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); } this->actionFunc = EnBomBowlMan_HandlePlayChoice; } else { @@ -306,7 +306,7 @@ void EnBomBowlMan_HandlePlayChoice(EnBomBowlMan* this, PlayState* play) { Message_ContinueTextbox(play, this->actor.textId); this->dialogState = TEXT_STATE_EVENT; OnePointCutscene_Init(play, 8010, -99, NULL, CAM_ID_MAIN); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->actionFunc = EnBomBowMan_SetupChooseShowPrize; } } else { @@ -342,11 +342,11 @@ void func_809C41FC(EnBomBowlMan* this, PlayState* play) { Message_ContinueTextbox(play, this->actor.textId); this->dialogState = TEXT_STATE_EVENT; OnePointCutscene_Init(play, 8010, -99, NULL, CAM_ID_MAIN); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->actionFunc = EnBomBowMan_SetupChooseShowPrize; } else { if (this->gameResult == 2) { - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); } this->actionFunc = EnBomBowMan_SetupRunGame; } @@ -458,7 +458,7 @@ void EnBomBowlMan_BeginPlayGame(EnBomBowlMan* this, PlayState* play) { // "Wow" osSyncPrintf(VT_FGCOL(YELLOW) "☆ わー ☆ %d\n" VT_RST, play->bombchuBowlingStatus); - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); this->actionFunc = EnBomBowMan_SetupRunGame; } } diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c index ff3a23313b..9ef0435269 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c @@ -67,7 +67,7 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, PlayState* play) { if (((fabsf(chuPosDiff.x) < 40.0f) || (BREG(2))) && ((fabsf(chuPosDiff.y) < 40.0f) || (BREG(2))) && ((fabsf(chuPosDiff.z) < 40.0f) || (BREG(2)))) { - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); chu->timer = 1; this->subCamId = Play_CreateSubCamera(play); @@ -106,7 +106,7 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, PlayState* play) { Message_StartTextbox(play, this->actor.textId, NULL); this->unk_154 = TEXT_STATE_EVENT; Sfx_PlaySfxCentered(NA_SE_EV_HIT_SOUND); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->status = 1; this->actionFunc = EnBomBowlPit_CameraDollyIn; break; @@ -169,7 +169,7 @@ void EnBomBowlPit_SetupGivePrize(EnBomBowlPit* this, PlayState* play) { Play_ClearCamera(play, this->subCamId); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->actionFunc = EnBomBowlPit_GivePrize; } } @@ -177,7 +177,7 @@ void EnBomBowlPit_SetupGivePrize(EnBomBowlPit* this, PlayState* play) { void EnBomBowlPit_GivePrize(EnBomBowlPit* this, PlayState* play) { Player* player = GET_PLAYER(play); - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); this->getItemId = sGetItemIds[this->prizeIndex]; if ((this->getItemId == GI_BOMB_BAG_30) && (CUR_CAPACITY(UPG_BOMB_BAG) == 30)) { diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index 88022903f2..510a64851b 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -469,7 +469,7 @@ void EnDaiku_InitSubCamera(EnDaiku* this, PlayState* play) { Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); Play_SetCameraFov(play, this->subCamId, play->mainCamera.fov); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); } void EnDaiku_UpdateSubCamera(EnDaiku* this, PlayState* play) { @@ -505,7 +505,7 @@ void EnDaiku_EscapeSuccess(EnDaiku* this, PlayState* play) { Actor_Kill(&this->actor); } } else { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); } } diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c index f1156ee072..99e2cfd78d 100644 --- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c +++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c @@ -134,7 +134,7 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, PlayState* play) { Message_StartTextbox(play, this->actor.textId, NULL); this->unk_292 = TEXT_STATE_EVENT; this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0; - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->actionFunc = func_809EE048; return true; } else { @@ -159,7 +159,7 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, PlayState* play) { this->unk_292 = TEXT_STATE_EVENT; func_800F5B58(); Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); if (!GET_EVENTCHKINF(EVENTCHKINF_38)) { this->actionFunc = func_809EE96C; } else { @@ -187,7 +187,7 @@ void EnDivingGame_Talk(EnDivingGame* this, PlayState* play) { if (this->unk_292 != TEXT_STATE_DONE) { switch (this->state) { case ENDIVINGGAME_STATE_NOTPLAYING: - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->actionFunc = EnDivingGame_HandlePlayChoice; break; case ENDIVINGGAME_STATE_AWARDPRIZE: @@ -254,7 +254,7 @@ void EnDivingGame_HandlePlayChoice(EnDivingGame* this, PlayState* play) { this->actionFunc = func_809EE048; } else { play->msgCtx.msgMode = MSGMODE_PAUSED; - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->actionFunc = func_809EE0FC; } } @@ -266,11 +266,11 @@ void func_809EE048(EnDivingGame* this, PlayState* play) { if (this->unk_292 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { if (this->phase == ENDIVINGGAME_PHASE_ENDED) { Message_CloseTextbox(play); - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); this->actionFunc = func_809EDCB0; } else { play->msgCtx.msgMode = MSGMODE_PAUSED; - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->actionFunc = func_809EE0FC; } } @@ -423,7 +423,7 @@ void func_809EE800(EnDivingGame* this, PlayState* play) { Interface_SetTimer(50 + BREG(2)); } func_800F5ACC(NA_BGM_TIMED_MINI_GAME); - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); this->actor.textId = 0x405B; this->unk_292 = TEXT_STATE_EVENT; this->state = ENDIVINGGAME_STATE_PLAYING; @@ -446,7 +446,7 @@ void func_809EE96C(EnDivingGame* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if ((this->unk_292 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play))) { Message_CloseTextbox(play); - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); this->actor.textId = 0x4056; this->unk_292 = TEXT_STATE_EVENT; this->state = ENDIVINGGAME_STATE_AWARDPRIZE; diff --git a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c index f4286012c0..bbe10cbbca 100644 --- a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c +++ b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c @@ -119,7 +119,7 @@ void EnDntJiji_Wait(EnDntJiji* this, PlayState* play) { !(player->stateFlags1 & PLAYER_STATE1_11)) { OnePointCutscene_Init(play, 2230, -99, &this->actor, CAM_ID_MAIN); this->timer = 0; - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->actionFunc = EnDntJiji_SetupUnburrow; } } @@ -253,7 +253,7 @@ void EnDntJiji_Talk(EnDntJiji* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { func_8005B1A4(GET_ACTIVE_CAM(play)); Message_CloseTextbox(play); - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); this->actor.parent = NULL; Actor_OfferGetItem(&this->actor, play, this->getItemId, 400.0f, 200.0f); this->actionFunc = EnDntJiji_SetupGivePrize; diff --git a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c index 2645f01345..b862034fb1 100644 --- a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c +++ b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c @@ -250,7 +250,7 @@ void EnDntNomal_TargetWait(EnDntNomal* this, PlayState* play) { this->hitCounter++; if (this->hitCounter >= 3) { OnePointCutscene_Init(play, 4140, -99, &this->actor, CAM_ID_MAIN); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); this->timer4 = 50; this->actionFunc = EnDntNomal_SetupTargetUnburrow; } @@ -339,7 +339,7 @@ void EnDntNomal_TargetTalk(EnDntNomal* this, PlayState* play) { Message_CloseTextbox(play); func_8005B1A4(GET_ACTIVE_CAM(play)); GET_ACTIVE_CAM(play)->csId = 0; - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->actionFunc = EnDntNomal_SetupTargetGivePrize; } } @@ -361,7 +361,7 @@ void EnDntNomal_TargetGivePrize(EnDntNomal* this, PlayState* play) { if (Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_EX_ITEM, itemX, itemY, itemZ, 0, 0, 0, EXITEM_BULLET_BAG) == NULL) { - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); Actor_Kill(&this->actor); } this->spawnedItem = true; diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c index a80886e341..6d29938860 100644 --- a/src/overlays/actors/ovl_En_Du/z_en_du.c +++ b/src/overlays/actors/ovl_En_Du/z_en_du.c @@ -328,7 +328,7 @@ void func_809FE3C0(EnDu* this, PlayState* play) { return; } if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); this->interactInfo.talkState = NPC_TALK_STATE_IDLE; } if (this->actor.xzDistToPlayer < 116.0f + this->collider.dim.radius) { @@ -423,7 +423,7 @@ void func_809FE890(EnDu* this, PlayState* play) { CsCmdActorCue* cue; if (play->csCtx.state == CS_STATE_IDLE) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); EnDu_SetupAction(this, func_809FEB08); return; } @@ -503,7 +503,7 @@ void func_809FEB08(EnDu* this, PlayState* play) { this->unk_1EE = 0; if (this->unk_1E8 == 1) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENDU_ANIM_1); EnDu_SetupAction(this, func_809FE3C0); return; @@ -522,7 +522,7 @@ void func_809FEB08(EnDu* this, PlayState* play) { void func_809FEC14(EnDu* this, PlayState* play) { if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); EnDu_SetupAction(this, func_809FEC70); func_809FEC70(this, play); } diff --git a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c index 349632c02b..92a040e671 100644 --- a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c +++ b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c @@ -386,7 +386,7 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, PlayState* play) { s32 getItemId; this->actor.draw = NULL; - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); this->actor.parent = NULL; if (CUR_UPG_VALUE(UPG_BULLET_BAG) == 1) { getItemId = GI_BULLET_BAG_40; diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index 8d636accb7..97ad57936b 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -242,7 +242,7 @@ void EnGe1_KickPlayer(EnGe1* this, PlayState* play) { void EnGe1_SpotPlayer(EnGe1* this, PlayState* play) { this->cutsceneTimer = 30; this->actionFunc = EnGe1_KickPlayer; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_95); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_95); Sfx_PlaySfxCentered(NA_SE_SY_FOUND); Message_StartTextbox(play, 0x6000, &this->actor); } @@ -586,7 +586,7 @@ void EnGe1_BeginGame_Archery(EnGe1* this, PlayState* play) { SET_EVENTCHKINF(EVENTCHKINF_68); if (!(player->stateFlags1 & PLAYER_STATE1_23)) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); } else { horse = Actor_FindNearby(play, &player->actor, ACTOR_EN_HORSE, ACTORCAT_BG, 1200.0f); player->actor.freezeTimer = 1200; diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index 512eba2147..f0da968757 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -480,7 +480,7 @@ void EnGe2_SetupCapturePlayer(EnGe2* this, PlayState* play) { this->stateFlags |= GE2_STATE_CAPTURING; this->actor.speed = 0.0f; EnGe2_ChangeAction(this, GE2_ACTION_CAPTURETURN); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_95); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_95); Sfx_PlaySfxCentered(NA_SE_SY_FOUND); Message_StartTextbox(play, 0x6000, &this->actor); } diff --git a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c index c1dab44435..3713dd0f01 100644 --- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c +++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c @@ -159,7 +159,7 @@ void EnGe3_ForceTalk(EnGe3* this, PlayState* play) { this->actionFunc = EnGe3_GiveCard; } else { if (!(this->unk_30C & 4)) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); this->unk_30C |= 4; } this->actor.textId = 0x6004; diff --git a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c index 96a7ad999f..507eb45523 100644 --- a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c +++ b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c @@ -919,7 +919,7 @@ void EnGeldB_SpinAttack(EnGeldB* this, PlayState* play) { if (&player->actor == this->swordCollider.base.at) { func_8002F71C(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f); this->spinAttackState = 2; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_24); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_24); Message_StartTextbox(play, 0x6003, &this->actor); this->timer = 30; this->actor.speed = 0.0f; diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c index c19355cbd5..2a9a5fc4b3 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -1925,7 +1925,7 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, PlayState* play) { (f32)((Math_SinS(this->actor.world.rot.y) * -30.0f) + this->actor.world.pos.x); player->actor.world.pos.z = (f32)((Math_CosS(this->actor.world.rot.y) * -30.0f) + this->actor.world.pos.z); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); Audio_PlayFanfare(NA_BGM_APPEAR); } break; @@ -1962,7 +1962,7 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, PlayState* play) { case 4: // Finalize walking away Message_CloseTextbox(play); EnGo2_GoronFireClearCamera(this, play); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); Actor_Kill(&this->actor); break; case 1: diff --git a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c index 3cf619fd8e..1b2f38f749 100644 --- a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c +++ b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c @@ -372,7 +372,7 @@ void EnHeishi1_WaitNight(EnHeishi1* this, PlayState* play) { Message_StartTextbox(play, 0x702D, &this->actor); Sfx_PlaySfxCentered(NA_SE_SY_FOUND); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); this->actionFunc = EnHeishi1_SetupKick; } } @@ -456,7 +456,7 @@ void EnHeishi1_Update(Actor* thisx, PlayState* play) { Sfx_PlaySfxCentered(NA_SE_SY_FOUND); // "Discovered!" osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); sPlayerIsCaught = true; this->actionFunc = EnHeishi1_SetupMoveToLink; } diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index 66e1679bfa..4a21b28515 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -111,7 +111,7 @@ void EnHeishi2_Init(Actor* thisx, PlayState* play) { this->actor.world.pos.z += 90.0f; this->actor.shape.rot.y = this->actor.world.rot.y; Collider_DestroyCylinder(play, &this->collider); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_4; this->actionFunc = func_80A544AC; } @@ -262,7 +262,7 @@ void func_80A5344C(EnHeishi2* this, PlayState* play) { void func_80A53538(EnHeishi2* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (this->unk_300 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); play->msgCtx.msgMode = MSGMODE_PAUSED; this->actionFunc = func_80A535BC; } @@ -334,7 +334,7 @@ void func_80A53850(EnHeishi2* this, PlayState* play) { Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); Message_CloseTextbox(play); this->unk_30C = 1; - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); this->actionFunc = func_80A531E4; } } @@ -423,7 +423,7 @@ void func_80A53AD4(EnHeishi2* this, PlayState* play) { void func_80A53C0C(EnHeishi2* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if ((this->unk_300 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) { - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); play->msgCtx.msgMode = MSGMODE_PAUSED; this->actionFunc = func_80A53C90; } @@ -507,7 +507,7 @@ void func_80A53F30(EnHeishi2* this, PlayState* play) { this->actionFunc = func_80A54038; } else { Message_CloseTextbox(play); - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); this->actionFunc = func_80A53908; } } else { @@ -525,7 +525,7 @@ void func_80A54038(EnHeishi2* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { SET_INFTABLE(INFTABLE_76); Message_CloseTextbox(play); - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); this->actionFunc = func_80A53908; } } @@ -650,7 +650,7 @@ void func_80A5455C(EnHeishi2* this, PlayState* play) { EnBom* bomb; if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); Message_CloseTextbox(play); pos.x = Rand_CenteredFloat(20.0f) + this->unk_274.x; diff --git a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c index c882d3479d..167f976e8c 100644 --- a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c +++ b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c @@ -133,7 +133,7 @@ void EnHeishi3_StandSentinelInGrounds(EnHeishi3* this, PlayState* play) { Message_StartTextbox(play, 0x702D, &this->actor); Sfx_PlaySfxCentered(NA_SE_SY_FOUND); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); this->actionFunc = EnHeishi3_CatchStart; } } @@ -161,7 +161,7 @@ void EnHeishi3_StandSentinelInCastle(EnHeishi3* this, PlayState* play) { Message_StartTextbox(play, 0x702D, &this->actor); Sfx_PlaySfxCentered(NA_SE_SY_FOUND); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); this->actionFunc = EnHeishi3_CatchStart; } } diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c index 5da716f969..463f7604cc 100644 --- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c +++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c @@ -266,7 +266,7 @@ void func_80A56994(EnHeishi4* this, PlayState* play) { if ((this->unk_282 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) { Message_CloseTextbox(play); SET_INFTABLE(INFTABLE_6C); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->actionFunc = func_80A56A50; } } @@ -284,7 +284,7 @@ void func_80A56ACC(EnHeishi4* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (this->unk_288 <= currentFrame) { - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); this->actionFunc = func_80A5673C; } } diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index 6c81b313cc..773f5a7e2c 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -432,7 +432,7 @@ void func_80A79BAC(EnIn* this, PlayState* play, s32 index, u32 transitionType) { } play->transitionType = transitionType; play->transitionTrigger = TRANS_TRIGGER_START; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING); if (index == 0) { AREG(6) = 0; @@ -859,7 +859,7 @@ void func_80A7ABD4(EnIn* this, PlayState* play) { void func_80A7AE84(EnIn* this, PlayState* play) { Play_ChangeCameraStatus(play, this->returnToCamId, CAM_STAT_ACTIVE); Play_ClearCamera(play, this->subCamId); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL); this->actionFunc = func_80A7AEF0; } diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c index 2e2083e196..2f2381818a 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -259,7 +259,7 @@ void func_80A8F8D0(EnKakasi* this, PlayState* play) { void func_80A8F9C8(EnKakasi* this, PlayState* play) { func_80A8F28C(this); SkelAnime_Update(&this->skelanime); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); if (this->unk_196 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { @@ -268,7 +268,7 @@ void func_80A8F9C8(EnKakasi* this, PlayState* play) { } this->subCamId = OnePointCutscene_Init(play, 2270, -99, &this->actor, CAM_ID_MAIN); play->msgCtx.msgMode = MSGMODE_PAUSED; - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); Message_StartOcarina(play, OCARINA_ACTION_SCARECROW_LONG_PLAYBACK); this->actionFunc = func_80A8FAA4; } @@ -307,7 +307,7 @@ void func_80A8FBB8(EnKakasi* this, PlayState* play) { if (this->unk_196 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { func_8005B1A4(play->cameraPtrs[this->subCamId]); Message_CloseTextbox(play); - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); this->actionFunc = func_80A8F660; } } diff --git a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c index 043b9fcbda..30e46b5509 100644 --- a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c +++ b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c @@ -295,7 +295,7 @@ void func_80A91620(EnKakasi3* this, PlayState* play) { if (play->msgCtx.ocarinaMode == OCARINA_MODE_03 && play->msgCtx.msgMode == MSGMODE_NONE) { this->dialogState = TEXT_STATE_EVENT; Message_StartTextbox(play, 0x40A5, NULL); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->actionFunc = func_80A91A90; return; } @@ -353,7 +353,7 @@ void func_80A918E4(EnKakasi3* this, PlayState* play) { this->dialogState = TEXT_STATE_EVENT; OnePointCutscene_EndCutscene(play, this->subCamId); this->subCamId = CAM_ID_NONE; - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->actionFunc = func_80A91A90; return; } @@ -368,7 +368,7 @@ void func_80A918E4(EnKakasi3* this, PlayState* play) { this->unk_195 = true; Message_StartTextbox(play, 0x40A7, NULL); this->dialogState = TEXT_STATE_EVENT; - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->actionFunc = func_80A91A90; return; } @@ -382,7 +382,7 @@ void func_80A918E4(EnKakasi3* this, PlayState* play) { void func_80A91A90(EnKakasi3* this, PlayState* play) { func_80A90E28(this); SkelAnime_Update(&this->skelAnime); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); if (this->dialogState == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { if (this->unk_195) { @@ -398,7 +398,7 @@ void func_80A91A90(EnKakasi3* this, PlayState* play) { } Message_CloseTextbox(play); play->msgCtx.ocarinaMode = OCARINA_MODE_04; - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); this->actionFunc = func_80A911F0; } } diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/src/overlays/actors/ovl_En_Kz/z_en_kz.c index 1b9198b147..bf45ee5c8a 100644 --- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -382,7 +382,7 @@ void EnKz_SetupMweep(EnKz* this, PlayState* play) { subCamEye.y += -100.0f; subCamEye.z += 260.0f; Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); this->actor.speed = 0.1f; this->actionFunc = EnKz_Mweep; } @@ -414,7 +414,7 @@ void EnKz_Mweep(EnKz* this, PlayState* play) { void EnKz_StopMweep(EnKz* this, PlayState* play) { Play_ChangeCameraStatus(play, this->returnToCamId, CAM_STAT_ACTIVE); Play_ClearCamera(play, this->subCamId); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); this->actionFunc = EnKz_Wait; } diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index fd29123944..a4f1ab4954 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -337,7 +337,7 @@ void func_80ACA71C(EnOwl* this) { } void func_80ACA76C(EnOwl* this, PlayState* play) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); if (Actor_TextboxIsClosing(&this->actor, play)) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); @@ -347,7 +347,7 @@ void func_80ACA76C(EnOwl* this, PlayState* play) { } void func_80ACA7E0(EnOwl* this, PlayState* play) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); if (Actor_TextboxIsClosing(&this->actor, play)) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); @@ -547,7 +547,7 @@ void EnOwl_WaitLakeHylia(EnOwl* this, PlayState* play) { } void func_80ACB03C(EnOwl* this, PlayState* play) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); if (Actor_TextboxIsClosing(&this->actor, play)) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); diff --git a/src/overlays/actors/ovl_En_Skj/z_en_skj.c b/src/overlays/actors/ovl_En_Skj/z_en_skj.c index 51d58798a5..19e3a67cf7 100644 --- a/src/overlays/actors/ovl_En_Skj/z_en_skj.c +++ b/src/overlays/actors/ovl_En_Skj/z_en_skj.c @@ -1074,7 +1074,7 @@ void EnSkj_SetupMaskTrade(EnSkj* this) { void EnSkj_StartMaskTrade(EnSkj* this, PlayState* play) { u8 sp1F = Message_GetState(&play->msgCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); if ((sp1F == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { EnSkj_JumpFromStump(this); } @@ -1172,7 +1172,7 @@ void EnSkj_SetupWaitForMaskTextClear(EnSkj* this) { void EnSkj_WaitForMaskTextClear(EnSkj* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); this->backflipFlag = 1; EnSkj_Backflip(this); } diff --git a/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/src/overlays/actors/ovl_En_Ta/z_en_ta.c index dbaf085306..a685942b66 100644 --- a/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -757,7 +757,7 @@ void EnTa_RunCuccoGame(EnTa* this, PlayState* play) { case 1: // Last cucco found, end the game gSaveContext.timerState = TIMER_STATE_OFF; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); Message_StartTextbox(play, 0x2084, &this->actor); this->actionFunc = EnTa_TalkCuccoGameEnd; @@ -805,7 +805,7 @@ void EnTa_RunCuccoGame(EnTa* this, PlayState* play) { this->stateFlags &= ~TALON_STATE_FLAG_RESTORE_BGM_ON_DESTROY; Sfx_PlaySfxCentered(NA_SE_SY_FOUND); gSaveContext.timerState = TIMER_STATE_OFF; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); // Time's up text Message_StartTextbox(play, 0x2081, &this->actor); @@ -868,7 +868,7 @@ void EnTa_ThrowSuperCuccos(EnTa* this, PlayState* play) { Animation_Change(&this->skelAnime, &gTalonSitWakeUpAnim, 1.0f, Animation_GetLastFrame(&gTalonSitWakeUpAnim) - 1.0f, Animation_GetLastFrame(&gTalonSitWakeUpAnim), ANIMMODE_ONCE, 10.0f); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); } } @@ -885,7 +885,7 @@ void EnTa_StartingCuccoGame3(EnTa* this, PlayState* play) { func_800F5ACC(NA_BGM_TIMED_MINI_GAME); this->stateFlags |= TALON_STATE_FLAG_RESTORE_BGM_ON_DESTROY; Message_CloseTextbox(play); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); } if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index d6b89e44fc..0bee2bad48 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -562,7 +562,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { // Handles Dark Link being damaged if ((this->actor.colChkInfo.health == 0) && sDeathFlag) { - this->csMode = PLAYER_CSMODE_24; + this->csAction = PLAYER_CSACTION_24; this->unk_448 = &player->actor; this->doorBgCamIndex = 1; sDeathFlag = false; diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index 4b4d1f88f1..cbba7d4605 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -259,7 +259,7 @@ void EnWallmas_SetupTakePlayer(EnWallmas* this, PlayState* play) { this->actor.velocity.y = 0.0f; this->yTarget = this->actor.yDistToPlayer; - func_8002DF38(play, &this->actor, PLAYER_CSMODE_37); + func_8002DF38(play, &this->actor, PLAYER_CSACTION_37); OnePointCutscene_Init(play, 9500, 9999, &this->actor, CAM_ID_MAIN); } diff --git a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c index 96eaa97d20..d0366ca20b 100644 --- a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c +++ b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c @@ -194,7 +194,7 @@ void func_80B3A3D4(EnWonderTalk2* this, PlayState* play) { this->unk_15A = true; } this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_4); - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); this->unk_156 = true; this->actionFunc = func_80B3A4F8; break; @@ -253,7 +253,7 @@ void func_80B3A4F8(EnWonderTalk2* this, PlayState* play) { this->unk_158 = 0; if (!this->unk_156) { Message_StartTextbox(play, this->actor.textId, NULL); - func_8002DF54(play, NULL, PLAYER_CSMODE_8); + func_8002DF54(play, NULL, PLAYER_CSACTION_8); this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_4; this->actionFunc = func_80B3A3D4; } diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index 680d3183a3..a66c5e7b81 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -429,7 +429,7 @@ void func_80B4BBC4(EnZl1* this, PlayState* play) { Player* player = GET_PLAYER(play); Animation_Change(&this->skelAnime, &gChildZelda1Anim_00438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); Player_PlaySfx(player, NA_SE_VO_LI_SURPRISE_KID); this->actor.textId = 0x7039; Message_StartTextbox(play, this->actor.textId, NULL); @@ -570,7 +570,7 @@ void func_80B4BF2C(EnZl1* this, PlayState* play) { break; case 6: if (Actor_TextboxIsClosing(&this->actor, play)) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL); this->actor.flags &= ~ACTOR_FLAG_8; this->unk_1E2 = 4; diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c index 1d4f87d0e2..5d9e230a90 100644 --- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c +++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c @@ -320,7 +320,7 @@ s32 EnZl4_SetupFromLegendCs(EnZl4* this, PlayState* play) { Actor* playerx = &GET_PLAYER(play)->actor; s16 rotY; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); playerx->world.pos = this->actor.world.pos; rotY = this->actor.shape.rot.y; playerx->world.pos.x += 56.0f * Math_SinS(rotY); @@ -912,7 +912,7 @@ s32 EnZl4_CsLookWindow(EnZl4* this, PlayState* play) { play->csCtx.script = SEGMENTED_TO_VIRTUAL(gZeldasCourtyardGanonCs); gSaveContext.cutsceneTrigger = 1; this->talkState++; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); } break; case 2: @@ -922,7 +922,7 @@ s32 EnZl4_CsLookWindow(EnZl4* this, PlayState* play) { } } else { Rumble_Request(0.0f, 160, 10, 40); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ZL4_ANIM_30); EnZl4_SetActiveCamDir(play, 11); Message_StartTextbox(play, 0x7039, NULL); @@ -1193,7 +1193,7 @@ void EnZl4_Cutscene(EnZl4* this, PlayState* play) { break; case ZL4_CS_PLAN: if (EnZl4_CsMakePlan(this, play)) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); gSaveContext.prevHudVisibilityMode = HUD_VISIBILITY_ALL; SET_EVENTCHKINF(EVENTCHKINF_40); this->actionFunc = EnZl4_Idle; diff --git a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c index bcbf55800b..2561813e98 100644 --- a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c +++ b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c @@ -151,7 +151,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { break; } Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -192,7 +192,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EV_GANON_HORSE_GROAN); } if (this->timers[0] == 20) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_9); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_9); } if (this->timers[0] == 1) { SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_OPENING_GANON); @@ -354,7 +354,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { this->bossGndSignal = FHG_FINISH; } if (this->timers[0] == 170) { - func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); Actor_PlaySfx(&this->actor, NA_SE_EN_FANTOM_MASIC2); } Math_ApproachF(&this->subCamEye.z, this->subCamPanZ + (GND_BOSSROOM_CENTER_Z + 100.0f), 0.1f, @@ -400,7 +400,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); this->actionFunc = EnfHG_Retreat; } break; diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c index 34642308c3..808078fde6 100644 --- a/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -5392,7 +5392,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_5); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_5); mainCam = Play_GetCamera(play, CAM_ID_MAIN); sSubCamEye.x = mainCam->eye.x; sSubCamEye.y = mainCam->eye.y; @@ -5418,7 +5418,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { mainCam->at = sSubCamAt; Play_ReturnToMainCam(play, sSubCamId, 0); Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); sFishingPlayerCinematicState = 0; sSubCamId = SUB_CAM_ID_DONE; @@ -5435,7 +5435,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_5); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_5); mainCam = Play_GetCamera(play, CAM_ID_MAIN); sSubCamEye.x = mainCam->eye.x; sSubCamEye.y = mainCam->eye.y; @@ -5454,7 +5454,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { if ((sFishingCinematicTimer == 0) && Message_ShouldAdvance(play)) { sFishingPlayerCinematicState = 22; sFishingCinematicTimer = 40; - func_8002DF54(play, &this->actor, PLAYER_CSMODE_28); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_28); sSinkingLureHeldY = 0.0f; } break; @@ -5523,7 +5523,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { mainCam->at = sSubCamAt; Play_ReturnToMainCam(play, sSubCamId, 0); Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); + func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); sFishingPlayerCinematicState = 0; sSubCamId = SUB_CAM_ID_DONE; diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 2123cbeb08..b224e07c6b 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -251,7 +251,7 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cue); s32 Player_IsDroppingFish(PlayState* play); s32 Player_StartFishing(PlayState* play); s32 func_80852F38(PlayState* play, Player* this); -s32 func_80852FFC(PlayState* play, Actor* actor, s32 csMode); +s32 func_80852FFC(PlayState* play, Actor* actor, s32 csAction); void func_80853080(Player* this, PlayState* play); s32 Player_InflictDamage(PlayState* play, s32 damage); void func_80853148(PlayState* play, Actor* actor); @@ -2457,7 +2457,7 @@ void Player_UpdateItems(Player* this, PlayState* play) { if ((this->actor.category == ACTORCAT_PLAYER) && !(this->stateFlags1 & PLAYER_STATE1_START_CHANGING_HELD_ITEM) && ((this->heldItemAction == this->itemAction) || (this->stateFlags1 & PLAYER_STATE1_22)) && (gSaveContext.save.info.playerData.health != 0) && (play->csCtx.state == CS_STATE_IDLE) && - (this->csMode == PLAYER_CSMODE_NONE) && (play->shootingGalleryStatus == 0) && + (this->csAction == PLAYER_CSACTION_NONE) && (play->shootingGalleryStatus == 0) && (play->activeCamId == CAM_ID_MAIN) && (play->transitionTrigger != TRANS_TRIGGER_START) && (gSaveContext.timerState != TIMER_STATE_STOP)) { Player_ProcessItemButtons(this, play); @@ -3458,7 +3458,7 @@ void func_80836BEC(Player* this, PlayState* play) { this->stateFlags1 &= ~PLAYER_STATE1_30; } - if ((play->csCtx.state != CS_STATE_IDLE) || (this->csMode != PLAYER_CSMODE_NONE) || + if ((play->csCtx.state != CS_STATE_IDLE) || (this->csAction != PLAYER_CSACTION_NONE) || (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->stateFlags3 & PLAYER_STATE3_7)) { this->unk_66C = 0; } else if (zTrigPressed || (this->stateFlags2 & PLAYER_STATE2_13) || (this->unk_684 != NULL)) { @@ -4262,7 +4262,7 @@ s32 func_808382DC(Player* this, PlayState* play) { } if ((this->unk_A87 != 0) || (this->invincibilityTimer > 0) || (this->stateFlags1 & PLAYER_STATE1_26) || - (this->csMode != PLAYER_CSMODE_NONE) || (this->meleeWeaponQuads[0].base.atFlags & AT_HIT) || + (this->csAction != PLAYER_CSACTION_NONE) || (this->meleeWeaponQuads[0].base.atFlags & AT_HIT) || (this->meleeWeaponQuads[1].base.atFlags & AT_HIT)) { return 0; } @@ -4534,7 +4534,7 @@ s32 Player_HandleExitsAndVoids(PlayState* play, Player* this, CollisionPoly* pol exitIndex = 0; if (!(this->stateFlags1 & PLAYER_STATE1_7) && (play->transitionTrigger == TRANS_TRIGGER_OFF) && - (this->csMode == PLAYER_CSMODE_NONE) && !(this->stateFlags1 & PLAYER_STATE1_0) && + (this->csAction == PLAYER_CSACTION_NONE) && !(this->stateFlags1 & PLAYER_STATE1_0) && (((poly != NULL) && (exitIndex = SurfaceType_GetExitIndex(&play->colCtx, poly, bgId), exitIndex != 0)) || (func_8083816C(sFloorType) && (this->floorProperty == FLOOR_PROPERTY_12)))) { @@ -10449,7 +10449,7 @@ void Player_UpdateCamAndSeqModes(PlayState* play, Player* this) { if (this->actor.category == ACTORCAT_PLAYER) { seqMode = SEQ_MODE_DEFAULT; - if (this->csMode != PLAYER_CSMODE_NONE) { + if (this->csAction != PLAYER_CSACTION_NONE) { Camera_ChangeMode(Play_GetCamera(play, CAM_ID_MAIN), CAM_MODE_NORMAL); } else if (!(this->stateFlags1 & PLAYER_STATE1_20)) { if ((this->actor.parent != NULL) && (this->stateFlags3 & PLAYER_STATE3_7)) { @@ -10669,19 +10669,22 @@ void func_80848EF8(Player* this) { } static s8 D_808547C4[] = { - PLAYER_CSMODE_NONE, PLAYER_CSMODE_3, PLAYER_CSMODE_3, PLAYER_CSMODE_5, PLAYER_CSMODE_4, PLAYER_CSMODE_8, - PLAYER_CSMODE_9, PLAYER_CSMODE_13, PLAYER_CSMODE_14, PLAYER_CSMODE_15, PLAYER_CSMODE_16, PLAYER_CSMODE_17, - PLAYER_CSMODE_18, -PLAYER_CSMODE_22, PLAYER_CSMODE_23, PLAYER_CSMODE_24, PLAYER_CSMODE_25, PLAYER_CSMODE_26, - PLAYER_CSMODE_27, PLAYER_CSMODE_28, PLAYER_CSMODE_29, PLAYER_CSMODE_31, PLAYER_CSMODE_32, PLAYER_CSMODE_33, - PLAYER_CSMODE_34, -PLAYER_CSMODE_35, PLAYER_CSMODE_30, PLAYER_CSMODE_36, PLAYER_CSMODE_38, -PLAYER_CSMODE_39, - -PLAYER_CSMODE_40, -PLAYER_CSMODE_41, PLAYER_CSMODE_42, PLAYER_CSMODE_43, PLAYER_CSMODE_45, PLAYER_CSMODE_46, - PLAYER_CSMODE_NONE, PLAYER_CSMODE_NONE, PLAYER_CSMODE_NONE, PLAYER_CSMODE_67, PLAYER_CSMODE_48, PLAYER_CSMODE_47, - -PLAYER_CSMODE_50, PLAYER_CSMODE_51, -PLAYER_CSMODE_52, -PLAYER_CSMODE_53, PLAYER_CSMODE_54, PLAYER_CSMODE_55, - PLAYER_CSMODE_56, PLAYER_CSMODE_57, PLAYER_CSMODE_58, PLAYER_CSMODE_59, PLAYER_CSMODE_60, PLAYER_CSMODE_61, - PLAYER_CSMODE_62, PLAYER_CSMODE_63, PLAYER_CSMODE_64, -PLAYER_CSMODE_65, -PLAYER_CSMODE_66, PLAYER_CSMODE_68, - PLAYER_CSMODE_11, PLAYER_CSMODE_69, PLAYER_CSMODE_70, PLAYER_CSMODE_71, PLAYER_CSMODE_8, PLAYER_CSMODE_8, - PLAYER_CSMODE_72, PLAYER_CSMODE_73, PLAYER_CSMODE_78, PLAYER_CSMODE_79, PLAYER_CSMODE_80, PLAYER_CSMODE_89, - PLAYER_CSMODE_90, PLAYER_CSMODE_91, PLAYER_CSMODE_92, PLAYER_CSMODE_77, PLAYER_CSMODE_19, PLAYER_CSMODE_94, + PLAYER_CSACTION_NONE, PLAYER_CSACTION_3, PLAYER_CSACTION_3, PLAYER_CSACTION_5, PLAYER_CSACTION_4, + PLAYER_CSACTION_8, PLAYER_CSACTION_9, PLAYER_CSACTION_13, PLAYER_CSACTION_14, PLAYER_CSACTION_15, + PLAYER_CSACTION_16, PLAYER_CSACTION_17, PLAYER_CSACTION_18, -PLAYER_CSACTION_22, PLAYER_CSACTION_23, + PLAYER_CSACTION_24, PLAYER_CSACTION_25, PLAYER_CSACTION_26, PLAYER_CSACTION_27, PLAYER_CSACTION_28, + PLAYER_CSACTION_29, PLAYER_CSACTION_31, PLAYER_CSACTION_32, PLAYER_CSACTION_33, PLAYER_CSACTION_34, + -PLAYER_CSACTION_35, PLAYER_CSACTION_30, PLAYER_CSACTION_36, PLAYER_CSACTION_38, -PLAYER_CSACTION_39, + -PLAYER_CSACTION_40, -PLAYER_CSACTION_41, PLAYER_CSACTION_42, PLAYER_CSACTION_43, PLAYER_CSACTION_45, + PLAYER_CSACTION_46, PLAYER_CSACTION_NONE, PLAYER_CSACTION_NONE, PLAYER_CSACTION_NONE, PLAYER_CSACTION_67, + PLAYER_CSACTION_48, PLAYER_CSACTION_47, -PLAYER_CSACTION_50, PLAYER_CSACTION_51, -PLAYER_CSACTION_52, + -PLAYER_CSACTION_53, PLAYER_CSACTION_54, PLAYER_CSACTION_55, PLAYER_CSACTION_56, PLAYER_CSACTION_57, + PLAYER_CSACTION_58, PLAYER_CSACTION_59, PLAYER_CSACTION_60, PLAYER_CSACTION_61, PLAYER_CSACTION_62, + PLAYER_CSACTION_63, PLAYER_CSACTION_64, -PLAYER_CSACTION_65, -PLAYER_CSACTION_66, PLAYER_CSACTION_68, + PLAYER_CSACTION_11, PLAYER_CSACTION_69, PLAYER_CSACTION_70, PLAYER_CSACTION_71, PLAYER_CSACTION_8, + PLAYER_CSACTION_8, PLAYER_CSACTION_72, PLAYER_CSACTION_73, PLAYER_CSACTION_78, PLAYER_CSACTION_79, + PLAYER_CSACTION_80, PLAYER_CSACTION_89, PLAYER_CSACTION_90, PLAYER_CSACTION_91, PLAYER_CSACTION_92, + PLAYER_CSACTION_77, PLAYER_CSACTION_19, PLAYER_CSACTION_94, }; static Vec3f D_80854814 = { 0.0f, 0.0f, 200.0f }; @@ -10947,30 +10950,30 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { } } - if ((play->csCtx.state != CS_STATE_IDLE) && (this->csMode != PLAYER_CSMODE_6) && + if ((play->csCtx.state != CS_STATE_IDLE) && (this->csAction != PLAYER_CSACTION_6) && !(this->stateFlags1 & PLAYER_STATE1_23) && !(this->stateFlags2 & PLAYER_STATE2_7) && (this->actor.category == ACTORCAT_PLAYER)) { CsCmdActorCue* cue = play->csCtx.playerCue; - if ((cue != NULL) && (D_808547C4[cue->id] != PLAYER_CSMODE_NONE)) { - func_8002DF54(play, NULL, PLAYER_CSMODE_6); + if ((cue != NULL) && (D_808547C4[cue->id] != PLAYER_CSACTION_NONE)) { + func_8002DF54(play, NULL, PLAYER_CSACTION_6); Player_ZeroSpeedXZ(this); - } else if ((this->csMode == PLAYER_CSMODE_NONE) && !(this->stateFlags2 & PLAYER_STATE2_10) && + } else if ((this->csAction == PLAYER_CSACTION_NONE) && !(this->stateFlags2 & PLAYER_STATE2_10) && (play->csCtx.state != CS_STATE_STOP)) { - func_8002DF54(play, NULL, PLAYER_CSMODE_49); + func_8002DF54(play, NULL, PLAYER_CSACTION_49); Player_ZeroSpeedXZ(this); } } - if (this->csMode != PLAYER_CSMODE_NONE) { - if ((this->csMode != PLAYER_CSMODE_7) || + if (this->csAction != PLAYER_CSACTION_NONE) { + if ((this->csAction != PLAYER_CSACTION_7) || !(this->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21 | PLAYER_STATE1_26))) { this->unk_6AD = 3; } else if (Player_Action_80852E14 != this->actionFunc) { func_80852944(play, this, NULL); } } else { - this->prevCsMode = PLAYER_CSMODE_NONE; + this->prevCsAction = PLAYER_CSACTION_NONE; } func_8083D6EC(play, this); @@ -11259,7 +11262,7 @@ void Player_Draw(Actor* thisx, PlayState* play2) { s32 lod; s32 pad; - if ((this->csMode != PLAYER_CSMODE_NONE) || (func_8008E9C4(this) && 0) || + if ((this->csAction != PLAYER_CSACTION_NONE) || (func_8008E9C4(this) && 0) || (this->actor.projectedPos.z < 160.0f)) { lod = 0; } else { @@ -11493,8 +11496,8 @@ void Player_Action_8084B1D8(Player* this, PlayState* play) { Player_UpdateUpperBody(this, play); } - if ((this->csMode != PLAYER_CSMODE_NONE) || (this->unk_6AD == 0) || (this->unk_6AD >= 4) || func_80833B54(this) || - (this->unk_664 != NULL) || !func_8083AD4C(play, this) || + if ((this->csAction != PLAYER_CSACTION_NONE) || (this->unk_6AD == 0) || (this->unk_6AD >= 4) || + func_80833B54(this) || (this->unk_664 != NULL) || !func_8083AD4C(play, this) || (((this->unk_6AD == 2) && (CHECK_BTN_ANY(sControlInput->press.button, BTN_A | BTN_B | BTN_R) || func_80833B2C(this) || (!func_8002DD78(this) && !func_808334B4(this)))) || ((this->unk_6AD == 1) && @@ -12273,9 +12276,9 @@ void Player_Action_8084CC98(Player* this, PlayState* play) { AnimationContext_SetCopyAll(play, this->skelAnime.limbCount, this->skelAnime.morphTable, this->skelAnime.jointTable); - if ((play->csCtx.state != CS_STATE_IDLE) || (this->csMode != PLAYER_CSMODE_NONE)) { - if (this->csMode == PLAYER_CSMODE_7) { - this->csMode = PLAYER_CSMODE_NONE; + if ((play->csCtx.state != CS_STATE_IDLE) || (this->csAction != PLAYER_CSACTION_NONE)) { + if (this->csAction == PLAYER_CSACTION_7) { + this->csAction = PLAYER_CSACTION_NONE; } this->unk_6AD = 0; this->actionVar1 = 0; @@ -12292,7 +12295,7 @@ void Player_Action_8084CC98(Player* this, PlayState* play) { this->yaw = this->actor.shape.rot.y = rideActor->actor.shape.rot.y; - if ((this->csMode != PLAYER_CSMODE_NONE) || + if ((this->csAction != PLAYER_CSACTION_NONE) || (!func_8083224C(play) && ((rideActor->actor.speed != 0.0f) || !func_8083B644(this, play)) && !func_8083C1DC(this, play))) { if (D_808535E0 == 0) { @@ -12350,7 +12353,7 @@ void Player_Action_8084CC98(Player* this, PlayState* play) { return; } - if ((this->csMode != PLAYER_CSMODE_NONE) || (!func_8084C9BC(this, play) && !func_8083B040(this, play))) { + if ((this->csAction != PLAYER_CSACTION_NONE) || (!func_8084C9BC(this, play) && !func_8083B040(this, play))) { if (this->unk_664 != NULL) { if (func_8002DD78(this) != 0) { this->unk_6BE = func_8083DB98(this, 1) - this->actor.shape.rot.y; @@ -12696,7 +12699,7 @@ s32 func_8084DFF4(PlayState* play, Player* this) { gSaveContext.nextCutsceneIndex = 0xFFF1; play->transitionType = TRANS_TYPE_SANDSTORM_END; this->stateFlags1 &= ~PLAYER_STATE1_29; - func_80852FFC(play, NULL, PLAYER_CSMODE_8); + func_80852FFC(play, NULL, PLAYER_CSACTION_8); } this->getItemId = GI_NONE; } @@ -12793,10 +12796,10 @@ void Player_Action_8084E3C4(Player* this, PlayState* play) { gSaveContext.respawn[RESPAWN_MODE_RETURN].playerParams = 0x5FF; gSaveContext.respawn[RESPAWN_MODE_RETURN].data = play->msgCtx.lastPlayedSong; - this->csMode = PLAYER_CSMODE_NONE; + this->csAction = PLAYER_CSACTION_NONE; this->stateFlags1 &= ~PLAYER_STATE1_29; - func_80852FFC(play, NULL, PLAYER_CSMODE_8); + func_80852FFC(play, NULL, PLAYER_CSACTION_8); play->mainCamera.stateFlags &= ~CAM_STATE_3; this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29; @@ -13897,216 +13900,216 @@ static struct_80832924 D_80854B14[] = { { 0, -0x300A }, }; -static struct_80854B18 D_80854B18[PLAYER_CSMODE_MAX] = { - { 0, NULL }, // PLAYER_CSMODE_NONE - { -1, func_808515A4 }, // PLAYER_CSMODE_1 - { 2, &gPlayerAnim_link_demo_goma_furimuki }, // PLAYER_CSMODE_2 - { 0, NULL }, // PLAYER_CSMODE_3 - { 0, NULL }, // PLAYER_CSMODE_4 - { 3, &gPlayerAnim_link_demo_bikkuri }, // PLAYER_CSMODE_5 - { 0, NULL }, // PLAYER_CSMODE_6 - { 0, NULL }, // PLAYER_CSMODE_7 - { -1, func_808515A4 }, // PLAYER_CSMODE_8 - { 2, &gPlayerAnim_link_demo_furimuki }, // PLAYER_CSMODE_9 - { -1, func_80851788 }, // PLAYER_CSMODE_10 - { 3, &gPlayerAnim_link_demo_warp }, // PLAYER_CSMODE_11 - { -1, func_808518DC }, // PLAYER_CSMODE_12 - { 7, &gPlayerAnim_clink_demo_get1 }, // PLAYER_CSMODE_13 - { 5, &gPlayerAnim_clink_demo_get2 }, // PLAYER_CSMODE_14 - { 5, &gPlayerAnim_clink_demo_get3 }, // PLAYER_CSMODE_15 - { 5, &gPlayerAnim_clink_demo_standup }, // PLAYER_CSMODE_16 - { 7, &gPlayerAnim_clink_demo_standup_wait }, // PLAYER_CSMODE_17 - { -1, func_808519EC }, // PLAYER_CSMODE_18 - { 2, &gPlayerAnim_link_demo_baru_op1 }, // PLAYER_CSMODE_19 - { 2, &gPlayerAnim_link_demo_baru_op3 }, // PLAYER_CSMODE_20 - { 0, NULL }, // PLAYER_CSMODE_21 - { -1, func_80851B90 }, // PLAYER_CSMODE_22 - { 3, &gPlayerAnim_link_demo_jibunmiru }, // PLAYER_CSMODE_23 - { 9, &gPlayerAnim_link_normal_back_downA }, // PLAYER_CSMODE_24 - { 2, &gPlayerAnim_link_normal_back_down_wake }, // PLAYER_CSMODE_25 - { -1, func_80851D2C }, // PLAYER_CSMODE_26 - { 2, &gPlayerAnim_link_normal_okarina_end }, // PLAYER_CSMODE_27 - { 3, &gPlayerAnim_link_demo_get_itemA }, // PLAYER_CSMODE_28 - { -1, func_808515A4 }, // PLAYER_CSMODE_29 - { 2, &gPlayerAnim_link_normal_normal2fighter_free }, // PLAYER_CSMODE_30 - { 0, NULL }, // PLAYER_CSMODE_31 - { 0, NULL }, // PLAYER_CSMODE_32 - { 5, &gPlayerAnim_clink_demo_atozusari }, // PLAYER_CSMODE_33 - { -1, func_80851368 }, // PLAYER_CSMODE_34 - { -1, func_80851E64 }, // PLAYER_CSMODE_35 - { 5, &gPlayerAnim_clink_demo_bashi }, // PLAYER_CSMODE_36 - { 16, &gPlayerAnim_link_normal_hang_up_down }, // PLAYER_CSMODE_37 - { -1, func_80851F84 }, // PLAYER_CSMODE_38 - { -1, func_80851E90 }, // PLAYER_CSMODE_39 - { 6, &gPlayerAnim_clink_op3_okiagari }, // PLAYER_CSMODE_40 - { 6, &gPlayerAnim_clink_op3_tatiagari }, // PLAYER_CSMODE_41 - { -1, func_80852080 }, // PLAYER_CSMODE_42 - { 5, &gPlayerAnim_clink_demo_miokuri }, // PLAYER_CSMODE_43 - { -1, func_808521F4 }, // PLAYER_CSMODE_44 - { -1, func_8085225C }, // PLAYER_CSMODE_45 - { -1, func_80852280 }, // PLAYER_CSMODE_46 - { 5, &gPlayerAnim_clink_demo_nozoki }, // PLAYER_CSMODE_47 - { 5, &gPlayerAnim_clink_demo_koutai }, // PLAYER_CSMODE_48 - { -1, func_808515A4 }, // PLAYER_CSMODE_49 - { 5, &gPlayerAnim_clink_demo_koutai_kennuki }, // PLAYER_CSMODE_50 - { 5, &gPlayerAnim_link_demo_kakeyori }, // PLAYER_CSMODE_51 - { 5, &gPlayerAnim_link_demo_kakeyori_mimawasi }, // PLAYER_CSMODE_52 - { 5, &gPlayerAnim_link_demo_kakeyori_miokuri }, // PLAYER_CSMODE_53 - { 3, &gPlayerAnim_link_demo_furimuki2 }, // PLAYER_CSMODE_54 - { 3, &gPlayerAnim_link_demo_kaoage }, // PLAYER_CSMODE_55 - { 4, &gPlayerAnim_link_demo_kaoage_wait }, // PLAYER_CSMODE_56 - { 3, &gPlayerAnim_clink_demo_mimawasi }, // PLAYER_CSMODE_57 - { 3, &gPlayerAnim_link_demo_nozokikomi }, // PLAYER_CSMODE_58 - { 6, &gPlayerAnim_kolink_odoroki_demo }, // PLAYER_CSMODE_59 - { 6, &gPlayerAnim_link_shagamu_demo }, // PLAYER_CSMODE_60 - { 14, &gPlayerAnim_link_okiru_demo }, // PLAYER_CSMODE_61 - { 3, &gPlayerAnim_link_okiru_demo }, // PLAYER_CSMODE_62 - { 5, &gPlayerAnim_link_fighter_power_kiru_start }, // PLAYER_CSMODE_63 - { 16, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSMODE_64 - { 15, &gPlayerAnim_demo_link_tewatashi }, // PLAYER_CSMODE_65 - { 15, &gPlayerAnim_demo_link_orosuu }, // PLAYER_CSMODE_66 - { 3, &gPlayerAnim_d_link_orooro }, // PLAYER_CSMODE_67 - { 3, &gPlayerAnim_d_link_imanodare }, // PLAYER_CSMODE_68 - { 3, &gPlayerAnim_link_hatto_demo }, // PLAYER_CSMODE_69 - { 6, &gPlayerAnim_o_get_mae }, // PLAYER_CSMODE_70 - { 6, &gPlayerAnim_o_get_ato }, // PLAYER_CSMODE_71 - { 6, &gPlayerAnim_om_get_mae }, // PLAYER_CSMODE_72 - { 6, &gPlayerAnim_nw_modoru }, // PLAYER_CSMODE_73 - { 3, &gPlayerAnim_link_demo_gurad }, // PLAYER_CSMODE_74 - { 3, &gPlayerAnim_link_demo_look_hand }, // PLAYER_CSMODE_75 - { 4, &gPlayerAnim_link_demo_sita_wait }, // PLAYER_CSMODE_76 - { 3, &gPlayerAnim_link_demo_ue }, // PLAYER_CSMODE_77 - { 3, &gPlayerAnim_Link_muku }, // PLAYER_CSMODE_78 - { 3, &gPlayerAnim_Link_miageru }, // PLAYER_CSMODE_79 - { 6, &gPlayerAnim_Link_ha }, // PLAYER_CSMODE_80 - { 3, &gPlayerAnim_L_1kyoro }, // PLAYER_CSMODE_81 - { 3, &gPlayerAnim_L_2kyoro }, // PLAYER_CSMODE_82 - { 3, &gPlayerAnim_L_sagaru }, // PLAYER_CSMODE_83 - { 3, &gPlayerAnim_L_bouzen }, // PLAYER_CSMODE_84 - { 3, &gPlayerAnim_L_kamaeru }, // PLAYER_CSMODE_85 - { 3, &gPlayerAnim_L_hajikareru }, // PLAYER_CSMODE_86 - { 3, &gPlayerAnim_L_ken_miru }, // PLAYER_CSMODE_87 - { 3, &gPlayerAnim_L_mukinaoru }, // PLAYER_CSMODE_88 - { -1, func_808524B0 }, // PLAYER_CSMODE_89 - { 3, &gPlayerAnim_link_wait_itemD1_20f }, // PLAYER_CSMODE_90 - { -1, func_80852544 }, // PLAYER_CSMODE_91 - { -1, func_80852564 }, // PLAYER_CSMODE_92 - { 3, &gPlayerAnim_link_normal_wait_typeB_20f }, // PLAYER_CSMODE_93 - { -1, func_80852608 }, // PLAYER_CSMODE_94 - { 3, &gPlayerAnim_link_demo_kousan }, // PLAYER_CSMODE_95 - { 3, &gPlayerAnim_link_demo_return_to_past }, // PLAYER_CSMODE_96 - { 3, &gPlayerAnim_link_last_hit_motion1 }, // PLAYER_CSMODE_97 - { 3, &gPlayerAnim_link_last_hit_motion2 }, // PLAYER_CSMODE_98 - { 3, &gPlayerAnim_link_demo_zeldamiru }, // PLAYER_CSMODE_99 - { 3, &gPlayerAnim_link_demo_kenmiru1 }, // PLAYER_CSMODE_100 - { 3, &gPlayerAnim_link_demo_kenmiru2 }, // PLAYER_CSMODE_101 - { 3, &gPlayerAnim_link_demo_kenmiru2_modori }, // PLAYER_CSMODE_102 +static struct_80854B18 D_80854B18[PLAYER_CSACTION_MAX] = { + { 0, NULL }, // PLAYER_CSACTION_NONE + { -1, func_808515A4 }, // PLAYER_CSACTION_1 + { 2, &gPlayerAnim_link_demo_goma_furimuki }, // PLAYER_CSACTION_2 + { 0, NULL }, // PLAYER_CSACTION_3 + { 0, NULL }, // PLAYER_CSACTION_4 + { 3, &gPlayerAnim_link_demo_bikkuri }, // PLAYER_CSACTION_5 + { 0, NULL }, // PLAYER_CSACTION_6 + { 0, NULL }, // PLAYER_CSACTION_7 + { -1, func_808515A4 }, // PLAYER_CSACTION_8 + { 2, &gPlayerAnim_link_demo_furimuki }, // PLAYER_CSACTION_9 + { -1, func_80851788 }, // PLAYER_CSACTION_10 + { 3, &gPlayerAnim_link_demo_warp }, // PLAYER_CSACTION_11 + { -1, func_808518DC }, // PLAYER_CSACTION_12 + { 7, &gPlayerAnim_clink_demo_get1 }, // PLAYER_CSACTION_13 + { 5, &gPlayerAnim_clink_demo_get2 }, // PLAYER_CSACTION_14 + { 5, &gPlayerAnim_clink_demo_get3 }, // PLAYER_CSACTION_15 + { 5, &gPlayerAnim_clink_demo_standup }, // PLAYER_CSACTION_16 + { 7, &gPlayerAnim_clink_demo_standup_wait }, // PLAYER_CSACTION_17 + { -1, func_808519EC }, // PLAYER_CSACTION_18 + { 2, &gPlayerAnim_link_demo_baru_op1 }, // PLAYER_CSACTION_19 + { 2, &gPlayerAnim_link_demo_baru_op3 }, // PLAYER_CSACTION_20 + { 0, NULL }, // PLAYER_CSACTION_21 + { -1, func_80851B90 }, // PLAYER_CSACTION_22 + { 3, &gPlayerAnim_link_demo_jibunmiru }, // PLAYER_CSACTION_23 + { 9, &gPlayerAnim_link_normal_back_downA }, // PLAYER_CSACTION_24 + { 2, &gPlayerAnim_link_normal_back_down_wake }, // PLAYER_CSACTION_25 + { -1, func_80851D2C }, // PLAYER_CSACTION_26 + { 2, &gPlayerAnim_link_normal_okarina_end }, // PLAYER_CSACTION_27 + { 3, &gPlayerAnim_link_demo_get_itemA }, // PLAYER_CSACTION_28 + { -1, func_808515A4 }, // PLAYER_CSACTION_29 + { 2, &gPlayerAnim_link_normal_normal2fighter_free }, // PLAYER_CSACTION_30 + { 0, NULL }, // PLAYER_CSACTION_31 + { 0, NULL }, // PLAYER_CSACTION_32 + { 5, &gPlayerAnim_clink_demo_atozusari }, // PLAYER_CSACTION_33 + { -1, func_80851368 }, // PLAYER_CSACTION_34 + { -1, func_80851E64 }, // PLAYER_CSACTION_35 + { 5, &gPlayerAnim_clink_demo_bashi }, // PLAYER_CSACTION_36 + { 16, &gPlayerAnim_link_normal_hang_up_down }, // PLAYER_CSACTION_37 + { -1, func_80851F84 }, // PLAYER_CSACTION_38 + { -1, func_80851E90 }, // PLAYER_CSACTION_39 + { 6, &gPlayerAnim_clink_op3_okiagari }, // PLAYER_CSACTION_40 + { 6, &gPlayerAnim_clink_op3_tatiagari }, // PLAYER_CSACTION_41 + { -1, func_80852080 }, // PLAYER_CSACTION_42 + { 5, &gPlayerAnim_clink_demo_miokuri }, // PLAYER_CSACTION_43 + { -1, func_808521F4 }, // PLAYER_CSACTION_44 + { -1, func_8085225C }, // PLAYER_CSACTION_45 + { -1, func_80852280 }, // PLAYER_CSACTION_46 + { 5, &gPlayerAnim_clink_demo_nozoki }, // PLAYER_CSACTION_47 + { 5, &gPlayerAnim_clink_demo_koutai }, // PLAYER_CSACTION_48 + { -1, func_808515A4 }, // PLAYER_CSACTION_49 + { 5, &gPlayerAnim_clink_demo_koutai_kennuki }, // PLAYER_CSACTION_50 + { 5, &gPlayerAnim_link_demo_kakeyori }, // PLAYER_CSACTION_51 + { 5, &gPlayerAnim_link_demo_kakeyori_mimawasi }, // PLAYER_CSACTION_52 + { 5, &gPlayerAnim_link_demo_kakeyori_miokuri }, // PLAYER_CSACTION_53 + { 3, &gPlayerAnim_link_demo_furimuki2 }, // PLAYER_CSACTION_54 + { 3, &gPlayerAnim_link_demo_kaoage }, // PLAYER_CSACTION_55 + { 4, &gPlayerAnim_link_demo_kaoage_wait }, // PLAYER_CSACTION_56 + { 3, &gPlayerAnim_clink_demo_mimawasi }, // PLAYER_CSACTION_57 + { 3, &gPlayerAnim_link_demo_nozokikomi }, // PLAYER_CSACTION_58 + { 6, &gPlayerAnim_kolink_odoroki_demo }, // PLAYER_CSACTION_59 + { 6, &gPlayerAnim_link_shagamu_demo }, // PLAYER_CSACTION_60 + { 14, &gPlayerAnim_link_okiru_demo }, // PLAYER_CSACTION_61 + { 3, &gPlayerAnim_link_okiru_demo }, // PLAYER_CSACTION_62 + { 5, &gPlayerAnim_link_fighter_power_kiru_start }, // PLAYER_CSACTION_63 + { 16, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_64 + { 15, &gPlayerAnim_demo_link_tewatashi }, // PLAYER_CSACTION_65 + { 15, &gPlayerAnim_demo_link_orosuu }, // PLAYER_CSACTION_66 + { 3, &gPlayerAnim_d_link_orooro }, // PLAYER_CSACTION_67 + { 3, &gPlayerAnim_d_link_imanodare }, // PLAYER_CSACTION_68 + { 3, &gPlayerAnim_link_hatto_demo }, // PLAYER_CSACTION_69 + { 6, &gPlayerAnim_o_get_mae }, // PLAYER_CSACTION_70 + { 6, &gPlayerAnim_o_get_ato }, // PLAYER_CSACTION_71 + { 6, &gPlayerAnim_om_get_mae }, // PLAYER_CSACTION_72 + { 6, &gPlayerAnim_nw_modoru }, // PLAYER_CSACTION_73 + { 3, &gPlayerAnim_link_demo_gurad }, // PLAYER_CSACTION_74 + { 3, &gPlayerAnim_link_demo_look_hand }, // PLAYER_CSACTION_75 + { 4, &gPlayerAnim_link_demo_sita_wait }, // PLAYER_CSACTION_76 + { 3, &gPlayerAnim_link_demo_ue }, // PLAYER_CSACTION_77 + { 3, &gPlayerAnim_Link_muku }, // PLAYER_CSACTION_78 + { 3, &gPlayerAnim_Link_miageru }, // PLAYER_CSACTION_79 + { 6, &gPlayerAnim_Link_ha }, // PLAYER_CSACTION_80 + { 3, &gPlayerAnim_L_1kyoro }, // PLAYER_CSACTION_81 + { 3, &gPlayerAnim_L_2kyoro }, // PLAYER_CSACTION_82 + { 3, &gPlayerAnim_L_sagaru }, // PLAYER_CSACTION_83 + { 3, &gPlayerAnim_L_bouzen }, // PLAYER_CSACTION_84 + { 3, &gPlayerAnim_L_kamaeru }, // PLAYER_CSACTION_85 + { 3, &gPlayerAnim_L_hajikareru }, // PLAYER_CSACTION_86 + { 3, &gPlayerAnim_L_ken_miru }, // PLAYER_CSACTION_87 + { 3, &gPlayerAnim_L_mukinaoru }, // PLAYER_CSACTION_88 + { -1, func_808524B0 }, // PLAYER_CSACTION_89 + { 3, &gPlayerAnim_link_wait_itemD1_20f }, // PLAYER_CSACTION_90 + { -1, func_80852544 }, // PLAYER_CSACTION_91 + { -1, func_80852564 }, // PLAYER_CSACTION_92 + { 3, &gPlayerAnim_link_normal_wait_typeB_20f }, // PLAYER_CSACTION_93 + { -1, func_80852608 }, // PLAYER_CSACTION_94 + { 3, &gPlayerAnim_link_demo_kousan }, // PLAYER_CSACTION_95 + { 3, &gPlayerAnim_link_demo_return_to_past }, // PLAYER_CSACTION_96 + { 3, &gPlayerAnim_link_last_hit_motion1 }, // PLAYER_CSACTION_97 + { 3, &gPlayerAnim_link_last_hit_motion2 }, // PLAYER_CSACTION_98 + { 3, &gPlayerAnim_link_demo_zeldamiru }, // PLAYER_CSACTION_99 + { 3, &gPlayerAnim_link_demo_kenmiru1 }, // PLAYER_CSACTION_100 + { 3, &gPlayerAnim_link_demo_kenmiru2 }, // PLAYER_CSACTION_101 + { 3, &gPlayerAnim_link_demo_kenmiru2_modori }, // PLAYER_CSACTION_102 }; -static struct_80854B18 D_80854E50[PLAYER_CSMODE_MAX] = { - { 0, NULL }, // PLAYER_CSMODE_NONE - { -1, func_808514C0 }, // PLAYER_CSMODE_1 - { -1, func_8085157C }, // PLAYER_CSMODE_2 - { -1, func_80851998 }, // PLAYER_CSMODE_3 - { -1, func_808519C0 }, // PLAYER_CSMODE_4 - { 11, NULL }, // PLAYER_CSMODE_5 - { -1, func_80852C50 }, // PLAYER_CSMODE_6 - { -1, func_80852944 }, // PLAYER_CSMODE_7 - { -1, func_80851688 }, // PLAYER_CSMODE_8 - { -1, func_80851750 }, // PLAYER_CSMODE_9 - { -1, func_80851828 }, // PLAYER_CSMODE_10 - { -1, func_808521B8 }, // PLAYER_CSMODE_11 - { -1, func_8085190C }, // PLAYER_CSMODE_12 - { 11, NULL }, // PLAYER_CSMODE_13 - { 11, NULL }, // PLAYER_CSMODE_14 - { 11, NULL }, // PLAYER_CSMODE_15 - { 18, D_80854AF0 }, // PLAYER_CSMODE_16 - { 11, NULL }, // PLAYER_CSMODE_17 - { -1, func_80851A50 }, // PLAYER_CSMODE_18 - { 12, &gPlayerAnim_link_demo_baru_op2 }, // PLAYER_CSMODE_19 - { 11, NULL }, // PLAYER_CSMODE_20 - { 0, NULL }, // PLAYER_CSMODE_21 - { -1, func_80851BE8 }, // PLAYER_CSMODE_22 - { 11, NULL }, // PLAYER_CSMODE_23 - { -1, func_80851CA4 }, // PLAYER_CSMODE_24 - { 11, NULL }, // PLAYER_CSMODE_25 - { 17, &gPlayerAnim_link_normal_okarina_swing }, // PLAYER_CSMODE_26 - { 11, NULL }, // PLAYER_CSMODE_27 - { 11, NULL }, // PLAYER_CSMODE_28 - { 11, NULL }, // PLAYER_CSMODE_29 - { -1, func_80851D80 }, // PLAYER_CSMODE_30 - { -1, func_80851DEC }, // PLAYER_CSMODE_31 - { -1, func_80851E28 }, // PLAYER_CSMODE_32 - { 18, D_80854B00 }, // PLAYER_CSMODE_33 - { -1, func_808513BC }, // PLAYER_CSMODE_34 - { 11, NULL }, // PLAYER_CSMODE_35 - { 11, NULL }, // PLAYER_CSMODE_36 - { 11, NULL }, // PLAYER_CSMODE_37 - { 11, NULL }, // PLAYER_CSMODE_38 - { -1, func_80851ECC }, // PLAYER_CSMODE_39 - { -1, func_80851FB0 }, // PLAYER_CSMODE_40 - { -1, func_80852048 }, // PLAYER_CSMODE_41 - { -1, func_80852174 }, // PLAYER_CSMODE_42 - { 13, &gPlayerAnim_clink_demo_miokuri_wait }, // PLAYER_CSMODE_43 - { -1, func_80852234 }, // PLAYER_CSMODE_44 - { 0, NULL }, // PLAYER_CSMODE_45 - { 0, NULL }, // PLAYER_CSMODE_46 - { 11, NULL }, // PLAYER_CSMODE_47 - { -1, func_80852450 }, // PLAYER_CSMODE_48 - { -1, func_80851688 }, // PLAYER_CSMODE_49 - { -1, func_80852298 }, // PLAYER_CSMODE_50 - { 13, &gPlayerAnim_link_demo_kakeyori_wait }, // PLAYER_CSMODE_51 - { -1, func_80852480 }, // PLAYER_CSMODE_52 - { 13, &gPlayerAnim_link_demo_kakeyori_miokuri_wait }, // PLAYER_CSMODE_53 - { -1, func_80852328 }, // PLAYER_CSMODE_54 - { 11, NULL }, // PLAYER_CSMODE_55 - { 11, NULL }, // PLAYER_CSMODE_56 - { 12, &gPlayerAnim_clink_demo_mimawasi_wait }, // PLAYER_CSMODE_57 - { -1, func_80852358 }, // PLAYER_CSMODE_58 - { 11, NULL }, // PLAYER_CSMODE_59 - { 18, D_80854B14 }, // PLAYER_CSMODE_60 - { 11, NULL }, // PLAYER_CSMODE_61 - { 11, NULL }, // PLAYER_CSMODE_62 - { 11, NULL }, // PLAYER_CSMODE_63 - { 11, NULL }, // PLAYER_CSMODE_64 - { -1, func_80852388 }, // PLAYER_CSMODE_65 - { 17, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSMODE_66 - { 12, &gPlayerAnim_d_link_orowait }, // PLAYER_CSMODE_67 - { 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSMODE_68 - { 11, NULL }, // PLAYER_CSMODE_69 - { -1, func_808526EC }, // PLAYER_CSMODE_70 - { 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSMODE_71 - { -1, func_808526EC }, // PLAYER_CSMODE_72 - { 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSMODE_73 - { 12, &gPlayerAnim_link_demo_gurad_wait }, // PLAYER_CSMODE_74 - { 12, &gPlayerAnim_link_demo_look_hand_wait }, // PLAYER_CSMODE_75 - { 11, NULL }, // PLAYER_CSMODE_76 - { 12, &gPlayerAnim_link_demo_ue_wait }, // PLAYER_CSMODE_77 - { 12, &gPlayerAnim_Link_m_wait }, // PLAYER_CSMODE_78 - { 13, &gPlayerAnim_Link_ue_wait }, // PLAYER_CSMODE_79 - { 12, &gPlayerAnim_Link_otituku_w }, // PLAYER_CSMODE_80 - { 12, &gPlayerAnim_L_kw }, // PLAYER_CSMODE_81 - { 11, NULL }, // PLAYER_CSMODE_82 - { 11, NULL }, // PLAYER_CSMODE_83 - { 11, NULL }, // PLAYER_CSMODE_84 - { 11, NULL }, // PLAYER_CSMODE_85 - { -1, func_80852648 }, // PLAYER_CSMODE_86 - { 11, NULL }, // PLAYER_CSMODE_87 - { 12, &gPlayerAnim_L_kennasi_w }, // PLAYER_CSMODE_88 - { -1, func_808524D0 }, // PLAYER_CSMODE_89 - { -1, func_80852514 }, // PLAYER_CSMODE_90 - { -1, func_80852554 }, // PLAYER_CSMODE_91 - { -1, func_808525C0 }, // PLAYER_CSMODE_92 - { 11, NULL }, // PLAYER_CSMODE_93 - { 11, NULL }, // PLAYER_CSMODE_94 - { 11, NULL }, // PLAYER_CSMODE_95 - { -1, func_8085283C }, // PLAYER_CSMODE_96 - { -1, func_808528C8 }, // PLAYER_CSMODE_97 - { -1, func_808528C8 }, // PLAYER_CSMODE_98 - { 12, &gPlayerAnim_link_demo_zeldamiru_wait }, // PLAYER_CSMODE_99 - { 12, &gPlayerAnim_link_demo_kenmiru1_wait }, // PLAYER_CSMODE_100 - { 12, &gPlayerAnim_link_demo_kenmiru2_wait }, // PLAYER_CSMODE_101 - { 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSMODE_102 +static struct_80854B18 D_80854E50[PLAYER_CSACTION_MAX] = { + { 0, NULL }, // PLAYER_CSACTION_NONE + { -1, func_808514C0 }, // PLAYER_CSACTION_1 + { -1, func_8085157C }, // PLAYER_CSACTION_2 + { -1, func_80851998 }, // PLAYER_CSACTION_3 + { -1, func_808519C0 }, // PLAYER_CSACTION_4 + { 11, NULL }, // PLAYER_CSACTION_5 + { -1, func_80852C50 }, // PLAYER_CSACTION_6 + { -1, func_80852944 }, // PLAYER_CSACTION_7 + { -1, func_80851688 }, // PLAYER_CSACTION_8 + { -1, func_80851750 }, // PLAYER_CSACTION_9 + { -1, func_80851828 }, // PLAYER_CSACTION_10 + { -1, func_808521B8 }, // PLAYER_CSACTION_11 + { -1, func_8085190C }, // PLAYER_CSACTION_12 + { 11, NULL }, // PLAYER_CSACTION_13 + { 11, NULL }, // PLAYER_CSACTION_14 + { 11, NULL }, // PLAYER_CSACTION_15 + { 18, D_80854AF0 }, // PLAYER_CSACTION_16 + { 11, NULL }, // PLAYER_CSACTION_17 + { -1, func_80851A50 }, // PLAYER_CSACTION_18 + { 12, &gPlayerAnim_link_demo_baru_op2 }, // PLAYER_CSACTION_19 + { 11, NULL }, // PLAYER_CSACTION_20 + { 0, NULL }, // PLAYER_CSACTION_21 + { -1, func_80851BE8 }, // PLAYER_CSACTION_22 + { 11, NULL }, // PLAYER_CSACTION_23 + { -1, func_80851CA4 }, // PLAYER_CSACTION_24 + { 11, NULL }, // PLAYER_CSACTION_25 + { 17, &gPlayerAnim_link_normal_okarina_swing }, // PLAYER_CSACTION_26 + { 11, NULL }, // PLAYER_CSACTION_27 + { 11, NULL }, // PLAYER_CSACTION_28 + { 11, NULL }, // PLAYER_CSACTION_29 + { -1, func_80851D80 }, // PLAYER_CSACTION_30 + { -1, func_80851DEC }, // PLAYER_CSACTION_31 + { -1, func_80851E28 }, // PLAYER_CSACTION_32 + { 18, D_80854B00 }, // PLAYER_CSACTION_33 + { -1, func_808513BC }, // PLAYER_CSACTION_34 + { 11, NULL }, // PLAYER_CSACTION_35 + { 11, NULL }, // PLAYER_CSACTION_36 + { 11, NULL }, // PLAYER_CSACTION_37 + { 11, NULL }, // PLAYER_CSACTION_38 + { -1, func_80851ECC }, // PLAYER_CSACTION_39 + { -1, func_80851FB0 }, // PLAYER_CSACTION_40 + { -1, func_80852048 }, // PLAYER_CSACTION_41 + { -1, func_80852174 }, // PLAYER_CSACTION_42 + { 13, &gPlayerAnim_clink_demo_miokuri_wait }, // PLAYER_CSACTION_43 + { -1, func_80852234 }, // PLAYER_CSACTION_44 + { 0, NULL }, // PLAYER_CSACTION_45 + { 0, NULL }, // PLAYER_CSACTION_46 + { 11, NULL }, // PLAYER_CSACTION_47 + { -1, func_80852450 }, // PLAYER_CSACTION_48 + { -1, func_80851688 }, // PLAYER_CSACTION_49 + { -1, func_80852298 }, // PLAYER_CSACTION_50 + { 13, &gPlayerAnim_link_demo_kakeyori_wait }, // PLAYER_CSACTION_51 + { -1, func_80852480 }, // PLAYER_CSACTION_52 + { 13, &gPlayerAnim_link_demo_kakeyori_miokuri_wait }, // PLAYER_CSACTION_53 + { -1, func_80852328 }, // PLAYER_CSACTION_54 + { 11, NULL }, // PLAYER_CSACTION_55 + { 11, NULL }, // PLAYER_CSACTION_56 + { 12, &gPlayerAnim_clink_demo_mimawasi_wait }, // PLAYER_CSACTION_57 + { -1, func_80852358 }, // PLAYER_CSACTION_58 + { 11, NULL }, // PLAYER_CSACTION_59 + { 18, D_80854B14 }, // PLAYER_CSACTION_60 + { 11, NULL }, // PLAYER_CSACTION_61 + { 11, NULL }, // PLAYER_CSACTION_62 + { 11, NULL }, // PLAYER_CSACTION_63 + { 11, NULL }, // PLAYER_CSACTION_64 + { -1, func_80852388 }, // PLAYER_CSACTION_65 + { 17, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_66 + { 12, &gPlayerAnim_d_link_orowait }, // PLAYER_CSACTION_67 + { 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_68 + { 11, NULL }, // PLAYER_CSACTION_69 + { -1, func_808526EC }, // PLAYER_CSACTION_70 + { 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSACTION_71 + { -1, func_808526EC }, // PLAYER_CSACTION_72 + { 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSACTION_73 + { 12, &gPlayerAnim_link_demo_gurad_wait }, // PLAYER_CSACTION_74 + { 12, &gPlayerAnim_link_demo_look_hand_wait }, // PLAYER_CSACTION_75 + { 11, NULL }, // PLAYER_CSACTION_76 + { 12, &gPlayerAnim_link_demo_ue_wait }, // PLAYER_CSACTION_77 + { 12, &gPlayerAnim_Link_m_wait }, // PLAYER_CSACTION_78 + { 13, &gPlayerAnim_Link_ue_wait }, // PLAYER_CSACTION_79 + { 12, &gPlayerAnim_Link_otituku_w }, // PLAYER_CSACTION_80 + { 12, &gPlayerAnim_L_kw }, // PLAYER_CSACTION_81 + { 11, NULL }, // PLAYER_CSACTION_82 + { 11, NULL }, // PLAYER_CSACTION_83 + { 11, NULL }, // PLAYER_CSACTION_84 + { 11, NULL }, // PLAYER_CSACTION_85 + { -1, func_80852648 }, // PLAYER_CSACTION_86 + { 11, NULL }, // PLAYER_CSACTION_87 + { 12, &gPlayerAnim_L_kennasi_w }, // PLAYER_CSACTION_88 + { -1, func_808524D0 }, // PLAYER_CSACTION_89 + { -1, func_80852514 }, // PLAYER_CSACTION_90 + { -1, func_80852554 }, // PLAYER_CSACTION_91 + { -1, func_808525C0 }, // PLAYER_CSACTION_92 + { 11, NULL }, // PLAYER_CSACTION_93 + { 11, NULL }, // PLAYER_CSACTION_94 + { 11, NULL }, // PLAYER_CSACTION_95 + { -1, func_8085283C }, // PLAYER_CSACTION_96 + { -1, func_808528C8 }, // PLAYER_CSACTION_97 + { -1, func_808528C8 }, // PLAYER_CSACTION_98 + { 12, &gPlayerAnim_link_demo_zeldamiru_wait }, // PLAYER_CSACTION_99 + { 12, &gPlayerAnim_link_demo_kenmiru1_wait }, // PLAYER_CSACTION_100 + { 12, &gPlayerAnim_link_demo_kenmiru2_wait }, // PLAYER_CSACTION_101 + { 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_102 }; void Player_AnimChangeOnceMorphZeroRootYawSpeed(PlayState* play, Player* this, LinkAnimationHeader* anim) { @@ -14307,8 +14310,8 @@ void func_808515A4(PlayState* play, Player* this, CsCmdActorCue* cue) { void func_80851688(PlayState* play, Player* this, CsCmdActorCue* cue) { if (func_8084B3CC(play, this) == 0) { - if ((this->csMode == PLAYER_CSMODE_49) && (play->csCtx.state == CS_STATE_IDLE)) { - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + if ((this->csAction == PLAYER_CSACTION_49) && (play->csCtx.state == CS_STATE_IDLE)) { + func_8002DF54(play, NULL, PLAYER_CSACTION_7); return; } @@ -14367,7 +14370,7 @@ void func_80851828(PlayState* play, Player* this, CsCmdActorCue* cue) { this->actionVar2++; if (this->actionVar2 > 20) { - this->csMode = PLAYER_CSMODE_11; + this->csAction = PLAYER_CSACTION_11; } } @@ -14837,7 +14840,7 @@ void func_80852944(PlayState* play, Player* this, CsCmdActorCue* cue) { } } - this->csMode = PLAYER_CSMODE_NONE; + this->csAction = PLAYER_CSACTION_NONE; this->unk_6AD = 0; } @@ -14881,9 +14884,9 @@ void func_80852B4C(PlayState* play, Player* this, CsCmdActorCue* cue, struct_808 } } -void func_80852C0C(PlayState* play, Player* this, s32 csMode) { - if ((csMode != PLAYER_CSMODE_1) && (csMode != PLAYER_CSMODE_8) && (csMode != PLAYER_CSMODE_49) && - (csMode != PLAYER_CSMODE_7)) { +void func_80852C0C(PlayState* play, Player* this, s32 csAction) { + if ((csAction != PLAYER_CSACTION_1) && (csAction != PLAYER_CSACTION_8) && (csAction != PLAYER_CSACTION_49) && + (csAction != PLAYER_CSACTION_7)) { Player_DetachHeldActor(play, this); } } @@ -14891,10 +14894,10 @@ void func_80852C0C(PlayState* play, Player* this, s32 csMode) { void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cueUnused) { CsCmdActorCue* cue = play->csCtx.playerCue; s32 pad; - s32 csMode; + s32 csAction; if (play->csCtx.state == CS_STATE_STOP) { - func_8002DF54(play, NULL, PLAYER_CSMODE_7); + func_8002DF54(play, NULL, PLAYER_CSACTION_7); this->cueId = 0; Player_ZeroSpeedXZ(this); return; @@ -14906,10 +14909,10 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cueUnused) { } if (this->cueId != cue->id) { - csMode = D_808547C4[cue->id]; + csAction = D_808547C4[cue->id]; - if (csMode >= PLAYER_CSMODE_NONE) { - if ((csMode == PLAYER_CSMODE_3) || (csMode == PLAYER_CSMODE_4)) { + if (csAction >= PLAYER_CSACTION_NONE) { + if ((csAction == PLAYER_CSACTION_3) || (csAction == PLAYER_CSACTION_4)) { func_80852A54(play, this, cue); } else { func_808529D0(play, this, cue); @@ -14919,31 +14922,31 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cueUnused) { D_80858AA0 = this->skelAnime.moveFlags; func_80832DBC(this); - osSyncPrintf("TOOL MODE=%d\n", csMode); - func_80852C0C(play, this, ABS(csMode)); - func_80852B4C(play, this, cue, &D_80854B18[ABS(csMode)]); + osSyncPrintf("TOOL MODE=%d\n", csAction); + func_80852C0C(play, this, ABS(csAction)); + func_80852B4C(play, this, cue, &D_80854B18[ABS(csAction)]); this->actionVar2 = 0; this->actionVar1 = 0; this->cueId = cue->id; } - csMode = D_808547C4[this->cueId]; - func_80852B4C(play, this, cue, &D_80854E50[ABS(csMode)]); + csAction = D_808547C4[this->cueId]; + func_80852B4C(play, this, cue, &D_80854E50[ABS(csAction)]); } void Player_Action_80852E14(Player* this, PlayState* play) { - if (this->csMode != this->prevCsMode) { + if (this->csAction != this->prevCsAction) { D_80858AA0 = this->skelAnime.moveFlags; func_80832DBC(this); - this->prevCsMode = this->csMode; - osSyncPrintf("DEMO MODE=%d\n", this->csMode); - func_80852C0C(play, this, this->csMode); - func_80852B4C(play, this, NULL, &D_80854B18[this->csMode]); + this->prevCsAction = this->csAction; + osSyncPrintf("DEMO MODE=%d\n", this->csAction); + func_80852C0C(play, this, this->csAction); + func_80852B4C(play, this, NULL, &D_80854B18[this->csAction]); } - func_80852B4C(play, this, NULL, &D_80854E50[this->csMode]); + func_80852B4C(play, this, NULL, &D_80854E50[this->csAction]); } s32 Player_IsDroppingFish(PlayState* play) { @@ -14976,13 +14979,13 @@ s32 func_80852F38(PlayState* play, Player* this) { } // Sets up player cutscene -s32 func_80852FFC(PlayState* play, Actor* actor, s32 csMode) { +s32 func_80852FFC(PlayState* play, Actor* actor, s32 csAction) { Player* this = GET_PLAYER(play); if (!Player_InBlockingCsMode(play, this)) { func_80832564(play, this); Player_SetupAction(play, this, Player_Action_80852E14, 0); - this->csMode = csMode; + this->csAction = csAction; this->unk_448 = actor; func_80832224(this); return 1; @@ -15022,7 +15025,7 @@ void func_80853148(PlayState* play, Actor* actor) { this->exchangeItemId = EXCH_ITEM_NONE; if (actor->textId == 0xFFFF) { - func_8002DF54(play, actor, PLAYER_CSMODE_1); + func_8002DF54(play, actor, PLAYER_CSACTION_1); actor->flags |= ACTOR_FLAG_8; func_80832528(play, this); } else { From c5e4357127fa9432213c1c758c020691e98a1171 Mon Sep 17 00:00:00 2001 From: fig02 Date: Wed, 27 Sep 2023 11:02:21 -0400 Subject: [PATCH 05/16] initial action-change-list docs (#1540) --- .../actors/ovl_player_actor/z_player.c | 288 ++++++++++++------ 1 file changed, 195 insertions(+), 93 deletions(-) diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index b224e07c6b..a7d9c45e6b 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -144,23 +144,10 @@ s32 func_80835B60(Player* this, PlayState* play); s32 func_80835C08(Player* this, PlayState* play); void Player_UseItem(PlayState* play, Player* this, s32 item); void func_80839F90(Player* this, PlayState* play); -s32 func_80838A14(Player* this, PlayState* play); -s32 func_80839800(Player* this, PlayState* play); -s32 func_8083B040(Player* this, PlayState* play); -s32 func_8083B998(Player* this, PlayState* play); -s32 func_8083B644(Player* this, PlayState* play); -s32 func_8083BDBC(Player* this, PlayState* play); -s32 func_8083C1DC(Player* this, PlayState* play); -s32 func_8083C2B0(Player* this, PlayState* play); -s32 func_8083C544(Player* this, PlayState* play); s32 func_8083C61C(PlayState* play, Player* this); void func_8083CA20(PlayState* play, Player* this); void func_8083CA54(PlayState* play, Player* this); void func_8083CA9C(PlayState* play, Player* this); -s32 func_8083E0FC(Player* this, PlayState* play); -s32 func_8083E5A8(Player* this, PlayState* play); -s32 func_8083EB44(Player* this, PlayState* play); -s32 func_8083F7BC(Player* this, PlayState* play); void func_80846648(PlayState* play, Player* this); void func_80846660(PlayState* play, Player* this); void func_808467D4(PlayState* play, Player* this); @@ -173,7 +160,6 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input); s32 func_8084FCAC(Player* this, PlayState* play); void func_8084FF7C(Player* this); void Player_UpdateBunnyEars(Player* this); -s32 func_80850224(Player* this, PlayState* play); void func_80851008(PlayState* play, Player* this, void* anim); void func_80851030(PlayState* play, Player* this, void* anim); void func_80851050(PlayState* play, Player* this, void* anim); @@ -3671,55 +3657,168 @@ s32 Player_GetMovementSpeedAndYaw(Player* this, f32* outSpeedTarget, s16* outYaw } } -static s8 D_808543E0[] = { 13, 2, 4, 9, 10, 11, 8, -7 }; -static s8 D_808543E8[] = { 13, 1, 2, 5, 3, 4, 9, 10, 11, 7, 8, -6 }; -static s8 D_808543F4[] = { 13, 1, 2, 3, 4, 9, 10, 11, 8, 7, -6 }; -static s8 D_80854400[] = { 13, 2, 4, 9, 10, 11, 8, -7 }; -static s8 D_80854408[] = { 13, 2, 4, 9, 10, 11, 12, 8, -7 }; -static s8 D_80854414[] = { -7 }; -static s8 D_80854418[] = { 0, 11, 1, 2, 3, 5, 4, 9, 8, 7, -6 }; -static s8 D_80854424[] = { 0, 11, 1, 2, 3, 12, 5, 4, 9, 8, 7, -6 }; -static s8 D_80854430[] = { 13, 1, 2, 3, 12, 5, 4, 9, 10, 11, 8, 7, -6 }; -static s8 D_80854440[] = { 10, 8, -7 }; -static s8 D_80854444[] = { 0, 12, 5, -4 }; +typedef enum { + /* 0 */ PLAYER_ACTION_CHG_0, + /* 1 */ PLAYER_ACTION_CHG_1, + /* 2 */ PLAYER_ACTION_CHG_2, + /* 3 */ PLAYER_ACTION_CHG_3, + /* 4 */ PLAYER_ACTION_CHG_4, + /* 5 */ PLAYER_ACTION_CHG_5, + /* 6 */ PLAYER_ACTION_CHG_6, + /* 7 */ PLAYER_ACTION_CHG_7, + /* 8 */ PLAYER_ACTION_CHG_8, + /* 9 */ PLAYER_ACTION_CHG_9, + /* 10 */ PLAYER_ACTION_CHG_10, + /* 11 */ PLAYER_ACTION_CHG_11, + /* 12 */ PLAYER_ACTION_CHG_12, + /* 13 */ PLAYER_ACTION_CHG_13 +} ActionChangeIndex; -static s32 (*D_80854448[])(Player* this, PlayState* play) = { - func_8083B998, func_80839800, func_8083E5A8, func_8083E0FC, func_8083B644, func_8083F7BC, func_8083C1DC, - func_80850224, func_8083C544, func_8083EB44, func_8083BDBC, func_8083C2B0, func_80838A14, func_8083B040, +static s8 sActionChangeList1[] = { + PLAYER_ACTION_CHG_13, PLAYER_ACTION_CHG_2, PLAYER_ACTION_CHG_4, PLAYER_ACTION_CHG_9, + PLAYER_ACTION_CHG_10, PLAYER_ACTION_CHG_11, PLAYER_ACTION_CHG_8, -PLAYER_ACTION_CHG_7, }; -s32 func_80837348(PlayState* play, Player* this, s8* arg2, s32 arg3) { +static s8 sActionChangeList2[] = { + PLAYER_ACTION_CHG_13, PLAYER_ACTION_CHG_1, PLAYER_ACTION_CHG_2, PLAYER_ACTION_CHG_5, + PLAYER_ACTION_CHG_3, PLAYER_ACTION_CHG_4, PLAYER_ACTION_CHG_9, PLAYER_ACTION_CHG_10, + PLAYER_ACTION_CHG_11, PLAYER_ACTION_CHG_7, PLAYER_ACTION_CHG_8, -PLAYER_ACTION_CHG_6, +}; + +static s8 sActionChangeList3[] = { + PLAYER_ACTION_CHG_13, PLAYER_ACTION_CHG_1, PLAYER_ACTION_CHG_2, PLAYER_ACTION_CHG_3, + PLAYER_ACTION_CHG_4, PLAYER_ACTION_CHG_9, PLAYER_ACTION_CHG_10, PLAYER_ACTION_CHG_11, + PLAYER_ACTION_CHG_8, PLAYER_ACTION_CHG_7, -PLAYER_ACTION_CHG_6, +}; + +static s8 sActionChangeList4[] = { + PLAYER_ACTION_CHG_13, PLAYER_ACTION_CHG_2, PLAYER_ACTION_CHG_4, PLAYER_ACTION_CHG_9, + PLAYER_ACTION_CHG_10, PLAYER_ACTION_CHG_11, PLAYER_ACTION_CHG_8, -PLAYER_ACTION_CHG_7, +}; + +static s8 sActionChangeList5[] = { + PLAYER_ACTION_CHG_13, PLAYER_ACTION_CHG_2, PLAYER_ACTION_CHG_4, PLAYER_ACTION_CHG_9, PLAYER_ACTION_CHG_10, + PLAYER_ACTION_CHG_11, PLAYER_ACTION_CHG_12, PLAYER_ACTION_CHG_8, -PLAYER_ACTION_CHG_7, +}; + +static s8 sActionChangeList6[] = { + -PLAYER_ACTION_CHG_7, +}; + +static s8 sActionChangeList7[] = { + PLAYER_ACTION_CHG_0, PLAYER_ACTION_CHG_11, PLAYER_ACTION_CHG_1, PLAYER_ACTION_CHG_2, + PLAYER_ACTION_CHG_3, PLAYER_ACTION_CHG_5, PLAYER_ACTION_CHG_4, PLAYER_ACTION_CHG_9, + PLAYER_ACTION_CHG_8, PLAYER_ACTION_CHG_7, -PLAYER_ACTION_CHG_6, +}; + +static s8 sActionChangeList8[] = { + PLAYER_ACTION_CHG_0, PLAYER_ACTION_CHG_11, PLAYER_ACTION_CHG_1, PLAYER_ACTION_CHG_2, + PLAYER_ACTION_CHG_3, PLAYER_ACTION_CHG_12, PLAYER_ACTION_CHG_5, PLAYER_ACTION_CHG_4, + PLAYER_ACTION_CHG_9, PLAYER_ACTION_CHG_8, PLAYER_ACTION_CHG_7, -PLAYER_ACTION_CHG_6, +}; + +static s8 sActionChangeList9[] = { + PLAYER_ACTION_CHG_13, PLAYER_ACTION_CHG_1, PLAYER_ACTION_CHG_2, PLAYER_ACTION_CHG_3, PLAYER_ACTION_CHG_12, + PLAYER_ACTION_CHG_5, PLAYER_ACTION_CHG_4, PLAYER_ACTION_CHG_9, PLAYER_ACTION_CHG_10, PLAYER_ACTION_CHG_11, + PLAYER_ACTION_CHG_8, PLAYER_ACTION_CHG_7, -PLAYER_ACTION_CHG_6, +}; + +static s8 sActionChangeList10[] = { + PLAYER_ACTION_CHG_10, + PLAYER_ACTION_CHG_8, + -PLAYER_ACTION_CHG_7, +}; + +static s8 sActionChangeList11[] = { + PLAYER_ACTION_CHG_0, + PLAYER_ACTION_CHG_12, + PLAYER_ACTION_CHG_5, + -PLAYER_ACTION_CHG_4, +}; + +s32 Player_ActionChange_0(Player* this, PlayState* play); +s32 Player_ActionChange_1(Player* this, PlayState* play); +s32 Player_ActionChange_2(Player* this, PlayState* play); +s32 Player_ActionChange_3(Player* this, PlayState* play); +s32 Player_ActionChange_4(Player* this, PlayState* play); +s32 Player_ActionChange_5(Player* this, PlayState* play); +s32 Player_ActionChange_6(Player* this, PlayState* play); +s32 Player_ActionChange_7(Player* this, PlayState* play); +s32 Player_ActionChange_8(Player* this, PlayState* play); +s32 Player_ActionChange_9(Player* this, PlayState* play); +s32 Player_ActionChange_10(Player* this, PlayState* play); +s32 Player_ActionChange_11(Player* this, PlayState* play); +s32 Player_ActionChange_12(Player* this, PlayState* play); +s32 Player_ActionChange_13(Player* this, PlayState* play); + +static s32 (*sActionChangeFuncs[])(Player* this, PlayState* play) = { + /* PLAYER_ACTION_CHG_0 */ Player_ActionChange_0, + /* PLAYER_ACTION_CHG_1 */ Player_ActionChange_1, + /* PLAYER_ACTION_CHG_2 */ Player_ActionChange_2, + /* PLAYER_ACTION_CHG_3 */ Player_ActionChange_3, + /* PLAYER_ACTION_CHG_4 */ Player_ActionChange_4, + /* PLAYER_ACTION_CHG_5 */ Player_ActionChange_5, + /* PLAYER_ACTION_CHG_6 */ Player_ActionChange_6, + /* PLAYER_ACTION_CHG_7 */ Player_ActionChange_7, + /* PLAYER_ACTION_CHG_8 */ Player_ActionChange_8, + /* PLAYER_ACTION_CHG_9 */ Player_ActionChange_9, + /* PLAYER_ACTION_CHG_10 */ Player_ActionChange_10, + /* PLAYER_ACTION_CHG_11 */ Player_ActionChange_11, + /* PLAYER_ACTION_CHG_12 */ Player_ActionChange_12, + /* PLAYER_ACTION_CHG_13 */ Player_ActionChange_13, +}; + +/** + * This function processes "Action Change Lists", which run various functions that + * check if it is appropriate to change to a new action. + * + * Action Change Lists are a list of indices for the `sActionChangeFuncs` array. + * The functions are ran in order until one of them returns true, or the end of the list is reached. + * An Action Change index having a negative value indicates that it is the last member in the list. + * + * Because these lists are processed sequentially, the order of the indices in the list determines its priority. + * + * If the `updateUpperBody` argument is true, Player's upper body will update before the Action Change List + * is processed. This allows for Item Action functions to run. + * + * @return true if a new action has been chosen + * + */ +s32 Player_TryActionChangeList(PlayState* play, Player* this, s8* actionChangeList, s32 updateUpperBody) { s32 i; if (!(this->stateFlags1 & (PLAYER_STATE1_0 | PLAYER_STATE1_7 | PLAYER_STATE1_29))) { - if (arg3 != 0) { + if (updateUpperBody) { D_808535E0 = Player_UpdateUpperBody(this, play); + if (Player_Action_8084E604 == this->actionFunc) { - return 1; + return true; } } if (func_8008F128(this)) { this->unk_6AE |= 0x41; - return 1; + return true; } if (!(this->stateFlags1 & PLAYER_STATE1_START_CHANGING_HELD_ITEM) && (Player_IA_ChangeHeldItem != this->itemActionFunc)) { - while (*arg2 >= 0) { - if (D_80854448[*arg2](this, play)) { - return 1; + // Process all entries in the Action Change List with a positive index + while (*actionChangeList >= 0) { + if (sActionChangeFuncs[*actionChangeList](this, play)) { + return true; } - arg2++; + actionChangeList++; } - if (D_80854448[-(*arg2)](this, play)) { - return 1; + // Try the last entry in the list. Negate the index to make it positive again. + if (sActionChangeFuncs[-(*actionChangeList)](this, play)) { + return true; } } } - return 0; + return false; } s32 func_808374A0(PlayState* play, Player* this, SkelAnime* skelAnime, f32 arg3) { @@ -3727,7 +3826,7 @@ s32 func_808374A0(PlayState* play, Player* this, SkelAnime* skelAnime, f32 arg3) s16 yawTarget; if ((skelAnime->endFrame - arg3) <= skelAnime->curFrame) { - if (func_80837348(play, this, D_80854418, 1)) { + if (Player_TryActionChangeList(play, this, sActionChangeList7, true)) { return 0; } @@ -4335,7 +4434,7 @@ void func_808389E8(Player* this, LinkAnimationHeader* anim, f32 arg2, PlayState* func_80838940(this, anim, arg2, play, NA_SE_VO_LI_SWORD_N); } -s32 func_80838A14(Player* this, PlayState* play) { +s32 Player_ActionChange_12(Player* this, PlayState* play) { s32 sp3C; LinkAnimationHeader* anim; f32 sp34; @@ -4710,7 +4809,7 @@ s32 Player_PosVsWallLineTest(PlayState* play, Player* this, Vec3f* offset, Colli return BgCheck_EntityLineTest1(&play->colCtx, &posA, &posB, posResult, wallPoly, true, false, false, true, bgId); } -s32 func_80839800(Player* this, PlayState* play) { +s32 Player_ActionChange_1(Player* this, PlayState* play) { SlidingDoorActorBase* slidingDoor; DoorActorBase* door; s32 doorDirection; @@ -5353,7 +5452,7 @@ static LinkAnimationHeader* D_80854548[] = { &gPlayerAnim_link_normal_take_out, }; -s32 func_8083B040(Player* this, PlayState* play) { +s32 Player_ActionChange_13(Player* this, PlayState* play) { s32 sp2C; s32 sp28; GetItemEntry* giEntry; @@ -5499,7 +5598,7 @@ s32 func_8083B040(Player* this, PlayState* play) { return 0; } -s32 func_8083B644(Player* this, PlayState* play) { +s32 Player_ActionChange_4(Player* this, PlayState* play) { Actor* sp34 = this->targetActor; Actor* sp30 = this->unk_664; Actor* sp2C = NULL; @@ -5584,9 +5683,9 @@ s32 func_8083B8F4(Player* this, PlayState* play) { return 0; } -s32 func_8083B998(Player* this, PlayState* play) { +s32 Player_ActionChange_0(Player* this, PlayState* play) { if (this->unk_6AD != 0) { - func_8083B040(this, play); + Player_ActionChange_13(this, play); return 1; } @@ -5671,7 +5770,7 @@ void func_8083BCD0(Player* this, PlayState* play, s32 arg2) { Player_PlaySfx(this, ((arg2 << 0xE) == 0x8000) ? NA_SE_PL_ROLL : NA_SE_PL_SKIP); } -s32 func_8083BDBC(Player* this, PlayState* play) { +s32 Player_ActionChange_10(Player* this, PlayState* play) { s32 sp2C; if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) && @@ -5762,7 +5861,7 @@ void func_8083C148(Player* this, PlayState* play) { this->stateFlags1 &= ~(PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_20); } -s32 func_8083C1DC(Player* this, PlayState* play) { +s32 Player_ActionChange_6(Player* this, PlayState* play) { if (!func_80833B54(this) && (D_808535E0 == 0) && !(this->stateFlags1 & PLAYER_STATE1_23) && CHECK_BTN_ALL(sControlInput->press.button, BTN_A)) { if (func_8083BC7C(this, play)) { @@ -5778,7 +5877,7 @@ s32 func_8083C1DC(Player* this, PlayState* play) { return 0; } -s32 func_8083C2B0(Player* this, PlayState* play) { +s32 Player_ActionChange_11(Player* this, PlayState* play) { LinkAnimationHeader* anim; f32 frame; @@ -5846,7 +5945,7 @@ void func_8083C50C(Player* this) { } } -s32 func_8083C544(Player* this, PlayState* play) { +s32 Player_ActionChange_8(Player* this, PlayState* play) { if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_B)) { if (!(this->stateFlags1 & PLAYER_STATE1_22) && (Player_GetMeleeWeaponHeld(this) != 0) && (this->unk_844 == 1) && (this->heldItemAction != PLAYER_IA_DEKU_STICK)) { @@ -6431,7 +6530,7 @@ static struct_80854578 D_80854578[] = { { &gPlayerAnim_link_uma_right_up, -34.16f, 7.91f }, }; -s32 func_8083E0FC(Player* this, PlayState* play) { +s32 Player_ActionChange_3(Player* this, PlayState* play) { EnHorse* rideActor = (EnHorse*)this->rideActor; f32 unk_04; f32 unk_08; @@ -6558,7 +6657,7 @@ void func_8083E4C4(PlayState* play, Player* this, GetItemEntry* giEntry) { Sfx_PlaySfxCentered((this->getItemId < 0) ? NA_SE_SY_GET_BOXITEM : NA_SE_SY_GET_ITEM); } -s32 func_8083E5A8(Player* this, PlayState* play) { +s32 Player_ActionChange_2(Player* this, PlayState* play) { Actor* interactedActor; if (iREG(67) || @@ -6687,7 +6786,7 @@ s32 func_8083EAF0(Player* this, Actor* actor) { return 1; } -s32 func_8083EB44(Player* this, PlayState* play) { +s32 Player_ActionChange_9(Player* this, PlayState* play) { if ((this->stateFlags1 & PLAYER_STATE1_11) && (this->heldActor != NULL) && CHECK_BTN_ANY(sControlInput->press.button, BTN_A | BTN_B | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN)) { if (!func_80835644(play, this, this->heldActor)) { @@ -7010,7 +7109,7 @@ void func_8083F72C(Player* this, LinkAnimationHeader* anim, PlayState* play) { this->actor.shape.rot.y = this->yaw = this->actor.wallYaw + 0x8000; } -s32 func_8083F7BC(Player* this, PlayState* play) { +s32 Player_ActionChange_5(Player* this, PlayState* play) { DynaPolyActor* wallPolyActor; if (!(this->stateFlags1 & PLAYER_STATE1_11) && (this->actor.bgCheckFlags & BGCHECKFLAG_PLAYER_WALL_INTERACT) && @@ -7302,7 +7401,7 @@ void Player_Action_80840450(Player* this, PlayState* play) { func_8083721C(this); - if (!func_80837348(play, this, D_808543E0, 1)) { + if (!Player_TryActionChangeList(play, this, sActionChangeList1, true)) { if (!func_80833B54(this) && (!func_80833B2C(this) || (func_80834B5C != this->itemActionFunc))) { func_8083CF10(this, play); return; @@ -7368,7 +7467,7 @@ void Player_Action_808407CC(Player* this, PlayState* play) { func_8083721C(this); - if (!func_80837348(play, this, D_808543E8, 1)) { + if (!Player_TryActionChangeList(play, this, sActionChangeList2, true)) { if (func_80833B54(this)) { func_8083CEAC(this, play); return; @@ -7496,7 +7595,7 @@ void Player_Action_80840BC8(Player* this, PlayState* play) { func_8083721C(this); if (this->actionVar2 == 0) { - if (!func_80837348(play, this, D_80854418, 1)) { + if (!Player_TryActionChangeList(play, this, sActionChangeList7, true)) { if (func_80833B54(this)) { func_8083CEAC(this, play); return; @@ -7569,7 +7668,7 @@ void Player_Action_80840DE4(Player* this, PlayState* play) { func_808327F8(this, this->speedXZ); } - if (!func_80837348(play, this, D_808543F4, 1)) { + if (!Player_TryActionChangeList(play, this, sActionChangeList3, true)) { if (func_80833B54(this)) { func_8083CEAC(this, play); return; @@ -7691,7 +7790,7 @@ void Player_Action_808414F8(Player* this, PlayState* play) { func_80841138(this, play); - if (!func_80837348(play, this, D_80854400, 1)) { + if (!Player_TryActionChangeList(play, this, sActionChangeList4, true)) { if (!func_80833C04(this)) { func_8083C8DC(this, play, this->yaw); return; @@ -7736,7 +7835,7 @@ void Player_Action_8084170C(Player* this, PlayState* play) { sp34 = LinkAnimation_Update(play, &this->skelAnime); func_8083721C(this); - if (!func_80837348(play, this, D_80854400, 1)) { + if (!Player_TryActionChangeList(play, this, sActionChangeList4, true)) { Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_LINEAR, play); if (this->speedXZ == 0.0f) { @@ -7756,7 +7855,7 @@ void Player_Action_808417FC(Player* this, PlayState* play) { sp1C = LinkAnimation_Update(play, &this->skelAnime); - if (!func_80837348(play, this, D_80854400, 1)) { + if (!Player_TryActionChangeList(play, this, sActionChangeList4, true)) { if (sp1C != 0) { func_80839F30(this, play); } @@ -7785,7 +7884,7 @@ void Player_Action_8084193C(Player* this, PlayState* play) { func_80841860(play, this); - if (!func_80837348(play, this, D_80854408, 1)) { + if (!Player_TryActionChangeList(play, this, sActionChangeList5, true)) { if (!func_80833C04(this)) { func_8083C858(this, play); return; @@ -7855,7 +7954,7 @@ void Player_Action_80841BA8(Player* this, PlayState* play) { Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_CURVED, play); - if (!func_80837348(play, this, D_80854414, 1)) { + if (!Player_TryActionChangeList(play, this, sActionChangeList6, true)) { if (speedTarget != 0.0f) { this->actor.shape.rot.y = yawTarget; func_8083C858(this, play); @@ -7971,7 +8070,7 @@ void Player_Action_80842180(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_5; func_80841EE4(this, play); - if (!func_80837348(play, this, D_80854424, 1)) { + if (!Player_TryActionChangeList(play, this, sActionChangeList8, true)) { if (func_80833C04(this)) { func_8083C858(this, play); return; @@ -7997,7 +8096,7 @@ void Player_Action_8084227C(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_5; func_80841EE4(this, play); - if (!func_80837348(play, this, D_80854430, 1)) { + if (!Player_TryActionChangeList(play, this, sActionChangeList9, true)) { if (!func_80833C04(this)) { func_8083C858(this, play); return; @@ -8030,7 +8129,7 @@ void Player_Action_808423EC(Player* this, PlayState* play) { sp34 = LinkAnimation_Update(play, &this->skelAnime); - if (!func_80837348(play, this, D_80854408, 1)) { + if (!Player_TryActionChangeList(play, this, sActionChangeList5, true)) { if (!func_80833C04(this)) { func_8083C858(this, play); return; @@ -8062,7 +8161,7 @@ void Player_Action_8084251C(Player* this, PlayState* play) { func_8083721C(this); - if (!func_80837348(play, this, D_80854440, 1)) { + if (!Player_TryActionChangeList(play, this, sActionChangeList10, true)) { Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_LINEAR, play); if (this->speedXZ == 0.0f) { @@ -8109,7 +8208,7 @@ void Player_Action_8084279C(Player* this, PlayState* play) { func_80832CB0(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_check_wait, this->modelAnimType)); if (DECR(this->actionVar2) == 0) { - if (!func_8083B040(this, play)) { + if (!Player_ActionChange_13(this, play)) { func_8083A098(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_check_end, this->modelAnimType), play); } @@ -8141,7 +8240,7 @@ s32 func_808428D8(Player* this, PlayState* play) { } s32 func_80842964(Player* this, PlayState* play) { - return func_8083B040(this, play) || func_8083B644(this, play) || func_8083E5A8(this, play); + return Player_ActionChange_13(this, play) || Player_ActionChange_4(this, play) || Player_ActionChange_2(this, play); } void Player_RequestQuake(PlayState* play, s32 speed, s32 y, s32 duration) { @@ -8386,7 +8485,7 @@ void Player_Action_80843188(Player* this, PlayState* play) { this->actionVar1 = 0; } } else if (!func_80842964(this, play)) { - if (func_8083C2B0(this, play)) { + if (Player_ActionChange_11(this, play)) { func_808428D8(this, play); } else { this->stateFlags1 &= ~PLAYER_STATE1_22; @@ -8879,7 +8978,7 @@ void Player_Action_80844708(Player* this, PlayState* play) { } } - if ((this->skelAnime.curFrame < 15.0f) || !func_80850224(this, play)) { + if ((this->skelAnime.curFrame < 15.0f) || !Player_ActionChange_7(this, play)) { if (this->skelAnime.curFrame >= 20.0f) { func_8083A060(this, play); return; @@ -9335,7 +9434,7 @@ void Player_Action_80845CA4(Player* this, PlayState* play) { s32 sp30; s32 pad; - if (!func_8083B040(this, play)) { + if (!Player_ActionChange_13(this, play)) { if (this->actionVar2 == 0) { LinkAnimation_Update(play, &this->skelAnime); @@ -9379,7 +9478,7 @@ void Player_Action_80845CA4(Player* this, PlayState* play) { func_8005B1A4(Play_GetCamera(play, CAM_ID_MAIN)); func_80845C68(play, gSaveContext.respawn[RESPAWN_MODE_DOWN].data); - if (!func_8083B644(this, play)) { + if (!Player_ActionChange_4(this, play)) { func_8083CF5C(this, play); } } @@ -9455,7 +9554,7 @@ static struct_80832924 D_8085461C[] = { void Player_Action_80846120(Player* this, PlayState* play) { if (LinkAnimation_Update(play, &this->skelAnime) && (this->actionVar2++ > 20)) { - if (!func_8083B040(this, play)) { + if (!Player_ActionChange_13(this, play)) { func_8083A098(this, &gPlayerAnim_link_normal_heavy_carry_end, play); } return; @@ -11545,7 +11644,7 @@ s32 func_8084B4D4(PlayState* play, Player* this) { this->stateFlags3 &= ~PLAYER_STATE3_5; func_8084B498(this); this->unk_6AD = 4; - func_8083B040(this, play); + Player_ActionChange_13(this, play); return 1; } @@ -11566,7 +11665,7 @@ void Player_Action_8084B530(Player* this, PlayState* play) { func_8005B1A4(Play_GetCamera(play, CAM_ID_MAIN)); if (!func_8084B4D4(play, this) && !func_8084B3CC(play, this) && !func_8083ADD4(play, this)) { - if ((this->targetActor != this->interactRangeActor) || !func_8083E5A8(this, play)) { + if ((this->targetActor != this->interactRangeActor) || !Player_ActionChange_2(this, play)) { if (this->stateFlags1 & PLAYER_STATE1_23) { s32 sp24 = this->actionVar2; func_8083A360(play, this); @@ -12296,8 +12395,8 @@ void Player_Action_8084CC98(Player* this, PlayState* play) { this->yaw = this->actor.shape.rot.y = rideActor->actor.shape.rot.y; if ((this->csAction != PLAYER_CSACTION_NONE) || - (!func_8083224C(play) && ((rideActor->actor.speed != 0.0f) || !func_8083B644(this, play)) && - !func_8083C1DC(this, play))) { + (!func_8083224C(play) && ((rideActor->actor.speed != 0.0f) || !Player_ActionChange_4(this, play)) && + !Player_ActionChange_6(this, play))) { if (D_808535E0 == 0) { if (this->actionVar1 != 0) { if (LinkAnimation_Update(play, &this->skelAnimeUpper)) { @@ -12353,7 +12452,8 @@ void Player_Action_8084CC98(Player* this, PlayState* play) { return; } - if ((this->csAction != PLAYER_CSACTION_NONE) || (!func_8084C9BC(this, play) && !func_8083B040(this, play))) { + if ((this->csAction != PLAYER_CSACTION_NONE) || + (!func_8084C9BC(this, play) && !Player_ActionChange_13(this, play))) { if (this->unk_664 != NULL) { if (func_8002DD78(this) != 0) { this->unk_6BE = func_8083DB98(this, 1) - this->actor.shape.rot.y; @@ -12438,7 +12538,7 @@ void Player_Action_8084D610(Player* this, PlayState* play) { func_80832CB0(play, this, &gPlayerAnim_link_swimer_swim_wait); func_8084B000(this); - if (!func_8083224C(play) && !func_80837348(play, this, D_80854444, 1) && + if (!func_8083224C(play) && !Player_TryActionChangeList(play, this, sActionChangeList11, true) && !func_8083D12C(play, this, sControlInput)) { if (this->unk_6AD != 1) { this->unk_6AD = 0; @@ -12475,7 +12575,7 @@ void Player_Action_8084D610(Player* this, PlayState* play) { } void Player_Action_8084D7C4(Player* this, PlayState* play) { - if (!func_8083B040(this, play)) { + if (!Player_ActionChange_13(this, play)) { this->stateFlags2 |= PLAYER_STATE2_5; func_8084B158(play, this, NULL, this->speedXZ); @@ -12497,7 +12597,8 @@ void Player_Action_8084D84C(Player* this, PlayState* play) { func_8084B158(play, this, sControlInput, this->speedXZ); func_8084B000(this); - if (!func_80837348(play, this, D_80854444, 1) && !func_8083D12C(play, this, sControlInput)) { + if (!Player_TryActionChangeList(play, this, sActionChangeList11, true) && + !func_8083D12C(play, this, sControlInput)) { Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_LINEAR, play); temp = this->actor.shape.rot.y - yawTarget; @@ -12556,7 +12657,8 @@ void Player_Action_8084DAB4(Player* this, PlayState* play) { func_8084B158(play, this, sControlInput, this->speedXZ); func_8084B000(this); - if (!func_80837348(play, this, D_80854444, 1) && !func_8083D12C(play, this, sControlInput)) { + if (!Player_TryActionChangeList(play, this, sActionChangeList11, true) && + !func_8083D12C(play, this, sControlInput)) { Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_LINEAR, play); if (speedTarget == 0.0f) { @@ -12587,7 +12689,7 @@ void Player_Action_8084DC48(Player* this, PlayState* play) { this->actor.gravity = 0.0f; Player_UpdateUpperBody(this, play); - if (!func_8083B040(this, play)) { + if (!Player_ActionChange_13(this, play)) { if (this->currentBoots == PLAYER_BOOTS_IRON) { func_80838F18(play, this); return; @@ -12609,7 +12711,7 @@ void Player_Action_8084DC48(Player* this, PlayState* play) { func_8084B158(play, this, sControlInput, this->actor.velocity.y); this->unk_6C2 = 16000; - if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_A) && !func_8083E5A8(this, play) && + if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_A) && !Player_ActionChange_2(this, play) && !(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (this->actor.yDistToWater < D_80854784[CUR_UPG_VALUE(UPG_SCALE)])) { func_8084DBC4(play, this, -2.0f); @@ -12785,7 +12887,7 @@ void Player_Action_8084E3C4(Player* this, PlayState* play) { this->targetActor = this->naviActor; this->naviActor->textId = -this->naviTextId; func_80853148(play, this->targetActor); - } else if (!func_8083B040(this, play)) { + } else if (!Player_ActionChange_13(this, play)) { func_8083A098(this, &gPlayerAnim_link_normal_okarina_end, play); } @@ -13211,7 +13313,7 @@ void Player_Action_8084F390(Player* this, PlayState* play) { func_8084269C(play, this); func_800F4138(&this->actor.projectedPos, NA_SE_PL_SLIP_LEVEL - SFX_FLAG, this->actor.speed); - if (func_8083B040(this, play) == 0) { + if (Player_ActionChange_13(this, play) == 0) { floorPoly = this->actor.floorPoly; if (floorPoly == NULL) { @@ -13338,7 +13440,7 @@ void Player_Action_8084F88C(Player* this, PlayState* play) { } void Player_Action_8084F9A0(Player* this, PlayState* play) { - func_80839800(this, play); + Player_ActionChange_1(this, play); } void Player_Action_8084F9C0(Player* this, PlayState* play) { @@ -13540,7 +13642,7 @@ void Player_UpdateBunnyEars(Player* this) { } } -s32 func_80850224(Player* this, PlayState* play) { +s32 Player_ActionChange_7(Player* this, PlayState* play) { if (func_8083C6B8(play, this) == 0) { if (func_8083BB20(this) != 0) { s32 sp24 = func_80837818(this); @@ -13584,7 +13686,7 @@ void Player_Action_808502D0(Player* this, PlayState* play) { func_8083C50C(this); if (LinkAnimation_Update(play, &this->skelAnime)) { - if (!func_80850224(this, play)) { + if (!Player_ActionChange_7(this, play)) { u8 sp43 = this->skelAnime.moveFlags; LinkAnimationHeader* sp3C; @@ -14279,7 +14381,7 @@ void func_808514C0(PlayState* play, Player* this, CsCmdActorCue* cue) { } if ((this->interactRangeActor != NULL) && (this->interactRangeActor->textId == 0xFFFF)) { - func_8083E5A8(this, play); + Player_ActionChange_2(this, play); } } @@ -14835,8 +14937,8 @@ void func_80852944(PlayState* play, Player* this, CsCmdActorCue* cue) { func_80832340(play, this); } else { func_8083C148(this, play); - if (!func_8083B644(this, play)) { - func_8083E5A8(this, play); + if (!Player_ActionChange_4(this, play)) { + Player_ActionChange_2(this, play); } } From c39578f971c37182147ea34feb99d6c1be7711f4 Mon Sep 17 00:00:00 2001 From: engineer124 <47598039+engineer124@users.noreply.github.com> Date: Fri, 6 Oct 2023 01:04:41 +1100 Subject: [PATCH 06/16] Introduce Player CueIds (#1559) * cueId * cleanup --- docs/tutorial/data.md | 10 +- include/z64player.h | 82 ++++++++++++++ .../z_bg_toki_swd_cutscene_data_1.c | 2 +- .../z_bg_toki_swd_cutscene_data_2.c | 2 +- .../z_bg_toki_swd_cutscene_data_3.c | 6 +- .../z_bg_treemouth_cutscene_data.c | 4 +- .../ovl_Demo_Du/z_demo_du_cutscene_data.inc.c | 6 +- .../ovl_Demo_Im/z_demo_im_cutscene_data.inc.c | 6 +- .../ovl_Demo_Sa/z_demo_sa_cutscene_data.inc.c | 6 +- src/overlays/actors/ovl_En_Horse/z_en_horse.c | 3 +- .../ovl_En_Jj/z_en_jj_cutscene_data.inc.c | 10 +- .../ovl_En_Nb/z_en_nb_cutscene_data.inc.c | 6 +- .../z_en_okarina_tag_cutscene_data.c | 6 +- .../ovl_En_Ru1/z_en_ru1_cutscene_data.inc.c | 26 ++--- .../ovl_En_Ru2/z_en_ru2_cutscene_data.inc.c | 10 +- .../ovl_En_Zl1/z_en_zl1_cutscene_data.c | 6 +- .../actors/ovl_player_actor/z_player.c | 106 ++++++++++++++---- 17 files changed, 221 insertions(+), 76 deletions(-) diff --git a/docs/tutorial/data.md b/docs/tutorial/data.md index 05e3a66d30..9b6cfeb1ba 100644 --- a/docs/tutorial/data.md +++ b/docs/tutorial/data.md @@ -325,10 +325,10 @@ ovl_En_Jj: Rom 00E3E3D0:00E3F9E0 VRam 80A87800:80A88E10 Offset 000964 static CutsceneData D_80A88164[] = { CS_BEGIN_CUTSCENE(26, 1629), CS_PLAYER_CUE_LIST(4), - CS_PLAYER_CUE(0x0005, 0, 240, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f), - CS_PLAYER_CUE(0x0003, 240, 255, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f), - CS_PLAYER_CUE(0x0006, 255, 285, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f), - CS_PLAYER_CUE(0x0020, 285, 300, 0x0000, 0xC000, 0x0000, -1732, 52, -44, -1537, 109, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 0, 240, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_3, 240, 255, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_6, 255, 285, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_32, 285, 300, 0x0000, 0xC000, 0x0000, -1732, 52, -44, -1537, 109, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f), CS_ACTOR_CUE_LIST(68, 4), CS_ACTOR_CUE(0x0001, 0, 234, 0x0000, 0x4000, 0x0000, -1665, 52, -44, -1665, 52, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f), CS_ACTOR_CUE(0x0002, 234, 241, 0x41F8, 0x0000, 0x0000, -1665, 52, -44, -1603, 130, -47, 8.857142448425293f, 11.142857551574707f, -8.857142448425293f), @@ -348,7 +348,7 @@ static CutsceneData D_80A88164[] = { CS_MISC(0x000C, 1095, 1161, 0x0000, 0x00000000, 0xFFFFFFD2, 0x00000000, 0xFFFFFFD0, 0xFFFFFFD2, 0x00000000, 0xFFFFFFD0, 0x00000000, 0x00000000, 0x00000000), CS_TRANSITION(0x0009, 0, 10), CS_PLAYER_CUE_LIST(1), - CS_PLAYER_CUE(0x0035, 300, 1629, 0x0000, 0x0000, 0x0000, -1630, 52, -52, -1630, 52, -52, 0.0f, 0.0f, 0.0f), + CS_PLAYER_CUE(PLAYER_CUEID_53, 300, 1629, 0x0000, 0x0000, 0x0000, -1630, 52, -52, -1630, 52, -52, 0.0f, 0.0f, 0.0f), CS_CAM_EYE_SPLINE(0, 1091), CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, 45.39994430541992f, -1641, 95, -41, 0x015C), CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, 45.39994430541992f, -1641, 95, -41, 0x016D), diff --git a/include/z64player.h b/include/z64player.h index ae497a395a..4e00ffe6b7 100644 --- a/include/z64player.h +++ b/include/z64player.h @@ -459,6 +459,88 @@ typedef enum { /* 0x67 */ PLAYER_CSACTION_MAX } PlayerCsAction; +typedef enum { + /* 0x00 */ PLAYER_CUEID_NONE, + /* 0x01 */ PLAYER_CUEID_1, + /* 0x02 */ PLAYER_CUEID_2, + /* 0x03 */ PLAYER_CUEID_3, + /* 0x04 */ PLAYER_CUEID_4, + /* 0x05 */ PLAYER_CUEID_5, + /* 0x06 */ PLAYER_CUEID_6, + /* 0x07 */ PLAYER_CUEID_7, + /* 0x08 */ PLAYER_CUEID_8, + /* 0x09 */ PLAYER_CUEID_9, + /* 0x0A */ PLAYER_CUEID_10, + /* 0x0B */ PLAYER_CUEID_11, + /* 0x0C */ PLAYER_CUEID_12, + /* 0x0D */ PLAYER_CUEID_13, + /* 0x0E */ PLAYER_CUEID_14, + /* 0x0F */ PLAYER_CUEID_15, + /* 0x10 */ PLAYER_CUEID_16, + /* 0x11 */ PLAYER_CUEID_17, + /* 0x12 */ PLAYER_CUEID_18, + /* 0x13 */ PLAYER_CUEID_19, + /* 0x14 */ PLAYER_CUEID_20, + /* 0x15 */ PLAYER_CUEID_21, + /* 0x16 */ PLAYER_CUEID_22, + /* 0x17 */ PLAYER_CUEID_23, + /* 0x18 */ PLAYER_CUEID_24, + /* 0x19 */ PLAYER_CUEID_25, + /* 0x1A */ PLAYER_CUEID_26, + /* 0x1B */ PLAYER_CUEID_27, + /* 0x1C */ PLAYER_CUEID_28, + /* 0x1D */ PLAYER_CUEID_29, + /* 0x1E */ PLAYER_CUEID_30, + /* 0x1F */ PLAYER_CUEID_31, + /* 0x20 */ PLAYER_CUEID_32, + /* 0x21 */ PLAYER_CUEID_33, + /* 0x22 */ PLAYER_CUEID_34, + /* 0x23 */ PLAYER_CUEID_35, + /* 0x24 */ PLAYER_CUEID_36, + /* 0x25 */ PLAYER_CUEID_37, + /* 0x26 */ PLAYER_CUEID_38, + /* 0x27 */ PLAYER_CUEID_39, + /* 0x28 */ PLAYER_CUEID_40, + /* 0x29 */ PLAYER_CUEID_41, + /* 0x2A */ PLAYER_CUEID_42, + /* 0x2B */ PLAYER_CUEID_43, + /* 0x2C */ PLAYER_CUEID_44, + /* 0x2D */ PLAYER_CUEID_45, + /* 0x2E */ PLAYER_CUEID_46, + /* 0x2F */ PLAYER_CUEID_47, + /* 0x30 */ PLAYER_CUEID_48, + /* 0x31 */ PLAYER_CUEID_49, + /* 0x32 */ PLAYER_CUEID_50, + /* 0x33 */ PLAYER_CUEID_51, + /* 0x34 */ PLAYER_CUEID_52, + /* 0x35 */ PLAYER_CUEID_53, + /* 0x36 */ PLAYER_CUEID_54, + /* 0x37 */ PLAYER_CUEID_55, + /* 0x38 */ PLAYER_CUEID_56, + /* 0x39 */ PLAYER_CUEID_57, + /* 0x3A */ PLAYER_CUEID_58, + /* 0x3B */ PLAYER_CUEID_59, + /* 0x3C */ PLAYER_CUEID_60, + /* 0x3D */ PLAYER_CUEID_61, + /* 0x3E */ PLAYER_CUEID_62, + /* 0x3F */ PLAYER_CUEID_63, + /* 0x40 */ PLAYER_CUEID_64, + /* 0x41 */ PLAYER_CUEID_65, + /* 0x42 */ PLAYER_CUEID_66, + /* 0x43 */ PLAYER_CUEID_67, + /* 0x44 */ PLAYER_CUEID_68, + /* 0x45 */ PLAYER_CUEID_69, + /* 0x46 */ PLAYER_CUEID_70, + /* 0x47 */ PLAYER_CUEID_71, + /* 0x48 */ PLAYER_CUEID_72, + /* 0x49 */ PLAYER_CUEID_73, + /* 0x4A */ PLAYER_CUEID_74, + /* 0x4B */ PLAYER_CUEID_75, + /* 0x4C */ PLAYER_CUEID_76, + /* 0x4D */ PLAYER_CUEID_77, + /* 0x4E */ PLAYER_CUEID_MAX +} PlayerCueId; + typedef enum { /* 0 */ PLAYER_LEDGE_CLIMB_NONE, /* 1 */ PLAYER_LEDGE_CLIMB_1, diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.c index 1f9b03889c..4581452d7c 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.c @@ -5,7 +5,7 @@ CutsceneData D_808BB2F0[] = { CS_BEGIN_CUTSCENE(9, 425), CS_PLAYER_CUE_LIST(1), - CS_PLAYER_CUE(0x000C, 0, 256, 0x0000, 0x0000, 0x0000, 0, 54, 52, 0, 54, 52, 0.0f, 0.0f, 0.0f), + CS_PLAYER_CUE(PLAYER_CUEID_12, 0, 256, 0x0000, 0x0000, 0x0000, 0, 54, 52, 0, 54, 52, 0.0f, 0.0f, 0.0f), CS_LIGHT_SETTING_LIST(1), CS_LIGHT_SETTING(0x0001, 110, 111, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFE3, 0xFFFFFFC5, 0x00000000, 0xFFFFFFE3, 0xFFFFFFC5), CS_MISC_LIST(1), diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.c index 9845372b35..40b2ac2944 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.c @@ -87,7 +87,7 @@ CutsceneData D_808BB7A0[] = { CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 15, 60.0f, -3, 95, 8, 0x0020), CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, 60.0f, -3, 95, 8, 0xA5EB), CS_PLAYER_CUE_LIST(1), - CS_PLAYER_CUE(0x000C, 0, 180, 0x0000, 0x0000, 0x0000, 0, 28, -10, 0, -14, 9, 0.0f, -0.23333333f, 0.0f), + CS_PLAYER_CUE(PLAYER_CUEID_12, 0, 180, 0x0000, 0x0000, 0x0000, 0, 28, -10, 0, -14, 9, 0.0f, -0.23333333f, 0.0f), CS_LIGHT_SETTING_LIST(1), CS_LIGHT_SETTING(0x0001, 90, 91, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFF2, 0x00000024, 0x00000000, 0xFFFFFFF2, 0x00000024), CS_MISC_LIST(1), diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.c index 085c1b333f..4eb289cc4b 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.c @@ -7,9 +7,9 @@ CutsceneData D_808BBD90[] = { CS_UNK_DATA_LIST(0x00000021, 1), CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0xFFFFFFF8, 0xFFFFFFFF, 0x00000000, 0xFFFFFFF8, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000), CS_PLAYER_CUE_LIST(3), - CS_PLAYER_CUE(0x0005, 0, 1, 0x0000, 0x8000, 0x0000, 0, 0, 820, 0, 0, 820, 0.0f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0002, 1, 16, 0x0000, 0x8000, 0x0000, 0, 0, 820, 0, 0, 720, 0.0f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0005, 16, 176, 0x0000, 0x8000, 0x0000, 0, 0, 720, 0, 0, 720, 0.0f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 0, 1, 0x0000, 0x8000, 0x0000, 0, 0, 820, 0, 0, 820, 0.0f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_2, 1, 16, 0x0000, 0x8000, 0x0000, 0, 0, 820, 0, 0, 720, 0.0f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 16, 176, 0x0000, 0x8000, 0x0000, 0, 0, 720, 0, 0, 720, 0.0f, 0.0f, 1.4e-45f), CS_ACTOR_CUE_LIST(62, 3), CS_ACTOR_CUE(0x0004, 40, 70, 0x7D74, 0x0000, 0x0000, -1, 49, 719, 1, 47, 687, 0.06666667f, -0.06666667f, -0.06666667f), CS_ACTOR_CUE(0x0004, 70, 220, 0x8010, 0x0000, 0x0000, 1, 47, 687, 0, 134, 21, -0.006666667f, 0.58f, 0.006666667f), diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c index 6d4e8c8451..d905e2e62a 100644 --- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c +++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c @@ -7,8 +7,8 @@ CutsceneData D_808BCE20[] = { CS_UNK_DATA_LIST(0x00000015, 1), CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x00000000, 0x00000000), CS_PLAYER_CUE_LIST(2), - CS_PLAYER_CUE(0x0002, 0, 33, 0x54B2, 0x0000, 0x0000, 2614, 0, -451, 2808, 0, -559, 5.878788f, 0.0f, -5.878788f), - CS_PLAYER_CUE(0x0004, 33, 42, 0x5945, 0x0000, 0x0000, 2808, 0, -559, 2857, 0, -594, 5.4444447f, 0.0f, -5.4444447f), + CS_PLAYER_CUE(PLAYER_CUEID_2, 0, 33, 0x54B2, 0x0000, 0x0000, 2614, 0, -451, 2808, 0, -559, 5.878788f, 0.0f, -5.878788f), + CS_PLAYER_CUE(PLAYER_CUEID_4, 33, 42, 0x5945, 0x0000, 0x0000, 2808, 0, -559, 2857, 0, -594, 5.4444447f, 0.0f, -5.4444447f), CS_CAM_EYE_SPLINE(0, 1091), CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x59A8), CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x20B8), diff --git a/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.inc.c b/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.inc.c index 46844cc672..5d4e1a7874 100644 --- a/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.inc.c +++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.inc.c @@ -13,9 +13,9 @@ static CutsceneData D_8096C1A4[] = { CS_ACTOR_CUE(0x0002, 616, 667, 0x0000, 0x0000, 0x0000, 0, 216, -10, 0, 82, 0, 0.0f, -2.627451f, 0.0f), CS_ACTOR_CUE(0x0003, 667, 2834, 0x0000, 0x0000, 0x0000, 0, 82, 0, 0, 82, 0, 0.0f, 0.0f, 0.0f), CS_PLAYER_CUE_LIST(3), - CS_PLAYER_CUE(0x000D, 0, 280, 0x0000, 0x6AAA, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 1.401298464324817e-45f), - CS_PLAYER_CUE(0x0005, 280, 531, 0x0000, 0x6AAA, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 1.401298464324817e-45f), - CS_PLAYER_CUE(0x0013, 531, 1716, 0x0000, 0xEAAA, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_13, 0, 280, 0x0000, 0x6AAA, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 280, 531, 0x0000, 0x6AAA, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_19, 531, 1716, 0x0000, 0xEAAA, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 1.401298464324817e-45f), CS_ACTOR_CUE_LIST(41, 3), CS_ACTOR_CUE(0x0001, 0, 170, 0x0000, 0x0000, 0x0000, 98, 6, -169, 98, 6, -169, 0.0f, 0.0f, 0.0f), CS_ACTOR_CUE(0x0002, 170, 465, 0x0000, 0x0000, 0x0000, 98, 6, -169, 98, 6, -169, 0.0f, 0.0f, 0.0f), diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.inc.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.inc.c index eb6d4fe446..b01d9494dd 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.inc.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.inc.c @@ -13,9 +13,9 @@ static CutsceneData D_8098786C[] = { CS_ACTOR_CUE(0x0002, 768, 817, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 82, 0, 0.0f, 0.0f, 0.0f), CS_ACTOR_CUE(0x0003, 817, 2666, 0x0000, 0x0000, 0x0000, 0, 82, 0, 0, 82, 0, 0.0f, 0.0f, 0.0f), CS_PLAYER_CUE_LIST(3), - CS_PLAYER_CUE(0x000D, 0, 300, 0x0000, 0x0000, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), - CS_PLAYER_CUE(0x0005, 300, 661, 0x0000, 0xEAAA, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), - CS_PLAYER_CUE(0x0013, 661, 1934, 0x0000, 0x6AAA, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), + CS_PLAYER_CUE(PLAYER_CUEID_13, 0, 300, 0x0000, 0x0000, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 300, 661, 0x0000, 0xEAAA, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), + CS_PLAYER_CUE(PLAYER_CUEID_19, 661, 1934, 0x0000, 0x6AAA, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), CS_ACTOR_CUE_LIST(44, 3), CS_ACTOR_CUE(0x0001, 0, 145, 0x0000, 0x0000, 0x0000, -97, 6, 169, -97, 6, 169, 0.0f, 0.0f, 0.0f), CS_ACTOR_CUE(0x0002, 145, 615, 0x0000, 0x0000, 0x0000, -97, 6, 169, -97, 6, 169, 0.0f, 0.0f, 0.0f), diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa_cutscene_data.inc.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa_cutscene_data.inc.c index f5d025ff26..5fe48c7098 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa_cutscene_data.inc.c +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa_cutscene_data.inc.c @@ -13,9 +13,9 @@ static CutsceneData D_8099010C[] = { CS_ACTOR_CUE(0x0002, 684, 732, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 82, 0, 0.0f, -2.7916667f, 0.0f), CS_ACTOR_CUE(0x0003, 732, 2912, 0x0000, 0x0000, 0x0000, 0, 82, 0, 0, 82, 0, 0.0f, 0.0f, 0.0f), CS_PLAYER_CUE_LIST(3), - CS_PLAYER_CUE(0x000D, 0, 261, 0x0000, 0x0000, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), - CS_PLAYER_CUE(0x0005, 261, 600, 0x0000, 0x9555, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), - CS_PLAYER_CUE(0x0013, 600, 1243, 0x0000, 0x1555, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), + CS_PLAYER_CUE(PLAYER_CUEID_13, 0, 261, 0x0000, 0x0000, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 261, 600, 0x0000, 0x9555, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), + CS_PLAYER_CUE(PLAYER_CUEID_19, 600, 1243, 0x0000, 0x1555, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), CS_ACTOR_CUE_LIST(43, 3), CS_ACTOR_CUE(0x0001, 0, 165, 0x0000, 0x0000, 0x0000, -98, 6, -169, -98, 6, -169, 0.0f, 0.0f, 0.0f), CS_ACTOR_CUE(0x0002, 165, 466, 0x0000, 0x0000, 0x0000, -98, 6, -169, -98, 6, -169, 0.0f, 0.0f, 0.0f), diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index 6af9eed0a1..96fb581b9f 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -409,7 +409,8 @@ typedef struct { } CsActionEntry; // size = 0x8 static CsActionEntry sCsActionTable[] = { - { 36, 1 }, { 37, 2 }, { 38, 3 }, { 64, 4 }, { 65, 5 }, + { PLAYER_CUEID_36, 1 }, { PLAYER_CUEID_37, 2 }, { PLAYER_CUEID_38, 3 }, + { PLAYER_CUEID_64, 4 }, { PLAYER_CUEID_65, 5 }, }; static RaceWaypoint sHbaWaypoints[] = { diff --git a/src/overlays/actors/ovl_En_Jj/z_en_jj_cutscene_data.inc.c b/src/overlays/actors/ovl_En_Jj/z_en_jj_cutscene_data.inc.c index 8405db958b..4f29c43c31 100644 --- a/src/overlays/actors/ovl_En_Jj/z_en_jj_cutscene_data.inc.c +++ b/src/overlays/actors/ovl_En_Jj/z_en_jj_cutscene_data.inc.c @@ -5,10 +5,10 @@ static CutsceneData D_80A88164[] = { CS_BEGIN_CUTSCENE(26, 1629), CS_PLAYER_CUE_LIST(4), - CS_PLAYER_CUE(0x0005, 0, 240, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037e-29f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0003, 240, 255, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037e-29f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0006, 255, 285, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037e-29f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0020, 285, 300, 0x0000, 0xC000, 0x0000, -1732, 52, -44, -1537, 109, -44, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 0, 240, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_3, 240, 255, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_6, 255, 285, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_32, 285, 300, 0x0000, 0xC000, 0x0000, -1732, 52, -44, -1537, 109, -44, 1.1393037e-29f, 0.0f, 1.4e-45f), CS_ACTOR_CUE_LIST(68, 4), CS_ACTOR_CUE(0x0001, 0, 234, 0x0000, 0x4000, 0x0000, -1665, 52, -44, -1665, 52, -44, 1.1393037e-29f, 0.0f, 1.4e-45f), CS_ACTOR_CUE(0x0002, 234, 241, 0x41F8, 0x0000, 0x0000, -1665, 52, -44, -1603, 130, -47, 8.857142f, 11.142858f, -8.857142f), @@ -28,7 +28,7 @@ static CutsceneData D_80A88164[] = { CS_MISC(CS_MISC_STOP_CUTSCENE, 1095, 1161, 0x0000, 0x00000000, 0xFFFFFFD2, 0x00000000, 0xFFFFFFD0, 0xFFFFFFD2, 0x00000000, 0xFFFFFFD0, 0x00000000, 0x00000000, 0x00000000), CS_TRANSITION(CS_TRANS_TRIGGER_INSTANCE, 0, 10), CS_PLAYER_CUE_LIST(1), - CS_PLAYER_CUE(0x0035, 300, 1629, 0x0000, 0x0000, 0x0000, -1630, 52, -52, -1630, 52, -52, 0.0f, 0.0f, 0.0f), + CS_PLAYER_CUE(PLAYER_CUEID_53, 300, 1629, 0x0000, 0x0000, 0x0000, -1630, 52, -52, -1630, 52, -52, 0.0f, 0.0f, 0.0f), CS_CAM_EYE_SPLINE(0, 1091), CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, 45.399944f, -1641, 95, -41, 0x015C), CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, 45.399944f, -1641, 95, -41, 0x016D), diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb_cutscene_data.inc.c b/src/overlays/actors/ovl_En_Nb/z_en_nb_cutscene_data.inc.c index 5593a51ab7..fc6743ef73 100644 --- a/src/overlays/actors/ovl_En_Nb/z_en_nb_cutscene_data.inc.c +++ b/src/overlays/actors/ovl_En_Nb/z_en_nb_cutscene_data.inc.c @@ -13,9 +13,9 @@ static CutsceneData D_80AB431C[] = { CS_ACTOR_CUE(0x0002, 573, 621, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 82, 0, 0.0f, -2.7916667f, 0.0f), CS_ACTOR_CUE(0x0003, 621, 3011, 0x0000, 0x0000, 0x0000, 0, 82, 0, 0, 82, 0, 0.0f, 0.0f, 0.0f), CS_PLAYER_CUE_LIST(3), - CS_PLAYER_CUE(0x000D, 0, 240, 0x0000, 0x1555, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 1.401298464324817e-45f), - CS_PLAYER_CUE(0x0005, 240, 461, 0x0000, 0x1555, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 1.401298464324817e-45f), - CS_PLAYER_CUE(0x0013, 461, 1616, 0x0000, 0x9555, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_13, 0, 240, 0x0000, 0x1555, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 240, 461, 0x0000, 0x1555, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_19, 461, 1616, 0x0000, 0x9555, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 1.401298464324817e-45f), CS_ACTOR_CUE_LIST(49, 1), CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -16, -121, 0, -16, -121, 0.0f, 0.0f, 0.0f), CS_LIGHT_SETTING_LIST(1), diff --git a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.c b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.c index 3d2c0a0ff0..1725be2f09 100644 --- a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.c +++ b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.c @@ -33,9 +33,9 @@ CutsceneData D_80ABFB40[] = { CS_UNK_DATA_LIST(0x00000021, 1), CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0xFFFFFFAA, 0xFFFFFFAE, 0x00000000, 0xFFFFFFAA, 0xFFFFFFAE, 0x00000000, 0x00000000, 0x00000000), CS_PLAYER_CUE_LIST(3), - CS_PLAYER_CUE(0x0011, 0, 80, 0x0000, 0x8000, 0x0000, 0, -40, 1400, 0, -40, 1400, 0.0f, 0.0f, 1.401298464324817e-45f), - CS_PLAYER_CUE(0x0012, 80, 201, 0x0000, 0x8000, 0x0000, 0, -40, 1400, 0, -40, 1400, 0.0f, 0.0f, 1.401298464324817e-45f), - CS_PLAYER_CUE(0x0005, 201, 662, 0x0000, 0x8000, 0x0000, 0, -40, 1400, 0, -40, 1400, 0.0f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_17, 0, 80, 0x0000, 0x8000, 0x0000, 0, -40, 1400, 0, -40, 1400, 0.0f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_18, 80, 201, 0x0000, 0x8000, 0x0000, 0, -40, 1400, 0, -40, 1400, 0.0f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 201, 662, 0x0000, 0x8000, 0x0000, 0, -40, 1400, 0, -40, 1400, 0.0f, 0.0f, 1.401298464324817e-45f), CS_MISC_LIST(1), CS_MISC(CS_MISC_TRIFORCE_FLASH, 510, 611, 0x0000, 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000), CS_ACTOR_CUE_LIST(48, 1), diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1_cutscene_data.inc.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1_cutscene_data.inc.c index 93b710cd9e..ade4ca4fa7 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1_cutscene_data.inc.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1_cutscene_data.inc.c @@ -5,16 +5,16 @@ static CutsceneData D_80AF0880[] = { CS_BEGIN_CUTSCENE(15, 1306), CS_PLAYER_CUE_LIST(10), - CS_PLAYER_CUE(0x0027, 0, 50, 0x0000, 0x6C16, 0x0000, 12, -340, -2810, 12, -340, -2810, 1.1393037e-29f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0003, 50, 70, 0x0000, 0x6C16, 0x0000, 12, -340, -2810, 12, -340, -2810, 1.1393037e-29f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0005, 70, 109, 0x0000, 0x6C16, 0x0000, 12, -340, -2810, 12, -340, -2810, 1.1393037e-29f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0002, 109, 135, 0x0000, 0x6C16, 0x0000, 12, -340, -2810, 100, -340, -2991, 1.1393037e-29f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0005, 135, 199, 0x0000, 0x6C16, 0x0000, 100, -340, -2991, 100, -340, -2991, 1.1393037e-29f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0003, 199, 219, 0x0000, 0x6C16, 0x0000, 100, -340, -2991, 100, -340, -2991, 1.1393037e-29f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0005, 219, 259, 0x0000, 0x6C16, 0x0000, 100, -340, -2991, 100, -340, -2991, 1.1393037e-29f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0003, 259, 276, 0x0000, 0x6C16, 0x0000, 100, -340, -2991, 100, -340, -2991, 1.1393037e-29f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0002, 276, 297, 0x0000, 0x6C16, 0x0000, 100, -340, -2991, 182, -340, -3132, 1.1393037e-29f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0005, 297, 843, 0x0000, 0x6C16, 0x0000, 182, -340, -3132, 182, -340, -3132, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_39, 0, 50, 0x0000, 0x6C16, 0x0000, 12, -340, -2810, 12, -340, -2810, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_3, 50, 70, 0x0000, 0x6C16, 0x0000, 12, -340, -2810, 12, -340, -2810, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 70, 109, 0x0000, 0x6C16, 0x0000, 12, -340, -2810, 12, -340, -2810, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_2, 109, 135, 0x0000, 0x6C16, 0x0000, 12, -340, -2810, 100, -340, -2991, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 135, 199, 0x0000, 0x6C16, 0x0000, 100, -340, -2991, 100, -340, -2991, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_3, 199, 219, 0x0000, 0x6C16, 0x0000, 100, -340, -2991, 100, -340, -2991, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 219, 259, 0x0000, 0x6C16, 0x0000, 100, -340, -2991, 100, -340, -2991, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_3, 259, 276, 0x0000, 0x6C16, 0x0000, 100, -340, -2991, 100, -340, -2991, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_2, 276, 297, 0x0000, 0x6C16, 0x0000, 100, -340, -2991, 182, -340, -3132, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 297, 843, 0x0000, 0x6C16, 0x0000, 182, -340, -3132, 182, -340, -3132, 1.1393037e-29f, 0.0f, 1.4e-45f), CS_ACTOR_CUE_LIST(63, 4), CS_ACTOR_CUE(0x0002, 0, 178, 0x0000, 0xEC16, 0x0000, 127, -340, -3041, 127, -340, -3041, 1.1393037e-29f, 0.0f, 1.4e-45f), CS_ACTOR_CUE(0x0003, 178, 245, 0x0000, 0x6C16, 0x0000, 127, -340, -3041, 127, -340, -3041, 1.1393037e-29f, 0.0f, 1.4e-45f), @@ -115,9 +115,9 @@ static u32 D_80AF10A0 = 0; static CutsceneData D_80AF10A4[] = { CS_BEGIN_CUTSCENE(14, 1299), CS_PLAYER_CUE_LIST(3), - CS_PLAYER_CUE(0x0005, 0, 272, 0x0000, 0xC000, 0x0000, -1085, -1025, -3347, -1085, -1025, -3347, 1.1393037e-29f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0003, 272, 292, 0x0000, 0xC000, 0x0000, -1085, -1025, -3347, -1085, -1025, -3347, 1.1393037e-29f, 0.0f, 1.4e-45f), - CS_PLAYER_CUE(0x0005, 292, 777, 0x0000, 0xC000, 0x0000, -1085, -1025, -3347, -1085, -1025, -3347, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 0, 272, 0x0000, 0xC000, 0x0000, -1085, -1025, -3347, -1085, -1025, -3347, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_3, 272, 292, 0x0000, 0xC000, 0x0000, -1085, -1025, -3347, -1085, -1025, -3347, 1.1393037e-29f, 0.0f, 1.4e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 292, 777, 0x0000, 0xC000, 0x0000, -1085, -1025, -3347, -1085, -1025, -3347, 1.1393037e-29f, 0.0f, 1.4e-45f), CS_MISC_LIST(1), CS_MISC(CS_MISC_STOP_CUTSCENE, 330, 627, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFC0, 0x00000032, 0x00000000, 0xFFFFFFC0, 0x00000032, 0x00000000, 0x00000000, 0x00000000), CS_ACTOR_CUE_LIST(66, 3), diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2_cutscene_data.inc.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2_cutscene_data.inc.c index cd1cfcdf11..efc9e0cf4e 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2_cutscene_data.inc.c +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2_cutscene_data.inc.c @@ -13,11 +13,11 @@ static CutsceneData D_80AF411C[] = { CS_ACTOR_CUE(0x0002, 898, 948, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 82, 0, 0.0f, -2.68f, 0.0f), CS_ACTOR_CUE(0x0003, 948, 3338, 0x0000, 0x0000, 0x0000, 0, 82, 0, 0, 82, 0, 0.0f, 0.0f, 0.0f), CS_PLAYER_CUE_LIST(5), - CS_PLAYER_CUE(0x000D, 0, 240, 0x0000, 0x0000, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), - CS_PLAYER_CUE(0x0005, 240, 520, 0x0000, 0x4000, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), - CS_PLAYER_CUE(0x0003, 520, 550, 0x0000, 0x4000, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), - CS_PLAYER_CUE(0x0005, 550, 801, 0x0000, 0x4000, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), - CS_PLAYER_CUE(0x0013, 801, 1956, 0x0000, 0xC000, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), + CS_PLAYER_CUE(PLAYER_CUEID_13, 0, 240, 0x0000, 0x0000, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 240, 520, 0x0000, 0x4000, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), + CS_PLAYER_CUE(PLAYER_CUEID_3, 520, 550, 0x0000, 0x4000, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 550, 801, 0x0000, 0x4000, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), + CS_PLAYER_CUE(PLAYER_CUEID_19, 801, 1956, 0x0000, 0xC000, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f), CS_ACTOR_CUE_LIST(49, 1), CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -16, -121, 0, -16, -121, 0.0f, 0.0f, 0.0f), CS_LIGHT_SETTING_LIST(5), diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c index 3c05f2cb6b..7895f776bd 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c @@ -5,9 +5,9 @@ CutsceneData D_80B4C5D0[] = { CS_BEGIN_CUTSCENE(28, 3000), CS_PLAYER_CUE_LIST(3), - CS_PLAYER_CUE(0x0005, 400, 1211, 0x0000, 0xC000, 0x0000, -422, 84, 1, -422, 84, 1, 1.1266861702801002e-29f, 0.0f, 1.401298464324817e-45f), - CS_PLAYER_CUE(0x0001, 1211, 1241, 0x0000, 0xC000, 0x0000, -422, 84, 1, -483, 84, 0, 1.1266861702801002e-29f, 0.0f, 1.401298464324817e-45f), - CS_PLAYER_CUE(0x0029, 1241, 1311, 0x0000, 0xC000, 0x0000, -483, 84, 0, -483, 84, 0, 1.1266861702801002e-29f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_5, 400, 1211, 0x0000, 0xC000, 0x0000, -422, 84, 1, -422, 84, 1, 1.1266861702801002e-29f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_1, 1211, 1241, 0x0000, 0xC000, 0x0000, -422, 84, 1, -483, 84, 0, 1.1266861702801002e-29f, 0.0f, 1.401298464324817e-45f), + CS_PLAYER_CUE(PLAYER_CUEID_41, 1241, 1311, 0x0000, 0xC000, 0x0000, -483, 84, 0, -483, 84, 0, 1.1266861702801002e-29f, 0.0f, 1.401298464324817e-45f), CS_ACTOR_CUE_LIST(18, 1), CS_ACTOR_CUE(0x0007, 1170, 1316, 0x7477, 0x0000, 0x0000, -485, 84, 0, -469, 85, -55, 0.10958904f, 0.006849315f, -0.10958904f), CS_UNK_DATA_LIST(0x00000049, 1), diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index a7d9c45e6b..6eedae7a5f 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -10767,23 +10767,85 @@ void func_80848EF8(Player* this) { } } -static s8 D_808547C4[] = { - PLAYER_CSACTION_NONE, PLAYER_CSACTION_3, PLAYER_CSACTION_3, PLAYER_CSACTION_5, PLAYER_CSACTION_4, - PLAYER_CSACTION_8, PLAYER_CSACTION_9, PLAYER_CSACTION_13, PLAYER_CSACTION_14, PLAYER_CSACTION_15, - PLAYER_CSACTION_16, PLAYER_CSACTION_17, PLAYER_CSACTION_18, -PLAYER_CSACTION_22, PLAYER_CSACTION_23, - PLAYER_CSACTION_24, PLAYER_CSACTION_25, PLAYER_CSACTION_26, PLAYER_CSACTION_27, PLAYER_CSACTION_28, - PLAYER_CSACTION_29, PLAYER_CSACTION_31, PLAYER_CSACTION_32, PLAYER_CSACTION_33, PLAYER_CSACTION_34, - -PLAYER_CSACTION_35, PLAYER_CSACTION_30, PLAYER_CSACTION_36, PLAYER_CSACTION_38, -PLAYER_CSACTION_39, - -PLAYER_CSACTION_40, -PLAYER_CSACTION_41, PLAYER_CSACTION_42, PLAYER_CSACTION_43, PLAYER_CSACTION_45, - PLAYER_CSACTION_46, PLAYER_CSACTION_NONE, PLAYER_CSACTION_NONE, PLAYER_CSACTION_NONE, PLAYER_CSACTION_67, - PLAYER_CSACTION_48, PLAYER_CSACTION_47, -PLAYER_CSACTION_50, PLAYER_CSACTION_51, -PLAYER_CSACTION_52, - -PLAYER_CSACTION_53, PLAYER_CSACTION_54, PLAYER_CSACTION_55, PLAYER_CSACTION_56, PLAYER_CSACTION_57, - PLAYER_CSACTION_58, PLAYER_CSACTION_59, PLAYER_CSACTION_60, PLAYER_CSACTION_61, PLAYER_CSACTION_62, - PLAYER_CSACTION_63, PLAYER_CSACTION_64, -PLAYER_CSACTION_65, -PLAYER_CSACTION_66, PLAYER_CSACTION_68, - PLAYER_CSACTION_11, PLAYER_CSACTION_69, PLAYER_CSACTION_70, PLAYER_CSACTION_71, PLAYER_CSACTION_8, - PLAYER_CSACTION_8, PLAYER_CSACTION_72, PLAYER_CSACTION_73, PLAYER_CSACTION_78, PLAYER_CSACTION_79, - PLAYER_CSACTION_80, PLAYER_CSACTION_89, PLAYER_CSACTION_90, PLAYER_CSACTION_91, PLAYER_CSACTION_92, - PLAYER_CSACTION_77, PLAYER_CSACTION_19, PLAYER_CSACTION_94, +static s8 sCueToCsActionMap[PLAYER_CUEID_MAX] = { + PLAYER_CSACTION_NONE, // PLAYER_CUEID_NONE + PLAYER_CSACTION_3, // PLAYER_CUEID_1 + PLAYER_CSACTION_3, // PLAYER_CUEID_2 + PLAYER_CSACTION_5, // PLAYER_CUEID_3 + PLAYER_CSACTION_4, // PLAYER_CUEID_4 + PLAYER_CSACTION_8, // PLAYER_CUEID_5 + PLAYER_CSACTION_9, // PLAYER_CUEID_6 + PLAYER_CSACTION_13, // PLAYER_CUEID_7 + PLAYER_CSACTION_14, // PLAYER_CUEID_8 + PLAYER_CSACTION_15, // PLAYER_CUEID_9 + PLAYER_CSACTION_16, // PLAYER_CUEID_10 + PLAYER_CSACTION_17, // PLAYER_CUEID_11 + PLAYER_CSACTION_18, // PLAYER_CUEID_12 + -PLAYER_CSACTION_22, // PLAYER_CUEID_13 + PLAYER_CSACTION_23, // PLAYER_CUEID_14 + PLAYER_CSACTION_24, // PLAYER_CUEID_15 + PLAYER_CSACTION_25, // PLAYER_CUEID_16 + PLAYER_CSACTION_26, // PLAYER_CUEID_17 + PLAYER_CSACTION_27, // PLAYER_CUEID_18 + PLAYER_CSACTION_28, // PLAYER_CUEID_19 + PLAYER_CSACTION_29, // PLAYER_CUEID_20 + PLAYER_CSACTION_31, // PLAYER_CUEID_21 + PLAYER_CSACTION_32, // PLAYER_CUEID_22 + PLAYER_CSACTION_33, // PLAYER_CUEID_23 + PLAYER_CSACTION_34, // PLAYER_CUEID_24 + -PLAYER_CSACTION_35, // PLAYER_CUEID_25 + PLAYER_CSACTION_30, // PLAYER_CUEID_26 + PLAYER_CSACTION_36, // PLAYER_CUEID_27 + PLAYER_CSACTION_38, // PLAYER_CUEID_28 + -PLAYER_CSACTION_39, // PLAYER_CUEID_29 + -PLAYER_CSACTION_40, // PLAYER_CUEID_30 + -PLAYER_CSACTION_41, // PLAYER_CUEID_31 + PLAYER_CSACTION_42, // PLAYER_CUEID_32 + PLAYER_CSACTION_43, // PLAYER_CUEID_33 + PLAYER_CSACTION_45, // PLAYER_CUEID_34 + PLAYER_CSACTION_46, // PLAYER_CUEID_35 + PLAYER_CSACTION_NONE, // PLAYER_CUEID_36 + PLAYER_CSACTION_NONE, // PLAYER_CUEID_37 + PLAYER_CSACTION_NONE, // PLAYER_CUEID_38 + PLAYER_CSACTION_67, // PLAYER_CUEID_39 + PLAYER_CSACTION_48, // PLAYER_CUEID_40 + PLAYER_CSACTION_47, // PLAYER_CUEID_41 + -PLAYER_CSACTION_50, // PLAYER_CUEID_42 + PLAYER_CSACTION_51, // PLAYER_CUEID_43 + -PLAYER_CSACTION_52, // PLAYER_CUEID_44 + -PLAYER_CSACTION_53, // PLAYER_CUEID_45 + PLAYER_CSACTION_54, // PLAYER_CUEID_46 + PLAYER_CSACTION_55, // PLAYER_CUEID_47 + PLAYER_CSACTION_56, // PLAYER_CUEID_48 + PLAYER_CSACTION_57, // PLAYER_CUEID_49 + PLAYER_CSACTION_58, // PLAYER_CUEID_50 + PLAYER_CSACTION_59, // PLAYER_CUEID_51 + PLAYER_CSACTION_60, // PLAYER_CUEID_52 + PLAYER_CSACTION_61, // PLAYER_CUEID_53 + PLAYER_CSACTION_62, // PLAYER_CUEID_54 + PLAYER_CSACTION_63, // PLAYER_CUEID_55 + PLAYER_CSACTION_64, // PLAYER_CUEID_56 + -PLAYER_CSACTION_65, // PLAYER_CUEID_57 + -PLAYER_CSACTION_66, // PLAYER_CUEID_58 + PLAYER_CSACTION_68, // PLAYER_CUEID_59 + PLAYER_CSACTION_11, // PLAYER_CUEID_60 + PLAYER_CSACTION_69, // PLAYER_CUEID_61 + PLAYER_CSACTION_70, // PLAYER_CUEID_62 + PLAYER_CSACTION_71, // PLAYER_CUEID_63 + PLAYER_CSACTION_8, // PLAYER_CUEID_64 + PLAYER_CSACTION_8, // PLAYER_CUEID_65 + PLAYER_CSACTION_72, // PLAYER_CUEID_66 + PLAYER_CSACTION_73, // PLAYER_CUEID_67 + PLAYER_CSACTION_78, // PLAYER_CUEID_68 + PLAYER_CSACTION_79, // PLAYER_CUEID_69 + PLAYER_CSACTION_80, // PLAYER_CUEID_70 + PLAYER_CSACTION_89, // PLAYER_CUEID_71 + PLAYER_CSACTION_90, // PLAYER_CUEID_72 + PLAYER_CSACTION_91, // PLAYER_CUEID_73 + PLAYER_CSACTION_92, // PLAYER_CUEID_74 + PLAYER_CSACTION_77, // PLAYER_CUEID_75 + PLAYER_CSACTION_19, // PLAYER_CUEID_76 + PLAYER_CSACTION_94, // PLAYER_CUEID_77 }; static Vec3f D_80854814 = { 0.0f, 0.0f, 200.0f }; @@ -11054,7 +11116,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { (this->actor.category == ACTORCAT_PLAYER)) { CsCmdActorCue* cue = play->csCtx.playerCue; - if ((cue != NULL) && (D_808547C4[cue->id] != PLAYER_CSACTION_NONE)) { + if ((cue != NULL) && (sCueToCsActionMap[cue->id] != PLAYER_CSACTION_NONE)) { func_8002DF54(play, NULL, PLAYER_CSACTION_6); Player_ZeroSpeedXZ(this); } else if ((this->csAction == PLAYER_CSACTION_NONE) && !(this->stateFlags2 & PLAYER_STATE2_10) && @@ -14399,7 +14461,7 @@ void func_808515A4(PlayState* play, Player* this, CsCmdActorCue* cue) { anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_nwait, this->modelAnimType); - if ((this->cueId == 6) || (this->cueId == 0x2E)) { + if ((this->cueId == PLAYER_CUEID_6) || (this->cueId == PLAYER_CUEID_46)) { Player_AnimPlayOnce(play, this, anim); } else { Player_ZeroRootLimbYaw(this); @@ -15000,7 +15062,7 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cueUnused) { if (play->csCtx.state == CS_STATE_STOP) { func_8002DF54(play, NULL, PLAYER_CSACTION_7); - this->cueId = 0; + this->cueId = PLAYER_CUEID_NONE; Player_ZeroSpeedXZ(this); return; } @@ -15011,7 +15073,7 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cueUnused) { } if (this->cueId != cue->id) { - csAction = D_808547C4[cue->id]; + csAction = sCueToCsActionMap[cue->id]; if (csAction >= PLAYER_CSACTION_NONE) { if ((csAction == PLAYER_CSACTION_3) || (csAction == PLAYER_CSACTION_4)) { @@ -15033,7 +15095,7 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cueUnused) { this->cueId = cue->id; } - csAction = D_808547C4[this->cueId]; + csAction = sCueToCsActionMap[this->cueId]; func_80852B4C(play, this, cue, &D_80854E50[ABS(csAction)]); } From ebc6ebf232de3250a5a365690a5644d35955bf71 Mon Sep 17 00:00:00 2001 From: fig02 Date: Thu, 5 Oct 2023 10:22:40 -0400 Subject: [PATCH 07/16] Player Docs: Initial AnimSfx stuff (#1556) * initial animsfx docs * review * extra space --- .../actors/ovl_player_actor/z_player.c | 427 ++++++++++-------- 1 file changed, 236 insertions(+), 191 deletions(-) diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 6eedae7a5f..0debb6cd74 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -74,10 +74,29 @@ typedef struct { /* 0x0C */ s16 yaw; } SpecialRespawnInfo; // size = 0x10 +typedef enum { + /* 1 */ ANIMSFX_TYPE_1 = 1, + /* 2 */ ANIMSFX_TYPE_2, + /* 3 */ ANIMSFX_TYPE_3, + /* 4 */ ANIMSFX_TYPE_4, + /* 5 */ ANIMSFX_TYPE_5, + /* 6 */ ANIMSFX_TYPE_6, + /* 7 */ ANIMSFX_TYPE_7, + /* 8 */ ANIMSFX_TYPE_8, + /* 9 */ ANIMSFX_TYPE_9 +} AnimSfxType; + +#define ANIMSFX_SHIFT_TYPE(type) ((type) << 11) + +#define ANIMSFX_DATA(type, frame) ((ANIMSFX_SHIFT_TYPE(type) | ((frame)&0x7FF))) + +#define ANIMSFX_GET_TYPE(data) ((data)&0x7800) +#define ANIMSFX_GET_FRAME(data) ((data)&0x7FF) + typedef struct { /* 0x00 */ u16 sfxId; - /* 0x02 */ s16 field; -} struct_80832924; // size = 0x04 + /* 0x02 */ s16 data; +} AnimSfxEntry; // size = 0x04 typedef struct { /* 0x00 */ u16 unk_00; @@ -1099,54 +1118,57 @@ static LinkAnimationHeader* D_80853D7C[][2] = { { &gPlayerAnim_link_wait_itemD2_20f, &gPlayerAnim_link_wait_itemD2_20f } }; -static struct_80832924 D_80853DEC[] = { - { NA_SE_VO_LI_SNEEZE, -0x2008 }, +static AnimSfxEntry D_80853DEC[] = { + { NA_SE_VO_LI_SNEEZE, -ANIMSFX_DATA(ANIMSFX_TYPE_4, 8) }, }; -static struct_80832924 D_80853DF0[] = { - { NA_SE_VO_LI_SWEAT, -0x2012 }, +static AnimSfxEntry D_80853DF0[] = { + { NA_SE_VO_LI_SWEAT, -ANIMSFX_DATA(ANIMSFX_TYPE_4, 18) }, }; -static struct_80832924 D_80853DF4[] = { - { NA_SE_VO_LI_BREATH_REST, -0x200D }, +static AnimSfxEntry D_80853DF4[] = { + { NA_SE_VO_LI_BREATH_REST, -ANIMSFX_DATA(ANIMSFX_TYPE_4, 13) }, }; -static struct_80832924 D_80853DF8[] = { - { NA_SE_VO_LI_BREATH_REST, -0x200A }, +static AnimSfxEntry D_80853DF8[] = { + { NA_SE_VO_LI_BREATH_REST, -ANIMSFX_DATA(ANIMSFX_TYPE_4, 10) }, }; -static struct_80832924 D_80853DFC[] = { - { NA_SE_PL_CALM_HIT, 0x82C }, { NA_SE_PL_CALM_HIT, 0x830 }, { NA_SE_PL_CALM_HIT, 0x834 }, - { NA_SE_PL_CALM_HIT, 0x838 }, { NA_SE_PL_CALM_HIT, -0x83C }, +static AnimSfxEntry D_80853DFC[] = { + { NA_SE_PL_CALM_HIT, ANIMSFX_DATA(ANIMSFX_TYPE_1, 44) }, { NA_SE_PL_CALM_HIT, ANIMSFX_DATA(ANIMSFX_TYPE_1, 48) }, + { NA_SE_PL_CALM_HIT, ANIMSFX_DATA(ANIMSFX_TYPE_1, 52) }, { NA_SE_PL_CALM_HIT, ANIMSFX_DATA(ANIMSFX_TYPE_1, 56) }, + { NA_SE_PL_CALM_HIT, -ANIMSFX_DATA(ANIMSFX_TYPE_1, 60) }, }; -static struct_80832924 D_80853E10[] = { - { 0, 0x4019 }, { 0, 0x401E }, { 0, 0x402C }, { 0, 0x4030 }, { 0, 0x4034 }, { 0, -0x4038 }, +static AnimSfxEntry D_80853E10[] = { + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_8, 25) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_8, 30) }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_8, 44) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_8, 48) }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_8, 52) }, { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_8, 56) }, }; -static struct_80832924 D_80853E28[] = { - { NA_SE_IT_SHIELD_POSTURE, 0x810 }, - { NA_SE_IT_SHIELD_POSTURE, 0x814 }, - { NA_SE_IT_SHIELD_POSTURE, -0x846 }, +static AnimSfxEntry D_80853E28[] = { + { NA_SE_IT_SHIELD_POSTURE, ANIMSFX_DATA(ANIMSFX_TYPE_1, 16) }, + { NA_SE_IT_SHIELD_POSTURE, ANIMSFX_DATA(ANIMSFX_TYPE_1, 20) }, + { NA_SE_IT_SHIELD_POSTURE, -ANIMSFX_DATA(ANIMSFX_TYPE_1, 70) }, }; -static struct_80832924 D_80853E34[] = { - { NA_SE_IT_HAMMER_SWING, 0x80A }, - { NA_SE_VO_LI_AUTO_JUMP, 0x200A }, - { NA_SE_IT_SWORD_SWING, 0x816 }, - { NA_SE_VO_LI_SWORD_N, -0x2016 }, +static AnimSfxEntry D_80853E34[] = { + { NA_SE_IT_HAMMER_SWING, ANIMSFX_DATA(ANIMSFX_TYPE_1, 10) }, + { NA_SE_VO_LI_AUTO_JUMP, ANIMSFX_DATA(ANIMSFX_TYPE_4, 10) }, + { NA_SE_IT_SWORD_SWING, ANIMSFX_DATA(ANIMSFX_TYPE_1, 22) }, + { NA_SE_VO_LI_SWORD_N, -ANIMSFX_DATA(ANIMSFX_TYPE_4, 22) }, }; -static struct_80832924 D_80853E44[] = { - { NA_SE_IT_SWORD_SWING, 0x827 }, - { NA_SE_VO_LI_SWORD_N, -0x2027 }, +static AnimSfxEntry D_80853E44[] = { + { NA_SE_IT_SWORD_SWING, ANIMSFX_DATA(ANIMSFX_TYPE_1, 39) }, + { NA_SE_VO_LI_SWORD_N, -ANIMSFX_DATA(ANIMSFX_TYPE_4, 39) }, }; -static struct_80832924 D_80853E4C[] = { - { NA_SE_VO_LI_RELAX, -0x2014 }, +static AnimSfxEntry D_80853E4C[] = { + { NA_SE_VO_LI_RELAX, -ANIMSFX_DATA(ANIMSFX_TYPE_4, 20) }, }; -static struct_80832924* D_80853E50[] = { +static AnimSfxEntry* D_80853E50[] = { D_80853DEC, D_80853DF0, D_80853DF4, D_80853DF8, D_80853DFC, D_80853E10, D_80853E28, D_80853E34, D_80853E44, D_80853E4C, NULL, }; @@ -1797,38 +1819,50 @@ void func_808328EC(Player* this, u16 sfxId) { this->stateFlags2 |= PLAYER_STATE2_3; } -void func_80832924(Player* this, struct_80832924* entry) { - s32 data; - s32 flags; - u32 cont; +/** + * Process a list of `AnimSfx` entries. + * An `AnimSfx` entry contains a sound effect to play, a frame number that indicates + * when during an animation it should play, and a type value that indicates how it should be played back. + * + * The list will stop being processed after an entry that has a negative value for the `data` field. + * + * Some types do not make use of `sfxId`, the SFX function called will pick a sound on its own. + * The `sfxId` field is not used in this case and can be any value, but 0 is typically used. + * + * @param entry A pointer to the first entry of an `AnimSfx` list. + */ +void Player_ProcessAnimSfxList(Player* this, AnimSfxEntry* entry) { + s32 cont; s32 pad; do { - data = ABS(entry->field); - flags = data & 0x7800; - if (LinkAnimation_OnFrame(&this->skelAnime, fabsf(data & 0x7FF))) { - if (flags == 0x800) { + s32 absData = ABS(entry->data); + s32 type = ANIMSFX_GET_TYPE(absData); + + if (LinkAnimation_OnFrame(&this->skelAnime, fabsf(ANIMSFX_GET_FRAME(absData)))) { + if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_1)) { Player_PlaySfx(this, entry->sfxId); - } else if (flags == 0x1000) { + } else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_2)) { func_80832770(this, entry->sfxId); - } else if (flags == 0x1800) { + } else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_3)) { func_808327C4(this, entry->sfxId); - } else if (flags == 0x2000) { + } else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_4)) { func_80832698(this, entry->sfxId); - } else if (flags == 0x2800) { + } else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_5)) { func_808328A0(this); - } else if (flags == 0x3000) { + } else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_6)) { func_808327F8(this, 6.0f); - } else if (flags == 0x3800) { + } else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_7)) { func_80832854(this); - } else if (flags == 0x4000) { + } else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_8)) { func_808327F8(this, 0.0f); - } else if (flags == 0x4800) { + } else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_9)) { func_800F4010(&this->actor.projectedPos, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD + this->ageProperties->unk_94, 0.0f); } } - cont = (entry->field >= 0); + + cont = (entry->data >= 0); // stop processing if `data` is negative entry++; } while (cont); } @@ -2043,7 +2077,7 @@ s32 func_80833350(Player* this) { void func_808333FC(Player* this, s32 arg1) { if (D_80853E7C[arg1] != 0) { - func_80832924(this, D_80853E50[D_80853E7C[arg1] - 1]); + Player_ProcessAnimSfxList(this, D_80853E50[D_80853E7C[arg1] - 1]); } } @@ -8623,9 +8657,9 @@ void Player_Action_80843954(Player* this, PlayState* play) { } } -static struct_80832924 D_808545DC[] = { - { 0, 0x4014 }, - { 0, -0x401E }, +static AnimSfxEntry D_808545DC[] = { + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_8, 20) }, + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_8, 30) }, }; void Player_Action_80843A38(Player* this, PlayState* play) { @@ -8643,7 +8677,7 @@ void Player_Action_80843A38(Player* this, PlayState* play) { } } - func_80832924(this, D_808545DC); + Player_ProcessAnimSfxList(this, D_808545DC); } static Vec3f D_808545E4 = { 0.0f, 0.0f, 5.0f }; @@ -8685,11 +8719,11 @@ void func_80843AE8(PlayState* play, Player* this) { } } -static struct_80832924 D_808545F0[] = { - { NA_SE_PL_BOUND, 0x103C }, - { 0, 0x408C }, - { 0, 0x40A4 }, - { 0, -0x40AA }, +static AnimSfxEntry D_808545F0[] = { + { NA_SE_PL_BOUND, ANIMSFX_DATA(ANIMSFX_TYPE_2, 60) }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_8, 140) }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_8, 164) }, + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_8, 170) }, }; void Player_Action_80843CEC(Player* this, PlayState* play) { @@ -8711,7 +8745,7 @@ void Player_Action_80843CEC(Player* this, PlayState* play) { } if (this->skelAnime.animation == &gPlayerAnim_link_derth_rebirth) { - func_80832924(this, D_808545F0); + Player_ProcessAnimSfxList(this, D_808545F0); } else if (this->skelAnime.animation == &gPlayerAnim_link_normal_electric_shock_end) { if (LinkAnimation_OnFrame(&this->skelAnime, 88.0f)) { func_80832770(this, NA_SE_PL_BOUND); @@ -8916,11 +8950,11 @@ void Player_Action_8084411C(Player* this, PlayState* play) { } } -static struct_80832924 D_8085460C[] = { - { NA_SE_VO_LI_SWORD_N, 0x2001 }, - { NA_SE_PL_WALK_GROUND, 0x1806 }, - { NA_SE_PL_ROLL, 0x806 }, - { 0, -0x2812 }, +static AnimSfxEntry D_8085460C[] = { + { NA_SE_VO_LI_SWORD_N, ANIMSFX_DATA(ANIMSFX_TYPE_4, 1) }, + { NA_SE_PL_WALK_GROUND, ANIMSFX_DATA(ANIMSFX_TYPE_3, 6) }, + { NA_SE_PL_ROLL, ANIMSFX_DATA(ANIMSFX_TYPE_1, 6) }, + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_5, 18) }, }; void Player_Action_80844708(Player* this, PlayState* play) { @@ -8997,7 +9031,7 @@ void Player_Action_80844708(Player* this, PlayState* play) { func_8002F8F0(&this->actor, NA_SE_PL_ROLL_DUST - SFX_FLAG); } - func_80832924(this, D_8085460C); + Player_ProcessAnimSfxList(this, D_8085460C); } } } @@ -9547,9 +9581,9 @@ void Player_Action_80846050(Player* this, PlayState* play) { Math_ScaledStepToS(&this->unk_3BC.y, 0, 4000); } -static struct_80832924 D_8085461C[] = { - { NA_SE_VO_LI_SWORD_L, 0x2031 }, - { NA_SE_VO_LI_SWORD_N, -0x20E6 }, +static AnimSfxEntry D_8085461C[] = { + { NA_SE_VO_LI_SWORD_L, ANIMSFX_DATA(ANIMSFX_TYPE_4, 49) }, + { NA_SE_VO_LI_SWORD_N, -ANIMSFX_DATA(ANIMSFX_TYPE_4, 230) }, }; void Player_Action_80846120(Player* this, PlayState* play) { @@ -9581,7 +9615,7 @@ void Player_Action_80846120(Player* this, PlayState* play) { return; } - func_80832924(this, D_8085461C); + Player_ProcessAnimSfxList(this, D_8085461C); } void Player_Action_80846260(Player* this, PlayState* play) { @@ -11797,9 +11831,9 @@ void func_8084B840(PlayState* play, Player* this, f32 arg2) { } } -static struct_80832924 D_80854870[] = { - { NA_SE_PL_SLIP, 0x1003 }, - { NA_SE_PL_SLIP, -0x1015 }, +static AnimSfxEntry D_80854870[] = { + { NA_SE_PL_SLIP, ANIMSFX_DATA(ANIMSFX_TYPE_2, 3) }, + { NA_SE_PL_SLIP, -ANIMSFX_DATA(ANIMSFX_TYPE_2, 21) }, }; void Player_Action_8084B898(Player* this, PlayState* play) { @@ -11817,7 +11851,7 @@ void Player_Action_8084B898(Player* this, PlayState* play) { } } - func_80832924(this, D_80854870); + Player_ProcessAnimSfxList(this, D_80854870); func_8083F524(play, this); if (!func_8083F9D0(play, this)) { @@ -11838,9 +11872,9 @@ void Player_Action_8084B898(Player* this, PlayState* play) { } } -static struct_80832924 D_80854878[] = { - { NA_SE_PL_SLIP, 0x1004 }, - { NA_SE_PL_SLIP, -0x1018 }, +static AnimSfxEntry D_80854878[] = { + { NA_SE_PL_SLIP, ANIMSFX_DATA(ANIMSFX_TYPE_2, 4) }, + { NA_SE_PL_SLIP, -ANIMSFX_DATA(ANIMSFX_TYPE_2, 24) }, }; static Vec3f D_80854880 = { 0.0f, 26.0f, -40.0f }; @@ -11868,7 +11902,7 @@ void Player_Action_8084B9E4(Player* this, PlayState* play) { func_80832698(this, NA_SE_VO_LI_PUSH); } } else { - func_80832924(this, D_80854878); + Player_ProcessAnimSfxList(this, D_80854878); } } @@ -12126,10 +12160,10 @@ void Player_Action_8084BF1C(Player* this, PlayState* play) { static f32 D_80854898[] = { 10.0f, 20.0f }; static f32 D_808548A0[] = { 40.0f, 50.0f }; -static struct_80832924 D_808548A8[] = { - { NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD, 0x80A }, - { NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD, 0x814 }, - { NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD, -0x81E }, +static AnimSfxEntry D_808548A8[] = { + { NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD, ANIMSFX_DATA(ANIMSFX_TYPE_1, 10) }, + { NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD, ANIMSFX_DATA(ANIMSFX_TYPE_1, 20) }, + { NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD, -ANIMSFX_DATA(ANIMSFX_TYPE_1, 30) }, }; void Player_Action_8084C5F8(Player* this, PlayState* play) { @@ -12157,7 +12191,7 @@ void Player_Action_8084C5F8(Player* this, PlayState* play) { sp38 = D_80854898; if (this->actionVar2 != 0) { - func_80832924(this, D_808548A8); + Player_ProcessAnimSfxList(this, D_808548A8); sp38 = D_808548A0; } @@ -12175,9 +12209,12 @@ void Player_Action_8084C5F8(Player* this, PlayState* play) { } } -static struct_80832924 D_808548B4[] = { - { 0, 0x3028 }, { 0, 0x3030 }, { 0, 0x3038 }, { 0, 0x3040 }, { 0, 0x3048 }, - { 0, 0x3050 }, { 0, 0x3058 }, { 0, 0x3060 }, { 0, -0x3068 }, +static AnimSfxEntry D_808548B4[] = { + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 40) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 48) }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 56) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 64) }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 72) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 80) }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 88) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 96) }, + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_6, 104) }, }; /** @@ -12204,12 +12241,15 @@ void Player_Action_8084C760(Player* this, PlayState* play) { } // Still entering crawlspace - func_80832924(this, D_808548B4); + Player_ProcessAnimSfxList(this, D_808548B4); } -static struct_80832924 D_808548D8[] = { - { 0, 0x300A }, { 0, 0x3012 }, { 0, 0x301A }, { 0, 0x3022 }, { 0, 0x3034 }, - { 0, 0x303C }, { 0, 0x3044 }, { 0, 0x304C }, { 0, -0x3054 }, +static AnimSfxEntry D_808548D8[] = { + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 10) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 18) }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 26) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 34) }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 52) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 60) }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 68) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 76) }, + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_6, 84) }, }; /** @@ -12226,7 +12266,7 @@ void Player_Action_8084C81C(Player* this, PlayState* play) { } // Continue animation of leaving crawlspace - func_80832924(this, D_808548D8); + Player_ProcessAnimSfxList(this, D_808548D8); } static Vec3f D_808548FC[] = { @@ -12358,10 +12398,11 @@ static u8 D_80854998[2][2] = { static Vec3s D_8085499C = { -69, 7146, -266 }; -static struct_80832924 D_808549A4[] = { - { NA_SE_PL_CALM_HIT, 0x830 }, { NA_SE_PL_CALM_HIT, 0x83A }, { NA_SE_PL_CALM_HIT, 0x844 }, - { NA_SE_PL_CALM_PAT, 0x85C }, { NA_SE_PL_CALM_PAT, 0x86E }, { NA_SE_PL_CALM_PAT, 0x87E }, - { NA_SE_PL_CALM_PAT, 0x884 }, { NA_SE_PL_CALM_PAT, -0x888 }, +static AnimSfxEntry D_808549A4[] = { + { NA_SE_PL_CALM_HIT, ANIMSFX_DATA(ANIMSFX_TYPE_1, 48) }, { NA_SE_PL_CALM_HIT, ANIMSFX_DATA(ANIMSFX_TYPE_1, 58) }, + { NA_SE_PL_CALM_HIT, ANIMSFX_DATA(ANIMSFX_TYPE_1, 68) }, { NA_SE_PL_CALM_PAT, ANIMSFX_DATA(ANIMSFX_TYPE_1, 92) }, + { NA_SE_PL_CALM_PAT, ANIMSFX_DATA(ANIMSFX_TYPE_1, 110) }, { NA_SE_PL_CALM_PAT, ANIMSFX_DATA(ANIMSFX_TYPE_1, 126) }, + { NA_SE_PL_CALM_PAT, ANIMSFX_DATA(ANIMSFX_TYPE_1, 132) }, { NA_SE_PL_CALM_PAT, -ANIMSFX_DATA(ANIMSFX_TYPE_1, 136) }, }; void Player_Action_8084CC98(Player* this, PlayState* play) { @@ -12427,7 +12468,7 @@ void Player_Action_8084CC98(Player* this, PlayState* play) { } else if (LinkAnimation_Update(play, &this->skelAnime)) { this->actionVar2 = 99; } else if (this->skelAnime.animation == &gPlayerAnim_link_uma_wait_1) { - func_80832924(this, D_808549A4); + Player_ProcessAnimSfxList(this, D_808549A4); } } else { this->skelAnime.curFrame = rideActor->curFrame; @@ -12537,10 +12578,10 @@ void Player_Action_8084CC98(Player* this, PlayState* play) { } } -static struct_80832924 D_808549C4[] = { - { 0, 0x2800 }, - { NA_SE_PL_GET_OFF_HORSE, 0x80A }, - { NA_SE_PL_SLIPDOWN, -0x819 }, +static AnimSfxEntry D_808549C4[] = { + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_5, 0) }, + { NA_SE_PL_GET_OFF_HORSE, ANIMSFX_DATA(ANIMSFX_TYPE_1, 10) }, + { NA_SE_PL_SLIPDOWN, -ANIMSFX_DATA(ANIMSFX_TYPE_1, 25) }, }; void Player_Action_8084D3E4(Player* this, PlayState* play) { @@ -12565,21 +12606,21 @@ void Player_Action_8084D3E4(Player* this, PlayState* play) { Camera_ChangeSetting(Play_GetCamera(play, CAM_ID_MAIN), CAM_SET_NORMAL0); if (this->mountSide < 0) { - D_808549C4[0].field = 0x2828; + D_808549C4[0].data = ANIMSFX_DATA(ANIMSFX_TYPE_5, 40); } else { - D_808549C4[0].field = 0x281D; + D_808549C4[0].data = ANIMSFX_DATA(ANIMSFX_TYPE_5, 29); } - func_80832924(this, D_808549C4); + Player_ProcessAnimSfxList(this, D_808549C4); } } -static struct_80832924 D_808549D0[] = { - { NA_SE_PL_SWIM, -0x800 }, +static AnimSfxEntry D_808549D0[] = { + { NA_SE_PL_SWIM, -ANIMSFX_DATA(ANIMSFX_TYPE_1, 0) }, }; void func_8084D530(Player* this, f32* arg1, f32 arg2, s16 arg3) { func_8084AEEC(this, arg1, arg2, arg3); - func_80832924(this, D_808549D0); + Player_ProcessAnimSfxList(this, D_808549D0); } void func_8084D574(PlayState* play, Player* this, s16 arg2) { @@ -12993,11 +13034,11 @@ void Player_Action_8084E604(Player* this, PlayState* play) { func_8083721C(this); } -static struct_80832924 D_808549E0[] = { - { 0, 0x3857 }, - { NA_SE_VO_LI_CLIMB_END, 0x2057 }, - { NA_SE_VO_LI_AUTO_JUMP, 0x2045 }, - { 0, -0x287B }, +static AnimSfxEntry D_808549E0[] = { + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_7, 87) }, + { NA_SE_VO_LI_CLIMB_END, ANIMSFX_DATA(ANIMSFX_TYPE_4, 87) }, + { NA_SE_VO_LI_AUTO_JUMP, ANIMSFX_DATA(ANIMSFX_TYPE_4, 69) }, + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_5, 123) }, }; void Player_Action_8084E6D4(Player* this, PlayState* play) { @@ -13055,7 +13096,7 @@ void Player_Action_8084E6D4(Player* this, PlayState* play) { } else { if (this->actionVar2 == 0) { if (!LINK_IS_ADULT) { - func_80832924(this, D_808549E0); + Player_ProcessAnimSfxList(this, D_808549E0); } return; } @@ -13070,17 +13111,17 @@ void Player_Action_8084E6D4(Player* this, PlayState* play) { } } -static struct_80832924 D_808549F0[] = { - { NA_SE_IT_MASTER_SWORD_SWING, -0x83C }, +static AnimSfxEntry D_808549F0[] = { + { NA_SE_IT_MASTER_SWORD_SWING, -ANIMSFX_DATA(ANIMSFX_TYPE_1, 60) }, }; void func_8084E988(Player* this) { - func_80832924(this, D_808549F0); + Player_ProcessAnimSfxList(this, D_808549F0); } -static struct_80832924 D_808549F4[] = { - { NA_SE_VO_LI_AUTO_JUMP, 0x2005 }, - { 0, -0x280F }, +static AnimSfxEntry D_808549F4[] = { + { NA_SE_VO_LI_AUTO_JUMP, ANIMSFX_DATA(ANIMSFX_TYPE_4, 5) }, + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_5, 15) }, }; void Player_Action_8084E9AC(Player* this, PlayState* play) { @@ -13100,7 +13141,7 @@ void Player_Action_8084E9AC(Player* this, PlayState* play) { } if (!LINK_IS_ADULT) { - func_80832924(this, D_808549F4); + Player_ProcessAnimSfxList(this, D_808549F4); } else { func_8084E988(this); } @@ -13262,9 +13303,9 @@ static BottleDropInfo D_80854A28[] = { { ACTOR_EN_INSECT, INSECT_TYPE_FIRST_DROPPED }, }; -static struct_80832924 D_80854A34[] = { - { NA_SE_VO_LI_AUTO_JUMP, 0x2026 }, - { NA_SE_EV_BOTTLE_CAP_OPEN, -0x828 }, +static AnimSfxEntry D_80854A34[] = { + { NA_SE_VO_LI_AUTO_JUMP, ANIMSFX_DATA(ANIMSFX_TYPE_4, 38) }, + { NA_SE_EV_BOTTLE_CAP_OPEN, -ANIMSFX_DATA(ANIMSFX_TYPE_1, 40) }, }; void Player_Action_8084EFC0(Player* this, PlayState* play) { @@ -13288,11 +13329,11 @@ void Player_Action_8084EFC0(Player* this, PlayState* play) { return; } - func_80832924(this, D_80854A34); + Player_ProcessAnimSfxList(this, D_80854A34); } -static struct_80832924 D_80854A3C[] = { - { NA_SE_PL_PUT_OUT_ITEM, -0x81E }, +static AnimSfxEntry D_80854A3C[] = { + { NA_SE_PL_PUT_OUT_ITEM, -ANIMSFX_DATA(ANIMSFX_TYPE_1, 30) }, }; void Player_Action_8084F104(Player* this, PlayState* play) { @@ -13340,7 +13381,7 @@ void Player_Action_8084F104(Player* this, PlayState* play) { } } } else if (this->actionVar2 >= 0) { - func_80832924(this, D_80854A3C); + Player_ProcessAnimSfxList(this, D_80854A3C); } if ((this->actionVar1 == 0) && (this->unk_664 != NULL)) { @@ -13877,24 +13918,24 @@ static LinkAnimationHeader* D_80854A70[] = { static u8 D_80854A7C[] = { 70, 10, 10 }; -static struct_80832924 D_80854A80[] = { - { NA_SE_PL_SKIP, 0x814 }, - { NA_SE_VO_LI_SWORD_N, 0x2014 }, - { 0, -0x301A }, +static AnimSfxEntry D_80854A80[] = { + { NA_SE_PL_SKIP, ANIMSFX_DATA(ANIMSFX_TYPE_1, 20) }, + { NA_SE_VO_LI_SWORD_N, ANIMSFX_DATA(ANIMSFX_TYPE_4, 20) }, + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_6, 26) }, }; -static struct_80832924 D_80854A8C[][2] = { +static AnimSfxEntry D_80854A8C[][2] = { { - { 0, 0x4014 }, - { NA_SE_VO_LI_MAGIC_FROL, -0x201E }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_8, 20) }, + { NA_SE_VO_LI_MAGIC_FROL, -ANIMSFX_DATA(ANIMSFX_TYPE_4, 30) }, }, { - { 0, 0x4014 }, - { NA_SE_VO_LI_MAGIC_NALE, -0x202C }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_8, 20) }, + { NA_SE_VO_LI_MAGIC_NALE, -ANIMSFX_DATA(ANIMSFX_TYPE_4, 44) }, }, { - { NA_SE_VO_LI_MAGIC_ATTACK, 0x2014 }, - { NA_SE_IT_SWORD_SWING_HARD, -0x814 }, + { NA_SE_VO_LI_MAGIC_ATTACK, ANIMSFX_DATA(ANIMSFX_TYPE_4, 20) }, + { NA_SE_IT_SWORD_SWING_HARD, -ANIMSFX_DATA(ANIMSFX_TYPE_1, 20) }, }, }; @@ -13948,9 +13989,9 @@ void Player_Action_808507F4(Player* this, PlayState* play) { } } else if (this->actionVar1 >= 0) { if (this->actionVar2 == 0) { - func_80832924(this, D_80854A80); + Player_ProcessAnimSfxList(this, D_80854A80); } else if (this->actionVar2 == 1) { - func_80832924(this, D_80854A8C[this->actionVar1]); + Player_ProcessAnimSfxList(this, D_80854A8C[this->actionVar1]); if ((this->actionVar1 == 2) && LinkAnimation_OnFrame(&this->skelAnime, 30.0f)) { this->stateFlags1 &= ~(PLAYER_STATE1_28 | PLAYER_STATE1_29); } @@ -14049,19 +14090,23 @@ static void (*D_80854AA4[])(PlayState*, Player*, void*) = { func_80851050, func_80851194, func_808511B4, func_80851248, func_808512E0, }; -static struct_80832924 D_80854AF0[] = { - { 0, 0x2822 }, - { NA_SE_PL_CALM_HIT, 0x82D }, - { NA_SE_PL_CALM_HIT, 0x833 }, - { NA_SE_PL_CALM_HIT, -0x840 }, +static AnimSfxEntry D_80854AF0[] = { + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_5, 34) }, + { NA_SE_PL_CALM_HIT, ANIMSFX_DATA(ANIMSFX_TYPE_1, 45) }, + { NA_SE_PL_CALM_HIT, ANIMSFX_DATA(ANIMSFX_TYPE_1, 51) }, + { NA_SE_PL_CALM_HIT, -ANIMSFX_DATA(ANIMSFX_TYPE_1, 64) }, }; -static struct_80832924 D_80854B00[] = { - { NA_SE_VO_LI_SURPRISE, 0x2003 }, { 0, 0x300F }, { 0, 0x3018 }, { 0, 0x301E }, { NA_SE_VO_LI_FALL_L, -0x201F }, +static AnimSfxEntry D_80854B00[] = { + { NA_SE_VO_LI_SURPRISE, ANIMSFX_DATA(ANIMSFX_TYPE_4, 3) }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 15) }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 24) }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 30) }, + { NA_SE_VO_LI_FALL_L, -ANIMSFX_DATA(ANIMSFX_TYPE_4, 31) }, }; -static struct_80832924 D_80854B14[] = { - { 0, -0x300A }, +static AnimSfxEntry D_80854B14[] = { + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_6, 10) }, }; static struct_80854B18 D_80854B18[PLAYER_CSACTION_MAX] = { @@ -14378,7 +14423,7 @@ void func_80851294(PlayState* play, Player* this, void* anim) { void func_808512E0(PlayState* play, Player* this, void* arg2) { LinkAnimation_Update(play, &this->skelAnime); - func_80832924(this, arg2); + Player_ProcessAnimSfxList(this, arg2); } void func_80851314(Player* this) { @@ -14492,14 +14537,14 @@ void func_80851688(PlayState* play, Player* this, CsCmdActorCue* cue) { } } -static struct_80832924 D_80855188[] = { - { 0, 0x302A }, - { 0, -0x3030 }, +static AnimSfxEntry D_80855188[] = { + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 42) }, + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_6, 48) }, }; void func_80851750(PlayState* play, Player* this, CsCmdActorCue* cue) { LinkAnimation_Update(play, &this->skelAnime); - func_80832924(this, D_80855188); + Player_ProcessAnimSfxList(this, D_80855188); } void func_80851788(PlayState* play, Player* this, CsCmdActorCue* cue) { @@ -14587,9 +14632,9 @@ static struct_808551A4 D_808551A4[] = { { NA_SE_IT_SWORD_STICK_STN, NA_SE_VO_LI_SWORD_N }, }; -static struct_80832924 D_808551AC[] = { - { 0, 0x401D }, - { 0, -0x4027 }, +static AnimSfxEntry D_808551AC[] = { + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_8, 29) }, + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_8, 39) }, }; void func_80851A50(PlayState* play, Player* this, CsCmdActorCue* cue) { @@ -14619,7 +14664,7 @@ void func_80851A50(PlayState* play, Player* this, CsCmdActorCue* cue) { func_80832698(this, NA_SE_VO_LI_SWORD_L); } } else { - func_80832924(this, D_808551AC); + Player_ProcessAnimSfxList(this, D_808551AC); } } @@ -14628,8 +14673,8 @@ void func_80851B90(PlayState* play, Player* this, CsCmdActorCue* cue) { ANIMMODE_ONCE, 0.0f); } -static struct_80832924 D_808551B4[] = { - { 0, -0x281E }, +static AnimSfxEntry D_808551B4[] = { + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_5, 30) }, }; void func_80851BE8(PlayState* play, Player* this, CsCmdActorCue* cue) { @@ -14642,7 +14687,7 @@ void func_80851BE8(PlayState* play, Player* this, CsCmdActorCue* cue) { LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_okarina_warp_goal, (2.0f / 3.0f), 10.0f, Animation_GetLastFrame(&gPlayerAnim_link_okarina_warp_goal), ANIMMODE_ONCE, -8.0f); } - func_80832924(this, D_808551B4); + Player_ProcessAnimSfxList(this, D_808551B4); } } @@ -14664,8 +14709,8 @@ void func_80851D2C(PlayState* play, Player* this, CsCmdActorCue* cue) { Player_SetModels(this, Player_ActionToModelGroup(this, this->itemAction)); } -static struct_80832924 D_808551B8[] = { - { NA_SE_IT_SWORD_PICKOUT, -0x80C }, +static AnimSfxEntry D_808551B8[] = { + { NA_SE_IT_SWORD_PICKOUT, -ANIMSFX_DATA(ANIMSFX_TYPE_1, 12) }, }; void func_80851D80(PlayState* play, Player* this, CsCmdActorCue* cue) { @@ -14674,7 +14719,7 @@ void func_80851D80(PlayState* play, Player* this, CsCmdActorCue* cue) { if (LinkAnimation_OnFrame(&this->skelAnime, 6.0f)) { func_80846720(play, this, 0); } else { - func_80832924(this, D_808551B8); + Player_ProcessAnimSfxList(this, D_808551B8); } } @@ -14707,12 +14752,12 @@ void func_80851ECC(PlayState* play, Player* this, CsCmdActorCue* cue) { } } -void func_80851F14(PlayState* play, Player* this, LinkAnimationHeader* anim, struct_80832924* arg3) { +void func_80851F14(PlayState* play, Player* this, LinkAnimationHeader* anim, AnimSfxEntry* arg3) { if (LinkAnimation_Update(play, &this->skelAnime)) { Player_AnimPlayLoopAdjusted(play, this, anim); this->actionVar2 = 1; } else if (this->actionVar2 == 0) { - func_80832924(this, arg3); + Player_ProcessAnimSfxList(this, arg3); } } @@ -14721,10 +14766,10 @@ void func_80851F84(PlayState* play, Player* this, CsCmdActorCue* cue) { func_80851134(play, this, &gPlayerAnim_clink_op3_wait1); } -static struct_80832924 D_808551BC[] = { - { NA_SE_VO_LI_RELAX, 0x2023 }, - { NA_SE_PL_SLIPDOWN, 0x8EC }, - { NA_SE_PL_SLIPDOWN, -0x900 }, +static AnimSfxEntry D_808551BC[] = { + { NA_SE_VO_LI_RELAX, ANIMSFX_DATA(ANIMSFX_TYPE_4, 35) }, + { NA_SE_PL_SLIPDOWN, ANIMSFX_DATA(ANIMSFX_TYPE_1, 236) }, + { NA_SE_PL_SLIPDOWN, -ANIMSFX_DATA(ANIMSFX_TYPE_1, 256) }, }; void func_80851FB0(PlayState* play, Player* this, CsCmdActorCue* cue) { @@ -14734,23 +14779,23 @@ void func_80851FB0(PlayState* play, Player* this, CsCmdActorCue* cue) { ANIM_FLAG_PLAYER_7); this->actionVar2 = 1; } else if (this->actionVar2 == 0) { - func_80832924(this, D_808551BC); + Player_ProcessAnimSfxList(this, D_808551BC); if (LinkAnimation_OnFrame(&this->skelAnime, 240.0f)) { this->actor.shape.shadowDraw = ActorShadow_DrawFeet; } } } -static struct_80832924 D_808551C8[] = { - { NA_SE_PL_LAND + SURFACE_SFX_OFFSET_WOOD, 0x843 }, - { 0, 0x4854 }, - { 0, 0x485A }, - { 0, -0x4860 }, +static AnimSfxEntry D_808551C8[] = { + { NA_SE_PL_LAND + SURFACE_SFX_OFFSET_WOOD, ANIMSFX_DATA(ANIMSFX_TYPE_1, 67) }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_9, 84) }, + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_9, 90) }, + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_9, 96) }, }; void func_80852048(PlayState* play, Player* this, CsCmdActorCue* cue) { LinkAnimation_Update(play, &this->skelAnime); - func_80832924(this, D_808551C8); + Player_ProcessAnimSfxList(this, D_808551C8); } void func_80852080(PlayState* play, Player* this, CsCmdActorCue* cue) { @@ -14776,15 +14821,15 @@ void func_808520BC(PlayState* play, Player* this, CsCmdActorCue* cue) { this->actor.world.pos.z = distZ * sp4 + startZ; } -static struct_80832924 D_808551D8[] = { - { NA_SE_PL_BOUND, 0x1014 }, - { NA_SE_PL_BOUND, -0x101E }, +static AnimSfxEntry D_808551D8[] = { + { NA_SE_PL_BOUND, ANIMSFX_DATA(ANIMSFX_TYPE_2, 20) }, + { NA_SE_PL_BOUND, -ANIMSFX_DATA(ANIMSFX_TYPE_2, 30) }, }; void func_80852174(PlayState* play, Player* this, CsCmdActorCue* cue) { func_808520BC(play, this, cue); LinkAnimation_Update(play, &this->skelAnime); - func_80832924(this, D_808551D8); + Player_ProcessAnimSfxList(this, D_808551D8); } void func_808521B8(PlayState* play, Player* this, CsCmdActorCue* cue) { @@ -14822,18 +14867,18 @@ void func_80852298(PlayState* play, Player* this, CsCmdActorCue* cue) { } } -static struct_80832924 D_808551E0[] = { - { 0, 0x300A }, - { 0, -0x3018 }, +static AnimSfxEntry D_808551E0[] = { + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 10) }, + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_6, 24) }, }; void func_80852328(PlayState* play, Player* this, CsCmdActorCue* cue) { func_80851F14(play, this, &gPlayerAnim_link_demo_furimuki2_wait, D_808551E0); } -static struct_80832924 D_808551E8[] = { - { 0, 0x400F }, - { 0, -0x4023 }, +static AnimSfxEntry D_808551E8[] = { + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_8, 15) }, + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_8, 35) }, }; void func_80852358(PlayState* play, Player* this, CsCmdActorCue* cue) { @@ -14853,24 +14898,24 @@ void func_80852388(PlayState* play, Player* this, CsCmdActorCue* cue) { } } -void func_80852414(PlayState* play, Player* this, LinkAnimationHeader* anim, struct_80832924* arg3) { +void func_80852414(PlayState* play, Player* this, LinkAnimationHeader* anim, AnimSfxEntry* arg3) { func_80851294(play, this, anim); if (this->actionVar2 == 0) { - func_80832924(this, arg3); + Player_ProcessAnimSfxList(this, arg3); } } -static struct_80832924 D_808551F0[] = { - { 0, 0x300F }, - { 0, -0x3021 }, +static AnimSfxEntry D_808551F0[] = { + { 0, ANIMSFX_DATA(ANIMSFX_TYPE_6, 15) }, + { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_6, 33) }, }; void func_80852450(PlayState* play, Player* this, CsCmdActorCue* cue) { func_80852414(play, this, &gPlayerAnim_clink_demo_koutai_wait, D_808551F0); } -static struct_80832924 D_808551F8[] = { - { NA_SE_PL_KNOCK, -0x84E }, +static AnimSfxEntry D_808551F8[] = { + { NA_SE_PL_KNOCK, -ANIMSFX_DATA(ANIMSFX_TYPE_1, 78) }, }; void func_80852480(PlayState* play, Player* this, CsCmdActorCue* cue) { From 181b4383937a18c95c4772c45a8f33b1b783fa1d Mon Sep 17 00:00:00 2001 From: fig02 Date: Sat, 7 Oct 2023 19:25:45 -0400 Subject: [PATCH 08/16] Player Docs: Propose Named Unions For Shared Variables (#1560) * make unions * format * adjust comment on halt thing --- include/z64player.h | 16 +- src/code/z_actor.c | 4 +- src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 12 +- src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 8 +- src/overlays/actors/ovl_Door_Ana/z_door_ana.c | 2 +- .../actors/ovl_Door_Shutter/z_door_shutter.c | 4 +- src/overlays/actors/ovl_En_Dha/z_en_dha.c | 8 +- src/overlays/actors/ovl_En_Mb/z_en_mb.c | 16 +- .../actors/ovl_En_Torch2/z_en_torch2.c | 2 +- .../actors/ovl_player_actor/z_player.c | 603 +++++++++--------- 10 files changed, 343 insertions(+), 332 deletions(-) diff --git a/include/z64player.h b/include/z64player.h index 4e00ffe6b7..8b550bb8c3 100644 --- a/include/z64player.h +++ b/include/z64player.h @@ -731,7 +731,10 @@ typedef struct Player { /* 0x0450 */ Vec3f unk_450; /* 0x045C */ Vec3f unk_45C; /* 0x0468 */ char unk_468[0x002]; - /* 0x046A */ s16 doorBgCamIndex; + /* 0x046A */ union { + s16 haltActorsDuringCsAction; // If true, halt actors belonging to certain categories during a `csAction` + s16 slidingDoorBgCamIndex; // `BgCamIndex` used during a sliding door cutscene + } cv; // "Cutscene Variable": context dependent variable that has different meanings depending on what function is called /* 0x046C */ s16 subCamId; /* 0x046E */ char unk_46E[0x02A]; /* 0x0498 */ ColliderCylinder cylinder; @@ -789,8 +792,15 @@ typedef struct Player { /* 0x0846 */ u8 unk_846; /* 0x0847 */ s8 unk_847[4]; /* 0x084B */ s8 unk_84B[4]; - /* 0x084F */ s8 actionVar1; // context dependent variable that has different meanings depending on what action is currently running - /* 0x0850 */ s16 actionVar2; // context dependent variable that has different meanings depending on what action is currently running + + /* 0x084F */ union { + s8 actionVar1; + } av1; // "Action Variable 1": context dependent variable that has different meanings depending on what action is currently running + + /* 0x0850 */ union { + s16 actionVar2; + } av2; // "Action Variable 2": context dependent variable that has different meanings depending on what action is currently running + /* 0x0854 */ f32 unk_854; /* 0x0858 */ f32 unk_858; /* 0x085C */ f32 unk_85C; // stick length among other things diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 3edfbaeee7..e95a67ce6e 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1062,7 +1062,7 @@ s32 func_8002DF38(PlayState* play, Actor* actor, u8 csAction) { player->csAction = csAction; player->unk_448 = actor; - player->doorBgCamIndex = 0; + player->cv.haltActorsDuringCsAction = false; return true; } @@ -1071,7 +1071,7 @@ s32 func_8002DF54(PlayState* play, Actor* actor, u8 csAction) { Player* player = GET_PLAYER(play); func_8002DF38(play, actor, csAction); - player->doorBgCamIndex = 1; + player->cv.haltActorsDuringCsAction = true; return true; } diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index 0262a6ad56..1ee5e78893 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -756,7 +756,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { } } if (this->work[MO_TENT_ACTION_STATE] == MO_TENT_GRAB) { - player->actionVar2 = 0xA; + player->av2.actionVar2 = 0xA; player->actor.speed = player->actor.velocity.y = 0; Math_ApproachF(&player->actor.world.pos.x, this->grabPosRot.pos.x, 0.5f, 20.0f); Math_ApproachF(&player->actor.world.pos.y, this->grabPosRot.pos.y, 0.5f, 20.0f); @@ -814,7 +814,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { Math_ApproachS(&this->tentRot[indS1].z, tempf2, 1.0f / this->tentMaxAngle, this->tentSpeed); } } - player->actionVar2 = 0xA; + player->av2.actionVar2 = 0xA; player->actor.world.pos.x = this->grabPosRot.pos.x; player->actor.world.pos.y = this->grabPosRot.pos.y; player->actor.world.pos.z = this->grabPosRot.pos.z; @@ -833,7 +833,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { this->work[MO_TENT_ACTION_STATE] = MO_TENT_RETREAT; this->work[MO_TENT_INVINC_TIMER] = 50; if (&this->actor == player->actor.parent) { - player->actionVar2 = 0x65; + player->av2.actionVar2 = 0x65; player->actor.parent = NULL; player->csAction = PLAYER_CSACTION_NONE; if (this->timers[0] == 0) { @@ -863,7 +863,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { case MO_TENT_CUT: Sfx_PlaySfxAtPos(&this->tentTipPos, NA_SE_EV_WATER_WALL - SFX_FLAG); if (&this->actor == player->actor.parent) { - player->actionVar2 = 0x65; + player->av2.actionVar2 = 0x65; player->actor.parent = NULL; player->csAction = PLAYER_CSACTION_NONE; } @@ -1784,7 +1784,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) { sMorphaTent2->tent2KillTimer = 1; } if (player->actor.parent != NULL) { - player->actionVar2 = 0x65; + player->av2.actionVar2 = 0x65; player->actor.parent = NULL; player->csAction = PLAYER_CSACTION_NONE; } @@ -1803,7 +1803,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) { sMorphaTent1->timers[0] = 40; sMorphaTent1->actor.flags &= ~ACTOR_FLAG_0; if (player->actor.parent == &sMorphaTent1->actor) { - player->actionVar2 = 0x65; + player->av2.actionVar2 = 0x65; player->actor.parent = NULL; player->csAction = PLAYER_CSACTION_NONE; } diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 53012fe9e8..5ba0c27528 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -1749,7 +1749,7 @@ void BossSst_HandClap(BossSst* this, PlayState* play) { } if (player->actor.parent == &this->actor) { - player->actionVar2 = 0; + player->av2.actionVar2 = 0; player->actor.world.pos = this->actor.world.pos; } } @@ -1844,7 +1844,7 @@ void BossSst_HandGrab(BossSst* this, PlayState* play) { this->actor.world.pos.x += this->actor.speed * Math_SinS(this->actor.world.rot.y); this->actor.world.pos.z += this->actor.speed * Math_CosS(this->actor.world.rot.y); if (player->stateFlags2 & PLAYER_STATE2_7) { - player->actionVar2 = 0; + player->av2.actionVar2 = 0; player->actor.world.pos = this->actor.world.pos; player->actor.shape.rot.y = this->actor.shape.rot.y; } @@ -1938,7 +1938,7 @@ void BossSst_HandSwing(BossSst* this, PlayState* play) { } if (player->stateFlags2 & PLAYER_STATE2_7) { - player->actionVar2 = 0; + player->av2.actionVar2 = 0; Math_Vec3f_Copy(&player->actor.world.pos, &this->actor.world.pos); player->actor.shape.rot.x = this->actor.shape.rot.x; player->actor.shape.rot.z = (this->vParity * -0x4000) + this->actor.shape.rot.z; @@ -2422,7 +2422,7 @@ void BossSst_HandReleasePlayer(BossSst* this, PlayState* play, s32 dropPlayer) { if (player->actor.parent == &this->actor) { player->actor.parent = NULL; - player->actionVar2 = 100; + player->av2.actionVar2 = 100; this->colliderJntSph.base.ocFlags1 |= OC1_ON; OTHER_HAND(this)->colliderJntSph.base.ocFlags1 |= OC1_ON; if (dropPlayer) { diff --git a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c index e8db4e9117..80645b2d97 100644 --- a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c +++ b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c @@ -129,7 +129,7 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play) { player = GET_PLAYER(play); if (Math_StepToF(&this->actor.scale.x, 0.01f, 0.001f)) { if ((this->actor.targetMode != 0) && (play->transitionTrigger == TRANS_TRIGGER_OFF) && - (player->stateFlags1 & PLAYER_STATE1_31) && (player->actionVar1 == 0)) { + (player->stateFlags1 & PLAYER_STATE1_31) && (player->av1.actionVar1 == 0)) { destinationIdx = ((this->actor.params >> 0xC) & 7) - 1; Play_SetupRespawnPoint(play, RESPAWN_MODE_RETURN, 0x4FF); gSaveContext.respawn[RESPAWN_MODE_RETURN].pos.y = this->actor.world.pos.y; 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 1a412a6427..67372227bb 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -637,8 +637,8 @@ void DoorShutter_InitOpeningDoorCam(DoorShutter* this, PlayState* play) { this->gfxType = savedGfxType; this->barsClosedAmount = 0.0f; - Camera_ChangeDoorCam(play->cameraPtrs[CAM_ID_MAIN], &this->dyna.actor, player->doorBgCamIndex, 0.0f, 12, - doorCamTimer2, 10); + Camera_ChangeDoorCam(play->cameraPtrs[CAM_ID_MAIN], &this->dyna.actor, player->cv.slidingDoorBgCamIndex, 0.0f, + 12, doorCamTimer2, 10); } } diff --git a/src/overlays/actors/ovl_En_Dha/z_en_dha.c b/src/overlays/actors/ovl_En_Dha/z_en_dha.c index 472903dabd..5a3bf71fc7 100644 --- a/src/overlays/actors/ovl_En_Dha/z_en_dha.c +++ b/src/overlays/actors/ovl_En_Dha/z_en_dha.c @@ -245,7 +245,7 @@ void EnDha_Wait(EnDha* this, PlayState* play) { if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) { player->stateFlags2 &= ~PLAYER_STATE2_7; player->actor.parent = NULL; - player->actionVar2 = 200; + player->av2.actionVar2 = 200; } if (this->actor.home.rot.z != 0) { @@ -285,7 +285,7 @@ void EnDha_Wait(EnDha* this, PlayState* play) { if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) { player->stateFlags2 &= ~PLAYER_STATE2_7; player->actor.parent = NULL; - player->actionVar2 = 200; + player->av2.actionVar2 = 200; } this->actor.home.rot.z = 1; @@ -306,7 +306,7 @@ void EnDha_TakeDamage(EnDha* this, PlayState* play) { if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) { player->stateFlags2 &= ~PLAYER_STATE2_7; player->actor.parent = NULL; - player->actionVar2 = 200; + player->av2.actionVar2 = 200; } Math_SmoothStepToS(&this->limbAngleX[1], 0, 1, 2000, 0); @@ -344,7 +344,7 @@ void EnDha_Die(EnDha* this, PlayState* play) { if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) { player->stateFlags2 &= ~PLAYER_STATE2_7; player->actor.parent = NULL; - player->actionVar2 = 200; + player->av2.actionVar2 = 200; } Math_SmoothStepToS(&this->limbAngleX[1], 0, 1, 0x7D0, 0); diff --git a/src/overlays/actors/ovl_En_Mb/z_en_mb.c b/src/overlays/actors/ovl_En_Mb/z_en_mb.c index 4f5afaef33..eb26885d3a 100644 --- a/src/overlays/actors/ovl_En_Mb/z_en_mb.c +++ b/src/overlays/actors/ovl_En_Mb/z_en_mb.c @@ -604,7 +604,7 @@ void EnMb_Stunned(EnMb* this, PlayState* play) { if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) { player->stateFlags2 &= ~PLAYER_STATE2_7; player->actor.parent = NULL; - player->actionVar2 = 200; + player->av2.actionVar2 = 200; func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f); this->attack = ENMB_ATTACK_NONE; } @@ -721,7 +721,7 @@ void EnMb_SpearPatrolEndCharge(EnMb* this, PlayState* play) { if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) { player->stateFlags2 &= ~PLAYER_STATE2_7; player->actor.parent = NULL; - player->actionVar2 = 200; + player->av2.actionVar2 = 200; func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f); } @@ -936,7 +936,7 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, PlayState* play) { hasHitPlayer = true; player->actor.world.pos.z = this->actor.world.pos.z + Math_SinS(this->actor.shape.rot.y) * 10.0f + Math_CosS(this->actor.shape.rot.y) * 89.0f; - player->actionVar2 = 0; + player->av2.actionVar2 = 0; player->actor.speed = 0.0f; player->actor.velocity.y = 0.0f; } @@ -947,7 +947,7 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, PlayState* play) { if (player->stateFlags2 & PLAYER_STATE2_7) { player->stateFlags2 &= ~PLAYER_STATE2_7; player->actor.parent = NULL; - player->actionVar2 = 200; + player->av2.actionVar2 = 200; func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f); } } @@ -1005,7 +1005,7 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, PlayState* play) { hasHitPlayer = true; player->actor.world.pos.z = this->actor.world.pos.z + Math_SinS(this->actor.shape.rot.y) * 10.0f + Math_CosS(this->actor.shape.rot.y) * 89.0f; - player->actionVar2 = 0; + player->av2.actionVar2 = 0; player->actor.speed = 0.0f; player->actor.velocity.y = 0.0f; } @@ -1016,7 +1016,7 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, PlayState* play) { if (player->stateFlags2 & PLAYER_STATE2_7) { player->stateFlags2 &= ~PLAYER_STATE2_7; player->actor.parent = NULL; - player->actionVar2 = 200; + player->av2.actionVar2 = 200; func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f); } this->attack = ENMB_ATTACK_NONE; @@ -1298,7 +1298,7 @@ void EnMb_SpearDead(EnMb* this, PlayState* play) { if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) { player->stateFlags2 &= ~PLAYER_STATE2_7; player->actor.parent = NULL; - player->actionVar2 = 200; + player->av2.actionVar2 = 200; func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f); this->attack = ENMB_ATTACK_NONE; } @@ -1381,7 +1381,7 @@ void EnMb_CheckColliding(EnMb* this, PlayState* play) { if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) { player->stateFlags2 &= ~PLAYER_STATE2_7; player->actor.parent = NULL; - player->actionVar2 = 200; + player->av2.actionVar2 = 200; func_8002F71C(play, &this->actor, 6.0f, this->actor.world.rot.y, 6.0f); } this->damageEffect = this->actor.colChkInfo.damageEffect; diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index 0bee2bad48..7b3f16f1c3 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -564,7 +564,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { if ((this->actor.colChkInfo.health == 0) && sDeathFlag) { this->csAction = PLAYER_CSACTION_24; this->unk_448 = &player->actor; - this->doorBgCamIndex = 1; + this->cv.haltActorsDuringCsAction = true; sDeathFlag = false; } if ((this->invincibilityTimer == 0) && (this->actor.colChkInfo.health != 0) && diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 0debb6cd74..5206756029 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -1722,14 +1722,14 @@ void func_80832564(PlayState* play, Player* this) { s32 func_80832594(Player* this, s32 arg1, s32 arg2) { s16 controlStickAngleDiff = this->prevControlStickAngle - sControlStickAngle; - this->actionVar2 += + this->av2.actionVar2 += arg1 + (s16)(ABS(controlStickAngleDiff) * fabsf(sControlStickMagnitude) * 2.5415802156203426e-06f); if (CHECK_BTN_ANY(sControlInput->press.button, BTN_A | BTN_B)) { - this->actionVar2 += 5; + this->av2.actionVar2 += 5; } - return this->actionVar2 > arg2; + return this->av2.actionVar2 > arg2; } void func_80832630(PlayState* play) { @@ -1823,7 +1823,7 @@ void func_808328EC(Player* this, u16 sfxId) { * Process a list of `AnimSfx` entries. * An `AnimSfx` entry contains a sound effect to play, a frame number that indicates * when during an animation it should play, and a type value that indicates how it should be played back. - * + * * The list will stop being processed after an entry that has a negative value for the `data` field. * * Some types do not make use of `sfxId`, the SFX function called will pick a sound on its own. @@ -1861,7 +1861,7 @@ void Player_ProcessAnimSfxList(Player* this, AnimSfxEntry* entry) { NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD + this->ageProperties->unk_94, 0.0f); } } - + cont = (entry->data >= 0); // stop processing if `data` is negative entry++; } while (cont); @@ -3147,8 +3147,8 @@ s32 Player_SetupAction(PlayState* play, Player* this, PlayerActionFunc actionFun this->stateFlags2 &= ~(PLAYER_STATE2_19 | PLAYER_STATE2_27 | PLAYER_STATE2_28); this->stateFlags3 &= ~(PLAYER_STATE3_1 | PLAYER_STATE3_3 | PLAYER_STATE3_7); - this->actionVar1 = 0; - this->actionVar2 = 0; + this->av1.actionVar1 = 0; + this->av2.actionVar2 = 0; this->unk_6AC = 0; @@ -3327,7 +3327,7 @@ void func_80836448(PlayState* play, Player* this, LinkAnimationHeader* anim) { if (Inventory_ConsumeFairy(play)) { play->gameOverCtx.state = GAMEOVER_REVIVE_START; - this->actionVar1 = 1; + this->av1.actionVar1 = 1; } else { play->gameOverCtx.state = GAMEOVER_DEATH_START; Audio_StopBgmAndFanfare(0); @@ -4089,7 +4089,7 @@ void func_80837B60(Player* this) { void func_80837B9C(Player* this, PlayState* play) { Player_SetupAction(play, this, Player_Action_8084411C, 0); Player_AnimPlayLoop(play, this, &gPlayerAnim_link_normal_landing_wait); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; if (this->unk_6AD != 3) { this->unk_6AD = 0; } @@ -4141,7 +4141,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, Player_AnimPlayLoopAdjusted(play, this, &gPlayerAnim_link_normal_electric_shock); func_80832224(this); - this->actionVar2 = 20; + this->av2.actionVar2 = 20; } else { arg5 -= this->actor.shape.rot.y; if (this->stateFlags1 & PLAYER_STATE1_27) { @@ -4164,7 +4164,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, func_80832224(this); if (arg2 == 2) { - this->actionVar2 = 4; + this->av2.actionVar2 = 4; this->actor.speed = 3.0f; this->speedXZ = 3.0f; @@ -4367,7 +4367,7 @@ s32 func_808382DC(Player* this, PlayState* play) { Player_SetupAction(play, this, Player_Action_808435C4, 0); } - if (!(this->actionVar1 = sp54)) { + if (!(this->av1.actionVar1 = sp54)) { Player_SetItemActionFunc(this, func_80834BD4); if (this->unk_870 < 0.5f) { @@ -4569,8 +4569,8 @@ void func_80838E70(PlayState* play, Player* this, f32 arg2, s16 arg3) { Player_SetupAction(play, this, Player_Action_80845CA4, 0); func_80832440(play, this); - this->actionVar1 = 1; - this->actionVar2 = 1; + this->av1.actionVar1 = 1; + this->av2.actionVar2 = 1; this->unk_450.x = (Math_SinS(arg3) * arg2) + this->actor.world.pos.x; this->unk_450.z = (Math_CosS(arg3) * arg2) + this->actor.world.pos.z; @@ -4770,11 +4770,11 @@ s32 Player_HandleExitsAndVoids(PlayState* play, Player* this, CollisionPoly* pol Sfx_PlaySfxCentered(NA_SE_OC_ABYSS); } else { func_80838F5C(play, this); - this->actionVar2 = 9999; + this->av2.actionVar2 = 9999; if (this->floorProperty == FLOOR_PROPERTY_5) { - this->actionVar1 = -1; + this->av1.actionVar1 = -1; } else { - this->actionVar1 = 1; + this->av1.actionVar1 = 1; } } } @@ -4889,7 +4889,7 @@ s32 Player_ActionChange_1(Player* this, PlayState* play) { func_80838E70(play, this, 50.0f, this->actor.shape.rot.y); - this->actionVar1 = 0; + this->av1.actionVar1 = 0; this->unk_447 = this->doorType; this->stateFlags1 |= PLAYER_STATE1_29; @@ -4902,7 +4902,7 @@ s32 Player_ActionChange_1(Player* this, PlayState* play) { func_80832224(this); if (this->doorTimer != 0) { - this->actionVar2 = 0; + this->av2.actionVar2 = 0; Player_AnimChangeOnceMorph(play, this, func_80833338(this)); this->skelAnime.endFrame = 0.0f; } else { @@ -4910,7 +4910,7 @@ s32 Player_ActionChange_1(Player* this, PlayState* play) { } if (slidingDoor->dyna.actor.category == ACTORCAT_DOOR) { - this->doorBgCamIndex = + this->cv.slidingDoorBgCamIndex = play->transiActorCtx.list[GET_TRANSITION_ACTOR_INDEX(&slidingDoor->dyna.actor)] .sides[(doorDirection > 0) ? 0 : 1] .bgCamIndex; @@ -5071,7 +5071,7 @@ void func_80839FFC(Player* this, PlayState* play) { void func_8083A060(Player* this, PlayState* play) { func_80839FFC(this, play); if (func_8008E9C4(this)) { - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } } @@ -5145,14 +5145,14 @@ void func_8083A388(PlayState* play, Player* this) { } void func_8083A3B0(PlayState* play, Player* this) { - s32 sp1C = this->actionVar2; - s32 sp18 = this->actionVar1; + s32 sp1C = this->av2.actionVar2; + s32 sp18 = this->av1.actionVar1; func_80835DAC(play, this, Player_Action_8084BF1C, 0); this->actor.velocity.y = 0.0f; - this->actionVar2 = sp1C; - this->actionVar1 = sp18; + this->av2.actionVar2 = sp1C; + this->av1.actionVar1 = sp18; } void func_8083A40C(PlayState* play, Player* this) { @@ -5165,9 +5165,9 @@ void func_8083A434(PlayState* play, Player* this) { this->stateFlags1 |= PLAYER_STATE1_10 | PLAYER_STATE1_29; if (this->getItemId == GI_HEART_CONTAINER_2) { - this->actionVar2 = 20; + this->av2.actionVar2 = 20; } else if (this->getItemId >= 0) { - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } else { this->getItemId = -this->getItemId; } @@ -5193,7 +5193,7 @@ s32 func_8083A4A8(Player* this, PlayState* play) { } func_80838940(this, anim, temp, play, NA_SE_VO_LI_AUTO_JUMP); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; return 1; } @@ -5269,8 +5269,8 @@ s32 func_8083A6AC(Player* this, PlayState* play) { ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); - this->actionVar2 = -1; - this->actionVar1 = sp50; + this->av2.actionVar2 = -1; + this->av1.actionVar1 = sp50; } else { this->stateFlags1 |= PLAYER_STATE1_13; this->stateFlags1 &= ~PLAYER_STATE1_17; @@ -5390,7 +5390,7 @@ s32 func_8083AD4C(PlayState* play, Player* this) { s32 func_8083ADD4(PlayState* play, Player* this) { if (this->unk_6AD == 3) { Player_SetupAction(play, this, Player_Action_80852E14, 0); - if (this->doorBgCamIndex != 0) { + if (this->cv.haltActorsDuringCsAction) { this->stateFlags1 |= PLAYER_STATE1_29; } func_80832318(this); @@ -5421,7 +5421,7 @@ void func_8083AE40(Player* this, s16 objectId) { void func_8083AF44(PlayState* play, Player* this, s32 magicSpell) { func_80835DE4(play, this, Player_Action_808507F4, 0); - this->actionVar1 = magicSpell - 3; + this->av1.actionVar1 = magicSpell - 3; //! @bug `MAGIC_CONSUME_WAIT_PREVIEW` is not guaranteed to succeed. //! Ideally, the return value of `Magic_RequestChange` should be checked before allowing the process of @@ -5551,17 +5551,17 @@ s32 Player_ActionChange_13(Player* this, PlayState* play) { Inventory_ChangeAmmo(ITEM_MAGIC_BEAN, -1); func_80835DE4(play, this, Player_Action_8084279C, 0); this->stateFlags1 |= PLAYER_STATE1_29; - this->actionVar2 = 0x50; - this->actionVar1 = -1; + this->av2.actionVar2 = 0x50; + this->av1.actionVar1 = -1; } targetActor->flags |= ACTOR_FLAG_8; this->unk_664 = this->targetActor; } else if (sp2C == EXCH_ITEM_BOTTLE_RUTOS_LETTER) { - this->actionVar1 = 1; + this->av1.actionVar1 = 1; this->actor.textId = 0x4005; func_80835EA4(play, 1); } else { - this->actionVar1 = 2; + this->av1.actionVar1 = 2; this->actor.textId = 0xCF; func_80835EA4(play, 4); } @@ -5569,11 +5569,11 @@ s32 Player_ActionChange_13(Player* this, PlayState* play) { this->actor.flags |= ACTOR_FLAG_8; this->exchangeItemId = sp2C; - if (this->actionVar1 < 0) { + if (this->av1.actionVar1 < 0) { Player_AnimChangeOnceMorph(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_check, this->modelAnimType)); } else { - Player_AnimPlayOnce(play, this, D_80854548[this->actionVar1]); + Player_AnimPlayOnce(play, this, D_80854548[this->av1.actionVar1]); } func_80832224(this); @@ -5609,7 +5609,7 @@ s32 Player_ActionChange_13(Player* this, PlayState* play) { } else if (func_8083AD4C(play, this)) { if (!(this->stateFlags1 & PLAYER_STATE1_23)) { Player_SetupAction(play, this, Player_Action_8084B1D8, 1); - this->actionVar2 = 13; + this->av2.actionVar2 = 13; func_8083B010(this); } this->stateFlags1 |= PLAYER_STATE1_20; @@ -5793,8 +5793,8 @@ void func_8083BCD0(Player* this, PlayState* play, s32 arg2) { if (arg2) {} - this->actionVar2 = 1; - this->actionVar1 = arg2; + this->av2.actionVar2 = 1; + this->av1.actionVar1 = arg2; this->yaw = this->actor.shape.rot.y + (arg2 << 0xE); this->speedXZ = !(arg2 & 1) ? 6.0f : 8.5f; @@ -6021,10 +6021,10 @@ s32 func_8083C6B8(PlayState* play, Player* this) { Player_SetupAction(play, this, Player_Action_8084ECA4, 0); if (this->actor.yDistToWater > 12.0f) { - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } - Player_AnimPlayOnceAdjusted(play, this, D_80854554[this->actionVar2].unk_00); + Player_AnimPlayOnceAdjusted(play, this, D_80854554[this->av2.actionVar2].unk_00); Player_PlaySfx(this, NA_SE_IT_SWORD_SWING); func_80832698(this, NA_SE_VO_LI_AUTO_JUMP); @@ -6087,7 +6087,7 @@ s32 func_8083C910(PlayState* play, Player* this, f32 arg2) { Player_SetupAction(play, this, Player_Action_8084D7C4, 0); Player_AnimChangeLoopSlowMorph(play, this, &gPlayerAnim_link_swimer_swim); this->stateFlags1 |= PLAYER_STATE1_27 | PLAYER_STATE1_29; - this->actionVar2 = 20; + this->av2.actionVar2 = 20; this->speedXZ = 2.0f; Player_SetBootData(play, this); return 0; @@ -6101,7 +6101,7 @@ s32 func_8083C910(PlayState* play, Player* this, f32 arg2) { void func_8083CA20(PlayState* play, Player* this) { if (func_8083C910(play, this, 180.0f)) { - this->actionVar2 = -20; + this->av2.actionVar2 = -20; } } @@ -6109,7 +6109,7 @@ void func_8083CA54(PlayState* play, Player* this) { this->speedXZ = 2.0f; gSaveContext.entranceSpeed = 2.0f; if (func_8083C910(play, this, 120.0f)) { - this->actionVar2 = -15; + this->av2.actionVar2 = -15; } } @@ -6121,9 +6121,9 @@ void func_8083CA9C(PlayState* play, Player* this) { this->speedXZ = gSaveContext.entranceSpeed; if (func_8083C910(play, this, 800.0f)) { - this->actionVar2 = -80 / this->speedXZ; - if (this->actionVar2 < -20) { - this->actionVar2 = -20; + this->av2.actionVar2 = -80 / this->speedXZ; + if (this->av2.actionVar2 < -20) { + this->av2.actionVar2 = -20; } } } @@ -6186,7 +6186,7 @@ void func_8083CE0C(Player* this, PlayState* play) { void func_8083CEAC(Player* this, PlayState* play) { Player_SetupAction(play, this, Player_Action_80840450, 1); Player_AnimChangeOnceMorph(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_wait2waitR, this->modelAnimType)); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } void func_8083CF10(Player* this, PlayState* play) { @@ -6275,7 +6275,7 @@ s32 func_8083D12C(PlayState* play, Player* this, Input* arg2) { this->stateFlags1 |= PLAYER_STATE1_10 | PLAYER_STATE1_11 | PLAYER_STATE1_29; } - this->actionVar2 = 2; + this->av2.actionVar2 = 2; } func_80832340(play, this); @@ -6299,7 +6299,7 @@ s32 func_8083D12C(PlayState* play, Player* this, Input* arg2) { void func_8083D330(PlayState* play, Player* this) { Player_AnimPlayLoop(play, this, &gPlayerAnim_link_swimer_swim); this->unk_6C2 = 16000; - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } void func_8083D36C(PlayState* play, Player* this) { @@ -6309,7 +6309,7 @@ void func_8083D36C(PlayState* play, Player* this) { if ((this->currentBoots != PLAYER_BOOTS_IRON) && (this->stateFlags2 & PLAYER_STATE2_10)) { this->stateFlags2 &= ~PLAYER_STATE2_10; func_8083D12C(play, this, NULL); - this->actionVar1 = 1; + this->av1.actionVar1 = 1; } else if (Player_Action_80844A44 == this->actionFunc) { Player_SetupAction(play, this, Player_Action_8084DC48, 0); func_8083D330(play, this); @@ -6657,9 +6657,9 @@ s32 Player_HandleSlopes(PlayState* play, Player* this, CollisionPoly* floorPoly) func_80832564(play, this); if (sFloorShapePitch >= 0) { - this->actionVar1 = 1; + this->av1.actionVar1 = 1; } - Player_AnimChangeLoopMorph(play, this, sSlopeSlipAnims[this->actionVar1]); + Player_AnimChangeLoopMorph(play, this, sSlopeSlipAnims[this->av1.actionVar1]); this->speedXZ = sqrtf(SQ(this->actor.velocity.x) + SQ(this->actor.velocity.z)); this->yaw = playerVelYaw; return true; @@ -6910,7 +6910,7 @@ s32 func_8083EC18(Player* this, PlayState* play, u32 wallFlags) { this->stateFlags1 &= ~PLAYER_STATE1_27; if ((sp8C != 0) || (wallFlags & WALL_FLAG_1)) { - if ((this->actionVar1 = sp8C) != 0) { + if ((this->av1.actionVar1 = sp8C) != 0) { if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { anim = &gPlayerAnim_link_normal_Fclimb_startA; } else { @@ -6921,12 +6921,12 @@ s32 func_8083EC18(Player* this, PlayState* play, u32 wallFlags) { anim = this->ageProperties->unk_A4; sp34 = sp34 - 1.0f; } - this->actionVar2 = -2; + this->av2.actionVar2 = -2; this->actor.world.pos.y += phi_f20; this->actor.shape.rot.y = this->yaw = this->actor.wallYaw + 0x8000; } else { anim = this->ageProperties->unk_A8; - this->actionVar2 = -4; + this->av2.actionVar2 = -4; this->actor.shape.rot.y = this->yaw = this->actor.wallYaw; } @@ -7421,11 +7421,11 @@ void Player_Action_80840450(Player* this, PlayState* play) { } } - if (this->actionVar2 != 0) { + if (this->av2.actionVar2 != 0) { if (LinkAnimation_Update(play, &this->skelAnime)) { func_80832DBC(this); Player_AnimPlayLoop(play, this, func_808334E4(this)); - this->actionVar2 = 0; + this->av2.actionVar2 = 0; this->stateFlags3 &= ~PLAYER_STATE3_3; } func_80833C3C(this); @@ -7614,12 +7614,12 @@ void Player_Action_80840BC8(Player* this, PlayState* play) { } if (sp40 != 0) { - if (this->actionVar2 != 0) { - if (DECR(this->actionVar2) == 0) { + if (this->av2.actionVar2 != 0) { + if (DECR(this->av2.actionVar2) == 0) { this->skelAnime.endFrame = this->skelAnime.animLength - 1.0f; } this->skelAnime.jointTable[0].y = - (this->skelAnime.jointTable[0].y + ((this->actionVar2 & 1) * 0x50)) - 0x28; + (this->skelAnime.jointTable[0].y + ((this->av2.actionVar2 & 1) * 0x50)) - 0x28; } else { func_80832DBC(this); func_808409CC(play, this); @@ -7628,7 +7628,7 @@ void Player_Action_80840BC8(Player* this, PlayState* play) { func_8083721C(this); - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { if (!Player_TryActionChangeList(play, this, sActionChangeList7, true)) { if (func_80833B54(this)) { func_8083CEAC(this, play); @@ -8241,7 +8241,7 @@ s32 func_8084269C(PlayState* play, Player* this) { void Player_Action_8084279C(Player* this, PlayState* play) { func_80832CB0(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_check_wait, this->modelAnimType)); - if (DECR(this->actionVar2) == 0) { + if (DECR(this->av2.actionVar2) == 0) { if (!Player_ActionChange_13(this, play)) { func_8083A098(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_check_end, this->modelAnimType), play); } @@ -8264,7 +8264,7 @@ s32 func_8084285C(Player* this, f32 arg1, f32 arg2, f32 arg3) { s32 func_808428D8(Player* this, PlayState* play) { if (!Player_IsChildWithHylianShield(this) && (Player_GetMeleeWeaponHeld(this) != 0) && sUseHeldItem) { Player_AnimPlayOnce(play, this, &gPlayerAnim_link_normal_defense_kiru); - this->actionVar1 = 1; + this->av1.actionVar1 = 1; this->meleeWeaponAnimation = PLAYER_MWA_STAB_1H; this->yaw = this->actor.shape.rot.y + this->unk_6BE; return 1; @@ -8469,8 +8469,8 @@ void Player_Action_80843188(Player* this, PlayState* play) { if (!Player_IsChildWithHylianShield(this)) { Player_AnimPlayLoop(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_defense_wait, this->modelAnimType)); } - this->actionVar2 = 1; - this->actionVar1 = 0; + this->av2.actionVar2 = 1; + this->av1.actionVar1 = 0; } if (!Player_IsChildWithHylianShield(this)) { @@ -8481,7 +8481,7 @@ void Player_Action_80843188(Player* this, PlayState* play) { func_8083721C(this); - if (this->actionVar2 != 0) { + if (this->av2.actionVar2 != 0) { sp54 = sControlInput->rel.stick_y * 100; sp50 = sControlInput->rel.stick_x * -120; sp4E = this->actor.shape.rot.y - Camera_GetInputDirYaw(GET_ACTIVE_CAM(play)); @@ -8509,14 +8509,14 @@ void Player_Action_80843188(Player* this, PlayState* play) { this->unk_6BC = this->actor.focus.rot.x; Math_ScaledStepToS(&this->unk_6BE, sp4A, sp46); - if (this->actionVar1 != 0) { + if (this->av1.actionVar1 != 0) { if (!func_80842DF4(play, this)) { if (this->skelAnime.curFrame < 2.0f) { func_80833A20(this, 1); } } else { - this->actionVar2 = 1; - this->actionVar1 = 0; + this->av2.actionVar2 = 1; + this->av1.actionVar1 = 0; } } else if (!func_80842964(this, play)) { if (Player_ActionChange_11(this, play)) { @@ -8559,7 +8559,7 @@ void Player_Action_808435C4(Player* this, PlayState* play) { func_8083721C(this); - if (this->actionVar1 == 0) { + if (this->av1.actionVar1 == 0) { D_808535E0 = Player_UpdateUpperBody(this, play); if ((func_80834B5C == this->itemActionFunc) || (func_808374A0(play, this, &this->skelAnimeUpper, 4.0f) > 0)) { Player_SetupAction(play, this, Player_Action_80840450, 1); @@ -8593,7 +8593,7 @@ void Player_Action_8084377C(Player* this, PlayState* play) { func_808382BC(this); - if (!(this->stateFlags1 & PLAYER_STATE1_29) && (this->actionVar2 == 0) && (this->unk_8A1 != 0)) { + if (!(this->stateFlags1 & PLAYER_STATE1_29) && (this->av2.actionVar2 == 0) && (this->unk_8A1 != 0)) { s16 temp = this->actor.shape.rot.y - this->unk_8A2; this->yaw = this->actor.shape.rot.y = this->unk_8A2; @@ -8610,15 +8610,15 @@ void Player_Action_8084377C(Player* this, PlayState* play) { } if (LinkAnimation_Update(play, &this->skelAnime) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) { - if (this->actionVar2 != 0) { - this->actionVar2--; - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 != 0) { + this->av2.actionVar2--; + if (this->av2.actionVar2 == 0) { func_80853080(this, play); } } else if ((this->stateFlags1 & PLAYER_STATE1_29) || (!(this->cylinder.base.acFlags & AC_HIT) && (this->unk_8A1 == 0))) { if (this->stateFlags1 & PLAYER_STATE1_29) { - this->actionVar2++; + this->av2.actionVar2++; } else { Player_SetupAction(play, this, Player_Action_80843954, 0); this->stateFlags1 |= PLAYER_STATE1_26; @@ -8644,7 +8644,7 @@ void Player_Action_80843954(Player* this, PlayState* play) { if (LinkAnimation_Update(play, &this->skelAnime) && (this->speedXZ == 0.0f)) { if (this->stateFlags1 & PLAYER_STATE1_29) { - this->actionVar2++; + this->av2.actionVar2++; } else { Player_SetupAction(play, this, Player_Action_80843A38, 0); this->stateFlags1 |= PLAYER_STATE1_26; @@ -8683,10 +8683,10 @@ void Player_Action_80843A38(Player* this, PlayState* play) { static Vec3f D_808545E4 = { 0.0f, 0.0f, 5.0f }; void func_80843AE8(PlayState* play, Player* this) { - if (this->actionVar2 != 0) { - if (this->actionVar2 > 0) { - this->actionVar2--; - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 != 0) { + if (this->av2.actionVar2 > 0) { + this->av2.actionVar2--; + if (this->av2.actionVar2 == 0) { if (this->stateFlags1 & PLAYER_STATE1_27) { LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_swimer_swim_wait, 1.0f, 0.0f, Animation_GetLastFrame(&gPlayerAnim_link_swimer_swim_wait), ANIMMODE_ONCE, @@ -8696,7 +8696,7 @@ void func_80843AE8(PlayState* play, Player* this) { Animation_GetLastFrame(&gPlayerAnim_link_derth_rebirth), ANIMMODE_ONCE, 0.0f); } gSaveContext.healthAccumulator = 0x140; - this->actionVar2 = -1; + this->av2.actionVar2 = -1; } } else if (gSaveContext.healthAccumulator == 0) { this->stateFlags1 &= ~PLAYER_STATE1_7; @@ -8709,8 +8709,8 @@ void func_80843AE8(PlayState* play, Player* this) { func_80837AFC(this, -20); Audio_SetBgmVolumeOnDuringFanfare(); } - } else if (this->actionVar1 != 0) { - this->actionVar2 = 60; + } else if (this->av1.actionVar1 != 0) { + this->av2.actionVar2 = 60; Player_SpawnFairy(play, this, &this->actor.world.pos, &D_808545E4, FAIRY_REVIVE_DEATH); Player_PlaySfx(this, NA_SE_EV_FIATY_HEAL - SFX_FLAG); OnePointCutscene_Init(play, 9908, 125, &this->actor, CAM_ID_MAIN); @@ -8867,10 +8867,10 @@ void Player_Action_8084411C(Player* this, PlayState* play) { Player_UpdateUpperBody(this, play); - if (((this->stateFlags2 & PLAYER_STATE2_19) && (this->actionVar1 == 2)) || !func_8083BBA0(this, play)) { + if (((this->stateFlags2 & PLAYER_STATE2_19) && (this->av1.actionVar1 == 2)) || !func_8083BBA0(this, play)) { if (this->actor.velocity.y < 0.0f) { - if (this->actionVar2 >= 0) { - if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) || (this->actionVar2 == 0) || + if (this->av2.actionVar2 >= 0) { + if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) || (this->av2.actionVar2 == 0) || (this->fallDistance > 0)) { if ((sYDistToFloor > 800.0f) || (this->stateFlags1 & PLAYER_STATE1_2)) { func_80843E14(this, NA_SE_VO_LI_FALL_S); @@ -8879,11 +8879,11 @@ void Player_Action_8084411C(Player* this, PlayState* play) { LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_normal_landing, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 8.0f); - this->actionVar2 = -1; + this->av2.actionVar2 = -1; } } else { - if ((this->actionVar2 == -1) && (this->fallDistance > 120.0f) && (sYDistToFloor > 280.0f)) { - this->actionVar2 = -2; + if ((this->av2.actionVar2 == -1) && (this->fallDistance > 120.0f) && (sYDistToFloor > 280.0f)) { + this->av2.actionVar2 = -2; func_80843E14(this, NA_SE_VO_LI_FALL_L); } @@ -8917,9 +8917,9 @@ void Player_Action_8084411C(Player* this, PlayState* play) { if (this->stateFlags2 & PLAYER_STATE2_19) { if (func_8008E9C4(this)) { - anim = D_80853D4C[this->actionVar1][2]; + anim = D_80853D4C[this->av1.actionVar1][2]; } else { - anim = D_80853D4C[this->actionVar1][1]; + anim = D_80853D4C[this->av1.actionVar1][1]; } } else if (this->skelAnime.animation == &gPlayerAnim_link_normal_run_jump) { anim = &gPlayerAnim_link_normal_run_jump_end; @@ -8940,9 +8940,9 @@ void Player_Action_8084411C(Player* this, PlayState* play) { func_8083A098(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_landing, this->modelAnimType), play); this->skelAnime.endFrame = 8.0f; if (sp3C == 1) { - this->actionVar2 = 10; + this->av2.actionVar2 = 10; } else { - this->actionVar2 = 20; + this->av2.actionVar2 = 20; } } else if (sp3C == 0) { func_8083A098(this, anim, play); @@ -8976,7 +8976,7 @@ void Player_Action_80844708(Player* this, PlayState* play) { } if (func_80842964(this, play) == 0) { - if (this->actionVar2 != 0) { + if (this->av2.actionVar2 != 0) { Math_StepToF(&this->speedXZ, 0.0f, 2.0f); temp = func_808374A0(play, this, &this->skelAnime, 5.0f); @@ -9007,7 +9007,7 @@ void Player_Action_80844708(Player* this, PlayState* play) { Player_RequestRumble(this, 255, 20, 150, 0); Player_PlaySfx(this, NA_SE_PL_BODY_HIT); func_80832698(this, NA_SE_VO_LI_CLIMB_END); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; return; } } @@ -9126,7 +9126,7 @@ void func_80844DC8(Player* this, PlayState* play) { Player_SetupAction(play, this, Player_Action_80844E68, 1); this->unk_868 = 0.0f; Player_AnimPlayLoop(play, this, D_80854360[Player_HoldsTwoHandedWeapon(this)]); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } void func_80844E3C(Player* this) { @@ -9145,18 +9145,18 @@ void Player_Action_80844E68(Player* this, PlayState* play) { func_808355DC(this); this->stateFlags1 &= ~PLAYER_STATE1_17; Player_AnimPlayLoop(play, this, D_80854360[Player_HoldsTwoHandedWeapon(this)]); - this->actionVar2 = -1; + this->av2.actionVar2 = -1; } func_8083721C(this); - if (!func_80842964(this, play) && (this->actionVar2 != 0)) { + if (!func_80842964(this, play) && (this->av2.actionVar2 != 0)) { func_80844E3C(this); - if (this->actionVar2 < 0) { + if (this->av2.actionVar2 < 0) { if (this->unk_858 >= 0.1f) { this->unk_845 = 0; - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } else if (!CHECK_BTN_ALL(sControlInput->cur.button, BTN_B)) { func_80844D68(this, play); } @@ -9339,7 +9339,7 @@ void Player_Action_80845668(Player* this, PlayState* play) { } func_80838940(this, NULL, temp1, play, NA_SE_VO_LI_AUTO_JUMP); - this->actionVar2 = -1; + this->av2.actionVar2 = -1; return; } } else { @@ -9375,9 +9375,9 @@ void Player_Action_80845668(Player* this, PlayState* play) { } if ((this->skelAnime.animation == &gPlayerAnim_link_normal_100step_up) || (this->skelAnime.curFrame > 5.0f)) { - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { func_80832854(this); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } Math_StepToF(&this->actor.shape.yOffset, 0.0f, 150.0f); } @@ -9469,18 +9469,18 @@ void Player_Action_80845CA4(Player* this, PlayState* play) { s32 pad; if (!Player_ActionChange_13(this, play)) { - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { LinkAnimation_Update(play, &this->skelAnime); if (DECR(this->doorTimer) == 0) { this->speedXZ = 0.1f; - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } - } else if (this->actionVar1 == 0) { + } else if (this->av1.actionVar1 == 0) { sp3C = 5.0f * D_808535E8; if (func_80845BA0(play, this, &sp3C, -1) < 30) { - this->actionVar1 = 1; + this->av1.actionVar1 = 1; this->stateFlags1 |= PLAYER_STATE1_29; this->unk_450.x = this->unk_45C.x; @@ -9497,8 +9497,8 @@ void Player_Action_80845CA4(Player* this, PlayState* play) { this->unk_450.x = (Math_SinS(sConveyorYaw) * 400.0f) + this->actor.world.pos.x; this->unk_450.z = (Math_CosS(sConveyorYaw) * 400.0f) + this->actor.world.pos.z; } - } else if (this->actionVar2 < 0) { - this->actionVar2++; + } else if (this->av2.actionVar2 < 0) { + this->av2.actionVar2++; sp34 = gSaveContext.entranceSpeed; sp30 = -1; @@ -9506,8 +9506,8 @@ void Player_Action_80845CA4(Player* this, PlayState* play) { temp = func_80845BA0(play, this, &sp34, sp30); - if ((this->actionVar2 == 0) || ((temp == 0) && (this->speedXZ == 0.0f) && - (Play_GetCamera(play, CAM_ID_MAIN)->stateFlags & CAM_STATE_4))) { + if ((this->av2.actionVar2 == 0) || ((temp == 0) && (this->speedXZ == 0.0f) && + (Play_GetCamera(play, CAM_ID_MAIN)->stateFlags & CAM_STATE_4))) { func_8005B1A4(Play_GetCamera(play, CAM_ID_MAIN)); func_80845C68(play, gSaveContext.respawn[RESPAWN_MODE_DOWN].data); @@ -9533,9 +9533,9 @@ void Player_Action_80845EF8(Player* this, PlayState* play) { Player_UpdateUpperBody(this, play); if (sp2C) { - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { if (DECR(this->doorTimer) == 0) { - this->actionVar2 = 1; + this->av2.actionVar2 = 1; this->skelAnime.endFrame = this->skelAnime.animLength - 1.0f; } } else { @@ -9587,7 +9587,7 @@ static AnimSfxEntry D_8085461C[] = { }; void Player_Action_80846120(Player* this, PlayState* play) { - if (LinkAnimation_Update(play, &this->skelAnime) && (this->actionVar2++ > 20)) { + if (LinkAnimation_Update(play, &this->skelAnime) && (this->av2.actionVar2++ > 20)) { if (!Player_ActionChange_13(this, play)) { func_8083A098(this, &gPlayerAnim_link_normal_heavy_carry_end, play); } @@ -9623,11 +9623,11 @@ void Player_Action_80846260(Player* this, PlayState* play) { if (LinkAnimation_Update(play, &this->skelAnime)) { Player_AnimPlayLoop(play, this, &gPlayerAnim_link_silver_wait); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; return; } - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { if (LinkAnimation_OnFrame(&this->skelAnime, 27.0f)) { Actor* interactRangeActor = this->interactRangeActor; @@ -9669,13 +9669,13 @@ void Player_Action_80846358(Player* this, PlayState* play) { void Player_Action_80846408(Player* this, PlayState* play) { if (LinkAnimation_Update(play, &this->skelAnime)) { Player_AnimPlayLoop(play, this, &gPlayerAnim_link_normal_nocarry_free_wait); - this->actionVar2 = 15; + this->av2.actionVar2 = 15; return; } - if (this->actionVar2 != 0) { - this->actionVar2--; - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 != 0) { + this->av2.actionVar2--; + if (this->av2.actionVar2 == 0) { func_8083A098(this, &gPlayerAnim_link_normal_nocarry_free_end, play); this->stateFlags1 &= ~PLAYER_STATE1_11; func_80832698(this, NA_SE_VO_LI_DAMAGE_S); @@ -9794,7 +9794,7 @@ void func_80846648(PlayState* play, Player* this) { void func_80846660(PlayState* play, Player* this) { Player_SetupAction(play, this, Player_Action_8084F710, 0); if ((play->sceneId == SCENE_LAKE_HYLIA) && IS_CUTSCENE_LAYER) { - this->actionVar1 = 1; + this->av1.actionVar1 = 1; } this->stateFlags1 |= PLAYER_STATE1_29; LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_okarina_warp_goal, 2.0f / 3.0f, 0.0f, 24.0f, @@ -9837,7 +9837,7 @@ void func_808467D4(PlayState* play, Player* this) { if (LINK_IS_ADULT) { func_80846720(play, this, 0); } - this->actionVar2 = 20; + this->av2.actionVar2 = 20; } void func_808468A8(PlayState* play, Player* this) { @@ -10995,7 +10995,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { Player_AnimReplaceApplyFlags(play, this, ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); - this->actionVar2 = 99; + this->av2.actionVar2 = 99; } if (this->unk_844 == 0) { @@ -11522,7 +11522,7 @@ void Player_Draw(Actor* thisx, PlayState* play2) { } if (this->stateFlags2 & PLAYER_STATE2_14) { - f32 scale = (this->actionVar1 >> 1) * 22.0f; + f32 scale = (this->av1.actionVar1 >> 1) * 22.0f; gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (0 - play->gameplayFrames) % 128, 32, @@ -11700,7 +11700,7 @@ void Player_Action_8084B1D8(Player* this, PlayState* play) { BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN)))) { func_8083C148(this, play); Sfx_PlaySfxCentered(NA_SE_SY_CAMERA_ZOOM_UP); - } else if ((DECR(this->actionVar2) == 0) || (this->unk_6AD != 2)) { + } else if ((DECR(this->av2.actionVar2) == 0) || (this->unk_6AD != 2)) { if (func_8008F128(this)) { this->unk_6AE |= 0x43; } else { @@ -11763,9 +11763,9 @@ void Player_Action_8084B530(Player* this, PlayState* play) { if (!func_8084B4D4(play, this) && !func_8084B3CC(play, this) && !func_8083ADD4(play, this)) { if ((this->targetActor != this->interactRangeActor) || !Player_ActionChange_2(this, play)) { if (this->stateFlags1 & PLAYER_STATE1_23) { - s32 sp24 = this->actionVar2; + s32 sp24 = this->av2.actionVar2; func_8083A360(play, this); - this->actionVar2 = sp24; + this->av2.actionVar2 = sp24; } else if (func_808332B8(this)) { func_80838F18(play, this); } else { @@ -11844,8 +11844,8 @@ void Player_Action_8084B898(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_0 | PLAYER_STATE2_6 | PLAYER_STATE2_8; if (func_80832CB0(play, this, &gPlayerAnim_link_normal_pushing)) { - this->actionVar2 = 1; - } else if (this->actionVar2 == 0) { + this->av2.actionVar2 = 1; + } else if (this->av2.actionVar2 == 0) { if (LinkAnimation_OnFrame(&this->skelAnime, 11.0f)) { func_80832698(this, NA_SE_VO_LI_PUSH); } @@ -11895,9 +11895,9 @@ void Player_Action_8084B9E4(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_0 | PLAYER_STATE2_6 | PLAYER_STATE2_8; if (func_80832CB0(play, this, anim)) { - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } else { - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { if (LinkAnimation_OnFrame(&this->skelAnime, 11.0f)) { func_80832698(this, NA_SE_VO_LI_PUSH); } @@ -11945,9 +11945,9 @@ void Player_Action_8084BBE4(Player* this, PlayState* play) { if (LinkAnimation_Update(play, &this->skelAnime)) { // clang-format off - anim = (this->actionVar1 > 0) ? &gPlayerAnim_link_normal_fall_wait : GET_PLAYER_ANIM(PLAYER_ANIMGROUP_jump_climb_wait, this->modelAnimType); Player_AnimPlayLoop(play, this, anim); + anim = (this->av1.actionVar1 > 0) ? &gPlayerAnim_link_normal_fall_wait : GET_PLAYER_ANIM(PLAYER_ANIMGROUP_jump_climb_wait, this->modelAnimType); Player_AnimPlayLoop(play, this, anim); // clang-format on - } else if (this->actionVar1 == 0) { + } else if (this->av1.actionVar1 == 0) { if (this->skelAnime.animation == &gPlayerAnim_link_normal_fall) { temp = 11.0f; } else { @@ -11957,19 +11957,19 @@ void Player_Action_8084BBE4(Player* this, PlayState* play) { if (LinkAnimation_OnFrame(&this->skelAnime, temp)) { func_80832770(this, NA_SE_PL_WALK_GROUND); if (this->skelAnime.animation == &gPlayerAnim_link_normal_fall) { - this->actionVar1 = 1; + this->av1.actionVar1 = 1; } else { - this->actionVar1 = -1; + this->av1.actionVar1 = -1; } } } Math_ScaledStepToS(&this->actor.shape.rot.y, this->yaw, 0x800); - if (this->actionVar1 != 0) { + if (this->av1.actionVar1 != 0) { Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_LINEAR, play); if (this->unk_847[this->unk_846] >= 0) { - if (this->actionVar1 > 0) { + if (this->av1.actionVar1 > 0) { anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_fall_up, this->modelAnimType); } else { anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_jump_climb_up, this->modelAnimType); @@ -11980,7 +11980,7 @@ void Player_Action_8084BBE4(Player* this, PlayState* play) { if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_A) || (this->actor.shape.feetFloorFlag != 0)) { func_80837B60(this); - if (this->actionVar1 < 0) { + if (this->av1.actionVar1 < 0) { this->speedXZ = -0.8f; } else { this->speedXZ = 0.8f; @@ -12010,8 +12010,8 @@ void Player_Action_8084BDFC(Player* this, PlayState* play) { } void func_8084BEE4(Player* this) { - Player_PlaySfx(this, (this->actionVar1 != 0) ? NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_VINE - : NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD); + Player_PlaySfx(this, (this->av1.actionVar1 != 0) ? NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_VINE + : NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD); } void Player_Action_8084BF1C(Player* this, PlayState* play) { @@ -12033,7 +12033,7 @@ void Player_Action_8084BF1C(Player* this, PlayState* play) { this->fallStartHeight = this->actor.world.pos.y; this->stateFlags2 |= PLAYER_STATE2_6; - if ((this->actionVar1 != 0) && (ABS(sp84) < ABS(sp80))) { + if ((this->av1.actionVar1 != 0) && (ABS(sp84) < ABS(sp80))) { phi_f0 = ABS(sp80) * 0.0325f; sp84 = 0; } else { @@ -12055,7 +12055,7 @@ void Player_Action_8084BF1C(Player* this, PlayState* play) { this->skelAnime.playSpeed = phi_f2 * phi_f0; - if (this->actionVar2 >= 0) { + if (this->av2.actionVar2 >= 0) { if ((this->actor.wallPoly != NULL) && (this->actor.wallBgId != BGCHECK_SCENE)) { DynaPolyActor* wallPolyActor = DynaPoly_GetActor(&play->colCtx, this->actor.wallBgId); if (wallPolyActor != NULL) { @@ -12069,22 +12069,22 @@ void Player_Action_8084BF1C(Player* this, PlayState* play) { func_8083F360(play, this, 26.0f, this->ageProperties->unk_3C, 50.0f, -20.0f); } - if ((this->actionVar2 < 0) || !func_8083FBC0(this, play)) { + if ((this->av2.actionVar2 < 0) || !func_8083FBC0(this, play)) { if (LinkAnimation_Update(play, &this->skelAnime) != 0) { - if (this->actionVar2 < 0) { - this->actionVar2 = ABS(this->actionVar2) & 1; + if (this->av2.actionVar2 < 0) { + this->av2.actionVar2 = ABS(this->av2.actionVar2) & 1; return; } if (sp84 != 0) { - sp68 = this->actionVar1 + this->actionVar2; + sp68 = this->av1.actionVar1 + this->av2.actionVar2; if (sp84 > 0) { D_8085488C.y = this->ageProperties->unk_40; temp_f0 = func_8083973C(play, this, &D_8085488C, &sp5C); if (this->actor.world.pos.y < temp_f0) { - if (this->actionVar1 != 0) { + if (this->av1.actionVar1 != 0) { this->actor.world.pos.y = temp_f0; this->stateFlags1 &= ~PLAYER_STATE1_21; func_8083A5C4(play, this, this->actor.wallPoly, this->ageProperties->unk_3C, @@ -12094,7 +12094,7 @@ void Player_Action_8084BF1C(Player* this, PlayState* play) { func_8083A9B8(this, &gPlayerAnim_link_normal_jump_climb_up_free, play); this->stateFlags1 |= PLAYER_STATE1_14; } else { - func_8083F070(this, this->ageProperties->unk_CC[this->actionVar2], play); + func_8083F070(this, this->ageProperties->unk_CC[this->av2.actionVar2], play); } } else { this->skelAnime.prevTransl = this->ageProperties->unk_4A[sp68]; @@ -12102,14 +12102,14 @@ void Player_Action_8084BF1C(Player* this, PlayState* play) { } } else { if ((this->actor.world.pos.y - this->actor.floorHeight) < 15.0f) { - if (this->actionVar1 != 0) { + if (this->av1.actionVar1 != 0) { func_8083FB7C(this, play); } else { - if (this->actionVar2 != 0) { + if (this->av2.actionVar2 != 0) { this->skelAnime.prevTransl = this->ageProperties->unk_44; } - func_8083F070(this, this->ageProperties->unk_C4[this->actionVar2], play); - this->actionVar2 = 1; + func_8083F070(this, this->ageProperties->unk_C4[this->av2.actionVar2], play); + this->av2.actionVar2 = 1; } } else { sp68 ^= 1; @@ -12119,16 +12119,16 @@ void Player_Action_8084BF1C(Player* this, PlayState* play) { ANIMMODE_ONCE, 0.0f); } } - this->actionVar2 ^= 1; + this->av2.actionVar2 ^= 1; } else { - if ((this->actionVar1 != 0) && (sp80 != 0)) { - anim2 = this->ageProperties->unk_BC[this->actionVar2]; + if ((this->av1.actionVar1 != 0) && (sp80 != 0)) { + anim2 = this->ageProperties->unk_BC[this->av2.actionVar2]; if (sp80 > 0) { - this->skelAnime.prevTransl = this->ageProperties->unk_7A[this->actionVar2]; + this->skelAnime.prevTransl = this->ageProperties->unk_7A[this->av2.actionVar2]; Player_AnimPlayOnce(play, this, anim2); } else { - this->skelAnime.prevTransl = this->ageProperties->unk_86[this->actionVar2]; + this->skelAnime.prevTransl = this->ageProperties->unk_86[this->av2.actionVar2]; LinkAnimation_Change(play, &this->skelAnime, anim2, -1.0f, Animation_GetLastFrame(anim2), 0.0f, ANIMMODE_ONCE, 0.0f); } @@ -12141,10 +12141,10 @@ void Player_Action_8084BF1C(Player* this, PlayState* play) { } } - if (this->actionVar2 < 0) { - if (((this->actionVar2 == -2) && + if (this->av2.actionVar2 < 0) { + if (((this->av2.actionVar2 == -2) && (LinkAnimation_OnFrame(&this->skelAnime, 14.0f) || LinkAnimation_OnFrame(&this->skelAnime, 29.0f))) || - ((this->actionVar2 == -4) && + ((this->av2.actionVar2 == -4) && (LinkAnimation_OnFrame(&this->skelAnime, 22.0f) || LinkAnimation_OnFrame(&this->skelAnime, 35.0f) || LinkAnimation_OnFrame(&this->skelAnime, 49.0f) || LinkAnimation_OnFrame(&this->skelAnime, 55.0f)))) { func_8084BEE4(this); @@ -12190,7 +12190,7 @@ void Player_Action_8084C5F8(Player* this, PlayState* play) { sp38 = D_80854898; - if (this->actionVar2 != 0) { + if (this->av2.actionVar2 != 0) { Player_ProcessAnimSfxList(this, D_808548A8); sp38 = D_808548A0; } @@ -12308,8 +12308,8 @@ s32 func_8084C9BC(Player* this, PlayState* play) { s32 sp38; f32 sp34; - if (this->actionVar2 < 0) { - this->actionVar2 = 99; + if (this->av2.actionVar2 < 0) { + this->av2.actionVar2 = 99; } else { sp38 = (this->mountSide < 0) ? 0 : 1; if (!func_8084C89C(play, this, sp38, &sp34)) { @@ -12413,10 +12413,10 @@ void Player_Action_8084CC98(Player* this, PlayState* play) { func_8084CBF4(this, 1.0f, 10.0f); - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { if (LinkAnimation_Update(play, &this->skelAnime)) { this->skelAnime.animation = &gPlayerAnim_link_uma_wait_1; - this->actionVar2 = 99; + this->av2.actionVar2 = 99; return; } @@ -12439,12 +12439,13 @@ void Player_Action_8084CC98(Player* this, PlayState* play) { func_8002DE74(play, this); this->skelAnime.prevTransl = D_8085499C; - if ((rideActor->animationIdx != this->actionVar2) && ((rideActor->animationIdx >= 2) || (this->actionVar2 >= 2))) { - if ((this->actionVar2 = rideActor->animationIdx) < 2) { + if ((rideActor->animationIdx != this->av2.actionVar2) && + ((rideActor->animationIdx >= 2) || (this->av2.actionVar2 >= 2))) { + if ((this->av2.actionVar2 = rideActor->animationIdx) < 2) { f32 rand = Rand_ZeroOne(); s32 temp = 0; - this->actionVar2 = 1; + this->av2.actionVar2 = 1; if (rand < 0.1f) { temp = 2; @@ -12453,20 +12454,20 @@ void Player_Action_8084CC98(Player* this, PlayState* play) { } Player_AnimPlayOnce(play, this, D_8085498C[temp]); } else { - this->skelAnime.animation = D_80854944[this->actionVar2 - 2]; + this->skelAnime.animation = D_80854944[this->av2.actionVar2 - 2]; Animation_SetMorph(play, &this->skelAnime, 8.0f); - if (this->actionVar2 < 4) { + if (this->av2.actionVar2 < 4) { func_80834644(play, this); - this->actionVar1 = 0; + this->av1.actionVar1 = 0; } } } - if (this->actionVar2 == 1) { + if (this->av2.actionVar2 == 1) { if ((D_808535E0 != 0) || func_8083224C(play)) { Player_AnimPlayOnce(play, this, &gPlayerAnim_link_uma_wait_3); } else if (LinkAnimation_Update(play, &this->skelAnime)) { - this->actionVar2 = 99; + this->av2.actionVar2 = 99; } else if (this->skelAnime.animation == &gPlayerAnim_link_uma_wait_1) { Player_ProcessAnimSfxList(this, D_808549A4); } @@ -12483,11 +12484,11 @@ void Player_Action_8084CC98(Player* this, PlayState* play) { this->csAction = PLAYER_CSACTION_NONE; } this->unk_6AD = 0; - this->actionVar1 = 0; - } else if ((this->actionVar2 < 2) || (this->actionVar2 >= 4)) { + this->av1.actionVar1 = 0; + } else if ((this->av2.actionVar2 < 2) || (this->av2.actionVar2 >= 4)) { D_808535E0 = Player_UpdateUpperBody(this, play); if (D_808535E0 != 0) { - this->actionVar1 = 0; + this->av1.actionVar1 = 0; } } @@ -12501,10 +12502,10 @@ void Player_Action_8084CC98(Player* this, PlayState* play) { (!func_8083224C(play) && ((rideActor->actor.speed != 0.0f) || !Player_ActionChange_4(this, play)) && !Player_ActionChange_6(this, play))) { if (D_808535E0 == 0) { - if (this->actionVar1 != 0) { + if (this->av1.actionVar1 != 0) { if (LinkAnimation_Update(play, &this->skelAnimeUpper)) { rideActor->stateFlags &= ~ENHORSE_FLAG_8; - this->actionVar1 = 0; + this->av1.actionVar1 = 0; } if (this->skelAnimeUpper.animation == &gPlayerAnim_link_uma_stop_muti) { @@ -12530,14 +12531,14 @@ void Player_Action_8084CC98(Player* this, PlayState* play) { if (EN_HORSE_CHECK_3(rideActor)) { anim = &gPlayerAnim_link_uma_stop_muti; } else if (EN_HORSE_CHECK_2(rideActor)) { - if ((this->actionVar2 >= 2) && (this->actionVar2 != 99)) { - anim = D_80854968[this->actionVar2 - 2]; + if ((this->av2.actionVar2 >= 2) && (this->av2.actionVar2 != 99)) { + anim = D_80854968[this->av2.actionVar2 - 2]; } } if (anim != NULL) { LinkAnimation_PlayOnce(play, &this->skelAnimeUpper, anim); - this->actionVar1 = 1; + this->av1.actionVar1 = 1; } } } @@ -12684,7 +12685,7 @@ void Player_Action_8084D7C4(Player* this, PlayState* play) { func_8084B158(play, this, NULL, this->speedXZ); func_8084B000(this); - if (DECR(this->actionVar2) == 0) { + if (DECR(this->av2.actionVar2) == 0) { func_80838F18(play, this); } } @@ -12798,8 +12799,8 @@ void Player_Action_8084DC48(Player* this, PlayState* play) { return; } - if (this->actionVar1 == 0) { - if (this->actionVar2 == 0) { + if (this->av1.actionVar1 == 0) { + if (this->av2.actionVar2 == 0) { if (LinkAnimation_Update(play, &this->skelAnime) || ((this->skelAnime.curFrame >= 22.0f) && !CHECK_BTN_ALL(sControlInput->cur.button, BTN_A))) { func_8083D330(play, this); @@ -12819,20 +12820,20 @@ void Player_Action_8084DC48(Player* this, PlayState* play) { (this->actor.yDistToWater < D_80854784[CUR_UPG_VALUE(UPG_SCALE)])) { func_8084DBC4(play, this, -2.0f); } else { - this->actionVar1++; + this->av1.actionVar1++; Player_AnimChangeLoopSlowMorph(play, this, &gPlayerAnim_link_swimer_swim_wait); } - } else if (this->actionVar1 == 1) { + } else if (this->av1.actionVar1 == 1) { LinkAnimation_Update(play, &this->skelAnime); func_8084B000(this); if (this->unk_6C2 < 10000) { - this->actionVar1++; - this->actionVar2 = this->actor.yDistToWater; + this->av1.actionVar1++; + this->av2.actionVar2 = this->actor.yDistToWater; Player_AnimChangeLoopSlowMorph(play, this, &gPlayerAnim_link_swimer_swim); } } else if (!func_8083D12C(play, this, sControlInput)) { - sp2C = (this->actionVar2 * 0.018f) + 4.0f; + sp2C = (this->av2.actionVar2 * 0.018f) + 4.0f; if (this->stateFlags1 & PLAYER_STATE1_11) { sControlInput = NULL; @@ -12873,9 +12874,9 @@ s32 func_8084DFF4(PlayState* play, Player* this) { return 1; } - if (this->actionVar1 == 0) { + if (this->av1.actionVar1 == 0) { giEntry = &sGetItemTable[this->getItemId - 1]; - this->actionVar1 = 1; + this->av1.actionVar1 = 1; Message_StartTextbox(play, giEntry->textId, &this->actor); Item_Give(play, giEntry->itemId); @@ -12968,7 +12969,7 @@ static s16 sWarpSongEntrances[] = { void Player_Action_8084E3C4(Player* this, PlayState* play) { if (LinkAnimation_Update(play, &this->skelAnime)) { Player_AnimPlayLoopAdjusted(play, this, &gPlayerAnim_link_normal_okarina_swing); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; if (this->stateFlags2 & (PLAYER_STATE2_23 | PLAYER_STATE2_25)) { this->stateFlags2 |= PLAYER_STATE2_24; } else { @@ -12977,7 +12978,7 @@ void Player_Action_8084E3C4(Player* this, PlayState* play) { return; } - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { return; } @@ -13045,12 +13046,12 @@ void Player_Action_8084E6D4(Player* this, PlayState* play) { s32 cond; if (LinkAnimation_Update(play, &this->skelAnime)) { - if (this->actionVar2 != 0) { - if (this->actionVar2 >= 2) { - this->actionVar2--; + if (this->av2.actionVar2 != 0) { + if (this->av2.actionVar2 >= 2) { + this->av2.actionVar2--; } - if (func_8084DFF4(play, this) && (this->actionVar2 == 1)) { + if (func_8084DFF4(play, this) && (this->av2.actionVar2 == 1)) { cond = ((this->targetActor != NULL) && (this->exchangeItemId < 0)) || (this->stateFlags3 & PLAYER_STATE3_5); @@ -13090,11 +13091,11 @@ void Player_Action_8084E6D4(Player* this, PlayState* play) { Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_demo_get_itemA); } - this->actionVar2 = 2; + this->av2.actionVar2 = 2; func_80835EA4(play, 9); } } else { - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { if (!LINK_IS_ADULT) { Player_ProcessAnimSfxList(this, D_808549E0); } @@ -13126,9 +13127,9 @@ static AnimSfxEntry D_808549F4[] = { void Player_Action_8084E9AC(Player* this, PlayState* play) { if (LinkAnimation_Update(play, &this->skelAnime)) { - if (this->actionVar1 == 0) { - if (DECR(this->actionVar2) == 0) { - this->actionVar1 = 1; + if (this->av1.actionVar1 == 0) { + if (DECR(this->av2.actionVar2) == 0) { + this->av1.actionVar1 = 1; this->skelAnime.endFrame = this->skelAnime.animLength - 1.0f; } } else { @@ -13154,7 +13155,7 @@ static u8 D_808549FC[] = { void Player_Action_8084EAC0(Player* this, PlayState* play) { if (LinkAnimation_Update(play, &this->skelAnime)) { - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { if (this->itemAction == PLAYER_IA_BOTTLE_POE) { s32 rand = Rand_S16Offset(-1, 3); @@ -13188,20 +13189,20 @@ void Player_Action_8084EAC0(Player* this, PlayState* play) { } Player_AnimPlayLoopAdjusted(play, this, &gPlayerAnim_link_bottle_drink_demo_wait); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; return; } func_8083C0E8(this, play); func_8005B1A4(Play_GetCamera(play, CAM_ID_MAIN)); - } else if (this->actionVar2 == 1) { + } else if (this->av2.actionVar2 == 1) { if ((gSaveContext.healthAccumulator == 0) && (gSaveContext.magicState != MAGIC_STATE_FILL)) { Player_AnimChangeOnceMorphAdjusted(play, this, &gPlayerAnim_link_bottle_drink_demo_end); - this->actionVar2 = 2; + this->av2.actionVar2 = 2; Player_UpdateBottleHeld(play, this, ITEM_BOTTLE_EMPTY, PLAYER_IA_BOTTLE); } func_80832698(this, NA_SE_VO_LI_DRINK - SFX_FLAG); - } else if ((this->actionVar2 == 2) && LinkAnimation_OnFrame(&this->skelAnime, 29.0f)) { + } else if ((this->av2.actionVar2 == 2) && LinkAnimation_OnFrame(&this->skelAnime, 29.0f)) { func_80832698(this, NA_SE_VO_LI_BREATH_DRINK); } } @@ -13219,29 +13220,29 @@ void Player_Action_8084ECA4(Player* this, PlayState* play) { s32 temp; s32 i; - sp24 = &D_80854554[this->actionVar2]; + sp24 = &D_80854554[this->av2.actionVar2]; func_8083721C(this); if (LinkAnimation_Update(play, &this->skelAnime)) { - if (this->actionVar1 != 0) { - if (this->actionVar2 == 0) { - Message_StartTextbox(play, sBottleCatchInfos[this->actionVar1 - 1].textId, &this->actor); + if (this->av1.actionVar1 != 0) { + if (this->av2.actionVar2 == 0) { + Message_StartTextbox(play, sBottleCatchInfos[this->av1.actionVar1 - 1].textId, &this->actor); Audio_PlayFanfare(NA_BGM_ITEM_GET | 0x900); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } else if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) { - this->actionVar1 = 0; + this->av1.actionVar1 = 0; func_8005B1A4(Play_GetCamera(play, CAM_ID_MAIN)); } } else { func_8083C0E8(this, play); } } else { - if (this->actionVar1 == 0) { + if (this->av1.actionVar1 == 0) { temp = this->skelAnime.curFrame - sp24->unk_08; if (temp >= 0) { if (sp24->unk_09 >= temp) { - if (this->actionVar2 != 0) { + if (this->av2.actionVar2 != 0) { if (temp == 0) { Player_PlaySfx(this, NA_SE_IT_SCOOP_UP_WATER); } @@ -13256,8 +13257,8 @@ void Player_Action_8084ECA4(Player* this, PlayState* play) { } if (i < ARRAY_COUNT(sBottleCatchInfos)) { - this->actionVar1 = i + 1; - this->actionVar2 = 0; + this->av1.actionVar1 = i + 1; + this->av2.actionVar2 = 0; this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29; this->interactRangeActor->parent = &this->actor; Player_UpdateBottleHeld(play, this, catchInfo->itemId, ABS(catchInfo->itemAction)); @@ -13340,7 +13341,7 @@ void Player_Action_8084F104(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_5; if (LinkAnimation_Update(play, &this->skelAnime)) { - if (this->actionVar2 < 0) { + if (this->av2.actionVar2 < 0) { func_8083C0E8(this, play); } else if (this->exchangeItemId == EXCH_ITEM_NONE) { Actor* targetActor = this->targetActor; @@ -13358,21 +13359,21 @@ void Player_Action_8084F104(Player* this, PlayState* play) { this->unk_862 = ABS(giEntry->gi); } - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { Message_StartTextbox(play, this->actor.textId, &this->actor); if ((this->itemAction == PLAYER_IA_CHICKEN) || (this->itemAction == PLAYER_IA_POCKET_CUCCO)) { Player_PlaySfx(this, NA_SE_EV_CHICKEN_CRY_M); } - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } else if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) { this->actor.flags &= ~ACTOR_FLAG_8; this->unk_862 = 0; - if (this->actionVar1 == 1) { + if (this->av1.actionVar1 == 1) { Player_AnimPlayOnce(play, this, &gPlayerAnim_link_bottle_read_end); - this->actionVar2 = -1; + this->av2.actionVar2 = -1; } else { func_8083C0E8(this, play); } @@ -13380,11 +13381,11 @@ void Player_Action_8084F104(Player* this, PlayState* play) { func_8005B1A4(Play_GetCamera(play, CAM_ID_MAIN)); } } - } else if (this->actionVar2 >= 0) { + } else if (this->av2.actionVar2 >= 0) { Player_ProcessAnimSfxList(this, D_80854A3C); } - if ((this->actionVar1 == 0) && (this->unk_664 != NULL)) { + if ((this->av1.actionVar1 == 0) && (this->unk_664 != NULL)) { this->yaw = this->actor.shape.rot.y = func_8083DB98(this, 0); } } @@ -13427,7 +13428,7 @@ void Player_Action_8084F390(Player* this, PlayState* play) { Player_GetSlopeDirection(floorPoly, &slopeNormal, &downwardSlopeYaw); sp44 = downwardSlopeYaw; - if (this->actionVar1 != 0) { + if (this->av1.actionVar1 != 0) { sp44 = downwardSlopeYaw + 0x8000; } @@ -13452,7 +13453,7 @@ void Player_Action_8084F390(Player* this, PlayState* play) { if (Math_AsymStepToF(&this->speedXZ, sp50, sp4C, sp48) && (sp50 == 0)) { LinkAnimationHeader* anim; - if (this->actionVar1 == 0) { + if (this->av1.actionVar1 == 0) { anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_down_slope_slip_end, this->modelAnimType); } else { anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_up_slope_slip_end, this->modelAnimType); @@ -13466,7 +13467,7 @@ void Player_Action_8084F390(Player* this, PlayState* play) { } void Player_Action_8084F608(Player* this, PlayState* play) { - if ((DECR(this->actionVar2) == 0) && func_8083ADD4(play, this)) { + if ((DECR(this->av2.actionVar2) == 0) && func_8083ADD4(play, this)) { func_80852280(play, this, NULL); Player_SetupAction(play, this, Player_Action_80852E14, 0); Player_Action_80852E14(this, play); @@ -13475,23 +13476,23 @@ void Player_Action_8084F608(Player* this, PlayState* play) { void Player_Action_8084F698(Player* this, PlayState* play) { Player_SetupAction(play, this, Player_Action_8084F608, 0); - this->actionVar2 = 40; + this->av2.actionVar2 = 40; Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, 0.0f, 0.0f, 0.0f, 0, 0, 0, DEMOKANKYO_WARP_IN); } void Player_Action_8084F710(Player* this, PlayState* play) { s32 pad; - if ((this->actionVar1 != 0) && (play->csCtx.curFrame < 305)) { + if ((this->av1.actionVar1 != 0) && (play->csCtx.curFrame < 305)) { this->actor.gravity = 0.0f; this->actor.velocity.y = 0.0f; } else if (sYDistToFloor < 150.0f) { if (LinkAnimation_Update(play, &this->skelAnime)) { - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { this->skelAnime.endFrame = this->skelAnime.animLength - 1.0f; func_808328A0(this); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } } else { if ((play->sceneId == SCENE_KOKIRI_FOREST) && func_8083ADD4(play, this)) { @@ -13517,13 +13518,13 @@ void Player_Action_8084F710(Player* this, PlayState* play) { void Player_Action_8084F88C(Player* this, PlayState* play) { LinkAnimation_Update(play, &this->skelAnime); - if ((this->actionVar2++ > 8) && (play->transitionTrigger == TRANS_TRIGGER_OFF)) { + if ((this->av2.actionVar2++ > 8) && (play->transitionTrigger == TRANS_TRIGGER_OFF)) { - if (this->actionVar1 != 0) { + if (this->av1.actionVar1 != 0) { if (play->sceneId == SCENE_ICE_CAVERN) { Play_TriggerRespawn(play); play->nextEntranceIndex = ENTR_ICE_CAVERN_0; - } else if (this->actionVar1 < 0) { + } else if (this->av1.actionVar1 < 0) { Play_TriggerRespawn(play); } else { Play_TriggerVoidOut(play); @@ -13577,13 +13578,13 @@ void Player_Action_8084FA54(Player* this, PlayState* play) { } void Player_Action_8084FB10(Player* this, PlayState* play) { - if (this->actionVar1 >= 0) { - if (this->actionVar1 < 6) { - this->actionVar1++; + if (this->av1.actionVar1 >= 0) { + if (this->av1.actionVar1 < 6) { + this->av1.actionVar1++; } if (func_80832594(this, 1, 100)) { - this->actionVar1 = -1; + this->av1.actionVar1 = -1; EffectSsIcePiece_SpawnBurst(play, &this->actor.world.pos, this->actor.scale.x); Player_PlaySfx(this, NA_SE_PL_ICE_BROKEN); } else { @@ -13605,8 +13606,8 @@ void Player_Action_8084FBF4(Player* this, PlayState* play) { LinkAnimation_Update(play, &this->skelAnime); func_808382BC(this); - if (((this->actionVar2 % 25) != 0) || func_80837B18(play, this, -1)) { - if (DECR(this->actionVar2) == 0) { + if (((this->av2.actionVar2 % 25) != 0) || func_80837B18(play, this, -1)) { + if (DECR(this->av2.actionVar2) == 0) { func_80839F90(this, play); } } @@ -13853,9 +13854,9 @@ void Player_Action_8085063C(Player* this, PlayState* play) { LinkAnimation_Update(play, &this->skelAnime); Player_UpdateUpperBody(this, play); - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { Message_StartTextbox(play, 0x3B, &this->actor); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; return; } @@ -13885,14 +13886,14 @@ void Player_Action_8085063C(Player* this, PlayState* play) { void Player_Action_8085076C(Player* this, PlayState* play) { s32 respawnData = gSaveContext.respawn[RESPAWN_MODE_TOP].data; - if (this->actionVar2 > 20) { + if (this->av2.actionVar2 > 20) { this->actor.draw = Player_Draw; this->actor.world.pos.y += 60.0f; func_80837B9C(this, play); return; } - if (this->actionVar2++ == 20) { + if (this->av2.actionVar2++ == 20) { gSaveContext.respawn[RESPAWN_MODE_TOP].data = respawnData + 1; Sfx_PlaySfxAtPos(&gSaveContext.respawn[RESPAWN_MODE_TOP].pos, NA_SE_PL_MAGIC_WIND_WARP); } @@ -13941,38 +13942,38 @@ static AnimSfxEntry D_80854A8C[][2] = { void Player_Action_808507F4(Player* this, PlayState* play) { if (LinkAnimation_Update(play, &this->skelAnime)) { - if (this->actionVar1 < 0) { + if (this->av1.actionVar1 < 0) { if ((this->itemAction == PLAYER_IA_NAYRUS_LOVE) || (gSaveContext.magicState == MAGIC_STATE_IDLE)) { func_80839FFC(this, play); func_8005B1A4(Play_GetCamera(play, CAM_ID_MAIN)); } } else { - if (this->actionVar2 == 0) { - LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, D_80854A58[this->actionVar1], 0.83f); + if (this->av2.actionVar2 == 0) { + LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, D_80854A58[this->av1.actionVar1], 0.83f); - if (func_80846A00(play, this, this->actionVar1) != NULL) { + if (func_80846A00(play, this, this->av1.actionVar1) != NULL) { this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29; - if ((this->actionVar1 != 0) || (gSaveContext.respawn[RESPAWN_MODE_TOP].data <= 0)) { + if ((this->av1.actionVar1 != 0) || (gSaveContext.respawn[RESPAWN_MODE_TOP].data <= 0)) { gSaveContext.magicState = MAGIC_STATE_CONSUME_SETUP; } } else { Magic_Reset(play); } } else { - LinkAnimation_PlayLoopSetSpeed(play, &this->skelAnime, D_80854A64[this->actionVar1], 0.83f); + LinkAnimation_PlayLoopSetSpeed(play, &this->skelAnime, D_80854A64[this->av1.actionVar1], 0.83f); - if (this->actionVar1 == 0) { - this->actionVar2 = -10; + if (this->av1.actionVar1 == 0) { + this->av2.actionVar2 = -10; } } - this->actionVar2++; + this->av2.actionVar2++; } } else { - if (this->actionVar2 < 0) { - this->actionVar2++; + if (this->av2.actionVar2 < 0) { + this->av2.actionVar2++; - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { gSaveContext.respawn[RESPAWN_MODE_TOP].data = 1; Play_SetupRespawnPoint(play, RESPAWN_MODE_TOP, 0x6FF); gSaveContext.save.info.fw.set = 1; @@ -13985,20 +13986,20 @@ void Player_Action_808507F4(Player* this, PlayState* play) { gSaveContext.save.info.fw.roomIndex = gSaveContext.respawn[RESPAWN_MODE_DOWN].roomIndex; gSaveContext.save.info.fw.tempSwchFlags = gSaveContext.respawn[RESPAWN_MODE_DOWN].tempSwchFlags; gSaveContext.save.info.fw.tempCollectFlags = gSaveContext.respawn[RESPAWN_MODE_DOWN].tempCollectFlags; - this->actionVar2 = 2; + this->av2.actionVar2 = 2; } - } else if (this->actionVar1 >= 0) { - if (this->actionVar2 == 0) { + } else if (this->av1.actionVar1 >= 0) { + if (this->av2.actionVar2 == 0) { Player_ProcessAnimSfxList(this, D_80854A80); - } else if (this->actionVar2 == 1) { - Player_ProcessAnimSfxList(this, D_80854A8C[this->actionVar1]); - if ((this->actionVar1 == 2) && LinkAnimation_OnFrame(&this->skelAnime, 30.0f)) { + } else if (this->av2.actionVar2 == 1) { + Player_ProcessAnimSfxList(this, D_80854A8C[this->av1.actionVar1]); + if ((this->av1.actionVar1 == 2) && LinkAnimation_OnFrame(&this->skelAnime, 30.0f)) { this->stateFlags1 &= ~(PLAYER_STATE1_28 | PLAYER_STATE1_29); } - } else if (D_80854A7C[this->actionVar1] < this->actionVar2++) { - LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, D_80854A70[this->actionVar1], 0.83f); + } else if (D_80854A7C[this->av1.actionVar1] < this->av2.actionVar2++) { + LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, D_80854A70[this->av1.actionVar1], 0.83f); this->yaw = this->actor.shape.rot.y; - this->actionVar1 = -1; + this->av1.actionVar1 = -1; } } } @@ -14045,7 +14046,7 @@ void Player_Action_80850AEC(Player* this, PlayState* play) { } void Player_Action_80850C68(Player* this, PlayState* play) { - if ((this->actionVar2 != 0) && ((this->unk_858 != 0.0f) || (this->unk_85C != 0.0f))) { + if ((this->av2.actionVar2 != 0) && ((this->unk_858 != 0.0f) || (this->unk_85C != 0.0f))) { f32 updateScale = R_UPDATE_RATE * 0.5f; this->skelAnime.curFrame += this->skelAnime.playSpeed * updateScale; @@ -14065,7 +14066,7 @@ void Player_Action_80850C68(Player* this, PlayState* play) { } else if (LinkAnimation_Update(play, &this->skelAnime)) { this->unk_860 = 2; Player_AnimPlayLoop(play, this, &gPlayerAnim_link_fishing_wait); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } func_8083721C(this); @@ -14403,7 +14404,7 @@ void func_808511D4(PlayState* play, Player* this, void* anim) { void func_808511FC(PlayState* play, Player* this, void* anim) { if (LinkAnimation_Update(play, &this->skelAnime)) { Player_AnimChangeLoopMorphAdjustedZeroRootYawSpeed(play, this, anim); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } } @@ -14417,7 +14418,7 @@ void func_80851248(PlayState* play, Player* this, void* anim) { void func_80851294(PlayState* play, Player* this, void* anim) { if (LinkAnimation_Update(play, &this->skelAnime)) { Player_AnimReplaceNormalPlayLoopAdjusted(play, this, anim); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } } @@ -14449,9 +14450,9 @@ void func_80851368(PlayState* play, Player* this, CsCmdActorCue* cue) { void func_808513BC(PlayState* play, Player* this, CsCmdActorCue* cue) { this->actor.gravity = 0.0f; - if (this->actionVar1 == 0) { + if (this->av1.actionVar1 == 0) { if (func_8083D12C(play, this, NULL)) { - this->actionVar1 = 1; + this->av1.actionVar1 = 1; } else { func_8084B158(play, this, NULL, fabsf(this->actor.velocity.y)); Math_ScaledStepToS(&this->unk_6C2, -10000, 800); @@ -14461,7 +14462,7 @@ void func_808513BC(PlayState* play, Player* this, CsCmdActorCue* cue) { } if (LinkAnimation_Update(play, &this->skelAnime)) { - if (this->actionVar1 == 1) { + if (this->av1.actionVar1 == 1) { Player_AnimChangeLoopSlowMorph(play, this, &gPlayerAnim_link_swimer_swim_wait); } else { Player_AnimPlayLoop(play, this, &gPlayerAnim_link_swimer_swim_wait); @@ -14566,7 +14567,7 @@ void func_80851828(PlayState* play, Player* this, CsCmdActorCue* cue) { func_80845BA0(play, this, &sp1C, 10); if (play->sceneId == SCENE_JABU_JABU_BOSS) { - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) { return; } @@ -14577,8 +14578,8 @@ void func_80851828(PlayState* play, Player* this, CsCmdActorCue* cue) { } } - this->actionVar2++; - if (this->actionVar2 > 20) { + this->av2.actionVar2++; + if (this->av2.actionVar2 > 20) { this->csAction = PLAYER_CSACTION_11; } } @@ -14590,10 +14591,10 @@ void func_808518DC(PlayState* play, Player* this, CsCmdActorCue* cue) { void func_8085190C(PlayState* play, Player* this, CsCmdActorCue* cue) { func_80851314(this); - if (this->actionVar2 != 0) { + if (this->av2.actionVar2 != 0) { if (LinkAnimation_Update(play, &this->skelAnime)) { Player_AnimPlayLoop(play, this, func_808334E4(this)); - this->actionVar2 = 0; + this->av2.actionVar2 = 0; } func_80833C3C(this); @@ -14680,10 +14681,10 @@ static AnimSfxEntry D_808551B4[] = { void func_80851BE8(PlayState* play, Player* this, CsCmdActorCue* cue) { LinkAnimation_Update(play, &this->skelAnime); - this->actionVar2++; + this->av2.actionVar2++; - if (this->actionVar2 >= 180) { - if (this->actionVar2 == 180) { + if (this->av2.actionVar2 >= 180) { + if (this->av2.actionVar2 == 180) { LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_okarina_warp_goal, (2.0f / 3.0f), 10.0f, Animation_GetLastFrame(&gPlayerAnim_link_okarina_warp_goal), ANIMMODE_ONCE, -8.0f); } @@ -14692,13 +14693,13 @@ void func_80851BE8(PlayState* play, Player* this, CsCmdActorCue* cue) { } void func_80851CA4(PlayState* play, Player* this, CsCmdActorCue* cue) { - if (LinkAnimation_Update(play, &this->skelAnime) && (this->actionVar2 == 0) && + if (LinkAnimation_Update(play, &this->skelAnime) && (this->av2.actionVar2 == 0) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) { Player_AnimPlayOnce(play, this, &gPlayerAnim_link_normal_back_downB); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } - if (this->actionVar2 != 0) { + if (this->av2.actionVar2 != 0) { func_8083721C(this); } } @@ -14755,8 +14756,8 @@ void func_80851ECC(PlayState* play, Player* this, CsCmdActorCue* cue) { void func_80851F14(PlayState* play, Player* this, LinkAnimationHeader* anim, AnimSfxEntry* arg3) { if (LinkAnimation_Update(play, &this->skelAnime)) { Player_AnimPlayLoopAdjusted(play, this, anim); - this->actionVar2 = 1; - } else if (this->actionVar2 == 0) { + this->av2.actionVar2 = 1; + } else if (this->av2.actionVar2 == 0) { Player_ProcessAnimSfxList(this, arg3); } } @@ -14777,8 +14778,8 @@ void func_80851FB0(PlayState* play, Player* this, CsCmdActorCue* cue) { Player_AnimReplacePlayLoop(play, this, &gPlayerAnim_clink_op3_wait3, ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); - this->actionVar2 = 1; - } else if (this->actionVar2 == 0) { + this->av2.actionVar2 = 1; + } else if (this->av2.actionVar2 == 0) { Player_ProcessAnimSfxList(this, D_808551BC); if (LinkAnimation_OnFrame(&this->skelAnime, 240.0f)) { this->actor.shape.shadowDraw = ActorShadow_DrawFeet; @@ -14859,8 +14860,8 @@ void func_80852280(PlayState* play, Player* this, CsCmdActorCue* cue) { void func_80852298(PlayState* play, Player* this, CsCmdActorCue* cue) { if (LinkAnimation_Update(play, &this->skelAnime)) { Player_AnimReplaceNormalPlayLoopAdjusted(play, this, &gPlayerAnim_clink_demo_koutai_wait); - this->actionVar2 = 1; - } else if (this->actionVar2 == 0) { + this->av2.actionVar2 = 1; + } else if (this->av2.actionVar2 == 0) { if (LinkAnimation_OnFrame(&this->skelAnime, 10.0f)) { func_80846720(play, this, 1); } @@ -14888,10 +14889,10 @@ void func_80852358(PlayState* play, Player* this, CsCmdActorCue* cue) { void func_80852388(PlayState* play, Player* this, CsCmdActorCue* cue) { if (LinkAnimation_Update(play, &this->skelAnime)) { Player_AnimPlayLoopAdjusted(play, this, &gPlayerAnim_demo_link_twait); - this->actionVar2 = 1; + this->av2.actionVar2 = 1; } - if ((this->actionVar2 != 0) && (play->csCtx.curFrame >= 900)) { + if ((this->av2.actionVar2 != 0) && (play->csCtx.curFrame >= 900)) { this->rightHandType = PLAYER_MODELTYPE_LH_OPEN; } else { this->rightHandType = PLAYER_MODELTYPE_RH_FF; @@ -14900,7 +14901,7 @@ void func_80852388(PlayState* play, Player* this, CsCmdActorCue* cue) { void func_80852414(PlayState* play, Player* this, LinkAnimationHeader* anim, AnimSfxEntry* arg3) { func_80851294(play, this, anim); - if (this->actionVar2 == 0) { + if (this->av2.actionVar2 == 0) { Player_ProcessAnimSfxList(this, arg3); } } @@ -14958,7 +14959,7 @@ static void (*D_808551FC[])(Player* this, PlayState* play) = { }; void func_808525C0(PlayState* play, Player* this, CsCmdActorCue* cue) { - D_808551FC[this->actionVar2](this, play); + D_808551FC[this->av2.actionVar2](this, play); } void func_80852608(PlayState* play, Player* this, CsCmdActorCue* cue) { @@ -15020,7 +15021,7 @@ void func_808526EC(PlayState* play, Player* this, CsCmdActorCue* cue) { void func_8085283C(PlayState* play, Player* this, CsCmdActorCue* cue) { if (LinkAnimation_Update(play, &this->skelAnime)) { func_80852944(play, this, cue); - } else if (this->actionVar2 == 0) { + } else if (this->av2.actionVar2 == 0) { Item_Give(play, ITEM_SWORD_MASTER); func_80846720(play, this, 0); } else { @@ -15135,8 +15136,8 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cueUnused) { func_80852C0C(play, this, ABS(csAction)); func_80852B4C(play, this, cue, &D_80854B18[ABS(csAction)]); - this->actionVar2 = 0; - this->actionVar1 = 0; + this->av2.actionVar2 = 0; + this->av1.actionVar1 = 0; this->cueId = cue->id; } @@ -15246,12 +15247,12 @@ void func_80853148(PlayState* play, Actor* actor) { } if (this->stateFlags1 & PLAYER_STATE1_23) { - s32 sp24 = this->actionVar2; + s32 sp24 = this->av2.actionVar2; func_80832528(play, this); func_8083A2F8(play, this); - this->actionVar2 = sp24; + this->av2.actionVar2 = sp24; } else { if (func_808332B8(this)) { func_80836898(play, this, func_8083A2F8); From b3486b57ef41a284a366eb40ca07bf82bf4750d6 Mon Sep 17 00:00:00 2001 From: cadmic Date: Sat, 7 Oct 2023 16:42:28 -0700 Subject: [PATCH 09/16] Rename Math3D_CylOutsideCyl and Math3D_CylOutsideCylDist (#1557) * Rename Math3D_CylOutsideCyl and Math3D_CylOutsideCylDist * radix -> radii Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * Make Math3D sphere/cylinder collision check function names more consistent --------- Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> --- include/functions.h | 8 ++++---- src/code/sys_math3d.c | 36 +++++++++++++++++------------------- src/code/z_collision_check.c | 33 +++++++++++++++++---------------- 3 files changed, 38 insertions(+), 39 deletions(-) diff --git a/include/functions.h b/include/functions.h index 479281d033..35f4ad057f 100644 --- a/include/functions.h +++ b/include/functions.h @@ -1419,11 +1419,11 @@ s32 Math3D_CylVsTri(Cylinder16* cyl, TriNorm* tri); s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect); s32 Math3D_SphVsSph(Sphere16* sphereA, Sphere16* sphereB); s32 Math3D_SphVsSphOverlap(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize); -s32 Math3D_SphVsSphOverlapCenter(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize, f32* centerDist); -s32 Math3D_SphVsCylOverlapDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize); +s32 Math3D_SphVsSphOverlapCenterDist(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize, f32* centerDist); +s32 Math3D_SphVsCylOverlap(Sphere16* sph, Cylinder16* cyl, f32* overlapSize); s32 Math3D_SphVsCylOverlapCenterDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize, f32* centerDist); -s32 Math3D_CylOutsideCyl(Cylinder16* ca, Cylinder16* cb, f32* deadSpace); -s32 Math3D_CylOutsideCylDist(Cylinder16* ca, Cylinder16* cb, f32* deadSpace, f32* xzDist); +s32 Math3D_CylVsCylOverlap(Cylinder16* ca, Cylinder16* cb, f32* overlapSize); +s32 Math3D_CylVsCylOverlapCenterDist(Cylinder16* ca, Cylinder16* cb, f32* overlapSize, f32* centerDist); s32 Math3D_TriVsTriIntersect(TriNorm* ta, TriNorm* tb, Vec3f* intersect); s32 Math3D_XZInSphere(Sphere16* sphere, f32 x, f32 z); s32 Math3D_XYInSphere(Sphere16* sphere, f32 x, f32 y); diff --git a/src/code/sys_math3d.c b/src/code/sys_math3d.c index 867c86443f..5c7975754a 100644 --- a/src/code/sys_math3d.c +++ b/src/code/sys_math3d.c @@ -1925,14 +1925,14 @@ s32 Math3D_SphVsSph(Sphere16* sphereA, Sphere16* sphereB) { s32 Math3D_SphVsSphOverlap(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize) { f32 centerDist; - return Math3D_SphVsSphOverlapCenter(sphereA, sphereB, overlapSize, ¢erDist); + return Math3D_SphVsSphOverlapCenterDist(sphereA, sphereB, overlapSize, ¢erDist); } /* * Determines if two spheres are touching The distance from the centers is placed in `centerDist`, * and the amount that they're overlapping is placed in `overlapSize` */ -s32 Math3D_SphVsSphOverlapCenter(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize, f32* centerDist) { +s32 Math3D_SphVsSphOverlapCenterDist(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize, f32* centerDist) { Vec3f diff; diff.x = (f32)sphereA->center.x - (f32)sphereB->center.x; @@ -1951,9 +1951,9 @@ s32 Math3D_SphVsSphOverlapCenter(Sphere16* sphereA, Sphere16* sphereB, f32* over } /** - * Checks if `sph` and `cyl` are touching, output the amount of overlap to `overlapSize` + * Checks if `sph` and `cyl` are touching, output the amount of xz overlap to `overlapSize` */ -s32 Math3D_SphVsCylOverlapDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize) { +s32 Math3D_SphVsCylOverlap(Sphere16* sph, Cylinder16* cyl, f32* overlapSize) { f32 centerDist; return Math3D_SphVsCylOverlapCenterDist(sph, cyl, overlapSize, ¢erDist); @@ -1961,7 +1961,7 @@ s32 Math3D_SphVsCylOverlapDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize) /** * Checks if `sph` and `cyl` are touching, output the xz distance of the centers to `centerDist`, and the amount of - * overlap to `overlapSize` + * xz overlap to `overlapSize` */ s32 Math3D_SphVsCylOverlapCenterDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize, f32* centerDist) { static Cylinderf cylf; @@ -2007,22 +2007,20 @@ s32 Math3D_SphVsCylOverlapCenterDist(Sphere16* sph, Cylinder16* cyl, f32* overla return false; } -/* - * returns 1 if cylinder `ca` is outside cylinder `cb`. - * Sets `deadSpace` to the mininum space between the cylinders not occupied by the other. +/** + * Checks if `ca` and `cb` are touching, output the amount of xz overlap to `overlapSize` */ -s32 Math3D_CylOutsideCyl(Cylinder16* ca, Cylinder16* cb, f32* deadSpace) { +s32 Math3D_CylVsCylOverlap(Cylinder16* ca, Cylinder16* cb, f32* overlapSize) { f32 xzDist; - return Math3D_CylOutsideCylDist(ca, cb, deadSpace, &xzDist); + return Math3D_CylVsCylOverlapCenterDist(ca, cb, overlapSize, &xzDist); } -/* - * returns 1 if cylinder `ca` is outside cylinder `cb`. - * Sets `xzDist` to the xz distance between the centers of the cylinders. - * Sets `deadSpace` to the minimum space between the cylinders not occupied by the other. +/** + * Checks if `ca` and `cb` are touching, output the xz distance of the centers to `centerDist`, and the amount of + * xz overlap to `overlapSize` */ -s32 Math3D_CylOutsideCylDist(Cylinder16* ca, Cylinder16* cb, f32* deadSpace, f32* xzDist) { +s32 Math3D_CylVsCylOverlapCenterDist(Cylinder16* ca, Cylinder16* cb, f32* overlapSize, f32* centerDist) { static Cylinderf caf; static Cylinderf cbf; @@ -2036,10 +2034,10 @@ s32 Math3D_CylOutsideCylDist(Cylinder16* ca, Cylinder16* cb, f32* deadSpace, f32 cbf.yShift = cb->yShift; cbf.height = cb->height; - *xzDist = sqrtf(SQ(caf.pos.x - cbf.pos.x) + SQ(caf.pos.z - cbf.pos.z)); + *centerDist = sqrtf(SQ(caf.pos.x - cbf.pos.x) + SQ(caf.pos.z - cbf.pos.z)); - // The combined radix are within the xz distance - if ((caf.radius + cbf.radius) < *xzDist) { + // The combined radii are within the xz distance + if ((caf.radius + cbf.radius) < *centerDist) { return false; } @@ -2049,7 +2047,7 @@ s32 Math3D_CylOutsideCylDist(Cylinder16* ca, Cylinder16* cb, f32* deadSpace, f32 return false; } - *deadSpace = caf.radius + cbf.radius - *xzDist; + *overlapSize = caf.radius + cbf.radius - *centerDist; return true; } diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index e4d758f151..6178e6efcd 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -1745,8 +1745,8 @@ void CollisionCheck_AC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co if (CollisionCheck_NoSharedFlags(&atItem->info, &acElem->info) == true) { continue; } - if (Math3D_SphVsSphOverlapCenter(&atItem->dim.worldSphere, &acElem->dim.worldSphere, &overlapSize, - ¢erDist) == true) { + if (Math3D_SphVsSphOverlapCenterDist(&atItem->dim.worldSphere, &acElem->dim.worldSphere, &overlapSize, + ¢erDist) == true) { f32 acToHit; Vec3f hitPos; Vec3f atPos; @@ -2070,8 +2070,8 @@ void CollisionCheck_AC_QuadVsJntSph(PlayState* play, CollisionCheckContext* colC void CollisionCheck_AC_CylVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT, Collider* colAC) { ColliderCylinder* at = (ColliderCylinder*)colAT; ColliderCylinder* ac = (ColliderCylinder*)colAC; - f32 deadSpace; - f32 centerDistXZ; + f32 overlapSize; + f32 centerDist; Vec3f hitPos; if (at->dim.radius > 0 && at->dim.height > 0 && ac->dim.radius > 0 && ac->dim.height > 0) { @@ -2084,15 +2084,15 @@ void CollisionCheck_AC_CylVsCyl(PlayState* play, CollisionCheckContext* colChkCt if (CollisionCheck_NoSharedFlags(&at->info, &ac->info) == true) { return; } - if (Math3D_CylOutsideCylDist(&at->dim, &ac->dim, &deadSpace, ¢erDistXZ) == true) { + if (Math3D_CylVsCylOverlapCenterDist(&at->dim, &ac->dim, &overlapSize, ¢erDist) == true) { Vec3f atPos; Vec3f acPos; f32 acToHit; Math_Vec3s_ToVec3f(&atPos, &at->dim.pos); Math_Vec3s_ToVec3f(&acPos, &ac->dim.pos); - if (!IS_ZERO(centerDistXZ)) { - acToHit = ac->dim.radius / centerDistXZ; + if (!IS_ZERO(centerDist)) { + acToHit = ac->dim.radius / centerDist; hitPos.y = (f32)ac->dim.pos.y + ac->dim.yShift + ac->dim.height * 0.5f; hitPos.x = ((f32)at->dim.pos.x - ac->dim.pos.x) * acToHit + ac->dim.pos.x; hitPos.z = ((f32)at->dim.pos.z - ac->dim.pos.z) * acToHit + ac->dim.pos.z; @@ -2732,7 +2732,7 @@ void CollisionCheck_OC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co ColliderJntSphElement* leftElem; ColliderJntSph* right = (ColliderJntSph*)r; ColliderJntSphElement* rightElem; - f32 overlap; + f32 overlapSize; if (left->count > 0 && left->elements != NULL && right->count > 0 && right->elements != NULL) { for (leftElem = left->elements; leftElem < left->elements + left->count; leftElem++) { @@ -2743,14 +2743,15 @@ void CollisionCheck_OC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co if (!(rightElem->info.ocElemFlags & OCELEM_ON)) { continue; } - if (Math3D_SphVsSphOverlap(&leftElem->dim.worldSphere, &rightElem->dim.worldSphere, &overlap) == true) { + if (Math3D_SphVsSphOverlap(&leftElem->dim.worldSphere, &rightElem->dim.worldSphere, &overlapSize) == + true) { Vec3f leftPos; Vec3f rightPos; Math_Vec3s_ToVec3f(&leftPos, &leftElem->dim.worldSphere.center); Math_Vec3s_ToVec3f(&rightPos, &rightElem->dim.worldSphere.center); CollisionCheck_SetOCvsOC(&left->base, &leftElem->info, &leftPos, &right->base, &rightElem->info, - &rightPos, overlap); + &rightPos, overlapSize); } } } @@ -2764,7 +2765,7 @@ void CollisionCheck_OC_JntSphVsCyl(PlayState* play, CollisionCheckContext* colCh ColliderJntSph* left = (ColliderJntSph*)l; ColliderJntSphElement* leftElem; ColliderCylinder* right = (ColliderCylinder*)r; - f32 overlap; + f32 overlapSize; if (left->count > 0 && left->elements != NULL) { if ((right->base.ocFlags1 & OC1_ON) && (right->info.ocElemFlags & OCELEM_ON)) { @@ -2772,14 +2773,14 @@ void CollisionCheck_OC_JntSphVsCyl(PlayState* play, CollisionCheckContext* colCh if (!(leftElem->info.ocElemFlags & OCELEM_ON)) { continue; } - if (Math3D_SphVsCylOverlapDist(&leftElem->dim.worldSphere, &right->dim, &overlap) == true) { + if (Math3D_SphVsCylOverlap(&leftElem->dim.worldSphere, &right->dim, &overlapSize) == true) { Vec3f leftPos; Vec3f rightPos; Math_Vec3s_ToVec3f(&leftPos, &leftElem->dim.worldSphere.center); Math_Vec3s_ToVec3f(&rightPos, &right->dim.pos); CollisionCheck_SetOCvsOC(&left->base, &leftElem->info, &leftPos, &right->base, &right->info, - &rightPos, overlap); + &rightPos, overlapSize); } } } @@ -2799,18 +2800,18 @@ void CollisionCheck_OC_CylVsJntSph(PlayState* play, CollisionCheckContext* colCh void CollisionCheck_OC_CylVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* l, Collider* r) { ColliderCylinder* left = (ColliderCylinder*)l; ColliderCylinder* right = (ColliderCylinder*)r; - f32 deadSpace; + f32 overlapSize; if ((left->base.ocFlags1 & OC1_ON) && (right->base.ocFlags1 & OC1_ON)) { if ((left->info.ocElemFlags & OCELEM_ON) && (right->info.ocElemFlags & OCELEM_ON)) { - if (Math3D_CylOutsideCyl(&left->dim, &right->dim, &deadSpace) == true) { + if (Math3D_CylVsCylOverlap(&left->dim, &right->dim, &overlapSize) == true) { Vec3f leftPos; Vec3f rightPos; Math_Vec3s_ToVec3f(&leftPos, &left->dim.pos); Math_Vec3s_ToVec3f(&rightPos, &right->dim.pos); CollisionCheck_SetOCvsOC(&left->base, &left->info, &leftPos, &right->base, &right->info, &rightPos, - deadSpace); + overlapSize); } } } From a20163c6abf7700c432c711b03532cc4ad8d198a Mon Sep 17 00:00:00 2001 From: Tharo <17233964+Thar0@users.noreply.github.com> Date: Tue, 17 Oct 2023 20:16:31 +0100 Subject: [PATCH 10/16] Use `long` over `int` for s32/u32 types (#1546) * long s32 * Suggested changes --- include/functions.h | 28 +++++++++---------- include/libc/stddef.h | 4 +++ include/libc/stdint.h | 4 +-- include/ultra64/ultratypes.h | 4 +-- include/z64.h | 2 +- src/boot/z_std_dma.c | 2 +- src/code/db_camera.c | 2 +- src/code/z_actor.c | 10 +++---- src/code/z_kanfont.c | 2 +- src/code/z_play.c | 8 +++--- src/code/z_player_lib.c | 16 +++++------ .../ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c | 2 +- .../z_bg_mori_rakkatenjo.c | 4 +-- src/overlays/actors/ovl_En_Fr/z_en_fr.c | 2 +- src/overlays/actors/ovl_En_Holl/z_en_holl.c | 2 +- src/overlays/actors/ovl_En_Horse/z_en_horse.c | 2 +- src/overlays/actors/ovl_En_Ru1/z_en_ru1.c | 2 +- src/overlays/actors/ovl_En_Skj/z_en_skj.c | 2 +- src/overlays/actors/ovl_En_Zl2/z_en_zl2.c | 2 +- src/overlays/actors/ovl_En_Zl3/z_en_zl3.c | 2 +- .../actors/ovl_player_actor/z_player.c | 26 ++++++++--------- 21 files changed, 66 insertions(+), 62 deletions(-) diff --git a/include/functions.h b/include/functions.h index 35f4ad057f..2714f6fa6c 100644 --- a/include/functions.h +++ b/include/functions.h @@ -376,14 +376,14 @@ void func_8002DBD0(Actor* actor, Vec3f* dest, Vec3f* pos); f32 Actor_HeightDiff(Actor* actorA, Actor* actorB); f32 Player_GetHeight(Player* player); f32 func_8002DCE4(Player* player); -s32 func_8002DD6C(Player* player); -s32 func_8002DD78(Player* player); +int func_8002DD6C(Player* player); +int func_8002DD78(Player* player); s32 func_8002DDE4(PlayState* play); s32 func_8002DDF4(PlayState* play); void func_8002DE04(PlayState* play, Actor* actorA, Actor* actorB); void func_8002DE74(PlayState* play, Player* player); void Actor_MountHorse(PlayState* play, Player* player, Actor* horse); -s32 func_8002DEEC(Player* player); +int func_8002DEEC(Player* player); void func_8002DF18(PlayState* play, Player* player); s32 func_8002DF38(PlayState* play, Actor* actor, u8 csAction); s32 func_8002DF54(PlayState* play, Actor* actor, u8 csAction); @@ -991,10 +991,10 @@ void Path_CopyLastPoint(Path* path, Vec3f* dest); void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx); s32 FrameAdvance_Update(FrameAdvanceContext* frameAdvCtx, Input* input); void Player_SetBootData(PlayState* play, Player* this); -s32 Player_InBlockingCsMode(PlayState* play, Player* this); -s32 Player_InCsMode(PlayState* play); +int Player_InBlockingCsMode(PlayState* play, Player* this); +int Player_InCsMode(PlayState* play); s32 func_8008E9C4(Player* this); -s32 Player_IsChildWithHylianShield(Player* this); +int Player_IsChildWithHylianShield(Player* this); s32 Player_ActionToModelGroup(Player* this, s32 itemAction); void Player_SetModelsForHoldingShield(Player* this); void Player_SetModels(Player* this, s32 modelGroup); @@ -1006,19 +1006,19 @@ void func_8008EDF0(Player* this); void func_8008EE08(Player* this); void func_8008EEAC(PlayState* play, Actor* actor); s32 func_8008EF44(PlayState* play, s32 ammo); -s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 yRange); +int Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 yRange); s32 Player_GetStrength(void); u8 Player_GetMask(PlayState* play); Player* Player_UnsetMask(PlayState* play); s32 Player_HasMirrorShieldEquipped(PlayState* play); -s32 Player_HasMirrorShieldSetToDraw(PlayState* play); +int Player_HasMirrorShieldSetToDraw(PlayState* play); s32 Player_ActionToMagicSpell(Player* this, s32 itemAction); -s32 Player_HoldsHookshot(Player* this); -s32 func_8008F128(Player* this); +int Player_HoldsHookshot(Player* this); +int func_8008F128(Player* this); s32 Player_ActionToMeleeWeapon(s32 itemAction); s32 Player_GetMeleeWeaponHeld(Player* this); s32 Player_HoldsTwoHandedWeapon(Player* this); -s32 Player_HoldsBrokenKnife(Player* this); +int Player_HoldsBrokenKnife(Player* this); s32 Player_ActionToBottle(Player* this, s32 itemAction); s32 Player_GetBottleHeld(Player* this); s32 Player_ActionToExplosive(Player* this, s32 itemAction); @@ -1265,7 +1265,7 @@ Gfx* Play_SetFog(PlayState* this, Gfx* gfx); void Play_Destroy(GameState* thisx); void Play_Init(GameState* thisx); void Play_Main(GameState* thisx); -s32 Play_InCsMode(PlayState* this); +int Play_InCsMode(PlayState* this); f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* pos); void* Play_LoadFile(PlayState* this, RomFile* file); void Play_GetScreenPos(PlayState* this, Vec3f* src, Vec3f* dest); @@ -1287,8 +1287,8 @@ void Play_SaveSceneFlags(PlayState* this); void Play_SetupRespawnPoint(PlayState* this, s32 respawnMode, s32 playerParams); void Play_TriggerVoidOut(PlayState* this); void Play_TriggerRespawn(PlayState* this); -s32 Play_CamIsNotFixed(PlayState* this); -s32 FrameAdvance_IsEnabled(PlayState* this); +int Play_CamIsNotFixed(PlayState* this); +int FrameAdvance_IsEnabled(PlayState* this); s32 func_800C0D34(PlayState* this, Actor* actor, s16* yaw); s32 func_800C0DB4(PlayState* this, Vec3f* pos); void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg); diff --git a/include/libc/stddef.h b/include/libc/stddef.h index d277a26037..5d4f666b49 100644 --- a/include/libc/stddef.h +++ b/include/libc/stddef.h @@ -3,7 +3,11 @@ #define NULL ((void*)0) +#if defined(_MIPS_SZLONG) && (_MIPS_SZLONG == 64) typedef unsigned long size_t; +#else +typedef unsigned int size_t; +#endif #ifdef __GNUC__ #define offsetof(structure, member) __builtin_offsetof (structure, member) diff --git a/include/libc/stdint.h b/include/libc/stdint.h index 6d87774395..3c430822ea 100644 --- a/include/libc/stdint.h +++ b/include/libc/stdint.h @@ -1,8 +1,8 @@ #ifndef STDINT_H #define STDINT_H -typedef signed int intptr_t; -typedef unsigned int uintptr_t; +typedef signed long intptr_t; +typedef unsigned long uintptr_t; #define INT8_MIN (-0x80) #define INT16_MIN (-0x8000) diff --git a/include/ultra64/ultratypes.h b/include/ultra64/ultratypes.h index e4a3053702..7f45a7ef84 100644 --- a/include/ultra64/ultratypes.h +++ b/include/ultra64/ultratypes.h @@ -7,8 +7,8 @@ typedef signed char s8; typedef unsigned char u8; typedef signed short int s16; typedef unsigned short int u16; -typedef signed int s32; -typedef unsigned int u32; +typedef signed long s32; +typedef unsigned long u32; typedef signed long long int s64; typedef unsigned long long int u64; diff --git a/include/z64.h b/include/z64.h index e962e4f33f..5ef4bf1e60 100644 --- a/include/z64.h +++ b/include/z64.h @@ -399,7 +399,7 @@ typedef struct PlayState { /* 0x11D34 */ TransitionActorContext transiActorCtx; /* 0x11D3C */ void (*playerInit)(Player* player, struct PlayState* play, FlexSkeletonHeader* skelHeader); /* 0x11D40 */ void (*playerUpdate)(Player* player, struct PlayState* play, Input* input); - /* 0x11D44 */ s32 (*isPlayerDroppingFish)(struct PlayState* play); + /* 0x11D44 */ int (*isPlayerDroppingFish)(struct PlayState* play); /* 0x11D48 */ s32 (*startPlayerFishing)(struct PlayState* play); /* 0x11D4C */ s32 (*grabPlayer)(struct PlayState* play, Player* player); /* 0x11D50 */ s32 (*startPlayerCutscene)(struct PlayState* play, Actor* actor, s32 csAction); diff --git a/src/boot/z_std_dma.c b/src/boot/z_std_dma.c index e68b03806a..6097605186 100644 --- a/src/boot/z_std_dma.c +++ b/src/boot/z_std_dma.c @@ -130,7 +130,7 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size) { } size -= buffSize; - rom = rom + buffSize; + rom += buffSize; ram = (u8*)ram + buffSize; } diff --git a/src/code/db_camera.c b/src/code/db_camera.c index 90298c6cc3..12e400bfeb 100644 --- a/src/code/db_camera.c +++ b/src/code/db_camera.c @@ -2369,6 +2369,6 @@ void func_800BB060(void) { sDebugCamAnim.unk_0A = 0; } -s32 func_800BB06C(void) { +int func_800BB06C(void) { return sDebugCamPtr->unk_00 == 2 && sDebugCamAnim.unk_0A != 0; } diff --git a/src/code/z_actor.c b/src/code/z_actor.c index e95a67ce6e..bfae518bc5 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1000,15 +1000,15 @@ f32 func_8002DCE4(Player* player) { } } -s32 func_8002DD6C(Player* player) { +int func_8002DD6C(Player* player) { return player->stateFlags1 & PLAYER_STATE1_3; } -s32 func_8002DD78(Player* player) { +int func_8002DD78(Player* player) { return func_8002DD6C(player) && player->unk_834; } -s32 func_8002DDA8(PlayState* play) { +int func_8002DDA8(PlayState* play) { Player* player = GET_PLAYER(play); return (player->stateFlags1 & PLAYER_STATE1_11) || func_8002DD78(player); @@ -1049,7 +1049,7 @@ void Actor_MountHorse(PlayState* play, Player* player, Actor* horse) { horse->child = &player->actor; } -s32 func_8002DEEC(Player* player) { +int func_8002DEEC(Player* player) { return (player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (player->csAction != PLAYER_CSACTION_NONE); } @@ -2996,7 +2996,7 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play) { return newHead; } -s32 func_80032880(PlayState* play, Actor* actor) { +int func_80032880(PlayState* play, Actor* actor) { s16 sp1E; s16 sp1C; diff --git a/src/code/z_kanfont.c b/src/code/z_kanfont.c index 2da6c53a9a..5f83f57792 100644 --- a/src/code/z_kanfont.c +++ b/src/code/z_kanfont.c @@ -37,7 +37,7 @@ void Font_LoadOrderedFont(Font* font) { s32 jj; s32 codePointIndex; s32 fontBufIndex; - size_t offset; + u32 offset; font->msgOffset = _message_0xFFFC_nes - (const char*)_nes_message_data_staticSegmentStart; len = font->msgLength = _message_0xFFFD_nes - _message_0xFFFC_nes; diff --git a/src/code/z_play.c b/src/code/z_play.c index 2ece8f9708..1cd8497c9a 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -400,7 +400,7 @@ void Play_Init(GameState* thisx) { zAllocAligned = (zAlloc + 8) & ~0xF; ZeldaArena_Init((void*)zAllocAligned, zAllocSize - (zAllocAligned - zAlloc)); // "Zelda Heap" - osSyncPrintf("ゼルダヒープ %08x-%08x\n", zAllocAligned, zAllocAligned + zAllocSize - (s32)(zAllocAligned - zAlloc)); + osSyncPrintf("ゼルダヒープ %08x-%08x\n", zAllocAligned, (u8*)zAllocAligned + zAllocSize - (s32)(zAllocAligned - zAlloc)); Fault_AddClient(&D_801614B8, ZeldaArena_Display, NULL, NULL); Actor_InitContext(this, &this->actorCtx, this->playerEntry); @@ -1336,7 +1336,7 @@ void Play_Main(GameState* thisx) { } // original name: "Game_play_demo_mode_check" -s32 Play_InCsMode(PlayState* this) { +int Play_InCsMode(PlayState* this) { return (this->csCtx.state != CS_STATE_IDLE) || Player_InCsMode(this); } @@ -1773,7 +1773,7 @@ void Play_TriggerRespawn(PlayState* this) { Play_LoadToLastEntrance(this); } -s32 Play_CamIsNotFixed(PlayState* this) { +int Play_CamIsNotFixed(PlayState* this) { // SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT was probably intended to be in this condition, // but the room shape type check handles all shop cases regardless return (this->roomCtx.curRoom.roomShape->base.type != ROOM_SHAPE_TYPE_IMAGE) && @@ -1781,7 +1781,7 @@ s32 Play_CamIsNotFixed(PlayState* this) { (R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_FIXED_MARKET) && (this->sceneId != SCENE_CASTLE_COURTYARD_GUARDS_DAY); } -s32 FrameAdvance_IsEnabled(PlayState* this) { +int FrameAdvance_IsEnabled(PlayState* this) { return !!this->frameAdvCtx.enabled; } diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index a14934d2c5..5426a780a9 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -487,14 +487,14 @@ void Player_SetBootData(PlayState* play, Player* this) { } } -s32 Player_InBlockingCsMode(PlayState* play, Player* this) { +int Player_InBlockingCsMode(PlayState* play, Player* this) { return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csAction != PLAYER_CSACTION_NONE) || (play->transitionTrigger == TRANS_TRIGGER_START) || (this->stateFlags1 & PLAYER_STATE1_0) || (this->stateFlags3 & PLAYER_STATE3_7) || ((gSaveContext.magicState != MAGIC_STATE_IDLE) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0)); } -s32 Player_InCsMode(PlayState* play) { +int Player_InCsMode(PlayState* play) { Player* this = GET_PLAYER(play); return Player_InBlockingCsMode(play, this) || (this->unk_6AD == 4); @@ -504,7 +504,7 @@ s32 func_8008E9C4(Player* this) { return (this->stateFlags1 & PLAYER_STATE1_4); } -s32 Player_IsChildWithHylianShield(Player* this) { +int Player_IsChildWithHylianShield(Player* this) { return gSaveContext.save.linkAge != LINK_AGE_ADULT && (this->currentShield == PLAYER_SHIELD_HYLIAN); } @@ -640,7 +640,7 @@ s32 func_8008EF44(PlayState* play, s32 ammo) { return 1; } -s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 yRange) { +int Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 yRange) { Player* this = GET_PLAYER(play); Vec3f diff; s32 pad; @@ -685,7 +685,7 @@ s32 Player_HasMirrorShieldEquipped(PlayState* play) { return (this->currentShield == PLAYER_SHIELD_MIRROR); } -s32 Player_HasMirrorShieldSetToDraw(PlayState* play) { +int Player_HasMirrorShieldSetToDraw(PlayState* play) { Player* this = GET_PLAYER(play); return (this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) && (this->currentShield == PLAYER_SHIELD_MIRROR); @@ -701,11 +701,11 @@ s32 Player_ActionToMagicSpell(Player* this, s32 itemAction) { } } -s32 Player_HoldsHookshot(Player* this) { +int Player_HoldsHookshot(Player* this) { return (this->heldItemAction == PLAYER_IA_HOOKSHOT) || (this->heldItemAction == PLAYER_IA_LONGSHOT); } -s32 func_8008F128(Player* this) { +int func_8008F128(Player* this) { return Player_HoldsHookshot(this) && (this->heldActor == NULL); } @@ -731,7 +731,7 @@ s32 Player_HoldsTwoHandedWeapon(Player* this) { } } -s32 Player_HoldsBrokenKnife(Player* this) { +int Player_HoldsBrokenKnife(Player* this) { return (this->heldItemAction == PLAYER_IA_SWORD_BIGGORON) && (gSaveContext.save.info.playerData.swordHealth <= 0.0f); } diff --git a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c index 1fbbe33c8d..1306ab789b 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c +++ b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c @@ -123,7 +123,7 @@ void BgMoriElevator_Destroy(Actor* thisx, PlayState* play) { } } -s32 BgMoriElevator_IsPlayerRiding(BgMoriElevator* this, PlayState* play) { +int BgMoriElevator_IsPlayerRiding(BgMoriElevator* this, PlayState* play) { return ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ON_TOP) && !(this->unk_170 & DYNA_INTERACT_PLAYER_ON_TOP) && ((GET_PLAYER(play)->actor.world.pos.y - this->dyna.actor.world.pos.y) < 80.0f)); diff --git a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c index f737bdfbcd..cf0449ad8e 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c +++ b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c @@ -85,13 +85,13 @@ void BgMoriRakkatenjo_Destroy(Actor* thisx, PlayState* play) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } -s32 BgMoriRakkatenjo_IsLinkUnder(BgMoriRakkatenjo* this, PlayState* play) { +int BgMoriRakkatenjo_IsLinkUnder(BgMoriRakkatenjo* this, PlayState* play) { Vec3f* pos = &GET_PLAYER(play)->actor.world.pos; return (-3300.0f < pos->z) && (pos->z < -1840.0f) && (1791.0f < pos->x) && (pos->x < 2191.0f); } -s32 BgMoriRakkatenjo_IsLinkClose(BgMoriRakkatenjo* this, PlayState* play) { +int BgMoriRakkatenjo_IsLinkClose(BgMoriRakkatenjo* this, PlayState* play) { Vec3f* pos = &GET_PLAYER(play)->actor.world.pos; return (-3360.0f < pos->z) && (pos->z < -1840.0f) && (1791.0f < pos->x) && (pos->x < 2191.0f); diff --git a/src/overlays/actors/ovl_En_Fr/z_en_fr.c b/src/overlays/actors/ovl_En_Fr/z_en_fr.c index d7e4830e40..72fc93d32c 100644 --- a/src/overlays/actors/ovl_En_Fr/z_en_fr.c +++ b/src/overlays/actors/ovl_En_Fr/z_en_fr.c @@ -371,7 +371,7 @@ s32 EnFr_IsBelowLogSpot(EnFr* this, f32* yDistToLogSpot) { } } -s32 EnFr_IsAboveAndWithin30DistXZ(Player* player, EnFr* this) { +int EnFr_IsAboveAndWithin30DistXZ(Player* player, EnFr* this) { f32 xDistToPlayer = player->actor.world.pos.x - this->actor.world.pos.x; f32 zDistToPlayer = player->actor.world.pos.z - this->actor.world.pos.z; f32 yDistToPlayer = player->actor.world.pos.y - this->actor.world.pos.y; diff --git a/src/overlays/actors/ovl_En_Holl/z_en_holl.c b/src/overlays/actors/ovl_En_Holl/z_en_holl.c index b52b5095ad..2adc0484ea 100644 --- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c +++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c @@ -108,7 +108,7 @@ void EnHoll_SetupAction(EnHoll* this, EnHollActionFunc func) { this->actionFunc = func; } -s32 EnHoll_IsKokiriLayer8(void) { +int EnHoll_IsKokiriLayer8(void) { return gSaveContext.save.entranceIndex == ENTR_KOKIRI_FOREST_0 && gSaveContext.sceneLayer == 8; } diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index 96fb581b9f..ca7ef085ff 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -633,7 +633,7 @@ void func_80A5BB90(PlayState* play, Vec3f* vec, Vec3f* arg2, f32* arg3) { SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, vec, arg2, arg3); } -s32 func_80A5BBBC(PlayState* play, EnHorse* this, Vec3f* pos) { +int func_80A5BBBC(PlayState* play, EnHorse* this, Vec3f* pos) { Vec3f sp24; f32 sp20; f32 eyeDist; diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index 4ac7533203..88397e1463 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -333,7 +333,7 @@ Actor* func_80AEB124(PlayState* play) { return NULL; } -s32 func_80AEB174(PlayState* play) { +int func_80AEB174(PlayState* play) { return (Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play); } diff --git a/src/overlays/actors/ovl_En_Skj/z_en_skj.c b/src/overlays/actors/ovl_En_Skj/z_en_skj.c index 19e3a67cf7..68393b5497 100644 --- a/src/overlays/actors/ovl_En_Skj/z_en_skj.c +++ b/src/overlays/actors/ovl_En_Skj/z_en_skj.c @@ -464,7 +464,7 @@ void EnSkj_Destroy(Actor* thisx, PlayState* play) { Collider_DestroyCylinder(play, &this->collider); } -s32 EnSkj_RangeCheck(Player* player, EnSkj* this) { +int EnSkj_RangeCheck(Player* player, EnSkj* this) { f32 xDiff = player->actor.world.pos.x - this->actor.world.pos.x; f32 zDiff = player->actor.world.pos.z - this->actor.world.pos.z; f32 yDiff = player->actor.world.pos.y - this->actor.world.pos.y; diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c index 5af5e26df9..c91eb86807 100644 --- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -369,7 +369,7 @@ void func_80B4F230(EnZl2* this, s16 arg1, s32 arg2) { s32 temp_t3; s32 phi_v0; s32 index1AC; - s32 phi_t5; + int phi_t5; if (this->unk_24C != 0) { temp_v1 = this->unk_1DC[arg2] - arg1; diff --git a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c index 3449464d0e..632da5ee25 100644 --- a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c +++ b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c @@ -523,7 +523,7 @@ void func_80B54360(EnZl3* this, s16 arg1, s32 arg2) { s32 temp_t3 = this->unk_25C[arg2]; s32 phi_v0 = temp_t3; s32 index25C; - s32 phi_t5; + int phi_t5; temp_t3 = arg1 - this->unk_2BC[arg2]; diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 5206756029..1655eeea52 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -253,7 +253,7 @@ void func_808528C8(PlayState* play, Player* this, CsCmdActorCue* cue); void func_80852944(PlayState* play, Player* this, CsCmdActorCue* cue); void func_808529D0(PlayState* play, Player* this, CsCmdActorCue* cue); void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cue); -s32 Player_IsDroppingFish(PlayState* play); +int Player_IsDroppingFish(PlayState* play); s32 Player_StartFishing(PlayState* play); s32 func_80852F38(PlayState* play, Player* this); s32 func_80852FFC(PlayState* play, Actor* actor, s32 csAction); @@ -2041,7 +2041,7 @@ void func_8083328C(PlayState* play, Player* this, LinkAnimationHeader* linkAnim) LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, linkAnim, D_808535E8); } -s32 func_808332B8(Player* this) { +int func_808332B8(Player* this) { return (this->stateFlags1 & PLAYER_STATE1_27) && (this->currentBoots != PLAYER_BOOTS_IRON); } @@ -2092,7 +2092,7 @@ LinkAnimationHeader* func_80833438(Player* this) { } } -s32 func_808334B4(Player* this) { +int func_808334B4(Player* this) { return func_808332E4(this) && (this->unk_834 != 0); } @@ -2318,11 +2318,11 @@ s32 func_80833B54(Player* this) { return 0; } -s32 func_80833BCC(Player* this) { +int func_80833BCC(Player* this) { return func_8008E9C4(this) || func_80833B2C(this); } -s32 func_80833C04(Player* this) { +int func_80833C04(Player* this) { return func_80833B54(this) || func_80833B2C(this); } @@ -2757,11 +2757,11 @@ s32 func_80834D2C(Player* this, PlayState* play) { return 1; } -s32 func_80834E44(PlayState* play) { +int func_80834E44(PlayState* play) { return (play->shootingGalleryStatus > 0) && CHECK_BTN_ALL(sControlInput->press.button, BTN_B); } -s32 func_80834E7C(PlayState* play) { +int func_80834E7C(PlayState* play) { return (play->shootingGalleryStatus != 0) && ((play->shootingGalleryStatus < 0) || CHECK_BTN_ANY(sControlInput->cur.button, BTN_A | BTN_B | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN)); @@ -3341,7 +3341,7 @@ void func_80836448(PlayState* play, Player* this, LinkAnimationHeader* anim) { } } -s32 Player_CanUpdateItems(Player* this) { +int Player_CanUpdateItems(Player* this) { return (!(Player_Action_808458D0 == this->actionFunc) || ((this->stateFlags1 & PLAYER_STATE1_START_CHANGING_HELD_ITEM) && ((this->heldItemId == ITEM_LAST_USED) || (this->heldItemId == ITEM_NONE)))) && @@ -4253,7 +4253,7 @@ s32 func_80838144(s32 arg0) { } } -s32 func_8083816C(s32 arg0) { +int func_8083816C(s32 arg0) { return (arg0 == FLOOR_TYPE_4) || (arg0 == FLOOR_TYPE_7) || (arg0 == FLOOR_TYPE_12); } @@ -5080,7 +5080,7 @@ void func_8083A098(Player* this, LinkAnimationHeader* anim, PlayState* play) { func_8083328C(play, this, anim); } -s32 func_8083A0D4(Player* this) { +int func_8083A0D4(Player* this) { return (this->interactRangeActor != NULL) && (this->heldActor == NULL); } @@ -8273,7 +8273,7 @@ s32 func_808428D8(Player* this, PlayState* play) { return 0; } -s32 func_80842964(Player* this, PlayState* play) { +int func_80842964(Player* this, PlayState* play) { return Player_ActionChange_13(this, play) || Player_ActionChange_4(this, play) || Player_ActionChange_2(this, play); } @@ -12284,7 +12284,7 @@ static Vec3f D_8085492C[] = { { -60.0f, -20.0f, 0.0f }, }; -s32 func_8084C89C(PlayState* play, Player* this, s32 arg2, f32* arg3) { +int func_8084C89C(PlayState* play, Player* this, s32 arg2, f32* arg3) { EnHorse* rideActor = (EnHorse*)this->rideActor; f32 sp50; f32 sp4C; @@ -15159,7 +15159,7 @@ void Player_Action_80852E14(Player* this, PlayState* play) { func_80852B4C(play, this, NULL, &D_80854E50[this->csAction]); } -s32 Player_IsDroppingFish(PlayState* play) { +int Player_IsDroppingFish(PlayState* play) { Player* this = GET_PLAYER(play); return (Player_Action_8084EFC0 == this->actionFunc) && (this->itemAction == PLAYER_IA_BOTTLE_FISH); From 503f6d86d5fca5bd234640ef9de597d413cb91f5 Mon Sep 17 00:00:00 2001 From: Tharo <17233964+Thar0@users.noreply.github.com> Date: Fri, 20 Oct 2023 18:14:52 +0100 Subject: [PATCH 11/16] Track most header dependencies for `include/tables` headers (#1566) * Makefile automatically rebuild source files including headers from include/tables * Fix typo, make z_actor.c also depend on actor_table.h * Add message data dependencies for z_message_PAL, adjust comments --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Makefile b/Makefile index 5f5b628c90..e292f566da 100644 --- a/Makefile +++ b/Makefile @@ -316,10 +316,13 @@ build/data/%.o: data/%.s build/assets/text/%.enc.h: assets/text/%.h assets/text/charmap.txt python3 tools/msgenc.py assets/text/charmap.txt $< $@ +# Dependencies for files including message data headers +# TODO remove when full header dependencies are used. build/assets/text/fra_message_data_static.o: build/assets/text/message_data.enc.h build/assets/text/ger_message_data_static.o: build/assets/text/message_data.enc.h build/assets/text/nes_message_data_static.o: build/assets/text/message_data.enc.h build/assets/text/staff_message_data_static.o: build/assets/text/message_data_staff.enc.h +build/src/code/z_message_PAL.o: build/assets/text/message_data.enc.h build/assets/text/message_data_staff.enc.h build/assets/%.o: assets/%.c $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $< @@ -331,9 +334,20 @@ build/src/%.o: src/%.s build/dmadata_table_spec.h: build/$(SPEC) $(MKDMADATA) $< $@ +# Dependencies for files that may include the dmadata header automatically generated from the spec file build/src/boot/z_std_dma.o: build/dmadata_table_spec.h build/src/dmadata/dmadata.o: build/dmadata_table_spec.h +# Dependencies for files including from include/tables/ +# TODO remove when full header dependencies are used. +build/src/code/graph.o: include/tables/gamestate_table.h +build/src/code/object_table.o: include/tables/object_table.h +build/src/code/z_actor.o: include/tables/actor_table.h # so uses of ACTOR_ID_MAX update when the table length changes +build/src/code/z_actor_dlftbls.o: include/tables/actor_table.h +build/src/code/z_effect_soft_sprite_dlftbls.o: include/tables/effect_ss_table.h +build/src/code/z_game_dlftbls.o: include/tables/gamestate_table.h +build/src/code/z_scene_table.o: include/tables/scene_table.h include/tables/entrance_table.h + build/src/%.o: src/%.c $(CC_CHECK) $< $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $< From 4e55168eaa4562ab131ea314a5fe4c22b591d827 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Wed, 25 Oct 2023 03:36:10 +0200 Subject: [PATCH 12/16] Update ZAPD (#1569) * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "094e79734" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "094e79734" git-subrepo: version: "0.4.6" origin: "https://github.com/ingydotnet/git-subrepo" commit: "110b9eb" * Add EnumData.xml where some names are now externalized * Remove legacy typedefs for zapd, no longer needed! --- include/z64animation_legacy.h | 4 - include/z64bgcheck.h | 4 - include/z64curve.h | 6 - include/z64cutscene.h | 4 - include/z64cutscene_commands.h | 46 -- include/z64environment.h | 4 - include/z64scene.h | 15 - include/z64skin.h | 7 - tools/ZAPD/.clang-format | 2 +- tools/ZAPD/.gitrepo | 6 +- tools/ZAPD/ExporterTest/CollisionExporter.cpp | 6 +- tools/ZAPD/ExporterTest/Makefile | 2 +- tools/ZAPD/ExporterTest/RoomExporter.cpp | 2 +- tools/ZAPD/Makefile | 19 +- tools/ZAPD/README.md | 35 +- tools/ZAPD/ZAPD/CRC32.h | 2 +- tools/ZAPD/ZAPD/CrashHandler.cpp | 1 + tools/ZAPD/ZAPD/Declaration.cpp | 188 +++--- tools/ZAPD/ZAPD/Declaration.h | 156 ++++- tools/ZAPD/ZAPD/ExporterSet.h | 24 + tools/ZAPD/ZAPD/GameConfig.cpp | 80 +++ tools/ZAPD/ZAPD/GameConfig.h | 30 + tools/ZAPD/ZAPD/Globals.cpp | 40 +- tools/ZAPD/ZAPD/Globals.h | 34 +- tools/ZAPD/ZAPD/Main.cpp | 388 +++++++----- .../ZAPD/OtherStructs/CutsceneMM_Commands.cpp | 409 ++++++++++-- .../ZAPD/OtherStructs/CutsceneMM_Commands.h | 380 +++++++++-- .../OtherStructs/CutsceneOoT_Commands.cpp | 456 ++++++++++++++ .../ZAPD/OtherStructs/CutsceneOoT_Commands.h | 314 +++++++++ .../ZAPD/OtherStructs/Cutscene_Commands.cpp | 596 ------------------ .../ZAPD/OtherStructs/Cutscene_Commands.h | 267 -------- .../ZAPD/OtherStructs/Cutscene_Common.cpp | 128 ++++ .../ZAPD/ZAPD/OtherStructs/Cutscene_Common.h | 72 +++ .../ZAPD/OtherStructs/SkinLimbStructs.cpp | 253 ++++---- .../ZAPD/ZAPD/OtherStructs/SkinLimbStructs.h | 66 +- tools/ZAPD/ZAPD/OutputFormatter.h | 1 + tools/ZAPD/ZAPD/WarningHandler.cpp | 34 +- tools/ZAPD/ZAPD/WarningHandler.h | 1 + tools/ZAPD/ZAPD/ZAPD.vcxproj | 3 + tools/ZAPD/ZAPD/ZAPD.vcxproj.filters | 17 +- tools/ZAPD/ZAPD/ZAnimation.cpp | 51 +- tools/ZAPD/ZAPD/ZAnimation.h | 24 +- tools/ZAPD/ZAPD/ZArray.cpp | 7 +- tools/ZAPD/ZAPD/ZBackground.cpp | 9 +- tools/ZAPD/ZAPD/ZCollision.cpp | 159 +++-- tools/ZAPD/ZAPD/ZCollision.h | 26 +- tools/ZAPD/ZAPD/ZCutscene.cpp | 388 ++++++------ tools/ZAPD/ZAPD/ZCutscene.h | 3 +- tools/ZAPD/ZAPD/ZDisplayList.cpp | 122 +++- tools/ZAPD/ZAPD/ZDisplayList.h | 5 +- tools/ZAPD/ZAPD/ZFile.cpp | 279 +++++--- tools/ZAPD/ZAPD/ZFile.h | 9 +- tools/ZAPD/ZAPD/ZLimb.cpp | 8 +- tools/ZAPD/ZAPD/ZLimb.h | 6 +- tools/ZAPD/ZAPD/ZPath.cpp | 17 +- tools/ZAPD/ZAPD/ZPlayerAnimationData.cpp | 13 +- tools/ZAPD/ZAPD/ZPlayerAnimationData.h | 2 +- tools/ZAPD/ZAPD/ZResource.cpp | 4 +- tools/ZAPD/ZAPD/ZResource.h | 15 +- .../ZRoom/Commands/SetAlternateHeaders.cpp | 2 +- .../ZAPD/ZRoom/Commands/SetCameraSettings.cpp | 9 +- .../ZAPD/ZAPD/ZRoom/Commands/SetCsCamera.cpp | 18 +- tools/ZAPD/ZAPD/ZRoom/Commands/SetCsCamera.h | 6 +- ...sceneList.cpp => SetCutsceneEntryList.cpp} | 39 +- ...rCutsceneList.h => SetCutsceneEntryList.h} | 20 +- .../ZAPD/ZAPD/ZRoom/Commands/SetCutscenes.cpp | 25 +- tools/ZAPD/ZAPD/ZRoom/Commands/SetCutscenes.h | 8 +- .../ZAPD/ZRoom/Commands/SetEntranceList.cpp | 25 +- .../ZAPD/ZRoom/Commands/SetEntranceList.h | 6 +- .../ZAPD/ZAPD/ZRoom/Commands/SetExitList.cpp | 2 +- .../ZRoom/Commands/SetLightingSettings.cpp | 22 +- tools/ZAPD/ZAPD/ZRoom/Commands/SetMesh.cpp | 89 +-- tools/ZAPD/ZAPD/ZRoom/Commands/SetMesh.h | 23 +- .../ZAPD/ZRoom/Commands/SetMinimapList.cpp | 4 +- .../ZAPD/ZAPD/ZRoom/Commands/SetMinimapList.h | 2 +- .../ZAPD/ZAPD/ZRoom/Commands/SetPathways.cpp | 2 +- .../ZAPD/ZRoom/Commands/SetSpecialObjects.cpp | 6 + .../ZRoom/Commands/SetWorldMapVisited.cpp | 6 +- tools/ZAPD/ZAPD/ZRoom/ZNames.h | 12 +- tools/ZAPD/ZAPD/ZRoom/ZRoom.cpp | 30 +- tools/ZAPD/ZAPD/ZRoom/ZRoom.h | 5 +- tools/ZAPD/ZAPD/ZSkeleton.cpp | 2 +- tools/ZAPD/ZAPD/ZTexture.cpp | 171 +++-- tools/ZAPD/ZAPD/ZTexture.h | 62 +- tools/ZAPD/ZAPD/ZTextureAnimation.cpp | 2 + tools/ZAPD/ZAPD/ZWaterbox.cpp | 74 +++ tools/ZAPD/ZAPD/ZWaterbox.h | 30 + tools/ZAPD/ZAPD/genbuildinfo.py | 8 +- tools/ZAPD/ZAPDUtils/Makefile | 2 +- tools/ZAPD/ZAPDUtils/Utils/BitConverter.h | 20 +- tools/ZAPD/ZAPDUtils/Utils/Directory.h | 22 +- tools/ZAPD/ZAPDUtils/Utils/File.h | 35 +- tools/ZAPD/ZAPDUtils/Utils/Path.h | 5 +- tools/ZAPD/ZAPDUtils/Utils/StringHelper.h | 92 ++- tools/ZAPD/ZAPDUtils/ZAPDUtils.vcxproj | 1 + tools/ZAPDConfigs/MqDbg/Config.xml | 1 + tools/ZAPDConfigs/MqDbg/EnumData.xml | 416 ++++++++++++ 97 files changed, 4225 insertions(+), 2328 deletions(-) create mode 100644 tools/ZAPD/ZAPD/ExporterSet.h create mode 100644 tools/ZAPD/ZAPD/OtherStructs/CutsceneOoT_Commands.cpp create mode 100644 tools/ZAPD/ZAPD/OtherStructs/CutsceneOoT_Commands.h delete mode 100644 tools/ZAPD/ZAPD/OtherStructs/Cutscene_Commands.cpp delete mode 100644 tools/ZAPD/ZAPD/OtherStructs/Cutscene_Commands.h create mode 100644 tools/ZAPD/ZAPD/OtherStructs/Cutscene_Common.cpp create mode 100644 tools/ZAPD/ZAPD/OtherStructs/Cutscene_Common.h rename tools/ZAPD/ZAPD/ZRoom/Commands/{SetActorCutsceneList.cpp => SetCutsceneEntryList.cpp} (53%) rename tools/ZAPD/ZAPD/ZRoom/Commands/{SetActorCutsceneList.h => SetCutsceneEntryList.h} (66%) create mode 100644 tools/ZAPD/ZAPD/ZWaterbox.cpp create mode 100644 tools/ZAPD/ZAPD/ZWaterbox.h create mode 100644 tools/ZAPDConfigs/MqDbg/EnumData.xml diff --git a/include/z64animation_legacy.h b/include/z64animation_legacy.h index f5f68bfc8c..f4c222a5cc 100644 --- a/include/z64animation_legacy.h +++ b/include/z64animation_legacy.h @@ -21,10 +21,6 @@ typedef struct { /* 0x0A */ s16 z; } LegacyJointKey; // size = 0x0C -// ZAPD compatibility typedefs -// TODO: Remove when ZAPD adds support for them -typedef LegacyJointKey JointKey; - typedef struct { /* 0x00 */ s16 frameCount; /* 0x02 */ s16 limbCount; diff --git a/include/z64bgcheck.h b/include/z64bgcheck.h index 2396b9ccbe..9ff85c55e4 100644 --- a/include/z64bgcheck.h +++ b/include/z64bgcheck.h @@ -72,10 +72,6 @@ typedef struct { /* 0x4 */ Vec3s* bgCamFuncData; // s16 data grouped in threes (ex. Vec3s), is usually of type `BgCamFuncData`, but can be a list of points of type `Vec3s` for crawlspaces } BgCamInfo; // size = 0x8 -// ZAPD compatibility typedefs -// TODO: Remove when ZAPD adds support for them -typedef BgCamInfo CamData; - // The structure used for all instances of s16 data from `BgCamInfo` with the exception of crawlspaces. // See `Camera_Subj4` for Vec3s data usage in crawlspaces typedef struct { diff --git a/include/z64curve.h b/include/z64curve.h index 1864f2116e..b150302e9c 100644 --- a/include/z64curve.h +++ b/include/z64curve.h @@ -59,10 +59,4 @@ s32 SkelCurve_Update(struct PlayState* play, SkelCurve* skelCurve); void SkelCurve_Draw(Actor* actor, struct PlayState* play, SkelCurve* skelCurve, OverrideCurveLimbDraw overrideLimbDraw, PostCurveLimbDraw postLimbDraw, s32 lod, void* data); -// ZAPD compatibility typedefs -// TODO: Remove when ZAPD adds support for them -typedef CurveInterpKnot TransformData; -typedef CurveAnimationHeader TransformUpdateIndex; -typedef CurveSkeletonHeader SkelCurveLimbList; - #endif diff --git a/include/z64cutscene.h b/include/z64cutscene.h index 004bdb6904..ebd2612203 100644 --- a/include/z64cutscene.h +++ b/include/z64cutscene.h @@ -494,10 +494,6 @@ typedef union { #define CS_CAM_CONTINUE 0 #define CS_CAM_STOP -1 -// todo: remove after ZAPD is updated -#define CS_CMD_CONTINUE CS_CAM_CONTINUE -#define CS_CMD_STOP CS_CAM_STOP - #define CS_CAM_DATA_NOT_APPLIED 0xFFFF typedef struct { diff --git a/include/z64cutscene_commands.h b/include/z64cutscene_commands.h index f467fc32c4..beaecb7984 100644 --- a/include/z64cutscene_commands.h +++ b/include/z64cutscene_commands.h @@ -271,50 +271,4 @@ CMD_W(unk1), CMD_W(unk2), CMD_W(unk3), CMD_W(unk4), CMD_W(unk5), CMD_W(unk6), \ CMD_W(unk7), CMD_W(unk8), CMD_W(unk9), CMD_W(unk10), CMD_W(unk11), CMD_W(unk12) -// TODO: Fix ZAPD and delete these (everything to the end of the file) -#define CS_CAM_POS_LIST CS_CAM_EYE_SPLINE -#define CS_CAM_POS CS_CAM_POINT -#define CS_CAM_FOCUS_POINT_LIST CS_CAM_AT_SPLINE -#define CS_CAM_FOCUS_POINT CS_CAM_POINT -#define CS_CAM_POS_PLAYER_LIST CS_CAM_EYE_SPLINE_REL_TO_PLAYER -#define CS_CAM_POS_PLAYER CS_CAM_POINT -#define CS_CAM_FOCUS_POINT_PLAYER_LIST CS_CAM_AT_SPLINE_REL_TO_PLAYER -#define CS_CAM_FOCUS_POINT_PLAYER CS_CAM_POINT -#define CS_NPC_ACTION_LIST CS_ACTOR_CUE_LIST -#define CS_NPC_ACTION CS_ACTOR_CUE -#define CS_PLAYER_ACTION_LIST CS_PLAYER_CUE_LIST -#define CS_PLAYER_ACTION CS_PLAYER_CUE -#define CS_LIGHTING_LIST CS_LIGHT_SETTING_LIST -#define CS_CMD_09_LIST CS_RUMBLE_CONTROLLER_LIST -#define CS_CMD_09 CS_RUMBLE_CONTROLLER -#define CS_TEXT_DISPLAY_TEXTBOX CS_TEXT -#define CS_TEXT_LEARN_SONG CS_TEXT_OCARINA_ACTION -#define CS_SCENE_TRANS_FX CS_TRANSITION -#define CS_PLAY_BGM_LIST CS_START_SEQ_LIST -#define CS_STOP_BGM_LIST CS_STOP_SEQ_LIST -#define CS_FADE_BGM_LIST CS_FADE_OUT_SEQ_LIST -#define CS_FADE_BGM CS_FADE_OUT_SEQ -#define CS_TERMINATOR CS_DESTINATION - -// CS_TIME macro: -// The last argument of the macro was removed, but ZAPD isn't aware -// Passing 6 arguments to a 5-arguments macro works fine with IDO, so ignore this hack for IDO -#ifndef __sgi -// Only spot06_scene uses CS_TIME. Limit the hack to that file, so everything else can use the new macro -# ifdef SPOT06_SCENE_H -# undef CS_TIME -# define CS_TIME(unused0, startFrame, endFrame, hour, min, _unusedZapdCompatibilityArg) \ - CMD_HH(unused0, startFrame), CMD_HBB(endFrame, hour, min), CMD_W(0) -# endif -#endif - -#define CS_PLAY_BGM(seqId, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \ -CS_START_SEQ((seqId)-1, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) - -#define CS_STOP_BGM(seqId, frame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8) \ -CS_STOP_SEQ((seqId)-1, frame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8) - -#define CS_LIGHTING(lightSetting, frame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8) \ -CS_LIGHT_SETTING((lightSetting)-1, frame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8) - #endif diff --git a/include/z64environment.h b/include/z64environment.h index 0269c443d4..922c544258 100644 --- a/include/z64environment.h +++ b/include/z64environment.h @@ -166,10 +166,6 @@ typedef struct { /* 0x14 */ s16 zFar; } EnvLightSettings; // size = 0x16 -// ZAPD compatibility typedefs -// TODO: Remove when ZAPD adds support for them -typedef EnvLightSettings LightSettings; - typedef struct { /* 0x00 */ char unk_00[0x02]; /* 0x02 */ u16 sceneTimeSpeed; // time speed value from the scene file diff --git a/include/z64scene.h b/include/z64scene.h index 106fd62cb3..a08d438bd9 100644 --- a/include/z64scene.h +++ b/include/z64scene.h @@ -38,9 +38,6 @@ typedef struct { /* 0x01 */ u8 room; } Spawn; -// TODO: ZAPD Compatibility -typedef Spawn EntranceEntry; - typedef struct { /* 0x00 */ u8 count; // number of points in the path /* 0x04 */ Vec3s* points; // Segment Address to the array of points @@ -142,17 +139,6 @@ typedef union { RoomShapeCullable cullable; } RoomShape; // "Ground Shape" -// ZAPD compatibility typedefs -// TODO: Remove when ZAPD adds support for them -typedef RoomShapeDListsEntry PolygonDlist; -typedef RoomShapeNormal PolygonType0; -typedef RoomShapeImageSingle MeshHeader1Single; -typedef RoomShapeImageMultiBgEntry BgImage; -typedef RoomShapeImageMulti MeshHeader1Multi; -typedef RoomShapeCullableEntry PolygonDlist2; -typedef RoomShapeCullable PolygonType2; -#define SCENE_CMD_MESH SCENE_CMD_ROOM_SHAPE - #define ROOM_DRAW_OPA (1 << 0) #define ROOM_DRAW_XLU (1 << 1) @@ -459,7 +445,6 @@ typedef enum { #define SCENE_CAM_TYPE_SHOOTING_GALLERY 0x50 // Unreferenced in code, and used only by the main layer of the shooting gallery scene // navi hints -// TODO: make ZAPD use this enum for `SCENE_CMD_SPECIAL_FILES` typedef enum { NAVI_QUEST_HINTS_NONE, NAVI_QUEST_HINTS_OVERWORLD, diff --git a/include/z64skin.h b/include/z64skin.h index e9d8689d89..a199ed41b1 100644 --- a/include/z64skin.h +++ b/include/z64skin.h @@ -43,13 +43,6 @@ typedef struct { /* 0x08 */ Gfx* dlist; } SkinAnimatedLimbData; // size = 0xC -// ZAPD compatibility typedefs -// TODO: Remove when ZAPD adds support for them -typedef SkinVertex Struct_800A57C0; -typedef SkinTransformation Struct_800A598C_2; -typedef SkinAnimatedLimbData Struct_800A5E28; -typedef SkinLimbModif Struct_800A598C; - #define SKIN_LIMB_TYPE_ANIMATED 4 #define SKIN_LIMB_TYPE_NORMAL 11 diff --git a/tools/ZAPD/.clang-format b/tools/ZAPD/.clang-format index 784e734e97..5ba1c4a955 100644 --- a/tools/ZAPD/.clang-format +++ b/tools/ZAPD/.clang-format @@ -66,7 +66,7 @@ PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 60 PointerAlignment: Left ReflowComments: true -SortIncludes: true +SortIncludes: false SpaceAfterCStyleCast: false SpaceBeforeAssignmentOperators: true SpaceBeforeParens: ControlStatements diff --git a/tools/ZAPD/.gitrepo b/tools/ZAPD/.gitrepo index 07fe061d5f..7255f43aa9 100644 --- a/tools/ZAPD/.gitrepo +++ b/tools/ZAPD/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = https://github.com/zeldaret/ZAPD.git branch = master - commit = dcf56d93ecbd4db3bfd8a4832d7f991467964b98 - parent = 9bad1d108e6311562c8424eefc92f0f1004551c9 + commit = 094e797349c86d0baef4a624962f4287aefdfef2 + parent = 503f6d86d5fca5bd234640ef9de597d413cb91f5 method = merge - cmdver = 0.4.5 + cmdver = 0.4.6 diff --git a/tools/ZAPD/ExporterTest/CollisionExporter.cpp b/tools/ZAPD/ExporterTest/CollisionExporter.cpp index db5ad1a795..6431a4593c 100644 --- a/tools/ZAPD/ExporterTest/CollisionExporter.cpp +++ b/tools/ZAPD/ExporterTest/CollisionExporter.cpp @@ -67,9 +67,9 @@ void ExporterExample_Collision::Save(ZResource* res, [[maybe_unused]] fs::path o for (auto entry : col->camData->entries) { - writer->Write(entry->cameraSType); - writer->Write(entry->numData); - writer->Write(entry->cameraPosDataSeg); + writer->Write(entry.cameraSType); + writer->Write(entry.numData); + writer->Write(entry.cameraPosDataSeg); } writer->Seek(oldOffset, SeekOffsetType::Start); diff --git a/tools/ZAPD/ExporterTest/Makefile b/tools/ZAPD/ExporterTest/Makefile index 42033b7c0c..98e0475254 100644 --- a/tools/ZAPD/ExporterTest/Makefile +++ b/tools/ZAPD/ExporterTest/Makefile @@ -17,7 +17,7 @@ clean: rm -rf build $(LIB) format: - clang-format-11 -i $(CPP_FILES) $(H_FILES) + clang-format-14 -i $(CPP_FILES) $(H_FILES) .PHONY: all clean format diff --git a/tools/ZAPD/ExporterTest/RoomExporter.cpp b/tools/ZAPD/ExporterTest/RoomExporter.cpp index 9a5ea19d14..4cc06b76f5 100644 --- a/tools/ZAPD/ExporterTest/RoomExporter.cpp +++ b/tools/ZAPD/ExporterTest/RoomExporter.cpp @@ -290,7 +290,7 @@ void ExporterExample_Room::Save(ZResource* res, fs::path outPath, BinaryWriter* uint32_t oldOffset = writer->GetBaseAddress(); writer->Seek(baseStreamEnd, SeekOffsetType::Start); - for (EntranceEntry entry : cmdEntrance->entrances) + for (Spawn entry : cmdEntrance->entrances) { writer->Write((uint8_t)entry.startPositionIndex); writer->Write((uint8_t)entry.roomToLoad); diff --git a/tools/ZAPD/Makefile b/tools/ZAPD/Makefile index e725f94f8b..36331937a7 100644 --- a/tools/ZAPD/Makefile +++ b/tools/ZAPD/Makefile @@ -8,6 +8,18 @@ COPYCHECK_ARGS ?= LLD ?= 0 WERROR ?= 0 +# On MacOS 10.14, use boost::filesystem, because +# the system doesn't supply std::filesystem. +ifneq ($(OS),Windows_NT) + ifeq ($(shell uname -s),Darwin) + MACOS_VERSION := $(shell sw_vers -productVersion | cut -d . -f 1,2) + ifeq ($(MACOS_VERSION),10.14) + USE_BOOST_FS ?= 1 + endif + endif +endif +USE_BOOST_FS ?= 0 + # Use clang++ if available, else use g++ ifeq ($(shell command -v clang++ >/dev/null 2>&1; echo $$?),0) CXX := clang++ @@ -46,6 +58,11 @@ endif LDFLAGS := -lm -ldl -lpng +ifneq ($(USE_BOOST_FS),0) + CXXFLAGS += -DUSE_BOOST_FS + LDFLAGS += -lboost_filesystem +endif + # Use LLD if available. Set LLD=0 to not use it ifeq ($(shell command -v ld.lld >/dev/null 2>&1; echo $$?),0) LLD := 1 @@ -106,7 +123,7 @@ clean: rebuild: clean all format: - clang-format-11 -i $(ZAPD_CPP_FILES) $(ZAPD_H_FILES) + clang-format-14 -i $(ZAPD_CPP_FILES) $(ZAPD_H_FILES) $(MAKE) -C ZAPDUtils format $(MAKE) -C ExporterTest format diff --git a/tools/ZAPD/README.md b/tools/ZAPD/README.md index bb96bab1b0..76dfbd1e95 100644 --- a/tools/ZAPD/README.md +++ b/tools/ZAPD/README.md @@ -28,7 +28,7 @@ to install it via Homebrew. #### Linux / *nix -ZAPD uses the clasic `Makefile` approach. To build just run `make` (or even better `make -j` for faster compilations). +ZAPD uses the classic `Makefile` approach. To build just run `make` (or even better `make -j` for faster compilations). You can configure a bit your ZAPD build with the following options: @@ -139,22 +139,23 @@ Each warning type uses one of these by default, but can be modified with flags, All warning types currently implemented, with their default levels: -| Warning type | Default level | Description | -| --------------------------- | ------------- | ------------------------------------------------------------------------ | -| `-Wdeprecated` | Warn | Deprecated features | -| `-Whardcoded-pointer` | Warn | ZAPD lacks the info to make a symbol, so must output a hardcoded pointer | -| `-Wintersection` | Warn | Two assets intersect | -| `-Winvalid-attribute-value` | Err | Attribute declared in XML is wrong | -| `-Winvalid-extracted-data` | Err | Extracted data does not have correct form | -| `-Winvalid-jpeg` | Err | JPEG file does not conform to the game's format requirements | -| `-Winvalid-png` | Err | Issues arising when processing PNG data | -| `-Winvalid-xml` | Err | XML has syntax errors | -| `-Wmissing-attribute` | Warn | Required attribute missing in XML tag | -| `-Wmissing-offsets` | Warn | Offset attribute missing in XML tag | -| `-Wmissing-segment` | Warn | Segment not given in File tag in XML | -| `-Wnot-implemented` | Warn | ZAPD does not currently support this feature | -| `-Wunaccounted` | Off | Large blocks of unaccounted | -| `-Wunknown-attribute` | Warn | Unknown attribute in XML entry tag | +| Warning type | Default level | Description | +| ----------------------------- | ------------- | ------------------------------------------------------------------------ | +| `-Wdeprecated` | Warn | Deprecated features | +| `-Whardcoded-generic-pointer` | Off | A generic segmented pointer must be produced | +| `-Whardcoded-pointer` | Warn | ZAPD lacks the info to make a symbol, so must output a hardcoded pointer | +| `-Wintersection` | Warn | Two assets intersect | +| `-Winvalid-attribute-value` | Err | Attribute declared in XML is wrong | +| `-Winvalid-extracted-data` | Err | Extracted data does not have correct form | +| `-Winvalid-jpeg` | Err | JPEG file does not conform to the game's format requirements | +| `-Winvalid-png` | Err | Issues arising when processing PNG data | +| `-Winvalid-xml` | Err | XML has syntax errors | +| `-Wmissing-attribute` | Warn | Required attribute missing in XML tag | +| `-Wmissing-offsets` | Warn | Offset attribute missing in XML tag | +| `-Wmissing-segment` | Warn | Segment not given in File tag in XML | +| `-Wnot-implemented` | Warn | ZAPD does not currently support this feature | +| `-Wunaccounted` | Off | Large blocks of unaccounted | +| `-Wunknown-attribute` | Warn | Unknown attribute in XML entry tag | There are also errors that do not have a type, and cannot be disabled. diff --git a/tools/ZAPD/ZAPD/CRC32.h b/tools/ZAPD/ZAPD/CRC32.h index 4158a55289..1f82c75c58 100644 --- a/tools/ZAPD/ZAPD/CRC32.h +++ b/tools/ZAPD/ZAPD/CRC32.h @@ -1,6 +1,6 @@ #pragma once -static uint32_t CRC32B(unsigned char* message, int32_t size) +static uint32_t CRC32B(const unsigned char* message, int32_t size) { int32_t byte, crc; int32_t mask; diff --git a/tools/ZAPD/ZAPD/CrashHandler.cpp b/tools/ZAPD/ZAPD/CrashHandler.cpp index 3568665365..7ddec5a7e8 100644 --- a/tools/ZAPD/ZAPD/CrashHandler.cpp +++ b/tools/ZAPD/ZAPD/CrashHandler.cpp @@ -8,6 +8,7 @@ #endif #include +#include #include #include #include diff --git a/tools/ZAPD/ZAPD/Declaration.cpp b/tools/ZAPD/ZAPD/Declaration.cpp index 34ab953517..30863803a2 100644 --- a/tools/ZAPD/ZAPD/Declaration.cpp +++ b/tools/ZAPD/ZAPD/Declaration.cpp @@ -4,61 +4,79 @@ #include "Utils/StringHelper.h" Declaration::Declaration(offset_t nAddress, DeclarationAlignment nAlignment, size_t nSize, - const std::string& nText) + const std::string& nBody) { address = nAddress; alignment = nAlignment; size = nSize; - text = nText; + declBody = nBody; } -Declaration::Declaration(offset_t nAddress, DeclarationAlignment nAlignment, size_t nSize, - const std::string& nVarType, const std::string& nVarName, bool nIsArray, - const std::string& nText) - : Declaration(nAddress, nAlignment, nSize, nText) +Declaration* Declaration::Create(offset_t declAddr, DeclarationAlignment declAlign, size_t declSize, + const std::string& declType, const std::string& declName, + const std::string& declBody) { - varType = nVarType; - varName = nVarName; - isArray = nIsArray; + Declaration* decl = new Declaration(declAddr, declAlign, declSize, declBody); + + decl->declType = declType; + decl->declName = declName; + decl->declBody = declBody; + + return decl; } -Declaration::Declaration(offset_t nAddress, DeclarationAlignment nAlignment, size_t nSize, - const std::string& nVarType, const std::string& nVarName, bool nIsArray, - size_t nArrayItemCnt, const std::string& nText) - : Declaration(nAddress, nAlignment, nSize, nText) +Declaration* Declaration::CreateArray(offset_t declAddr, DeclarationAlignment declAlign, + size_t declSize, const std::string& declType, + const std::string& declName, const std::string& declBody, + size_t declArrayItemCnt, bool isDeclExternal) { - varType = nVarType; - varName = nVarName; - isArray = nIsArray; - arrayItemCnt = nArrayItemCnt; + Declaration* decl = new Declaration(declAddr, declAlign, declSize, declBody); + + decl->declName = declName; + decl->declType = declType; + decl->arrayItemCnt = declArrayItemCnt; + decl->isExternal = isDeclExternal; + decl->isArray = true; + + return decl; } -Declaration::Declaration(offset_t nAddress, DeclarationAlignment nAlignment, size_t nSize, - const std::string& nVarType, const std::string& nVarName, bool nIsArray, - const std::string& nArrayItemCntStr, const std::string& nText) - : Declaration(nAddress, nAlignment, nSize, nText) +Declaration* Declaration::CreateArray(offset_t declAddr, DeclarationAlignment declAlign, + size_t declSize, const std::string& declType, + const std::string& declName, const std::string& declBody, + const std::string& declArrayItemCntStr, bool isDeclExternal) { - varType = nVarType; - varName = nVarName; - isArray = nIsArray; - arrayItemCntStr = nArrayItemCntStr; + Declaration* decl = new Declaration(declAddr, declAlign, declSize, declBody); + + decl->declName = declName; + decl->declType = declType; + decl->arrayItemCntStr = declArrayItemCntStr; + decl->isExternal = isDeclExternal; + decl->isArray = true; + + return decl; } -Declaration::Declaration(offset_t nAddress, DeclarationAlignment nAlignment, size_t nSize, - const std::string& nVarType, const std::string& nVarName, bool nIsArray, - size_t nArrayItemCnt, const std::string& nText, bool nIsExternal) - : Declaration(nAddress, nAlignment, nSize, nVarType, nVarName, nIsArray, nArrayItemCnt, nText) +Declaration* Declaration::CreateInclude(offset_t declAddr, const std::string& includePath, + size_t declSize, const std::string& declType, + const std::string& declName, const std::string& defines) { - isExternal = nIsExternal; + Declaration* decl = new Declaration(declAddr, DeclarationAlignment::Align4, declSize, ""); + decl->includePath = includePath; + decl->declType = declType; + decl->declName = declName; + decl->defines = defines; + + return decl; } -Declaration::Declaration(offset_t nAddress, const std::string& nIncludePath, size_t nSize, - const std::string& nVarType, const std::string& nVarName) - : Declaration(nAddress, DeclarationAlignment::Align4, nSize, "") +Declaration* Declaration::CreatePlaceholder(offset_t declAddr, const std::string& declName) { - includePath = nIncludePath; - varType = nVarType; - varName = nVarName; + Declaration* decl = new Declaration(declAddr, DeclarationAlignment::Align4, 0, ""); + decl->declName = declName; + decl->isPlaceholder = true; + + return decl; } bool Declaration::IsStatic() const @@ -82,9 +100,6 @@ std::string Declaration::GetNormalDeclarationStr() const { std::string output; - if (preText != "") - output += preText + "\n"; - if (IsStatic()) { output += "static "; @@ -92,27 +107,28 @@ std::string Declaration::GetNormalDeclarationStr() const if (isArray) { - if (arrayItemCntStr != "" && (IsStatic() || forceArrayCnt)) + bool includeArraySize = (IsStatic() || forceArrayCnt); + + if (includeArraySize) { - output += StringHelper::Sprintf("%s %s[%s];\n", varType.c_str(), varName.c_str(), - arrayItemCntStr.c_str()); - } - else if (arrayItemCnt != 0 && (IsStatic() || forceArrayCnt)) - { - output += StringHelper::Sprintf("%s %s[%i] = {\n", varType.c_str(), varName.c_str(), - arrayItemCnt); + if (arrayItemCntStr != "") + output += StringHelper::Sprintf("%s %s[%s];\n", declType.c_str(), declName.c_str(), + arrayItemCntStr.c_str()); + else + output += StringHelper::Sprintf("%s %s[%i] = {\n", declType.c_str(), + declName.c_str(), arrayItemCnt); } else { - output += StringHelper::Sprintf("%s %s[] = {\n", varType.c_str(), varName.c_str()); + output += StringHelper::Sprintf("%s %s[] = {\n", declType.c_str(), declName.c_str()); } - output += text + "\n"; + output += declBody + "\n"; } else { - output += StringHelper::Sprintf("%s %s = { ", varType.c_str(), varName.c_str()); - output += text; + output += StringHelper::Sprintf("%s %s = { ", declType.c_str(), declName.c_str()); + output += declBody; } if (output.back() == '\n') @@ -120,14 +136,8 @@ std::string Declaration::GetNormalDeclarationStr() const else output += " };"; - if (rightText != "") - output += " " + rightText + ""; - output += "\n"; - if (postText != "") - output += postText + "\n"; - output += "\n"; return output; @@ -137,41 +147,34 @@ std::string Declaration::GetExternalDeclarationStr() const { std::string output; - if (preText != "") - output += preText + "\n"; - if (IsStatic()) - { output += "static "; + + bool includeArraySize = (IsStatic() || forceArrayCnt); + + if (includeArraySize) + { + if (arrayItemCntStr != "") + output += StringHelper::Sprintf("%s %s[%s] = ", declType.c_str(), declName.c_str(), + arrayItemCntStr.c_str()); + else + output += StringHelper::Sprintf("%s %s[%i] = ", declType.c_str(), declName.c_str(), + arrayItemCnt); + } + else + { + output += StringHelper::Sprintf("%s %s[] = ", declType.c_str(), declName.c_str()); } - if (arrayItemCntStr != "" && (IsStatic() || forceArrayCnt)) - output += StringHelper::Sprintf("%s %s[%s] = ", varType.c_str(), varName.c_str(), - arrayItemCntStr.c_str()); - else if (arrayItemCnt != 0 && (IsStatic() || forceArrayCnt)) - output += - StringHelper::Sprintf("%s %s[%i] = ", varType.c_str(), varName.c_str(), arrayItemCnt); - else - output += StringHelper::Sprintf("%s %s[] = ", varType.c_str(), varName.c_str()); - output += StringHelper::Sprintf("{\n#include \"%s\"\n};", includePath.c_str()); - - if (rightText != "") - output += " " + rightText + ""; - - output += "\n"; - - if (postText != "") - output += postText + "\n"; - - output += "\n"; + output += "\n\n"; return output; } std::string Declaration::GetExternStr() const { - if (IsStatic() || varType == "" || isUnaccounted) + if (IsStatic() || declType == "" || isUnaccounted) { return ""; } @@ -180,19 +183,28 @@ std::string Declaration::GetExternStr() const { if (arrayItemCntStr != "" && (IsStatic() || forceArrayCnt)) { - return StringHelper::Sprintf("extern %s %s[%s];\n", varType.c_str(), varName.c_str(), + return StringHelper::Sprintf("extern %s %s[%s];\n", declType.c_str(), declName.c_str(), arrayItemCntStr.c_str()); } else if (arrayItemCnt != 0 && (IsStatic() || forceArrayCnt)) { - return StringHelper::Sprintf("extern %s %s[%i];\n", varType.c_str(), varName.c_str(), + return StringHelper::Sprintf("extern %s %s[%i];\n", declType.c_str(), declName.c_str(), arrayItemCnt); } else - return StringHelper::Sprintf("extern %s %s[];\n", varType.c_str(), varName.c_str()); + return StringHelper::Sprintf("extern %s %s[];\n", declType.c_str(), declName.c_str()); } - return StringHelper::Sprintf("extern %s %s;\n", varType.c_str(), varName.c_str()); + return StringHelper::Sprintf("extern %s %s;\n", declType.c_str(), declName.c_str()); +} + +std::string Declaration::GetDefinesStr() const +{ + if (IsStatic() || (declType == "")) + { + return ""; + } + return StringHelper::Sprintf("%s", defines.c_str()); } std::string Declaration::GetStaticForwardDeclarationStr() const @@ -210,15 +222,15 @@ std::string Declaration::GetStaticForwardDeclarationStr() const if (arrayItemCntStr != "") { - return StringHelper::Sprintf("static %s %s[%s];\n", varType.c_str(), varName.c_str(), + return StringHelper::Sprintf("static %s %s[%s];\n", declType.c_str(), declName.c_str(), arrayItemCntStr.c_str()); } else { - return StringHelper::Sprintf("static %s %s[%i];\n", varType.c_str(), varName.c_str(), + return StringHelper::Sprintf("static %s %s[%i];\n", declType.c_str(), declName.c_str(), arrayItemCnt); } } - return StringHelper::Sprintf("static %s %s;\n", varType.c_str(), varName.c_str()); + return StringHelper::Sprintf("static %s %s;\n", declType.c_str(), declName.c_str()); } diff --git a/tools/ZAPD/ZAPD/Declaration.h b/tools/ZAPD/ZAPD/Declaration.h index 4a743b50fa..d079cb8dce 100644 --- a/tools/ZAPD/ZAPD/Declaration.h +++ b/tools/ZAPD/ZAPD/Declaration.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include @@ -22,59 +23,160 @@ enum class StaticConfig On }; +/// +/// A declaration is contains the C contents of a symbol for a file. +/// It contains at a minimum the address where the symbol would be in the binary file, alignment +/// settings, the size of the binary data, and the C code that makes it up. Optionally it can also +/// contain comments. +/// class Declaration { public: - offset_t address; - DeclarationAlignment alignment; - size_t size; - std::string preText; - std::string text; - std::string rightText; - std::string postText; - std::string preComment; - std::string postComment; - std::string varType; - std::string varName; - std::string includePath; + // Where in the binary file (segment) will this C code end up being? + offset_t address = 0; + // How is this C code aligned? + DeclarationAlignment alignment = DeclarationAlignment::Align4; + + // How many bytes will this C code take up in the resulting binary when compiled? + size_t size = 0; + + // The C type of this declaration + std::string declType = ""; + + // The C variable name of this declaration + std::string declName = ""; + + // The body of the declaration containing the data. + // In "int j = 7;", "7" would be text. + std::string declBody = ""; + + // #define's to be included in the header + std::string defines = ""; + + std::string includePath = ""; + + // Is this declaration in an external file? (ie. a gameplay_keep reference being found in + // another file that wishes to use its data) bool isExternal = false; + bool isArray = false; + + // If true, will ensure that the arrays size is included in the declaration bool forceArrayCnt = false; + + // If this declaration is an array, how many items make it up? size_t arrayItemCnt = 0; + + // Overrides the brackets for the arrays size with a custom string std::string arrayItemCntStr = ""; + std::vector references; + + // If true, this declaration represents data inside the file which we do not understand it's + // purpose for. It will be outputted as just a byte array. bool isUnaccounted = false; + + // Is this declaration a placeholder that will be replaced later? bool isPlaceholder = false; + + // Does this declaration come straight from the XML? + // If false, this means that the declaration was created by ZAPD when it was parsing the + // resources. bool declaredInXml = false; + StaticConfig staticConf = StaticConfig::Global; - Declaration(offset_t nAddress, DeclarationAlignment nAlignment, size_t nSize, - const std::string& nVarType, const std::string& nVarName, bool nIsArray, - const std::string& nText); - Declaration(offset_t nAddress, DeclarationAlignment nAlignment, size_t nSize, - const std::string& nVarType, const std::string& nVarName, bool nIsArray, - size_t nArrayItemCnt, const std::string& nText); - Declaration(offset_t nAddress, DeclarationAlignment nAlignment, size_t nSize, - const std::string& nVarType, const std::string& nVarName, bool nIsArray, - const std::string& nArrayItemCntStr, const std::string& nText); - Declaration(offset_t nAddress, DeclarationAlignment nAlignment, size_t nSize, - const std::string& nVarType, const std::string& nVarName, bool nIsArray, - size_t nArrayItemCnt, const std::string& nText, bool nIsExternal); + /// + /// Creates a regular declaration. + /// + /// The address inside a binary file this declaration will be in when + /// compiled. The alignment of this declaration in the compiled + /// binary file. The size of this declaration when it is compiled + /// to binary data. The C variable type this declaration will be + /// declared as. The C variable name this declaration will be + /// declared as. The contents of the C variable + /// declaration. + static Declaration* Create(offset_t declAddr, DeclarationAlignment declAlign, size_t declSize, + const std::string& declType, const std::string& declName, + const std::string& declBody); - Declaration(offset_t nAddress, const std::string& nIncludePath, size_t nSize, - const std::string& nVarType, const std::string& nVarName); + /// + /// Creates an array declaration. + /// + /// The address inside a binary file this declaration will be in when + /// compiled. The alignment of this declaration in the compiled + /// binary file. The size of this declaration when it is compiled + /// to binary data. The C variable type this declaration will be + /// declared as. The C variable name this declaration will be + /// declared as. The contents of the C variable + /// declaration. The number of items in the + /// array. (Optional) Is this declaration from another + /// segment? + static Declaration* CreateArray(offset_t declAddr, DeclarationAlignment declAlign, + size_t declSize, const std::string& declType, + const std::string& declName, const std::string& declBody, + size_t declArrayItemCnt = 0, bool isDeclExternal = false); + + /// + /// Creates an array declaration who's size in the C code uses a custom string. + /// + /// The address inside a binary file this declaration will be in when + /// compiled. The alignment of this declaration in the compiled + /// binary file. The size of this declaration when it is compiled + /// to binary data. The C variable type this declaration will be + /// declared as. The C variable name this declaration will be + /// declared as. The contents of the C variable + /// declaration. The string to be put in the C array's + /// size inbetween the brackets. (Optional) Is this + /// declaration from another segment? + static Declaration* CreateArray(offset_t declAddr, DeclarationAlignment declAlign, + size_t declSize, const std::string& declType, + const std::string& declName, const std::string& declBody, + const std::string& declArrayItemCntStr, + bool isDeclExternal = false); + + /// + /// Creates a declaration who's body uses a #include to include another file + /// + /// The address inside a binary file this declaration will be in when + /// compiled. The path to the file this declaration will be + /// #including. The size of this declaration when it is compiled + /// to binary data. The C variable type this declaration will be + /// declared as. The C variable name this declaration will be + /// declared as. (Optional) Any #define's we want to have + /// outputted by this declaration. + static Declaration* CreateInclude(offset_t declAddr, const std::string& includePath, + size_t declSize, const std::string& declType, + const std::string& declName, const std::string& defines = ""); + + /// + /// Creates a placeholder declaration to be replaced later. + /// + /// The address inside a binary file this declaration will be in when + /// compiled. The C variable name this declaration will be + /// declared as. + static Declaration* CreatePlaceholder(offset_t declAddr, const std::string& declName); bool IsStatic() const; + // Returns the declaration as C code as it would be in the code file when the body contains the + // needed data std::string GetNormalDeclarationStr() const; + + // Returns the declaration as C code as it would be in the code file when the body #include's + // another file std::string GetExternalDeclarationStr() const; + // Generates the extern for this item to be placed in header files. std::string GetExternStr() const; + // Generates any #define's needed + std::string GetDefinesStr() const; + std::string GetStaticForwardDeclarationStr() const; protected: Declaration(offset_t nAddress, DeclarationAlignment nAlignment, size_t nSize, - const std::string& nText); + const std::string& nBody); }; diff --git a/tools/ZAPD/ZAPD/ExporterSet.h b/tools/ZAPD/ZAPD/ExporterSet.h new file mode 100644 index 0000000000..c4dd93445a --- /dev/null +++ b/tools/ZAPD/ZAPD/ExporterSet.h @@ -0,0 +1,24 @@ +#pragma once + +typedef void (*ExporterSetFunc)(ZFile*); +typedef bool (*ExporterSetFuncBool)(ZFileMode fileMode); +typedef void (*ExporterSetFuncVoid)(int argc, char* argv[], int& i); +typedef void (*ExporterSetFuncVoid2)(const std::string& buildMode, ZFileMode& fileMode); +typedef void (*ExporterSetFuncVoid3)(); +typedef void (*ExporterSetResSave)(ZResource* res, BinaryWriter& writer); + +class ExporterSet +{ +public: + ~ExporterSet(); + + std::map exporters; + ExporterSetFuncVoid parseArgsFunc = nullptr; + ExporterSetFuncVoid2 parseFileModeFunc = nullptr; + ExporterSetFuncBool processFileModeFunc = nullptr; + ExporterSetFunc beginFileFunc = nullptr; + ExporterSetFunc endFileFunc = nullptr; + ExporterSetFuncVoid3 beginXMLFunc = nullptr; + ExporterSetFuncVoid3 endXMLFunc = nullptr; + ExporterSetResSave resSaveFunc = nullptr; +}; \ No newline at end of file diff --git a/tools/ZAPD/ZAPD/GameConfig.cpp b/tools/ZAPD/ZAPD/GameConfig.cpp index 777cf9d49c..a6e3bdba2f 100644 --- a/tools/ZAPD/ZAPD/GameConfig.cpp +++ b/tools/ZAPD/ZAPD/GameConfig.cpp @@ -2,6 +2,7 @@ #include #include +#include #include "Utils/Directory.h" #include "Utils/File.h" @@ -124,6 +125,7 @@ void GameConfig::ConfigFunc_BGConfig(const tinyxml2::XMLElement& element) { bgScreenWidth = element.IntAttribute("ScreenWidth", 320); bgScreenHeight = element.IntAttribute("ScreenHeight", 240); + useScreenWidthHeightConstants = element.BoolAttribute("UseScreenWidthHeightConstants", true); } void GameConfig::ConfigFunc_ExternalXMLFolder(const tinyxml2::XMLElement& element) @@ -163,6 +165,83 @@ void GameConfig::ConfigFunc_ExternalFile(const tinyxml2::XMLElement& element) externalFiles.push_back(ExternalFile(fs::path(xmlPathValue), fs::path(outPathValue))); } +void GameConfig::ConfigFunc_EnumData(const tinyxml2::XMLElement& element) +{ + std::string path = Path::GetDirectoryName(configFilePath); + path = path.append("/").append(element.Attribute("File")); + tinyxml2::XMLDocument doc; + tinyxml2::XMLError eResult = doc.LoadFile(path.c_str()); + + if (eResult != tinyxml2::XML_SUCCESS) + { + throw std::runtime_error("Error: Unable to read enum data."); + } + + tinyxml2::XMLNode* root = doc.FirstChild(); + + if (root == nullptr) + return; + + for (tinyxml2::XMLElement* csEnum = root->FirstChildElement(); csEnum != nullptr; + csEnum = csEnum->NextSiblingElement()) + { + for (tinyxml2::XMLElement* item = csEnum->FirstChildElement(); item != nullptr; + item = item->NextSiblingElement()) + { + std::string enumKey = csEnum->Attribute("Key"); + uint16_t itemIndex = atoi(item->Attribute("Index")); + const char* itemID = item->Attribute("ID"); + + // Common + if (enumKey == "cmd") + enumData.cutsceneCmd[itemIndex] = itemID; + + else if (enumKey == "miscType") + enumData.miscType[itemIndex] = itemID; + + else if (enumKey == "textType") + enumData.textType[itemIndex] = itemID; + + else if (enumKey == "fadeOutSeqPlayer") + enumData.fadeOutSeqPlayer[itemIndex] = itemID; + + else if (enumKey == "transitionType") + enumData.transitionType[itemIndex] = itemID; + + else if (enumKey == "destination") + enumData.destination[itemIndex] = itemID; + + else if (enumKey == "naviQuestHintType") + enumData.naviQuestHintType[itemIndex] = itemID; + + // MM + else if (enumKey == "modifySeqType") + enumData.modifySeqType[itemIndex] = itemID; + + else if (enumKey == "chooseCreditsSceneType") + enumData.chooseCreditsSceneType[itemIndex] = itemID; + + else if (enumKey == "destinationType") + enumData.destinationType[itemIndex] = itemID; + + else if (enumKey == "motionBlurType") + enumData.motionBlurType[itemIndex] = itemID; + + else if (enumKey == "transitionGeneralType") + enumData.transitionGeneralType[itemIndex] = itemID; + + else if (enumKey == "rumbleType") + enumData.rumbleType[itemIndex] = itemID; + + else if (enumKey == "spawnFlag") + enumData.spawnFlag[itemIndex] = itemID; + + else if (enumKey == "endSfx") + enumData.endSfx[itemIndex] = itemID; + } + } +} + void GameConfig::ReadConfigFile(const fs::path& argConfigFilePath) { static const std::unordered_map ConfigFuncDictionary = { @@ -173,6 +252,7 @@ void GameConfig::ReadConfigFile(const fs::path& argConfigFilePath) {"SpecialEntranceList", &GameConfig::ConfigFunc_specialEntranceList}, {"TexturePool", &GameConfig::ConfigFunc_TexturePool}, {"BGConfig", &GameConfig::ConfigFunc_BGConfig}, + {"EnumData", &GameConfig::ConfigFunc_EnumData}, {"ExternalXMLFolder", &GameConfig::ConfigFunc_ExternalXMLFolder}, {"ExternalFile", &GameConfig::ConfigFunc_ExternalFile}, }; diff --git a/tools/ZAPD/ZAPD/GameConfig.h b/tools/ZAPD/ZAPD/GameConfig.h index 2a783d10a8..0eb3f02029 100644 --- a/tools/ZAPD/ZAPD/GameConfig.h +++ b/tools/ZAPD/ZAPD/GameConfig.h @@ -21,6 +21,32 @@ public: ExternalFile(fs::path nXmlPath, fs::path nOutPath); }; +// Stores data from the XML file, the integer is the index (via ATOI) and the string is the value +class EnumData +{ +public: + // Common + std::map cutsceneCmd; + std::map miscType; + std::map fadeOutSeqPlayer; + std::map transitionType; + std::map naviQuestHintType; + + // OoT + std::map textType; + std::map destination; + + // MM + std::map modifySeqType; + std::map chooseCreditsSceneType; + std::map destinationType; + std::map motionBlurType; + std::map transitionGeneralType; + std::map rumbleType; + std::map spawnFlag; + std::map endSfx; +}; + class ZFile; class GameConfig @@ -34,9 +60,12 @@ public: std::vector entranceList; std::vector specialEntranceList; std::map texturePool; // Key = CRC + EnumData enumData; // ZBackground uint32_t bgScreenWidth = 320, bgScreenHeight = 240; + bool useScreenWidthHeightConstants = true; // If true, ZBackground's will be declared with + // SCREEN_WIDTH * SCREEN_HEIGHT in the C file // ExternalFile fs::path externalXmlFolder; @@ -57,6 +86,7 @@ public: void ConfigFunc_BGConfig(const tinyxml2::XMLElement& element); void ConfigFunc_ExternalXMLFolder(const tinyxml2::XMLElement& element); void ConfigFunc_ExternalFile(const tinyxml2::XMLElement& element); + void ConfigFunc_EnumData(const tinyxml2::XMLElement& element); void ReadConfigFile(const fs::path& configFilePath); }; diff --git a/tools/ZAPD/ZAPD/Globals.cpp b/tools/ZAPD/ZAPD/Globals.cpp index a10705e9af..02380f6902 100644 --- a/tools/ZAPD/ZAPD/Globals.cpp +++ b/tools/ZAPD/ZAPD/Globals.cpp @@ -83,9 +83,10 @@ ExporterSet* Globals::GetExporterSet() } bool Globals::GetSegmentedPtrName(segptr_t segAddress, ZFile* currentFile, - const std::string& expectedType, std::string& declName) + const std::string& expectedType, std::string& declName, + bool warnIfNotFound) { - if (segAddress == 0) + if (segAddress == SEGMENTED_NULL) { declName = "NULL"; return true; @@ -160,14 +161,18 @@ bool Globals::GetSegmentedPtrName(segptr_t segAddress, ZFile* currentFile, } declName = StringHelper::Sprintf("0x%08X", segAddress); + if (warnIfNotFound) + { + WarnHardcodedPointer(segAddress, currentFile, nullptr, -1); + } return false; } bool Globals::GetSegmentedArrayIndexedName(segptr_t segAddress, size_t elementSize, ZFile* currentFile, const std::string& expectedType, - std::string& declName) + std::string& declName, bool warnIfNotFound) { - if (segAddress == 0) + if (segAddress == SEGMENTED_NULL) { declName = "NULL"; return true; @@ -197,9 +202,36 @@ bool Globals::GetSegmentedArrayIndexedName(segptr_t segAddress, size_t elementSi } declName = StringHelper::Sprintf("0x%08X", segAddress); + if (warnIfNotFound) + { + WarnHardcodedPointer(segAddress, currentFile, nullptr, -1); + } return false; } +void Globals::WarnHardcodedPointer(segptr_t segAddress, ZFile* currentFile, ZResource* res, + offset_t currentOffset) +{ + uint8_t segment = GETSEGNUM(segAddress); + + if ((segment >= 2 && segment <= 6) || segment == 0x80) + { + std::string errorHeader = "A hardcoded pointer was found"; + std::string errorBody = StringHelper::Sprintf("Pointer: 0x%08X", segAddress); + + HANDLE_WARNING_RESOURCE(WarningType::HardcodedPointer, currentFile, res, currentOffset, + errorHeader, errorBody); + } + else + { + std::string errorHeader = "A general purpose hardcoded pointer was found"; + std::string errorBody = StringHelper::Sprintf("Pointer: 0x%08X", segAddress); + + HANDLE_WARNING_RESOURCE(WarningType::HardcodedGenericPointer, currentFile, res, + currentOffset, errorHeader, errorBody); + } +} + ExternalFile::ExternalFile(fs::path nXmlPath, fs::path nOutPath) : xmlPath{nXmlPath}, outPath{nOutPath} { diff --git a/tools/ZAPD/ZAPD/Globals.h b/tools/ZAPD/ZAPD/Globals.h index 1ae753e204..0bfcaeec72 100644 --- a/tools/ZAPD/ZAPD/Globals.h +++ b/tools/ZAPD/ZAPD/Globals.h @@ -5,6 +5,7 @@ #include #include "GameConfig.h" #include "ZFile.h" +#include "ExporterSet.h" class ZRoom; @@ -15,29 +16,6 @@ enum class VerbosityLevel VERBOSITY_DEBUG }; -typedef void (*ExporterSetFunc)(ZFile*); -typedef bool (*ExporterSetFuncBool)(ZFileMode fileMode); -typedef void (*ExporterSetFuncVoid)(int argc, char* argv[], int& i); -typedef void (*ExporterSetFuncVoid2)(const std::string& buildMode, ZFileMode& fileMode); -typedef void (*ExporterSetFuncVoid3)(); -typedef void (*ExporterSetResSave)(ZResource* res, BinaryWriter& writer); - -class ExporterSet -{ -public: - ~ExporterSet(); - - std::map exporters; - ExporterSetFuncVoid parseArgsFunc = nullptr; - ExporterSetFuncVoid2 parseFileModeFunc = nullptr; - ExporterSetFuncBool processFileModeFunc = nullptr; - ExporterSetFunc beginFileFunc = nullptr; - ExporterSetFunc endFileFunc = nullptr; - ExporterSetFuncVoid3 beginXMLFunc = nullptr; - ExporterSetFuncVoid3 endXMLFunc = nullptr; - ExporterSetResSave resSaveFunc = nullptr; -}; - class Globals { public: @@ -86,8 +64,14 @@ public: * in which case `declName` will be set to the address formatted as a pointer. */ bool GetSegmentedPtrName(segptr_t segAddress, ZFile* currentFile, - const std::string& expectedType, std::string& declName); + const std::string& expectedType, std::string& declName, + bool warnIfNotFound = true); bool GetSegmentedArrayIndexedName(segptr_t segAddress, size_t elementSize, ZFile* currentFile, - const std::string& expectedType, std::string& declName); + const std::string& expectedType, std::string& declName, + bool warnIfNotFound = true); + + // TODO: consider moving to another place + void WarnHardcodedPointer(segptr_t segAddress, ZFile* currentFile, ZResource* res, + offset_t currentOffset); }; diff --git a/tools/ZAPD/ZAPD/Main.cpp b/tools/ZAPD/ZAPD/Main.cpp index 2563154e51..40a38bc601 100644 --- a/tools/ZAPD/ZAPD/Main.cpp +++ b/tools/ZAPD/ZAPD/Main.cpp @@ -9,24 +9,52 @@ #include "ZFile.h" #include "ZTexture.h" +#include #include "CrashHandler.h" #include #include #include "tinyxml2.h" +using ArgFunc = void (*)(int&, char**); + +void Arg_SetOutputPath(int& i, char* argv[]); +void Arg_SetInputPath(int& i, char* argv[]); +void Arg_SetBaseromPath(int& i, char* argv[]); +void Arg_SetSourceOutputPath(int& i, char* argv[]); +void Arg_GenerateSourceFile(int& i, char* argv[]); +void Arg_TestMode(int& i, char* argv[]); +void Arg_LegacyDList(int& i, char* argv[]); +void Arg_EnableProfiling(int& i, char* argv[]); +void Arg_UseExternalResources(int& i, char* argv[]); +void Arg_SetTextureType(int& i, char* argv[]); +void Arg_ReadConfigFile(int& i, char* argv[]); +void Arg_EnableErrorHandler(int& i, char* argv[]); +void Arg_SetVerbosity(int& i, char* argv[]); +void Arg_VerboseUnaccounted(int& i, char* argv[]); +void Arg_SetExporter(int& i, char* argv[]); +void Arg_EnableGCCCompat(int& i, char* argv[]); +void Arg_ForceStatic(int& i, char* argv[]); +void Arg_ForceUnaccountedStatic(int& i, char* argv[]); + +int main(int argc, char* argv[]); + bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, const fs::path& outPath, ZFileMode fileMode); +void ParseArgs(int& argc, char* argv[]); + void BuildAssetTexture(const fs::path& pngFilePath, TextureType texType, const fs::path& outPath); void BuildAssetBackground(const fs::path& imageFilePath, const fs::path& outPath); void BuildAssetBlob(const fs::path& blobFilePath, const fs::path& outPath); +ZFileMode ParseFileMode(const std::string& buildMode, ExporterSet* exporterSet); +int HandleExtract(ZFileMode fileMode, ExporterSet* exporterSet); extern const char gBuildHash[]; int main(int argc, char* argv[]) { - // Syntax: ZAPD.out [mode (btex/bovl/e)] (Arbritrary Number of Arguments) + int returnCode = 0; if (argc < 2) { @@ -55,112 +83,12 @@ int main(int argc, char* argv[]) } } - // Parse other "commands" - for (int32_t i = 2; i < argc; i++) - { - std::string arg = argv[i]; - - if (arg == "-o" || arg == "--outputpath") // Set output path - { - Globals::Instance->outputPath = argv[++i]; - - if (Globals::Instance->sourceOutputPath == "") - Globals::Instance->sourceOutputPath = Globals::Instance->outputPath; - } - else if (arg == "-i" || arg == "--inputpath") // Set input path - { - Globals::Instance->inputPath = argv[++i]; - } - else if (arg == "-b" || arg == "--baserompath") // Set baserom path - { - Globals::Instance->baseRomPath = argv[++i]; - } - else if (arg == "-osf") // Set source output path - { - Globals::Instance->sourceOutputPath = argv[++i]; - } - else if (arg == "-gsf") // Generate source file during extraction - { - Globals::Instance->genSourceFile = std::string_view(argv[++i]) == "1"; - } - else if (arg == "-tm") // Test Mode (enables certain experimental features) - { - Globals::Instance->testMode = std::string_view(argv[++i]) == "1"; - } - else if (arg == "-crc" || - arg == "--output-crc") // Outputs a CRC file for each extracted texture. - { - Globals::Instance->testMode = std::string_view(argv[++i]) == "1"; - } - else if (arg == "-ulzdl") // Use Legacy ZDisplay List - { - Globals::Instance->useLegacyZDList = std::string_view(argv[++i]) == "1"; - } - else if (arg == "-profile") // Enable profiling - { - Globals::Instance->profile = std::string_view(argv[++i]) == "1"; - } - else if (arg == - "-uer") // Split resources into their individual components (enabled by default) - // TODO: We may wish to make this a part of the config file... - { - Globals::Instance->useExternalResources = std::string_view(argv[++i]) == "1"; - } - else if (arg == "-tt") // Set texture type - { - Globals::Instance->texType = ZTexture::GetTextureTypeFromString(argv[++i]); - } - else if (arg == "-rconf") // Read Config File - { - Globals::Instance->cfg.ReadConfigFile(argv[++i]); - } - else if (arg == "-eh") // Enable Error Handler - { - CrashHandler_Init(); - } - else if (arg == "-v") // Verbose - { - Globals::Instance->verbosity = static_cast(strtol(argv[++i], NULL, 16)); - } - else if (arg == "-vu" || arg == "--verbose-unaccounted") // Verbose unaccounted - { - Globals::Instance->verboseUnaccounted = true; - } - else if (arg == "-se" || arg == "--set-exporter") // Set Current Exporter - { - Globals::Instance->currentExporter = argv[++i]; - } - else if (arg == "--gcc-compat") // GCC compatibility - { - Globals::Instance->gccCompat = true; - } - else if (arg == "-s" || arg == "--static") - { - Globals::Instance->forceStatic = true; - } - else if (arg == "-us" || arg == "--unaccounted-static") - { - Globals::Instance->forceUnaccountedStatic = true; - } - } + ParseArgs(argc, argv); // Parse File Mode ExporterSet* exporterSet = Globals::Instance->GetExporterSet(); std::string buildMode = argv[1]; - ZFileMode fileMode = ZFileMode::Invalid; - - if (buildMode == "btex") - fileMode = ZFileMode::BuildTexture; - else if (buildMode == "bren") - fileMode = ZFileMode::BuildBackground; - else if (buildMode == "bsf") - fileMode = ZFileMode::BuildSourceFile; - else if (buildMode == "bblb") - fileMode = ZFileMode::BuildBlob; - else if (buildMode == "e") - fileMode = ZFileMode::Extract; - else if (exporterSet != nullptr && exporterSet->parseFileModeFunc != nullptr) - exporterSet->parseFileModeFunc(buildMode, fileMode); + ZFileMode fileMode = ParseFileMode(buildMode, exporterSet); if (fileMode == ZFileMode::Invalid) { @@ -170,7 +98,6 @@ int main(int argc, char* argv[]) // We've parsed through our commands once. If an exporter exists, it's been set by now. // Now we'll parse through them again but pass them on to our exporter if one is available. - if (exporterSet != nullptr && exporterSet->parseArgsFunc != nullptr) { for (int32_t i = 2; i < argc; i++) @@ -181,62 +108,20 @@ int main(int argc, char* argv[]) printf("ZAPD: Zelda Asset Processor For Decomp: %s\n", gBuildHash); if (Globals::Instance->verbosity >= VerbosityLevel::VERBOSITY_DEBUG) - { WarningHandler::PrintWarningsDebugInfo(); - } - // TODO: switch if (fileMode == ZFileMode::Extract || fileMode == ZFileMode::BuildSourceFile) - { - bool procFileModeSuccess = false; - - if (exporterSet != nullptr && exporterSet->processFileModeFunc != nullptr) - procFileModeSuccess = exporterSet->processFileModeFunc(fileMode); - - if (!procFileModeSuccess) - { - bool parseSuccessful; - - for (auto& extFile : Globals::Instance->cfg.externalFiles) - { - fs::path externalXmlFilePath = - Globals::Instance->cfg.externalXmlFolder / extFile.xmlPath; - - if (Globals::Instance->verbosity >= VerbosityLevel::VERBOSITY_INFO) - { - printf("Parsing external file from config: '%s'\n", - externalXmlFilePath.c_str()); - } - - parseSuccessful = Parse(externalXmlFilePath, Globals::Instance->baseRomPath, - extFile.outPath, ZFileMode::ExternalFile); - - if (!parseSuccessful) - return 1; - } - - parseSuccessful = Parse(Globals::Instance->inputPath, Globals::Instance->baseRomPath, - Globals::Instance->outputPath, fileMode); - if (!parseSuccessful) - return 1; - } - } + returnCode = HandleExtract(fileMode, exporterSet); else if (fileMode == ZFileMode::BuildTexture) - { - TextureType texType = Globals::Instance->texType; - BuildAssetTexture(Globals::Instance->inputPath, texType, Globals::Instance->outputPath); - } + BuildAssetTexture(Globals::Instance->inputPath, Globals::Instance->texType, + Globals::Instance->outputPath); else if (fileMode == ZFileMode::BuildBackground) - { BuildAssetBackground(Globals::Instance->inputPath, Globals::Instance->outputPath); - } else if (fileMode == ZFileMode::BuildBlob) - { BuildAssetBlob(Globals::Instance->inputPath, Globals::Instance->outputPath); - } delete g; - return 0; + return returnCode; } bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, const fs::path& outPath, @@ -339,6 +224,209 @@ bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, const fs::path return true; } +void ParseArgs(int& argc, char* argv[]) +{ + static const std::unordered_map ArgFuncDictionary = { + {"-o", &Arg_SetOutputPath}, + {"--outputpath", &Arg_SetOutputPath}, + {"-i", &Arg_SetInputPath}, + {"--inputpath", &Arg_SetInputPath}, + {"-b", &Arg_SetBaseromPath}, + {"--baserompath", &Arg_SetBaseromPath}, + {"-osf", &Arg_SetSourceOutputPath}, + {"-gsf", &Arg_GenerateSourceFile}, + {"-tm", &Arg_TestMode}, + {"-ulzdl", &Arg_LegacyDList}, + {"-profile", &Arg_EnableProfiling}, + {"-uer", &Arg_UseExternalResources}, + {"-tt", &Arg_SetTextureType}, + {"-rconf", &Arg_ReadConfigFile}, + {"-eh", &Arg_EnableErrorHandler}, + {"-v", &Arg_SetVerbosity}, + {"-vu", &Arg_VerboseUnaccounted}, + {"--verbose-unaccounted", &Arg_VerboseUnaccounted}, + {"-se", &Arg_SetExporter}, + {"--set-exporter", &Arg_SetExporter}, + {"--gcc-compat", &Arg_EnableGCCCompat}, + {"-s", &Arg_ForceStatic}, + {"--static", &Arg_ForceStatic}, + {"-us", &Arg_ForceUnaccountedStatic}, + {"--unaccounted-static", &Arg_ForceUnaccountedStatic}, + }; + + for (int32_t i = 2; i < argc; i++) + { + std::string arg = argv[i]; + + // Ignore warning args as they have already been parsed + if (arg.length() > 2 && arg[0] == '-' && arg[1] == 'W' && arg[2] != '\0') + { + continue; + } + + auto it = ArgFuncDictionary.find(arg); + if (it == ArgFuncDictionary.end()) + { + fprintf(stderr, "Unsupported argument: %s\n", arg.c_str()); + continue; + } + + std::invoke(it->second, i, argv); + } +} + +ZFileMode ParseFileMode(const std::string& buildMode, ExporterSet* exporterSet) +{ + ZFileMode fileMode = ZFileMode::Invalid; + + if (buildMode == "btex") + fileMode = ZFileMode::BuildTexture; + else if (buildMode == "bren") + fileMode = ZFileMode::BuildBackground; + else if (buildMode == "bsf") + fileMode = ZFileMode::BuildSourceFile; + else if (buildMode == "bblb") + fileMode = ZFileMode::BuildBlob; + else if (buildMode == "e") + fileMode = ZFileMode::Extract; + else if (exporterSet != nullptr && exporterSet->parseFileModeFunc != nullptr) + exporterSet->parseFileModeFunc(buildMode, fileMode); + + return fileMode; +} + +void Arg_SetOutputPath(int& i, [[maybe_unused]] char* argv[]) +{ + Globals::Instance->outputPath = argv[++i]; + + if (Globals::Instance->sourceOutputPath == "") + Globals::Instance->sourceOutputPath = Globals::Instance->outputPath; +} + +void Arg_SetInputPath(int& i, char* argv[]) +{ + Globals::Instance->inputPath = argv[++i]; +} + +void Arg_SetBaseromPath(int& i, char* argv[]) +{ + Globals::Instance->baseRomPath = argv[++i]; +} + +void Arg_SetSourceOutputPath(int& i, char* argv[]) +{ + Globals::Instance->sourceOutputPath = argv[++i]; +} + +void Arg_GenerateSourceFile(int& i, char* argv[]) +{ + // Generate source file during extraction + Globals::Instance->genSourceFile = std::string_view(argv[++i]) == "1"; +} + +void Arg_TestMode(int& i, char* argv[]) +{ + // Test Mode (enables certain experimental features) + Globals::Instance->testMode = std::string_view(argv[++i]) == "1"; +} + +void Arg_LegacyDList(int& i, char* argv[]) +{ + Globals::Instance->useLegacyZDList = std::string_view(argv[++i]) == "1"; +} + +void Arg_EnableProfiling(int& i, char* argv[]) +{ + Globals::Instance->profile = std::string_view(argv[++i]) == "1"; +} + +void Arg_UseExternalResources(int& i, char* argv[]) +{ + // Split resources into their individual components(enabled by default) + // TODO: We may wish to make this a part of the config file... + Globals::Instance->useExternalResources = std::string_view(argv[++i]) == "1"; +} + +void Arg_SetTextureType(int& i, char* argv[]) +{ + Globals::Instance->texType = ZTexture::GetTextureTypeFromString(argv[++i]); +} + +void Arg_ReadConfigFile(int& i, char* argv[]) +{ + Globals::Instance->cfg.ReadConfigFile(argv[++i]); +} + +void Arg_EnableErrorHandler([[maybe_unused]] int& i, [[maybe_unused]] char* argv[]) +{ + CrashHandler_Init(); +} + +void Arg_SetVerbosity(int& i, char* argv[]) +{ + Globals::Instance->verbosity = static_cast(strtol(argv[++i], NULL, 16)); +} + +void Arg_VerboseUnaccounted([[maybe_unused]] int& i, [[maybe_unused]] char* argv[]) +{ + Globals::Instance->verboseUnaccounted = true; +} + +void Arg_SetExporter(int& i, char* argv[]) +{ + Globals::Instance->currentExporter = argv[++i]; +} + +void Arg_EnableGCCCompat([[maybe_unused]] int& i, [[maybe_unused]] char* argv[]) +{ + Globals::Instance->gccCompat = true; +} + +void Arg_ForceStatic([[maybe_unused]] int& i, [[maybe_unused]] char* argv[]) +{ + Globals::Instance->forceStatic = true; +} + +void Arg_ForceUnaccountedStatic([[maybe_unused]] int& i, [[maybe_unused]] char* argv[]) +{ + Globals::Instance->forceUnaccountedStatic = true; +} + +int HandleExtract(ZFileMode fileMode, ExporterSet* exporterSet) +{ + bool procFileModeSuccess = false; + + if (exporterSet != nullptr && exporterSet->processFileModeFunc != nullptr) + procFileModeSuccess = exporterSet->processFileModeFunc(fileMode); + + if (!procFileModeSuccess) + { + bool parseSuccessful; + + for (auto& extFile : Globals::Instance->cfg.externalFiles) + { + fs::path externalXmlFilePath = + Globals::Instance->cfg.externalXmlFolder / extFile.xmlPath; + + if (Globals::Instance->verbosity >= VerbosityLevel::VERBOSITY_INFO) + printf("Parsing external file from config: '%s'\n", externalXmlFilePath.c_str()); + + parseSuccessful = Parse(externalXmlFilePath, Globals::Instance->baseRomPath, + extFile.outPath, ZFileMode::ExternalFile); + + if (!parseSuccessful) + return 1; + } + + parseSuccessful = Parse(Globals::Instance->inputPath, Globals::Instance->baseRomPath, + Globals::Instance->outputPath, fileMode); + if (!parseSuccessful) + return 1; + } + + return 0; +} + void BuildAssetTexture(const fs::path& pngFilePath, TextureType texType, const fs::path& outPath) { std::string name = outPath.stem().string(); diff --git a/tools/ZAPD/ZAPD/OtherStructs/CutsceneMM_Commands.cpp b/tools/ZAPD/ZAPD/OtherStructs/CutsceneMM_Commands.cpp index edefbc0518..85fce2215d 100644 --- a/tools/ZAPD/ZAPD/OtherStructs/CutsceneMM_Commands.cpp +++ b/tools/ZAPD/ZAPD/OtherStructs/CutsceneMM_Commands.cpp @@ -1,40 +1,46 @@ #include "CutsceneMM_Commands.h" -#include #include - +#include "Globals.h" #include "Utils/BitConverter.h" #include "Utils/StringHelper.h" +/**** GENERIC ****/ + // Specific for command lists where each entry has size 8 bytes -const std::unordered_map csCommandsDescMM = { - {CutsceneMMCommands::CS_CMD_MISC, {"CS_MISC", "(0x%02X, %i, %i, %i)"}}, - {CutsceneMMCommands::CS_CMD_SET_LIGHTING, {"CS_LIGHTING", "(0x%02X, %i, %i)"}}, - {CutsceneMMCommands::CS_CMD_SCENE_TRANS_FX, {"CS_SCENE_TRANS_FX", "(%i, %i, %i)"}}, - {CutsceneMMCommands::CS_CMD_MOTIONBLUR, {"CS_MOTIONBLUR", "(%i, %i, %i)"}}, - {CutsceneMMCommands::CS_CMD_GIVETATL, {"CS_GIVETATL", "(%i, %i, %i)"}}, - {CutsceneMMCommands::CS_CMD_PLAYSEQ, {"CS_PLAYSEQ", "(0x%04X, %i, %i)"}}, - {CutsceneMMCommands::CS_CMD_130, {"CS_SCENE_UNK_130", "(0x%04X, %i, %i, %i)"}}, - {CutsceneMMCommands::CS_CMD_131, {"CS_SCENE_UNK_131", "(0x%04X, %i, %i, %i)"}}, - {CutsceneMMCommands::CS_CMD_132, {"CS_SCENE_UNK_132", "(%i, %i, %i)"}}, - {CutsceneMMCommands::CS_CMD_STOPSEQ, {"CS_STOPSEQ", "(0x%04X, %i, %i, %i)"}}, - {CutsceneMMCommands::CS_CMD_PLAYAMBIENCE, {"CS_PLAYAMBIENCE", "(0x%04X, %i, %i, %i)"}}, - {CutsceneMMCommands::CS_CMD_FADEAMBIENCE, {"CS_FADEAMBIENCE", "(0x%04X, %i, %i, %i)"}}, - {CutsceneMMCommands::CS_CMD_TERMINATOR, {"CS_TERMINATOR", "(%i, %i, %i)"}}, - {CutsceneMMCommands::CS_CMD_CHOOSE_CREDITS_SCENES, - {"CS_CHOOSE_CREDITS_SCENES", "(%i, %i, %i)"}}, +const std::unordered_map csCommandsDescMM = { + {CutsceneMM_CommandType::CS_CMD_MISC, {"CS_MISC", "(%s, %i, %i, %i)"}}, + {CutsceneMM_CommandType::CS_CMD_LIGHT_SETTING, {"CS_LIGHT_SETTING", "(0x%02X, %i, %i)"}}, + {CutsceneMM_CommandType::CS_CMD_TRANSITION, {"CS_TRANSITION", "(%s, %i, %i)"}}, + {CutsceneMM_CommandType::CS_CMD_MOTION_BLUR, {"CS_MOTION_BLUR", "(%s, %i, %i)"}}, + {CutsceneMM_CommandType::CS_CMD_GIVE_TATL, {"CS_GIVE_TATL", "(%s, %i, %i)"}}, + {CutsceneMM_CommandType::CS_CMD_START_SEQ, {"CS_START_SEQ", "(0x%04X, %i, %i)"}}, + {CutsceneMM_CommandType::CS_CMD_SFX_REVERB_INDEX_2, + {"CS_SFX_REVERB_INDEX_2", "(0x%04X, %i, %i)"}}, + {CutsceneMM_CommandType::CS_CMD_SFX_REVERB_INDEX_1, + {"CS_SFX_REVERB_INDEX_1", "(0x%04X, %i, %i)"}}, + {CutsceneMM_CommandType::CS_CMD_MODIFY_SEQ, {"CS_MODIFY_SEQ", "(%s, %i, %i)"}}, + {CutsceneMM_CommandType::CS_CMD_STOP_SEQ, {"CS_STOP_SEQ", "(0x%04X, %i, %i, %i)"}}, + {CutsceneMM_CommandType::CS_CMD_START_AMBIENCE, {"CS_START_AMBIENCE", "(0x%04X, %i, %i)"}}, + {CutsceneMM_CommandType::CS_CMD_FADE_OUT_AMBIENCE, + {"CS_FADE_OUT_AMBIENCE", "(0x%04X, %i, %i)"}}, + {CutsceneMM_CommandType::CS_CMD_DESTINATION, {"CS_DESTINATION", "(%s, %i, %i)"}}, + {CutsceneMM_CommandType::CS_CMD_CHOOSE_CREDITS_SCENES, + {"CS_CHOOSE_CREDITS_SCENES", "(%s, %i, %i)"}}, }; -CutsceneSubCommandEntry_GenericMMCmd::CutsceneSubCommandEntry_GenericMMCmd( - const std::vector& rawData, offset_t rawDataIndex, CutsceneMMCommands cmdId) +CutsceneMMSubCommandEntry_GenericCmd::CutsceneMMSubCommandEntry_GenericCmd( + const std::vector& rawData, offset_t rawDataIndex, CutsceneMM_CommandType cmdId) : CutsceneSubCommandEntry(rawData, rawDataIndex), commandId(cmdId) { } -std::string CutsceneSubCommandEntry_GenericMMCmd::GetBodySourceCode() const +std::string CutsceneMMSubCommandEntry_GenericCmd::GetBodySourceCode() const { + EnumData* enumData = &Globals::Instance->cfg.enumData; const auto& element = csCommandsDescMM.find(commandId); std::string entryFmt = "CS_UNK_DATA(0x%02X, %i, %i, %i)"; + std::string type = ""; if (element != csCommandsDescMM.end()) { @@ -42,12 +48,49 @@ std::string CutsceneSubCommandEntry_GenericMMCmd::GetBodySourceCode() const entryFmt += element->second.args; } + if (commandId == CutsceneMM_CommandType::CS_CMD_MISC && + enumData->miscType.find(base) != enumData->miscType.end()) + type = enumData->miscType[base]; + + else if (commandId == CutsceneMM_CommandType::CS_CMD_TRANSITION && + enumData->transitionType.find(base) != enumData->transitionType.end()) + type = enumData->transitionType[base]; + + else if (commandId == CutsceneMM_CommandType::CS_CMD_MOTION_BLUR && + enumData->motionBlurType.find(base) != enumData->motionBlurType.end()) + type = enumData->motionBlurType[base]; + + else if (commandId == CutsceneMM_CommandType::CS_CMD_MODIFY_SEQ && + enumData->modifySeqType.find(base) != enumData->modifySeqType.end()) + type = enumData->modifySeqType[base]; + + else if (commandId == CutsceneMM_CommandType::CS_CMD_DESTINATION && + enumData->destinationType.find(base) != enumData->destinationType.end()) + type = enumData->destinationType[base]; + + else if (commandId == CutsceneMM_CommandType::CS_CMD_CHOOSE_CREDITS_SCENES && + enumData->chooseCreditsSceneType.find(base) != enumData->chooseCreditsSceneType.end()) + type = enumData->chooseCreditsSceneType[base]; + + else if (commandId == CutsceneMM_CommandType::CS_CMD_GIVE_TATL) + type = base ? "true" : "false"; + + if (type != "") + return StringHelper::Sprintf(entryFmt.c_str(), type.c_str(), startFrame, endFrame, pad); + + if (commandId == CutsceneMM_CommandType::CS_CMD_LIGHT_SETTING || + commandId == CutsceneMM_CommandType::CS_CMD_START_SEQ || + commandId == CutsceneMM_CommandType::CS_CMD_STOP_SEQ) + { + return StringHelper::Sprintf(entryFmt.c_str(), base - 1, startFrame, endFrame, pad); + } + return StringHelper::Sprintf(entryFmt.c_str(), base, startFrame, endFrame, pad); } CutsceneMMCommand_GenericCmd::CutsceneMMCommand_GenericCmd(const std::vector& rawData, offset_t rawDataIndex, - CutsceneMMCommands cmdId) + CutsceneMM_CommandType cmdId) : CutsceneCommand(rawData, rawDataIndex) { rawDataIndex += 4; @@ -57,7 +100,7 @@ CutsceneMMCommand_GenericCmd::CutsceneMMCommand_GenericCmd(const std::vectorGetRawSize(); } @@ -65,7 +108,7 @@ CutsceneMMCommand_GenericCmd::CutsceneMMCommand_GenericCmd(const std::vector(commandID)); + const auto& element = csCommandsDescMM.find(static_cast(commandID)); if (element != csCommandsDescMM.end()) { @@ -75,6 +118,8 @@ std::string CutsceneMMCommand_GenericCmd::GetCommandMacro() const return StringHelper::Sprintf("CS_UNK_DATA_LIST(0x%X, %i)", commandID, numEntries); } +/**** CAMERA ****/ + CutsceneSubCommandEntry_Camera::CutsceneSubCommandEntry_Camera(const std::vector& rawData, offset_t rawDataIndex) : CutsceneSubCommandEntry(rawData, rawDataIndex) @@ -108,10 +153,12 @@ CutsceneMMCommand_Camera::CutsceneMMCommand_Camera(const std::vector& r std::string CutsceneMMCommand_Camera::GetCommandMacro() const { - return StringHelper::Sprintf("CS_CAMERA_LIST(%i)", numEntries); + return StringHelper::Sprintf("CS_CAM_SPLINE_LIST(%i)", numEntries); } -CutsceneSubCommandEntry_FadeScreen::CutsceneSubCommandEntry_FadeScreen( +/**** TRANSITION GENERAL ****/ + +CutsceneSubCommandEntry_TransitionGeneral::CutsceneSubCommandEntry_TransitionGeneral( const std::vector& rawData, offset_t rawDataIndex) : CutsceneSubCommandEntry(rawData, rawDataIndex) { @@ -123,18 +170,71 @@ CutsceneSubCommandEntry_FadeScreen::CutsceneSubCommandEntry_FadeScreen( unk_0B = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x0B); } -std::string CutsceneSubCommandEntry_FadeScreen::GetBodySourceCode() const +std::string CutsceneSubCommandEntry_TransitionGeneral::GetBodySourceCode() const { - return StringHelper::Sprintf("CS_FADESCREEN(0x%02X, %i, %i, %i, %i, %i)", base, startFrame, - endFrame, unk_06, unk_07, unk_08); + EnumData* enumData = &Globals::Instance->cfg.enumData; + + if (enumData->transitionGeneralType.find(base) != enumData->transitionGeneralType.end()) + return StringHelper::Sprintf("CS_TRANSITION_GENERAL(%s, %i, %i, %i, %i, %i)", + enumData->transitionGeneralType[base].c_str(), startFrame, + endFrame, unk_06, unk_07, unk_08); + + return StringHelper::Sprintf("CS_TRANSITION_GENERAL(0x%02X, %i, %i, %i, %i, %i)", base, + startFrame, endFrame, unk_06, unk_07, unk_08); } -size_t CutsceneSubCommandEntry_FadeScreen::GetRawSize() const +size_t CutsceneSubCommandEntry_TransitionGeneral::GetRawSize() const { return 0x0C; } -CutsceneMMCommand_FadeScreen::CutsceneMMCommand_FadeScreen(const std::vector& rawData, +CutsceneMMCommand_TransitionGeneral::CutsceneMMCommand_TransitionGeneral( + const std::vector& rawData, offset_t rawDataIndex) + : CutsceneCommand(rawData, rawDataIndex) +{ + rawDataIndex += 4; + + entries.reserve(numEntries); + for (size_t i = 0; i < numEntries; i++) + { + auto* entry = new CutsceneSubCommandEntry_TransitionGeneral(rawData, rawDataIndex); + entries.push_back(entry); + rawDataIndex += entry->GetRawSize(); + } +} + +std::string CutsceneMMCommand_TransitionGeneral::GetCommandMacro() const +{ + return StringHelper::Sprintf("CS_TRANSITION_GENERAL_LIST(%i)", numEntries); +} + +CutsceneSubCommandEntry_FadeOutSeq::CutsceneSubCommandEntry_FadeOutSeq( + const std::vector& rawData, offset_t rawDataIndex) + : CutsceneSubCommandEntry(rawData, rawDataIndex) +{ + unk_08 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 8); +} + +/**** FADE OUT SEQUENCE ****/ + +std::string CutsceneSubCommandEntry_FadeOutSeq::GetBodySourceCode() const +{ + EnumData* enumData = &Globals::Instance->cfg.enumData; + + if (enumData->fadeOutSeqPlayer.find(base) != enumData->fadeOutSeqPlayer.end()) + return StringHelper::Sprintf("CS_FADE_OUT_SEQ(%s, %i, %i)", + enumData->fadeOutSeqPlayer[base].c_str(), startFrame, + endFrame); + + return StringHelper::Sprintf("CS_FADE_OUT_SEQ(%i, %i, %i)", base, startFrame, endFrame); +} + +size_t CutsceneSubCommandEntry_FadeOutSeq::GetRawSize() const +{ + return 0x0C; +} + +CutsceneMMCommand_FadeOutSeq::CutsceneMMCommand_FadeOutSeq(const std::vector& rawData, offset_t rawDataIndex) : CutsceneCommand(rawData, rawDataIndex) { @@ -143,53 +243,18 @@ CutsceneMMCommand_FadeScreen::CutsceneMMCommand_FadeScreen(const std::vectorGetRawSize(); } } -std::string CutsceneMMCommand_FadeScreen::GetCommandMacro() const +std::string CutsceneMMCommand_FadeOutSeq::GetCommandMacro() const { - return StringHelper::Sprintf("CS_FADESCREEN_LIST(%i)", numEntries); + return StringHelper::Sprintf("CS_FADE_OUT_SEQ_LIST(%i)", numEntries); } -CutsceneSubCommandEntry_FadeSeq::CutsceneSubCommandEntry_FadeSeq( - const std::vector& rawData, offset_t rawDataIndex) - : CutsceneSubCommandEntry(rawData, rawDataIndex) -{ - unk_08 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 8); -} - -std::string CutsceneSubCommandEntry_FadeSeq::GetBodySourceCode() const -{ - return StringHelper::Sprintf("CS_FADESEQ(%i, %i, %i)", base, startFrame, endFrame); -} - -size_t CutsceneSubCommandEntry_FadeSeq::GetRawSize() const -{ - return 0x0C; -} - -CutsceneMMCommand_FadeSeq::CutsceneMMCommand_FadeSeq(const std::vector& rawData, - offset_t rawDataIndex) - : CutsceneCommand(rawData, rawDataIndex) -{ - rawDataIndex += 4; - - entries.reserve(numEntries); - for (size_t i = 0; i < numEntries; i++) - { - auto* entry = new CutsceneSubCommandEntry_FadeSeq(rawData, rawDataIndex); - entries.push_back(entry); - rawDataIndex += entry->GetRawSize(); - } -} - -std::string CutsceneMMCommand_FadeSeq::GetCommandMacro() const -{ - return StringHelper::Sprintf("CS_FADESEQ_LIST(%i)", numEntries); -} +/**** NON IMPLEMENTED ****/ CutsceneSubCommandEntry_NonImplemented::CutsceneSubCommandEntry_NonImplemented( const std::vector& rawData, offset_t rawDataIndex) @@ -211,3 +276,207 @@ CutsceneMMCommand_NonImplemented::CutsceneMMCommand_NonImplemented( rawDataIndex += entry->GetRawSize(); } } + +/**** RUMBLE ****/ + +CutsceneMMSubCommandEntry_Rumble::CutsceneMMSubCommandEntry_Rumble( + const std::vector& rawData, offset_t rawDataIndex) + : CutsceneSubCommandEntry(rawData, rawDataIndex) +{ + intensity = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x06); + decayTimer = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x07); + decayStep = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x08); +} + +std::string CutsceneMMSubCommandEntry_Rumble::GetBodySourceCode() const +{ + EnumData* enumData = &Globals::Instance->cfg.enumData; + + if (enumData->rumbleType.find(base) != enumData->rumbleType.end()) + return StringHelper::Sprintf("CS_RUMBLE(%s, %i, %i, 0x%02X, 0x%02X, 0x%02X)", + enumData->rumbleType[base].c_str(), startFrame, endFrame, + intensity, decayTimer, decayStep); + + return StringHelper::Sprintf("CS_RUMBLE(0x%04X, %i, %i, 0x%02X, 0x%02X, 0x%02X)", base, + startFrame, endFrame, intensity, decayTimer, decayStep); +} + +size_t CutsceneMMSubCommandEntry_Rumble::GetRawSize() const +{ + return 0x0C; +} + +CutsceneMMCommand_Rumble::CutsceneMMCommand_Rumble(const std::vector& rawData, + offset_t rawDataIndex) + : CutsceneCommand(rawData, rawDataIndex) +{ + rawDataIndex += 4; + + entries.reserve(numEntries); + for (size_t i = 0; i < numEntries; i++) + { + auto* entry = new CutsceneMMSubCommandEntry_Rumble(rawData, rawDataIndex); + entries.push_back(entry); + rawDataIndex += entry->GetRawSize(); + } +} + +std::string CutsceneMMCommand_Rumble::GetCommandMacro() const +{ + return StringHelper::Sprintf("CS_RUMBLE_LIST(%i)", numEntries); +} + +/**** TEXT ****/ + +CutsceneMMSubCommandEntry_Text::CutsceneMMSubCommandEntry_Text(const std::vector& rawData, + offset_t rawDataIndex) + : CutsceneSubCommandEntry(rawData, rawDataIndex) +{ + type = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x6); + textId1 = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x8); + textId2 = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0xA); +} + +std::string CutsceneMMSubCommandEntry_Text::GetBodySourceCode() const +{ + if (type == 0xFFFF) + { + return StringHelper::Sprintf("CS_TEXT_NONE(%i, %i)", startFrame, endFrame); + } + + if (type == 2) + { + // TODO: set the enum name when it will be documented + // (https://github.com/Decompollaborate/mm/blob/3e1c568c084671c17836ced904714ea49d989621/include/z64ocarina.h#L35-L118) + return StringHelper::Sprintf("CS_TEXT_OCARINA_ACTION(%i, %i, %i, 0x%X)", base, startFrame, + endFrame, textId1); + } + + switch (type) + { + case 0: + return StringHelper::Sprintf("CS_TEXT_DEFAULT(0x%X, %i, %i, 0x%X, 0x%X)", base, startFrame, + endFrame, textId1, textId2); + + case 1: + return StringHelper::Sprintf("CS_TEXT_TYPE_1(0x%X, %i, %i, 0x%X, 0x%X)", base, startFrame, + endFrame, textId1, textId2); + + case 3: + return StringHelper::Sprintf("CS_TEXT_TYPE_3(0x%X, %i, %i, 0x%X, 0x%X)", base, startFrame, + endFrame, textId1, textId2); + + case 4: + return StringHelper::Sprintf("CS_TEXT_BOSSES_REMAINS(0x%X, %i, %i, 0x%X)", base, startFrame, + endFrame, textId1); + + case 5: + return StringHelper::Sprintf("CS_TEXT_ALL_NORMAL_MASKS(0x%X, %i, %i, 0x%X)", base, + startFrame, endFrame, textId1); + } + + return nullptr; +} + +size_t CutsceneMMSubCommandEntry_Text::GetRawSize() const +{ + return 0x0C; +} + +CutsceneMMCommand_Text::CutsceneMMCommand_Text(const std::vector& rawData, + offset_t rawDataIndex) + : CutsceneCommand(rawData, rawDataIndex) +{ + rawDataIndex += 4; + + entries.reserve(numEntries); + for (size_t i = 0; i < numEntries; i++) + { + auto* entry = new CutsceneMMSubCommandEntry_Text(rawData, rawDataIndex); + entries.push_back(entry); + rawDataIndex += entry->GetRawSize(); + } +} + +std::string CutsceneMMCommand_Text::GetCommandMacro() const +{ + return StringHelper::Sprintf("CS_TEXT_LIST(%i)", numEntries); +} + +/**** ACTOR CUE ****/ + +CutsceneMMSubCommandEntry_ActorCue::CutsceneMMSubCommandEntry_ActorCue( + const std::vector& rawData, offset_t rawDataIndex) + : CutsceneSubCommandEntry(rawData, rawDataIndex) +{ + rotX = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x6); + rotY = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x8); + rotZ = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0xA); + startPosX = BitConverter::ToInt32BE(rawData, rawDataIndex + 0xC); + startPosY = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x10); + startPosZ = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x14); + endPosX = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x18); + endPosY = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x1C); + endPosZ = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x20); + normalX = BitConverter::ToFloatBE(rawData, rawDataIndex + 0x24); + normalY = BitConverter::ToFloatBE(rawData, rawDataIndex + 0x28); + normalZ = BitConverter::ToFloatBE(rawData, rawDataIndex + 0x2C); +} + +std::string CutsceneMMSubCommandEntry_ActorCue::GetBodySourceCode() const +{ + std::string result; + + if (static_cast(commandID) == CutsceneMM_CommandType::CS_CMD_PLAYER_CUE) + { + result = "CS_PLAYER_CUE"; + } + else + { + result = "CS_ACTOR_CUE"; + } + + result += + StringHelper::Sprintf("(%i, %i, %i, 0x%04X, 0x%04X, 0x%04X, %i, %i, " + "%i, %i, %i, %i, %.8ef, %.8ef, %.8ef)", + base, startFrame, endFrame, rotX, rotY, rotZ, startPosX, startPosY, + startPosZ, endPosX, endPosY, endPosZ, normalX, normalY, normalZ); + return result; +} + +size_t CutsceneMMSubCommandEntry_ActorCue::GetRawSize() const +{ + return 0x30; +} + +CutsceneMMCommand_ActorCue::CutsceneMMCommand_ActorCue(const std::vector& rawData, + offset_t rawDataIndex) + : CutsceneCommand(rawData, rawDataIndex) +{ + rawDataIndex += 4; + + entries.reserve(numEntries); + for (size_t i = 0; i < numEntries; i++) + { + auto* entry = new CutsceneMMSubCommandEntry_ActorCue(rawData, rawDataIndex); + entries.push_back(entry); + rawDataIndex += entry->GetRawSize(); + } +} + +std::string CutsceneMMCommand_ActorCue::GetCommandMacro() const +{ + EnumData* enumData = &Globals::Instance->cfg.enumData; + + if (static_cast(commandID) == CutsceneMM_CommandType::CS_CMD_PLAYER_CUE) + { + return StringHelper::Sprintf("CS_PLAYER_CUE_LIST(%i)", numEntries); + } + + if (enumData->cutsceneCmd.find(commandID) != enumData->cutsceneCmd.end()) + { + return StringHelper::Sprintf("CS_ACTOR_CUE_LIST(%s, %i)", + enumData->cutsceneCmd[commandID].c_str(), numEntries); + } + return StringHelper::Sprintf("CS_ACTOR_CUE_LIST(0x%03X, %i)", commandID, numEntries); +} diff --git a/tools/ZAPD/ZAPD/OtherStructs/CutsceneMM_Commands.h b/tools/ZAPD/ZAPD/OtherStructs/CutsceneMM_Commands.h index c8ae4eb603..fb2f772752 100644 --- a/tools/ZAPD/ZAPD/OtherStructs/CutsceneMM_Commands.h +++ b/tools/ZAPD/ZAPD/OtherStructs/CutsceneMM_Commands.h @@ -1,51 +1,256 @@ #pragma once -#include "Cutscene_Commands.h" +#include "Cutscene_Common.h" -enum class CutsceneMMCommands +// https://github.com/zeldaret/mm/blob/0c7b90cf97f26483c8b6a98ae099a295f61e72ab/include/z64cutscene.h#L294-530 +enum class CutsceneMM_CommandType { - /* 0x00A */ CS_CMD_TEXTBOX = 0xA, - /* 0x05A */ CS_CMD_CAMERA = 0x5A, - /* 0x096 */ CS_CMD_MISC = 0x96, - /* 0x097 */ CS_CMD_SET_LIGHTING, - /* 0x098 */ CS_CMD_SCENE_TRANS_FX, - /* 0x099 */ CS_CMD_MOTIONBLUR, - /* 0x09A */ CS_CMD_GIVETATL, - /* 0x09B */ CS_CMD_FADESCREEN, - /* 0x09C */ CS_CMD_FADESEQ, - /* 0x09D */ CS_CMD_SETTIME, - /* 0x0C8 */ CS_CMD_SET_PLAYER_ACTION = 0xC8, - /* 0x0FA */ CS_CMD_UNK_FA = 0xFA, - /* 0x0FE */ CS_CMD_UNK_FE = 0xFE, - /* 0x0FF */ CS_CMD_UNK_FF, - /* 0x100 */ CS_CMD_UNK_100, - /* 0x101 */ CS_CMD_UNK_101, - /* 0x102 */ CS_CMD_UNK_102, - /* 0x103 */ CS_CMD_UNK_103, - /* 0x104 */ CS_CMD_UNK_104, - /* 0x105 */ CS_CMD_UNK_105, - /* 0x108 */ CS_CMD_UNK_108 = 0x108, - /* 0x109 */ CS_CMD_UNK_109, - /* 0x12C */ CS_CMD_PLAYSEQ = 0x12C, - /* 0x12D */ CS_CMD_UNK_12D, - /* 0x130 */ CS_CMD_130 = 0x130, - /* 0x131 */ CS_CMD_131 = 0x131, - /* 0x132 */ CS_CMD_132 = 0x132, - /* 0x133 */ CS_CMD_STOPSEQ, - /* 0x134 */ CS_CMD_PLAYAMBIENCE, - /* 0x135 */ CS_CMD_FADEAMBIENCE, - /* 0x15E */ CS_CMD_TERMINATOR = 0x15E, + /* -2 */ CS_CMD_ACTOR_CUE_POST_PROCESS = -2, + /* -1 */ CS_CAM_STOP, + /* 0x00A */ CS_CMD_TEXT = 10, + /* 0x05A */ CS_CMD_CAMERA_SPLINE = 90, + /* 0x064 */ CS_CMD_ACTOR_CUE_100 = 100, + /* 0x065 */ CS_CMD_ACTOR_CUE_101, + /* 0x066 */ CS_CMD_ACTOR_CUE_102, + /* 0x067 */ CS_CMD_ACTOR_CUE_103, + /* 0x068 */ CS_CMD_ACTOR_CUE_104, + /* 0x069 */ CS_CMD_ACTOR_CUE_105, + /* 0x06A */ CS_CMD_ACTOR_CUE_106, + /* 0x06B */ CS_CMD_ACTOR_CUE_107, + /* 0x06C */ CS_CMD_ACTOR_CUE_108, + /* 0x06D */ CS_CMD_ACTOR_CUE_109, + /* 0x06E */ CS_CMD_ACTOR_CUE_110, + /* 0x06F */ CS_CMD_ACTOR_CUE_111, + /* 0x070 */ CS_CMD_ACTOR_CUE_112, + /* 0x071 */ CS_CMD_ACTOR_CUE_113, + /* 0x072 */ CS_CMD_ACTOR_CUE_114, + /* 0x073 */ CS_CMD_ACTOR_CUE_115, + /* 0x074 */ CS_CMD_ACTOR_CUE_116, + /* 0x075 */ CS_CMD_ACTOR_CUE_117, + /* 0x076 */ CS_CMD_ACTOR_CUE_118, + /* 0x077 */ CS_CMD_ACTOR_CUE_119, + /* 0x078 */ CS_CMD_ACTOR_CUE_120, + /* 0x079 */ CS_CMD_ACTOR_CUE_121, + /* 0x07A */ CS_CMD_ACTOR_CUE_122, + /* 0x07B */ CS_CMD_ACTOR_CUE_123, + /* 0x07C */ CS_CMD_ACTOR_CUE_124, + /* 0x07D */ CS_CMD_ACTOR_CUE_125, + /* 0x07E */ CS_CMD_ACTOR_CUE_126, + /* 0x07F */ CS_CMD_ACTOR_CUE_127, + /* 0x080 */ CS_CMD_ACTOR_CUE_128, + /* 0x081 */ CS_CMD_ACTOR_CUE_129, + /* 0x082 */ CS_CMD_ACTOR_CUE_130, + /* 0x083 */ CS_CMD_ACTOR_CUE_131, + /* 0x084 */ CS_CMD_ACTOR_CUE_132, + /* 0x085 */ CS_CMD_ACTOR_CUE_133, + /* 0x086 */ CS_CMD_ACTOR_CUE_134, + /* 0x087 */ CS_CMD_ACTOR_CUE_135, + /* 0x088 */ CS_CMD_ACTOR_CUE_136, + /* 0x089 */ CS_CMD_ACTOR_CUE_137, + /* 0x08A */ CS_CMD_ACTOR_CUE_138, + /* 0x08B */ CS_CMD_ACTOR_CUE_139, + /* 0x08C */ CS_CMD_ACTOR_CUE_140, + /* 0x08D */ CS_CMD_ACTOR_CUE_141, + /* 0x08E */ CS_CMD_ACTOR_CUE_142, + /* 0x08F */ CS_CMD_ACTOR_CUE_143, + /* 0x090 */ CS_CMD_ACTOR_CUE_144, + /* 0x091 */ CS_CMD_ACTOR_CUE_145, + /* 0x092 */ CS_CMD_ACTOR_CUE_146, + /* 0x093 */ CS_CMD_ACTOR_CUE_147, + /* 0x094 */ CS_CMD_ACTOR_CUE_148, + /* 0x095 */ CS_CMD_ACTOR_CUE_149, + /* 0x096 */ CS_CMD_MISC, + /* 0x097 */ CS_CMD_LIGHT_SETTING, + /* 0x098 */ CS_CMD_TRANSITION, + /* 0x099 */ CS_CMD_MOTION_BLUR, + /* 0x09A */ CS_CMD_GIVE_TATL, + /* 0x09B */ CS_CMD_TRANSITION_GENERAL, + /* 0x09C */ CS_CMD_FADE_OUT_SEQ, + /* 0x09D */ CS_CMD_TIME, + /* 0x0C8 */ CS_CMD_PLAYER_CUE = 200, + /* 0x0C9 */ CS_CMD_ACTOR_CUE_201, + /* 0x0FA */ CS_CMD_UNK_DATA_FA = 0xFA, + /* 0x0FE */ CS_CMD_UNK_DATA_FE = 0xFE, + /* 0x0FF */ CS_CMD_UNK_DATA_FF, + /* 0x100 */ CS_CMD_UNK_DATA_100, + /* 0x101 */ CS_CMD_UNK_DATA_101, + /* 0x102 */ CS_CMD_UNK_DATA_102, + /* 0x103 */ CS_CMD_UNK_DATA_103, + /* 0x104 */ CS_CMD_UNK_DATA_104, + /* 0x105 */ CS_CMD_UNK_DATA_105, + /* 0x108 */ CS_CMD_UNK_DATA_108 = 0x108, + /* 0x109 */ CS_CMD_UNK_DATA_109, + /* 0x12C */ CS_CMD_START_SEQ = 300, + /* 0x12D */ CS_CMD_STOP_SEQ, + /* 0x12E */ CS_CMD_START_AMBIENCE, + /* 0x12F */ CS_CMD_FADE_OUT_AMBIENCE, + /* 0x130 */ CS_CMD_SFX_REVERB_INDEX_2, + /* 0x131 */ CS_CMD_SFX_REVERB_INDEX_1, + /* 0x132 */ CS_CMD_MODIFY_SEQ, + /* 0x15E */ CS_CMD_DESTINATION = 350, /* 0x15F */ CS_CMD_CHOOSE_CREDITS_SCENES, - /* 0x190 */ CS_CMD_RUMBLE = 0x190, + /* 0x190 */ CS_CMD_RUMBLE = 400, + /* 0x1C2 */ CS_CMD_ACTOR_CUE_450 = 450, + /* 0x1C3 */ CS_CMD_ACTOR_CUE_451, + /* 0x1C4 */ CS_CMD_ACTOR_CUE_452, + /* 0x1C5 */ CS_CMD_ACTOR_CUE_453, + /* 0x1C6 */ CS_CMD_ACTOR_CUE_454, + /* 0x1C7 */ CS_CMD_ACTOR_CUE_455, + /* 0x1C8 */ CS_CMD_ACTOR_CUE_456, + /* 0x1C9 */ CS_CMD_ACTOR_CUE_457, + /* 0x1CA */ CS_CMD_ACTOR_CUE_458, + /* 0x1CB */ CS_CMD_ACTOR_CUE_459, + /* 0x1CC */ CS_CMD_ACTOR_CUE_460, + /* 0x1CD */ CS_CMD_ACTOR_CUE_461, + /* 0x1CE */ CS_CMD_ACTOR_CUE_462, + /* 0x1CF */ CS_CMD_ACTOR_CUE_463, + /* 0x1D0 */ CS_CMD_ACTOR_CUE_464, + /* 0x1D1 */ CS_CMD_ACTOR_CUE_465, + /* 0x1D2 */ CS_CMD_ACTOR_CUE_466, + /* 0x1D3 */ CS_CMD_ACTOR_CUE_467, + /* 0x1D4 */ CS_CMD_ACTOR_CUE_468, + /* 0x1D5 */ CS_CMD_ACTOR_CUE_469, + /* 0x1D6 */ CS_CMD_ACTOR_CUE_470, + /* 0x1D7 */ CS_CMD_ACTOR_CUE_471, + /* 0x1D8 */ CS_CMD_ACTOR_CUE_472, + /* 0x1D9 */ CS_CMD_ACTOR_CUE_473, + /* 0x1DA */ CS_CMD_ACTOR_CUE_474, + /* 0x1DB */ CS_CMD_ACTOR_CUE_475, + /* 0x1DC */ CS_CMD_ACTOR_CUE_476, + /* 0x1DD */ CS_CMD_ACTOR_CUE_477, + /* 0x1DE */ CS_CMD_ACTOR_CUE_478, + /* 0x1DF */ CS_CMD_ACTOR_CUE_479, + /* 0x1E0 */ CS_CMD_ACTOR_CUE_480, + /* 0x1E1 */ CS_CMD_ACTOR_CUE_481, + /* 0x1E2 */ CS_CMD_ACTOR_CUE_482, + /* 0x1E3 */ CS_CMD_ACTOR_CUE_483, + /* 0x1E4 */ CS_CMD_ACTOR_CUE_484, + /* 0x1E5 */ CS_CMD_ACTOR_CUE_485, + /* 0x1E6 */ CS_CMD_ACTOR_CUE_486, + /* 0x1E7 */ CS_CMD_ACTOR_CUE_487, + /* 0x1E8 */ CS_CMD_ACTOR_CUE_488, + /* 0x1E9 */ CS_CMD_ACTOR_CUE_489, + /* 0x1EA */ CS_CMD_ACTOR_CUE_490, + /* 0x1EB */ CS_CMD_ACTOR_CUE_491, + /* 0x1EC */ CS_CMD_ACTOR_CUE_492, + /* 0x1ED */ CS_CMD_ACTOR_CUE_493, + /* 0x1EE */ CS_CMD_ACTOR_CUE_494, + /* 0x1EF */ CS_CMD_ACTOR_CUE_495, + /* 0x1F0 */ CS_CMD_ACTOR_CUE_496, + /* 0x1F1 */ CS_CMD_ACTOR_CUE_497, + /* 0x1F2 */ CS_CMD_ACTOR_CUE_498, + /* 0x1F3 */ CS_CMD_ACTOR_CUE_499, + /* 0x1F4 */ CS_CMD_ACTOR_CUE_500, + /* 0x1F5 */ CS_CMD_ACTOR_CUE_501, + /* 0x1F6 */ CS_CMD_ACTOR_CUE_502, + /* 0x1F7 */ CS_CMD_ACTOR_CUE_503, + /* 0x1F8 */ CS_CMD_ACTOR_CUE_504, + /* 0x1F9 */ CS_CMD_ACTOR_CUE_SOTCS, + /* 0x1FA */ CS_CMD_ACTOR_CUE_506, + /* 0x1FB */ CS_CMD_ACTOR_CUE_507, + /* 0x1FC */ CS_CMD_ACTOR_CUE_508, + /* 0x1FD */ CS_CMD_ACTOR_CUE_509, + /* 0x1FE */ CS_CMD_ACTOR_CUE_510, + /* 0x1FF */ CS_CMD_ACTOR_CUE_511, + /* 0x200 */ CS_CMD_ACTOR_CUE_512, + /* 0x201 */ CS_CMD_ACTOR_CUE_513, + /* 0x202 */ CS_CMD_ACTOR_CUE_514, + /* 0x203 */ CS_CMD_ACTOR_CUE_515, + /* 0x204 */ CS_CMD_ACTOR_CUE_516, + /* 0x205 */ CS_CMD_ACTOR_CUE_517, + /* 0x206 */ CS_CMD_ACTOR_CUE_518, + /* 0x207 */ CS_CMD_ACTOR_CUE_519, + /* 0x208 */ CS_CMD_ACTOR_CUE_520, + /* 0x209 */ CS_CMD_ACTOR_CUE_521, + /* 0x20A */ CS_CMD_ACTOR_CUE_522, + /* 0x20B */ CS_CMD_ACTOR_CUE_523, + /* 0x20C */ CS_CMD_ACTOR_CUE_524, + /* 0x20D */ CS_CMD_ACTOR_CUE_525, + /* 0x20E */ CS_CMD_ACTOR_CUE_526, + /* 0x20F */ CS_CMD_ACTOR_CUE_527, + /* 0x210 */ CS_CMD_ACTOR_CUE_528, + /* 0x211 */ CS_CMD_ACTOR_CUE_529, + /* 0x212 */ CS_CMD_ACTOR_CUE_530, + /* 0x213 */ CS_CMD_ACTOR_CUE_531, + /* 0x214 */ CS_CMD_ACTOR_CUE_532, + /* 0x215 */ CS_CMD_ACTOR_CUE_533, + /* 0x216 */ CS_CMD_ACTOR_CUE_534, + /* 0x217 */ CS_CMD_ACTOR_CUE_535, + /* 0x218 */ CS_CMD_ACTOR_CUE_536, + /* 0x219 */ CS_CMD_ACTOR_CUE_537, + /* 0x21A */ CS_CMD_ACTOR_CUE_538, + /* 0x21B */ CS_CMD_ACTOR_CUE_539, + /* 0x21C */ CS_CMD_ACTOR_CUE_540, + /* 0x21D */ CS_CMD_ACTOR_CUE_541, + /* 0x21E */ CS_CMD_ACTOR_CUE_542, + /* 0x21F */ CS_CMD_ACTOR_CUE_543, + /* 0x220 */ CS_CMD_ACTOR_CUE_544, + /* 0x221 */ CS_CMD_ACTOR_CUE_545, + /* 0x222 */ CS_CMD_ACTOR_CUE_546, + /* 0x223 */ CS_CMD_ACTOR_CUE_547, + /* 0x224 */ CS_CMD_ACTOR_CUE_548, + /* 0x225 */ CS_CMD_ACTOR_CUE_549, + /* 0x226 */ CS_CMD_ACTOR_CUE_550, + /* 0x227 */ CS_CMD_ACTOR_CUE_551, + /* 0x228 */ CS_CMD_ACTOR_CUE_552, + /* 0x229 */ CS_CMD_ACTOR_CUE_553, + /* 0x22A */ CS_CMD_ACTOR_CUE_554, + /* 0x22B */ CS_CMD_ACTOR_CUE_555, + /* 0x22C */ CS_CMD_ACTOR_CUE_556, + /* 0x22D */ CS_CMD_ACTOR_CUE_557, + /* 0x22E */ CS_CMD_ACTOR_CUE_558, + /* 0x22F */ CS_CMD_ACTOR_CUE_559, + /* 0x230 */ CS_CMD_ACTOR_CUE_560, + /* 0x231 */ CS_CMD_ACTOR_CUE_561, + /* 0x232 */ CS_CMD_ACTOR_CUE_562, + /* 0x233 */ CS_CMD_ACTOR_CUE_563, + /* 0x234 */ CS_CMD_ACTOR_CUE_564, + /* 0x235 */ CS_CMD_ACTOR_CUE_565, + /* 0x236 */ CS_CMD_ACTOR_CUE_566, + /* 0x237 */ CS_CMD_ACTOR_CUE_567, + /* 0x238 */ CS_CMD_ACTOR_CUE_568, + /* 0x239 */ CS_CMD_ACTOR_CUE_569, + /* 0x23A */ CS_CMD_ACTOR_CUE_570, + /* 0x23B */ CS_CMD_ACTOR_CUE_571, + /* 0x23C */ CS_CMD_ACTOR_CUE_572, + /* 0x23D */ CS_CMD_ACTOR_CUE_573, + /* 0x23E */ CS_CMD_ACTOR_CUE_574, + /* 0x23F */ CS_CMD_ACTOR_CUE_575, + /* 0x240 */ CS_CMD_ACTOR_CUE_576, + /* 0x241 */ CS_CMD_ACTOR_CUE_577, + /* 0x242 */ CS_CMD_ACTOR_CUE_578, + /* 0x243 */ CS_CMD_ACTOR_CUE_579, + /* 0x244 */ CS_CMD_ACTOR_CUE_580, + /* 0x245 */ CS_CMD_ACTOR_CUE_581, + /* 0x246 */ CS_CMD_ACTOR_CUE_582, + /* 0x247 */ CS_CMD_ACTOR_CUE_583, + /* 0x248 */ CS_CMD_ACTOR_CUE_584, + /* 0x249 */ CS_CMD_ACTOR_CUE_585, + /* 0x24A */ CS_CMD_ACTOR_CUE_586, + /* 0x24B */ CS_CMD_ACTOR_CUE_587, + /* 0x24C */ CS_CMD_ACTOR_CUE_588, + /* 0x24D */ CS_CMD_ACTOR_CUE_589, + /* 0x24E */ CS_CMD_ACTOR_CUE_590, + /* 0x24F */ CS_CMD_ACTOR_CUE_591, + /* 0x250 */ CS_CMD_ACTOR_CUE_592, + /* 0x251 */ CS_CMD_ACTOR_CUE_593, + /* 0x252 */ CS_CMD_ACTOR_CUE_594, + /* 0x253 */ CS_CMD_ACTOR_CUE_595, + /* 0x254 */ CS_CMD_ACTOR_CUE_596, + /* 0x255 */ CS_CMD_ACTOR_CUE_597, + /* 0x256 */ CS_CMD_ACTOR_CUE_598, + /* 0x257 */ CS_CMD_ACTOR_CUE_599 }; -class CutsceneSubCommandEntry_GenericMMCmd : public CutsceneSubCommandEntry +/**** GENERIC ****/ + +class CutsceneMMSubCommandEntry_GenericCmd : public CutsceneSubCommandEntry { public: - CutsceneMMCommands commandId; + CutsceneMM_CommandType commandId; - CutsceneSubCommandEntry_GenericMMCmd(const std::vector& rawData, offset_t rawDataIndex, - CutsceneMMCommands cmdId); + CutsceneMMSubCommandEntry_GenericCmd(const std::vector& rawData, offset_t rawDataIndex, + CutsceneMM_CommandType cmdId); std::string GetBodySourceCode() const override; }; @@ -54,11 +259,13 @@ class CutsceneMMCommand_GenericCmd : public CutsceneCommand { public: CutsceneMMCommand_GenericCmd(const std::vector& rawData, offset_t rawDataIndex, - CutsceneMMCommands cmdId); + CutsceneMM_CommandType cmdId); std::string GetCommandMacro() const override; }; +/**** CAMERA ****/ + // TODO: MM cutscene camera command is implemented as a placeholder until we better understand how // it works class CutsceneSubCommandEntry_Camera : public CutsceneSubCommandEntry @@ -81,7 +288,9 @@ public: std::string GetCommandMacro() const override; }; -class CutsceneSubCommandEntry_FadeScreen : public CutsceneSubCommandEntry +/**** TRANSITION GENERAL ****/ + +class CutsceneSubCommandEntry_TransitionGeneral : public CutsceneSubCommandEntry { public: uint8_t unk_06; @@ -91,41 +300,46 @@ public: uint8_t unk_0A; uint8_t unk_0B; - CutsceneSubCommandEntry_FadeScreen(const std::vector& rawData, offset_t rawDataIndex); + CutsceneSubCommandEntry_TransitionGeneral(const std::vector& rawData, + offset_t rawDataIndex); std::string GetBodySourceCode() const override; size_t GetRawSize() const override; }; -class CutsceneMMCommand_FadeScreen : public CutsceneCommand +class CutsceneMMCommand_TransitionGeneral : public CutsceneCommand { public: - CutsceneMMCommand_FadeScreen(const std::vector& rawData, offset_t rawDataIndex); + CutsceneMMCommand_TransitionGeneral(const std::vector& rawData, offset_t rawDataIndex); std::string GetCommandMacro() const override; }; -class CutsceneSubCommandEntry_FadeSeq : public CutsceneSubCommandEntry +/**** FADE OUT SEQUENCE ****/ + +class CutsceneSubCommandEntry_FadeOutSeq : public CutsceneSubCommandEntry { public: uint32_t unk_08; - CutsceneSubCommandEntry_FadeSeq(const std::vector& rawData, offset_t rawDataIndex); + CutsceneSubCommandEntry_FadeOutSeq(const std::vector& rawData, offset_t rawDataIndex); std::string GetBodySourceCode() const override; size_t GetRawSize() const override; }; -class CutsceneMMCommand_FadeSeq : public CutsceneCommand +class CutsceneMMCommand_FadeOutSeq : public CutsceneCommand { public: - CutsceneMMCommand_FadeSeq(const std::vector& rawData, offset_t rawDataIndex); + CutsceneMMCommand_FadeOutSeq(const std::vector& rawData, offset_t rawDataIndex); std::string GetCommandMacro() const override; }; +/**** NON IMPLEMENTED ****/ + class CutsceneSubCommandEntry_NonImplemented : public CutsceneSubCommandEntry { public: @@ -138,3 +352,75 @@ class CutsceneMMCommand_NonImplemented : public CutsceneCommand public: CutsceneMMCommand_NonImplemented(const std::vector& rawData, offset_t rawDataIndex); }; + +/**** RUMBLE ****/ + +class CutsceneMMSubCommandEntry_Rumble : public CutsceneSubCommandEntry +{ +public: + uint8_t intensity; + uint8_t decayTimer; + uint8_t decayStep; + + CutsceneMMSubCommandEntry_Rumble(const std::vector& rawData, offset_t rawDataIndex); + + std::string GetBodySourceCode() const override; + + size_t GetRawSize() const override; +}; + +class CutsceneMMCommand_Rumble : public CutsceneCommand +{ +public: + CutsceneMMCommand_Rumble(const std::vector& rawData, offset_t rawDataIndex); + + std::string GetCommandMacro() const override; +}; + +/**** TEXT ****/ + +class CutsceneMMSubCommandEntry_Text : public CutsceneSubCommandEntry +{ +public: + uint16_t type; + uint16_t textId1; + uint16_t textId2; + + CutsceneMMSubCommandEntry_Text(const std::vector& rawData, offset_t rawDataIndex); + + std::string GetBodySourceCode() const override; + + size_t GetRawSize() const override; +}; + +class CutsceneMMCommand_Text : public CutsceneCommand +{ +public: + CutsceneMMCommand_Text(const std::vector& rawData, offset_t rawDataIndex); + + std::string GetCommandMacro() const override; +}; + +/**** ACTOR CUE ****/ + +class CutsceneMMSubCommandEntry_ActorCue : public CutsceneSubCommandEntry +{ +public: + uint16_t rotX, rotY, rotZ; + int32_t startPosX, startPosY, startPosZ; + int32_t endPosX, endPosY, endPosZ; + float normalX, normalY, normalZ; + + CutsceneMMSubCommandEntry_ActorCue(const std::vector& rawData, offset_t rawDataIndex); + std::string GetBodySourceCode() const override; + + size_t GetRawSize() const override; +}; + +class CutsceneMMCommand_ActorCue : public CutsceneCommand +{ +public: + CutsceneMMCommand_ActorCue(const std::vector& rawData, offset_t rawDataIndex); + + std::string GetCommandMacro() const override; +}; diff --git a/tools/ZAPD/ZAPD/OtherStructs/CutsceneOoT_Commands.cpp b/tools/ZAPD/ZAPD/OtherStructs/CutsceneOoT_Commands.cpp new file mode 100644 index 0000000000..e38bfb6e5d --- /dev/null +++ b/tools/ZAPD/ZAPD/OtherStructs/CutsceneOoT_Commands.cpp @@ -0,0 +1,456 @@ +#include "CutsceneOoT_Commands.h" + +#include +#include +#include "Globals.h" +#include "Utils/BitConverter.h" +#include "Utils/StringHelper.h" + +/**** GENERIC ****/ + +// Specific for command lists where each entry has size 0x30 bytes +const std::unordered_map csCommandsDesc = { + {CutsceneOoT_CommandType::CS_CMD_MISC, + {"CS_MISC", "(%s, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, + {CutsceneOoT_CommandType::CS_CMD_LIGHT_SETTING, + {"CS_LIGHT_SETTING", "(0x%02X, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, + {CutsceneOoT_CommandType::CS_CMD_START_SEQ, + {"CS_START_SEQ", "(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, + {CutsceneOoT_CommandType::CS_CMD_STOP_SEQ, + {"CS_STOP_SEQ", "(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, + {CutsceneOoT_CommandType::CS_CMD_FADE_OUT_SEQ, + {"CS_FADE_OUT_SEQ", "(%s, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, +}; + +CutsceneOoTSubCommandEntry_GenericCmd::CutsceneOoTSubCommandEntry_GenericCmd( + const std::vector& rawData, offset_t rawDataIndex, CutsceneOoT_CommandType cmdId) + : CutsceneSubCommandEntry(rawData, rawDataIndex), commandId(cmdId) +{ + word0 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x0); + word1 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x4); + + unused1 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x8); + unused2 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0xC); + unused3 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x10); + unused4 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x14); + unused5 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x18); + unused6 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x1C); + unused7 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x20); + unused8 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x24); + unused9 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x28); + unused10 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x2C); +} + +std::string CutsceneOoTSubCommandEntry_GenericCmd::GetBodySourceCode() const +{ + EnumData* enumData = &Globals::Instance->cfg.enumData; + const auto& element = csCommandsDesc.find(commandId); + + if (element != csCommandsDesc.end()) + { + bool isIndexInMisc = enumData->miscType.find(base) != enumData->miscType.end(); + bool isIndexInFade = + enumData->fadeOutSeqPlayer.find(base) != enumData->fadeOutSeqPlayer.end(); + std::string entryFmt = element->second.cmdMacro; + std::string firstArg; + entryFmt += element->second.args; + + if (commandId == CutsceneOoT_CommandType::CS_CMD_MISC && isIndexInMisc) + firstArg = enumData->miscType[base]; + else if (commandId == CutsceneOoT_CommandType::CS_CMD_FADE_OUT_SEQ && isIndexInFade) + firstArg = enumData->fadeOutSeqPlayer[base]; + else + { + bool baseOne = (commandId == CutsceneOoT_CommandType::CS_CMD_LIGHT_SETTING || + commandId == CutsceneOoT_CommandType::CS_CMD_START_SEQ || + commandId == CutsceneOoT_CommandType::CS_CMD_STOP_SEQ); + return StringHelper::Sprintf(entryFmt.c_str(), baseOne ? base - 1 : base, startFrame, + endFrame, pad, unused1, unused2, unused3, unused4, unused5, + unused6, unused7, unused8, unused9, unused10); + } + return StringHelper::Sprintf(entryFmt.c_str(), firstArg.c_str(), startFrame, endFrame, pad, + unused1, unused2, unused3, unused4, unused5, unused6, unused7, + unused8, unused9, unused10); + } + return StringHelper::Sprintf("CS_UNK_DATA(0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, " + "0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X)", + word0, word1, unused1, unused2, unused3, unused4, unused5, unused6, + unused7, unused8, unused9, unused10); +} + +size_t CutsceneOoTSubCommandEntry_GenericCmd::GetRawSize() const +{ + return 0x30; +} + +CutsceneOoTCommand_GenericCmd::CutsceneOoTCommand_GenericCmd(const std::vector& rawData, + offset_t rawDataIndex, + CutsceneOoT_CommandType cmdId) + : CutsceneCommand(rawData, rawDataIndex) +{ + rawDataIndex += 4; + + commandID = static_cast(cmdId); + entries.reserve(numEntries); + + for (size_t i = 0; i < numEntries; i++) + { + auto* entry = new CutsceneOoTSubCommandEntry_GenericCmd(rawData, rawDataIndex, cmdId); + entries.push_back(entry); + rawDataIndex += entry->GetRawSize(); + } +} + +std::string CutsceneOoTCommand_GenericCmd::GetCommandMacro() const +{ + const auto& element = csCommandsDesc.find(static_cast(commandID)); + + if (element != csCommandsDesc.end()) + { + return StringHelper::Sprintf("%s_LIST(%i)", element->second.cmdMacro, numEntries); + } + + return StringHelper::Sprintf("CS_UNK_DATA_LIST(0x%X, %i)", commandID, numEntries); +} + +/**** CAMERA ****/ + +CutsceneOoTCommand_CameraPoint::CutsceneOoTCommand_CameraPoint(const std::vector& rawData, + offset_t rawDataIndex) + : CutsceneSubCommandEntry(rawData, rawDataIndex) +{ + continueFlag = BitConverter::ToInt8BE(rawData, rawDataIndex + 0); + cameraRoll = BitConverter::ToInt8BE(rawData, rawDataIndex + 1); + nextPointFrame = BitConverter::ToInt16BE(rawData, rawDataIndex + 2); + viewAngle = BitConverter::ToFloatBE(rawData, rawDataIndex + 4); + + posX = BitConverter::ToInt16BE(rawData, rawDataIndex + 8); + posY = BitConverter::ToInt16BE(rawData, rawDataIndex + 10); + posZ = BitConverter::ToInt16BE(rawData, rawDataIndex + 12); + + unused = BitConverter::ToInt16BE(rawData, rawDataIndex + 14); +} + +std::string CutsceneOoTCommand_CameraPoint::GetBodySourceCode() const +{ + std::string continueMacro = "CS_CAM_CONTINUE"; + if (continueFlag != 0) + continueMacro = "CS_CAM_STOP"; + + return StringHelper::Sprintf("CS_CAM_POINT(%s, 0x%02X, %i, %ff, %i, %i, %i, 0x%04X)", + continueMacro.c_str(), cameraRoll, nextPointFrame, viewAngle, posX, + posY, posZ, unused); +} + +size_t CutsceneOoTCommand_CameraPoint::GetRawSize() const +{ + return 0x10; +} + +CutsceneOoTCommand_GenericCameraCmd::CutsceneOoTCommand_GenericCameraCmd( + const std::vector& rawData, offset_t rawDataIndex) + : CutsceneCommand(rawData, rawDataIndex) +{ + base = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0); + startFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 2); + endFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 4); + unused = BitConverter::ToUInt16BE(rawData, rawDataIndex + 6); + + bool shouldContinue = true; + + uint32_t currentPtr = rawDataIndex + 8; + + while (shouldContinue) + { + CutsceneOoTCommand_CameraPoint* camPoint = + new CutsceneOoTCommand_CameraPoint(rawData, currentPtr); + entries.push_back(camPoint); + + if (camPoint->continueFlag == -1) + shouldContinue = false; + + currentPtr += camPoint->GetRawSize(); + } +} + +std::string CutsceneOoTCommand_GenericCameraCmd::GetCommandMacro() const +{ + std::string result; + const char* listStr; + + if (commandID == (uint32_t)CutsceneOoT_CommandType::CS_CMD_CAM_AT_SPLINE) + { + listStr = "CS_CAM_AT_SPLINE"; + } + else if (commandID == (uint32_t)CutsceneOoT_CommandType::CS_CMD_CAM_AT_SPLINE_REL_TO_PLAYER) + { + listStr = "CS_CAM_AT_SPLINE_REL_TO_PLAYER"; + } + else if (commandID == (uint32_t)CutsceneOoT_CommandType::CS_CMD_CAM_EYE_SPLINE_REL_TO_PLAYER) + { + listStr = "CS_CAM_EYE_SPLINE_REL_TO_PLAYER"; + } + else + { + listStr = "CS_CAM_EYE_SPLINE"; + } + + result += StringHelper::Sprintf("%s(%i, %i)", listStr, startFrame, endFrame); + + return result; +} + +size_t CutsceneOoTCommand_GenericCameraCmd::GetCommandSize() const +{ + return 0x0C + entries.at(0)->GetRawSize() * entries.size(); +} + +/**** RUMBLE ****/ + +CutsceneOoTSubCommandEntry_Rumble::CutsceneOoTSubCommandEntry_Rumble( + const std::vector& rawData, offset_t rawDataIndex) + : CutsceneSubCommandEntry(rawData, rawDataIndex) +{ + sourceStrength = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x06); + duration = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x07); + decreaseRate = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x08); + unk_09 = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x09); + unk_0A = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x0A); +} + +std::string CutsceneOoTSubCommandEntry_Rumble::GetBodySourceCode() const +{ + // Note: the first argument is unused + return StringHelper::Sprintf("CS_RUMBLE_CONTROLLER(%i, %i, %i, %i, %i, %i, 0x%02X, 0x%02X)", + base, startFrame, endFrame, sourceStrength, duration, decreaseRate, + unk_09, unk_0A); +} + +size_t CutsceneOoTSubCommandEntry_Rumble::GetRawSize() const +{ + return 0x0C; +} + +CutsceneOoTCommand_Rumble::CutsceneOoTCommand_Rumble(const std::vector& rawData, + offset_t rawDataIndex) + : CutsceneCommand(rawData, rawDataIndex) +{ + rawDataIndex += 4; + + entries.reserve(numEntries); + for (size_t i = 0; i < numEntries; i++) + { + auto* entry = new CutsceneOoTSubCommandEntry_Rumble(rawData, rawDataIndex); + entries.push_back(entry); + rawDataIndex += entry->GetRawSize(); + } +} + +std::string CutsceneOoTCommand_Rumble::GetCommandMacro() const +{ + return StringHelper::Sprintf("CS_RUMBLE_CONTROLLER_LIST(%i)", numEntries); +} + +/**** TEXT ****/ + +CutsceneOoTSubCommandEntry_Text::CutsceneOoTSubCommandEntry_Text( + const std::vector& rawData, offset_t rawDataIndex) + : CutsceneSubCommandEntry(rawData, rawDataIndex) +{ + type = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x6); + textId1 = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x8); + textId2 = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0xA); +} + +std::string CutsceneOoTSubCommandEntry_Text::GetBodySourceCode() const +{ + EnumData* enumData = &Globals::Instance->cfg.enumData; + + if (type == 0xFFFF) + { + return StringHelper::Sprintf("CS_TEXT_NONE(%i, %i)", startFrame, endFrame); + } + if (type == 2) + { + return StringHelper::Sprintf("CS_TEXT_OCARINA_ACTION(%i, %i, %i, 0x%X)", base, startFrame, + endFrame, textId1); + } + + if (enumData->textType.find(type) != enumData->textType.end()) + { + return StringHelper::Sprintf("CS_TEXT(0x%X, %i, %i, %s, 0x%X, 0x%X)", base, startFrame, + endFrame, enumData->textType[type].c_str(), textId1, textId2); + } + + return StringHelper::Sprintf("CS_TEXT(0x%X, %i, %i, %i, 0x%X, 0x%X)", base, startFrame, + endFrame, type, textId1, textId2); +} + +size_t CutsceneOoTSubCommandEntry_Text::GetRawSize() const +{ + return 0x0C; +} + +CutsceneOoTCommand_Text::CutsceneOoTCommand_Text(const std::vector& rawData, + offset_t rawDataIndex) + : CutsceneCommand(rawData, rawDataIndex) +{ + rawDataIndex += 4; + + entries.reserve(numEntries); + for (size_t i = 0; i < numEntries; i++) + { + auto* entry = new CutsceneOoTSubCommandEntry_Text(rawData, rawDataIndex); + entries.push_back(entry); + rawDataIndex += entry->GetRawSize(); + } +} + +std::string CutsceneOoTCommand_Text::GetCommandMacro() const +{ + return StringHelper::Sprintf("CS_TEXT_LIST(%i)", numEntries); +} + +/**** ACTOR CUE ****/ + +CutsceneOoTSubCommandEntry_ActorCue::CutsceneOoTSubCommandEntry_ActorCue( + const std::vector& rawData, offset_t rawDataIndex) + : CutsceneSubCommandEntry(rawData, rawDataIndex) +{ + rotX = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x6); + rotY = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x8); + rotZ = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0xA); + startPosX = BitConverter::ToInt32BE(rawData, rawDataIndex + 0xC); + startPosY = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x10); + startPosZ = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x14); + endPosX = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x18); + endPosY = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x1C); + endPosZ = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x20); + normalX = BitConverter::ToFloatBE(rawData, rawDataIndex + 0x24); + normalY = BitConverter::ToFloatBE(rawData, rawDataIndex + 0x28); + normalZ = BitConverter::ToFloatBE(rawData, rawDataIndex + 0x2C); +} + +std::string CutsceneOoTSubCommandEntry_ActorCue::GetBodySourceCode() const +{ + std::string result; + + if (static_cast(commandID) == + CutsceneOoT_CommandType::CS_CMD_PLAYER_CUE) + { + result = "CS_PLAYER_CUE"; + } + else + { + result = "CS_ACTOR_CUE"; + } + + result += + StringHelper::Sprintf("(%i, %i, %i, 0x%04X, 0x%04X, 0x%04X, %i, %i, " + "%i, %i, %i, %i, %.8ef, %.8ef, %.8ef)", + base, startFrame, endFrame, rotX, rotY, rotZ, startPosX, startPosY, + startPosZ, endPosX, endPosY, endPosZ, normalX, normalY, normalZ); + return result; +} + +size_t CutsceneOoTSubCommandEntry_ActorCue::GetRawSize() const +{ + return 0x30; +} + +CutsceneOoTCommand_ActorCue::CutsceneOoTCommand_ActorCue(const std::vector& rawData, + offset_t rawDataIndex) + : CutsceneCommand(rawData, rawDataIndex) +{ + rawDataIndex += 4; + + entries.reserve(numEntries); + for (size_t i = 0; i < numEntries; i++) + { + auto* entry = new CutsceneOoTSubCommandEntry_ActorCue(rawData, rawDataIndex); + entries.push_back(entry); + rawDataIndex += entry->GetRawSize(); + } +} + +std::string CutsceneOoTCommand_ActorCue::GetCommandMacro() const +{ + EnumData* enumData = &Globals::Instance->cfg.enumData; + + if (static_cast(commandID) == + CutsceneOoT_CommandType::CS_CMD_PLAYER_CUE) + { + return StringHelper::Sprintf("CS_PLAYER_CUE_LIST(%i)", entries.size()); + } + + if (enumData->cutsceneCmd.find(commandID) != enumData->cutsceneCmd.end()) + { + return StringHelper::Sprintf("CS_ACTOR_CUE_LIST(%s, %i)", + enumData->cutsceneCmd[commandID].c_str(), entries.size()); + } + + return StringHelper::Sprintf("CS_ACTOR_CUE_LIST(0x%04X, %i)", commandID, entries.size()); +} + +/**** DESTINATION ****/ + +CutsceneOoTCommand_Destination::CutsceneOoTCommand_Destination(const std::vector& rawData, + offset_t rawDataIndex) + : CutsceneCommand(rawData, rawDataIndex) +{ + rawDataIndex += 4; + + base = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0); + startFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 2); + endFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 4); + unknown = BitConverter::ToUInt16BE(rawData, rawDataIndex + 6); // endFrame duplicate +} + +std::string CutsceneOoTCommand_Destination::GenerateSourceCode() const +{ + EnumData* enumData = &Globals::Instance->cfg.enumData; + + if (enumData->destination.find(base) != enumData->destination.end()) + { + return StringHelper::Sprintf("CS_DESTINATION(%s, %i, %i),\n", + enumData->destination[base].c_str(), startFrame, endFrame); + } + + return StringHelper::Sprintf("CS_DESTINATION(%i, %i, %i),\n", base, startFrame, endFrame); +} + +size_t CutsceneOoTCommand_Destination::GetCommandSize() const +{ + return 0x10; +} + +/**** TRANSITION ****/ + +CutsceneOoTCommand_Transition::CutsceneOoTCommand_Transition(const std::vector& rawData, + offset_t rawDataIndex) + : CutsceneCommand(rawData, rawDataIndex) +{ + rawDataIndex += 4; + + base = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0); + startFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 2); + endFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 4); +} + +std::string CutsceneOoTCommand_Transition::GenerateSourceCode() const +{ + EnumData* enumData = &Globals::Instance->cfg.enumData; + + if (enumData->transitionType.find(base) != enumData->transitionType.end()) + { + return StringHelper::Sprintf("CS_TRANSITION(%s, %i, %i),\n", + enumData->transitionType[base].c_str(), startFrame, endFrame); + } + + return StringHelper::Sprintf("CS_TRANSITION(%i, %i, %i),\n", base, startFrame, endFrame); +} + +size_t CutsceneOoTCommand_Transition::GetCommandSize() const +{ + return 0x10; +} diff --git a/tools/ZAPD/ZAPD/OtherStructs/CutsceneOoT_Commands.h b/tools/ZAPD/ZAPD/OtherStructs/CutsceneOoT_Commands.h new file mode 100644 index 0000000000..ff9b6797c3 --- /dev/null +++ b/tools/ZAPD/ZAPD/OtherStructs/CutsceneOoT_Commands.h @@ -0,0 +1,314 @@ +#pragma once + +#include "Cutscene_Common.h" + +// https://github.com/zeldaret/oot/blob/7235af2249843fb68740111b70089bad827a4730/include/z64cutscene.h#L35-L165 +enum class CutsceneOoT_CommandType +{ + CS_CMD_CAM_EYE_SPLINE = 0x01, + CS_CMD_CAM_AT_SPLINE, + CS_CMD_MISC, + CS_CMD_LIGHT_SETTING, + CS_CMD_CAM_EYE_SPLINE_REL_TO_PLAYER, + CS_CMD_CAM_AT_SPLINE_REL_TO_PLAYER, + CS_CMD_CAM_EYE, + CS_CMD_CAM_AT, + CS_CMD_RUMBLE_CONTROLLER, + CS_CMD_PLAYER_CUE, + CS_CMD_UNIMPLEMENTED_B, + CS_CMD_UNIMPLEMENTED_D = 0x0D, + CS_CMD_ACTOR_CUE_1_0, + CS_CMD_ACTOR_CUE_0_0, + CS_CMD_ACTOR_CUE_1_1, + CS_CMD_ACTOR_CUE_0_1, + CS_CMD_ACTOR_CUE_0_2, + CS_CMD_TEXT, + CS_CMD_UNIMPLEMENTED_15 = 0x15, + CS_CMD_UNIMPLEMENTED_16, + CS_CMD_ACTOR_CUE_0_3, + CS_CMD_ACTOR_CUE_1_2, + CS_CMD_ACTOR_CUE_2_0, + CS_CMD_UNIMPLEMENTED_1B = 0x1B, + CS_CMD_UNIMPLEMENTED_1C, + CS_CMD_ACTOR_CUE_3_0, + CS_CMD_ACTOR_CUE_4_0, + CS_CMD_ACTOR_CUE_6_0, + CS_CMD_UNIMPLEMENTED_20, + CS_CMD_UNIMPLEMENTED_21, + CS_CMD_ACTOR_CUE_0_4, + CS_CMD_ACTOR_CUE_1_3, + CS_CMD_ACTOR_CUE_2_1, + CS_CMD_ACTOR_CUE_3_1, + CS_CMD_ACTOR_CUE_4_1, + CS_CMD_ACTOR_CUE_0_5, + CS_CMD_ACTOR_CUE_1_4, + CS_CMD_ACTOR_CUE_2_2, + CS_CMD_ACTOR_CUE_3_2, + CS_CMD_ACTOR_CUE_4_2, + CS_CMD_ACTOR_CUE_5_0, + CS_CMD_TRANSITION, + CS_CMD_ACTOR_CUE_0_6, + CS_CMD_ACTOR_CUE_4_3, + CS_CMD_ACTOR_CUE_1_5, + CS_CMD_ACTOR_CUE_7_0, + CS_CMD_ACTOR_CUE_2_3, + CS_CMD_ACTOR_CUE_3_3, + CS_CMD_ACTOR_CUE_6_1, + CS_CMD_ACTOR_CUE_3_4, + CS_CMD_ACTOR_CUE_4_4, + CS_CMD_ACTOR_CUE_5_1, + CS_CMD_ACTOR_CUE_6_2 = 0x39, + CS_CMD_ACTOR_CUE_6_3, + CS_CMD_UNIMPLEMENTED_3B, + CS_CMD_ACTOR_CUE_7_1, + CS_CMD_UNIMPLEMENTED_3D, + CS_CMD_ACTOR_CUE_8_0, + CS_CMD_ACTOR_CUE_3_5, + CS_CMD_ACTOR_CUE_1_6, + CS_CMD_ACTOR_CUE_3_6, + CS_CMD_ACTOR_CUE_3_7, + CS_CMD_ACTOR_CUE_2_4, + CS_CMD_ACTOR_CUE_1_7, + CS_CMD_ACTOR_CUE_2_5, + CS_CMD_ACTOR_CUE_1_8, + CS_CMD_UNIMPLEMENTED_47, + CS_CMD_ACTOR_CUE_2_6, + CS_CMD_UNIMPLEMENTED_49, + CS_CMD_ACTOR_CUE_2_7, + CS_CMD_ACTOR_CUE_3_8, + CS_CMD_ACTOR_CUE_0_7, + CS_CMD_ACTOR_CUE_5_2, + CS_CMD_ACTOR_CUE_1_9, + CS_CMD_ACTOR_CUE_4_5, + CS_CMD_ACTOR_CUE_1_10, + CS_CMD_ACTOR_CUE_2_8, + CS_CMD_ACTOR_CUE_3_9, + CS_CMD_ACTOR_CUE_4_6, + CS_CMD_ACTOR_CUE_5_3, + CS_CMD_ACTOR_CUE_0_8, + CS_CMD_START_SEQ, + CS_CMD_STOP_SEQ, + CS_CMD_ACTOR_CUE_6_4, + CS_CMD_ACTOR_CUE_7_2, + CS_CMD_ACTOR_CUE_5_4, + CS_CMD_ACTOR_CUE_0_9 = 0x5D, + CS_CMD_ACTOR_CUE_1_11, + CS_CMD_ACTOR_CUE_0_10 = 0x69, + CS_CMD_ACTOR_CUE_2_9, + CS_CMD_ACTOR_CUE_0_11, + CS_CMD_ACTOR_CUE_3_10, + CS_CMD_UNIMPLEMENTED_6D, + CS_CMD_ACTOR_CUE_0_12, + CS_CMD_ACTOR_CUE_7_3, + CS_CMD_UNIMPLEMENTED_70, + CS_CMD_UNIMPLEMENTED_71, + CS_CMD_ACTOR_CUE_7_4, + CS_CMD_ACTOR_CUE_6_5, + CS_CMD_ACTOR_CUE_1_12, + CS_CMD_ACTOR_CUE_2_10, + CS_CMD_ACTOR_CUE_1_13, + CS_CMD_ACTOR_CUE_0_13, + CS_CMD_ACTOR_CUE_1_14, + CS_CMD_ACTOR_CUE_2_11, + CS_CMD_ACTOR_CUE_0_14 = 0x7B, + CS_CMD_FADE_OUT_SEQ, + CS_CMD_ACTOR_CUE_1_15, + CS_CMD_ACTOR_CUE_2_12, + CS_CMD_ACTOR_CUE_3_11, + CS_CMD_ACTOR_CUE_4_7, + CS_CMD_ACTOR_CUE_5_5, + CS_CMD_ACTOR_CUE_6_6, + CS_CMD_ACTOR_CUE_1_16, + CS_CMD_ACTOR_CUE_2_13, + CS_CMD_ACTOR_CUE_3_12, + CS_CMD_ACTOR_CUE_7_5, + CS_CMD_ACTOR_CUE_4_8, + CS_CMD_ACTOR_CUE_5_6, + CS_CMD_ACTOR_CUE_6_7, + CS_CMD_ACTOR_CUE_0_15, + CS_CMD_ACTOR_CUE_0_16, + CS_CMD_TIME, + CS_CMD_ACTOR_CUE_1_17, + CS_CMD_ACTOR_CUE_7_6, + CS_CMD_ACTOR_CUE_9_0, + CS_CMD_ACTOR_CUE_0_17, + CS_CMD_DESTINATION = 0x03E8, + CS_CMD_END = 0xFFFF +}; + +/**** GENERIC ****/ + +class CutsceneOoTSubCommandEntry_GenericCmd : public CutsceneSubCommandEntry +{ +public: + CutsceneOoT_CommandType commandId; + + uint32_t word0 = 0; + uint32_t word1 = 0; + + uint32_t unused1 = 0; + uint32_t unused2 = 0; + uint32_t unused3 = 0; + uint32_t unused4 = 0; + uint32_t unused5 = 0; + uint32_t unused6 = 0; + uint32_t unused7 = 0; + uint32_t unused8 = 0; + uint32_t unused9 = 0; + uint32_t unused10 = 0; + + CutsceneOoTSubCommandEntry_GenericCmd(const std::vector& rawData, + offset_t rawDataIndex, CutsceneOoT_CommandType cmdId); + + std::string GetBodySourceCode() const override; + + size_t GetRawSize() const override; +}; + +class CutsceneOoTCommand_GenericCmd : public CutsceneCommand +{ +public: + CutsceneOoTCommand_GenericCmd(const std::vector& rawData, offset_t rawDataIndex, + CutsceneOoT_CommandType cmdId); + + std::string GetCommandMacro() const override; +}; + +/**** CAMERA ****/ + +class CutsceneOoTCommand_CameraPoint : public CutsceneSubCommandEntry +{ +public: + int8_t continueFlag; + int8_t cameraRoll; + int16_t nextPointFrame; + float viewAngle; + int16_t posX, posY, posZ; + int16_t unused; + + CutsceneOoTCommand_CameraPoint(const std::vector& rawData, offset_t rawDataIndex); + + std::string GetBodySourceCode() const override; + + size_t GetRawSize() const override; +}; + +class CutsceneOoTCommand_GenericCameraCmd : public CutsceneCommand +{ +public: + uint16_t base; + uint16_t startFrame; + uint16_t endFrame; + uint16_t unused; + + CutsceneOoTCommand_GenericCameraCmd(const std::vector& rawData, offset_t rawDataIndex); + + std::string GetCommandMacro() const override; + + size_t GetCommandSize() const override; +}; + +/**** TRANSITION ****/ + +class CutsceneOoTCommand_Transition : public CutsceneCommand +{ +public: + uint16_t base; + uint16_t startFrame; + uint16_t endFrame; + + CutsceneOoTCommand_Transition(const std::vector& rawData, offset_t rawDataIndex); + + std::string GenerateSourceCode() const override; + size_t GetCommandSize() const override; +}; + +/**** RUMBLE ****/ + +class CutsceneOoTSubCommandEntry_Rumble : public CutsceneSubCommandEntry +{ +public: + uint8_t sourceStrength; + uint8_t duration; + uint8_t decreaseRate; + uint8_t unk_09; + uint8_t unk_0A; + + CutsceneOoTSubCommandEntry_Rumble(const std::vector& rawData, offset_t rawDataIndex); + + std::string GetBodySourceCode() const override; + + size_t GetRawSize() const override; +}; + +class CutsceneOoTCommand_Rumble : public CutsceneCommand +{ +public: + CutsceneOoTCommand_Rumble(const std::vector& rawData, offset_t rawDataIndex); + + std::string GetCommandMacro() const override; +}; + +/**** TEXT ****/ + +class CutsceneOoTSubCommandEntry_Text : public CutsceneSubCommandEntry +{ +public: + uint16_t type; + uint16_t textId1; + uint16_t textId2; + + CutsceneOoTSubCommandEntry_Text(const std::vector& rawData, offset_t rawDataIndex); + + std::string GetBodySourceCode() const override; + + size_t GetRawSize() const override; +}; + +class CutsceneOoTCommand_Text : public CutsceneCommand +{ +public: + CutsceneOoTCommand_Text(const std::vector& rawData, offset_t rawDataIndex); + + std::string GetCommandMacro() const override; +}; + +/**** ACTOR CUE ****/ + +class CutsceneOoTSubCommandEntry_ActorCue : public CutsceneSubCommandEntry +{ +public: + uint16_t rotX, rotY, rotZ; + int32_t startPosX, startPosY, startPosZ; + int32_t endPosX, endPosY, endPosZ; + float normalX, normalY, normalZ; + + CutsceneOoTSubCommandEntry_ActorCue(const std::vector& rawData, offset_t rawDataIndex); + std::string GetBodySourceCode() const override; + + size_t GetRawSize() const override; +}; + +class CutsceneOoTCommand_ActorCue : public CutsceneCommand +{ +public: + CutsceneOoTCommand_ActorCue(const std::vector& rawData, offset_t rawDataIndex); + + std::string GetCommandMacro() const override; +}; + +/**** DESTINATION ****/ + +class CutsceneOoTCommand_Destination : public CutsceneCommand +{ +public: + uint16_t base; + uint16_t startFrame; + uint16_t endFrame; + uint16_t unknown; + + CutsceneOoTCommand_Destination(const std::vector& rawData, offset_t rawDataIndex); + + std::string GenerateSourceCode() const override; + size_t GetCommandSize() const override; +}; diff --git a/tools/ZAPD/ZAPD/OtherStructs/Cutscene_Commands.cpp b/tools/ZAPD/ZAPD/OtherStructs/Cutscene_Commands.cpp deleted file mode 100644 index 8ae4c69d7d..0000000000 --- a/tools/ZAPD/ZAPD/OtherStructs/Cutscene_Commands.cpp +++ /dev/null @@ -1,596 +0,0 @@ -#include "Cutscene_Commands.h" - -#include -#include - -#include "CutsceneMM_Commands.h" -#include "Globals.h" -#include "Utils/BitConverter.h" -#include "Utils/StringHelper.h" - -/* CutsceneSubCommandEntry */ - -CutsceneSubCommandEntry::CutsceneSubCommandEntry(const std::vector& rawData, - offset_t rawDataIndex) -{ - base = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0); - startFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 2); - endFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 4); - pad = BitConverter::ToUInt16BE(rawData, rawDataIndex + 6); -} - -std::string CutsceneSubCommandEntry::GetBodySourceCode() const -{ - return StringHelper::Sprintf("CMD_HH(0x%04X, 0x%04X), CMD_HH(0x%04X, 0x%04X)", base, startFrame, - endFrame, pad); -} - -size_t CutsceneSubCommandEntry::GetRawSize() const -{ - return 0x08; -} - -/* CutsceneCommand */ - -CutsceneCommand::CutsceneCommand(const std::vector& rawData, offset_t rawDataIndex) -{ - numEntries = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0); -} - -CutsceneCommand::~CutsceneCommand() -{ - for (auto& entry : entries) - { - delete entry; - } -} - -std::string CutsceneCommand::GetCommandMacro() const -{ - return StringHelper::Sprintf("CMD_W(0x%08X), CMD_W(0x%08X)", commandID, numEntries); -} - -std::string CutsceneCommand::GenerateSourceCode() const -{ - std::string result; - - result += GetCommandMacro(); - result += ",\n"; - - for (auto& entry : entries) - { - result += " "; - result += entry->GetBodySourceCode(); - result += ",\n"; - } - - return result; -} - -size_t CutsceneCommand::GetCommandSize() const -{ - size_t size = 0; - if (entries.size() > 0) - { - size = entries.at(0)->GetRawSize() * entries.size(); - } - else - { - size = 0x08 * numEntries; - } - return 0x08 + size; -} - -void CutsceneCommand::SetCommandID(uint32_t nCommandID) -{ - commandID = nCommandID; - - for (auto& entry : entries) - { - entry->commandID = commandID; - } -} - -// Specific for command lists where each entry has size 0x30 bytes -const std::unordered_map csCommandsDesc = { - {CutsceneCommands::Misc, - {"CS_MISC", "(0x%04X, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, - {CutsceneCommands::SetLighting, - {"CS_LIGHTING", "(0x%02X, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, - {CutsceneCommands::PlayBGM, {"CS_PLAY_BGM", "(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, - {CutsceneCommands::StopBGM, {"CS_STOP_BGM", "(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, - {CutsceneCommands::FadeBGM, {"CS_FADE_BGM", "(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, -}; - -CutsceneSubCommandEntry_GenericCmd::CutsceneSubCommandEntry_GenericCmd( - const std::vector& rawData, offset_t rawDataIndex, CutsceneCommands cmdId) - : CutsceneSubCommandEntry(rawData, rawDataIndex), commandId(cmdId) -{ - word0 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x0); - word1 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x4); - - unused1 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x8); - unused2 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0xC); - unused3 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x10); - unused4 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x14); - unused5 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x18); - unused6 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x1C); - unused7 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x20); - unused8 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x24); - unused9 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x28); - unused10 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x2C); -} - -std::string CutsceneSubCommandEntry_GenericCmd::GetBodySourceCode() const -{ - const auto& element = csCommandsDesc.find(commandId); - - if (element != csCommandsDesc.end()) - { - std::string entryFmt = element->second.cmdMacro; - entryFmt += element->second.args; - - return StringHelper::Sprintf(entryFmt.c_str(), base, startFrame, endFrame, pad, unused1, - unused2, unused3, unused4, unused5, unused6, unused7, unused8, - unused9, unused10); - } - - return StringHelper::Sprintf("CS_UNK_DATA(0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, " - "0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X)", - word0, word1, unused1, unused2, unused3, unused4, unused5, unused6, - unused7, unused8, unused9, unused10); -} - -size_t CutsceneSubCommandEntry_GenericCmd::GetRawSize() const -{ - return 0x30; -} - -CutsceneCommand_GenericCmd::CutsceneCommand_GenericCmd(const std::vector& rawData, - offset_t rawDataIndex, - CutsceneCommands cmdId) - : CutsceneCommand(rawData, rawDataIndex) -{ - rawDataIndex += 4; - - commandID = static_cast(cmdId); - entries.reserve(numEntries); - - for (size_t i = 0; i < numEntries; i++) - { - auto* entry = new CutsceneSubCommandEntry_GenericCmd(rawData, rawDataIndex, cmdId); - entries.push_back(entry); - rawDataIndex += entry->GetRawSize(); - } -} - -std::string CutsceneCommand_GenericCmd::GetCommandMacro() const -{ - const auto& element = csCommandsDesc.find(static_cast(commandID)); - - if (element != csCommandsDesc.end()) - { - return StringHelper::Sprintf("%s_LIST(%i)", element->second.cmdMacro, numEntries); - } - - return StringHelper::Sprintf("CS_UNK_DATA_LIST(0x%X, %i)", commandID, numEntries); -} - -CutsceneCameraPoint::CutsceneCameraPoint(const std::vector& rawData, offset_t rawDataIndex) - : CutsceneSubCommandEntry(rawData, rawDataIndex) -{ - continueFlag = BitConverter::ToInt8BE(rawData, rawDataIndex + 0); - cameraRoll = BitConverter::ToInt8BE(rawData, rawDataIndex + 1); - nextPointFrame = BitConverter::ToInt16BE(rawData, rawDataIndex + 2); - viewAngle = BitConverter::ToFloatBE(rawData, rawDataIndex + 4); - - posX = BitConverter::ToInt16BE(rawData, rawDataIndex + 8); - posY = BitConverter::ToInt16BE(rawData, rawDataIndex + 10); - posZ = BitConverter::ToInt16BE(rawData, rawDataIndex + 12); - - unused = BitConverter::ToInt16BE(rawData, rawDataIndex + 14); -} - -std::string CutsceneCameraPoint::GetBodySourceCode() const -{ - std::string result = ""; - - if (commandID == (int32_t)CutsceneCommands::SetCameraFocus) - { - result += "CS_CAM_FOCUS_POINT"; - } - else if (commandID == (int32_t)CutsceneCommands::SetCameraFocusLink) - { - result += "CS_CAM_FOCUS_POINT_PLAYER"; - } - else if (commandID == (int32_t)CutsceneCommands::SetCameraPosLink) - { - result += "CS_CAM_POS_PLAYER"; - } - else - { - result += "CS_CAM_POS"; - } - - std::string continueMacro = "CS_CMD_CONTINUE"; - if (continueFlag != 0) - continueMacro = "CS_CMD_STOP"; - - result += - StringHelper::Sprintf("(%s, 0x%02X, %i, %ff, %i, %i, %i, 0x%04X)", continueMacro.c_str(), - cameraRoll, nextPointFrame, viewAngle, posX, posY, posZ, unused); - return result; -} - -size_t CutsceneCameraPoint::GetRawSize() const -{ - return 0x10; -} - -CutsceneCommandSetCameraPos::CutsceneCommandSetCameraPos(const std::vector& rawData, - offset_t rawDataIndex) - : CutsceneCommand(rawData, rawDataIndex) -{ - base = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0); - startFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 2); - endFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 4); - unused = BitConverter::ToUInt16BE(rawData, rawDataIndex + 6); - - bool shouldContinue = true; - - uint32_t currentPtr = rawDataIndex + 8; - - while (shouldContinue) - { - CutsceneCameraPoint* camPoint = new CutsceneCameraPoint(rawData, currentPtr); - entries.push_back(camPoint); - - if (camPoint->continueFlag == -1) - shouldContinue = false; - - currentPtr += camPoint->GetRawSize(); - } -} - -std::string CutsceneCommandSetCameraPos::GetCommandMacro() const -{ - std::string result; - - std::string listStr; - - if (commandID == (int32_t)CutsceneCommands::SetCameraFocus) - { - listStr = "CS_CAM_FOCUS_POINT_LIST"; - } - else if (commandID == (int32_t)CutsceneCommands::SetCameraFocusLink) - { - listStr = "CS_CAM_FOCUS_POINT_PLAYER_LIST"; - } - else if (commandID == (int32_t)CutsceneCommands::SetCameraPosLink) - { - listStr = "CS_CAM_POS_PLAYER_LIST"; - } - else - { - listStr = "CS_CAM_POS_LIST"; - } - - result += StringHelper::Sprintf("%s(%i, %i)", listStr.c_str(), startFrame, endFrame); - - return result; -} - -size_t CutsceneCommandSetCameraPos::GetCommandSize() const -{ - return 0x0C + entries.at(0)->GetRawSize() * entries.size(); -} - -CutsceneSubCommandEntry_Rumble::CutsceneSubCommandEntry_Rumble(const std::vector& rawData, - offset_t rawDataIndex) - : CutsceneSubCommandEntry(rawData, rawDataIndex) -{ - unk_06 = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x06); - unk_07 = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x07); - unk_08 = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x08); - unk_09 = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x09); - unk_0A = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x0A); - unk_0B = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x0B); -} - -std::string CutsceneSubCommandEntry_Rumble::GetBodySourceCode() const -{ - if (Globals::Instance->game == ZGame::MM_RETAIL) - { - return StringHelper::Sprintf("CS_RUMBLE(%i, %i, %i, 0x%02X, 0x%02X, 0x%02X)", base, - startFrame, endFrame, unk_06, unk_07, unk_08); - } - - return StringHelper::Sprintf("CS_CMD_09(%i, %i, %i, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X)", - base, startFrame, endFrame, unk_06, unk_07, unk_08, unk_09, unk_0A, - unk_0B); -} - -size_t CutsceneSubCommandEntry_Rumble::GetRawSize() const -{ - return 0x0C; -} - -CutsceneCommand_Rumble::CutsceneCommand_Rumble(const std::vector& rawData, - offset_t rawDataIndex) - : CutsceneCommand(rawData, rawDataIndex) -{ - rawDataIndex += 4; - - entries.reserve(numEntries); - for (size_t i = 0; i < numEntries; i++) - { - auto* entry = new CutsceneSubCommandEntry_Rumble(rawData, rawDataIndex); - entries.push_back(entry); - rawDataIndex += entry->GetRawSize(); - } -} - -std::string CutsceneCommand_Rumble::GetCommandMacro() const -{ - if (Globals::Instance->game == ZGame::MM_RETAIL) - { - return StringHelper::Sprintf("CS_RUMBLE_LIST(%i)", numEntries); - } - return StringHelper::Sprintf("CS_CMD_09_LIST(%i)", numEntries); -} - -CutsceneSubCommandEntry_SetTime::CutsceneSubCommandEntry_SetTime( - const std::vector& rawData, offset_t rawDataIndex) - : CutsceneSubCommandEntry(rawData, rawDataIndex) -{ - hour = BitConverter::ToUInt8BE(rawData, rawDataIndex + 6); - minute = BitConverter::ToUInt8BE(rawData, rawDataIndex + 7); - unk_08 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 8); -} - -std::string CutsceneSubCommandEntry_SetTime::GetBodySourceCode() const -{ - return StringHelper::Sprintf("CS_TIME(%i, %i, %i, %i, %i, %i)", base, startFrame, endFrame, - hour, minute, unk_08); -} - -size_t CutsceneSubCommandEntry_SetTime::GetRawSize() const -{ - return 0x0C; -} - -CutsceneCommand_SetTime::CutsceneCommand_SetTime(const std::vector& rawData, - offset_t rawDataIndex) - : CutsceneCommand(rawData, rawDataIndex) -{ - rawDataIndex += 4; - - entries.reserve(numEntries); - for (size_t i = 0; i < numEntries; i++) - { - auto* entry = new CutsceneSubCommandEntry_SetTime(rawData, rawDataIndex); - entries.push_back(entry); - rawDataIndex += entry->GetRawSize(); - } -} - -std::string CutsceneCommand_SetTime::GetCommandMacro() const -{ - return StringHelper::Sprintf("CS_TIME_LIST(%i)", numEntries); -} - -CutsceneSubCommandEntry_TextBox::CutsceneSubCommandEntry_TextBox( - const std::vector& rawData, offset_t rawDataIndex) - : CutsceneSubCommandEntry(rawData, rawDataIndex) -{ - type = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x6); - textId1 = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x8); - textId2 = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0xA); -} - -std::string CutsceneSubCommandEntry_TextBox::GetBodySourceCode() const -{ - if (type == 0xFFFF) - { - return StringHelper::Sprintf("CS_TEXT_NONE(%i, %i)", startFrame, endFrame); - } - if (type == 2) - { - return StringHelper::Sprintf("CS_TEXT_LEARN_SONG(%i, %i, %i, 0x%X)", base, startFrame, - endFrame, textId1); - } - - if (Globals::Instance->game == ZGame::MM_RETAIL) - { - switch (type) - { - case 0: - return StringHelper::Sprintf("CS_TEXT_DEFAULT(0x%X, %i, %i, 0x%X, 0x%X)", base, - startFrame, endFrame, textId1, textId2); - - case 1: - return StringHelper::Sprintf("CS_TEXT_TYPE_1(0x%X, %i, %i, 0x%X, 0x%X)", base, - startFrame, endFrame, textId1, textId2); - - case 3: - return StringHelper::Sprintf("CS_TEXT_TYPE_3(0x%X, %i, %i, 0x%X, 0x%X)", base, - startFrame, endFrame, textId1, textId2); - - case 4: - return StringHelper::Sprintf("CS_TEXT_BOSSES_REMAINS(0x%X, %i, %i, 0x%X)", base, - startFrame, endFrame, textId1); - - case 5: - return StringHelper::Sprintf("CS_TEXT_ALL_NORMAL_MASKS(0x%X, %i, %i, 0x%X)", base, - startFrame, endFrame, textId1); - } - } - - return StringHelper::Sprintf("CS_TEXT_DISPLAY_TEXTBOX(0x%X, %i, %i, %i, 0x%X, 0x%X)", base, - startFrame, endFrame, type, textId1, textId2); -} - -size_t CutsceneSubCommandEntry_TextBox::GetRawSize() const -{ - return 0x0C; -} - -CutsceneCommand_TextBox::CutsceneCommand_TextBox(const std::vector& rawData, - offset_t rawDataIndex) - : CutsceneCommand(rawData, rawDataIndex) -{ - rawDataIndex += 4; - - entries.reserve(numEntries); - for (size_t i = 0; i < numEntries; i++) - { - auto* entry = new CutsceneSubCommandEntry_TextBox(rawData, rawDataIndex); - entries.push_back(entry); - rawDataIndex += entry->GetRawSize(); - } -} - -std::string CutsceneCommand_TextBox::GetCommandMacro() const -{ - return StringHelper::Sprintf("CS_TEXT_LIST(%i)", numEntries); -} - -CutsceneSubCommandEntry_ActorAction::CutsceneSubCommandEntry_ActorAction( - const std::vector& rawData, offset_t rawDataIndex) - : CutsceneSubCommandEntry(rawData, rawDataIndex) -{ - rotX = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x6); - rotY = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x8); - rotZ = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0xA); - startPosX = BitConverter::ToInt32BE(rawData, rawDataIndex + 0xC); - startPosY = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x10); - startPosZ = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x14); - endPosX = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x18); - endPosY = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x1C); - endPosZ = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x20); - normalX = BitConverter::ToFloatBE(rawData, rawDataIndex + 0x24); - normalY = BitConverter::ToFloatBE(rawData, rawDataIndex + 0x28); - normalZ = BitConverter::ToFloatBE(rawData, rawDataIndex + 0x2C); -} - -std::string CutsceneSubCommandEntry_ActorAction::GetBodySourceCode() const -{ - std::string result; - - if (Globals::Instance->game == ZGame::MM_RETAIL) - { - if (static_cast(commandID) == - CutsceneMMCommands::CS_CMD_SET_PLAYER_ACTION) - { - result = "CS_PLAYER_ACTION"; - } - else - { - result = "CS_ACTOR_ACTION"; - } - } - else - { - if (static_cast(commandID) == CutsceneCommands::SetPlayerAction) - { - result = "CS_PLAYER_ACTION"; - } - else - { - result = "CS_NPC_ACTION"; - } - } - - result += - StringHelper::Sprintf("(%i, %i, %i, 0x%04X, 0x%04X, 0x%04X, %i, %i, " - "%i, %i, %i, %i, %.11ef, %.11ef, %.11ef)", - base, startFrame, endFrame, rotX, rotY, rotZ, startPosX, startPosY, - startPosZ, endPosX, endPosY, endPosZ, normalX, normalY, normalZ); - return result; -} - -size_t CutsceneSubCommandEntry_ActorAction::GetRawSize() const -{ - return 0x30; -} - -CutsceneCommand_ActorAction::CutsceneCommand_ActorAction(const std::vector& rawData, - offset_t rawDataIndex) - : CutsceneCommand(rawData, rawDataIndex) -{ - rawDataIndex += 4; - - entries.reserve(numEntries); - for (size_t i = 0; i < numEntries; i++) - { - auto* entry = new CutsceneSubCommandEntry_ActorAction(rawData, rawDataIndex); - entries.push_back(entry); - rawDataIndex += entry->GetRawSize(); - } -} - -std::string CutsceneCommand_ActorAction::GetCommandMacro() const -{ - if (Globals::Instance->game == ZGame::MM_RETAIL) - { - if (static_cast(commandID) == - CutsceneMMCommands::CS_CMD_SET_PLAYER_ACTION) - { - return StringHelper::Sprintf("CS_PLAYER_ACTION_LIST(%i)", numEntries); - } - return StringHelper::Sprintf("CS_ACTOR_ACTION_LIST(0x%03X, %i)", commandID, numEntries); - } - - if (static_cast(commandID) == CutsceneCommands::SetPlayerAction) - { - return StringHelper::Sprintf("CS_PLAYER_ACTION_LIST(%i)", entries.size()); - } - return StringHelper::Sprintf("CS_NPC_ACTION_LIST(0x%03X, %i)", commandID, entries.size()); -} - -CutsceneCommand_Terminator::CutsceneCommand_Terminator(const std::vector& rawData, - offset_t rawDataIndex) - : CutsceneCommand(rawData, rawDataIndex) -{ - rawDataIndex += 4; - - base = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0); - startFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 2); - endFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 4); - unknown = BitConverter::ToUInt16BE(rawData, rawDataIndex + 6); // endFrame duplicate -} - -std::string CutsceneCommand_Terminator::GenerateSourceCode() const -{ - std::string result; - - result += StringHelper::Sprintf("CS_TERMINATOR(%i, %i, %i),\n", base, startFrame, endFrame); - - return result; -} - -size_t CutsceneCommand_Terminator::GetCommandSize() const -{ - return 0x10; -} - -CutsceneCommandSceneTransFX::CutsceneCommandSceneTransFX(const std::vector& rawData, - offset_t rawDataIndex) - : CutsceneCommand(rawData, rawDataIndex) -{ - rawDataIndex += 4; - - base = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0); - startFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 2); - endFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 4); -} - -std::string CutsceneCommandSceneTransFX::GenerateSourceCode() const -{ - return StringHelper::Sprintf("CS_SCENE_TRANS_FX(%i, %i, %i),\n", base, startFrame, endFrame); -} - -size_t CutsceneCommandSceneTransFX::GetCommandSize() const -{ - return 0x10; -} diff --git a/tools/ZAPD/ZAPD/OtherStructs/Cutscene_Commands.h b/tools/ZAPD/ZAPD/OtherStructs/Cutscene_Commands.h deleted file mode 100644 index c462735873..0000000000 --- a/tools/ZAPD/ZAPD/OtherStructs/Cutscene_Commands.h +++ /dev/null @@ -1,267 +0,0 @@ -#pragma once - -#include -#include -#include - -#include "Declaration.h" - -enum class CutsceneCommands -{ - SetCameraPos = 0x0001, - SetCameraFocus = 0x0002, - Misc = 0x0003, - SetLighting = 0x0004, - SetCameraPosLink = 0x0005, - SetCameraFocusLink = 0x0006, - Cmd07 = 0x0007, - Cmd08 = 0x0008, - Cmd09 = 0x0009, // Rumble - Textbox = 0x0013, - SetPlayerAction = 0x000A, - SetActorAction1 = 0x000F, - SetActorAction2 = 0x000E, - SetActorAction3 = 0x0019, - SetActorAction4 = 0x001D, - SetActorAction5 = 0x001E, - SetActorAction6 = 0x002C, - SetActorAction7 = 0x001F, - SetActorAction8 = 0x0031, - SetActorAction9 = 0x003E, - SetActorAction10 = 0x008F, - SetSceneTransFX = 0x002D, - PlayBGM = 0x0056, - StopBGM = 0x0057, - FadeBGM = 0x007C, - SetTime = 0x008C, - Terminator = 0x03E8, -}; - -typedef struct CsCommandListDescriptor -{ - const char* cmdMacro; - const char* args; -} CsCommandListDescriptor; - -class CutsceneSubCommandEntry -{ -public: - uint16_t base; - uint16_t startFrame; - uint16_t endFrame; - uint16_t pad; - - uint32_t commandID; - - CutsceneSubCommandEntry(const std::vector& rawData, offset_t rawDataIndex); - virtual ~CutsceneSubCommandEntry() = default; - - virtual std::string GetBodySourceCode() const; - - virtual size_t GetRawSize() const; -}; - -class CutsceneCommand -{ -public: - uint32_t commandID; - uint32_t commandIndex; - - uint32_t numEntries; - std::vector entries; - - CutsceneCommand(const std::vector& rawData, offset_t rawDataIndex); - virtual ~CutsceneCommand(); - - virtual std::string GetCommandMacro() const; - virtual std::string GenerateSourceCode() const; - virtual size_t GetCommandSize() const; - - virtual void SetCommandID(uint32_t nCommandID); -}; - -class CutsceneSubCommandEntry_GenericCmd : public CutsceneSubCommandEntry -{ -public: - CutsceneCommands commandId; - - uint32_t word0 = 0; - uint32_t word1 = 0; - - uint32_t unused1 = 0; - uint32_t unused2 = 0; - uint32_t unused3 = 0; - uint32_t unused4 = 0; - uint32_t unused5 = 0; - uint32_t unused6 = 0; - uint32_t unused7 = 0; - uint32_t unused8 = 0; - uint32_t unused9 = 0; - uint32_t unused10 = 0; - - CutsceneSubCommandEntry_GenericCmd(const std::vector& rawData, offset_t rawDataIndex, - CutsceneCommands cmdId); - - std::string GetBodySourceCode() const override; - - size_t GetRawSize() const override; -}; - -class CutsceneCommand_GenericCmd : public CutsceneCommand -{ -public: - CutsceneCommand_GenericCmd(const std::vector& rawData, offset_t rawDataIndex, - CutsceneCommands cmdId); - - std::string GetCommandMacro() const override; -}; - -class CutsceneCameraPoint : public CutsceneSubCommandEntry -{ -public: - int8_t continueFlag; - int8_t cameraRoll; - int16_t nextPointFrame; - float viewAngle; - int16_t posX, posY, posZ; - int16_t unused; - - CutsceneCameraPoint(const std::vector& rawData, offset_t rawDataIndex); - - std::string GetBodySourceCode() const override; - - size_t GetRawSize() const override; -}; - -class CutsceneCommandSetCameraPos : public CutsceneCommand -{ -public: - uint16_t base; - uint16_t startFrame; - uint16_t endFrame; - uint16_t unused; - - CutsceneCommandSetCameraPos(const std::vector& rawData, offset_t rawDataIndex); - - std::string GetCommandMacro() const override; - - size_t GetCommandSize() const override; -}; - -class CutsceneCommandSceneTransFX : public CutsceneCommand -{ -public: - uint16_t base; - uint16_t startFrame; - uint16_t endFrame; - - CutsceneCommandSceneTransFX(const std::vector& rawData, offset_t rawDataIndex); - - std::string GenerateSourceCode() const override; - size_t GetCommandSize() const override; -}; - -class CutsceneSubCommandEntry_Rumble : public CutsceneSubCommandEntry -{ -public: - uint8_t unk_06; - uint8_t unk_07; - uint8_t unk_08; - uint8_t unk_09; - uint8_t unk_0A; - uint8_t unk_0B; - - CutsceneSubCommandEntry_Rumble(const std::vector& rawData, offset_t rawDataIndex); - - std::string GetBodySourceCode() const override; - - size_t GetRawSize() const override; -}; - -class CutsceneCommand_Rumble : public CutsceneCommand -{ -public: - CutsceneCommand_Rumble(const std::vector& rawData, offset_t rawDataIndex); - - std::string GetCommandMacro() const override; -}; - -class CutsceneSubCommandEntry_SetTime : public CutsceneSubCommandEntry -{ -public: - uint8_t hour; - uint8_t minute; - uint32_t unk_08; - - CutsceneSubCommandEntry_SetTime(const std::vector& rawData, offset_t rawDataIndex); - - std::string GetBodySourceCode() const override; - - size_t GetRawSize() const override; -}; - -class CutsceneCommand_SetTime : public CutsceneCommand -{ -public: - CutsceneCommand_SetTime(const std::vector& rawData, offset_t rawDataIndex); - - std::string GetCommandMacro() const override; -}; - -class CutsceneSubCommandEntry_TextBox : public CutsceneSubCommandEntry -{ -public: - uint16_t type; - uint16_t textId1; - uint16_t textId2; - - CutsceneSubCommandEntry_TextBox(const std::vector& rawData, offset_t rawDataIndex); - - std::string GetBodySourceCode() const override; - - size_t GetRawSize() const override; -}; - -class CutsceneCommand_TextBox : public CutsceneCommand -{ -public: - CutsceneCommand_TextBox(const std::vector& rawData, offset_t rawDataIndex); - - std::string GetCommandMacro() const override; -}; - -class CutsceneSubCommandEntry_ActorAction : public CutsceneSubCommandEntry -{ -public: - uint16_t rotX, rotY, rotZ; - int32_t startPosX, startPosY, startPosZ; - int32_t endPosX, endPosY, endPosZ; - float normalX, normalY, normalZ; - - CutsceneSubCommandEntry_ActorAction(const std::vector& rawData, offset_t rawDataIndex); - std::string GetBodySourceCode() const override; - - size_t GetRawSize() const override; -}; - -class CutsceneCommand_ActorAction : public CutsceneCommand -{ -public: - CutsceneCommand_ActorAction(const std::vector& rawData, offset_t rawDataIndex); - - std::string GetCommandMacro() const override; -}; - -class CutsceneCommand_Terminator : public CutsceneCommand -{ -public: - uint16_t base; - uint16_t startFrame; - uint16_t endFrame; - uint16_t unknown; - - CutsceneCommand_Terminator(const std::vector& rawData, offset_t rawDataIndex); - - std::string GenerateSourceCode() const override; - size_t GetCommandSize() const override; -}; diff --git a/tools/ZAPD/ZAPD/OtherStructs/Cutscene_Common.cpp b/tools/ZAPD/ZAPD/OtherStructs/Cutscene_Common.cpp new file mode 100644 index 0000000000..a5ea609af8 --- /dev/null +++ b/tools/ZAPD/ZAPD/OtherStructs/Cutscene_Common.cpp @@ -0,0 +1,128 @@ +#include "Cutscene_Common.h" +#include "Utils/BitConverter.h" +#include "Utils/StringHelper.h" + +/* CutsceneSubCommandEntry */ + +CutsceneSubCommandEntry::CutsceneSubCommandEntry(const std::vector& rawData, + offset_t rawDataIndex) +{ + base = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0); + startFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 2); + endFrame = BitConverter::ToUInt16BE(rawData, rawDataIndex + 4); + pad = BitConverter::ToUInt16BE(rawData, rawDataIndex + 6); +} + +std::string CutsceneSubCommandEntry::GetBodySourceCode() const +{ + return StringHelper::Sprintf("CMD_HH(0x%04X, 0x%04X), CMD_HH(0x%04X, 0x%04X)", base, startFrame, + endFrame, pad); +} + +size_t CutsceneSubCommandEntry::GetRawSize() const +{ + return 0x08; +} + +/* CutsceneCommand */ + +CutsceneCommand::CutsceneCommand(const std::vector& rawData, offset_t rawDataIndex) +{ + numEntries = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0); +} + +CutsceneCommand::~CutsceneCommand() +{ + for (auto entry : entries) + { + delete entry; + } +} + +std::string CutsceneCommand::GetCommandMacro() const +{ + return StringHelper::Sprintf("CMD_W(0x%08X), CMD_W(0x%08X)", commandID, numEntries); +} + +std::string CutsceneCommand::GenerateSourceCode() const +{ + std::string result; + + result += GetCommandMacro(); + result += ",\n"; + + for (auto& entry : entries) + { + result += " "; + result += entry->GetBodySourceCode(); + result += ",\n"; + } + + return result; +} + +size_t CutsceneCommand::GetCommandSize() const +{ + size_t size = 0; + if (entries.size() > 0) + { + size = entries.at(0)->GetRawSize() * entries.size(); + } + else + { + size = 0x08 * numEntries; + } + return 0x08 + size; +} + +void CutsceneCommand::SetCommandID(uint32_t nCommandID) +{ + commandID = nCommandID; + + for (auto& entry : entries) + { + entry->commandID = commandID; + } +} + +/*** TIME ****/ + +CutsceneSubCommandEntry_SetTime::CutsceneSubCommandEntry_SetTime( + const std::vector& rawData, offset_t rawDataIndex) + : CutsceneSubCommandEntry(rawData, rawDataIndex) +{ + hour = BitConverter::ToUInt8BE(rawData, rawDataIndex + 6); + minute = BitConverter::ToUInt8BE(rawData, rawDataIndex + 7); +} + +std::string CutsceneSubCommandEntry_SetTime::GetBodySourceCode() const +{ + // Note: Both OoT and MM have the first argument unused + return StringHelper::Sprintf("CS_TIME(%i, %i, %i, %i, %i)", base, startFrame, endFrame, hour, + minute); +} + +size_t CutsceneSubCommandEntry_SetTime::GetRawSize() const +{ + return 0x0C; +} + +CutsceneCommand_Time::CutsceneCommand_Time(const std::vector& rawData, + offset_t rawDataIndex) + : CutsceneCommand(rawData, rawDataIndex) +{ + rawDataIndex += 4; + + entries.reserve(numEntries); + for (size_t i = 0; i < numEntries; i++) + { + auto* entry = new CutsceneSubCommandEntry_SetTime(rawData, rawDataIndex); + entries.push_back(entry); + rawDataIndex += entry->GetRawSize(); + } +} + +std::string CutsceneCommand_Time::GetCommandMacro() const +{ + return StringHelper::Sprintf("CS_TIME_LIST(%i)", numEntries); +} diff --git a/tools/ZAPD/ZAPD/OtherStructs/Cutscene_Common.h b/tools/ZAPD/ZAPD/OtherStructs/Cutscene_Common.h new file mode 100644 index 0000000000..9d8dcf63de --- /dev/null +++ b/tools/ZAPD/ZAPD/OtherStructs/Cutscene_Common.h @@ -0,0 +1,72 @@ +#pragma once + +#include +#include +#include +#include "Declaration.h" + +typedef struct CsCommandListDescriptor +{ + const char* cmdMacro; + const char* args; +} CsCommandListDescriptor; + +class CutsceneSubCommandEntry +{ +public: + uint16_t base; + uint16_t startFrame; + uint16_t endFrame; + uint16_t pad; + + uint32_t commandID; + + CutsceneSubCommandEntry(const std::vector& rawData, offset_t rawDataIndex); + virtual ~CutsceneSubCommandEntry() = default; + + virtual std::string GetBodySourceCode() const; + + virtual size_t GetRawSize() const; +}; + +class CutsceneCommand +{ +public: + uint32_t commandID; + uint32_t commandIndex; + + uint32_t numEntries; + std::vector entries; + + CutsceneCommand(const std::vector& rawData, offset_t rawDataIndex); + virtual ~CutsceneCommand(); + + virtual std::string GetCommandMacro() const; + virtual std::string GenerateSourceCode() const; + virtual size_t GetCommandSize() const; + + virtual void SetCommandID(uint32_t nCommandID); +}; + +/**** TIME ****/ + +class CutsceneSubCommandEntry_SetTime : public CutsceneSubCommandEntry +{ +public: + uint8_t hour; + uint8_t minute; + + CutsceneSubCommandEntry_SetTime(const std::vector& rawData, offset_t rawDataIndex); + + std::string GetBodySourceCode() const override; + + size_t GetRawSize() const override; +}; + +class CutsceneCommand_Time : public CutsceneCommand +{ +public: + CutsceneCommand_Time(const std::vector& rawData, offset_t rawDataIndex); + + std::string GetCommandMacro() const override; +}; diff --git a/tools/ZAPD/ZAPD/OtherStructs/SkinLimbStructs.cpp b/tools/ZAPD/ZAPD/OtherStructs/SkinLimbStructs.cpp index df8bd6d98b..e85bdefe76 100644 --- a/tools/ZAPD/ZAPD/OtherStructs/SkinLimbStructs.cpp +++ b/tools/ZAPD/ZAPD/OtherStructs/SkinLimbStructs.cpp @@ -6,149 +6,149 @@ #include "ZDisplayList.h" #include "ZFile.h" -/* Struct_800A57C0 */ +/* SkinVertex */ -Struct_800A57C0::Struct_800A57C0(ZFile* nParent) : ZResource(nParent) +SkinVertex::SkinVertex(ZFile* nParent) : ZResource(nParent) { } -void Struct_800A57C0::ParseRawData() +void SkinVertex::ParseRawData() { const auto& rawData = parent->GetRawData(); - unk_0 = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x00); - unk_2 = BitConverter::ToInt16BE(rawData, rawDataIndex + 0x02); - unk_4 = BitConverter::ToInt16BE(rawData, rawDataIndex + 0x04); - unk_6 = BitConverter::ToInt8BE(rawData, rawDataIndex + 0x06); - unk_7 = BitConverter::ToInt8BE(rawData, rawDataIndex + 0x07); - unk_8 = BitConverter::ToInt8BE(rawData, rawDataIndex + 0x08); - unk_9 = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x09); + index = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x00); + s = BitConverter::ToInt16BE(rawData, rawDataIndex + 0x02); + t = BitConverter::ToInt16BE(rawData, rawDataIndex + 0x04); + normX = BitConverter::ToInt8BE(rawData, rawDataIndex + 0x06); + normY = BitConverter::ToInt8BE(rawData, rawDataIndex + 0x07); + normZ = BitConverter::ToInt8BE(rawData, rawDataIndex + 0x08); + alpha = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x09); } -std::string Struct_800A57C0::GetBodySourceCode() const +std::string SkinVertex::GetBodySourceCode() const { - return StringHelper::Sprintf("0x%02X, %i, %i, %i, %i, %i, 0x%02X", unk_0, unk_2, unk_4, unk_6, - unk_7, unk_8, unk_9); + return StringHelper::Sprintf("0x%02X, %i, %i, %i, %i, %i, 0x%02X", index, s, t, normX, normY, + normZ, alpha); } -std::string Struct_800A57C0::GetSourceTypeName() const +std::string SkinVertex::GetSourceTypeName() const { - return "Struct_800A57C0"; + return "SkinVertex"; } -ZResourceType Struct_800A57C0::GetResourceType() const +ZResourceType SkinVertex::GetResourceType() const { // TODO return ZResourceType::Error; } -size_t Struct_800A57C0::GetRawDataSize() const +size_t SkinVertex::GetRawDataSize() const { return 0x0A; } -/* Struct_800A598C_2 */ +/* SkinTransformation */ -Struct_800A598C_2::Struct_800A598C_2(ZFile* nParent) : ZResource(nParent) +SkinTransformation::SkinTransformation(ZFile* nParent) : ZResource(nParent) { } -void Struct_800A598C_2::ParseRawData() +void SkinTransformation::ParseRawData() { const auto& rawData = parent->GetRawData(); - unk_0 = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x00); + limbIndex = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x00); x = BitConverter::ToInt16BE(rawData, rawDataIndex + 0x02); y = BitConverter::ToInt16BE(rawData, rawDataIndex + 0x04); z = BitConverter::ToInt16BE(rawData, rawDataIndex + 0x06); - unk_8 = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x08); + scale = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x08); } -std::string Struct_800A598C_2::GetBodySourceCode() const +std::string SkinTransformation::GetBodySourceCode() const { - return StringHelper::Sprintf("0x%02X, %i, %i, %i, 0x%02X", unk_0, x, y, z, unk_8); + return StringHelper::Sprintf("0x%02X, %i, %i, %i, 0x%02X", limbIndex, x, y, z, scale); } -std::string Struct_800A598C_2::GetSourceTypeName() const +std::string SkinTransformation::GetSourceTypeName() const { - return "Struct_800A598C_2"; + return "SkinTransformation"; } -ZResourceType Struct_800A598C_2::GetResourceType() const +ZResourceType SkinTransformation::GetResourceType() const { // TODO return ZResourceType::Error; } -size_t Struct_800A598C_2::GetRawDataSize() const +size_t SkinTransformation::GetRawDataSize() const { return 0x0A; } -/* Struct_800A598C */ +/* SkinLimbModif */ -Struct_800A598C::Struct_800A598C(ZFile* nParent) : ZResource(nParent) +SkinLimbModif::SkinLimbModif(ZFile* nParent) : ZResource(nParent) { } -void Struct_800A598C::ParseRawData() +void SkinLimbModif::ParseRawData() { const auto& rawData = parent->GetRawData(); - unk_0 = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x00); - unk_2 = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x02); + vtxCount = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x00); + transformCount = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x02); unk_4 = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x04); - unk_8 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x08); - unk_C = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x0C); + skinVertices = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x08); + limbTransformations = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x0C); - if (unk_8 != 0 && GETSEGNUM(unk_8) == parent->segment) + if (skinVertices != 0 && GETSEGNUM(skinVertices) == parent->segment) { - uint32_t unk_8_Offset = Seg2Filespace(unk_8, parent->baseAddress); + uint32_t unk_8_Offset = Seg2Filespace(skinVertices, parent->baseAddress); - unk_8_arr.reserve(unk_0); - for (size_t i = 0; i < unk_0; i++) + skinVertices_arr.reserve(vtxCount); + for (size_t i = 0; i < vtxCount; i++) { - Struct_800A57C0 unk8_data(parent); - unk8_data.ExtractFromFile(unk_8_Offset); - unk_8_arr.push_back(unk8_data); + SkinVertex skinVertices_data(parent); + skinVertices_data.ExtractFromFile(unk_8_Offset); + skinVertices_arr.push_back(skinVertices_data); - unk_8_Offset += unk8_data.GetRawDataSize(); + unk_8_Offset += skinVertices_data.GetRawDataSize(); } } - if (unk_C != 0 && GETSEGNUM(unk_8) == parent->segment) + if (limbTransformations != 0 && GETSEGNUM(skinVertices) == parent->segment) { - uint32_t unk_C_Offset = Seg2Filespace(unk_C, parent->baseAddress); + uint32_t unk_C_Offset = Seg2Filespace(limbTransformations, parent->baseAddress); - unk_C_arr.reserve(unk_2); - for (size_t i = 0; i < unk_2; i++) + limbTransformations_arr.reserve(transformCount); + for (size_t i = 0; i < transformCount; i++) { - Struct_800A598C_2 unkC_data(parent); - unkC_data.ExtractFromFile(unk_C_Offset); - unk_C_arr.push_back(unkC_data); + SkinTransformation limbTransformations_data(parent); + limbTransformations_data.ExtractFromFile(unk_C_Offset); + limbTransformations_arr.push_back(limbTransformations_data); - unk_C_Offset += unkC_data.GetRawDataSize(); + unk_C_Offset += limbTransformations_data.GetRawDataSize(); } } } -void Struct_800A598C::DeclareReferences(const std::string& prefix) +void SkinLimbModif::DeclareReferences(const std::string& prefix) { std::string varPrefix = prefix; if (name != "") varPrefix = name; - if (unk_8 != 0 && GETSEGNUM(unk_8) == parent->segment) + if (skinVertices != 0 && GETSEGNUM(skinVertices) == parent->segment) { - const auto& res = unk_8_arr.at(0); + const auto& res = skinVertices_arr.at(0); std::string unk_8_Str = res.GetDefaultName(varPrefix); - size_t arrayItemCnt = unk_8_arr.size(); + size_t arrayItemCnt = skinVertices_arr.size(); std::string entryStr = ""; for (size_t i = 0; i < arrayItemCnt; i++) { - auto& child = unk_8_arr[i]; + auto& child = skinVertices_arr[i]; child.DeclareReferences(varPrefix); entryStr += StringHelper::Sprintf("\t{ %s },", child.GetBodySourceCode().c_str()); @@ -156,29 +156,29 @@ void Struct_800A598C::DeclareReferences(const std::string& prefix) entryStr += "\n"; } - uint32_t unk_8_Offset = Seg2Filespace(unk_8, parent->baseAddress); - Declaration* decl = parent->GetDeclaration(unk_8_Offset); + uint32_t skinVertices_Offset = Seg2Filespace(skinVertices, parent->baseAddress); + Declaration* decl = parent->GetDeclaration(skinVertices_Offset); if (decl == nullptr) { - parent->AddDeclarationArray(unk_8_Offset, res.GetDeclarationAlignment(), + parent->AddDeclarationArray(skinVertices_Offset, res.GetDeclarationAlignment(), arrayItemCnt * res.GetRawDataSize(), res.GetSourceTypeName(), unk_8_Str, arrayItemCnt, entryStr); } else - decl->text = entryStr; + decl->declBody = entryStr; } - if (unk_C != 0 && GETSEGNUM(unk_C) == parent->segment) + if (limbTransformations != 0 && GETSEGNUM(limbTransformations) == parent->segment) { - const auto& res = unk_C_arr.at(0); + const auto& res = limbTransformations_arr.at(0); std::string unk_C_Str = res.GetDefaultName(varPrefix); - size_t arrayItemCnt = unk_C_arr.size(); + size_t arrayItemCnt = limbTransformations_arr.size(); std::string entryStr = ""; for (size_t i = 0; i < arrayItemCnt; i++) { - auto& child = unk_C_arr[i]; + auto& child = limbTransformations_arr[i]; child.DeclareReferences(varPrefix); entryStr += StringHelper::Sprintf("\t{ %s },", child.GetBodySourceCode().c_str()); @@ -186,7 +186,7 @@ void Struct_800A598C::DeclareReferences(const std::string& prefix) entryStr += "\n"; } - uint32_t unk_C_Offset = Seg2Filespace(unk_C, parent->baseAddress); + uint32_t unk_C_Offset = Seg2Filespace(limbTransformations, parent->baseAddress); Declaration* decl = parent->GetDeclaration(unk_C_Offset); if (decl == nullptr) { @@ -195,73 +195,74 @@ void Struct_800A598C::DeclareReferences(const std::string& prefix) res.GetSourceTypeName(), unk_C_Str, arrayItemCnt, entryStr); } else - decl->text = entryStr; + decl->declBody = entryStr; } } -std::string Struct_800A598C::GetBodySourceCode() const +std::string SkinLimbModif::GetBodySourceCode() const { - std::string unk_8_Str; + std::string skinVertices_Str; std::string unk_C_Str; - Globals::Instance->GetSegmentedPtrName(unk_8, parent, "Struct_800A57C0", unk_8_Str); - Globals::Instance->GetSegmentedPtrName(unk_C, parent, "Struct_800A598C_2", unk_C_Str); + Globals::Instance->GetSegmentedPtrName(skinVertices, parent, "SkinVertex", skinVertices_Str); + Globals::Instance->GetSegmentedPtrName(limbTransformations, parent, "SkinTransformation", + unk_C_Str); std::string entryStr = StringHelper::Sprintf("\n\t\tARRAY_COUNTU(%s), ARRAY_COUNTU(%s),\n", - unk_8_Str.c_str(), unk_C_Str.c_str()); - entryStr += - StringHelper::Sprintf("\t\t%i, %s, %s\n\t", unk_4, unk_8_Str.c_str(), unk_C_Str.c_str()); + skinVertices_Str.c_str(), unk_C_Str.c_str()); + entryStr += StringHelper::Sprintf("\t\t%i, %s, %s\n\t", unk_4, skinVertices_Str.c_str(), + unk_C_Str.c_str()); return entryStr; } -std::string Struct_800A598C::GetSourceTypeName() const +std::string SkinLimbModif::GetSourceTypeName() const { - return "Struct_800A598C"; + return "SkinLimbModif"; } -ZResourceType Struct_800A598C::GetResourceType() const +ZResourceType SkinLimbModif::GetResourceType() const { // TODO return ZResourceType::Error; } -size_t Struct_800A598C::GetRawDataSize() const +size_t SkinLimbModif::GetRawDataSize() const { return 0x10; } -/* Struct_800A5E28 */ +/* SkinAnimatedLimbData */ -Struct_800A5E28::Struct_800A5E28(ZFile* nParent) : ZResource(nParent) +SkinAnimatedLimbData::SkinAnimatedLimbData(ZFile* nParent) : ZResource(nParent) { } -void Struct_800A5E28::ParseRawData() +void SkinAnimatedLimbData::ParseRawData() { const auto& rawData = parent->GetRawData(); - unk_0 = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x00); - unk_2 = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x02); - unk_4 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x04); - unk_8 = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x08); + totalVtxCount = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x00); + limbModifCount = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x02); + limbModifications = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x04); + dlist = BitConverter::ToUInt32BE(rawData, rawDataIndex + 0x08); - if (unk_4 != 0 && GETSEGNUM(unk_4) == parent->segment) + if (limbModifications != 0 && GETSEGNUM(limbModifications) == parent->segment) { - uint32_t unk_4_Offset = Seg2Filespace(unk_4, parent->baseAddress); + uint32_t limbModifications_Offset = Seg2Filespace(limbModifications, parent->baseAddress); - unk_4_arr.reserve(unk_2); - for (size_t i = 0; i < unk_2; i++) + limbModifications_arr.reserve(limbModifCount); + for (size_t i = 0; i < limbModifCount; i++) { - Struct_800A598C unk_4_data(parent); - unk_4_data.ExtractFromFile(unk_4_Offset); - unk_4_arr.push_back(unk_4_data); + SkinLimbModif limbModifications_data(parent); + limbModifications_data.ExtractFromFile(limbModifications_Offset); + limbModifications_arr.push_back(limbModifications_data); - unk_4_Offset += unk_4_data.GetRawDataSize(); + limbModifications_Offset += limbModifications_data.GetRawDataSize(); } } } -void Struct_800A5E28::DeclareReferences(const std::string& prefix) +void SkinAnimatedLimbData::DeclareReferences(const std::string& prefix) { std::string varPrefix = prefix; if (name != "") @@ -269,17 +270,17 @@ void Struct_800A5E28::DeclareReferences(const std::string& prefix) ZResource::DeclareReferences(varPrefix); - if (unk_4 != SEGMENTED_NULL && GETSEGNUM(unk_4) == parent->segment) + if (limbModifications != SEGMENTED_NULL && GETSEGNUM(limbModifications) == parent->segment) { - const auto& res = unk_4_arr.at(0); - std::string unk_4_Str = res.GetDefaultName(varPrefix); + const auto& res = limbModifications_arr.at(0); + std::string limbModifications_Str = res.GetDefaultName(varPrefix); - size_t arrayItemCnt = unk_4_arr.size(); + size_t arrayItemCnt = limbModifications_arr.size(); std::string entryStr = ""; for (size_t i = 0; i < arrayItemCnt; i++) { - auto& child = unk_4_arr[i]; + auto& child = limbModifications_arr[i]; child.DeclareReferences(varPrefix); entryStr += StringHelper::Sprintf("\t{ %s },", child.GetBodySourceCode().c_str()); @@ -287,63 +288,67 @@ void Struct_800A5E28::DeclareReferences(const std::string& prefix) entryStr += "\n"; } - uint32_t unk_4_Offset = Seg2Filespace(unk_4, parent->baseAddress); - Declaration* decl = parent->GetDeclaration(unk_4_Offset); + uint32_t limbModifications_Offset = Seg2Filespace(limbModifications, parent->baseAddress); + Declaration* decl = parent->GetDeclaration(limbModifications_Offset); if (decl == nullptr) { - parent->AddDeclarationArray(unk_4_Offset, res.GetDeclarationAlignment(), + parent->AddDeclarationArray(limbModifications_Offset, res.GetDeclarationAlignment(), arrayItemCnt * res.GetRawDataSize(), - res.GetSourceTypeName(), unk_4_Str, arrayItemCnt, entryStr); + res.GetSourceTypeName(), limbModifications_Str, + arrayItemCnt, entryStr); } else - decl->text = entryStr; + decl->declBody = entryStr; } - if (unk_8 != SEGMENTED_NULL && GETSEGNUM(unk_8) == parent->segment) + if (dlist != SEGMENTED_NULL && GETSEGNUM(dlist) == parent->segment) { - uint32_t unk_8_Offset = Seg2Filespace(unk_8, parent->baseAddress); + uint32_t dlist_Offset = Seg2Filespace(dlist, parent->baseAddress); int32_t dlistLength = ZDisplayList::GetDListLength( - parent->GetRawData(), unk_8_Offset, + parent->GetRawData(), dlist_Offset, Globals::Instance->game == ZGame::OOT_SW97 ? DListType::F3DEX : DListType::F3DZEX); - ZDisplayList* unk_8_dlist = new ZDisplayList(parent); - unk_8_dlist->ExtractFromBinary(unk_8_Offset, dlistLength); + ZDisplayList* dlist_data = new ZDisplayList(parent); + dlist_data->ExtractFromBinary(dlist_Offset, dlistLength); std::string dListStr = - StringHelper::Sprintf("%sSkinLimbDL_%06X", varPrefix.c_str(), unk_8_Offset); - unk_8_dlist->SetName(dListStr); - unk_8_dlist->DeclareVar(varPrefix, ""); - unk_8_dlist->DeclareReferences(varPrefix); - parent->AddResource(unk_8_dlist); + StringHelper::Sprintf("%sSkinLimbDL_%06X", varPrefix.c_str(), dlist_Offset); + dlist_data->SetName(dListStr); + dlist_data->DeclareVar(varPrefix, ""); + dlist_data->DeclareReferences(varPrefix); + parent->AddResource(dlist_data); } } -std::string Struct_800A5E28::GetBodySourceCode() const +std::string SkinAnimatedLimbData::GetBodySourceCode() const { - std::string unk_4_Str; - std::string unk_8_Str; - Globals::Instance->GetSegmentedPtrName(unk_4, parent, "Struct_800A598C", unk_4_Str); - Globals::Instance->GetSegmentedPtrName(unk_8, parent, "Gfx", unk_8_Str); + std::string limbModifications_Str; + std::string dlist_Str; + Globals::Instance->GetSegmentedPtrName(limbModifications, parent, "SkinLimbModif", + limbModifications_Str); + Globals::Instance->GetSegmentedPtrName(dlist, parent, "Gfx", dlist_Str); std::string entryStr = "\n"; - entryStr += StringHelper::Sprintf("\t%i, ARRAY_COUNTU(%s),\n", unk_0, unk_4_Str.c_str()); - entryStr += StringHelper::Sprintf("\t%s, %s\n", unk_4_Str.c_str(), unk_8_Str.c_str()); + entryStr += StringHelper::Sprintf("\t%i, ARRAY_COUNTU(%s),\n", totalVtxCount, + limbModifications_Str.c_str()); + entryStr += + StringHelper::Sprintf("\t%s, %s\n", limbModifications_Str.c_str(), dlist_Str.c_str()); return entryStr; } -std::string Struct_800A5E28::GetSourceTypeName() const +std::string SkinAnimatedLimbData::GetSourceTypeName() const { - return "Struct_800A5E28"; + return "SkinAnimatedLimbData"; } -ZResourceType Struct_800A5E28::GetResourceType() const +ZResourceType SkinAnimatedLimbData::GetResourceType() const { // TODO return ZResourceType::Error; } -size_t Struct_800A5E28::GetRawDataSize() const +size_t SkinAnimatedLimbData::GetRawDataSize() const { return 0x0C; } diff --git a/tools/ZAPD/ZAPD/OtherStructs/SkinLimbStructs.h b/tools/ZAPD/ZAPD/OtherStructs/SkinLimbStructs.h index 33edd07cae..5181bc5d85 100644 --- a/tools/ZAPD/ZAPD/OtherStructs/SkinLimbStructs.h +++ b/tools/ZAPD/ZAPD/OtherStructs/SkinLimbStructs.h @@ -6,19 +6,17 @@ #include "ZResource.h" -// TODO: check if more types exists enum class ZLimbSkinType { - SkinType_0, // Segment = 0 - SkinType_4 = 4, // Segment = segmented address // Struct_800A5E28 - SkinType_5 = 5, // Segment = 0 - SkinType_DList = 11, // Segment = DList address + SkinType_Null, // SkinLimb segment = NULL + SkinType_Animated = 4, // SkinLimb segment = SkinAnimatedLimbData* + SkinType_Normal = 11, // SkinLimb segment = Gfx* }; -class Struct_800A57C0 : public ZResource +class SkinVertex : public ZResource { public: - Struct_800A57C0(ZFile* nParent); + SkinVertex(ZFile* nParent); void ParseRawData() override; @@ -30,19 +28,19 @@ public: size_t GetRawDataSize() const override; protected: - uint16_t unk_0; - int16_t unk_2; - int16_t unk_4; - int8_t unk_6; - int8_t unk_7; - int8_t unk_8; - uint8_t unk_9; + uint16_t index; + int16_t s; + int16_t t; + int8_t normX; + int8_t normY; + int8_t normZ; + uint8_t alpha; }; -class Struct_800A598C_2 : public ZResource +class SkinTransformation : public ZResource { public: - Struct_800A598C_2(ZFile* nParent); + SkinTransformation(ZFile* nParent); void ParseRawData() override; @@ -54,17 +52,17 @@ public: size_t GetRawDataSize() const override; protected: - uint8_t unk_0; + uint8_t limbIndex; int16_t x; int16_t y; int16_t z; - uint8_t unk_8; + uint8_t scale; }; -class Struct_800A598C : public ZResource +class SkinLimbModif : public ZResource { public: - Struct_800A598C(ZFile* nParent); + SkinLimbModif(ZFile* nParent); void ParseRawData() override; void DeclareReferences(const std::string& prefix) override; @@ -77,20 +75,20 @@ public: size_t GetRawDataSize() const override; protected: - uint16_t unk_0; // Length of unk_8 - uint16_t unk_2; // Length of unk_C - uint16_t unk_4; // 0 or 1 // Used as an index for unk_C - segptr_t unk_8; // Struct_800A57C0* - segptr_t unk_C; // Struct_800A598C_2* + uint16_t vtxCount; // Number of vertices in this modif entry + uint16_t transformCount; // Length of limbTransformations + uint16_t unk_4; // 0 or 1, used as an index for limbTransformations + segptr_t skinVertices; // SkinVertex* + segptr_t limbTransformations; // SkinTransformation* - std::vector unk_8_arr; - std::vector unk_C_arr; + std::vector skinVertices_arr; + std::vector limbTransformations_arr; }; -class Struct_800A5E28 : public ZResource +class SkinAnimatedLimbData : public ZResource { public: - Struct_800A5E28(ZFile* nParent); + SkinAnimatedLimbData(ZFile* nParent); void ParseRawData() override; void DeclareReferences(const std::string& prefix) override; @@ -103,11 +101,11 @@ public: size_t GetRawDataSize() const override; protected: - uint16_t unk_0; // Vtx count - uint16_t unk_2; // Length of unk_4 - segptr_t unk_4; // Struct_800A598C* - segptr_t unk_8; // Gfx* + uint16_t totalVtxCount; + uint16_t limbModifCount; // Length of limbModifications + segptr_t limbModifications; // SkinLimbModif* + segptr_t dlist; // Gfx* - std::vector unk_4_arr; + std::vector limbModifications_arr; // ZDisplayList* unk_8_dlist = nullptr; }; diff --git a/tools/ZAPD/ZAPD/OutputFormatter.h b/tools/ZAPD/ZAPD/OutputFormatter.h index 28955b1cd1..ec56b654da 100644 --- a/tools/ZAPD/ZAPD/OutputFormatter.h +++ b/tools/ZAPD/ZAPD/OutputFormatter.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include diff --git a/tools/ZAPD/ZAPD/WarningHandler.cpp b/tools/ZAPD/ZAPD/WarningHandler.cpp index 163b028b54..f416a5b80c 100644 --- a/tools/ZAPD/ZAPD/WarningHandler.cpp +++ b/tools/ZAPD/ZAPD/WarningHandler.cpp @@ -84,26 +84,27 @@ typedef struct */ // clang-format off static const std::unordered_map warningStringToInitMap = { - {"deprecated", {WarningType::Deprecated, + {"deprecated", {WarningType::Deprecated, #ifdef DEPRECATION_ON WarningLevel::Warn, #else WarningLevel::Off, #endif "Deprecated features"}}, - {"unaccounted", {WarningType::Unaccounted, WarningLevel::Off, "Large blocks of unaccounted"}}, - {"missing-offsets", {WarningType::MissingOffsets, WarningLevel::Warn, "Offset attribute missing in XML tag"}}, - {"intersection", {WarningType::Intersection, WarningLevel::Warn, "Two assets intersect"}}, - {"missing-attribute", {WarningType::MissingAttribute, WarningLevel::Warn, "Required attribute missing in XML tag"}}, - {"invalid-attribute-value", {WarningType::InvalidAttributeValue, WarningLevel::Err, "Attribute declared in XML is wrong"}}, - {"unknown-attribute", {WarningType::UnknownAttribute, WarningLevel::Warn, "Unknown attribute in XML entry tag"}}, - {"invalid-xml", {WarningType::InvalidXML, WarningLevel::Err, "XML has syntax errors"}}, - {"invalid-jpeg", {WarningType::InvalidJPEG, WarningLevel::Err, "JPEG file does not conform to the game's format requirements"}}, - {"invalid-png", {WarningType::InvalidPNG, WarningLevel::Err, "Issues arising when processing PNG data"}}, - {"invalid-extracted-data", {WarningType::InvalidExtractedData, WarningLevel::Err, "Extracted data does not have correct form"}}, - {"missing-segment", {WarningType::MissingSegment, WarningLevel::Warn, "Segment not given in File tag in XML"}}, - {"hardcoded-pointer", {WarningType::HardcodedPointer, WarningLevel::Warn, "ZAPD lacks the info to make a symbol, so must output a hardcoded pointer"}}, - {"not-implemented", {WarningType::NotImplemented, WarningLevel::Warn, "ZAPD does not currently support this feature"}}, + {"unaccounted", {WarningType::Unaccounted, WarningLevel::Off, "Large blocks of unaccounted"}}, + {"missing-offsets", {WarningType::MissingOffsets, WarningLevel::Warn, "Offset attribute missing in XML tag"}}, + {"intersection", {WarningType::Intersection, WarningLevel::Warn, "Two assets intersect"}}, + {"missing-attribute", {WarningType::MissingAttribute, WarningLevel::Warn, "Required attribute missing in XML tag"}}, + {"invalid-attribute-value", {WarningType::InvalidAttributeValue, WarningLevel::Err, "Attribute declared in XML is wrong"}}, + {"unknown-attribute", {WarningType::UnknownAttribute, WarningLevel::Warn, "Unknown attribute in XML entry tag"}}, + {"invalid-xml", {WarningType::InvalidXML, WarningLevel::Err, "XML has syntax errors"}}, + {"invalid-jpeg", {WarningType::InvalidJPEG, WarningLevel::Err, "JPEG file does not conform to the game's format requirements"}}, + {"invalid-png", {WarningType::InvalidPNG, WarningLevel::Err, "Issues arising when processing PNG data"}}, + {"invalid-extracted-data", {WarningType::InvalidExtractedData, WarningLevel::Err, "Extracted data does not have correct form"}}, + {"missing-segment", {WarningType::MissingSegment, WarningLevel::Warn, "Segment not given in File tag in XML"}}, + {"hardcoded-generic-pointer", {WarningType::HardcodedGenericPointer, WarningLevel::Off, "A generic segmented pointer must be produced"}}, + {"hardcoded-pointer", {WarningType::HardcodedPointer, WarningLevel::Warn, "ZAPD lacks the info to make a symbol, so must output a hardcoded pointer"}}, + {"not-implemented", {WarningType::NotImplemented, WarningLevel::Warn, "ZAPD does not currently support this feature"}}, }; /** @@ -229,7 +230,10 @@ void WarningHandler::ExtractedFilePreamble(const ZFile *parent, const ZResource* if (res != nullptr) { fprintf(stderr, "resource '%s' at ", res->GetName().c_str()); } - fprintf(stderr, "offset 0x%06X: \n\t", offset); + if (offset != static_cast(-1)) { + fprintf(stderr, "offset 0x%06X:", offset); + } + fprintf(stderr, "\n\t"); } /** diff --git a/tools/ZAPD/ZAPD/WarningHandler.h b/tools/ZAPD/ZAPD/WarningHandler.h index bb0360a813..f99330042b 100644 --- a/tools/ZAPD/ZAPD/WarningHandler.h +++ b/tools/ZAPD/ZAPD/WarningHandler.h @@ -81,6 +81,7 @@ enum class WarningType InvalidExtractedData, MissingSegment, HardcodedPointer, + HardcodedGenericPointer, NotImplemented, Max, }; diff --git a/tools/ZAPD/ZAPD/ZAPD.vcxproj b/tools/ZAPD/ZAPD/ZAPD.vcxproj index 505e411005..77d0bd16eb 100644 --- a/tools/ZAPD/ZAPD/ZAPD.vcxproj +++ b/tools/ZAPD/ZAPD/ZAPD.vcxproj @@ -249,6 +249,7 @@ mkdir build\ZAPD + @@ -272,6 +273,7 @@ mkdir build\ZAPD + @@ -339,6 +341,7 @@ mkdir build\ZAPD + diff --git a/tools/ZAPD/ZAPD/ZAPD.vcxproj.filters b/tools/ZAPD/ZAPD/ZAPD.vcxproj.filters index ce89882fed..eac471961c 100644 --- a/tools/ZAPD/ZAPD/ZAPD.vcxproj.filters +++ b/tools/ZAPD/ZAPD/ZAPD.vcxproj.filters @@ -1,4 +1,4 @@ - + @@ -291,6 +291,12 @@ Source Files\Z64 + + Source Files\Z64 + + + Source Files\Z64 + @@ -554,6 +560,15 @@ Header Files\Z64 + + Header Files + + + Header Files + + + Header Files + diff --git a/tools/ZAPD/ZAPD/ZAnimation.cpp b/tools/ZAPD/ZAPD/ZAnimation.cpp index 74b520b501..959fff8291 100644 --- a/tools/ZAPD/ZAPD/ZAnimation.cpp +++ b/tools/ZAPD/ZAPD/ZAnimation.cpp @@ -153,7 +153,10 @@ size_t ZLinkAnimation::GetRawDataSize() const std::string ZLinkAnimation::GetSourceTypeName() const { - return "LinkAnimationHeader"; + if (Globals::Instance->game == ZGame::MM_RETAIL) + return "PlayerAnimationHeader"; + else + return "LinkAnimationHeader"; } void ZLinkAnimation::ParseRawData() @@ -174,8 +177,8 @@ std::string ZLinkAnimation::GetBodySourceCode() const /* ZCurveAnimation */ -TransformData::TransformData(ZFile* parent, const std::vector& rawData, - uint32_t fileOffset) +CurveInterpKnot::CurveInterpKnot(ZFile* parent, const std::vector& rawData, + uint32_t fileOffset) : parent(parent) { unk_00 = BitConverter::ToUInt16BE(rawData, fileOffset + 0); @@ -185,26 +188,26 @@ TransformData::TransformData(ZFile* parent, const std::vector& rawData, unk_08 = BitConverter::ToFloatBE(rawData, fileOffset + 8); } -TransformData::TransformData(ZFile* parent, const std::vector& rawData, - uint32_t fileOffset, size_t index) - : TransformData(parent, rawData, fileOffset + index * GetRawDataSize()) +CurveInterpKnot::CurveInterpKnot(ZFile* parent, const std::vector& rawData, + uint32_t fileOffset, size_t index) + : CurveInterpKnot(parent, rawData, fileOffset + index * GetRawDataSize()) { } -std::string TransformData::GetBody([[maybe_unused]] const std::string& prefix) const +std::string CurveInterpKnot::GetBody([[maybe_unused]] const std::string& prefix) const { return StringHelper::Sprintf("0x%04X, 0x%04X, %i, %i, %ff", unk_00, unk_02, unk_04, unk_06, unk_08); } -size_t TransformData::GetRawDataSize() const +size_t CurveInterpKnot::GetRawDataSize() const { return 0x0C; } -std::string TransformData::GetSourceTypeName() +std::string CurveInterpKnot::GetSourceTypeName() { - return "TransformData"; + return "CurveInterpKnot"; } ZCurveAnimation::ZCurveAnimation(ZFile* nParent) : ZAnimation(nParent) @@ -300,7 +303,7 @@ void ZCurveAnimation::DeclareReferences(const std::string& prefix) } else { - decl->text = entryStr; + decl->declBody = entryStr; } } @@ -331,7 +334,7 @@ void ZCurveAnimation::DeclareReferences(const std::string& prefix) } else { - decl->text = entryStr; + decl->declBody = entryStr; } } @@ -359,7 +362,7 @@ void ZCurveAnimation::DeclareReferences(const std::string& prefix) } else { - decl->text = entryStr; + decl->declBody = entryStr; } } } @@ -369,7 +372,7 @@ std::string ZCurveAnimation::GetBodySourceCode() const std::string refIndexStr; Globals::Instance->GetSegmentedPtrName(refIndex, parent, "u8", refIndexStr); std::string transformDataStr; - Globals::Instance->GetSegmentedPtrName(transformData, parent, "TransformData", + Globals::Instance->GetSegmentedPtrName(transformData, parent, "CurveInterpKnot", transformDataStr); std::string copyValuesStr; Globals::Instance->GetSegmentedPtrName(copyValues, parent, "s16", copyValuesStr); @@ -390,7 +393,7 @@ DeclarationAlignment ZCurveAnimation::GetDeclarationAlignment() const std::string ZCurveAnimation::GetSourceTypeName() const { - return "TransformUpdateIndex"; + return "CurveAnimationHeader"; } /* ZLegacyAnimation */ @@ -423,7 +426,7 @@ void ZLegacyAnimation::ParseRawData() ptr = jointKeyOffset; for (int32_t i = 0; i < limbCount + 1; i++) { - JointKey key(parent); + LegacyJointKey key(parent); key.ExtractFromFile(ptr); jointKeyArray.push_back(key); @@ -495,7 +498,7 @@ std::string ZLegacyAnimation::GetBodySourceCode() const std::string frameDataName; std::string jointKeyName; Globals::Instance->GetSegmentedPtrName(frameData, parent, "s16", frameDataName); - Globals::Instance->GetSegmentedPtrName(jointKey, parent, "JointKey", jointKeyName); + Globals::Instance->GetSegmentedPtrName(jointKey, parent, "LegacyJointKey", jointKeyName); body += StringHelper::Sprintf("\t%i, %i,\n", frameCount, limbCount); body += StringHelper::Sprintf("\t%s,\n", frameDataName.c_str()); @@ -514,11 +517,11 @@ size_t ZLegacyAnimation::GetRawDataSize() const return 0x0C; } -JointKey::JointKey(ZFile* nParent) : ZResource(nParent) +LegacyJointKey::LegacyJointKey(ZFile* nParent) : ZResource(nParent) { } -void JointKey::ParseRawData() +void LegacyJointKey::ParseRawData() { ZResource::ParseRawData(); @@ -531,23 +534,23 @@ void JointKey::ParseRawData() z = BitConverter::ToInt16BE(rawData, rawDataIndex + 0x0A); } -std::string JointKey::GetBodySourceCode() const +std::string LegacyJointKey::GetBodySourceCode() const { return StringHelper::Sprintf("%6i, %6i, %6i, %6i, %6i, %6i", xMax, x, yMax, y, zMax, z); } -std::string JointKey::GetSourceTypeName() const +std::string LegacyJointKey::GetSourceTypeName() const { - return "JointKey"; + return "LegacyJointKey"; } -ZResourceType JointKey::GetResourceType() const +ZResourceType LegacyJointKey::GetResourceType() const { // TODO return ZResourceType::Error; } -size_t JointKey::GetRawDataSize() const +size_t LegacyJointKey::GetRawDataSize() const { return 0x0C; } diff --git a/tools/ZAPD/ZAPD/ZAnimation.h b/tools/ZAPD/ZAPD/ZAnimation.h index 2c04b4ff81..643842b891 100644 --- a/tools/ZAPD/ZAPD/ZAnimation.h +++ b/tools/ZAPD/ZAPD/ZAnimation.h @@ -67,7 +67,7 @@ public: void ParseRawData() override; }; -class TransformData +class CurveInterpKnot { protected: ZFile* parent; @@ -84,10 +84,10 @@ protected: float unk_08; public: - TransformData() = default; - TransformData(ZFile* parent, const std::vector& rawData, uint32_t fileOffset); - TransformData(ZFile* parent, const std::vector& rawData, uint32_t fileOffset, - size_t index); + CurveInterpKnot() = default; + CurveInterpKnot(ZFile* parent, const std::vector& rawData, uint32_t fileOffset); + CurveInterpKnot(ZFile* parent, const std::vector& rawData, uint32_t fileOffset, + size_t index); [[nodiscard]] std::string GetBody(const std::string& prefix) const; @@ -102,7 +102,7 @@ protected: ///* 0x0000 */ u8* refIndex; segptr_t refIndex = 0; - ///* 0x0004 */ TransformData* transformData; + ///* 0x0004 */ CurveInterpKnot* transformData; segptr_t transformData = 0; ///* 0x0008 */ s16* copyValues; segptr_t copyValues = 0; @@ -114,7 +114,7 @@ protected: uint8_t limbCount = 0; std::vector refIndexArr; - std::vector transformDataArr; + std::vector transformDataArr; std::vector copyValuesArr; public: @@ -132,14 +132,14 @@ public: std::string GetSourceTypeName() const override; }; -// TransformUpdateIndex +// CurveAnimationHeader /* ZLegacyAnimation */ -class JointKey : public ZResource +class LegacyJointKey : public ZResource { public: - JointKey(ZFile* nParent); + LegacyJointKey(ZFile* nParent); void ParseRawData() override; std::string GetBodySourceCode() const override; @@ -172,8 +172,8 @@ public: protected: int16_t limbCount; segptr_t frameData; // s16* - segptr_t jointKey; // JointKey* + segptr_t jointKey; // LegacyJointKey* std::vector frameDataArray; - std::vector jointKeyArray; + std::vector jointKeyArray; }; diff --git a/tools/ZAPD/ZAPD/ZArray.cpp b/tools/ZAPD/ZAPD/ZArray.cpp index 0a9797ba09..62720bc610 100644 --- a/tools/ZAPD/ZAPD/ZArray.cpp +++ b/tools/ZAPD/ZAPD/ZArray.cpp @@ -56,7 +56,7 @@ void ZArray::ParseXML(tinyxml2::XMLElement* reader) } res->parent = parent; res->SetInnerNode(true); - res->ExtractFromXML(child, childIndex); + res->ExtractWithXML(child, childIndex); childIndex += res->GetRawDataSize(); resList.push_back(res); @@ -75,11 +75,11 @@ Declaration* ZArray::DeclareVar(const std::string& prefix, const std::string& bo if (res->IsExternalResource()) { auto filepath = Globals::Instance->outputPath / name; - std::string includePath = StringHelper::Sprintf("%s.%s.inc", filepath.c_str(), + std::string includePath = StringHelper::Sprintf("%s.%s.inc", filepath.string().c_str(), res->GetExternalExtension().c_str()); decl = parent->AddDeclarationIncludeArray(rawDataIndex, includePath, GetRawDataSize(), GetSourceTypeName(), name, arrayCnt); - decl->text = bodyStr; + decl->declBody = bodyStr; decl->isExternal = true; } else @@ -109,6 +109,7 @@ std::string ZArray::GetBodySourceCode() const case ZResourceType::Vertex: case ZResourceType::CollisionPoly: case ZResourceType::SurfaceType: + case ZResourceType::Waterbox: output += resList.at(i)->GetBodySourceCode(); break; diff --git a/tools/ZAPD/ZAPD/ZBackground.cpp b/tools/ZAPD/ZAPD/ZBackground.cpp index 0ed1eb7471..fc725637e7 100644 --- a/tools/ZAPD/ZAPD/ZBackground.cpp +++ b/tools/ZAPD/ZAPD/ZBackground.cpp @@ -132,8 +132,13 @@ Declaration* ZBackground::DeclareVar(const std::string& prefix, Declaration* decl = parent->AddDeclarationIncludeArray(rawDataIndex, incStr, GetRawDataSize(), GetSourceTypeName(), auxName, 0); - decl->arrayItemCntStr = "SCREEN_WIDTH * SCREEN_HEIGHT / 4"; - decl->forceArrayCnt = true; + + if (Globals::Instance->cfg.useScreenWidthHeightConstants) + { + decl->arrayItemCntStr = "SCREEN_WIDTH * SCREEN_HEIGHT / 4"; + decl->forceArrayCnt = true; + } + decl->staticConf = staticConf; return decl; } diff --git a/tools/ZAPD/ZAPD/ZCollision.cpp b/tools/ZAPD/ZAPD/ZCollision.cpp index 5bd3d93a69..d177e036cb 100644 --- a/tools/ZAPD/ZAPD/ZCollision.cpp +++ b/tools/ZAPD/ZAPD/ZCollision.cpp @@ -1,4 +1,5 @@ #include "ZCollision.h" +#include "ZWaterbox.h" #include #include @@ -50,6 +51,7 @@ void ZCollisionHeader::ParseRawData() vertices.reserve(numVerts); polygons.reserve(numPolygons); + waterBoxes.reserve(numWaterBoxes); offset_t currentPtr = vtxSegmentOffset; @@ -97,38 +99,55 @@ void ZCollisionHeader::ParseRawData() // usually ordered. If for some reason the data was in some other funny // order, this would probably break. // The most common ordering is: - // - *CamData* + // - *BgCamInfo* // - SurfaceType // - CollisionPoly // - Vertices // - WaterBoxes // - CollisionHeader offset_t upperCameraBoundary = polyTypeDefSegmentOffset; - if (upperCameraBoundary == 0) + if (upperCameraBoundary == SEGMENTED_NULL) { upperCameraBoundary = polySegmentOffset; } - if (upperCameraBoundary == 0) + if (upperCameraBoundary == SEGMENTED_NULL) { upperCameraBoundary = vtxSegmentOffset; } - if (upperCameraBoundary == 0) + if (upperCameraBoundary == SEGMENTED_NULL) { upperCameraBoundary = waterBoxSegmentOffset; } - if (upperCameraBoundary == 0) + if (upperCameraBoundary == SEGMENTED_NULL) { upperCameraBoundary = rawDataIndex; } + // Sharp Ocarina places the CamDataEntries above the list so we need to calculate the number + // of cameras differently. + if (upperCameraBoundary < camDataSegmentOffset) + { + offset_t offset = camDataSegmentOffset; + while (rawData[offset] == 0x00 && rawData[offset + 0x4] == 0x02) + { + offset += 0x08; + } + upperCameraBoundary = offset; + } + camData = new CameraDataList(parent, name, rawData, camDataSegmentOffset, upperCameraBoundary); } - for (uint16_t i = 0; i < numWaterBoxes; i++) - waterBoxes.push_back(WaterBoxHeader( - rawData, - waterBoxSegmentOffset + (i * (Globals::Instance->game == ZGame::OOT_SW97 ? 12 : 16)))); + for (int32_t i = 0; i < numWaterBoxes; i++) + { + ZWaterbox waterbox(parent); + + waterbox.SetRawDataIndex(waterBoxSegmentOffset + + (i * (Globals::Instance->game == ZGame::OOT_SW97 ? 12 : 16))); + waterbox.ParseRawData(); + waterBoxes.emplace_back(waterbox); + } } void ZCollisionHeader::DeclareReferences(const std::string& prefix) @@ -149,9 +168,11 @@ void ZCollisionHeader::DeclareReferences(const std::string& prefix) declaration += "\n"; } - parent->AddDeclarationArray( - waterBoxSegmentOffset, DeclarationAlignment::Align4, 16 * waterBoxes.size(), "WaterBox", - StringHelper::Sprintf("%sWaterBoxes", auxName.c_str()), waterBoxes.size(), declaration); + parent->AddDeclarationArray(waterBoxSegmentOffset, DeclarationAlignment::Align4, + waterBoxes[0].GetRawDataSize() * waterBoxes.size(), + waterBoxes[0].GetSourceTypeName().c_str(), + StringHelper::Sprintf("%sWaterBoxes", auxName.c_str()), + waterBoxes.size(), declaration); } if (polygons.size() > 0) @@ -219,23 +240,38 @@ std::string ZCollisionHeader::GetBodySourceCode() const std::string vtxName; Globals::Instance->GetSegmentedPtrName(vtxAddress, parent, "Vec3s", vtxName); - declaration += StringHelper::Sprintf("\t%i, %s,\n", numVerts, vtxName.c_str()); + + if (numVerts > 0) + declaration += + StringHelper::Sprintf("\tARRAY_COUNT(%s), %s,\n", vtxName.c_str(), vtxName.c_str()); + else + declaration += StringHelper::Sprintf("\t%i, %s,\n", numVerts, vtxName.c_str()); std::string polyName; Globals::Instance->GetSegmentedPtrName(polyAddress, parent, "CollisionPoly", polyName); - declaration += StringHelper::Sprintf("\t%i, %s,\n", numPolygons, polyName.c_str()); + + if (numPolygons > 0) + declaration += + StringHelper::Sprintf("\tARRAY_COUNT(%s), %s,\n", polyName.c_str(), polyName.c_str()); + else + declaration += StringHelper::Sprintf("\t%i, %s,\n", numPolygons, polyName.c_str()); std::string surfaceName; Globals::Instance->GetSegmentedPtrName(polyTypeDefAddress, parent, "SurfaceType", surfaceName); declaration += StringHelper::Sprintf("\t%s,\n", surfaceName.c_str()); std::string camName; - Globals::Instance->GetSegmentedPtrName(camDataAddress, parent, "CamData", camName); + Globals::Instance->GetSegmentedPtrName(camDataAddress, parent, "BgCamInfo", camName); declaration += StringHelper::Sprintf("\t%s,\n", camName.c_str()); std::string waterBoxName; Globals::Instance->GetSegmentedPtrName(waterBoxAddress, parent, "WaterBox", waterBoxName); - declaration += StringHelper::Sprintf("\t%i, %s\n", numWaterBoxes, waterBoxName.c_str()); + + if (numWaterBoxes > 0) + declaration += StringHelper::Sprintf("\tARRAY_COUNT(%s), %s\n", waterBoxName.c_str(), + waterBoxName.c_str()); + else + declaration += StringHelper::Sprintf("\t%i, %s\n", numWaterBoxes, waterBoxName.c_str()); return declaration; } @@ -260,26 +296,6 @@ size_t ZCollisionHeader::GetRawDataSize() const return 44; } -WaterBoxHeader::WaterBoxHeader(const std::vector& rawData, uint32_t rawDataIndex) -{ - xMin = BitConverter::ToInt16BE(rawData, rawDataIndex + 0); - ySurface = BitConverter::ToInt16BE(rawData, rawDataIndex + 2); - zMin = BitConverter::ToInt16BE(rawData, rawDataIndex + 4); - xLength = BitConverter::ToInt16BE(rawData, rawDataIndex + 6); - zLength = BitConverter::ToInt16BE(rawData, rawDataIndex + 8); - - if (Globals::Instance->game == ZGame::OOT_SW97) - properties = BitConverter::ToInt16BE(rawData, rawDataIndex + 10); - else - properties = BitConverter::ToInt32BE(rawData, rawDataIndex + 12); -} - -std::string WaterBoxHeader::GetBodySourceCode() const -{ - return StringHelper::Sprintf("%i, %i, %i, %i, %i, 0x%08X", xMin, ySurface, zMin, xLength, - zLength, properties); -} - CameraDataList::CameraDataList(ZFile* parent, const std::string& prefix, const std::vector& rawData, offset_t rawDataIndex, offset_t upperCameraBoundary) @@ -291,73 +307,93 @@ CameraDataList::CameraDataList(ZFile* parent, const std::string& prefix, assert(numElements < 10000); offset_t cameraPosDataSeg = rawDataIndex; + uint32_t numDataTotal; + uint32_t cameraPosDataSegEnd = rawDataIndex; + bool isSharpOcarina = false; + for (size_t i = 0; i < numElements; i++) { - CameraDataEntry* entry = new CameraDataEntry(); + CameraDataEntry entry; - entry->cameraSType = + entry.cameraSType = BitConverter::ToInt16BE(rawData, rawDataIndex + (entries.size() * 8) + 0); - entry->numData = BitConverter::ToInt16BE(rawData, rawDataIndex + (entries.size() * 8) + 2); - entry->cameraPosDataSeg = + entry.numData = BitConverter::ToInt16BE(rawData, rawDataIndex + (entries.size() * 8) + 2); + entry.cameraPosDataSeg = BitConverter::ToInt32BE(rawData, rawDataIndex + (entries.size() * 8) + 4); - if (entry->cameraPosDataSeg != 0 && GETSEGNUM(entry->cameraPosDataSeg) != SEGMENT_SCENE) + if (entry.cameraPosDataSeg != 0 && GETSEGNUM(entry.cameraPosDataSeg) != SEGMENT_SCENE) { cameraPosDataSeg = rawDataIndex + (entries.size() * 8); break; } - if (entry->cameraPosDataSeg != 0 && cameraPosDataSeg > (entry->cameraPosDataSeg & 0xFFFFFF)) - cameraPosDataSeg = (entry->cameraPosDataSeg & 0xFFFFFF); + if (rawDataIndex > GETSEGOFFSET(entry.cameraPosDataSeg)) + { + if (entry.cameraPosDataSeg != 0 && + cameraPosDataSeg > GETSEGOFFSET(entry.cameraPosDataSeg)) + cameraPosDataSeg = GETSEGOFFSET(entry.cameraPosDataSeg); + } + else + { + // Sharp Ocarina will place the cam data after the list as opposed to the original maps + // which have it before. + isSharpOcarina = true; + cameraPosDataSeg = rawDataIndex + (numElements * 0x8); + if (cameraPosDataSegEnd < GETSEGOFFSET(entry.cameraPosDataSeg)) + cameraPosDataSegEnd = GETSEGOFFSET(entry.cameraPosDataSeg); + } - entries.push_back(entry); + entries.emplace_back(entry); } // Setting cameraPosDataAddr to rawDataIndex give a pos list length of 0 - uint32_t cameraPosDataOffset = cameraPosDataSeg & 0xFFFFFF; + uint32_t cameraPosDataOffset = GETSEGOFFSET(cameraPosDataSeg); for (size_t i = 0; i < entries.size(); i++) { char camSegLine[2048]; - if (entries[i]->cameraPosDataSeg != 0) + if (entries[i].cameraPosDataSeg != 0) { - int32_t index = - ((entries[i]->cameraPosDataSeg & 0x00FFFFFF) - cameraPosDataOffset) / 0x6; - sprintf(camSegLine, "&%sCamPosData[%i]", prefix.c_str(), index); + uint32_t index = + (GETSEGOFFSET(entries[i].cameraPosDataSeg) - cameraPosDataOffset) / 0x6; + snprintf(camSegLine, 2048, "&%sCamPosData[%i]", prefix.c_str(), index); } else - sprintf(camSegLine, "NULL"); + snprintf(camSegLine, 2048, "NULL"); declaration += - StringHelper::Sprintf(" { 0x%04X, %i, %s },", entries[i]->cameraSType, - entries[i]->numData, camSegLine, rawDataIndex + (i * 8)); + StringHelper::Sprintf(" { 0x%04X, %i, %s },", entries[i].cameraSType, + entries[i].numData, camSegLine, rawDataIndex + (i * 8)); if (i < entries.size() - 1) declaration += "\n"; } parent->AddDeclarationArray( - rawDataIndex, DeclarationAlignment::Align4, entries.size() * 8, "CamData", + rawDataIndex, DeclarationAlignment::Align4, entries.size() * 8, "BgCamInfo", StringHelper::Sprintf("%sCamDataList", prefix.c_str(), rawDataIndex), entries.size(), declaration); - uint32_t numDataTotal = (rawDataIndex - cameraPosDataOffset) / 0x6; + if (!isSharpOcarina) + numDataTotal = (rawDataIndex - cameraPosDataOffset) / 0x6; + else + numDataTotal = ((cameraPosDataSegEnd - cameraPosDataSeg) + 18) / 0x6; if (numDataTotal > 0) { declaration.clear(); + cameraPositionData.reserve(numDataTotal); for (uint32_t i = 0; i < numDataTotal; i++) { - CameraPositionData* data = - new CameraPositionData(rawData, cameraPosDataOffset + (i * 6)); - cameraPositionData.push_back(data); + CameraPositionData data = CameraPositionData(rawData, cameraPosDataOffset + (i * 6)); - declaration += StringHelper::Sprintf("\t{ %6i, %6i, %6i },", data->x, data->y, data->z); + declaration += StringHelper::Sprintf("\t{ %6i, %6i, %6i },", data.x, data.y, data.z); + cameraPositionData.emplace_back(data); if (i + 1 < numDataTotal) declaration += "\n"; } - int32_t cameraPosDataIndex = GETSEGOFFSET(cameraPosDataSeg); + uint32_t cameraPosDataIndex = GETSEGOFFSET(cameraPosDataSeg); uint32_t entrySize = numDataTotal * 0x6; parent->AddDeclarationArray(cameraPosDataIndex, DeclarationAlignment::Align4, entrySize, "Vec3s", StringHelper::Sprintf("%sCamPosData", prefix.c_str()), @@ -367,11 +403,6 @@ CameraDataList::CameraDataList(ZFile* parent, const std::string& prefix, CameraDataList::~CameraDataList() { - for (auto entry : entries) - delete entry; - - for (auto camPosData : cameraPositionData) - delete camPosData; } CameraPositionData::CameraPositionData(const std::vector& rawData, uint32_t rawDataIndex) diff --git a/tools/ZAPD/ZAPD/ZCollision.h b/tools/ZAPD/ZAPD/ZCollision.h index 35c632144c..8c73d2eaa1 100644 --- a/tools/ZAPD/ZAPD/ZCollision.h +++ b/tools/ZAPD/ZAPD/ZCollision.h @@ -6,23 +6,7 @@ #include "ZRoom/ZRoom.h" #include "ZSurfaceType.h" #include "ZVector.h" - -class WaterBoxHeader -{ -public: - WaterBoxHeader(const std::vector& rawData, uint32_t rawDataIndex); - - std::string GetBodySourceCode() const; - -protected: - int16_t xMin; - int16_t ySurface; - int16_t zMin; - int16_t xLength; - int16_t zLength; - int16_t pad; - int32_t properties; -}; +#include "ZWaterbox.h" class CameraPositionData { @@ -37,14 +21,14 @@ class CameraDataEntry public: int16_t cameraSType; int16_t numData; - int32_t cameraPosDataSeg; + offset_t cameraPosDataSeg; }; class CameraDataList { public: - std::vector entries; - std::vector cameraPositionData; + std::vector entries; + std::vector cameraPositionData; CameraDataList(ZFile* parent, const std::string& prefix, const std::vector& rawData, offset_t rawDataIndex, offset_t upperCameraBoundary); @@ -72,7 +56,7 @@ public: std::vector vertices; std::vector polygons; std::vector polygonTypes; - std::vector waterBoxes; + std::vector waterBoxes; CameraDataList* camData = nullptr; ZCollisionHeader(ZFile* nParent); diff --git a/tools/ZAPD/ZAPD/ZCutscene.cpp b/tools/ZAPD/ZAPD/ZCutscene.cpp index a3bfe0e07d..ea723b2953 100644 --- a/tools/ZAPD/ZAPD/ZCutscene.cpp +++ b/tools/ZAPD/ZAPD/ZCutscene.cpp @@ -3,7 +3,6 @@ #include #include "Globals.h" -#include "OtherStructs/CutsceneMM_Commands.h" #include "Utils/BitConverter.h" #include "Utils/StringHelper.h" #include "WarningHandler.h" @@ -129,174 +128,147 @@ void ZCutscene::ParseRawData() CutsceneCommand* ZCutscene::GetCommandOoT(uint32_t id, offset_t currentPtr) const { - CutsceneCommands cmdID = static_cast(id); + CutsceneOoT_CommandType cmdID = static_cast(id); const auto& rawData = parent->GetRawData(); - switch (id) - { - case 10: // CutsceneCommands::SetPlayerAction - case 15: // CutsceneCommands::SetActorAction1 - case 17: - case 18: - case 23: - case 34: - case 39: - case 46: - case 76: - case 85: - case 93: - case 105: - case 107: - case 110: - case 119: - case 123: - case 138: - case 139: - case 144: - case 14: // CutsceneCommands::SetActorAction2 - case 16: - case 24: - case 35: - case 40: - case 48: - case 64: - case 68: - case 70: - case 78: - case 80: - case 94: - case 116: - case 118: - case 120: - case 125: - case 131: - case 141: - case 25: // CutsceneCommands::SetActorAction3 - case 36: - case 41: - case 50: - case 67: - case 69: - case 72: - case 81: - case 106: - case 117: - case 121: - case 126: - case 132: - case 29: // CutsceneCommands::SetActorAction4 - case 37: - case 42: - case 51: - case 53: - case 63: - case 65: - case 66: - case 75: - case 82: - case 108: - case 127: - case 133: - case 30: // CutsceneCommands::SetActorAction5 - case 38: - case 43: - case 47: - case 54: - case 79: - case 83: - case 128: - case 135: - case 44: // CutsceneCommands::SetActorAction6 - case 55: - case 77: - case 84: - case 90: - case 129: - case 136: - case 31: // CutsceneCommands::SetActorAction7 - case 52: - case 57: - case 58: - case 88: - case 115: - case 130: - case 137: - case 49: // CutsceneCommands::SetActorAction8 - case 60: - case 89: - case 111: - case 114: - case 134: - case 142: - case 62: // CutsceneCommands::SetActorAction9 - case 143: // CutsceneCommands::SetActorAction10 - return new CutsceneCommand_ActorAction(rawData, currentPtr); - - case 0x0B: - case 0x0D: - case 0x1A: - case 0x1B: - case 0x1C: - case 0x20: - case 0x21: - case 0x3B: - case 0x3D: - case 0x47: - case 0x49: - case 0x6D: - case 0x15: - case 0x16: - case 0x70: - case 0x71: - case 0x4A: - return new CutsceneCommand_GenericCmd(rawData, currentPtr, cmdID); - } - switch (cmdID) { - case CutsceneCommands::Misc: - case CutsceneCommands::SetLighting: - case CutsceneCommands::PlayBGM: - case CutsceneCommands::StopBGM: - case CutsceneCommands::FadeBGM: - return new CutsceneCommand_GenericCmd(rawData, currentPtr, cmdID); + case CutsceneOoT_CommandType::CS_CMD_PLAYER_CUE: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_0: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_0: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_1: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_1: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_2: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_3: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_2: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_2_0: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_3_0: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_4_0: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_6_0: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_4: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_3: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_2_1: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_3_1: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_4_1: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_5: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_4: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_2_2: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_3_2: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_4_2: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_5_0: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_6: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_4_3: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_5: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_7_0: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_2_3: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_3_3: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_6_1: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_3_4: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_4_4: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_5_1: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_6_2: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_6_3: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_7_1: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_8_0: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_3_5: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_6: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_3_6: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_3_7: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_2_4: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_7: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_2_5: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_8: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_2_6: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_2_7: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_3_8: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_7: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_5_2: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_9: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_4_5: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_10: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_2_8: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_3_9: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_4_6: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_5_3: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_8: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_6_4: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_7_2: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_5_4: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_9: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_11: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_10: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_2_9: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_11: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_3_10: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_12: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_7_3: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_7_4: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_6_5: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_12: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_2_10: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_13: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_13: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_14: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_2_11: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_14: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_15: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_2_12: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_3_11: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_4_7: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_5_5: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_6_6: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_16: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_2_13: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_3_12: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_7_5: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_4_8: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_5_6: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_6_7: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_15: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_16: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_1_17: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_7_6: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_9_0: + case CutsceneOoT_CommandType::CS_CMD_ACTOR_CUE_0_17: + return new CutsceneOoTCommand_ActorCue(rawData, currentPtr); - case CutsceneCommands::SetCameraPos: - case CutsceneCommands::SetCameraFocus: - case CutsceneCommands::SetCameraPosLink: - case CutsceneCommands::SetCameraFocusLink: - return new CutsceneCommandSetCameraPos(rawData, currentPtr); + case CutsceneOoT_CommandType::CS_CMD_MISC: + case CutsceneOoT_CommandType::CS_CMD_LIGHT_SETTING: + case CutsceneOoT_CommandType::CS_CMD_START_SEQ: + case CutsceneOoT_CommandType::CS_CMD_STOP_SEQ: + case CutsceneOoT_CommandType::CS_CMD_FADE_OUT_SEQ: + return new CutsceneOoTCommand_GenericCmd(rawData, currentPtr, cmdID); - case CutsceneCommands::Cmd07: - break; - case CutsceneCommands::Cmd08: - break; - case CutsceneCommands::Cmd09: - return new CutsceneCommand_Rumble(rawData, currentPtr); - case CutsceneCommands::Textbox: - return new CutsceneCommand_TextBox(rawData, currentPtr); + case CutsceneOoT_CommandType::CS_CMD_CAM_EYE_SPLINE: + case CutsceneOoT_CommandType::CS_CMD_CAM_AT_SPLINE: + case CutsceneOoT_CommandType::CS_CMD_CAM_EYE_SPLINE_REL_TO_PLAYER: + case CutsceneOoT_CommandType::CS_CMD_CAM_AT_SPLINE_REL_TO_PLAYER: + return new CutsceneOoTCommand_GenericCameraCmd(rawData, currentPtr); - case CutsceneCommands::SetPlayerAction: - case CutsceneCommands::SetActorAction1: - case CutsceneCommands::SetActorAction2: - case CutsceneCommands::SetActorAction3: - case CutsceneCommands::SetActorAction4: - case CutsceneCommands::SetActorAction5: - case CutsceneCommands::SetActorAction6: - case CutsceneCommands::SetActorAction7: - case CutsceneCommands::SetActorAction8: - case CutsceneCommands::SetActorAction9: - case CutsceneCommands::SetActorAction10: + case CutsceneOoT_CommandType::CS_CMD_RUMBLE_CONTROLLER: + return new CutsceneOoTCommand_Rumble(rawData, currentPtr); + + case CutsceneOoT_CommandType::CS_CMD_TEXT: + return new CutsceneOoTCommand_Text(rawData, currentPtr); + + case CutsceneOoT_CommandType::CS_CMD_TRANSITION: + return new CutsceneOoTCommand_Transition(rawData, currentPtr); + + case CutsceneOoT_CommandType::CS_CMD_TIME: + return new CutsceneCommand_Time(rawData, currentPtr); + + case CutsceneOoT_CommandType::CS_CMD_DESTINATION: + return new CutsceneOoTCommand_Destination(rawData, currentPtr); + + case CutsceneOoT_CommandType::CS_CMD_CAM_EYE: + case CutsceneOoT_CommandType::CS_CMD_CAM_AT: break; - case CutsceneCommands::SetSceneTransFX: - return new CutsceneCommandSceneTransFX(rawData, currentPtr); - - case CutsceneCommands::SetTime: - return new CutsceneCommand_SetTime(rawData, currentPtr); - case CutsceneCommands::Terminator: - return new CutsceneCommand_Terminator(rawData, currentPtr); + default: + std::string errorHeader = + StringHelper::Sprintf("Warning: Invalid cutscene command ID: '0x%04X'", cmdID); + return new CutsceneOoTCommand_GenericCmd(rawData, currentPtr, cmdID); } return nullptr; @@ -304,60 +276,74 @@ CutsceneCommand* ZCutscene::GetCommandOoT(uint32_t id, offset_t currentPtr) cons CutsceneCommand* ZCutscene::GetCommandMM(uint32_t id, offset_t currentPtr) const { - CutsceneMMCommands cmdID = static_cast(id); + CutsceneMM_CommandType cmdID = static_cast(id); const auto& rawData = parent->GetRawData(); - if (((id >= 100) && (id < 150)) || (id == 201) || ((id >= 450) && (id < 600))) + if (((id >= (uint32_t)CutsceneMM_CommandType::CS_CMD_ACTOR_CUE_100) && + (id <= (uint32_t)CutsceneMM_CommandType::CS_CMD_ACTOR_CUE_149)) || + (id == (uint32_t)CutsceneMM_CommandType::CS_CMD_ACTOR_CUE_201) || + ((id >= (uint32_t)CutsceneMM_CommandType::CS_CMD_ACTOR_CUE_450) && + (id <= (uint32_t)CutsceneMM_CommandType::CS_CMD_ACTOR_CUE_599))) { - return new CutsceneCommand_ActorAction(rawData, currentPtr); + return new CutsceneMMCommand_ActorCue(rawData, currentPtr); } switch (cmdID) { - case CutsceneMMCommands::CS_CMD_MISC: - case CutsceneMMCommands::CS_CMD_SET_LIGHTING: - case CutsceneMMCommands::CS_CMD_SCENE_TRANS_FX: - case CutsceneMMCommands::CS_CMD_MOTIONBLUR: - case CutsceneMMCommands::CS_CMD_GIVETATL: - case CutsceneMMCommands::CS_CMD_PLAYSEQ: - case CutsceneMMCommands::CS_CMD_130: - case CutsceneMMCommands::CS_CMD_131: - case CutsceneMMCommands::CS_CMD_132: - case CutsceneMMCommands::CS_CMD_STOPSEQ: - case CutsceneMMCommands::CS_CMD_PLAYAMBIENCE: - case CutsceneMMCommands::CS_CMD_FADEAMBIENCE: - case CutsceneMMCommands::CS_CMD_TERMINATOR: - case CutsceneMMCommands::CS_CMD_CHOOSE_CREDITS_SCENES: + case CutsceneMM_CommandType::CS_CMD_MISC: + case CutsceneMM_CommandType::CS_CMD_LIGHT_SETTING: + case CutsceneMM_CommandType::CS_CMD_TRANSITION: + case CutsceneMM_CommandType::CS_CMD_MOTION_BLUR: + case CutsceneMM_CommandType::CS_CMD_GIVE_TATL: + case CutsceneMM_CommandType::CS_CMD_START_SEQ: + case CutsceneMM_CommandType::CS_CMD_SFX_REVERB_INDEX_2: + case CutsceneMM_CommandType::CS_CMD_SFX_REVERB_INDEX_1: + case CutsceneMM_CommandType::CS_CMD_MODIFY_SEQ: + case CutsceneMM_CommandType::CS_CMD_STOP_SEQ: + case CutsceneMM_CommandType::CS_CMD_START_AMBIENCE: + case CutsceneMM_CommandType::CS_CMD_FADE_OUT_AMBIENCE: + case CutsceneMM_CommandType::CS_CMD_DESTINATION: + case CutsceneMM_CommandType::CS_CMD_CHOOSE_CREDITS_SCENES: - case CutsceneMMCommands::CS_CMD_UNK_FA: - case CutsceneMMCommands::CS_CMD_UNK_FE: - case CutsceneMMCommands::CS_CMD_UNK_FF: - case CutsceneMMCommands::CS_CMD_UNK_100: - case CutsceneMMCommands::CS_CMD_UNK_101: - case CutsceneMMCommands::CS_CMD_UNK_102: - case CutsceneMMCommands::CS_CMD_UNK_103: - case CutsceneMMCommands::CS_CMD_UNK_104: - case CutsceneMMCommands::CS_CMD_UNK_105: - case CutsceneMMCommands::CS_CMD_UNK_108: - case CutsceneMMCommands::CS_CMD_UNK_109: - case CutsceneMMCommands::CS_CMD_UNK_12D: + case CutsceneMM_CommandType::CS_CMD_UNK_DATA_FA: + case CutsceneMM_CommandType::CS_CMD_UNK_DATA_FE: + case CutsceneMM_CommandType::CS_CMD_UNK_DATA_FF: + case CutsceneMM_CommandType::CS_CMD_UNK_DATA_100: + case CutsceneMM_CommandType::CS_CMD_UNK_DATA_101: + case CutsceneMM_CommandType::CS_CMD_UNK_DATA_102: + case CutsceneMM_CommandType::CS_CMD_UNK_DATA_103: + case CutsceneMM_CommandType::CS_CMD_UNK_DATA_104: + case CutsceneMM_CommandType::CS_CMD_UNK_DATA_105: + case CutsceneMM_CommandType::CS_CMD_UNK_DATA_108: + case CutsceneMM_CommandType::CS_CMD_UNK_DATA_109: return new CutsceneMMCommand_GenericCmd(rawData, currentPtr, cmdID); - case CutsceneMMCommands::CS_CMD_TEXTBOX: - return new CutsceneCommand_TextBox(rawData, currentPtr); - case CutsceneMMCommands::CS_CMD_CAMERA: + case CutsceneMM_CommandType::CS_CMD_TEXT: + return new CutsceneMMCommand_Text(rawData, currentPtr); + + case CutsceneMM_CommandType::CS_CMD_CAMERA_SPLINE: return new CutsceneMMCommand_Camera(rawData, currentPtr); - case CutsceneMMCommands::CS_CMD_FADESCREEN: - return new CutsceneMMCommand_FadeScreen(rawData, currentPtr); - case CutsceneMMCommands::CS_CMD_FADESEQ: - return new CutsceneMMCommand_FadeSeq(rawData, currentPtr); - case CutsceneMMCommands::CS_CMD_SETTIME: - return new CutsceneCommand_SetTime(rawData, currentPtr); - case CutsceneMMCommands::CS_CMD_SET_PLAYER_ACTION: - return new CutsceneCommand_ActorAction(rawData, currentPtr); - case CutsceneMMCommands::CS_CMD_RUMBLE: - return new CutsceneCommand_Rumble(rawData, currentPtr); + + case CutsceneMM_CommandType::CS_CMD_TRANSITION_GENERAL: + return new CutsceneMMCommand_TransitionGeneral(rawData, currentPtr); + + case CutsceneMM_CommandType::CS_CMD_FADE_OUT_SEQ: + return new CutsceneMMCommand_FadeOutSeq(rawData, currentPtr); + + case CutsceneMM_CommandType::CS_CMD_TIME: + return new CutsceneCommand_Time(rawData, currentPtr); + + case CutsceneMM_CommandType::CS_CMD_PLAYER_CUE: + return new CutsceneMMCommand_ActorCue(rawData, currentPtr); + + case CutsceneMM_CommandType::CS_CMD_RUMBLE: + return new CutsceneMMCommand_Rumble(rawData, currentPtr); + + default: + std::string errorHeader = + StringHelper::Sprintf("Warning: Invalid cutscene command ID: '0x%04X'", cmdID); + return new CutsceneMMCommand_GenericCmd(rawData, currentPtr, cmdID); } return nullptr; diff --git a/tools/ZAPD/ZAPD/ZCutscene.h b/tools/ZAPD/ZAPD/ZCutscene.h index 098f3ad868..5b54426cea 100644 --- a/tools/ZAPD/ZAPD/ZCutscene.h +++ b/tools/ZAPD/ZAPD/ZCutscene.h @@ -5,7 +5,8 @@ #include #include "tinyxml2.h" -#include "OtherStructs/Cutscene_Commands.h" +#include "OtherStructs/CutsceneOoT_Commands.h" +#include "OtherStructs/CutsceneMM_Commands.h" #include "ZFile.h" #include "ZResource.h" diff --git a/tools/ZAPD/ZAPD/ZDisplayList.cpp b/tools/ZAPD/ZAPD/ZDisplayList.cpp index 3b50c1fd30..98c4d0e4a4 100644 --- a/tools/ZAPD/ZAPD/ZDisplayList.cpp +++ b/tools/ZAPD/ZAPD/ZDisplayList.cpp @@ -40,7 +40,7 @@ ZDisplayList::~ZDisplayList() } // EXTRACT MODE -void ZDisplayList::ExtractFromXML(tinyxml2::XMLElement* reader, uint32_t nRawDataIndex) +void ZDisplayList::ExtractWithXML(tinyxml2::XMLElement* reader, uint32_t nRawDataIndex) { rawDataIndex = nRawDataIndex; ParseXML(reader); @@ -708,7 +708,7 @@ void ZDisplayList::Opcode_G_DL(uint64_t data, const std::string& prefix, char* l if (!Globals::Instance->HasSegment(segNum)) sprintf(line, "gsSPBranchList(0x%08" PRIX64 "),", data & 0xFFFFFFFF); else if (dListDecl != nullptr) - sprintf(line, "gsSPBranchList(%s),", dListDecl->varName.c_str()); + sprintf(line, "gsSPBranchList(%s),", dListDecl->declName.c_str()); else sprintf(line, "gsSPBranchList(%sDlist0x%06" PRIX64 "),", prefix.c_str(), GETSEGOFFSET(data)); @@ -718,7 +718,7 @@ void ZDisplayList::Opcode_G_DL(uint64_t data, const std::string& prefix, char* l if (!Globals::Instance->HasSegment(segNum)) sprintf(line, "gsSPDisplayList(0x%08" PRIX64 "),", data & 0xFFFFFFFF); else if (dListDecl != nullptr) - sprintf(line, "gsSPDisplayList(%s),", dListDecl->varName.c_str()); + sprintf(line, "gsSPDisplayList(%s),", dListDecl->declName.c_str()); else sprintf(line, "gsSPDisplayList(%sDlist0x%06" PRIX64 "),", prefix.c_str(), GETSEGOFFSET(data)); @@ -958,7 +958,7 @@ void ZDisplayList::Opcode_G_SETTIMG(uint64_t data, const std::string& prefix, ch } if (texDecl != nullptr) - sprintf(texStr, "%s", texDecl->varName.c_str()); + sprintf(texStr, "%s", texDecl->declName.c_str()); else if (data != 0 && Globals::Instance->HasSegment(segmentNumber)) sprintf(texStr, "%sTex_%06X", prefix.c_str(), texAddress); else @@ -1642,7 +1642,14 @@ static int32_t GfxdCallback_Vtx(uint32_t seg, int32_t count) vtxList.push_back(vtx); currentPtr += 16; } - self->vertices[vtxOffset] = vtxList; + + bool keyAlreadyOccupied = self->vertices.find(vtxOffset) != self->vertices.end(); + + // In some cases a vtxList already exists at vtxOffset. Only override the existing list + // if the new one is bigger. + if (!keyAlreadyOccupied || + (keyAlreadyOccupied && vtxList.size() > self->vertices[vtxOffset].size())) + self->vertices[vtxOffset] = vtxList; } } @@ -1708,17 +1715,26 @@ static int32_t GfxdCallback_DisplayList(uint32_t seg) uint32_t dListSegNum = GETSEGNUM(seg); std::string dListName = ""; - bool addressFound = Globals::Instance->GetSegmentedPtrName(seg, self->parent, "Gfx", dListName); + bool addressFound = + Globals::Instance->GetSegmentedPtrName(seg, self->parent, "Gfx", dListName, false); - if (!addressFound && self->parent->segment == dListSegNum) + if (!addressFound) { - ZDisplayList* newDList = new ZDisplayList(self->parent); - newDList->ExtractFromBinary( - dListOffset, - self->GetDListLength(self->parent->GetRawData(), dListOffset, self->dListType)); - newDList->SetName(newDList->GetDefaultName(self->parent->GetName())); - self->otherDLists.push_back(newDList); - dListName = newDList->GetName(); + if (self->parent->segment == dListSegNum) + { + ZDisplayList* newDList = new ZDisplayList(self->parent); + newDList->ExtractFromBinary( + dListOffset, + self->GetDListLength(self->parent->GetRawData(), dListOffset, self->dListType)); + newDList->SetName(newDList->GetDefaultName(self->parent->GetName())); + self->otherDLists.push_back(newDList); + dListName = newDList->GetName(); + } + else + { + Globals::Instance->WarnHardcodedPointer(seg, self->parent, self, + self->GetRawDataIndex()); + } } gfxd_puts(dListName.c_str()); @@ -1731,21 +1747,31 @@ static int32_t GfxdCallback_Matrix(uint32_t seg) std::string mtxName; ZDisplayList* self = static_cast(gfxd_udata_get()); - bool addressFound = Globals::Instance->GetSegmentedPtrName(seg, self->parent, "Mtx", mtxName); - if (!addressFound && GETSEGNUM(seg) == self->parent->segment) - { - Declaration* decl = - self->parent->GetDeclaration(Seg2Filespace(seg, self->parent->baseAddress)); - if (decl == nullptr) - { - ZMtx mtx(self->parent); - mtx.SetName(mtx.GetDefaultName(self->GetName())); - mtx.ExtractFromFile(Seg2Filespace(seg, self->parent->baseAddress)); - mtx.DeclareVar(self->GetName(), ""); + bool addressFound = + Globals::Instance->GetSegmentedPtrName(seg, self->parent, "Mtx", mtxName, false); - mtx.GetSourceOutputCode(self->GetName()); - self->mtxList.push_back(mtx); - mtxName = "&" + mtx.GetName(); + if (!addressFound) + { + if (GETSEGNUM(seg) == self->parent->segment) + { + Declaration* decl = + self->parent->GetDeclaration(Seg2Filespace(seg, self->parent->baseAddress)); + if (decl == nullptr) + { + ZMtx mtx(self->parent); + mtx.SetName(mtx.GetDefaultName(self->GetName())); + mtx.ExtractFromFile(Seg2Filespace(seg, self->parent->baseAddress)); + mtx.DeclareVar(self->GetName(), ""); + + mtx.GetSourceOutputCode(self->GetName()); + self->mtxList.push_back(mtx); + mtxName = "&" + mtx.GetName(); + } + } + else + { + Globals::Instance->WarnHardcodedPointer(seg, self->parent, self, + self->GetRawDataIndex()); } } @@ -1870,7 +1896,8 @@ void ZDisplayList::DeclareReferences(const std::string& prefix) vtxName = StringHelper::Sprintf("%sVtx_%06X", prefix.c_str(), vtxKeys[i]); auto filepath = Globals::Instance->outputPath / vtxName; - std::string incStr = StringHelper::Sprintf("%s.%s.inc", filepath.c_str(), "vtx"); + std::string incStr = + StringHelper::Sprintf("%s.%s.inc", filepath.string().c_str(), "vtx"); Declaration* vtxDecl = parent->AddDeclarationIncludeArray( vtxKeys[i], incStr, item.size() * 16, "Vtx", vtxName, item.size()); @@ -1954,9 +1981,46 @@ std::string ZDisplayList::ProcessGfxDis([[maybe_unused]] const std::string& pref gfxd_execute(); // generate display list sourceOutput += outputformatter.GetOutput(); // write formatted display list + MergeConnectingVertexLists(); + return sourceOutput; } +void ZDisplayList::MergeConnectingVertexLists() +{ + if (vertices.size() > 0) + { + std::vector>> vertexKeys(vertices.begin(), + vertices.end()); + std::pair> lastItem = vertexKeys.at(0); + + for (size_t i = 1; i < vertexKeys.size(); i++) + { + std::pair> curItem = vertexKeys[i]; + + size_t lastItemEnd = lastItem.first + (lastItem.second.size() * 16); + bool lastItemIntersects = lastItemEnd >= curItem.first; + + if (lastItemIntersects) + { + int intersectedVtxStart = (lastItemEnd - curItem.first) / 16; + + for (size_t j = intersectedVtxStart; j < curItem.second.size(); j++) + vertices[lastItem.first].push_back(curItem.second[j]); + + vertices.erase(curItem.first); + vertexKeys.erase(vertexKeys.begin() + i); + + lastItem.second = vertices[lastItem.first]; + + i--; + } + else + lastItem = curItem; + } + } +} + void ZDisplayList::TextureGenCheck() { if (TextureGenCheck(lastTexWidth, lastTexHeight, lastTexAddr, lastTexSeg, lastTexFmt, diff --git a/tools/ZAPD/ZAPD/ZDisplayList.h b/tools/ZAPD/ZAPD/ZDisplayList.h index 96808315dc..356e89a2be 100644 --- a/tools/ZAPD/ZAPD/ZDisplayList.h +++ b/tools/ZAPD/ZAPD/ZDisplayList.h @@ -346,7 +346,7 @@ public: ZDisplayList(ZFile* nParent); ~ZDisplayList(); - void ExtractFromXML(tinyxml2::XMLElement* reader, uint32_t nRawDataIndex) override; + void ExtractWithXML(tinyxml2::XMLElement* reader, uint32_t nRawDataIndex) override; void ExtractFromBinary(uint32_t nRawDataIndex, int32_t rawDataSize); void ParseRawData() override; @@ -367,6 +367,9 @@ public: std::string ProcessLegacy(const std::string& prefix); std::string ProcessGfxDis(const std::string& prefix); + // Combines vertex lists from the vertices map which touch or intersect + void MergeConnectingVertexLists(); + bool IsExternalResource() const override; std::string GetExternalExtension() const override; std::string GetSourceTypeName() const override; diff --git a/tools/ZAPD/ZAPD/ZFile.cpp b/tools/ZAPD/ZAPD/ZFile.cpp index 09776505d6..0b2a4d631c 100644 --- a/tools/ZAPD/ZAPD/ZFile.cpp +++ b/tools/ZAPD/ZAPD/ZFile.cpp @@ -181,6 +181,12 @@ void ZFile::ParseXML(tinyxml2::XMLElement* reader, const std::string& filename) } } + const char* segmentDefines = reader->Attribute("Defines"); + if (segmentDefines != NULL) + { + makeDefines = true; + } + if (mode == ZFileMode::Extract || mode == ZFileMode::ExternalFile) { if (!File::Exists((basePath / name).string())) @@ -213,14 +219,12 @@ void ZFile::ParseXML(tinyxml2::XMLElement* reader, const std::string& filename) // Check for repeated attributes. if (offsetXml != nullptr) { - std::string offsetStr = StringHelper::Split(offsetXml, "0x")[1]; - if (!StringHelper::HasOnlyHexDigits(offsetStr)) + if (!StringHelper::IsValidOffset(std::string_view(offsetXml))) { HANDLE_ERROR(WarningType::InvalidXML, - StringHelper::Sprintf("Invalid offset %s entered", offsetStr.c_str()), - ""); + StringHelper::Sprintf("Invalid offset %s entered", offsetXml), ""); } - rawDataIndex = strtol(offsetStr.c_str(), NULL, 16); + rawDataIndex = strtol(offsetXml, NULL, 16); if (offsetSet.find(offsetXml) != offsetSet.end()) { @@ -268,7 +272,7 @@ void ZFile::ParseXML(tinyxml2::XMLElement* reader, const std::string& filename) ZResource* nRes = nodeMap[nodeName](this); if (mode == ZFileMode::Extract || mode == ZFileMode::ExternalFile) - nRes->ExtractFromXML(child, rawDataIndex); + nRes->ExtractWithXML(child, rawDataIndex); switch (nRes->GetResourceType()) { @@ -442,24 +446,25 @@ Declaration* ZFile::AddDeclaration(offset_t address, DeclarationAlignment alignm const std::string& varType, const std::string& varName, const std::string& body) { - bool validOffset = AddDeclarationChecks(address, varName); + bool validOffset = DeclarationSanityChecks(address, varName); if (!validOffset) return nullptr; Declaration* decl = GetDeclaration(address); if (decl == nullptr) { - decl = new Declaration(address, alignment, size, varType, varName, false, body); + decl = Declaration::Create(address, alignment, size, varType, varName, body); declarations[address] = decl; } else { decl->alignment = alignment; decl->size = size; - decl->varType = varType; - decl->varName = varName; - decl->text = body; + decl->declType = varType; + decl->declName = varName; + decl->declBody = body; } + return decl; } @@ -468,27 +473,29 @@ Declaration* ZFile::AddDeclarationArray(offset_t address, DeclarationAlignment a const std::string& varName, size_t arrayItemCnt, const std::string& body) { - bool validOffset = AddDeclarationChecks(address, varName); + bool validOffset = DeclarationSanityChecks(address, varName); if (!validOffset) return nullptr; Declaration* decl = GetDeclaration(address); if (decl == nullptr) { - decl = - new Declaration(address, alignment, size, varType, varName, true, arrayItemCnt, body); + decl = Declaration::CreateArray(address, alignment, size, varType, varName, body, + arrayItemCnt); + declarations[address] = decl; } else { if (decl->isPlaceholder) - decl->varName = varName; + decl->declName = varName; + decl->alignment = alignment; decl->size = size; - decl->varType = varType; + decl->declType = varType; decl->isArray = true; decl->arrayItemCnt = arrayItemCnt; - decl->text = body; + decl->declBody = body; } return decl; @@ -499,41 +506,41 @@ Declaration* ZFile::AddDeclarationArray(offset_t address, DeclarationAlignment a const std::string& varName, const std::string& arrayItemCntStr, const std::string& body) { - bool validOffset = AddDeclarationChecks(address, varName); + bool validOffset = DeclarationSanityChecks(address, varName); if (!validOffset) return nullptr; Declaration* decl = GetDeclaration(address); if (decl == nullptr) { - decl = new Declaration(address, alignment, size, varType, varName, true, arrayItemCntStr, - body); + decl = Declaration::CreateArray(address, alignment, size, varType, varName, body, + arrayItemCntStr); + declarations[address] = decl; } else { decl->alignment = alignment; decl->size = size; - decl->varType = varType; - decl->varName = varName; + decl->declType = varType; + decl->declName = varName; decl->isArray = true; decl->arrayItemCntStr = arrayItemCntStr; - decl->text = body; + decl->declBody = body; } return decl; } Declaration* ZFile::AddDeclarationPlaceholder(offset_t address, const std::string& varName) { - bool validOffset = AddDeclarationChecks(address, varName); + bool validOffset = DeclarationSanityChecks(address, varName); if (!validOffset) return nullptr; Declaration* decl; if (declarations.find(address) == declarations.end()) { - decl = new Declaration(address, DeclarationAlignment::Align4, 0, "", varName, false, ""); - decl->isPlaceholder = true; + decl = Declaration::CreatePlaceholder(address, varName); declarations[address] = decl; } else @@ -546,22 +553,22 @@ Declaration* ZFile::AddDeclarationInclude(offset_t address, const std::string& i size_t size, const std::string& varType, const std::string& varName) { - bool validOffset = AddDeclarationChecks(address, varName); + bool validOffset = DeclarationSanityChecks(address, varName); if (!validOffset) return nullptr; Declaration* decl = GetDeclaration(address); if (decl == nullptr) { - decl = new Declaration(address, includePath, size, varType, varName); + decl = Declaration::CreateInclude(address, includePath, size, varType, varName); declarations[address] = decl; } else { decl->includePath = includePath; decl->size = size; - decl->varType = varType; - decl->varName = varName; + decl->declType = varType; + decl->declName = varName; } return decl; } @@ -570,7 +577,7 @@ Declaration* ZFile::AddDeclarationIncludeArray(offset_t address, std::string& in size_t size, const std::string& varType, const std::string& varName, size_t arrayItemCnt) { - bool validOffset = AddDeclarationChecks(address, varName); + bool validOffset = DeclarationSanityChecks(address, varName); if (!validOffset) return nullptr; @@ -582,7 +589,7 @@ Declaration* ZFile::AddDeclarationIncludeArray(offset_t address, std::string& in Declaration* decl = GetDeclaration(address); if (decl == nullptr) { - decl = new Declaration(address, includePath, size, varType, varName); + decl = Declaration::CreateInclude(address, includePath, size, varType, varName); decl->isArray = true; decl->arrayItemCnt = arrayItemCnt; @@ -592,8 +599,8 @@ Declaration* ZFile::AddDeclarationIncludeArray(offset_t address, std::string& in else { decl->includePath = includePath; - decl->varType = varType; - decl->varName = varName; + decl->declType = varType; + decl->declName = varName; decl->size = size; decl->isArray = true; decl->arrayItemCnt = arrayItemCnt; @@ -601,7 +608,44 @@ Declaration* ZFile::AddDeclarationIncludeArray(offset_t address, std::string& in return decl; } -bool ZFile::AddDeclarationChecks(uint32_t address, const std::string& varName) +Declaration* ZFile::AddDeclarationIncludeArray(offset_t address, std::string& includePath, + size_t size, const std::string& varType, + const std::string& varName, + const std::string& defines, size_t arrayItemCnt) +{ + bool validOffset = DeclarationSanityChecks(address, varName); + if (!validOffset) + return nullptr; + + if (StringHelper::StartsWith(includePath, "assets/extracted/")) + includePath = "assets/" + StringHelper::Split(includePath, "assets/extracted/")[1]; + if (StringHelper::StartsWith(includePath, "assets/custom/")) + includePath = "assets/" + StringHelper::Split(includePath, "assets/custom/")[1]; + + Declaration* decl = GetDeclaration(address); + if (decl == nullptr) + { + decl = Declaration::CreateInclude(address, includePath, size, varType, varName, defines); + + decl->isArray = true; + decl->arrayItemCnt = arrayItemCnt; + + declarations[address] = decl; + } + else + { + decl->includePath = includePath; + decl->declType = varType; + decl->declName = varName; + decl->defines = defines; + decl->size = size; + decl->isArray = true; + decl->arrayItemCnt = arrayItemCnt; + } + return decl; +} + +bool ZFile::DeclarationSanityChecks(uint32_t address, const std::string& varName) { assert(GETSEGNUM(address) == 0); assert(varName != ""); @@ -645,7 +689,7 @@ bool ZFile::GetDeclarationPtrName(segptr_t segAddress, const std::string& expect if (expectedType != "" && expectedType != "void*") { - if (expectedType != decl->varType && "static " + expectedType != decl->varType) + if (expectedType != decl->declType && "static " + expectedType != decl->declType) { declName = StringHelper::Sprintf("0x%08X", segAddress); return false; @@ -653,9 +697,9 @@ bool ZFile::GetDeclarationPtrName(segptr_t segAddress, const std::string& expect } if (!decl->isArray) - declName = "&" + decl->varName; + declName = "&" + decl->declName; else - declName = decl->varName; + declName = decl->declName; return true; } @@ -679,7 +723,7 @@ bool ZFile::GetDeclarationArrayIndexedName(segptr_t segAddress, size_t elementSi if (expectedType != "" && expectedType != "void*") { - if (expectedType != decl->varType && "static " + expectedType != decl->varType) + if (expectedType != decl->declType && "static " + expectedType != decl->declType) { declName = StringHelper::Sprintf("0x%08X", segAddress); return false; @@ -688,7 +732,7 @@ bool ZFile::GetDeclarationArrayIndexedName(segptr_t segAddress, size_t elementSi if (decl->address == address) { - declName = decl->varName; + declName = decl->declName; return true; } @@ -699,7 +743,7 @@ bool ZFile::GetDeclarationArrayIndexedName(segptr_t segAddress, size_t elementSi } uint32_t index = (address - decl->address) / elementSize; - declName = StringHelper::Sprintf("&%s[%u]", decl->varName.c_str(), index); + declName = StringHelper::Sprintf("&%s[%u]", decl->declName.c_str(), index); return true; } @@ -728,6 +772,20 @@ bool ZFile::HasDeclaration(offset_t address) return declarations.find(address) != declarations.end(); } +size_t ZFile::GetDeclarationSizeFromNeighbor(uint32_t declarationAddress) +{ + auto currentDecl = declarations.find(declarationAddress); + if (currentDecl == declarations.end()) + return 0; + + auto nextDecl = currentDecl; + std::advance(nextDecl, 1); + if (nextDecl == declarations.end()) + return GetRawData().size() - currentDecl->first; + + return nextDecl->first - currentDecl->first; +} + void ZFile::GenerateSourceFiles() { std::string sourceOutput; @@ -817,8 +875,8 @@ void ZFile::GenerateSourceHeaderFiles() std::string ZFile::GetHeaderInclude() const { - std::string headers = StringHelper::Sprintf("#include \"%s.h\"\n", - (outName.parent_path() / outName.stem()).c_str()); + std::string headers = StringHelper::Sprintf( + "#include \"%s.h\"\n", (outName.parent_path() / outName.stem()).string().c_str()); return headers; } @@ -843,16 +901,12 @@ std::string ZFile::GetExternalFileHeaderInclude() const { fs::path outputFolderPath = externalFile->GetSourceOutputFolderPath(); if (outputFolderPath == this->GetSourceOutputFolderPath()) - { outputFolderPath = externalFile->outName.stem(); - } else - { outputFolderPath /= externalFile->outName.stem(); - } externalFilesIncludes += - StringHelper::Sprintf("#include \"%s.h\"\n", outputFolderPath.c_str()); + StringHelper::Sprintf("#include \"%s.h\"\n", outputFolderPath.string().c_str()); } } @@ -967,46 +1021,7 @@ std::string ZFile::ProcessDeclarations() // printf("RANGE START: 0x%06X - RANGE END: 0x%06X\n", rangeStart, rangeEnd); - // Optimization: See if there are any arrays side by side that can be merged... - std::vector> declarationKeys(declarations.begin(), - declarations.end()); - - std::pair lastItem = declarationKeys.at(0); - - for (size_t i = 1; i < declarationKeys.size(); i++) - { - std::pair curItem = declarationKeys[i]; - - if (curItem.second->isArray && lastItem.second->isArray) - { - if (curItem.second->varType == lastItem.second->varType) - { - if (!curItem.second->declaredInXml && !lastItem.second->declaredInXml) - { - // TEST: For now just do Vtx declarations... - if (lastItem.second->varType == "Vtx") - { - int32_t sizeDiff = curItem.first - (lastItem.first + lastItem.second->size); - - // Make sure there isn't an unaccounted inbetween these two - if (sizeDiff == 0) - { - lastItem.second->size += curItem.second->size; - lastItem.second->arrayItemCnt += curItem.second->arrayItemCnt; - lastItem.second->text += "\n" + curItem.second->text; - declarations.erase(curItem.first); - declarationKeys.erase(declarationKeys.begin() + i); - delete curItem.second; - i--; - continue; - } - } - } - } - } - - lastItem = curItem; - } + MergeNeighboringDeclarations(); for (std::pair item : declarations) ProcessDeclarationText(item.second); @@ -1041,20 +1056,20 @@ std::string ZFile::ProcessDeclarations() // HACK std::string extType; - if (item.second->varType == "Gfx") + if (item.second->declType == "Gfx") extType = "dlist"; - else if (item.second->varType == "Vtx") + else if (item.second->declType == "Vtx") extType = "vtx"; - auto filepath = outputPath / item.second->varName; + auto filepath = outputPath / item.second->declName; File::WriteAllText( - StringHelper::Sprintf("%s.%s.inc", filepath.c_str(), extType.c_str()), - item.second->text); + StringHelper::Sprintf("%s.%s.inc", filepath.string().c_str(), extType.c_str()), + item.second->declBody); } output += item.second->GetExternalDeclarationStr(); } - else if (item.second->varType != "") + else if (item.second->declType != "") { output += item.second->GetNormalDeclarationStr(); } @@ -1063,6 +1078,50 @@ std::string ZFile::ProcessDeclarations() return output; } +void ZFile::MergeNeighboringDeclarations() +{ + // Optimization: See if there are any arrays side by side that can be merged... + std::vector> declarationKeys(declarations.begin(), + declarations.end()); + + std::pair lastItem = declarationKeys.at(0); + + for (size_t i = 1; i < declarationKeys.size(); i++) + { + std::pair curItem = declarationKeys[i]; + + if (curItem.second->isArray && lastItem.second->isArray) + { + if (curItem.second->declType == lastItem.second->declType) + { + if (!curItem.second->declaredInXml && !lastItem.second->declaredInXml) + { + // TEST: For now just do Vtx declarations... + if (lastItem.second->declType == "Vtx") + { + int32_t sizeDiff = curItem.first - (lastItem.first + lastItem.second->size); + + // Make sure there isn't an unaccounted inbetween these two + if (sizeDiff == 0) + { + lastItem.second->size += curItem.second->size; + lastItem.second->arrayItemCnt += curItem.second->arrayItemCnt; + lastItem.second->declBody += "\n" + curItem.second->declBody; + declarations.erase(curItem.first); + declarationKeys.erase(declarationKeys.begin() + i); + delete curItem.second; + i--; + continue; + } + } + } + } + } + + lastItem = curItem; + } +} + void ZFile::ProcessDeclarationText(Declaration* decl) { size_t refIndex = 0; @@ -1070,17 +1129,17 @@ void ZFile::ProcessDeclarationText(Declaration* decl) if (!(decl->references.size() > 0)) return; - for (size_t i = 0; i < decl->text.size() - 1; i++) + for (size_t i = 0; i < decl->declBody.size() - 1; i++) { - char c = decl->text[i]; - char c2 = decl->text[i + 1]; + char c = decl->declBody[i]; + char c2 = decl->declBody[i + 1]; if (c == '@' && c2 == 'r') { std::string vtxName; Globals::Instance->GetSegmentedArrayIndexedName(decl->references[refIndex], 0x10, this, "Vtx", vtxName); - decl->text.replace(i, 2, vtxName); + decl->declBody.replace(i, 2, vtxName); refIndex++; @@ -1092,7 +1151,8 @@ void ZFile::ProcessDeclarationText(Declaration* decl) std::string ZFile::ProcessExterns() { - std::string output; + std::string output = ""; + bool hadDefines = true; // Previous declaration included defines. for (const auto& item : declarations) { @@ -1101,10 +1161,21 @@ std::string ZFile::ProcessExterns() continue; } + std::string itemDefines = item.second->GetDefinesStr(); + // Add a newline above if previous has no defines and this one does. + if (!hadDefines && (itemDefines.length() > 0)) + { + output.push_back('\n'); + } output += item.second->GetExternStr(); - } + output += itemDefines; - output += "\n"; + // Newline below if this one has defines. + if ((hadDefines = (itemDefines.length() > 0))) + { + output.push_back('\n'); + } + } output += defines; @@ -1153,7 +1224,7 @@ std::string ZFile::ProcessTextureIntersections([[maybe_unused]] const std::strin if (nextDecl == nullptr) texNextName = texturesResources.at(nextOffset)->GetName(); else - texNextName = nextDecl->varName; + texNextName = nextDecl->declName; defines += StringHelper::Sprintf("#define %s ((u32)%s + 0x%06X)\n", texNextName.c_str(), texName.c_str(), offsetDiff); @@ -1226,8 +1297,8 @@ bool ZFile::HandleUnaccountedAddress(offset_t currentAddress, offset_t lastAddr, std::string intersectionInfo = StringHelper::Sprintf( "Resource from 0x%06X:0x%06X (%s) conflicts with 0x%06X (%s).", lastAddr, - lastAddr + lastSize, lastDecl->varName.c_str(), currentAddress, - currentDecl->varName.c_str()); + lastAddr + lastSize, lastDecl->declName.c_str(), currentAddress, + currentDecl->declName.c_str()); HANDLE_WARNING_RESOURCE(WarningType::Intersection, this, nullptr, currentAddress, "intersection detected", intersectionInfo); } diff --git a/tools/ZAPD/ZAPD/ZFile.h b/tools/ZAPD/ZAPD/ZFile.h index e4980eb68d..65b1cc4aa3 100644 --- a/tools/ZAPD/ZAPD/ZFile.h +++ b/tools/ZAPD/ZAPD/ZFile.h @@ -38,6 +38,8 @@ public: uint32_t segment = 0x80; uint32_t baseAddress, rangeStart, rangeEnd; bool isExternalFile = false; + // Whether to make defines for texture dimensions, and possibly more in future + bool makeDefines = false; ZFile(const fs::path& nOutPath, const std::string& nName); ZFile(ZFileMode nMode, tinyxml2::XMLElement* reader, const fs::path& nBasePath, @@ -74,6 +76,9 @@ public: Declaration* AddDeclarationIncludeArray(offset_t address, std::string& includePath, size_t size, const std::string& varType, const std::string& varName, size_t arrayItemCnt); + Declaration* AddDeclarationIncludeArray(offset_t address, std::string& includePath, size_t size, + const std::string& varType, const std::string& varName, + const std::string& defines, size_t arrayItemCnt); bool GetDeclarationPtrName(segptr_t segAddress, const std::string& expectedType, std::string& declName) const; @@ -84,6 +89,7 @@ public: Declaration* GetDeclaration(offset_t address) const; Declaration* GetDeclarationRanged(offset_t address) const; bool HasDeclaration(offset_t address); + size_t GetDeclarationSizeFromNeighbor(uint32_t declarationAddress); std::string GetHeaderInclude() const; std::string GetZRoomHeaderInclude() const; @@ -126,8 +132,9 @@ protected: void DeclareResourceSubReferences(); void GenerateSourceFiles(); void GenerateSourceHeaderFiles(); - bool AddDeclarationChecks(uint32_t address, const std::string& varName); + bool DeclarationSanityChecks(uint32_t address, const std::string& varName); std::string ProcessDeclarations(); + void MergeNeighboringDeclarations(); void ProcessDeclarationText(Declaration* decl); std::string ProcessExterns(); diff --git a/tools/ZAPD/ZAPD/ZLimb.cpp b/tools/ZAPD/ZAPD/ZLimb.cpp index 034d0850bb..b3acb940c1 100644 --- a/tools/ZAPD/ZAPD/ZLimb.cpp +++ b/tools/ZAPD/ZAPD/ZLimb.cpp @@ -106,7 +106,7 @@ void ZLimb::ParseRawData() skinSegmentType = static_cast(BitConverter::ToInt32BE(rawData, rawDataIndex + 8)); skinSegment = BitConverter::ToUInt32BE(rawData, rawDataIndex + 12); - if (skinSegmentType == ZLimbSkinType::SkinType_4) + if (skinSegmentType == ZLimbSkinType::SkinType_Animated) { if (skinSegment != 0 && GETSEGNUM(skinSegment) == parent->segment) { @@ -181,7 +181,7 @@ void ZLimb::DeclareReferences(const std::string& prefix) case ZLimbType::Skin: switch (skinSegmentType) { - case ZLimbSkinType::SkinType_4: + case ZLimbSkinType::SkinType_Animated: if (skinSegment != 0 && GETSEGNUM(skinSegment) == parent->segment) { segmentStruct.DeclareReferences(varPrefix); @@ -189,7 +189,7 @@ void ZLimb::DeclareReferences(const std::string& prefix) } break; - case ZLimbSkinType::SkinType_DList: + case ZLimbSkinType::SkinType_Normal: DeclareDList(skinSegment, varPrefix, ""); break; @@ -394,7 +394,7 @@ void ZLimb::DeclareDList(segptr_t dListSegmentedPtr, const std::string& prefix, std::string dlistName; bool declFound = Globals::Instance->GetSegmentedArrayIndexedName(dListSegmentedPtr, 8, parent, - "Gfx", dlistName); + "Gfx", dlistName, false); if (declFound) return; diff --git a/tools/ZAPD/ZAPD/ZLimb.h b/tools/ZAPD/ZAPD/ZLimb.h index ce31e42958..52919bed92 100644 --- a/tools/ZAPD/ZAPD/ZLimb.h +++ b/tools/ZAPD/ZAPD/ZLimb.h @@ -28,9 +28,9 @@ public: ZLimbType type = ZLimbType::Standard; - ZLimbSkinType skinSegmentType = ZLimbSkinType::SkinType_0; // Skin only - segptr_t skinSegment = 0; // Skin only - Struct_800A5E28 segmentStruct; // Skin only + ZLimbSkinType skinSegmentType = ZLimbSkinType::SkinType_Null; // Skin only + segptr_t skinSegment = 0; // Skin only + SkinAnimatedLimbData segmentStruct; // Skin only // Legacy only float legTransX, legTransY, legTransZ; // Vec3f diff --git a/tools/ZAPD/ZAPD/ZPath.cpp b/tools/ZAPD/ZAPD/ZPath.cpp index 0dac87a1b1..cb8295679f 100644 --- a/tools/ZAPD/ZAPD/ZPath.cpp +++ b/tools/ZAPD/ZAPD/ZPath.cpp @@ -6,7 +6,8 @@ #include "WarningHandler.h" #include "ZFile.h" -REGISTER_ZFILENODE(Path, ZPath); +REGISTER_ZFILENODE(Path, ZPath); // Old name that is being kept for backwards compatability +REGISTER_ZFILENODE(PathList, ZPath); // New name that may be used in future XMLs ZPath::ZPath(ZFile* nParent) : ZResource(nParent) { @@ -144,8 +145,8 @@ void PathwayEntry::DeclareReferences(const std::string& prefix) return; std::string pointsName; - bool addressFound = - Globals::Instance->GetSegmentedPtrName(listSegmentAddress, parent, "Vec3s", pointsName); + bool addressFound = Globals::Instance->GetSegmentedPtrName(listSegmentAddress, parent, "Vec3s", + pointsName, false); if (addressFound) return; @@ -172,7 +173,7 @@ void PathwayEntry::DeclareReferences(const std::string& prefix) points.size(), declaration); } else - decl->text = declaration; + decl->declBody = declaration; } std::string PathwayEntry::GetBodySourceCode() const @@ -185,7 +186,13 @@ std::string PathwayEntry::GetBodySourceCode() const declaration += StringHelper::Sprintf("%i, %i, %i, %s", numPoints, unk1, unk2, listName.c_str()); else - declaration += StringHelper::Sprintf("%i, %s", numPoints, listName.c_str()); + { + if (numPoints > 0) + declaration += + StringHelper::Sprintf("ARRAY_COUNT(%s), %s", listName.c_str(), listName.c_str()); + else + declaration += StringHelper::Sprintf("%i, %s", numPoints, listName.c_str()); + } return declaration; } diff --git a/tools/ZAPD/ZAPD/ZPlayerAnimationData.cpp b/tools/ZAPD/ZAPD/ZPlayerAnimationData.cpp index a96604fda0..ce5425d7e1 100644 --- a/tools/ZAPD/ZAPD/ZPlayerAnimationData.cpp +++ b/tools/ZAPD/ZAPD/ZPlayerAnimationData.cpp @@ -32,7 +32,7 @@ void ZPlayerAnimationData::ParseRawData() for (size_t i = 0; i < totalSize; i += 2) { - limbRotData.push_back(BitConverter::ToUInt16BE(rawData, rawDataIndex + i)); + limbRotData.push_back(BitConverter::ToInt16BE(rawData, rawDataIndex + i)); } } @@ -55,14 +55,21 @@ std::string ZPlayerAnimationData::GetBodySourceCode() const std::string declaration = ""; size_t index = 0; - for (const auto& entry : limbRotData) + for (const auto entry : limbRotData) { if (index % 8 == 0) { declaration += "\t"; } - declaration += StringHelper::Sprintf("0x%04X, ", entry); + if (entry < 0) + { + declaration += StringHelper::Sprintf("-0x%04X, ", -entry); + } + else + { + declaration += StringHelper::Sprintf("0x%04X, ", entry); + } if ((index + 1) % 8 == 0) { diff --git a/tools/ZAPD/ZAPD/ZPlayerAnimationData.h b/tools/ZAPD/ZAPD/ZPlayerAnimationData.h index 20835f2369..2923117efc 100644 --- a/tools/ZAPD/ZAPD/ZPlayerAnimationData.h +++ b/tools/ZAPD/ZAPD/ZPlayerAnimationData.h @@ -9,7 +9,7 @@ class ZPlayerAnimationData : public ZResource { public: int16_t frameCount = 0; - std::vector limbRotData; + std::vector limbRotData; ZPlayerAnimationData(ZFile* nParent); diff --git a/tools/ZAPD/ZAPD/ZResource.cpp b/tools/ZAPD/ZAPD/ZResource.cpp index 8825cc97bd..d991c46539 100644 --- a/tools/ZAPD/ZAPD/ZResource.cpp +++ b/tools/ZAPD/ZAPD/ZResource.cpp @@ -24,7 +24,7 @@ ZResource::ZResource(ZFile* nParent) RegisterOptionalAttribute("Static", "Global"); } -void ZResource::ExtractFromXML(tinyxml2::XMLElement* reader, offset_t nRawDataIndex) +void ZResource::ExtractWithXML(tinyxml2::XMLElement* reader, offset_t nRawDataIndex) { rawDataIndex = nRawDataIndex; declaredInXml = true; @@ -274,7 +274,7 @@ void ZResource::GetSourceOutputCode([[maybe_unused]] const std::string& prefix) if (decl == nullptr || decl->isPlaceholder) decl = DeclareVar(prefix, bodyStr); else - decl->text = bodyStr; + decl->declBody = bodyStr; decl->staticConf = staticConf; } diff --git a/tools/ZAPD/ZAPD/ZResource.h b/tools/ZAPD/ZAPD/ZResource.h index f97b259c6c..9754013984 100644 --- a/tools/ZAPD/ZAPD/ZResource.h +++ b/tools/ZAPD/ZAPD/ZResource.h @@ -54,6 +54,7 @@ enum class ZResourceType TextureAnimationParams, Vector, Vertex, + Waterbox, }; class ResourceAttribute @@ -79,8 +80,18 @@ public: ZResource(ZFile* nParent); virtual ~ZResource() = default; - // Parsing from File - virtual void ExtractFromXML(tinyxml2::XMLElement* reader, offset_t nRawDataIndex); + /// + /// Extracts/Parsees data from binary file using an XML to provide the needed metadata. + /// + /// XML Node we wish to parse from. + /// The offset within the binary file we are going to parse from as + /// indicated by the "Offset" parameter in the XML. + virtual void ExtractWithXML(tinyxml2::XMLElement* reader, offset_t nRawDataIndex); + + /// + /// Extracts/Parses the needed data straight from a binary without the use of an XML. + /// + /// The offset within the binary file we wish to parse from. virtual void ExtractFromFile(offset_t nRawDataIndex); // Misc diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetAlternateHeaders.cpp b/tools/ZAPD/ZAPD/ZRoom/Commands/SetAlternateHeaders.cpp index 1687b54620..e64b855374 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetAlternateHeaders.cpp +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetAlternateHeaders.cpp @@ -21,7 +21,7 @@ void SetAlternateHeaders::DeclareReferences([[maybe_unused]] const std::string& void SetAlternateHeaders::ParseRawDataLate() { - size_t numHeaders = zRoom->GetDeclarationSizeFromNeighbor(segmentOffset) / 4; + size_t numHeaders = zRoom->parent->GetDeclarationSizeFromNeighbor(segmentOffset) / 4; headers.reserve(numHeaders); for (uint32_t i = 0; i < numHeaders; i++) diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetCameraSettings.cpp b/tools/ZAPD/ZAPD/ZRoom/Commands/SetCameraSettings.cpp index ae2d31c81e..e30e1b682d 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetCameraSettings.cpp +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetCameraSettings.cpp @@ -2,6 +2,7 @@ #include "Utils/BitConverter.h" #include "Utils/StringHelper.h" +#include "Globals.h" SetCameraSettings::SetCameraSettings(ZFile* nParent) : ZRoomCommand(nParent) { @@ -16,8 +17,12 @@ void SetCameraSettings::ParseRawData() std::string SetCameraSettings::GetBodySourceCode() const { - return StringHelper::Sprintf("SCENE_CMD_MISC_SETTINGS(0x%02X, 0x%08X)", cameraMovement, - mapHighlight); + if (Globals::Instance->game == ZGame::MM_RETAIL) + return StringHelper::Sprintf("SCENE_CMD_SET_REGION_VISITED(0x%02X, 0x%08X)", cameraMovement, + mapHighlight); + else + return StringHelper::Sprintf("SCENE_CMD_MISC_SETTINGS(0x%02X, 0x%08X)", cameraMovement, + mapHighlight); } std::string SetCameraSettings::GetCommandCName() const diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetCsCamera.cpp b/tools/ZAPD/ZAPD/ZRoom/Commands/SetCsCamera.cpp index ada1a1038f..302d638d4c 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetCsCamera.cpp +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetCsCamera.cpp @@ -21,7 +21,7 @@ void SetCsCamera::ParseRawData() cameras.reserve(numCameras); for (int32_t i = 0; i < numCameras; i++) { - CsCameraEntry entry(parent->GetRawData(), currentPtr); + ActorCsCamInfo entry(parent->GetRawData(), currentPtr); numPoints += entry.GetNumPoints(); currentPtr += entry.GetRawDataSize(); @@ -105,7 +105,7 @@ void SetCsCamera::DeclareReferences(const std::string& prefix) std::string SetCsCamera::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "CsCameraEntry", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "ActorCsCamInfo", listName); return StringHelper::Sprintf("SCENE_CMD_ACTOR_CUTSCENE_CAM_LIST(%i, %s)", cameras.size(), listName.c_str()); } @@ -120,7 +120,7 @@ RoomCommand SetCsCamera::GetRoomCommand() const return RoomCommand::SetCsCamera; } -CsCameraEntry::CsCameraEntry(const std::vector& rawData, uint32_t rawDataIndex) +ActorCsCamInfo::ActorCsCamInfo(const std::vector& rawData, uint32_t rawDataIndex) : baseOffset(rawDataIndex), type(BitConverter::ToInt16BE(rawData, rawDataIndex + 0)), numPoints(BitConverter::ToInt16BE(rawData, rawDataIndex + 2)) { @@ -128,27 +128,27 @@ CsCameraEntry::CsCameraEntry(const std::vector& rawData, uint32_t rawDa segmentOffset = GETSEGOFFSET(camAddress); } -std::string CsCameraEntry::GetSourceTypeName() const +std::string ActorCsCamInfo::GetSourceTypeName() const { - return "CsCameraEntry"; + return "ActorCsCamInfo"; } -int32_t CsCameraEntry::GetRawDataSize() const +int32_t ActorCsCamInfo::GetRawDataSize() const { return 8; } -int16_t CsCameraEntry::GetNumPoints() const +int16_t ActorCsCamInfo::GetNumPoints() const { return numPoints; } -segptr_t CsCameraEntry::GetCamAddress() const +segptr_t ActorCsCamInfo::GetCamAddress() const { return camAddress; } -uint32_t CsCameraEntry::GetSegmentOffset() const +uint32_t ActorCsCamInfo::GetSegmentOffset() const { return segmentOffset; } diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetCsCamera.h b/tools/ZAPD/ZAPD/ZRoom/Commands/SetCsCamera.h index 5e0e3c8257..2ce64e4e05 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetCsCamera.h +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetCsCamera.h @@ -3,10 +3,10 @@ #include "ZRoom/ZRoomCommand.h" #include "ZVector.h" -class CsCameraEntry +class ActorCsCamInfo { public: - CsCameraEntry(const std::vector& rawData, uint32_t rawDataIndex); + ActorCsCamInfo(const std::vector& rawData, uint32_t rawDataIndex); std::string GetSourceTypeName() const; int32_t GetRawDataSize() const; @@ -25,7 +25,7 @@ public: class SetCsCamera : public ZRoomCommand { public: - std::vector cameras; + std::vector cameras; std::vector points; SetCsCamera(ZFile* nParent); diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetActorCutsceneList.cpp b/tools/ZAPD/ZAPD/ZRoom/Commands/SetCutsceneEntryList.cpp similarity index 53% rename from tools/ZAPD/ZAPD/ZRoom/Commands/SetActorCutsceneList.cpp rename to tools/ZAPD/ZAPD/ZRoom/Commands/SetCutsceneEntryList.cpp index 15f2c6b451..96c50c3be2 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetActorCutsceneList.cpp +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetCutsceneEntryList.cpp @@ -1,4 +1,4 @@ -#include "SetActorCutsceneList.h" +#include "SetCutsceneEntryList.h" #include "Globals.h" #include "Utils/BitConverter.h" @@ -19,7 +19,7 @@ void SetActorCutsceneList::ParseRawData() cutscenes.reserve(numCutscenes); for (int32_t i = 0; i < numCutscenes; i++) { - ActorCutsceneEntry entry(parent->GetRawData(), currentPtr); + CutsceneEntry entry(parent->GetRawData(), currentPtr); cutscenes.push_back(entry); currentPtr += 16; @@ -55,7 +55,7 @@ void SetActorCutsceneList::DeclareReferences(const std::string& prefix) std::string SetActorCutsceneList::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "ActorCutscene", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "CutsceneEntry", listName); return StringHelper::Sprintf("SCENE_CMD_ACTOR_CUTSCENE_LIST(%i, %s)", cutscenes.size(), listName.c_str()); } @@ -70,25 +70,34 @@ RoomCommand SetActorCutsceneList::GetRoomCommand() const return RoomCommand::SetActorCutsceneList; } -ActorCutsceneEntry::ActorCutsceneEntry(const std::vector& rawData, uint32_t rawDataIndex) +CutsceneEntry::CutsceneEntry(const std::vector& rawData, uint32_t rawDataIndex) : priority(BitConverter::ToInt16BE(rawData, rawDataIndex + 0)), length(BitConverter::ToInt16BE(rawData, rawDataIndex + 2)), - unk4(BitConverter::ToInt16BE(rawData, rawDataIndex + 4)), - unk6(BitConverter::ToInt16BE(rawData, rawDataIndex + 6)), - additionalCutscene(BitConverter::ToInt16BE(rawData, rawDataIndex + 8)), - sound(rawData[rawDataIndex + 0xA]), unkB(rawData[rawDataIndex + 0xB]), - unkC(BitConverter::ToInt16BE(rawData, rawDataIndex + 0xC)), unkE(rawData[rawDataIndex + 0xE]), - letterboxSize(rawData[rawDataIndex + 0xF]) + csCamId(BitConverter::ToInt16BE(rawData, rawDataIndex + 4)), + scriptIndex(BitConverter::ToInt16BE(rawData, rawDataIndex + 6)), + additionalCsId(BitConverter::ToInt16BE(rawData, rawDataIndex + 8)), + endSfx(rawData[rawDataIndex + 0xA]), customValue(rawData[rawDataIndex + 0xB]), + hudVisibility(BitConverter::ToInt16BE(rawData, rawDataIndex + 0xC)), + endCam(rawData[rawDataIndex + 0xE]), letterboxSize(rawData[rawDataIndex + 0xF]) { } -std::string ActorCutsceneEntry::GetBodySourceCode() const +std::string CutsceneEntry::GetBodySourceCode() const { - return StringHelper::Sprintf("%i, %i, %i, %i, %i, %i, %i, %i, %i, %i", priority, length, unk4, - unk6, additionalCutscene, sound, unkB, unkC, unkE, letterboxSize); + EnumData* enumData = &Globals::Instance->cfg.enumData; + + if (enumData->endSfx.find(endSfx) != enumData->endSfx.end()) + return StringHelper::Sprintf("%i, %i, %i, %i, %i, %s, %i, %i, %i, %i", priority, length, + csCamId, scriptIndex, additionalCsId, + enumData->endSfx[endSfx].c_str(), customValue, hudVisibility, + endCam, letterboxSize); + else + return StringHelper::Sprintf("%i, %i, %i, %i, %i, %i, %i, %i, %i, %i", priority, length, + csCamId, scriptIndex, additionalCsId, endSfx, customValue, + hudVisibility, endCam, letterboxSize); } -std::string ActorCutsceneEntry::GetSourceTypeName() const +std::string CutsceneEntry::GetSourceTypeName() const { - return "ActorCutscene"; + return "CutsceneEntry"; } diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetActorCutsceneList.h b/tools/ZAPD/ZAPD/ZRoom/Commands/SetCutsceneEntryList.h similarity index 66% rename from tools/ZAPD/ZAPD/ZRoom/Commands/SetActorCutsceneList.h rename to tools/ZAPD/ZAPD/ZRoom/Commands/SetCutsceneEntryList.h index 8fd48e425c..6ba6c23abc 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetActorCutsceneList.h +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetCutsceneEntryList.h @@ -2,22 +2,22 @@ #include "ZRoom/ZRoomCommand.h" -class ActorCutsceneEntry +class CutsceneEntry { protected: int16_t priority; int16_t length; - int16_t unk4; - int16_t unk6; - int16_t additionalCutscene; - uint8_t sound; - uint8_t unkB; - int16_t unkC; - uint8_t unkE; + int16_t csCamId; + int16_t scriptIndex; + int16_t additionalCsId; + uint8_t endSfx; + uint8_t customValue; + int16_t hudVisibility; + uint8_t endCam; uint8_t letterboxSize; public: - ActorCutsceneEntry(const std::vector& rawData, uint32_t rawDataIndex); + CutsceneEntry(const std::vector& rawData, uint32_t rawDataIndex); std::string GetBodySourceCode() const; std::string GetSourceTypeName() const; @@ -26,7 +26,7 @@ public: class SetActorCutsceneList : public ZRoomCommand { public: - std::vector cutscenes; + std::vector cutscenes; SetActorCutsceneList(ZFile* nParent); diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetCutscenes.cpp b/tools/ZAPD/ZAPD/ZRoom/Commands/SetCutscenes.cpp index 51df68ca1a..d2a1c19561 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetCutscenes.cpp +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetCutscenes.cpp @@ -23,7 +23,7 @@ void SetCutscenes::ParseRawData() cutsceneEntries.reserve(numCutscenes); for (uint8_t i = 0; i < numCutscenes; i++) { - CutsceneEntry entry(parent->GetRawData(), currentPtr); + CutsceneScriptEntry entry(parent->GetRawData(), currentPtr); cutsceneEntries.push_back(entry); currentPtr += 8; } @@ -32,6 +32,7 @@ void SetCutscenes::ParseRawData() void SetCutscenes::DeclareReferences(const std::string& prefix) { + EnumData* enumData = &Globals::Instance->cfg.enumData; std::string varPrefix = name; if (varPrefix == "") varPrefix = prefix; @@ -62,10 +63,14 @@ void SetCutscenes::DeclareReferences(const std::string& prefix) Globals::Instance->GetSegmentedPtrName(entry.segmentPtr, parent, "CutsceneData", csName); - declaration += - StringHelper::Sprintf(" { %s, 0x%04X, 0x%02X, 0x%02X },", csName.c_str(), - entry.exit, entry.entrance, entry.flag); - + if (enumData->spawnFlag.find(entry.flag) != enumData->spawnFlag.end()) + declaration += StringHelper::Sprintf(" { %s, 0x%04X, 0x%02X, %s },", + csName.c_str(), entry.exit, entry.entrance, + enumData->spawnFlag[entry.flag].c_str()); + else + declaration += + StringHelper::Sprintf(" { %s, 0x%04X, 0x%02X, 0x%02X },", csName.c_str(), + entry.exit, entry.entrance, entry.flag); if (i + 1 < numCutscenes) declaration += "\n"; @@ -73,8 +78,8 @@ void SetCutscenes::DeclareReferences(const std::string& prefix) } parent->AddDeclarationArray(segmentOffset, DeclarationAlignment::Align4, - cutsceneEntries.size() * 8, "CutsceneEntry", - StringHelper::Sprintf("%sCutsceneEntryList_%06X", + cutsceneEntries.size() * 8, "CutsceneScriptEntry", + StringHelper::Sprintf("%sCutsceneScriptEntryList_%06X", zRoom->GetName().c_str(), segmentOffset), cutsceneEntries.size(), declaration); } @@ -102,8 +107,8 @@ std::string SetCutscenes::GetBodySourceCode() const if (Globals::Instance->game == ZGame::MM_RETAIL) { - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "CutsceneEntry", listName); - return StringHelper::Sprintf("SCENE_CMD_CUTSCENE_LIST(%i, %s)", numCutscenes, + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "CutsceneScriptEntry", listName); + return StringHelper::Sprintf("SCENE_CMD_CUTSCENE_SCRIPT_LIST(%i, %s)", numCutscenes, listName.c_str()); } @@ -121,7 +126,7 @@ RoomCommand SetCutscenes::GetRoomCommand() const return RoomCommand::SetCutscenes; } -CutsceneEntry::CutsceneEntry(const std::vector& rawData, uint32_t rawDataIndex) +CutsceneScriptEntry::CutsceneScriptEntry(const std::vector& rawData, uint32_t rawDataIndex) : segmentPtr(BitConverter::ToInt32BE(rawData, rawDataIndex + 0)), exit(BitConverter::ToInt16BE(rawData, rawDataIndex + 4)), entrance(rawData[rawDataIndex + 6]), flag(rawData[rawDataIndex + 7]) diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetCutscenes.h b/tools/ZAPD/ZAPD/ZRoom/Commands/SetCutscenes.h index 81a622c5b3..e6d979d0f6 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetCutscenes.h +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetCutscenes.h @@ -3,10 +3,10 @@ #include "ZCutscene.h" #include "ZRoom/ZRoomCommand.h" -class CutsceneEntry +class CutsceneScriptEntry { public: - CutsceneEntry(const std::vector& rawData, uint32_t rawDataIndex); + CutsceneScriptEntry(const std::vector& rawData, uint32_t rawDataIndex); segptr_t segmentPtr; uint16_t exit; @@ -17,8 +17,8 @@ public: class SetCutscenes : public ZRoomCommand { public: - std::vector cutsceneEntries; // (MM Only) - uint8_t numCutscenes; // (MM Only) + std::vector cutsceneEntries; // (MM Only) + uint8_t numCutscenes; // (MM Only) SetCutscenes(ZFile* nParent); diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetEntranceList.cpp b/tools/ZAPD/ZAPD/ZRoom/Commands/SetEntranceList.cpp index c92f56c4ee..3ffba0ff12 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetEntranceList.cpp +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetEntranceList.cpp @@ -24,13 +24,13 @@ void SetEntranceList::DeclareReferences([[maybe_unused]] const std::string& pref void SetEntranceList::ParseRawDataLate() { // Parse Entrances and Generate Declaration - uint32_t numEntrances = zRoom->GetDeclarationSizeFromNeighbor(segmentOffset) / 2; + uint32_t numEntrances = zRoom->parent->GetDeclarationSizeFromNeighbor(segmentOffset) / 2; uint32_t currentPtr = segmentOffset; entrances.reserve(numEntrances); for (uint32_t i = 0; i < numEntrances; i++) { - EntranceEntry entry(parent->GetRawData(), currentPtr); + Spawn entry(parent->GetRawData(), currentPtr); entrances.push_back(entry); currentPtr += 2; @@ -55,16 +55,25 @@ void SetEntranceList::DeclareReferencesLate([[maybe_unused]] const std::string& std::string varName = StringHelper::Sprintf("%sEntranceList0x%06X", prefix.c_str(), segmentOffset); - parent->AddDeclarationArray(segmentOffset, DeclarationAlignment::Align4, - entrances.size() * 2, "EntranceEntry", varName, - entrances.size(), declaration); + + if (Globals::Instance->game != ZGame::MM_RETAIL) + parent->AddDeclarationArray(segmentOffset, DeclarationAlignment::Align4, + entrances.size() * 2, "Spawn", varName, entrances.size(), + declaration); + else + parent->AddDeclarationArray(segmentOffset, DeclarationAlignment::Align4, + entrances.size() * 2, "EntranceEntry", varName, + entrances.size(), declaration); } } std::string SetEntranceList::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "EntranceEntry", listName); + if (Globals::Instance->game != ZGame::MM_RETAIL) + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "Spawn", listName); + else + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "EntranceEntry", listName); return StringHelper::Sprintf("SCENE_CMD_ENTRANCE_LIST(%s)", listName.c_str()); } @@ -78,13 +87,13 @@ RoomCommand SetEntranceList::GetRoomCommand() const return RoomCommand::SetEntranceList; } -EntranceEntry::EntranceEntry(const std::vector& rawData, uint32_t rawDataIndex) +Spawn::Spawn(const std::vector& rawData, uint32_t rawDataIndex) { startPositionIndex = rawData.at(rawDataIndex + 0); roomToLoad = rawData.at(rawDataIndex + 1); } -std::string EntranceEntry::GetBodySourceCode() const +std::string Spawn::GetBodySourceCode() const { return StringHelper::Sprintf("0x%02X, 0x%02X", startPositionIndex, roomToLoad); } diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetEntranceList.h b/tools/ZAPD/ZAPD/ZRoom/Commands/SetEntranceList.h index e13e9a8ce6..832232e06b 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetEntranceList.h +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetEntranceList.h @@ -2,13 +2,13 @@ #include "ZRoom/ZRoomCommand.h" -class EntranceEntry +class Spawn { public: uint8_t startPositionIndex; uint8_t roomToLoad; - EntranceEntry(const std::vector& rawData, uint32_t rawDataIndex); + Spawn(const std::vector& rawData, uint32_t rawDataIndex); std::string GetBodySourceCode() const; }; @@ -16,7 +16,7 @@ public: class SetEntranceList : public ZRoomCommand { public: - std::vector entrances; + std::vector entrances; SetEntranceList(ZFile* nParent); diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetExitList.cpp b/tools/ZAPD/ZAPD/ZRoom/Commands/SetExitList.cpp index 80ccc6b057..78bbaa87ed 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetExitList.cpp +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetExitList.cpp @@ -24,7 +24,7 @@ void SetExitList::DeclareReferences([[maybe_unused]] const std::string& prefix) void SetExitList::ParseRawDataLate() { // Parse Entrances and Generate Declaration - uint32_t numEntrances = zRoom->GetDeclarationSizeFromNeighbor(segmentOffset) / 2; + uint32_t numEntrances = zRoom->parent->GetDeclarationSizeFromNeighbor(segmentOffset) / 2; uint32_t currentPtr = segmentOffset; exits.reserve(numEntrances); diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetLightingSettings.cpp b/tools/ZAPD/ZAPD/ZRoom/Commands/SetLightingSettings.cpp index ba5785cfcb..eaf01cd4c4 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetLightingSettings.cpp +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetLightingSettings.cpp @@ -34,18 +34,28 @@ void SetLightingSettings::DeclareReferences(const std::string& prefix) declaration += "\n"; } - parent->AddDeclarationArray( - segmentOffset, DeclarationAlignment::Align4, - settings.size() * settings.front().GetRawDataSize(), "LightSettings", - StringHelper::Sprintf("%sLightSettings0x%06X", prefix.c_str(), segmentOffset), - settings.size(), declaration); + if (Globals::Instance->game != ZGame::MM_RETAIL) + parent->AddDeclarationArray( + segmentOffset, DeclarationAlignment::Align4, + settings.size() * settings.front().GetRawDataSize(), "EnvLightSettings", + StringHelper::Sprintf("%sLightSettings0x%06X", prefix.c_str(), segmentOffset), + settings.size(), declaration); + else + parent->AddDeclarationArray( + segmentOffset, DeclarationAlignment::Align4, + settings.size() * settings.front().GetRawDataSize(), "LightSettings", + StringHelper::Sprintf("%sLightSettings0x%06X", prefix.c_str(), segmentOffset), + settings.size(), declaration); } } std::string SetLightingSettings::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "LightSettings", listName); + if (Globals::Instance->game != ZGame::MM_RETAIL) + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "EnvLightSettings", listName); + else + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "LightSettings", listName); return StringHelper::Sprintf("SCENE_CMD_ENV_LIGHT_SETTINGS(%i, %s)", settings.size(), listName.c_str()); } diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetMesh.cpp b/tools/ZAPD/ZAPD/ZRoom/Commands/SetMesh.cpp index 89c8c8c88e..9a4d30d516 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetMesh.cpp +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetMesh.cpp @@ -24,7 +24,7 @@ void SetMesh::ParseRawData() switch (meshHeaderType) { case 0: - polyType = std::make_shared(parent, segmentOffset, zRoom); + polyType = std::make_shared(parent, segmentOffset, zRoom); break; case 1: @@ -32,7 +32,7 @@ void SetMesh::ParseRawData() break; case 2: - polyType = std::make_shared(parent, segmentOffset, zRoom); + polyType = std::make_shared(parent, segmentOffset, zRoom); break; default: @@ -79,7 +79,7 @@ std::string SetMesh::GetBodySourceCode() const { std::string list; Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "", list); - return StringHelper::Sprintf("SCENE_CMD_MESH(%s)", list.c_str()); + return StringHelper::Sprintf("SCENE_CMD_ROOM_SHAPE(%s)", list.c_str()); } std::string SetMesh::GetCommandCName() const @@ -92,11 +92,11 @@ RoomCommand SetMesh::GetRoomCommand() const return RoomCommand::SetMesh; } -PolygonDlist::PolygonDlist(ZFile* nParent) : ZResource(nParent) +RoomShapeDListsEntry::RoomShapeDListsEntry(ZFile* nParent) : ZResource(nParent) { } -void PolygonDlist::ParseRawData() +void RoomShapeDListsEntry::ParseRawData() { const auto& rawData = parent->GetRawData(); switch (polyType) @@ -118,13 +118,13 @@ void PolygonDlist::ParseRawData() } } -void PolygonDlist::DeclareReferences(const std::string& prefix) +void RoomShapeDListsEntry::DeclareReferences(const std::string& prefix) { opaDList = MakeDlist(opa, prefix); xluDList = MakeDlist(xlu, prefix); } -std::string PolygonDlist::GetBodySourceCode() const +std::string RoomShapeDListsEntry::GetBodySourceCode() const { std::string bodyStr; std::string opaStr; @@ -142,7 +142,7 @@ std::string PolygonDlist::GetBodySourceCode() const return bodyStr; } -void PolygonDlist::GetSourceOutputCode(const std::string& prefix) +void RoomShapeDListsEntry::GetSourceOutputCode(const std::string& prefix) { std::string bodyStr = StringHelper::Sprintf("\n\t%s\n", GetBodySourceCode().c_str()); @@ -151,28 +151,28 @@ void PolygonDlist::GetSourceOutputCode(const std::string& prefix) if (decl == nullptr) DeclareVar(prefix, bodyStr); else - decl->text = bodyStr; + decl->declBody = bodyStr; } -std::string PolygonDlist::GetSourceTypeName() const +std::string RoomShapeDListsEntry::GetSourceTypeName() const { switch (polyType) { case 2: - return "PolygonDlist2"; + return "RoomShapeCullableEntry"; default: - return "PolygonDlist"; + return "RoomShapeDListsEntry"; } } -ZResourceType PolygonDlist::GetResourceType() const +ZResourceType RoomShapeDListsEntry::GetResourceType() const { // TODO return ZResourceType::Error; } -size_t PolygonDlist::GetRawDataSize() const +size_t RoomShapeDListsEntry::GetRawDataSize() const { switch (polyType) { @@ -184,12 +184,13 @@ size_t PolygonDlist::GetRawDataSize() const } } -void PolygonDlist::SetPolyType(uint8_t nPolyType) +void RoomShapeDListsEntry::SetPolyType(uint8_t nPolyType) { polyType = nPolyType; } -ZDisplayList* PolygonDlist::MakeDlist(segptr_t ptr, [[maybe_unused]] const std::string& prefix) +ZDisplayList* RoomShapeDListsEntry::MakeDlist(segptr_t ptr, + [[maybe_unused]] const std::string& prefix) { if (ptr == 0) { @@ -210,15 +211,15 @@ ZDisplayList* PolygonDlist::MakeDlist(segptr_t ptr, [[maybe_unused]] const std:: return dlist; } -/* BgImage */ +/* RoomShapeImageMultiBgEntry */ -BgImage::BgImage(ZFile* nParent) : ZResource(nParent) +RoomShapeImageMultiBgEntry::RoomShapeImageMultiBgEntry(ZFile* nParent) : ZResource(nParent) { } -BgImage::BgImage(bool nIsSubStruct, const std::string& prefix, uint32_t nRawDataIndex, - ZFile* nParent) - : BgImage(nParent) +RoomShapeImageMultiBgEntry::RoomShapeImageMultiBgEntry(bool nIsSubStruct, const std::string& prefix, + uint32_t nRawDataIndex, ZFile* nParent) + : RoomShapeImageMultiBgEntry(nParent) { rawDataIndex = nRawDataIndex; parent = nParent; @@ -230,7 +231,7 @@ BgImage::BgImage(bool nIsSubStruct, const std::string& prefix, uint32_t nRawData sourceBackground = MakeBackground(source, prefix); } -void BgImage::ParseRawData() +void RoomShapeImageMultiBgEntry::ParseRawData() { size_t pad = 0x00; const auto& rawData = parent->GetRawData(); @@ -252,7 +253,7 @@ void BgImage::ParseRawData() tlutCount = BitConverter::ToUInt16BE(rawData, rawDataIndex + pad + 0x14); } -ZBackground* BgImage::MakeBackground(segptr_t ptr, const std::string& prefix) +ZBackground* RoomShapeImageMultiBgEntry::MakeBackground(segptr_t ptr, const std::string& prefix) { if (ptr == 0) return nullptr; @@ -272,12 +273,12 @@ ZBackground* BgImage::MakeBackground(segptr_t ptr, const std::string& prefix) return background; } -size_t BgImage::GetRawDataSize() const +size_t RoomShapeImageMultiBgEntry::GetRawDataSize() const { return 0x1C; } -std::string BgImage::GetBodySourceCode() const +std::string RoomShapeImageMultiBgEntry::GetBodySourceCode() const { std::string bodyStr = " "; if (!isSubStruct) @@ -340,12 +341,12 @@ std::string BgImage::GetBodySourceCode() const return bodyStr; } -std::string BgImage::GetSourceTypeName() const +std::string RoomShapeImageMultiBgEntry::GetSourceTypeName() const { - return "BgImage"; + return "RoomShapeImageMultiBgEntry"; } -ZResourceType BgImage::GetResourceType() const +ZResourceType RoomShapeImageMultiBgEntry::GetResourceType() const { // TODO return ZResourceType::Error; @@ -371,7 +372,7 @@ void PolygonTypeBase::DeclareAndGenerateOutputCode(const std::string& prefix) } else { - decl->text = bodyStr; + decl->declBody = bodyStr; } } @@ -380,13 +381,13 @@ std::string PolygonTypeBase::GetSourceTypeName() const switch (type) { case 2: - return "PolygonType2"; + return "RoomShapeCullable"; case 1: return "PolygonType1"; default: - return "PolygonType0"; + return "RoomShapeNormal"; } } @@ -416,7 +417,7 @@ void PolygonType1::ParseRawData() if (dlist != 0) { - PolygonDlist polyGfxList(parent); + RoomShapeDListsEntry polyGfxList(parent); polyGfxList.zRoom = zRoom; polyGfxList.SetPolyType(type); polyGfxList.ExtractFromFile(Seg2Filespace(dlist, parent->baseAddress)); @@ -434,7 +435,7 @@ void PolygonType1::DeclareReferences(const std::string& prefix) switch (format) { case 1: - single = BgImage(true, prefix, rawDataIndex + 0x08, parent); + single = RoomShapeImageMultiBgEntry(true, prefix, rawDataIndex + 0x08, parent); break; case 2: @@ -446,7 +447,7 @@ void PolygonType1::DeclareReferences(const std::string& prefix) multiList.reserve(count); for (size_t i = 0; i < count; ++i) { - BgImage bg(false, prefix, auxPtr, parent); + RoomShapeImageMultiBgEntry bg(false, prefix, auxPtr, parent); multiList.push_back(bg); auxPtr += bg.GetRawDataSize(); bgImageArrayBody += bg.GetBodySourceCode(); @@ -507,7 +508,7 @@ std::string PolygonType1::GetBodySourceCode() const bodyStr += single.GetBodySourceCode(); break; case 2: - Globals::Instance->GetSegmentedPtrName(list, parent, "BgImage", listStr); + Globals::Instance->GetSegmentedPtrName(list, parent, "RoomShapeImageMultiBgEntry", listStr); bodyStr += StringHelper::Sprintf(" %i, %s, \n", count, listStr.c_str()); break; @@ -523,21 +524,21 @@ std::string PolygonType1::GetSourceTypeName() const switch (format) { case 1: - return "MeshHeader1Single"; + return "RoomShapeImageSingle"; case 2: - return "MeshHeader1Multi"; + return "RoomShapeImageMulti"; } return "ERROR"; // return "PolygonType1"; } -PolygonType2::PolygonType2(ZFile* nParent, uint32_t nRawDataIndex, ZRoom* nRoom) +RoomShapeCullable::RoomShapeCullable(ZFile* nParent, uint32_t nRawDataIndex, ZRoom* nRoom) : PolygonTypeBase(nParent, nRawDataIndex, nRoom) { } -void PolygonType2::ParseRawData() +void RoomShapeCullable::ParseRawData() { const auto& rawData = parent->GetRawData(); @@ -551,7 +552,7 @@ void PolygonType2::ParseRawData() polyDLists.reserve(num); for (size_t i = 0; i < num; i++) { - PolygonDlist entry(parent); + RoomShapeDListsEntry entry(parent); entry.zRoom = zRoom; entry.SetPolyType(type); entry.ExtractFromFile(currentPtr); @@ -561,7 +562,7 @@ void PolygonType2::ParseRawData() } } -void PolygonType2::DeclareReferences(const std::string& prefix) +void RoomShapeCullable::DeclareReferences(const std::string& prefix) { if (num > 0) { @@ -593,7 +594,7 @@ void PolygonType2::DeclareReferences(const std::string& prefix) "0x01000000"); } -std::string PolygonType2::GetBodySourceCode() const +std::string RoomShapeCullable::GetBodySourceCode() const { std::string listName; Globals::Instance->GetSegmentedPtrName(start, parent, "", listName); @@ -605,12 +606,12 @@ std::string PolygonType2::GetBodySourceCode() const return body; } -size_t PolygonType2::GetRawDataSize() const +size_t RoomShapeCullable::GetRawDataSize() const { return 0x0C; } -DeclarationAlignment PolygonType2::GetDeclarationAlignment() const +DeclarationAlignment RoomShapeCullable::GetDeclarationAlignment() const { return DeclarationAlignment::Align4; } diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetMesh.h b/tools/ZAPD/ZAPD/ZRoom/Commands/SetMesh.h index 9d9037417b..c0f15da9d3 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetMesh.h +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetMesh.h @@ -5,7 +5,7 @@ #include "ZDisplayList.h" #include "ZRoom/ZRoomCommand.h" -class PolygonDlist : public ZResource +class RoomShapeDListsEntry : public ZResource { public: ZRoom* zRoom; @@ -21,7 +21,7 @@ public: ZDisplayList* opaDList = nullptr; // Gfx* ZDisplayList* xluDList = nullptr; // Gfx* - PolygonDlist(ZFile* nParent); + RoomShapeDListsEntry(ZFile* nParent); void ParseRawData() override; void DeclareReferences(const std::string& prefix) override; @@ -41,7 +41,7 @@ protected: ZDisplayList* MakeDlist(segptr_t ptr, const std::string& prefix); }; -class BgImage : public ZResource +class RoomShapeImageMultiBgEntry : public ZResource { public: uint16_t unk_00; @@ -60,8 +60,9 @@ public: bool isSubStruct; - BgImage(ZFile* nParent); - BgImage(bool nIsSubStruct, const std::string& prefix, uint32_t nRawDataIndex, ZFile* nParent); + RoomShapeImageMultiBgEntry(ZFile* nParent); + RoomShapeImageMultiBgEntry(bool nIsSubStruct, const std::string& prefix, uint32_t nRawDataIndex, + ZFile* nParent); void ParseRawData() override; @@ -80,7 +81,7 @@ class PolygonTypeBase : public ZResource { public: uint8_t type; - std::vector polyDLists; + std::vector polyDLists; PolygonTypeBase(ZFile* nParent, uint32_t nRawDataIndex, ZRoom* nRoom); @@ -100,12 +101,12 @@ public: segptr_t dlist; // single - BgImage single; + RoomShapeImageMultiBgEntry single; // multi uint8_t count; - segptr_t list; // BgImage* - std::vector multiList; + segptr_t list; // RoomShapeImageMultiBgEntry* + std::vector multiList; PolygonType1(ZFile* nParent, uint32_t nRawDataIndex, ZRoom* nRoom); @@ -119,14 +120,14 @@ public: size_t GetRawDataSize() const override; }; -class PolygonType2 : public PolygonTypeBase +class RoomShapeCullable : public PolygonTypeBase { public: uint8_t num; segptr_t start; segptr_t end; - PolygonType2(ZFile* nParent, uint32_t nRawDataIndex, ZRoom* nRoom); + RoomShapeCullable(ZFile* nParent, uint32_t nRawDataIndex, ZRoom* nRoom); void ParseRawData() override; void DeclareReferences(const std::string& prefix) override; diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetMinimapList.cpp b/tools/ZAPD/ZAPD/ZRoom/Commands/SetMinimapList.cpp index 370afdf0c1..a5aac2a543 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetMinimapList.cpp +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetMinimapList.cpp @@ -15,7 +15,7 @@ void SetMinimapList::ParseRawData() ZRoomCommand::ParseRawData(); listSegmentAddr = BitConverter::ToInt32BE(parent->GetRawData(), segmentOffset); listSegmentOffset = GETSEGOFFSET(listSegmentAddr); - unk4 = BitConverter::ToInt32BE(parent->GetRawData(), segmentOffset + 4); + scale = BitConverter::ToInt16BE(parent->GetRawData(), segmentOffset + 4); uint32_t currentPtr = listSegmentOffset; @@ -54,7 +54,7 @@ void SetMinimapList::DeclareReferences(const std::string& prefix) { std::string listName; Globals::Instance->GetSegmentedPtrName(listSegmentAddr, parent, "MinimapEntry", listName); - std::string declaration = StringHelper::Sprintf("\n\t%s, 0x%08X\n", listName.c_str(), unk4); + std::string declaration = StringHelper::Sprintf("\n\t%s, %d\n", listName.c_str(), scale); parent->AddDeclaration( segmentOffset, DeclarationAlignment::Align4, 8, "MinimapList", diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetMinimapList.h b/tools/ZAPD/ZAPD/ZRoom/Commands/SetMinimapList.h index 5b18b3dd78..fcf7ad7a6f 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetMinimapList.h +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetMinimapList.h @@ -35,5 +35,5 @@ public: private: segptr_t listSegmentAddr; uint32_t listSegmentOffset; - uint32_t unk4; + int16_t scale; }; diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetPathways.cpp b/tools/ZAPD/ZAPD/ZRoom/Commands/SetPathways.cpp index 52d400a848..967d10b8d5 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetPathways.cpp +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetPathways.cpp @@ -24,7 +24,7 @@ void SetPathways::ParseRawDataLate() { if (Globals::Instance->game == ZGame::MM_RETAIL) { - auto numPaths = zRoom->GetDeclarationSizeFromNeighbor(segmentOffset) / 8; + auto numPaths = zRoom->parent->GetDeclarationSizeFromNeighbor(segmentOffset) / 8; pathwayList.SetNumPaths(numPaths); } diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetSpecialObjects.cpp b/tools/ZAPD/ZAPD/ZRoom/Commands/SetSpecialObjects.cpp index 696a3de014..34edf5ae63 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetSpecialObjects.cpp +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetSpecialObjects.cpp @@ -17,8 +17,14 @@ void SetSpecialObjects::ParseRawData() std::string SetSpecialObjects::GetBodySourceCode() const { + EnumData* enumData = &Globals::Instance->cfg.enumData; std::string objectName = ZNames::GetObjectName(globalObject); + if (enumData->naviQuestHintType.find(elfMessage) != enumData->naviQuestHintType.end()) + return StringHelper::Sprintf("SCENE_CMD_SPECIAL_FILES(%s, %s)", + enumData->naviQuestHintType[elfMessage].c_str(), + objectName.c_str()); + return StringHelper::Sprintf("SCENE_CMD_SPECIAL_FILES(0x%02X, %s)", elfMessage, objectName.c_str()); } diff --git a/tools/ZAPD/ZAPD/ZRoom/Commands/SetWorldMapVisited.cpp b/tools/ZAPD/ZAPD/ZRoom/Commands/SetWorldMapVisited.cpp index d20e4a3e29..fa28547e62 100644 --- a/tools/ZAPD/ZAPD/ZRoom/Commands/SetWorldMapVisited.cpp +++ b/tools/ZAPD/ZAPD/ZRoom/Commands/SetWorldMapVisited.cpp @@ -1,6 +1,7 @@ #include "SetWorldMapVisited.h" #include "Utils/StringHelper.h" +#include "Globals.h" SetWorldMapVisited::SetWorldMapVisited(ZFile* nParent) : ZRoomCommand(nParent) { @@ -8,7 +9,10 @@ SetWorldMapVisited::SetWorldMapVisited(ZFile* nParent) : ZRoomCommand(nParent) std::string SetWorldMapVisited::GetBodySourceCode() const { - return "SCENE_CMD_MISC_SETTINGS()"; + if (Globals::Instance->game == ZGame::MM_RETAIL) + return "SCENE_CMD_SET_REGION_VISITED()"; + else + return "SCENE_CMD_MISC_SETTINGS()"; } std::string SetWorldMapVisited::GetCommandCName() const diff --git a/tools/ZAPD/ZAPD/ZRoom/ZNames.h b/tools/ZAPD/ZAPD/ZRoom/ZNames.h index 667407c363..83c217e999 100644 --- a/tools/ZAPD/ZAPD/ZRoom/ZNames.h +++ b/tools/ZAPD/ZAPD/ZRoom/ZNames.h @@ -48,11 +48,12 @@ public: static std::string GetEntranceName(uint16_t id) { if (ZNames::GetNumEntrances() == 0 || ZNames::GetNumSpecialEntrances() == 0) - return StringHelper::Sprintf("0x%04X", id); - + return StringHelper::Sprintf("0x%04X", id); + if (id < ZNames::GetNumEntrances()) return Globals::Instance->cfg.entranceList[id]; - else if ((id >= 0x7FF9 && id <= 0x7FFF) && !((id - 0x7FF9U) > GetNumSpecialEntrances())) // Special entrances + else if ((id >= 0x7FF9 && id <= 0x7FFF) && + !((id - 0x7FF9U) > GetNumSpecialEntrances())) // Special entrances return Globals::Instance->cfg.specialEntranceList[id - 0x7FF9]; else return StringHelper::Sprintf("0x%04X", id); @@ -60,5 +61,8 @@ public: static size_t GetNumActors() { return Globals::Instance->cfg.actorList.size(); } static size_t GetNumEntrances() { return Globals::Instance->cfg.entranceList.size(); } - static size_t GetNumSpecialEntrances() { return Globals::Instance->cfg.specialEntranceList.size(); } + static size_t GetNumSpecialEntrances() + { + return Globals::Instance->cfg.specialEntranceList.size(); + } }; diff --git a/tools/ZAPD/ZAPD/ZRoom/ZRoom.cpp b/tools/ZAPD/ZAPD/ZRoom/ZRoom.cpp index 5831eaa56b..a291c36feb 100644 --- a/tools/ZAPD/ZAPD/ZRoom/ZRoom.cpp +++ b/tools/ZAPD/ZAPD/ZRoom/ZRoom.cpp @@ -6,7 +6,7 @@ #include #include "Commands/EndMarker.h" -#include "Commands/SetActorCutsceneList.h" +#include "Commands/SetCutsceneEntryList.h" #include "Commands/SetActorList.h" #include "Commands/SetAlternateHeaders.h" #include "Commands/SetAnimatedMaterialList.h" @@ -64,18 +64,14 @@ ZRoom::~ZRoom() delete cmd; } -void ZRoom::ExtractFromXML(tinyxml2::XMLElement* reader, uint32_t nRawDataIndex) +void ZRoom::ExtractWithXML(tinyxml2::XMLElement* reader, uint32_t nRawDataIndex) { - ZResource::ExtractFromXML(reader, nRawDataIndex); + ZResource::ExtractWithXML(reader, nRawDataIndex); if (hackMode == "syotes_room") - { - SyotesRoomHack(); - } + SyotesRoomFix(); else - { DeclareVar(name, ""); - } } void ZRoom::ExtractFromBinary(uint32_t nRawDataIndex, ZResourceType parentType) @@ -338,9 +334,9 @@ std::string ZRoom::GetDefaultName(const std::string& prefix) const * back to very early in the game's development. Since this room is a special case, * declare automatically the data its contains whitout the need of a header. */ -void ZRoom::SyotesRoomHack() +void ZRoom::SyotesRoomFix() { - PolygonType2 poly(parent, 0, this); + RoomShapeCullable poly(parent, 0, this); poly.ParseRawData(); poly.DeclareReferences(GetName()); @@ -360,20 +356,6 @@ ZRoomCommand* ZRoom::FindCommandOfType(RoomCommand cmdType) return nullptr; } -size_t ZRoom::GetDeclarationSizeFromNeighbor(uint32_t declarationAddress) -{ - auto currentDecl = parent->declarations.find(declarationAddress); - if (currentDecl == parent->declarations.end()) - return 0; - - auto nextDecl = currentDecl; - std::advance(nextDecl, 1); - if (nextDecl == parent->declarations.end()) - return parent->GetRawData().size() - currentDecl->first; - - return nextDecl->first - currentDecl->first; -} - size_t ZRoom::GetCommandSizeFromNeighbor(ZRoomCommand* cmd) { int32_t cmdIndex = -1; diff --git a/tools/ZAPD/ZAPD/ZRoom/ZRoom.h b/tools/ZAPD/ZAPD/ZRoom/ZRoom.h index e837ec70ac..950dbbb182 100644 --- a/tools/ZAPD/ZAPD/ZRoom/ZRoom.h +++ b/tools/ZAPD/ZAPD/ZRoom/ZRoom.h @@ -22,7 +22,7 @@ public: ZRoom(ZFile* nParent); virtual ~ZRoom(); - void ExtractFromXML(tinyxml2::XMLElement* reader, uint32_t nRawDataIndex) override; + void ExtractWithXML(tinyxml2::XMLElement* reader, uint32_t nRawDataIndex) override; void ExtractFromBinary(uint32_t nRawDataIndex, ZResourceType parentType); void ParseXML(tinyxml2::XMLElement* reader) override; @@ -37,7 +37,6 @@ public: void GetSourceOutputCode(const std::string& prefix) override; std::string GetDefaultName(const std::string& prefix) const override; - size_t GetDeclarationSizeFromNeighbor(uint32_t declarationAddress); size_t GetCommandSizeFromNeighbor(ZRoomCommand* cmd); ZRoomCommand* FindCommandOfType(RoomCommand cmdType); @@ -46,5 +45,5 @@ public: ZResourceType GetResourceType() const override; protected: - void SyotesRoomHack(); + void SyotesRoomFix(); }; diff --git a/tools/ZAPD/ZAPD/ZSkeleton.cpp b/tools/ZAPD/ZAPD/ZSkeleton.cpp index ca680c5f5e..86b578639f 100644 --- a/tools/ZAPD/ZAPD/ZSkeleton.cpp +++ b/tools/ZAPD/ZAPD/ZSkeleton.cpp @@ -189,7 +189,7 @@ std::string ZSkeleton::GetSourceTypeName() const case ZSkeletonType::Flex: return "FlexSkeletonHeader"; case ZSkeletonType::Curve: - return "SkelCurveLimbList"; + return "CurveSkeletonHeader"; } return "SkeletonHeader"; diff --git a/tools/ZAPD/ZAPD/ZTexture.cpp b/tools/ZAPD/ZAPD/ZTexture.cpp index 74b7c7d106..0ecda1a8ce 100644 --- a/tools/ZAPD/ZAPD/ZTexture.cpp +++ b/tools/ZAPD/ZAPD/ZTexture.cpp @@ -137,31 +137,31 @@ void ZTexture::ParseRawData() switch (format) { case TextureType::RGBA16bpp: - PrepareBitmapRGBA16(); + ConvertN64ToBitmap_RGBA16(); break; case TextureType::RGBA32bpp: - PrepareBitmapRGBA32(); + ConvertN64ToBitmap_RGBA32(); break; case TextureType::Grayscale4bpp: - PrepareBitmapGrayscale4(); + ConvertN64ToBitmap_Grayscale4(); break; case TextureType::Grayscale8bpp: - PrepareBitmapGrayscale8(); + ConvertN64ToBitmap_Grayscale8(); break; case TextureType::GrayscaleAlpha4bpp: - PrepareBitmapGrayscaleAlpha4(); + ConvertN64ToBitmap_GrayscaleAlpha4(); break; case TextureType::GrayscaleAlpha8bpp: - PrepareBitmapGrayscaleAlpha8(); + ConvertN64ToBitmap_GrayscaleAlpha8(); break; case TextureType::GrayscaleAlpha16bpp: - PrepareBitmapGrayscaleAlpha16(); + ConvertN64ToBitmap_GrayscaleAlpha16(); break; case TextureType::Palette4bpp: - PrepareBitmapPalette4(); + ConvertN64ToBitmap_Palette4(); break; case TextureType::Palette8bpp: - PrepareBitmapPalette8(); + ConvertN64ToBitmap_Palette8(); break; case TextureType::Error: HANDLE_ERROR_RESOURCE(WarningType::InvalidAttributeValue, parent, this, rawDataIndex, @@ -212,10 +212,10 @@ void ZTexture::ParseRawDataLate() } } -void ZTexture::PrepareBitmapRGBA16() +void ZTexture::ConvertN64ToBitmap_RGBA16() { textureData.InitEmptyRGBImage(width, height, true); - auto parentRawData = parent->GetRawData(); + const auto& parentRawData = parent->GetRawData(); for (size_t y = 0; y < height; y++) { for (size_t x = 0; x < width; x++) @@ -227,15 +227,16 @@ void ZTexture::PrepareBitmapRGBA16() uint8_t b = (data & 0x003E) >> 1; uint8_t alpha = data & 0x01; - textureData.SetRGBPixel(y, x, r * 8, g * 8, b * 8, alpha * 255); + textureData.SetRGBPixel(y, x, (r << 3) | (r >> 2), (g << 3) | (g >> 2), + (b << 3) | (b >> 2), alpha * 255); } } } -void ZTexture::PrepareBitmapRGBA32() +void ZTexture::ConvertN64ToBitmap_RGBA32() { textureData.InitEmptyRGBImage(width, height, true); - auto parentRawData = parent->GetRawData(); + const auto& parentRawData = parent->GetRawData(); for (size_t y = 0; y < height; y++) { for (size_t x = 0; x < width; x++) @@ -251,10 +252,10 @@ void ZTexture::PrepareBitmapRGBA32() } } -void ZTexture::PrepareBitmapGrayscale4() +void ZTexture::ConvertN64ToBitmap_Grayscale4() { textureData.InitEmptyRGBImage(width, height, false); - auto parentRawData = parent->GetRawData(); + const auto& parentRawData = parent->GetRawData(); for (size_t y = 0; y < height; y++) { for (size_t x = 0; x < width; x += 2) @@ -269,16 +270,16 @@ void ZTexture::PrepareBitmapGrayscale4() else grayscale = (parentRawData.at(pos) & 0x0F) << 4; - textureData.SetGrayscalePixel(y, x + i, grayscale); + textureData.SetGrayscalePixel(y, x + i, (grayscale << 4) | grayscale); } } } } -void ZTexture::PrepareBitmapGrayscale8() +void ZTexture::ConvertN64ToBitmap_Grayscale8() { textureData.InitEmptyRGBImage(width, height, false); - auto parentRawData = parent->GetRawData(); + const auto& parentRawData = parent->GetRawData(); for (size_t y = 0; y < height; y++) { for (size_t x = 0; x < width; x++) @@ -290,10 +291,10 @@ void ZTexture::PrepareBitmapGrayscale8() } } -void ZTexture::PrepareBitmapGrayscaleAlpha4() +void ZTexture::ConvertN64ToBitmap_GrayscaleAlpha4() { textureData.InitEmptyRGBImage(width, height, true); - auto parentRawData = parent->GetRawData(); + const auto& parentRawData = parent->GetRawData(); for (size_t y = 0; y < height; y++) { for (size_t x = 0; x < width; x += 2) @@ -308,8 +309,9 @@ void ZTexture::PrepareBitmapGrayscaleAlpha4() else data = parentRawData.at(pos) & 0x0F; - uint8_t grayscale = ((data & 0x0E) >> 1) * 32; - uint8_t alpha = (data & 0x01) * 255; + uint8_t grayscale = data & 0b1110; + grayscale = (grayscale << 4) | (grayscale << 1) | (grayscale >> 2); + uint8_t alpha = (data & 0x01) ? 255 : 0; textureData.SetGrayscalePixel(y, x + i, grayscale, alpha); } @@ -317,27 +319,32 @@ void ZTexture::PrepareBitmapGrayscaleAlpha4() } } -void ZTexture::PrepareBitmapGrayscaleAlpha8() +void ZTexture::ConvertN64ToBitmap_GrayscaleAlpha8() { textureData.InitEmptyRGBImage(width, height, true); - auto parentRawData = parent->GetRawData(); + const auto& parentRawData = parent->GetRawData(); for (size_t y = 0; y < height; y++) { for (size_t x = 0; x < width; x++) { size_t pos = rawDataIndex + ((y * width) + x) * 1; - uint8_t grayscale = parentRawData.at(pos) & 0xF0; - uint8_t alpha = (parentRawData.at(pos) & 0x0F) << 4; + uint8_t pixel = parentRawData.at(pos); + uint8_t data = (pixel >> 4) & 0xF; + + data = (data << 4) | data; + uint8_t grayscale = data; + uint8_t alpha = (pixel & 0xF); + alpha = (alpha << 4) | alpha; textureData.SetGrayscalePixel(y, x, grayscale, alpha); } } } -void ZTexture::PrepareBitmapGrayscaleAlpha16() +void ZTexture::ConvertN64ToBitmap_GrayscaleAlpha16() { textureData.InitEmptyRGBImage(width, height, true); - auto parentRawData = parent->GetRawData(); + const auto& parentRawData = parent->GetRawData(); for (size_t y = 0; y < height; y++) { for (size_t x = 0; x < width; x++) @@ -351,10 +358,10 @@ void ZTexture::PrepareBitmapGrayscaleAlpha16() } } -void ZTexture::PrepareBitmapPalette4() +void ZTexture::ConvertN64ToBitmap_Palette4() { textureData.InitEmptyPaletteImage(width, height); - auto parentRawData = parent->GetRawData(); + const auto& parentRawData = parent->GetRawData(); for (size_t y = 0; y < height; y++) { for (size_t x = 0; x < width; x += 2) @@ -375,10 +382,10 @@ void ZTexture::PrepareBitmapPalette4() } } -void ZTexture::PrepareBitmapPalette8() +void ZTexture::ConvertN64ToBitmap_Palette8() { textureData.InitEmptyPaletteImage(width, height); - auto parentRawData = parent->GetRawData(); + const auto& parentRawData = parent->GetRawData(); for (size_t y = 0; y < height; y++) { for (size_t x = 0; x < width; x++) @@ -428,31 +435,31 @@ void ZTexture::PrepareRawDataFromFile(const fs::path& pngFilePath) switch (format) { case TextureType::RGBA16bpp: - PrepareRawDataRGBA16(); + ConvertBitmapToN64_RGBA16(); break; case TextureType::RGBA32bpp: - PrepareRawDataRGBA32(); + ConvertBitmapToN64_RGBA32(); break; case TextureType::Grayscale4bpp: - PrepareRawDataGrayscale4(); + ConvertBitmapToN64_Grayscale4(); break; case TextureType::Grayscale8bpp: - PrepareRawDataGrayscale8(); + ConvertBitmapToN64_Grayscale8(); break; case TextureType::GrayscaleAlpha4bpp: - PrepareRawDataGrayscaleAlpha4(); + ConvertBitmapToN64_GrayscaleAlpha4(); break; case TextureType::GrayscaleAlpha8bpp: - PrepareRawDataGrayscaleAlpha8(); + ConvertBitmapToN64_GrayscaleAlpha8(); break; case TextureType::GrayscaleAlpha16bpp: - PrepareRawDataGrayscaleAlpha16(); + ConvertBitmapToN64_GrayscaleAlpha16(); break; case TextureType::Palette4bpp: - PrepareRawDataPalette4(); + ConvertBitmapToN64_Palette4(); break; case TextureType::Palette8bpp: - PrepareRawDataPalette8(); + ConvertBitmapToN64_Palette8(); break; case TextureType::Error: HANDLE_ERROR_PROCESS(WarningType::InvalidPNG, "Input PNG file has invalid format type", ""); @@ -460,7 +467,7 @@ void ZTexture::PrepareRawDataFromFile(const fs::path& pngFilePath) } } -void ZTexture::PrepareRawDataRGBA16() +void ZTexture::ConvertBitmapToN64_RGBA16() { for (uint16_t y = 0; y < height; y++) { @@ -469,13 +476,13 @@ void ZTexture::PrepareRawDataRGBA16() size_t pos = ((y * width) + x) * 2; RGBAPixel pixel = textureData.GetPixel(y, x); - uint8_t r = pixel.r / 8; - uint8_t g = pixel.g / 8; - uint8_t b = pixel.b / 8; + uint8_t r = pixel.r >> 3; + uint8_t g = pixel.g >> 3; + uint8_t b = pixel.b >> 3; uint8_t alphaBit = pixel.a != 0; - uint16_t data = (r << 11) + (g << 6) + (b << 1) + alphaBit; + uint16_t data = (r << 11) | (g << 6) | (b << 1) | alphaBit; textureDataRaw[pos + 0] = (data & 0xFF00) >> 8; textureDataRaw[pos + 1] = (data & 0x00FF); @@ -483,7 +490,7 @@ void ZTexture::PrepareRawDataRGBA16() } } -void ZTexture::PrepareRawDataRGBA32() +void ZTexture::ConvertBitmapToN64_RGBA32() { for (uint16_t y = 0; y < height; y++) { @@ -500,7 +507,7 @@ void ZTexture::PrepareRawDataRGBA32() } } -void ZTexture::PrepareRawDataGrayscale4() +void ZTexture::ConvertBitmapToN64_Grayscale4() { for (uint16_t y = 0; y < height; y++) { @@ -515,7 +522,7 @@ void ZTexture::PrepareRawDataGrayscale4() } } -void ZTexture::PrepareRawDataGrayscale8() +void ZTexture::ConvertBitmapToN64_Grayscale8() { for (uint16_t y = 0; y < height; y++) { @@ -528,7 +535,7 @@ void ZTexture::PrepareRawDataGrayscale8() } } -void ZTexture::PrepareRawDataGrayscaleAlpha4() +void ZTexture::ConvertBitmapToN64_GrayscaleAlpha4() { for (uint16_t y = 0; y < height; y++) { @@ -544,9 +551,9 @@ void ZTexture::PrepareRawDataGrayscaleAlpha4() uint8_t alphaBit = pixel.a != 0; if (i == 0) - data |= (((cR / 32) << 1) + alphaBit) << 4; + data = (((cR >> 5) << 1) | alphaBit) << 4; else - data |= ((cR / 32) << 1) + alphaBit; + data |= ((cR >> 5) << 1) | alphaBit; } textureDataRaw[pos] = data; @@ -554,7 +561,7 @@ void ZTexture::PrepareRawDataGrayscaleAlpha4() } } -void ZTexture::PrepareRawDataGrayscaleAlpha8() +void ZTexture::ConvertBitmapToN64_GrayscaleAlpha8() { for (uint16_t y = 0; y < height; y++) { @@ -563,15 +570,15 @@ void ZTexture::PrepareRawDataGrayscaleAlpha8() size_t pos = ((y * width) + x) * 1; RGBAPixel pixel = textureData.GetPixel(y, x); - uint8_t r = pixel.r; - uint8_t a = pixel.a; + uint8_t r = (pixel.r >> 4) & 0xF; + uint8_t a = (pixel.a >> 4) & 0xF; - textureDataRaw[pos] = ((r / 16) << 4) + (a / 16); + textureDataRaw[pos] = (r << 4) | a; } } } -void ZTexture::PrepareRawDataGrayscaleAlpha16() +void ZTexture::ConvertBitmapToN64_GrayscaleAlpha16() { for (uint16_t y = 0; y < height; y++) { @@ -589,7 +596,7 @@ void ZTexture::PrepareRawDataGrayscaleAlpha16() } } -void ZTexture::PrepareRawDataPalette4() +void ZTexture::ConvertBitmapToN64_Palette4() { for (uint16_t y = 0; y < height; y++) { @@ -605,7 +612,7 @@ void ZTexture::PrepareRawDataPalette4() } } -void ZTexture::PrepareRawDataPalette8() +void ZTexture::ConvertBitmapToN64_Palette8() { for (uint16_t y = 0; y < height; y++) { @@ -770,10 +777,10 @@ Declaration* ZTexture::DeclareVar(const std::string& prefix, auto filepath = Globals::Instance->outputPath / fs::path(auxOutName).stem(); if (dWordAligned) - incStr = - StringHelper::Sprintf("%s.%s.inc.c", filepath.c_str(), GetExternalExtension().c_str()); + incStr = StringHelper::Sprintf("%s.%s.inc.c", filepath.string().c_str(), + GetExternalExtension().c_str()); else - incStr = StringHelper::Sprintf("%s.u32.%s.inc.c", filepath.c_str(), + incStr = StringHelper::Sprintf("%s.u32.%s.inc.c", filepath.string().c_str(), GetExternalExtension().c_str()); if (!Globals::Instance->cfg.texturePool.empty()) @@ -785,18 +792,31 @@ Declaration* ZTexture::DeclareVar(const std::string& prefix, if (poolEntry != Globals::Instance->cfg.texturePool.end()) { if (dWordAligned) - incStr = StringHelper::Sprintf("%s.%s.inc.c", poolEntry->second.path.c_str(), - GetExternalExtension().c_str()); + incStr = + StringHelper::Sprintf("%s.%s.inc.c", poolEntry->second.path.string().c_str(), + GetExternalExtension().c_str()); else - incStr = StringHelper::Sprintf("%s.u32.%s.inc.c", poolEntry->second.path.c_str(), + incStr = StringHelper::Sprintf("%s.u32.%s.inc.c", + poolEntry->second.path.string().c_str(), GetExternalExtension().c_str()); } } size_t texSizeDivisor = (dWordAligned) ? 8 : 4; - Declaration* decl = parent->AddDeclarationIncludeArray(rawDataIndex, incStr, GetRawDataSize(), - GetSourceTypeName(), auxName, - GetRawDataSize() / texSizeDivisor); + Declaration* decl; + + if (parent->makeDefines) + { + decl = parent->AddDeclarationIncludeArray(rawDataIndex, incStr, GetRawDataSize(), + GetSourceTypeName(), auxName, GetHeaderDefines(), + GetRawDataSize() / texSizeDivisor); + } + else + { + decl = parent->AddDeclarationIncludeArray(rawDataIndex, incStr, GetRawDataSize(), + GetSourceTypeName(), auxName, + GetRawDataSize() / texSizeDivisor); + } decl->staticConf = staticConf; return decl; } @@ -827,6 +847,17 @@ std::string ZTexture::GetBodySourceCode() const return sourceOutput; } +std::string ZTexture::GetHeaderDefines() const +{ + std::string definePrefix = StringHelper::camelCaseTo_SCREAMING_SNAKE_CASE(name.c_str(), true); + std::string ret = StringHelper::Sprintf("#define %s_WIDTH %d\n", definePrefix.c_str(), width); + + ret += StringHelper::Sprintf("#define %s_HEIGHT %d\n", definePrefix.c_str(), height); + ret += StringHelper::Sprintf("#define %s_SIZE 0x%zX\n", definePrefix.c_str(), GetRawDataSize()); + + return ret; +} + bool ZTexture::IsExternalResource() const { return true; @@ -844,7 +875,7 @@ std::string ZTexture::GetSourceTypeName() const void ZTexture::CalcHash() { - auto parentRawData = parent->GetRawData(); + const auto& parentRawData = parent->GetRawData(); hash = CRC32B(parentRawData.data() + rawDataIndex, GetRawDataSize()); } diff --git a/tools/ZAPD/ZAPD/ZTexture.h b/tools/ZAPD/ZAPD/ZTexture.h index 8cece3ff24..1461ff95a6 100644 --- a/tools/ZAPD/ZAPD/ZTexture.h +++ b/tools/ZAPD/ZAPD/ZTexture.h @@ -30,26 +30,28 @@ protected: ZTexture* tlut = nullptr; bool splitTlut; - void PrepareBitmapRGBA16(); - void PrepareBitmapRGBA32(); - void PrepareBitmapGrayscale8(); - void PrepareBitmapGrayscaleAlpha8(); - void PrepareBitmapGrayscale4(); - void PrepareBitmapGrayscaleAlpha4(); - void PrepareBitmapGrayscaleAlpha16(); - void PrepareBitmapPalette4(); - void PrepareBitmapPalette8(); + // The following functions convert from N64 binary data to a bitmap to be saved to a PNG. + void ConvertN64ToBitmap_RGBA16(); + void ConvertN64ToBitmap_RGBA32(); + void ConvertN64ToBitmap_Grayscale8(); + void ConvertN64ToBitmap_GrayscaleAlpha8(); + void ConvertN64ToBitmap_Grayscale4(); + void ConvertN64ToBitmap_GrayscaleAlpha4(); + void ConvertN64ToBitmap_GrayscaleAlpha16(); + void ConvertN64ToBitmap_Palette4(); + void ConvertN64ToBitmap_Palette8(); + // The following functions convert from a bitmap to N64 binary data. void PrepareRawDataFromFile(const fs::path& inFolder); - void PrepareRawDataRGBA16(); - void PrepareRawDataRGBA32(); - void PrepareRawDataGrayscale4(); - void PrepareRawDataGrayscale8(); - void PrepareRawDataGrayscaleAlpha4(); - void PrepareRawDataGrayscaleAlpha8(); - void PrepareRawDataGrayscaleAlpha16(); - void PrepareRawDataPalette4(); - void PrepareRawDataPalette8(); + void ConvertBitmapToN64_RGBA16(); + void ConvertBitmapToN64_RGBA32(); + void ConvertBitmapToN64_Grayscale4(); + void ConvertBitmapToN64_Grayscale8(); + void ConvertBitmapToN64_GrayscaleAlpha4(); + void ConvertBitmapToN64_GrayscaleAlpha8(); + void ConvertBitmapToN64_GrayscaleAlpha16(); + void ConvertBitmapToN64_Palette4(); + void ConvertBitmapToN64_Palette8(); public: ZTexture(ZFile* nParent); @@ -68,9 +70,15 @@ public: Declaration* DeclareVar(const std::string& prefix, const std::string& bodyStr) override; std::string GetBodySourceCode() const override; + + /// + /// Calculates the hash of this texture, for use with the texture pool. + /// void CalcHash() override; + void Save(const fs::path& outFolder) override; + std::string GetHeaderDefines() const; bool IsExternalResource() const override; std::string GetSourceTypeName() const override; ZResourceType GetResourceType() const override; @@ -83,10 +91,28 @@ public: uint32_t GetWidth() const; uint32_t GetHeight() const; void SetDimensions(uint32_t nWidth, uint32_t nHeight); + + /// + /// Returns how many bytes each pixel takes up. + /// + /// float GetPixelMultiplyer() const; + TextureType GetTextureType() const; + + /// + /// Returns the path to the texture pool, taken from the config file. + /// + /// + /// fs::path GetPoolOutPath(const fs::path& defaultValue); + + /// + /// Returns if this texture uses a palette. + /// + /// bool IsColorIndexed() const; + void SetTlut(ZTexture* nTlut); bool HasTlut() const; void ParseRawDataLate() override; diff --git a/tools/ZAPD/ZAPD/ZTextureAnimation.cpp b/tools/ZAPD/ZAPD/ZTextureAnimation.cpp index 698054fa87..0c55b26097 100644 --- a/tools/ZAPD/ZAPD/ZTextureAnimation.cpp +++ b/tools/ZAPD/ZAPD/ZTextureAnimation.cpp @@ -569,6 +569,7 @@ void ZTextureAnimation::DeclareReferences(const std::string& prefix) count = 2; } params = new TextureScrollingParams(parent); + params->type = entry.type; params->ExtractFromBinary(paramsOffset, count); break; @@ -582,6 +583,7 @@ void ZTextureAnimation::DeclareReferences(const std::string& prefix) case TextureAnimationParamsType::TextureCycle: params = new TextureCyclingParams(parent); + params->type = entry.type; params->ExtractFromBinary(paramsOffset); break; diff --git a/tools/ZAPD/ZAPD/ZWaterbox.cpp b/tools/ZAPD/ZAPD/ZWaterbox.cpp new file mode 100644 index 0000000000..9a289db523 --- /dev/null +++ b/tools/ZAPD/ZAPD/ZWaterbox.cpp @@ -0,0 +1,74 @@ +#include "ZWaterbox.h" + +#include "Globals.h" +#include "Utils/BitConverter.h" +#include "Utils/StringHelper.h" + +REGISTER_ZFILENODE(Waterbox, ZWaterbox); + +ZWaterbox::ZWaterbox(ZFile* nParent) : ZResource(nParent) +{ +} + +ZWaterbox::~ZWaterbox() +{ +} + +void ZWaterbox::ParseRawData() +{ + const auto& rawData = parent->GetRawData(); + + xMin = BitConverter::ToInt16BE(rawData, rawDataIndex + 0); + ySurface = BitConverter::ToInt16BE(rawData, rawDataIndex + 2); + zMin = BitConverter::ToInt16BE(rawData, rawDataIndex + 4); + xLength = BitConverter::ToInt16BE(rawData, rawDataIndex + 6); + zLength = BitConverter::ToInt16BE(rawData, rawDataIndex + 8); + + if (Globals::Instance->game == ZGame::OOT_SW97) + properties = BitConverter::ToInt16BE(rawData, rawDataIndex + 10); + else + properties = BitConverter::ToInt32BE(rawData, rawDataIndex + 12); +} + +void ZWaterbox::DeclareReferences(const std::string& prefix) +{ + std::string declaration; + std::string auxName = name; + + if (name == "") + auxName = GetDefaultName(prefix); + + parent->AddDeclaration(rawDataIndex, DeclarationAlignment::Align4, GetRawDataSize(), + GetSourceTypeName(), name.c_str(), GetBodySourceCode()); +} + +std::string ZWaterbox::GetBodySourceCode() const +{ + return StringHelper::Sprintf("%i, %i, %i, %i, %i, 0x%08X", xMin, ySurface, zMin, xLength, + zLength, properties); +} + +std::string ZWaterbox::GetDefaultName(const std::string& prefix) const +{ + return StringHelper::Sprintf("%sWaterBoxes_%06X", prefix.c_str(), rawDataIndex); +} + +ZResourceType ZWaterbox::GetResourceType() const +{ + return ZResourceType::Waterbox; +} + +size_t ZWaterbox::GetRawDataSize() const +{ + return 16; +} + +std::string ZWaterbox::GetSourceTypeName() const +{ + return "WaterBox"; +} + +bool ZWaterbox::DoesSupportArray() const +{ + return true; +} diff --git a/tools/ZAPD/ZAPD/ZWaterbox.h b/tools/ZAPD/ZAPD/ZWaterbox.h new file mode 100644 index 0000000000..e190b26a08 --- /dev/null +++ b/tools/ZAPD/ZAPD/ZWaterbox.h @@ -0,0 +1,30 @@ +#pragma once + +#include "ZFile.h" +#include "ZResource.h" + +class ZWaterbox : public ZResource +{ +public: + int16_t xMin; + int16_t ySurface; + int16_t zMin; + int16_t xLength; + int16_t zLength; + int32_t properties; + + ZWaterbox(ZFile* nParent); + ~ZWaterbox(); + + void ParseRawData() override; + void DeclareReferences(const std::string& prefix) override; + std::string GetBodySourceCode() const override; + std::string GetDefaultName(const std::string& prefix) const override; + + std::string GetSourceTypeName() const override; + ZResourceType GetResourceType() const override; + + bool DoesSupportArray() const override; + + size_t GetRawDataSize() const override; +}; diff --git a/tools/ZAPD/ZAPD/genbuildinfo.py b/tools/ZAPD/ZAPD/genbuildinfo.py index 91a567d317..3317c42762 100644 --- a/tools/ZAPD/ZAPD/genbuildinfo.py +++ b/tools/ZAPD/ZAPD/genbuildinfo.py @@ -10,7 +10,13 @@ parser.add_argument("--devel", action="store_true") args = parser.parse_args() with open("build/ZAPD/BuildInfo.cpp", "w+") as buildFile: - label = subprocess.check_output(["git", "describe", "--always"]).strip().decode("utf-8") + # Get commit hash from git + # If git fails due to a missing .git directory, a default label will be used instead. + try: + label = subprocess.check_output(["git", "describe", "--always"]).strip().decode("utf-8") + except: + label = "GIT_NOT_FOUND" + now = datetime.now() if args.devel: label += " ~ Development version" diff --git a/tools/ZAPD/ZAPDUtils/Makefile b/tools/ZAPD/ZAPDUtils/Makefile index e8941ed773..c0f818bdff 100644 --- a/tools/ZAPD/ZAPDUtils/Makefile +++ b/tools/ZAPD/ZAPDUtils/Makefile @@ -17,7 +17,7 @@ clean: rm -rf build $(LIB) format: - clang-format-11 -i $(CPP_FILES) $(H_FILES) + clang-format-14 -i $(CPP_FILES) $(H_FILES) .PHONY: all clean format diff --git a/tools/ZAPD/ZAPDUtils/Utils/BitConverter.h b/tools/ZAPD/ZAPDUtils/Utils/BitConverter.h index 646fa1274c..aa41b5b217 100644 --- a/tools/ZAPD/ZAPDUtils/Utils/BitConverter.h +++ b/tools/ZAPD/ZAPDUtils/Utils/BitConverter.h @@ -76,7 +76,7 @@ public: fprintf(stderr, "\t Trying to read at offset: 0x%zX\n", offset); } return ((uint32_t)data.at(offset + 0) << 24) + ((uint32_t)data.at(offset + 1) << 16) + - ((uint32_t)data.at(offset + 2) << 8) + (uint32_t)data.at(offset + 3); + ((uint32_t)data.at(offset + 2) << 8) + (uint32_t)data.at(offset + 3); } static inline uint32_t ToUInt32BE(const std::vector& data, size_t offset) @@ -89,7 +89,7 @@ public: fprintf(stderr, "\t Trying to read at offset: 0x%zX\n", offset); } return ((uint32_t)data.at(offset + 0) << 24) + ((uint32_t)data.at(offset + 1) << 16) + - ((uint32_t)data.at(offset + 2) << 8) + (uint32_t)data.at(offset + 3); + ((uint32_t)data.at(offset + 2) << 8) + (uint32_t)data.at(offset + 3); } static inline int64_t ToInt64BE(const std::vector& data, size_t offset) @@ -102,9 +102,9 @@ public: fprintf(stderr, "\t Trying to read at offset: 0x%zX\n", offset); } return ((uint64_t)data.at(offset + 0) << 56) + ((uint64_t)data.at(offset + 1) << 48) + - ((uint64_t)data.at(offset + 2) << 40) + ((uint64_t)data.at(offset + 3) << 32) + - ((uint64_t)data.at(offset + 4) << 24) + ((uint64_t)data.at(offset + 5) << 16) + - ((uint64_t)data.at(offset + 6) << 8) + ((uint64_t)data.at(offset + 7)); + ((uint64_t)data.at(offset + 2) << 40) + ((uint64_t)data.at(offset + 3) << 32) + + ((uint64_t)data.at(offset + 4) << 24) + ((uint64_t)data.at(offset + 5) << 16) + + ((uint64_t)data.at(offset + 6) << 8) + ((uint64_t)data.at(offset + 7)); } static inline uint64_t ToUInt64BE(const std::vector& data, size_t offset) @@ -117,9 +117,9 @@ public: fprintf(stderr, "\t Trying to read at offset: 0x%zX\n", offset); } return ((uint64_t)data.at(offset + 0) << 56) + ((uint64_t)data.at(offset + 1) << 48) + - ((uint64_t)data.at(offset + 2) << 40) + ((uint64_t)data.at(offset + 3) << 32) + - ((uint64_t)data.at(offset + 4) << 24) + ((uint64_t)data.at(offset + 5) << 16) + - ((uint64_t)data.at(offset + 6) << 8) + ((uint64_t)data.at(offset + 7)); + ((uint64_t)data.at(offset + 2) << 40) + ((uint64_t)data.at(offset + 3) << 32) + + ((uint64_t)data.at(offset + 4) << 24) + ((uint64_t)data.at(offset + 5) << 16) + + ((uint64_t)data.at(offset + 6) << 8) + ((uint64_t)data.at(offset + 7)); } static inline float ToFloatBE(const std::vector& data, size_t offset) @@ -133,8 +133,8 @@ public: } float value; uint32_t floatData = ((uint32_t)data.at(offset + 0) << 24) + - ((uint32_t)data.at(offset + 1) << 16) + - ((uint32_t)data.at(offset + 2) << 8) + (uint32_t)data.at(offset + 3); + ((uint32_t)data.at(offset + 1) << 16) + + ((uint32_t)data.at(offset + 2) << 8) + (uint32_t)data.at(offset + 3); static_assert(sizeof(uint32_t) == sizeof(float), "expected 32-bit float"); std::memcpy(&value, &floatData, sizeof(value)); return value; diff --git a/tools/ZAPD/ZAPDUtils/Utils/Directory.h b/tools/ZAPD/ZAPDUtils/Utils/Directory.h index eaa6a26abb..d150f17727 100644 --- a/tools/ZAPD/ZAPDUtils/Utils/Directory.h +++ b/tools/ZAPD/ZAPDUtils/Utils/Directory.h @@ -4,7 +4,10 @@ #include #include -#if __has_include() +#ifdef USE_BOOST_FS +#include +namespace fs = boost::filesystem; +#elif __has_include() #include namespace fs = std::filesystem; #else @@ -17,9 +20,22 @@ namespace fs = std::experimental::filesystem; class Directory { public: - static std::string GetCurrentDirectory() { return fs::current_path().u8string(); } +#ifdef USE_BOOST_FS + static std::string GetCurrentDirectory() + { + return fs::current_path().string(); + } +#else + static std::string GetCurrentDirectory() + { + return fs::current_path().u8string(); + } +#endif - static bool Exists(const fs::path& path) { return fs::exists(path); } + static bool Exists(const fs::path& path) + { + return fs::exists(path); + } static void CreateDirectory(const std::string& path) { diff --git a/tools/ZAPD/ZAPDUtils/Utils/File.h b/tools/ZAPD/ZAPDUtils/Utils/File.h index 7bc5d2950f..707b1600fc 100644 --- a/tools/ZAPD/ZAPDUtils/Utils/File.h +++ b/tools/ZAPD/ZAPDUtils/Utils/File.h @@ -1,8 +1,11 @@ #pragma once -#include +#ifdef USE_BOOST_FS +#include +#else #include -#include +#endif + #include #include #include "Directory.h" @@ -10,29 +13,38 @@ class File { +#ifdef USE_BOOST_FS + typedef fs::ifstream ifstream; + typedef fs::ofstream ofstream; +#else + typedef std::ifstream ifstream; + typedef std::ofstream ofstream; +#endif + public: static bool Exists(const fs::path& filePath) { - std::ifstream file(filePath, std::ios::in | std::ios::binary | std::ios::ate); + ifstream file(filePath, std::ios::in | std::ios::binary | std::ios::ate); return file.good(); } static std::vector ReadAllBytes(const fs::path& filePath) { - std::ifstream file(filePath, std::ios::in | std::ios::binary | std::ios::ate); + ifstream file(filePath, std::ios::in | std::ios::binary | std::ios::ate); int32_t fileSize = (int32_t)file.tellg(); file.seekg(0); char* data = new char[fileSize]; file.read(data, fileSize); std::vector result = std::vector(data, data + fileSize); delete[] data; + file.close(); return result; }; static std::string ReadAllText(const fs::path& filePath) { - std::ifstream file(filePath, std::ios::in | std::ios::binary | std::ios::ate); + ifstream file(filePath, std::ios::in | std::ios::binary | std::ios::ate); if (!file.is_open()) return ""; int32_t fileSize = (int32_t)file.tellg(); @@ -42,6 +54,7 @@ public: file.read(data, fileSize); std::string str = std::string((const char*)data); delete[] data; + file.close(); return str; }; @@ -56,25 +69,29 @@ public: static void WriteAllBytes(const fs::path& filePath, const std::vector& data) { - std::ofstream file(filePath, std::ios::binary); + ofstream file(filePath, std::ios::binary); file.write((char*)data.data(), data.size()); + file.close(); }; static void WriteAllBytes(const std::string& filePath, const std::vector& data) { - std::ofstream file(filePath, std::ios::binary); + ofstream file(filePath, std::ios::binary); file.write((char*)data.data(), data.size()); + file.close(); }; static void WriteAllBytes(const std::string& filePath, const char* data, int dataSize) { - std::ofstream file(filePath, std::ios::binary); + ofstream file(filePath, std::ios::binary); file.write((char*)data, dataSize); + file.close(); }; static void WriteAllText(const fs::path& filePath, const std::string& text) { - std::ofstream file(filePath, std::ios::out); + ofstream file(filePath, std::ios::out); file.write(text.c_str(), text.size()); + file.close(); } }; diff --git a/tools/ZAPD/ZAPDUtils/Utils/Path.h b/tools/ZAPD/ZAPDUtils/Utils/Path.h index 0f7ef27431..90f55380b4 100644 --- a/tools/ZAPD/ZAPDUtils/Utils/Path.h +++ b/tools/ZAPD/ZAPDUtils/Utils/Path.h @@ -4,7 +4,10 @@ #include #include "Utils/StringHelper.h" -#if __has_include() +#ifdef USE_BOOST_FS +#include +namespace fs = boost::filesystem; +#elif __has_include() #include namespace fs = std::filesystem; #else diff --git a/tools/ZAPD/ZAPDUtils/Utils/StringHelper.h b/tools/ZAPD/ZAPDUtils/Utils/StringHelper.h index 8560d6b094..c4e012eb06 100644 --- a/tools/ZAPD/ZAPDUtils/Utils/StringHelper.h +++ b/tools/ZAPD/ZAPDUtils/Utils/StringHelper.h @@ -106,9 +106,35 @@ public: return std::all_of(str.begin(), str.end(), ::isdigit); } - static bool HasOnlyHexDigits(const std::string& str) + static bool IsValidHex(std::string_view str) { - return std::all_of(str.begin(), str.end(), ::isxdigit); + if (str.length() < 3) + { + return false; + } + + if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) + { + return std::all_of(str.begin() + 2, str.end(), ::isxdigit); + } + + return false; + } + + static bool IsValidOffset(std::string_view str) + { + if (str.length() == 1) + { + // 0 is a valid offset + return isdigit(str[0]); + } + + return IsValidHex(str); + } + + static bool IsValidHex(const std::string& str) + { + return IsValidHex(std::string_view(str.c_str())); } static std::string ToUpper(const std::string& str) @@ -123,4 +149,66 @@ public: return std::equal(a.begin(), a.end(), b.begin(), b.end(), [](char a, char b) { return tolower(a) == tolower(b); }); } + + /** + * Converts a std::string formatted in camelCase into one in SCREAMING_SNAKE_CASE. Since this + * will mostly be used on symbols that start with either 'g' or 's', an option is included to + * skip these. + */ + static std::string camelCaseTo_SCREAMING_SNAKE_CASE(const std::string& in, bool skipSP) + { + std::string out = ""; + const char* ptr = in.c_str(); + char ch = *ptr; + + // Switch checks for 'g'/'s'/'\0', looks at next character if skipSP enabled and string is + // nonempty. + switch (ch) + { + case 'g': + case 's': + if (skipSP) + { + // Print it anyway if the next character is lowercase, e.g. "gameplay_keep_...". + if (!isupper(ptr[1])) + { + out.push_back(toupper(ch)); + } + if ((ch = *++ptr) == '\0') + { + case '\0': + // This is reached either by the if or the case label, avoiding duplication. + return out; + } + } + [[fallthrough]]; + default: + if (islower(ch)) + { + out.push_back(toupper(ch)); + } + else + { + out.push_back(ch); + } + break; + } + + while ((ch = *++ptr) != '\0') + { + if (islower(ch)) + { + out.push_back(toupper(ch)); + } + else + { + if (isupper(ch) && !(isupper(ptr[1]) && isupper(ptr[-1]))) + { + out.push_back('_'); + } + out.push_back(ch); + } + } + return out; + } }; diff --git a/tools/ZAPD/ZAPDUtils/ZAPDUtils.vcxproj b/tools/ZAPD/ZAPDUtils/ZAPDUtils.vcxproj index 4b91c2aeb6..2abbdc9664 100644 --- a/tools/ZAPD/ZAPDUtils/ZAPDUtils.vcxproj +++ b/tools/ZAPD/ZAPDUtils/ZAPDUtils.vcxproj @@ -118,6 +118,7 @@ true MultiThreadedDebug Default + stdcpp17 Console diff --git a/tools/ZAPDConfigs/MqDbg/Config.xml b/tools/ZAPDConfigs/MqDbg/Config.xml index 5e88889ef1..f9660f90b2 100644 --- a/tools/ZAPDConfigs/MqDbg/Config.xml +++ b/tools/ZAPDConfigs/MqDbg/Config.xml @@ -4,5 +4,6 @@ + diff --git a/tools/ZAPDConfigs/MqDbg/EnumData.xml b/tools/ZAPDConfigs/MqDbg/EnumData.xml new file mode 100644 index 0000000000..53e5f9aeac --- /dev/null +++ b/tools/ZAPDConfigs/MqDbg/EnumData.xml @@ -0,0 +1,416 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 3475651701f991b636a74e0254ef1b9682fa1126 Mon Sep 17 00:00:00 2001 From: Tharo <17233964+Thar0@users.noreply.github.com> Date: Fri, 27 Oct 2023 15:06:44 +0100 Subject: [PATCH 13/16] libc cleanup (#1568) * libc cleanup * Suggested changes, small alloca tweak * Remove printf include --- Makefile | 2 +- include/alloca.h | 7 - include/attributes.h | 2 +- include/fault.h | 1 + include/fp.h | 34 ---- include/functions.h | 30 ++-- include/libc/alloca.h | 9 + include/libc/assert.h | 45 +++++ include/libc/math.h | 39 +++-- include/libc/stdarg.h | 66 +++++--- include/libc/stdbool.h | 7 +- include/libc/stddef.h | 12 +- include/libc/stdio.h | 9 + include/libc/stdlib.h | 13 +- include/libc/string.h | 11 ++ include/macros.h | 8 - include/message_data_fmt.h | 2 + include/ultra64.h | 14 +- include/ultra64/gu.h | 18 ++ include/ultra64/libc.h | 12 ++ include/ultra64/printf.h | 33 ---- include/ultra64/xstdio.h | 44 +++++ spec | 8 +- src/boot/assert.c | 6 +- src/boot/is_debug.c | 2 +- src/code/code_800FCE80.c | 1 - src/code/fault_drawer.c | 2 +- src/code/gfxprint.c | 2 +- src/code/load.c | 2 +- src/code/z_actor.c | 10 +- src/code/z_collision_check.c | 2 - src/libultra/libc/absf.c | 8 +- src/libultra/libc/ldiv.c | 6 +- src/libultra/libc/ll.c | 47 +++--- src/libultra/libc/llcvt.c | 18 +- src/libultra/libc/sprintf.c | 32 ++++ src/libultra/libc/sqrt.c | 8 +- src/libultra/libc/string.c | 22 +-- src/libultra/{rmon => libc}/xldtob.c | 100 +++++------ src/libultra/libc/xlitob.c | 58 +++++++ src/libultra/{rmon => libc}/xprintf.c | 159 ++++++++++-------- src/libultra/rmon/sprintf.c | 28 --- src/libultra/rmon/xlitob.c | 56 ------ .../actors/ovl_Door_Gerudo/z_door_gerudo.c | 2 +- .../actors/ovl_Door_Shutter/z_door_shutter.c | 2 +- .../actors/ovl_player_actor/z_player.c | 4 +- 46 files changed, 571 insertions(+), 432 deletions(-) delete mode 100644 include/alloca.h delete mode 100644 include/fp.h create mode 100644 include/libc/alloca.h create mode 100644 include/libc/assert.h create mode 100644 include/libc/stdio.h create mode 100644 include/libc/string.h create mode 100644 include/ultra64/libc.h delete mode 100644 include/ultra64/printf.h create mode 100644 include/ultra64/xstdio.h create mode 100644 src/libultra/libc/sprintf.c rename src/libultra/{rmon => libc}/xldtob.c (79%) create mode 100644 src/libultra/libc/xlitob.c rename src/libultra/{rmon => libc}/xprintf.c (51%) delete mode 100644 src/libultra/rmon/sprintf.c delete mode 100644 src/libultra/rmon/xlitob.c diff --git a/Makefile b/Makefile index e292f566da..4239c18f53 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ OBJDUMP := $(MIPS_BINUTILS_PREFIX)objdump EMULATOR ?= EMU_FLAGS ?= -INC := -Iinclude -Isrc -Ibuild -I. +INC := -Iinclude -Iinclude/libc -Isrc -Ibuild -I. # Check code syntax with host compiler CHECK_WARNINGS := -Wall -Wextra -Wno-format-security -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-variable -Wno-missing-braces diff --git a/include/alloca.h b/include/alloca.h deleted file mode 100644 index 4e8720f7e8..0000000000 --- a/include/alloca.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ALLOCA_H -#define ALLOCA_H - -void* alloca(u32); -#define alloca __builtin_alloca - -#endif diff --git a/include/attributes.h b/include/attributes.h index 13fbe70f42..f58cc8122d 100644 --- a/include/attributes.h +++ b/include/attributes.h @@ -1,7 +1,7 @@ #ifndef ATTRIBUTES_H #define ATTRIBUTES_H -#ifndef __GNUC__ +#if !defined(__GNUC__) && !defined(__attribute__) #define __attribute__(x) #endif diff --git a/include/fault.h b/include/fault.h index c5837f99a3..778f708e9b 100644 --- a/include/fault.h +++ b/include/fault.h @@ -2,6 +2,7 @@ #define FAULT_H #include "ultra64.h" +#include "attributes.h" #include "padmgr.h" // These are the same as the 3-bit ansi color codes diff --git a/include/fp.h b/include/fp.h deleted file mode 100644 index c733be914c..0000000000 --- a/include/fp.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef FP_H -#define FP_H -#include "ultra64.h" - -extern f32 qNaN0x3FFFFF; -extern f32 qNaN0x10000; -extern f32 sNaN0x3FFFFF; - -f32 floorf(f32 x); -f64 floor(f64 x); -s32 lfloorf(f32 x); -s32 lfloor(f64 x); - -f32 ceilf(f32 x); -f64 ceil(f64 x); -s32 lceilf(f32 x); -s32 lceil(f64 x); - -f32 truncf(f32 x); -f64 trunc(f64 x); -s32 ltruncf(f32 x); -s32 ltrunc(f64 x); - -f32 nearbyintf(f32 x); -f64 nearbyint(f64 x); -s32 lnearbyintf(f32 x); -s32 lnearbyint(f64 x); - -f32 roundf(f32 x); -f64 round(f64 x); -s32 lroundf(f32 x); -s32 lround(f64 x); - -#endif diff --git a/include/functions.h b/include/functions.h index 2714f6fa6c..506f31e5f4 100644 --- a/include/functions.h +++ b/include/functions.h @@ -5,15 +5,21 @@ #include "macros.h" f32 fabsf(f32 f); -#ifndef __sgi -#define fabsf(f) __builtin_fabsf((f32)(f)) -#else +#ifdef __sgi #pragma intrinsic(fabsf) +#else +#define fabsf(f) __builtin_fabsf((f32)(f)) #endif + f32 sqrtf(f32 f); +#ifdef __sgi #pragma intrinsic(sqrtf) +#endif + f64 sqrt(f64 f); +#ifdef __sgi #pragma intrinsic(sqrt) +#endif void cleararena(void); void bootproc(void); @@ -30,12 +36,9 @@ void Locale_ResetRegion(void); u32 func_80001F48(void); u32 func_80001F8C(void); u32 Locale_IsRegionNative(void); -NORETURN void __assert(const char* exp, const char* file, s32 line); void isPrintfInit(void); -void osSyncPrintfUnused(const char* fmt, ...); -void osSyncPrintf(const char* fmt, ...); void rmonPrintf(const char* fmt, ...); -void* is_proutSyncPrintf(void* arg, const char* str, u32 count); +void* is_proutSyncPrintf(void* arg, const char* str, size_t count); NORETURN void func_80002384(const char* exp, const char* file, u32 line); OSPiHandle* osDriveRomInit(void); void Mio0_Decompress(Yaz0Header* hdr, u8* dst); @@ -57,8 +60,6 @@ void LogUtils_CheckValidPointer(const char* exp, void* ptr, const char* file, s3 void LogUtils_LogThreadId(const char* name, s32 line); void LogUtils_HungupThread(const char* name, s32 line); void LogUtils_ResetHungup(void); -s32 vsprintf(char* dst, const char* fmt, va_list args); -s32 sprintf(char* dst, const char* fmt, ...); void __osPiCreateAccessQueue(void); void __osPiGetAccess(void); void __osPiRelAccess(void); @@ -75,7 +76,6 @@ void __osDispatchThread(void); void __osCleanupThread(void); void __osDequeueThread(OSThread** queue, OSThread* thread); void osDestroyThread(OSThread* thread); -void bzero(void* __s, s32 __n); void osCreateThread(OSThread* thread, OSId id, void (*entry)(void*), void* arg, void* sp, OSPri pri); void __osSetSR(u32); u32 __osGetSR(void); @@ -92,12 +92,8 @@ void osViSetMode(OSViMode* mode); u32 __osProbeTLB(void*); u32 osGetMemSize(void); void osSetEventMesg(OSEvent e, OSMesgQueue* mq, OSMesg msg); -s32 _Printf(PrintCallback, void* arg, const char* fmt, va_list ap); void osUnmapTLBAll(void); s32 osEPiStartDma(OSPiHandle* handle, OSIoMesg* mb, s32 direction); -const char* strchr(const char* str, s32 ch); -u32 strlen(const char* str); -void* memcpy(void* dst, const void* src, size_t size); void osInvalICache(void* vaddr, s32 nbytes); void osCreateMesgQueue(OSMesgQueue* mq, OSMesg* msg, s32 count); void osInvalDCache(void* vaddr, s32 nbytes); @@ -108,7 +104,6 @@ OSPri osGetThreadPri(OSThread* thread); s32 __osEPiRawReadIo(OSPiHandle* handle, u32 devAddr, u32* data); void osViSwapBuffer(void* frameBufPtr); s32 __osEPiRawStartDma(OSPiHandle* handle, s32 direction, u32 cartAddr, void* dramAddr, size_t size); -u32 bcmp(void* __sl, void* __s2, u32 __n); OSTime osGetTime(void); void __osTimerServicesInit(void); void __osTimerInterrupt(void); @@ -116,7 +111,6 @@ void __osSetTimerIntr(OSTime time); OSTime __osInsertTimer(OSTimer* timer); u32 osGetCount(void); void __osSetCompare(u32); -void* bcopy(void* __src, void* __dest, u32 __n); s32 __osDisableInt(void); void __osRestoreInt(s32); void __osViInit(void); @@ -132,10 +126,6 @@ void osMapTLBRdb(void); void osYieldThread(void); u32 __osGetCause(void); s32 __osEPiRawWriteIo(OSPiHandle* handle, u32 devAddr, u32 data); -void _Litob(_Pft* args, u8 type); -ldiv_t ldiv(s32 num, s32 denom); -lldiv_t lldiv(s64 num, s64 denom); -void _Ldtob(_Pft* args, u8 type); s32 __osSiRawWriteIo(void* devAddr, u32 val); void osCreateViManager(OSPri pri); OSViContext* __osViGetCurrentContext(void); diff --git a/include/libc/alloca.h b/include/libc/alloca.h new file mode 100644 index 0000000000..7bf44d764f --- /dev/null +++ b/include/libc/alloca.h @@ -0,0 +1,9 @@ +#ifndef ALLOCA_H +#define ALLOCA_H + +#include "stddef.h" + +void* alloca(size_t); +#define alloca(size) __builtin_alloca(size) + +#endif diff --git a/include/libc/assert.h b/include/libc/assert.h new file mode 100644 index 0000000000..96393c0e7c --- /dev/null +++ b/include/libc/assert.h @@ -0,0 +1,45 @@ +#ifndef ASSERT_H +#define ASSERT_H + +#if !defined(__GNUC__) && !defined(__attribute__) +#define __attribute__(x) +#endif + +// Runtime assertions + +__attribute__((noreturn)) void __assert(const char* assertion, const char* file, int line); + +// assert for matching +#ifndef NDEBUG +# ifndef NON_MATCHING +# define ASSERT(cond, msg, file, line) ((cond) ? ((void)0) : __assert(msg, file, line)) +# else +# define ASSERT(cond, msg, file, line) ((cond) ? ((void)0) : __assert(#cond, __FILE__, __LINE__)) +# endif +#else +# define ASSERT(cond, msg, file, line) ((void)0) +#endif + +// standard assert macro +#ifndef NDEBUG +# define assert(cond) ASSERT(cond, #cond, __FILE__, __LINE__) +#else +# define assert(cond) ((void)0) +#endif + +// Static/compile-time assertions + +#if defined(__GNUC__) || (__STDC_VERSION__ >= 201112L) +# define static_assert(cond, msg) _Static_assert(cond, msg) +#else +# ifndef GLUE +# define GLUE(a, b) a##b +# endif +# ifndef GLUE2 +# define GLUE2(a, b) GLUE(a, b) +# endif + +# define static_assert(cond, msg) typedef char GLUE2(static_assertion_failed, __LINE__)[(cond) ? 1 : -1] +#endif + +#endif diff --git a/include/libc/math.h b/include/libc/math.h index 2858084eba..831be6de7e 100644 --- a/include/libc/math.h +++ b/include/libc/math.h @@ -5,24 +5,37 @@ #define M_PI 3.14159265358979323846f #define M_SQRT2 1.41421356237309504880f -#define FLT_MAX 340282346638528859811704183484516925440.0f +#define MAXFLOAT 3.40282347e+38f #define SHT_MAX 32767.0f #define SHT_MINV (1.0f / SHT_MAX) -typedef union { - struct { - u32 hi; - u32 lo; - } word; +float floorf(float); +double floor(double); +long lfloorf(float); +long lfloor(double); - f64 d; -} du; +float ceilf(float); +double ceil(double); +long lceilf(float); +long lceil(double); -typedef union { - u32 i; - f32 f; -} fu; +float truncf(float); +double trunc(double); +long ltruncf(float); +long ltrunc(double); -extern f32 __libm_qnan_f; +float nearbyintf(float); +double nearbyint(double); +long lnearbyintf(float); +long lnearbyint(double); + +float roundf(float); +double round(double); +long lroundf(float); +long lround(double); + +extern float qNaN0x3FFFFF; +extern float qNaN0x10000; +extern float sNaN0x3FFFFF; #endif diff --git a/include/libc/stdarg.h b/include/libc/stdarg.h index 0744dfa609..35ce4f944e 100644 --- a/include/libc/stdarg.h +++ b/include/libc/stdarg.h @@ -1,43 +1,57 @@ #ifndef STDARG_H #define STDARG_H -// When building with GCC, use the official vaarg macros to avoid warnings -// and possibly bad codegen. +// When building with GCC, use the official vaarg macros to avoid warnings and possibly bad codegen. + #ifdef __GNUC__ -#define va_list __builtin_va_list + +#define va_list __builtin_va_list #define va_start __builtin_va_start -#define va_arg __builtin_va_arg -#define va_end __builtin_va_end +#define va_arg __builtin_va_arg +#define va_end __builtin_va_end + #else +#ifndef _VA_LIST_ +# define _VA_LIST_ typedef char* va_list; -#define _FP 1 -#define _INT 0 +#endif + +#define _INT 0 +#define _FP 1 #define _STRUCT 2 #define _VA_FP_SAVE_AREA 0x10 -#define _VA_ALIGN(p, a) (((u32)(((char*)p) + ((a) > 4 ? (a) : 4) - 1)) & -((a) > 4 ? (a) : 4)) -#define va_start(vp, parmN) (vp = ((va_list)&parmN + sizeof(parmN))) -#define __va_stack_arg(list, mode) \ - ( \ - ((list) = (char*)_VA_ALIGN(list, __builtin_alignof(mode)) + \ - _VA_ALIGN(sizeof(mode), 4)), \ - (((char*)list) - (_VA_ALIGN(sizeof(mode), 4) - sizeof(mode)))) +#define _VA_ALIGN(p, a) (((unsigned int)(((char*)p) + ((a) > 4 ? (a) : 4) - 1)) & -((a) > 4 ? (a) : 4)) -#define __va_double_arg(list, mode) \ - ( \ - (((s32)list & 0x1) /* 1 byte aligned? */ \ - ? (list = (char*)((s32)list + 7), (char*)((s32)list - 6 - _VA_FP_SAVE_AREA)) \ - : (((s32)list & 0x2) /* 2 byte aligned? */ \ - ? (list = (char*)((s32)list + 10), (char*)((s32)list - 24 - _VA_FP_SAVE_AREA)) \ - : __va_stack_arg(list, mode)))) +#define va_start(list, parmN) (list = ((va_list)&parmN + sizeof(parmN))) -#define va_arg(list, mode) ((mode*)(((__builtin_classof(mode) == _FP && \ - __builtin_alignof(mode) == sizeof(f64)) \ - ? __va_double_arg(list, mode) \ - : __va_stack_arg(list, mode))))[-1] +#define __va_stack_arg(list, mode) \ + ( \ + ((list) = (char*)_VA_ALIGN(list, __builtin_alignof(mode)) + \ + _VA_ALIGN(sizeof(mode), 4)), \ + (((char*)list) - (_VA_ALIGN(sizeof(mode), 4) - sizeof(mode))) \ + ) + +#define __va_double_arg(list, mode) \ + ( \ + (((long)list & 0x1) /* 1 byte aligned? */ \ + ? (list = (char*)((long)list + 7), (char*)((long)list - 6 - _VA_FP_SAVE_AREA)) \ + : (((long)list & 0x2) /* 2 byte aligned? */ \ + ? (list = (char*)((long)list + 10), (char*)((long)list - 24 - _VA_FP_SAVE_AREA)) \ + : __va_stack_arg(list, mode))) \ + ) + +#define va_arg(list, mode) \ + ((mode*)(((__builtin_classof(mode) == _FP && \ + __builtin_alignof(mode) == sizeof(double)) \ + ? __va_double_arg(list, mode) \ + : __va_stack_arg(list, mode))))[-1] + +/* No cleanup processing is required for the end of a varargs list: */ #define va_end(__list) -#endif +#endif /* __GNUC__ */ + #endif diff --git a/include/libc/stdbool.h b/include/libc/stdbool.h index 7a0aa35433..045c90a5e9 100644 --- a/include/libc/stdbool.h +++ b/include/libc/stdbool.h @@ -5,7 +5,12 @@ #ifndef __cplusplus -#define bool u32 +#if (__STDC_VERSION__ >= 199901L) +#define bool _Bool +#else +#define bool unsigned int +#endif + #define false 0 #define true 1 diff --git a/include/libc/stddef.h b/include/libc/stddef.h index 5d4f666b49..45620895ee 100644 --- a/include/libc/stddef.h +++ b/include/libc/stddef.h @@ -3,10 +3,16 @@ #define NULL ((void*)0) +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T + +#if !defined(_MIPS_SZLONG) || (_MIPS_SZLONG == 32) +typedef unsigned int size_t; +#endif #if defined(_MIPS_SZLONG) && (_MIPS_SZLONG == 64) -typedef unsigned long size_t; -#else -typedef unsigned int size_t; +typedef unsigned long size_t; +#endif + #endif #ifdef __GNUC__ diff --git a/include/libc/stdio.h b/include/libc/stdio.h new file mode 100644 index 0000000000..ce91816145 --- /dev/null +++ b/include/libc/stdio.h @@ -0,0 +1,9 @@ +#ifndef STDIO_H +#define STDIO_H + +#include "stdarg.h" + +int sprintf(char* dst, const char* fmt, ...); +int vsprintf(char* dst, const char* fmt, va_list args); + +#endif diff --git a/include/libc/stdlib.h b/include/libc/stdlib.h index 75657d8dbd..632fd25ae3 100644 --- a/include/libc/stdlib.h +++ b/include/libc/stdlib.h @@ -1,16 +1,17 @@ #ifndef STDLIB_H #define STDLIB_H -#include "ultra64.h" - typedef struct lldiv_t { - s64 quot; - s64 rem; + long long quot; + long long rem; } lldiv_t; typedef struct ldiv_t { - s32 quot; - s32 rem; + long quot; + long rem; } ldiv_t; +ldiv_t ldiv(long num, long denom); +lldiv_t lldiv(long long num, long long denom); + #endif diff --git a/include/libc/string.h b/include/libc/string.h new file mode 100644 index 0000000000..3f9a5cee71 --- /dev/null +++ b/include/libc/string.h @@ -0,0 +1,11 @@ +#ifndef STRING_H +#define STRING_H + +#include "stddef.h" + +char* strchr(const char*, int); +size_t strlen(const char*); + +void* memcpy(void*, const void*, size_t); + +#endif diff --git a/include/macros.h b/include/macros.h index f25069118b..8514a6924e 100644 --- a/include/macros.h +++ b/include/macros.h @@ -171,14 +171,6 @@ extern struct GraphicsContext* __gfxCtx; #define VTX_T(x,y,z,s,t,cr,cg,cb,a) { { x, y, z }, 0, { s, t }, { cr, cg, cb, a } } -#ifdef NDEBUG -#define ASSERT(cond, msg, file, line) ((void)0) -#elif defined(REAL_ASSERT_MACRO) -#define ASSERT(cond, msg, file, line) ((cond) ? ((void)0) : __assert(#cond, __FILE__, __LINE__)) -#else -#define ASSERT(cond, msg, file, line) ((cond) ? ((void)0) : __assert(msg, file, line)) -#endif - #define gDPSetTileCustom(pkt, fmt, siz, width, height, pal, cms, cmt, masks, maskt, shifts, shiftt) \ do { \ gDPPipeSync(pkt); \ diff --git a/include/message_data_fmt.h b/include/message_data_fmt.h index 7ec967b503..447117d81f 100644 --- a/include/message_data_fmt.h +++ b/include/message_data_fmt.h @@ -7,7 +7,9 @@ * The strings are used in the message_data_static files themselves, as you can only concat strings with other strings */ +#ifndef GLUE #define GLUE(a, b) a##b +#endif #define STRINGIFY(s) #s #define EXPAND_AND_STRINGIFY(s) STRINGIFY(s) diff --git a/include/ultra64.h b/include/ultra64.h index 6eadfb6af4..f6460c5834 100644 --- a/include/ultra64.h +++ b/include/ultra64.h @@ -1,16 +1,21 @@ #ifndef ULTRA64_H #define ULTRA64_H -#include "ultra64/ultratypes.h" -#include "unk.h" - +#include "libc/assert.h" +#include "libc/math.h" #include "libc/stdarg.h" #include "libc/stdbool.h" #include "libc/stddef.h" #include "libc/stdint.h" +#include "libc/stdio.h" #include "libc/stdlib.h" -#include "libc/math.h" +#include "libc/string.h" +#include "ultra64/ultratypes.h" +#include "unk.h" + +#include "ultra64/libc.h" +#include "ultra64/xstdio.h" #include "ultra64/exception.h" #include "ultra64/rcp.h" #include "ultra64/thread.h" @@ -22,7 +27,6 @@ #include "ultra64/vi.h" #include "ultra64/pi.h" #include "ultra64/controller.h" -#include "ultra64/printf.h" #include "ultra64/mbi.h" #include "ultra64/pfs.h" #include "ultra64/motor.h" diff --git a/include/ultra64/gu.h b/include/ultra64/gu.h index 8fc9e0291e..429d12352e 100644 --- a/include/ultra64/gu.h +++ b/include/ultra64/gu.h @@ -1,8 +1,26 @@ #ifndef ULTRA64_GU_H #define ULTRA64_GU_H +#include "ultratypes.h" + #define GU_PI 3.1415926 #define ROUND(x) (s32)(((x) >= 0.0) ? ((x) + 0.5) : ((x) - 0.5)) +typedef union { + struct { + u32 hi; + u32 lo; + } word; + + f64 d; +} du; + +typedef union { + u32 i; + f32 f; +} fu; + +extern f32 __libm_qnan_f; + #endif diff --git a/include/ultra64/libc.h b/include/ultra64/libc.h new file mode 100644 index 0000000000..31898a9671 --- /dev/null +++ b/include/ultra64/libc.h @@ -0,0 +1,12 @@ +#ifndef ULTRA64_LIBC_H +#define ULTRA64_LIBC_H + +#include "stddef.h" + +void osSyncPrintf(const char* fmt, ...); + +void bzero(void* __s, size_t __n); +int bcmp(const void* __sl, const void* __s2, size_t __n); +void bcopy(const void* __src, void* __dest, size_t __n); + +#endif diff --git a/include/ultra64/printf.h b/include/ultra64/printf.h deleted file mode 100644 index 4f2e29730a..0000000000 --- a/include/ultra64/printf.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef ULTRA64_PRINTF_H -#define ULTRA64_PRINTF_H - -#include "ultratypes.h" - -typedef struct { - /* 0x0 */ union { - /* 0x0 */ s64 ll; - /* 0x0 */ f64 ld; - } v; - /* 0x8 */ char* s; - /* 0xC */ s32 n0; - /* 0x10 */ s32 nz0; - /* 0x14 */ s32 n1; - /* 0x18 */ s32 nz1; - /* 0x1C */ s32 n2; - /* 0x20 */ s32 nz2; - /* 0x24 */ s32 prec; - /* 0x28 */ s32 width; - /* 0x2C */ u32 nchar; - /* 0x30 */ u32 flags; - /* 0x34 */ u8 qual; -} _Pft; // size = 0x38 - -typedef void* (*PrintCallback)(void*, const char*, u32); - -#define FLAGS_SPACE 1 -#define FLAGS_PLUS 2 -#define FLAGS_MINUS 4 -#define FLAGS_HASH 8 -#define FLAGS_ZERO 16 - -#endif diff --git a/include/ultra64/xstdio.h b/include/ultra64/xstdio.h new file mode 100644 index 0000000000..27c44a56be --- /dev/null +++ b/include/ultra64/xstdio.h @@ -0,0 +1,44 @@ +#ifndef ULTRA64_PRINTF_H +#define ULTRA64_PRINTF_H + +#include "stdarg.h" + +// IDO doesn't support long double types, improve portability for compilers supporting them +#ifdef __sgi +#define LONG_DOUBLE_TYPE double +#else +#define LONG_DOUBLE_TYPE long double +#endif + +typedef struct { + /* 0x00 */ union { + long long ll; + LONG_DOUBLE_TYPE ld; + } v; + /* 0x08 */ char* s; + /* 0x0C */ int n0; + /* 0x10 */ int nz0; + /* 0x14 */ int n1; + /* 0x18 */ int nz1; + /* 0x1C */ int n2; + /* 0x20 */ int nz2; + /* 0x24 */ int prec; + /* 0x28 */ int width; + /* 0x2C */ size_t nchar; + /* 0x30 */ unsigned int flags; + /* 0x34 */ char qual; +} _Pft; // size = 0x38 + +typedef void* (*PrintCallback)(void*, const char*, size_t); + +int _Printf(PrintCallback, void* arg, const char* fmt, va_list ap); +void _Litob(_Pft* args, char code); +void _Ldtob(_Pft* args, char code); + +#define FLAGS_SPACE (1 << 0) +#define FLAGS_PLUS (1 << 1) +#define FLAGS_MINUS (1 << 2) +#define FLAGS_HASH (1 << 3) +#define FLAGS_ZERO (1 << 4) + +#endif diff --git a/spec b/spec index f4a3bffc3e..7a02ebd18c 100644 --- a/spec +++ b/spec @@ -26,7 +26,7 @@ beginseg include "build/src/boot/mio0.o" include "build/src/boot/stackcheck.o" include "build/src/boot/logutils.o" - include "build/src/libultra/rmon/sprintf.o" + include "build/src/libultra/libc/sprintf.o" include "build/src/libultra/io/piacs.o" include "build/src/libultra/os/sendmesg.o" include "build/src/libultra/os/stopthread.o" @@ -57,7 +57,7 @@ beginseg include "build/src/libultra/os/probetlb.o" include "build/src/libultra/os/getmemsize.o" include "build/src/libultra/os/seteventmesg.o" - include "build/src/libultra/rmon/xprintf.o" + include "build/src/libultra/libc/xprintf.o" include "build/src/libultra/os/unmaptlball.o" include "build/src/libultra/io/epidma.o" include "build/src/libultra/libc/string.o" @@ -96,9 +96,9 @@ beginseg include "build/src/libultra/os/yieldthread.o" include "build/src/libultra/os/getcause.o" include "build/src/libultra/io/epirawwrite.o" - include "build/src/libultra/rmon/xlitob.o" + include "build/src/libultra/libc/xlitob.o" include "build/src/libultra/libc/ldiv.o" - include "build/src/libultra/rmon/xldtob.o" + include "build/src/libultra/libc/xldtob.o" include "build/src/boot/build.o" include "build/src/libultra/io/sirawwrite.o" include "build/src/libultra/io/vimgr.o" diff --git a/src/boot/assert.c b/src/boot/assert.c index 438432d423..fa206fc360 100644 --- a/src/boot/assert.c +++ b/src/boot/assert.c @@ -1,9 +1,9 @@ #include "global.h" -NORETURN void __assert(const char* exp, const char* file, s32 line) { +NORETURN void __assert(const char* assertion, const char* file, int line) { char msg[256]; - osSyncPrintf("Assertion failed: %s, file %s, line %d, thread %d\n", exp, file, line, osGetThreadId(NULL)); + osSyncPrintf("Assertion failed: %s, file %s, line %d, thread %d\n", assertion, file, line, osGetThreadId(NULL)); sprintf(msg, "ASSERT: %s:%d(%d)", file, line, osGetThreadId(NULL)); - Fault_AddHungupAndCrashImpl(msg, exp); + Fault_AddHungupAndCrashImpl(msg, assertion); } diff --git a/src/boot/is_debug.c b/src/boot/is_debug.c index 5e501f3af7..a47daecd2b 100644 --- a/src/boot/is_debug.c +++ b/src/boot/is_debug.c @@ -40,7 +40,7 @@ void rmonPrintf(const char* fmt, ...) { va_end(args); } -void* is_proutSyncPrintf(void* arg, const char* str, u32 count) { +void* is_proutSyncPrintf(void* arg, const char* str, size_t count) { u32 data; s32 pos; s32 start; diff --git a/src/code/code_800FCE80.c b/src/code/code_800FCE80.c index 3d73123da0..17b2bc4e57 100644 --- a/src/code/code_800FCE80.c +++ b/src/code/code_800FCE80.c @@ -1,5 +1,4 @@ #include "global.h" -#include "fp.h" s32 gUseAtanContFrac; diff --git a/src/code/fault_drawer.c b/src/code/fault_drawer.c index 121b7d29b0..181e682691 100644 --- a/src/code/fault_drawer.c +++ b/src/code/fault_drawer.c @@ -242,7 +242,7 @@ void FaultDrawer_FillScreen(void) { FaultDrawer_SetCursor(sFaultDrawer.xStart, sFaultDrawer.yStart); } -void* FaultDrawer_PrintCallback(void* arg, const char* str, u32 count) { +void* FaultDrawer_PrintCallback(void* arg, const char* str, size_t count) { for (; count != 0; count--, str++) { s32 curXStart; s32 curXEnd; diff --git a/src/code/gfxprint.c b/src/code/gfxprint.c index 7cd7a2a243..93757234d3 100644 --- a/src/code/gfxprint.c +++ b/src/code/gfxprint.c @@ -301,7 +301,7 @@ void GfxPrint_PrintString(GfxPrint* this, const char* str) { } } -void* GfxPrint_Callback(void* arg, const char* str, u32 size) { +void* GfxPrint_Callback(void* arg, const char* str, size_t size) { GfxPrint* this = arg; GfxPrint_PrintStringWithSize(this, str, sizeof(char), size); diff --git a/src/code/load.c b/src/code/load.c index 570a968d01..ac9f76d5cf 100644 --- a/src/code/load.c +++ b/src/code/load.c @@ -46,7 +46,7 @@ s32 Overlay_Load(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, void* // "Clear BSS area (% 08x-% 08x)" osSyncPrintf("BSS領域をクリアします(%08x-%08x)\n", end, end + ovlRelocs->bssSize); } - bzero((void*)end, ovlRelocs->bssSize); + bzero((void*)end, (s32)ovlRelocs->bssSize); } size = (uintptr_t)&ovlRelocs->relocations[ovlRelocs->nRelocations] - (uintptr_t)ovlRelocs; diff --git a/src/code/z_actor.c b/src/code/z_actor.c index bfae518bc5..fcb6387d54 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -810,7 +810,7 @@ void Actor_Init(Actor* actor, PlayState* play) { Actor_SetScale(actor, 0.01f); actor->targetMode = 3; actor->minVelocityY = -20.0f; - actor->xyzDistToPlayerSq = FLT_MAX; + actor->xyzDistToPlayerSq = MAXFLOAT; actor->naviEnemyId = NAVI_ENEMY_NONE; actor->uncullZoneForward = 1000.0f; actor->uncullZoneScale = 350.0f; @@ -1468,7 +1468,7 @@ f32 func_8002EFC0(Actor* actor, Player* player, s16 arg2) { if (player->unk_664 != NULL) { if ((yawTempAbs > 0x4000) || (actor->flags & ACTOR_FLAG_27)) { - return FLT_MAX; + return MAXFLOAT; } else { f32 ret = actor->xyzDistToPlayerSq - actor->xyzDistToPlayerSq * 0.8f * ((0x4000 - yawTempAbs) * (1.0f / 0x8000)); @@ -1478,7 +1478,7 @@ f32 func_8002EFC0(Actor* actor, Player* player, s16 arg2) { } if (yawTempAbs > 0x2AAA) { - return FLT_MAX; + return MAXFLOAT; } return actor->xyzDistToPlayerSq; @@ -1513,7 +1513,7 @@ s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) { f32 dist; if ((player->unk_664 == NULL) && (abs_var > 0x2AAA)) { - dist = FLT_MAX; + dist = MAXFLOAT; } else { dist = actor->xyzDistToPlayerSq; } @@ -3067,7 +3067,7 @@ Actor* func_80032AF0(PlayState* play, ActorContext* actorCtx, Actor** actorPtr, u8* entry; D_8015BBE8 = D_8015BBEC = NULL; - D_8015BBF0 = sbgmEnemyDistSq = FLT_MAX; + D_8015BBF0 = sbgmEnemyDistSq = MAXFLOAT; D_8015BBF8 = 0x7FFFFFFF; if (!Player_InCsMode(play)) { diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index 6178e6efcd..bdf0078893 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -3227,8 +3227,6 @@ void Collider_SetTrisDim(PlayState* play, ColliderTris* collider, s32 index, Col // by the compiler between structs like TriNorm and/or Vec3f, so they don't take space in bss. static s8 sBssDummy11; static s8 sBssDummy12; -static s8 sBssDummy13; -static s8 sBssDummy14; /** * Updates the world spheres for all of the collider's JntSph elements attached to the specified limb diff --git a/src/libultra/libc/absf.c b/src/libultra/libc/absf.c index ebdbb72c08..73c99f4602 100644 --- a/src/libultra/libc/absf.c +++ b/src/libultra/libc/absf.c @@ -1,5 +1,9 @@ #include "global.h" -f32 absf(f32 a) { - return fabsf(a); +float absf(float n) { +#ifndef __GNUC__ + return fabsf(n); +#else + return __builtin_fabsf(n); +#endif } diff --git a/src/libultra/libc/ldiv.c b/src/libultra/libc/ldiv.c index 8c53d3d4cc..10edd00a0c 100644 --- a/src/libultra/libc/ldiv.c +++ b/src/libultra/libc/ldiv.c @@ -1,6 +1,6 @@ -#include "global.h" +#include "stdlib.h" -ldiv_t ldiv(s32 num, s32 denom) { +ldiv_t ldiv(long num, long denom) { ldiv_t ret; ret.quot = num / denom; @@ -13,7 +13,7 @@ ldiv_t ldiv(s32 num, s32 denom) { return ret; } -lldiv_t lldiv(s64 num, s64 denom) { +lldiv_t lldiv(long long num, long long denom) { lldiv_t ret; ret.quot = num / denom; diff --git a/src/libultra/libc/ll.c b/src/libultra/libc/ll.c index 9d87204d1e..df56fb3f33 100644 --- a/src/libultra/libc/ll.c +++ b/src/libultra/libc/ll.c @@ -1,47 +1,48 @@ -#include "global.h" +// IDO Compiler Intrinsics for 64-bit arithmetic -s64 __ull_rshift(u64 l, s64 r) { - return l >> r; +long long __ull_rshift(unsigned long long left, long long right) { + return left >> right; } -u64 __ull_rem(u64 l, u64 r) { - return l % r; +unsigned long long __ull_rem(unsigned long long left, unsigned long long right) { + return left % right; } -u64 __ull_div(u64 l, u64 r) { - return l / r; +unsigned long long __ull_div(unsigned long long left, unsigned long long right) { + return left / right; } -s64 __ll_lshift(s64 l, s64 r) { - return l << r; +long long __ll_lshift(long long left, long long right) { + return left << right; } -s64 __ll_rem(s64 l, u64 r) { - return l % r; +long long __ll_rem(long long left, unsigned long long right) { + return left % right; } -s64 __ll_div(s64 l, s64 r) { - return l / r; +long long __ll_div(long long left, long long right) { + return left / right; } -s64 __ll_mul(s64 l, s64 r) { - return l * r; +long long __ll_mul(long long left, long long right) { + return left * right; } -void __ull_divremi(u64* quotient, u64* remainder, u64 dividend, u16 divisor) { +void __ull_divremi(unsigned long long int* quotient, unsigned long long int* remainder, + unsigned long long dividend, unsigned short divisor) { *quotient = dividend / divisor; *remainder = dividend % divisor; } -s64 __ll_mod(s64 l, s64 r) { - s64 remainder = l % r; +long long __ll_mod(long long left, long long right) { + long long rem = left % right; - if (((remainder < 0) && (r > 0)) || ((remainder > 0) && (r < 0))) { - remainder += r; + if ((rem < 0 && right > 0) || (rem > 0 && right < 0)) { + rem += right; } - return remainder; + return rem; } -s64 __ll_rshift(s64 l, s64 r) { - return l >> r; +long long __ll_rshift(long long left, long long right) { + return left >> right; } diff --git a/src/libultra/libc/llcvt.c b/src/libultra/libc/llcvt.c index c88d6f04fd..02a01074d2 100644 --- a/src/libultra/libc/llcvt.c +++ b/src/libultra/libc/llcvt.c @@ -1,33 +1,33 @@ -#include "global.h" +// IDO Compiler Intrinsics for 64-bit conversion -s64 __d_to_ll(f64 d) { +long long __d_to_ll(double d) { return d; } -s64 __f_to_ll(f32 f) { +long long __f_to_ll(float f) { return f; } -u64 __d_to_ull(f64 d) { +unsigned long long __d_to_ull(double d) { return d; } -u64 __f_to_ull(f32 f) { +unsigned long long __f_to_ull(float f) { return f; } -f64 __ll_to_d(s64 l) { +double __ll_to_d(long long l) { return l; } -f32 __ll_to_f(s64 l) { +float __ll_to_f(long long l) { return l; } -f64 __ull_to_d(u64 l) { +double __ull_to_d(unsigned long long l) { return l; } -f32 __ull_to_f(u64 l) { +float __ull_to_f(unsigned long long l) { return l; } diff --git a/src/libultra/libc/sprintf.c b/src/libultra/libc/sprintf.c new file mode 100644 index 0000000000..cb80fe39a9 --- /dev/null +++ b/src/libultra/libc/sprintf.c @@ -0,0 +1,32 @@ +#include "stdarg.h" +#include "stdio.h" +#include "string.h" +#include "ultra64/xstdio.h" + +void* proutSprintf(void* dst, const char* fmt, size_t size) { + return (char*)memcpy(dst, fmt, size) + size; +} + +int vsprintf(char* dst, const char* fmt, va_list args) { + int ret = _Printf(proutSprintf, dst, fmt, args); + + if (ret > -1) { + dst[ret] = '\0'; + } + return ret; +} + +int sprintf(char* dst, const char* fmt, ...) { + int ret; + va_list args; + va_start(args, fmt); + + ret = _Printf(proutSprintf, dst, fmt, args); + if (ret > -1) { + dst[ret] = '\0'; + } + + va_end(args); + + return ret; +} diff --git a/src/libultra/libc/sqrt.c b/src/libultra/libc/sqrt.c index 0e8cc95d51..a9a4403a33 100644 --- a/src/libultra/libc/sqrt.c +++ b/src/libultra/libc/sqrt.c @@ -1,9 +1,9 @@ #include "global.h" +double sqrt(double f) { #ifndef __GNUC__ -#define __builtin_sqrt sqrt -#endif - -f64 sqrt(f64 f) { + return sqrt(f); +#else return __builtin_sqrt(f); +#endif } diff --git a/src/libultra/libc/string.c b/src/libultra/libc/string.c index 37091ab83a..87e7c4c737 100644 --- a/src/libultra/libc/string.c +++ b/src/libultra/libc/string.c @@ -1,18 +1,18 @@ -#include "global.h" +#include "string.h" -const char* strchr(const char* str, s32 ch) { - u8 c = ch; +char* strchr(const char* str, int c) { + char ch = c; - while (*str != c) { + while (*str != ch) { if (*str == 0) { return NULL; } str++; } - return str; + return (char*)str; } -u32 strlen(const char* str) { +size_t strlen(const char* str) { const char* ptr = str; while (*ptr) { @@ -21,13 +21,13 @@ u32 strlen(const char* str) { return ptr - str; } -void* memcpy(void* dst, const void* src, size_t size) { - u8* _dst = dst; - const u8* _src = src; +void* memcpy(void* dst, const void* src, size_t n) { + char* _dst = dst; + const char* _src = src; - while (size > 0) { + while (n > 0) { *_dst++ = *_src++; - size--; + n--; } return dst; } diff --git a/src/libultra/rmon/xldtob.c b/src/libultra/libc/xldtob.c similarity index 79% rename from src/libultra/rmon/xldtob.c rename to src/libultra/libc/xldtob.c index cc518a44b2..662561b4bf 100644 --- a/src/libultra/rmon/xldtob.c +++ b/src/libultra/libc/xldtob.c @@ -1,13 +1,15 @@ -#include "global.h" +#include "stdlib.h" +#include "string.h" +#include "ultra64/xstdio.h" #define BUFF_LEN 0x20 -s16 _Ldunscale(s16*, _Pft*); -void _Genld(_Pft*, u8, u8*, s16, s16); +short _Ldunscale(short*, _Pft*); +void _Genld(_Pft*, char, char*, short, short); -const f64 D_800122E0[] = { 10e0L, 10e1L, 10e3L, 10e7L, 10e15L, 10e31L, 10e63L, 10e127L, 10e255L }; +static const double pows[] = { 10e0L, 10e1L, 10e3L, 10e7L, 10e15L, 10e31L, 10e63L, 10e127L, 10e255L }; -/* float properties */ +// float properties #define _D0 0 #define _DBIAS 0x3FF #define _DLONG 1 @@ -17,7 +19,8 @@ const f64 D_800122E0[] = { 10e0L, 10e1L, 10e3L, 10e7L, 10e15L, 10e31L, 10e63L, 1 #define _FRND 1 #define _LBIAS 0x3FFE #define _LOFF 15 -/* integer properties */ + +// integer properties #define _C2 1 #define _CSIGN 1 #define _ILONG 0 @@ -31,38 +34,26 @@ const f64 D_800122E0[] = { 10e0L, 10e1L, 10e3L, 10e7L, 10e15L, 10e31L, 10e63L, 1 #define _DNAN (0x8000 | _DMAX << _DOFF | 1 << (_DOFF - 1)) #define _DSIGN 0x8000 #if _D0 == 3 -#define _D1 2 /* little-endian order */ +#define _D1 2 // little-endian order #define _D2 1 #define _D3 0 #else -#define _D1 1 /* big-endian order */ +#define _D1 1 // big-endian order #define _D2 2 #define _D3 3 #endif -void _Ldtob(_Pft* args, u8 type) { - u8 buff[BUFF_LEN]; - u8* ptr = buff; - u32 sp70; - f64 val = args->v.ld; - /* maybe struct? */ - s16 err; - s16 nsig; - s16 exp; - - s32 i; - s32 n; - f64 factor; - s32 gen; - s32 j; - s32 lo; - ldiv_t qr; - u8 drop; - s32 n2; +void _Ldtob(_Pft* args, char code) { + char buff[BUFF_LEN]; + char* ptr = buff; + LONG_DOUBLE_TYPE val = args->v.ld; + short err; + short nsig; + short exp; if (args->prec < 0) { args->prec = 6; - } else if (args->prec == 0 && (type == 'g' || type == 'G')) { + } else if (args->prec == 0 && (code == 'g' || code == 'G')) { args->prec = 1; } err = _Ldunscale(&exp, (_Pft*)args); @@ -74,16 +65,22 @@ void _Ldtob(_Pft* args, u8 type) { nsig = 0; exp = 0; } else { + int i; + int n; + double factor; + int gen; + if (val < 0) { val = -val; } - exp = exp * 30103 / 0x000186A0 - 4; + + exp = exp * 30103 / 100000 - 4; if (exp < 0) { n = (3 - exp) & ~3; exp = -n; for (i = 0; n > 0; n >>= 1, i++) { if ((n & 1) != 0) { - val *= D_800122E0[i]; + val *= pows[i]; } } } else if (exp > 0) { @@ -92,27 +89,33 @@ void _Ldtob(_Pft* args, u8 type) { for (n = exp, i = 0; n > 0; n >>= 1, i++) { if ((n & 1) != 0) { - factor *= D_800122E0[i]; + factor *= pows[i]; } } val /= factor; } - gen = ((type == 'f') ? exp + 10 : 6) + args->prec; + + gen = ((code == 'f') ? exp + 10 : 6) + args->prec; if (gen > 0x13) { gen = 0x13; } + *ptr++ = '0'; while (gen > 0 && 0 < val) { - lo = val; + int j; + int lo = val; + if ((gen -= 8) > 0) { val = (val - lo) * 1.0e8; } - ptr = ptr + 8; + ptr += 8; + for (j = 8; lo > 0 && --j >= 0;) { - qr = ldiv(lo, 10); + ldiv_t qr = ldiv(lo, 10); *--ptr = qr.rem + '0'; lo = qr.quot; } + while (--j >= 0) { ptr--; *ptr = '0'; @@ -125,11 +128,14 @@ void _Ldtob(_Pft* args, u8 type) { --gen, --exp; } - nsig = ((type == 'f') ? exp + 1 : ((type == 'e' || type == 'E') ? 1 : 0)) + args->prec; + nsig = ((code == 'f') ? exp + 1 : ((code == 'e' || code == 'E') ? 1 : 0)) + args->prec; if (gen < nsig) { nsig = gen; } if (nsig > 0) { + char drop; + int n2; + if (nsig < gen && ptr[nsig] > '4') { drop = '9'; } else { @@ -147,16 +153,16 @@ void _Ldtob(_Pft* args, u8 type) { } } } - _Genld((_Pft*)args, type, ptr, nsig, exp); + _Genld((_Pft*)args, code, ptr, nsig, exp); } -s16 _Ldunscale(s16* pex, _Pft* px) { - u16* ps = (u16*)px; - s16 xchar = (ps[_D0] & _DMASK) >> _DOFF; +short _Ldunscale(short* pex, _Pft* px) { + unsigned short* ps = (unsigned short*)px; + short xchar = (ps[_D0] & _DMASK) >> _DOFF; if (xchar == _DMAX) { /* NaN or INF */ *pex = 0; - return (s16)(ps[_D0] & _DFRAC || ps[_D1] || ps[_D2] || ps[_D3] ? NAN : INF); + return (short)(ps[_D0] & _DFRAC || ps[_D1] || ps[_D2] || ps[_D3] ? NAN : INF); } else if (0 < xchar) { ps[_D0] = (ps[_D0] & ~_DMASK) | (_DBIAS << _DOFF); *pex = xchar - (_DBIAS - 1); @@ -170,13 +176,13 @@ s16 _Ldunscale(s16* pex, _Pft* px) { } } -void _Genld(_Pft* px, u8 code, u8* p, s16 nsig, s16 xexp) { - u8 point = '.'; +void _Genld(_Pft* px, char code, char* p, short nsig, short xexp) { + const char point = '.'; if (nsig <= 0) { nsig = 1, - p = (u8*)"0"; + p = (char*)"0"; } if (code == 'f' || ((code == 'g' || code == 'G') && (-4 <= xexp) && (xexp < px->prec))) { /* 'f' format */ @@ -248,7 +254,7 @@ void _Genld(_Pft* px, u8 code, u8* p, s16 nsig, s16 xexp) { px->n1 += nsig; px->nz1 = px->prec - nsig; } - p = (u8*)&px->s[px->n1]; /* put exponent */ + p = &px->s[px->n1]; /* put exponent */ *p++ = code; if (0 <= xexp) { *p++ = '+'; @@ -264,10 +270,10 @@ void _Genld(_Pft* px, u8 code, u8* p, s16 nsig, s16 xexp) { } *p++ = xexp / 10 + '0', xexp %= 10; *p++ = xexp + '0'; - px->n2 = p - (u8*)&px->s[px->n1]; + px->n2 = p - &px->s[px->n1]; } if ((px->flags & (FLAGS_ZERO | FLAGS_MINUS)) == FLAGS_ZERO) { /* pad with leading zeros */ - s32 n = px->n0 + px->n1 + px->nz1 + px->n2 + px->nz2; + int n = px->n0 + px->n1 + px->nz1 + px->n2 + px->nz2; if (n < px->width) { px->nz0 = px->width - n; diff --git a/src/libultra/libc/xlitob.c b/src/libultra/libc/xlitob.c new file mode 100644 index 0000000000..32e769b160 --- /dev/null +++ b/src/libultra/libc/xlitob.c @@ -0,0 +1,58 @@ +#include "stdlib.h" +#include "string.h" +#include "ultra64/xstdio.h" + +#define BUFF_LEN 0x18 + +static char ldigs[] = "0123456789abcdef"; +static char udigs[] = "0123456789ABCDEF"; + +void _Litob(_Pft* args, char type) { + char buff[BUFF_LEN]; + const char* digs; + int base; + int i; + unsigned long long num; + + if (type == 'X') { + digs = udigs; + } else { + digs = ldigs; + } + + base = (type == 'o') ? 8 : ((type != 'x' && type != 'X') ? 10 : 16); + i = BUFF_LEN; + num = args->v.ll; + + if ((type == 'd' || type == 'i') && args->v.ll < 0) { + num = -num; + } + + if (num != 0 || args->prec != 0) { + buff[--i] = digs[num % base]; + } + + args->v.ll = num / base; + + while (args->v.ll > 0 && i > 0) { + lldiv_t quotrem = lldiv(args->v.ll, base); + + args->v.ll = quotrem.quot; + buff[--i] = digs[quotrem.rem]; + } + + args->n1 = BUFF_LEN - i; + + memcpy(args->s, buff + i, args->n1); + + if (args->n1 < args->prec) { + args->nz0 = args->prec - args->n1; + } + + if (args->prec < 0 && (args->flags & (FLAGS_ZERO | FLAGS_MINUS)) == FLAGS_ZERO) { + i = args->width - args->n0 - args->nz0 - args->n1; + if (i > 0) { + args->nz0 += i; + } + } +} diff --git a/src/libultra/rmon/xprintf.c b/src/libultra/libc/xprintf.c similarity index 51% rename from src/libultra/rmon/xprintf.c rename to src/libultra/libc/xprintf.c index 36fc00ad51..a838c7173f 100644 --- a/src/libultra/rmon/xprintf.c +++ b/src/libultra/libc/xprintf.c @@ -1,11 +1,19 @@ -#include "global.h" +#include "stdarg.h" +#include "stdbool.h" +#include "stdint.h" +#include "stdlib.h" +#include "string.h" +#include "ultra64/xstdio.h" -#define ATOI(i, a) \ - for (i = 0; *a >= '0' && *a <= '9'; a++) \ - if (i < 999) \ +#define isdigit(x) (((x) >= '0' && (x) <= '9')) +#define LDSIGN(x) (((unsigned short*)&(x))[0] & 0x8000) + +#define ATOI(i, a) \ + for (i = 0; isdigit(*a); a++) \ + if (i < 999) \ i = *a + i * 10 - '0'; -#define _PROUT(fmt, _size) \ +#define PUT(fmt, _size) \ if (_size > 0) { \ arg = pfn(arg, fmt, _size); \ if (arg != NULL) \ @@ -13,51 +21,57 @@ else \ return x.nchar; \ } -#define _PAD(m, src, extracond) \ - if (extracond && m > 0) { \ - s32 i; \ - s32 j; \ - for (j = m; j > 0; j -= i) { \ - if ((u32)j > 32) \ - i = 32; \ - else \ - i = j; \ - _PROUT(src, i); \ - } \ + +#define MAX_PAD ((int)sizeof(spaces) - 1) + +#define PAD(src, m) \ + if (m > 0) { \ + int i; \ + int j; \ + for (j = m; j > 0; j -= i) { \ + if ((unsigned)j > MAX_PAD) \ + i = MAX_PAD; \ + else \ + i = j; \ + PUT(src, i); \ + } \ } char spaces[] = " "; char zeroes[] = "00000000000000000000000000000000"; -void _Putfld(_Pft*, va_list*, u8, u8*); +void _Putfld(_Pft*, va_list*, char, char*); -s32 _Printf(PrintCallback pfn, void* arg, const char* fmt, va_list ap) { +int _Printf(PrintCallback pfn, void* arg, const char* fmt, va_list ap) { _Pft x; x.nchar = 0; while (true) { static const char fchar[] = " +-#0"; - static const u32 fbit[] = { FLAGS_SPACE, FLAGS_PLUS, FLAGS_MINUS, FLAGS_HASH, FLAGS_ZERO, 0 }; + static const unsigned int fbit[] = { FLAGS_SPACE, FLAGS_PLUS, FLAGS_MINUS, FLAGS_HASH, FLAGS_ZERO, 0 }; - const u8* s = (u8*)fmt; - u8 c; + const char* s = fmt; + char c; const char* t; - u8 ac[0x20]; + char ac[0x20]; while ((c = *s) != 0 && c != '%') { s++; } - _PROUT(fmt, s - (u8*)fmt); + + PUT(fmt, s - fmt); if (c == 0) { return x.nchar; } - fmt = (char*)++s; - x.flags = 0; - for (; (t = strchr(fchar, *s)) != NULL; s++) { + + fmt = ++s; + + for (x.flags = 0; (t = strchr(fchar, *s)) != NULL; s++) { x.flags |= fbit[t - fchar]; } + if (*s == '*') { - x.width = va_arg(ap, s32); + x.width = va_arg(ap, int); if (x.width < 0) { x.width = -x.width; x.flags |= FLAGS_MINUS; @@ -66,21 +80,23 @@ s32 _Printf(PrintCallback pfn, void* arg, const char* fmt, va_list ap) { } else { ATOI(x.width, s); } + if (*s != '.') { x.prec = -1; } else { s++; if (*s == '*') { - x.prec = va_arg(ap, s32); + x.prec = va_arg(ap, int); s++; } else { ATOI(x.prec, s); } } + if (strchr("hlL", *s) != NULL) { x.qual = *s++; } else { - x.qual = 0; + x.qual = '\0'; } if (x.qual == 'l' && *s == 'l') { @@ -89,38 +105,42 @@ s32 _Printf(PrintCallback pfn, void* arg, const char* fmt, va_list ap) { } _Putfld(&x, &ap, *s, ac); x.width -= x.n0 + x.nz0 + x.n1 + x.nz1 + x.n2 + x.nz2; - _PAD(x.width, spaces, !(x.flags & FLAGS_MINUS)); - _PROUT((char*)ac, x.n0); - _PAD(x.nz0, zeroes, 1); - _PROUT(x.s, x.n1); - _PAD(x.nz1, zeroes, 1); - _PROUT((char*)(&x.s[x.n1]), x.n2) - _PAD(x.nz2, zeroes, 1); - _PAD(x.width, spaces, x.flags & FLAGS_MINUS); - fmt = (char*)s + 1; + if (!(x.flags & FLAGS_MINUS)) { + PAD(spaces, x.width); + } + PUT(ac, x.n0); + PAD(zeroes, x.nz0); + PUT(x.s, x.n1); + PAD(zeroes, x.nz1); + PUT(&x.s[x.n1], x.n2) + PAD(zeroes, x.nz2); + if (x.flags & FLAGS_MINUS) { + PAD(spaces, x.width); + } + fmt = s + 1; } } -void _Putfld(_Pft* px, va_list* pap, u8 code, u8* ac) { +void _Putfld(_Pft* px, va_list* pap, char code, char* ac) { px->n0 = px->nz0 = px->n1 = px->nz1 = px->n2 = px->nz2 = 0; switch (code) { case 'c': - ac[px->n0++] = va_arg(*pap, u32); + ac[px->n0++] = va_arg(*pap, unsigned int); break; case 'd': case 'i': if (px->qual == 'l') { - px->v.ll = va_arg(*pap, s32); + px->v.ll = va_arg(*pap, long); } else if (px->qual == 'L') { - px->v.ll = va_arg(*pap, s64); + px->v.ll = va_arg(*pap, long long); } else { - px->v.ll = va_arg(*pap, s32); + px->v.ll = va_arg(*pap, int); } if (px->qual == 'h') { - px->v.ll = (s16)px->v.ll; + px->v.ll = (short)px->v.ll; } if (px->v.ll < 0) { @@ -131,75 +151,76 @@ void _Putfld(_Pft* px, va_list* pap, u8 code, u8* ac) { ac[px->n0++] = ' '; } - px->s = (char*)&ac[px->n0]; + px->s = &ac[px->n0]; _Litob(px, code); break; + case 'x': case 'X': case 'u': case 'o': if (px->qual == 'l') { - px->v.ll = va_arg(*pap, s32); + px->v.ll = va_arg(*pap, long); } else if (px->qual == 'L') { - px->v.ll = va_arg(*pap, s64); + px->v.ll = va_arg(*pap, long long); } else { - px->v.ll = va_arg(*pap, s32); + px->v.ll = va_arg(*pap, int); } if (px->qual == 'h') { - px->v.ll = (u16)px->v.ll; - } else if (px->qual == 0) { - px->v.ll = (u32)px->v.ll; + px->v.ll = (unsigned short)px->v.ll; + } else if (px->qual == '\0') { + px->v.ll = (unsigned int)px->v.ll; } if (px->flags & FLAGS_HASH) { ac[px->n0++] = '0'; if (code == 'x' || code == 'X') { - ac[px->n0++] = code; } } - px->s = (char*)&ac[px->n0]; + px->s = &ac[px->n0]; _Litob(px, code); break; + case 'e': case 'f': case 'g': case 'E': case 'G': - px->v.ld = px->qual == 'L' ? va_arg(*pap, f64) : va_arg(*pap, f64); + px->v.ld = px->qual == 'L' ? va_arg(*pap, LONG_DOUBLE_TYPE) : va_arg(*pap, double); - if (*(u16*)&px->v.ll & 0x8000) { + if (LDSIGN(px->v.ld)) { ac[px->n0++] = '-'; - } else { - if (px->flags & FLAGS_PLUS) { - ac[px->n0++] = '+'; - } else if (px->flags & FLAGS_SPACE) { - ac[px->n0++] = ' '; - } + } else if (px->flags & FLAGS_PLUS) { + ac[px->n0++] = '+'; + } else if (px->flags & FLAGS_SPACE) { + ac[px->n0++] = ' '; } - px->s = (char*)&ac[px->n0]; + px->s = &ac[px->n0]; _Ldtob(px, code); break; + case 'n': if (px->qual == 'h') { - *(va_arg(*pap, u16*)) = px->nchar; + *(va_arg(*pap, unsigned short*)) = px->nchar; } else if (px->qual == 'l') { - *va_arg(*pap, u32*) = px->nchar; + *va_arg(*pap, unsigned long*) = px->nchar; } else if (px->qual == 'L') { - *va_arg(*pap, u64*) = px->nchar; + *va_arg(*pap, unsigned long long*) = px->nchar; } else { - *va_arg(*pap, u32*) = px->nchar; + *va_arg(*pap, unsigned int*) = px->nchar; } break; case 'p': - px->v.ll = (s32)va_arg(*pap, void*); - px->s = (char*)&ac[px->n0]; + px->v.ll = (intptr_t)va_arg(*pap, void*); + px->s = &ac[px->n0]; _Litob(px, 'x'); break; + case 's': px->s = va_arg(*pap, char*); px->n1 = strlen(px->s); @@ -207,9 +228,11 @@ void _Putfld(_Pft* px, va_list* pap, u8 code, u8* ac) { px->n1 = px->prec; } break; + case '%': ac[px->n0++] = '%'; break; + default: ac[px->n0++] = code; break; diff --git a/src/libultra/rmon/sprintf.c b/src/libultra/rmon/sprintf.c deleted file mode 100644 index a149a1eafa..0000000000 --- a/src/libultra/rmon/sprintf.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "global.h" - -void* proutSprintf(void* dst, const char* fmt, u32 size) { - return (void*)((u32)memcpy(dst, fmt, size) + size); -} - -s32 vsprintf(char* dst, const char* fmt, va_list args) { - s32 ret = _Printf(proutSprintf, dst, fmt, args); - if (ret > -1) { - dst[ret] = '\0'; - } - return ret; -} - -s32 sprintf(char* dst, const char* fmt, ...) { - s32 ret; - va_list args; - va_start(args, fmt); - - ret = _Printf(proutSprintf, dst, fmt, args); - if (ret > -1) { - dst[ret] = '\0'; - } - - va_end(args); - - return ret; -} diff --git a/src/libultra/rmon/xlitob.c b/src/libultra/rmon/xlitob.c deleted file mode 100644 index 2f8152a109..0000000000 --- a/src/libultra/rmon/xlitob.c +++ /dev/null @@ -1,56 +0,0 @@ -#include "global.h" - -#define BUFF_LEN 0x18 - -u8 D_8000AF70[] = "0123456789abcdef"; -u8 D_8000AF84[] = "0123456789ABCDEF"; - -void _Litob(_Pft* args, u8 type) { - u8 buff[BUFF_LEN]; - const u8* numMap; - s32 base; - s32 idx; - u64 num; - lldiv_t quotrem; - - if (type == 'X') { - numMap = D_8000AF84; - } else { - numMap = D_8000AF70; - } - - base = (type == 'o') ? 8 : ((type != 'x' && type != 'X') ? 10 : 16); - idx = BUFF_LEN; - num = args->v.ll; - - if ((type == 'd' || type == 'i') && args->v.ll < 0) { - num = -num; - } - - if (num != 0 || args->prec != 0) { - buff[--idx] = numMap[num % base]; - } - - args->v.ll = num / base; - - while (args->v.ll > 0 && idx > 0) { - quotrem = lldiv(args->v.ll, base); - args->v.ll = quotrem.quot; - buff[--idx] = numMap[quotrem.rem]; - } - - args->n1 = BUFF_LEN - idx; - - memcpy(args->s, buff + idx, args->n1); - - if (args->n1 < args->prec) { - args->nz0 = args->prec - args->n1; - } - - if (args->prec < 0 && (args->flags & (FLAGS_ZERO | FLAGS_MINUS)) == FLAGS_ZERO) { - idx = args->width - args->n0 - args->nz0 - args->n1; - if (idx > 0) { - args->nz0 += idx; - } - } -} diff --git a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c index f3f92488de..f5c8ede1c8 100644 --- a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c +++ b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c @@ -70,7 +70,7 @@ f32 func_809946BC(PlayState* play, DoorGerudo* this, f32 arg2, f32 arg3, f32 arg func_8002DBD0(&this->dyna.actor, &sp1C, &playerPos); if ((arg3 < fabsf(sp1C.x)) || (arg4 < fabsf(sp1C.y))) { - return FLT_MAX; + return MAXFLOAT; } else { return sp1C.z; } 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 67372227bb..8171d34fe1 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -511,7 +511,7 @@ f32 DoorShutter_GetPlayerDistance(PlayState* play, DoorShutter* this, f32 offset func_8002DBD0(&this->dyna.actor, &relPlayerPos, &playerPos); if (fabsf(relPlayerPos.x) > maxDistSides || fabsf(relPlayerPos.y) > maxDistY) { - return FLT_MAX; + return MAXFLOAT; } else { return relPlayerPos.z; } diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 1655eeea52..2ed5e048ac 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -11214,7 +11214,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { this->targetActorDistance = 0.0f; } else { this->targetActor = NULL; - this->targetActorDistance = FLT_MAX; + this->targetActorDistance = MAXFLOAT; this->exchangeItemId = EXCH_ITEM_NONE; } @@ -11234,7 +11234,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { } this->stateFlags2 &= ~PLAYER_STATE2_23; - this->closestSecretDistSq = FLT_MAX; + this->closestSecretDistSq = MAXFLOAT; temp_f0 = this->actor.world.pos.y - this->actor.prevPos.y; From 4908b8b37c2b9e84722fd3a57c3d1766adef33f8 Mon Sep 17 00:00:00 2001 From: fig02 Date: Sat, 28 Oct 2023 07:46:24 -0400 Subject: [PATCH 14/16] Player Docs: public facing csAction things (#1561) * name public csAction functions * format * adjust function comment * format --- include/functions.h | 4 +- include/z64.h | 2 +- include/z64player.h | 2 +- src/code/z_actor.c | 33 ++++++- src/code/z_camera.c | 16 ++-- src/code/z_onepointdemo.c | 96 +++++++++---------- src/code/z_parameter.c | 2 +- src/code/z_play.c | 3 +- .../actors/ovl_Bg_Breakwall/z_bg_breakwall.c | 2 +- .../ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c | 18 ++-- .../ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c | 8 +- .../ovl_Bg_Heavy_Block/z_bg_heavy_block.c | 2 +- .../ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c | 4 +- .../ovl_Bg_Ice_Objects/z_bg_ice_objects.c | 6 +- .../ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c | 2 +- .../z_bg_mori_kaitenkabe.c | 4 +- .../actors/ovl_Bg_Po_Event/z_bg_po_event.c | 4 +- .../z_bg_spot00_hanebasi.c | 2 +- .../actors/ovl_Boss_Dodongo/z_boss_dodongo.c | 12 +-- src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c | 12 +-- src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c | 6 +- .../actors/ovl_Boss_Ganon/z_boss_ganon.c | 32 +++---- .../actors/ovl_Boss_Ganon2/z_boss_ganon2.c | 56 +++++------ .../ovl_Boss_Ganondrof/z_boss_ganondrof.c | 4 +- .../actors/ovl_Boss_Goma/z_boss_goma.c | 14 +-- src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 12 +-- src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 8 +- src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c | 18 ++-- src/overlays/actors/ovl_Boss_Va/z_boss_va.c | 20 ++-- src/overlays/actors/ovl_Demo_Im/z_demo_im.c | 2 +- .../actors/ovl_Door_Shutter/z_door_shutter.c | 4 +- .../actors/ovl_Door_Warp1/z_door_warp1.c | 6 +- .../ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c | 10 +- .../ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c | 8 +- src/overlays/actors/ovl_En_Daiku/z_en_daiku.c | 4 +- .../ovl_En_Diving_Game/z_en_diving_game.c | 16 ++-- .../actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c | 4 +- .../actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c | 6 +- src/overlays/actors/ovl_En_Du/z_en_du.c | 8 +- .../actors/ovl_En_Ex_Item/z_en_ex_item.c | 2 +- src/overlays/actors/ovl_En_Ge1/z_en_ge1.c | 4 +- src/overlays/actors/ovl_En_Ge2/z_en_ge2.c | 2 +- src/overlays/actors/ovl_En_Ge3/z_en_ge3.c | 2 +- src/overlays/actors/ovl_En_GeldB/z_en_geldb.c | 2 +- src/overlays/actors/ovl_En_Go2/z_en_go2.c | 4 +- .../actors/ovl_En_Heishi1/z_en_heishi1.c | 4 +- .../actors/ovl_En_Heishi2/z_en_heishi2.c | 14 +-- .../actors/ovl_En_Heishi3/z_en_heishi3.c | 4 +- .../actors/ovl_En_Heishi4/z_en_heishi4.c | 4 +- src/overlays/actors/ovl_En_In/z_en_in.c | 4 +- .../actors/ovl_En_Kakasi/z_en_kakasi.c | 6 +- .../actors/ovl_En_Kakasi3/z_en_kakasi3.c | 10 +- src/overlays/actors/ovl_En_Kz/z_en_kz.c | 4 +- src/overlays/actors/ovl_En_Owl/z_en_owl.c | 6 +- src/overlays/actors/ovl_En_Skj/z_en_skj.c | 4 +- src/overlays/actors/ovl_En_Ta/z_en_ta.c | 8 +- .../actors/ovl_En_Torch2/z_en_torch2.c | 2 +- .../actors/ovl_En_Wallmas/z_en_wallmas.c | 2 +- .../ovl_En_Wonder_Talk2/z_en_wonder_talk2.c | 4 +- src/overlays/actors/ovl_En_Zl1/z_en_zl1.c | 4 +- src/overlays/actors/ovl_En_Zl4/z_en_zl4.c | 8 +- src/overlays/actors/ovl_En_fHG/z_en_fhg.c | 8 +- src/overlays/actors/ovl_Fishing/z_fishing.c | 10 +- .../actors/ovl_player_actor/z_player.c | 82 +++++++++------- 64 files changed, 359 insertions(+), 317 deletions(-) diff --git a/include/functions.h b/include/functions.h index 506f31e5f4..771b666020 100644 --- a/include/functions.h +++ b/include/functions.h @@ -375,8 +375,8 @@ void func_8002DE74(PlayState* play, Player* player); void Actor_MountHorse(PlayState* play, Player* player, Actor* horse); int func_8002DEEC(Player* player); void func_8002DF18(PlayState* play, Player* player); -s32 func_8002DF38(PlayState* play, Actor* actor, u8 csAction); -s32 func_8002DF54(PlayState* play, Actor* actor, u8 csAction); +s32 Player_SetCsAction(PlayState* play, Actor* csActor, u8 csAction); +s32 Player_SetCsActionWithHaltedActors(PlayState* play, Actor* csActor, u8 csAction); void func_8002DF90(DynaPolyActor* dynaActor); void func_8002DFA4(DynaPolyActor* dynaActor, f32 arg1, s16 arg2); s32 Player_IsFacingActor(Actor* actor, s16 maxAngle, PlayState* play); diff --git a/include/z64.h b/include/z64.h index 5ef4bf1e60..572afb4d1d 100644 --- a/include/z64.h +++ b/include/z64.h @@ -402,7 +402,7 @@ typedef struct PlayState { /* 0x11D44 */ int (*isPlayerDroppingFish)(struct PlayState* play); /* 0x11D48 */ s32 (*startPlayerFishing)(struct PlayState* play); /* 0x11D4C */ s32 (*grabPlayer)(struct PlayState* play, Player* player); - /* 0x11D50 */ s32 (*startPlayerCutscene)(struct PlayState* play, Actor* actor, s32 csAction); + /* 0x11D50 */ s32 (*tryPlayerCsAction)(struct PlayState* play, Actor* actor, s32 csAction); /* 0x11D54 */ void (*func_11D54)(Player* player, struct PlayState* play); /* 0x11D58 */ s32 (*damagePlayer)(struct PlayState* play, s32 damage); /* 0x11D5C */ void (*talkWithPlayer)(struct PlayState* play, Actor* actor); diff --git a/include/z64player.h b/include/z64player.h index 8b550bb8c3..dbaa71e2e7 100644 --- a/include/z64player.h +++ b/include/z64player.h @@ -726,7 +726,7 @@ typedef struct Player { /* 0x0445 */ u8 prevCsAction; /* 0x0446 */ u8 cueId; /* 0x0447 */ u8 unk_447; - /* 0x0448 */ Actor* unk_448; + /* 0x0448 */ Actor* csActor; // Actor involved in a `csAction`. Typically the actor that invoked the cutscene. /* 0x044C */ char unk_44C[0x004]; /* 0x0450 */ Vec3f unk_450; /* 0x045C */ Vec3f unk_45C; diff --git a/src/code/z_actor.c b/src/code/z_actor.c index fcb6387d54..091b5d109f 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1057,20 +1057,45 @@ void func_8002DF18(PlayState* play, Player* player) { func_8006DC68(play, player); } -s32 func_8002DF38(PlayState* play, Actor* actor, u8 csAction) { +/** + * Sets a Player Cutscene Action specified by `csAction`. + * There are no safety checks to see if Player is already in some form of a cutscene state. + * This will instantly take effect. + * + * `haltActorsDuringCsAction` being set to false in this function means that all actors will + * be able to update while Player is performing the cutscene action. + * + * Note: due to how player implements initializing the cutscene action state, `haltActorsDuringCsAction` + * will only be considered the first time player starts a `csAction`. + * Player must leave the cutscene action state and enter it again before halting actors can be toggled. + */ +s32 Player_SetCsAction(PlayState* play, Actor* csActor, u8 csAction) { Player* player = GET_PLAYER(play); player->csAction = csAction; - player->unk_448 = actor; + player->csActor = csActor; player->cv.haltActorsDuringCsAction = false; return true; } -s32 func_8002DF54(PlayState* play, Actor* actor, u8 csAction) { +/** + * Sets a Player Cutscene Action specified by `csAction`. + * There are no safety checks to see if Player is already in some form of a cutscene state. + * This will instantly take effect. + * + * `haltActorsDuringCsAction` being set to true in this function means that eventually `PLAYER_STATE1_29` will be set. + * This makes it so actors belonging to categories `ACTORCAT_ENEMY` and `ACTORCAT_MISC` will not update + * while Player is performing the cutscene action. + * + * Note: due to how player implements initializing the cutscene action state, `haltActorsDuringCsAction` + * will only be considered the first time player starts a `csAction`. + * Player must leave the cutscene action state and enter it again before halting actors can be toggled. + */ +s32 Player_SetCsActionWithHaltedActors(PlayState* play, Actor* csActor, u8 csAction) { Player* player = GET_PLAYER(play); - func_8002DF38(play, actor, csAction); + Player_SetCsAction(play, csActor, csAction); player->cv.haltActorsDuringCsAction = true; return true; diff --git a/src/code/z_camera.c b/src/code/z_camera.c index d62b945965..ef2964d451 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -5266,11 +5266,11 @@ s32 Camera_Unique9(Camera* camera) { } else { // initField is a PlayerCsAction if ((camera->player->stateFlags1 & PLAYER_STATE1_27) && (player->currentBoots != PLAYER_BOOTS_IRON)) { - func_8002DF38(camera->play, camera->target, PLAYER_CSACTION_8); + Player_SetCsAction(camera->play, camera->target, PLAYER_CSACTION_8); osSyncPrintf("camera: demo: player demo set WAIT\n"); } else { osSyncPrintf("camera: demo: player demo set %d\n", rwData->curKeyFrame->initField); - func_8002DF38(camera->play, camera->target, rwData->curKeyFrame->initField); + Player_SetCsAction(camera->play, camera->target, rwData->curKeyFrame->initField); } } } @@ -6236,14 +6236,14 @@ s32 Camera_Demo5(Camera* camera) { framesDiff = camera->play->state.frames - sDemo5PrevAction12Frame; if (player->stateFlags1 & PLAYER_STATE1_11) { // holding object over head. - func_8002DF54(camera->play, camera->target, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(camera->play, camera->target, PLAYER_CSACTION_8); } else if (ABS(framesDiff) > 3000) { - func_8002DF54(camera->play, camera->target, PLAYER_CSACTION_12); + Player_SetCsActionWithHaltedActors(camera->play, camera->target, PLAYER_CSACTION_12); } else { - func_8002DF54(camera->play, camera->target, PLAYER_CSACTION_69); + Player_SetCsActionWithHaltedActors(camera->play, camera->target, PLAYER_CSACTION_69); } } else { - func_8002DF54(camera->play, camera->target, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(camera->play, camera->target, PLAYER_CSACTION_1); } } @@ -6305,7 +6305,7 @@ s32 Camera_Demo6(Camera* camera) { FALLTHROUGH; case 1: if (stateTimers[camera->animState] < rwData->animTimer) { - func_8002DF54(camera->play, &camera->player->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(camera->play, &camera->player->actor, PLAYER_CSACTION_8); Actor_GetWorld(&focusPosRot, camFocus); rwData->atTarget.x = focusPosRot.pos.x; rwData->atTarget.y = focusPosRot.pos.y - 20.0f; @@ -7842,7 +7842,7 @@ void Camera_Finish(Camera* camera) { player->stateFlags1 &= ~PLAYER_STATE1_29; if (player->csAction != PLAYER_CSACTION_NONE) { - func_8002DF54(camera->play, &player->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(camera->play, &player->actor, PLAYER_CSACTION_7); osSyncPrintf("camera: player demo end!!\n"); } diff --git a/src/code/z_onepointdemo.c b/src/code/z_onepointdemo.c index fc7f7a5d4e..65c5b5d69f 100644 --- a/src/code/z_onepointdemo.c +++ b/src/code/z_onepointdemo.c @@ -278,7 +278,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act case 2290: { Actor* rideActor = player->rideActor; - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); if (rideActor != NULL) { rideActor->freezeTimer = 180; } @@ -290,7 +290,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act } break; case 5120: - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); csInfo->keyFrames = D_80121314; csInfo->keyFrameCount = ARRAY_COUNT(D_80121314); @@ -301,7 +301,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act case 4510: D_8012133C[0].eyeTargetInit = actor->world.pos; D_8012133C[0].eyeTargetInit.y = player->actor.world.pos.y + 40.0f; - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); csInfo->keyFrames = D_8012133C; csInfo->keyFrameCount = ARRAY_COUNT(D_8012133C); @@ -320,7 +320,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0); Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2); Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); subCam->roll = 0; subCam->fov = 50.0f; if (subCam->childCamId != CAM_ID_MAIN) { @@ -335,7 +335,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act if (Rand_ZeroOne() < 0.0f) { D_801213B4[3].eyeTargetInit.x = -D_801213B4[3].eyeTargetInit.x; } - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); csInfo->keyFrames = D_801213B4; csInfo->keyFrameCount = ARRAY_COUNT(D_801213B4); @@ -382,11 +382,11 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 6; subCam->fov = 75.0f; - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); break; case 3040: - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); D_8012151C[0].timerInit = timer - 1; csInfo->keyFrames = D_8012151C; @@ -411,7 +411,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrameCount = ARRAY_COUNT(D_8012156C); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); break; case 3010: @@ -443,7 +443,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act break; case 3090: - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); csInfo->keyFrames = D_80121814; csInfo->keyFrameCount = ARRAY_COUNT(D_80121814); @@ -460,7 +460,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 70.0f; - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); break; case 3380: @@ -468,7 +468,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801218B4; csInfo->keyFrameCount = ARRAY_COUNT(D_801218B4); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -481,13 +481,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121904; csInfo->keyFrameCount = ARRAY_COUNT(D_80121904); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; case 3050: Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3); - func_8002DF54(play, &player->actor, PLAYER_CSACTION_5); + Player_SetCsActionWithHaltedActors(play, &player->actor, PLAYER_CSACTION_5); OnePointCutscene_SetCsCamPoints(subCam, D_80120304 | 0x2000, D_80120300, D_8012013C, D_8012021C); Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_8012013C[D_801202FC - 2].pos); @@ -517,7 +517,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act subCam->stateFlags |= CAM_STATE_1; csInfo->keyFrameCount = ARRAY_COUNT(D_80121954[0]); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -525,7 +525,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121A44; csInfo->keyFrameCount = ARRAY_COUNT(D_80121A44); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); subCam->stateFlags |= CAM_STATE_1; break; @@ -552,7 +552,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0x50; subCam->fov = 55.0f; - func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8); break; case 3170: @@ -569,7 +569,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CopyCamera(play, CAM_ID_MAIN, subCamId); subCam->roll = -1; subCam->fov = 55.0f; - func_8002DF38(play, actor, PLAYER_CSACTION_1); + Player_SetCsAction(play, actor, PLAYER_CSACTION_1); break; case 3160: @@ -583,7 +583,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 55.0f; - func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8); break; case 3180: @@ -598,13 +598,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 60.0f; - func_8002DF38(play, actor, PLAYER_CSACTION_1); + Player_SetCsAction(play, actor, PLAYER_CSACTION_1); break; case 3190: Play_ChangeCameraSetting(play, subCamId, CAM_SET_FOREST_DEFEAT_POE); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); - func_8002DF38(play, actor, PLAYER_CSACTION_12); + Player_SetCsAction(play, actor, PLAYER_CSACTION_12); break; case 3230: @@ -618,7 +618,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0x1E; subCam->fov = 75.0f; - func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8); Actor_GetWorldPosShapeRot(&spA0, actor); Actor_GetFocus(&sp8C, &player->actor); spC0.x = sp8C.pos.x; @@ -648,7 +648,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 45.0f; - func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8); break; case 3220: @@ -665,7 +665,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act subCam->roll = 0; subCam->fov = 75.0f; player->actor.shape.rot.y = player->actor.world.rot.y = player->yaw = spD0.yaw + 0x7FFF; - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); break; case 3240: @@ -674,13 +674,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121D3C; csInfo->keyFrameCount = ARRAY_COUNT(D_80121D3C); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; case 6001: Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Actor_GetWorld(&spA0, actor); if (spA0.pos.z > -750.0f) { OnePointCutscene_SetCsCamPoints(subCam, D_801208E8, D_801208E4, D_801206A0, D_80120820); @@ -696,7 +696,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act case 3400: Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3); - func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8); OnePointCutscene_SetCsCamPoints(subCam, D_8012069C | 0x2000, D_80120698, D_801204D4, D_801205B4); OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_801205B4[D_80120694 - 2].pos); OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_801204D4[D_80120694 - 2].pos); @@ -713,13 +713,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121DB4; csInfo->keyFrameCount = ARRAY_COUNT(D_80121DB4); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; case 3310: Play_ChangeCameraSetting(play, subCamId, CAM_SET_FIRE_STAIRCASE); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Play_CopyCamera(play, subCamId, CAM_ID_MAIN); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -754,7 +754,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121FBC; csInfo->keyFrameCount = ARRAY_COUNT(D_80121FBC); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_3); @@ -767,7 +767,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012205C; csInfo->keyFrameCount = ARRAY_COUNT(D_8012205C); - func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -783,7 +783,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act D_801220D4[1].eyeTargetInit.y = 80.0f; D_801220D4[1].eyeTargetInit.x = -D_801220D4[1].eyeTargetInit.x; } - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); csInfo->keyFrames = D_801220D4; csInfo->keyFrameCount = ARRAY_COUNT(D_801220D4); @@ -795,7 +795,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012219C; csInfo->keyFrameCount = ARRAY_COUNT(D_8012219C); - func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -803,7 +803,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801222B4; csInfo->keyFrameCount = ARRAY_COUNT(D_801222B4); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -816,7 +816,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012237C; csInfo->keyFrameCount = ARRAY_COUNT(D_8012237C); - func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -829,7 +829,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801223CC; csInfo->keyFrameCount = ARRAY_COUNT(D_801223CC); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); player->stateFlags1 |= PLAYER_STATE1_29; player->actor.freezeTimer = 90; @@ -844,7 +844,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801224BC; csInfo->keyFrameCount = ARRAY_COUNT(D_801224BC); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -859,19 +859,19 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act player->actor.shape.rot.y = player->actor.world.rot.y = player->yaw = 0x3FFC; Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); break; case 4110: csInfo->keyFrames = D_8012269C; csInfo->keyFrameCount = ARRAY_COUNT(D_8012269C); - func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; case 4120: - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); D_80122714[1].timerInit = 80; csInfo->keyFrames = D_80122714; csInfo->keyFrameCount = ARRAY_COUNT(D_80122714); @@ -891,7 +891,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801228A4; csInfo->keyFrameCount = ARRAY_COUNT(D_801228A4); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -900,7 +900,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012296C; csInfo->keyFrameCount = ARRAY_COUNT(D_8012296C); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -909,7 +909,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122A0C; csInfo->keyFrameCount = ARRAY_COUNT(D_80122A0C); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -918,7 +918,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122A5C; csInfo->keyFrameCount = ARRAY_COUNT(D_80122A5C); - func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -927,7 +927,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122B9C; csInfo->keyFrameCount = ARRAY_COUNT(D_80122B9C); - func_8002DF38(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; @@ -951,7 +951,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrameCount = ARRAY_COUNT(D_80122C3C); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); - func_8002DF38(play, &player->actor, PLAYER_CSACTION_1); + Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_1); i = Quake_Request(subCam, QUAKE_TYPE_3); Quake_SetSpeed(i, 12000); @@ -963,12 +963,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122C8C; csInfo->keyFrameCount = ARRAY_COUNT(D_80122C8C); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; case 3260: - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); D_80122CB4[1].timerInit = timer - 5; csInfo->keyFrames = D_80122CB4; @@ -978,7 +978,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act break; case 3261: - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); D_80122D04[1].timerInit = timer - 10; csInfo->keyFrames = D_80122D04; diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 42644bbdae..8f541f8b4f 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -3816,7 +3816,7 @@ void Interface_Draw(PlayState* play) { gSaveContext.subTimerState = SUBTIMER_STATE_RESPAWN; gSaveContext.save.cutsceneIndex = 0; Message_StartTextbox(play, 0x71B0, NULL); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); } else { sSubTimerStateTimer = 40; gSaveContext.subTimerState = SUBTIMER_STATE_STOP; diff --git a/src/code/z_play.c b/src/code/z_play.c index 1cd8497c9a..58fa9f726c 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -400,7 +400,8 @@ void Play_Init(GameState* thisx) { zAllocAligned = (zAlloc + 8) & ~0xF; ZeldaArena_Init((void*)zAllocAligned, zAllocSize - (zAllocAligned - zAlloc)); // "Zelda Heap" - osSyncPrintf("ゼルダヒープ %08x-%08x\n", zAllocAligned, (u8*)zAllocAligned + zAllocSize - (s32)(zAllocAligned - zAlloc)); + osSyncPrintf("ゼルダヒープ %08x-%08x\n", zAllocAligned, + (u8*)zAllocAligned + zAllocSize - (s32)(zAllocAligned - zAlloc)); Fault_AddClient(&D_801614B8, ZeldaArena_Display, NULL, NULL); Actor_InitContext(this, &this->actorCtx, this->playerEntry); diff --git a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c index bbc736e668..d8ba3b2ee4 100644 --- a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c +++ b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c @@ -254,7 +254,7 @@ void BgBreakwall_Wait(BgBreakwall* this, PlayState* play) { gSaveContext.cutsceneTrigger = 1; Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - func_8002DF54(play, NULL, PLAYER_CSACTION_49); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_49); } if (this->dyna.actor.params < 0) { diff --git a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c index 3b669514a6..0259fbfd65 100644 --- a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c +++ b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c @@ -191,7 +191,7 @@ void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) { return; } } - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); this->actionFunc = BgDyYoseizo_ChooseType; } } @@ -199,7 +199,7 @@ void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) { void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) { s32 givingReward; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); // "Mode" osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ もうど ☆☆☆☆☆ %d\n" VT_RST, play->msgCtx.ocarinaMode); givingReward = false; @@ -315,12 +315,12 @@ void BgDyYoseizo_SetupSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { } Actor_PlaySfx(&this->actor, NA_SE_VO_FR_LAUGH_0); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); this->actionFunc = BgDyYoseizo_SpinGrow_NoReward; } void BgDyYoseizo_SpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); Math_ApproachF(&this->actor.world.pos.y, this->grownHeight, this->heightFraction, 100.0f); Math_ApproachF(&this->scale, 0.035f, this->scaleFraction, 0.005f); Math_ApproachF(&this->heightFraction, 0.8f, 0.1f, 0.02f); @@ -346,7 +346,7 @@ void BgDyYoseizo_SpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { void BgDyYoseizo_CompleteSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { f32 curFrame = this->skelAnime.curFrame; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); if ((this->frameCount * 1273.0f) <= this->bobTimer) { this->bobTimer = 0.0f; @@ -360,7 +360,7 @@ void BgDyYoseizo_CompleteSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { } void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); if (play->sceneId == SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) { this->frameCount = Animation_GetLastFrame(&gGreatFairySittingAnim); @@ -380,7 +380,7 @@ void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { } void BgDyYoseizo_GreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); this->bobTimer = this->skelAnime.curFrame * 1273.0f; if ((this->frameCount * 1273.0f) <= this->bobTimer) { @@ -548,7 +548,7 @@ void BgDyYoseizo_Vanish(BgDyYoseizo* this, PlayState* play) { Actor* findOcarinaSpot; if (this->vanishTimer == 0) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); play->envCtx.lightSettingOverride = 0; findOcarinaSpot = play->actorCtx.actorLists[ACTORCAT_PROP].head; @@ -570,7 +570,7 @@ void BgDyYoseizo_SetupSpinGrow_Reward(BgDyYoseizo* this, PlayState* play) { if (play->csCtx.state != CS_STATE_IDLE) { if ((play->csCtx.actorCues[0] != NULL) && (play->csCtx.actorCues[0]->id == 2)) { this->actor.draw = BgDyYoseizo_Draw; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); this->finishedSpinGrow = false; if (play->sceneId == SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) { diff --git a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c index 101216e210..cb7c0bd637 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c @@ -239,7 +239,7 @@ void BgGndIceblock_Idle(BgGndIceblock* this, PlayState* play) { if (this->dyna.unk_150 > 0.0f) { BgGndIceblock_SetNextPosition(this); if (Actor_WorldDistXZToPoint(&this->dyna.actor, &this->targetPos) > 1.0f) { - func_8002DF54(play, &this->dyna.actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->dyna.actor, PLAYER_CSACTION_8); this->actionFunc = BgGndIceblock_Slide; } } @@ -280,7 +280,7 @@ void BgGndIceblock_Fall(BgGndIceblock* this, PlayState* play) { thisx->world.pos.y = thisx->home.pos.y - 100.0f; thisx->world.pos.z = thisx->home.pos.z; if (Player_InCsMode(play)) { - func_8002DF54(play, thisx, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, thisx, PLAYER_CSACTION_7); } this->actionFunc = BgGndIceblock_Reset; } @@ -293,7 +293,7 @@ void BgGndIceblock_Hole(BgGndIceblock* this, PlayState* play) { if (Math_StepToF(&thisx->world.pos.y, thisx->home.pos.y - 100.0f, thisx->velocity.y)) { thisx->velocity.y = 0.0f; if (Player_InCsMode(play)) { - func_8002DF54(play, thisx, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, thisx, PLAYER_CSACTION_7); } this->actionFunc = BgGndIceblock_Idle; } @@ -317,7 +317,7 @@ void BgGndIceblock_Slide(BgGndIceblock* this, PlayState* play) { switch (BgGndIceblock_NextAction(this)) { case GNDICE_IDLE: this->actionFunc = BgGndIceblock_Idle; - func_8002DF54(play, thisx, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, thisx, PLAYER_CSACTION_7); break; case GNDICE_FALL: this->actionFunc = BgGndIceblock_Fall; diff --git a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c index ca244bdff5..b4b2d981de 100644 --- a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c +++ b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c @@ -367,7 +367,7 @@ void BgHeavyBlock_LiftedUp(BgHeavyBlock* this, PlayState* play) { this->timer++; - func_8002DF54(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &player->actor, PLAYER_CSACTION_8); // if parent is NULL, link threw it if (Actor_HasNoParent(&this->dyna.actor, play)) { 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 f02871bc7e..3334c9d96b 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 @@ -138,7 +138,7 @@ void BgHidanDalm_Wait(BgHidanDalm* this, PlayState* play) { this->dyna.actor.world.pos.x += 32.5f * Math_SinS(this->dyna.actor.world.rot.y); this->dyna.actor.world.pos.z += 32.5f * Math_CosS(this->dyna.actor.world.rot.y); - func_8002DF54(play, &this->dyna.actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->dyna.actor, PLAYER_CSACTION_8); this->dyna.actor.flags |= ACTOR_FLAG_4; this->actionFunc = BgHidanDalm_Shrink; this->dyna.actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND_TOUCH; @@ -159,7 +159,7 @@ void BgHidanDalm_Shrink(BgHidanDalm* this, PlayState* play) { Vec3f pos; if (Math_StepToF(&this->dyna.actor.scale.x, 0.0f, 0.004f)) { - func_8002DF54(play, &this->dyna.actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->dyna.actor, PLAYER_CSACTION_7); Actor_Kill(&this->dyna.actor); } diff --git a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c index c6ff42fdf8..ea22bf32d0 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c +++ b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c @@ -125,7 +125,7 @@ void BgIceObjects_CheckPits(BgIceObjects* this, PlayState* play) { thisx->world.pos.y = thisx->home.pos.y - 60.0f; thisx->world.pos.z = thisx->home.pos.z; if (thisx->params != 0) { - func_8002DF54(play, thisx, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, thisx, PLAYER_CSACTION_7); } this->actionFunc = BgIceObjects_Reset; } @@ -142,7 +142,7 @@ void BgIceObjects_Idle(BgIceObjects* this, PlayState* play) { BgIceObjects_SetNextTarget(this, play); if (Actor_WorldDistXZToPoint(thisx, &this->targetPos) > 1.0f) { thisx->flags |= ACTOR_FLAG_4; - func_8002DF54(play, thisx, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, thisx, PLAYER_CSACTION_8); thisx->params = 1; this->actionFunc = BgIceObjects_Slide; } @@ -172,7 +172,7 @@ void BgIceObjects_Slide(BgIceObjects* this, PlayState* play) { thisx->flags &= ~ACTOR_FLAG_4; } thisx->params = 0; - func_8002DF54(play, thisx, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, thisx, PLAYER_CSACTION_7); Actor_PlaySfx(thisx, NA_SE_EV_BLOCK_BOUND); if ((fabsf(thisx->world.pos.x + 1387.0f) < 1.0f) && (fabsf(thisx->world.pos.z + 260.0f) < 1.0f)) { this->actionFunc = BgIceObjects_Stuck; diff --git a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c index df798ea9e3..f020c16c19 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c +++ b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c @@ -164,7 +164,7 @@ void BgMoriBigst_Fall(BgMoriBigst* this, PlayState* play) { BgMoriBigst_SetupLanding(this, play); Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_STONE_BOUND); OnePointCutscene_Init(play, 1020, 8, &this->dyna.actor, CAM_ID_MAIN); - func_8002DF38(play, NULL, PLAYER_CSACTION_60); + Player_SetCsAction(play, NULL, PLAYER_CSACTION_60); } } diff --git a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c index efade085ad..167121b87b 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c +++ b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c @@ -95,7 +95,7 @@ void BgMoriKaitenkabe_Wait(BgMoriKaitenkabe* this, PlayState* play) { this->timer++; if ((this->timer > 28) && !Player_InCsMode(play)) { BgMoriKaitenkabe_SetupRotate(this); - func_8002DF54(play, &this->dyna.actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->dyna.actor, PLAYER_CSACTION_8); Math_Vec3f_Copy(&this->lockedPlayerPos, &player->actor.world.pos); push.x = Math_SinS(this->dyna.unk_158); push.y = 0.0f; @@ -129,7 +129,7 @@ void BgMoriKaitenkabe_Rotate(BgMoriKaitenkabe* this, PlayState* play) { Math_StepToF(&this->rotSpeed, 0.6f, 0.02f); if (Math_StepToF(&this->rotYdeg, this->rotDirection * 45.0f, this->rotSpeed)) { BgMoriKaitenkabe_SetupWait(this); - func_8002DF54(play, thisx, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, thisx, PLAYER_CSACTION_7); if (this->rotDirection > 0.0f) { thisx->home.rot.y += 0x2000; } else { diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index d73e74c9ff..bec56ccc38 100644 --- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -320,7 +320,7 @@ void BgPoEvent_BlockFall(BgPoEvent* this, PlayState* play) { if (firstFall == 0) { firstFall = 1; } else { - func_8002DF54(play, &GET_PLAYER(play)->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &GET_PLAYER(play)->actor, PLAYER_CSACTION_7); } } this->direction = 0; @@ -356,7 +356,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, PlayState* play) { if (sPuzzleState == 0x10) { sPuzzleState = 0x40; Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BLOCK_RISING); - func_8002DF54(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &player->actor, PLAYER_CSACTION_8); } } else if (this->dyna.unk_150 != 0.0f) { if (this->direction == 0) { diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c index a9268e1dc9..e567c89873 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c @@ -214,7 +214,7 @@ void BgSpot00Hanebasi_Update(Actor* thisx, PlayState* play) { SET_EVENTCHKINF(EVENTCHKINF_80); Flags_SetEventChkInf(EVENTCHKINF_82); this->actionFunc = BgSpot00Hanebasi_DoNothing; - func_8002DF54(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &player->actor, PLAYER_CSACTION_8); play->nextEntranceIndex = ENTR_HYRULE_FIELD_0; gSaveContext.nextCutsceneIndex = 0xFFF1; play->transitionTrigger = TRANS_TRIGGER_START; diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index 6ad24aa7d1..5052f2cf07 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -269,7 +269,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) { break; case 1: Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); Play_ClearAllSubCameras(play); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); @@ -297,11 +297,11 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) { } if (this->unk_198 == 110) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_9); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_9); } if (this->unk_198 == 5) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_12); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_12); } if (this->unk_198 < 6) { @@ -416,7 +416,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); BossDodongo_SetupWalk(this); this->unk_1DA = 50; this->unk_1BC = 0; @@ -1302,7 +1302,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) { case 0: this->csState = 5; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_UNK3); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1612,7 +1612,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) { this->csState = 100; Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, -890.0f, -1523.76f, -3304.0f, 0, 0, 0, WARP_DUNGEON_CHILD); this->skelAnime.playSpeed = 0.0f; diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index bbc6c678da..a00d9d6f3a 100644 --- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -312,7 +312,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { this->introState = BFD_CS_START; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -389,7 +389,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { Math_ApproachF(&this->subCamShake, 2.0f, 1.0f, 0.8 * 0.01f); } if (this->timers[0] == 40) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_19); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_19); } if (this->timers[0] == 0) { this->introState = BFD_CS_LOOK_GROUND; @@ -418,7 +418,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { this->timers[0] = 170; this->subCamVelFactor = 0.0f; this->subCamAccel = 0.0f; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_20); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_20); } break; case BFD_CS_COLLAPSE: @@ -468,7 +468,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { if (this->timers[3] == 190) { this->subCamAtMaxVelFrac.x = this->subCamAtMaxVelFrac.y = this->subCamAtMaxVelFrac.z = 0.05f; this->platformSignal = VBSIMA_KILL; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); } if (this->actor.world.pos.y > 120.0f) { this->subCamAtNext = this->actor.world.pos; @@ -538,7 +538,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { // BFD_CS_NONE / BOSSFD_FLY_MAIN / SUB_CAM_ID_DONE this->introState = this->introFlyState = this->subCamId = 0; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); this->actionFunc = BossFd_Wait; this->handoffSignal = FD2_SIGNAL_GROUND; SET_EVENTCHKINF(EVENTCHKINF_73); @@ -847,7 +847,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { Audio_PlaySfxGeneral(NA_SE_EN_VALVAISA_LAND2, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_5); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_5); for (i1 = 0; i1 < 15; i1++) { Vec3f sp144 = { 0.0f, 0.0f, 0.0f }; Vec3f sp138 = { 0.0f, 0.0f, 0.0f }; diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index 6839fb7a2a..ff005b20f6 100644 --- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -653,7 +653,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) { case DEATH_START: this->deathState = DEATH_RETREAT; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -747,7 +747,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) { this->work[FD2_ACTION_STATE]++; this->subCamVelFactor = 0.0f; this->subCamAccel = 0.02f; - func_8002DF54(play, &bossFd->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &bossFd->actor, PLAYER_CSACTION_1); } } if ((bossFd->work[BFD_ACTION_STATE] == BOSSFD_BONES_FALL) && (bossFd->timers[0] == 5)) { @@ -781,7 +781,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, 100.0f, 0.0f, 0, 0, 0, WARP_DUNGEON_ADULT); Flags_SetClear(play, play->roomCtx.curRoom.num); diff --git a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index 1254786bd6..8f9364ba1a 100644 --- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -558,7 +558,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { this->actor.shape.rot.y = 0; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); this->csCamIndex = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE); @@ -600,7 +600,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { BossGanon_SetIntroCsCamera(this, 1); if (this->csTimer == 10) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_5); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_5); } if (this->csTimer == 13) { @@ -633,7 +633,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { break; } - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); this->csState = 4; BossGanon_SetIntroCsCamera(this, 2); this->csTimer = 0; @@ -665,7 +665,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { } if (this->csTimer == 10) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_75); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_75); } if (this->csTimer == 70) { @@ -731,7 +731,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { this->csState = 9; this->csTimer = 0; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); sZelda->unk_3C8 = 0; this->triforceType = GDF_TRIFORCE_ZELDA; this->fwork[GDF_TRIFORCE_SCALE] = 10.0f; @@ -785,7 +785,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { player->actor.world.pos.z = 20.0f; if (this->csTimer == 20) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_23); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_23); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_HEARTS); } @@ -1005,7 +1005,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { } if (this->csTimer == 30) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_74); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_74); } if (this->csTimer <= 50) { @@ -1128,7 +1128,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { Play_ReturnToMainCam(play, this->csCamIndex, 0); this->csState = this->csCamIndex = 0; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); BossGanon_SetupWait(this, play); } @@ -1234,7 +1234,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { switch (this->csState) { case 0: Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); this->csCamIndex = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE); @@ -1469,7 +1469,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_GANON_BODY_SPARK - SFX_FLAG); if (this->csTimer == 2) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_57); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_57); } if (this->csTimer > 50) { @@ -1505,7 +1505,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { case 100: Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); this->csCamIndex = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE); @@ -1594,11 +1594,11 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { this->csCamAt.z = -135.0f; if (this->csTimer == 5) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_76); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_76); } if (this->csTimer == 70) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_77); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_77); } if (this->csTimer == 90) { @@ -1683,7 +1683,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { if (this->csTimer == 20) { sZelda->unk_3C8 = 5; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_57); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_57); } if (this->csTimer == 40) { @@ -1750,7 +1750,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { this->csState = 107; this->csTimer = 0; Message_StartTextbox(play, 0x70D2, NULL); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_57); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_57); } break; @@ -1792,7 +1792,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { this->csState = 109; this->csCamIndex = 0; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); Flags_SetSwitch(play, 0x37); } break; diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 23a08ace97..3393e6f7fe 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -196,7 +196,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_GANON_ANIME3); if (Object_IsLoaded(&play->objectCtx, objectSlot)) { Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -267,11 +267,11 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } if (this->unk_398 == 40) { sZelda->unk_3C8 = 1; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_78); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_78); } if (this->unk_398 == 85) { sZelda->unk_3C8 = 2; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_79); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_79); } this->subCamEye.x = 930.0f; this->subCamEye.y = 1129.0f; @@ -300,14 +300,14 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } if (this->unk_398 == 20) { sZelda->unk_3C8 = 3; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_80); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_80); } if (this->unk_398 == 55) { this->unk_39C = 4; this->unk_398 = 0; this->unk_410.x = 0.0f; sZelda->unk_3C8 = 4; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_80); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_80); } break; case 4: @@ -324,7 +324,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); this->unk_39C = 5; this->unk_398 = 0; } @@ -371,7 +371,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } if (this->unk_398 == 30) { sZelda->unk_3C8 = 5; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_81); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_81); } if (this->unk_398 == 50) { this->unk_398 = 0; @@ -402,7 +402,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { Sfx_PlaySfxCentered(NA_SE_EV_STONE_BOUND); } if (this->unk_398 == 30) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_82); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_82); } if (this->unk_398 == 50) { this->unk_398 = 0; @@ -469,7 +469,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { this->subCamAt.y = player->actor.world.pos.y; this->subCamAt.z = player->actor.world.pos.z - 200.0f; if (this->unk_398 == 20) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_30); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_30); } if (this->unk_398 == 60) { this->subCamEye.x = (this->actor.world.pos.x + 200.0f) - 154.0f; @@ -558,7 +558,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { SkelAnime_Free(&this->skelAnime, play); SkelAnime_InitFlex(play, &this->skelAnime, &gGanonSkel, NULL, NULL, NULL, 0); BossGanon2_SetObjectSegment(this, play, OBJECT_GANON_ANIME3, false); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_84); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_84); this->unk_314 = 3; } // fake, tricks the compiler into using stack the way we need it to @@ -614,7 +614,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { this->actor.world.pos.x += 250; this->actor.world.pos.y = 1886.0f; this->unk_394 = 0.0f; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_83); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_83); this->unk_30C = 5.0f; this->unk_228 = 1.0f; } @@ -699,7 +699,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { if (this->unk_398 == 215) { this->unk_39C = 23; this->unk_224 = 0.0f; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_85); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_85); } break; case 23: @@ -719,7 +719,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { this->subCamAt.z = player->actor.world.pos.z; if (this->unk_398 == 228) { Sfx_PlaySfxCentered(NA_SE_IT_SHIELD_REFLECT_SW); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_86); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_86); Rumble_Override(0.0f, 255, 10, 50); } if (this->unk_398 >= 229) { @@ -756,7 +756,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { Sfx_PlaySfxCentered(NA_SE_IT_SWORD_SWING); } if (this->unk_398 == 25) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_87); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_87); this->unk_39C = 25; this->unk_398 = 0; } @@ -804,7 +804,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { case 27: this->subCamUp.z = 0.0f; if (this->unk_398 == 4) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_88); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_88); } this->subCamEye.x = player->actor.world.pos.x - 20.0f; this->subCamEye.y = player->actor.world.pos.y + 50.0f; @@ -877,7 +877,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); this->unk_39C = 0; this->unk_337 = 1; func_808FFDB0(this, play); @@ -1299,7 +1299,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); this->unk_39C = 1; this->subCamEye = mainCam1->eye; this->subCamAt = mainCam1->at; @@ -1348,7 +1348,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); this->unk_39C = 3; } break; @@ -1359,7 +1359,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); this->unk_39C = 11; this->unk_334 = 1; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_96); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_96); this->unk_398 = 0; FALLTHROUGH; case 11: @@ -1381,7 +1381,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); } break; } @@ -1485,7 +1485,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); this->unk_39C = 1; this->unk_398 = 0; sZelda->unk_3C8 = 9; @@ -1522,7 +1522,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->skelAnime.playSpeed = 3.0f; } if (this->unk_398 == 120) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_99); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_99); } this->actor.world.rot.y = 0x4000; this->actor.world.pos.x = this->actor.world.pos.z = 0.0f; @@ -1590,7 +1590,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->unk_39C = 5; this->unk_398 = 40; this->skelAnime.playSpeed = 1.0f; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_100); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_100); } break; case 5: @@ -1604,10 +1604,10 @@ void func_8090120C(BossGanon2* this, PlayState* play) { Math_ApproachZeroF(&this->unk_38C, 1.0f, 8.0f); } if (this->unk_398 == 70) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_101); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_101); } if (this->unk_398 == 150) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_102); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_102); } this->unk_30C = 10.0f; player->actor.world.pos.x = 250.0f; @@ -1626,7 +1626,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); this->unk_39C = 6; } break; @@ -1645,7 +1645,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->unk_398 = 0; Animation_MorphToPlayOnce(&this->skelAnime, &gGanonFinalBlowAnim, 0.0f); this->unk_194 = Animation_GetLastFrame(&gGanonFinalBlowAnim); - play->startPlayerCutscene(play, &this->actor, PLAYER_CSACTION_97); + play->tryPlayerCsAction(play, &this->actor, PLAYER_CSACTION_97); } else { break; } @@ -1712,7 +1712,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { if (this->unk_398 == 55) { Animation_MorphToPlayOnce(&this->skelAnime, &gGanonDeadStartAnim, 0.0f); this->unk_194 = Animation_GetLastFrame(&gGanonDeadStartAnim); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_98); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_98); this->unk_39C = 8; this->unk_398 = 1000; } diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index 054a90c2f1..707c58b276 100644 --- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -956,7 +956,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) { switch (this->deathState) { case DEATH_START: Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); osSyncPrintf("7\n"); @@ -1118,7 +1118,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, GND_BOSSROOM_CENTER_X, GND_BOSSROOM_CENTER_Y, GND_BOSSROOM_CENTER_Z + 200.0f, 0, 0, 0, 0); this->actor.child = &horse->actor; diff --git a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c index 760a437012..0a5fa1b6fb 100644 --- a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -629,7 +629,7 @@ void BossGoma_SetupEncounterState4(BossGoma* this, PlayState* play) { this->actionState = 4; this->actor.flags |= ACTOR_FLAG_0; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_UNK3); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -686,7 +686,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_SHUTTER, 164.72f, -480.0f, 397.68002f, 0, -0x705C, 0, DOORSHUTTER_PARAMS(SHUTTER_GOHMA_BLOCK, 0)); } else { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); this->actionState = 1; } } @@ -757,7 +757,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { } if (this->frameCount == 190) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_2); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_2); } if (this->frameCount >= 228) { @@ -768,7 +768,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); this->actionState = 3; } break; @@ -964,7 +964,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { this->disableGameplayLogic = false; this->patienceTimer = 200; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); } break; } @@ -1053,7 +1053,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) { case 0: this->actionState = 1; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_UNK3); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1181,7 +1181,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); Actor_Kill(&this->actor); } diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index 1ee5e78893..36e377b149 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -1225,7 +1225,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) { (fabsf(player->actor.world.pos.x - -180.0f) < 40.0f))) { // checks if Link is on one of the four platforms Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1333,11 +1333,11 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) { Math_ApproachF(&this->actor.speed, sp80, 1.0f, sp78); Math_ApproachF(&this->subCamYawRate, sp7C, 1.0f, 128.0f); if (this->work[MO_TENT_MOVE_TIMER] == 525) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_2); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_2); } if (this->work[MO_TENT_MOVE_TIMER] > 540) { this->csState = MO_INTRO_REVEAL; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); sMorphaTent1->drawActor = true; player->actor.world.pos.x = 180.0f; player->actor.world.pos.z = -210.0f; @@ -1446,7 +1446,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) { // MO_BATTLE / SUB_CAM_ID_DONE this->csState = this->subCamId = 0; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); } break; } @@ -1511,7 +1511,7 @@ void BossMo_DeathCs(BossMo* this, PlayState* play) { switch (this->csState) { case MO_DEATH_START: Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1681,7 +1681,7 @@ void BossMo_DeathCs(BossMo* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); sMorphaTent1->actor.world.pos.y = -1000.0f; } } else { diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 5ba0c27528..3e56af4ec9 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -371,7 +371,7 @@ void BossSst_HeadSetupIntro(BossSst* this, PlayState* play) { player->stateFlags1 |= PLAYER_STATE1_5; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); @@ -404,7 +404,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) { sHands[LEFT]->actor.flags |= ACTOR_FLAG_0; player->stateFlags1 &= ~PLAYER_STATE1_5; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); sSubCamAt.y += 30.0f; sSubCamAt.z += 300.0f; Play_SetCameraAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); @@ -1024,7 +1024,7 @@ void BossSst_HeadSetupDeath(BossSst* this, PlayState* play) { Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); Play_CopyCamera(play, sSubCamId, CAM_ID_MAIN); - func_8002DF54(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &player->actor, PLAYER_CSACTION_8); Cutscene_StartManual(play, &play->csCtx); Math_Vec3f_Copy(&sSubCamEye, &GET_ACTIVE_CAM(play)->eye); this->actionFunc = BossSst_HeadDeath; @@ -1187,7 +1187,7 @@ void BossSst_HeadFinish(BossSst* this, PlayState* play) { Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); Play_ClearCamera(play, sSubCamId); - func_8002DF54(play, &GET_PLAYER(play)->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &GET_PLAYER(play)->actor, PLAYER_CSACTION_7); Cutscene_StopManual(play, &play->csCtx); Actor_Kill(&this->actor); Actor_Kill(&sHands[LEFT]->actor); diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index bec9deb5ef..89aebcbf82 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -1499,7 +1499,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { case 0: this->csState2 = 1; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_57); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_57); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1639,7 +1639,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { Animation_MorphToPlayOnce(&this->skelAnime, &gTwinrovaIntroAnim, 0.0f); this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&gTwinrovaIntroAnim); this->timers[0] = 50; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_2); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_2); Actor_PlaySfx(&this->actor, NA_SE_EN_TWINROBA_TRANSFORM); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS); } @@ -1682,7 +1682,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { } if (this->timers[3] == 19) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_5); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_5); } if (this->timers[3] == 16) { @@ -1715,7 +1715,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { this->subCamId = SUB_CAM_ID_DONE; this->csState2 = this->subCamId; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); this->work[TW_PLLR_IDX] = 0; this->targetPos = sTwinrovaPillarPos[0]; BossTw_TwinrovaSetupFly(this, play); @@ -1795,7 +1795,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) { player->actor.world.pos.x = player->actor.world.pos.z = .0f; this->csState2 = 1; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_57); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_57); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -2278,7 +2278,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) { this->subCamId = SUB_CAM_ID_DONE; this->csState2 = this->subCamId; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); BossTw_SetupWait(this, play); } break; @@ -2682,7 +2682,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { case 0: this->csState2 = 1; Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -2721,7 +2721,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { sKoumePtr->actor.world.pos.z = sKotakePtr->actor.world.pos.z; sKoumePtr->work[YAW_TGT] = sKotakePtr->work[YAW_TGT] = sKoumePtr->actor.shape.rot.x = sKotakePtr->actor.shape.rot.x = sKoumePtr->actor.shape.rot.y = sKotakePtr->actor.shape.rot.y = 0; - func_8002DF54(play, &sKoumePtr->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &sKoumePtr->actor, PLAYER_CSACTION_1); sKoumePtr->actor.flags |= ACTOR_FLAG_0; } break; @@ -2810,7 +2810,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { this->csState2 = 4; this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS_CLEAR); Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 600.0f, 230.0f, 0.0f, 0, 0, 0, WARP_DUNGEON_ADULT); diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 65a892b1a3..51b29d720c 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -640,7 +640,7 @@ void BossVa_Init(Actor* thisx, PlayState* play2) { if (GET_EVENTCHKINF(EVENTCHKINF_76)) { sCsState = INTRO_CALL_BARI; sDoorState = 100; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); play->envCtx.screenFillColor[0] = 0xDC; play->envCtx.screenFillColor[1] = 0xDC; play->envCtx.screenFillColor[2] = 0xBE; @@ -781,7 +781,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { play->envCtx.screenFillColor[1] = 0xDC; play->envCtx.screenFillColor[2] = 0xBE; play->envCtx.screenFillColor[3] = 0xD2; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); player->actor.world.rot.y = player->actor.shape.rot.y = 0x7FFF; sCsState++; break; @@ -809,7 +809,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { case INTRO_CLOSE_DOOR: this->timer--; if (this->timer == 0) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_2); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_2); sCsState++; this->timer = 30; } @@ -824,7 +824,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { } break; case INTRO_CRACKLE: - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); sCsState++; break; case INTRO_SPAWN_BARI: @@ -955,7 +955,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac; if (this->timer >= 45000) { play->envCtx.lightSettingOverride = 1; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); } else if (this->timer >= 35000) { SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS); } @@ -1012,7 +1012,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { sSubCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); sCsState++; SET_EVENTCHKINF(EVENTCHKINF_76); player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000; @@ -1530,7 +1530,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) { switch (sCsState) { case DEATH_START: - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); Cutscene_StartManual(play, &play->csCtx); sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); @@ -1592,7 +1592,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) { EffectSsDeadSound_SpawnStationary(play, &this->actor.projectedPos, NA_SE_EN_BALINADE_DEAD, 1, 1, 0x28); this->onCeiling = 2; // Not used by body BossVa_SetDeathEnv(play); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); } break; case DEATH_CORE_BURST: @@ -1633,7 +1633,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) { mainCam->at = sSubCamAt; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); sCsState++; Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x, this->actor.world.pos.y, @@ -2417,7 +2417,7 @@ void BossVa_BariIntro(BossVa* this, PlayState* play) { switch (sCsState) { case INTRO_LOOK_BARI: if (this->actor.params == BOSSVA_BARI_UPPER_1) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); if (Math_SmoothStepToF(&this->actor.world.pos.y, 60.0f, 0.3f, 1.0f, 0.15f) == 0.0f) { this->timer--; if (this->timer == 0) { diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index cd1a897fbd..9079d4f39b 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -869,7 +869,7 @@ void func_80986B2C(PlayState* play) { play->nextEntranceIndex = ENTR_HYRULE_FIELD_0; play->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST); play->transitionTrigger = TRANS_TRIGGER_START; - func_8002DF54(play, &player->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &player->actor, PLAYER_CSACTION_8); } } 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 8171d34fe1..80f181065e 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -819,7 +819,7 @@ void DoorShutter_SetupClosed(DoorShutter* this, PlayState* play) { if (DoorShutter_SetupDoor(this, play) && !(player->stateFlags1 & PLAYER_STATE1_11)) { // The door is barred behind the player DoorShutter_SetupAction(this, DoorShutter_WaitPlayerSurprised); - func_8002DF54(play, NULL, PLAYER_CSACTION_2); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_2); } } @@ -859,7 +859,7 @@ void DoorShutter_JabuDoorClose(DoorShutter* this, PlayState* play) { void DoorShutter_WaitPlayerSurprised(DoorShutter* this, PlayState* play) { if (this->actionTimer++ > 30) { - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); DoorShutter_SetupDoor(this, play); } } diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index e936df2fa6..3082fbb56f 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -466,7 +466,7 @@ void DoorWarp1_ChildWarpIdle(DoorWarp1* this, PlayState* play) { Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); OnePointCutscene_Init(play, 0x25E7, 999, &this->actor, CAM_ID_MAIN); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_10); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_10); player->unk_450.x = this->actor.world.pos.x; player->unk_450.z = this->actor.world.pos.z; @@ -542,7 +542,7 @@ void DoorWarp1_RutoWarpIdle(DoorWarp1* this, PlayState* play) { if (this->rutoWarpState != WARP_BLUE_RUTO_STATE_INITIAL && DoorWarp1_PlayerInRange(this, play)) { this->rutoWarpState = WARP_BLUE_RUTO_STATE_ENTERED; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_10); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_10); this->unk_1B2 = 1; DoorWarp1_SetupAction(this, func_80999EE0); } @@ -650,7 +650,7 @@ void DoorWarp1_AdultWarpIdle(DoorWarp1* this, PlayState* play) { player = GET_PLAYER(play); OnePointCutscene_Init(play, 0x25E8, 999, &this->actor, CAM_ID_MAIN); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_10); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_10); player->unk_450.x = this->actor.world.pos.x; player->unk_450.z = this->actor.world.pos.z; this->unk_1B2 = 20; diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c index d808adbbb8..711c634144 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c @@ -261,7 +261,7 @@ void EnBomBowMan_RunGame(EnBomBowlMan* this, PlayState* play) { Message_StartTextbox(play, this->actor.textId, NULL); if (this->gameResult == 2) { - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); } this->actionFunc = EnBomBowlMan_HandlePlayChoice; } else { @@ -306,7 +306,7 @@ void EnBomBowlMan_HandlePlayChoice(EnBomBowlMan* this, PlayState* play) { Message_ContinueTextbox(play, this->actor.textId); this->dialogState = TEXT_STATE_EVENT; OnePointCutscene_Init(play, 8010, -99, NULL, CAM_ID_MAIN); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->actionFunc = EnBomBowMan_SetupChooseShowPrize; } } else { @@ -342,11 +342,11 @@ void func_809C41FC(EnBomBowlMan* this, PlayState* play) { Message_ContinueTextbox(play, this->actor.textId); this->dialogState = TEXT_STATE_EVENT; OnePointCutscene_Init(play, 8010, -99, NULL, CAM_ID_MAIN); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->actionFunc = EnBomBowMan_SetupChooseShowPrize; } else { if (this->gameResult == 2) { - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); } this->actionFunc = EnBomBowMan_SetupRunGame; } @@ -458,7 +458,7 @@ void EnBomBowlMan_BeginPlayGame(EnBomBowlMan* this, PlayState* play) { // "Wow" osSyncPrintf(VT_FGCOL(YELLOW) "☆ わー ☆ %d\n" VT_RST, play->bombchuBowlingStatus); - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); this->actionFunc = EnBomBowMan_SetupRunGame; } } diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c index 9ef0435269..e7f64cb915 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c @@ -67,7 +67,7 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, PlayState* play) { if (((fabsf(chuPosDiff.x) < 40.0f) || (BREG(2))) && ((fabsf(chuPosDiff.y) < 40.0f) || (BREG(2))) && ((fabsf(chuPosDiff.z) < 40.0f) || (BREG(2)))) { - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); chu->timer = 1; this->subCamId = Play_CreateSubCamera(play); @@ -106,7 +106,7 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, PlayState* play) { Message_StartTextbox(play, this->actor.textId, NULL); this->unk_154 = TEXT_STATE_EVENT; Sfx_PlaySfxCentered(NA_SE_EV_HIT_SOUND); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->status = 1; this->actionFunc = EnBomBowlPit_CameraDollyIn; break; @@ -169,7 +169,7 @@ void EnBomBowlPit_SetupGivePrize(EnBomBowlPit* this, PlayState* play) { Play_ClearCamera(play, this->subCamId); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->actionFunc = EnBomBowlPit_GivePrize; } } @@ -177,7 +177,7 @@ void EnBomBowlPit_SetupGivePrize(EnBomBowlPit* this, PlayState* play) { void EnBomBowlPit_GivePrize(EnBomBowlPit* this, PlayState* play) { Player* player = GET_PLAYER(play); - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); this->getItemId = sGetItemIds[this->prizeIndex]; if ((this->getItemId == GI_BOMB_BAG_30) && (CUR_CAPACITY(UPG_BOMB_BAG) == 30)) { diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index 510a64851b..68e170f3d6 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -469,7 +469,7 @@ void EnDaiku_InitSubCamera(EnDaiku* this, PlayState* play) { Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); Play_SetCameraFov(play, this->subCamId, play->mainCamera.fov); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); } void EnDaiku_UpdateSubCamera(EnDaiku* this, PlayState* play) { @@ -505,7 +505,7 @@ void EnDaiku_EscapeSuccess(EnDaiku* this, PlayState* play) { Actor_Kill(&this->actor); } } else { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); } } diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c index 99e2cfd78d..aa60b480d0 100644 --- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c +++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c @@ -134,7 +134,7 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, PlayState* play) { Message_StartTextbox(play, this->actor.textId, NULL); this->unk_292 = TEXT_STATE_EVENT; this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0; - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->actionFunc = func_809EE048; return true; } else { @@ -159,7 +159,7 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, PlayState* play) { this->unk_292 = TEXT_STATE_EVENT; func_800F5B58(); Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); if (!GET_EVENTCHKINF(EVENTCHKINF_38)) { this->actionFunc = func_809EE96C; } else { @@ -187,7 +187,7 @@ void EnDivingGame_Talk(EnDivingGame* this, PlayState* play) { if (this->unk_292 != TEXT_STATE_DONE) { switch (this->state) { case ENDIVINGGAME_STATE_NOTPLAYING: - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->actionFunc = EnDivingGame_HandlePlayChoice; break; case ENDIVINGGAME_STATE_AWARDPRIZE: @@ -254,7 +254,7 @@ void EnDivingGame_HandlePlayChoice(EnDivingGame* this, PlayState* play) { this->actionFunc = func_809EE048; } else { play->msgCtx.msgMode = MSGMODE_PAUSED; - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->actionFunc = func_809EE0FC; } } @@ -266,11 +266,11 @@ void func_809EE048(EnDivingGame* this, PlayState* play) { if (this->unk_292 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { if (this->phase == ENDIVINGGAME_PHASE_ENDED) { Message_CloseTextbox(play); - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); this->actionFunc = func_809EDCB0; } else { play->msgCtx.msgMode = MSGMODE_PAUSED; - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->actionFunc = func_809EE0FC; } } @@ -423,7 +423,7 @@ void func_809EE800(EnDivingGame* this, PlayState* play) { Interface_SetTimer(50 + BREG(2)); } func_800F5ACC(NA_BGM_TIMED_MINI_GAME); - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); this->actor.textId = 0x405B; this->unk_292 = TEXT_STATE_EVENT; this->state = ENDIVINGGAME_STATE_PLAYING; @@ -446,7 +446,7 @@ void func_809EE96C(EnDivingGame* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if ((this->unk_292 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play))) { Message_CloseTextbox(play); - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); this->actor.textId = 0x4056; this->unk_292 = TEXT_STATE_EVENT; this->state = ENDIVINGGAME_STATE_AWARDPRIZE; diff --git a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c index bbe10cbbca..508538e467 100644 --- a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c +++ b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c @@ -119,7 +119,7 @@ void EnDntJiji_Wait(EnDntJiji* this, PlayState* play) { !(player->stateFlags1 & PLAYER_STATE1_11)) { OnePointCutscene_Init(play, 2230, -99, &this->actor, CAM_ID_MAIN); this->timer = 0; - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->actionFunc = EnDntJiji_SetupUnburrow; } } @@ -253,7 +253,7 @@ void EnDntJiji_Talk(EnDntJiji* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { func_8005B1A4(GET_ACTIVE_CAM(play)); Message_CloseTextbox(play); - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); this->actor.parent = NULL; Actor_OfferGetItem(&this->actor, play, this->getItemId, 400.0f, 200.0f); this->actionFunc = EnDntJiji_SetupGivePrize; diff --git a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c index b862034fb1..9e00c8eddf 100644 --- a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c +++ b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c @@ -250,7 +250,7 @@ void EnDntNomal_TargetWait(EnDntNomal* this, PlayState* play) { this->hitCounter++; if (this->hitCounter >= 3) { OnePointCutscene_Init(play, 4140, -99, &this->actor, CAM_ID_MAIN); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); this->timer4 = 50; this->actionFunc = EnDntNomal_SetupTargetUnburrow; } @@ -339,7 +339,7 @@ void EnDntNomal_TargetTalk(EnDntNomal* this, PlayState* play) { Message_CloseTextbox(play); func_8005B1A4(GET_ACTIVE_CAM(play)); GET_ACTIVE_CAM(play)->csId = 0; - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->actionFunc = EnDntNomal_SetupTargetGivePrize; } } @@ -361,7 +361,7 @@ void EnDntNomal_TargetGivePrize(EnDntNomal* this, PlayState* play) { if (Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_EX_ITEM, itemX, itemY, itemZ, 0, 0, 0, EXITEM_BULLET_BAG) == NULL) { - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); Actor_Kill(&this->actor); } this->spawnedItem = true; diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c index 6d29938860..269b447e32 100644 --- a/src/overlays/actors/ovl_En_Du/z_en_du.c +++ b/src/overlays/actors/ovl_En_Du/z_en_du.c @@ -328,7 +328,7 @@ void func_809FE3C0(EnDu* this, PlayState* play) { return; } if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); this->interactInfo.talkState = NPC_TALK_STATE_IDLE; } if (this->actor.xzDistToPlayer < 116.0f + this->collider.dim.radius) { @@ -423,7 +423,7 @@ void func_809FE890(EnDu* this, PlayState* play) { CsCmdActorCue* cue; if (play->csCtx.state == CS_STATE_IDLE) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); EnDu_SetupAction(this, func_809FEB08); return; } @@ -503,7 +503,7 @@ void func_809FEB08(EnDu* this, PlayState* play) { this->unk_1EE = 0; if (this->unk_1E8 == 1) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENDU_ANIM_1); EnDu_SetupAction(this, func_809FE3C0); return; @@ -522,7 +522,7 @@ void func_809FEB08(EnDu* this, PlayState* play) { void func_809FEC14(EnDu* this, PlayState* play) { if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); EnDu_SetupAction(this, func_809FEC70); func_809FEC70(this, play); } diff --git a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c index 92a040e671..dd01bbc241 100644 --- a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c +++ b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c @@ -386,7 +386,7 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, PlayState* play) { s32 getItemId; this->actor.draw = NULL; - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); this->actor.parent = NULL; if (CUR_UPG_VALUE(UPG_BULLET_BAG) == 1) { getItemId = GI_BULLET_BAG_40; diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index 97ad57936b..a0c40a86cc 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -242,7 +242,7 @@ void EnGe1_KickPlayer(EnGe1* this, PlayState* play) { void EnGe1_SpotPlayer(EnGe1* this, PlayState* play) { this->cutsceneTimer = 30; this->actionFunc = EnGe1_KickPlayer; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_95); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_95); Sfx_PlaySfxCentered(NA_SE_SY_FOUND); Message_StartTextbox(play, 0x6000, &this->actor); } @@ -586,7 +586,7 @@ void EnGe1_BeginGame_Archery(EnGe1* this, PlayState* play) { SET_EVENTCHKINF(EVENTCHKINF_68); if (!(player->stateFlags1 & PLAYER_STATE1_23)) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); } else { horse = Actor_FindNearby(play, &player->actor, ACTOR_EN_HORSE, ACTORCAT_BG, 1200.0f); player->actor.freezeTimer = 1200; diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index f0da968757..c25b141dd1 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -480,7 +480,7 @@ void EnGe2_SetupCapturePlayer(EnGe2* this, PlayState* play) { this->stateFlags |= GE2_STATE_CAPTURING; this->actor.speed = 0.0f; EnGe2_ChangeAction(this, GE2_ACTION_CAPTURETURN); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_95); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_95); Sfx_PlaySfxCentered(NA_SE_SY_FOUND); Message_StartTextbox(play, 0x6000, &this->actor); } diff --git a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c index 3713dd0f01..61cca61e3b 100644 --- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c +++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c @@ -159,7 +159,7 @@ void EnGe3_ForceTalk(EnGe3* this, PlayState* play) { this->actionFunc = EnGe3_GiveCard; } else { if (!(this->unk_30C & 4)) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); this->unk_30C |= 4; } this->actor.textId = 0x6004; diff --git a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c index 507eb45523..567517d098 100644 --- a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c +++ b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c @@ -919,7 +919,7 @@ void EnGeldB_SpinAttack(EnGeldB* this, PlayState* play) { if (&player->actor == this->swordCollider.base.at) { func_8002F71C(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f); this->spinAttackState = 2; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_24); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_24); Message_StartTextbox(play, 0x6003, &this->actor); this->timer = 30; this->actor.speed = 0.0f; diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c index 2a9a5fc4b3..2bd5bbecbf 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -1925,7 +1925,7 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, PlayState* play) { (f32)((Math_SinS(this->actor.world.rot.y) * -30.0f) + this->actor.world.pos.x); player->actor.world.pos.z = (f32)((Math_CosS(this->actor.world.rot.y) * -30.0f) + this->actor.world.pos.z); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); Audio_PlayFanfare(NA_BGM_APPEAR); } break; @@ -1962,7 +1962,7 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, PlayState* play) { case 4: // Finalize walking away Message_CloseTextbox(play); EnGo2_GoronFireClearCamera(this, play); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); Actor_Kill(&this->actor); break; case 1: diff --git a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c index 1b2f38f749..77e43e4196 100644 --- a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c +++ b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c @@ -372,7 +372,7 @@ void EnHeishi1_WaitNight(EnHeishi1* this, PlayState* play) { Message_StartTextbox(play, 0x702D, &this->actor); Sfx_PlaySfxCentered(NA_SE_SY_FOUND); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); this->actionFunc = EnHeishi1_SetupKick; } } @@ -456,7 +456,7 @@ void EnHeishi1_Update(Actor* thisx, PlayState* play) { Sfx_PlaySfxCentered(NA_SE_SY_FOUND); // "Discovered!" osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); sPlayerIsCaught = true; this->actionFunc = EnHeishi1_SetupMoveToLink; } diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index 4a21b28515..a6786a3095 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -111,7 +111,7 @@ void EnHeishi2_Init(Actor* thisx, PlayState* play) { this->actor.world.pos.z += 90.0f; this->actor.shape.rot.y = this->actor.world.rot.y; Collider_DestroyCylinder(play, &this->collider); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_4; this->actionFunc = func_80A544AC; } @@ -262,7 +262,7 @@ void func_80A5344C(EnHeishi2* this, PlayState* play) { void func_80A53538(EnHeishi2* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (this->unk_300 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); play->msgCtx.msgMode = MSGMODE_PAUSED; this->actionFunc = func_80A535BC; } @@ -334,7 +334,7 @@ void func_80A53850(EnHeishi2* this, PlayState* play) { Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); Message_CloseTextbox(play); this->unk_30C = 1; - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); this->actionFunc = func_80A531E4; } } @@ -423,7 +423,7 @@ void func_80A53AD4(EnHeishi2* this, PlayState* play) { void func_80A53C0C(EnHeishi2* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if ((this->unk_300 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) { - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); play->msgCtx.msgMode = MSGMODE_PAUSED; this->actionFunc = func_80A53C90; } @@ -507,7 +507,7 @@ void func_80A53F30(EnHeishi2* this, PlayState* play) { this->actionFunc = func_80A54038; } else { Message_CloseTextbox(play); - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); this->actionFunc = func_80A53908; } } else { @@ -525,7 +525,7 @@ void func_80A54038(EnHeishi2* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { SET_INFTABLE(INFTABLE_76); Message_CloseTextbox(play); - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); this->actionFunc = func_80A53908; } } @@ -650,7 +650,7 @@ void func_80A5455C(EnHeishi2* this, PlayState* play) { EnBom* bomb; if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); Message_CloseTextbox(play); pos.x = Rand_CenteredFloat(20.0f) + this->unk_274.x; diff --git a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c index 167f976e8c..5ef5319829 100644 --- a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c +++ b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c @@ -133,7 +133,7 @@ void EnHeishi3_StandSentinelInGrounds(EnHeishi3* this, PlayState* play) { Message_StartTextbox(play, 0x702D, &this->actor); Sfx_PlaySfxCentered(NA_SE_SY_FOUND); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); this->actionFunc = EnHeishi3_CatchStart; } } @@ -161,7 +161,7 @@ void EnHeishi3_StandSentinelInCastle(EnHeishi3* this, PlayState* play) { Message_StartTextbox(play, 0x702D, &this->actor); Sfx_PlaySfxCentered(NA_SE_SY_FOUND); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); this->actionFunc = EnHeishi3_CatchStart; } } diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c index 463f7604cc..3f2aa1d18a 100644 --- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c +++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c @@ -266,7 +266,7 @@ void func_80A56994(EnHeishi4* this, PlayState* play) { if ((this->unk_282 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) { Message_CloseTextbox(play); SET_INFTABLE(INFTABLE_6C); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->actionFunc = func_80A56A50; } } @@ -284,7 +284,7 @@ void func_80A56ACC(EnHeishi4* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (this->unk_288 <= currentFrame) { - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); this->actionFunc = func_80A5673C; } } diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index 773f5a7e2c..6fc73137cb 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -432,7 +432,7 @@ void func_80A79BAC(EnIn* this, PlayState* play, s32 index, u32 transitionType) { } play->transitionType = transitionType; play->transitionTrigger = TRANS_TRIGGER_START; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING); if (index == 0) { AREG(6) = 0; @@ -859,7 +859,7 @@ void func_80A7ABD4(EnIn* this, PlayState* play) { void func_80A7AE84(EnIn* this, PlayState* play) { Play_ChangeCameraStatus(play, this->returnToCamId, CAM_STAT_ACTIVE); Play_ClearCamera(play, this->subCamId); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL); this->actionFunc = func_80A7AEF0; } diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c index 2f2381818a..ea8c6df9f3 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -259,7 +259,7 @@ void func_80A8F8D0(EnKakasi* this, PlayState* play) { void func_80A8F9C8(EnKakasi* this, PlayState* play) { func_80A8F28C(this); SkelAnime_Update(&this->skelanime); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); if (this->unk_196 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { @@ -268,7 +268,7 @@ void func_80A8F9C8(EnKakasi* this, PlayState* play) { } this->subCamId = OnePointCutscene_Init(play, 2270, -99, &this->actor, CAM_ID_MAIN); play->msgCtx.msgMode = MSGMODE_PAUSED; - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); Message_StartOcarina(play, OCARINA_ACTION_SCARECROW_LONG_PLAYBACK); this->actionFunc = func_80A8FAA4; } @@ -307,7 +307,7 @@ void func_80A8FBB8(EnKakasi* this, PlayState* play) { if (this->unk_196 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { func_8005B1A4(play->cameraPtrs[this->subCamId]); Message_CloseTextbox(play); - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); this->actionFunc = func_80A8F660; } } diff --git a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c index 30e46b5509..4089bfdbcd 100644 --- a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c +++ b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c @@ -295,7 +295,7 @@ void func_80A91620(EnKakasi3* this, PlayState* play) { if (play->msgCtx.ocarinaMode == OCARINA_MODE_03 && play->msgCtx.msgMode == MSGMODE_NONE) { this->dialogState = TEXT_STATE_EVENT; Message_StartTextbox(play, 0x40A5, NULL); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->actionFunc = func_80A91A90; return; } @@ -353,7 +353,7 @@ void func_80A918E4(EnKakasi3* this, PlayState* play) { this->dialogState = TEXT_STATE_EVENT; OnePointCutscene_EndCutscene(play, this->subCamId); this->subCamId = CAM_ID_NONE; - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->actionFunc = func_80A91A90; return; } @@ -368,7 +368,7 @@ void func_80A918E4(EnKakasi3* this, PlayState* play) { this->unk_195 = true; Message_StartTextbox(play, 0x40A7, NULL); this->dialogState = TEXT_STATE_EVENT; - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->actionFunc = func_80A91A90; return; } @@ -382,7 +382,7 @@ void func_80A918E4(EnKakasi3* this, PlayState* play) { void func_80A91A90(EnKakasi3* this, PlayState* play) { func_80A90E28(this); SkelAnime_Update(&this->skelAnime); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); if (this->dialogState == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { if (this->unk_195) { @@ -398,7 +398,7 @@ void func_80A91A90(EnKakasi3* this, PlayState* play) { } Message_CloseTextbox(play); play->msgCtx.ocarinaMode = OCARINA_MODE_04; - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); this->actionFunc = func_80A911F0; } } diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/src/overlays/actors/ovl_En_Kz/z_en_kz.c index bf45ee5c8a..29c1f4a5e4 100644 --- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -382,7 +382,7 @@ void EnKz_SetupMweep(EnKz* this, PlayState* play) { subCamEye.y += -100.0f; subCamEye.z += 260.0f; Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); this->actor.speed = 0.1f; this->actionFunc = EnKz_Mweep; } @@ -414,7 +414,7 @@ void EnKz_Mweep(EnKz* this, PlayState* play) { void EnKz_StopMweep(EnKz* this, PlayState* play) { Play_ChangeCameraStatus(play, this->returnToCamId, CAM_STAT_ACTIVE); Play_ClearCamera(play, this->subCamId); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); this->actionFunc = EnKz_Wait; } diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index a4f1ab4954..0100c5d006 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -337,7 +337,7 @@ void func_80ACA71C(EnOwl* this) { } void func_80ACA76C(EnOwl* this, PlayState* play) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); if (Actor_TextboxIsClosing(&this->actor, play)) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); @@ -347,7 +347,7 @@ void func_80ACA76C(EnOwl* this, PlayState* play) { } void func_80ACA7E0(EnOwl* this, PlayState* play) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); if (Actor_TextboxIsClosing(&this->actor, play)) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); @@ -547,7 +547,7 @@ void EnOwl_WaitLakeHylia(EnOwl* this, PlayState* play) { } void func_80ACB03C(EnOwl* this, PlayState* play) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); if (Actor_TextboxIsClosing(&this->actor, play)) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); diff --git a/src/overlays/actors/ovl_En_Skj/z_en_skj.c b/src/overlays/actors/ovl_En_Skj/z_en_skj.c index 68393b5497..18e322d71f 100644 --- a/src/overlays/actors/ovl_En_Skj/z_en_skj.c +++ b/src/overlays/actors/ovl_En_Skj/z_en_skj.c @@ -1074,7 +1074,7 @@ void EnSkj_SetupMaskTrade(EnSkj* this) { void EnSkj_StartMaskTrade(EnSkj* this, PlayState* play) { u8 sp1F = Message_GetState(&play->msgCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); if ((sp1F == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { EnSkj_JumpFromStump(this); } @@ -1172,7 +1172,7 @@ void EnSkj_SetupWaitForMaskTextClear(EnSkj* this) { void EnSkj_WaitForMaskTextClear(EnSkj* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); this->backflipFlag = 1; EnSkj_Backflip(this); } diff --git a/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/src/overlays/actors/ovl_En_Ta/z_en_ta.c index a685942b66..833730c0c8 100644 --- a/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -757,7 +757,7 @@ void EnTa_RunCuccoGame(EnTa* this, PlayState* play) { case 1: // Last cucco found, end the game gSaveContext.timerState = TIMER_STATE_OFF; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); Message_StartTextbox(play, 0x2084, &this->actor); this->actionFunc = EnTa_TalkCuccoGameEnd; @@ -805,7 +805,7 @@ void EnTa_RunCuccoGame(EnTa* this, PlayState* play) { this->stateFlags &= ~TALON_STATE_FLAG_RESTORE_BGM_ON_DESTROY; Sfx_PlaySfxCentered(NA_SE_SY_FOUND); gSaveContext.timerState = TIMER_STATE_OFF; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); // Time's up text Message_StartTextbox(play, 0x2081, &this->actor); @@ -868,7 +868,7 @@ void EnTa_ThrowSuperCuccos(EnTa* this, PlayState* play) { Animation_Change(&this->skelAnime, &gTalonSitWakeUpAnim, 1.0f, Animation_GetLastFrame(&gTalonSitWakeUpAnim) - 1.0f, Animation_GetLastFrame(&gTalonSitWakeUpAnim), ANIMMODE_ONCE, 10.0f); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); } } @@ -885,7 +885,7 @@ void EnTa_StartingCuccoGame3(EnTa* this, PlayState* play) { func_800F5ACC(NA_BGM_TIMED_MINI_GAME); this->stateFlags |= TALON_STATE_FLAG_RESTORE_BGM_ON_DESTROY; Message_CloseTextbox(play); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); } if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index 7b3f16f1c3..c729fa0d41 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -563,7 +563,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { if ((this->actor.colChkInfo.health == 0) && sDeathFlag) { this->csAction = PLAYER_CSACTION_24; - this->unk_448 = &player->actor; + this->csActor = &player->actor; this->cv.haltActorsDuringCsAction = true; sDeathFlag = false; } diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index cbba7d4605..d0e45f04c0 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -259,7 +259,7 @@ void EnWallmas_SetupTakePlayer(EnWallmas* this, PlayState* play) { this->actor.velocity.y = 0.0f; this->yTarget = this->actor.yDistToPlayer; - func_8002DF38(play, &this->actor, PLAYER_CSACTION_37); + Player_SetCsAction(play, &this->actor, PLAYER_CSACTION_37); OnePointCutscene_Init(play, 9500, 9999, &this->actor, CAM_ID_MAIN); } diff --git a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c index d0366ca20b..22bf7d154b 100644 --- a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c +++ b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c @@ -194,7 +194,7 @@ void func_80B3A3D4(EnWonderTalk2* this, PlayState* play) { this->unk_15A = true; } this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_4); - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); this->unk_156 = true; this->actionFunc = func_80B3A4F8; break; @@ -253,7 +253,7 @@ void func_80B3A4F8(EnWonderTalk2* this, PlayState* play) { this->unk_158 = 0; if (!this->unk_156) { Message_StartTextbox(play, this->actor.textId, NULL); - func_8002DF54(play, NULL, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8); this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_4; this->actionFunc = func_80B3A3D4; } diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index a66c5e7b81..cb37a489bc 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -429,7 +429,7 @@ void func_80B4BBC4(EnZl1* this, PlayState* play) { Player* player = GET_PLAYER(play); Animation_Change(&this->skelAnime, &gChildZelda1Anim_00438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); Player_PlaySfx(player, NA_SE_VO_LI_SURPRISE_KID); this->actor.textId = 0x7039; Message_StartTextbox(play, this->actor.textId, NULL); @@ -570,7 +570,7 @@ void func_80B4BF2C(EnZl1* this, PlayState* play) { break; case 6: if (Actor_TextboxIsClosing(&this->actor, play)) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL); this->actor.flags &= ~ACTOR_FLAG_8; this->unk_1E2 = 4; diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c index 5d9e230a90..75b2e7c7f6 100644 --- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c +++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c @@ -320,7 +320,7 @@ s32 EnZl4_SetupFromLegendCs(EnZl4* this, PlayState* play) { Actor* playerx = &GET_PLAYER(play)->actor; s16 rotY; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); playerx->world.pos = this->actor.world.pos; rotY = this->actor.shape.rot.y; playerx->world.pos.x += 56.0f * Math_SinS(rotY); @@ -912,7 +912,7 @@ s32 EnZl4_CsLookWindow(EnZl4* this, PlayState* play) { play->csCtx.script = SEGMENTED_TO_VIRTUAL(gZeldasCourtyardGanonCs); gSaveContext.cutsceneTrigger = 1; this->talkState++; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); } break; case 2: @@ -922,7 +922,7 @@ s32 EnZl4_CsLookWindow(EnZl4* this, PlayState* play) { } } else { Rumble_Request(0.0f, 160, 10, 40); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ZL4_ANIM_30); EnZl4_SetActiveCamDir(play, 11); Message_StartTextbox(play, 0x7039, NULL); @@ -1193,7 +1193,7 @@ void EnZl4_Cutscene(EnZl4* this, PlayState* play) { break; case ZL4_CS_PLAN: if (EnZl4_CsMakePlan(this, play)) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); gSaveContext.prevHudVisibilityMode = HUD_VISIBILITY_ALL; SET_EVENTCHKINF(EVENTCHKINF_40); this->actionFunc = EnZl4_Idle; diff --git a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c index 2561813e98..178c68fbf5 100644 --- a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c +++ b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c @@ -151,7 +151,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { break; } Cutscene_StartManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -192,7 +192,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EV_GANON_HORSE_GROAN); } if (this->timers[0] == 20) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_9); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_9); } if (this->timers[0] == 1) { SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_OPENING_GANON); @@ -354,7 +354,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { this->bossGndSignal = FHG_FINISH; } if (this->timers[0] == 170) { - func_8002DF54(play, &this->actor, PLAYER_CSACTION_8); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8); Actor_PlaySfx(&this->actor, NA_SE_EN_FANTOM_MASIC2); } Math_ApproachF(&this->subCamEye.z, this->subCamPanZ + (GND_BOSSROOM_CENTER_Z + 100.0f), 0.1f, @@ -400,7 +400,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); this->actionFunc = EnfHG_Retreat; } break; diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c index 808078fde6..bfa3ab1d37 100644 --- a/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -5392,7 +5392,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_5); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_5); mainCam = Play_GetCamera(play, CAM_ID_MAIN); sSubCamEye.x = mainCam->eye.x; sSubCamEye.y = mainCam->eye.y; @@ -5418,7 +5418,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { mainCam->at = sSubCamAt; Play_ReturnToMainCam(play, sSubCamId, 0); Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); sFishingPlayerCinematicState = 0; sSubCamId = SUB_CAM_ID_DONE; @@ -5435,7 +5435,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_5); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_5); mainCam = Play_GetCamera(play, CAM_ID_MAIN); sSubCamEye.x = mainCam->eye.x; sSubCamEye.y = mainCam->eye.y; @@ -5454,7 +5454,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { if ((sFishingCinematicTimer == 0) && Message_ShouldAdvance(play)) { sFishingPlayerCinematicState = 22; sFishingCinematicTimer = 40; - func_8002DF54(play, &this->actor, PLAYER_CSACTION_28); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_28); sSinkingLureHeldY = 0.0f; } break; @@ -5523,7 +5523,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { mainCam->at = sSubCamAt; Play_ReturnToMainCam(play, sSubCamId, 0); Cutscene_StopManual(play, &play->csCtx); - func_8002DF54(play, &this->actor, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); sFishingPlayerCinematicState = 0; sSubCamId = SUB_CAM_ID_DONE; diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 2ed5e048ac..1d5ecfd2c2 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -256,7 +256,7 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cue); int Player_IsDroppingFish(PlayState* play); s32 Player_StartFishing(PlayState* play); s32 func_80852F38(PlayState* play, Player* this); -s32 func_80852FFC(PlayState* play, Actor* actor, s32 csAction); +s32 Player_TryCsAction(PlayState* play, Actor* actor, s32 csAction); void func_80853080(Player* this, PlayState* play); s32 Player_InflictDamage(PlayState* play, s32 damage); void func_80853148(PlayState* play, Actor* actor); @@ -348,7 +348,7 @@ void Player_Action_808507F4(Player* this, PlayState* play); void Player_Action_80850AEC(Player* this, PlayState* play); void Player_Action_80850C68(Player* this, PlayState* play); void Player_Action_80850E84(Player* this, PlayState* play); -void Player_Action_80852E14(Player* this, PlayState* play); +void Player_Action_CsAction(Player* this, PlayState* play); // .bss part 1 static s32 D_80858AA0; @@ -5387,16 +5387,25 @@ s32 func_8083AD4C(PlayState* play, Player* this) { return Camera_ChangeMode(Play_GetCamera(play, CAM_ID_MAIN), cameraMode); } -s32 func_8083ADD4(PlayState* play, Player* this) { +/** + * If appropriate, setup action for performing a `csAction` + * + * @return true if a `csAction` is started, false if not + */ +s32 Player_StartCsAction(PlayState* play, Player* this) { + // unk_6AD will get set to 3 in `Player_UpdateCommon` if `this->csAction` is non-zero + // (with a special case for `PLAYER_CSACTION_7`) if (this->unk_6AD == 3) { - Player_SetupAction(play, this, Player_Action_80852E14, 0); + Player_SetupAction(play, this, Player_Action_CsAction, 0); + if (this->cv.haltActorsDuringCsAction) { this->stateFlags1 |= PLAYER_STATE1_29; } + func_80832318(this); - return 1; + return true; } else { - return 0; + return false; } } @@ -5495,7 +5504,7 @@ s32 Player_ActionChange_13(Player* this, PlayState* play) { if ((this->unk_6AD != 0) && (func_808332B8(this) || (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->stateFlags1 & PLAYER_STATE1_23))) { - if (!func_8083ADD4(play, this)) { + if (!Player_StartCsAction(play, this)) { if (this->unk_6AD == 4) { sp2C = Player_ActionToMagicSpell(this, this->itemAction); if (sp2C >= 0) { @@ -9082,7 +9091,7 @@ void Player_Action_80844AF4(Player* this, PlayState* play) { s32 func_80844BE4(Player* this, PlayState* play) { s32 temp; - if (func_8083ADD4(play, this)) { + if (Player_StartCsAction(play, this)) { this->stateFlags2 |= PLAYER_STATE2_17; } else { if (!CHECK_BTN_ALL(sControlInput->cur.button, BTN_B)) { @@ -9954,7 +9963,7 @@ void Player_Init(Actor* thisx, PlayState* play2) { play->isPlayerDroppingFish = Player_IsDroppingFish; play->startPlayerFishing = Player_StartFishing; play->grabPlayer = func_80852F38; - play->startPlayerCutscene = func_80852FFC; + play->tryPlayerCsAction = Player_TryCsAction; play->func_11D54 = func_80853080; play->damagePlayer = Player_InflictDamage; play->talkWithPlayer = func_80853148; @@ -11151,11 +11160,11 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { CsCmdActorCue* cue = play->csCtx.playerCue; if ((cue != NULL) && (sCueToCsActionMap[cue->id] != PLAYER_CSACTION_NONE)) { - func_8002DF54(play, NULL, PLAYER_CSACTION_6); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_6); Player_ZeroSpeedXZ(this); } else if ((this->csAction == PLAYER_CSACTION_NONE) && !(this->stateFlags2 & PLAYER_STATE2_10) && (play->csCtx.state != CS_STATE_STOP)) { - func_8002DF54(play, NULL, PLAYER_CSACTION_49); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_49); Player_ZeroSpeedXZ(this); } } @@ -11164,7 +11173,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { if ((this->csAction != PLAYER_CSACTION_7) || !(this->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21 | PLAYER_STATE1_26))) { this->unk_6AD = 3; - } else if (Player_Action_80852E14 != this->actionFunc) { + } else if (Player_Action_CsAction != this->actionFunc) { func_80852944(play, this, NULL); } } else { @@ -11760,7 +11769,7 @@ void Player_Action_8084B530(Player* this, PlayState* play) { func_8005B1A4(Play_GetCamera(play, CAM_ID_MAIN)); - if (!func_8084B4D4(play, this) && !func_8084B3CC(play, this) && !func_8083ADD4(play, this)) { + if (!func_8084B4D4(play, this) && !func_8084B3CC(play, this) && !Player_StartCsAction(play, this)) { if ((this->targetActor != this->interactRangeActor) || !Player_ActionChange_2(this, play)) { if (this->stateFlags1 & PLAYER_STATE1_23) { s32 sp24 = this->av2.actionVar2; @@ -12905,7 +12914,7 @@ s32 func_8084DFF4(PlayState* play, Player* this) { gSaveContext.nextCutsceneIndex = 0xFFF1; play->transitionType = TRANS_TYPE_SANDSTORM_END; this->stateFlags1 &= ~PLAYER_STATE1_29; - func_80852FFC(play, NULL, PLAYER_CSACTION_8); + Player_TryCsAction(play, NULL, PLAYER_CSACTION_8); } this->getItemId = GI_NONE; } @@ -13005,7 +13014,7 @@ void Player_Action_8084E3C4(Player* this, PlayState* play) { this->csAction = PLAYER_CSACTION_NONE; this->stateFlags1 &= ~PLAYER_STATE1_29; - func_80852FFC(play, NULL, PLAYER_CSACTION_8); + Player_TryCsAction(play, NULL, PLAYER_CSACTION_8); play->mainCamera.stateFlags &= ~CAM_STATE_3; this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29; @@ -13467,10 +13476,10 @@ void Player_Action_8084F390(Player* this, PlayState* play) { } void Player_Action_8084F608(Player* this, PlayState* play) { - if ((DECR(this->av2.actionVar2) == 0) && func_8083ADD4(play, this)) { + if ((DECR(this->av2.actionVar2) == 0) && Player_StartCsAction(play, this)) { func_80852280(play, this, NULL); - Player_SetupAction(play, this, Player_Action_80852E14, 0); - Player_Action_80852E14(this, play); + Player_SetupAction(play, this, Player_Action_CsAction, 0); + Player_Action_CsAction(this, play); } } @@ -13495,7 +13504,7 @@ void Player_Action_8084F710(Player* this, PlayState* play) { this->av2.actionVar2 = 1; } } else { - if ((play->sceneId == SCENE_KOKIRI_FOREST) && func_8083ADD4(play, this)) { + if ((play->sceneId == SCENE_KOKIRI_FOREST) && Player_StartCsAction(play, this)) { return; } func_80853080(this, play); @@ -13504,7 +13513,7 @@ void Player_Action_8084F710(Player* this, PlayState* play) { Math_SmoothStepToF(&this->actor.velocity.y, 2.0f, 0.3f, 8.0f, 0.5f); } - if ((play->sceneId == SCENE_CHAMBER_OF_THE_SAGES) && func_8083ADD4(play, this)) { + if ((play->sceneId == SCENE_CHAMBER_OF_THE_SAGES) && Player_StartCsAction(play, this)) { return; } @@ -14428,11 +14437,11 @@ void func_808512E0(PlayState* play, Player* this, void* arg2) { } void func_80851314(Player* this) { - if ((this->unk_448 == NULL) || (this->unk_448->update == NULL)) { - this->unk_448 = NULL; + if ((this->csActor == NULL) || (this->csActor->update == NULL)) { + this->csActor = NULL; } - this->unk_664 = this->unk_448; + this->unk_664 = this->csActor; if (this->unk_664 != NULL) { this->actor.shape.rot.y = func_8083DB98(this, 0); @@ -14521,7 +14530,7 @@ void func_808515A4(PlayState* play, Player* this, CsCmdActorCue* cue) { void func_80851688(PlayState* play, Player* this, CsCmdActorCue* cue) { if (func_8084B3CC(play, this) == 0) { if ((this->csAction == PLAYER_CSACTION_49) && (play->csCtx.state == CS_STATE_IDLE)) { - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); return; } @@ -15107,7 +15116,7 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cueUnused) { s32 csAction; if (play->csCtx.state == CS_STATE_STOP) { - func_8002DF54(play, NULL, PLAYER_CSACTION_7); + Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7); this->cueId = PLAYER_CUEID_NONE; Player_ZeroSpeedXZ(this); return; @@ -15145,7 +15154,7 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cueUnused) { func_80852B4C(play, this, cue, &D_80854E50[ABS(csAction)]); } -void Player_Action_80852E14(Player* this, PlayState* play) { +void Player_Action_CsAction(Player* this, PlayState* play) { if (this->csAction != this->prevCsAction) { D_80858AA0 = this->skelAnime.moveFlags; @@ -15188,20 +15197,27 @@ s32 func_80852F38(PlayState* play, Player* this) { return false; } -// Sets up player cutscene -s32 func_80852FFC(PlayState* play, Actor* actor, s32 csAction) { +/** + * Tries to starts a cutscene action specified by `csAction`. + * A cutscene action will only start if player is not already in another form of cutscene. + * + * No actors will be halted over the duration of the cutscene action. + * + * @return true if successful starting a `csAction`, false if not + */ +s32 Player_TryCsAction(PlayState* play, Actor* actor, s32 csAction) { Player* this = GET_PLAYER(play); if (!Player_InBlockingCsMode(play, this)) { func_80832564(play, this); - Player_SetupAction(play, this, Player_Action_80852E14, 0); + Player_SetupAction(play, this, Player_Action_CsAction, 0); this->csAction = csAction; - this->unk_448 = actor; + this->csActor = actor; func_80832224(this); - return 1; + return true; } - return 0; + return false; } void func_80853080(Player* this, PlayState* play) { @@ -15235,7 +15251,7 @@ void func_80853148(PlayState* play, Actor* actor) { this->exchangeItemId = EXCH_ITEM_NONE; if (actor->textId == 0xFFFF) { - func_8002DF54(play, actor, PLAYER_CSACTION_1); + Player_SetCsActionWithHaltedActors(play, actor, PLAYER_CSACTION_1); actor->flags |= ACTOR_FLAG_8; func_80832528(play, this); } else { From 8718a5c8c0c97cc93f4d11ee4a3a7cb4ddbdcacc Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Mon, 30 Oct 2023 15:19:16 +0100 Subject: [PATCH 15/16] Remove `(ActorFunc)` casts in initvars (#1571) * Remove `(ActorFunc)` casts in initvars, use `/**/` trick for format Achieved by using the following regex: (ActorInit.*)(\n\s+)(.*)(\n\s+)(.*)(\n\s+)(.*)(\n\s+)(.*)(\n\s+)(.*)(\n\s+)(?:\(ActorFunc\))?(.*)(\n\s+)(?:\(ActorFunc\))?(.*)(\n\s+)(?:\(ActorFunc\))?(.*)(\n\s+)(?:\(ActorFunc\))?(.*\n\};) replaced with $1$2/**/ $3$4/**/ $5$6/**/ $7$8/**/ $9$10/**/ $11$12/**/ $13$14/**/ $15$16/**/ $17$18/**/ $19 plus a change from /**/ to #if 0 #endif in docs/ * Manual fixes --- docs/tutorial/beginning_decomp.md | 22 ++++---- docs/tutorial/data.md | 54 +++++++++---------- src/code/z_en_a_keep.c | 18 +++---- src/code/z_en_item00.c | 18 +++---- src/code/z_player_call.c | 18 +++---- .../actors/ovl_Arms_Hook/z_arms_hook.c | 18 +++---- .../actors/ovl_Arrow_Fire/z_arrow_fire.c | 18 +++---- .../actors/ovl_Arrow_Ice/z_arrow_ice.c | 18 +++---- .../actors/ovl_Arrow_Light/z_arrow_light.c | 18 +++---- .../ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c | 18 +++---- .../ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c | 18 +++---- .../actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c | 18 +++---- .../actors/ovl_Bg_Bombwall/z_bg_bombwall.c | 18 +++---- .../actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c | 18 +++---- .../actors/ovl_Bg_Breakwall/z_bg_breakwall.c | 18 +++---- .../actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c | 18 +++---- .../actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c | 18 +++---- .../actors/ovl_Bg_Dodoago/z_bg_dodoago.c | 18 +++---- .../ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c | 18 +++---- .../ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c | 18 +++---- .../ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c | 18 +++---- .../ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c | 18 +++---- .../ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c | 18 +++---- .../ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c | 18 +++---- .../ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c | 18 +++---- .../ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c | 18 +++---- .../ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c | 18 +++---- src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c | 18 +++---- .../actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c | 18 +++---- .../actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c | 18 +++---- .../ovl_Bg_Haka_Megane/z_bg_haka_megane.c | 18 +++---- .../ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c | 18 +++---- .../ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c | 18 +++---- .../actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c | 18 +++---- .../actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c | 18 +++---- .../actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c | 18 +++---- .../ovl_Bg_Haka_Water/z_bg_haka_water.c | 18 +++---- .../actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c | 18 +++---- .../ovl_Bg_Heavy_Block/z_bg_heavy_block.c | 18 +++---- .../ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c | 18 +++---- .../ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c | 18 +++---- .../z_bg_hidan_firewall.c | 18 +++---- .../ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c | 18 +++---- .../ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c | 18 +++---- .../ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c | 18 +++---- .../ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c | 18 +++---- .../ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c | 18 +++---- .../z_bg_hidan_kowarerukabe.c | 18 +++---- .../ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c | 18 +++---- .../z_bg_hidan_rsekizou.c | 18 +++---- .../ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c | 18 +++---- .../ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c | 18 +++---- .../ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c | 18 +++---- .../ovl_Bg_Ice_Objects/z_bg_ice_objects.c | 18 +++---- .../ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c | 18 +++---- .../ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c | 18 +++---- .../ovl_Bg_Ice_Turara/z_bg_ice_turara.c | 18 +++---- .../actors/ovl_Bg_Ingate/z_bg_ingate.c | 18 +++---- .../ovl_Bg_Jya_1flift/z_bg_jya_1flift.c | 18 +++---- .../z_bg_jya_amishutter.c | 18 +++---- .../ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c | 18 +++---- .../actors/ovl_Bg_Jya_Block/z_bg_jya_block.c | 18 +++---- .../z_bg_jya_bombchuiwa.c | 18 +++---- .../ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c | 18 +++---- .../actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c | 18 +++---- .../ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c | 18 +++---- .../ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c | 18 +++---- .../ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c | 18 +++---- .../ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c | 18 +++---- .../actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c | 18 +++---- .../ovl_Bg_Jya_Megami/z_bg_jya_megami.c | 18 +++---- .../z_bg_jya_zurerukabe.c | 18 +++---- .../ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c | 18 +++---- .../z_bg_menkuri_kaiten.c | 18 +++---- .../z_bg_menkuri_nisekabe.c | 18 +++---- .../ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c | 18 +++---- .../ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c | 18 +++---- .../ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c | 18 +++---- .../actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c | 18 +++---- .../ovl_Bg_Mizu_Water/z_bg_mizu_water.c | 18 +++---- src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c | 18 +++---- .../ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c | 18 +++---- .../ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c | 18 +++---- .../ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c | 18 +++---- .../ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c | 18 +++---- .../ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c | 18 +++---- .../ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c | 18 +++---- .../z_bg_mori_kaitenkabe.c | 18 +++---- .../z_bg_mori_rakkatenjo.c | 18 +++---- .../actors/ovl_Bg_Po_Event/z_bg_po_event.c | 18 +++---- .../ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c | 18 +++---- .../actors/ovl_Bg_Pushbox/z_bg_pushbox.c | 18 +++---- .../ovl_Bg_Relay_Objects/z_bg_relay_objects.c | 18 +++---- .../ovl_Bg_Spot00_Break/z_bg_spot00_break.c | 18 +++---- .../z_bg_spot00_hanebasi.c | 18 +++---- .../ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c | 18 +++---- .../z_bg_spot01_idohashira.c | 18 +++---- .../z_bg_spot01_idomizu.c | 18 +++---- .../z_bg_spot01_idosoko.c | 18 +++---- .../z_bg_spot01_objects2.c | 18 +++---- .../z_bg_spot02_objects.c | 18 +++---- .../ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c | 18 +++---- .../ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c | 18 +++---- .../z_bg_spot06_objects.c | 18 +++---- .../ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c | 18 +++---- .../z_bg_spot08_bakudankabe.c | 18 +++---- .../z_bg_spot08_iceblock.c | 18 +++---- .../ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c | 18 +++---- .../z_bg_spot11_bakudankabe.c | 18 +++---- .../ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c | 18 +++---- .../ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c | 18 +++---- .../ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c | 18 +++---- .../ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c | 18 +++---- .../ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c | 18 +++---- .../z_bg_spot16_bombstone.c | 18 +++---- .../z_bg_spot16_doughnut.c | 18 +++---- .../z_bg_spot17_bakudankabe.c | 18 +++---- .../ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c | 18 +++---- .../ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c | 18 +++---- .../ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c | 18 +++---- .../ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c | 18 +++---- .../z_bg_spot18_shutter.c | 18 +++---- .../actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c | 18 +++---- .../ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c | 18 +++---- .../actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c | 18 +++---- .../actors/ovl_Bg_Treemouth/z_bg_treemouth.c | 18 +++---- .../actors/ovl_Bg_Umajump/z_bg_umajump.c | 18 +++---- .../actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c | 18 +++---- .../actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c | 18 +++---- .../ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c | 18 +++---- .../actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c | 18 +++---- src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c | 18 +++---- .../actors/ovl_Boss_Dodongo/z_boss_dodongo.c | 18 +++---- src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c | 18 +++---- src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c | 18 +++---- .../actors/ovl_Boss_Ganon/z_boss_ganon.c | 18 +++---- .../actors/ovl_Boss_Ganon2/z_boss_ganon2.c | 18 +++---- .../ovl_Boss_Ganondrof/z_boss_ganondrof.c | 18 +++---- .../actors/ovl_Boss_Goma/z_boss_goma.c | 18 +++---- src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 18 +++---- src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 18 +++---- src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c | 18 +++---- src/overlays/actors/ovl_Boss_Va/z_boss_va.c | 18 +++---- src/overlays/actors/ovl_Demo_6K/z_demo_6k.c | 18 +++---- src/overlays/actors/ovl_Demo_Du/z_demo_du.c | 18 +++---- src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c | 18 +++---- .../actors/ovl_Demo_Effect/z_demo_effect.c | 18 +++---- src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c | 18 +++---- .../actors/ovl_Demo_Geff/z_demo_geff.c | 18 +++---- src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c | 18 +++---- src/overlays/actors/ovl_Demo_Go/z_demo_go.c | 18 +++---- src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c | 18 +++---- src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c | 18 +++---- src/overlays/actors/ovl_Demo_Im/z_demo_im.c | 18 +++---- .../actors/ovl_Demo_Kankyo/z_demo_kankyo.c | 18 +++---- .../actors/ovl_Demo_Kekkai/z_demo_kekkai.c | 18 +++---- src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c | 18 +++---- src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c | 18 +++---- .../actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c | 18 +++---- src/overlays/actors/ovl_Door_Ana/z_door_ana.c | 18 +++---- .../actors/ovl_Door_Gerudo/z_door_gerudo.c | 18 +++---- .../actors/ovl_Door_Killer/z_door_killer.c | 18 +++---- .../actors/ovl_Door_Shutter/z_door_shutter.c | 18 +++---- .../actors/ovl_Door_Toki/z_door_toki.c | 18 +++---- .../actors/ovl_Door_Warp1/z_door_warp1.c | 18 +++---- .../actors/ovl_Efc_Erupc/z_efc_erupc.c | 18 +++---- src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c | 18 +++---- src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c | 18 +++---- src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c | 18 +++---- src/overlays/actors/ovl_En_Am/z_en_am.c | 18 +++---- src/overlays/actors/ovl_En_Ani/z_en_ani.c | 18 +++---- .../actors/ovl_En_Anubice/z_en_anubice.c | 18 +++---- .../ovl_En_Anubice_Fire/z_en_anubice_fire.c | 18 +++---- .../ovl_En_Anubice_Tag/z_en_anubice_tag.c | 18 +++---- .../actors/ovl_En_Arow_Trap/z_en_arow_trap.c | 18 +++---- src/overlays/actors/ovl_En_Arrow/z_en_arrow.c | 18 +++---- .../ovl_En_Attack_Niw/z_en_attack_niw.c | 18 +++---- src/overlays/actors/ovl_En_Ba/z_en_ba.c | 18 +++---- src/overlays/actors/ovl_En_Bb/z_en_bb.c | 18 +++---- .../actors/ovl_En_Bdfire/z_en_bdfire.c | 18 +++---- .../actors/ovl_En_Bigokuta/z_en_bigokuta.c | 18 +++---- src/overlays/actors/ovl_En_Bili/z_en_bili.c | 18 +++---- src/overlays/actors/ovl_En_Bird/z_en_bird.c | 18 +++---- .../actors/ovl_En_Blkobj/z_en_blkobj.c | 18 +++---- src/overlays/actors/ovl_En_Bom/z_en_bom.c | 18 +++---- .../ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c | 18 +++---- .../ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c | 18 +++---- .../actors/ovl_En_Bom_Chu/z_en_bom_chu.c | 18 +++---- src/overlays/actors/ovl_En_Bombf/z_en_bombf.c | 18 +++---- src/overlays/actors/ovl_En_Boom/z_en_boom.c | 18 +++---- src/overlays/actors/ovl_En_Box/z_en_box.c | 18 +++---- src/overlays/actors/ovl_En_Brob/z_en_brob.c | 18 +++---- .../actors/ovl_En_Bubble/z_en_bubble.c | 18 +++---- src/overlays/actors/ovl_En_Butte/z_en_butte.c | 18 +++---- src/overlays/actors/ovl_En_Bw/z_en_bw.c | 18 +++---- src/overlays/actors/ovl_En_Bx/z_en_bx.c | 18 +++---- .../actors/ovl_En_Changer/z_en_changer.c | 18 +++---- .../actors/ovl_En_Clear_Tag/z_en_clear_tag.c | 18 +++---- src/overlays/actors/ovl_En_Cow/z_en_cow.c | 18 +++---- src/overlays/actors/ovl_En_Crow/z_en_crow.c | 18 +++---- src/overlays/actors/ovl_En_Cs/z_en_cs.c | 18 +++---- src/overlays/actors/ovl_En_Daiku/z_en_daiku.c | 18 +++---- .../z_en_daiku_kakariko.c | 18 +++---- .../actors/ovl_En_Dekubaba/z_en_dekubaba.c | 18 +++---- .../actors/ovl_En_Dekunuts/z_en_dekunuts.c | 18 +++---- src/overlays/actors/ovl_En_Dh/z_en_dh.c | 18 +++---- src/overlays/actors/ovl_En_Dha/z_en_dha.c | 18 +++---- .../ovl_En_Diving_Game/z_en_diving_game.c | 18 +++---- src/overlays/actors/ovl_En_Dns/z_en_dns.c | 18 +++---- .../actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c | 18 +++---- .../actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c | 18 +++---- .../actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c | 18 +++---- .../actors/ovl_En_Dodojr/z_en_dodojr.c | 18 +++---- .../actors/ovl_En_Dodongo/z_en_dodongo.c | 18 +++---- src/overlays/actors/ovl_En_Dog/z_en_dog.c | 18 +++---- src/overlays/actors/ovl_En_Door/z_en_door.c | 18 +++---- src/overlays/actors/ovl_En_Ds/z_en_ds.c | 18 +++---- src/overlays/actors/ovl_En_Du/z_en_du.c | 18 +++---- .../actors/ovl_En_Dy_Extra/z_en_dy_extra.c | 18 +++---- src/overlays/actors/ovl_En_Eg/z_en_eg.c | 18 +++---- src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c | 18 +++---- src/overlays/actors/ovl_En_Elf/z_en_elf.c | 18 +++---- .../actors/ovl_En_Encount1/z_en_encount1.c | 18 +++---- .../actors/ovl_En_Encount2/z_en_encount2.c | 18 +++---- .../actors/ovl_En_Ex_Item/z_en_ex_item.c | 18 +++---- .../actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c | 18 +++---- src/overlays/actors/ovl_En_Fd/z_en_fd.c | 18 +++---- .../actors/ovl_En_Fd_Fire/z_en_fd_fire.c | 18 +++---- .../actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c | 18 +++---- .../actors/ovl_En_Fire_Rock/z_en_fire_rock.c | 18 +++---- .../actors/ovl_En_Firefly/z_en_firefly.c | 18 +++---- src/overlays/actors/ovl_En_Fish/z_en_fish.c | 18 +++---- .../actors/ovl_En_Floormas/z_en_floormas.c | 18 +++---- src/overlays/actors/ovl_En_Fr/z_en_fr.c | 18 +++---- src/overlays/actors/ovl_En_Fu/z_en_fu.c | 18 +++---- src/overlays/actors/ovl_En_Fw/z_en_fw.c | 18 +++---- src/overlays/actors/ovl_En_Fz/z_en_fz.c | 18 +++---- .../actors/ovl_En_G_Switch/z_en_g_switch.c | 18 +++---- .../ovl_En_Ganon_Mant/z_en_ganon_mant.c | 18 +++---- .../ovl_En_Ganon_Organ/z_en_ganon_organ.c | 18 +++---- src/overlays/actors/ovl_En_Gb/z_en_gb.c | 18 +++---- src/overlays/actors/ovl_En_Ge1/z_en_ge1.c | 18 +++---- src/overlays/actors/ovl_En_Ge2/z_en_ge2.c | 18 +++---- src/overlays/actors/ovl_En_Ge3/z_en_ge3.c | 18 +++---- src/overlays/actors/ovl_En_GeldB/z_en_geldb.c | 18 +++---- src/overlays/actors/ovl_En_GirlA/z_en_girla.c | 18 +++---- src/overlays/actors/ovl_En_Gm/z_en_gm.c | 18 +++---- src/overlays/actors/ovl_En_Go/z_en_go.c | 18 +++---- src/overlays/actors/ovl_En_Go2/z_en_go2.c | 18 +++---- src/overlays/actors/ovl_En_Goma/z_en_goma.c | 18 +++---- .../actors/ovl_En_Goroiwa/z_en_goroiwa.c | 18 +++---- src/overlays/actors/ovl_En_Gs/z_en_gs.c | 18 +++---- src/overlays/actors/ovl_En_Guest/z_en_guest.c | 18 +++---- src/overlays/actors/ovl_En_Hata/z_en_hata.c | 18 +++---- .../actors/ovl_En_Heishi1/z_en_heishi1.c | 18 +++---- .../actors/ovl_En_Heishi2/z_en_heishi2.c | 18 +++---- .../actors/ovl_En_Heishi3/z_en_heishi3.c | 18 +++---- .../actors/ovl_En_Heishi4/z_en_heishi4.c | 18 +++---- .../actors/ovl_En_Hintnuts/z_en_hintnuts.c | 18 +++---- src/overlays/actors/ovl_En_Holl/z_en_holl.c | 18 +++---- .../actors/ovl_En_Honotrap/z_en_honotrap.c | 18 +++---- src/overlays/actors/ovl_En_Horse/z_en_horse.c | 18 +++---- .../z_en_horse_game_check.c | 18 +++---- .../ovl_En_Horse_Ganon/z_en_horse_ganon.c | 18 +++---- .../z_en_horse_link_child.c | 18 +++---- .../ovl_En_Horse_Normal/z_en_horse_normal.c | 18 +++---- .../ovl_En_Horse_Zelda/z_en_horse_zelda.c | 18 +++---- src/overlays/actors/ovl_En_Hs/z_en_hs.c | 18 +++---- src/overlays/actors/ovl_En_Hs2/z_en_hs2.c | 18 +++---- src/overlays/actors/ovl_En_Hy/z_en_hy.c | 18 +++---- .../actors/ovl_En_Ice_Hono/z_en_ice_hono.c | 18 +++---- src/overlays/actors/ovl_En_Ik/z_en_ik.c | 18 +++---- src/overlays/actors/ovl_En_In/z_en_in.c | 18 +++---- .../actors/ovl_En_Insect/z_en_insect.c | 18 +++---- src/overlays/actors/ovl_En_Ishi/z_en_ishi.c | 18 +++---- src/overlays/actors/ovl_En_It/z_en_it.c | 18 +++---- src/overlays/actors/ovl_En_Jj/z_en_jj.c | 18 +++---- src/overlays/actors/ovl_En_Js/z_en_js.c | 18 +++---- .../actors/ovl_En_Jsjutan/z_en_jsjutan.c | 18 +++---- .../actors/ovl_En_Kakasi/z_en_kakasi.c | 18 +++---- .../actors/ovl_En_Kakasi2/z_en_kakasi2.c | 18 +++---- .../actors/ovl_En_Kakasi3/z_en_kakasi3.c | 18 +++---- .../actors/ovl_En_Kanban/z_en_kanban.c | 18 +++---- .../actors/ovl_En_Karebaba/z_en_karebaba.c | 18 +++---- src/overlays/actors/ovl_En_Ko/z_en_ko.c | 18 +++---- src/overlays/actors/ovl_En_Kusa/z_en_kusa.c | 18 +++---- src/overlays/actors/ovl_En_Kz/z_en_kz.c | 18 +++---- src/overlays/actors/ovl_En_Light/z_en_light.c | 18 +++---- .../actors/ovl_En_Lightbox/z_en_lightbox.c | 18 +++---- .../actors/ovl_En_M_Fire1/z_en_m_fire1.c | 18 +++---- .../actors/ovl_En_M_Thunder/z_en_m_thunder.c | 18 +++---- src/overlays/actors/ovl_En_Ma1/z_en_ma1.c | 18 +++---- src/overlays/actors/ovl_En_Ma2/z_en_ma2.c | 18 +++---- src/overlays/actors/ovl_En_Ma3/z_en_ma3.c | 18 +++---- src/overlays/actors/ovl_En_Mag/z_en_mag.c | 18 +++---- src/overlays/actors/ovl_En_Mb/z_en_mb.c | 18 +++---- src/overlays/actors/ovl_En_Md/z_en_md.c | 18 +++---- src/overlays/actors/ovl_En_Mk/z_en_mk.c | 18 +++---- src/overlays/actors/ovl_En_Mm/z_en_mm.c | 18 +++---- src/overlays/actors/ovl_En_Mm2/z_en_mm2.c | 18 +++---- src/overlays/actors/ovl_En_Ms/z_en_ms.c | 18 +++---- src/overlays/actors/ovl_En_Mu/z_en_mu.c | 18 +++---- src/overlays/actors/ovl_En_Nb/z_en_nb.c | 18 +++---- src/overlays/actors/ovl_En_Niw/z_en_niw.c | 18 +++---- .../actors/ovl_En_Niw_Girl/z_en_niw_girl.c | 18 +++---- .../actors/ovl_En_Niw_Lady/z_en_niw_lady.c | 18 +++---- .../actors/ovl_En_Nutsball/z_en_nutsball.c | 18 +++---- src/overlays/actors/ovl_En_Nwc/z_en_nwc.c | 18 +++---- src/overlays/actors/ovl_En_Ny/z_en_ny.c | 18 +++---- src/overlays/actors/ovl_En_OE2/z_en_oe2.c | 18 +++---- .../z_en_okarina_effect.c | 18 +++---- .../ovl_En_Okarina_Tag/z_en_okarina_tag.c | 18 +++---- src/overlays/actors/ovl_En_Okuta/z_en_okuta.c | 18 +++---- src/overlays/actors/ovl_En_Ossan/z_en_ossan.c | 18 +++---- src/overlays/actors/ovl_En_Owl/z_en_owl.c | 18 +++---- src/overlays/actors/ovl_En_Part/z_en_part.c | 18 +++---- .../actors/ovl_En_Peehat/z_en_peehat.c | 18 +++---- .../actors/ovl_En_Po_Desert/z_en_po_desert.c | 18 +++---- .../actors/ovl_En_Po_Field/z_en_po_field.c | 18 +++---- .../actors/ovl_En_Po_Relay/z_en_po_relay.c | 18 +++---- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 18 +++---- src/overlays/actors/ovl_En_Poh/z_en_poh.c | 18 +++---- .../actors/ovl_En_Pu_box/z_en_pu_box.c | 18 +++---- src/overlays/actors/ovl_En_Rd/z_en_rd.c | 18 +++---- src/overlays/actors/ovl_En_Reeba/z_en_reeba.c | 18 +++---- .../ovl_En_River_Sound/z_en_river_sound.c | 18 +++---- src/overlays/actors/ovl_En_Rl/z_en_rl.c | 18 +++---- src/overlays/actors/ovl_En_Rr/z_en_rr.c | 18 +++---- src/overlays/actors/ovl_En_Ru1/z_en_ru1.c | 18 +++---- src/overlays/actors/ovl_En_Ru2/z_en_ru2.c | 18 +++---- src/overlays/actors/ovl_En_Sa/z_en_sa.c | 18 +++---- src/overlays/actors/ovl_En_Sb/z_en_sb.c | 18 +++---- .../ovl_En_Scene_Change/z_en_scene_change.c | 18 +++---- src/overlays/actors/ovl_En_Sda/z_en_sda.c | 18 +++---- .../actors/ovl_En_Shopnuts/z_en_shopnuts.c | 18 +++---- src/overlays/actors/ovl_En_Si/z_en_si.c | 18 +++---- .../actors/ovl_En_Siofuki/z_en_siofuki.c | 18 +++---- src/overlays/actors/ovl_En_Skb/z_en_skb.c | 18 +++---- src/overlays/actors/ovl_En_Skj/z_en_skj.c | 18 +++---- .../actors/ovl_En_Skjneedle/z_en_skjneedle.c | 18 +++---- src/overlays/actors/ovl_En_Ssh/z_en_ssh.c | 18 +++---- src/overlays/actors/ovl_En_St/z_en_st.c | 18 +++---- src/overlays/actors/ovl_En_Sth/z_en_sth.c | 18 +++---- .../actors/ovl_En_Stream/z_en_stream.c | 18 +++---- src/overlays/actors/ovl_En_Sw/z_en_sw.c | 18 +++---- .../ovl_En_Syateki_Itm/z_en_syateki_itm.c | 18 +++---- .../ovl_En_Syateki_Man/z_en_syateki_man.c | 18 +++---- .../ovl_En_Syateki_Niw/z_en_syateki_niw.c | 18 +++---- src/overlays/actors/ovl_En_Ta/z_en_ta.c | 18 +++---- .../ovl_En_Takara_Man/z_en_takara_man.c | 18 +++---- src/overlays/actors/ovl_En_Tana/z_en_tana.c | 18 +++---- src/overlays/actors/ovl_En_Test/z_en_test.c | 18 +++---- src/overlays/actors/ovl_En_Tg/z_en_tg.c | 18 +++---- src/overlays/actors/ovl_En_Tite/z_en_tite.c | 18 +++---- src/overlays/actors/ovl_En_Tk/z_en_tk.c | 18 +++---- src/overlays/actors/ovl_En_Torch/z_en_torch.c | 18 +++---- .../actors/ovl_En_Torch2/z_en_torch2.c | 18 +++---- src/overlays/actors/ovl_En_Toryo/z_en_toryo.c | 18 +++---- src/overlays/actors/ovl_En_Tp/z_en_tp.c | 18 +++---- src/overlays/actors/ovl_En_Tr/z_en_tr.c | 18 +++---- src/overlays/actors/ovl_En_Trap/z_en_trap.c | 18 +++---- .../actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c | 18 +++---- src/overlays/actors/ovl_En_Vali/z_en_vali.c | 18 +++---- src/overlays/actors/ovl_En_Vase/z_en_vase.c | 18 +++---- .../actors/ovl_En_Vb_Ball/z_en_vb_ball.c | 18 +++---- .../actors/ovl_En_Viewer/z_en_viewer.c | 18 +++---- src/overlays/actors/ovl_En_Vm/z_en_vm.c | 18 +++---- .../actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c | 18 +++---- .../actors/ovl_En_Wallmas/z_en_wallmas.c | 18 +++---- .../ovl_En_Weather_Tag/z_en_weather_tag.c | 18 +++---- .../actors/ovl_En_Weiyer/z_en_weiyer.c | 18 +++---- src/overlays/actors/ovl_En_Wf/z_en_wf.c | 18 +++---- .../ovl_En_Wonder_Item/z_en_wonder_item.c | 18 +++---- .../ovl_En_Wonder_Talk/z_en_wonder_talk.c | 18 +++---- .../ovl_En_Wonder_Talk2/z_en_wonder_talk2.c | 18 +++---- .../actors/ovl_En_Wood02/z_en_wood02.c | 18 +++---- src/overlays/actors/ovl_En_Xc/z_en_xc.c | 18 +++---- .../ovl_En_Yabusame_Mark/z_en_yabusame_mark.c | 18 +++---- .../actors/ovl_En_Yukabyun/z_en_yukabyun.c | 18 +++---- src/overlays/actors/ovl_En_Zf/z_en_zf.c | 18 +++---- src/overlays/actors/ovl_En_Zl1/z_en_zl1.c | 18 +++---- src/overlays/actors/ovl_En_Zl2/z_en_zl2.c | 18 +++---- src/overlays/actors/ovl_En_Zl3/z_en_zl3.c | 18 +++---- src/overlays/actors/ovl_En_Zl4/z_en_zl4.c | 18 +++---- src/overlays/actors/ovl_En_Zo/z_en_zo.c | 18 +++---- src/overlays/actors/ovl_En_fHG/z_en_fhg.c | 18 +++---- .../actors/ovl_End_Title/z_end_title.c | 18 +++---- src/overlays/actors/ovl_Fishing/z_fishing.c | 18 +++---- .../actors/ovl_Item_B_Heart/z_item_b_heart.c | 18 +++---- .../ovl_Item_Etcetera/z_item_etcetera.c | 18 +++---- .../actors/ovl_Item_Inbox/z_item_inbox.c | 18 +++---- .../actors/ovl_Item_Ocarina/z_item_ocarina.c | 18 +++---- .../actors/ovl_Item_Shield/z_item_shield.c | 18 +++---- .../actors/ovl_Magic_Dark/z_magic_dark.c | 18 +++---- .../actors/ovl_Magic_Fire/z_magic_fire.c | 18 +++---- .../actors/ovl_Magic_Wind/z_magic_wind.c | 18 +++---- src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c | 18 +++---- src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c | 18 +++---- .../ovl_Obj_Blockstop/z_obj_blockstop.c | 18 +++---- .../actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c | 18 +++---- src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c | 18 +++---- .../actors/ovl_Obj_Dekujr/z_obj_dekujr.c | 18 +++---- .../actors/ovl_Obj_Elevator/z_obj_elevator.c | 18 +++---- .../actors/ovl_Obj_Hamishi/z_obj_hamishi.c | 18 +++---- src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c | 18 +++---- .../actors/ovl_Obj_Hsblock/z_obj_hsblock.c | 18 +++---- .../actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c | 18 +++---- .../actors/ovl_Obj_Kibako/z_obj_kibako.c | 18 +++---- .../actors/ovl_Obj_Kibako2/z_obj_kibako2.c | 18 +++---- src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c | 18 +++---- .../ovl_Obj_Lightswitch/z_obj_lightswitch.c | 18 +++---- .../ovl_Obj_Makekinsuta/z_obj_makekinsuta.c | 18 +++---- .../ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c | 12 +++-- src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c | 18 +++---- .../actors/ovl_Obj_Mure2/z_obj_mure2.c | 18 +++---- .../actors/ovl_Obj_Mure3/z_obj_mure3.c | 18 +++---- .../actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c | 18 +++---- .../ovl_Obj_Roomtimer/z_obj_roomtimer.c | 18 +++---- .../actors/ovl_Obj_Switch/z_obj_switch.c | 18 +++---- .../actors/ovl_Obj_Syokudai/z_obj_syokudai.c | 18 +++---- .../ovl_Obj_Timeblock/z_obj_timeblock.c | 18 +++---- .../actors/ovl_Obj_Tsubo/z_obj_tsubo.c | 18 +++---- .../ovl_Obj_Warp2block/z_obj_warp2block.c | 18 +++---- .../ovl_Object_Kankyo/z_object_kankyo.c | 18 +++---- .../actors/ovl_Oceff_Spot/z_oceff_spot.c | 18 +++---- .../actors/ovl_Oceff_Storm/z_oceff_storm.c | 18 +++---- .../actors/ovl_Oceff_Wipe/z_oceff_wipe.c | 18 +++---- .../actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c | 18 +++---- .../actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c | 18 +++---- .../actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c | 18 +++---- src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c | 18 +++---- 431 files changed, 3899 insertions(+), 3893 deletions(-) diff --git a/docs/tutorial/beginning_decomp.md b/docs/tutorial/beginning_decomp.md index 9aaf9d4402..b5c5e85067 100644 --- a/docs/tutorial/beginning_decomp.md +++ b/docs/tutorial/beginning_decomp.md @@ -638,19 +638,19 @@ void func_80A87F44(Actor* thisx, PlayState* play); void func_80A87BEC(EnJj* this, PlayState* play); void func_80A87C30(EnJj* this, PlayState* play); -/* +#if 0 ActorInit En_Jj_InitVars = { - ACTOR_EN_JJ, - ACTORTYPE_ITEMACTION, - FLAGS, - OBJECT_JJ, - sizeof(EnJj), - (ActorFunc)EnJj_Init, - (ActorFunc)EnJj_Destroy, - (ActorFunc)EnJj_Update, - (ActorFunc)EnJj_Draw, + /**/ ACTOR_EN_JJ, + /**/ ACTORTYPE_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_JJ, + /**/ sizeof(EnJj), + /**/ EnJj_Init, + /**/ EnJj_Destroy, + /**/ EnJj_Update, + /**/ EnJj_Draw, }; -*/ +#endif extern ColliderCylinderInit D_80A88CB4; // static ColliderCylinderInit sCylinderInit = { diff --git a/docs/tutorial/data.md b/docs/tutorial/data.md index 9b6cfeb1ba..69b04c782d 100644 --- a/docs/tutorial/data.md +++ b/docs/tutorial/data.md @@ -94,15 +94,15 @@ s32 D_80B18910[] = { 0x0A000039, 0x20010000, 0x00000000, 0x00000000, 0x00000000, s32 D_80B1893C[] = { 0x00000000, 0x00000000, 0xFF000000 }; ActorInit En_Tg_InitVars = { - ACTOR_EN_TG, - ACTORTYPE_NPC, - FLAGS, - OBJECT_MU, - sizeof(EnTg), - (ActorFunc)EnTg_Init, - (ActorFunc)EnTg_Destroy, - (ActorFunc)EnTg_Update, - (ActorFunc)EnTg_Draw, + /**/ ACTOR_EN_TG, + /**/ ACTORTYPE_NPC, + /**/ FLAGS, + /**/ OBJECT_MU, + /**/ sizeof(EnTg), + /**/ EnTg_Init, + /**/ EnTg_Destroy, + /**/ EnTg_Update, + /**/ EnTg_Draw, }; s32 D_80B18968[] = { 0x00000000, 0x44480000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }; @@ -490,15 +490,15 @@ To replace the `extern`, because the data is in a separate file, we include the Lastly, uncomment the InitVars block that's been sitting there the whole time. The data section of the file now looks like ```C ActorInit En_Jj_InitVars = { - ACTOR_EN_JJ, - ACTORTYPE_ITEMACTION, - FLAGS, - OBJECT_JJ, - sizeof(EnJj), - (ActorFunc)EnJj_Init, - (ActorFunc)EnJj_Destroy, - (ActorFunc)EnJj_Update, - (ActorFunc)EnJj_Draw, + /**/ ACTOR_EN_JJ, + /**/ ACTORTYPE_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_JJ, + /**/ sizeof(EnJj), + /**/ EnJj_Init, + /**/ EnJj_Destroy, + /**/ EnJj_Update, + /**/ EnJj_Draw, }; #include "en_jj_cutscene_data.c" EARLY @@ -567,15 +567,15 @@ Notice that the numbers in the bottom pane is all shifted one word to the left. ```C ActorInit En_Jj_InitVars = { - ACTOR_EN_JJ, - ACTORTYPE_ITEMACTION, - FLAGS, - OBJECT_JJ, - sizeof(EnJj), - (ActorFunc)EnJj_Init, - (ActorFunc)EnJj_Destroy, - (ActorFunc)EnJj_Update, - (ActorFunc)EnJj_Draw, + /**/ ACTOR_EN_JJ, + /**/ ACTORTYPE_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_JJ, + /**/ sizeof(EnJj), + /**/ EnJj_Init, + /**/ EnJj_Destroy, + /**/ EnJj_Update, + /**/ EnJj_Draw, }; s32 usused = 0; diff --git a/src/code/z_en_a_keep.c b/src/code/z_en_a_keep.c index 572479dc71..d0b0508682 100644 --- a/src/code/z_en_a_keep.c +++ b/src/code/z_en_a_keep.c @@ -21,15 +21,15 @@ void EnAObj_SetupBoulderFragment(EnAObj* this, s16 type); void EnAObj_SetupBlock(EnAObj* this, s16 type); ActorInit En_A_Obj_InitVars = { - ACTOR_EN_A_OBJ, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnAObj), - (ActorFunc)EnAObj_Init, - (ActorFunc)EnAObj_Destroy, - (ActorFunc)EnAObj_Update, - (ActorFunc)EnAObj_Draw, + /**/ ACTOR_EN_A_OBJ, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnAObj), + /**/ EnAObj_Init, + /**/ EnAObj_Destroy, + /**/ EnAObj_Update, + /**/ EnAObj_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index b7b9e79cd6..6854649092 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -21,15 +21,15 @@ void EnItem00_DrawHeartContainer(EnItem00* this, PlayState* play); void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play); ActorInit En_Item00_InitVars = { - ACTOR_EN_ITEM00, - ACTORCAT_MISC, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnItem00), - (ActorFunc)EnItem00_Init, - (ActorFunc)EnItem00_Destroy, - (ActorFunc)EnItem00_Update, - (ActorFunc)EnItem00_Draw, + /**/ ACTOR_EN_ITEM00, + /**/ ACTORCAT_MISC, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnItem00), + /**/ EnItem00_Init, + /**/ EnItem00_Destroy, + /**/ EnItem00_Update, + /**/ EnItem00_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/code/z_player_call.c b/src/code/z_player_call.c index 0063298fac..1eb12319ca 100644 --- a/src/code/z_player_call.c +++ b/src/code/z_player_call.c @@ -18,15 +18,15 @@ void Player_Update(Actor* thisx, PlayState* play); void Player_Draw(Actor* thisx, PlayState* play); ActorInit Player_InitVars = { - ACTOR_PLAYER, - ACTORCAT_PLAYER, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(Player), - (ActorFunc)PlayerCall_Init, - (ActorFunc)PlayerCall_Destroy, - (ActorFunc)PlayerCall_Update, - (ActorFunc)PlayerCall_Draw, + /**/ ACTOR_PLAYER, + /**/ ACTORCAT_PLAYER, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(Player), + /**/ PlayerCall_Init, + /**/ PlayerCall_Destroy, + /**/ PlayerCall_Update, + /**/ PlayerCall_Draw, }; void PlayerCall_InitFuncPtrs(void) { diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index a26f027ca6..b7739f9211 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -12,15 +12,15 @@ void ArmsHook_Wait(ArmsHook* this, PlayState* play); void ArmsHook_Shoot(ArmsHook* this, PlayState* play); ActorInit Arms_Hook_InitVars = { - ACTOR_ARMS_HOOK, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_LINK_BOY, - sizeof(ArmsHook), - (ActorFunc)ArmsHook_Init, - (ActorFunc)ArmsHook_Destroy, - (ActorFunc)ArmsHook_Update, - (ActorFunc)ArmsHook_Draw, + /**/ ACTOR_ARMS_HOOK, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_LINK_BOY, + /**/ sizeof(ArmsHook), + /**/ ArmsHook_Init, + /**/ ArmsHook_Destroy, + /**/ ArmsHook_Update, + /**/ ArmsHook_Draw, }; static ColliderQuadInit sQuadInit = { diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index 22352d1272..b097c9d6d7 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -21,15 +21,15 @@ void ArrowFire_Hit(ArrowFire* this, PlayState* play); #include "assets/overlays/ovl_Arrow_Fire/ovl_Arrow_Fire.c" ActorInit Arrow_Fire_InitVars = { - ACTOR_ARROW_FIRE, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ArrowFire), - (ActorFunc)ArrowFire_Init, - (ActorFunc)ArrowFire_Destroy, - (ActorFunc)ArrowFire_Update, - (ActorFunc)ArrowFire_Draw, + /**/ ACTOR_ARROW_FIRE, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ArrowFire), + /**/ ArrowFire_Init, + /**/ ArrowFire_Destroy, + /**/ ArrowFire_Update, + /**/ ArrowFire_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index 9ce2322060..aa35287aaf 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -22,15 +22,15 @@ void ArrowIce_Hit(ArrowIce* this, PlayState* play); #include "assets/overlays/ovl_Arrow_Ice/ovl_Arrow_Ice.c" ActorInit Arrow_Ice_InitVars = { - ACTOR_ARROW_ICE, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ArrowIce), - (ActorFunc)ArrowIce_Init, - (ActorFunc)ArrowIce_Destroy, - (ActorFunc)ArrowIce_Update, - (ActorFunc)ArrowIce_Draw, + /**/ ACTOR_ARROW_ICE, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ArrowIce), + /**/ ArrowIce_Init, + /**/ ArrowIce_Destroy, + /**/ ArrowIce_Update, + /**/ ArrowIce_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index b0bd02d3e2..babc9b1482 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -22,15 +22,15 @@ void ArrowLight_Hit(ArrowLight* this, PlayState* play); #include "assets/overlays/ovl_Arrow_Light/ovl_Arrow_Light.c" ActorInit Arrow_Light_InitVars = { - ACTOR_ARROW_LIGHT, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ArrowLight), - (ActorFunc)ArrowLight_Init, - (ActorFunc)ArrowLight_Destroy, - (ActorFunc)ArrowLight_Update, - (ActorFunc)ArrowLight_Draw, + /**/ ACTOR_ARROW_LIGHT, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ArrowLight), + /**/ ArrowLight_Init, + /**/ ArrowLight_Destroy, + /**/ ArrowLight_Update, + /**/ ArrowLight_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c index 9fd2979cad..b7e09c1b8e 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c +++ b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c @@ -33,15 +33,15 @@ void func_8086CB10(BgBdanObjects* this, PlayState* play); void func_8086CB8C(BgBdanObjects* this, PlayState* play); ActorInit Bg_Bdan_Objects_InitVars = { - ACTOR_BG_BDAN_OBJECTS, - ACTORCAT_BG, - FLAGS, - OBJECT_BDAN_OBJECTS, - sizeof(BgBdanObjects), - (ActorFunc)BgBdanObjects_Init, - (ActorFunc)BgBdanObjects_Destroy, - (ActorFunc)BgBdanObjects_Update, - (ActorFunc)BgBdanObjects_Draw, + /**/ ACTOR_BG_BDAN_OBJECTS, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_BDAN_OBJECTS, + /**/ sizeof(BgBdanObjects), + /**/ BgBdanObjects_Init, + /**/ BgBdanObjects_Destroy, + /**/ BgBdanObjects_Update, + /**/ BgBdanObjects_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c index 2c4588726a..3e1df35363 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c +++ b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c @@ -43,15 +43,15 @@ void func_8086DDA8(BgBdanSwitch* this); void func_8086DDC0(BgBdanSwitch* this, PlayState* play); ActorInit Bg_Bdan_Switch_InitVars = { - ACTOR_BG_BDAN_SWITCH, - ACTORCAT_SWITCH, - FLAGS, - OBJECT_BDAN_OBJECTS, - sizeof(BgBdanSwitch), - (ActorFunc)BgBdanSwitch_Init, - (ActorFunc)BgBdanSwitch_Destroy, - (ActorFunc)BgBdanSwitch_Update, - (ActorFunc)BgBdanSwitch_Draw, + /**/ ACTOR_BG_BDAN_SWITCH, + /**/ ACTORCAT_SWITCH, + /**/ FLAGS, + /**/ OBJECT_BDAN_OBJECTS, + /**/ sizeof(BgBdanSwitch), + /**/ BgBdanSwitch_Init, + /**/ BgBdanSwitch_Destroy, + /**/ BgBdanSwitch_Update, + /**/ BgBdanSwitch_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[] = { diff --git a/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c b/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c index 553caaeb7f..02c08a6583 100644 --- a/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c +++ b/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c @@ -18,15 +18,15 @@ void BgBomGuard_Update(Actor* thisx, PlayState* play); void func_8086E638(BgBomGuard* this, PlayState* play); ActorInit Bg_Bom_Guard_InitVars = { - ACTOR_BG_BOM_GUARD, - ACTORCAT_PROP, - FLAGS, - OBJECT_BOWL, - sizeof(BgBomGuard), - (ActorFunc)BgBomGuard_Init, - (ActorFunc)BgBomGuard_Destroy, - (ActorFunc)BgBomGuard_Update, - NULL, + /**/ ACTOR_BG_BOM_GUARD, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_BOWL, + /**/ sizeof(BgBomGuard), + /**/ BgBomGuard_Init, + /**/ BgBomGuard_Destroy, + /**/ BgBomGuard_Update, + /**/ NULL, }; void BgBomGuard_SetupAction(BgBomGuard* this, BgBomGuardActionFunc actionFunc) { diff --git a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c index f30d3ba3d5..977d4ed242 100644 --- a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c @@ -70,15 +70,15 @@ static ColliderTrisInit sTrisInit = { }; ActorInit Bg_Bombwall_InitVars = { - ACTOR_BG_BOMBWALL, - ACTORCAT_BG, - FLAGS, - OBJECT_GAMEPLAY_FIELD_KEEP, - sizeof(BgBombwall), - (ActorFunc)BgBombwall_Init, - (ActorFunc)BgBombwall_Destroy, - (ActorFunc)BgBombwall_Update, - (ActorFunc)BgBombwall_Draw, + /**/ ACTOR_BG_BOMBWALL, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_FIELD_KEEP, + /**/ sizeof(BgBombwall), + /**/ BgBombwall_Init, + /**/ BgBombwall_Destroy, + /**/ BgBombwall_Update, + /**/ BgBombwall_Draw, }; void BgBombwall_InitDynapoly(BgBombwall* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c b/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c index 20fe8e79e7..e520fa8bc0 100644 --- a/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c +++ b/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c @@ -25,15 +25,15 @@ void BgBowlWall_FinishFall(BgBowlWall* this, PlayState* play); void BgBowlWall_Reset(BgBowlWall* this, PlayState* play); ActorInit Bg_Bowl_Wall_InitVars = { - ACTOR_BG_BOWL_WALL, - ACTORCAT_PROP, - FLAGS, - OBJECT_BOWL, - sizeof(BgBowlWall), - (ActorFunc)BgBowlWall_Init, - (ActorFunc)BgBowlWall_Destroy, - (ActorFunc)BgBowlWall_Update, - (ActorFunc)BgBowlWall_Draw, + /**/ ACTOR_BG_BOWL_WALL, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_BOWL, + /**/ sizeof(BgBowlWall), + /**/ BgBowlWall_Init, + /**/ BgBowlWall_Destroy, + /**/ BgBowlWall_Update, + /**/ BgBowlWall_Draw, }; static Vec3f sBullseyeOffset[] = { diff --git a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c index d8ba3b2ee4..488213514a 100644 --- a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c +++ b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c @@ -27,15 +27,15 @@ void BgBreakwall_Wait(BgBreakwall* this, PlayState* play); void BgBreakwall_LavaCoverMove(BgBreakwall* this, PlayState* play); ActorInit Bg_Breakwall_InitVars = { - ACTOR_BG_BREAKWALL, - ACTORCAT_BG, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(BgBreakwall), - (ActorFunc)BgBreakwall_Init, - (ActorFunc)BgBreakwall_Destroy, - (ActorFunc)BgBreakwall_Update, - NULL, + /**/ ACTOR_BG_BREAKWALL, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(BgBreakwall), + /**/ BgBreakwall_Init, + /**/ BgBreakwall_Destroy, + /**/ BgBreakwall_Update, + /**/ NULL, }; static ColliderQuadInit sQuadInit = { diff --git a/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c b/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c index f639cc9cf9..cf0746a99a 100644 --- a/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c +++ b/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c @@ -18,15 +18,15 @@ void BgDdanJd_Idle(BgDdanJd* this, PlayState* play); void BgDdanJd_Move(BgDdanJd* this, PlayState* play); ActorInit Bg_Ddan_Jd_InitVars = { - ACTOR_BG_DDAN_JD, - ACTORCAT_BG, - FLAGS, - OBJECT_DDAN_OBJECTS, - sizeof(BgDdanJd), - (ActorFunc)BgDdanJd_Init, - (ActorFunc)BgDdanJd_Destroy, - (ActorFunc)BgDdanJd_Update, - (ActorFunc)BgDdanJd_Draw, + /**/ ACTOR_BG_DDAN_JD, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_DDAN_OBJECTS, + /**/ sizeof(BgDdanJd), + /**/ BgDdanJd_Init, + /**/ BgDdanJd_Destroy, + /**/ BgDdanJd_Update, + /**/ BgDdanJd_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c b/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c index f742cdef4b..1475685947 100644 --- a/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c +++ b/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c @@ -19,15 +19,15 @@ void BgDdanKd_LowerStairs(BgDdanKd* this, PlayState* play); void BgDdanKd_DoNothing(BgDdanKd* this, PlayState* play); ActorInit Bg_Ddan_Kd_InitVars = { - ACTOR_BG_DDAN_KD, - ACTORCAT_BG, - FLAGS, - OBJECT_DDAN_OBJECTS, - sizeof(BgDdanKd), - (ActorFunc)BgDdanKd_Init, - (ActorFunc)BgDdanKd_Destroy, - (ActorFunc)BgDdanKd_Update, - (ActorFunc)BgDdanKd_Draw, + /**/ ACTOR_BG_DDAN_KD, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_DDAN_OBJECTS, + /**/ sizeof(BgDdanKd), + /**/ BgDdanKd_Init, + /**/ BgDdanKd_Destroy, + /**/ BgDdanKd_Update, + /**/ BgDdanKd_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c index cde4e34349..3a9a74178f 100644 --- a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c +++ b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c @@ -21,15 +21,15 @@ void BgDodoago_DoNothing(BgDodoago* this, PlayState* play); void BgDodoago_LightOneEye(BgDodoago* this, PlayState* play); ActorInit Bg_Dodoago_InitVars = { - ACTOR_BG_DODOAGO, - ACTORCAT_BG, - FLAGS, - OBJECT_DDAN_OBJECTS, - sizeof(BgDodoago), - (ActorFunc)BgDodoago_Init, - (ActorFunc)BgDodoago_Destroy, - (ActorFunc)BgDodoago_Update, - (ActorFunc)BgDodoago_Draw, + /**/ ACTOR_BG_DODOAGO, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_DDAN_OBJECTS, + /**/ sizeof(BgDodoago), + /**/ BgDodoago_Init, + /**/ BgDodoago_Destroy, + /**/ BgDodoago_Update, + /**/ BgDodoago_Draw, }; static ColliderCylinderInit sColCylinderInitMain = { diff --git a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c index 0259fbfd65..e180a135cd 100644 --- a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c +++ b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c @@ -55,15 +55,15 @@ void BgDyYoseizo_DrawEffects(BgDyYoseizo* this, PlayState* play); static s32 sUnusedGetItemIds[] = { GI_FARORES_WIND, GI_NAYRUS_LOVE, GI_DINS_FIRE }; ActorInit Bg_Dy_Yoseizo_InitVars = { - ACTOR_BG_DY_YOSEIZO, - ACTORCAT_PROP, - FLAGS, - OBJECT_DY_OBJ, - sizeof(BgDyYoseizo), - (ActorFunc)BgDyYoseizo_Init, - (ActorFunc)BgDyYoseizo_Destroy, - (ActorFunc)BgDyYoseizo_Update, - NULL, + /**/ ACTOR_BG_DY_YOSEIZO, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_DY_OBJ, + /**/ sizeof(BgDyYoseizo), + /**/ BgDyYoseizo_Init, + /**/ BgDyYoseizo_Destroy, + /**/ BgDyYoseizo_Update, + /**/ NULL, }; void BgDyYoseizo_Init(Actor* thisx, PlayState* play2) { diff --git a/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c b/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c index 5d0ec3550c..de5ec8a245 100644 --- a/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c +++ b/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c @@ -26,15 +26,15 @@ void BgGanonOtyuka_Fall(BgGanonOtyuka* this, PlayState* play); void BgGanonOtyuka_DoNothing(Actor* thisx, PlayState* play); ActorInit Bg_Ganon_Otyuka_InitVars = { - ACTOR_BG_GANON_OTYUKA, - ACTORCAT_PROP, - FLAGS, - OBJECT_GANON, - sizeof(BgGanonOtyuka), - (ActorFunc)BgGanonOtyuka_Init, - (ActorFunc)BgGanonOtyuka_Destroy, - (ActorFunc)BgGanonOtyuka_Update, - (ActorFunc)BgGanonOtyuka_Draw, + /**/ ACTOR_BG_GANON_OTYUKA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GANON, + /**/ sizeof(BgGanonOtyuka), + /**/ BgGanonOtyuka_Init, + /**/ BgGanonOtyuka_Destroy, + /**/ BgGanonOtyuka_Update, + /**/ BgGanonOtyuka_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c index ae3ead0668..db78ead589 100644 --- a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c +++ b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c @@ -21,15 +21,15 @@ void func_808783AC(BgGateShutter* this, PlayState* play); void func_808783D4(BgGateShutter* this, PlayState* play); ActorInit Bg_Gate_Shutter_InitVars = { - ACTOR_BG_GATE_SHUTTER, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_SPOT01_MATOYAB, - sizeof(BgGateShutter), - (ActorFunc)BgGateShutter_Init, - (ActorFunc)BgGateShutter_Destroy, - (ActorFunc)BgGateShutter_Update, - (ActorFunc)BgGateShutter_Draw, + /**/ ACTOR_BG_GATE_SHUTTER, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_SPOT01_MATOYAB, + /**/ sizeof(BgGateShutter), + /**/ BgGateShutter_Init, + /**/ BgGateShutter_Destroy, + /**/ BgGateShutter_Update, + /**/ BgGateShutter_Draw, }; void BgGateShutter_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c index 76d1ae2eda..4da5de52b4 100644 --- a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c +++ b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c @@ -20,15 +20,15 @@ void BgGjyoBridge_TriggerCutscene(BgGjyoBridge* this, PlayState* play); void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, PlayState* play); ActorInit Bg_Gjyo_Bridge_InitVars = { - ACTOR_BG_GJYO_BRIDGE, - ACTORCAT_PROP, - FLAGS, - OBJECT_GJYO_OBJECTS, - sizeof(BgGjyoBridge), - (ActorFunc)BgGjyoBridge_Init, - (ActorFunc)BgGjyoBridge_Destroy, - (ActorFunc)BgGjyoBridge_Update, - (ActorFunc)BgGjyoBridge_Draw, + /**/ ACTOR_BG_GJYO_BRIDGE, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GJYO_OBJECTS, + /**/ sizeof(BgGjyoBridge), + /**/ BgGjyoBridge_Init, + /**/ BgGjyoBridge_Destroy, + /**/ BgGjyoBridge_Update, + /**/ BgGjyoBridge_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c index 4f405b6890..da1e50e89a 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c @@ -22,15 +22,15 @@ void BgGndDarkmeiro_UpdateStaticBlock(BgGndDarkmeiro* this, PlayState* play); void BgGndDarkmeiro_UpdateSwitchBlock(BgGndDarkmeiro* this, PlayState* play); ActorInit Bg_Gnd_Darkmeiro_InitVars = { - ACTOR_BG_GND_DARKMEIRO, - ACTORCAT_PROP, - FLAGS, - OBJECT_DEMO_KEKKAI, - sizeof(BgGndDarkmeiro), - (ActorFunc)BgGndDarkmeiro_Init, - (ActorFunc)BgGndDarkmeiro_Destroy, - (ActorFunc)BgGndDarkmeiro_Update, - NULL, + /**/ ACTOR_BG_GND_DARKMEIRO, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_DEMO_KEKKAI, + /**/ sizeof(BgGndDarkmeiro), + /**/ BgGndDarkmeiro_Init, + /**/ BgGndDarkmeiro_Destroy, + /**/ BgGndDarkmeiro_Update, + /**/ NULL, }; void BgGndDarkmeiro_ToggleBlock(BgGndDarkmeiro* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c index d8b5a08358..887069d904 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c @@ -19,15 +19,15 @@ void BgGndFiremeiro_Shake(BgGndFiremeiro* this, PlayState* play); void BgGndFiremeiro_Rise(BgGndFiremeiro* this, PlayState* play); ActorInit Bg_Gnd_Firemeiro_InitVars = { - ACTOR_BG_GND_FIREMEIRO, - ACTORCAT_PROP, - FLAGS, - OBJECT_DEMO_KEKKAI, - sizeof(BgGndFiremeiro), - (ActorFunc)BgGndFiremeiro_Init, - (ActorFunc)BgGndFiremeiro_Destroy, - (ActorFunc)BgGndFiremeiro_Update, - (ActorFunc)BgGndFiremeiro_Draw, + /**/ ACTOR_BG_GND_FIREMEIRO, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_DEMO_KEKKAI, + /**/ sizeof(BgGndFiremeiro), + /**/ BgGndFiremeiro_Init, + /**/ BgGndFiremeiro_Destroy, + /**/ BgGndFiremeiro_Update, + /**/ BgGndFiremeiro_Draw, }; void BgGndFiremeiro_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c index cb7c0bd637..2f347fada9 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c @@ -24,15 +24,15 @@ void BgGndIceblock_Idle(BgGndIceblock* this, PlayState* play); void BgGndIceblock_Slide(BgGndIceblock* this, PlayState* play); ActorInit Bg_Gnd_Iceblock_InitVars = { - ACTOR_BG_GND_ICEBLOCK, - ACTORCAT_PROP, - FLAGS, - OBJECT_DEMO_KEKKAI, - sizeof(BgGndIceblock), - (ActorFunc)BgGndIceblock_Init, - (ActorFunc)BgGndIceblock_Destroy, - (ActorFunc)BgGndIceblock_Update, - (ActorFunc)BgGndIceblock_Draw, + /**/ ACTOR_BG_GND_ICEBLOCK, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_DEMO_KEKKAI, + /**/ sizeof(BgGndIceblock), + /**/ BgGndIceblock_Init, + /**/ BgGndIceblock_Destroy, + /**/ BgGndIceblock_Update, + /**/ BgGndIceblock_Draw, }; static Color_RGBA8 sWhite = { 250, 250, 250, 255 }; diff --git a/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c b/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c index 03a18e9fa8..8b3c4a2225 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c @@ -15,15 +15,15 @@ void BgGndNisekabe_Update(Actor* thisx, PlayState* play); void BgGndNisekabe_Draw(Actor* thisx, PlayState* play); ActorInit Bg_Gnd_Nisekabe_InitVars = { - ACTOR_BG_GND_NISEKABE, - ACTORCAT_PROP, - FLAGS, - OBJECT_DEMO_KEKKAI, - sizeof(BgGndNisekabe), - (ActorFunc)BgGndNisekabe_Init, - (ActorFunc)BgGndNisekabe_Destroy, - (ActorFunc)BgGndNisekabe_Update, - (ActorFunc)BgGndNisekabe_Draw, + /**/ ACTOR_BG_GND_NISEKABE, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_DEMO_KEKKAI, + /**/ sizeof(BgGndNisekabe), + /**/ BgGndNisekabe_Init, + /**/ BgGndNisekabe_Destroy, + /**/ BgGndNisekabe_Update, + /**/ BgGndNisekabe_Draw, }; void BgGndNisekabe_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c index 40f8f46bba..7117441684 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c @@ -20,15 +20,15 @@ void func_8087B284(BgGndSoulmeiro* this, PlayState* play); void func_8087B350(BgGndSoulmeiro* this, PlayState* play); ActorInit Bg_Gnd_Soulmeiro_InitVars = { - ACTOR_BG_GND_SOULMEIRO, - ACTORCAT_PROP, - FLAGS, - OBJECT_DEMO_KEKKAI, - sizeof(BgGndSoulmeiro), - (ActorFunc)BgGndSoulmeiro_Init, - (ActorFunc)BgGndSoulmeiro_Destroy, - (ActorFunc)BgGndSoulmeiro_Update, - (ActorFunc)BgGndSoulmeiro_Draw, + /**/ ACTOR_BG_GND_SOULMEIRO, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_DEMO_KEKKAI, + /**/ sizeof(BgGndSoulmeiro), + /**/ BgGndSoulmeiro_Init, + /**/ BgGndSoulmeiro_Destroy, + /**/ BgGndSoulmeiro_Update, + /**/ BgGndSoulmeiro_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c index 51eedf4ed5..ed5ae96a02 100644 --- a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c +++ b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c @@ -21,15 +21,15 @@ void func_8087BAAC(BgHaka* this, PlayState* play); void func_8087BAE4(BgHaka* this, PlayState* play); ActorInit Bg_Haka_InitVars = { - ACTOR_BG_HAKA, - ACTORCAT_BG, - FLAGS, - OBJECT_HAKA, - sizeof(BgHaka), - (ActorFunc)BgHaka_Init, - (ActorFunc)BgHaka_Destroy, - (ActorFunc)BgHaka_Update, - (ActorFunc)BgHaka_Draw, + /**/ ACTOR_BG_HAKA, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HAKA, + /**/ sizeof(BgHaka), + /**/ BgHaka_Init, + /**/ BgHaka_Destroy, + /**/ BgHaka_Update, + /**/ BgHaka_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c index 3fd2d74262..3723864815 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c +++ b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c @@ -53,15 +53,15 @@ static f32 sStatueDistToPlayer = 0; static s16 sStatueRotY; ActorInit Bg_Haka_Gate_InitVars = { - ACTOR_BG_HAKA_GATE, - ACTORCAT_PROP, - FLAGS, - OBJECT_HAKA_OBJECTS, - sizeof(BgHakaGate), - (ActorFunc)BgHakaGate_Init, - (ActorFunc)BgHakaGate_Destroy, - (ActorFunc)BgHakaGate_Update, - (ActorFunc)BgHakaGate_Draw, + /**/ ACTOR_BG_HAKA_GATE, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_HAKA_OBJECTS, + /**/ sizeof(BgHakaGate), + /**/ BgHakaGate_Init, + /**/ BgHakaGate_Destroy, + /**/ BgHakaGate_Update, + /**/ BgHakaGate_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c b/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c index f6a92dfa1b..b1d38adc98 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c +++ b/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c @@ -25,15 +25,15 @@ void func_8087D720(BgHakaHuta* this, PlayState* play); void BgHakaHuta_DoNothing(BgHakaHuta* this, PlayState* play); ActorInit Bg_Haka_Huta_InitVars = { - ACTOR_BG_HAKA_HUTA, - ACTORCAT_BG, - FLAGS, - OBJECT_HAKACH_OBJECTS, - sizeof(BgHakaHuta), - (ActorFunc)BgHakaHuta_Init, - (ActorFunc)BgHakaHuta_Destroy, - (ActorFunc)BgHakaHuta_Update, - (ActorFunc)BgHakaHuta_Draw, + /**/ ACTOR_BG_HAKA_HUTA, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HAKACH_OBJECTS, + /**/ sizeof(BgHakaHuta), + /**/ BgHakaHuta_Init, + /**/ BgHakaHuta_Destroy, + /**/ BgHakaHuta_Update, + /**/ BgHakaHuta_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c index e734780de7..44690a3765 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c +++ b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c @@ -20,15 +20,15 @@ void func_8087DBF0(BgHakaMegane* this, PlayState* play); void BgHakaMegane_DoNothing(BgHakaMegane* this, PlayState* play); ActorInit Bg_Haka_Megane_InitVars = { - ACTOR_BG_HAKA_MEGANE, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(BgHakaMegane), - (ActorFunc)BgHakaMegane_Init, - (ActorFunc)BgHakaMegane_Destroy, - (ActorFunc)BgHakaMegane_Update, - NULL, + /**/ ACTOR_BG_HAKA_MEGANE, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(BgHakaMegane), + /**/ BgHakaMegane_Init, + /**/ BgHakaMegane_Destroy, + /**/ BgHakaMegane_Update, + /**/ NULL, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c b/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c index c01870f197..2295326c56 100644 --- a/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c +++ b/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c @@ -24,15 +24,15 @@ void func_8087E2D8(BgHakaMeganeBG* this, PlayState* play); void func_8087E34C(BgHakaMeganeBG* this, PlayState* play); ActorInit Bg_Haka_MeganeBG_InitVars = { - ACTOR_BG_HAKA_MEGANEBG, - ACTORCAT_BG, - FLAGS, - OBJECT_HAKA_OBJECTS, - sizeof(BgHakaMeganeBG), - (ActorFunc)BgHakaMeganeBG_Init, - (ActorFunc)BgHakaMeganeBG_Destroy, - (ActorFunc)BgHakaMeganeBG_Update, - (ActorFunc)BgHakaMeganeBG_Draw, + /**/ ACTOR_BG_HAKA_MEGANEBG, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HAKA_OBJECTS, + /**/ sizeof(BgHakaMeganeBG), + /**/ BgHakaMeganeBG_Init, + /**/ BgHakaMeganeBG_Destroy, + /**/ BgHakaMeganeBG_Update, + /**/ BgHakaMeganeBG_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c index 9dcf1f52c7..d59affce0a 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c +++ b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c @@ -27,15 +27,15 @@ void BgHakaSgami_SetupSpin(BgHakaSgami* this, PlayState* play); void BgHakaSgami_Spin(BgHakaSgami* this, PlayState* play); ActorInit Bg_Haka_Sgami_InitVars = { - ACTOR_BG_HAKA_SGAMI, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(BgHakaSgami), - (ActorFunc)BgHakaSgami_Init, - (ActorFunc)BgHakaSgami_Destroy, - (ActorFunc)BgHakaSgami_Update, - NULL, + /**/ ACTOR_BG_HAKA_SGAMI, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(BgHakaSgami), + /**/ BgHakaSgami_Init, + /**/ BgHakaSgami_Destroy, + /**/ BgHakaSgami_Update, + /**/ NULL, }; static ColliderTrisElementInit sTrisElementsInit[4] = { diff --git a/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c b/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c index 1a0650e419..73a8dfe02e 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c +++ b/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c @@ -22,15 +22,15 @@ void BgHakaShip_CrashShake(BgHakaShip* this, PlayState* play); void BgHakaShip_CrashFall(BgHakaShip* this, PlayState* play); ActorInit Bg_Haka_Ship_InitVars = { - ACTOR_BG_HAKA_SHIP, - ACTORCAT_BG, - FLAGS, - OBJECT_HAKA_OBJECTS, - sizeof(BgHakaShip), - (ActorFunc)BgHakaShip_Init, - (ActorFunc)BgHakaShip_Destroy, - (ActorFunc)BgHakaShip_Update, - (ActorFunc)BgHakaShip_Draw, + /**/ ACTOR_BG_HAKA_SHIP, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HAKA_OBJECTS, + /**/ sizeof(BgHakaShip), + /**/ BgHakaShip_Init, + /**/ BgHakaShip_Destroy, + /**/ BgHakaShip_Update, + /**/ BgHakaShip_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c b/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c index 6c302d9a6c..50fe918853 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c +++ b/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c @@ -30,15 +30,15 @@ void func_80880D68(BgHakaTrap* this); static UNK_TYPE D_80880F30 = 0; ActorInit Bg_Haka_Trap_InitVars = { - ACTOR_BG_HAKA_TRAP, - ACTORCAT_BG, - FLAGS, - OBJECT_HAKA_OBJECTS, - sizeof(BgHakaTrap), - (ActorFunc)BgHakaTrap_Init, - (ActorFunc)BgHakaTrap_Destroy, - (ActorFunc)BgHakaTrap_Update, - (ActorFunc)BgHakaTrap_Draw, + /**/ ACTOR_BG_HAKA_TRAP, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HAKA_OBJECTS, + /**/ sizeof(BgHakaTrap), + /**/ BgHakaTrap_Init, + /**/ BgHakaTrap_Destroy, + /**/ BgHakaTrap_Update, + /**/ BgHakaTrap_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c index 0ebe93a549..d586e4981b 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c +++ b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c @@ -19,15 +19,15 @@ void BgHakaTubo_Idle(BgHakaTubo* this, PlayState* play); void BgHakaTubo_DropCollectible(BgHakaTubo* this, PlayState* play); ActorInit Bg_Haka_Tubo_InitVars = { - ACTOR_BG_HAKA_TUBO, - ACTORCAT_BG, - FLAGS, - OBJECT_HAKA_OBJECTS, - sizeof(BgHakaTubo), - (ActorFunc)BgHakaTubo_Init, - (ActorFunc)BgHakaTubo_Destroy, - (ActorFunc)BgHakaTubo_Update, - (ActorFunc)BgHakaTubo_Draw, + /**/ ACTOR_BG_HAKA_TUBO, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HAKA_OBJECTS, + /**/ sizeof(BgHakaTubo), + /**/ BgHakaTubo_Init, + /**/ BgHakaTubo_Destroy, + /**/ BgHakaTubo_Update, + /**/ BgHakaTubo_Draw, }; static ColliderCylinderInit sPotColliderInit = { diff --git a/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c b/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c index 15c90afd04..69c3b950fe 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c +++ b/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c @@ -19,15 +19,15 @@ void BgHakaWater_Wait(BgHakaWater* this, PlayState* play); void BgHakaWater_ChangeWaterLevel(BgHakaWater* this, PlayState* play); ActorInit Bg_Haka_Water_InitVars = { - ACTOR_BG_HAKA_WATER, - ACTORCAT_PROP, - FLAGS, - OBJECT_HAKACH_OBJECTS, - sizeof(BgHakaWater), - (ActorFunc)BgHakaWater_Init, - (ActorFunc)BgHakaWater_Destroy, - (ActorFunc)BgHakaWater_Update, - (ActorFunc)BgHakaWater_Draw, + /**/ ACTOR_BG_HAKA_WATER, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_HAKACH_OBJECTS, + /**/ sizeof(BgHakaWater), + /**/ BgHakaWater_Init, + /**/ BgHakaWater_Destroy, + /**/ BgHakaWater_Update, + /**/ BgHakaWater_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c b/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c index bccdea961a..cab46b4461 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c +++ b/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c @@ -55,15 +55,15 @@ static ColliderCylinderInit sCylinderInit = { static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f }; ActorInit Bg_Haka_Zou_InitVars = { - ACTOR_BG_HAKA_ZOU, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(BgHakaZou), - (ActorFunc)BgHakaZou_Init, - (ActorFunc)BgHakaZou_Destroy, - (ActorFunc)BgHakaZou_Update, - NULL, + /**/ ACTOR_BG_HAKA_ZOU, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(BgHakaZou), + /**/ BgHakaZou_Init, + /**/ BgHakaZou_Destroy, + /**/ BgHakaZou_Update, + /**/ NULL, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c index b4b2d981de..9567084e7d 100644 --- a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c +++ b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c @@ -28,15 +28,15 @@ void BgHeavyBlock_Land(BgHeavyBlock* this, PlayState* play); void BgHeavyBlock_DoNothing(BgHeavyBlock* this, PlayState* play); ActorInit Bg_Heavy_Block_InitVars = { - ACTOR_BG_HEAVY_BLOCK, - ACTORCAT_BG, - FLAGS, - OBJECT_HEAVY_OBJECT, - sizeof(BgHeavyBlock), - (ActorFunc)BgHeavyBlock_Init, - (ActorFunc)BgHeavyBlock_Destroy, - (ActorFunc)BgHeavyBlock_Update, - (ActorFunc)BgHeavyBlock_Draw, + /**/ ACTOR_BG_HEAVY_BLOCK, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HEAVY_OBJECT, + /**/ sizeof(BgHeavyBlock), + /**/ BgHeavyBlock_Init, + /**/ BgHeavyBlock_Destroy, + /**/ BgHeavyBlock_Update, + /**/ BgHeavyBlock_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c index 7e8bb5db70..d7df9bd1ea 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c @@ -54,15 +54,15 @@ static CollisionCheckInfoInit sCcInfoInit = { 1, 80, 100, MASS_IMMOVABLE }; static BgHidanCurtainParams sHCParams[] = { { 81, 144, 0.090f, 144.0f, 5.0f }, { 46, 88, 0.055f, 88.0f, 3.0f } }; ActorInit Bg_Hidan_Curtain_InitVars = { - ACTOR_BG_HIDAN_CURTAIN, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(BgHidanCurtain), - (ActorFunc)BgHidanCurtain_Init, - (ActorFunc)BgHidanCurtain_Destroy, - (ActorFunc)BgHidanCurtain_Update, - (ActorFunc)BgHidanCurtain_Draw, + /**/ ACTOR_BG_HIDAN_CURTAIN, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(BgHidanCurtain), + /**/ BgHidanCurtain_Init, + /**/ BgHidanCurtain_Destroy, + /**/ BgHidanCurtain_Update, + /**/ BgHidanCurtain_Draw, }; void BgHidanCurtain_Init(Actor* thisx, PlayState* play) { 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 3334c9d96b..9083889ad0 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 @@ -18,15 +18,15 @@ void BgHidanDalm_Wait(BgHidanDalm* this, PlayState* play); void BgHidanDalm_Shrink(BgHidanDalm* this, PlayState* play); ActorInit Bg_Hidan_Dalm_InitVars = { - ACTOR_BG_HIDAN_DALM, - ACTORCAT_BG, - FLAGS, - OBJECT_HIDAN_OBJECTS, - sizeof(BgHidanDalm), - (ActorFunc)BgHidanDalm_Init, - (ActorFunc)BgHidanDalm_Destroy, - (ActorFunc)BgHidanDalm_Update, - (ActorFunc)BgHidanDalm_Draw, + /**/ ACTOR_BG_HIDAN_DALM, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HIDAN_OBJECTS, + /**/ sizeof(BgHidanDalm), + /**/ BgHidanDalm_Init, + /**/ BgHidanDalm_Destroy, + /**/ BgHidanDalm_Update, + /**/ BgHidanDalm_Draw, }; static ColliderTrisElementInit sTrisElementInit[4] = { 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 07a2906cc0..97fb32ad00 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 @@ -22,15 +22,15 @@ void BgHidanFirewall_Collide(BgHidanFirewall* this, PlayState* play); void BgHidanFirewall_ColliderFollowPlayer(BgHidanFirewall* this, PlayState* play); ActorInit Bg_Hidan_Firewall_InitVars = { - ACTOR_BG_HIDAN_FIREWALL, - ACTORCAT_BG, - FLAGS, - OBJECT_HIDAN_OBJECTS, - sizeof(BgHidanFirewall), - (ActorFunc)BgHidanFirewall_Init, - (ActorFunc)BgHidanFirewall_Destroy, - (ActorFunc)BgHidanFirewall_Update, - NULL, + /**/ ACTOR_BG_HIDAN_FIREWALL, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HIDAN_OBJECTS, + /**/ sizeof(BgHidanFirewall), + /**/ BgHidanFirewall_Init, + /**/ BgHidanFirewall_Destroy, + /**/ BgHidanFirewall_Update, + /**/ NULL, }; static ColliderCylinderInit sCylinderInit = { 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 ce713369c2..ea606ec2ab 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 @@ -19,15 +19,15 @@ void func_8088706C(BgHidanFslift* this, PlayState* play); void func_808870D8(BgHidanFslift* this, PlayState* play); ActorInit Bg_Hidan_Fslift_InitVars = { - ACTOR_BG_HIDAN_FSLIFT, - ACTORCAT_BG, - FLAGS, - OBJECT_HIDAN_OBJECTS, - sizeof(BgHidanFslift), - (ActorFunc)BgHidanFslift_Init, - (ActorFunc)BgHidanFslift_Destroy, - (ActorFunc)BgHidanFslift_Update, - (ActorFunc)BgHidanFslift_Draw, + /**/ ACTOR_BG_HIDAN_FSLIFT, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HIDAN_OBJECTS, + /**/ sizeof(BgHidanFslift), + /**/ BgHidanFslift_Init, + /**/ BgHidanFslift_Destroy, + /**/ BgHidanFslift_Update, + /**/ BgHidanFslift_Draw, }; static InitChainEntry sInitChain[] = { 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 b39e3c1d2e..dd2604b7fe 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 @@ -32,15 +32,15 @@ void BgHidanFwbig_WaitForPlayer(BgHidanFwbig* this, PlayState* play); void BgHidanFwbig_Move(BgHidanFwbig* this, PlayState* play); ActorInit Bg_Hidan_Fwbig_InitVars = { - ACTOR_BG_HIDAN_FWBIG, - ACTORCAT_PROP, - FLAGS, - OBJECT_HIDAN_OBJECTS, - sizeof(BgHidanFwbig), - (ActorFunc)BgHidanFwbig_Init, - (ActorFunc)BgHidanFwbig_Destroy, - (ActorFunc)BgHidanFwbig_Update, - (ActorFunc)BgHidanFwbig_Draw, + /**/ ACTOR_BG_HIDAN_FWBIG, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_HIDAN_OBJECTS, + /**/ sizeof(BgHidanFwbig), + /**/ BgHidanFwbig_Init, + /**/ BgHidanFwbig_Destroy, + /**/ BgHidanFwbig_Update, + /**/ BgHidanFwbig_Draw, }; static ColliderCylinderInit sCylinderInit = { 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 76a9fe86ed..5ca7e0fcb1 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 @@ -64,15 +64,15 @@ static ColliderTrisInit sTrisInit = { }; ActorInit Bg_Hidan_Hamstep_InitVars = { - ACTOR_BG_HIDAN_HAMSTEP, - ACTORCAT_BG, - FLAGS, - OBJECT_HIDAN_OBJECTS, - sizeof(BgHidanHamstep), - (ActorFunc)BgHidanHamstep_Init, - (ActorFunc)BgHidanHamstep_Destroy, - (ActorFunc)BgHidanHamstep_Update, - (ActorFunc)BgHidanHamstep_Draw, + /**/ ACTOR_BG_HIDAN_HAMSTEP, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HIDAN_OBJECTS, + /**/ sizeof(BgHidanHamstep), + /**/ BgHidanHamstep_Init, + /**/ BgHidanHamstep_Destroy, + /**/ BgHidanHamstep_Update, + /**/ BgHidanHamstep_Draw, }; static BgHidanHamstepActionFunc sActionFuncs[] = { 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 09ad896225..0d476066de 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 @@ -19,15 +19,15 @@ void func_808896B8(BgHidanHrock* this, PlayState* play); void func_808894A4(BgHidanHrock* this, PlayState* play); ActorInit Bg_Hidan_Hrock_InitVars = { - ACTOR_BG_HIDAN_HROCK, - ACTORCAT_BG, - FLAGS, - OBJECT_HIDAN_OBJECTS, - sizeof(BgHidanHrock), - (ActorFunc)BgHidanHrock_Init, - (ActorFunc)BgHidanHrock_Destroy, - (ActorFunc)BgHidanHrock_Update, - (ActorFunc)BgHidanHrock_Draw, + /**/ ACTOR_BG_HIDAN_HROCK, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HIDAN_OBJECTS, + /**/ sizeof(BgHidanHrock), + /**/ BgHidanHrock_Init, + /**/ BgHidanHrock_Destroy, + /**/ BgHidanHrock_Update, + /**/ BgHidanHrock_Draw, }; static ColliderTrisElementInit sTrisElementsInit[2] = { 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 6584633071..9aef156962 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 @@ -24,15 +24,15 @@ void func_80889D28(BgHidanKousi* this, PlayState* play); static f32 D_80889E40[] = { 120.0f, 150.0f, 150.0f }; ActorInit Bg_Hidan_Kousi_InitVars = { - ACTOR_BG_HIDAN_KOUSI, - ACTORCAT_PROP, - FLAGS, - OBJECT_HIDAN_OBJECTS, - sizeof(BgHidanKousi), - (ActorFunc)BgHidanKousi_Init, - (ActorFunc)BgHidanKousi_Destroy, - (ActorFunc)BgHidanKousi_Update, - (ActorFunc)BgHidanKousi_Draw, + /**/ ACTOR_BG_HIDAN_KOUSI, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_HIDAN_OBJECTS, + /**/ sizeof(BgHidanKousi), + /**/ BgHidanKousi_Init, + /**/ BgHidanKousi_Destroy, + /**/ BgHidanKousi_Update, + /**/ BgHidanKousi_Draw, }; static InitChainEntry sInitChain[] = { 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 c125b879a8..a85d00cae5 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 @@ -23,15 +23,15 @@ void BgHidanKowarerukabe_Update(Actor* thisx, PlayState* play); void BgHidanKowarerukabe_Draw(Actor* thisx, PlayState* play); ActorInit Bg_Hidan_Kowarerukabe_InitVars = { - ACTOR_BG_HIDAN_KOWARERUKABE, - ACTORCAT_BG, - FLAGS, - OBJECT_HIDAN_OBJECTS, - sizeof(BgHidanKowarerukabe), - (ActorFunc)BgHidanKowarerukabe_Init, - (ActorFunc)BgHidanKowarerukabe_Destroy, - (ActorFunc)BgHidanKowarerukabe_Update, - (ActorFunc)BgHidanKowarerukabe_Draw, + /**/ ACTOR_BG_HIDAN_KOWARERUKABE, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HIDAN_OBJECTS, + /**/ sizeof(BgHidanKowarerukabe), + /**/ BgHidanKowarerukabe_Init, + /**/ BgHidanKowarerukabe_Destroy, + /**/ BgHidanKowarerukabe_Update, + /**/ BgHidanKowarerukabe_Draw, }; static Gfx* sBreakableWallDLists[] = { 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 9522259a3f..0d06eadff4 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 @@ -30,15 +30,15 @@ void func_8088BC40(PlayState* play, BgHidanRock* this); static Vec3f D_8088BF60 = { 3310.0f, 120.0f, 0.0f }; ActorInit Bg_Hidan_Rock_InitVars = { - ACTOR_BG_HIDAN_ROCK, - ACTORCAT_BG, - FLAGS, - OBJECT_HIDAN_OBJECTS, - sizeof(BgHidanRock), - (ActorFunc)BgHidanRock_Init, - (ActorFunc)BgHidanRock_Destroy, - (ActorFunc)BgHidanRock_Update, - (ActorFunc)BgHidanRock_Draw, + /**/ ACTOR_BG_HIDAN_ROCK, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HIDAN_OBJECTS, + /**/ sizeof(BgHidanRock), + /**/ BgHidanRock_Init, + /**/ BgHidanRock_Destroy, + /**/ BgHidanRock_Update, + /**/ BgHidanRock_Draw, }; static ColliderCylinderInit sCylinderInit = { 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 e96e5e0237..2b45afac0f 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 @@ -15,15 +15,15 @@ void BgHidanRsekizou_Update(Actor* thisx, PlayState* play); void BgHidanRsekizou_Draw(Actor* thisx, PlayState* play); ActorInit Bg_Hidan_Rsekizou_InitVars = { - ACTOR_BG_HIDAN_RSEKIZOU, - ACTORCAT_BG, - FLAGS, - OBJECT_HIDAN_OBJECTS, - sizeof(BgHidanRsekizou), - (ActorFunc)BgHidanRsekizou_Init, - (ActorFunc)BgHidanRsekizou_Destroy, - (ActorFunc)BgHidanRsekizou_Update, - (ActorFunc)BgHidanRsekizou_Draw, + /**/ ACTOR_BG_HIDAN_RSEKIZOU, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HIDAN_OBJECTS, + /**/ sizeof(BgHidanRsekizou), + /**/ BgHidanRsekizou_Init, + /**/ BgHidanRsekizou_Destroy, + /**/ BgHidanRsekizou_Update, + /**/ BgHidanRsekizou_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[6] = { 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 6b27dbe371..2cbb720acd 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 @@ -18,15 +18,15 @@ void func_8088D434(BgHidanSekizou* this, PlayState* play); void func_8088D720(BgHidanSekizou* this, PlayState* play); ActorInit Bg_Hidan_Sekizou_InitVars = { - ACTOR_BG_HIDAN_SEKIZOU, - ACTORCAT_BG, - FLAGS, - OBJECT_HIDAN_OBJECTS, - sizeof(BgHidanSekizou), - (ActorFunc)BgHidanSekizou_Init, - (ActorFunc)BgHidanSekizou_Destroy, - (ActorFunc)BgHidanSekizou_Update, - (ActorFunc)BgHidanSekizou_Draw, + /**/ ACTOR_BG_HIDAN_SEKIZOU, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HIDAN_OBJECTS, + /**/ sizeof(BgHidanSekizou), + /**/ BgHidanSekizou_Init, + /**/ BgHidanSekizou_Destroy, + /**/ BgHidanSekizou_Update, + /**/ BgHidanSekizou_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[6] = { 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 19634df24c..bf1135aa96 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 @@ -22,15 +22,15 @@ void func_8088E7A8(BgHidanSima* this, PlayState* play); void func_8088E90C(BgHidanSima* this); ActorInit Bg_Hidan_Sima_InitVars = { - ACTOR_BG_HIDAN_SIMA, - ACTORCAT_BG, - FLAGS, - OBJECT_HIDAN_OBJECTS, - sizeof(BgHidanSima), - (ActorFunc)BgHidanSima_Init, - (ActorFunc)BgHidanSima_Destroy, - (ActorFunc)BgHidanSima_Update, - (ActorFunc)BgHidanSima_Draw, + /**/ ACTOR_BG_HIDAN_SIMA, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HIDAN_OBJECTS, + /**/ sizeof(BgHidanSima), + /**/ BgHidanSima_Init, + /**/ BgHidanSima_Destroy, + /**/ BgHidanSima_Update, + /**/ BgHidanSima_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[2] = { 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 6c6956b325..2992773fae 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 @@ -19,15 +19,15 @@ void func_8088F514(BgHidanSyoku* this, PlayState* play); void func_8088F62C(BgHidanSyoku* this, PlayState* play); ActorInit Bg_Hidan_Syoku_InitVars = { - ACTOR_BG_HIDAN_SYOKU, - ACTORCAT_BG, - FLAGS, - OBJECT_HIDAN_OBJECTS, - sizeof(BgHidanSyoku), - (ActorFunc)BgHidanSyoku_Init, - (ActorFunc)BgHidanSyoku_Destroy, - (ActorFunc)BgHidanSyoku_Update, - (ActorFunc)BgHidanSyoku_Draw, + /**/ ACTOR_BG_HIDAN_SYOKU, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HIDAN_OBJECTS, + /**/ sizeof(BgHidanSyoku), + /**/ BgHidanSyoku_Init, + /**/ BgHidanSyoku_Destroy, + /**/ BgHidanSyoku_Update, + /**/ BgHidanSyoku_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c index ea22bf32d0..56b3d62ad8 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c +++ b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c @@ -24,15 +24,15 @@ static Color_RGBA8 sGray = { 180, 180, 180, 255 }; static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f }; ActorInit Bg_Ice_Objects_InitVars = { - ACTOR_BG_ICE_OBJECTS, - ACTORCAT_PROP, - FLAGS, - OBJECT_ICE_OBJECTS, - sizeof(BgIceObjects), - (ActorFunc)BgIceObjects_Init, - (ActorFunc)BgIceObjects_Destroy, - (ActorFunc)BgIceObjects_Update, - (ActorFunc)BgIceObjects_Draw, + /**/ ACTOR_BG_ICE_OBJECTS, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_ICE_OBJECTS, + /**/ sizeof(BgIceObjects), + /**/ BgIceObjects_Init, + /**/ BgIceObjects_Destroy, + /**/ BgIceObjects_Update, + /**/ BgIceObjects_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c b/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c index 341611055d..46222872ff 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c +++ b/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c @@ -24,15 +24,15 @@ void BgIceShelter_Idle(BgIceShelter* this, PlayState* play); void BgIceShelter_Melt(BgIceShelter* this, PlayState* play); ActorInit Bg_Ice_Shelter_InitVars = { - ACTOR_BG_ICE_SHELTER, - ACTORCAT_BG, - FLAGS, - OBJECT_ICE_OBJECTS, - sizeof(BgIceShelter), - (ActorFunc)BgIceShelter_Init, - (ActorFunc)BgIceShelter_Destroy, - (ActorFunc)BgIceShelter_Update, - (ActorFunc)BgIceShelter_Draw, + /**/ ACTOR_BG_ICE_SHELTER, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_ICE_OBJECTS, + /**/ sizeof(BgIceShelter), + /**/ BgIceShelter_Init, + /**/ BgIceShelter_Destroy, + /**/ BgIceShelter_Update, + /**/ BgIceShelter_Draw, }; static f32 sRedIceScales[] = { 0.1f, 0.06f, 0.1f, 0.1f, 0.25f }; diff --git a/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c b/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c index a9aed60181..343b1250c0 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c +++ b/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c @@ -19,15 +19,15 @@ void func_80891D6C(BgIceShutter* this, PlayState* play); void func_80891DD4(BgIceShutter* this, PlayState* play); ActorInit Bg_Ice_Shutter_InitVars = { - ACTOR_BG_ICE_SHUTTER, - ACTORCAT_PROP, - FLAGS, - OBJECT_ICE_OBJECTS, - sizeof(BgIceShutter), - (ActorFunc)BgIceShutter_Init, - (ActorFunc)BgIceShutter_Destroy, - (ActorFunc)BgIceShutter_Update, - (ActorFunc)BgIceShutter_Draw, + /**/ ACTOR_BG_ICE_SHUTTER, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_ICE_OBJECTS, + /**/ sizeof(BgIceShutter), + /**/ BgIceShutter_Init, + /**/ BgIceShutter_Destroy, + /**/ BgIceShutter_Update, + /**/ BgIceShutter_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c index 150e4a2466..a69d5ecee7 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c +++ b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c @@ -41,15 +41,15 @@ static ColliderCylinderInit sCylinderInit = { }; ActorInit Bg_Ice_Turara_InitVars = { - ACTOR_BG_ICE_TURARA, - ACTORCAT_PROP, - FLAGS, - OBJECT_ICE_OBJECTS, - sizeof(BgIceTurara), - (ActorFunc)BgIceTurara_Init, - (ActorFunc)BgIceTurara_Destroy, - (ActorFunc)BgIceTurara_Update, - (ActorFunc)BgIceTurara_Draw, + /**/ ACTOR_BG_ICE_TURARA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_ICE_OBJECTS, + /**/ sizeof(BgIceTurara), + /**/ BgIceTurara_Init, + /**/ BgIceTurara_Destroy, + /**/ BgIceTurara_Update, + /**/ BgIceTurara_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c index 7f2d8a4904..41379fc56a 100644 --- a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c +++ b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c @@ -18,15 +18,15 @@ void func_80892890(BgInGate* this, PlayState* play); void BgInGate_DoNothing(BgInGate* this, PlayState* play); ActorInit Bg_Ingate_InitVars = { - ACTOR_BG_INGATE, - ACTORCAT_PROP, - FLAGS, - OBJECT_INGATE, - sizeof(BgInGate), - (ActorFunc)BgInGate_Init, - (ActorFunc)BgInGate_Destroy, - (ActorFunc)BgInGate_Update, - (ActorFunc)BgInGate_Draw, + /**/ ACTOR_BG_INGATE, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_INGATE, + /**/ sizeof(BgInGate), + /**/ BgInGate_Init, + /**/ BgInGate_Destroy, + /**/ BgInGate_Update, + /**/ BgInGate_Draw, }; void BgInGate_SetupAction(BgInGate* this, BgInGateActionFunc actionFunc) { diff --git a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c index e2289d09ca..32fc953c7a 100644 --- a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c +++ b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c @@ -26,15 +26,15 @@ void BgJya1flift_DelayMove(BgJya1flift* this, PlayState* play); static u8 sIsSpawned = false; ActorInit Bg_Jya_1flift_InitVars = { - ACTOR_BG_JYA_1FLIFT, - ACTORCAT_BG, - FLAGS, - OBJECT_JYA_OBJ, - sizeof(BgJya1flift), - (ActorFunc)BgJya1flift_Init, - (ActorFunc)BgJya1flift_Destroy, - (ActorFunc)BgJya1flift_Update, - (ActorFunc)BgJya1flift_Draw, + /**/ ACTOR_BG_JYA_1FLIFT, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_JYA_OBJ, + /**/ sizeof(BgJya1flift), + /**/ BgJya1flift_Init, + /**/ BgJya1flift_Destroy, + /**/ BgJya1flift_Update, + /**/ BgJya1flift_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c b/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c index 8ca9ee0292..c5f73e4107 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c +++ b/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c @@ -24,15 +24,15 @@ void func_808934FC(BgJyaAmishutter* this); void func_8089350C(BgJyaAmishutter* this); ActorInit Bg_Jya_Amishutter_InitVars = { - ACTOR_BG_JYA_AMISHUTTER, - ACTORCAT_BG, - FLAGS, - OBJECT_JYA_OBJ, - sizeof(BgJyaAmishutter), - (ActorFunc)BgJyaAmishutter_Init, - (ActorFunc)BgJyaAmishutter_Destroy, - (ActorFunc)BgJyaAmishutter_Update, - (ActorFunc)BgJyaAmishutter_Draw, + /**/ ACTOR_BG_JYA_AMISHUTTER, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_JYA_OBJ, + /**/ sizeof(BgJyaAmishutter), + /**/ BgJyaAmishutter_Init, + /**/ BgJyaAmishutter_Destroy, + /**/ BgJyaAmishutter_Update, + /**/ BgJyaAmishutter_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c b/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c index a5ca45520b..ee5050c95c 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c +++ b/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c @@ -17,15 +17,15 @@ void BgJyaBigmirror_Draw(Actor* thisx, PlayState* play); static u8 sIsSpawned = false; ActorInit Bg_Jya_Bigmirror_InitVars = { - ACTOR_BG_JYA_BIGMIRROR, - ACTORCAT_BG, - FLAGS, - OBJECT_JYA_OBJ, - sizeof(BgJyaBigmirror), - (ActorFunc)BgJyaBigmirror_Init, - (ActorFunc)BgJyaBigmirror_Destroy, - (ActorFunc)BgJyaBigmirror_Update, - (ActorFunc)BgJyaBigmirror_Draw, + /**/ ACTOR_BG_JYA_BIGMIRROR, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_JYA_OBJ, + /**/ sizeof(BgJyaBigmirror), + /**/ BgJyaBigmirror_Init, + /**/ BgJyaBigmirror_Destroy, + /**/ BgJyaBigmirror_Update, + /**/ BgJyaBigmirror_Draw, }; typedef struct { diff --git a/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c b/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c index 636d300721..3090b74ebf 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c +++ b/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c @@ -15,15 +15,15 @@ void BgJyaBlock_Update(Actor* thisx, PlayState* play); void BgJyaBlock_Draw(Actor* thisx, PlayState* play); ActorInit Bg_Jya_Block_InitVars = { - ACTOR_BG_JYA_BLOCK, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_DANGEON_KEEP, - sizeof(BgJyaBlock), - (ActorFunc)BgJyaBlock_Init, - (ActorFunc)BgJyaBlock_Destroy, - (ActorFunc)BgJyaBlock_Update, - (ActorFunc)BgJyaBlock_Draw, + /**/ ACTOR_BG_JYA_BLOCK, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_DANGEON_KEEP, + /**/ sizeof(BgJyaBlock), + /**/ BgJyaBlock_Init, + /**/ BgJyaBlock_Destroy, + /**/ BgJyaBlock_Update, + /**/ BgJyaBlock_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c index dba8eb937a..4137f799aa 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c +++ b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c @@ -15,15 +15,15 @@ void BgJyaBombchuiwa_CleanUpAfterExplosion(BgJyaBombchuiwa* this, PlayState* pla void BgJyaBombchuiwa_SpawnLightRay(BgJyaBombchuiwa* this, PlayState* play); ActorInit Bg_Jya_Bombchuiwa_InitVars = { - ACTOR_BG_JYA_BOMBCHUIWA, - ACTORCAT_BG, - FLAGS, - OBJECT_JYA_OBJ, - sizeof(BgJyaBombchuiwa), - (ActorFunc)BgJyaBombchuiwa_Init, - (ActorFunc)BgJyaBombchuiwa_Destroy, - (ActorFunc)BgJyaBombchuiwa_Update, - (ActorFunc)BgJyaBombchuiwa_Draw, + /**/ ACTOR_BG_JYA_BOMBCHUIWA, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_JYA_OBJ, + /**/ sizeof(BgJyaBombchuiwa), + /**/ BgJyaBombchuiwa_Init, + /**/ BgJyaBombchuiwa_Destroy, + /**/ BgJyaBombchuiwa_Update, + /**/ BgJyaBombchuiwa_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[1] = { diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c index 3b2e38c07f..c0d8a30658 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c +++ b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c @@ -17,15 +17,15 @@ void BgJyaBombiwa_Update(Actor* thisx, PlayState* play); void BgJyaBombiwa_Draw(Actor* thisx, PlayState* play); ActorInit Bg_Jya_Bombiwa_InitVars = { - ACTOR_BG_JYA_BOMBIWA, - ACTORCAT_BG, - FLAGS, - OBJECT_JYA_OBJ, - sizeof(BgJyaBombiwa), - (ActorFunc)BgJyaBombiwa_Init, - (ActorFunc)BgJyaBombiwa_Destroy, - (ActorFunc)BgJyaBombiwa_Update, - (ActorFunc)BgJyaBombiwa_Draw, + /**/ ACTOR_BG_JYA_BOMBIWA, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_JYA_OBJ, + /**/ sizeof(BgJyaBombiwa), + /**/ BgJyaBombiwa_Init, + /**/ BgJyaBombiwa_Destroy, + /**/ BgJyaBombiwa_Update, + /**/ BgJyaBombiwa_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[] = { diff --git a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c index f8a45cfc32..4cfbfe5578 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c +++ b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c @@ -19,15 +19,15 @@ void func_80896ABC(BgJyaCobra* this, PlayState* play); #include "assets/overlays/ovl_Bg_Jya_Cobra/ovl_Bg_Jya_Cobra.c" ActorInit Bg_Jya_Cobra_InitVars = { - ACTOR_BG_JYA_COBRA, - ACTORCAT_PROP, - FLAGS, - OBJECT_JYA_OBJ, - sizeof(BgJyaCobra), - (ActorFunc)BgJyaCobra_Init, - (ActorFunc)BgJyaCobra_Destroy, - (ActorFunc)BgJyaCobra_Update, - (ActorFunc)BgJyaCobra_Draw, + /**/ ACTOR_BG_JYA_COBRA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_JYA_OBJ, + /**/ sizeof(BgJyaCobra), + /**/ BgJyaCobra_Init, + /**/ BgJyaCobra_Destroy, + /**/ BgJyaCobra_Update, + /**/ BgJyaCobra_Draw, }; static s16 D_80897308[] = { 0, 0, 0, 0 }; diff --git a/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c b/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c index 6cf9c12f93..6fe12df585 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c +++ b/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c @@ -24,15 +24,15 @@ void BgJyaGoroiwa_UpdateRotation(BgJyaGoroiwa* this); void BgJyaGoroiwa_UpdateCollider(BgJyaGoroiwa* this); ActorInit Bg_Jya_Goroiwa_InitVars = { - ACTOR_BG_JYA_GOROIWA, - ACTORCAT_PROP, - FLAGS, - OBJECT_GOROIWA, - sizeof(BgJyaGoroiwa), - (ActorFunc)BgJyaGoroiwa_Init, - (ActorFunc)BgJyaGoroiwa_Destroy, - (ActorFunc)BgJyaGoroiwa_Update, - (ActorFunc)BgJyaGoroiwa_Draw, + /**/ ACTOR_BG_JYA_GOROIWA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GOROIWA, + /**/ sizeof(BgJyaGoroiwa), + /**/ BgJyaGoroiwa_Init, + /**/ BgJyaGoroiwa_Destroy, + /**/ BgJyaGoroiwa_Update, + /**/ BgJyaGoroiwa_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[] = { diff --git a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c index e426e77db9..a46f78272d 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c +++ b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c @@ -23,15 +23,15 @@ void BgJyaHaheniron_SetupRubbleCollide(BgJyaHaheniron* this); void BgJyaHaheniron_RubbleCollide(BgJyaHaheniron* this, PlayState* play); ActorInit Bg_Jya_Haheniron_InitVars = { - ACTOR_BG_JYA_HAHENIRON, - ACTORCAT_PROP, - FLAGS, - OBJECT_JYA_IRON, - sizeof(BgJyaHaheniron), - (ActorFunc)BgJyaHaheniron_Init, - (ActorFunc)BgJyaHaheniron_Destroy, - (ActorFunc)BgJyaHaheniron_Update, - (ActorFunc)BgJyaHaheniron_Draw, + /**/ ACTOR_BG_JYA_HAHENIRON, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_JYA_IRON, + /**/ sizeof(BgJyaHaheniron), + /**/ BgJyaHaheniron_Init, + /**/ BgJyaHaheniron_Destroy, + /**/ BgJyaHaheniron_Update, + /**/ BgJyaHaheniron_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[1] = { diff --git a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c index 94a6c0bcbd..516959e9df 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c +++ b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c @@ -25,15 +25,15 @@ void BgJyaIronobj_SpawnThroneParticles(BgJyaIronobj* this, PlayState* play, EnIk static int sUnused = 0; ActorInit Bg_Jya_Ironobj_InitVars = { - ACTOR_BG_JYA_IRONOBJ, - ACTORCAT_PROP, - FLAGS, - OBJECT_JYA_IRON, - sizeof(BgJyaIronobj), - (ActorFunc)BgJyaIronobj_Init, - (ActorFunc)BgJyaIronobj_Destroy, - (ActorFunc)BgJyaIronobj_Update, - (ActorFunc)BgJyaIronobj_Draw, + /**/ ACTOR_BG_JYA_IRONOBJ, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_JYA_IRON, + /**/ sizeof(BgJyaIronobj), + /**/ BgJyaIronobj_Init, + /**/ BgJyaIronobj_Destroy, + /**/ BgJyaIronobj_Update, + /**/ BgJyaIronobj_Draw, }; static Gfx* sOpaDL[] = { gPillarDL, gThroneDL }; diff --git a/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c b/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c index 3cf8ba1fb3..cc6a1fa9e0 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c +++ b/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c @@ -22,15 +22,15 @@ void func_80899950(BgJyaKanaami* this, PlayState* play); void func_80899A08(BgJyaKanaami* this); ActorInit Bg_Jya_Kanaami_InitVars = { - ACTOR_BG_JYA_KANAAMI, - ACTORCAT_BG, - FLAGS, - OBJECT_JYA_OBJ, - sizeof(BgJyaKanaami), - (ActorFunc)BgJyaKanaami_Init, - (ActorFunc)BgJyaKanaami_Destroy, - (ActorFunc)BgJyaKanaami_Update, - (ActorFunc)BgJyaKanaami_Draw, + /**/ ACTOR_BG_JYA_KANAAMI, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_JYA_OBJ, + /**/ sizeof(BgJyaKanaami), + /**/ BgJyaKanaami_Init, + /**/ BgJyaKanaami_Destroy, + /**/ BgJyaKanaami_Update, + /**/ BgJyaKanaami_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c index 644ed94784..ec5af7b350 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c +++ b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c @@ -23,15 +23,15 @@ void BgJyaLift_Move(BgJyaLift* this, PlayState* play); static s16 sIsSpawned = false; ActorInit Bg_Jya_Lift_InitVars = { - ACTOR_BG_JYA_LIFT, - ACTORCAT_BG, - FLAGS, - OBJECT_JYA_OBJ, - sizeof(BgJyaLift), - (ActorFunc)BgJyaLift_Init, - (ActorFunc)BgJyaLift_Destroy, - (ActorFunc)BgJyaLift_Update, - (ActorFunc)BgJyaLift_Draw, + /**/ ACTOR_BG_JYA_LIFT, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_JYA_OBJ, + /**/ sizeof(BgJyaLift), + /**/ BgJyaLift_Init, + /**/ BgJyaLift_Destroy, + /**/ BgJyaLift_Update, + /**/ BgJyaLift_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c index 9be8f9db1d..0f62263287 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c +++ b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c @@ -21,15 +21,15 @@ void BgJyaMegami_SetupExplode(BgJyaMegami* this); void BgJyaMegami_Explode(BgJyaMegami* this, PlayState* play); ActorInit Bg_Jya_Megami_InitVars = { - ACTOR_BG_JYA_MEGAMI, - ACTORCAT_BG, - FLAGS, - OBJECT_JYA_OBJ, - sizeof(BgJyaMegami), - (ActorFunc)BgJyaMegami_Init, - (ActorFunc)BgJyaMegami_Destroy, - (ActorFunc)BgJyaMegami_Update, - (ActorFunc)BgJyaMegami_Draw, + /**/ ACTOR_BG_JYA_MEGAMI, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_JYA_OBJ, + /**/ sizeof(BgJyaMegami), + /**/ BgJyaMegami_Init, + /**/ BgJyaMegami_Destroy, + /**/ BgJyaMegami_Update, + /**/ BgJyaMegami_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[] = { diff --git a/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c b/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c index a4d607b82b..0fe33cddcc 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c +++ b/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c @@ -24,15 +24,15 @@ void func_8089B870(BgJyaZurerukabe* this, PlayState* play); static f32 D_8089B9C0[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; ActorInit Bg_Jya_Zurerukabe_InitVars = { - ACTOR_BG_JYA_ZURERUKABE, - ACTORCAT_BG, - FLAGS, - OBJECT_JYA_OBJ, - sizeof(BgJyaZurerukabe), - (ActorFunc)BgJyaZurerukabe_Init, - (ActorFunc)BgJyaZurerukabe_Destroy, - (ActorFunc)BgJyaZurerukabe_Update, - (ActorFunc)BgJyaZurerukabe_Draw, + /**/ ACTOR_BG_JYA_ZURERUKABE, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_JYA_OBJ, + /**/ sizeof(BgJyaZurerukabe), + /**/ BgJyaZurerukabe_Init, + /**/ BgJyaZurerukabe_Destroy, + /**/ BgJyaZurerukabe_Update, + /**/ BgJyaZurerukabe_Draw, }; static s16 D_8089B9F0[4] = { 943, 1043, 1243, 1343 }; diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c index 6287d35215..f261f258f0 100644 --- a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c +++ b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c @@ -15,15 +15,15 @@ void BgMenkuriEye_Update(Actor* thisx, PlayState* play); void BgMenkuriEye_Draw(Actor* thisx, PlayState* play); ActorInit Bg_Menkuri_Eye_InitVars = { - ACTOR_BG_MENKURI_EYE, - ACTORCAT_BG, - FLAGS, - OBJECT_MENKURI_OBJECTS, - sizeof(BgMenkuriEye), - (ActorFunc)BgMenkuriEye_Init, - (ActorFunc)BgMenkuriEye_Destroy, - (ActorFunc)BgMenkuriEye_Update, - (ActorFunc)BgMenkuriEye_Draw, + /**/ ACTOR_BG_MENKURI_EYE, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_MENKURI_OBJECTS, + /**/ sizeof(BgMenkuriEye), + /**/ BgMenkuriEye_Init, + /**/ BgMenkuriEye_Destroy, + /**/ BgMenkuriEye_Update, + /**/ BgMenkuriEye_Draw, }; static s32 D_8089C1A0; diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c b/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c index 66bf855f68..b7fa437b80 100644 --- a/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c +++ b/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c @@ -15,15 +15,15 @@ void BgMenkuriKaiten_Update(Actor* thisx, PlayState* play); void BgMenkuriKaiten_Draw(Actor* thisx, PlayState* play); ActorInit Bg_Menkuri_Kaiten_InitVars = { - ACTOR_BG_MENKURI_KAITEN, - ACTORCAT_BG, - FLAGS, - OBJECT_MENKURI_OBJECTS, - sizeof(BgMenkuriKaiten), - (ActorFunc)BgMenkuriKaiten_Init, - (ActorFunc)BgMenkuriKaiten_Destroy, - (ActorFunc)BgMenkuriKaiten_Update, - (ActorFunc)BgMenkuriKaiten_Draw, + /**/ ACTOR_BG_MENKURI_KAITEN, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_MENKURI_OBJECTS, + /**/ sizeof(BgMenkuriKaiten), + /**/ BgMenkuriKaiten_Init, + /**/ BgMenkuriKaiten_Destroy, + /**/ BgMenkuriKaiten_Update, + /**/ BgMenkuriKaiten_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c b/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c index 0d20381d00..ab8e39b8de 100644 --- a/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c +++ b/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c @@ -15,15 +15,15 @@ void BgMenkuriNisekabe_Update(Actor* thisx, PlayState* play); void BgMenkuriNisekabe_Draw(Actor* thisx, PlayState* play); ActorInit Bg_Menkuri_Nisekabe_InitVars = { - ACTOR_BG_MENKURI_NISEKABE, - ACTORCAT_PROP, - FLAGS, - OBJECT_MENKURI_OBJECTS, - sizeof(BgMenkuriNisekabe), - (ActorFunc)BgMenkuriNisekabe_Init, - (ActorFunc)BgMenkuriNisekabe_Destroy, - (ActorFunc)BgMenkuriNisekabe_Update, - (ActorFunc)BgMenkuriNisekabe_Draw, + /**/ ACTOR_BG_MENKURI_NISEKABE, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_MENKURI_OBJECTS, + /**/ sizeof(BgMenkuriNisekabe), + /**/ BgMenkuriNisekabe_Init, + /**/ BgMenkuriNisekabe_Destroy, + /**/ BgMenkuriNisekabe_Update, + /**/ BgMenkuriNisekabe_Draw, }; static Gfx* sDLists[] = { gGTGFakeWallDL, gGTGFakeCeilingDL }; diff --git a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c index 200bfb192f..70c6a7feea 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c @@ -20,15 +20,15 @@ void BgMizuBwall_Break(BgMizuBwall* this, PlayState* play); void BgMizuBwall_DoNothing(BgMizuBwall* this, PlayState* play); ActorInit Bg_Mizu_Bwall_InitVars = { - ACTOR_BG_MIZU_BWALL, - ACTORCAT_BG, - FLAGS, - OBJECT_MIZU_OBJECTS, - sizeof(BgMizuBwall), - (ActorFunc)BgMizuBwall_Init, - (ActorFunc)BgMizuBwall_Destroy, - (ActorFunc)BgMizuBwall_Update, - (ActorFunc)BgMizuBwall_Draw, + /**/ ACTOR_BG_MIZU_BWALL, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_MIZU_OBJECTS, + /**/ sizeof(BgMizuBwall), + /**/ BgMizuBwall_Init, + /**/ BgMizuBwall_Destroy, + /**/ BgMizuBwall_Update, + /**/ BgMizuBwall_Draw, }; static ColliderTrisElementInit sTrisElementInitFloor[2] = { diff --git a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c index 52591f4122..4ed08e3eb3 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c @@ -26,15 +26,15 @@ void func_8089E650(BgMizuMovebg* this, PlayState* play); s32 func_8089E108(Path* pathList, Vec3f* pos, s32 pathId, s32 pointId); ActorInit Bg_Mizu_Movebg_InitVars = { - ACTOR_BG_MIZU_MOVEBG, - ACTORCAT_BG, - FLAGS, - OBJECT_MIZU_OBJECTS, - sizeof(BgMizuMovebg), - (ActorFunc)BgMizuMovebg_Init, - (ActorFunc)BgMizuMovebg_Destroy, - (ActorFunc)BgMizuMovebg_Update, - (ActorFunc)BgMizuMovebg_Draw, + /**/ ACTOR_BG_MIZU_MOVEBG, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_MIZU_OBJECTS, + /**/ sizeof(BgMizuMovebg), + /**/ BgMizuMovebg_Init, + /**/ BgMizuMovebg_Destroy, + /**/ BgMizuMovebg_Update, + /**/ BgMizuMovebg_Draw, }; static f32 D_8089EB40[] = { -115.200005f, -115.200005f, -115.200005f, 0.0f }; diff --git a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c index 928bbd9032..bda7e6d7aa 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c @@ -14,15 +14,15 @@ void BgMizuShutter_Move(BgMizuShutter* this, PlayState* play); void BgMizuShutter_WaitForCutscene(BgMizuShutter* this, PlayState* play); ActorInit Bg_Mizu_Shutter_InitVars = { - ACTOR_BG_MIZU_SHUTTER, - ACTORCAT_PROP, - FLAGS, - OBJECT_MIZU_OBJECTS, - sizeof(BgMizuShutter), - (ActorFunc)BgMizuShutter_Init, - (ActorFunc)BgMizuShutter_Destroy, - (ActorFunc)BgMizuShutter_Update, - (ActorFunc)BgMizuShutter_Draw, + /**/ ACTOR_BG_MIZU_SHUTTER, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_MIZU_OBJECTS, + /**/ sizeof(BgMizuShutter), + /**/ BgMizuShutter_Init, + /**/ BgMizuShutter_Destroy, + /**/ BgMizuShutter_Update, + /**/ BgMizuShutter_Draw, }; static Gfx* sDisplayLists[] = { gObjectMizuObjectsShutterDL_007130, gObjectMizuObjectsShutterDL_0072D0 }; diff --git a/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c b/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c index d265117ac1..8d9ebd8556 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c @@ -17,15 +17,15 @@ void BgMizuUzu_Draw(Actor* thisx, PlayState* play); void func_8089F788(BgMizuUzu* this, PlayState* play); ActorInit Bg_Mizu_Uzu_InitVars = { - ACTOR_BG_MIZU_UZU, - ACTORCAT_PROP, - FLAGS, - OBJECT_MIZU_OBJECTS, - sizeof(BgMizuUzu), - (ActorFunc)BgMizuUzu_Init, - (ActorFunc)BgMizuUzu_Destroy, - (ActorFunc)BgMizuUzu_Update, - (ActorFunc)BgMizuUzu_Draw, + /**/ ACTOR_BG_MIZU_UZU, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_MIZU_OBJECTS, + /**/ sizeof(BgMizuUzu), + /**/ BgMizuUzu_Init, + /**/ BgMizuUzu_Destroy, + /**/ BgMizuUzu_Update, + /**/ BgMizuUzu_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c index f831b269c8..2e0ebc0436 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c @@ -30,15 +30,15 @@ static WaterLevel sWaterLevels[] = { }; ActorInit Bg_Mizu_Water_InitVars = { - ACTOR_BG_MIZU_WATER, - ACTORCAT_BG, - FLAGS, - OBJECT_MIZU_OBJECTS, - sizeof(BgMizuWater), - (ActorFunc)BgMizuWater_Init, - (ActorFunc)BgMizuWater_Destroy, - (ActorFunc)BgMizuWater_Update, - (ActorFunc)BgMizuWater_Draw, + /**/ ACTOR_BG_MIZU_WATER, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_MIZU_OBJECTS, + /**/ sizeof(BgMizuWater), + /**/ BgMizuWater_Init, + /**/ BgMizuWater_Destroy, + /**/ BgMizuWater_Update, + /**/ BgMizuWater_Draw, }; static f32 sUnused1 = 0; diff --git a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c index 5f13fd87a8..da67fd7bef 100644 --- a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c +++ b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c @@ -25,15 +25,15 @@ void func_808A0850(BgMjin* this, PlayState* play); void BgMjin_DoNothing(BgMjin* this, PlayState* play); ActorInit Bg_Mjin_InitVars = { - ACTOR_BG_MJIN, - ACTORCAT_BG, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(BgMjin), - (ActorFunc)BgMjin_Init, - (ActorFunc)BgMjin_Destroy, - (ActorFunc)BgMjin_Update, - NULL, + /**/ ACTOR_BG_MJIN, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(BgMjin), + /**/ BgMjin_Init, + /**/ BgMjin_Destroy, + /**/ BgMjin_Update, + /**/ NULL, }; extern UNK_TYPE D_06000000; diff --git a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c index f020c16c19..6ded26be27 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c +++ b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c @@ -29,15 +29,15 @@ void BgMoriBigst_StalfosPairFight(BgMoriBigst* this, PlayState* play); void BgMoriBigst_SetupDone(BgMoriBigst* this, PlayState* play); ActorInit Bg_Mori_Bigst_InitVars = { - ACTOR_BG_MORI_BIGST, - ACTORCAT_BG, - FLAGS, - OBJECT_MORI_OBJECTS, - sizeof(BgMoriBigst), - (ActorFunc)BgMoriBigst_Init, - (ActorFunc)BgMoriBigst_Destroy, - (ActorFunc)BgMoriBigst_Update, - NULL, + /**/ ACTOR_BG_MORI_BIGST, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_MORI_OBJECTS, + /**/ sizeof(BgMoriBigst), + /**/ BgMoriBigst_Init, + /**/ BgMoriBigst_Destroy, + /**/ BgMoriBigst_Update, + /**/ NULL, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c index 1306ab789b..d00c0e93c8 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c +++ b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c @@ -20,15 +20,15 @@ void BgMoriElevator_MoveAboveGround(BgMoriElevator* this, PlayState* play); static s16 sIsSpawned = false; ActorInit Bg_Mori_Elevator_InitVars = { - ACTOR_BG_MORI_ELEVATOR, - ACTORCAT_BG, - FLAGS, - OBJECT_MORI_OBJECTS, - sizeof(BgMoriElevator), - (ActorFunc)BgMoriElevator_Init, - (ActorFunc)BgMoriElevator_Destroy, - (ActorFunc)BgMoriElevator_Update, - NULL, + /**/ ACTOR_BG_MORI_ELEVATOR, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_MORI_OBJECTS, + /**/ sizeof(BgMoriElevator), + /**/ BgMoriElevator_Init, + /**/ BgMoriElevator_Destroy, + /**/ BgMoriElevator_Update, + /**/ NULL, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c index cc6d15db24..00e35a1c23 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c @@ -25,15 +25,15 @@ void BgMoriHashigo_LadderFall(BgMoriHashigo* this, PlayState* play); void BgMoriHashigo_SetupLadderRest(BgMoriHashigo* this); ActorInit Bg_Mori_Hashigo_InitVars = { - ACTOR_BG_MORI_HASHIGO, - ACTORCAT_BG, - FLAGS, - OBJECT_MORI_OBJECTS, - sizeof(BgMoriHashigo), - (ActorFunc)BgMoriHashigo_Init, - (ActorFunc)BgMoriHashigo_Destroy, - (ActorFunc)BgMoriHashigo_Update, - NULL, + /**/ ACTOR_BG_MORI_HASHIGO, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_MORI_OBJECTS, + /**/ sizeof(BgMoriHashigo), + /**/ BgMoriHashigo_Init, + /**/ BgMoriHashigo_Destroy, + /**/ BgMoriHashigo_Update, + /**/ NULL, }; static ColliderJntSphElementInit sJntSphElementsInit[1] = { diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c index a44854df67..446fe5c46e 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c @@ -22,15 +22,15 @@ void BgMoriHashira4_GateWait(BgMoriHashira4* this, PlayState* play); void BgMoriHashira4_GateOpen(BgMoriHashira4* this, PlayState* play); ActorInit Bg_Mori_Hashira4_InitVars = { - ACTOR_BG_MORI_HASHIRA4, - ACTORCAT_BG, - FLAGS, - OBJECT_MORI_OBJECTS, - sizeof(BgMoriHashira4), - (ActorFunc)BgMoriHashira4_Init, - (ActorFunc)BgMoriHashira4_Destroy, - (ActorFunc)BgMoriHashira4_Update, - NULL, + /**/ ACTOR_BG_MORI_HASHIRA4, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_MORI_OBJECTS, + /**/ sizeof(BgMoriHashira4), + /**/ BgMoriHashira4_Init, + /**/ BgMoriHashira4_Destroy, + /**/ BgMoriHashira4_Update, + /**/ NULL, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c index 43f17618f9..609ff25a9b 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c @@ -30,15 +30,15 @@ void func_808A3D58(BgMoriHineri* this, PlayState* play); static s16 sSubCamId = CAM_ID_NONE; ActorInit Bg_Mori_Hineri_InitVars = { - ACTOR_BG_MORI_HINERI, - ACTORCAT_BG, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(BgMoriHineri), - (ActorFunc)BgMoriHineri_Init, - (ActorFunc)BgMoriHineri_Destroy, - (ActorFunc)BgMoriHineri_Update, - NULL, + /**/ ACTOR_BG_MORI_HINERI, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(BgMoriHineri), + /**/ BgMoriHineri_Init, + /**/ BgMoriHineri_Destroy, + /**/ BgMoriHineri_Update, + /**/ NULL, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c index 40735aab0e..ec21c743c4 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c +++ b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c @@ -22,15 +22,15 @@ void BgMoriIdomizu_Main(BgMoriIdomizu* this, PlayState* play); static s16 sIsSpawned = false; ActorInit Bg_Mori_Idomizu_InitVars = { - ACTOR_BG_MORI_IDOMIZU, - ACTORCAT_BG, - FLAGS, - OBJECT_MORI_OBJECTS, - sizeof(BgMoriIdomizu), - (ActorFunc)BgMoriIdomizu_Init, - (ActorFunc)BgMoriIdomizu_Destroy, - (ActorFunc)BgMoriIdomizu_Update, - NULL, + /**/ ACTOR_BG_MORI_IDOMIZU, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_MORI_OBJECTS, + /**/ sizeof(BgMoriIdomizu), + /**/ BgMoriIdomizu_Init, + /**/ BgMoriIdomizu_Destroy, + /**/ BgMoriIdomizu_Update, + /**/ NULL, }; void BgMoriIdomizu_SetupAction(BgMoriIdomizu* this, BgMoriIdomizuActionFunc actionFunc) { diff --git a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c index 167121b87b..0934158103 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c +++ b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c @@ -21,15 +21,15 @@ void BgMoriKaitenkabe_SetupRotate(BgMoriKaitenkabe* this); void BgMoriKaitenkabe_Rotate(BgMoriKaitenkabe* this, PlayState* play); ActorInit Bg_Mori_Kaitenkabe_InitVars = { - ACTOR_BG_MORI_KAITENKABE, - ACTORCAT_BG, - FLAGS, - OBJECT_MORI_OBJECTS, - sizeof(BgMoriKaitenkabe), - (ActorFunc)BgMoriKaitenkabe_Init, - (ActorFunc)BgMoriKaitenkabe_Destroy, - (ActorFunc)BgMoriKaitenkabe_Update, - NULL, + /**/ ACTOR_BG_MORI_KAITENKABE, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_MORI_OBJECTS, + /**/ sizeof(BgMoriKaitenkabe), + /**/ BgMoriKaitenkabe_Init, + /**/ BgMoriKaitenkabe_Destroy, + /**/ BgMoriKaitenkabe_Update, + /**/ NULL, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c index cf0449ad8e..b76181daca 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c +++ b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c @@ -29,15 +29,15 @@ void BgMoriRakkatenjo_Rise(BgMoriRakkatenjo* this, PlayState* play); static s16 sCamSetting = CAM_SET_NONE; ActorInit Bg_Mori_Rakkatenjo_InitVars = { - ACTOR_BG_MORI_RAKKATENJO, - ACTORCAT_BG, - FLAGS, - OBJECT_MORI_OBJECTS, - sizeof(BgMoriRakkatenjo), - (ActorFunc)BgMoriRakkatenjo_Init, - (ActorFunc)BgMoriRakkatenjo_Destroy, - (ActorFunc)BgMoriRakkatenjo_Update, - NULL, + /**/ ACTOR_BG_MORI_RAKKATENJO, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_MORI_OBJECTS, + /**/ sizeof(BgMoriRakkatenjo), + /**/ BgMoriRakkatenjo_Init, + /**/ BgMoriRakkatenjo_Destroy, + /**/ BgMoriRakkatenjo_Update, + /**/ NULL, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index bec56ccc38..4d6b17ed9c 100644 --- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -29,15 +29,15 @@ void BgPoEvent_PaintingPresent(BgPoEvent* this, PlayState* play); void BgPoEvent_PaintingBurn(BgPoEvent* this, PlayState* play); ActorInit Bg_Po_Event_InitVars = { - ACTOR_BG_PO_EVENT, - ACTORCAT_BG, - FLAGS, - OBJECT_PO_SISTERS, - sizeof(BgPoEvent), - (ActorFunc)BgPoEvent_Init, - (ActorFunc)BgPoEvent_Destroy, - (ActorFunc)BgPoEvent_Update, - (ActorFunc)BgPoEvent_Draw, + /**/ ACTOR_BG_PO_EVENT, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_PO_SISTERS, + /**/ sizeof(BgPoEvent), + /**/ BgPoEvent_Init, + /**/ BgPoEvent_Destroy, + /**/ BgPoEvent_Update, + /**/ BgPoEvent_Draw, }; static ColliderTrisElementInit sTrisElementsInit[2] = { diff --git a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c index 229e9f31d0..b55da67591 100644 --- a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c +++ b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c @@ -59,15 +59,15 @@ static Color_RGBA8 sEnvColors[] = { }; ActorInit Bg_Po_Syokudai_InitVars = { - ACTOR_BG_PO_SYOKUDAI, - ACTORCAT_PROP, - FLAGS, - OBJECT_SYOKUDAI, - sizeof(BgPoSyokudai), - (ActorFunc)BgPoSyokudai_Init, - (ActorFunc)BgPoSyokudai_Destroy, - (ActorFunc)BgPoSyokudai_Update, - (ActorFunc)BgPoSyokudai_Draw, + /**/ ACTOR_BG_PO_SYOKUDAI, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_SYOKUDAI, + /**/ sizeof(BgPoSyokudai), + /**/ BgPoSyokudai_Init, + /**/ BgPoSyokudai_Destroy, + /**/ BgPoSyokudai_Update, + /**/ BgPoSyokudai_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c index 0370b72ff5..ad76db38b7 100644 --- a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c +++ b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c @@ -17,16 +17,16 @@ void BgPushbox_Draw(Actor* thisx, PlayState* play); void BgPushbox_UpdateImpl(BgPushbox* this, PlayState* play); ActorInit Bg_Pushbox_InitVars = { - ACTOR_BG_PUSHBOX, - ACTORCAT_BG, - FLAGS, + /**/ ACTOR_BG_PUSHBOX, + /**/ ACTORCAT_BG, + /**/ FLAGS, //! @bug fixing this actor would involve using OBJECT_PU_BOX - OBJECT_GAMEPLAY_DANGEON_KEEP, - sizeof(BgPushbox), - (ActorFunc)BgPushbox_Init, - (ActorFunc)BgPushbox_Destroy, - (ActorFunc)BgPushbox_Update, - (ActorFunc)BgPushbox_Draw, + /**/ OBJECT_GAMEPLAY_DANGEON_KEEP, + /**/ sizeof(BgPushbox), + /**/ BgPushbox_Init, + /**/ BgPushbox_Destroy, + /**/ BgPushbox_Update, + /**/ BgPushbox_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c index 08f9c25bff..680f6e12e6 100644 --- a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c +++ b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c @@ -27,15 +27,15 @@ void func_808A932C(BgRelayObjects* this, PlayState* play); void func_808A939C(BgRelayObjects* this, PlayState* play); ActorInit Bg_Relay_Objects_InitVars = { - ACTOR_BG_RELAY_OBJECTS, - ACTORCAT_BG, - FLAGS, - OBJECT_RELAY_OBJECTS, - sizeof(BgRelayObjects), - (ActorFunc)BgRelayObjects_Init, - (ActorFunc)BgRelayObjects_Destroy, - (ActorFunc)BgRelayObjects_Update, - (ActorFunc)BgRelayObjects_Draw, + /**/ ACTOR_BG_RELAY_OBJECTS, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_RELAY_OBJECTS, + /**/ sizeof(BgRelayObjects), + /**/ BgRelayObjects_Init, + /**/ BgRelayObjects_Destroy, + /**/ BgRelayObjects_Update, + /**/ BgRelayObjects_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c b/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c index f00719fc44..a16c96b91d 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c @@ -15,15 +15,15 @@ void BgSpot00Break_Update(Actor* thisx, PlayState* play); void BgSpot00Break_Draw(Actor* thisx, PlayState* play); ActorInit Bg_Spot00_Break_InitVars = { - ACTOR_BG_SPOT00_BREAK, - ACTORCAT_PROP, - FLAGS, - OBJECT_SPOT00_BREAK, - sizeof(BgSpot00Break), - (ActorFunc)BgSpot00Break_Init, - (ActorFunc)BgSpot00Break_Destroy, - (ActorFunc)BgSpot00Break_Update, - (ActorFunc)BgSpot00Break_Draw, + /**/ ACTOR_BG_SPOT00_BREAK, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_SPOT00_BREAK, + /**/ sizeof(BgSpot00Break), + /**/ BgSpot00Break_Init, + /**/ BgSpot00Break_Destroy, + /**/ BgSpot00Break_Update, + /**/ BgSpot00Break_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c index e567c89873..6ba46e9b44 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c @@ -26,15 +26,15 @@ void BgSpot00Hanebasi_DrawbridgeRiseAndFall(BgSpot00Hanebasi* this, PlayState* p void BgSpot00Hanebasi_SetTorchLightInfo(BgSpot00Hanebasi* this, PlayState* play); ActorInit Bg_Spot00_Hanebasi_InitVars = { - ACTOR_BG_SPOT00_HANEBASI, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT00_OBJECTS, - sizeof(BgSpot00Hanebasi), - (ActorFunc)BgSpot00Hanebasi_Init, - (ActorFunc)BgSpot00Hanebasi_Destroy, - (ActorFunc)BgSpot00Hanebasi_Update, - (ActorFunc)BgSpot00Hanebasi_Draw, + /**/ ACTOR_BG_SPOT00_HANEBASI, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT00_OBJECTS, + /**/ sizeof(BgSpot00Hanebasi), + /**/ BgSpot00Hanebasi_Init, + /**/ BgSpot00Hanebasi_Destroy, + /**/ BgSpot00Hanebasi_Update, + /**/ BgSpot00Hanebasi_Draw, }; static f32 sTorchFlameScale = 0.0f; diff --git a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c index 04c71bf9dd..6ba15c510a 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c @@ -17,15 +17,15 @@ void BgSpot01Fusya_Draw(Actor* thisx, PlayState* play); void func_808AAA50(BgSpot01Fusya* this, PlayState* play); ActorInit Bg_Spot01_Fusya_InitVars = { - ACTOR_BG_SPOT01_FUSYA, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT01_OBJECTS, - sizeof(BgSpot01Fusya), - (ActorFunc)BgSpot01Fusya_Init, - (ActorFunc)BgSpot01Fusya_Destroy, - (ActorFunc)BgSpot01Fusya_Update, - (ActorFunc)BgSpot01Fusya_Draw, + /**/ ACTOR_BG_SPOT01_FUSYA, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT01_OBJECTS, + /**/ sizeof(BgSpot01Fusya), + /**/ BgSpot01Fusya_Init, + /**/ BgSpot01Fusya_Destroy, + /**/ BgSpot01Fusya_Update, + /**/ BgSpot01Fusya_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c index 4296cbe7c8..34ed9a6ae0 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c @@ -37,15 +37,15 @@ static BgSpot01IdohashiraDrawFunc sDrawFuncs[] = { }; ActorInit Bg_Spot01_Idohashira_InitVars = { - ACTOR_BG_SPOT01_IDOHASHIRA, - ACTORCAT_PROP, - FLAGS, - OBJECT_SPOT01_OBJECTS, - sizeof(BgSpot01Idohashira), - (ActorFunc)BgSpot01Idohashira_Init, - (ActorFunc)BgSpot01Idohashira_Destroy, - (ActorFunc)BgSpot01Idohashira_Update, - (ActorFunc)BgSpot01Idohashira_Draw, + /**/ ACTOR_BG_SPOT01_IDOHASHIRA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_SPOT01_OBJECTS, + /**/ sizeof(BgSpot01Idohashira), + /**/ BgSpot01Idohashira_Init, + /**/ BgSpot01Idohashira_Destroy, + /**/ BgSpot01Idohashira_Update, + /**/ BgSpot01Idohashira_Draw, }; void BgSpot01Idohashira_PlayBreakSfx1(BgSpot01Idohashira* this) { diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c index 6d0b3fa139..1432f68de6 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c @@ -17,15 +17,15 @@ void BgSpot01Idomizu_Draw(Actor* thisx, PlayState* play); void func_808ABB84(BgSpot01Idomizu* this, PlayState* play); ActorInit Bg_Spot01_Idomizu_InitVars = { - ACTOR_BG_SPOT01_IDOMIZU, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT01_OBJECTS, - sizeof(BgSpot01Idomizu), - (ActorFunc)BgSpot01Idomizu_Init, - (ActorFunc)BgSpot01Idomizu_Destroy, - (ActorFunc)BgSpot01Idomizu_Update, - (ActorFunc)BgSpot01Idomizu_Draw, + /**/ ACTOR_BG_SPOT01_IDOMIZU, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT01_OBJECTS, + /**/ sizeof(BgSpot01Idomizu), + /**/ BgSpot01Idomizu_Init, + /**/ BgSpot01Idomizu_Destroy, + /**/ BgSpot01Idomizu_Update, + /**/ BgSpot01Idomizu_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c index b22d46a493..be096b3b52 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c @@ -17,15 +17,15 @@ void BgSpot01Idosoko_Draw(Actor* thisx, PlayState* play); void func_808ABF54(BgSpot01Idosoko* this, PlayState* play); ActorInit Bg_Spot01_Idosoko_InitVars = { - ACTOR_BG_SPOT01_IDOSOKO, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT01_MATOYA, - sizeof(BgSpot01Idosoko), - (ActorFunc)BgSpot01Idosoko_Init, - (ActorFunc)BgSpot01Idosoko_Destroy, - (ActorFunc)BgSpot01Idosoko_Update, - (ActorFunc)BgSpot01Idosoko_Draw, + /**/ ACTOR_BG_SPOT01_IDOSOKO, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT01_MATOYA, + /**/ sizeof(BgSpot01Idosoko), + /**/ BgSpot01Idosoko_Init, + /**/ BgSpot01Idosoko_Destroy, + /**/ BgSpot01Idosoko_Update, + /**/ BgSpot01Idosoko_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c index 4b723b5515..7f2733aa50 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c @@ -19,15 +19,15 @@ void func_808AC474(BgSpot01Objects2* this, PlayState* play); void func_808AC4A4(Actor* thisx, PlayState* play); ActorInit Bg_Spot01_Objects2_InitVars = { - ACTOR_BG_SPOT01_OBJECTS2, - ACTORCAT_BG, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(BgSpot01Objects2), - (ActorFunc)BgSpot01Objects2_Init, - (ActorFunc)BgSpot01Objects2_Destroy, - (ActorFunc)BgSpot01Objects2_Update, - NULL, + /**/ ACTOR_BG_SPOT01_OBJECTS2, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(BgSpot01Objects2), + /**/ BgSpot01Objects2_Init, + /**/ BgSpot01Objects2_Destroy, + /**/ BgSpot01Objects2_Update, + /**/ NULL, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c index 3f1fbe432f..72e2ddeef9 100644 --- a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c @@ -32,15 +32,15 @@ static void* D_808AD850[] = { }; ActorInit Bg_Spot02_Objects_InitVars = { - ACTOR_BG_SPOT02_OBJECTS, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT02_OBJECTS, - sizeof(BgSpot02Objects), - (ActorFunc)BgSpot02Objects_Init, - (ActorFunc)BgSpot02Objects_Destroy, - (ActorFunc)BgSpot02Objects_Update, - (ActorFunc)BgSpot02Objects_Draw, + /**/ ACTOR_BG_SPOT02_OBJECTS, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT02_OBJECTS, + /**/ sizeof(BgSpot02Objects), + /**/ BgSpot02Objects_Init, + /**/ BgSpot02Objects_Destroy, + /**/ BgSpot02Objects_Update, + /**/ BgSpot02Objects_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c index 9620aefeb6..8ff5498c2f 100644 --- a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c +++ b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c @@ -17,15 +17,15 @@ void BgSpot03Taki_Draw(Actor* thisx, PlayState* play); void func_808ADEF0(BgSpot03Taki* this, PlayState* play); ActorInit Bg_Spot03_Taki_InitVars = { - ACTOR_BG_SPOT03_TAKI, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT03_OBJECT, - sizeof(BgSpot03Taki), - (ActorFunc)BgSpot03Taki_Init, - (ActorFunc)BgSpot03Taki_Destroy, - (ActorFunc)BgSpot03Taki_Update, - (ActorFunc)BgSpot03Taki_Draw, + /**/ ACTOR_BG_SPOT03_TAKI, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT03_OBJECT, + /**/ sizeof(BgSpot03Taki), + /**/ BgSpot03Taki_Init, + /**/ BgSpot03Taki_Destroy, + /**/ BgSpot03Taki_Update, + /**/ BgSpot03Taki_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c b/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c index bf3964d9cd..681a512d87 100644 --- a/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c +++ b/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c @@ -18,15 +18,15 @@ void func_808AE5B4(BgSpot05Soko* this, PlayState* play); void func_808AE630(BgSpot05Soko* this, PlayState* play); ActorInit Bg_Spot05_Soko_InitVars = { - ACTOR_BG_SPOT05_SOKO, - ACTORCAT_PROP, - FLAGS, - OBJECT_SPOT05_OBJECTS, - sizeof(BgSpot05Soko), - (ActorFunc)BgSpot05Soko_Init, - (ActorFunc)BgSpot05Soko_Destroy, - (ActorFunc)BgSpot05Soko_Update, - (ActorFunc)BgSpot05Soko_Draw, + /**/ ACTOR_BG_SPOT05_SOKO, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_SPOT05_OBJECTS, + /**/ sizeof(BgSpot05Soko), + /**/ BgSpot05Soko_Init, + /**/ BgSpot05Soko_Destroy, + /**/ BgSpot05Soko_Update, + /**/ BgSpot05Soko_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index 21e4c0602a..51cf8697d1 100644 --- a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -45,15 +45,15 @@ void BgSpot06Objects_WaterPlaneCutsceneWait(BgSpot06Objects* this, PlayState* pl void BgSpot06Objects_WaterPlaneCutsceneRise(BgSpot06Objects* this, PlayState* play); ActorInit Bg_Spot06_Objects_InitVars = { - ACTOR_BG_SPOT06_OBJECTS, - ACTORCAT_PROP, - FLAGS, - OBJECT_SPOT06_OBJECTS, - sizeof(BgSpot06Objects), - (ActorFunc)BgSpot06Objects_Init, - (ActorFunc)BgSpot06Objects_Destroy, - (ActorFunc)BgSpot06Objects_Update, - (ActorFunc)BgSpot06Objects_Draw, + /**/ ACTOR_BG_SPOT06_OBJECTS, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_SPOT06_OBJECTS, + /**/ sizeof(BgSpot06Objects), + /**/ BgSpot06Objects_Init, + /**/ BgSpot06Objects_Destroy, + /**/ BgSpot06Objects_Update, + /**/ BgSpot06Objects_Draw, }; static ColliderJntSphElementInit sJntSphItemsInit[1] = { diff --git a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c index c8376e0dbb..7c53151571 100644 --- a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c +++ b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c @@ -17,15 +17,15 @@ void BgSpot07Taki_Draw(Actor* thisx, PlayState* play); void BgSpot07Taki_DoNothing(BgSpot07Taki* this, PlayState* play); ActorInit Bg_Spot07_Taki_InitVars = { - ACTOR_BG_SPOT07_TAKI, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT07_OBJECT, - sizeof(BgSpot07Taki), - (ActorFunc)BgSpot07Taki_Init, - (ActorFunc)BgSpot07Taki_Destroy, - (ActorFunc)BgSpot07Taki_Update, - (ActorFunc)BgSpot07Taki_Draw, + /**/ ACTOR_BG_SPOT07_TAKI, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT07_OBJECT, + /**/ sizeof(BgSpot07Taki), + /**/ BgSpot07Taki_Init, + /**/ BgSpot07Taki_Destroy, + /**/ BgSpot07Taki_Update, + /**/ BgSpot07Taki_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c index 9e16602841..8b9d4f48ff 100644 --- a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c @@ -20,15 +20,15 @@ void func_808B02D0(BgSpot08Bakudankabe* this, PlayState* play); void func_808B0324(BgSpot08Bakudankabe* this, PlayState* play); ActorInit Bg_Spot08_Bakudankabe_InitVars = { - ACTOR_BG_SPOT08_BAKUDANKABE, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT08_OBJ, - sizeof(BgSpot08Bakudankabe), - (ActorFunc)BgSpot08Bakudankabe_Init, - (ActorFunc)BgSpot08Bakudankabe_Destroy, - (ActorFunc)BgSpot08Bakudankabe_Update, - (ActorFunc)BgSpot08Bakudankabe_Draw, + /**/ ACTOR_BG_SPOT08_BAKUDANKABE, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT08_OBJ, + /**/ sizeof(BgSpot08Bakudankabe), + /**/ BgSpot08Bakudankabe_Init, + /**/ BgSpot08Bakudankabe_Destroy, + /**/ BgSpot08Bakudankabe_Update, + /**/ BgSpot08Bakudankabe_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c b/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c index 8a6229e74e..6896ba9620 100644 --- a/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c +++ b/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c @@ -23,15 +23,15 @@ void BgSpot08Iceblock_FloatOrbitingTwins(BgSpot08Iceblock* this, PlayState* play void BgSpot08Iceblock_SetupNoAction(BgSpot08Iceblock* this); ActorInit Bg_Spot08_Iceblock_InitVars = { - ACTOR_BG_SPOT08_ICEBLOCK, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT08_OBJ, - sizeof(BgSpot08Iceblock), - (ActorFunc)BgSpot08Iceblock_Init, - (ActorFunc)BgSpot08Iceblock_Destroy, - (ActorFunc)BgSpot08Iceblock_Update, - (ActorFunc)BgSpot08Iceblock_Draw, + /**/ ACTOR_BG_SPOT08_ICEBLOCK, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT08_OBJ, + /**/ sizeof(BgSpot08Iceblock), + /**/ BgSpot08Iceblock_Init, + /**/ BgSpot08Iceblock_Destroy, + /**/ BgSpot08Iceblock_Update, + /**/ BgSpot08Iceblock_Draw, }; void BgSpot08Iceblock_SetupAction(BgSpot08Iceblock* this, BgSpot08IceblockActionFunc actionFunc) { diff --git a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c index 209717afe2..ba9153cd8e 100644 --- a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c @@ -19,15 +19,15 @@ s32 func_808B1BA0(BgSpot09Obj* this, PlayState* play); s32 func_808B1BEC(BgSpot09Obj* this, PlayState* play); ActorInit Bg_Spot09_Obj_InitVars = { - ACTOR_BG_SPOT09_OBJ, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT09_OBJ, - sizeof(BgSpot09Obj), - (ActorFunc)BgSpot09Obj_Init, - (ActorFunc)BgSpot09Obj_Destroy, - (ActorFunc)BgSpot09Obj_Update, - (ActorFunc)BgSpot09Obj_Draw, + /**/ ACTOR_BG_SPOT09_OBJ, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT09_OBJ, + /**/ sizeof(BgSpot09Obj), + /**/ BgSpot09Obj_Init, + /**/ BgSpot09Obj_Destroy, + /**/ BgSpot09Obj_Update, + /**/ BgSpot09Obj_Draw, }; static CollisionHeader* D_808B1F90[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c index 5983a7a0e1..2ab8e7f156 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c @@ -17,15 +17,15 @@ void BgSpot11Bakudankabe_Update(Actor* thisx, PlayState* play); void BgSpot11Bakudankabe_Draw(Actor* thisx, PlayState* play); ActorInit Bg_Spot11_Bakudankabe_InitVars = { - ACTOR_BG_SPOT11_BAKUDANKABE, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT11_OBJ, - sizeof(BgSpot11Bakudankabe), - (ActorFunc)BgSpot11Bakudankabe_Init, - (ActorFunc)BgSpot11Bakudankabe_Destroy, - (ActorFunc)BgSpot11Bakudankabe_Update, - (ActorFunc)BgSpot11Bakudankabe_Draw, + /**/ ACTOR_BG_SPOT11_BAKUDANKABE, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT11_OBJ, + /**/ sizeof(BgSpot11Bakudankabe), + /**/ BgSpot11Bakudankabe_Init, + /**/ BgSpot11Bakudankabe_Destroy, + /**/ BgSpot11Bakudankabe_Update, + /**/ BgSpot11Bakudankabe_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c index e085137fe4..c44cdf07ec 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c +++ b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c @@ -21,15 +21,15 @@ void func_808B2AA8(BgSpot11Oasis* this); void func_808B2AB8(BgSpot11Oasis* this, PlayState* play); ActorInit Bg_Spot11_Oasis_InitVars = { - ACTOR_BG_SPOT11_OASIS, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT11_OBJ, - sizeof(BgSpot11Oasis), - (ActorFunc)BgSpot11Oasis_Init, - (ActorFunc)Actor_Noop, - (ActorFunc)BgSpot11Oasis_Update, - NULL, + /**/ ACTOR_BG_SPOT11_OASIS, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT11_OBJ, + /**/ sizeof(BgSpot11Oasis), + /**/ BgSpot11Oasis_Init, + /**/ Actor_Noop, + /**/ BgSpot11Oasis_Update, + /**/ NULL, }; static s16 D_808B2E10[][2] = { diff --git a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c index 24b0e1ca7d..8984ba9c01 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c +++ b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c @@ -25,15 +25,15 @@ void func_808B3274(BgSpot12Gate* this); void func_808B3298(BgSpot12Gate* this, PlayState* play); ActorInit Bg_Spot12_Gate_InitVars = { - ACTOR_BG_SPOT12_GATE, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT12_OBJ, - sizeof(BgSpot12Gate), - (ActorFunc)BgSpot12Gate_Init, - (ActorFunc)BgSpot12Gate_Destroy, - (ActorFunc)BgSpot12Gate_Update, - (ActorFunc)BgSpot12Gate_Draw, + /**/ ACTOR_BG_SPOT12_GATE, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT12_OBJ, + /**/ sizeof(BgSpot12Gate), + /**/ BgSpot12Gate_Init, + /**/ BgSpot12Gate_Destroy, + /**/ BgSpot12Gate_Update, + /**/ BgSpot12Gate_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c index 9bb67e148f..ec2e405520 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c +++ b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c @@ -22,15 +22,15 @@ void func_808B3714(BgSpot12Saku* this); void func_808B37AC(BgSpot12Saku* this, PlayState* play); ActorInit Bg_Spot12_Saku_InitVars = { - ACTOR_BG_SPOT12_SAKU, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT12_OBJ, - sizeof(BgSpot12Saku), - (ActorFunc)BgSpot12Saku_Init, - (ActorFunc)BgSpot12Saku_Destroy, - (ActorFunc)BgSpot12Saku_Update, - (ActorFunc)BgSpot12Saku_Draw, + /**/ ACTOR_BG_SPOT12_SAKU, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT12_OBJ, + /**/ sizeof(BgSpot12Saku), + /**/ BgSpot12Saku_Init, + /**/ BgSpot12Saku_Destroy, + /**/ BgSpot12Saku_Update, + /**/ BgSpot12Saku_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c index 6023ab6b9e..fcc642b237 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c +++ b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c @@ -26,15 +26,15 @@ void func_808B44CC(BgSpot15Rrbox* this, PlayState* play); static s16 D_808B4590 = 0; ActorInit Bg_Spot15_Rrbox_InitVars = { - ACTOR_BG_SPOT15_RRBOX, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT15_OBJ, - sizeof(BgSpot15Rrbox), - (ActorFunc)BgSpot15Rrbox_Init, - (ActorFunc)BgSpot15Rrbox_Destroy, - (ActorFunc)BgSpot15Rrbox_Update, - (ActorFunc)BgSpot15Rrbox_Draw, + /**/ ACTOR_BG_SPOT15_RRBOX, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT15_OBJ, + /**/ sizeof(BgSpot15Rrbox), + /**/ BgSpot15Rrbox_Init, + /**/ BgSpot15Rrbox_Destroy, + /**/ BgSpot15Rrbox_Update, + /**/ BgSpot15Rrbox_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c index beb655400c..6915ca8a2f 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c +++ b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c @@ -19,15 +19,15 @@ void func_808B4978(BgSpot15Saku* this, PlayState* play); void func_808B4A04(BgSpot15Saku* this, PlayState* play); ActorInit Bg_Spot15_Saku_InitVars = { - ACTOR_BG_SPOT15_SAKU, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_SPOT15_OBJ, - sizeof(BgSpot15Saku), - (ActorFunc)BgSpot15Saku_Init, - (ActorFunc)BgSpot15Saku_Destroy, - (ActorFunc)BgSpot15Saku_Update, - (ActorFunc)BgSpot15Saku_Draw, + /**/ ACTOR_BG_SPOT15_SAKU, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_SPOT15_OBJ, + /**/ sizeof(BgSpot15Saku), + /**/ BgSpot15Saku_Init, + /**/ BgSpot15Saku_Destroy, + /**/ BgSpot15Saku_Update, + /**/ BgSpot15Saku_Draw, }; void BgSpot15Saku_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c index 5064684c3e..9f8b10ed65 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c @@ -110,15 +110,15 @@ static s16 D_808B5EB0[][7] = { }; ActorInit Bg_Spot16_Bombstone_InitVars = { - ACTOR_BG_SPOT16_BOMBSTONE, - ACTORCAT_PROP, - FLAGS, - OBJECT_SPOT16_OBJ, - sizeof(BgSpot16Bombstone), - (ActorFunc)BgSpot16Bombstone_Init, - (ActorFunc)BgSpot16Bombstone_Destroy, - (ActorFunc)BgSpot16Bombstone_Update, - (ActorFunc)BgSpot16Bombstone_Draw, + /**/ ACTOR_BG_SPOT16_BOMBSTONE, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_SPOT16_OBJ, + /**/ sizeof(BgSpot16Bombstone), + /**/ BgSpot16Bombstone_Init, + /**/ BgSpot16Bombstone_Destroy, + /**/ BgSpot16Bombstone_Update, + /**/ BgSpot16Bombstone_Draw, }; static InitChainEntry sInitChainBoulder[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c index 7bbbb7d3f9..f6a3667a02 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c @@ -19,15 +19,15 @@ void BgSpot16Doughnut_UpdateExpanding(Actor* thisx, PlayState* play); void BgSpot16Doughnut_DrawExpanding(Actor* thisx, PlayState* play); ActorInit Bg_Spot16_Doughnut_InitVars = { - ACTOR_BG_SPOT16_DOUGHNUT, - ACTORCAT_PROP, - FLAGS, - OBJECT_EFC_DOUGHNUT, - sizeof(BgSpot16Doughnut), - (ActorFunc)BgSpot16Doughnut_Init, - (ActorFunc)BgSpot16Doughnut_Destroy, - (ActorFunc)BgSpot16Doughnut_Update, - (ActorFunc)BgSpot16Doughnut_Draw, + /**/ ACTOR_BG_SPOT16_DOUGHNUT, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_EFC_DOUGHNUT, + /**/ sizeof(BgSpot16Doughnut), + /**/ BgSpot16Doughnut_Init, + /**/ BgSpot16Doughnut_Destroy, + /**/ BgSpot16Doughnut_Update, + /**/ BgSpot16Doughnut_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c index 1b5ba7bf65..110fc8ce6f 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c @@ -17,15 +17,15 @@ void BgSpot17Bakudankabe_Update(Actor* thisx, PlayState* play); void BgSpot17Bakudankabe_Draw(Actor* thisx, PlayState* play); ActorInit Bg_Spot17_Bakudankabe_InitVars = { - ACTOR_BG_SPOT17_BAKUDANKABE, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT17_OBJ, - sizeof(BgSpot17Bakudankabe), - (ActorFunc)BgSpot17Bakudankabe_Init, - (ActorFunc)BgSpot17Bakudankabe_Destroy, - (ActorFunc)BgSpot17Bakudankabe_Update, - (ActorFunc)BgSpot17Bakudankabe_Draw, + /**/ ACTOR_BG_SPOT17_BAKUDANKABE, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT17_OBJ, + /**/ sizeof(BgSpot17Bakudankabe), + /**/ BgSpot17Bakudankabe_Init, + /**/ BgSpot17Bakudankabe_Destroy, + /**/ BgSpot17Bakudankabe_Update, + /**/ BgSpot17Bakudankabe_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c index 685b1587d0..d44343d61e 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c +++ b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c @@ -16,15 +16,15 @@ void func_808B746C(Actor* thisx, PlayState* play); void func_808B7478(Actor* thisx, PlayState* play); ActorInit Bg_Spot17_Funen_InitVars = { - ACTOR_BG_SPOT17_FUNEN, - ACTORCAT_SWITCH, - FLAGS, - OBJECT_SPOT17_OBJ, - sizeof(BgSpot17Funen), - (ActorFunc)BgSpot17Funen_Init, - (ActorFunc)BgSpot17Funen_Destroy, - (ActorFunc)BgSpot17Funen_Update, - NULL, + /**/ ACTOR_BG_SPOT17_FUNEN, + /**/ ACTORCAT_SWITCH, + /**/ FLAGS, + /**/ OBJECT_SPOT17_OBJ, + /**/ sizeof(BgSpot17Funen), + /**/ BgSpot17Funen_Init, + /**/ BgSpot17Funen_Destroy, + /**/ BgSpot17Funen_Update, + /**/ NULL, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c index 7557c7a5a4..da478e534d 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c @@ -23,15 +23,15 @@ void func_808B7FC0(BgSpot18Basket* this, PlayState* play); void func_808B81A0(BgSpot18Basket* this, PlayState* play); ActorInit Bg_Spot18_Basket_InitVars = { - ACTOR_BG_SPOT18_BASKET, - ACTORCAT_PROP, - FLAGS, - OBJECT_SPOT18_OBJ, - sizeof(BgSpot18Basket), - (ActorFunc)BgSpot18Basket_Init, - (ActorFunc)BgSpot18Basket_Destroy, - (ActorFunc)BgSpot18Basket_Update, - (ActorFunc)BgSpot18Basket_Draw, + /**/ ACTOR_BG_SPOT18_BASKET, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_SPOT18_OBJ, + /**/ sizeof(BgSpot18Basket), + /**/ BgSpot18Basket_Init, + /**/ BgSpot18Basket_Destroy, + /**/ BgSpot18Basket_Update, + /**/ BgSpot18Basket_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[2] = { diff --git a/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c b/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c index 4ea3519285..158856409d 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c @@ -15,15 +15,15 @@ void BgSpot18Futa_Update(Actor* thisx, PlayState* play); void BgSpot18Futa_Draw(Actor* thisx, PlayState* play); ActorInit Bg_Spot18_Futa_InitVars = { - ACTOR_BG_SPOT18_FUTA, - ACTORCAT_PROP, - FLAGS, - OBJECT_SPOT18_OBJ, - sizeof(BgSpot18Futa), - (ActorFunc)BgSpot18Futa_Init, - (ActorFunc)BgSpot18Futa_Destroy, - (ActorFunc)BgSpot18Futa_Update, - (ActorFunc)BgSpot18Futa_Draw, + /**/ ACTOR_BG_SPOT18_FUTA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_SPOT18_OBJ, + /**/ sizeof(BgSpot18Futa), + /**/ BgSpot18Futa_Init, + /**/ BgSpot18Futa_Destroy, + /**/ BgSpot18Futa_Update, + /**/ BgSpot18Futa_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c index 82c3b10931..5d98d38b0b 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c @@ -31,15 +31,15 @@ void func_808B9030(BgSpot18Obj* this); void func_808B9040(BgSpot18Obj* this, PlayState* play); ActorInit Bg_Spot18_Obj_InitVars = { - ACTOR_BG_SPOT18_OBJ, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT18_OBJ, - sizeof(BgSpot18Obj), - (ActorFunc)BgSpot18Obj_Init, - (ActorFunc)BgSpot18Obj_Destroy, - (ActorFunc)BgSpot18Obj_Update, - (ActorFunc)BgSpot18Obj_Draw, + /**/ ACTOR_BG_SPOT18_OBJ, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT18_OBJ, + /**/ sizeof(BgSpot18Obj), + /**/ BgSpot18Obj_Init, + /**/ BgSpot18Obj_Destroy, + /**/ BgSpot18Obj_Update, + /**/ BgSpot18Obj_Draw, }; static u8 D_808B90F0[2][2] = { { 0x01, 0x01 }, { 0x01, 0x00 } }; diff --git a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c index 61264fc756..c4ce8ce190 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c @@ -21,15 +21,15 @@ void func_808B9698(BgSpot18Shutter* this, PlayState* play); void func_808B971C(BgSpot18Shutter* this, PlayState* play); ActorInit Bg_Spot18_Shutter_InitVars = { - ACTOR_BG_SPOT18_SHUTTER, - ACTORCAT_PROP, - FLAGS, - OBJECT_SPOT18_OBJ, - sizeof(BgSpot18Shutter), - (ActorFunc)BgSpot18Shutter_Init, - (ActorFunc)BgSpot18Shutter_Destroy, - (ActorFunc)BgSpot18Shutter_Update, - (ActorFunc)BgSpot18Shutter_Draw, + /**/ ACTOR_BG_SPOT18_SHUTTER, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_SPOT18_OBJ, + /**/ sizeof(BgSpot18Shutter), + /**/ BgSpot18Shutter_Init, + /**/ BgSpot18Shutter_Destroy, + /**/ BgSpot18Shutter_Update, + /**/ BgSpot18Shutter_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c b/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c index acd27df94e..10dfbeca03 100644 --- a/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c +++ b/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c @@ -17,15 +17,15 @@ void BgSstFloor_Draw(Actor* thisx, PlayState* play); static s32 sUnkValues[] = { 0, 0, 0 }; // Unused, probably a zero vector ActorInit Bg_Sst_Floor_InitVars = { - ACTOR_BG_SST_FLOOR, - ACTORCAT_BG, - FLAGS, - OBJECT_SST, - sizeof(BgSstFloor), - (ActorFunc)BgSstFloor_Init, - (ActorFunc)BgSstFloor_Destroy, - (ActorFunc)BgSstFloor_Update, - (ActorFunc)BgSstFloor_Draw, + /**/ ACTOR_BG_SST_FLOOR, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SST, + /**/ sizeof(BgSstFloor), + /**/ BgSstFloor_Init, + /**/ BgSstFloor_Destroy, + /**/ BgSstFloor_Update, + /**/ BgSstFloor_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c index 0d48d83d05..93d099d4f8 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c +++ b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c @@ -22,15 +22,15 @@ void func_808BA274(BgTokiHikari* this, PlayState* play); void func_808BA2CC(BgTokiHikari* this, PlayState* play); ActorInit Bg_Toki_Hikari_InitVars = { - ACTOR_BG_TOKI_HIKARI, - ACTORCAT_BG, - FLAGS, - OBJECT_TOKI_OBJECTS, - sizeof(BgTokiHikari), - (ActorFunc)BgTokiHikari_Init, - (ActorFunc)BgTokiHikari_Destroy, - (ActorFunc)BgTokiHikari_Update, - (ActorFunc)BgTokiHikari_Draw, + /**/ ACTOR_BG_TOKI_HIKARI, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_TOKI_OBJECTS, + /**/ sizeof(BgTokiHikari), + /**/ BgTokiHikari_Init, + /**/ BgTokiHikari_Destroy, + /**/ BgTokiHikari_Update, + /**/ BgTokiHikari_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c index 011245e483..6a6301b44e 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c @@ -23,15 +23,15 @@ extern CutsceneData D_808BB7A0[]; extern CutsceneData D_808BBD90[]; ActorInit Bg_Toki_Swd_InitVars = { - ACTOR_BG_TOKI_SWD, - ACTORCAT_PROP, - FLAGS, - OBJECT_TOKI_OBJECTS, - sizeof(BgTokiSwd), - (ActorFunc)BgTokiSwd_Init, - (ActorFunc)BgTokiSwd_Destroy, - (ActorFunc)BgTokiSwd_Update, - (ActorFunc)BgTokiSwd_Draw, + /**/ ACTOR_BG_TOKI_SWD, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_TOKI_OBJECTS, + /**/ sizeof(BgTokiSwd), + /**/ BgTokiSwd_Init, + /**/ BgTokiSwd_Destroy, + /**/ BgTokiSwd_Update, + /**/ BgTokiSwd_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c index f5699cae58..d51acdb08f 100644 --- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c +++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c @@ -30,15 +30,15 @@ extern CutsceneData D_808BD520[]; extern CutsceneData D_808BD790[]; ActorInit Bg_Treemouth_InitVars = { - ACTOR_BG_TREEMOUTH, - ACTORCAT_BG, - FLAGS, - OBJECT_SPOT04_OBJECTS, - sizeof(BgTreemouth), - (ActorFunc)BgTreemouth_Init, - (ActorFunc)BgTreemouth_Destroy, - (ActorFunc)BgTreemouth_Update, - (ActorFunc)BgTreemouth_Draw, + /**/ ACTOR_BG_TREEMOUTH, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SPOT04_OBJECTS, + /**/ sizeof(BgTreemouth), + /**/ BgTreemouth_Init, + /**/ BgTreemouth_Destroy, + /**/ BgTreemouth_Update, + /**/ BgTreemouth_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c index 5ab4b6c348..4df2aa2184 100644 --- a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c +++ b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c @@ -15,15 +15,15 @@ void BgUmaJump_Update(Actor* thisx, PlayState* play); void BgUmaJump_Draw(Actor* thisx, PlayState* play); ActorInit Bg_Umajump_InitVars = { - ACTOR_BG_UMAJUMP, - ACTORCAT_PROP, - FLAGS, - OBJECT_UMAJUMP, - sizeof(BgUmaJump), - (ActorFunc)BgUmaJump_Init, - (ActorFunc)BgUmaJump_Destroy, - (ActorFunc)BgUmaJump_Update, - (ActorFunc)BgUmaJump_Draw, + /**/ ACTOR_BG_UMAJUMP, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_UMAJUMP, + /**/ sizeof(BgUmaJump), + /**/ BgUmaJump_Init, + /**/ BgUmaJump_Destroy, + /**/ BgUmaJump_Update, + /**/ BgUmaJump_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c b/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c index 4aec635e11..333cba465f 100644 --- a/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c +++ b/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c @@ -16,15 +16,15 @@ void BgVbSima_Update(Actor* thisx, PlayState* play); void BgVbSima_Draw(Actor* thisx, PlayState* play); ActorInit Bg_Vb_Sima_InitVars = { - ACTOR_BG_VB_SIMA, - ACTORCAT_BG, - FLAGS, - OBJECT_FD, - sizeof(BgVbSima), - (ActorFunc)BgVbSima_Init, - (ActorFunc)BgVbSima_Destroy, - (ActorFunc)BgVbSima_Update, - (ActorFunc)BgVbSima_Draw, + /**/ ACTOR_BG_VB_SIMA, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_FD, + /**/ sizeof(BgVbSima), + /**/ BgVbSima_Init, + /**/ BgVbSima_Destroy, + /**/ BgVbSima_Update, + /**/ BgVbSima_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c index 5556251e57..2a5e051c26 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c @@ -22,15 +22,15 @@ void BgYdanHasi_DecWaterTimer(BgYdanHasi* this, PlayState* play); void BgYdanHasi_UpdateThreeBlocks(BgYdanHasi* this, PlayState* play); ActorInit Bg_Ydan_Hasi_InitVars = { - ACTOR_BG_YDAN_HASI, - ACTORCAT_BG, - FLAGS, - OBJECT_YDAN_OBJECTS, - sizeof(BgYdanHasi), - (ActorFunc)BgYdanHasi_Init, - (ActorFunc)BgYdanHasi_Destroy, - (ActorFunc)BgYdanHasi_Update, - (ActorFunc)BgYdanHasi_Draw, + /**/ ACTOR_BG_YDAN_HASI, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_YDAN_OBJECTS, + /**/ sizeof(BgYdanHasi), + /**/ BgYdanHasi_Init, + /**/ BgYdanHasi_Destroy, + /**/ BgYdanHasi_Update, + /**/ BgYdanHasi_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c index 72848df393..5a5e654cfd 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c @@ -21,15 +21,15 @@ void func_808BF108(BgYdanMaruta* this, PlayState* play); void func_808BF1EC(BgYdanMaruta* this, PlayState* play); ActorInit Bg_Ydan_Maruta_InitVars = { - ACTOR_BG_YDAN_MARUTA, - ACTORCAT_PROP, - FLAGS, - OBJECT_YDAN_OBJECTS, - sizeof(BgYdanMaruta), - (ActorFunc)BgYdanMaruta_Init, - (ActorFunc)BgYdanMaruta_Destroy, - (ActorFunc)BgYdanMaruta_Update, - (ActorFunc)BgYdanMaruta_Draw, + /**/ ACTOR_BG_YDAN_MARUTA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_YDAN_OBJECTS, + /**/ sizeof(BgYdanMaruta), + /**/ BgYdanMaruta_Init, + /**/ BgYdanMaruta_Destroy, + /**/ BgYdanMaruta_Update, + /**/ BgYdanMaruta_Draw, }; static ColliderTrisElementInit sTrisElementsInit[2] = { diff --git a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c index 3c2038d725..81a4bd928e 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c @@ -25,15 +25,15 @@ typedef enum { } BgYdanSpType; ActorInit Bg_Ydan_Sp_InitVars = { - ACTOR_BG_YDAN_SP, - ACTORCAT_BG, - FLAGS, - OBJECT_YDAN_OBJECTS, - sizeof(BgYdanSp), - (ActorFunc)BgYdanSp_Init, - (ActorFunc)BgYdanSp_Destroy, - (ActorFunc)BgYdanSp_Update, - (ActorFunc)BgYdanSp_Draw, + /**/ ACTOR_BG_YDAN_SP, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_YDAN_OBJECTS, + /**/ sizeof(BgYdanSp), + /**/ BgYdanSp_Init, + /**/ BgYdanSp_Destroy, + /**/ BgYdanSp_Update, + /**/ BgYdanSp_Draw, }; static ColliderTrisElementInit sTrisItemsInit[2] = { diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c index f3c629cae8..e6dc1c4b1b 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c @@ -36,15 +36,15 @@ static BgZgDrawFunc sDrawFuncs[] = { }; ActorInit Bg_Zg_InitVars = { - ACTOR_BG_ZG, - ACTORCAT_NPC, - FLAGS, - OBJECT_ZG, - sizeof(BgZg), - (ActorFunc)BgZg_Init, - (ActorFunc)BgZg_Destroy, - (ActorFunc)BgZg_Update, - (ActorFunc)BgZg_Draw, + /**/ ACTOR_BG_ZG, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_ZG, + /**/ sizeof(BgZg), + /**/ BgZg_Init, + /**/ BgZg_Destroy, + /**/ BgZg_Update, + /**/ BgZg_Draw, }; void BgZg_Destroy(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index 5052f2cf07..260bfebaf3 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -34,15 +34,15 @@ void BossDodongo_DrawEffects(PlayState* play); void BossDodongo_UpdateEffects(PlayState* play); ActorInit Boss_Dodongo_InitVars = { - ACTOR_EN_DODONGO, - ACTORCAT_BOSS, - FLAGS, - OBJECT_KINGDODONGO, - sizeof(BossDodongo), - (ActorFunc)BossDodongo_Init, - (ActorFunc)BossDodongo_Destroy, - (ActorFunc)BossDodongo_Update, - (ActorFunc)BossDodongo_Draw, + /**/ ACTOR_EN_DODONGO, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_KINGDODONGO, + /**/ sizeof(BossDodongo), + /**/ BossDodongo_Init, + /**/ BossDodongo_Destroy, + /**/ BossDodongo_Update, + /**/ BossDodongo_Draw, }; #include "z_boss_dodongo_data.inc.c" diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index a00d9d6f3a..fea0dcbf04 100644 --- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -45,15 +45,15 @@ void BossFd_UpdateEffects(BossFd* this, PlayState* play); void BossFd_DrawBody(PlayState* play, BossFd* this); ActorInit Boss_Fd_InitVars = { - ACTOR_BOSS_FD, - ACTORCAT_BOSS, - FLAGS, - OBJECT_FD, - sizeof(BossFd), - (ActorFunc)BossFd_Init, - (ActorFunc)BossFd_Destroy, - (ActorFunc)BossFd_Update, - (ActorFunc)BossFd_Draw, + /**/ ACTOR_BOSS_FD, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_FD, + /**/ sizeof(BossFd), + /**/ BossFd_Init, + /**/ BossFd_Destroy, + /**/ BossFd_Update, + /**/ BossFd_Draw, }; #include "z_boss_fd_colchk.inc.c" diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index ff005b20f6..42c5eb0679 100644 --- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -47,15 +47,15 @@ void BossFd2_Death(BossFd2* this, PlayState* play); void BossFd2_Wait(BossFd2* this, PlayState* play); ActorInit Boss_Fd2_InitVars = { - ACTOR_BOSS_FD2, - ACTORCAT_BOSS, - FLAGS, - OBJECT_FD2, - sizeof(BossFd2), - (ActorFunc)BossFd2_Init, - (ActorFunc)BossFd2_Destroy, - (ActorFunc)BossFd2_Update, - (ActorFunc)BossFd2_Draw, + /**/ ACTOR_BOSS_FD2, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_FD2, + /**/ sizeof(BossFd2), + /**/ BossFd2_Init, + /**/ BossFd2_Destroy, + /**/ BossFd2_Update, + /**/ BossFd2_Draw, }; #include "z_boss_fd2_colchk.inc.c" diff --git a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index 8f9364ba1a..63be6589e7 100644 --- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -46,15 +46,15 @@ void BossGanon_UpdateEffects(PlayState* play); s32 BossGanon_CheckFallingPlatforms(BossGanon* this, PlayState* play, Vec3f* checkPos); ActorInit Boss_Ganon_InitVars = { - ACTOR_BOSS_GANON, - ACTORCAT_BOSS, - FLAGS, - OBJECT_GANON, - sizeof(BossGanon), - (ActorFunc)BossGanon_Init, - (ActorFunc)BossGanon_Destroy, - (ActorFunc)BossGanon_Update, - (ActorFunc)BossGanon_Draw, + /**/ ACTOR_BOSS_GANON, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_GANON, + /**/ sizeof(BossGanon), + /**/ BossGanon_Init, + /**/ BossGanon_Destroy, + /**/ BossGanon_Update, + /**/ BossGanon_Draw, }; static ColliderCylinderInit sDorfCylinderInit = { diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 3393e6f7fe..26b0e741d2 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -33,15 +33,15 @@ void BossGanon2_GenShadowTexture(void* shadowTexture, BossGanon2* this, PlayStat void BossGanon2_DrawShadowTexture(void* shadowTexture, BossGanon2* this, PlayState* play); ActorInit Boss_Ganon2_InitVars = { - ACTOR_BOSS_GANON2, - ACTORCAT_BOSS, - FLAGS, - OBJECT_GANON2, - sizeof(BossGanon2), - (ActorFunc)BossGanon2_Init, - (ActorFunc)BossGanon2_Destroy, - (ActorFunc)BossGanon2_Update, - (ActorFunc)BossGanon2_Draw, + /**/ ACTOR_BOSS_GANON2, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_GANON2, + /**/ sizeof(BossGanon2), + /**/ BossGanon2_Init, + /**/ BossGanon2_Destroy, + /**/ BossGanon2_Update, + /**/ BossGanon2_Draw, }; #include "z_boss_ganon2_data.inc.c" diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index 707c58b276..f817bd62a6 100644 --- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -70,15 +70,15 @@ void BossGanondrof_Stunned(BossGanondrof* this, PlayState* play); void BossGanondrof_Death(BossGanondrof* this, PlayState* play); ActorInit Boss_Ganondrof_InitVars = { - ACTOR_BOSS_GANONDROF, - ACTORCAT_BOSS, - FLAGS, - OBJECT_GND, - sizeof(BossGanondrof), - (ActorFunc)BossGanondrof_Init, - (ActorFunc)BossGanondrof_Destroy, - (ActorFunc)BossGanondrof_Update, - (ActorFunc)BossGanondrof_Draw, + /**/ ACTOR_BOSS_GANONDROF, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_GND, + /**/ sizeof(BossGanondrof), + /**/ BossGanondrof_Init, + /**/ BossGanondrof_Destroy, + /**/ BossGanondrof_Update, + /**/ BossGanondrof_Draw, }; static ColliderCylinderInit sCylinderInitBody = { diff --git a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c index 0a5fa1b6fb..1dad9bafad 100644 --- a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -50,15 +50,15 @@ void BossGoma_CeilingMoveToCenter(BossGoma* this, PlayState* play); void BossGoma_SpawnChildGohma(BossGoma* this, PlayState* play, s16 i); ActorInit Boss_Goma_InitVars = { - ACTOR_BOSS_GOMA, - ACTORCAT_BOSS, - FLAGS, - OBJECT_GOMA, - sizeof(BossGoma), - (ActorFunc)BossGoma_Init, - (ActorFunc)BossGoma_Destroy, - (ActorFunc)BossGoma_Update, - (ActorFunc)BossGoma_Draw, + /**/ ACTOR_BOSS_GOMA, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_GOMA, + /**/ sizeof(BossGoma), + /**/ BossGoma_Init, + /**/ BossGoma_Destroy, + /**/ BossGoma_Update, + /**/ BossGoma_Draw, }; static ColliderJntSphElementInit sColliderJntSphElementInit[13] = { diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index 36e377b149..d6378b1225 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -119,15 +119,15 @@ typedef enum { } BossMoCsState; ActorInit Boss_Mo_InitVars = { - ACTOR_BOSS_MO, - ACTORCAT_BOSS, - FLAGS, - OBJECT_MO, - sizeof(BossMo), - (ActorFunc)BossMo_Init, - (ActorFunc)BossMo_Destroy, - (ActorFunc)BossMo_UpdateTent, - (ActorFunc)BossMo_DrawTent, + /**/ ACTOR_BOSS_MO, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_MO, + /**/ sizeof(BossMo), + /**/ BossMo_Init, + /**/ BossMo_Destroy, + /**/ BossMo_UpdateTent, + /**/ BossMo_DrawTent, }; static BossMo* sMorphaCore = NULL; diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 3e56af4ec9..1a0c1326eb 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -235,15 +235,15 @@ static Color_RGBA8 sStaticColor = { 0, 0, 0, 255 }; static s32 sHandState[] = { HAND_WAIT, HAND_WAIT }; ActorInit Boss_Sst_InitVars = { - ACTOR_BOSS_SST, - ACTORCAT_BOSS, - FLAGS, - OBJECT_SST, - sizeof(BossSst), - (ActorFunc)BossSst_Init, - (ActorFunc)BossSst_Destroy, - (ActorFunc)BossSst_UpdateHand, - (ActorFunc)BossSst_DrawHand, + /**/ ACTOR_BOSS_SST, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_SST, + /**/ sizeof(BossSst), + /**/ BossSst_Init, + /**/ BossSst_Destroy, + /**/ BossSst_UpdateHand, + /**/ BossSst_DrawHand, }; #include "z_boss_sst_colchk.inc.c" diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index 89aebcbf82..7507ab62df 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -117,15 +117,15 @@ void BossTw_TwinrovaSetupSpin(BossTw* this, PlayState* play); void BossTw_UpdateEffects(PlayState* play); ActorInit Boss_Tw_InitVars = { - ACTOR_BOSS_TW, - ACTORCAT_BOSS, - FLAGS, - OBJECT_TW, - sizeof(BossTw), - (ActorFunc)BossTw_Init, - (ActorFunc)BossTw_Destroy, - (ActorFunc)BossTw_Update, - (ActorFunc)BossTw_Draw, + /**/ ACTOR_BOSS_TW, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_TW, + /**/ sizeof(BossTw), + /**/ BossTw_Init, + /**/ BossTw_Destroy, + /**/ BossTw_Update, + /**/ BossTw_Draw, }; static Vec3f D_8094A7D0 = { 0.0f, 0.0f, 1000.0f }; diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 51b29d720c..136d0548de 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -189,15 +189,15 @@ void BossVa_Tumor(PlayState* play, BossVa* this, s32 count, s16 scale, f32 xzSpr u8 fixed); ActorInit Boss_Va_InitVars = { - ACTOR_BOSS_VA, - ACTORCAT_BOSS, - FLAGS, - OBJECT_BV, - sizeof(BossVa), - (ActorFunc)BossVa_Init, - (ActorFunc)BossVa_Destroy, - (ActorFunc)BossVa_Update, - (ActorFunc)BossVa_Draw, + /**/ ACTOR_BOSS_VA, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_BV, + /**/ sizeof(BossVa), + /**/ BossVa_Init, + /**/ BossVa_Destroy, + /**/ BossVa_Update, + /**/ BossVa_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c index 83f03c30e7..2960be3daa 100644 --- a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c +++ b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c @@ -38,15 +38,15 @@ void func_80968FB0(Actor* thisx, PlayState* play); void func_809691BC(Demo6K* this, PlayState* play, s32 cueChannel); ActorInit Demo_6K_InitVars = { - ACTOR_DEMO_6K, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(Demo6K), - (ActorFunc)Demo6K_Init, - (ActorFunc)Demo6K_Destroy, - (ActorFunc)Demo6K_Update, - NULL, + /**/ ACTOR_DEMO_6K, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(Demo6K), + /**/ Demo6K_Init, + /**/ Demo6K_Destroy, + /**/ Demo6K_Update, + /**/ NULL, }; static s16 sObjectIds[] = { diff --git a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c index 112c318088..0704094a0f 100644 --- a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c +++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c @@ -1034,13 +1034,13 @@ void DemoDu_Draw(Actor* thisx, PlayState* play) { } ActorInit Demo_Du_InitVars = { - ACTOR_DEMO_DU, - ACTORCAT_NPC, - FLAGS, - OBJECT_DU, - sizeof(DemoDu), - (ActorFunc)DemoDu_Init, - (ActorFunc)DemoDu_Destroy, - (ActorFunc)DemoDu_Update, - (ActorFunc)DemoDu_Draw, + /**/ ACTOR_DEMO_DU, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_DU, + /**/ sizeof(DemoDu), + /**/ DemoDu_Init, + /**/ DemoDu_Destroy, + /**/ DemoDu_Update, + /**/ DemoDu_Draw, }; diff --git a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c index fd63ace9f8..21fd5b5565 100644 --- a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c +++ b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c @@ -1368,13 +1368,13 @@ void DemoEc_Draw(Actor* thisx, PlayState* play) { } ActorInit Demo_Ec_InitVars = { - ACTOR_DEMO_EC, - ACTORCAT_NPC, - FLAGS, - OBJECT_EC, - sizeof(DemoEc), - (ActorFunc)DemoEc_Init, - (ActorFunc)DemoEc_Destroy, - (ActorFunc)DemoEc_Update, - (ActorFunc)DemoEc_Draw, + /**/ ACTOR_DEMO_EC, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_EC, + /**/ sizeof(DemoEc), + /**/ DemoEc_Init, + /**/ DemoEc_Destroy, + /**/ DemoEc_Update, + /**/ DemoEc_Draw, }; diff --git a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c index 3456f28f12..2c26c42fa2 100644 --- a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -63,15 +63,15 @@ void DemoEffect_SetPosRotFromCue(DemoEffect* this, PlayState* play, s32 cueChann void DemoEffect_MoveTowardCuePos(DemoEffect* this, PlayState* play, s32 cueChannel, f32 speed); ActorInit Demo_Effect_InitVars = { - ACTOR_DEMO_EFFECT, - ACTORCAT_BG, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(DemoEffect), - (ActorFunc)DemoEffect_Init, - (ActorFunc)DemoEffect_Destroy, - (ActorFunc)DemoEffect_Update, - NULL, + /**/ ACTOR_DEMO_EFFECT, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(DemoEffect), + /**/ DemoEffect_Init, + /**/ DemoEffect_Destroy, + /**/ DemoEffect_Update, + /**/ NULL, }; // This variable assures only one jewel will play SFX diff --git a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c index d7272f0f3e..91d3ec4041 100644 --- a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c +++ b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c @@ -235,13 +235,13 @@ void DemoExt_Draw(Actor* thisx, PlayState* play) { } ActorInit Demo_Ext_InitVars = { - ACTOR_DEMO_EXT, - ACTORCAT_NPC, - FLAGS, - OBJECT_FHG, - sizeof(DemoExt), - (ActorFunc)DemoExt_Init, - (ActorFunc)DemoExt_Destroy, - (ActorFunc)DemoExt_Update, - (ActorFunc)DemoExt_Draw, + /**/ ACTOR_DEMO_EXT, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_FHG, + /**/ sizeof(DemoExt), + /**/ DemoExt_Init, + /**/ DemoExt_Destroy, + /**/ DemoExt_Update, + /**/ DemoExt_Draw, }; diff --git a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c index 6ce5d38aba..ec8770ec56 100644 --- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c +++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c @@ -43,15 +43,15 @@ static DemoGeffDrawFunc sDrawFuncs[] = { }; ActorInit Demo_Geff_InitVars = { - ACTOR_DEMO_GEFF, - ACTORCAT_BOSS, - FLAGS, - OBJECT_GEFF, - sizeof(DemoGeff), - (ActorFunc)DemoGeff_Init, - (ActorFunc)DemoGeff_Destroy, - (ActorFunc)DemoGeff_Update, - (ActorFunc)DemoGeff_Draw, + /**/ ACTOR_DEMO_GEFF, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_GEFF, + /**/ sizeof(DemoGeff), + /**/ DemoGeff_Init, + /**/ DemoGeff_Destroy, + /**/ DemoGeff_Update, + /**/ DemoGeff_Draw, }; void DemoGeff_Destroy(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c index e0a3f97def..cfc48d9ec0 100644 --- a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c +++ b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c @@ -1445,13 +1445,13 @@ void DemoGj_Draw(Actor* thisx, PlayState* play) { } ActorInit Demo_Gj_InitVars = { - ACTOR_DEMO_GJ, - ACTORCAT_PROP, - FLAGS, - OBJECT_GJ, - sizeof(DemoGj), - (ActorFunc)DemoGj_Init, - (ActorFunc)DemoGj_Destroy, - (ActorFunc)DemoGj_Update, - (ActorFunc)DemoGj_Draw, + /**/ ACTOR_DEMO_GJ, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GJ, + /**/ sizeof(DemoGj), + /**/ DemoGj_Init, + /**/ DemoGj_Destroy, + /**/ DemoGj_Update, + /**/ DemoGj_Draw, }; diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c index f4771071cf..59675db2ad 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -38,15 +38,15 @@ static DemoGoDrawFunc D_8097D468[] = { }; ActorInit Demo_Go_InitVars = { - ACTOR_DEMO_GO, - ACTORCAT_NPC, - FLAGS, - OBJECT_OF1D_MAP, - sizeof(DemoGo), - (ActorFunc)DemoGo_Init, - (ActorFunc)DemoGo_Destroy, - (ActorFunc)DemoGo_Update, - (ActorFunc)DemoGo_Draw, + /**/ ACTOR_DEMO_GO, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_OF1D_MAP, + /**/ sizeof(DemoGo), + /**/ DemoGo_Init, + /**/ DemoGo_Destroy, + /**/ DemoGo_Update, + /**/ DemoGo_Draw, }; s32 DemoGo_GetCueChannel(DemoGo* this) { diff --git a/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c b/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c index adba6544c5..4f2b85b39e 100644 --- a/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c +++ b/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c @@ -1769,13 +1769,13 @@ void DemoGt_Draw(Actor* thisx, PlayState* play) { } ActorInit Demo_Gt_InitVars = { - ACTOR_DEMO_GT, - ACTORCAT_PROP, - FLAGS, - OBJECT_GT, - sizeof(DemoGt), - (ActorFunc)DemoGt_Init, - (ActorFunc)DemoGt_Destroy, - (ActorFunc)DemoGt_Update, - (ActorFunc)DemoGt_Draw, + /**/ ACTOR_DEMO_GT, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GT, + /**/ sizeof(DemoGt), + /**/ DemoGt_Init, + /**/ DemoGt_Destroy, + /**/ DemoGt_Update, + /**/ DemoGt_Draw, }; diff --git a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c index 42cbf7e4d1..94f20a63fd 100644 --- a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c +++ b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c @@ -501,15 +501,15 @@ void DemoIk_Draw(Actor* thisx, PlayState* play) { } ActorInit Demo_Ik_InitVars = { - ACTOR_DEMO_IK, - ACTORCAT_NPC, - FLAGS, - OBJECT_IK, - sizeof(DemoIk), - (ActorFunc)DemoIk_Init, - (ActorFunc)DemoIk_Destroy, - (ActorFunc)DemoIk_Update, - (ActorFunc)DemoIk_Draw, + /**/ ACTOR_DEMO_IK, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_IK, + /**/ sizeof(DemoIk), + /**/ DemoIk_Init, + /**/ DemoIk_Destroy, + /**/ DemoIk_Update, + /**/ DemoIk_Draw, }; void DemoIk_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index 9079d4f39b..b765fc413c 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -92,15 +92,15 @@ static DemoImDrawFunc sDrawFuncs[] = { }; ActorInit Demo_Im_InitVars = { - ACTOR_DEMO_IM, - ACTORCAT_NPC, - FLAGS, - OBJECT_IM, - sizeof(DemoIm), - (ActorFunc)DemoIm_Init, - (ActorFunc)DemoIm_Destroy, - (ActorFunc)DemoIm_Update, - (ActorFunc)DemoIm_Draw, + /**/ ACTOR_DEMO_IM, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_IM, + /**/ sizeof(DemoIm), + /**/ DemoIm_Init, + /**/ DemoIm_Destroy, + /**/ DemoIm_Update, + /**/ DemoIm_Draw, }; void func_80984BE0(DemoIm* this) { diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c index 7d392ba0ae..9baad8188e 100644 --- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c +++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c @@ -41,15 +41,15 @@ extern CutsceneData gChildWarpInToTCS[]; extern CutsceneData gChildWarpOutToTCS[]; ActorInit Demo_Kankyo_InitVars = { - ACTOR_DEMO_KANKYO, - ACTORCAT_BG, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(DemoKankyo), - (ActorFunc)DemoKankyo_Init, - (ActorFunc)DemoKankyo_Destroy, - (ActorFunc)DemoKankyo_Update, - (ActorFunc)DemoKankyo_Draw, + /**/ ACTOR_DEMO_KANKYO, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(DemoKankyo), + /**/ DemoKankyo_Init, + /**/ DemoKankyo_Destroy, + /**/ DemoKankyo_Update, + /**/ DemoKankyo_Draw, }; static s16 sObjectIds[] = { diff --git a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c index 5cbb131e80..c63e4d578b 100644 --- a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c +++ b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c @@ -22,15 +22,15 @@ void DemoKekkai_DrawTrialBarrier(Actor* thisx, PlayState* play2); void DemoKekkai_TowerBarrier(DemoKekkai* this, PlayState* play); ActorInit Demo_Kekkai_InitVars = { - ACTOR_DEMO_KEKKAI, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_DEMO_KEKKAI, - sizeof(DemoKekkai), - (ActorFunc)DemoKekkai_Init, - (ActorFunc)DemoKekkai_Destroy, - (ActorFunc)DemoKekkai_Update, - (ActorFunc)DemoKekkai_DrawTowerBarrier, + /**/ ACTOR_DEMO_KEKKAI, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_DEMO_KEKKAI, + /**/ sizeof(DemoKekkai), + /**/ DemoKekkai_Init, + /**/ DemoKekkai_Destroy, + /**/ DemoKekkai_Update, + /**/ DemoKekkai_DrawTowerBarrier, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c index 04cc3506d5..45882e5fc2 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c @@ -87,15 +87,15 @@ static DemoSaDrawFunc sDrawFuncs[] = { }; ActorInit Demo_Sa_InitVars = { - ACTOR_DEMO_SA, - ACTORCAT_NPC, - FLAGS, - OBJECT_SA, - sizeof(DemoSa), - (ActorFunc)DemoSa_Init, - (ActorFunc)DemoSa_Destroy, - (ActorFunc)DemoSa_Update, - (ActorFunc)DemoSa_Draw, + /**/ ACTOR_DEMO_SA, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_SA, + /**/ sizeof(DemoSa), + /**/ DemoSa_Init, + /**/ DemoSa_Destroy, + /**/ DemoSa_Update, + /**/ DemoSa_Draw, }; void DemoSa_Destroy(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c index 703ae8dfdd..c54b8e1939 100644 --- a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c +++ b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c @@ -16,15 +16,15 @@ void DemoShd_Draw(Actor* thisx, PlayState* play); void func_80991298(DemoShd* this, PlayState* play); ActorInit Demo_Shd_InitVars = { - ACTOR_DEMO_SHD, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(DemoShd), - (ActorFunc)DemoShd_Init, - (ActorFunc)DemoShd_Destroy, - (ActorFunc)DemoShd_Update, - (ActorFunc)DemoShd_Draw, + /**/ ACTOR_DEMO_SHD, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(DemoShd), + /**/ DemoShd_Init, + /**/ DemoShd_Destroy, + /**/ DemoShd_Update, + /**/ DemoShd_Draw, }; #include "assets/overlays/ovl_Demo_Shd/ovl_Demo_Shd.c" diff --git a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c index 89729ce34e..71756f75cc 100644 --- a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c +++ b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c @@ -27,15 +27,15 @@ static DemoTreLgtInfo sDemoTreLgtInfo[] = { }; ActorInit Demo_Tre_Lgt_InitVars = { - ACTOR_DEMO_TRE_LGT, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_BOX, - sizeof(DemoTreLgt), - (ActorFunc)DemoTreLgt_Init, - (ActorFunc)DemoTreLgt_Destroy, - (ActorFunc)DemoTreLgt_Update, - (ActorFunc)DemoTreLgt_Draw, + /**/ ACTOR_DEMO_TRE_LGT, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_BOX, + /**/ sizeof(DemoTreLgt), + /**/ DemoTreLgt_Init, + /**/ DemoTreLgt_Destroy, + /**/ DemoTreLgt_Update, + /**/ DemoTreLgt_Draw, }; static CurveAnimationHeader* sAnimations[] = { &gTreasureChestCurveAnim_4B60, &gTreasureChestCurveAnim_4F70 }; diff --git a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c index 80645b2d97..4434285c33 100644 --- a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c +++ b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c @@ -19,15 +19,15 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play); void DoorAna_GrabPlayer(DoorAna* this, PlayState* play); ActorInit Door_Ana_InitVars = { - ACTOR_DOOR_ANA, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_FIELD_KEEP, - sizeof(DoorAna), - (ActorFunc)DoorAna_Init, - (ActorFunc)DoorAna_Destroy, - (ActorFunc)DoorAna_Update, - (ActorFunc)DoorAna_Draw, + /**/ ACTOR_DOOR_ANA, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_FIELD_KEEP, + /**/ sizeof(DoorAna), + /**/ DoorAna_Init, + /**/ DoorAna_Destroy, + /**/ DoorAna_Update, + /**/ DoorAna_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c index f5c8ede1c8..0bbbedb25d 100644 --- a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c +++ b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c @@ -20,15 +20,15 @@ void func_8099496C(DoorGerudo* this, PlayState* play); void func_809949C8(DoorGerudo* this, PlayState* play); ActorInit Door_Gerudo_InitVars = { - ACTOR_DOOR_GERUDO, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_DOOR_GERUDO, - sizeof(DoorGerudo), - (ActorFunc)DoorGerudo_Init, - (ActorFunc)DoorGerudo_Destroy, - (ActorFunc)DoorGerudo_Update, - (ActorFunc)DoorGerudo_Draw, + /**/ ACTOR_DOOR_GERUDO, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_DOOR_GERUDO, + /**/ sizeof(DoorGerudo), + /**/ DoorGerudo_Init, + /**/ DoorGerudo_Destroy, + /**/ DoorGerudo_Update, + /**/ DoorGerudo_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c index 9e4225ea9c..1f4aeb2ce5 100644 --- a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c +++ b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c @@ -30,15 +30,15 @@ void DoorKiller_DrawDoor(Actor* thisx, PlayState* play); void DoorKiller_DrawRubble(Actor* thisx, PlayState* play); ActorInit Door_Killer_InitVars = { - ACTOR_DOOR_KILLER, - ACTORCAT_BG, - FLAGS, - OBJECT_DOOR_KILLER, - sizeof(DoorKiller), - (ActorFunc)DoorKiller_Init, - (ActorFunc)DoorKiller_Destroy, - (ActorFunc)DoorKiller_Update, - NULL, + /**/ ACTOR_DOOR_KILLER, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_DOOR_KILLER, + /**/ sizeof(DoorKiller), + /**/ DoorKiller_Init, + /**/ DoorKiller_Destroy, + /**/ DoorKiller_Update, + /**/ NULL, }; static ColliderCylinderInit sCylinderInit = { 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 80f181065e..c6d59d5ae8 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -49,15 +49,15 @@ void DoorShutter_GohmaBlockBounce(DoorShutter* this, PlayState* play); void DoorShutter_PhantomGanonBarsRaise(DoorShutter* this, PlayState* play); ActorInit Door_Shutter_InitVars = { - ACTOR_DOOR_SHUTTER, - ACTORCAT_DOOR, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(DoorShutter), - (ActorFunc)DoorShutter_Init, - (ActorFunc)DoorShutter_Destroy, - (ActorFunc)DoorShutter_Update, - (ActorFunc)DoorShutter_Draw, + /**/ ACTOR_DOOR_SHUTTER, + /**/ ACTORCAT_DOOR, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(DoorShutter), + /**/ DoorShutter_Init, + /**/ DoorShutter_Destroy, + /**/ DoorShutter_Update, + /**/ DoorShutter_Draw, }; typedef enum { diff --git a/src/overlays/actors/ovl_Door_Toki/z_door_toki.c b/src/overlays/actors/ovl_Door_Toki/z_door_toki.c index 2b383ee729..726f0f5d1d 100644 --- a/src/overlays/actors/ovl_Door_Toki/z_door_toki.c +++ b/src/overlays/actors/ovl_Door_Toki/z_door_toki.c @@ -14,15 +14,15 @@ void DoorToki_Destroy(Actor* thisx, PlayState* play); void DoorToki_Update(Actor* thisx, PlayState* play); ActorInit Door_Toki_InitVars = { - ACTOR_DOOR_TOKI, - ACTORCAT_BG, - FLAGS, - OBJECT_TOKI_OBJECTS, - sizeof(DoorToki), - (ActorFunc)DoorToki_Init, - (ActorFunc)DoorToki_Destroy, - (ActorFunc)DoorToki_Update, - NULL, + /**/ ACTOR_DOOR_TOKI, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_TOKI_OBJECTS, + /**/ sizeof(DoorToki), + /**/ DoorToki_Init, + /**/ DoorToki_Destroy, + /**/ DoorToki_Update, + /**/ NULL, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index 3082fbb56f..f821d1530e 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -33,15 +33,15 @@ void DoorWarp1_ChooseInitialAction(DoorWarp1* this, PlayState* play); void DoorWarp1_FloatPlayer(DoorWarp1* this, PlayState* play); ActorInit Door_Warp1_InitVars = { - ACTOR_DOOR_WARP1, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_WARP1, - sizeof(DoorWarp1), - (ActorFunc)DoorWarp1_Init, - (ActorFunc)DoorWarp1_Destroy, - (ActorFunc)DoorWarp1_Update, - (ActorFunc)DoorWarp1_Draw, + /**/ ACTOR_DOOR_WARP1, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_WARP1, + /**/ sizeof(DoorWarp1), + /**/ DoorWarp1_Init, + /**/ DoorWarp1_Destroy, + /**/ DoorWarp1_Update, + /**/ DoorWarp1_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c index 1764d4671c..18834e87ea 100644 --- a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c +++ b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c @@ -15,15 +15,15 @@ void EfcErupc_SpawnEffect(EfcErupcEffect* effect, Vec3f* pos, Vec3f* vel, Vec3f* void EfcErupc_InitEffects(EfcErupcEffect* effect); ActorInit Efc_Erupc_InitVars = { - ACTOR_EFC_ERUPC, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_EFC_ERUPC, - sizeof(EfcErupc), - (ActorFunc)EfcErupc_Init, - (ActorFunc)EfcErupc_Destroy, - (ActorFunc)EfcErupc_Update, - (ActorFunc)EfcErupc_Draw, + /**/ ACTOR_EFC_ERUPC, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_EFC_ERUPC, + /**/ sizeof(EfcErupc), + /**/ EfcErupc_Init, + /**/ EfcErupc_Destroy, + /**/ EfcErupc_Update, + /**/ EfcErupc_Draw, }; void EfcErupc_SetupAction(EfcErupc* this, EfcErupcActionFunc actionFunc) { diff --git a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c index 96c95aa740..4cef29b868 100644 --- a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c +++ b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c @@ -23,15 +23,15 @@ void EffDust_DrawFunc_8099E4F4(Actor* thisx, PlayState* play2); void EffDust_DrawFunc_8099E784(Actor* thisx, PlayState* play2); ActorInit Eff_Dust_InitVars = { - ACTOR_EFF_DUST, - ACTORCAT_NPC, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EffDust), - (ActorFunc)EffDust_Init, - (ActorFunc)EffDust_Destroy, - (ActorFunc)EffDust_Update, - (ActorFunc)EffDust_Draw, + /**/ ACTOR_EFF_DUST, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EffDust), + /**/ EffDust_Init, + /**/ EffDust_Destroy, + /**/ EffDust_Update, + /**/ EffDust_Draw, }; static Gfx sEmptyDL[] = { diff --git a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c index 58610fe1b0..42b8a279bd 100644 --- a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c +++ b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c @@ -19,15 +19,15 @@ void ElfMsg_CallNaviCuboid(ElfMsg* this, PlayState* play); void ElfMsg_CallNaviCylinder(ElfMsg* this, PlayState* play); ActorInit Elf_Msg_InitVars = { - ACTOR_ELF_MSG, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ElfMsg), - (ActorFunc)ElfMsg_Init, - (ActorFunc)ElfMsg_Destroy, - (ActorFunc)ElfMsg_Update, - (ActorFunc)ElfMsg_Draw, + /**/ ACTOR_ELF_MSG, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ElfMsg), + /**/ ElfMsg_Init, + /**/ ElfMsg_Destroy, + /**/ ElfMsg_Update, + /**/ ElfMsg_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c index 7311d3cb6c..e23ae04aca 100644 --- a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c +++ b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c @@ -19,15 +19,15 @@ void ElfMsg2_WaitUntilActivated(ElfMsg2* this, PlayState* play); void ElfMsg2_WaitForTextRead(ElfMsg2* this, PlayState* play); ActorInit Elf_Msg2_InitVars = { - ACTOR_ELF_MSG2, - ACTORCAT_BG, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ElfMsg2), - (ActorFunc)ElfMsg2_Init, - (ActorFunc)ElfMsg2_Destroy, - (ActorFunc)ElfMsg2_Update, - (ActorFunc)ElfMsg2_Draw, + /**/ ACTOR_ELF_MSG2, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ElfMsg2), + /**/ ElfMsg2_Init, + /**/ ElfMsg2_Destroy, + /**/ ElfMsg2_Update, + /**/ ElfMsg2_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_En_Am/z_en_am.c b/src/overlays/actors/ovl_En_Am/z_en_am.c index e40bf546d0..64cca6b7e2 100644 --- a/src/overlays/actors/ovl_En_Am/z_en_am.c +++ b/src/overlays/actors/ovl_En_Am/z_en_am.c @@ -40,15 +40,15 @@ typedef enum { } ArmosBehavior; ActorInit En_Am_InitVars = { - ACTOR_EN_AM, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_AM, - sizeof(EnAm), - (ActorFunc)EnAm_Init, - (ActorFunc)EnAm_Destroy, - (ActorFunc)EnAm_Update, - (ActorFunc)EnAm_Draw, + /**/ ACTOR_EN_AM, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_AM, + /**/ sizeof(EnAm), + /**/ EnAm_Init, + /**/ EnAm_Destroy, + /**/ EnAm_Update, + /**/ EnAm_Draw, }; static ColliderCylinderInit sHurtCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/src/overlays/actors/ovl_En_Ani/z_en_ani.c index 12e44c1d31..b99ad607c5 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c @@ -27,15 +27,15 @@ void func_809B0A28(EnAni* this, PlayState* play); void func_809B0A6C(EnAni* this, PlayState* play); ActorInit En_Ani_InitVars = { - ACTOR_EN_ANI, - ACTORCAT_NPC, - FLAGS, - OBJECT_ANI, - sizeof(EnAni), - (ActorFunc)EnAni_Init, - (ActorFunc)EnAni_Destroy, - (ActorFunc)EnAni_Update, - (ActorFunc)EnAni_Draw, + /**/ ACTOR_EN_ANI, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_ANI, + /**/ sizeof(EnAni), + /**/ EnAni_Init, + /**/ EnAni_Destroy, + /**/ EnAni_Update, + /**/ EnAni_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c b/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c index fde25a0f38..9339c56b5c 100644 --- a/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c +++ b/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c @@ -26,15 +26,15 @@ void EnAnubice_ShootFireball(EnAnubice* this, PlayState* play); void EnAnubice_Die(EnAnubice* this, PlayState* play); ActorInit En_Anubice_InitVars = { - ACTOR_EN_ANUBICE, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_ANUBICE, - sizeof(EnAnubice), - (ActorFunc)EnAnubice_Init, - (ActorFunc)EnAnubice_Destroy, - (ActorFunc)EnAnubice_Update, - (ActorFunc)EnAnubice_Draw, + /**/ ACTOR_EN_ANUBICE, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_ANUBICE, + /**/ sizeof(EnAnubice), + /**/ EnAnubice_Init, + /**/ EnAnubice_Destroy, + /**/ EnAnubice_Update, + /**/ EnAnubice_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c index 288bf4d771..dbd4f3b670 100644 --- a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c +++ b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c @@ -20,15 +20,15 @@ void func_809B27D8(EnAnubiceFire* this, PlayState* play); void func_809B2B48(EnAnubiceFire* this, PlayState* play); ActorInit En_Anubice_Fire_InitVars = { - ACTOR_EN_ANUBICE_FIRE, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_ANUBICE, - sizeof(EnAnubiceFire), - (ActorFunc)EnAnubiceFire_Init, - (ActorFunc)EnAnubiceFire_Destroy, - (ActorFunc)EnAnubiceFire_Update, - (ActorFunc)EnAnubiceFire_Draw, + /**/ ACTOR_EN_ANUBICE_FIRE, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_ANUBICE, + /**/ sizeof(EnAnubiceFire), + /**/ EnAnubiceFire_Init, + /**/ EnAnubiceFire_Destroy, + /**/ EnAnubiceFire_Update, + /**/ EnAnubiceFire_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c b/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c index 35826f06b4..81792d596b 100644 --- a/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c +++ b/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c @@ -18,15 +18,15 @@ void EnAnubiceTag_SpawnAnubis(EnAnubiceTag* this, PlayState* play); void EnAnubiceTag_ManageAnubis(EnAnubiceTag* this, PlayState* play); ActorInit En_Anubice_Tag_InitVars = { - ACTOR_EN_ANUBICE_TAG, - ACTORCAT_SWITCH, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnAnubiceTag), - (ActorFunc)EnAnubiceTag_Init, - (ActorFunc)EnAnubiceTag_Destroy, - (ActorFunc)EnAnubiceTag_Update, - (ActorFunc)EnAnubiceTag_Draw, + /**/ ACTOR_EN_ANUBICE_TAG, + /**/ ACTORCAT_SWITCH, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnAnubiceTag), + /**/ EnAnubiceTag_Init, + /**/ EnAnubiceTag_Destroy, + /**/ EnAnubiceTag_Update, + /**/ EnAnubiceTag_Draw, }; void EnAnubiceTag_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c b/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c index d93e8ba9ba..84bed0a06e 100644 --- a/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c +++ b/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c @@ -13,15 +13,15 @@ void EnArowTrap_Destroy(Actor* thisx, PlayState* play); void EnArowTrap_Update(Actor* thisx, PlayState* play); ActorInit En_Arow_Trap_InitVars = { - ACTOR_EN_AROW_TRAP, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnArowTrap), - (ActorFunc)EnArowTrap_Init, - (ActorFunc)EnArowTrap_Destroy, - (ActorFunc)EnArowTrap_Update, - NULL, + /**/ ACTOR_EN_AROW_TRAP, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnArowTrap), + /**/ EnArowTrap_Init, + /**/ EnArowTrap_Destroy, + /**/ EnArowTrap_Update, + /**/ NULL, }; void EnArowTrap_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c index 4a7310377c..fafaaa5aaa 100644 --- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -20,15 +20,15 @@ void func_809B45E0(EnArrow* this, PlayState* play); void func_809B4640(EnArrow* this, PlayState* play); ActorInit En_Arrow_InitVars = { - ACTOR_EN_ARROW, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnArrow), - (ActorFunc)EnArrow_Init, - (ActorFunc)EnArrow_Destroy, - (ActorFunc)EnArrow_Update, - (ActorFunc)EnArrow_Draw, + /**/ ACTOR_EN_ARROW, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnArrow), + /**/ EnArrow_Init, + /**/ EnArrow_Destroy, + /**/ EnArrow_Update, + /**/ EnArrow_Draw, }; static ColliderQuadInit sColliderInit = { diff --git a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c index 78df59cff2..c5c4392382 100644 --- a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c +++ b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c @@ -20,15 +20,15 @@ void func_809B5C18(EnAttackNiw* this, PlayState* play); void func_809B59B0(EnAttackNiw* this, PlayState* play); ActorInit En_Attack_Niw_InitVars = { - ACTOR_EN_ATTACK_NIW, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_NIW, - sizeof(EnAttackNiw), - (ActorFunc)EnAttackNiw_Init, - (ActorFunc)EnAttackNiw_Destroy, - (ActorFunc)EnAttackNiw_Update, - (ActorFunc)EnAttackNiw_Draw, + /**/ ACTOR_EN_ATTACK_NIW, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_NIW, + /**/ sizeof(EnAttackNiw), + /**/ EnAttackNiw_Init, + /**/ EnAttackNiw_Destroy, + /**/ EnAttackNiw_Update, + /**/ EnAttackNiw_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_En_Ba/z_en_ba.c b/src/overlays/actors/ovl_En_Ba/z_en_ba.c index dd52141fd2..cdbbb60ee5 100644 --- a/src/overlays/actors/ovl_En_Ba/z_en_ba.c +++ b/src/overlays/actors/ovl_En_Ba/z_en_ba.c @@ -24,15 +24,15 @@ void EnBa_Die(EnBa* this, PlayState* play); void EnBa_SetupSwingAtPlayer(EnBa* this); ActorInit En_Ba_InitVars = { - ACTOR_EN_BA, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_BXA, - sizeof(EnBa), - (ActorFunc)EnBa_Init, - (ActorFunc)EnBa_Destroy, - (ActorFunc)EnBa_Update, - (ActorFunc)EnBa_Draw, + /**/ ACTOR_EN_BA, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_BXA, + /**/ sizeof(EnBa), + /**/ EnBa_Init, + /**/ EnBa_Destroy, + /**/ EnBa_Update, + /**/ EnBa_Draw, }; static Vec3f D_809B8080 = { 0.0f, 0.0f, 32.0f }; diff --git a/src/overlays/actors/ovl_En_Bb/z_en_bb.c b/src/overlays/actors/ovl_En_Bb/z_en_bb.c index c431e53e68..534f38646e 100644 --- a/src/overlays/actors/ovl_En_Bb/z_en_bb.c +++ b/src/overlays/actors/ovl_En_Bb/z_en_bb.c @@ -196,15 +196,15 @@ static DamageTable sDamageTableWhite = { }; ActorInit En_Bb_InitVars = { - ACTOR_EN_BB, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_BB, - sizeof(EnBb), - (ActorFunc)EnBb_Init, - (ActorFunc)EnBb_Destroy, - (ActorFunc)EnBb_Update, - (ActorFunc)EnBb_Draw, + /**/ ACTOR_EN_BB, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_BB, + /**/ sizeof(EnBb), + /**/ EnBb_Init, + /**/ EnBb_Destroy, + /**/ EnBb_Update, + /**/ EnBb_Draw, }; static ColliderJntSphElementInit sJntSphElementInit[1] = { diff --git a/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c b/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c index 6ff70278dd..488df41f58 100644 --- a/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c +++ b/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c @@ -19,15 +19,15 @@ void func_809BC2A4(EnBdfire* this, PlayState* play); void func_809BC598(EnBdfire* this, PlayState* play); ActorInit En_Bdfire_InitVars = { - 0, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_KINGDODONGO, - sizeof(EnBdfire), - (ActorFunc)EnBdfire_Init, - (ActorFunc)EnBdfire_Destroy, - (ActorFunc)EnBdfire_Update, - (ActorFunc)EnBdfire_Draw, + /**/ 0, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_KINGDODONGO, + /**/ sizeof(EnBdfire), + /**/ EnBdfire_Init, + /**/ EnBdfire_Destroy, + /**/ EnBdfire_Update, + /**/ EnBdfire_Draw, }; void EnBdfire_SetupAction(EnBdfire* this, EnBdfireActionFunc actionFunc) { diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c index 81b4fa2638..3df1f4505b 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -31,15 +31,15 @@ static Color_RGBA8 sEffectEnvColor = { 100, 255, 255, 255 }; static Vec3f sEffectPosAccel = { 0.0f, 0.0f, 0.0f }; ActorInit En_Bigokuta_InitVars = { - ACTOR_EN_BIGOKUTA, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_BIGOKUTA, - sizeof(EnBigokuta), - (ActorFunc)EnBigokuta_Init, - (ActorFunc)EnBigokuta_Destroy, - (ActorFunc)EnBigokuta_Update, - (ActorFunc)EnBigokuta_Draw, + /**/ ACTOR_EN_BIGOKUTA, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_BIGOKUTA, + /**/ sizeof(EnBigokuta), + /**/ EnBigokuta_Init, + /**/ EnBigokuta_Destroy, + /**/ EnBigokuta_Update, + /**/ EnBigokuta_Draw, }; static ColliderJntSphElementInit sJntSphElementInit[1] = { diff --git a/src/overlays/actors/ovl_En_Bili/z_en_bili.c b/src/overlays/actors/ovl_En_Bili/z_en_bili.c index c17222b966..16865616bf 100644 --- a/src/overlays/actors/ovl_En_Bili/z_en_bili.c +++ b/src/overlays/actors/ovl_En_Bili/z_en_bili.c @@ -29,15 +29,15 @@ void EnBili_Stunned(EnBili* this, PlayState* play); void EnBili_Frozen(EnBili* this, PlayState* play); ActorInit En_Bili_InitVars = { - ACTOR_EN_BILI, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_BL, - sizeof(EnBili), - (ActorFunc)EnBili_Init, - (ActorFunc)EnBili_Destroy, - (ActorFunc)EnBili_Update, - (ActorFunc)EnBili_Draw, + /**/ ACTOR_EN_BILI, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_BL, + /**/ sizeof(EnBili), + /**/ EnBili_Init, + /**/ EnBili_Destroy, + /**/ EnBili_Update, + /**/ EnBili_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Bird/z_en_bird.c b/src/overlays/actors/ovl_En_Bird/z_en_bird.c index 709c934176..77db59284c 100644 --- a/src/overlays/actors/ovl_En_Bird/z_en_bird.c +++ b/src/overlays/actors/ovl_En_Bird/z_en_bird.c @@ -20,15 +20,15 @@ void EnBird_Idle(EnBird* this, PlayState* play); void EnBird_SetupIdle(EnBird* this, s16 params); ActorInit En_Bird_InitVars = { - ACTOR_EN_BIRD, - ACTORCAT_PROP, - FLAGS, - OBJECT_BIRD, - sizeof(EnBird), - (ActorFunc)EnBird_Init, - (ActorFunc)EnBird_Destroy, - (ActorFunc)EnBird_Update, - (ActorFunc)EnBird_Draw, + /**/ ACTOR_EN_BIRD, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_BIRD, + /**/ sizeof(EnBird), + /**/ EnBird_Init, + /**/ EnBird_Destroy, + /**/ EnBird_Update, + /**/ EnBird_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c index 69dd9e64af..6cf2378760 100644 --- a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c +++ b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c @@ -20,15 +20,15 @@ void EnBlkobj_DarkLinkFight(EnBlkobj* this, PlayState* play); void EnBlkobj_DoNothing(EnBlkobj* this, PlayState* play); ActorInit En_Blkobj_InitVars = { - ACTOR_EN_BLKOBJ, - ACTORCAT_PROP, - FLAGS, - OBJECT_BLKOBJ, - sizeof(EnBlkobj), - (ActorFunc)EnBlkobj_Init, - (ActorFunc)EnBlkobj_Destroy, - (ActorFunc)EnBlkobj_Update, - (ActorFunc)EnBlkobj_Draw, + /**/ ACTOR_EN_BLKOBJ, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_BLKOBJ, + /**/ sizeof(EnBlkobj), + /**/ EnBlkobj_Init, + /**/ EnBlkobj_Destroy, + /**/ EnBlkobj_Update, + /**/ EnBlkobj_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index 83ed079505..6b66b69a61 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -19,15 +19,15 @@ void EnBom_Move(EnBom* this, PlayState* play); void EnBom_WaitForRelease(EnBom* this, PlayState* play); ActorInit En_Bom_InitVars = { - ACTOR_EN_BOM, - ACTORCAT_EXPLOSIVE, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnBom), - (ActorFunc)EnBom_Init, - (ActorFunc)EnBom_Destroy, - (ActorFunc)EnBom_Update, - (ActorFunc)EnBom_Draw, + /**/ ACTOR_EN_BOM, + /**/ ACTORCAT_EXPLOSIVE, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnBom), + /**/ EnBom_Init, + /**/ EnBom_Destroy, + /**/ EnBom_Update, + /**/ EnBom_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c index 711c634144..8dd80549a9 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c @@ -35,15 +35,15 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, PlayState* play); void EnBomBowlMan_BeginPlayGame(EnBomBowlMan* this, PlayState* play); ActorInit En_Bom_Bowl_Man_InitVars = { - ACTOR_EN_BOM_BOWL_MAN, - ACTORCAT_NPC, - FLAGS, - OBJECT_BG, - sizeof(EnBomBowlMan), - (ActorFunc)EnBomBowlMan_Init, - (ActorFunc)EnBomBowlMan_Destroy, - (ActorFunc)EnBomBowlMan_Update, - (ActorFunc)EnBomBowlMan_Draw, + /**/ ACTOR_EN_BOM_BOWL_MAN, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_BG, + /**/ sizeof(EnBomBowlMan), + /**/ EnBomBowlMan_Init, + /**/ EnBomBowlMan_Destroy, + /**/ EnBomBowlMan_Update, + /**/ EnBomBowlMan_Draw, }; void EnBomBowlMan_Init(Actor* thisx, PlayState* play2) { diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c index e7f64cb915..d0d3a916a1 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c @@ -21,15 +21,15 @@ void EnBomBowlPit_Reset(EnBomBowlPit* this, PlayState* play); static s32 sGetItemIds[] = { GI_BOMB_BAG_30, GI_HEART_PIECE, GI_BOMBCHUS_10, GI_BOMBS_1, GI_RUPEE_PURPLE }; ActorInit En_Bom_Bowl_Pit_InitVars = { - ACTOR_EN_BOM_BOWL_PIT, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnBomBowlPit), - (ActorFunc)EnBomBowlPit_Init, - (ActorFunc)EnBomBowlPit_Destroy, - (ActorFunc)EnBomBowlPit_Update, - NULL, + /**/ ACTOR_EN_BOM_BOWL_PIT, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnBomBowlPit), + /**/ EnBomBowlPit_Init, + /**/ EnBomBowlPit_Destroy, + /**/ EnBomBowlPit_Update, + /**/ NULL, }; void EnBomBowlPit_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c index 07fd4e75b5..96c66a7919 100644 --- a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c +++ b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c @@ -16,15 +16,15 @@ void EnBomChu_Move(EnBomChu* this, PlayState* play); void EnBomChu_WaitForKill(EnBomChu* this, PlayState* play); ActorInit En_Bom_Chu_InitVars = { - ACTOR_EN_BOM_CHU, - ACTORCAT_EXPLOSIVE, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnBomChu), - (ActorFunc)EnBomChu_Init, - (ActorFunc)EnBomChu_Destroy, - (ActorFunc)EnBomChu_Update, - (ActorFunc)EnBomChu_Draw, + /**/ ACTOR_EN_BOM_CHU, + /**/ ACTORCAT_EXPLOSIVE, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnBomChu), + /**/ EnBomChu_Init, + /**/ EnBomChu_Destroy, + /**/ EnBomChu_Update, + /**/ EnBomChu_Draw, }; static ColliderJntSphElementInit sJntSphElemInit[] = { diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index 01b5434580..b6ef1afc8e 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -22,15 +22,15 @@ void EnBombf_Explode(EnBombf* this, PlayState* play); void EnBombf_SetupGrowBomb(EnBombf* this, s16 params); ActorInit En_Bombf_InitVars = { - ACTOR_EN_BOMBF, - ACTORCAT_PROP, - FLAGS, - OBJECT_BOMBF, - sizeof(EnBombf), - (ActorFunc)EnBombf_Init, - (ActorFunc)EnBombf_Destroy, - (ActorFunc)EnBombf_Update, - (ActorFunc)EnBombf_Draw, + /**/ ACTOR_EN_BOMBF, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_BOMBF, + /**/ sizeof(EnBombf), + /**/ EnBombf_Init, + /**/ EnBombf_Destroy, + /**/ EnBombf_Update, + /**/ EnBombf_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.c b/src/overlays/actors/ovl_En_Boom/z_en_boom.c index 4f406212ea..a3dcbd3a13 100644 --- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c +++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c @@ -17,15 +17,15 @@ void EnBoom_Draw(Actor* thisx, PlayState* play); void EnBoom_Fly(EnBoom* this, PlayState* play); ActorInit En_Boom_InitVars = { - ACTOR_EN_BOOM, - ACTORCAT_MISC, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnBoom), - (ActorFunc)EnBoom_Init, - (ActorFunc)EnBoom_Destroy, - (ActorFunc)EnBoom_Update, - (ActorFunc)EnBoom_Draw, + /**/ ACTOR_EN_BOOM, + /**/ ACTORCAT_MISC, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnBoom), + /**/ EnBoom_Init, + /**/ EnBoom_Destroy, + /**/ EnBoom_Update, + /**/ EnBoom_Draw, }; static ColliderQuadInit sQuadInit = { diff --git a/src/overlays/actors/ovl_En_Box/z_en_box.c b/src/overlays/actors/ovl_En_Box/z_en_box.c index 5db893a295..0ddd1f5abd 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -51,15 +51,15 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play); void EnBox_Open(EnBox* this, PlayState* play); ActorInit En_Box_InitVars = { - ACTOR_EN_BOX, - ACTORCAT_CHEST, - FLAGS, - OBJECT_BOX, - sizeof(EnBox), - (ActorFunc)EnBox_Init, - (ActorFunc)EnBox_Destroy, - (ActorFunc)EnBox_Update, - (ActorFunc)EnBox_Draw, + /**/ ACTOR_EN_BOX, + /**/ ACTORCAT_CHEST, + /**/ FLAGS, + /**/ OBJECT_BOX, + /**/ sizeof(EnBox), + /**/ EnBox_Init, + /**/ EnBox_Destroy, + /**/ EnBox_Update, + /**/ EnBox_Draw, }; static AnimationHeader* sAnimations[4] = { &gTreasureChestAnim_00024C, &gTreasureChestAnim_000128, diff --git a/src/overlays/actors/ovl_En_Brob/z_en_brob.c b/src/overlays/actors/ovl_En_Brob/z_en_brob.c index 75df7135af..0915fe72b6 100644 --- a/src/overlays/actors/ovl_En_Brob/z_en_brob.c +++ b/src/overlays/actors/ovl_En_Brob/z_en_brob.c @@ -23,15 +23,15 @@ void func_809CB354(EnBrob* this, PlayState* play); void func_809CB458(EnBrob* this, PlayState* play); ActorInit En_Brob_InitVars = { - ACTOR_EN_BROB, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_BROB, - sizeof(EnBrob), - (ActorFunc)EnBrob_Init, - (ActorFunc)EnBrob_Destroy, - (ActorFunc)EnBrob_Update, - (ActorFunc)EnBrob_Draw, + /**/ ACTOR_EN_BROB, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_BROB, + /**/ sizeof(EnBrob), + /**/ EnBrob_Init, + /**/ EnBrob_Destroy, + /**/ EnBrob_Update, + /**/ EnBrob_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c index ebadc0f29a..2e1ea90dd3 100644 --- a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c +++ b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c @@ -13,15 +13,15 @@ void EnBubble_Pop(EnBubble* this, PlayState* play); void EnBubble_Regrow(EnBubble* this, PlayState* play); ActorInit En_Bubble_InitVars = { - ACTOR_EN_BUBBLE, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_BUBBLE, - sizeof(EnBubble), - (ActorFunc)EnBubble_Init, - (ActorFunc)EnBubble_Destroy, - (ActorFunc)EnBubble_Update, - (ActorFunc)EnBubble_Draw, + /**/ ACTOR_EN_BUBBLE, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_BUBBLE, + /**/ sizeof(EnBubble), + /**/ EnBubble_Init, + /**/ EnBubble_Destroy, + /**/ EnBubble_Update, + /**/ EnBubble_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[2] = { diff --git a/src/overlays/actors/ovl_En_Butte/z_en_butte.c b/src/overlays/actors/ovl_En_Butte/z_en_butte.c index 01fa059c3c..09d8474499 100644 --- a/src/overlays/actors/ovl_En_Butte/z_en_butte.c +++ b/src/overlays/actors/ovl_En_Butte/z_en_butte.c @@ -50,15 +50,15 @@ static ColliderJntSphInit sColliderInit = { }; ActorInit En_Butte_InitVars = { - ACTOR_EN_BUTTE, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_FIELD_KEEP, - sizeof(EnButte), - (ActorFunc)EnButte_Init, - (ActorFunc)EnButte_Destroy, - (ActorFunc)EnButte_Update, - (ActorFunc)EnButte_Draw, + /**/ ACTOR_EN_BUTTE, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_FIELD_KEEP, + /**/ sizeof(EnButte), + /**/ EnButte_Init, + /**/ EnButte_Destroy, + /**/ EnButte_Update, + /**/ EnButte_Draw, }; typedef struct { diff --git a/src/overlays/actors/ovl_En_Bw/z_en_bw.c b/src/overlays/actors/ovl_En_Bw/z_en_bw.c index 75965618eb..134546cc04 100644 --- a/src/overlays/actors/ovl_En_Bw/z_en_bw.c +++ b/src/overlays/actors/ovl_En_Bw/z_en_bw.c @@ -34,15 +34,15 @@ void func_809D03CC(EnBw* this); void func_809D0424(EnBw* this, PlayState* play); ActorInit En_Bw_InitVars = { - ACTOR_EN_BW, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_BW, - sizeof(EnBw), - (ActorFunc)EnBw_Init, - (ActorFunc)EnBw_Destroy, - (ActorFunc)EnBw_Update, - (ActorFunc)EnBw_Draw, + /**/ ACTOR_EN_BW, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_BW, + /**/ sizeof(EnBw), + /**/ EnBw_Init, + /**/ EnBw_Destroy, + /**/ EnBw_Update, + /**/ EnBw_Draw, }; static ColliderCylinderInit sCylinderInit1 = { diff --git a/src/overlays/actors/ovl_En_Bx/z_en_bx.c b/src/overlays/actors/ovl_En_Bx/z_en_bx.c index 4a186f2db7..4edc2e7abc 100644 --- a/src/overlays/actors/ovl_En_Bx/z_en_bx.c +++ b/src/overlays/actors/ovl_En_Bx/z_en_bx.c @@ -15,15 +15,15 @@ void EnBx_Update(Actor* thisx, PlayState* play); void EnBx_Draw(Actor* thisx, PlayState* play); ActorInit En_Bx_InitVars = { - ACTOR_EN_BX, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_BXA, - sizeof(EnBx), - (ActorFunc)EnBx_Init, - (ActorFunc)EnBx_Destroy, - (ActorFunc)EnBx_Update, - (ActorFunc)EnBx_Draw, + /**/ ACTOR_EN_BX, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_BXA, + /**/ sizeof(EnBx), + /**/ EnBx_Init, + /**/ EnBx_Destroy, + /**/ EnBx_Update, + /**/ EnBx_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Changer/z_en_changer.c b/src/overlays/actors/ovl_En_Changer/z_en_changer.c index 38594039e7..f1cd4baf36 100644 --- a/src/overlays/actors/ovl_En_Changer/z_en_changer.c +++ b/src/overlays/actors/ovl_En_Changer/z_en_changer.c @@ -25,15 +25,15 @@ void EnChanger_OpenChests(EnChanger* this, PlayState* play); void EnChanger_SetHeartPieceFlag(EnChanger* this, PlayState* play); ActorInit En_Changer_InitVars = { - ACTOR_EN_CHANGER, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnChanger), - (ActorFunc)EnChanger_Init, - (ActorFunc)EnChanger_Destroy, - (ActorFunc)EnChanger_Update, - NULL, + /**/ ACTOR_EN_CHANGER, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnChanger), + /**/ EnChanger_Init, + /**/ EnChanger_Destroy, + /**/ EnChanger_Update, + /**/ NULL, }; static Vec3f sLeftChestPos[] = { diff --git a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c index b6636d63d0..b3dd3a9046 100644 --- a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c +++ b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c @@ -19,15 +19,15 @@ void EnClearTag_CreateFlashEffect(PlayState* play, Vec3f* position, f32 scale, f void EnClearTag_CalculateFloorTangent(EnClearTag* this); ActorInit En_Clear_Tag_InitVars = { - ACTOR_EN_CLEAR_TAG, - ACTORCAT_BOSS, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnClearTag), - (ActorFunc)EnClearTag_Init, - (ActorFunc)EnClearTag_Destroy, - (ActorFunc)EnClearTag_Update, - (ActorFunc)EnClearTag_Draw, + /**/ ACTOR_EN_CLEAR_TAG, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnClearTag), + /**/ EnClearTag_Init, + /**/ EnClearTag_Destroy, + /**/ EnClearTag_Update, + /**/ EnClearTag_Draw, }; static u8 sIsEffectsInitialized = false; diff --git a/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/src/overlays/actors/ovl_En_Cow/z_en_cow.c index 0f42827ed0..753789fc06 100644 --- a/src/overlays/actors/ovl_En_Cow/z_en_cow.c +++ b/src/overlays/actors/ovl_En_Cow/z_en_cow.c @@ -27,15 +27,15 @@ void EnCow_UpdateTail(Actor* thisx, PlayState* play); void EnCow_IdleTail(EnCow* this, PlayState* play); ActorInit En_Cow_InitVars = { - ACTOR_EN_COW, - ACTORCAT_NPC, - FLAGS, - OBJECT_COW, - sizeof(EnCow), - (ActorFunc)EnCow_Init, - (ActorFunc)EnCow_Destroy, - (ActorFunc)EnCow_Update, - (ActorFunc)EnCow_Draw, + /**/ ACTOR_EN_COW, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_COW, + /**/ sizeof(EnCow), + /**/ EnCow_Init, + /**/ EnCow_Destroy, + /**/ EnCow_Update, + /**/ EnCow_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Crow/z_en_crow.c b/src/overlays/actors/ovl_En_Crow/z_en_crow.c index 76644f9358..4fc86e4abf 100644 --- a/src/overlays/actors/ovl_En_Crow/z_en_crow.c +++ b/src/overlays/actors/ovl_En_Crow/z_en_crow.c @@ -19,15 +19,15 @@ void EnCrow_Damaged(EnCrow* this, PlayState* play); static Vec3f sZeroVecAccel = { 0.0f, 0.0f, 0.0f }; ActorInit En_Crow_InitVars = { - ACTOR_EN_CROW, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_CROW, - sizeof(EnCrow), - (ActorFunc)EnCrow_Init, - (ActorFunc)EnCrow_Destroy, - (ActorFunc)EnCrow_Update, - (ActorFunc)EnCrow_Draw, + /**/ ACTOR_EN_CROW, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_CROW, + /**/ sizeof(EnCrow), + /**/ EnCrow_Init, + /**/ EnCrow_Destroy, + /**/ EnCrow_Update, + /**/ EnCrow_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[1] = { diff --git a/src/overlays/actors/ovl_En_Cs/z_en_cs.c b/src/overlays/actors/ovl_En_Cs/z_en_cs.c index 1268c94467..9cf4ff513f 100644 --- a/src/overlays/actors/ovl_En_Cs/z_en_cs.c +++ b/src/overlays/actors/ovl_En_Cs/z_en_cs.c @@ -16,15 +16,15 @@ s32 EnCs_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po void EnCs_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx); ActorInit En_Cs_InitVars = { - ACTOR_EN_CS, - ACTORCAT_NPC, - FLAGS, - OBJECT_CS, - sizeof(EnCs), - (ActorFunc)EnCs_Init, - (ActorFunc)EnCs_Destroy, - (ActorFunc)EnCs_Update, - (ActorFunc)EnCs_Draw, + /**/ ACTOR_EN_CS, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_CS, + /**/ sizeof(EnCs), + /**/ EnCs_Init, + /**/ EnCs_Destroy, + /**/ EnCs_Update, + /**/ EnCs_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index 68e170f3d6..9db7e0f153 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -42,15 +42,15 @@ s32 EnDaiku_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, void EnDaiku_PostLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3s* rot, void* thisx); ActorInit En_Daiku_InitVars = { - ACTOR_EN_DAIKU, - ACTORCAT_NPC, - FLAGS, - OBJECT_DAIKU, - sizeof(EnDaiku), - (ActorFunc)EnDaiku_Init, - (ActorFunc)EnDaiku_Destroy, - (ActorFunc)EnDaiku_Update, - (ActorFunc)EnDaiku_Draw, + /**/ ACTOR_EN_DAIKU, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_DAIKU, + /**/ sizeof(EnDaiku), + /**/ EnDaiku_Init, + /**/ EnDaiku_Destroy, + /**/ EnDaiku_Update, + /**/ EnDaiku_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c index 1f21ece101..34d408726b 100644 --- a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c +++ b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c @@ -25,15 +25,15 @@ void EnDaikuKakariko_Wait(EnDaikuKakariko* this, PlayState* play); void EnDaikuKakariko_Run(EnDaikuKakariko* this, PlayState* play); ActorInit En_Daiku_Kakariko_InitVars = { - ACTOR_EN_DAIKU_KAKARIKO, - ACTORCAT_NPC, - FLAGS, - OBJECT_DAIKU, - sizeof(EnDaikuKakariko), - (ActorFunc)EnDaikuKakariko_Init, - (ActorFunc)EnDaikuKakariko_Destroy, - (ActorFunc)EnDaikuKakariko_Update, - (ActorFunc)EnDaikuKakariko_Draw, + /**/ ACTOR_EN_DAIKU_KAKARIKO, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_DAIKU, + /**/ sizeof(EnDaikuKakariko), + /**/ EnDaikuKakariko_Init, + /**/ EnDaikuKakariko_Destroy, + /**/ EnDaikuKakariko_Update, + /**/ EnDaikuKakariko_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c index 8759a244c3..9d38b020a0 100644 --- a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c +++ b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c @@ -30,15 +30,15 @@ void EnDekubaba_DeadStickDrop(EnDekubaba* this, PlayState* play); static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f }; ActorInit En_Dekubaba_InitVars = { - ACTOR_EN_DEKUBABA, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_DEKUBABA, - sizeof(EnDekubaba), - (ActorFunc)EnDekubaba_Init, - (ActorFunc)EnDekubaba_Destroy, - (ActorFunc)EnDekubaba_Update, - (ActorFunc)EnDekubaba_Draw, + /**/ ACTOR_EN_DEKUBABA, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_DEKUBABA, + /**/ sizeof(EnDekubaba), + /**/ EnDekubaba_Init, + /**/ EnDekubaba_Destroy, + /**/ EnDekubaba_Update, + /**/ EnDekubaba_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[7] = { diff --git a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c index dfb8eafa7b..34c47992ad 100644 --- a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c +++ b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c @@ -31,15 +31,15 @@ void EnDekunuts_BeStunned(EnDekunuts* this, PlayState* play); void EnDekunuts_Die(EnDekunuts* this, PlayState* play); ActorInit En_Dekunuts_InitVars = { - ACTOR_EN_DEKUNUTS, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_DEKUNUTS, - sizeof(EnDekunuts), - (ActorFunc)EnDekunuts_Init, - (ActorFunc)EnDekunuts_Destroy, - (ActorFunc)EnDekunuts_Update, - (ActorFunc)EnDekunuts_Draw, + /**/ ACTOR_EN_DEKUNUTS, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_DEKUNUTS, + /**/ sizeof(EnDekunuts), + /**/ EnDekunuts_Init, + /**/ EnDekunuts_Destroy, + /**/ EnDekunuts_Update, + /**/ EnDekunuts_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Dh/z_en_dh.c b/src/overlays/actors/ovl_En_Dh/z_en_dh.c index 9c8ba1ab0f..c37d382e44 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -32,15 +32,15 @@ void EnDh_Damage(EnDh* this, PlayState* play); void EnDh_Death(EnDh* this, PlayState* play); ActorInit En_Dh_InitVars = { - ACTOR_EN_DH, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_DH, - sizeof(EnDh), - (ActorFunc)EnDh_Init, - (ActorFunc)EnDh_Destroy, - (ActorFunc)EnDh_Update, - (ActorFunc)EnDh_Draw, + /**/ ACTOR_EN_DH, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_DH, + /**/ sizeof(EnDh), + /**/ EnDh_Init, + /**/ EnDh_Destroy, + /**/ EnDh_Update, + /**/ EnDh_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Dha/z_en_dha.c b/src/overlays/actors/ovl_En_Dha/z_en_dha.c index 5a3bf71fc7..b78ff72600 100644 --- a/src/overlays/actors/ovl_En_Dha/z_en_dha.c +++ b/src/overlays/actors/ovl_En_Dha/z_en_dha.c @@ -24,15 +24,15 @@ void EnDha_Die(EnDha* this, PlayState* play); void EnDha_UpdateHealth(EnDha* this, PlayState* play); ActorInit En_Dha_InitVars = { - ACTOR_EN_DHA, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_DH, - sizeof(EnDha), - (ActorFunc)EnDha_Init, - (ActorFunc)EnDha_Destroy, - (ActorFunc)EnDha_Update, - (ActorFunc)EnDha_Draw, + /**/ ACTOR_EN_DHA, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_DH, + /**/ sizeof(EnDha), + /**/ EnDha_Init, + /**/ EnDha_Destroy, + /**/ EnDha_Update, + /**/ EnDha_Draw, }; static DamageTable sDamageTable = { diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c index aa60b480d0..7661c016aa 100644 --- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c +++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c @@ -34,15 +34,15 @@ void func_809EEA90(EnDivingGame* this, PlayState* play); void func_809EEAF8(EnDivingGame* this, PlayState* play); ActorInit En_Diving_Game_InitVars = { - ACTOR_EN_DIVING_GAME, - ACTORCAT_NPC, - FLAGS, - OBJECT_ZO, - sizeof(EnDivingGame), - (ActorFunc)EnDivingGame_Init, - (ActorFunc)EnDivingGame_Destroy, - (ActorFunc)EnDivingGame_Update, - (ActorFunc)EnDivingGame_Draw, + /**/ ACTOR_EN_DIVING_GAME, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_ZO, + /**/ sizeof(EnDivingGame), + /**/ EnDivingGame_Init, + /**/ EnDivingGame_Destroy, + /**/ EnDivingGame_Update, + /**/ EnDivingGame_Draw, }; // used to ensure there's only one instance of this actor. diff --git a/src/overlays/actors/ovl_En_Dns/z_en_dns.c b/src/overlays/actors/ovl_En_Dns/z_en_dns.c index 67727d95fe..073b6fa37f 100644 --- a/src/overlays/actors/ovl_En_Dns/z_en_dns.c +++ b/src/overlays/actors/ovl_En_Dns/z_en_dns.c @@ -43,15 +43,15 @@ void EnDns_Burrow(EnDns* this, PlayState* play); void EnDns_PostBurrow(EnDns* this, PlayState* play); ActorInit En_Dns_InitVars = { - ACTOR_EN_DNS, - ACTORCAT_BG, - FLAGS, - OBJECT_SHOPNUTS, - sizeof(EnDns), - (ActorFunc)EnDns_Init, - (ActorFunc)EnDns_Destroy, - (ActorFunc)EnDns_Update, - (ActorFunc)EnDns_Draw, + /**/ ACTOR_EN_DNS, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SHOPNUTS, + /**/ sizeof(EnDns), + /**/ EnDns_Init, + /**/ EnDns_Destroy, + /**/ EnDns_Update, + /**/ EnDns_Draw, }; static ColliderCylinderInitType1 sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c b/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c index 7586fb5cbc..6c735690b0 100644 --- a/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c +++ b/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c @@ -27,15 +27,15 @@ void EnDntDemo_Results(EnDntDemo* this, PlayState* play); void EnDntDemo_Prize(EnDntDemo* this, PlayState* play); ActorInit En_Dnt_Demo_InitVars = { - ACTOR_EN_DNT_DEMO, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnDntDemo), - (ActorFunc)EnDntDemo_Init, - (ActorFunc)EnDntDemo_Destroy, - (ActorFunc)EnDntDemo_Update, - NULL, + /**/ ACTOR_EN_DNT_DEMO, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnDntDemo), + /**/ EnDntDemo_Init, + /**/ EnDntDemo_Destroy, + /**/ EnDntDemo_Update, + /**/ NULL, }; //! @bug diff --git a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c index 508538e467..bde6fb5733 100644 --- a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c +++ b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c @@ -40,15 +40,15 @@ void EnDntJiji_Hide(EnDntJiji* this, PlayState* play); void EnDntJiji_Return(EnDntJiji* this, PlayState* play); ActorInit En_Dnt_Jiji_InitVars = { - ACTOR_EN_DNT_JIJI, - ACTORCAT_NPC, - FLAGS, - OBJECT_DNS, - sizeof(EnDntJiji), - (ActorFunc)EnDntJiji_Init, - (ActorFunc)EnDntJiji_Destroy, - (ActorFunc)EnDntJiji_Update, - (ActorFunc)EnDntJiji_Draw, + /**/ ACTOR_EN_DNT_JIJI, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_DNS, + /**/ sizeof(EnDntJiji), + /**/ EnDntJiji_Init, + /**/ EnDntJiji_Destroy, + /**/ EnDntJiji_Update, + /**/ EnDntJiji_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c index 9e00c8eddf..93170b1d83 100644 --- a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c +++ b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c @@ -57,15 +57,15 @@ void EnDntNomal_StageAttack(EnDntNomal* this, PlayState* play); void EnDntNomal_StageReturn(EnDntNomal* this, PlayState* play); ActorInit En_Dnt_Nomal_InitVars = { - ACTOR_EN_DNT_NOMAL, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnDntNomal), - (ActorFunc)EnDntNomal_Init, - (ActorFunc)EnDntNomal_Destroy, - (ActorFunc)EnDntNomal_Update, - NULL, + /**/ ACTOR_EN_DNT_NOMAL, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnDntNomal), + /**/ EnDntNomal_Init, + /**/ EnDntNomal_Destroy, + /**/ EnDntNomal_Update, + /**/ NULL, }; static ColliderCylinderInit sBodyCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c b/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c index 852941ec7d..e3f78aee65 100644 --- a/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c +++ b/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c @@ -32,15 +32,15 @@ void EnDodojr_WaitFreezeFrames(EnDodojr* this, PlayState* play); void EnDodojr_EatBomb(EnDodojr* this, PlayState* play); ActorInit En_Dodojr_InitVars = { - ACTOR_EN_DODOJR, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_DODOJR, - sizeof(EnDodojr), - (ActorFunc)EnDodojr_Init, - (ActorFunc)EnDodojr_Destroy, - (ActorFunc)EnDodojr_Update, - (ActorFunc)EnDodojr_Draw, + /**/ ACTOR_EN_DODOJR, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_DODOJR, + /**/ sizeof(EnDodojr), + /**/ EnDodojr_Init, + /**/ EnDodojr_Destroy, + /**/ EnDodojr_Update, + /**/ EnDodojr_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c index 7c6a067441..55b860222c 100644 --- a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c +++ b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c @@ -37,15 +37,15 @@ void EnDodongo_Death(EnDodongo* this, PlayState* play); void EnDodongo_SweepTail(EnDodongo* this, PlayState* play); ActorInit En_Dodongo_InitVars = { - ACTOR_EN_DODONGO, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_DODONGO, - sizeof(EnDodongo), - (ActorFunc)EnDodongo_Init, - (ActorFunc)EnDodongo_Destroy, - (ActorFunc)EnDodongo_Update, - (ActorFunc)EnDodongo_Draw, + /**/ ACTOR_EN_DODONGO, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_DODONGO, + /**/ sizeof(EnDodongo), + /**/ EnDodongo_Init, + /**/ EnDodongo_Destroy, + /**/ EnDodongo_Update, + /**/ EnDodongo_Draw, }; static ColliderJntSphElementInit sBodyElementsInit[6] = { diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index fd3c3e70bc..ab7e624862 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -22,15 +22,15 @@ void EnDog_FaceLink(EnDog* this, PlayState* play); void EnDog_Wait(EnDog* this, PlayState* play); ActorInit En_Dog_InitVars = { - ACTOR_EN_DOG, - ACTORCAT_NPC, - FLAGS, - OBJECT_DOG, - sizeof(EnDog), - (ActorFunc)EnDog_Init, - (ActorFunc)EnDog_Destroy, - (ActorFunc)EnDog_Update, - (ActorFunc)EnDog_Draw, + /**/ ACTOR_EN_DOG, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_DOG, + /**/ sizeof(EnDog), + /**/ EnDog_Init, + /**/ EnDog_Destroy, + /**/ EnDog_Update, + /**/ EnDog_Draw, }; static ColliderCylinderInit sCylinderInit = { 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 c3216cdc80..310858034f 100644 --- a/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -33,15 +33,15 @@ void EnDoor_AjarClose(EnDoor* this, PlayState* play); void EnDoor_Open(EnDoor* this, PlayState* play); ActorInit En_Door_InitVars = { - ACTOR_EN_DOOR, - ACTORCAT_DOOR, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnDoor), - (ActorFunc)EnDoor_Init, - (ActorFunc)EnDoor_Destroy, - (ActorFunc)EnDoor_Update, - (ActorFunc)EnDoor_Draw, + /**/ ACTOR_EN_DOOR, + /**/ ACTORCAT_DOOR, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnDoor), + /**/ EnDoor_Init, + /**/ EnDoor_Destroy, + /**/ EnDoor_Update, + /**/ EnDoor_Draw, }; typedef struct { diff --git a/src/overlays/actors/ovl_En_Ds/z_en_ds.c b/src/overlays/actors/ovl_En_Ds/z_en_ds.c index 49a359cd40..2dbde60d04 100644 --- a/src/overlays/actors/ovl_En_Ds/z_en_ds.c +++ b/src/overlays/actors/ovl_En_Ds/z_en_ds.c @@ -17,15 +17,15 @@ void EnDs_Draw(Actor* thisx, PlayState* play); void EnDs_Wait(EnDs* this, PlayState* play); ActorInit En_Ds_InitVars = { - ACTOR_EN_DS, - ACTORCAT_NPC, - FLAGS, - OBJECT_DS, - sizeof(EnDs), - (ActorFunc)EnDs_Init, - (ActorFunc)EnDs_Destroy, - (ActorFunc)EnDs_Update, - (ActorFunc)EnDs_Draw, + /**/ ACTOR_EN_DS, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_DS, + /**/ sizeof(EnDs), + /**/ EnDs_Init, + /**/ EnDs_Destroy, + /**/ EnDs_Update, + /**/ EnDs_Draw, }; void EnDs_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c index 269b447e32..8c80e10a05 100644 --- a/src/overlays/actors/ovl_En_Du/z_en_du.c +++ b/src/overlays/actors/ovl_En_Du/z_en_du.c @@ -23,15 +23,15 @@ void func_809FECE4(EnDu* this, PlayState* play); void func_809FEB08(EnDu* this, PlayState* play); ActorInit En_Du_InitVars = { - ACTOR_EN_DU, - ACTORCAT_NPC, - FLAGS, - OBJECT_DU, - sizeof(EnDu), - (ActorFunc)EnDu_Init, - (ActorFunc)EnDu_Destroy, - (ActorFunc)EnDu_Update, - (ActorFunc)EnDu_Draw, + /**/ ACTOR_EN_DU, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_DU, + /**/ sizeof(EnDu), + /**/ EnDu_Init, + /**/ EnDu_Destroy, + /**/ EnDu_Update, + /**/ EnDu_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c index 75898ff6cb..e4673c4e12 100644 --- a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c +++ b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c @@ -19,15 +19,15 @@ void EnDyExtra_WaitForTrigger(EnDyExtra* this, PlayState* play); void EnDyExtra_FallAndKill(EnDyExtra* this, PlayState* play); ActorInit En_Dy_Extra_InitVars = { - ACTOR_EN_DY_EXTRA, - ACTORCAT_PROP, - FLAGS, - OBJECT_DY_OBJ, - sizeof(EnDyExtra), - (ActorFunc)EnDyExtra_Init, - (ActorFunc)EnDyExtra_Destroy, - (ActorFunc)EnDyExtra_Update, - (ActorFunc)EnDyExtra_Draw, + /**/ ACTOR_EN_DY_EXTRA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_DY_OBJ, + /**/ sizeof(EnDyExtra), + /**/ EnDyExtra_Init, + /**/ EnDyExtra_Destroy, + /**/ EnDyExtra_Update, + /**/ EnDyExtra_Draw, }; void EnDyExtra_Destroy(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Eg/z_en_eg.c b/src/overlays/actors/ovl_En_Eg/z_en_eg.c index 7e195d0398..4bfcc985a9 100644 --- a/src/overlays/actors/ovl_En_Eg/z_en_eg.c +++ b/src/overlays/actors/ovl_En_Eg/z_en_eg.c @@ -23,15 +23,15 @@ static EnEgActionFunc sActionFuncs[] = { }; ActorInit En_Eg_InitVars = { - ACTOR_EN_EG, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_ZL2, - sizeof(EnEg), - (ActorFunc)EnEg_Init, - (ActorFunc)EnEg_Destroy, - (ActorFunc)EnEg_Update, - (ActorFunc)EnEg_Draw, + /**/ ACTOR_EN_EG, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_ZL2, + /**/ sizeof(EnEg), + /**/ EnEg_Init, + /**/ EnEg_Destroy, + /**/ EnEg_Update, + /**/ EnEg_Draw, }; void EnEg_PlayVoidOutSFX(void) { diff --git a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c index 197a4a22e4..31d31dd6a9 100644 --- a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c +++ b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c @@ -36,15 +36,15 @@ void EnEiyer_Dead(EnEiyer* this, PlayState* play); void EnEiyer_Stunned(EnEiyer* this, PlayState* play); ActorInit En_Eiyer_InitVars = { - ACTOR_EN_EIYER, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_EI, - sizeof(EnEiyer), - (ActorFunc)EnEiyer_Init, - (ActorFunc)EnEiyer_Destroy, - (ActorFunc)EnEiyer_Update, - (ActorFunc)EnEiyer_Draw, + /**/ ACTOR_EN_EIYER, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_EI, + /**/ sizeof(EnEiyer), + /**/ EnEiyer_Init, + /**/ EnEiyer_Destroy, + /**/ EnEiyer_Update, + /**/ EnEiyer_Draw, }; static ColliderCylinderInit sColCylInit = { diff --git a/src/overlays/actors/ovl_En_Elf/z_en_elf.c b/src/overlays/actors/ovl_En_Elf/z_en_elf.c index ed26d64bf9..7c34bc073d 100644 --- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -55,15 +55,15 @@ void EnElf_SpawnSparkles(EnElf* this, PlayState* play, s32 sparkleLife); void EnElf_GetCuePos(Vec3f* dest, PlayState* play, s32 cueChannel); ActorInit En_Elf_InitVars = { - ACTOR_EN_ELF, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnElf), - (ActorFunc)EnElf_Init, - (ActorFunc)EnElf_Destroy, - (ActorFunc)EnElf_Update, - (ActorFunc)EnElf_Draw, + /**/ ACTOR_EN_ELF, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnElf), + /**/ EnElf_Init, + /**/ EnElf_Destroy, + /**/ EnElf_Update, + /**/ EnElf_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c index 05f22fca8e..73f6911fa8 100644 --- a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c +++ b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c @@ -15,15 +15,15 @@ static s16 sLeeverAngles[] = { 0x0000, 0x2710, 0x7148, 0x8EB8, 0xD8F0 }; static f32 sLeeverDists[] = { 200.0f, 170.0f, 120.0f, 120.0f, 170.0f }; ActorInit En_Encount1_InitVars = { - ACTOR_EN_ENCOUNT1, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnEncount1), - (ActorFunc)EnEncount1_Init, - NULL, - (ActorFunc)EnEncount1_Update, - NULL, + /**/ ACTOR_EN_ENCOUNT1, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnEncount1), + /**/ EnEncount1_Init, + /**/ NULL, + /**/ EnEncount1_Update, + /**/ NULL, }; void EnEncount1_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c index 432534d3b5..faa5b2ab0d 100644 --- a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c +++ b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c @@ -24,15 +24,15 @@ void EnEncount2_DrawEffects(Actor* thisx, PlayState* play); void EnEncount2_UpdateEffects(EnEncount2* this, PlayState* play); ActorInit En_Encount2_InitVars = { - ACTOR_EN_ENCOUNT2, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_EFC_STAR_FIELD, - sizeof(EnEncount2), - (ActorFunc)EnEncount2_Init, - NULL, - (ActorFunc)EnEncount2_Update, - (ActorFunc)EnEncount2_Draw, + /**/ ACTOR_EN_ENCOUNT2, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_EFC_STAR_FIELD, + /**/ sizeof(EnEncount2), + /**/ EnEncount2_Init, + /**/ NULL, + /**/ EnEncount2_Update, + /**/ EnEncount2_Draw, }; void EnEncount2_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c index dd01bbc241..7970026bab 100644 --- a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c +++ b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c @@ -33,15 +33,15 @@ void EnExItem_TargetPrizeGive(EnExItem* this, PlayState* play); void EnExItem_TargetPrizeFinish(EnExItem* this, PlayState* play); ActorInit En_Ex_Item_InitVars = { - ACTOR_EN_EX_ITEM, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnExItem), - (ActorFunc)EnExItem_Init, - (ActorFunc)EnExItem_Destroy, - (ActorFunc)EnExItem_Update, - (ActorFunc)EnExItem_Draw, + /**/ ACTOR_EN_EX_ITEM, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnExItem), + /**/ EnExItem_Init, + /**/ EnExItem_Destroy, + /**/ EnExItem_Update, + /**/ EnExItem_Draw, }; void EnExItem_Destroy(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c index 90c3bfb2b6..e41d08aeca 100644 --- a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c +++ b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c @@ -29,15 +29,15 @@ static s16 sRupeeValues[] = { }; ActorInit En_Ex_Ruppy_InitVars = { - ACTOR_EN_EX_RUPPY, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnExRuppy), - (ActorFunc)EnExRuppy_Init, - (ActorFunc)EnExRuppy_Destroy, - (ActorFunc)EnExRuppy_Update, - (ActorFunc)EnExRuppy_Draw, + /**/ ACTOR_EN_EX_RUPPY, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnExRuppy), + /**/ EnExRuppy_Init, + /**/ EnExRuppy_Destroy, + /**/ EnExRuppy_Update, + /**/ EnExRuppy_Draw, }; void EnExRuppy_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Fd/z_en_fd.c b/src/overlays/actors/ovl_En_Fd/z_en_fd.c index 0f93c90ea7..a0e2b232d0 100644 --- a/src/overlays/actors/ovl_En_Fd/z_en_fd.c +++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.c @@ -31,15 +31,15 @@ void EnFd_DrawEffectsFlames(EnFd* this, PlayState* play); void EnFd_Land(EnFd* this, PlayState* play); ActorInit En_Fd_InitVars = { - ACTOR_EN_FD, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_FW, - sizeof(EnFd), - (ActorFunc)EnFd_Init, - (ActorFunc)EnFd_Destroy, - (ActorFunc)EnFd_Update, - (ActorFunc)EnFd_Draw, + /**/ ACTOR_EN_FD, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_FW, + /**/ sizeof(EnFd), + /**/ EnFd_Init, + /**/ EnFd_Destroy, + /**/ EnFd_Update, + /**/ EnFd_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[12] = { diff --git a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c index e0227c1bfc..d5ec56756a 100644 --- a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c +++ b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c @@ -13,15 +13,15 @@ void EnFdFire_DanceTowardsPlayer(EnFdFire* this, PlayState* play); void EnFdFire_WaitToDie(EnFdFire* this, PlayState* play); ActorInit En_Fd_Fire_InitVars = { - ACTOR_EN_FD_FIRE, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_GAMEPLAY_DANGEON_KEEP, - sizeof(EnFdFire), - (ActorFunc)EnFdFire_Init, - (ActorFunc)EnFdFire_Destroy, - (ActorFunc)EnFdFire_Update, - (ActorFunc)EnFdFire_Draw, + /**/ ACTOR_EN_FD_FIRE, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_DANGEON_KEEP, + /**/ sizeof(EnFdFire), + /**/ EnFdFire_Init, + /**/ EnFdFire_Destroy, + /**/ EnFdFire_Update, + /**/ EnFdFire_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c index c196eca9b8..00166c334c 100644 --- a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c +++ b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c @@ -45,15 +45,15 @@ void EnFhgFire_EnergyBall(EnFhgFire* this, PlayState* play); void EnFhgFire_PhantomWarp(EnFhgFire* this, PlayState* play); ActorInit En_Fhg_Fire_InitVars = { - 0, - ACTORCAT_BOSS, - FLAGS, - OBJECT_FHG, - sizeof(EnFhgFire), - (ActorFunc)EnFhgFire_Init, - (ActorFunc)EnFhgFire_Destroy, - (ActorFunc)EnFhgFire_Update, - (ActorFunc)EnFhgFire_Draw, + /**/ 0, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_FHG, + /**/ sizeof(EnFhgFire), + /**/ EnFhgFire_Init, + /**/ EnFhgFire_Destroy, + /**/ EnFhgFire_Update, + /**/ EnFhgFire_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c b/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c index 420b09ce68..53b24ba559 100644 --- a/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c +++ b/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c @@ -16,15 +16,15 @@ void EnFireRock_Fall(EnFireRock* this, PlayState* play); void EnFireRock_SpawnMoreBrokenPieces(EnFireRock* this, PlayState* play); ActorInit En_Fire_Rock_InitVars = { - ACTOR_EN_FIRE_ROCK, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_EFC_STAR_FIELD, - sizeof(EnFireRock), - (ActorFunc)EnFireRock_Init, - (ActorFunc)EnFireRock_Destroy, - (ActorFunc)EnFireRock_Update, - (ActorFunc)EnFireRock_Draw, + /**/ ACTOR_EN_FIRE_ROCK, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_EFC_STAR_FIELD, + /**/ sizeof(EnFireRock), + /**/ EnFireRock_Init, + /**/ EnFireRock_Destroy, + /**/ EnFireRock_Update, + /**/ EnFireRock_Draw, }; static ColliderCylinderInit D_80A12CA0 = { 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 8b7ea195cf..6ce01bfbf2 100644 --- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c +++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c @@ -35,15 +35,15 @@ typedef enum { } KeeseAuraType; ActorInit En_Firefly_InitVars = { - ACTOR_EN_FIREFLY, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_FIREFLY, - sizeof(EnFirefly), - (ActorFunc)EnFirefly_Init, - (ActorFunc)EnFirefly_Destroy, - (ActorFunc)EnFirefly_Update, - (ActorFunc)EnFirefly_Draw, + /**/ ACTOR_EN_FIREFLY, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_FIREFLY, + /**/ sizeof(EnFirefly), + /**/ EnFirefly_Init, + /**/ EnFirefly_Destroy, + /**/ EnFirefly_Update, + /**/ EnFirefly_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[1] = { diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/src/overlays/actors/ovl_En_Fish/z_en_fish.c index e4728a0bfa..750672d10a 100644 --- a/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -65,15 +65,15 @@ static ColliderJntSphInit sJntSphInit = { }; ActorInit En_Fish_InitVars = { - ACTOR_EN_FISH, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnFish), - (ActorFunc)EnFish_Init, - (ActorFunc)EnFish_Destroy, - (ActorFunc)EnFish_Update, - (ActorFunc)EnFish_Draw, + /**/ ACTOR_EN_FISH, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnFish), + /**/ EnFish_Init, + /**/ EnFish_Destroy, + /**/ EnFish_Update, + /**/ EnFish_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index 2f4b418cda..0ff5393789 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -45,15 +45,15 @@ void EnFloormas_BigDecideAction(EnFloormas* this, PlayState* play); void EnFloormas_Charge(EnFloormas* this, PlayState* play); ActorInit En_Floormas_InitVars = { - ACTOR_EN_FLOORMAS, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_WALLMASTER, - sizeof(EnFloormas), - (ActorFunc)EnFloormas_Init, - (ActorFunc)EnFloormas_Destroy, - (ActorFunc)EnFloormas_Update, - (ActorFunc)EnFloormas_Draw, + /**/ ACTOR_EN_FLOORMAS, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_WALLMASTER, + /**/ sizeof(EnFloormas), + /**/ EnFloormas_Init, + /**/ EnFloormas_Destroy, + /**/ EnFloormas_Update, + /**/ EnFloormas_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Fr/z_en_fr.c b/src/overlays/actors/ovl_En_Fr/z_en_fr.c index 72fc93d32c..a4b083cf2c 100644 --- a/src/overlays/actors/ovl_En_Fr/z_en_fr.c +++ b/src/overlays/actors/ovl_En_Fr/z_en_fr.c @@ -134,15 +134,15 @@ static s32 sSongToFrog[] = { }; ActorInit En_Fr_InitVars = { - ACTOR_EN_FR, - ACTORCAT_NPC, - FLAGS, - OBJECT_FR, - sizeof(EnFr), - (ActorFunc)EnFr_Init, - (ActorFunc)EnFr_Destroy, - (ActorFunc)EnFr_Update, - NULL, + /**/ ACTOR_EN_FR, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_FR, + /**/ sizeof(EnFr), + /**/ EnFr_Init, + /**/ EnFr_Destroy, + /**/ EnFr_Update, + /**/ NULL, }; static Color_RGBA8 sEnFrColor[] = { diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/src/overlays/actors/ovl_En_Fu/z_en_fu.c index d781e69920..6991d552f6 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -29,15 +29,15 @@ void func_80A1DBD4(EnFu* this, PlayState* play); void func_80A1DB60(EnFu* this, PlayState* play); ActorInit En_Fu_InitVars = { - ACTOR_EN_FU, - ACTORCAT_NPC, - FLAGS, - OBJECT_FU, - sizeof(EnFu), - (ActorFunc)EnFu_Init, - (ActorFunc)EnFu_Destroy, - (ActorFunc)EnFu_Update, - (ActorFunc)EnFu_Draw, + /**/ ACTOR_EN_FU, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_FU, + /**/ sizeof(EnFu), + /**/ EnFu_Init, + /**/ EnFu_Destroy, + /**/ EnFu_Update, + /**/ EnFu_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Fw/z_en_fw.c b/src/overlays/actors/ovl_En_Fw/z_en_fw.c index 06f60dd9eb..34fe591dc4 100644 --- a/src/overlays/actors/ovl_En_Fw/z_en_fw.c +++ b/src/overlays/actors/ovl_En_Fw/z_en_fw.c @@ -25,15 +25,15 @@ void EnFw_JumpToParentInitPos(EnFw* this, PlayState* play); void EnFw_TurnToParentInitPos(EnFw* this, PlayState* play); ActorInit En_Fw_InitVars = { - ACTOR_EN_FW, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_FW, - sizeof(EnFw), - (ActorFunc)EnFw_Init, - (ActorFunc)EnFw_Destroy, - (ActorFunc)EnFw_Update, - (ActorFunc)EnFw_Draw, + /**/ ACTOR_EN_FW, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_FW, + /**/ sizeof(EnFw), + /**/ EnFw_Init, + /**/ EnFw_Destroy, + /**/ EnFw_Update, + /**/ EnFw_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[1] = { diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/src/overlays/actors/ovl_En_Fz/z_en_fz.c index 957f2df07c..eaf1af7d59 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -46,15 +46,15 @@ void EnFz_UpdateIceSmoke(EnFz* this, PlayState* play); void EnFz_DrawEffects(EnFz* this, PlayState* play); ActorInit En_Fz_InitVars = { - ACTOR_EN_FZ, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_FZ, - sizeof(EnFz), - (ActorFunc)EnFz_Init, - (ActorFunc)EnFz_Destroy, - (ActorFunc)EnFz_Update, - (ActorFunc)EnFz_Draw, + /**/ ACTOR_EN_FZ, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_FZ, + /**/ sizeof(EnFz), + /**/ EnFz_Init, + /**/ EnFz_Destroy, + /**/ EnFz_Update, + /**/ EnFz_Draw, }; static ColliderCylinderInitType1 sCylinderInit1 = { diff --git a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c index 347f0749a0..fa54578328 100644 --- a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c +++ b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c @@ -65,15 +65,15 @@ static s16 sRupeeTypes[] = { }; ActorInit En_G_Switch_InitVars = { - ACTOR_EN_G_SWITCH, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnGSwitch), - (ActorFunc)EnGSwitch_Init, - (ActorFunc)EnGSwitch_Destroy, - (ActorFunc)EnGSwitch_Update, - NULL, + /**/ ACTOR_EN_G_SWITCH, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnGSwitch), + /**/ EnGSwitch_Init, + /**/ EnGSwitch_Destroy, + /**/ EnGSwitch_Update, + /**/ NULL, }; void EnGSwitch_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c b/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c index fdf3df221c..28e5d37b52 100644 --- a/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c +++ b/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c @@ -15,15 +15,15 @@ void EnGanonMant_Update(Actor* thisx, PlayState* play); void EnGanonMant_Draw(Actor* thisx, PlayState* play); ActorInit En_Ganon_Mant_InitVars = { - ACTOR_EN_GANON_MANT, - ACTORCAT_BOSS, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnGanonMant), - (ActorFunc)EnGanonMant_Init, - (ActorFunc)EnGanonMant_Destroy, - (ActorFunc)EnGanonMant_Update, - (ActorFunc)EnGanonMant_Draw, + /**/ ACTOR_EN_GANON_MANT, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnGanonMant), + /**/ EnGanonMant_Init, + /**/ EnGanonMant_Destroy, + /**/ EnGanonMant_Update, + /**/ EnGanonMant_Draw, }; static s16 sTearSizesMedium[] = { diff --git a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c index 371eb5de04..ee7221101a 100644 --- a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c +++ b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c @@ -15,15 +15,15 @@ void EnGanonOrgan_Update(Actor* thisx, PlayState* play); void EnGanonOrgan_Draw(Actor* thisx, PlayState* play); ActorInit En_Ganon_Organ_InitVars = { - ACTOR_EN_GANON_ORGAN, - ACTORCAT_BOSS, - FLAGS, - OBJECT_GANON, - sizeof(EnGanonOrgan), - (ActorFunc)EnGanonOrgan_Init, - (ActorFunc)EnGanonOrgan_Destroy, - (ActorFunc)EnGanonOrgan_Update, - (ActorFunc)EnGanonOrgan_Draw, + /**/ ACTOR_EN_GANON_ORGAN, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_GANON, + /**/ sizeof(EnGanonOrgan), + /**/ EnGanonOrgan_Init, + /**/ EnGanonOrgan_Destroy, + /**/ EnGanonOrgan_Update, + /**/ EnGanonOrgan_Draw, }; static u64 sForceAlignment = 0; diff --git a/src/overlays/actors/ovl_En_Gb/z_en_gb.c b/src/overlays/actors/ovl_En_Gb/z_en_gb.c index 934ed70d28..209fa806b3 100644 --- a/src/overlays/actors/ovl_En_Gb/z_en_gb.c +++ b/src/overlays/actors/ovl_En_Gb/z_en_gb.c @@ -27,15 +27,15 @@ void EnGb_DrawCagedSouls(EnGb* this, PlayState* play); void EnGb_UpdateCagedSouls(EnGb* this, PlayState* play); ActorInit En_Gb_InitVars = { - ACTOR_EN_GB, - ACTORCAT_NPC, - FLAGS, - OBJECT_PS, - sizeof(EnGb), - (ActorFunc)EnGb_Init, - (ActorFunc)EnGb_Destroy, - (ActorFunc)EnGb_Update, - (ActorFunc)EnGb_Draw, + /**/ ACTOR_EN_GB, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_PS, + /**/ sizeof(EnGb), + /**/ EnGb_Init, + /**/ EnGb_Destroy, + /**/ EnGb_Update, + /**/ EnGb_Draw, }; static EnGbCagedSoulInfo sCagedSoulInfo[] = { diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index a0c40a86cc..157742eda6 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -40,15 +40,15 @@ void EnGe1_CueUpAnimation(EnGe1* this); void EnGe1_StopFidget(EnGe1* this); ActorInit En_Ge1_InitVars = { - ACTOR_EN_GE1, - ACTORCAT_NPC, - FLAGS, - OBJECT_GE1, - sizeof(EnGe1), - (ActorFunc)EnGe1_Init, - (ActorFunc)EnGe1_Destroy, - (ActorFunc)EnGe1_Update, - (ActorFunc)EnGe1_Draw, + /**/ ACTOR_EN_GE1, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_GE1, + /**/ sizeof(EnGe1), + /**/ EnGe1_Init, + /**/ EnGe1_Destroy, + /**/ EnGe1_Update, + /**/ EnGe1_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index c25b141dd1..9605b142ba 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -56,15 +56,15 @@ void EnGe2_UpdateAfterTalk(Actor* thisx, PlayState* play); void EnGe2_UpdateStunned(Actor* thisx, PlayState* play2); ActorInit En_Ge2_InitVars = { - ACTOR_EN_GE2, - ACTORCAT_NPC, - FLAGS, - OBJECT_GLA, - sizeof(EnGe2), - (ActorFunc)EnGe2_Init, - (ActorFunc)EnGe2_Destroy, - (ActorFunc)EnGe2_Update, - (ActorFunc)EnGe2_Draw, + /**/ ACTOR_EN_GE2, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_GLA, + /**/ sizeof(EnGe2), + /**/ EnGe2_Init, + /**/ EnGe2_Destroy, + /**/ EnGe2_Update, + /**/ EnGe2_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c index 61cca61e3b..84bee337ec 100644 --- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c +++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c @@ -19,15 +19,15 @@ void EnGe3_ForceTalk(EnGe3* this, PlayState* play); void EnGe3_UpdateWhenNotTalking(Actor* thisx, PlayState* play); ActorInit En_Ge3_InitVars = { - ACTOR_EN_GE3, - ACTORCAT_NPC, - FLAGS, - OBJECT_GELDB, - sizeof(EnGe3), - (ActorFunc)EnGe3_Init, - (ActorFunc)EnGe3_Destroy, - (ActorFunc)EnGe3_Update, - (ActorFunc)EnGe3_Draw, + /**/ ACTOR_EN_GE3, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_GELDB, + /**/ sizeof(EnGe3), + /**/ EnGe3_Init, + /**/ EnGe3_Destroy, + /**/ EnGe3_Update, + /**/ EnGe3_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c index 567517d098..0ed65e828d 100644 --- a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c +++ b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c @@ -70,15 +70,15 @@ void EnGeldB_Sidestep(EnGeldB* this, PlayState* play); void EnGeldB_Defeated(EnGeldB* this, PlayState* play); ActorInit En_GeldB_InitVars = { - ACTOR_EN_GELDB, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_GELDB, - sizeof(EnGeldB), - (ActorFunc)EnGeldB_Init, - (ActorFunc)EnGeldB_Destroy, - (ActorFunc)EnGeldB_Update, - (ActorFunc)EnGeldB_Draw, + /**/ ACTOR_EN_GELDB, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_GELDB, + /**/ sizeof(EnGeldB), + /**/ EnGeldB_Init, + /**/ EnGeldB_Destroy, + /**/ EnGeldB_Update, + /**/ EnGeldB_Draw, }; static ColliderCylinderInit sBodyCylInit = { diff --git a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c index 1a93d1a42d..90ac821a82 100644 --- a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c +++ b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c @@ -68,15 +68,15 @@ void EnGirlA_BuyEvent_GoronTunic(PlayState* play, EnGirlA* this); void EnGirlA_BuyEvent_ZoraTunic(PlayState* play, EnGirlA* this); ActorInit En_GirlA_InitVars = { - ACTOR_EN_GIRLA, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnGirlA), - (ActorFunc)EnGirlA_Init, - (ActorFunc)EnGirlA_Destroy, - (ActorFunc)EnGirlA_Update, - NULL, + /**/ ACTOR_EN_GIRLA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnGirlA), + /**/ EnGirlA_Init, + /**/ EnGirlA_Destroy, + /**/ EnGirlA_Update, + /**/ NULL, }; static char* sShopItemDescriptions[] = { diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/src/overlays/actors/ovl_En_Gm/z_en_gm.c index 9a22b0c509..0cd98ed0c3 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -27,15 +27,15 @@ void func_80A3DF00(EnGm* this, PlayState* play); void func_80A3DF60(EnGm* this, PlayState* play); ActorInit En_Gm_InitVars = { - ACTOR_EN_GM, - ACTORCAT_NPC, - FLAGS, - OBJECT_OF1D_MAP, - sizeof(EnGm), - (ActorFunc)EnGm_Init, - (ActorFunc)EnGm_Destroy, - (ActorFunc)EnGm_Update, - NULL, + /**/ ACTOR_EN_GM, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_OF1D_MAP, + /**/ sizeof(EnGm), + /**/ EnGm_Init, + /**/ EnGm_Destroy, + /**/ EnGm_Update, + /**/ NULL, }; static ColliderCylinderInitType1 sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c index a58b58e02d..756a61a482 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -35,15 +35,15 @@ void EnGo_UpdateEffects(EnGo* this); void EnGo_DrawEffects(EnGo* this, PlayState* play); ActorInit En_Go_InitVars = { - ACTOR_EN_GO, - ACTORCAT_NPC, - FLAGS, - OBJECT_OF1D_MAP, - sizeof(EnGo), - (ActorFunc)EnGo_Init, - (ActorFunc)EnGo_Destroy, - (ActorFunc)EnGo_Update, - (ActorFunc)EnGo_Draw, + /**/ ACTOR_EN_GO, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_OF1D_MAP, + /**/ sizeof(EnGo), + /**/ EnGo_Init, + /**/ EnGo_Destroy, + /**/ EnGo_Update, + /**/ EnGo_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c index 2bd5bbecbf..025b47e322 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -97,15 +97,15 @@ static CollisionCheckInfoInit2 sColChkInfoInit = { }; ActorInit En_Go2_InitVars = { - ACTOR_EN_GO2, - ACTORCAT_NPC, - FLAGS, - OBJECT_OF1D_MAP, - sizeof(EnGo2), - (ActorFunc)EnGo2_Init, - (ActorFunc)EnGo2_Destroy, - (ActorFunc)EnGo2_Update, - (ActorFunc)EnGo2_Draw, + /**/ ACTOR_EN_GO2, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_OF1D_MAP, + /**/ sizeof(EnGo2), + /**/ EnGo2_Init, + /**/ EnGo2_Destroy, + /**/ EnGo2_Update, + /**/ EnGo2_Draw, }; static EnGo2DataStruct1 D_80A4816C[14] = { diff --git a/src/overlays/actors/ovl_En_Goma/z_en_goma.c b/src/overlays/actors/ovl_En_Goma/z_en_goma.c index 5fdff0eac8..2dfe53d505 100644 --- a/src/overlays/actors/ovl_En_Goma/z_en_goma.c +++ b/src/overlays/actors/ovl_En_Goma/z_en_goma.c @@ -43,15 +43,15 @@ void EnGoma_SetupJump(EnGoma* this); void EnGoma_SetupStunned(EnGoma* this, PlayState* play); ActorInit En_Goma_InitVars = { - ACTOR_BOSS_GOMA, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_GOL, - sizeof(EnGoma), - (ActorFunc)EnGoma_Init, - (ActorFunc)EnGoma_Destroy, - (ActorFunc)EnGoma_Update, - (ActorFunc)EnGoma_Draw, + /**/ ACTOR_BOSS_GOMA, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_GOL, + /**/ sizeof(EnGoma), + /**/ EnGoma_Init, + /**/ EnGoma_Destroy, + /**/ EnGoma_Update, + /**/ EnGoma_Draw, }; static ColliderCylinderInit D_80A4B7A0 = { diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c index 710261e28b..7ffa09b8b2 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -44,15 +44,15 @@ void EnGoroiwa_SetupMoveDown(EnGoroiwa* this); void EnGoroiwa_MoveDown(EnGoroiwa* this, PlayState* play); ActorInit En_Goroiwa_InitVars = { - ACTOR_EN_GOROIWA, - ACTORCAT_PROP, - FLAGS, - OBJECT_GOROIWA, - sizeof(EnGoroiwa), - (ActorFunc)EnGoroiwa_Init, - (ActorFunc)EnGoroiwa_Destroy, - (ActorFunc)EnGoroiwa_Update, - (ActorFunc)EnGoroiwa_Draw, + /**/ ACTOR_EN_GOROIWA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GOROIWA, + /**/ sizeof(EnGoroiwa), + /**/ EnGoroiwa_Init, + /**/ EnGoroiwa_Destroy, + /**/ EnGoroiwa_Update, + /**/ EnGoroiwa_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[] = { diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 26c221408a..6500bb69f9 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -22,15 +22,15 @@ void func_80A4F700(EnGs* this, PlayState* play); void func_80A4F77C(EnGs* this); ActorInit En_Gs_InitVars = { - ACTOR_EN_GS, - ACTORCAT_PROP, - FLAGS, - OBJECT_GS, - sizeof(EnGs), - (ActorFunc)EnGs_Init, - (ActorFunc)EnGs_Destroy, - (ActorFunc)EnGs_Update, - (ActorFunc)EnGs_Draw, + /**/ ACTOR_EN_GS, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GS, + /**/ sizeof(EnGs), + /**/ EnGs_Init, + /**/ EnGs_Destroy, + /**/ EnGs_Update, + /**/ EnGs_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Guest/z_en_guest.c b/src/overlays/actors/ovl_En_Guest/z_en_guest.c index e624d6720d..a03504939e 100644 --- a/src/overlays/actors/ovl_En_Guest/z_en_guest.c +++ b/src/overlays/actors/ovl_En_Guest/z_en_guest.c @@ -21,15 +21,15 @@ void func_80A5057C(EnGuest* this, PlayState* play); void func_80A505CC(Actor* thisx, PlayState* play); ActorInit En_Guest_InitVars = { - ACTOR_EN_GUEST, - ACTORCAT_NPC, - FLAGS, - OBJECT_BOJ, - sizeof(EnGuest), - (ActorFunc)EnGuest_Init, - (ActorFunc)EnGuest_Destroy, - (ActorFunc)EnGuest_Update, - NULL, + /**/ ACTOR_EN_GUEST, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_BOJ, + /**/ sizeof(EnGuest), + /**/ EnGuest_Init, + /**/ EnGuest_Destroy, + /**/ EnGuest_Update, + /**/ NULL, }; static ColliderCylinderInitType1 sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Hata/z_en_hata.c b/src/overlays/actors/ovl_En_Hata/z_en_hata.c index 9a1f45fc6d..4e80c5a5a1 100644 --- a/src/overlays/actors/ovl_En_Hata/z_en_hata.c +++ b/src/overlays/actors/ovl_En_Hata/z_en_hata.c @@ -15,15 +15,15 @@ void EnHata_Update(Actor* thisx, PlayState* play2); void EnHata_Draw(Actor* thisx, PlayState* play); ActorInit En_Hata_InitVars = { - ACTOR_EN_HATA, - ACTORCAT_PROP, - FLAGS, - OBJECT_HATA, - sizeof(EnHata), - (ActorFunc)EnHata_Init, - (ActorFunc)EnHata_Destroy, - (ActorFunc)EnHata_Update, - (ActorFunc)EnHata_Draw, + /**/ ACTOR_EN_HATA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_HATA, + /**/ sizeof(EnHata), + /**/ EnHata_Init, + /**/ EnHata_Destroy, + /**/ EnHata_Update, + /**/ EnHata_Draw, }; // Unused Collider and CollisionCheck data diff --git a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c index 77e43e4196..3bcfb5ec1c 100644 --- a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c +++ b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c @@ -32,15 +32,15 @@ void EnHeishi1_WaitNight(EnHeishi1* this, PlayState* play); static s32 sPlayerIsCaught = false; ActorInit En_Heishi1_InitVars = { - 0, - ACTORCAT_NPC, - FLAGS, - OBJECT_SD, - sizeof(EnHeishi1), - (ActorFunc)EnHeishi1_Init, - (ActorFunc)EnHeishi1_Destroy, - (ActorFunc)EnHeishi1_Update, - (ActorFunc)EnHeishi1_Draw, + /**/ 0, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_SD, + /**/ sizeof(EnHeishi1), + /**/ EnHeishi1_Init, + /**/ EnHeishi1_Destroy, + /**/ EnHeishi1_Update, + /**/ EnHeishi1_Draw, }; static f32 sAnimParamsInit[][8] = { diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index a6786a3095..4dc069363b 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -51,15 +51,15 @@ void func_80A541FC(EnHeishi2* this, PlayState* play); void func_80A53DF8(EnHeishi2* this, PlayState* play); ActorInit En_Heishi2_InitVars = { - ACTOR_EN_HEISHI2, - ACTORCAT_NPC, - FLAGS, - OBJECT_SD, - sizeof(EnHeishi2), - (ActorFunc)EnHeishi2_Init, - (ActorFunc)EnHeishi2_Destroy, - (ActorFunc)EnHeishi2_Update, - (ActorFunc)EnHeishi2_Draw, + /**/ ACTOR_EN_HEISHI2, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_SD, + /**/ sizeof(EnHeishi2), + /**/ EnHeishi2_Init, + /**/ EnHeishi2_Destroy, + /**/ EnHeishi2_Update, + /**/ EnHeishi2_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c index 5ef5319829..c2df806634 100644 --- a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c +++ b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c @@ -26,15 +26,15 @@ void func_80A55BD4(EnHeishi3* this, PlayState* play); static s16 sPlayerCaught = 0; ActorInit En_Heishi3_InitVars = { - ACTOR_EN_HEISHI3, - ACTORCAT_NPC, - FLAGS, - OBJECT_SD, - sizeof(EnHeishi3), - (ActorFunc)EnHeishi3_Init, - (ActorFunc)EnHeishi3_Destroy, - (ActorFunc)EnHeishi3_Update, - (ActorFunc)EnHeishi3_Draw, + /**/ ACTOR_EN_HEISHI3, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_SD, + /**/ sizeof(EnHeishi3), + /**/ EnHeishi3_Init, + /**/ EnHeishi3_Destroy, + /**/ EnHeishi3_Update, + /**/ EnHeishi3_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c index 3f2aa1d18a..583adeeed6 100644 --- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c +++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c @@ -22,15 +22,15 @@ void func_80A56A50(EnHeishi4* this, PlayState* play); void func_80A56ACC(EnHeishi4* this, PlayState* play); ActorInit En_Heishi4_InitVars = { - ACTOR_EN_HEISHI4, - ACTORCAT_NPC, - FLAGS, - OBJECT_SD, - sizeof(EnHeishi4), - (ActorFunc)EnHeishi4_Init, - (ActorFunc)EnHeishi4_Destroy, - (ActorFunc)EnHeishi4_Update, - (ActorFunc)EnHeishi4_Draw, + /**/ ACTOR_EN_HEISHI4, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_SD, + /**/ sizeof(EnHeishi4), + /**/ EnHeishi4_Init, + /**/ EnHeishi4_Destroy, + /**/ EnHeishi4_Update, + /**/ EnHeishi4_Draw, }; static u32 sFaceReactionSets[] = { 6, 7 }; diff --git a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c index df626bd904..d079088c5b 100644 --- a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c +++ b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c @@ -28,15 +28,15 @@ void EnHintnuts_Leave(EnHintnuts* this, PlayState* play); void EnHintnuts_Freeze(EnHintnuts* this, PlayState* play); ActorInit En_Hintnuts_InitVars = { - ACTOR_EN_HINTNUTS, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_HINTNUTS, - sizeof(EnHintnuts), - (ActorFunc)EnHintnuts_Init, - (ActorFunc)EnHintnuts_Destroy, - (ActorFunc)EnHintnuts_Update, - (ActorFunc)EnHintnuts_Draw, + /**/ ACTOR_EN_HINTNUTS, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_HINTNUTS, + /**/ sizeof(EnHintnuts), + /**/ EnHintnuts_Init, + /**/ EnHintnuts_Destroy, + /**/ EnHintnuts_Update, + /**/ EnHintnuts_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Holl/z_en_holl.c b/src/overlays/actors/ovl_En_Holl/z_en_holl.c index 2adc0484ea..7518c26526 100644 --- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c +++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c @@ -77,15 +77,15 @@ void EnHoll_VerticalInvisible(EnHoll* this, PlayState* play); void EnHoll_HorizontalBgCoverSwitchFlag(EnHoll* this, PlayState* play); ActorInit En_Holl_InitVars = { - ACTOR_EN_HOLL, - ACTORCAT_DOOR, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnHoll), - (ActorFunc)EnHoll_Init, - (ActorFunc)EnHoll_Destroy, - (ActorFunc)EnHoll_Update, - (ActorFunc)EnHoll_Draw, + /**/ ACTOR_EN_HOLL, + /**/ ACTORCAT_DOOR, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnHoll), + /**/ EnHoll_Init, + /**/ EnHoll_Destroy, + /**/ EnHoll_Update, + /**/ EnHoll_Draw, }; static EnHollActionFunc sActionFuncs[] = { diff --git a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c index 2f16239d83..2a22881c73 100644 --- a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c +++ b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c @@ -48,15 +48,15 @@ void EnHonotrap_SetupFlameVanish(EnHonotrap* this); void EnHonotrap_FlameVanish(EnHonotrap* this, PlayState* play); ActorInit En_Honotrap_InitVars = { - ACTOR_EN_HONOTRAP, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_DANGEON_KEEP, - sizeof(EnHonotrap), - (ActorFunc)EnHonotrap_Init, - (ActorFunc)EnHonotrap_Destroy, - (ActorFunc)EnHonotrap_Update, - (ActorFunc)EnHonotrap_Draw, + /**/ ACTOR_EN_HONOTRAP, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_DANGEON_KEEP, + /**/ sizeof(EnHonotrap), + /**/ EnHonotrap_Init, + /**/ EnHonotrap_Destroy, + /**/ EnHonotrap_Update, + /**/ EnHonotrap_Draw, }; static ColliderTrisElementInit sTrisElementsInit[2] = { diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index ca7ef085ff..093348198c 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -67,15 +67,15 @@ static f32 sPlaybackSpeeds[] = { 2.0f / 3.0f, 2.0f / 3.0f, 1.0f, 1.0f, 1.0f, 1.0 static SkeletonHeader* sSkeletonHeaders[] = { &gEponaSkel, &gHorseIngoSkel }; ActorInit En_Horse_InitVars = { - ACTOR_EN_HORSE, - ACTORCAT_BG, - FLAGS, - OBJECT_HORSE, - sizeof(EnHorse), - (ActorFunc)EnHorse_Init, - (ActorFunc)EnHorse_Destroy, - (ActorFunc)EnHorse_Update, - (ActorFunc)EnHorse_Draw, + /**/ ACTOR_EN_HORSE, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HORSE, + /**/ sizeof(EnHorse), + /**/ EnHorse_Init, + /**/ EnHorse_Destroy, + /**/ EnHorse_Update, + /**/ EnHorse_Draw, }; static ColliderCylinderInit sCylinderInit1 = { diff --git a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c index 06f6b9f054..154f9002ee 100644 --- a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c +++ b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c @@ -49,15 +49,15 @@ void EnHorseGameCheck_Update(Actor* thisx, PlayState* play); void EnHorseGameCheck_Draw(Actor* thisx, PlayState* play); ActorInit En_Horse_Game_Check_InitVars = { - ACTOR_EN_HORSE_GAME_CHECK, - ACTORCAT_BG, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnHorseGameCheck), - (ActorFunc)EnHorseGameCheck_Init, - (ActorFunc)EnHorseGameCheck_Destroy, - (ActorFunc)EnHorseGameCheck_Update, - (ActorFunc)EnHorseGameCheck_Draw, + /**/ ACTOR_EN_HORSE_GAME_CHECK, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnHorseGameCheck), + /**/ EnHorseGameCheck_Init, + /**/ EnHorseGameCheck_Destroy, + /**/ EnHorseGameCheck_Update, + /**/ EnHorseGameCheck_Draw, }; static Vec3f sIngoRaceCheckpoints[] = { diff --git a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c index 83aee17eb4..f8f6c79944 100644 --- a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c +++ b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c @@ -24,15 +24,15 @@ void func_80A68AF0(EnHorseGanon* this, PlayState* play); void func_80A68DB0(EnHorseGanon* this, PlayState* play); ActorInit En_Horse_Ganon_InitVars = { - ACTOR_EN_HORSE_GANON, - ACTORCAT_BG, - FLAGS, - OBJECT_HORSE_GANON, - sizeof(EnHorseGanon), - (ActorFunc)EnHorseGanon_Init, - (ActorFunc)EnHorseGanon_Destroy, - (ActorFunc)EnHorseGanon_Update, - (ActorFunc)EnHorseGanon_Draw, + /**/ ACTOR_EN_HORSE_GANON, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HORSE_GANON, + /**/ sizeof(EnHorseGanon), + /**/ EnHorseGanon_Init, + /**/ EnHorseGanon_Destroy, + /**/ EnHorseGanon_Update, + /**/ EnHorseGanon_Draw, }; static AnimationHeader* sAnimations[] = { diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c index 64c15537dd..6448c69159 100644 --- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c +++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c @@ -20,15 +20,15 @@ void func_80A6A4DC(EnHorseLinkChild* this); void func_80A6A724(EnHorseLinkChild* this); ActorInit En_Horse_Link_Child_InitVars = { - ACTOR_EN_HORSE_LINK_CHILD, - ACTORCAT_BG, - FLAGS, - OBJECT_HORSE_LINK_CHILD, - sizeof(EnHorseLinkChild), - (ActorFunc)EnHorseLinkChild_Init, - (ActorFunc)EnHorseLinkChild_Destroy, - (ActorFunc)EnHorseLinkChild_Update, - (ActorFunc)EnHorseLinkChild_Draw, + /**/ ACTOR_EN_HORSE_LINK_CHILD, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HORSE_LINK_CHILD, + /**/ sizeof(EnHorseLinkChild), + /**/ EnHorseLinkChild_Init, + /**/ EnHorseLinkChild_Destroy, + /**/ EnHorseLinkChild_Update, + /**/ EnHorseLinkChild_Draw, }; static AnimationHeader* sAnimations[] = { diff --git a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c index 5629d60592..6847e02998 100644 --- a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c +++ b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c @@ -40,15 +40,15 @@ void func_80A6C4CC(EnHorseNormal* this); void func_80A6C6B0(EnHorseNormal* this); ActorInit En_Horse_Normal_InitVars = { - ACTOR_EN_HORSE_NORMAL, - ACTORCAT_BG, - FLAGS, - OBJECT_HORSE_NORMAL, - sizeof(EnHorseNormal), - (ActorFunc)EnHorseNormal_Init, - (ActorFunc)EnHorseNormal_Destroy, - (ActorFunc)EnHorseNormal_Update, - (ActorFunc)EnHorseNormal_Draw, + /**/ ACTOR_EN_HORSE_NORMAL, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HORSE_NORMAL, + /**/ sizeof(EnHorseNormal), + /**/ EnHorseNormal_Init, + /**/ EnHorseNormal_Destroy, + /**/ EnHorseNormal_Update, + /**/ EnHorseNormal_Draw, }; static AnimationHeader* sAnimations[] = { diff --git a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c index a6b3672fac..e3bd35ec39 100644 --- a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c +++ b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c @@ -19,15 +19,15 @@ void EnHorseZelda_Gallop(EnHorseZelda* this, PlayState* play); void EnHorseZelda_SetupStop(EnHorseZelda* this); ActorInit En_Horse_Zelda_InitVars = { - ACTOR_EN_HORSE_ZELDA, - ACTORCAT_BG, - FLAGS, - OBJECT_HORSE_ZELDA, - sizeof(EnHorseZelda), - (ActorFunc)EnHorseZelda_Init, - (ActorFunc)EnHorseZelda_Destroy, - (ActorFunc)EnHorseZelda_Update, - (ActorFunc)EnHorseZelda_Draw, + /**/ ACTOR_EN_HORSE_ZELDA, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_HORSE_ZELDA, + /**/ sizeof(EnHorseZelda), + /**/ EnHorseZelda_Init, + /**/ EnHorseZelda_Destroy, + /**/ EnHorseZelda_Update, + /**/ EnHorseZelda_Draw, }; static AnimationHeader* sAnimationHeaders[] = { &gHorseZeldaGallopingAnim }; diff --git a/src/overlays/actors/ovl_En_Hs/z_en_hs.c b/src/overlays/actors/ovl_En_Hs/z_en_hs.c index afafe3ef32..ac1c6c8633 100644 --- a/src/overlays/actors/ovl_En_Hs/z_en_hs.c +++ b/src/overlays/actors/ovl_En_Hs/z_en_hs.c @@ -19,15 +19,15 @@ void func_80A6E9AC(EnHs* this, PlayState* play); void func_80A6E6B0(EnHs* this, PlayState* play); ActorInit En_Hs_InitVars = { - ACTOR_EN_HS, - ACTORCAT_NPC, - FLAGS, - OBJECT_HS, - sizeof(EnHs), - (ActorFunc)EnHs_Init, - (ActorFunc)EnHs_Destroy, - (ActorFunc)EnHs_Update, - (ActorFunc)EnHs_Draw, + /**/ ACTOR_EN_HS, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_HS, + /**/ sizeof(EnHs), + /**/ EnHs_Init, + /**/ EnHs_Destroy, + /**/ EnHs_Update, + /**/ EnHs_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c index 5722c8ac7f..d7bc8d45c9 100644 --- a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c +++ b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c @@ -17,15 +17,15 @@ void EnHs2_Draw(Actor* thisx, PlayState* play); void func_80A6F1A4(EnHs2* this, PlayState* play); ActorInit En_Hs2_InitVars = { - ACTOR_EN_HS2, - ACTORCAT_NPC, - FLAGS, - OBJECT_HS, - sizeof(EnHs2), - (ActorFunc)EnHs2_Init, - (ActorFunc)EnHs2_Destroy, - (ActorFunc)EnHs2_Update, - (ActorFunc)EnHs2_Draw, + /**/ ACTOR_EN_HS2, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_HS, + /**/ sizeof(EnHs2), + /**/ EnHs2_Init, + /**/ EnHs2_Destroy, + /**/ EnHs2_Update, + /**/ EnHs2_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Hy/z_en_hy.c b/src/overlays/actors/ovl_En_Hy/z_en_hy.c index aa149275c2..c7fc427570 100644 --- a/src/overlays/actors/ovl_En_Hy/z_en_hy.c +++ b/src/overlays/actors/ovl_En_Hy/z_en_hy.c @@ -33,15 +33,15 @@ void EnHy_DoNothing(EnHy* this, PlayState* play); void func_80A714C4(EnHy* this, PlayState* play); ActorInit En_Hy_InitVars = { - ACTOR_EN_HY, - ACTORCAT_NPC, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnHy), - (ActorFunc)EnHy_Init, - (ActorFunc)EnHy_Destroy, - (ActorFunc)EnHy_Update, - (ActorFunc)EnHy_Draw, + /**/ ACTOR_EN_HY, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnHy), + /**/ EnHy_Init, + /**/ EnHy_Destroy, + /**/ EnHy_Update, + /**/ EnHy_Draw, }; static ColliderCylinderInit sColCylInit = { diff --git a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c index 8a2323df97..767be3ef1a 100644 --- a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c +++ b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c @@ -25,15 +25,15 @@ void EnIceHono_SetupActionSpreadFlames(EnIceHono* this); void EnIceHono_SetupActionSmallFlame(EnIceHono* this); ActorInit En_Ice_Hono_InitVars = { - ACTOR_EN_ICE_HONO, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnIceHono), - (ActorFunc)EnIceHono_Init, - (ActorFunc)EnIceHono_Destroy, - (ActorFunc)EnIceHono_Update, - (ActorFunc)EnIceHono_Draw, + /**/ ACTOR_EN_ICE_HONO, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnIceHono), + /**/ EnIceHono_Init, + /**/ EnIceHono_Destroy, + /**/ EnIceHono_Update, + /**/ EnIceHono_Draw, }; static ColliderCylinderInit sCylinderInitCapturableFlame = { diff --git a/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/src/overlays/actors/ovl_En_Ik/z_en_ik.c index 3ef6332ef3..72495a3eca 100644 --- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -1558,13 +1558,13 @@ void EnIk_Init(Actor* thisx, PlayState* play) { } ActorInit En_Ik_InitVars = { - ACTOR_EN_IK, - ACTORCAT_BOSS, - FLAGS, - OBJECT_IK, - sizeof(EnIk), - (ActorFunc)EnIk_Init, - (ActorFunc)EnIk_Destroy, - (ActorFunc)EnIk_UpdateCutscene, - (ActorFunc)EnIk_DrawCutscene, + /**/ ACTOR_EN_IK, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_IK, + /**/ sizeof(EnIk), + /**/ EnIk_Init, + /**/ EnIk_Destroy, + /**/ EnIk_UpdateCutscene, + /**/ EnIk_DrawCutscene, }; diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index 6fc73137cb..1a14d90972 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -25,15 +25,15 @@ void func_80A7AA40(EnIn* this, PlayState* play); void func_80A7A4BC(EnIn* this, PlayState* play); ActorInit En_In_InitVars = { - ACTOR_EN_IN, - ACTORCAT_NPC, - FLAGS, - OBJECT_IN, - sizeof(EnIn), - (ActorFunc)EnIn_Init, - (ActorFunc)EnIn_Destroy, - (ActorFunc)EnIn_Update, - (ActorFunc)EnIn_Draw, + /**/ ACTOR_EN_IN, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_IN, + /**/ sizeof(EnIn), + /**/ EnIn_Init, + /**/ EnIn_Destroy, + /**/ EnIn_Update, + /**/ EnIn_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/src/overlays/actors/ovl_En_Insect/z_en_insect.c index 6e12043bc4..69aef2e27e 100644 --- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -43,15 +43,15 @@ static s16 sCaughtCount = 0; static s16 sDroppedCount = 0; ActorInit En_Insect_InitVars = { - ACTOR_EN_INSECT, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnInsect), - (ActorFunc)EnInsect_Init, - (ActorFunc)EnInsect_Destroy, - (ActorFunc)EnInsect_Update, - (ActorFunc)EnInsect_Draw, + /**/ ACTOR_EN_INSECT, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnInsect), + /**/ EnInsect_Init, + /**/ EnInsect_Destroy, + /**/ EnInsect_Update, + /**/ EnInsect_Draw, }; static ColliderJntSphElementInit sColliderItemInit[1] = { diff --git a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c index 11034206eb..63076ef647 100644 --- a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c +++ b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c @@ -33,15 +33,15 @@ static s16 sRotSpeedX = 0; static s16 sRotSpeedY = 0; ActorInit En_Ishi_InitVars = { - ACTOR_EN_ISHI, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_FIELD_KEEP, - sizeof(EnIshi), - (ActorFunc)EnIshi_Init, - (ActorFunc)EnIshi_Destroy, - (ActorFunc)EnIshi_Update, - (ActorFunc)EnIshi_Draw, + /**/ ACTOR_EN_ISHI, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_FIELD_KEEP, + /**/ sizeof(EnIshi), + /**/ EnIshi_Init, + /**/ EnIshi_Destroy, + /**/ EnIshi_Update, + /**/ EnIshi_Draw, }; static f32 sRockScales[] = { 0.1f, 0.4f }; diff --git a/src/overlays/actors/ovl_En_It/z_en_it.c b/src/overlays/actors/ovl_En_It/z_en_it.c index cae9147258..d12620916e 100644 --- a/src/overlays/actors/ovl_En_It/z_en_it.c +++ b/src/overlays/actors/ovl_En_It/z_en_it.c @@ -35,15 +35,15 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; ActorInit En_It_InitVars = { - ACTOR_EN_IT, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnIt), - (ActorFunc)EnIt_Init, - (ActorFunc)EnIt_Destroy, - (ActorFunc)EnIt_Update, - (ActorFunc)NULL, + /**/ ACTOR_EN_IT, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnIt), + /**/ EnIt_Init, + /**/ EnIt_Destroy, + /**/ EnIt_Update, + /**/ NULL, }; void EnIt_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Jj/z_en_jj.c b/src/overlays/actors/ovl_En_Jj/z_en_jj.c index 7aad14e845..383dd7fa5d 100644 --- a/src/overlays/actors/ovl_En_Jj/z_en_jj.c +++ b/src/overlays/actors/ovl_En_Jj/z_en_jj.c @@ -29,15 +29,15 @@ void EnJj_BeginCutscene(EnJj* this, PlayState* play); void EnJj_RemoveDust(EnJj* this, PlayState* play); ActorInit En_Jj_InitVars = { - ACTOR_EN_JJ, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_JJ, - sizeof(EnJj), - (ActorFunc)EnJj_Init, - (ActorFunc)EnJj_Destroy, - (ActorFunc)EnJj_Update, - (ActorFunc)EnJj_Draw, + /**/ ACTOR_EN_JJ, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_JJ, + /**/ sizeof(EnJj), + /**/ EnJj_Init, + /**/ EnJj_Destroy, + /**/ EnJj_Update, + /**/ EnJj_Draw, }; static s32 sUnused = 0; diff --git a/src/overlays/actors/ovl_En_Js/z_en_js.c b/src/overlays/actors/ovl_En_Js/z_en_js.c index b576b0c4f0..ba9d10be7e 100644 --- a/src/overlays/actors/ovl_En_Js/z_en_js.c +++ b/src/overlays/actors/ovl_En_Js/z_en_js.c @@ -17,15 +17,15 @@ void EnJs_Draw(Actor* thisx, PlayState* play); void func_80A89304(EnJs* this, PlayState* play); ActorInit En_Js_InitVars = { - ACTOR_EN_JS, - ACTORCAT_NPC, - FLAGS, - OBJECT_JS, - sizeof(EnJs), - (ActorFunc)EnJs_Init, - (ActorFunc)EnJs_Destroy, - (ActorFunc)EnJs_Update, - (ActorFunc)EnJs_Draw, + /**/ ACTOR_EN_JS, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_JS, + /**/ sizeof(EnJs), + /**/ EnJs_Init, + /**/ EnJs_Destroy, + /**/ EnJs_Update, + /**/ EnJs_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c index 5110abef79..3dde032f65 100644 --- a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c +++ b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c @@ -15,15 +15,15 @@ void EnJsjutan_Update(Actor* thisx, PlayState* play2); void EnJsjutan_Draw(Actor* thisx, PlayState* play2); ActorInit En_Jsjutan_InitVars = { - ACTOR_EN_JSJUTAN, - ACTORCAT_NPC, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnJsjutan), - (ActorFunc)EnJsjutan_Init, - (ActorFunc)EnJsjutan_Destroy, - (ActorFunc)EnJsjutan_Update, - (ActorFunc)EnJsjutan_Draw, + /**/ ACTOR_EN_JSJUTAN, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnJsjutan), + /**/ EnJsjutan_Init, + /**/ EnJsjutan_Destroy, + /**/ EnJsjutan_Update, + /**/ EnJsjutan_Draw, }; // Shadow texture. 32x64 I8. diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c index ea8c6df9f3..9b4e6a50f1 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -43,15 +43,15 @@ static ColliderCylinderInit sCylinderInit = { }; ActorInit En_Kakasi_InitVars = { - ACTOR_EN_KAKASI, - ACTORCAT_NPC, - FLAGS, - OBJECT_KA, - sizeof(EnKakasi), - (ActorFunc)EnKakasi_Init, - (ActorFunc)EnKakasi_Destroy, - (ActorFunc)EnKakasi_Update, - (ActorFunc)EnKakasi_Draw, + /**/ ACTOR_EN_KAKASI, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_KA, + /**/ sizeof(EnKakasi), + /**/ EnKakasi_Init, + /**/ EnKakasi_Destroy, + /**/ EnKakasi_Update, + /**/ EnKakasi_Draw, }; void EnKakasi_Destroy(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c b/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c index 306e64c3f9..d7c15346e4 100644 --- a/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c +++ b/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c @@ -42,15 +42,15 @@ void func_80A90578(EnKakasi2* this, PlayState* play); void func_80A906C4(EnKakasi2* this, PlayState* play); ActorInit En_Kakasi2_InitVars = { - ACTOR_EN_KAKASI2, - ACTORCAT_PROP, - FLAGS, - OBJECT_KA, - sizeof(EnKakasi2), - (ActorFunc)EnKakasi2_Init, - (ActorFunc)EnKakasi2_Destroy, - (ActorFunc)EnKakasi2_Update, - NULL, + /**/ ACTOR_EN_KAKASI2, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_KA, + /**/ sizeof(EnKakasi2), + /**/ EnKakasi2_Init, + /**/ EnKakasi2_Destroy, + /**/ EnKakasi2_Update, + /**/ NULL, }; void EnKakasi2_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c index 4089bfdbcd..fc566a094e 100644 --- a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c +++ b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c @@ -47,15 +47,15 @@ static ColliderCylinderInit sCylinderInit = { }; ActorInit En_Kakasi3_InitVars = { - ACTOR_EN_KAKASI3, - ACTORCAT_NPC, - FLAGS, - OBJECT_KA, - sizeof(EnKakasi3), - (ActorFunc)EnKakasi3_Init, - (ActorFunc)EnKakasi3_Destroy, - (ActorFunc)EnKakasi3_Update, - (ActorFunc)EnKakasi3_Draw, + /**/ ACTOR_EN_KAKASI3, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_KA, + /**/ sizeof(EnKakasi3), + /**/ EnKakasi3_Init, + /**/ EnKakasi3_Destroy, + /**/ EnKakasi3_Update, + /**/ EnKakasi3_Draw, }; void EnKakasi3_Destroy(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c index 3cdecda1ce..8b780eb645 100644 --- a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c +++ b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c @@ -76,15 +76,15 @@ void EnKanban_Update(Actor* thisx, PlayState* play2); void EnKanban_Draw(Actor* thisx, PlayState* play); ActorInit En_Kanban_InitVars = { - ACTOR_EN_KANBAN, - ACTORCAT_PROP, - FLAGS, - OBJECT_KANBAN, - sizeof(EnKanban), - (ActorFunc)EnKanban_Init, - (ActorFunc)EnKanban_Destroy, - (ActorFunc)EnKanban_Update, - (ActorFunc)EnKanban_Draw, + /**/ ACTOR_EN_KANBAN, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_KANBAN, + /**/ sizeof(EnKanban), + /**/ EnKanban_Init, + /**/ EnKanban_Destroy, + /**/ EnKanban_Update, + /**/ EnKanban_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c index a16d5335d8..2569c2cd37 100644 --- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c +++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c @@ -30,15 +30,15 @@ void EnKarebaba_Regrow(EnKarebaba* this, PlayState* play); void EnKarebaba_Upright(EnKarebaba* this, PlayState* play); ActorInit En_Karebaba_InitVars = { - ACTOR_EN_KAREBABA, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_DEKUBABA, - sizeof(EnKarebaba), - (ActorFunc)EnKarebaba_Init, - (ActorFunc)EnKarebaba_Destroy, - (ActorFunc)EnKarebaba_Update, - (ActorFunc)EnKarebaba_Draw, + /**/ ACTOR_EN_KAREBABA, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_DEKUBABA, + /**/ sizeof(EnKarebaba), + /**/ EnKarebaba_Init, + /**/ EnKarebaba_Destroy, + /**/ EnKarebaba_Update, + /**/ EnKarebaba_Draw, }; static ColliderCylinderInit sBodyColliderInit = { diff --git a/src/overlays/actors/ovl_En_Ko/z_en_ko.c b/src/overlays/actors/ovl_En_Ko/z_en_ko.c index a1be751edc..83720cf915 100644 --- a/src/overlays/actors/ovl_En_Ko/z_en_ko.c +++ b/src/overlays/actors/ovl_En_Ko/z_en_ko.c @@ -31,15 +31,15 @@ void func_80A99560(EnKo* this, PlayState* play); s32 func_80A98ECC(EnKo* this, PlayState* play); ActorInit En_Ko_InitVars = { - ACTOR_EN_KO, - ACTORCAT_NPC, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnKo), - (ActorFunc)EnKo_Init, - (ActorFunc)EnKo_Destroy, - (ActorFunc)EnKo_Update, - (ActorFunc)EnKo_Draw, + /**/ ACTOR_EN_KO, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnKo), + /**/ EnKo_Init, + /**/ EnKo_Destroy, + /**/ EnKo_Update, + /**/ EnKo_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c index 193725512a..017d77e144 100644 --- a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c +++ b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c @@ -42,15 +42,15 @@ static s16 rotSpeedYtarget = 0; static s16 rotSpeedY = 0; ActorInit En_Kusa_InitVars = { - ACTOR_EN_KUSA, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnKusa), - (ActorFunc)EnKusa_Init, - (ActorFunc)EnKusa_Destroy, - (ActorFunc)EnKusa_Update, - NULL, + /**/ ACTOR_EN_KUSA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnKusa), + /**/ EnKusa_Init, + /**/ EnKusa_Destroy, + /**/ EnKusa_Update, + /**/ NULL, }; static s16 sObjectIds[] = { OBJECT_GAMEPLAY_FIELD_KEEP, OBJECT_KUSA, OBJECT_KUSA }; diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/src/overlays/actors/ovl_En_Kz/z_en_kz.c index 29c1f4a5e4..05430e8494 100644 --- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -23,15 +23,15 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play); void EnKz_StartTimer(EnKz* this, PlayState* play); ActorInit En_Kz_InitVars = { - ACTOR_EN_KZ, - ACTORCAT_NPC, - FLAGS, - OBJECT_KZ, - sizeof(EnKz), - (ActorFunc)EnKz_Init, - (ActorFunc)EnKz_Destroy, - (ActorFunc)EnKz_Update, - (ActorFunc)EnKz_Draw, + /**/ ACTOR_EN_KZ, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_KZ, + /**/ sizeof(EnKz), + /**/ EnKz_Init, + /**/ EnKz_Destroy, + /**/ EnKz_Update, + /**/ EnKz_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Light/z_en_light.c b/src/overlays/actors/ovl_En_Light/z_en_light.c index dd287fc782..e6bf1ab0ca 100644 --- a/src/overlays/actors/ovl_En_Light/z_en_light.c +++ b/src/overlays/actors/ovl_En_Light/z_en_light.c @@ -17,15 +17,15 @@ void EnLight_Draw(Actor* thisx, PlayState* play); void EnLight_UpdateSwitch(Actor* thisx, PlayState* play); ActorInit En_Light_InitVars = { - ACTOR_EN_LIGHT, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnLight), - (ActorFunc)EnLight_Init, - (ActorFunc)EnLight_Destroy, - (ActorFunc)EnLight_Update, - (ActorFunc)EnLight_Draw, + /**/ ACTOR_EN_LIGHT, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnLight), + /**/ EnLight_Init, + /**/ EnLight_Destroy, + /**/ EnLight_Update, + /**/ EnLight_Draw, }; typedef struct { diff --git a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c index cd35e37872..f89e7dc765 100644 --- a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c +++ b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c @@ -15,15 +15,15 @@ void EnLightbox_Update(Actor* thisx, PlayState* play); void EnLightbox_Draw(Actor* thisx, PlayState* play); ActorInit En_Lightbox_InitVars = { - ACTOR_EN_LIGHTBOX, - ACTORCAT_PROP, - FLAGS, - OBJECT_LIGHTBOX, - sizeof(EnLightbox), - (ActorFunc)EnLightbox_Init, - (ActorFunc)EnLightbox_Destroy, - (ActorFunc)EnLightbox_Update, - (ActorFunc)EnLightbox_Draw, + /**/ ACTOR_EN_LIGHTBOX, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_LIGHTBOX, + /**/ sizeof(EnLightbox), + /**/ EnLightbox_Init, + /**/ EnLightbox_Destroy, + /**/ EnLightbox_Update, + /**/ EnLightbox_Draw, }; void EnLightbox_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c index 3890c267da..038bb1bf11 100644 --- a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c +++ b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c @@ -13,15 +13,15 @@ void EnMFire1_Destroy(Actor* thisx, PlayState* play); void EnMFire1_Update(Actor* thisx, PlayState* play); ActorInit En_M_Fire1_InitVars = { - ACTOR_EN_M_FIRE1, - ACTORCAT_MISC, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnMFire1), - (ActorFunc)EnMFire1_Init, - (ActorFunc)EnMFire1_Destroy, - (ActorFunc)EnMFire1_Update, - NULL, + /**/ ACTOR_EN_M_FIRE1, + /**/ ACTORCAT_MISC, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnMFire1), + /**/ EnMFire1_Init, + /**/ EnMFire1_Destroy, + /**/ EnMFire1_Update, + /**/ NULL, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c index d94dc7ec7f..51371105a4 100644 --- a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c +++ b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c @@ -13,15 +13,15 @@ void func_80A9F408(EnMThunder* this, PlayState* play); void func_80A9F9B4(EnMThunder* this, PlayState* play); ActorInit En_M_Thunder_InitVars = { - ACTOR_EN_M_THUNDER, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnMThunder), - (ActorFunc)EnMThunder_Init, - (ActorFunc)EnMThunder_Destroy, - (ActorFunc)EnMThunder_Update, - (ActorFunc)EnMThunder_Draw, + /**/ ACTOR_EN_M_THUNDER, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnMThunder), + /**/ EnMThunder_Init, + /**/ EnMThunder_Destroy, + /**/ EnMThunder_Update, + /**/ EnMThunder_Draw, }; static ColliderCylinderInit D_80AA0420 = { diff --git a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c index a793a16957..702aa3aa37 100644 --- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c +++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c @@ -24,15 +24,15 @@ void func_80AA1150(EnMa1* this, PlayState* play); void EnMa1_DoNothing(EnMa1* this, PlayState* play); ActorInit En_Ma1_InitVars = { - ACTOR_EN_MA1, - ACTORCAT_NPC, - FLAGS, - OBJECT_MA1, - sizeof(EnMa1), - (ActorFunc)EnMa1_Init, - (ActorFunc)EnMa1_Destroy, - (ActorFunc)EnMa1_Update, - (ActorFunc)EnMa1_Draw, + /**/ ACTOR_EN_MA1, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_MA1, + /**/ sizeof(EnMa1), + /**/ EnMa1_Init, + /**/ EnMa1_Destroy, + /**/ EnMa1_Update, + /**/ EnMa1_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c index 8bd61ffafa..16f6eec8c7 100644 --- a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c +++ b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c @@ -18,15 +18,15 @@ void func_80AA20E4(EnMa2* this, PlayState* play); void func_80AA21C8(EnMa2* this, PlayState* play); ActorInit En_Ma2_InitVars = { - ACTOR_EN_MA2, - ACTORCAT_NPC, - FLAGS, - OBJECT_MA2, - sizeof(EnMa2), - (ActorFunc)EnMa2_Init, - (ActorFunc)EnMa2_Destroy, - (ActorFunc)EnMa2_Update, - (ActorFunc)EnMa2_Draw, + /**/ ACTOR_EN_MA2, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_MA2, + /**/ sizeof(EnMa2), + /**/ EnMa2_Init, + /**/ EnMa2_Destroy, + /**/ EnMa2_Update, + /**/ EnMa2_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c index caccc853f3..03af656731 100644 --- a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c +++ b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c @@ -21,15 +21,15 @@ void EnMa3_UpdateEyes(EnMa3* this); void func_80AA3200(EnMa3* this, PlayState* play); ActorInit En_Ma3_InitVars = { - ACTOR_EN_MA3, - ACTORCAT_NPC, - FLAGS, - OBJECT_MA2, - sizeof(EnMa3), - (ActorFunc)EnMa3_Init, - (ActorFunc)EnMa3_Destroy, - (ActorFunc)EnMa3_Update, - (ActorFunc)EnMa3_Draw, + /**/ ACTOR_EN_MA3, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_MA2, + /**/ sizeof(EnMa3), + /**/ EnMa3_Init, + /**/ EnMa3_Destroy, + /**/ EnMa3_Update, + /**/ EnMa3_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/src/overlays/actors/ovl_En_Mag/z_en_mag.c index 30ccb46ab1..31991917d7 100644 --- a/src/overlays/actors/ovl_En_Mag/z_en_mag.c +++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.c @@ -15,15 +15,15 @@ void EnMag_Update(Actor* thisx, PlayState* play); void EnMag_Draw(Actor* thisx, PlayState* play); ActorInit En_Mag_InitVars = { - ACTOR_EN_MAG, - ACTORCAT_PROP, - FLAGS, - OBJECT_MAG, - sizeof(EnMag), - (ActorFunc)EnMag_Init, - (ActorFunc)EnMag_Destroy, - (ActorFunc)EnMag_Update, - (ActorFunc)EnMag_Draw, + /**/ ACTOR_EN_MAG, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_MAG, + /**/ sizeof(EnMag), + /**/ EnMag_Init, + /**/ EnMag_Destroy, + /**/ EnMag_Update, + /**/ EnMag_Draw, }; static s16 sDelayTimer = 0; diff --git a/src/overlays/actors/ovl_En_Mb/z_en_mb.c b/src/overlays/actors/ovl_En_Mb/z_en_mb.c index eb26885d3a..498aea3afe 100644 --- a/src/overlays/actors/ovl_En_Mb/z_en_mb.c +++ b/src/overlays/actors/ovl_En_Mb/z_en_mb.c @@ -54,15 +54,15 @@ void EnMb_Update(Actor* thisx, PlayState* play); void EnMb_Draw(Actor* thisx, PlayState* play); ActorInit En_Mb_InitVars = { - ACTOR_EN_MB, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_MB, - sizeof(EnMb), - (ActorFunc)EnMb_Init, - (ActorFunc)EnMb_Destroy, - (ActorFunc)EnMb_Update, - (ActorFunc)EnMb_Draw, + /**/ ACTOR_EN_MB, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_MB, + /**/ sizeof(EnMb), + /**/ EnMb_Init, + /**/ EnMb_Destroy, + /**/ EnMb_Update, + /**/ EnMb_Draw, }; void EnMb_SetupSpearPatrolTurnTowardsWaypoint(EnMb* this, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.c b/src/overlays/actors/ovl_En_Md/z_en_md.c index 478d569afb..e57d577a28 100644 --- a/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -22,15 +22,15 @@ void func_80AABC10(EnMd* this, PlayState* play); void func_80AABD0C(EnMd* this, PlayState* play); ActorInit En_Md_InitVars = { - ACTOR_EN_MD, - ACTORCAT_NPC, - FLAGS, - OBJECT_MD, - sizeof(EnMd), - (ActorFunc)EnMd_Init, - (ActorFunc)EnMd_Destroy, - (ActorFunc)EnMd_Update, - (ActorFunc)EnMd_Draw, + /**/ ACTOR_EN_MD, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_MD, + /**/ sizeof(EnMd), + /**/ EnMd_Init, + /**/ EnMd_Destroy, + /**/ EnMd_Update, + /**/ EnMd_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Mk/z_en_mk.c b/src/overlays/actors/ovl_En_Mk/z_en_mk.c index 314397a9ff..210f36751a 100644 --- a/src/overlays/actors/ovl_En_Mk/z_en_mk.c +++ b/src/overlays/actors/ovl_En_Mk/z_en_mk.c @@ -17,15 +17,15 @@ void EnMk_Draw(Actor* thisx, PlayState* play); void EnMk_Wait(EnMk* this, PlayState* play); ActorInit En_Mk_InitVars = { - ACTOR_EN_MK, - ACTORCAT_NPC, - FLAGS, - OBJECT_MK, - sizeof(EnMk), - (ActorFunc)EnMk_Init, - (ActorFunc)EnMk_Destroy, - (ActorFunc)EnMk_Update, - (ActorFunc)EnMk_Draw, + /**/ ACTOR_EN_MK, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_MK, + /**/ sizeof(EnMk), + /**/ EnMk_Init, + /**/ EnMk_Destroy, + /**/ EnMk_Update, + /**/ EnMk_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Mm/z_en_mm.c b/src/overlays/actors/ovl_En_Mm/z_en_mm.c index 2245d1984e..53a5c4a4d9 100644 --- a/src/overlays/actors/ovl_En_Mm/z_en_mm.c +++ b/src/overlays/actors/ovl_En_Mm/z_en_mm.c @@ -40,15 +40,15 @@ s32 EnMm_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po void EnMm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void*); ActorInit En_Mm_InitVars = { - ACTOR_EN_MM, - ACTORCAT_NPC, - FLAGS, - OBJECT_MM, - sizeof(EnMm), - (ActorFunc)EnMm_Init, - (ActorFunc)EnMm_Destroy, - (ActorFunc)EnMm_Update, - (ActorFunc)EnMm_Draw, + /**/ ACTOR_EN_MM, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_MM, + /**/ sizeof(EnMm), + /**/ EnMm_Init, + /**/ EnMm_Destroy, + /**/ EnMm_Update, + /**/ EnMm_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c index ea7d525d28..07a5a5eae5 100644 --- a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c +++ b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c @@ -36,15 +36,15 @@ s32 EnMm2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p void EnMm2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx); ActorInit En_Mm2_InitVars = { - ACTOR_EN_MM2, - ACTORCAT_NPC, - FLAGS, - OBJECT_MM, - sizeof(EnMm2), - (ActorFunc)EnMm2_Init, - (ActorFunc)EnMm2_Destroy, - (ActorFunc)EnMm2_Update, - (ActorFunc)EnMm2_Draw, + /**/ ACTOR_EN_MM2, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_MM, + /**/ sizeof(EnMm2), + /**/ EnMm2_Init, + /**/ EnMm2_Destroy, + /**/ EnMm2_Update, + /**/ EnMm2_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index e3c7c6c654..e834756ff0 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -21,15 +21,15 @@ void EnMs_Sell(EnMs* this, PlayState* play); void EnMs_TalkAfterPurchase(EnMs* this, PlayState* play); ActorInit En_Ms_InitVars = { - ACTOR_EN_MS, - ACTORCAT_NPC, - FLAGS, - OBJECT_MS, - sizeof(EnMs), - (ActorFunc)EnMs_Init, - (ActorFunc)EnMs_Destroy, - (ActorFunc)EnMs_Update, - (ActorFunc)EnMs_Draw, + /**/ ACTOR_EN_MS, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_MS, + /**/ sizeof(EnMs), + /**/ EnMs_Init, + /**/ EnMs_Destroy, + /**/ EnMs_Update, + /**/ EnMs_Draw, }; static ColliderCylinderInitType1 sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Mu/z_en_mu.c b/src/overlays/actors/ovl_En_Mu/z_en_mu.c index 6be01cafd2..64e5b9ef17 100644 --- a/src/overlays/actors/ovl_En_Mu/z_en_mu.c +++ b/src/overlays/actors/ovl_En_Mu/z_en_mu.c @@ -40,15 +40,15 @@ static ColliderCylinderInit D_80AB0BD0 = { static CollisionCheckInfoInit2 D_80AB0BFC = { 0, 0, 0, 0, MASS_IMMOVABLE }; ActorInit En_Mu_InitVars = { - ACTOR_EN_MU, - ACTORCAT_NPC, - FLAGS, - OBJECT_MU, - sizeof(EnMu), - (ActorFunc)EnMu_Init, - (ActorFunc)EnMu_Destroy, - (ActorFunc)EnMu_Update, - (ActorFunc)EnMu_Draw, + /**/ ACTOR_EN_MU, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_MU, + /**/ sizeof(EnMu), + /**/ EnMu_Init, + /**/ EnMu_Destroy, + /**/ EnMu_Update, + /**/ EnMu_Draw, }; void EnMu_SetupAction(EnMu* this, EnMuActionFunc actionFunc) { diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/src/overlays/actors/ovl_En_Nb/z_en_nb.c index db81a98eee..f79c656387 100644 --- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -1540,13 +1540,13 @@ void EnNb_Draw(Actor* thisx, PlayState* play) { } ActorInit En_Nb_InitVars = { - ACTOR_EN_NB, - ACTORCAT_NPC, - FLAGS, - OBJECT_NB, - sizeof(EnNb), - (ActorFunc)EnNb_Init, - (ActorFunc)EnNb_Destroy, - (ActorFunc)EnNb_Update, - (ActorFunc)EnNb_Draw, + /**/ ACTOR_EN_NB, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_NB, + /**/ sizeof(EnNb), + /**/ EnNb_Init, + /**/ EnNb_Destroy, + /**/ EnNb_Update, + /**/ EnNb_Draw, }; diff --git a/src/overlays/actors/ovl_En_Niw/z_en_niw.c b/src/overlays/actors/ovl_En_Niw/z_en_niw.c index 8c05a3636d..0ebce6a0a7 100644 --- a/src/overlays/actors/ovl_En_Niw/z_en_niw.c +++ b/src/overlays/actors/ovl_En_Niw/z_en_niw.c @@ -37,15 +37,15 @@ void EnNiw_DrawEffects(EnNiw* this, PlayState* play); static s16 D_80AB85E0 = 0; ActorInit En_Niw_InitVars = { - ACTOR_EN_NIW, - ACTORCAT_PROP, - FLAGS, - OBJECT_NIW, - sizeof(EnNiw), - (ActorFunc)EnNiw_Init, - (ActorFunc)EnNiw_Destroy, - (ActorFunc)EnNiw_Update, - (ActorFunc)EnNiw_Draw, + /**/ ACTOR_EN_NIW, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_NIW, + /**/ sizeof(EnNiw), + /**/ EnNiw_Init, + /**/ EnNiw_Destroy, + /**/ EnNiw_Update, + /**/ EnNiw_Draw, }; static f32 D_80AB8604[] = { diff --git a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c index 85b6bd1bc1..e3e51fbde4 100644 --- a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c +++ b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c @@ -20,15 +20,15 @@ void func_80AB94D0(EnNiwGirl* this, PlayState* play); void func_80AB9210(EnNiwGirl* this, PlayState* play); ActorInit En_Niw_Girl_InitVars = { - ACTOR_EN_NIW_GIRL, - ACTORCAT_NPC, - FLAGS, - OBJECT_GR, - sizeof(EnNiwGirl), - (ActorFunc)EnNiwGirl_Init, - (ActorFunc)EnNiwGirl_Destroy, - (ActorFunc)EnNiwGirl_Update, - (ActorFunc)EnNiwGirl_Draw, + /**/ ACTOR_EN_NIW_GIRL, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_GR, + /**/ sizeof(EnNiwGirl), + /**/ EnNiwGirl_Init, + /**/ EnNiwGirl_Destroy, + /**/ EnNiwGirl_Update, + /**/ EnNiwGirl_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c index efd92c36d8..dc4d97ef79 100644 --- a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c +++ b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c @@ -26,15 +26,15 @@ void func_80ABA654(EnNiwLady* this, PlayState* play); void func_80ABAD7C(EnNiwLady* this, PlayState* play); ActorInit En_Niw_Lady_InitVars = { - ACTOR_EN_NIW_LADY, - ACTORCAT_NPC, - FLAGS, - OBJECT_ANE, - sizeof(EnNiwLady), - (ActorFunc)EnNiwLady_Init, - (ActorFunc)EnNiwLady_Destroy, - (ActorFunc)EnNiwLady_Update, - NULL, + /**/ ACTOR_EN_NIW_LADY, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_ANE, + /**/ sizeof(EnNiwLady), + /**/ EnNiwLady_Init, + /**/ EnNiwLady_Destroy, + /**/ EnNiwLady_Update, + /**/ NULL, }; static s16 sMissingCuccoTextIds[] = { diff --git a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c index 3e4902057c..9d53ff59a1 100644 --- a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c +++ b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c @@ -23,15 +23,15 @@ void func_80ABBB34(EnNutsball* this, PlayState* play); void func_80ABBBA8(EnNutsball* this, PlayState* play); ActorInit En_Nutsball_InitVars = { - ACTOR_EN_NUTSBALL, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnNutsball), - (ActorFunc)EnNutsball_Init, - (ActorFunc)EnNutsball_Destroy, - (ActorFunc)EnNutsball_Update, - (ActorFunc)NULL, + /**/ ACTOR_EN_NUTSBALL, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnNutsball), + /**/ EnNutsball_Init, + /**/ EnNutsball_Destroy, + /**/ EnNutsball_Update, + /**/ NULL, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c index cc4b711726..547f2cd95e 100644 --- a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c +++ b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c @@ -31,15 +31,15 @@ typedef enum { } ChickTypes; ActorInit En_Nwc_InitVars = { - ACTOR_EN_NWC, - ACTORCAT_PROP, - FLAGS, - OBJECT_NWC, - sizeof(EnNwc), - (ActorFunc)EnNwc_Init, - (ActorFunc)EnNwc_Destroy, - (ActorFunc)EnNwc_Update, - (ActorFunc)EnNwc_Draw, + /**/ ACTOR_EN_NWC, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_NWC, + /**/ sizeof(EnNwc), + /**/ EnNwc_Init, + /**/ EnNwc_Destroy, + /**/ EnNwc_Update, + /**/ EnNwc_Draw, }; static ColliderJntSphElementInit sJntSphElementInit = { diff --git a/src/overlays/actors/ovl_En_Ny/z_en_ny.c b/src/overlays/actors/ovl_En_Ny/z_en_ny.c index b9544ad9fd..af104d6390 100644 --- a/src/overlays/actors/ovl_En_Ny/z_en_ny.c +++ b/src/overlays/actors/ovl_En_Ny/z_en_ny.c @@ -24,15 +24,15 @@ void EnNy_DrawDeathEffect(Actor* thisx, PlayState* play); void func_80ABD3B8(EnNy* this, f32, f32); ActorInit En_Ny_InitVars = { - ACTOR_EN_NY, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_NY, - sizeof(EnNy), - (ActorFunc)EnNy_Init, - (ActorFunc)EnNy_Destroy, - (ActorFunc)EnNy_Update, - (ActorFunc)EnNy_Draw, + /**/ ACTOR_EN_NY, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_NY, + /**/ sizeof(EnNy), + /**/ EnNy_Init, + /**/ EnNy_Destroy, + /**/ EnNy_Update, + /**/ EnNy_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[1] = { diff --git a/src/overlays/actors/ovl_En_OE2/z_en_oe2.c b/src/overlays/actors/ovl_En_OE2/z_en_oe2.c index 8cb2e531b0..641f47d0fd 100644 --- a/src/overlays/actors/ovl_En_OE2/z_en_oe2.c +++ b/src/overlays/actors/ovl_En_OE2/z_en_oe2.c @@ -16,15 +16,15 @@ void EnOE2_Draw(Actor* thisx, PlayState* play); void EnOE2_DoNothing(EnOE2* this, PlayState* play); ActorInit En_OE2_InitVars = { - ACTOR_EN_OE2, - ACTORCAT_NPC, - FLAGS, - OBJECT_OE2, - sizeof(EnOE2), - (ActorFunc)EnOE2_Init, - (ActorFunc)EnOE2_Destroy, - (ActorFunc)EnOE2_Update, - (ActorFunc)EnOE2_Draw, + /**/ ACTOR_EN_OE2, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_OE2, + /**/ sizeof(EnOE2), + /**/ EnOE2_Init, + /**/ EnOE2_Destroy, + /**/ EnOE2_Update, + /**/ EnOE2_Draw, }; void EnOE2_SetupAction(EnOE2* this, EnOE2ActionFunc actionFunc) { diff --git a/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c b/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c index 687401745e..1374c2ff6b 100644 --- a/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c +++ b/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c @@ -17,15 +17,15 @@ void EnOkarinaEffect_TriggerStorm(EnOkarinaEffect* this, PlayState* play); void EnOkarinaEffect_ManageStorm(EnOkarinaEffect* this, PlayState* play); ActorInit En_Okarina_Effect_InitVars = { - ACTOR_EN_OKARINA_EFFECT, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnOkarinaEffect), - (ActorFunc)EnOkarinaEffect_Init, - (ActorFunc)EnOkarinaEffect_Destroy, - (ActorFunc)EnOkarinaEffect_Update, - NULL, + /**/ ACTOR_EN_OKARINA_EFFECT, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnOkarinaEffect), + /**/ EnOkarinaEffect_Init, + /**/ EnOkarinaEffect_Destroy, + /**/ EnOkarinaEffect_Update, + /**/ NULL, }; void EnOkarinaEffect_SetupAction(EnOkarinaEffect* this, EnOkarinaEffectActionFunc actionFunc) { diff --git a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c index 0464a1346e..1e01c6a668 100644 --- a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c +++ b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c @@ -23,15 +23,15 @@ void func_80ABF4C8(EnOkarinaTag* this, PlayState* play); void func_80ABF7CC(EnOkarinaTag* this, PlayState* play); ActorInit En_Okarina_Tag_InitVars = { - ACTOR_EN_OKARINA_TAG, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnOkarinaTag), - (ActorFunc)EnOkarinaTag_Init, - (ActorFunc)EnOkarinaTag_Destroy, - (ActorFunc)EnOkarinaTag_Update, - NULL, + /**/ ACTOR_EN_OKARINA_TAG, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnOkarinaTag), + /**/ EnOkarinaTag_Init, + /**/ EnOkarinaTag_Destroy, + /**/ EnOkarinaTag_Update, + /**/ NULL, }; extern CutsceneData D_80ABF9D0[]; diff --git a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c index f413403d7e..f60cf7c601 100644 --- a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c +++ b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c @@ -20,15 +20,15 @@ void EnOkuta_Freeze(EnOkuta* this, PlayState* play); void EnOkuta_ProjectileFly(EnOkuta* this, PlayState* play); ActorInit En_Okuta_InitVars = { - ACTOR_EN_OKUTA, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_OKUTA, - sizeof(EnOkuta), - (ActorFunc)EnOkuta_Init, - (ActorFunc)EnOkuta_Destroy, - (ActorFunc)EnOkuta_Update, - (ActorFunc)EnOkuta_Draw, + /**/ ACTOR_EN_OKUTA, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_OKUTA, + /**/ sizeof(EnOkuta), + /**/ EnOkuta_Init, + /**/ EnOkuta_Destroy, + /**/ EnOkuta_Update, + /**/ EnOkuta_Draw, }; static ColliderCylinderInit sProjectileColliderInit = { diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index 4e133aea45..ca1ba8f4c7 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -101,15 +101,15 @@ void EnOssan_SetStateGiveDiscountDialog(PlayState* play, EnOssan* this); #define CURSOR_INVALID 0xFF ActorInit En_Ossan_InitVars = { - ACTOR_EN_OSSAN, - ACTORCAT_NPC, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnOssan), - (ActorFunc)EnOssan_Init, - (ActorFunc)EnOssan_Destroy, - (ActorFunc)EnOssan_Update, - NULL, + /**/ ACTOR_EN_OSSAN, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnOssan), + /**/ EnOssan_Init, + /**/ EnOssan_Destroy, + /**/ EnOssan_Update, + /**/ NULL, }; // Unused collider diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index 0100c5d006..6ad26d1a1d 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -66,15 +66,15 @@ typedef enum { } EnOwlMessageChoice; ActorInit En_Owl_InitVars = { - ACTOR_EN_OWL, - ACTORCAT_NPC, - FLAGS, - OBJECT_OWL, - sizeof(EnOwl), - (ActorFunc)EnOwl_Init, - (ActorFunc)EnOwl_Destroy, - (ActorFunc)EnOwl_Update, - (ActorFunc)EnOwl_Draw, + /**/ ACTOR_EN_OWL, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_OWL, + /**/ sizeof(EnOwl), + /**/ EnOwl_Init, + /**/ EnOwl_Destroy, + /**/ EnOwl_Update, + /**/ EnOwl_Draw, }; static ColliderCylinderInit sOwlCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Part/z_en_part.c b/src/overlays/actors/ovl_En_Part/z_en_part.c index e22c4ff548..82bef2394c 100644 --- a/src/overlays/actors/ovl_En_Part/z_en_part.c +++ b/src/overlays/actors/ovl_En_Part/z_en_part.c @@ -16,15 +16,15 @@ void EnPart_Update(Actor* thisx, PlayState* play); void EnPart_Draw(Actor* thisx, PlayState* play); ActorInit En_Part_InitVars = { - ACTOR_EN_PART, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnPart), - (ActorFunc)EnPart_Init, - (ActorFunc)EnPart_Destroy, - (ActorFunc)EnPart_Update, - (ActorFunc)EnPart_Draw, + /**/ ACTOR_EN_PART, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnPart), + /**/ EnPart_Init, + /**/ EnPart_Destroy, + /**/ EnPart_Update, + /**/ EnPart_Draw, }; void EnPart_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c index 1f5ecc67b7..2272f235b8 100644 --- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c +++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c @@ -41,15 +41,15 @@ void EnPeehat_SetStateExplode(EnPeehat* this); void EnPeehat_StateExplode(EnPeehat* this, PlayState* play); ActorInit En_Peehat_InitVars = { - ACTOR_EN_PEEHAT, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_PEEHAT, - sizeof(EnPeehat), - (ActorFunc)EnPeehat_Init, - (ActorFunc)EnPeehat_Destroy, - (ActorFunc)EnPeehat_Update, - (ActorFunc)EnPeehat_Draw, + /**/ ACTOR_EN_PEEHAT, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_PEEHAT, + /**/ sizeof(EnPeehat), + /**/ EnPeehat_Init, + /**/ EnPeehat_Destroy, + /**/ EnPeehat_Update, + /**/ EnPeehat_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c index 4814107b9a..35409dae48 100644 --- a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c +++ b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c @@ -20,15 +20,15 @@ void EnPoDesert_MoveToNextPoint(EnPoDesert* this, PlayState* play); void EnPoDesert_Disappear(EnPoDesert* this, PlayState* play); ActorInit En_Po_Desert_InitVars = { - ACTOR_EN_PO_DESERT, - ACTORCAT_BG, - FLAGS, - OBJECT_PO_FIELD, - sizeof(EnPoDesert), - (ActorFunc)EnPoDesert_Init, - (ActorFunc)EnPoDesert_Destroy, - (ActorFunc)EnPoDesert_Update, - (ActorFunc)EnPoDesert_Draw, + /**/ ACTOR_EN_PO_DESERT, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_PO_FIELD, + /**/ sizeof(EnPoDesert), + /**/ EnPoDesert_Init, + /**/ EnPoDesert_Destroy, + /**/ EnPoDesert_Update, + /**/ EnPoDesert_Draw, }; static ColliderCylinderInit sColliderInit = { diff --git a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c index 2090d17a6b..6ac3ccc9ba 100644 --- a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c +++ b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c @@ -34,15 +34,15 @@ void EnPoField_SoulInteract(EnPoField* this, PlayState* play); void EnPoField_SpawnFlame(EnPoField* this); ActorInit En_Po_Field_InitVars = { - ACTOR_EN_PO_FIELD, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_PO_FIELD, - sizeof(EnPoField), - (ActorFunc)EnPoField_Init, - (ActorFunc)EnPoField_Destroy, - (ActorFunc)EnPoField_Update, - (ActorFunc)EnPoField_Draw, + /**/ ACTOR_EN_PO_FIELD, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_PO_FIELD, + /**/ sizeof(EnPoField), + /**/ EnPoField_Init, + /**/ EnPoField_Destroy, + /**/ EnPoField_Update, + /**/ EnPoField_Draw, }; static ColliderCylinderInit D_80AD7080 = { diff --git a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c index 93d6fb5206..0b1343767b 100644 --- a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c +++ b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c @@ -34,15 +34,15 @@ static Vec3s D_80AD8C30[] = { }; ActorInit En_Po_Relay_InitVars = { - ACTOR_EN_PO_RELAY, - ACTORCAT_NPC, - FLAGS, - OBJECT_TK, - sizeof(EnPoRelay), - (ActorFunc)EnPoRelay_Init, - (ActorFunc)EnPoRelay_Destroy, - (ActorFunc)EnPoRelay_Update, - (ActorFunc)EnPoRelay_Draw, + /**/ ACTOR_EN_PO_RELAY, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_TK, + /**/ sizeof(EnPoRelay), + /**/ EnPoRelay_Init, + /**/ EnPoRelay_Destroy, + /**/ EnPoRelay_Update, + /**/ EnPoRelay_Draw, }; static ColliderCylinderInit sCylinderInit = { 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 7f2975ffa5..ff1029c3d1 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 @@ -62,15 +62,15 @@ static Color_RGBA8 D_80ADD700[4] = { }; ActorInit En_Po_Sisters_InitVars = { - ACTOR_EN_PO_SISTERS, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_PO_SISTERS, - sizeof(EnPoSisters), - (ActorFunc)EnPoSisters_Init, - (ActorFunc)EnPoSisters_Destroy, - (ActorFunc)EnPoSisters_Update, - (ActorFunc)EnPoSisters_Draw, + /**/ ACTOR_EN_PO_SISTERS, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_PO_SISTERS, + /**/ sizeof(EnPoSisters), + /**/ EnPoSisters_Init, + /**/ EnPoSisters_Destroy, + /**/ EnPoSisters_Update, + /**/ EnPoSisters_Draw, }; static ColliderCylinderInit sCylinderInit = { 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 d07b2cb355..3eb04385e4 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -43,15 +43,15 @@ void EnPoh_TalkComposer(EnPoh* this, PlayState* play); static s16 D_80AE1A50 = 0; ActorInit En_Poh_InitVars = { - ACTOR_EN_POH, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnPoh), - (ActorFunc)EnPoh_Init, - (ActorFunc)EnPoh_Destroy, - (ActorFunc)EnPoh_Update, - NULL, + /**/ ACTOR_EN_POH, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnPoh), + /**/ EnPoh_Init, + /**/ EnPoh_Destroy, + /**/ EnPoh_Update, + /**/ NULL, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c b/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c index d82814bd59..b141965c37 100644 --- a/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c +++ b/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c @@ -15,15 +15,15 @@ void EnPubox_Update(Actor* thisx, PlayState* play); void EnPubox_Draw(Actor* thisx, PlayState* play); ActorInit En_Pu_box_InitVars = { - ACTOR_EN_PU_BOX, - ACTORCAT_BG, - FLAGS, - OBJECT_PU_BOX, - sizeof(EnPubox), - (ActorFunc)EnPubox_Init, - (ActorFunc)EnPubox_Destroy, - (ActorFunc)EnPubox_Update, - (ActorFunc)EnPubox_Draw, + /**/ ACTOR_EN_PU_BOX, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_PU_BOX, + /**/ sizeof(EnPubox), + /**/ EnPubox_Init, + /**/ EnPubox_Destroy, + /**/ EnPubox_Update, + /**/ EnPubox_Draw, }; void EnPubox_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/src/overlays/actors/ovl_En_Rd/z_en_rd.c index e5e09ce0fa..1f8e1b84e8 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -53,15 +53,15 @@ typedef enum { } EnRdGrabState; ActorInit En_Rd_InitVars = { - ACTOR_EN_RD, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_RD, - sizeof(EnRd), - (ActorFunc)EnRd_Init, - (ActorFunc)EnRd_Destroy, - (ActorFunc)EnRd_Update, - (ActorFunc)EnRd_Draw, + /**/ ACTOR_EN_RD, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_RD, + /**/ sizeof(EnRd), + /**/ EnRd_Init, + /**/ EnRd_Destroy, + /**/ EnRd_Update, + /**/ EnRd_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c index f1e5c4d263..3fc213e155 100644 --- a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c +++ b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c @@ -76,15 +76,15 @@ static DamageTable sDamageTable = { }; ActorInit En_Reeba_InitVars = { - ACTOR_EN_REEBA, - ACTORCAT_MISC, - FLAGS, - OBJECT_REEBA, - sizeof(EnReeba), - (ActorFunc)EnReeba_Init, - (ActorFunc)EnReeba_Destroy, - (ActorFunc)EnReeba_Update, - (ActorFunc)EnReeba_Draw, + /**/ ACTOR_EN_REEBA, + /**/ ACTORCAT_MISC, + /**/ FLAGS, + /**/ OBJECT_REEBA, + /**/ sizeof(EnReeba), + /**/ EnReeba_Init, + /**/ EnReeba_Destroy, + /**/ EnReeba_Update, + /**/ EnReeba_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c index 99f1c31f02..e4a33a36b2 100644 --- a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c +++ b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c @@ -14,15 +14,15 @@ void EnRiverSound_Update(Actor* thisx, PlayState* play); void EnRiverSound_Draw(Actor* thisx, PlayState* play); ActorInit En_River_Sound_InitVars = { - ACTOR_EN_RIVER_SOUND, - ACTORCAT_BG, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnRiverSound), - (ActorFunc)EnRiverSound_Init, - (ActorFunc)EnRiverSound_Destroy, - (ActorFunc)EnRiverSound_Update, - (ActorFunc)EnRiverSound_Draw, + /**/ ACTOR_EN_RIVER_SOUND, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnRiverSound), + /**/ EnRiverSound_Init, + /**/ EnRiverSound_Destroy, + /**/ EnRiverSound_Update, + /**/ EnRiverSound_Draw, }; void EnRiverSound_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Rl/z_en_rl.c b/src/overlays/actors/ovl_En_Rl/z_en_rl.c index a32d9c7f43..9f5ad79c1c 100644 --- a/src/overlays/actors/ovl_En_Rl/z_en_rl.c +++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.c @@ -384,13 +384,13 @@ void EnRl_Draw(Actor* thisx, PlayState* play) { } ActorInit En_Rl_InitVars = { - ACTOR_EN_RL, - ACTORCAT_NPC, - FLAGS, - OBJECT_RL, - sizeof(EnRl), - (ActorFunc)EnRl_Init, - (ActorFunc)EnRl_Destroy, - (ActorFunc)EnRl_Update, - (ActorFunc)EnRl_Draw, + /**/ ACTOR_EN_RL, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_RL, + /**/ sizeof(EnRl), + /**/ EnRl_Init, + /**/ EnRl_Destroy, + /**/ EnRl_Update, + /**/ EnRl_Draw, }; diff --git a/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/src/overlays/actors/ovl_En_Rr/z_en_rr.c index c424d5124d..736d1f1512 100644 --- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.c @@ -65,15 +65,15 @@ void EnRr_Retreat(EnRr* this, PlayState* play); void EnRr_Stunned(EnRr* this, PlayState* play); ActorInit En_Rr_InitVars = { - ACTOR_EN_RR, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_RR, - sizeof(EnRr), - (ActorFunc)EnRr_Init, - (ActorFunc)EnRr_Destroy, - (ActorFunc)EnRr_Update, - (ActorFunc)EnRr_Draw, + /**/ ACTOR_EN_RR, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_RR, + /**/ sizeof(EnRr), + /**/ EnRr_Init, + /**/ EnRr_Destroy, + /**/ EnRr_Update, + /**/ EnRr_Draw, }; static char* sDropNames[] = { diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index 88397e1463..c2d4dff325 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -134,15 +134,15 @@ static EnRu1DrawFunc sDrawFuncs[] = { }; ActorInit En_Ru1_InitVars = { - ACTOR_EN_RU1, - ACTORCAT_NPC, - FLAGS, - OBJECT_RU1, - sizeof(EnRu1), - (ActorFunc)EnRu1_Init, - (ActorFunc)EnRu1_Destroy, - (ActorFunc)EnRu1_Update, - (ActorFunc)EnRu1_Draw, + /**/ ACTOR_EN_RU1, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_RU1, + /**/ sizeof(EnRu1), + /**/ EnRu1_Init, + /**/ EnRu1_Destroy, + /**/ EnRu1_Update, + /**/ EnRu1_Draw, }; void func_80AEAC10(EnRu1* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c index 9f9e6c52f6..7116afda90 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c @@ -79,15 +79,15 @@ static EnRu2DrawFunc sDrawFuncs[] = { }; ActorInit En_Ru2_InitVars = { - ACTOR_EN_RU2, - ACTORCAT_NPC, - FLAGS, - OBJECT_RU2, - sizeof(EnRu2), - (ActorFunc)EnRu2_Init, - (ActorFunc)EnRu2_Destroy, - (ActorFunc)EnRu2_Update, - (ActorFunc)EnRu2_Draw, + /**/ ACTOR_EN_RU2, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_RU2, + /**/ sizeof(EnRu2), + /**/ EnRu2_Init, + /**/ EnRu2_Destroy, + /**/ EnRu2_Update, + /**/ EnRu2_Draw, }; void func_80AF2550(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Sa/z_en_sa.c b/src/overlays/actors/ovl_En_Sa/z_en_sa.c index 67922972f0..2691735f32 100644 --- a/src/overlays/actors/ovl_En_Sa/z_en_sa.c +++ b/src/overlays/actors/ovl_En_Sa/z_en_sa.c @@ -34,15 +34,15 @@ typedef enum { } SariaMouthState; ActorInit En_Sa_InitVars = { - ACTOR_EN_SA, - ACTORCAT_NPC, - FLAGS, - OBJECT_SA, - sizeof(EnSa), - (ActorFunc)EnSa_Init, - (ActorFunc)EnSa_Destroy, - (ActorFunc)EnSa_Update, - (ActorFunc)EnSa_Draw, + /**/ ACTOR_EN_SA, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_SA, + /**/ sizeof(EnSa), + /**/ EnSa_Init, + /**/ EnSa_Destroy, + /**/ EnSa_Update, + /**/ EnSa_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Sb/z_en_sb.c b/src/overlays/actors/ovl_En_Sb/z_en_sb.c index fb61fbf8c9..a6eda4e5d0 100644 --- a/src/overlays/actors/ovl_En_Sb/z_en_sb.c +++ b/src/overlays/actors/ovl_En_Sb/z_en_sb.c @@ -26,15 +26,15 @@ void EnSb_Bounce(EnSb* this, PlayState* play); void EnSb_Cooldown(EnSb* this, PlayState* play); ActorInit En_Sb_InitVars = { - ACTOR_EN_SB, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_SB, - sizeof(EnSb), - (ActorFunc)EnSb_Init, - (ActorFunc)EnSb_Destroy, - (ActorFunc)EnSb_Update, - (ActorFunc)EnSb_Draw, + /**/ ACTOR_EN_SB, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_SB, + /**/ sizeof(EnSb), + /**/ EnSb_Init, + /**/ EnSb_Destroy, + /**/ EnSb_Update, + /**/ EnSb_Draw, }; static ColliderCylinderInitType1 sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c index 4425d0f3ef..a73274afc3 100644 --- a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c +++ b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c @@ -16,15 +16,15 @@ void EnSceneChange_Draw(Actor* thisx, PlayState* play); void EnSceneChange_DoNothing(EnSceneChange* this, PlayState* play); ActorInit En_Scene_Change_InitVars = { - ACTOR_EN_SCENE_CHANGE, - ACTORCAT_PROP, - FLAGS, - OBJECT_JJ, - sizeof(EnSceneChange), - (ActorFunc)EnSceneChange_Init, - (ActorFunc)EnSceneChange_Destroy, - (ActorFunc)EnSceneChange_Update, - (ActorFunc)EnSceneChange_Draw, + /**/ ACTOR_EN_SCENE_CHANGE, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_JJ, + /**/ sizeof(EnSceneChange), + /**/ EnSceneChange_Init, + /**/ EnSceneChange_Destroy, + /**/ EnSceneChange_Update, + /**/ EnSceneChange_Draw, }; void EnSceneChange_SetupAction(EnSceneChange* this, EnSceneChangeActionFunc actionFunc) { diff --git a/src/overlays/actors/ovl_En_Sda/z_en_sda.c b/src/overlays/actors/ovl_En_Sda/z_en_sda.c index 3777d44206..a620ea8368 100644 --- a/src/overlays/actors/ovl_En_Sda/z_en_sda.c +++ b/src/overlays/actors/ovl_En_Sda/z_en_sda.c @@ -18,15 +18,15 @@ void func_80AF9C70(u8* shadowTexture, Player* player, PlayState* play); void func_80AF8F60(Player* player, u8* shadowTexture, f32 arg2); ActorInit En_Sda_InitVars = { - ACTOR_EN_SDA, - ACTORCAT_BOSS, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnSda), - (ActorFunc)EnSda_Init, - (ActorFunc)EnSda_Destroy, - (ActorFunc)EnSda_Update, - (ActorFunc)EnSda_Draw, + /**/ ACTOR_EN_SDA, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnSda), + /**/ EnSda_Init, + /**/ EnSda_Destroy, + /**/ EnSda_Update, + /**/ EnSda_Draw, }; static Vec3f D_80AFA0D0 = { 0.0f, 0.0f, 0.0f }; diff --git a/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c b/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c index 119f3f7022..95b3526aea 100644 --- a/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c +++ b/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c @@ -22,15 +22,15 @@ void EnShopnuts_Burrow(EnShopnuts* this, PlayState* play); void EnShopnuts_SpawnSalesman(EnShopnuts* this, PlayState* play); ActorInit En_Shopnuts_InitVars = { - ACTOR_EN_SHOPNUTS, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_SHOPNUTS, - sizeof(EnShopnuts), - (ActorFunc)EnShopnuts_Init, - (ActorFunc)EnShopnuts_Destroy, - (ActorFunc)EnShopnuts_Update, - (ActorFunc)EnShopnuts_Draw, + /**/ ACTOR_EN_SHOPNUTS, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_SHOPNUTS, + /**/ sizeof(EnShopnuts), + /**/ EnShopnuts_Init, + /**/ EnShopnuts_Destroy, + /**/ EnShopnuts_Update, + /**/ EnShopnuts_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Si/z_en_si.c b/src/overlays/actors/ovl_En_Si/z_en_si.c index f16f8f25d3..b121facd38 100644 --- a/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -41,15 +41,15 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 D_80AFBADC = { 0, 0, 0, 0, MASS_IMMOVABLE }; ActorInit En_Si_InitVars = { - ACTOR_EN_SI, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_ST, - sizeof(EnSi), - (ActorFunc)EnSi_Init, - (ActorFunc)EnSi_Destroy, - (ActorFunc)EnSi_Update, - (ActorFunc)EnSi_Draw, + /**/ ACTOR_EN_SI, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_ST, + /**/ sizeof(EnSi), + /**/ EnSi_Init, + /**/ EnSi_Destroy, + /**/ EnSi_Update, + /**/ EnSi_Draw, }; void EnSi_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c index ce2d541502..b63ae605f2 100644 --- a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c +++ b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c @@ -19,15 +19,15 @@ void func_80AFC544(EnSiofuki* this, PlayState* play); void func_80AFC478(EnSiofuki* this, PlayState* play); ActorInit En_Siofuki_InitVars = { - ACTOR_EN_SIOFUKI, - ACTORCAT_BG, - FLAGS, - OBJECT_SIOFUKI, - sizeof(EnSiofuki), - (ActorFunc)EnSiofuki_Init, - (ActorFunc)EnSiofuki_Destroy, - (ActorFunc)EnSiofuki_Update, - (ActorFunc)EnSiofuki_Draw, + /**/ ACTOR_EN_SIOFUKI, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_SIOFUKI, + /**/ sizeof(EnSiofuki), + /**/ EnSiofuki_Init, + /**/ EnSiofuki_Destroy, + /**/ EnSiofuki_Update, + /**/ EnSiofuki_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_En_Skb/z_en_skb.c b/src/overlays/actors/ovl_En_Skb/z_en_skb.c index bac9333852..d7a3ab86d5 100644 --- a/src/overlays/actors/ovl_En_Skb/z_en_skb.c +++ b/src/overlays/actors/ovl_En_Skb/z_en_skb.c @@ -114,15 +114,15 @@ static DamageTable sDamageTable = { }; ActorInit En_Skb_InitVars = { - ACTOR_EN_SKB, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_SKB, - sizeof(EnSkb), - (ActorFunc)EnSkb_Init, - (ActorFunc)EnSkb_Destroy, - (ActorFunc)EnSkb_Update, - (ActorFunc)EnSkb_Draw, + /**/ ACTOR_EN_SKB, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_SKB, + /**/ sizeof(EnSkb), + /**/ EnSkb_Init, + /**/ EnSkb_Destroy, + /**/ EnSkb_Update, + /**/ EnSkb_Draw, }; void EnSkb_SetupAction(EnSkb* this, EnSkbActionFunc actionFunc) { diff --git a/src/overlays/actors/ovl_En_Skj/z_en_skj.c b/src/overlays/actors/ovl_En_Skj/z_en_skj.c index 18e322d71f..8fec8ef808 100644 --- a/src/overlays/actors/ovl_En_Skj/z_en_skj.c +++ b/src/overlays/actors/ovl_En_Skj/z_en_skj.c @@ -160,15 +160,15 @@ static EnSkjUnkStruct sSmallStumpSkullKid = { 0, NULL }; static EnSkjUnkStruct sOcarinaMinigameSkullKids[] = { { 0, NULL }, { 0, NULL } }; ActorInit En_Skj_InitVars = { - ACTOR_EN_SKJ, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_SKJ, - sizeof(EnSkj), - (ActorFunc)EnSkj_Init, - (ActorFunc)EnSkj_Destroy, - (ActorFunc)EnSkj_Update, - (ActorFunc)EnSkj_Draw, + /**/ ACTOR_EN_SKJ, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_SKJ, + /**/ sizeof(EnSkj), + /**/ EnSkj_Init, + /**/ EnSkj_Destroy, + /**/ EnSkj_Update, + /**/ EnSkj_Draw, }; static ColliderCylinderInitType1 D_80B01678 = { diff --git a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c index 58cb7ba249..cb73dacc07 100644 --- a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c +++ b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c @@ -17,15 +17,15 @@ void EnSkjneedle_Draw(Actor* thisx, PlayState* play); s32 EnSkjNeedle_CollisionCheck(EnSkjneedle* this); ActorInit En_Skjneedle_InitVars = { - ACTOR_EN_SKJNEEDLE, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_SKJ, - sizeof(EnSkjneedle), - (ActorFunc)EnSkjneedle_Init, - (ActorFunc)EnSkjneedle_Destroy, - (ActorFunc)EnSkjneedle_Update, - (ActorFunc)EnSkjneedle_Draw, + /**/ ACTOR_EN_SKJNEEDLE, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_SKJ, + /**/ sizeof(EnSkjneedle), + /**/ EnSkjneedle_Init, + /**/ EnSkjneedle_Destroy, + /**/ EnSkjneedle_Update, + /**/ EnSkjneedle_Draw, }; static ColliderCylinderInitType1 sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index 59d924aeb4..1231c0046b 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -31,15 +31,15 @@ void EnSsh_Start(EnSsh* this, PlayState* play); #include "assets/overlays/ovl_En_Ssh/ovl_En_Ssh.c" ActorInit En_Ssh_InitVars = { - ACTOR_EN_SSH, - ACTORCAT_NPC, - FLAGS, - OBJECT_SSH, - sizeof(EnSsh), - (ActorFunc)EnSsh_Init, - (ActorFunc)EnSsh_Destroy, - (ActorFunc)EnSsh_Update, - (ActorFunc)EnSsh_Draw, + /**/ ACTOR_EN_SSH, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_SSH, + /**/ sizeof(EnSsh), + /**/ EnSsh_Init, + /**/ EnSsh_Destroy, + /**/ EnSsh_Update, + /**/ EnSsh_Draw, }; static ColliderCylinderInit sCylinderInit1 = { diff --git a/src/overlays/actors/ovl_En_St/z_en_st.c b/src/overlays/actors/ovl_En_St/z_en_st.c index 1e0288fab1..bd4e74486e 100644 --- a/src/overlays/actors/ovl_En_St/z_en_st.c +++ b/src/overlays/actors/ovl_En_St/z_en_st.c @@ -24,15 +24,15 @@ void EnSt_FinishBouncing(EnSt* this, PlayState* play); #include "assets/overlays/ovl_En_St/ovl_En_St.c" ActorInit En_St_InitVars = { - ACTOR_EN_ST, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_ST, - sizeof(EnSt), - (ActorFunc)EnSt_Init, - (ActorFunc)EnSt_Destroy, - (ActorFunc)EnSt_Update, - (ActorFunc)EnSt_Draw, + /**/ ACTOR_EN_ST, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_ST, + /**/ sizeof(EnSt), + /**/ EnSt_Init, + /**/ EnSt_Destroy, + /**/ EnSt_Update, + /**/ EnSt_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Sth/z_en_sth.c b/src/overlays/actors/ovl_En_Sth/z_en_sth.c index 3e07652e54..6ed6c57a6f 100644 --- a/src/overlays/actors/ovl_En_Sth/z_en_sth.c +++ b/src/overlays/actors/ovl_En_Sth/z_en_sth.c @@ -23,15 +23,15 @@ void EnSth_RewardUnobtainedWait(EnSth* this, PlayState* play); void EnSth_ChildRewardObtainedWait(EnSth* this, PlayState* play); ActorInit En_Sth_InitVars = { - ACTOR_EN_STH, - ACTORCAT_NPC, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnSth), - (ActorFunc)EnSth_Init, - (ActorFunc)EnSth_Destroy, - (ActorFunc)EnSth_Update, - NULL, + /**/ ACTOR_EN_STH, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnSth), + /**/ EnSth_Init, + /**/ EnSth_Destroy, + /**/ EnSth_Update, + /**/ NULL, }; #include "assets/overlays/ovl_En_Sth/ovl_En_Sth.c" diff --git a/src/overlays/actors/ovl_En_Stream/z_en_stream.c b/src/overlays/actors/ovl_En_Stream/z_en_stream.c index 82dcbbd9e7..04168ba74c 100644 --- a/src/overlays/actors/ovl_En_Stream/z_en_stream.c +++ b/src/overlays/actors/ovl_En_Stream/z_en_stream.c @@ -16,15 +16,15 @@ void EnStream_Draw(Actor* thisx, PlayState* play); void EnStream_WaitForPlayer(EnStream* this, PlayState* play); ActorInit En_Stream_InitVars = { - ACTOR_EN_STREAM, - ACTORCAT_BG, - FLAGS, - OBJECT_STREAM, - sizeof(EnStream), - (ActorFunc)EnStream_Init, - (ActorFunc)EnStream_Destroy, - (ActorFunc)EnStream_Update, - (ActorFunc)EnStream_Draw, + /**/ ACTOR_EN_STREAM, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_STREAM, + /**/ sizeof(EnStream), + /**/ EnStream_Init, + /**/ EnStream_Destroy, + /**/ EnStream_Update, + /**/ EnStream_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/src/overlays/actors/ovl_En_Sw/z_en_sw.c index 4d0bb1fbce..ffe7e1fc1e 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -21,15 +21,15 @@ void func_80B0DB00(EnSw* this, PlayState* play); void func_80B0D878(EnSw* this, PlayState* play); ActorInit En_Sw_InitVars = { - ACTOR_EN_SW, - ACTORCAT_NPC, - FLAGS, - OBJECT_ST, - sizeof(EnSw), - (ActorFunc)EnSw_Init, - (ActorFunc)EnSw_Destroy, - (ActorFunc)EnSw_Update, - (ActorFunc)EnSw_Draw, + /**/ ACTOR_EN_SW, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_ST, + /**/ sizeof(EnSw), + /**/ EnSw_Init, + /**/ EnSw_Destroy, + /**/ EnSw_Update, + /**/ EnSw_Draw, }; static ColliderJntSphElementInit sJntSphItemsInit[1] = { diff --git a/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c b/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c index cb0e5038a5..ebb57479a8 100644 --- a/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c +++ b/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c @@ -28,15 +28,15 @@ void EnSyatekiItm_CleanupGame(EnSyatekiItm* this, PlayState* play); void EnSyatekiItm_EndGame(EnSyatekiItm* this, PlayState* play); ActorInit En_Syateki_Itm_InitVars = { - ACTOR_EN_SYATEKI_ITM, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnSyatekiItm), - (ActorFunc)EnSyatekiItm_Init, - (ActorFunc)EnSyatekiItm_Destroy, - (ActorFunc)EnSyatekiItm_Update, - NULL, + /**/ ACTOR_EN_SYATEKI_ITM, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnSyatekiItm), + /**/ EnSyatekiItm_Init, + /**/ EnSyatekiItm_Destroy, + /**/ EnSyatekiItm_Update, + /**/ NULL, }; static Vec3f sGreenAppearHome = { 0.0f, -10.0f, -270.0f }; diff --git a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c index 5f9336d918..a25e375455 100644 --- a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c +++ b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c @@ -43,15 +43,15 @@ void EnSyatekiMan_Blink(EnSyatekiMan* this); void EnSyatekiMan_SetBgm(void); ActorInit En_Syateki_Man_InitVars = { - ACTOR_EN_SYATEKI_MAN, - ACTORCAT_NPC, - FLAGS, - OBJECT_OSSAN, - sizeof(EnSyatekiMan), - (ActorFunc)EnSyatekiMan_Init, - (ActorFunc)EnSyatekiMan_Destroy, - (ActorFunc)EnSyatekiMan_Update, - (ActorFunc)EnSyatekiMan_Draw, + /**/ ACTOR_EN_SYATEKI_MAN, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_OSSAN, + /**/ sizeof(EnSyatekiMan), + /**/ EnSyatekiMan_Init, + /**/ EnSyatekiMan_Destroy, + /**/ EnSyatekiMan_Update, + /**/ EnSyatekiMan_Draw, }; static u16 sBgmList[] = { diff --git a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c index 2393a679ff..02062bf237 100644 --- a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c +++ b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c @@ -27,15 +27,15 @@ void EnSyatekiNiw_ExitArchery(EnSyatekiNiw* this, PlayState* play); void EnSyatekiNiw_SpawnFeather(EnSyatekiNiw* this, Vec3f* pos, Vec3f* vel, Vec3f* accel, f32 scale); ActorInit En_Syateki_Niw_InitVars = { - ACTOR_EN_SYATEKI_NIW, - ACTORCAT_PROP, - FLAGS, - OBJECT_NIW, - sizeof(EnSyatekiNiw), - (ActorFunc)EnSyatekiNiw_Init, - (ActorFunc)EnSyatekiNiw_Destroy, - (ActorFunc)EnSyatekiNiw_Update, - (ActorFunc)EnSyatekiNiw_Draw, + /**/ ACTOR_EN_SYATEKI_NIW, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_NIW, + /**/ sizeof(EnSyatekiNiw), + /**/ EnSyatekiNiw_Init, + /**/ EnSyatekiNiw_Destroy, + /**/ EnSyatekiNiw_Update, + /**/ EnSyatekiNiw_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/src/overlays/actors/ovl_En_Ta/z_en_ta.c index 833730c0c8..ca31e8bf0d 100644 --- a/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -60,15 +60,15 @@ void EnTa_AnimSitSleeping(EnTa* this); void EnTa_AnimRunToEnd(EnTa* this); ActorInit En_Ta_InitVars = { - ACTOR_EN_TA, - ACTORCAT_NPC, - FLAGS, - OBJECT_TA, - sizeof(EnTa), - (ActorFunc)EnTa_Init, - (ActorFunc)EnTa_Destroy, - (ActorFunc)EnTa_Update, - (ActorFunc)EnTa_Draw, + /**/ ACTOR_EN_TA, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_TA, + /**/ sizeof(EnTa), + /**/ EnTa_Init, + /**/ EnTa_Destroy, + /**/ EnTa_Update, + /**/ EnTa_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c index 080a17f9c3..83a0adf535 100644 --- a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c +++ b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c @@ -23,15 +23,15 @@ void func_80B17A6C(EnTakaraMan* this, PlayState* play); void func_80B17AC4(EnTakaraMan* this, PlayState* play); ActorInit En_Takara_Man_InitVars = { - ACTOR_EN_TAKARA_MAN, - ACTORCAT_NPC, - FLAGS, - OBJECT_TS, - sizeof(EnTakaraMan), - (ActorFunc)EnTakaraMan_Init, - (ActorFunc)EnTakaraMan_Destroy, - (ActorFunc)EnTakaraMan_Update, - (ActorFunc)EnTakaraMan_Draw, + /**/ ACTOR_EN_TAKARA_MAN, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_TS, + /**/ sizeof(EnTakaraMan), + /**/ EnTakaraMan_Init, + /**/ EnTakaraMan_Destroy, + /**/ EnTakaraMan_Update, + /**/ EnTakaraMan_Draw, }; static u8 sTakaraIsInitialized = false; diff --git a/src/overlays/actors/ovl_En_Tana/z_en_tana.c b/src/overlays/actors/ovl_En_Tana/z_en_tana.c index 8f152827aa..6c7d2dc747 100644 --- a/src/overlays/actors/ovl_En_Tana/z_en_tana.c +++ b/src/overlays/actors/ovl_En_Tana/z_en_tana.c @@ -16,15 +16,15 @@ void EnTana_DrawWoodenShelves(Actor* thisx, PlayState* play); void EnTana_DrawStoneShelves(Actor* thisx, PlayState* play); ActorInit En_Tana_InitVars = { - ACTOR_EN_TANA, - ACTORCAT_PROP, - FLAGS, - OBJECT_SHOP_DUNGEN, - sizeof(EnTana), - (ActorFunc)EnTana_Init, - (ActorFunc)EnTana_Destroy, - (ActorFunc)EnTana_Update, - NULL, + /**/ ACTOR_EN_TANA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_SHOP_DUNGEN, + /**/ sizeof(EnTana), + /**/ EnTana_Init, + /**/ EnTana_Destroy, + /**/ EnTana_Update, + /**/ NULL, }; //! @bug A third entry is missing here. When printing the string indexed by `params` for type 2, the diff --git a/src/overlays/actors/ovl_En_Test/z_en_test.c b/src/overlays/actors/ovl_En_Test/z_en_test.c index 4717547c86..63a0351e32 100644 --- a/src/overlays/actors/ovl_En_Test/z_en_test.c +++ b/src/overlays/actors/ovl_En_Test/z_en_test.c @@ -126,15 +126,15 @@ static u8 sJointCopyFlags[] = { }; ActorInit En_Test_InitVars = { - ACTOR_EN_TEST, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_SK2, - sizeof(EnTest), - (ActorFunc)EnTest_Init, - (ActorFunc)EnTest_Destroy, - (ActorFunc)EnTest_Update, - (ActorFunc)EnTest_Draw, + /**/ ACTOR_EN_TEST, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_SK2, + /**/ sizeof(EnTest), + /**/ EnTest_Init, + /**/ EnTest_Destroy, + /**/ EnTest_Update, + /**/ EnTest_Draw, }; static ColliderCylinderInit sBodyColliderInit = { diff --git a/src/overlays/actors/ovl_En_Tg/z_en_tg.c b/src/overlays/actors/ovl_En_Tg/z_en_tg.c index a492216214..af02dda0f9 100644 --- a/src/overlays/actors/ovl_En_Tg/z_en_tg.c +++ b/src/overlays/actors/ovl_En_Tg/z_en_tg.c @@ -39,15 +39,15 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; ActorInit En_Tg_InitVars = { - ACTOR_EN_TG, - ACTORCAT_NPC, - FLAGS, - OBJECT_MU, - sizeof(EnTg), - (ActorFunc)EnTg_Init, - (ActorFunc)EnTg_Destroy, - (ActorFunc)EnTg_Update, - (ActorFunc)EnTg_Draw, + /**/ ACTOR_EN_TG, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_MU, + /**/ sizeof(EnTg), + /**/ EnTg_Init, + /**/ EnTg_Destroy, + /**/ EnTg_Update, + /**/ EnTg_Draw, }; u16 EnTg_GetTextId(PlayState* play, Actor* thisx) { diff --git a/src/overlays/actors/ovl_En_Tite/z_en_tite.c b/src/overlays/actors/ovl_En_Tite/z_en_tite.c index b43c735d4f..d1aeb1e721 100644 --- a/src/overlays/actors/ovl_En_Tite/z_en_tite.c +++ b/src/overlays/actors/ovl_En_Tite/z_en_tite.c @@ -75,15 +75,15 @@ void EnTite_FlipOnBack(EnTite* this, PlayState* play); void EnTite_FlipUpright(EnTite* this, PlayState* play); ActorInit En_Tite_InitVars = { - ACTOR_EN_TITE, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_TITE, - sizeof(EnTite), - (ActorFunc)EnTite_Init, - (ActorFunc)EnTite_Destroy, - (ActorFunc)EnTite_Update, - (ActorFunc)EnTite_Draw, + /**/ ACTOR_EN_TITE, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_TITE, + /**/ sizeof(EnTite), + /**/ EnTite_Init, + /**/ EnTite_Destroy, + /**/ EnTite_Update, + /**/ EnTite_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[1] = { diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index a73569f622..d54dfc000c 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -21,15 +21,15 @@ void EnTk_Walk(EnTk* this, PlayState* play); void EnTk_Dig(EnTk* this, PlayState* play); ActorInit En_Tk_InitVars = { - ACTOR_EN_TK, - ACTORCAT_NPC, - FLAGS, - OBJECT_TK, - sizeof(EnTk), - (ActorFunc)EnTk_Init, - (ActorFunc)EnTk_Destroy, - (ActorFunc)EnTk_Update, - (ActorFunc)EnTk_Draw, + /**/ ACTOR_EN_TK, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_TK, + /**/ sizeof(EnTk), + /**/ EnTk_Init, + /**/ EnTk_Destroy, + /**/ EnTk_Update, + /**/ EnTk_Draw, }; void EnTkEff_Create(EnTk* this, Vec3f* pos, Vec3f* speed, Vec3f* accel, u8 duration, f32 size, f32 growth) { diff --git a/src/overlays/actors/ovl_En_Torch/z_en_torch.c b/src/overlays/actors/ovl_En_Torch/z_en_torch.c index 023a30ed46..95623b0de9 100644 --- a/src/overlays/actors/ovl_En_Torch/z_en_torch.c +++ b/src/overlays/actors/ovl_En_Torch/z_en_torch.c @@ -11,15 +11,15 @@ void EnTorch_Init(Actor* thisx, PlayState* play); ActorInit En_Torch_InitVars = { - ACTOR_EN_TORCH, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnTorch), - (ActorFunc)EnTorch_Init, - NULL, - NULL, - NULL, + /**/ ACTOR_EN_TORCH, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnTorch), + /**/ EnTorch_Init, + /**/ NULL, + /**/ NULL, + /**/ NULL, }; static u8 sChestContents[] = { diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index c729fa0d41..60c6aa8208 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -22,15 +22,15 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2); void EnTorch2_Draw(Actor* thisx, PlayState* play2); ActorInit En_Torch2_InitVars = { - ACTOR_EN_TORCH2, - ACTORCAT_BOSS, - FLAGS, - OBJECT_TORCH2, - sizeof(Player), - (ActorFunc)EnTorch2_Init, - (ActorFunc)EnTorch2_Destroy, - (ActorFunc)EnTorch2_Update, - (ActorFunc)EnTorch2_Draw, + /**/ ACTOR_EN_TORCH2, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_TORCH2, + /**/ sizeof(Player), + /**/ EnTorch2_Init, + /**/ EnTorch2_Destroy, + /**/ EnTorch2_Update, + /**/ EnTorch2_Draw, }; static f32 sStickTilt = 0.0f; diff --git a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c index 0606474a8d..81bd31a68f 100644 --- a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c +++ b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c @@ -19,15 +19,15 @@ s32 EnToryo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* void EnToryo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx); ActorInit En_Toryo_InitVars = { - ACTOR_EN_TORYO, - ACTORCAT_NPC, - FLAGS, - OBJECT_TORYO, - sizeof(EnToryo), - (ActorFunc)EnToryo_Init, - (ActorFunc)EnToryo_Destroy, - (ActorFunc)EnToryo_Update, - (ActorFunc)EnToryo_Draw, + /**/ ACTOR_EN_TORYO, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_TORYO, + /**/ sizeof(EnToryo), + /**/ EnToryo_Init, + /**/ EnToryo_Destroy, + /**/ EnToryo_Update, + /**/ EnToryo_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Tp/z_en_tp.c b/src/overlays/actors/ovl_En_Tp/z_en_tp.c index f6485bd903..bc8da3fe90 100644 --- a/src/overlays/actors/ovl_En_Tp/z_en_tp.c +++ b/src/overlays/actors/ovl_En_Tp/z_en_tp.c @@ -40,15 +40,15 @@ typedef enum { } TailpasaranAction; ActorInit En_Tp_InitVars = { - ACTOR_EN_TP, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_TP, - sizeof(EnTp), - (ActorFunc)EnTp_Init, - (ActorFunc)EnTp_Destroy, - (ActorFunc)EnTp_Update, - (ActorFunc)EnTp_Draw, + /**/ ACTOR_EN_TP, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_TP, + /**/ sizeof(EnTp), + /**/ EnTp_Init, + /**/ EnTp_Destroy, + /**/ EnTp_Update, + /**/ EnTp_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[1] = { diff --git a/src/overlays/actors/ovl_En_Tr/z_en_tr.c b/src/overlays/actors/ovl_En_Tr/z_en_tr.c index 289288745c..e1f05e02ce 100644 --- a/src/overlays/actors/ovl_En_Tr/z_en_tr.c +++ b/src/overlays/actors/ovl_En_Tr/z_en_tr.c @@ -24,15 +24,15 @@ void func_80B24038(EnTr* this, PlayState* play, s32 cueChannel); void EnTr_SetStartPosRotFromCue(EnTr* this, PlayState* play, s32 cueChannel); ActorInit En_Tr_InitVars = { - ACTOR_EN_TR, - ACTORCAT_NPC, - FLAGS, - OBJECT_TR, - sizeof(EnTr), - (ActorFunc)EnTr_Init, - (ActorFunc)EnTr_Destroy, - (ActorFunc)EnTr_Update, - (ActorFunc)EnTr_Draw, + /**/ ACTOR_EN_TR, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_TR, + /**/ sizeof(EnTr), + /**/ EnTr_Init, + /**/ EnTr_Destroy, + /**/ EnTr_Update, + /**/ EnTr_Draw, }; // The first elements of these animation arrays are for Koume, the second for Kotake diff --git a/src/overlays/actors/ovl_En_Trap/z_en_trap.c b/src/overlays/actors/ovl_En_Trap/z_en_trap.c index 7074d9b4b1..8bdcea0032 100644 --- a/src/overlays/actors/ovl_En_Trap/z_en_trap.c +++ b/src/overlays/actors/ovl_En_Trap/z_en_trap.c @@ -35,15 +35,15 @@ void EnTrap_Update(Actor* thisx, PlayState* play); void EnTrap_Draw(Actor* thisx, PlayState* play); ActorInit En_Trap_InitVars = { - ACTOR_EN_TRAP, - ACTORCAT_BG, - FLAGS, - OBJECT_TRAP, - sizeof(EnTrap), - (ActorFunc)EnTrap_Init, - (ActorFunc)EnTrap_Destroy, - (ActorFunc)EnTrap_Update, - (ActorFunc)EnTrap_Draw, + /**/ ACTOR_EN_TRAP, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_TRAP, + /**/ sizeof(EnTrap), + /**/ EnTrap_Init, + /**/ EnTrap_Destroy, + /**/ EnTrap_Update, + /**/ EnTrap_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c index 3363341c77..3891c70ffa 100644 --- a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c +++ b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c @@ -41,15 +41,15 @@ static ColliderCylinderInit sCylinderInit = { }; ActorInit En_Tubo_Trap_InitVars = { - ACTOR_EN_TUBO_TRAP, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_DANGEON_KEEP, - sizeof(EnTuboTrap), - (ActorFunc)EnTuboTrap_Init, - (ActorFunc)EnTuboTrap_Destroy, - (ActorFunc)EnTuboTrap_Update, - (ActorFunc)EnTuboTrap_Draw, + /**/ ACTOR_EN_TUBO_TRAP, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_DANGEON_KEEP, + /**/ sizeof(EnTuboTrap), + /**/ EnTuboTrap_Init, + /**/ EnTuboTrap_Destroy, + /**/ EnTuboTrap_Update, + /**/ EnTuboTrap_Draw, }; void EnTuboTrap_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Vali/z_en_vali.c b/src/overlays/actors/ovl_En_Vali/z_en_vali.c index 0e3a39fc77..17613e13bb 100644 --- a/src/overlays/actors/ovl_En_Vali/z_en_vali.c +++ b/src/overlays/actors/ovl_En_Vali/z_en_vali.c @@ -30,15 +30,15 @@ void EnVali_Frozen(EnVali* this, PlayState* play); void EnVali_ReturnToLurk(EnVali* this, PlayState* play); ActorInit En_Vali_InitVars = { - ACTOR_EN_VALI, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_VALI, - sizeof(EnVali), - (ActorFunc)EnVali_Init, - (ActorFunc)EnVali_Destroy, - (ActorFunc)EnVali_Update, - (ActorFunc)EnVali_Draw, + /**/ ACTOR_EN_VALI, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_VALI, + /**/ sizeof(EnVali), + /**/ EnVali_Init, + /**/ EnVali_Destroy, + /**/ EnVali_Update, + /**/ EnVali_Draw, }; static ColliderQuadInit sQuadInit = { diff --git a/src/overlays/actors/ovl_En_Vase/z_en_vase.c b/src/overlays/actors/ovl_En_Vase/z_en_vase.c index bcfa83a691..c411371c24 100644 --- a/src/overlays/actors/ovl_En_Vase/z_en_vase.c +++ b/src/overlays/actors/ovl_En_Vase/z_en_vase.c @@ -14,15 +14,15 @@ void EnVase_Destroy(Actor* thisx, PlayState* play); void EnVase_Draw(Actor* thisx, PlayState* play); ActorInit En_Vase_InitVars = { - ACTOR_EN_VASE, - ACTORCAT_PROP, - FLAGS, - OBJECT_VASE, - sizeof(EnVase), - (ActorFunc)EnVase_Init, - (ActorFunc)EnVase_Destroy, - (ActorFunc)Actor_Noop, - (ActorFunc)EnVase_Draw, + /**/ ACTOR_EN_VASE, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_VASE, + /**/ sizeof(EnVase), + /**/ EnVase_Init, + /**/ EnVase_Destroy, + /**/ Actor_Noop, + /**/ EnVase_Draw, }; void EnVase_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c b/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c index a2c45e93c1..db804b06d5 100644 --- a/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c +++ b/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c @@ -17,15 +17,15 @@ void EnVbBall_Update(Actor* thisx, PlayState* play2); void EnVbBall_Draw(Actor* thisx, PlayState* play); ActorInit En_Vb_Ball_InitVars = { - 0, - ACTORCAT_BOSS, - FLAGS, - OBJECT_FD, - sizeof(EnVbBall), - (ActorFunc)EnVbBall_Init, - (ActorFunc)EnVbBall_Destroy, - (ActorFunc)EnVbBall_Update, - (ActorFunc)EnVbBall_Draw, + /**/ 0, + /**/ ACTORCAT_BOSS, + /**/ FLAGS, + /**/ OBJECT_FD, + /**/ sizeof(EnVbBall), + /**/ EnVbBall_Init, + /**/ EnVbBall_Destroy, + /**/ EnVbBall_Update, + /**/ EnVbBall_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c index d78835a741..509fa38d8c 100644 --- a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c +++ b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c @@ -32,15 +32,15 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play); static u8 sHorseSfxPlayed = false; ActorInit En_Viewer_InitVars = { - ACTOR_EN_VIEWER, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnViewer), - (ActorFunc)EnViewer_Init, - (ActorFunc)EnViewer_Destroy, - (ActorFunc)EnViewer_Update, - (ActorFunc)EnViewer_Draw, + /**/ ACTOR_EN_VIEWER, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnViewer), + /**/ EnViewer_Init, + /**/ EnViewer_Destroy, + /**/ EnViewer_Update, + /**/ EnViewer_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_En_Vm/z_en_vm.c b/src/overlays/actors/ovl_En_Vm/z_en_vm.c index ddaffc376a..a6b667cfd8 100644 --- a/src/overlays/actors/ovl_En_Vm/z_en_vm.c +++ b/src/overlays/actors/ovl_En_Vm/z_en_vm.c @@ -24,15 +24,15 @@ void EnVm_Stun(EnVm* this, PlayState* play); void EnVm_Die(EnVm* this, PlayState* play); ActorInit En_Vm_InitVars = { - ACTOR_EN_VM, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_VM, - sizeof(EnVm), - (ActorFunc)EnVm_Init, - (ActorFunc)EnVm_Destroy, - (ActorFunc)EnVm_Update, - (ActorFunc)EnVm_Draw, + /**/ ACTOR_EN_VM, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_VM, + /**/ sizeof(EnVm), + /**/ EnVm_Init, + /**/ EnVm_Destroy, + /**/ EnVm_Update, + /**/ EnVm_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c b/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c index ecfc95833b..f426a8b487 100644 --- a/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c +++ b/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c @@ -22,15 +22,15 @@ void EnWallTubo_DetectChu(EnWallTubo* this, PlayState* play); void EnWallTubo_SetWallFall(EnWallTubo* this, PlayState* play); ActorInit En_Wall_Tubo_InitVars = { - ACTOR_EN_WALL_TUBO, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnWallTubo), - (ActorFunc)EnWallTubo_Init, - (ActorFunc)EnWallTubo_Destroy, - (ActorFunc)EnWallTubo_Update, - NULL, + /**/ ACTOR_EN_WALL_TUBO, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnWallTubo), + /**/ EnWallTubo_Init, + /**/ EnWallTubo_Destroy, + /**/ EnWallTubo_Update, + /**/ NULL, }; void EnWallTubo_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index d0e45f04c0..d0dd7ee76e 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -39,15 +39,15 @@ void EnWallmas_Stun(EnWallmas* this, PlayState* play); void EnWallmas_Walk(EnWallmas* this, PlayState* play); ActorInit En_Wallmas_InitVars = { - ACTOR_EN_WALLMAS, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_WALLMASTER, - sizeof(EnWallmas), - (ActorFunc)EnWallmas_Init, - (ActorFunc)EnWallmas_Destroy, - (ActorFunc)EnWallmas_Update, - (ActorFunc)EnWallmas_Draw, + /**/ ACTOR_EN_WALLMAS, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_WALLMASTER, + /**/ sizeof(EnWallmas), + /**/ EnWallmas_Init, + /**/ EnWallmas_Destroy, + /**/ EnWallmas_Update, + /**/ EnWallmas_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c index 0315524c4c..d07f9b97c9 100644 --- a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c +++ b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c @@ -32,15 +32,15 @@ void EnWeatherTag_EnabledRainThunder(EnWeatherTag* this, PlayState* play); #define WEATHER_TAG_RANGE100(x) ((x >> 8) * 100.0f) ActorInit En_Weather_Tag_InitVars = { - ACTOR_EN_WEATHER_TAG, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnWeatherTag), - (ActorFunc)EnWeatherTag_Init, - (ActorFunc)EnWeatherTag_Destroy, - (ActorFunc)EnWeatherTag_Update, - NULL, + /**/ ACTOR_EN_WEATHER_TAG, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnWeatherTag), + /**/ EnWeatherTag_Init, + /**/ EnWeatherTag_Destroy, + /**/ EnWeatherTag_Update, + /**/ NULL, }; void EnWeatherTag_SetupAction(EnWeatherTag* this, EnWeatherTagActionFunc actionFunc) { diff --git a/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c b/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c index 5feae2ebf1..759bf7ca02 100644 --- a/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c +++ b/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c @@ -27,15 +27,15 @@ void func_80B33338(EnWeiyer* this, PlayState* play); void func_80B3349C(EnWeiyer* this, PlayState* play); ActorInit En_Weiyer_InitVars = { - ACTOR_EN_WEIYER, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_EI, - sizeof(EnWeiyer), - (ActorFunc)EnWeiyer_Init, - (ActorFunc)EnWeiyer_Destroy, - (ActorFunc)EnWeiyer_Update, - (ActorFunc)EnWeiyer_Draw, + /**/ ACTOR_EN_WEIYER, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_EI, + /**/ sizeof(EnWeiyer), + /**/ EnWeiyer_Init, + /**/ EnWeiyer_Destroy, + /**/ EnWeiyer_Update, + /**/ EnWeiyer_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/src/overlays/actors/ovl_En_Wf/z_en_wf.c index 4b6257e039..a07cf7aa3c 100644 --- a/src/overlays/actors/ovl_En_Wf/z_en_wf.c +++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.c @@ -188,15 +188,15 @@ static DamageTable sDamageTable = { }; ActorInit En_Wf_InitVars = { - ACTOR_EN_WF, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_WF, - sizeof(EnWf), - (ActorFunc)EnWf_Init, - (ActorFunc)EnWf_Destroy, - (ActorFunc)EnWf_Update, - (ActorFunc)EnWf_Draw, + /**/ ACTOR_EN_WF, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_WF, + /**/ sizeof(EnWf), + /**/ EnWf_Init, + /**/ EnWf_Destroy, + /**/ EnWf_Update, + /**/ EnWf_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c b/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c index 5ed6318c29..e60e3f40ac 100644 --- a/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c +++ b/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c @@ -42,15 +42,15 @@ static ColliderCylinderInit sCylinderInit = { }; ActorInit En_Wonder_Item_InitVars = { - ACTOR_EN_WONDER_ITEM, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnWonderItem), - (ActorFunc)EnWonderItem_Init, - (ActorFunc)EnWonderItem_Destroy, - (ActorFunc)EnWonderItem_Update, - NULL, + /**/ ACTOR_EN_WONDER_ITEM, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnWonderItem), + /**/ EnWonderItem_Init, + /**/ EnWonderItem_Destroy, + /**/ EnWonderItem_Update, + /**/ NULL, }; static Vec3f sTagPointsFree[9]; diff --git a/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c b/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c index 4265eba80a..0106ad1913 100644 --- a/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c +++ b/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c @@ -18,15 +18,15 @@ void func_80B395F0(EnWonderTalk* this, PlayState* play); void func_80B3943C(EnWonderTalk* this, PlayState* play); ActorInit En_Wonder_Talk_InitVars = { - ACTOR_EN_WONDER_TALK, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnWonderTalk), - (ActorFunc)EnWonderTalk_Init, - (ActorFunc)EnWonderTalk_Destroy, - (ActorFunc)EnWonderTalk_Update, - NULL, + /**/ ACTOR_EN_WONDER_TALK, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnWonderTalk), + /**/ EnWonderTalk_Init, + /**/ EnWonderTalk_Destroy, + /**/ EnWonderTalk_Update, + /**/ NULL, }; void EnWonderTalk_Destroy(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c index 22bf7d154b..1675cc6308 100644 --- a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c +++ b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c @@ -20,15 +20,15 @@ void func_80B3A3D4(EnWonderTalk2* this, PlayState* play); void EnWonderTalk2_DoNothing(EnWonderTalk2* this, PlayState* play); ActorInit En_Wonder_Talk2_InitVars = { - ACTOR_EN_WONDER_TALK2, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnWonderTalk2), - (ActorFunc)EnWonderTalk2_Init, - (ActorFunc)EnWonderTalk2_Destroy, - (ActorFunc)EnWonderTalk2_Update, - NULL, + /**/ ACTOR_EN_WONDER_TALK2, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnWonderTalk2), + /**/ EnWonderTalk2_Init, + /**/ EnWonderTalk2_Destroy, + /**/ EnWonderTalk2_Update, + /**/ NULL, }; static s16 D_80B3A8E0[] = { 6, 0, 1, 2, 3, 4, 5 }; diff --git a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c index 5f4164e3fe..601837f9a2 100644 --- a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c +++ b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c @@ -34,15 +34,15 @@ typedef enum { } WoodDrawType; ActorInit En_Wood02_InitVars = { - ACTOR_EN_WOOD02, - ACTORCAT_PROP, - FLAGS, - OBJECT_WOOD02, - sizeof(EnWood02), - (ActorFunc)EnWood02_Init, - (ActorFunc)EnWood02_Destroy, - (ActorFunc)EnWood02_Update, - (ActorFunc)EnWood02_Draw, + /**/ ACTOR_EN_WOOD02, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_WOOD02, + /**/ sizeof(EnWood02), + /**/ EnWood02_Init, + /**/ EnWood02_Destroy, + /**/ EnWood02_Update, + /**/ EnWood02_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/src/overlays/actors/ovl_En_Xc/z_en_xc.c index f6138cc691..6ed5c8c43e 100644 --- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -2418,13 +2418,13 @@ void EnXc_Draw(Actor* thisx, PlayState* play) { } ActorInit En_Xc_InitVars = { - ACTOR_EN_XC, - ACTORCAT_NPC, - FLAGS, - OBJECT_XC, - sizeof(EnXc), - (ActorFunc)EnXc_Init, - (ActorFunc)EnXc_Destroy, - (ActorFunc)EnXc_Update, - (ActorFunc)EnXc_Draw, + /**/ ACTOR_EN_XC, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_XC, + /**/ sizeof(EnXc), + /**/ EnXc_Init, + /**/ EnXc_Destroy, + /**/ EnXc_Update, + /**/ EnXc_Draw, }; diff --git a/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c b/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c index e950380682..e70587fd10 100644 --- a/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c +++ b/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c @@ -35,15 +35,15 @@ static ColliderQuadInit sQuadInit = { }; ActorInit En_Yabusame_Mark_InitVars = { - ACTOR_EN_YABUSAME_MARK, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EnYabusameMark), - (ActorFunc)EnYabusameMark_Init, - (ActorFunc)EnYabusameMark_Destroy, - (ActorFunc)EnYabusameMark_Update, - NULL, + /**/ ACTOR_EN_YABUSAME_MARK, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EnYabusameMark), + /**/ EnYabusameMark_Init, + /**/ EnYabusameMark_Destroy, + /**/ EnYabusameMark_Update, + /**/ NULL, }; static Vec3f sCollisionVertices[] = { diff --git a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c index 525b7eb3b0..5c44e34738 100644 --- a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c +++ b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c @@ -19,15 +19,15 @@ void func_80B43AD4(EnYukabyun* this, PlayState* play); void func_80B43B6C(EnYukabyun* this, PlayState* play); ActorInit En_Yukabyun_InitVars = { - ACTOR_EN_YUKABYUN, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_YUKABYUN, - sizeof(EnYukabyun), - (ActorFunc)EnYukabyun_Init, - (ActorFunc)EnYukabyun_Destroy, - (ActorFunc)EnYukabyun_Update, - (ActorFunc)EnYukabyun_Draw, + /**/ ACTOR_EN_YUKABYUN, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_YUKABYUN, + /**/ sizeof(EnYukabyun), + /**/ EnYukabyun_Init, + /**/ EnYukabyun_Destroy, + /**/ EnYukabyun_Update, + /**/ EnYukabyun_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Zf/z_en_zf.c b/src/overlays/actors/ovl_En_Zf/z_en_zf.c index 2e5651fbb7..1f8fb35b73 100644 --- a/src/overlays/actors/ovl_En_Zf/z_en_zf.c +++ b/src/overlays/actors/ovl_En_Zf/z_en_zf.c @@ -100,15 +100,15 @@ static s16 D_80B4A1B0 = 0; static s16 D_80B4A1B4 = 1; ActorInit En_Zf_InitVars = { - ACTOR_EN_ZF, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_ZF, - sizeof(EnZf), - (ActorFunc)EnZf_Init, - (ActorFunc)EnZf_Destroy, - (ActorFunc)EnZf_Update, - (ActorFunc)EnZf_Draw, + /**/ ACTOR_EN_ZF, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_ZF, + /**/ sizeof(EnZf), + /**/ EnZf_Init, + /**/ EnZf_Destroy, + /**/ EnZf_Update, + /**/ EnZf_Draw, }; static ColliderCylinderInit sBodyCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index cb37a489bc..fdf0e48495 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -28,15 +28,15 @@ extern CutsceneData D_80B4C5D0[]; #include "z_en_zl1_camera_data.inc.c" ActorInit En_Zl1_InitVars = { - ACTOR_EN_ZL1, - ACTORCAT_NPC, - FLAGS, - OBJECT_ZL1, - sizeof(EnZl1), - (ActorFunc)EnZl1_Init, - (ActorFunc)EnZl1_Destroy, - (ActorFunc)EnZl1_Update, - (ActorFunc)EnZl1_Draw, + /**/ ACTOR_EN_ZL1, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_ZL1, + /**/ sizeof(EnZl1), + /**/ EnZl1_Init, + /**/ EnZl1_Destroy, + /**/ EnZl1_Update, + /**/ EnZl1_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c index c91eb86807..e15af0f64b 100644 --- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -86,15 +86,15 @@ static EnZl2DrawFunc sDrawFuncs[] = { }; ActorInit En_Zl2_InitVars = { - ACTOR_EN_ZL2, - ACTORCAT_NPC, - FLAGS, - OBJECT_ZL2, - sizeof(EnZl2), - (ActorFunc)EnZl2_Init, - (ActorFunc)EnZl2_Destroy, - (ActorFunc)EnZl2_Update, - (ActorFunc)EnZl2_Draw, + /**/ ACTOR_EN_ZL2, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_ZL2, + /**/ sizeof(EnZl2), + /**/ EnZl2_Init, + /**/ EnZl2_Destroy, + /**/ EnZl2_Update, + /**/ EnZl2_Draw, }; void EnZl2_Destroy(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c index 632da5ee25..74c5aaced5 100644 --- a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c +++ b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c @@ -2757,13 +2757,13 @@ void EnZl3_Draw(Actor* thisx, PlayState* play) { } ActorInit En_Zl3_InitVars = { - ACTOR_EN_ZL3, - ACTORCAT_NPC, - FLAGS, - OBJECT_ZL2, - sizeof(EnZl3), - (ActorFunc)EnZl3_Init, - (ActorFunc)EnZl3_Destroy, - (ActorFunc)EnZl3_Update, - (ActorFunc)EnZl3_Draw, + /**/ ACTOR_EN_ZL3, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_ZL2, + /**/ sizeof(EnZl3), + /**/ EnZl3_Init, + /**/ EnZl3_Destroy, + /**/ EnZl3_Update, + /**/ EnZl3_Draw, }; diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c index 75b2e7c7f6..d68c4f89cc 100644 --- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c +++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c @@ -59,15 +59,15 @@ void EnZl4_Idle(EnZl4* this, PlayState* play); void EnZl4_TheEnd(EnZl4* this, PlayState* play); ActorInit En_Zl4_InitVars = { - ACTOR_EN_ZL4, - ACTORCAT_NPC, - FLAGS, - OBJECT_ZL4, - sizeof(EnZl4), - (ActorFunc)EnZl4_Init, - (ActorFunc)EnZl4_Destroy, - (ActorFunc)EnZl4_Update, - (ActorFunc)EnZl4_Draw, + /**/ ACTOR_EN_ZL4, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_ZL4, + /**/ sizeof(EnZl4), + /**/ EnZl4_Init, + /**/ EnZl4_Destroy, + /**/ EnZl4_Update, + /**/ EnZl4_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_En_Zo/z_en_zo.c b/src/overlays/actors/ovl_En_Zo/z_en_zo.c index dd29c0ad41..e88310d9de 100644 --- a/src/overlays/actors/ovl_En_Zo/z_en_zo.c +++ b/src/overlays/actors/ovl_En_Zo/z_en_zo.c @@ -300,15 +300,15 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 sColChkInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; ActorInit En_Zo_InitVars = { - ACTOR_EN_ZO, - ACTORCAT_NPC, - FLAGS, - OBJECT_ZO, - sizeof(EnZo), - (ActorFunc)EnZo_Init, - (ActorFunc)EnZo_Destroy, - (ActorFunc)EnZo_Update, - (ActorFunc)EnZo_Draw, + /**/ ACTOR_EN_ZO, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_ZO, + /**/ sizeof(EnZo), + /**/ EnZo_Init, + /**/ EnZo_Destroy, + /**/ EnZo_Update, + /**/ EnZo_Draw, }; typedef enum { diff --git a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c index 178c68fbf5..5ba154bd76 100644 --- a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c +++ b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c @@ -46,15 +46,15 @@ void EnfHG_Retreat(EnfHG* this, PlayState* play); void EnfHG_Done(EnfHG* this, PlayState* play); ActorInit En_fHG_InitVars = { - ACTOR_EN_FHG, - ACTORCAT_BG, - FLAGS, - OBJECT_FHG, - sizeof(EnfHG), - (ActorFunc)EnfHG_Init, - (ActorFunc)EnfHG_Destroy, - (ActorFunc)EnfHG_Update, - (ActorFunc)EnfHG_Draw, + /**/ ACTOR_EN_FHG, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_FHG, + /**/ sizeof(EnfHG), + /**/ EnfHG_Init, + /**/ EnfHG_Destroy, + /**/ EnfHG_Update, + /**/ EnfHG_Draw, }; static EnfHGPainting sPaintings[] = { diff --git a/src/overlays/actors/ovl_End_Title/z_end_title.c b/src/overlays/actors/ovl_End_Title/z_end_title.c index 5c118dd1cc..ea5fa45a6e 100644 --- a/src/overlays/actors/ovl_End_Title/z_end_title.c +++ b/src/overlays/actors/ovl_End_Title/z_end_title.c @@ -15,15 +15,15 @@ void EndTitle_DrawFull(Actor* thisx, PlayState* play); void EndTitle_DrawNintendoLogo(Actor* thisx, PlayState* play); ActorInit End_Title_InitVars = { - ACTOR_END_TITLE, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(EndTitle), - (ActorFunc)EndTitle_Init, - (ActorFunc)EndTitle_Destroy, - (ActorFunc)EndTitle_Update, - (ActorFunc)EndTitle_DrawFull, + /**/ ACTOR_END_TITLE, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(EndTitle), + /**/ EndTitle_Init, + /**/ EndTitle_Destroy, + /**/ EndTitle_Update, + /**/ EndTitle_DrawFull, }; #include "assets/overlays/ovl_End_Title/ovl_End_Title.c" diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c index bfa3ab1d37..d603282a36 100644 --- a/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -122,15 +122,15 @@ typedef enum { #define SINKING_LURE_SEG_COUNT 20 ActorInit Fishing_InitVars = { - ACTOR_FISHING, - ACTORCAT_NPC, - FLAGS, - OBJECT_FISH, - sizeof(Fishing), - (ActorFunc)Fishing_Init, - (ActorFunc)Fishing_Destroy, - (ActorFunc)Fishing_UpdateFish, - (ActorFunc)Fishing_DrawFish, + /**/ ACTOR_FISHING, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_FISH, + /**/ sizeof(Fishing), + /**/ Fishing_Init, + /**/ Fishing_Destroy, + /**/ Fishing_UpdateFish, + /**/ Fishing_DrawFish, }; static f32 sStormStrength = 0.0f; diff --git a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c index 0f214b4ba3..e1627b772b 100644 --- a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c +++ b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c @@ -17,15 +17,15 @@ void ItemBHeart_Draw(Actor* thisx, PlayState* play); void func_80B85264(ItemBHeart* this, PlayState* play); ActorInit Item_B_Heart_InitVars = { - ACTOR_ITEM_B_HEART, - ACTORCAT_MISC, - FLAGS, - OBJECT_GI_HEARTS, - sizeof(ItemBHeart), - (ActorFunc)ItemBHeart_Init, - (ActorFunc)ItemBHeart_Destroy, - (ActorFunc)ItemBHeart_Update, - (ActorFunc)ItemBHeart_Draw, + /**/ ACTOR_ITEM_B_HEART, + /**/ ACTORCAT_MISC, + /**/ FLAGS, + /**/ OBJECT_GI_HEARTS, + /**/ sizeof(ItemBHeart), + /**/ ItemBHeart_Init, + /**/ ItemBHeart_Destroy, + /**/ ItemBHeart_Update, + /**/ ItemBHeart_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c index b3fa044e51..9b9b79bcff 100644 --- a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c +++ b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c @@ -23,15 +23,15 @@ void func_80B85B28(ItemEtcetera* this, PlayState* play); void ItemEtcetera_UpdateFireArrow(ItemEtcetera* this, PlayState* play); ActorInit Item_Etcetera_InitVars = { - ACTOR_ITEM_ETCETERA, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ItemEtcetera), - (ActorFunc)ItemEtcetera_Init, - (ActorFunc)ItemEtcetera_Destroy, - (ActorFunc)ItemEtcetera_Update, - NULL, + /**/ ACTOR_ITEM_ETCETERA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ItemEtcetera), + /**/ ItemEtcetera_Init, + /**/ ItemEtcetera_Destroy, + /**/ ItemEtcetera_Update, + /**/ NULL, }; static s16 sObjectIds[] = { diff --git a/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c b/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c index 066519f539..3935fa1ea8 100644 --- a/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c +++ b/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c @@ -16,15 +16,15 @@ void ItemInbox_Draw(Actor* thisx, PlayState* play); void ItemInbox_Wait(ItemInbox* this, PlayState* play); ActorInit Item_Inbox_InitVars = { - ACTOR_ITEM_INBOX, - ACTORCAT_NPC, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ItemInbox), - (ActorFunc)ItemInbox_Init, - (ActorFunc)ItemInbox_Destroy, - (ActorFunc)ItemInbox_Update, - (ActorFunc)ItemInbox_Draw, + /**/ ACTOR_ITEM_INBOX, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ItemInbox), + /**/ ItemInbox_Init, + /**/ ItemInbox_Destroy, + /**/ ItemInbox_Update, + /**/ ItemInbox_Draw, }; void ItemInbox_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c index 2cf86a1297..c7394227eb 100644 --- a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c +++ b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c @@ -23,15 +23,15 @@ void func_80B865E0(ItemOcarina* this, PlayState* play); void ItemOcarina_DoNothing(ItemOcarina* this, PlayState* play); ActorInit Item_Ocarina_InitVars = { - ACTOR_ITEM_OCARINA, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GI_OCARINA, - sizeof(ItemOcarina), - (ActorFunc)ItemOcarina_Init, - (ActorFunc)ItemOcarina_Destroy, - (ActorFunc)ItemOcarina_Update, - (ActorFunc)ItemOcarina_Draw, + /**/ ACTOR_ITEM_OCARINA, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GI_OCARINA, + /**/ sizeof(ItemOcarina), + /**/ ItemOcarina_Init, + /**/ ItemOcarina_Destroy, + /**/ ItemOcarina_Update, + /**/ ItemOcarina_Draw, }; void ItemOcarina_SetupAction(ItemOcarina* this, ItemOcarinaActionFunc actionFunc) { diff --git a/src/overlays/actors/ovl_Item_Shield/z_item_shield.c b/src/overlays/actors/ovl_Item_Shield/z_item_shield.c index ba9ddbecd0..1957e674c6 100644 --- a/src/overlays/actors/ovl_Item_Shield/z_item_shield.c +++ b/src/overlays/actors/ovl_Item_Shield/z_item_shield.c @@ -39,15 +39,15 @@ static ColliderCylinderInit sCylinderInit = { }; ActorInit Item_Shield_InitVars = { - ACTOR_ITEM_SHIELD, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_LINK_CHILD, - sizeof(ItemShield), - (ActorFunc)ItemShield_Init, - (ActorFunc)ItemShield_Destroy, - (ActorFunc)ItemShield_Update, - (ActorFunc)ItemShield_Draw, + /**/ ACTOR_ITEM_SHIELD, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_LINK_CHILD, + /**/ sizeof(ItemShield), + /**/ ItemShield_Init, + /**/ ItemShield_Destroy, + /**/ ItemShield_Update, + /**/ ItemShield_Draw, }; static Color_RGBA8 unused = { 255, 255, 0, 255 }; diff --git a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c index 91a64b3b83..bac5bb9738 100644 --- a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c +++ b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c @@ -19,15 +19,15 @@ void MagicDark_DiamondDraw(Actor* thisx, PlayState* play); void MagicDark_DimLighting(PlayState* play, f32 intensity); ActorInit Magic_Dark_InitVars = { - ACTOR_MAGIC_DARK, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(MagicDark), - (ActorFunc)MagicDark_Init, - (ActorFunc)MagicDark_Destroy, - (ActorFunc)MagicDark_OrbUpdate, - (ActorFunc)MagicDark_OrbDraw, + /**/ ACTOR_MAGIC_DARK, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(MagicDark), + /**/ MagicDark_Init, + /**/ MagicDark_Destroy, + /**/ MagicDark_OrbUpdate, + /**/ MagicDark_OrbDraw, }; #include "assets/overlays/ovl_Magic_Dark/ovl_Magic_Dark.c" diff --git a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c index 13356ea806..3f04bfc6a7 100644 --- a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c +++ b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c @@ -31,15 +31,15 @@ typedef enum { } MagicFireScreenTint; ActorInit Magic_Fire_InitVars = { - ACTOR_MAGIC_FIRE, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(MagicFire), - (ActorFunc)MagicFire_Init, - (ActorFunc)MagicFire_Destroy, - (ActorFunc)MagicFire_Update, - (ActorFunc)MagicFire_Draw, + /**/ ACTOR_MAGIC_FIRE, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(MagicFire), + /**/ MagicFire_Init, + /**/ MagicFire_Destroy, + /**/ MagicFire_Update, + /**/ MagicFire_Draw, }; #include "assets/overlays/ovl_Magic_Fire/ovl_Magic_Fire.c" diff --git a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c index 78472c53f1..6cdb1bc0e8 100644 --- a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c +++ b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c @@ -20,15 +20,15 @@ void MagicWind_WaitAtFullSize(MagicWind* this, PlayState* play); void MagicWind_Grow(MagicWind* this, PlayState* play); ActorInit Magic_Wind_InitVars = { - ACTOR_MAGIC_WIND, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(MagicWind), - (ActorFunc)MagicWind_Init, - (ActorFunc)MagicWind_Destroy, - (ActorFunc)MagicWind_Update, - (ActorFunc)MagicWind_Draw, + /**/ ACTOR_MAGIC_WIND, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(MagicWind), + /**/ MagicWind_Init, + /**/ MagicWind_Destroy, + /**/ MagicWind_Update, + /**/ MagicWind_Draw, }; #include "assets/overlays/ovl_Magic_Wind/ovl_Magic_Wind.c" diff --git a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c index dd6de252a8..74bae5ccb2 100644 --- a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c +++ b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c @@ -31,15 +31,15 @@ typedef enum { } MirRayBeamLocations; ActorInit Mir_Ray_InitVars = { - ACTOR_MIR_RAY, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_MIR_RAY, - sizeof(MirRay), - (ActorFunc)MirRay_Init, - (ActorFunc)MirRay_Destroy, - (ActorFunc)MirRay_Update, - (ActorFunc)MirRay_Draw, + /**/ ACTOR_MIR_RAY, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_MIR_RAY, + /**/ sizeof(MirRay), + /**/ MirRay_Init, + /**/ MirRay_Destroy, + /**/ MirRay_Update, + /**/ MirRay_Draw, }; static u8 D_80B8E670 = 0; diff --git a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c index 74a5f896c7..2c60dcb95e 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -73,15 +73,15 @@ void ObjBean_WaitForStepOff(ObjBean* this, PlayState* play); static ObjBean* D_80B90E30 = NULL; ActorInit Obj_Bean_InitVars = { - ACTOR_OBJ_BEAN, - ACTORCAT_BG, - FLAGS, - OBJECT_MAMENOKI, - sizeof(ObjBean), - (ActorFunc)ObjBean_Init, - (ActorFunc)ObjBean_Destroy, - (ActorFunc)ObjBean_Update, - (ActorFunc)ObjBean_Draw, + /**/ ACTOR_OBJ_BEAN, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_MAMENOKI, + /**/ sizeof(ObjBean), + /**/ ObjBean_Init, + /**/ ObjBean_Destroy, + /**/ ObjBean_Update, + /**/ ObjBean_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c index 4e7303cb37..c908d7c3ff 100644 --- a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c +++ b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c @@ -14,15 +14,15 @@ void ObjBlockstop_Destroy(Actor* thisx, PlayState* play); void ObjBlockstop_Update(Actor* thisx, PlayState* play); ActorInit Obj_Blockstop_InitVars = { - ACTOR_OBJ_BLOCKSTOP, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ObjBlockstop), - (ActorFunc)ObjBlockstop_Init, - (ActorFunc)ObjBlockstop_Destroy, - (ActorFunc)ObjBlockstop_Update, - NULL, + /**/ ACTOR_OBJ_BLOCKSTOP, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ObjBlockstop), + /**/ ObjBlockstop_Init, + /**/ ObjBlockstop_Destroy, + /**/ ObjBlockstop_Update, + /**/ NULL, }; void ObjBlockstop_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c index 237d06cd43..c5456421d4 100644 --- a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c +++ b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c @@ -19,15 +19,15 @@ void ObjBombiwa_Draw(Actor* thisx, PlayState* play); void ObjBombiwa_Break(ObjBombiwa* this, PlayState* play); ActorInit Obj_Bombiwa_InitVars = { - ACTOR_OBJ_BOMBIWA, - ACTORCAT_PROP, - FLAGS, - OBJECT_BOMBIWA, - sizeof(ObjBombiwa), - (ActorFunc)ObjBombiwa_Init, - (ActorFunc)ObjBombiwa_Destroy, - (ActorFunc)ObjBombiwa_Update, - (ActorFunc)ObjBombiwa_Draw, + /**/ ACTOR_OBJ_BOMBIWA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_BOMBIWA, + /**/ sizeof(ObjBombiwa), + /**/ ObjBombiwa_Init, + /**/ ObjBombiwa_Destroy, + /**/ ObjBombiwa_Update, + /**/ ObjBombiwa_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c index 75c5f8faf4..abfed7a704 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -21,15 +21,15 @@ void ObjComb_SetupWait(ObjComb* this); void ObjComb_Wait(ObjComb* this, PlayState* play); ActorInit Obj_Comb_InitVars = { - ACTOR_OBJ_COMB, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_FIELD_KEEP, - sizeof(ObjComb), - (ActorFunc)ObjComb_Init, - (ActorFunc)ObjComb_Destroy, - (ActorFunc)ObjComb_Update, - (ActorFunc)ObjComb_Draw, + /**/ ACTOR_OBJ_COMB, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_FIELD_KEEP, + /**/ sizeof(ObjComb), + /**/ ObjComb_Init, + /**/ ObjComb_Destroy, + /**/ ObjComb_Update, + /**/ ObjComb_Draw, }; static ColliderJntSphElementInit sJntSphElementsInit[1] = { diff --git a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c index f13f54b1e2..e9c2a74805 100644 --- a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c +++ b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c @@ -17,15 +17,15 @@ void ObjDekujr_Draw(Actor* thisx, PlayState* play); void ObjDekujr_ComeUp(ObjDekujr* this, PlayState* play); ActorInit Obj_Dekujr_InitVars = { - ACTOR_OBJ_DEKUJR, - ACTORCAT_NPC, - FLAGS, - OBJECT_DEKUJR, - sizeof(ObjDekujr), - (ActorFunc)ObjDekujr_Init, - (ActorFunc)ObjDekujr_Destroy, - (ActorFunc)ObjDekujr_Update, - (ActorFunc)ObjDekujr_Draw, + /**/ ACTOR_OBJ_DEKUJR, + /**/ ACTORCAT_NPC, + /**/ FLAGS, + /**/ OBJECT_DEKUJR, + /**/ sizeof(ObjDekujr), + /**/ ObjDekujr_Init, + /**/ ObjDekujr_Destroy, + /**/ ObjDekujr_Update, + /**/ ObjDekujr_Draw, }; static ColliderCylinderInitToActor sCylinderInit = { diff --git a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c index 7179a40748..b24c6f18de 100644 --- a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c +++ b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c @@ -20,15 +20,15 @@ void func_80B92D20(ObjElevator* this); void func_80B92D44(ObjElevator* this, PlayState* play); ActorInit Obj_Elevator_InitVars = { - ACTOR_OBJ_ELEVATOR, - ACTORCAT_BG, - FLAGS, - OBJECT_D_ELEVATOR, - sizeof(ObjElevator), - (ActorFunc)ObjElevator_Init, - (ActorFunc)ObjElevator_Destroy, - (ActorFunc)ObjElevator_Update, - (ActorFunc)ObjElevator_Draw, + /**/ ACTOR_OBJ_ELEVATOR, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_D_ELEVATOR, + /**/ sizeof(ObjElevator), + /**/ ObjElevator_Init, + /**/ ObjElevator_Destroy, + /**/ ObjElevator_Update, + /**/ ObjElevator_Draw, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c index ffa4452664..0c368c209f 100644 --- a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c +++ b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c @@ -15,15 +15,15 @@ void ObjHamishi_Update(Actor* thisx, PlayState* play); void ObjHamishi_Draw(Actor* thisx, PlayState* play); ActorInit Obj_Hamishi_InitVars = { - ACTOR_OBJ_HAMISHI, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_FIELD_KEEP, - sizeof(ObjHamishi), - (ActorFunc)ObjHamishi_Init, - (ActorFunc)ObjHamishi_Destroy, - (ActorFunc)ObjHamishi_Update, - (ActorFunc)ObjHamishi_Draw, + /**/ ACTOR_OBJ_HAMISHI, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_FIELD_KEEP, + /**/ sizeof(ObjHamishi), + /**/ ObjHamishi_Init, + /**/ ObjHamishi_Destroy, + /**/ ObjHamishi_Update, + /**/ ObjHamishi_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c index 8f5c8f0a15..76ce2203c1 100644 --- a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c +++ b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c @@ -15,15 +15,15 @@ void ObjHana_Update(Actor* thisx, PlayState* play); void ObjHana_Draw(Actor* thisx, PlayState* play); ActorInit Obj_Hana_InitVars = { - ACTOR_OBJ_HANA, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_FIELD_KEEP, - sizeof(ObjHana), - (ActorFunc)ObjHana_Init, - (ActorFunc)ObjHana_Destroy, - (ActorFunc)ObjHana_Update, - (ActorFunc)ObjHana_Draw, + /**/ ACTOR_OBJ_HANA, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_FIELD_KEEP, + /**/ sizeof(ObjHana), + /**/ ObjHana_Init, + /**/ ObjHana_Destroy, + /**/ ObjHana_Update, + /**/ ObjHana_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c index 9bc3f373b4..d54770111a 100644 --- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c +++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c @@ -22,15 +22,15 @@ void func_80B93DB0(ObjHsblock* this); void func_80B93E38(ObjHsblock* this); ActorInit Obj_Hsblock_InitVars = { - ACTOR_OBJ_HSBLOCK, - ACTORCAT_BG, - FLAGS, - OBJECT_D_HSBLOCK, - sizeof(ObjHsblock), - (ActorFunc)ObjHsblock_Init, - (ActorFunc)ObjHsblock_Destroy, - (ActorFunc)ObjHsblock_Update, - (ActorFunc)ObjHsblock_Draw, + /**/ ACTOR_OBJ_HSBLOCK, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_D_HSBLOCK, + /**/ sizeof(ObjHsblock), + /**/ ObjHsblock_Init, + /**/ ObjHsblock_Destroy, + /**/ ObjHsblock_Update, + /**/ ObjHsblock_Draw, }; static f32 D_80B940C0[] = { 85.0f, 85.0f, 0.0f }; diff --git a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c index 6fa404a587..06805581e4 100644 --- a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c +++ b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c @@ -18,15 +18,15 @@ void ObjIcePoly_Idle(ObjIcePoly* this, PlayState* play); void ObjIcePoly_Melt(ObjIcePoly* this, PlayState* play); ActorInit Obj_Ice_Poly_InitVars = { - ACTOR_OBJ_ICE_POLY, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ObjIcePoly), - (ActorFunc)ObjIcePoly_Init, - (ActorFunc)ObjIcePoly_Destroy, - (ActorFunc)ObjIcePoly_Update, - (ActorFunc)ObjIcePoly_Draw, + /**/ ACTOR_OBJ_ICE_POLY, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ObjIcePoly), + /**/ ObjIcePoly_Init, + /**/ ObjIcePoly_Destroy, + /**/ ObjIcePoly_Update, + /**/ ObjIcePoly_Draw, }; static ColliderCylinderInit sCylinderInitIce = { diff --git a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c index 3bfe6d965c..dc20f68921 100644 --- a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c +++ b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c @@ -23,15 +23,15 @@ void ObjKibako_SetupThrown(ObjKibako* this); void ObjKibako_Thrown(ObjKibako* this, PlayState* play); ActorInit Obj_Kibako_InitVars = { - ACTOR_OBJ_KIBAKO, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_DANGEON_KEEP, - sizeof(ObjKibako), - (ActorFunc)ObjKibako_Init, - (ActorFunc)ObjKibako_Destroy, - (ActorFunc)ObjKibako_Update, - (ActorFunc)ObjKibako_Draw, + /**/ ACTOR_OBJ_KIBAKO, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_DANGEON_KEEP, + /**/ sizeof(ObjKibako), + /**/ ObjKibako_Init, + /**/ ObjKibako_Destroy, + /**/ ObjKibako_Update, + /**/ ObjKibako_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c index e3468e7582..9c2b507a38 100644 --- a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c +++ b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c @@ -18,15 +18,15 @@ void ObjKibako2_Idle(ObjKibako2* this, PlayState* play); void ObjKibako2_Kill(ObjKibako2* this, PlayState* play); ActorInit Obj_Kibako2_InitVars = { - ACTOR_OBJ_KIBAKO2, - ACTORCAT_BG, - FLAGS, - OBJECT_KIBAKO2, - sizeof(ObjKibako2), - (ActorFunc)ObjKibako2_Init, - (ActorFunc)ObjKibako2_Destroy, - (ActorFunc)ObjKibako2_Update, - (ActorFunc)ObjKibako2_Draw, + /**/ ACTOR_OBJ_KIBAKO2, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_KIBAKO2, + /**/ sizeof(ObjKibako2), + /**/ ObjKibako2_Init, + /**/ ObjKibako2_Destroy, + /**/ ObjKibako2_Update, + /**/ ObjKibako2_Draw, }; static ColliderCylinderInit sCylinderInit = { diff --git a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c index 215510ff0c..413b87aa66 100644 --- a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c +++ b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c @@ -25,15 +25,15 @@ void ObjLift_Shake(ObjLift* this, PlayState* play); void ObjLift_Fall(ObjLift* this, PlayState* play); ActorInit Obj_Lift_InitVars = { - ACTOR_OBJ_LIFT, - ACTORCAT_BG, - FLAGS, - OBJECT_D_LIFT, - sizeof(ObjLift), - (ActorFunc)ObjLift_Init, - (ActorFunc)ObjLift_Destroy, - (ActorFunc)ObjLift_Update, - (ActorFunc)ObjLift_Draw, + /**/ ACTOR_OBJ_LIFT, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_D_LIFT, + /**/ sizeof(ObjLift), + /**/ ObjLift_Init, + /**/ ObjLift_Destroy, + /**/ ObjLift_Update, + /**/ ObjLift_Draw, }; static s16 sFallTimerDurations[] = { 0, 10, 20, 30, 40, 50, 60 }; diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c index 4edca49656..1942786558 100644 --- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c +++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c @@ -36,15 +36,15 @@ void ObjLightswitch_SetupDisappear(ObjLightswitch* this); void ObjLightswitch_Disappear(ObjLightswitch* this, PlayState* play); ActorInit Obj_Lightswitch_InitVars = { - ACTOR_OBJ_LIGHTSWITCH, - ACTORCAT_SWITCH, - FLAGS, - OBJECT_LIGHTSWITCH, - sizeof(ObjLightswitch), - (ActorFunc)ObjLightswitch_Init, - (ActorFunc)ObjLightswitch_Destroy, - (ActorFunc)ObjLightswitch_Update, - (ActorFunc)ObjLightswitch_Draw, + /**/ ACTOR_OBJ_LIGHTSWITCH, + /**/ ACTORCAT_SWITCH, + /**/ FLAGS, + /**/ OBJECT_LIGHTSWITCH, + /**/ sizeof(ObjLightswitch), + /**/ ObjLightswitch_Init, + /**/ ObjLightswitch_Destroy, + /**/ ObjLightswitch_Update, + /**/ ObjLightswitch_Draw, }; static ColliderJntSphElementInit sColliderJntSphElementInit[] = { diff --git a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c index 106b94f7e1..2bee0cefa5 100644 --- a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c +++ b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c @@ -16,15 +16,15 @@ void func_80B98320(ObjMakekinsuta* this, PlayState* play); void ObjMakekinsuta_DoNothing(ObjMakekinsuta* this, PlayState* play); ActorInit Obj_Makekinsuta_InitVars = { - ACTOR_OBJ_MAKEKINSUTA, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ObjMakekinsuta), - (ActorFunc)ObjMakekinsuta_Init, - (ActorFunc)Actor_Noop, - (ActorFunc)ObjMakekinsuta_Update, - NULL, + /**/ ACTOR_OBJ_MAKEKINSUTA, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ObjMakekinsuta), + /**/ ObjMakekinsuta_Init, + /**/ Actor_Noop, + /**/ ObjMakekinsuta_Update, + /**/ NULL, }; void ObjMakekinsuta_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c index c700c82f58..03f78ac331 100644 --- a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c +++ b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c @@ -14,9 +14,15 @@ void ObjMakeoshihiki_Init(Actor* thisx, PlayState* play); void ObjMakeoshihiki_Draw(Actor* thisx, PlayState* play); ActorInit Obj_Makeoshihiki_InitVars = { - ACTOR_OBJ_MAKEOSHIHIKI, ACTORCAT_PROP, FLAGS, - OBJECT_GAMEPLAY_DANGEON_KEEP, sizeof(ObjMakeoshihiki), (ActorFunc)ObjMakeoshihiki_Init, - (ActorFunc)Actor_Noop, (ActorFunc)Actor_Noop, (ActorFunc)ObjMakeoshihiki_Draw, + /**/ ACTOR_OBJ_MAKEOSHIHIKI, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_DANGEON_KEEP, + /**/ sizeof(ObjMakeoshihiki), + /**/ ObjMakeoshihiki_Init, + /**/ Actor_Noop, + /**/ Actor_Noop, + /**/ ObjMakeoshihiki_Draw, }; typedef struct { diff --git a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c index ec4f0e6c5e..d52d8ca2d8 100644 --- a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c +++ b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c @@ -20,15 +20,15 @@ void ObjMure_ActiveState(ObjMure* this, PlayState* play); s32 ObjMure_GetMaxChildSpawns(ObjMure* this); ActorInit Obj_Mure_InitVars = { - ACTOR_OBJ_MURE, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ObjMure), - (ActorFunc)ObjMure_Init, - (ActorFunc)ObjMure_Destroy, - (ActorFunc)ObjMure_Update, - NULL, + /**/ ACTOR_OBJ_MURE, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ObjMure), + /**/ ObjMure_Init, + /**/ ObjMure_Destroy, + /**/ ObjMure_Update, + /**/ NULL, }; typedef enum { diff --git a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c index 3585341571..d58be08026 100644 --- a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c +++ b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c @@ -29,15 +29,15 @@ void func_80B9A658(ObjMure2* this); void func_80B9A6E8(ObjMure2* this); ActorInit Obj_Mure2_InitVars = { - ACTOR_OBJ_MURE2, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ObjMure2), - (ActorFunc)ObjMure2_Init, - (ActorFunc)Actor_Noop, - (ActorFunc)ObjMure2_Update, - NULL, + /**/ ACTOR_OBJ_MURE2, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ObjMure2), + /**/ ObjMure2_Init, + /**/ Actor_Noop, + /**/ ObjMure2_Update, + /**/ NULL, }; static f32 sDistSquared1[] = { SQ(1600.0f), SQ(1600.0f), SQ(1600.0f) }; diff --git a/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c b/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c index 82188783c6..a2f2ecf3a0 100644 --- a/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c +++ b/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c @@ -20,15 +20,15 @@ void func_80B9AFEC(ObjMure3* this); void func_80B9AFFC(ObjMure3* this, PlayState* play); ActorInit Obj_Mure3_InitVars = { - ACTOR_OBJ_MURE3, - ACTORCAT_BG, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ObjMure3), - (ActorFunc)ObjMure3_Init, - (ActorFunc)ObjMure3_Destroy, - (ActorFunc)ObjMure3_Update, - NULL, + /**/ ACTOR_OBJ_MURE3, + /**/ ACTORCAT_BG, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ObjMure3), + /**/ ObjMure3_Init, + /**/ ObjMure3_Destroy, + /**/ ObjMure3_Update, + /**/ NULL, }; static s16 sRupeeCounts[] = { 5, 5, 7, 0 }; diff --git a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index 2e12b0fd52..bd6b323fc2 100644 --- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -25,15 +25,15 @@ void ObjOshihiki_SetupFall(ObjOshihiki* this, PlayState* play); void ObjOshihiki_Fall(ObjOshihiki* this, PlayState* play); ActorInit Obj_Oshihiki_InitVars = { - ACTOR_OBJ_OSHIHIKI, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_DANGEON_KEEP, - sizeof(ObjOshihiki), - (ActorFunc)ObjOshihiki_Init, - (ActorFunc)ObjOshihiki_Destroy, - (ActorFunc)ObjOshihiki_Update, - (ActorFunc)ObjOshihiki_Draw, + /**/ ACTOR_OBJ_OSHIHIKI, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_DANGEON_KEEP, + /**/ sizeof(ObjOshihiki), + /**/ ObjOshihiki_Init, + /**/ ObjOshihiki_Destroy, + /**/ ObjOshihiki_Update, + /**/ ObjOshihiki_Draw, }; static f32 sScales[] = { diff --git a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c index 675d90f4fd..1f52d5c886 100644 --- a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c +++ b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c @@ -16,15 +16,15 @@ void func_80B9D054(ObjRoomtimer* this, PlayState* play); void func_80B9D0B0(ObjRoomtimer* this, PlayState* play); ActorInit Obj_Roomtimer_InitVars = { - ACTOR_OBJ_ROOMTIMER, - ACTORCAT_ENEMY, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ObjRoomtimer), - (ActorFunc)ObjRoomtimer_Init, - (ActorFunc)ObjRoomtimer_Destroy, - (ActorFunc)ObjRoomtimer_Update, - (ActorFunc)NULL, + /**/ ACTOR_OBJ_ROOMTIMER, + /**/ ACTORCAT_ENEMY, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ObjRoomtimer), + /**/ ObjRoomtimer_Init, + /**/ ObjRoomtimer_Destroy, + /**/ ObjRoomtimer_Update, + /**/ NULL, }; void ObjRoomtimer_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index d1abf70202..7e74c2cfac 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -51,15 +51,15 @@ void ObjSwitch_CrystalTurnOffInit(ObjSwitch* this); void ObjSwitch_CrystalTurnOff(ObjSwitch* this, PlayState* play); ActorInit Obj_Switch_InitVars = { - ACTOR_OBJ_SWITCH, - ACTORCAT_SWITCH, - FLAGS, - OBJECT_GAMEPLAY_DANGEON_KEEP, - sizeof(ObjSwitch), - (ActorFunc)ObjSwitch_Init, - (ActorFunc)ObjSwitch_Destroy, - (ActorFunc)ObjSwitch_Update, - (ActorFunc)ObjSwitch_Draw, + /**/ ACTOR_OBJ_SWITCH, + /**/ ACTORCAT_SWITCH, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_DANGEON_KEEP, + /**/ sizeof(ObjSwitch), + /**/ ObjSwitch_Init, + /**/ ObjSwitch_Destroy, + /**/ ObjSwitch_Update, + /**/ ObjSwitch_Draw, }; static f32 sFocusHeights[] = { 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 64f1e2729d..9f3e430240 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -17,15 +17,15 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2); void ObjSyokudai_Draw(Actor* thisx, PlayState* play); ActorInit Obj_Syokudai_InitVars = { - ACTOR_OBJ_SYOKUDAI, - ACTORCAT_PROP, - FLAGS, - OBJECT_SYOKUDAI, - sizeof(ObjSyokudai), - (ActorFunc)ObjSyokudai_Init, - (ActorFunc)ObjSyokudai_Destroy, - (ActorFunc)ObjSyokudai_Update, - (ActorFunc)ObjSyokudai_Draw, + /**/ ACTOR_OBJ_SYOKUDAI, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_SYOKUDAI, + /**/ sizeof(ObjSyokudai), + /**/ ObjSyokudai_Init, + /**/ ObjSyokudai_Destroy, + /**/ ObjSyokudai_Update, + /**/ ObjSyokudai_Draw, }; static ColliderCylinderInit sCylInitStand = { diff --git a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c index 5146c4637f..2f8787654d 100644 --- a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c +++ b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c @@ -26,15 +26,15 @@ void ObjTimeblock_AltBehaviorVisible(ObjTimeblock* this, PlayState* play); void ObjTimeblock_AltBehaviourNotVisible(ObjTimeblock* this, PlayState* play); ActorInit Obj_Timeblock_InitVars = { - ACTOR_OBJ_TIMEBLOCK, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_TIMEBLOCK, - sizeof(ObjTimeblock), - (ActorFunc)ObjTimeblock_Init, - (ActorFunc)ObjTimeblock_Destroy, - (ActorFunc)ObjTimeblock_Update, - (ActorFunc)ObjTimeblock_Draw, + /**/ ACTOR_OBJ_TIMEBLOCK, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_TIMEBLOCK, + /**/ sizeof(ObjTimeblock), + /**/ ObjTimeblock_Init, + /**/ ObjTimeblock_Destroy, + /**/ ObjTimeblock_Update, + /**/ ObjTimeblock_Draw, }; typedef struct { diff --git a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c index f6c7f80046..1152e98b93 100644 --- a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c +++ b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c @@ -37,15 +37,15 @@ static s16 D_80BA1B58 = 0; static s16 D_80BA1B5C = 0; ActorInit Obj_Tsubo_InitVars = { - ACTOR_OBJ_TSUBO, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ObjTsubo), - (ActorFunc)ObjTsubo_Init, - (ActorFunc)ObjTsubo_Destroy, - (ActorFunc)ObjTsubo_Update, - NULL, + /**/ ACTOR_OBJ_TSUBO, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ObjTsubo), + /**/ ObjTsubo_Init, + /**/ ObjTsubo_Destroy, + /**/ ObjTsubo_Update, + /**/ NULL, }; static s16 sObjectIds[] = { OBJECT_GAMEPLAY_DANGEON_KEEP, OBJECT_TSUBO }; diff --git a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c index e2e2f48cfa..569ac00882 100644 --- a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c +++ b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c @@ -29,15 +29,15 @@ void func_80BA2600(ObjWarp2block* this); void func_80BA2610(ObjWarp2block* this, PlayState* play); ActorInit Obj_Warp2block_InitVars = { - ACTOR_OBJ_WARP2BLOCK, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_TIMEBLOCK, - sizeof(ObjWarp2block), - (ActorFunc)ObjWarp2block_Init, - (ActorFunc)ObjWarp2block_Destroy, - (ActorFunc)ObjWarp2block_Update, - (ActorFunc)ObjWarp2block_Draw, + /**/ ACTOR_OBJ_WARP2BLOCK, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_TIMEBLOCK, + /**/ sizeof(ObjWarp2block), + /**/ ObjWarp2block_Init, + /**/ ObjWarp2block_Destroy, + /**/ ObjWarp2block_Update, + /**/ ObjWarp2block_Draw, }; typedef struct { diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c index 48e1a1ebb0..24cf975e70 100644 --- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -44,15 +44,15 @@ static void* D_80BA5900[] = { }; ActorInit Object_Kankyo_InitVars = { - ACTOR_OBJECT_KANKYO, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ObjectKankyo), - (ActorFunc)ObjectKankyo_Init, - (ActorFunc)ObjectKankyo_Destroy, - (ActorFunc)ObjectKankyo_Update, - (ActorFunc)ObjectKankyo_Draw, + /**/ ACTOR_OBJECT_KANKYO, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ObjectKankyo), + /**/ ObjectKankyo_Init, + /**/ ObjectKankyo_Destroy, + /**/ ObjectKankyo_Update, + /**/ ObjectKankyo_Draw, }; static u8 sIsSpawned = false; diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c index 3c757e9a67..d169859ef4 100644 --- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c +++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c @@ -17,15 +17,15 @@ void OceffSpot_Draw(Actor* thisx, PlayState* play); void OceffSpot_GrowCylinder(OceffSpot* this, PlayState* play); ActorInit Oceff_Spot_InitVars = { - ACTOR_OCEFF_SPOT, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(OceffSpot), - (ActorFunc)OceffSpot_Init, - (ActorFunc)OceffSpot_Destroy, - (ActorFunc)OceffSpot_Update, - (ActorFunc)OceffSpot_Draw, + /**/ ACTOR_OCEFF_SPOT, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(OceffSpot), + /**/ OceffSpot_Init, + /**/ OceffSpot_Destroy, + /**/ OceffSpot_Update, + /**/ OceffSpot_Draw, }; #include "assets/overlays/ovl_Oceff_Spot/ovl_Oceff_Spot.c" diff --git a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c index 9fb47a443d..68c948ff57 100644 --- a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c +++ b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c @@ -19,15 +19,15 @@ void OceffStorm_DefaultAction(OceffStorm* this, PlayState* play); void OceffStorm_UnkAction(OceffStorm* this, PlayState* play); ActorInit Oceff_Storm_InitVars = { - ACTOR_OCEFF_STORM, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(OceffStorm), - (ActorFunc)OceffStorm_Init, - (ActorFunc)OceffStorm_Destroy, - (ActorFunc)OceffStorm_Update, - (ActorFunc)OceffStorm_Draw, + /**/ ACTOR_OCEFF_STORM, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(OceffStorm), + /**/ OceffStorm_Init, + /**/ OceffStorm_Destroy, + /**/ OceffStorm_Update, + /**/ OceffStorm_Draw, }; void OceffStorm_SetupAction(OceffStorm* this, OceffStormActionFunc actionFunc) { diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c index 30aaa911c9..ca3b77352d 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -15,15 +15,15 @@ void OceffWipe_Update(Actor* thisx, PlayState* play); void OceffWipe_Draw(Actor* thisx, PlayState* play); ActorInit Oceff_Wipe_InitVars = { - ACTOR_OCEFF_WIPE, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(OceffWipe), - (ActorFunc)OceffWipe_Init, - (ActorFunc)OceffWipe_Destroy, - (ActorFunc)OceffWipe_Update, - (ActorFunc)OceffWipe_Draw, + /**/ ACTOR_OCEFF_WIPE, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(OceffWipe), + /**/ OceffWipe_Init, + /**/ OceffWipe_Destroy, + /**/ OceffWipe_Update, + /**/ OceffWipe_Draw, }; void OceffWipe_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c index ab9c89ed04..a575a6676b 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c +++ b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c @@ -15,15 +15,15 @@ void OceffWipe2_Update(Actor* thisx, PlayState* play); void OceffWipe2_Draw(Actor* thisx, PlayState* play); ActorInit Oceff_Wipe2_InitVars = { - ACTOR_OCEFF_WIPE2, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(OceffWipe2), - (ActorFunc)OceffWipe2_Init, - (ActorFunc)OceffWipe2_Destroy, - (ActorFunc)OceffWipe2_Update, - (ActorFunc)OceffWipe2_Draw, + /**/ ACTOR_OCEFF_WIPE2, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(OceffWipe2), + /**/ OceffWipe2_Init, + /**/ OceffWipe2_Destroy, + /**/ OceffWipe2_Update, + /**/ OceffWipe2_Draw, }; void OceffWipe2_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c index f8efb80b50..77c9e1d335 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c +++ b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c @@ -15,15 +15,15 @@ void OceffWipe3_Update(Actor* thisx, PlayState* play); void OceffWipe3_Draw(Actor* thisx, PlayState* play); ActorInit Oceff_Wipe3_InitVars = { - ACTOR_OCEFF_WIPE3, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(OceffWipe3), - (ActorFunc)OceffWipe3_Init, - (ActorFunc)OceffWipe3_Destroy, - (ActorFunc)OceffWipe3_Update, - (ActorFunc)OceffWipe3_Draw, + /**/ ACTOR_OCEFF_WIPE3, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(OceffWipe3), + /**/ OceffWipe3_Init, + /**/ OceffWipe3_Destroy, + /**/ OceffWipe3_Update, + /**/ OceffWipe3_Draw, }; #include "assets/overlays/ovl_Oceff_Wipe3/ovl_Oceff_Wipe3.c" diff --git a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c index b142f95f16..19574b6149 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c +++ b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c @@ -15,15 +15,15 @@ void OceffWipe4_Update(Actor* thisx, PlayState* play); void OceffWipe4_Draw(Actor* thisx, PlayState* play); ActorInit Oceff_Wipe4_InitVars = { - ACTOR_OCEFF_WIPE4, - ACTORCAT_ITEMACTION, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(OceffWipe4), - (ActorFunc)OceffWipe4_Init, - (ActorFunc)OceffWipe4_Destroy, - (ActorFunc)OceffWipe4_Update, - (ActorFunc)OceffWipe4_Draw, + /**/ ACTOR_OCEFF_WIPE4, + /**/ ACTORCAT_ITEMACTION, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(OceffWipe4), + /**/ OceffWipe4_Init, + /**/ OceffWipe4_Destroy, + /**/ OceffWipe4_Update, + /**/ OceffWipe4_Draw, }; void OceffWipe4_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c index f176441b8e..c83c870ec7 100644 --- a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c +++ b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c @@ -22,15 +22,15 @@ void ShotSun_UpdateFairySpawner(ShotSun* this, PlayState* play); void ShotSun_UpdateHyliaSun(ShotSun* this, PlayState* play); ActorInit Shot_Sun_InitVars = { - ACTOR_SHOT_SUN, - ACTORCAT_PROP, - FLAGS, - OBJECT_GAMEPLAY_KEEP, - sizeof(ShotSun), - (ActorFunc)ShotSun_Init, - (ActorFunc)ShotSun_Destroy, - (ActorFunc)ShotSun_Update, - NULL, + /**/ ACTOR_SHOT_SUN, + /**/ ACTORCAT_PROP, + /**/ FLAGS, + /**/ OBJECT_GAMEPLAY_KEEP, + /**/ sizeof(ShotSun), + /**/ ShotSun_Init, + /**/ ShotSun_Destroy, + /**/ ShotSun_Update, + /**/ NULL, }; typedef enum { From 042a5c553020404a3e49834614327917c34334a8 Mon Sep 17 00:00:00 2001 From: fig02 Date: Sat, 4 Nov 2023 02:59:12 -0400 Subject: [PATCH 16/16] rename to upper action (#1570) --- include/z64player.h | 12 +- .../actors/ovl_player_actor/z_player.c | 166 +++++++++--------- 2 files changed, 89 insertions(+), 89 deletions(-) diff --git a/include/z64player.h b/include/z64player.h index dbaa71e2e7..f5da3c88a6 100644 --- a/include/z64player.h +++ b/include/z64player.h @@ -669,7 +669,7 @@ typedef struct { #define PLAYER_STATE3_7 (1 << 7) typedef void (*PlayerActionFunc)(struct Player*, struct PlayState*); -typedef s32 (*ItemActionFunc)(struct Player*, struct PlayState*); +typedef s32 (*UpperActionFunc)(struct Player*, struct PlayState*); typedef void (*PlayerFuncA74)(struct PlayState*, struct Player*); typedef struct Player { @@ -773,11 +773,11 @@ typedef struct Player { /* 0x06C0 */ s16 unk_6C0; /* 0x06C2 */ s16 unk_6C2; /* 0x06C4 */ f32 unk_6C4; - /* 0x06C8 */ SkelAnime skelAnimeUpper; - /* 0x070C */ Vec3s jointTableUpper[PLAYER_LIMB_BUF_COUNT]; - /* 0x079C */ Vec3s morphTableUpper[PLAYER_LIMB_BUF_COUNT]; - /* 0x082C */ ItemActionFunc itemActionFunc; - /* 0x0830 */ f32 skelAnimeUpperBlendWeight; + /* 0x06C8 */ SkelAnime upperSkelAnime; + /* 0x070C */ Vec3s upperJointTable[PLAYER_LIMB_BUF_COUNT]; + /* 0x079C */ Vec3s upperMorphTable[PLAYER_LIMB_BUF_COUNT]; + /* 0x082C */ UpperActionFunc upperActionFunc; + /* 0x0830 */ f32 upperAnimBlendWeight; /* 0x0834 */ s16 unk_834; /* 0x0836 */ s8 unk_836; /* 0x0837 */ u8 unk_837; diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 1d5ecfd2c2..08e8d82c0f 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -147,7 +147,7 @@ void func_80833984(PlayState* play, Player* this); void Player_InitItemAction(PlayState* play, Player* this, s8 itemAction); s32 func_8083485C(Player* this, PlayState* play); s32 func_808349DC(Player* this, PlayState* play); -s32 Player_IA_ChangeHeldItem(Player* this, PlayState* play); +s32 Player_UpperAction_ChangeHeldItem(Player* this, PlayState* play); s32 func_80834B5C(Player* this, PlayState* play); s32 func_80834C74(Player* this, PlayState* play); s32 func_8083501C(Player* this, PlayState* play); @@ -2136,10 +2136,10 @@ LinkAnimationHeader* func_808335F4(Player* this) { } } -void Player_SetItemActionFunc(Player* this, ItemActionFunc itemActionFunc) { - this->itemActionFunc = itemActionFunc; +void Player_SetUpperActionFunc(Player* this, UpperActionFunc upperActionFunc) { + this->upperActionFunc = upperActionFunc; this->unk_836 = 0; - this->skelAnimeUpperBlendWeight = 0.0f; + this->upperAnimBlendWeight = 0.0f; func_808326F0(this); } @@ -2434,7 +2434,7 @@ void Player_StartChangingHeldItem(Player* this, PlayState* play) { heldItemAction = Player_ItemToItemAction(this->heldItemId); - Player_SetItemActionFunc(this, Player_IA_ChangeHeldItem); + Player_SetUpperActionFunc(this, Player_UpperAction_ChangeHeldItem); nextAnimType = gPlayerModelTypes[this->nextModelGroup][PLAYER_MODELGROUPENTRY_ANIM]; itemChangeType = sItemChangeTypes[gPlayerModelTypes[this->modelGroup][PLAYER_MODELGROUPENTRY_ANIM]][nextAnimType]; @@ -2468,7 +2468,7 @@ void Player_StartChangingHeldItem(Player* this, PlayState* play) { playSpeed *= 2.0f; } - LinkAnimation_Change(play, &this->skelAnimeUpper, anim, playSpeed, startFrame, endFrame, ANIMMODE_ONCE, 0.0f); + LinkAnimation_Change(play, &this->upperSkelAnime, anim, playSpeed, startFrame, endFrame, ANIMMODE_ONCE, 0.0f); this->stateFlags1 &= ~PLAYER_STATE1_START_CHANGING_HELD_ITEM; } @@ -2519,7 +2519,7 @@ s32 func_8083442C(Player* this, PlayState* play) { (gSaveContext.magicState != MAGIC_STATE_IDLE)) { Sfx_PlaySfxCentered(NA_SE_SY_ERROR); } else { - Player_SetItemActionFunc(this, func_808351D4); + Player_SetUpperActionFunc(this, func_808351D4); this->stateFlags1 |= PLAYER_STATE1_9; this->unk_834 = 14; @@ -2568,11 +2568,11 @@ void Player_FinishItemChange(PlayState* play, Player* this) { } void func_80834644(PlayState* play, Player* this) { - if (Player_IA_ChangeHeldItem == this->itemActionFunc) { + if (Player_UpperAction_ChangeHeldItem == this->upperActionFunc) { Player_FinishItemChange(play, this); } - Player_SetItemActionFunc(this, sItemActionUpdateFuncs[this->heldItemAction]); + Player_SetUpperActionFunc(this, sItemActionUpdateFuncs[this->heldItemAction]); this->unk_834 = 0; this->unk_6AC = 0; Player_DetachHeldActor(play, this); @@ -2580,7 +2580,7 @@ void func_80834644(PlayState* play, Player* this) { } LinkAnimationHeader* func_808346C4(PlayState* play, Player* this) { - Player_SetItemActionFunc(this, func_80834B5C); + Player_SetUpperActionFunc(this, func_80834B5C); Player_DetachHeldActor(play, this); if (this->unk_870 < 0.5f) { @@ -2601,7 +2601,7 @@ s32 func_80834758(PlayState* play, Player* this) { anim = func_808346C4(play, this); frame = Animation_GetLastFrame(anim); - LinkAnimation_Change(play, &this->skelAnimeUpper, anim, 1.0f, frame, frame, ANIMMODE_ONCE, 0.0f); + LinkAnimation_Change(play, &this->upperSkelAnime, anim, 1.0f, frame, frame, ANIMMODE_ONCE, 0.0f); Player_PlaySfx(this, NA_SE_IT_SHIELD_POSTURE); return 1; @@ -2619,13 +2619,13 @@ s32 func_8083485C(Player* this, PlayState* play) { } void func_80834894(Player* this) { - Player_SetItemActionFunc(this, func_80834C74); + Player_SetUpperActionFunc(this, func_80834C74); if (this->itemAction < 0) { func_8008EC70(this); } - Animation_Reverse(&this->skelAnimeUpper); + Animation_Reverse(&this->upperSkelAnime); Player_PlaySfx(this, NA_SE_IT_SHIELD_REMOVE); } @@ -2634,9 +2634,9 @@ void Player_WaitToFinishItemChange(PlayState* play, Player* this) { f32 changeFrame; changeFrame = itemChangeEntry->changeFrame; - changeFrame = (this->skelAnimeUpper.playSpeed < 0.0f) ? changeFrame - 1.0f : changeFrame; + changeFrame = (this->upperSkelAnime.playSpeed < 0.0f) ? changeFrame - 1.0f : changeFrame; - if (LinkAnimation_OnFrame(&this->skelAnimeUpper, changeFrame)) { + if (LinkAnimation_OnFrame(&this->upperSkelAnime, changeFrame)) { Player_FinishItemChange(play, this); } @@ -2661,16 +2661,16 @@ s32 func_808349DC(Player* this, PlayState* play) { } } -s32 Player_IA_ChangeHeldItem(Player* this, PlayState* play) { - if (LinkAnimation_Update(play, &this->skelAnimeUpper) || +s32 Player_UpperAction_ChangeHeldItem(Player* this, PlayState* play) { + if (LinkAnimation_Update(play, &this->upperSkelAnime) || ((Player_ItemToItemAction(this->heldItemId) == this->heldItemAction) && (sUseHeldItem = (sUseHeldItem || ((this->modelAnimType != PLAYER_ANIMTYPE_3) && (play->shootingGalleryStatus == 0)))))) { - Player_SetItemActionFunc(this, sItemActionUpdateFuncs[this->heldItemAction]); + Player_SetUpperActionFunc(this, sItemActionUpdateFuncs[this->heldItemAction]); this->unk_834 = 0; this->unk_6AC = 0; sHeldItemButtonIsHeldDown = sUseHeldItem; - return this->itemActionFunc(this, play); + return this->upperActionFunc(this, play); } if (func_80833350(this) != 0) { @@ -2685,7 +2685,7 @@ s32 Player_IA_ChangeHeldItem(Player* this, PlayState* play) { } s32 func_80834B5C(Player* this, PlayState* play) { - LinkAnimation_Update(play, &this->skelAnimeUpper); + LinkAnimation_Update(play, &this->upperSkelAnime); if (!CHECK_BTN_ALL(sControlInput->cur.button, BTN_R)) { func_80834894(this); @@ -2701,10 +2701,10 @@ s32 func_80834BD4(Player* this, PlayState* play) { LinkAnimationHeader* anim; f32 frame; - if (LinkAnimation_Update(play, &this->skelAnimeUpper)) { + if (LinkAnimation_Update(play, &this->upperSkelAnime)) { anim = func_808346C4(play, this); frame = Animation_GetLastFrame(anim); - LinkAnimation_Change(play, &this->skelAnimeUpper, anim, 1.0f, frame, frame, ANIMMODE_ONCE, 0.0f); + LinkAnimation_Change(play, &this->upperSkelAnime, anim, 1.0f, frame, frame, ANIMMODE_ONCE, 0.0f); } this->stateFlags1 |= PLAYER_STATE1_22; @@ -2716,12 +2716,12 @@ s32 func_80834BD4(Player* this, PlayState* play) { s32 func_80834C74(Player* this, PlayState* play) { sUseHeldItem = sHeldItemButtonIsHeldDown; - if (sUseHeldItem || LinkAnimation_Update(play, &this->skelAnimeUpper)) { - Player_SetItemActionFunc(this, sItemActionUpdateFuncs[this->heldItemAction]); - LinkAnimation_PlayLoop(play, &this->skelAnimeUpper, + if (sUseHeldItem || LinkAnimation_Update(play, &this->upperSkelAnime)) { + Player_SetUpperActionFunc(this, sItemActionUpdateFuncs[this->heldItemAction]); + LinkAnimation_PlayLoop(play, &this->upperSkelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_wait, this->modelAnimType)); this->unk_6AC = 0; - this->itemActionFunc(this, play); + this->upperActionFunc(this, play); return 0; } @@ -2741,11 +2741,11 @@ s32 func_80834D2C(Player* this, PlayState* play) { } else { anim = &gPlayerAnim_link_hook_shot_ready; } - LinkAnimation_PlayOnce(play, &this->skelAnimeUpper, anim); + LinkAnimation_PlayOnce(play, &this->upperSkelAnime, anim); } else { - Player_SetItemActionFunc(this, func_80835884); + Player_SetUpperActionFunc(this, func_80835884); this->unk_834 = 10; - LinkAnimation_PlayOnce(play, &this->skelAnimeUpper, &gPlayerAnim_link_boom_throw_wait2waitR); + LinkAnimation_PlayOnce(play, &this->upperSkelAnime, &gPlayerAnim_link_boom_throw_wait2waitR); } if (this->stateFlags1 & PLAYER_STATE1_23) { @@ -2870,10 +2870,10 @@ s32 func_808351D4(Player* this, PlayState* play) { if ((this->unk_836 == 0) && (func_80833350(this) == 0) && (this->skelAnime.animation == &gPlayerAnim_link_bow_side_walk)) { - LinkAnimation_PlayOnce(play, &this->skelAnimeUpper, D_808543CC[sp2C]); + LinkAnimation_PlayOnce(play, &this->upperSkelAnime, D_808543CC[sp2C]); this->unk_836 = -1; - } else if (LinkAnimation_Update(play, &this->skelAnimeUpper)) { - LinkAnimation_PlayLoop(play, &this->skelAnimeUpper, D_808543D4[sp2C]); + } else if (LinkAnimation_Update(play, &this->upperSkelAnime)) { + LinkAnimation_PlayLoop(play, &this->upperSkelAnime, D_808543D4[sp2C]); this->unk_836 = 1; } else if (this->unk_836 == 1) { this->unk_836 = 2; @@ -2886,7 +2886,7 @@ s32 func_808351D4(Player* this, PlayState* play) { func_80834EB8(this, play); if ((this->unk_836 > 0) && ((this->unk_860 < 0) || (!sHeldItemButtonIsHeldDown && !func_80834E7C(play)))) { - Player_SetItemActionFunc(this, func_808353D8); + Player_SetUpperActionFunc(this, func_808353D8); if (this->unk_860 >= 0) { if (sp2C == 0) { if (!func_808350A4(play, this)) { @@ -2906,7 +2906,7 @@ s32 func_808351D4(Player* this, PlayState* play) { } s32 func_808353D8(Player* this, PlayState* play) { - LinkAnimation_Update(play, &this->skelAnimeUpper); + LinkAnimation_Update(play, &this->upperSkelAnime); if (Player_HoldsHookshot(this) && !func_80834FBC(this)) { return 1; @@ -2920,7 +2920,7 @@ s32 func_808353D8(Player* this, PlayState* play) { if (Player_HoldsHookshot(this)) { this->unk_836 = 1; } else { - LinkAnimation_PlayOnce(play, &this->skelAnimeUpper, &gPlayerAnim_link_bow_bow_shoot_next); + LinkAnimation_PlayOnce(play, &this->upperSkelAnime, &gPlayerAnim_link_bow_bow_shoot_next); } } } else { @@ -2936,10 +2936,10 @@ s32 func_808353D8(Player* this, PlayState* play) { } if (Player_HoldsHookshot(this)) { - Player_SetItemActionFunc(this, func_8083501C); + Player_SetUpperActionFunc(this, func_8083501C); } else { - Player_SetItemActionFunc(this, func_80835588); - LinkAnimation_PlayOnce(play, &this->skelAnimeUpper, &gPlayerAnim_link_bow_bow_shoot_end); + Player_SetUpperActionFunc(this, func_80835588); + LinkAnimation_PlayOnce(play, &this->upperSkelAnime, &gPlayerAnim_link_bow_bow_shoot_end); } this->unk_834 = 0; @@ -2949,8 +2949,8 @@ s32 func_808353D8(Player* this, PlayState* play) { } s32 func_80835588(Player* this, PlayState* play) { - if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || LinkAnimation_Update(play, &this->skelAnimeUpper)) { - Player_SetItemActionFunc(this, func_8083501C); + if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || LinkAnimation_Update(play, &this->upperSkelAnime)) { + Player_SetUpperActionFunc(this, func_8083501C); } return 1; @@ -2979,8 +2979,8 @@ s32 func_80835644(PlayState* play, Player* this, Actor* arg2) { void func_80835688(Player* this, PlayState* play) { if (!func_80835644(play, this, this->heldActor)) { - Player_SetItemActionFunc(this, func_808356E8); - LinkAnimation_PlayLoop(play, &this->skelAnimeUpper, &gPlayerAnim_link_normal_carryB_wait); + Player_SetUpperActionFunc(this, func_808356E8); + LinkAnimation_PlayLoop(play, &this->upperSkelAnime, &gPlayerAnim_link_normal_carryB_wait); } } @@ -2996,8 +2996,8 @@ s32 func_808356E8(Player* this, PlayState* play) { } if (this->stateFlags1 & PLAYER_STATE1_11) { - if (LinkAnimation_Update(play, &this->skelAnimeUpper)) { - LinkAnimation_PlayLoop(play, &this->skelAnimeUpper, &gPlayerAnim_link_normal_carryB_wait); + if (LinkAnimation_Update(play, &this->upperSkelAnime)) { + LinkAnimation_PlayLoop(play, &this->upperSkelAnime, &gPlayerAnim_link_normal_carryB_wait); } if ((heldActor->id == ACTOR_EN_NIW) && (this->actor.velocity.y <= 0.0f)) { @@ -3022,7 +3022,7 @@ s32 func_80835800(Player* this, PlayState* play) { } if (this->stateFlags1 & PLAYER_STATE1_25) { - Player_SetItemActionFunc(this, func_80835B60); + Player_SetUpperActionFunc(this, func_80835B60); } else if (func_80834F2C(this, play)) { return 1; } @@ -3031,9 +3031,9 @@ s32 func_80835800(Player* this, PlayState* play) { } s32 func_80835884(Player* this, PlayState* play) { - if (LinkAnimation_Update(play, &this->skelAnimeUpper)) { - Player_SetItemActionFunc(this, func_808358F0); - LinkAnimation_PlayLoop(play, &this->skelAnimeUpper, &gPlayerAnim_link_boom_throw_waitR); + if (LinkAnimation_Update(play, &this->upperSkelAnime)) { + Player_SetUpperActionFunc(this, func_808358F0); + LinkAnimation_PlayLoop(play, &this->upperSkelAnime, &gPlayerAnim_link_boom_throw_waitR); } func_80834EB8(this, play); @@ -3046,17 +3046,17 @@ s32 func_808358F0(Player* this, PlayState* play) { if ((func_808334E4(this) == animSeg) || (func_80833528(this) == animSeg) || (func_808335B0(this) == animSeg) || (func_808335F4(this) == animSeg)) { - AnimationContext_SetCopyAll(play, this->skelAnime.limbCount, this->skelAnimeUpper.jointTable, + AnimationContext_SetCopyAll(play, this->skelAnime.limbCount, this->upperSkelAnime.jointTable, this->skelAnime.jointTable); } else { - LinkAnimation_Update(play, &this->skelAnimeUpper); + LinkAnimation_Update(play, &this->upperSkelAnime); } func_80834EB8(this, play); if (!sHeldItemButtonIsHeldDown) { - Player_SetItemActionFunc(this, func_808359FC); - LinkAnimation_PlayOnce(play, &this->skelAnimeUpper, + Player_SetUpperActionFunc(this, func_808359FC); + LinkAnimation_PlayOnce(play, &this->upperSkelAnime, (this->unk_870 < 0.5f) ? &gPlayerAnim_link_boom_throwR : &gPlayerAnim_link_boom_throwL); } @@ -3064,10 +3064,10 @@ s32 func_808358F0(Player* this, PlayState* play) { } s32 func_808359FC(Player* this, PlayState* play) { - if (LinkAnimation_Update(play, &this->skelAnimeUpper)) { - Player_SetItemActionFunc(this, func_80835B60); + if (LinkAnimation_Update(play, &this->upperSkelAnime)) { + Player_SetUpperActionFunc(this, func_80835B60); this->unk_834 = 0; - } else if (LinkAnimation_OnFrame(&this->skelAnimeUpper, 6.0f)) { + } else if (LinkAnimation_OnFrame(&this->upperSkelAnime, 6.0f)) { f32 posX = (Math_SinS(this->actor.shape.rot.y) * 10.0f) + this->actor.world.pos.x; f32 posZ = (Math_CosS(this->actor.shape.rot.y) * 10.0f) + this->actor.world.pos.z; s32 yaw = (this->unk_664 != NULL) ? this->actor.shape.rot.y + 14000 : this->actor.shape.rot.y; @@ -3098,8 +3098,8 @@ s32 func_80835B60(Player* this, PlayState* play) { } if (!(this->stateFlags1 & PLAYER_STATE1_25)) { - Player_SetItemActionFunc(this, func_80835C08); - LinkAnimation_PlayOnce(play, &this->skelAnimeUpper, &gPlayerAnim_link_boom_catch); + Player_SetUpperActionFunc(this, func_80835C08); + LinkAnimation_PlayOnce(play, &this->upperSkelAnime, &gPlayerAnim_link_boom_catch); func_808357E8(this, gPlayerLeftHandBoomerangDLs); Player_PlaySfx(this, NA_SE_PL_CATCH_BOOMERANG); func_80832698(this, NA_SE_VO_LI_SWORD_N); @@ -3110,8 +3110,8 @@ s32 func_80835B60(Player* this, PlayState* play) { } s32 func_80835C08(Player* this, PlayState* play) { - if (!func_80835800(this, play) && LinkAnimation_Update(play, &this->skelAnimeUpper)) { - Player_SetItemActionFunc(this, func_80835800); + if (!func_80835800(this, play) && LinkAnimation_Update(play, &this->upperSkelAnime)) { + Player_SetUpperActionFunc(this, func_80835800); } return 1; @@ -3345,7 +3345,7 @@ int Player_CanUpdateItems(Player* this) { return (!(Player_Action_808458D0 == this->actionFunc) || ((this->stateFlags1 & PLAYER_STATE1_START_CHANGING_HELD_ITEM) && ((this->heldItemId == ITEM_LAST_USED) || (this->heldItemId == ITEM_NONE)))) && - (!(Player_IA_ChangeHeldItem == this->itemActionFunc) || + (!(Player_UpperAction_ChangeHeldItem == this->upperActionFunc) || (Player_ItemToItemAction(this->heldItemId) == this->heldItemAction)); } @@ -3373,24 +3373,24 @@ s32 Player_UpdateUpperBody(Player* this, PlayState* play) { } } - if (!this->itemActionFunc(this, play)) { + if (!this->upperActionFunc(this, play)) { return 0; } - if (this->skelAnimeUpperBlendWeight != 0.0f) { + if (this->upperAnimBlendWeight != 0.0f) { if ((func_80833350(this) == 0) || (this->speedXZ != 0.0f)) { - AnimationContext_SetCopyFalse(play, this->skelAnime.limbCount, this->skelAnimeUpper.jointTable, + AnimationContext_SetCopyFalse(play, this->skelAnime.limbCount, this->upperSkelAnime.jointTable, this->skelAnime.jointTable, sUpperBodyLimbCopyMap); } - Math_StepToF(&this->skelAnimeUpperBlendWeight, 0.0f, 0.25f); + Math_StepToF(&this->upperAnimBlendWeight, 0.0f, 0.25f); AnimationContext_SetInterp(play, this->skelAnime.limbCount, this->skelAnime.jointTable, - this->skelAnimeUpper.jointTable, 1.0f - this->skelAnimeUpperBlendWeight); + this->upperSkelAnime.jointTable, 1.0f - this->upperAnimBlendWeight); } else if ((func_80833350(this) == 0) || (this->speedXZ != 0.0f)) { AnimationContext_SetCopyTrue(play, this->skelAnime.limbCount, this->skelAnime.jointTable, - this->skelAnimeUpper.jointTable, sUpperBodyLimbCopyMap); + this->upperSkelAnime.jointTable, sUpperBodyLimbCopyMap); } else { AnimationContext_SetCopyAll(play, this->skelAnime.limbCount, this->skelAnime.jointTable, - this->skelAnimeUpper.jointTable); + this->upperSkelAnime.jointTable); } return 1; @@ -3836,7 +3836,7 @@ s32 Player_TryActionChangeList(PlayState* play, Player* this, s8* actionChangeLi } if (!(this->stateFlags1 & PLAYER_STATE1_START_CHANGING_HELD_ITEM) && - (Player_IA_ChangeHeldItem != this->itemActionFunc)) { + (Player_UpperAction_ChangeHeldItem != this->upperActionFunc)) { // Process all entries in the Action Change List with a positive index while (*actionChangeList >= 0) { if (sActionChangeFuncs[*actionChangeList](this, play)) { @@ -4368,14 +4368,14 @@ s32 func_808382DC(Player* this, PlayState* play) { } if (!(this->av1.actionVar1 = sp54)) { - Player_SetItemActionFunc(this, func_80834BD4); + Player_SetUpperActionFunc(this, func_80834BD4); if (this->unk_870 < 0.5f) { anim = D_808543BC[Player_HoldsTwoHandedWeapon(this)]; } else { anim = D_808543B4[Player_HoldsTwoHandedWeapon(this)]; } - LinkAnimation_PlayOnce(play, &this->skelAnimeUpper, anim); + LinkAnimation_PlayOnce(play, &this->upperSkelAnime, anim); } else { Player_AnimPlayOnce(play, this, D_808543C4[Player_HoldsTwoHandedWeapon(this)]); } @@ -7445,7 +7445,7 @@ void Player_Action_80840450(Player* this, PlayState* play) { func_8083721C(this); if (!Player_TryActionChangeList(play, this, sActionChangeList1, true)) { - if (!func_80833B54(this) && (!func_80833B2C(this) || (func_80834B5C != this->itemActionFunc))) { + if (!func_80833B54(this) && (!func_80833B2C(this) || (func_80834B5C != this->upperActionFunc))) { func_8083CF10(this, play); return; } @@ -7522,7 +7522,7 @@ void Player_Action_808407CC(Player* this, PlayState* play) { return; } - if (func_80834B5C == this->itemActionFunc) { + if (func_80834B5C == this->upperActionFunc) { func_8083CEAC(this, play); return; } @@ -8570,7 +8570,7 @@ void Player_Action_808435C4(Player* this, PlayState* play) { if (this->av1.actionVar1 == 0) { D_808535E0 = Player_UpdateUpperBody(this, play); - if ((func_80834B5C == this->itemActionFunc) || (func_808374A0(play, this, &this->skelAnimeUpper, 4.0f) > 0)) { + if ((func_80834B5C == this->upperActionFunc) || (func_808374A0(play, this, &this->upperSkelAnime, 4.0f) > 0)) { Player_SetupAction(play, this, Player_Action_80840450, 1); } } else { @@ -9908,9 +9908,9 @@ void Player_InitCommon(Player* this, PlayState* play, FlexSkeletonHeader* skelHe SkelAnime_InitLink(play, &this->skelAnime, skelHeader, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_wait, this->modelAnimType), 9, this->jointTable, this->morphTable, PLAYER_LIMB_MAX); this->skelAnime.baseTransl = sSkeletonBaseTransl; - SkelAnime_InitLink(play, &this->skelAnimeUpper, skelHeader, func_80833338(this), 9, this->jointTableUpper, - this->morphTableUpper, PLAYER_LIMB_MAX); - this->skelAnimeUpper.baseTransl = sSkeletonBaseTransl; + SkelAnime_InitLink(play, &this->upperSkelAnime, skelHeader, func_80833338(this), 9, this->upperJointTable, + this->upperMorphTable, PLAYER_LIMB_MAX); + this->upperSkelAnime.baseTransl = sSkeletonBaseTransl; Effect_Add(play, &this->meleeWeaponEffectIndex, EFFECT_BLURE2, 0, 0, &D_8085470C); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFeet, this->ageProperties->unk_04); @@ -12512,27 +12512,27 @@ void Player_Action_8084CC98(Player* this, PlayState* play) { !Player_ActionChange_6(this, play))) { if (D_808535E0 == 0) { if (this->av1.actionVar1 != 0) { - if (LinkAnimation_Update(play, &this->skelAnimeUpper)) { + if (LinkAnimation_Update(play, &this->upperSkelAnime)) { rideActor->stateFlags &= ~ENHORSE_FLAG_8; this->av1.actionVar1 = 0; } - if (this->skelAnimeUpper.animation == &gPlayerAnim_link_uma_stop_muti) { - if (LinkAnimation_OnFrame(&this->skelAnimeUpper, 23.0f)) { + if (this->upperSkelAnime.animation == &gPlayerAnim_link_uma_stop_muti) { + if (LinkAnimation_OnFrame(&this->upperSkelAnime, 23.0f)) { Player_PlaySfx(this, NA_SE_IT_LASH); func_80832698(this, NA_SE_VO_LI_LASH); } AnimationContext_SetCopyAll(play, this->skelAnime.limbCount, this->skelAnime.jointTable, - this->skelAnimeUpper.jointTable); + this->upperSkelAnime.jointTable); } else { - if (LinkAnimation_OnFrame(&this->skelAnimeUpper, 10.0f)) { + if (LinkAnimation_OnFrame(&this->upperSkelAnime, 10.0f)) { Player_PlaySfx(this, NA_SE_IT_LASH); func_80832698(this, NA_SE_VO_LI_LASH); } AnimationContext_SetCopyTrue(play, this->skelAnime.limbCount, this->skelAnime.jointTable, - this->skelAnimeUpper.jointTable, sUpperBodyLimbCopyMap); + this->upperSkelAnime.jointTable, sUpperBodyLimbCopyMap); } } else { LinkAnimationHeader* anim = NULL; @@ -12546,7 +12546,7 @@ void Player_Action_8084CC98(Player* this, PlayState* play) { } if (anim != NULL) { - LinkAnimation_PlayOnce(play, &this->skelAnimeUpper, anim); + LinkAnimation_PlayOnce(play, &this->upperSkelAnime, anim); this->av1.actionVar1 = 1; } }