From 6b3c090239924f170ea2beec4c5b0b49edd4dadd Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Mon, 8 Dec 2025 17:42:13 -0500 Subject: [PATCH] `En_Po_Sisters`: add and implement param macros at Actor_Spawns --- src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c | 7 +++++-- src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c | 5 ++++- src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) 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 bbfecc301f..f39d846597 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 @@ -6,6 +6,8 @@ #include "z_bg_po_event.h" +#include "overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h" + #include "libc64/qrand.h" #include "array_count.h" #include "gfx.h" @@ -353,7 +355,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, PlayState* play) { if ((this->type == 0) && (this->index == 0)) { amy = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->dyna.actor.world.pos.x + 30.0f, this->dyna.actor.world.pos.y - 30.0f, this->dyna.actor.world.pos.z + 30.0f, 0, - this->dyna.actor.shape.rot.y, 0, this->dyna.actor.params + 0x300); + this->dyna.actor.shape.rot.y, 0, this->dyna.actor.params + (EN_PO_SISTERS_PARAM(AMY))); if (amy != NULL) { OnePointCutscene_Init(play, 3170, 30, amy, CAM_ID_MAIN); } @@ -549,7 +551,8 @@ void BgPoEvent_PaintingPresent(BgPoEvent* this, PlayState* play) { } else if (this->collider.base.acFlags & AC_HIT) { if (!BgPoEvent_NextPainting(this)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, thisx->world.pos.x, thisx->world.pos.y - 40.0f, - thisx->world.pos.z, 0, thisx->shape.rot.y, 0, thisx->params + ((this->type - 1) << 8)); + thisx->world.pos.z, 0, thisx->shape.rot.y, 0, + thisx->params + EN_PO_SISTERS_PARAM_N((this->type - 1))); OnePointCutscene_Init(play, 3160, 80, thisx, CAM_ID_MAIN); Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); 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 0c1ce9924d..c844555779 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 @@ -6,6 +6,8 @@ #include "z_bg_po_syokudai.h" +#include "overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h" + #include "libc64/qrand.h" #include "gfx.h" #include "gfx_setupdl.h" @@ -116,7 +118,8 @@ void BgPoSyokudai_Init(Actor* thisx, PlayState* play) { } else if (!Flags_GetSwitch(play, POE_TORCH_FLAG + POE_FLAME_PURPLE) && !Flags_GetSwitch(play, 0x1B)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, thisx->world.pos.x, thisx->world.pos.y + 52.0f, - thisx->world.pos.z, 0, 0, 0, (this->flameColor << 8) + thisx->params + 0x1000); + thisx->world.pos.z, 0, 0, 0, + EN_PO_SISTERS_PARAM_N(this->flameColor) + thisx->params + EN_PO_SISTERS_INTRO_PARAM); } else if (!Flags_GetSwitch(play, thisx->params)) { if (play->envCtx.lightSettingOverride == LIGHT_SETTING_OVERRIDE_NONE) { diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h index da42eb32a2..350ca72ba6 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h @@ -39,7 +39,8 @@ typedef enum EnPoSisterNames { EN_PO_SISTERS_AMY, // green sister, hides in block puzzle } EnPoSisterNames; -#define EN_PO_SISTERS_PARAM(name) (EN_PO_SISTERS_#name << 8) // param for which sister +#define EN_PO_SISTERS_PARAM_N(n) (n << 8) // param for which sister by number +#define EN_PO_SISTERS_PARAM(name) (EN_PO_SISTERS_##name << 8) // param for which sister by name #define EN_PO_SISTERS_DECOY_PARAM (1 << 10) // param for Meg's decoys #define EN_PO_SISTERS_INTRO_PARAM (1 << 12) // param for Poe Sisters when first entering foyer