`En_Po_Sisters`: add and implement param macros at Actor_Spawns

This commit is contained in:
blackgamma7 2025-12-08 17:42:13 -05:00
parent 299ef8c9b9
commit 6b3c090239
3 changed files with 11 additions and 4 deletions

View File

@ -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);

View File

@ -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) {

View File

@ -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