mirror of https://github.com/zeldaret/mm.git
Switch Flag Cleanup (#1406)
* cleanup switchFlag * more cleanup * switchFlags
This commit is contained in:
parent
f4a490bb6a
commit
d3104be63c
|
@ -103,7 +103,7 @@ void BgAstrBombwall_Init(Actor* thisx, PlayState* play) {
|
|||
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, &object_astr_obj_Colheader_002498);
|
||||
Collider_InitTris(play, &this->collider);
|
||||
if (Flags_GetSwitch(play, BGASTRBOMBWALL_GET_SWITCHFLAG(thisx))) {
|
||||
if (Flags_GetSwitch(play, BGASTRBOMBWALL_GET_SWITCH_FLAG(thisx))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ void func_80C0A378(BgAstrBombwall* this) {
|
|||
void func_80C0A38C(BgAstrBombwall* this, PlayState* play) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Flags_SetSwitch(play, BGASTRBOMBWALL_GET_SWITCHFLAG(&this->dyna.actor));
|
||||
Flags_SetSwitch(play, BGASTRBOMBWALL_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
func_80C0A400(this, play);
|
||||
} else {
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
struct BgAstrBombwall;
|
||||
|
||||
#define BGASTRBOMBWALL_GET_SWITCHFLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define BGASTRBOMBWALL_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
|
||||
typedef void (*BgAstrBombwallActionFunc)(struct BgAstrBombwall*, PlayState*);
|
||||
typedef struct BgAstrBombwall {
|
||||
|
|
|
@ -191,8 +191,8 @@ s32 func_808B74D8(BgBreakwall* this, PlayState* play) {
|
|||
s32 func_808B751C(BgBreakwall* this, PlayState* play) {
|
||||
Actor_SetScale(&this->dyna.actor, 0.1f);
|
||||
|
||||
if ((BGBREAKWALL_SWITCHFLAG(&this->dyna.actor) != 0x7F) &&
|
||||
!Flags_GetSwitch(play, BGBREAKWALL_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if ((BGBREAKWALL_SWITCH_FLAG(&this->dyna.actor) != 0x7F) &&
|
||||
!Flags_GetSwitch(play, BGBREAKWALL_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ void BgBreakwall_Init(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
BgBreakwall_SetupAction(this, func_808B76CC);
|
||||
this->switchFlag = BGBREAKWALL_SWITCHFLAG(&this->dyna.actor);
|
||||
this->switchFlag = BGBREAKWALL_SWITCH_FLAG(&this->dyna.actor);
|
||||
}
|
||||
|
||||
void BgBreakwall_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
|
|
@ -10,7 +10,7 @@ typedef s32 (*BgBreakwallUnkFunc)(struct BgBreakwall*, PlayState*);
|
|||
typedef void (*BgBreakwallUnkFunc2)(struct BgBreakwall*, PlayState*);
|
||||
|
||||
#define BGBREAKWALL_GET_F(thisx) ((thisx)-> params & 0xF)
|
||||
#define BGBREAKWALL_SWITCHFLAG(thisx) (((thisx)-> params & 0xFE00) >> 9)
|
||||
#define BGBREAKWALL_SWITCH_FLAG(thisx) (((thisx)-> params & 0xFE00) >> 9)
|
||||
|
||||
typedef enum {
|
||||
/* 7 */ BGBREAKWALL_F_7 = 7,
|
||||
|
|
|
@ -198,7 +198,7 @@ void func_80B8264C(BgDblueBalance* this) {
|
|||
f32 temp_f0;
|
||||
s16 phi_s2;
|
||||
|
||||
if (this->unk_170 != 0) {
|
||||
if (this->isSwitchFlagSet) {
|
||||
if (this->unk_183 < 8) {
|
||||
this->unk_183 = 0;
|
||||
} else {
|
||||
|
@ -247,7 +247,7 @@ void func_80B8264C(BgDblueBalance* this) {
|
|||
}
|
||||
|
||||
void func_80B828E4(BgDblueBalance* this, PlayState* play) {
|
||||
if (Flags_GetSwitch(play, BGDBLUEBALANCE_GET_7F(&this->dyna.actor)) && (this->unk_17D <= 0)) {
|
||||
if (Flags_GetSwitch(play, BGDBLUEBALANCE_GET_SWITCH_FLAG(&this->dyna.actor)) && (this->unk_17D <= 0)) {
|
||||
if (this->unk_183 >= 252) {
|
||||
this->unk_183 = 255;
|
||||
} else {
|
||||
|
@ -306,7 +306,7 @@ void BgDblueBalance_Init(Actor* thisx, PlayState* play) {
|
|||
BgDblueBalance* this = THIS;
|
||||
s32 sp2C = BGDBLUEBALANCE_GET_300(&this->dyna.actor);
|
||||
s32 pad2;
|
||||
s32 sp24 = Flags_GetSwitch(play, BGDBLUEBALANCE_GET_7F(&this->dyna.actor));
|
||||
s32 isSwitchFlagSet = Flags_GetSwitch(play, BGDBLUEBALANCE_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
|
||||
|
@ -326,7 +326,7 @@ void BgDblueBalance_Init(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if (sp2C == 0) {
|
||||
if (sp24 != 0) {
|
||||
if (isSwitchFlagSet) {
|
||||
this->dyna.actor.shape.rot.z = -0x1C72;
|
||||
this->unk_174 = -0x1C72;
|
||||
} else {
|
||||
|
@ -337,9 +337,9 @@ void BgDblueBalance_Init(Actor* thisx, PlayState* play) {
|
|||
func_80B8259C(this, play);
|
||||
func_80B82DC4(this);
|
||||
} else if (sp2C == 3) {
|
||||
this->unk_16C = sp24;
|
||||
this->unk_170 = sp24;
|
||||
if (sp24 != 0) {
|
||||
this->isSwitchFlagSet2 = isSwitchFlagSet;
|
||||
this->isSwitchFlagSet = isSwitchFlagSet;
|
||||
if (isSwitchFlagSet) {
|
||||
func_80B83344(this);
|
||||
} else {
|
||||
this->unk_178 = 0x1F4;
|
||||
|
@ -396,7 +396,7 @@ void func_80B82DE0(BgDblueBalance* this, PlayState* play) {
|
|||
BgDblueBalance* sp3C;
|
||||
Vec3f sp30;
|
||||
|
||||
if (Flags_GetSwitch(play, BGDBLUEBALANCE_GET_7F(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BGDBLUEBALANCE_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
if (this->unk_17D > 0) {
|
||||
this->unk_17D--;
|
||||
} else {
|
||||
|
@ -555,7 +555,7 @@ void func_80B83344(BgDblueBalance* this) {
|
|||
}
|
||||
|
||||
void func_80B8335C(BgDblueBalance* this, PlayState* play) {
|
||||
if (!Flags_GetSwitch(play, BGDBLUEBALANCE_GET_7F(&this->dyna.actor))) {
|
||||
if (!Flags_GetSwitch(play, BGDBLUEBALANCE_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
this->unk_178 = -0x14;
|
||||
func_80B833A8(this);
|
||||
}
|
||||
|
@ -573,8 +573,8 @@ void func_80B833C4(BgDblueBalance* this, PlayState* play) {
|
|||
s16 sp26;
|
||||
s16 sp24;
|
||||
|
||||
if (this->unk_170 != 0) {
|
||||
if ((this->unk_16C == 0) && (this->unk_17F == 0)) {
|
||||
if (this->isSwitchFlagSet) {
|
||||
if (!this->isSwitchFlagSet2 && (this->unk_17F == 0)) {
|
||||
this->unk_17F = 1;
|
||||
}
|
||||
|
||||
|
@ -590,9 +590,11 @@ void func_80B833C4(BgDblueBalance* this, PlayState* play) {
|
|||
sp26 = this->dyna.actor.shape.rot.x;
|
||||
this->dyna.actor.shape.rot.x += this->unk_178;
|
||||
sp24 = this->dyna.actor.shape.rot.x;
|
||||
|
||||
//! FAKE:
|
||||
if (sp24) {}
|
||||
|
||||
if (this->unk_170 != 0) {
|
||||
if (this->isSwitchFlagSet) {
|
||||
if (this->unk_186 != 0) {
|
||||
if (func_80B82B00(sp26, sp24, this->unk_184)) {
|
||||
sp28 = true;
|
||||
|
@ -619,7 +621,7 @@ void func_80B833C4(BgDblueBalance* this, PlayState* play) {
|
|||
void func_80B83518(Actor* thisx, PlayState* play) {
|
||||
BgDblueBalance* this = THIS;
|
||||
|
||||
this->unk_170 = Flags_GetSwitch(play, BGDBLUEBALANCE_GET_7F(&this->dyna.actor));
|
||||
this->isSwitchFlagSet = Flags_GetSwitch(play, BGDBLUEBALANCE_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
|
||||
this->actionFunc(this, play);
|
||||
|
||||
|
@ -638,7 +640,7 @@ void func_80B83518(Actor* thisx, PlayState* play) {
|
|||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
this->unk_16C = this->unk_170;
|
||||
this->isSwitchFlagSet2 = this->isSwitchFlagSet;
|
||||
}
|
||||
|
||||
void BgDblueBalance_Draw(Actor* thisx, PlayState* play) {
|
||||
|
|
|
@ -7,7 +7,7 @@ struct BgDblueBalance;
|
|||
|
||||
typedef void (*BgDblueBalanceActionFunc)(struct BgDblueBalance*, PlayState*);
|
||||
|
||||
#define BGDBLUEBALANCE_GET_7F(thisx) ((thisx)->params & 0x7F)
|
||||
#define BGDBLUEBALANCE_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define BGDBLUEBALANCE_GET_300(thisx) (((thisx)->params >> 8) & 3)
|
||||
|
||||
typedef struct {
|
||||
|
@ -23,8 +23,8 @@ typedef struct BgDblueBalance {
|
|||
/* 0x160 */ struct BgDblueBalance* unk_160;
|
||||
/* 0x164 */ struct BgDblueBalance* unk_164;
|
||||
/* 0x168 */ BgDblueBalanceActionFunc actionFunc;
|
||||
/* 0x16C */ s32 unk_16C;
|
||||
/* 0x170 */ s32 unk_170;
|
||||
/* 0x16C */ s32 isSwitchFlagSet2;
|
||||
/* 0x170 */ s32 isSwitchFlagSet;
|
||||
/* 0x174 */ s16 unk_174;
|
||||
/* 0x176 */ s16 unk_176;
|
||||
/* 0x178 */ s16 unk_178;
|
||||
|
|
|
@ -108,22 +108,22 @@ static InitChainEntry sInitChain[] = {
|
|||
|
||||
Vec3f D_80A2B988 = { 1785.0f, 0.0f, 220.0f };
|
||||
|
||||
s32 func_80A29A80(PlayState* play, s32 arg1, s32 arg2) {
|
||||
s32 func_80A29A80(PlayState* play, s32 switchFlagBase, s32 arg2) {
|
||||
s32 sp2C = 1;
|
||||
s32 val;
|
||||
s32 switchFlagOffset;
|
||||
s32 val2;
|
||||
|
||||
if (arg2 < 14) {
|
||||
val = D_80A2B870[arg2][0];
|
||||
switchFlagOffset = D_80A2B870[arg2][0];
|
||||
val2 = D_80A2B870[arg2][1];
|
||||
|
||||
while (val--) {
|
||||
if ((1 << val) & val2) {
|
||||
if (!Flags_GetSwitch(play, arg1 + val)) {
|
||||
while (switchFlagOffset--) {
|
||||
if ((1 << switchFlagOffset) & val2) {
|
||||
if (!Flags_GetSwitch(play, switchFlagBase + switchFlagOffset)) {
|
||||
sp2C = 0;
|
||||
break;
|
||||
}
|
||||
} else if (Flags_GetSwitch(play, arg1 + val)) {
|
||||
} else if (Flags_GetSwitch(play, switchFlagBase + switchFlagOffset)) {
|
||||
sp2C = 0;
|
||||
break;
|
||||
}
|
||||
|
@ -132,20 +132,20 @@ s32 func_80A29A80(PlayState* play, s32 arg1, s32 arg2) {
|
|||
sp2C = 0;
|
||||
switch (arg2) {
|
||||
case 14:
|
||||
if (!Flags_GetSwitch(play, arg1)) {
|
||||
if (!Flags_GetSwitch(play, switchFlagBase)) {
|
||||
sp2C = 1;
|
||||
}
|
||||
|
||||
if (Flags_GetSwitch(play, arg1 + 1) && Flags_GetSwitch(play, arg1 + 2) &&
|
||||
Flags_GetSwitch(play, arg1 + 3)) {
|
||||
if (Flags_GetSwitch(play, switchFlagBase + 1) && Flags_GetSwitch(play, switchFlagBase + 2) &&
|
||||
Flags_GetSwitch(play, switchFlagBase + 3)) {
|
||||
sp2C += 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case 15:
|
||||
if (!Flags_GetSwitch(play, arg1) ||
|
||||
(Flags_GetSwitch(play, arg1 + 1) && Flags_GetSwitch(play, arg1 + 2) &&
|
||||
Flags_GetSwitch(play, arg1 + 3))) {
|
||||
if (!Flags_GetSwitch(play, switchFlagBase) ||
|
||||
(Flags_GetSwitch(play, switchFlagBase + 1) && Flags_GetSwitch(play, switchFlagBase + 2) &&
|
||||
Flags_GetSwitch(play, switchFlagBase + 3))) {
|
||||
sp2C = 1;
|
||||
}
|
||||
break;
|
||||
|
@ -162,7 +162,7 @@ void BgDblueMovebg_Init(Actor* thisx, PlayState* play) {
|
|||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
this->unk_160 = BGDBLUEMOVEBG_GET_F(thisx);
|
||||
this->unk_1BC = BGDBLUEMOVEBG_GET_F000(thisx);
|
||||
this->unk_1C0 = BGDBLUEMOVEBG_GET_FF0(thisx);
|
||||
this->switchFlag = BGDBLUEMOVEBG_GET_SWITCH_FLAG(thisx);
|
||||
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
|
||||
|
||||
if ((this->unk_160 == 9) || (this->unk_160 == 8)) {
|
||||
|
@ -214,7 +214,7 @@ void BgDblueMovebg_Init(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
this->unk_17E = 0;
|
||||
this->unk_184 = 0.0f;
|
||||
if (Flags_GetSwitch(play, this->unk_1C0)) {
|
||||
if (Flags_GetSwitch(play, this->switchFlag)) {
|
||||
this->unk_18C = 0x384;
|
||||
} else {
|
||||
this->unk_18C = 0;
|
||||
|
@ -224,7 +224,7 @@ void BgDblueMovebg_Init(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
|
||||
case 6:
|
||||
this->unk_178 = func_80A29A80(play, this->unk_1C0, this->unk_1BC);
|
||||
this->unk_178 = func_80A29A80(play, this->switchFlag, this->unk_1BC);
|
||||
this->unk_1CC = D_80A2B96C[this->unk_178];
|
||||
this->unk_1CE = this->unk_1CC;
|
||||
this->actionFunc = func_80A2A1E0;
|
||||
|
@ -237,7 +237,7 @@ void BgDblueMovebg_Init(Actor* thisx, PlayState* play) {
|
|||
this->dyna.actor.shape.rot.x = 0;
|
||||
this->dyna.actor.world.rot.z = 0;
|
||||
this->dyna.actor.shape.rot.z = 0;
|
||||
if (Flags_GetSwitch(play, this->unk_1C0)) {
|
||||
if (Flags_GetSwitch(play, this->switchFlag)) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
break;
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ void BgDblueMovebg_Init(Actor* thisx, PlayState* play) {
|
|||
for (i = 0; i < ARRAY_COUNT(sCsIdList); i++) {
|
||||
sCsIdList[i] = this->csIdList[i];
|
||||
}
|
||||
this->unk_178 = func_80A29A80(play, this->unk_1C0, this->unk_1BC);
|
||||
this->unk_178 = func_80A29A80(play, this->switchFlag, this->unk_1BC);
|
||||
this->unk_1CC = D_80A2B96C[this->unk_178];
|
||||
this->unk_1CE = this->unk_1CC;
|
||||
Matrix_RotateYS(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
|
@ -275,7 +275,7 @@ void BgDblueMovebg_Init(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
|
||||
case 11:
|
||||
this->unk_1CC = D_80A2B96C[func_80A29A80(play, this->unk_1C0, this->unk_1BC)];
|
||||
this->unk_1CC = D_80A2B96C[func_80A29A80(play, this->switchFlag, this->unk_1BC)];
|
||||
D_80A2BBF0 = this;
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_20;
|
||||
this->dyna.actor.update = Actor_Noop;
|
||||
|
@ -314,7 +314,7 @@ void func_80A2A128(BgDblueMovebg* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80A2A1E0(BgDblueMovebg* this, PlayState* play) {
|
||||
s32 temp_v0 = func_80A29A80(play, this->unk_1C0, this->unk_1BC);
|
||||
s32 temp_v0 = func_80A29A80(play, this->switchFlag, this->unk_1BC);
|
||||
|
||||
if (temp_v0 != this->unk_178) {
|
||||
switch (temp_v0) {
|
||||
|
@ -422,7 +422,7 @@ void func_80A2A444(BgDblueMovebg* this, PlayState* play) {
|
|||
if (sp20) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_10;
|
||||
this->dyna.pushForce = 0.0f;
|
||||
Flags_SetSwitch(play, this->unk_1C0);
|
||||
Flags_SetSwitch(play, this->switchFlag);
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP);
|
||||
|
||||
if (func_80A29A80(play, this->unk_1C8, this->unk_1C4)) {
|
||||
|
@ -510,9 +510,9 @@ void func_80A2A7F8(BgDblueMovebg* this, PlayState* play) {
|
|||
temp = (this->unk_18C + sp26 + 3600) % 3600;
|
||||
|
||||
if ((temp == 900) || (temp == 2700)) {
|
||||
Flags_SetSwitch(play, this->unk_1C0);
|
||||
Flags_SetSwitch(play, this->switchFlag);
|
||||
} else {
|
||||
Flags_UnsetSwitch(play, this->unk_1C0);
|
||||
Flags_UnsetSwitch(play, this->switchFlag);
|
||||
}
|
||||
|
||||
player->stateFlags1 |= PLAYER_STATE1_20;
|
||||
|
@ -637,7 +637,7 @@ void func_80A2AED0(BgDblueMovebg* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
temp_v0_3 = func_80A29A80(play, this->unk_1C0, this->unk_1BC);
|
||||
temp_v0_3 = func_80A29A80(play, this->switchFlag, this->unk_1BC);
|
||||
if (temp_v0_3 != this->unk_178) {
|
||||
switch (temp_v0_3) {
|
||||
case 1:
|
||||
|
@ -704,7 +704,7 @@ void func_80A2AED0(BgDblueMovebg* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80A2B1A0(BgDblueMovebg* this, PlayState* play) {
|
||||
switch (func_80A29A80(play, this->unk_1C0, this->unk_1BC)) {
|
||||
switch (func_80A29A80(play, this->switchFlag, this->unk_1BC)) {
|
||||
case 1:
|
||||
this->dyna.actor.shape.rot.z = this->dyna.actor.home.rot.z;
|
||||
break;
|
||||
|
@ -736,7 +736,7 @@ void func_80A2B274(Actor* thisx, PlayState* play) {
|
|||
return;
|
||||
}
|
||||
|
||||
temp_v1 = D_80A2B96C[func_80A29A80(play, this->unk_1C0, this->unk_1BC)];
|
||||
temp_v1 = D_80A2B96C[func_80A29A80(play, this->switchFlag, this->unk_1BC)];
|
||||
if (temp_v1 != 0) {
|
||||
if (temp_v1 > 0) {
|
||||
Audio_PlaySfx_WaterWheel(&this->dyna.actor.projectedPos, NA_SE_EV_DUMMY_WATER_WHEEL_RR - SFX_FLAG);
|
||||
|
|
|
@ -8,7 +8,7 @@ struct BgDblueMovebg;
|
|||
typedef void (*BgDblueMovebgActionFunc)(struct BgDblueMovebg*, PlayState*);
|
||||
|
||||
#define BGDBLUEMOVEBG_GET_F(thisx) ((thisx)->params & 0xF)
|
||||
#define BGDBLUEMOVEBG_GET_FF0(thisx) (((thisx)->params >> 4) & 0xFF)
|
||||
#define BGDBLUEMOVEBG_GET_SWITCH_FLAG(thisx) (((thisx)->params >> 4) & 0xFF)
|
||||
#define BGDBLUEMOVEBG_GET_F000(thisx) (((thisx)->params >> 0xC) & 0xF)
|
||||
|
||||
#define BGDBLUEMOVEBG_F_8 8
|
||||
|
@ -39,7 +39,7 @@ typedef struct BgDblueMovebg {
|
|||
/* 0x1B4 */ UNK_TYPE1 unk1B4[2];
|
||||
/* 0x1B6 */ s16 csIdList[2];
|
||||
/* 0x1BC */ s32 unk_1BC;
|
||||
/* 0x1C0 */ s32 unk_1C0;
|
||||
/* 0x1C0 */ s32 switchFlag;
|
||||
/* 0x1C4 */ s32 unk_1C4;
|
||||
/* 0x1C8 */ s32 unk_1C8;
|
||||
/* 0x1CC */ s16 unk_1CC;
|
||||
|
|
|
@ -80,7 +80,7 @@ s32 func_80B83D04(BgDblueWaterfall* this, PlayState* play) {
|
|||
s32 phi_v1;
|
||||
s32 sp18 = BGDBLUEWATERFALL_GET_100(&this->actor);
|
||||
|
||||
if (Flags_GetSwitch(play, BGDBLUEWATERFALL_GET_7F(&this->actor))) {
|
||||
if (Flags_GetSwitch(play, BGDBLUEWATERFALL_GET_SWITCH_FLAG(&this->actor))) {
|
||||
phi_v1 = true;
|
||||
} else {
|
||||
phi_v1 = false;
|
||||
|
@ -91,7 +91,7 @@ s32 func_80B83D04(BgDblueWaterfall* this, PlayState* play) {
|
|||
s32 func_80B83D58(Actor* thisx, PlayState* play) {
|
||||
BgDblueWaterfall* this = THIS;
|
||||
|
||||
if (Flags_GetSwitch(play, BGDBLUEWATERFALL_GET_7F(&this->actor))) {
|
||||
if (Flags_GetSwitch(play, BGDBLUEWATERFALL_GET_SWITCH_FLAG(&this->actor))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -99,11 +99,11 @@ s32 func_80B83D58(Actor* thisx, PlayState* play) {
|
|||
|
||||
void func_80B83D94(BgDblueWaterfall* this, PlayState* play) {
|
||||
s32 pad;
|
||||
s32 sp20 = BGDBLUEWATERFALL_GET_7F(&this->actor);
|
||||
s32 switchFlag = BGDBLUEWATERFALL_GET_SWITCH_FLAG(&this->actor);
|
||||
s32 sp1C = BGDBLUEWATERFALL_GET_100(&this->actor);
|
||||
s32 phi_v0;
|
||||
|
||||
if (Flags_GetSwitch(play, sp20)) {
|
||||
if (Flags_GetSwitch(play, switchFlag)) {
|
||||
phi_v0 = true;
|
||||
} else {
|
||||
phi_v0 = false;
|
||||
|
@ -111,20 +111,20 @@ void func_80B83D94(BgDblueWaterfall* this, PlayState* play) {
|
|||
|
||||
if (phi_v0 != sp1C) {
|
||||
if (phi_v0) {
|
||||
Flags_UnsetSwitch(play, sp20);
|
||||
Flags_UnsetSwitch(play, switchFlag);
|
||||
} else {
|
||||
Flags_SetSwitch(play, sp20);
|
||||
Flags_SetSwitch(play, switchFlag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80B83E1C(BgDblueWaterfall* this, PlayState* play) {
|
||||
s32 pad;
|
||||
s32 sp20 = BGDBLUEWATERFALL_GET_7F(&this->actor);
|
||||
s32 switchFlag = BGDBLUEWATERFALL_GET_SWITCH_FLAG(&this->actor);
|
||||
s32 sp1C = BGDBLUEWATERFALL_GET_100(&this->actor);
|
||||
s32 phi_v0;
|
||||
|
||||
if (Flags_GetSwitch(play, sp20)) {
|
||||
if (Flags_GetSwitch(play, switchFlag)) {
|
||||
phi_v0 = true;
|
||||
} else {
|
||||
phi_v0 = false;
|
||||
|
@ -132,9 +132,9 @@ void func_80B83E1C(BgDblueWaterfall* this, PlayState* play) {
|
|||
|
||||
if (phi_v0 == sp1C) {
|
||||
if (phi_v0) {
|
||||
Flags_UnsetSwitch(play, sp20);
|
||||
Flags_UnsetSwitch(play, switchFlag);
|
||||
} else {
|
||||
Flags_SetSwitch(play, sp20);
|
||||
Flags_SetSwitch(play, switchFlag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ struct BgDblueWaterfall;
|
|||
|
||||
typedef void (*BgDblueWaterfallActionFunc)(struct BgDblueWaterfall*, PlayState*);
|
||||
|
||||
#define BGDBLUEWATERFALL_GET_7F(thisx) ((thisx)->params & 0x7F)
|
||||
#define BGDBLUEWATERFALL_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define BGDBLUEWATERFALL_GET_100(thisx) (((thisx)->params >> 8) & 1)
|
||||
|
||||
typedef struct BgDblueWaterfall {
|
||||
|
|
|
@ -120,15 +120,16 @@ void BgDkjailIvy_Init(Actor* thisx, PlayState* play) {
|
|||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
|
||||
if (Flags_GetSwitch(play, BG_DKJAIL_GET_SWITCH(thisx))) {
|
||||
if (Flags_GetSwitch(play, BG_DKJAIL_GET_SWITCH_FLAG(thisx))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
} else {
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, &gDkjailCol);
|
||||
Collider_SetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
|
||||
this->alpha = 255;
|
||||
BgDkjailIvy_SetupWaitForCut(this);
|
||||
return;
|
||||
}
|
||||
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, &gDkjailCol);
|
||||
Collider_SetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
|
||||
this->alpha = 255;
|
||||
BgDkjailIvy_SetupWaitForCut(this);
|
||||
}
|
||||
|
||||
void BgDkjailIvy_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
@ -162,7 +163,7 @@ void BgDkjailIvy_BeginCutscene(BgDkjailIvy* this, PlayState* play) {
|
|||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
this->fadeOutTimer = 50;
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
Flags_SetSwitch(play, BG_DKJAIL_GET_SWITCH(&this->dyna.actor));
|
||||
Flags_SetSwitch(play, BG_DKJAIL_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
BgDkjailIvy_IvyCutEffects(this, play);
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_GRASS_WALL_BROKEN);
|
||||
BgDkjailIvy_SetupFadeOut(this);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
#define BG_DKJAIL_GET_SWITCH(thisx) ((thisx)->params & 0x7F)
|
||||
#define BG_DKJAIL_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
|
||||
struct BgDkjailIvy;
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ void BgF40Block_Init(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->path != NULL) {
|
||||
if (Flags_GetSwitch(play, BGF40BLOCK_GET_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BGF40BLOCK_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
this->actionFunc = func_80BC4530;
|
||||
this->dyna.actor.speed = 40.0f;
|
||||
func_80BC3A2C(this, play);
|
||||
|
@ -261,7 +261,7 @@ void BgF40Block_Destroy(Actor* thisx, PlayState* play) {
|
|||
|
||||
void func_80BC41AC(BgF40Block* this, PlayState* play) {
|
||||
if (func_80BC3D08(this, play, 1)) {
|
||||
if (!Flags_GetSwitch(play, BGF40BLOCK_GET_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if (!Flags_GetSwitch(play, BGF40BLOCK_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
func_80BC4038(this);
|
||||
this->actionFunc = func_80BC44F4;
|
||||
}
|
||||
|
@ -314,14 +314,14 @@ void func_80BC4344(BgF40Block* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80BC4380(BgF40Block* this, PlayState* play) {
|
||||
if (Flags_GetSwitch(play, BGF40BLOCK_GET_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BGF40BLOCK_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
this->actionFunc = func_80BC4344;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BC43CC(BgF40Block* this, PlayState* play) {
|
||||
if (func_80BC3D08(this, play, 1)) {
|
||||
if (Flags_GetSwitch(play, BGF40BLOCK_GET_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BGF40BLOCK_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
func_80BC4038(this);
|
||||
this->actionFunc = func_80BC4344;
|
||||
}
|
||||
|
@ -356,7 +356,7 @@ void func_80BC44F4(BgF40Block* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80BC4530(BgF40Block* this, PlayState* play) {
|
||||
if (!Flags_GetSwitch(play, BGF40BLOCK_GET_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if (!Flags_GetSwitch(play, BGF40BLOCK_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
this->actionFunc = func_80BC44F4;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ struct BgF40Block;
|
|||
typedef void (*BgF40BlockActionFunc)(struct BgF40Block*, PlayState*);
|
||||
|
||||
#define BGF40BLOCK_GET_PATH_INDEX(thisx) (((thisx)->params & 0x1FC) >> 2)
|
||||
#define BGF40BLOCK_GET_SWITCHFLAG(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
#define BGF40BLOCK_GET_SWITCH_FLAG(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
|
||||
#define BGF40BLOCK_PATH_INDEX_NONE 0x3F
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ void BgF40Switch_CheckAll(BgF40Switch* this, PlayState* play) {
|
|||
actorAsSwitch->isPressed = isPressed;
|
||||
}
|
||||
if (actorAsSwitch->isPressed) {
|
||||
switchFlag = BGF40SWITCH_GET_SWITCHFLAG(&actorAsSwitch->dyna.actor);
|
||||
switchFlag = BGF40SWITCH_GET_SWITCH_FLAG(&actorAsSwitch->dyna.actor);
|
||||
if ((switchFlag >= 0) && (switchFlag < 0x80)) {
|
||||
pressedSwitchFlags[(switchFlag & ~0x1F) >> 5] |= 1 << (switchFlag & 0x1F);
|
||||
if (!actorAsSwitch->wasPressed && (actorAsSwitch->actionFunc == BgF40Switch_IdleUnpressed) &&
|
||||
|
@ -87,7 +87,7 @@ void BgF40Switch_CheckAll(BgF40Switch* this, PlayState* play) {
|
|||
for (actor = play->actorCtx.actorLists[ACTORCAT_SWITCH].first; actor != NULL; actor = actor->next) {
|
||||
if ((actor->id == ACTOR_BG_F40_SWITCH) && (actor->room == this->dyna.actor.room) &&
|
||||
(actor->update != NULL)) {
|
||||
switchFlag = BGF40SWITCH_GET_SWITCHFLAG(actor);
|
||||
switchFlag = BGF40SWITCH_GET_SWITCH_FLAG(actor);
|
||||
if ((switchFlag >= 0) && (switchFlag < 0x80) && Flags_GetSwitch(play, switchFlag) &&
|
||||
!(pressedSwitchFlags[(switchFlag & ~0x1F) >> 5] & (1 << (switchFlag & 0x1F)))) {
|
||||
Flags_UnsetSwitch(play, switchFlag);
|
||||
|
@ -160,13 +160,13 @@ void BgF40Switch_WaitToPress(BgF40Switch* this, PlayState* play) {
|
|||
if (!this->isInitiator || (this->dyna.actor.csId == CS_ID_NONE)) {
|
||||
this->actionFunc = BgF40Switch_Press;
|
||||
if (this->isInitiator) {
|
||||
Flags_SetSwitch(play, BGF40SWITCH_GET_SWITCHFLAG(&this->dyna.actor));
|
||||
Flags_SetSwitch(play, BGF40SWITCH_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
}
|
||||
} else if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
this->actionFunc = BgF40Switch_Press;
|
||||
if (this->isInitiator) {
|
||||
Flags_SetSwitch(play, BGF40SWITCH_GET_SWITCHFLAG(&this->dyna.actor));
|
||||
Flags_SetSwitch(play, BGF40SWITCH_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
}
|
||||
} else {
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
struct BgF40Switch;
|
||||
|
||||
#define BGF40SWITCH_GET_SWITCHFLAG(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
#define BGF40SWITCH_GET_SWITCH_FLAG(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
|
||||
typedef void (*BgF40SwitchActionFunc)(struct BgF40Switch*, PlayState*);
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ void BgF40Swlift_Init(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
sHeights[index] = this->dyna.actor.world.pos.y;
|
||||
sSwitchFlags[index] = BG_F40_SWLIFT_GET_SWITCHFLAG(thisx);
|
||||
sSwitchFlags[index] = BG_F40_SWLIFT_GET_SWITCH_FLAG(thisx);
|
||||
if (index != 0) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef Z_BG_F40_SWLIFT_H
|
||||
#define Z_BG_F40_SWLIFT_H
|
||||
|
||||
#define BG_F40_SWLIFT_GET_SWITCHFLAG(thisx) ((thisx)->params & 0xFF)
|
||||
#define BG_F40_SWLIFT_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0xFF)
|
||||
#define BG_F40_SWLIFT_GET_INDEX(thisx) (((thisx)->params >> 8) & 0xFF)
|
||||
|
||||
#include "global.h"
|
||||
|
|
|
@ -160,14 +160,15 @@ void BgHakaBombwall_Init(Actor* thisx, PlayState* play) {
|
|||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
if (Flags_GetSwitch(play, BGHAKABOMBWALL_GET_7F(thisx))) {
|
||||
if (Flags_GetSwitch(play, BGHAKABOMBWALL_GET_SWITCH_FLAG(thisx))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
} else {
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, &object_haka_obj_Colheader_000148);
|
||||
Collider_SetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
|
||||
func_80BD6260(this);
|
||||
return;
|
||||
}
|
||||
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, &object_haka_obj_Colheader_000148);
|
||||
Collider_SetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
|
||||
func_80BD6260(this);
|
||||
}
|
||||
|
||||
void BgHakaBombwall_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
@ -200,7 +201,7 @@ void BgHakaBombwall_PlayCutscene(BgHakaBombwall* this, PlayState* play) {
|
|||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
func_80BD5E6C(this, play);
|
||||
this->dyna.actor.draw = NULL;
|
||||
Flags_SetSwitch(play, BGHAKABOMBWALL_GET_7F(&this->dyna.actor));
|
||||
Flags_SetSwitch(play, BGHAKABOMBWALL_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 0x3C, NA_SE_EV_WALL_BROKEN);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
BgHakaBombwall_SetupEndCutscene(this);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
#define BGHAKABOMBWALL_GET_7F(thisx) ((thisx)->params & 0x7F)
|
||||
#define BGHAKABOMBWALL_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
|
||||
struct BgHakaBombwall;
|
||||
|
||||
|
|
|
@ -316,7 +316,7 @@ void BgHakuginBombwall_Init(Actor* thisx, PlayState* play) {
|
|||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
|
||||
if (Flags_GetSwitch(play, BGHAKUGIN_BOMBWALL_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BGHAKUGIN_BOMBWALL_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
|
@ -400,7 +400,7 @@ void func_80ABCD98(BgHakuginBombwall* this, PlayState* play) {
|
|||
ptr->unk_24(this, play);
|
||||
this->dyna.actor.draw = NULL;
|
||||
this->unk_1AC = 20;
|
||||
Flags_SetSwitch(play, BGHAKUGIN_BOMBWALL_SWITCHFLAG(&this->dyna.actor));
|
||||
Flags_SetSwitch(play, BGHAKUGIN_BOMBWALL_SWITCH_FLAG(&this->dyna.actor));
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->actionFunc = func_80ABCE60;
|
||||
} else {
|
||||
|
|
|
@ -9,7 +9,7 @@ typedef void (*BgHakuginBombwallActionFunc)(struct BgHakuginBombwall*, PlayState
|
|||
typedef s32 (*BgHakuginBombwallUnkFunc)(struct BgHakuginBombwall*, PlayState*);
|
||||
typedef void (*BgHakuginBombwallUnkFunc2)(struct BgHakuginBombwall*, PlayState*);
|
||||
|
||||
#define BGHAKUGIN_BOMBWALL_SWITCHFLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define BGHAKUGIN_BOMBWALL_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define BGHAKUGIN_BOMBWALL_100(thisx) (((thisx)->params >> 8) & 1)
|
||||
|
||||
typedef struct BgHakuginBombwall {
|
||||
|
|
|
@ -42,8 +42,8 @@ void BgHakuginElvpole_Init(Actor* thisx, PlayState* play) {
|
|||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
this->unk_15C = 0;
|
||||
this->unk_160 = false;
|
||||
if ((BGHAKUGINELVPOLE_GET_SWITCHFLAG(&this->dyna.actor) != 0x7F) &&
|
||||
Flags_GetSwitch(play, BGHAKUGINELVPOLE_GET_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if ((BGHAKUGINELVPOLE_GET_SWITCH_FLAG(&this->dyna.actor) != 0x7F) &&
|
||||
Flags_GetSwitch(play, BGHAKUGINELVPOLE_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
this->unk_15E = 0x64;
|
||||
} else {
|
||||
this->unk_15E = -1;
|
||||
|
@ -81,12 +81,12 @@ void func_80ABD92C(BgHakuginElvpole* this, PlayState* play) {
|
|||
sp28 = true;
|
||||
} else {
|
||||
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 320.0f;
|
||||
Flags_UnsetSwitch(play, BGHAKUGINELVPOLE_GET_SWITCHFLAG(&this->dyna.actor));
|
||||
Flags_UnsetSwitch(play, BGHAKUGINELVPOLE_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
this->unk_15E = -1;
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP);
|
||||
}
|
||||
} else if ((BGHAKUGINELVPOLE_GET_SWITCHFLAG(&this->dyna.actor) != 0x7F) &&
|
||||
Flags_GetSwitch(play, BGHAKUGINELVPOLE_GET_SWITCHFLAG(&this->dyna.actor))) {
|
||||
} else if ((BGHAKUGINELVPOLE_GET_SWITCH_FLAG(&this->dyna.actor) != 0x7F) &&
|
||||
Flags_GetSwitch(play, BGHAKUGINELVPOLE_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
this->unk_15E = 0x64;
|
||||
this->unk_160 = true;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
struct BgHakuginElvpole;
|
||||
|
||||
#define BGHAKUGINELVPOLE_GET_SWITCHFLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define BGHAKUGINELVPOLE_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
|
||||
typedef void (*BgHakuginElvpoleActionFunc)(struct BgHakuginElvpole*, PlayState*);
|
||||
|
||||
|
|
|
@ -155,9 +155,9 @@ void func_80A9AFB4(BgHakuginPost* this, PlayState* play, BgHakuginPostUnkStruct*
|
|||
unkStruct->unk_0000[i].unk_00 = BGHAKUGINPOST_GET_7(&this->dyna.actor);
|
||||
Math_Vec3f_Copy(&unkStruct->unk_0000[i].unk_08, &this->dyna.actor.world.pos);
|
||||
Math_Vec3f_Copy(&unkStruct->unk_0000[i].unk_14, &this->dyna.actor.world.pos);
|
||||
unkStruct->unk_0000[i].unk_2E = BGHAKUGINPOST_GET_7F00(&this->dyna.actor);
|
||||
unkStruct->unk_0000[i].switchFlag = BGHAKUGINPOST_GET_SWITCH_FLAG(&this->dyna.actor);
|
||||
if (D_80A9D880[unkStruct->unk_0000[i].unk_00].unk_04) {
|
||||
if (Flags_GetSwitch(play, unkStruct->unk_0000[i].unk_2E)) {
|
||||
if (Flags_GetSwitch(play, unkStruct->unk_0000[i].switchFlag)) {
|
||||
unkStruct->unk_0000[i].unk_34 = 5;
|
||||
} else {
|
||||
unkStruct->unk_0000[i].unk_34 = 1;
|
||||
|
@ -184,7 +184,7 @@ void func_80A9B160(BgHakuginPostUnkStruct* unkStruct, PlayState* play) {
|
|||
unkStruct->unk_0000[i].unk_24 = 0.0f;
|
||||
unkStruct->unk_0000[i].unk_34 = 1;
|
||||
if (D_80A9D880[unkStruct->unk_0000[i].unk_00].unk_04 != 0) {
|
||||
Flags_UnsetSwitch(play, unkStruct->unk_0000[i].unk_2E);
|
||||
Flags_UnsetSwitch(play, unkStruct->unk_0000[i].switchFlag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -240,25 +240,25 @@ void func_80A9B384(Vec3f* arg0) {
|
|||
|
||||
void func_80A9B3BC(BgHakuginPost* this, PlayState* play) {
|
||||
s32 pad;
|
||||
s32 sp28 = BGHAKUGINPOST_GET_7F00(&this->dyna.actor);
|
||||
s32 sp24 = BGHAKUGINPOST_GET_7F00(&this->dyna.actor) + 1;
|
||||
s32 switchFlag1 = BGHAKUGINPOST_GET_SWITCH_FLAG(&this->dyna.actor);
|
||||
s32 switchFlag2 = BGHAKUGINPOST_GET_SWITCH_FLAG(&this->dyna.actor) + 1;
|
||||
s32 sp20;
|
||||
s32 sp1C;
|
||||
|
||||
if (Flags_GetSwitch(play, sp28)) {
|
||||
if (Flags_GetSwitch(play, switchFlag1)) {
|
||||
sp20 = true;
|
||||
} else {
|
||||
sp20 = false;
|
||||
}
|
||||
|
||||
if (Flags_GetSwitch(play, sp24)) {
|
||||
if (Flags_GetSwitch(play, switchFlag2)) {
|
||||
sp1C = true;
|
||||
} else {
|
||||
sp1C = false;
|
||||
}
|
||||
|
||||
if (!(sp20 | sp1C)) {
|
||||
Flags_SetSwitch(play, sp28);
|
||||
Flags_SetSwitch(play, switchFlag1);
|
||||
this->unk_170 = true;
|
||||
} else {
|
||||
this->unk_170 = sp20;
|
||||
|
@ -269,27 +269,27 @@ void func_80A9B3BC(BgHakuginPost* this, PlayState* play) {
|
|||
|
||||
void func_80A9B46C(BgHakuginPost* this, PlayState* play) {
|
||||
s32 pad;
|
||||
s32 sp30 = BGHAKUGINPOST_GET_7F00(&this->dyna.actor);
|
||||
s32 sp2C = BGHAKUGINPOST_GET_7F00(&this->dyna.actor) + 1;
|
||||
s32 switchFlag1 = BGHAKUGINPOST_GET_SWITCH_FLAG(&this->dyna.actor);
|
||||
s32 switchFlag2 = BGHAKUGINPOST_GET_SWITCH_FLAG(&this->dyna.actor) + 1;
|
||||
s32 sp28;
|
||||
s32 sp24;
|
||||
|
||||
if (Flags_GetSwitch(play, sp30)) {
|
||||
if (Flags_GetSwitch(play, switchFlag1)) {
|
||||
sp28 = true;
|
||||
} else {
|
||||
sp28 = false;
|
||||
}
|
||||
|
||||
if (Flags_GetSwitch(play, sp2C)) {
|
||||
if (Flags_GetSwitch(play, switchFlag2)) {
|
||||
sp24 = true;
|
||||
} else {
|
||||
sp24 = false;
|
||||
}
|
||||
|
||||
if (!this->unk_170 && (sp28 == 1)) {
|
||||
Flags_UnsetSwitch(play, sp2C);
|
||||
Flags_UnsetSwitch(play, switchFlag2);
|
||||
} else if (!this->unk_174 && (sp24 == 1)) {
|
||||
Flags_UnsetSwitch(play, sp30);
|
||||
Flags_UnsetSwitch(play, switchFlag1);
|
||||
}
|
||||
|
||||
this->unk_170 = sp28;
|
||||
|
@ -668,7 +668,7 @@ void func_80A9C854(BgHakuginPost* this, PlayState* play) {
|
|||
for (i = 0; i < D_80A9E028.count; i++) {
|
||||
ColliderCylinder* collider = D_80A9E028.unk_0000[i].collider;
|
||||
|
||||
if ((collider != NULL) && Flags_GetSwitch(play, D_80A9E028.unk_0000[i].unk_2E)) {
|
||||
if ((collider != NULL) && Flags_GetSwitch(play, D_80A9E028.unk_0000[i].switchFlag)) {
|
||||
sp28 = false;
|
||||
break;
|
||||
}
|
||||
|
@ -681,9 +681,9 @@ void func_80A9C854(BgHakuginPost* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (sp38) {
|
||||
Flags_SetSwitch(play, this->dyna.actor.home.rot.x & 0x7F);
|
||||
Flags_SetSwitch(play, BGHAKUGINPOST_GET_SWITCH_FLAG_2(&this->dyna.actor));
|
||||
} else {
|
||||
Flags_UnsetSwitch(play, this->dyna.actor.home.rot.x & 0x7F);
|
||||
Flags_UnsetSwitch(play, BGHAKUGINPOST_GET_SWITCH_FLAG_2(&this->dyna.actor));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -841,7 +841,7 @@ void func_80A9CE1C(BgHakuginPost* this, PlayState* play) {
|
|||
D_80A9E028.unk_0000[i].unk_34 = 2;
|
||||
Player_PlaySfx(player, NA_SE_IT_HAMMER_HIT);
|
||||
Audio_PlaySfx_2(NA_SE_EV_SLIDE_DOOR_OPEN);
|
||||
Flags_SetSwitch(play, D_80A9E028.unk_0000[i].unk_2E);
|
||||
Flags_SetSwitch(play, D_80A9E028.unk_0000[i].switchFlag);
|
||||
this->unk_178 = 20;
|
||||
func_80A9D2C4(this, func_80A9CE00, D_80A9E028.unk_0000[i].unk_14.y + 50.0f, D_80A9E028.unk_0000[i].csId,
|
||||
D_80A9E028.unk_0000[i].additionalCsId);
|
||||
|
|
|
@ -9,7 +9,8 @@ typedef void (*BgHakuginPostActionFunc)(struct BgHakuginPost*, PlayState*);
|
|||
typedef void (*BgHakuginPostFunc)(struct BgHakuginPost*);
|
||||
|
||||
#define BGHAKUGINPOST_GET_7(thisx) ((thisx)->params & 7)
|
||||
#define BGHAKUGINPOST_GET_7F00(thisx) (((thisx)->params >> 8) & 0x7F)
|
||||
#define BGHAKUGINPOST_GET_SWITCH_FLAG(thisx) (((thisx)->params >> 8) & 0x7F)
|
||||
#define BGHAKUGINPOST_GET_SWITCH_FLAG_2(thisx) (((thisx)->home.rot.x) & 0x7F)
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 unk_00;
|
||||
|
@ -21,7 +22,7 @@ typedef struct {
|
|||
/* 0x28 */ s16 unk_28;
|
||||
/* 0x2A */ s16 csId;
|
||||
/* 0x2C */ s16 additionalCsId;
|
||||
/* 0x2E */ u8 unk_2E;
|
||||
/* 0x2E */ u8 switchFlag;
|
||||
/* 0x2F */ u8 unk_2F;
|
||||
/* 0x30 */ s8 unk_30;
|
||||
/* 0x34 */ s32 unk_34;
|
||||
|
|
|
@ -121,7 +121,7 @@ void BgHakuginSwitch_Init(Actor* thisx, PlayState* play) {
|
|||
s32 pad2;
|
||||
s32 sp28;
|
||||
|
||||
if (Flags_GetSwitch(play, BGHAKUGINSWITCH_GET_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BGHAKUGINSWITCH_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
sp30 = true;
|
||||
} else {
|
||||
sp30 = false;
|
||||
|
@ -228,7 +228,7 @@ void func_80B15B74(BgHakuginSwitch* this, PlayState* play) {
|
|||
s32 sp24;
|
||||
s32 sp20;
|
||||
|
||||
if (Flags_GetSwitch(play, BGHAKUGINSWITCH_GET_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BGHAKUGINSWITCH_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
sp2C = 1;
|
||||
} else {
|
||||
sp2C = 0;
|
||||
|
@ -274,9 +274,9 @@ void func_80B15B74(BgHakuginSwitch* this, PlayState* play) {
|
|||
|
||||
if (sp24) {
|
||||
if (sp20 == 1) {
|
||||
Flags_SetSwitch(play, BGHAKUGINSWITCH_GET_SWITCHFLAG(&this->dyna.actor));
|
||||
Flags_SetSwitch(play, BGHAKUGINSWITCH_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
} else if (sp20 == 0) {
|
||||
Flags_UnsetSwitch(play, BGHAKUGINSWITCH_GET_SWITCHFLAG(&this->dyna.actor));
|
||||
Flags_UnsetSwitch(play, BGHAKUGINSWITCH_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
}
|
||||
|
||||
D_80B16AF0 = play->gameplayFrames;
|
||||
|
@ -329,7 +329,7 @@ void func_80B15F88(BgHakuginSwitch* this, PlayState* play) {
|
|||
BgHakuginSwitchStruct* sp18 = &D_80B1688C[BGHAKUGINSWITCH_GET_7(&this->dyna.actor)];
|
||||
s32 phi_v1;
|
||||
|
||||
if (Flags_GetSwitch(play, BGHAKUGINSWITCH_GET_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BGHAKUGINSWITCH_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
phi_a0 = true;
|
||||
} else {
|
||||
phi_a0 = false;
|
||||
|
@ -384,9 +384,9 @@ void func_80B161A0(BgHakuginSwitch* this, PlayState* play) {
|
|||
if (CutsceneManager_IsNext(this->curCsId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->curCsId, &this->dyna.actor);
|
||||
if (this->unk_1BE != 0) {
|
||||
Flags_SetSwitch(play, BGHAKUGINSWITCH_GET_SWITCHFLAG(&this->dyna.actor));
|
||||
Flags_SetSwitch(play, BGHAKUGINSWITCH_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
} else {
|
||||
Flags_UnsetSwitch(play, BGHAKUGINSWITCH_GET_SWITCHFLAG(&this->dyna.actor));
|
||||
Flags_UnsetSwitch(play, BGHAKUGINSWITCH_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
}
|
||||
this->unk_1BF = 50;
|
||||
this->unk_1B4(this, play);
|
||||
|
@ -421,7 +421,7 @@ void func_80B162AC(BgHakuginSwitch* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (sp30 == 1) {
|
||||
if (Flags_GetSwitch(play, BGHAKUGINSWITCH_GET_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BGHAKUGINSWITCH_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
sp24 = true;
|
||||
}
|
||||
}
|
||||
|
@ -465,7 +465,7 @@ void func_80B16494(BgHakuginSwitch* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80B16520(BgHakuginSwitch* this, PlayState* play) {
|
||||
if (!Flags_GetSwitch(play, BGHAKUGINSWITCH_GET_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if (!Flags_GetSwitch(play, BGHAKUGINSWITCH_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
if (BGHAKUGINSWITCH_GET_7(&this->dyna.actor) == BGHAKUGINSWITCH_GET_7_1) {
|
||||
func_80B16180(this, func_80B165A0, 0, this->additionalCsId);
|
||||
} else {
|
||||
|
|
|
@ -10,7 +10,7 @@ typedef void (*BgHakuginSwitchUnkFunc)(struct BgHakuginSwitch*, PlayState*);
|
|||
|
||||
#define BGHAKUGINSWITCH_GET_7(thisx) ((thisx)->params & 7)
|
||||
#define BGHAKUGINSWITCH_GET_10(thisx) (((thisx)->params >> 4) & 1)
|
||||
#define BGHAKUGINSWITCH_GET_SWITCHFLAG(thisx) (((thisx)->params >> 8) & 0x7F)
|
||||
#define BGHAKUGINSWITCH_GET_SWITCH_FLAG(thisx) (((thisx)->params >> 8) & 0x7F)
|
||||
|
||||
#define BGHAKUGINSWITCH_GET_7_1 1
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ void BgIkanaBombwall_Init(Actor* thisx, PlayState* play) {
|
|||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
|
||||
if (Flags_GetSwitch(play, BGIKANABOMBWALL_GET_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BGIKANABOMBWALL_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ void func_80BD503C(BgIkanaBombwall* this, PlayState* play) {
|
|||
}
|
||||
this->dyna.actor.draw = NULL;
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 60, NA_SE_EV_WALL_BROKEN);
|
||||
Flags_SetSwitch(play, BGIKANABOMBWALL_GET_SWITCHFLAG(&this->dyna.actor));
|
||||
Flags_SetSwitch(play, BGIKANABOMBWALL_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
if (!BGIKANABOMBWALL_GET_100(&this->dyna.actor)) {
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ struct BgIkanaBombwall;
|
|||
|
||||
typedef void (*BgIkanaBombwallActionFunc)(struct BgIkanaBombwall*, PlayState*);
|
||||
|
||||
#define BGIKANABOMBWALL_GET_SWITCHFLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define BGIKANABOMBWALL_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define BGIKANABOMBWALL_GET_100(thisx) (((thisx)->params >> 8) & 1)
|
||||
|
||||
typedef struct BgIkanaBombwall {
|
||||
|
|
|
@ -153,7 +153,7 @@ void BgIkanaDharma_WaitForHit(BgIkanaDharma* this, PlayState* play) {
|
|||
|
||||
if (wasHit && (sFirstHitBgIkanaDharma == NULL)) {
|
||||
sFirstHitBgIkanaDharma = this2;
|
||||
Flags_SetSwitch(play, BGIKANADHARMA_GET_SWITCHFLAG(&this->dyna.actor));
|
||||
Flags_SetSwitch(play, BGIKANADHARMA_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
tempAngle1 = BINANG_ADD(this->dyna.actor.yawTowardsPlayer, 0x8000);
|
||||
tempAngle2 = (BINANG_SUB(player->actor.shape.rot.y, tempAngle1) >> 1);
|
||||
this->dyna.actor.world.rot.y = tempAngle1 + tempAngle2 + 0xF000;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
#define BGIKANADHARMA_GET_SWITCHFLAG(thisx) (((thisx)->params >> 8) & 0x7F)
|
||||
#define BGIKANADHARMA_GET_SWITCH_FLAG(thisx) (((thisx)->params >> 8) & 0x7F)
|
||||
#define BGIKANADHARMA_IS_CHILD(thisx) (((thisx)->params >> 5) & 1)
|
||||
#define BGIKANADHARMA_NUM_SEGMENTS(thisx) ((thisx)->params & 0xF)
|
||||
#define BGIKANADHARMA_PARAMS(switchFlag, isChild, numSegments) (((switchFlag & 0x7F) << 8) | ((isChild & 1) << 5) | (numSegments & 0xF))
|
||||
|
|
|
@ -169,7 +169,7 @@ void func_80B80440(BgIkanaRotaryroom* this, PlayState* play) {
|
|||
Matrix_Push();
|
||||
Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
if (Flags_GetSwitch(play, BGIKANAROTARYROOM_GET_7F00(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BGIKANAROTARYROOM_GET_SWITCH_FLAG_2(&this->dyna.actor))) {
|
||||
Matrix_Translate(D_80B82178.x, D_80B82178.y, D_80B82178.z, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(D_80B8216C.x, D_80B8216C.y, D_80B8216C.z, MTXMODE_APPLY);
|
||||
|
@ -195,7 +195,7 @@ void func_80B80550(BgIkanaRotaryroom* this, PlayState* play) {
|
|||
MtxF sp68;
|
||||
Vec3s sp60;
|
||||
|
||||
if (Flags_GetSwitch(play, BGIKANAROTARYROOM_GET_FE(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BGIKANAROTARYROOM_GET_SWITCH_FLAG_1(&this->dyna.actor))) {
|
||||
spC4 = 1;
|
||||
} else {
|
||||
spC4 = 0;
|
||||
|
@ -494,10 +494,10 @@ s32 func_80B80F08(BgIkanaRotaryroom* this, PlayState* play) {
|
|||
Matrix_Pop();
|
||||
|
||||
if (Math3D_Vec3fDistSq(&sp34, &sp28) < 3.0f) {
|
||||
if (!Flags_GetSwitch(play, BGIKANAROTARYROOM_GET_7F00(&this->dyna.actor))) {
|
||||
if (!Flags_GetSwitch(play, BGIKANAROTARYROOM_GET_SWITCH_FLAG_2(&this->dyna.actor))) {
|
||||
sp24 = true;
|
||||
}
|
||||
Flags_SetSwitch(play, BGIKANAROTARYROOM_GET_7F00(&this->dyna.actor));
|
||||
Flags_SetSwitch(play, BGIKANAROTARYROOM_GET_SWITCH_FLAG_2(&this->dyna.actor));
|
||||
}
|
||||
}
|
||||
return sp24;
|
||||
|
@ -708,7 +708,7 @@ void BgIkanaRotaryroom_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
|
||||
if (Flags_GetSwitch(play, BGIKANAROTARYROOM_GET_FE(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BGIKANAROTARYROOM_GET_SWITCH_FLAG_1(&this->dyna.actor))) {
|
||||
this->dyna.actor.shape.rot.x = -0x8000;
|
||||
} else {
|
||||
this->dyna.actor.shape.rot.x = 0;
|
||||
|
@ -753,15 +753,15 @@ void func_80B818B4(BgIkanaRotaryroom* this) {
|
|||
|
||||
void func_80B818C8(Actor* thisx, PlayState* play) {
|
||||
BgIkanaRotaryroom* this = THIS;
|
||||
s32 sp20;
|
||||
s32 switchFlag;
|
||||
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
sp20 = BGIKANAROTARYROOM_GET_FE(&this->dyna.actor);
|
||||
if (Flags_GetSwitch(play, sp20)) {
|
||||
Flags_UnsetSwitch(play, sp20);
|
||||
switchFlag = BGIKANAROTARYROOM_GET_SWITCH_FLAG_1(&this->dyna.actor);
|
||||
if (Flags_GetSwitch(play, switchFlag)) {
|
||||
Flags_UnsetSwitch(play, switchFlag);
|
||||
} else {
|
||||
Flags_SetSwitch(play, sp20);
|
||||
Flags_SetSwitch(play, switchFlag);
|
||||
}
|
||||
func_80B81978(this);
|
||||
} else {
|
||||
|
@ -866,7 +866,7 @@ void func_80B81BA0(Actor* thisx, PlayState* play) {
|
|||
Quake_SetDuration(quakeIndex, 15);
|
||||
}
|
||||
|
||||
if (Flags_GetSwitch(play, BGIKANAROTARYROOM_GET_FE(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BGIKANAROTARYROOM_GET_SWITCH_FLAG_1(&this->dyna.actor))) {
|
||||
if (this->dyna.actor.shape.rot.x < 0) {
|
||||
this->dyna.actor.shape.rot.x = -0x8000;
|
||||
sp30 = 1;
|
||||
|
|
|
@ -10,8 +10,8 @@ typedef void (*BgIkanaRotaryroomUnkFunc)(Actor*, PlayState*);
|
|||
typedef void (*BgIkanaRotaryroomUnkFunc2)(struct BgIkanaRotaryroom*, PlayState*);
|
||||
|
||||
#define BGIKANAROTARYROOM_GET_1(thisx) ((thisx)->params & 1)
|
||||
#define BGIKANAROTARYROOM_GET_FE(thisx) (((thisx)->params >> 1) & 0x7F)
|
||||
#define BGIKANAROTARYROOM_GET_7F00(thisx) (((thisx)->params >> 8) & 0x7F)
|
||||
#define BGIKANAROTARYROOM_GET_SWITCH_FLAG_1(thisx) (((thisx)->params >> 1) & 0x7F)
|
||||
#define BGIKANAROTARYROOM_GET_SWITCH_FLAG_2(thisx) (((thisx)->params >> 8) & 0x7F)
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Actor* unk_00;
|
||||
|
|
|
@ -56,10 +56,10 @@ static InitChainEntry sInitChain[] = {
|
|||
};
|
||||
|
||||
s32 BgIkanaShutter_AllSwitchesPressed(BgIkanaShutter* this, PlayState* play) {
|
||||
return Flags_GetSwitch(play, this->dyna.actor.params & 0x7F) &&
|
||||
Flags_GetSwitch(play, (this->dyna.actor.params & 0x7F) + 1) &&
|
||||
Flags_GetSwitch(play, (this->dyna.actor.params & 0x7F) + 2) &&
|
||||
Flags_GetSwitch(play, (this->dyna.actor.params & 0x7F) + 3);
|
||||
return Flags_GetSwitch(play, BGIKANASHUTTER_GET_SWITCH_FLAG(&this->dyna.actor)) &&
|
||||
Flags_GetSwitch(play, BGIKANASHUTTER_GET_SWITCH_FLAG(&this->dyna.actor) + 1) &&
|
||||
Flags_GetSwitch(play, BGIKANASHUTTER_GET_SWITCH_FLAG(&this->dyna.actor) + 2) &&
|
||||
Flags_GetSwitch(play, BGIKANASHUTTER_GET_SWITCH_FLAG(&this->dyna.actor) + 3);
|
||||
}
|
||||
|
||||
void BgIkanaShutter_Init(Actor* thisx, PlayState* play) {
|
||||
|
@ -68,7 +68,7 @@ void BgIkanaShutter_Init(Actor* thisx, PlayState* play) {
|
|||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, &object_ikana_obj_Colheader_000F28);
|
||||
if (!((this->dyna.actor.params >> 8) & 1)) {
|
||||
if (!BGIKANASHUTTER_GET_100(&this->dyna.actor)) {
|
||||
if (BgIkanaShutter_AllSwitchesPressed(this, play)) {
|
||||
func_80BD599C(this);
|
||||
return;
|
||||
|
|
|
@ -7,6 +7,9 @@ struct BgIkanaShutter;
|
|||
|
||||
typedef void (*BgIkanaShutterActionFunc)(struct BgIkanaShutter*, PlayState*);
|
||||
|
||||
#define BGIKANASHUTTER_GET_SWITCH_FLAG(thisx) (((thisx)->params) & 0x7F)
|
||||
#define BGIKANASHUTTER_GET_100(thisx) (((thisx)->params >> 8) & 1)
|
||||
|
||||
typedef struct BgIkanaShutter {
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x15C */ BgIkanaShutterActionFunc actionFunc;
|
||||
|
|
|
@ -159,7 +159,7 @@ void func_80C0ABA8(BgIkninSusceil* this, PlayState* play) {
|
|||
this->dyna.actor.world.pos.y += this->dyna.actor.velocity.y;
|
||||
if (this->dyna.actor.world.pos.y <= this->dyna.actor.home.pos.y) {
|
||||
BgIkninSusceil_RequestQuakeAndRumble(this, play, 4, 14, 1);
|
||||
Flags_UnsetSwitch(play, SUSCEIL_GET_SWITCHFLAG(&this->dyna.actor));
|
||||
Flags_UnsetSwitch(play, SUSCEIL_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BIGWALL_BOUND);
|
||||
func_80C0AC74(this);
|
||||
} else {
|
||||
|
@ -173,7 +173,7 @@ void func_80C0AC74(BgIkninSusceil* this) {
|
|||
}
|
||||
|
||||
void func_80C0AC90(BgIkninSusceil* this, PlayState* play) {
|
||||
if (Flags_GetSwitch(play, SUSCEIL_GET_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, SUSCEIL_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
func_80C0ACD4(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
#define SUSCEIL_GET_SWITCHFLAG(thisx) (((thisx)->params) & 0x7F)
|
||||
#define SUSCEIL_GET_SWITCH_FLAG(thisx) (((thisx)->params) & 0x7F)
|
||||
|
||||
struct BgIkninSusceil;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ void BgIkninside_Init(Actor* thisx, PlayState* play) {
|
|||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
|
||||
if (Flags_GetSwitch(play, DMIKNINSIDE_GET_SWITCH(thisx))) {
|
||||
if (Flags_GetSwitch(play, DMIKNINSIDE_GET_SWITCH_FLAG(thisx))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ void func_80C072D0(BgIkninside* this, PlayState* play) {
|
|||
EffectSsHahen_Spawn(play, &pos, &velocity, &D_80C076D4, 0, 30, OBJECT_IKNINSIDE_OBJ, 25,
|
||||
D_80C076A0[i & 1]);
|
||||
}
|
||||
Flags_SetSwitch(play, DMIKNINSIDE_GET_SWITCH(&this->dyna.actor));
|
||||
Flags_SetSwitch(play, DMIKNINSIDE_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
this->actionFunc = func_80C07230;
|
||||
this->dyna.actor.draw = NULL;
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
struct BgIkninside;
|
||||
|
||||
#define DMIKNINSIDE_GET_SWITCH(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
#define DMIKNINSIDE_GET_SWITCH_FLAG(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
|
||||
typedef void (*BgIkninsideActionFunc)(struct BgIkninside*, PlayState*);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ void BgKeikokuSaku_Init(Actor* thisx, PlayState* play) {
|
|||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
CollisionHeader_GetVirtual(&object_keikoku_obj_Colheader_002300, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
this->switchFlag = BGKEIKOKUSAKU_GET_SWITCHFLAG(thisx);
|
||||
this->switchFlag = BGKEIKOKUSAKU_GET_SWITCH_FLAG(thisx);
|
||||
if (Flags_GetSwitch(play, this->switchFlag)) {
|
||||
this->dyna.actor.world.pos.z = 2659.0f;
|
||||
} else {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
#define BGKEIKOKUSAKU_GET_SWITCHFLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define BGKEIKOKUSAKU_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
|
||||
struct BgKeikokuSaku;
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ void BgKin2Bombwall_Init(Actor* thisx, PlayState* play) {
|
|||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
bombwallCollider = &this->collider;
|
||||
Collider_InitCylinder(play, bombwallCollider);
|
||||
if (Flags_GetSwitch(play, BG_KIN2_BOMBWALL_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BG_KIN2_BOMBWALL_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ void BgKin2Bombwall_SetupPlayCutscene(BgKin2Bombwall* this) {
|
|||
void BgKin2Bombwall_PlayCutscene(BgKin2Bombwall* this, PlayState* play) {
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
Flags_SetSwitch(play, BG_KIN2_BOMBWALL_SWITCH_FLAG(&this->dyna.actor));
|
||||
Flags_SetSwitch(play, BG_KIN2_BOMBWALL_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 60, NA_SE_EV_WALL_BROKEN);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->dyna.actor.draw = NULL;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef Z_BG_KIN2_BOMBWALL_H
|
||||
#define Z_BG_KIN2_BOMBWALL_H
|
||||
|
||||
#define BG_KIN2_BOMBWALL_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define BG_KIN2_BOMBWALL_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
|
||||
#include "global.h"
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ void BgKin2Fence_Init(Actor* thisx, PlayState* play) {
|
|||
Collider_UpdateSpheres(i, &this->collider);
|
||||
}
|
||||
|
||||
if (Flags_GetSwitch(play, this->dyna.actor.params & 0x7F)) {
|
||||
if (Flags_GetSwitch(play, BG_KIN2_FENCE_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
BgKin2Fence_SetupDoNothing(this);
|
||||
return;
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ void BgKin2Fence_SetupPlayOpenCutscene(BgKin2Fence* this) {
|
|||
void BgKin2Fence_PlayOpenCutscene(BgKin2Fence* this, PlayState* play) {
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
Flags_SetSwitch(play, this->dyna.actor.params & 0x7F);
|
||||
Flags_SetSwitch(play, BG_KIN2_FENCE_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
BgKin2Fence_SetupWaitBeforeOpen(this);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@ struct BgKin2Fence;
|
|||
|
||||
typedef void (*BgKin2FenceActionFunc)(struct BgKin2Fence*, PlayState*);
|
||||
|
||||
#define BG_KIN2_FENCE_GET_SWITCH_FLAG(thisx) (((thisx)->params) & 0x7F)
|
||||
|
||||
typedef struct BgKin2Fence {
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x15C */ ColliderJntSph collider;
|
||||
|
|
|
@ -49,7 +49,7 @@ void BgLadder_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
|
||||
this->switchFlag = BGLADDER_GET_SWITCHFLAG(thisx);
|
||||
this->switchFlag = BGLADDER_GET_SWITCH_FLAG(thisx);
|
||||
thisx->params = BGLADDER_GET_SIZE(thisx);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
size = thisx->params;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "global.h"
|
||||
|
||||
#define BGLADDER_GET_SIZE(thisx) ((thisx)->params & 0xFF)
|
||||
#define BGLADDER_GET_SWITCHFLAG(thisx) (((thisx)->params >> 8) & 0xFF)
|
||||
#define BGLADDER_GET_SWITCH_FLAG(thisx) (((thisx)->params >> 8) & 0xFF)
|
||||
|
||||
struct BgLadder;
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ void BgLastBwall_Init(Actor* thisx, PlayState* play) {
|
|||
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, D_80C18A48[this->type].colHeader);
|
||||
Collider_InitTris(play, &this->colliderTris);
|
||||
if (Flags_GetSwitch(play, BGLASTBWALL_GET_SWITCHFLAGS(&this->dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, BGLASTBWALL_GET_SWITCH_FLAG(&this->dyna.actor))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ void func_80C187E4(BgLastBwall* this) {
|
|||
void func_80C187F8(BgLastBwall* this, PlayState* play) {
|
||||
if (this->colliderTris.base.acFlags & AC_HIT) {
|
||||
this->colliderTris.base.acFlags &= ~AC_HIT;
|
||||
Flags_SetSwitch(play, BGLASTBWALL_GET_SWITCHFLAGS(&this->dyna.actor));
|
||||
Flags_SetSwitch(play, BGLASTBWALL_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
func_80C1886C(this, play);
|
||||
} else {
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderTris.base);
|
||||
|
|
|
@ -8,7 +8,7 @@ struct BgLastBwall;
|
|||
|
||||
typedef void (*BgLastBwallActionFunc)(struct BgLastBwall*, PlayState*);
|
||||
|
||||
#define BGLASTBWALL_GET_SWITCHFLAGS(thisx) ((thisx)->params & 0x7F)
|
||||
#define BGLASTBWALL_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define BGLASTBWALL_GET_TYPE(thisx) (((thisx)->params >> 0xC) & 0xF)
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -148,7 +148,7 @@ void BgSpdweb_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
this->unk_161 = 0;
|
||||
this->switchFlag = BGSPDWEB_GET_SWITCHFLAG(&this->dyna.actor);
|
||||
this->switchFlag = BGSPDWEB_GET_SWITCH_FLAG(&this->dyna.actor);
|
||||
thisx->params &= 0xFF;
|
||||
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ struct BgSpdweb;
|
|||
|
||||
typedef void (*BgSpdwebActionFunc)(struct BgSpdweb*, PlayState*);
|
||||
|
||||
#define BGSPDWEB_GET_SWITCHFLAG(thisx) (((thisx)->params >> 8) & 0x7F)
|
||||
#define BGSPDWEB_GET_SWITCH_FLAG(thisx) (((thisx)->params >> 8) & 0x7F)
|
||||
|
||||
#define BGSPDWEB_FF_0 0
|
||||
#define BGSPDWEB_FF_1 1
|
||||
|
|
|
@ -181,7 +181,7 @@ s32 DoorShutter_SetupDoor(DoorShutter* this, PlayState* play) {
|
|||
return true;
|
||||
}
|
||||
} else if ((doorType == 2) || (doorType == 7)) {
|
||||
if (!Flags_GetSwitch(play, DOORSHUTTER_GET_7F(&this->slidingDoor.dyna.actor))) {
|
||||
if (!Flags_GetSwitch(play, DOORSHUTTER_GET_SWITCH_FLAG(&this->slidingDoor.dyna.actor))) {
|
||||
DoorShutter_SetupAction(this, func_808A1548);
|
||||
this->unk_168 = 1.0f;
|
||||
return true;
|
||||
|
@ -243,7 +243,7 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) {
|
|||
this->unk_163 = sp24;
|
||||
|
||||
if ((this->doorType == 4) || (this->doorType == 5)) {
|
||||
if (!Flags_GetSwitch(play, DOORSHUTTER_GET_7F(&this->slidingDoor.dyna.actor))) {
|
||||
if (!Flags_GetSwitch(play, DOORSHUTTER_GET_SWITCH_FLAG(&this->slidingDoor.dyna.actor))) {
|
||||
this->unk_166 = 10;
|
||||
}
|
||||
}
|
||||
|
@ -346,7 +346,7 @@ void func_808A1090(DoorShutter* this, PlayState* play) {
|
|||
DoorShutter_SetupAction(this, func_808A1684);
|
||||
this->slidingDoor.dyna.actor.velocity.y = 0.0f;
|
||||
if (this->unk_166 != 0) {
|
||||
Flags_SetSwitch(play, DOORSHUTTER_GET_7F(&this->slidingDoor.dyna.actor));
|
||||
Flags_SetSwitch(play, DOORSHUTTER_GET_SWITCH_FLAG(&this->slidingDoor.dyna.actor));
|
||||
if (this->doorType != 5) {
|
||||
DUNGEON_KEY_COUNT(gSaveContext.mapIndex) = DUNGEON_KEY_COUNT(gSaveContext.mapIndex) - 1;
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_CHAIN_KEY_UNLOCK);
|
||||
|
@ -474,7 +474,7 @@ s32 func_808A1478(DoorShutter* this, PlayState* play, f32 arg2) {
|
|||
|
||||
void func_808A1548(DoorShutter* this, PlayState* play) {
|
||||
if (func_808A1478(this, play, 1.0f)) {
|
||||
if (Flags_GetSwitch(play, DOORSHUTTER_GET_7F(&this->slidingDoor.dyna.actor))) {
|
||||
if (Flags_GetSwitch(play, DOORSHUTTER_GET_SWITCH_FLAG(&this->slidingDoor.dyna.actor))) {
|
||||
this->csId = this->slidingDoor.dyna.actor.csId;
|
||||
if (CutsceneManager_IsNext(this->csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->csId, &this->slidingDoor.dyna.actor);
|
||||
|
@ -495,7 +495,8 @@ void func_808A1548(DoorShutter* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_808A1618(DoorShutter* this, PlayState* play) {
|
||||
if ((this->slidingDoor.unk_15C == 0) && !Flags_GetSwitch(play, DOORSHUTTER_GET_7F(&this->slidingDoor.dyna.actor))) {
|
||||
if ((this->slidingDoor.unk_15C == 0) &&
|
||||
!Flags_GetSwitch(play, DOORSHUTTER_GET_SWITCH_FLAG(&this->slidingDoor.dyna.actor))) {
|
||||
DoorShutter_SetupAction(this, func_808A1548);
|
||||
} else {
|
||||
func_808A1090(this, play);
|
||||
|
|
|
@ -9,7 +9,7 @@ struct DoorShutter;
|
|||
typedef void (*DoorShutterActionFunc)(struct DoorShutter*, PlayState*);
|
||||
|
||||
#define DOORSHUTTER_GET_1F(thisx) ((thisx)->params & 0x1F)
|
||||
#define DOORSHUTTER_GET_7F(thisx) ((thisx)->params & 0x7F)
|
||||
#define DOORSHUTTER_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define DOORSHUTTER_GET_380(thisx) (((thisx)->params >> 7) & 7)
|
||||
|
||||
typedef struct DoorShutter {
|
||||
|
|
|
@ -43,25 +43,25 @@ s32 func_8092DF9C(ElfMsg* this, PlayState* play) {
|
|||
if ((this->actor.home.rot.y > 0) && (this->actor.home.rot.y < 0x81) &&
|
||||
(Flags_GetSwitch(play, this->actor.home.rot.y - 1))) {
|
||||
(void)"共倒れ"; // "Collapse together"
|
||||
if (ELFMSG_GET_SWITCHFLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG_GET_SWITCHFLAG(&this->actor));
|
||||
if (ELFMSG_GET_SWITCH_FLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG_GET_SWITCH_FLAG(&this->actor));
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
return true;
|
||||
}
|
||||
if (this->actor.home.rot.y == 0x81) {
|
||||
if (Flags_GetClear(play, this->actor.room)) {
|
||||
if (ELFMSG_GET_SWITCHFLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG_GET_SWITCHFLAG(&this->actor));
|
||||
if (ELFMSG_GET_SWITCH_FLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG_GET_SWITCH_FLAG(&this->actor));
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (ELFMSG_GET_SWITCHFLAG(&this->actor) == 0x7F) {
|
||||
if (ELFMSG_GET_SWITCH_FLAG(&this->actor) == 0x7F) {
|
||||
return false;
|
||||
}
|
||||
if (Flags_GetSwitch(play, ELFMSG_GET_SWITCHFLAG(&this->actor))) {
|
||||
if (Flags_GetSwitch(play, ELFMSG_GET_SWITCH_FLAG(&this->actor))) {
|
||||
(void)"共倒れ"; // "Collapse together"
|
||||
Actor_Kill(&this->actor);
|
||||
return true;
|
||||
|
@ -136,8 +136,8 @@ void ElfMsg_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (func_8092DF9C(this, play) == 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
|
||||
if (ELFMSG_GET_SWITCHFLAG(thisx) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG_GET_SWITCHFLAG(thisx));
|
||||
if (ELFMSG_GET_SWITCH_FLAG(thisx) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG_GET_SWITCH_FLAG(thisx));
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "global.h"
|
||||
|
||||
#define ELFMSG_GET_FF(thisx) ((thisx)->params & 0xFF)
|
||||
#define ELFMSG_GET_SWITCHFLAG(thisx) (((thisx)->params & 0x7F00) >> 8)
|
||||
#define ELFMSG_GET_SWITCH_FLAG(thisx) (((thisx)->params & 0x7F00) >> 8)
|
||||
#define ELFMSG_GET_8000(thisx) ((thisx)->params & 0x8000)
|
||||
|
||||
struct ElfMsg;
|
||||
|
|
|
@ -43,8 +43,8 @@ s32 func_8096EC4C(ElfMsg2* this, PlayState* play) {
|
|||
if ((this->actor.home.rot.y > 0) && (this->actor.home.rot.y < 0x81) &&
|
||||
(Flags_GetSwitch(play, this->actor.home.rot.y - 1))) {
|
||||
(void)"共倒れ"; // "Collapse together"
|
||||
if (ELFMSG2_GET_SWITCHFLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG2_GET_SWITCHFLAG(&this->actor));
|
||||
if (ELFMSG2_GET_SWITCH_FLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG2_GET_SWITCH_FLAG(&this->actor));
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
return true;
|
||||
|
@ -53,17 +53,17 @@ s32 func_8096EC4C(ElfMsg2* this, PlayState* play) {
|
|||
|
||||
if (Flags_GetClear(play, this->actor.room)) {
|
||||
(void)"共倒れ2"; // "Collapse 2"
|
||||
if (ELFMSG2_GET_SWITCHFLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG2_GET_SWITCHFLAG(&this->actor));
|
||||
if (ELFMSG2_GET_SWITCH_FLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG2_GET_SWITCH_FLAG(&this->actor));
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (ELFMSG2_GET_SWITCHFLAG(&this->actor) == 0x7F) {
|
||||
if (ELFMSG2_GET_SWITCH_FLAG(&this->actor) == 0x7F) {
|
||||
return false;
|
||||
}
|
||||
if (Flags_GetSwitch(play, ELFMSG2_GET_SWITCHFLAG(&this->actor))) {
|
||||
if (Flags_GetSwitch(play, ELFMSG2_GET_SWITCH_FLAG(&this->actor))) {
|
||||
(void)"共倒れ"; // "Collapse together"
|
||||
Actor_Kill(&this->actor);
|
||||
return true;
|
||||
|
@ -108,8 +108,8 @@ void func_8096EE64(ElfMsg2* this, PlayState* play) {
|
|||
|
||||
if (this->actor.home.rot.z != 1) {
|
||||
Actor_Kill(&this->actor);
|
||||
if (ELFMSG2_GET_SWITCHFLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG2_GET_SWITCHFLAG(&this->actor));
|
||||
if (ELFMSG2_GET_SWITCH_FLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG2_GET_SWITCH_FLAG(&this->actor));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
#define ELFMSG2_GET_SWITCHFLAG(thisx) (((thisx)->params >> 8) & 0x7F)
|
||||
#define ELFMSG2_GET_SWITCH_FLAG(thisx) (((thisx)->params >> 8) & 0x7F)
|
||||
#define ELFMSG2_GET_FF(thisx) ((thisx)->params & 0xFF)
|
||||
|
||||
struct ElfMsg2;
|
||||
|
|
|
@ -42,25 +42,25 @@ s32 func_80A2CD1C(ElfMsg3* this, PlayState* play) {
|
|||
if ((this->actor.home.rot.y > 0) && (this->actor.home.rot.y < 0x81) &&
|
||||
(Flags_GetSwitch(play, this->actor.home.rot.y - 1))) {
|
||||
(void)"共倒れ"; // "Collapse together"
|
||||
if (ELFMSG3_GET_SWITCH(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG3_GET_SWITCH(&this->actor));
|
||||
if (ELFMSG3_GET_SWITCH_FLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG3_GET_SWITCH_FLAG(&this->actor));
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
return true;
|
||||
}
|
||||
if (this->actor.home.rot.y == 0x81) {
|
||||
if (Flags_GetClear(play, this->actor.room)) {
|
||||
if (ELFMSG3_GET_SWITCH(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG3_GET_SWITCH(&this->actor));
|
||||
if (ELFMSG3_GET_SWITCH_FLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG3_GET_SWITCH_FLAG(&this->actor));
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (ELFMSG3_GET_SWITCH(&this->actor) == 0x7F) {
|
||||
if (ELFMSG3_GET_SWITCH_FLAG(&this->actor) == 0x7F) {
|
||||
return false;
|
||||
}
|
||||
if (Flags_GetSwitch(play, ELFMSG3_GET_SWITCH(&this->actor))) {
|
||||
if (Flags_GetSwitch(play, ELFMSG3_GET_SWITCH_FLAG(&this->actor))) {
|
||||
(void)"共倒れ"; // "Collapse together"
|
||||
Actor_Kill(&this->actor);
|
||||
return true;
|
||||
|
@ -134,8 +134,8 @@ void ElfMsg3_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (!func_80A2CD1C(this, play)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
|
||||
if (ELFMSG3_GET_SWITCH(thisx) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG3_GET_SWITCH(thisx));
|
||||
if (ELFMSG3_GET_SWITCH_FLAG(thisx) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG3_GET_SWITCH_FLAG(thisx));
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
#define ELFMSG3_GET_SWITCH(thisx) (((thisx)->params & 0x7F00) >> 8)
|
||||
#define ELFMSG3_GET_SWITCH_FLAG(thisx) (((thisx)->params & 0x7F00) >> 8)
|
||||
#define ELFMSG3_GET_FF(thisx) ((thisx)->params & 0xFF)
|
||||
#define ELFMSG3_GET_8000(thisx) ((thisx)->params & 0x8000)
|
||||
|
||||
|
|
|
@ -43,25 +43,25 @@ s32 func_80AFD380(ElfMsg4* this, PlayState* play) {
|
|||
if ((this->actor.home.rot.y > 0) && (this->actor.home.rot.y < 0x81) &&
|
||||
(Flags_GetSwitch(play, this->actor.home.rot.y - 1))) {
|
||||
(void)"共倒れ"; // "Collapse together"
|
||||
if (ELFMSG4_GET_SWITCHFLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG4_GET_SWITCHFLAG(&this->actor));
|
||||
if (ELFMSG4_GET_SWITCH_FLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG4_GET_SWITCH_FLAG(&this->actor));
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
return true;
|
||||
}
|
||||
if (this->actor.home.rot.y == 0x81) {
|
||||
if (Flags_GetClear(play, this->actor.room)) {
|
||||
if (ELFMSG4_GET_SWITCHFLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG4_GET_SWITCHFLAG(&this->actor));
|
||||
if (ELFMSG4_GET_SWITCH_FLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG4_GET_SWITCH_FLAG(&this->actor));
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (ELFMSG4_GET_SWITCHFLAG(&this->actor) == 0x7F) {
|
||||
if (ELFMSG4_GET_SWITCH_FLAG(&this->actor) == 0x7F) {
|
||||
return false;
|
||||
}
|
||||
if (Flags_GetSwitch(play, ELFMSG4_GET_SWITCHFLAG(&this->actor))) {
|
||||
if (Flags_GetSwitch(play, ELFMSG4_GET_SWITCH_FLAG(&this->actor))) {
|
||||
(void)"共倒れ"; // "Collapse together"
|
||||
Actor_Kill(&this->actor);
|
||||
return true;
|
||||
|
@ -161,8 +161,8 @@ void ElfMsg4_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if ((bgActor != NULL) && Actor_ProcessTalkRequest(bgActor, &play->state)) {
|
||||
if (ELFMSG4_GET_SWITCHFLAG(thisx) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG4_GET_SWITCHFLAG(thisx));
|
||||
if (ELFMSG4_GET_SWITCH_FLAG(thisx) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG4_GET_SWITCH_FLAG(thisx));
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
#define ELFMSG4_GET_SWITCHFLAG(thisx) (((thisx)->params & 0x7F00) >> 8)
|
||||
#define ELFMSG4_GET_SWITCH_FLAG(thisx) (((thisx)->params & 0x7F00) >> 8)
|
||||
#define ELFMSG4_GET_8000(thisx) ((thisx)->params & 0x8000)
|
||||
#define ELFMSG4_GET_TEXT(thisx) ((thisx)->params & 0xFF)
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@ s32 func_80AFD990(ElfMsg5* this, PlayState* play) {
|
|||
if ((this->actor.home.rot.y > 0) && (this->actor.home.rot.y < 0x81) &&
|
||||
(Flags_GetSwitch(play, this->actor.home.rot.y - 1))) {
|
||||
(void)"共倒れ"; // Collapse together
|
||||
if (ELFMSG5_GET_SWITCHFLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG5_GET_SWITCHFLAG(&this->actor));
|
||||
if (ELFMSG5_GET_SWITCH_FLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG5_GET_SWITCH_FLAG(&this->actor));
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
return true;
|
||||
|
@ -47,17 +47,17 @@ s32 func_80AFD990(ElfMsg5* this, PlayState* play) {
|
|||
if (this->actor.home.rot.y == 0x81) {
|
||||
if (Flags_GetClear(play, this->actor.room)) {
|
||||
(void)"共倒れ2"; // Collapse 2
|
||||
if (ELFMSG5_GET_SWITCHFLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG5_GET_SWITCHFLAG(&this->actor));
|
||||
if (ELFMSG5_GET_SWITCH_FLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG5_GET_SWITCH_FLAG(&this->actor));
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (ELFMSG5_GET_SWITCHFLAG(&this->actor) == 0x7F) {
|
||||
if (ELFMSG5_GET_SWITCH_FLAG(&this->actor) == 0x7F) {
|
||||
return false;
|
||||
}
|
||||
if (Flags_GetSwitch(play, ELFMSG5_GET_SWITCHFLAG(&this->actor))) {
|
||||
if (Flags_GetSwitch(play, ELFMSG5_GET_SWITCH_FLAG(&this->actor))) {
|
||||
(void)"共倒れ"; // Collapse together
|
||||
Actor_Kill(&this->actor);
|
||||
return true;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
#define ELFMSG5_GET_SWITCHFLAG(thisx) (((thisx)->params >> 8) & 0x7F)
|
||||
#define ELFMSG5_GET_SWITCH_FLAG(thisx) (((thisx)->params >> 8) & 0x7F)
|
||||
#define ELFMSG5_GET_FF(thisx) ((thisx)->params & 0xFF)
|
||||
|
||||
struct ElfMsg5;
|
||||
|
|
|
@ -154,8 +154,8 @@ void ElfMsg6_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
case 1:
|
||||
this->actionFunc = func_80BA1F80;
|
||||
if ((this->actor.csId == CS_ID_NONE) || ((ELFMSG6_SWITCHFLAG(&this->actor) != 0x7F) &&
|
||||
Flags_GetSwitch(play, ELFMSG6_SWITCHFLAG(&this->actor)))) {
|
||||
if ((this->actor.csId == CS_ID_NONE) || ((ELFMSG6_SWITCH_FLAG(&this->actor) != 0x7F) &&
|
||||
Flags_GetSwitch(play, ELFMSG6_SWITCH_FLAG(&this->actor)))) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
@ -200,8 +200,8 @@ void ElfMsg6_Init(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
|
||||
case 3:
|
||||
if (((ELFMSG6_SWITCHFLAG(&this->actor) != 0x7F) &&
|
||||
Flags_GetSwitch(play, ELFMSG6_SWITCHFLAG(&this->actor))) ||
|
||||
if (((ELFMSG6_SWITCH_FLAG(&this->actor) != 0x7F) &&
|
||||
Flags_GetSwitch(play, ELFMSG6_SWITCH_FLAG(&this->actor))) ||
|
||||
CHECK_WEEKEVENTREG(WEEKEVENTREG_88_10) || CHECK_WEEKEVENTREG(WEEKEVENTREG_91_01) ||
|
||||
(INV_CONTENT(ITEM_MASK_ZORA) == ITEM_MASK_ZORA)) {
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -338,7 +338,7 @@ void func_80BA1F80(ElfMsg6* this, PlayState* play) {
|
|||
if (func_80BA1C00(this)) {
|
||||
if (CutsceneManager_IsNext(this->actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->actor.csId, NULL);
|
||||
Flags_SetSwitch(play, ELFMSG6_SWITCHFLAG(&this->actor));
|
||||
Flags_SetSwitch(play, ELFMSG6_SWITCH_FLAG(&this->actor));
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
@ -355,14 +355,14 @@ void func_80BA2048(ElfMsg6* this, PlayState* play) {
|
|||
EnElf* sp20 = (EnElf*)GET_PLAYER(play)->tatlActor;
|
||||
|
||||
sp20->unk_264 |= 0x20;
|
||||
if (ELFMSG6_SWITCHFLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG6_SWITCHFLAG(&this->actor));
|
||||
if (ELFMSG6_SWITCH_FLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG6_SWITCH_FLAG(&this->actor));
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
||||
if (((ELFMSG6_SWITCHFLAG(&this->actor) != 0x7F) && Flags_GetSwitch(play, ELFMSG6_SWITCHFLAG(&this->actor))) ||
|
||||
if (((ELFMSG6_SWITCH_FLAG(&this->actor) != 0x7F) && Flags_GetSwitch(play, ELFMSG6_SWITCH_FLAG(&this->actor))) ||
|
||||
CHECK_WEEKEVENTREG(WEEKEVENTREG_88_10) || CHECK_WEEKEVENTREG(WEEKEVENTREG_91_01) ||
|
||||
(INV_CONTENT(ITEM_MASK_ZORA) == ITEM_MASK_ZORA)) {
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -390,14 +390,14 @@ void func_80BA21C4(ElfMsg6* this, PlayState* play) {
|
|||
EnElf* sp20 = (EnElf*)GET_PLAYER(play)->tatlActor;
|
||||
|
||||
sp20->unk_264 |= 0x20;
|
||||
if (ELFMSG6_SWITCHFLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG6_SWITCHFLAG(&this->actor));
|
||||
if (ELFMSG6_SWITCH_FLAG(&this->actor) != 0x7F) {
|
||||
Flags_SetSwitch(play, ELFMSG6_SWITCH_FLAG(&this->actor));
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
||||
if (((ELFMSG6_SWITCHFLAG(&this->actor) != 0x7F) && Flags_GetSwitch(play, ELFMSG6_SWITCHFLAG(&this->actor))) ||
|
||||
if (((ELFMSG6_SWITCH_FLAG(&this->actor) != 0x7F) && Flags_GetSwitch(play, ELFMSG6_SWITCH_FLAG(&this->actor))) ||
|
||||
CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
|
|
@ -9,7 +9,7 @@ typedef void (*ElfMsg6ActionFunc)(struct ElfMsg6*, PlayState*);
|
|||
|
||||
#define ELFMSG6_GET_F(thisx) ((thisx)->params & 0xF)
|
||||
#define ELFMSG6_GET_F0(thisx) (((thisx)->params & 0xF0) >> 4)
|
||||
#define ELFMSG6_SWITCHFLAG(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
#define ELFMSG6_SWITCH_FLAG(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
|
||||
typedef struct ElfMsg6 {
|
||||
/* 0x000 */ Actor actor;
|
||||
|
|
|
@ -136,7 +136,7 @@ void EnBat_Init(Actor* thisx, PlayState* play) {
|
|||
this->animationFrame = Rand_ZeroOne() * 9.0f;
|
||||
|
||||
this->paramFlags = BAD_BAT_GET_PARAMFLAGS(thisx);
|
||||
this->switchFlag = BAD_BAT_GET_SWITCHFLAG(thisx);
|
||||
this->switchFlag = BAD_BAT_GET_SWITCH_FLAG(thisx);
|
||||
thisx->params = BAD_BAT_GET_TYPE(thisx);
|
||||
|
||||
thisx->depthInWater = BGCHECK_Y_MIN;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#define BAD_BAT_GET_TYPE(thisx) (((thisx)->params >> 0) & 0x1F)
|
||||
#define BAD_BAT_GET_PARAMFLAGS(thisx) (((thisx)->params >> 5) & 7)
|
||||
#define BAD_BAT_GET_SWITCHFLAG(thisx) (((thisx)->params >> 8) & 0xFF)
|
||||
#define BAD_BAT_GET_SWITCH_FLAG(thisx) (((thisx)->params >> 8) & 0xFF)
|
||||
#define BAD_BAT_PARAMS(switchFlag, paramflags, type) ((type) | ((paramflags) << 5) | ((switchFlag) << 8))
|
||||
|
||||
//! PARAMFLAGS
|
||||
|
|
|
@ -104,7 +104,8 @@ void EnBigokuta_Init(Actor* thisx, PlayState* play) {
|
|||
this->csId = CutsceneManager_GetAdditionalCsId(this->picto.actor.csId);
|
||||
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_WOODFALL_TEMPLE) ||
|
||||
((this->picto.actor.params != 0xFF) && Flags_GetSwitch(play, this->picto.actor.params))) {
|
||||
((EN_BIGOKUTA_GET_SWITCH_FLAG(&this->picto.actor) != 0xFF) &&
|
||||
Flags_GetSwitch(play, EN_BIGOKUTA_GET_SWITCH_FLAG(&this->picto.actor)))) {
|
||||
Actor_Kill(&this->picto.actor);
|
||||
} else {
|
||||
this->picto.actor.world.pos.y -= 99.0f;
|
||||
|
@ -445,8 +446,8 @@ void EnBigokuta_PlayDeathEffects(EnBigokuta* this, PlayState* play) {
|
|||
&D_80AC45B8, Rand_S16Offset(150, 50), 25, false);
|
||||
}
|
||||
|
||||
if (this->picto.actor.params != 0xFF) {
|
||||
Flags_SetSwitch(play, this->picto.actor.params);
|
||||
if (EN_BIGOKUTA_GET_SWITCH_FLAG(&this->picto.actor) != 0xFF) {
|
||||
Flags_SetSwitch(play, EN_BIGOKUTA_GET_SWITCH_FLAG(&this->picto.actor));
|
||||
}
|
||||
|
||||
CutsceneManager_Stop(this->csId);
|
||||
|
|
|
@ -9,6 +9,8 @@ struct EnBigokuta;
|
|||
|
||||
typedef void (*EnBigokutaActionFunc)(struct EnBigokuta*, PlayState*);
|
||||
|
||||
#define EN_BIGOKUTA_GET_SWITCH_FLAG(thisx) ((thisx)->params)
|
||||
|
||||
typedef enum BigokutaBodyPart {
|
||||
/* 0 */ BIGOKUTA_BODYPART_0,
|
||||
/* 1 */ BIGOKUTA_BODYPART_1,
|
||||
|
|
|
@ -188,10 +188,10 @@ void EnBigpo_Init(Actor* thisx, PlayState* play2) {
|
|||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
|
||||
this->switchFlags = BIG_POE_GET_SWITCHFLAGS(thisx);
|
||||
this->switchFlag = BIG_POE_GET_SWITCH_FLAG(thisx);
|
||||
thisx->params &= 0xFF;
|
||||
if (thisx->params == BIG_POE_TYPE_POSSIBLE_FIRE) {
|
||||
if (Flags_GetSwitch(play, this->switchFlags)) {
|
||||
if (Flags_GetSwitch(play, this->switchFlag)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ void EnBigpo_Init(Actor* thisx, PlayState* play2) {
|
|||
this->mainColor.b = 210;
|
||||
this->mainColor.a = 0; // fully invisible
|
||||
|
||||
if ((this->switchFlags != 0xFF) && (Flags_GetSwitch(play, this->switchFlags))) {
|
||||
if ((this->switchFlag != 0xFF) && (Flags_GetSwitch(play, this->switchFlag))) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
||||
|
@ -756,8 +756,8 @@ void EnBigpo_SetupLanternDrop(EnBigpo* this, PlayState* play) {
|
|||
|
||||
void EnBigpo_LanternFalling(EnBigpo* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND || this->actor.floorHeight == BGCHECK_Y_MIN) {
|
||||
if (this->switchFlags != 0xFF) {
|
||||
Flags_SetSwitch(play, this->switchFlags);
|
||||
if (this->switchFlag != 0xFF) {
|
||||
Flags_SetSwitch(play, this->switchFlag);
|
||||
}
|
||||
|
||||
EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 6.0f, 0, 1, 1, 15, OBJECT_BIGPO, 10,
|
||||
|
@ -1051,7 +1051,8 @@ void EnBigpo_FlameCircleCutscene(EnBigpo* this, PlayState* play) {
|
|||
this->idleTimer--;
|
||||
if (this->idleTimer == 0) {
|
||||
EnBigpo* parentPoh = (EnBigpo*)this->actor.parent;
|
||||
Flags_SetSwitch(play, this->switchFlags);
|
||||
|
||||
Flags_SetSwitch(play, this->switchFlag);
|
||||
Math_Vec3f_Copy(&parentPoh->fires[this->unk20C].pos, &this->actor.world.pos);
|
||||
Actor_Kill(&this->actor);
|
||||
if (this->unk20C == 0) {
|
||||
|
|
|
@ -47,7 +47,7 @@ typedef struct EnBigpo {
|
|||
/* 0x20A */ s16 rotVelocity;
|
||||
/* 0x20C */ s16 unk20C; // is this counting the number of frames the player is ztargeting them?
|
||||
/* 0x20E */ s16 subCamId;
|
||||
/* 0x210 */ s16 switchFlags;
|
||||
/* 0x210 */ s16 switchFlag;
|
||||
/* 0x212 */ s16 hoverHeightCycleTimer; // sin wave up and down bobbing
|
||||
/* 0x214 */ f32 fireRadius; // distance from center during conjunction cutscene
|
||||
/* 0x218 */ f32 savedHeight; // actual height while flying moves as part of bobbing
|
||||
|
@ -75,6 +75,6 @@ typedef enum EnBigpoType {
|
|||
/* 5 */ BIG_POE_TYPE_UNK5
|
||||
} EnBigpoType;
|
||||
|
||||
#define BIG_POE_GET_SWITCHFLAGS(thisx) (u8)((thisx)->params >> 0x8)
|
||||
#define BIG_POE_GET_SWITCH_FLAG(thisx) (u8)((thisx)->params >> 0x8)
|
||||
|
||||
#endif // Z_EN_BIGPO_H
|
||||
|
|
|
@ -86,7 +86,7 @@ void EnDaiku2_Init(Actor* thisx, PlayState* play) {
|
|||
this->morphTable, OBJECT_DAIKU_LIMB_MAX);
|
||||
this->actor.targetMode = TARGET_MODE_0;
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->unk_278 = ENDAIKU2_GET_7F(&this->actor);
|
||||
this->switchFlag = ENDAIKU2_GET_SWITCH_FLAG(&this->actor);
|
||||
this->pathIndex = ENDAIKU2_GET_PATH_INDEX(&this->actor);
|
||||
this->path = SubS_GetPathByIndex(play, this->pathIndex, ENDAIKU2_PATH_INDEX_NONE);
|
||||
this->unk_280 = ENDAIKU2_GET_8000(&this->actor);
|
||||
|
@ -97,9 +97,9 @@ void EnDaiku2_Init(Actor* thisx, PlayState* play) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this->unk_278 == ENDAIKU2_GET_7F_127) {
|
||||
this->unk_278 = ENDAIKU2_GET_7F_MINUS1;
|
||||
} else if (Flags_GetSwitch(play, this->unk_278)) {
|
||||
if (this->switchFlag == 0x7F) {
|
||||
this->switchFlag = -1;
|
||||
} else if (Flags_GetSwitch(play, this->switchFlag)) {
|
||||
this->unk_25C = this->path->count - 1;
|
||||
func_80BE61D0(this);
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &this->unk_268);
|
||||
|
@ -185,7 +185,7 @@ s32 func_80BE64C0(EnDaiku2* this, PlayState* play) {
|
|||
Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.home.pos);
|
||||
bomb = (EnBom*)Actor_FindNearby(play, &this->actor, -1, ACTORCAT_EXPLOSIVES, BREG(7) + 240.0f);
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &sp30);
|
||||
if ((this->unk_278 >= ENDAIKU2_GET_7F_0) && !Flags_GetSwitch(play, this->unk_278) && (bomb != NULL) &&
|
||||
if ((this->switchFlag >= 0) && !Flags_GetSwitch(play, this->switchFlag) && (bomb != NULL) &&
|
||||
(bomb->actor.id == ACTOR_EN_BOM)) {
|
||||
if (!bomb->isPowderKeg) {
|
||||
this->actor.textId = 0x32D3;
|
||||
|
@ -228,7 +228,7 @@ void func_80BE65B4(EnDaiku2* this, PlayState* play) {
|
|||
}
|
||||
|
||||
this->unk_264 = 1.0f;
|
||||
if ((this->unk_278 >= ENDAIKU2_GET_7F_0) && Flags_GetSwitch(play, this->unk_278)) {
|
||||
if ((this->switchFlag >= 0) && Flags_GetSwitch(play, this->switchFlag)) {
|
||||
this->unk_28A = 5;
|
||||
if (this->animIndex != ENDAIKU2_ANIM_10) {
|
||||
EnDaiku2_ChangeAnim(this, ENDAIKU2_ANIM_10);
|
||||
|
@ -251,7 +251,7 @@ void func_80BE66E4(EnDaiku2* this, PlayState* play) {
|
|||
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.home.rot.y, 1, 0xBB8, 0x0);
|
||||
if (sp98 != 2) {
|
||||
if ((this->unk_278 >= ENDAIKU2_GET_7F_0) && Flags_GetSwitch(play, this->unk_278)) {
|
||||
if ((this->switchFlag >= 0) && Flags_GetSwitch(play, this->switchFlag)) {
|
||||
this->unk_28A = 5;
|
||||
if (this->animIndex != ENDAIKU2_ANIM_10) {
|
||||
EnDaiku2_ChangeAnim(this, ENDAIKU2_ANIM_10);
|
||||
|
@ -323,7 +323,7 @@ void func_80BE6B40(EnDaiku2* this, PlayState* play) {
|
|||
s32 day = gSaveContext.save.day;
|
||||
|
||||
this->unk_288 = 1;
|
||||
if ((day != 3) && Flags_GetSwitch(play, this->unk_278)) {
|
||||
if ((day != 3) && Flags_GetSwitch(play, this->switchFlag)) {
|
||||
this->actionFunc = func_80BE6BC0;
|
||||
} else {
|
||||
EnDaiku2_ChangeAnim(this, ENDAIKU2_ANIM_5);
|
||||
|
@ -433,7 +433,7 @@ void func_80BE6EF0(EnDaiku2* this, PlayState* play) {
|
|||
EnDaiku2_ChangeAnim(this, ENDAIKU2_ANIM_3);
|
||||
}
|
||||
|
||||
if ((this->unk_278 >= ENDAIKU2_GET_7F_0) && Flags_GetSwitch(play, this->unk_278)) {
|
||||
if ((this->switchFlag >= 0) && Flags_GetSwitch(play, this->switchFlag)) {
|
||||
this->unk_28A = 5;
|
||||
if (this->animIndex != ENDAIKU2_ANIM_10) {
|
||||
EnDaiku2_ChangeAnim(this, ENDAIKU2_ANIM_10);
|
||||
|
|
|
@ -8,18 +8,12 @@ struct EnDaiku2;
|
|||
|
||||
typedef void (*EnDaiku2ActionFunc)(struct EnDaiku2*, PlayState*);
|
||||
|
||||
#define ENDAIKU2_GET_7F(thisx) ((thisx)->params & 0x7F)
|
||||
#define ENDAIKU2_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define ENDAIKU2_GET_PATH_INDEX(thisx) (((thisx)->params >> 7) & 0x3F)
|
||||
#define ENDAIKU2_GET_8000(thisx) (((thisx)->params >> 15) & 0x1)
|
||||
|
||||
#define ENDAIKU2_PATH_INDEX_NONE 0x3F
|
||||
|
||||
typedef enum {
|
||||
/* -1 */ ENDAIKU2_GET_7F_MINUS1 = -1,
|
||||
/* 0 */ ENDAIKU2_GET_7F_0,
|
||||
/* 127 */ ENDAIKU2_GET_7F_127 = 127
|
||||
} EnDaiku2Param;
|
||||
|
||||
typedef struct EnDaiku2Effect {
|
||||
/* 0x00 */ u8 isEnabled;
|
||||
/* 0x04 */ Vec3f unk_04;
|
||||
|
@ -45,7 +39,7 @@ typedef struct EnDaiku2 {
|
|||
/* 0x268 */ Vec3f unk_268;
|
||||
/* 0x274 */ s16 unk_274;
|
||||
/* 0x276 */ s16 animIndex;
|
||||
/* 0x278 */ s16 unk_278;
|
||||
/* 0x278 */ s16 switchFlag;
|
||||
/* 0x27A */ s16 pathIndex;
|
||||
/* 0x27C */ UNK_TYPE1 unk_27C[0x4];
|
||||
/* 0x280 */ s32 unk_280;
|
||||
|
|
|
@ -425,7 +425,7 @@ void EnDoor_Init(Actor* thisx, PlayState* play2) {
|
|||
|
||||
this->doorType = ENDOOR_GET_TYPE(thisx);
|
||||
|
||||
this->switchFlag = ENDOOR_GET_PARAM_7F(thisx);
|
||||
this->switchFlag = ENDOOR_GET_SWITCH_FLAG(thisx);
|
||||
if ((this->doorType == ENDOOR_TYPE_7) && (this->switchFlag == 0)) {
|
||||
DynaPolyActor_Init(&this->knobDoor.dyna, 0);
|
||||
DynaPolyActor_LoadMesh(play, &this->knobDoor.dyna, &gDoorCol);
|
||||
|
|
|
@ -10,7 +10,7 @@ struct EnDoor;
|
|||
typedef void (*EnDoorActionFunc)(struct EnDoor*, PlayState*);
|
||||
|
||||
#define ENDOOR_GET_TYPE(thisx) (((thisx)->params >> 7) & 7)
|
||||
#define ENDOOR_GET_PARAM_7F(thisx) (((thisx)->params) & 0x7F)
|
||||
#define ENDOOR_GET_SWITCH_FLAG(thisx) (((thisx)->params) & 0x7F)
|
||||
|
||||
typedef enum EnDoorType {
|
||||
/* 0 */ ENDOOR_TYPE_0,
|
||||
|
|
|
@ -193,8 +193,8 @@ void func_80AC21A0(EnDoorEtc* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
if ((this->knobDoor.dyna.actor.textId == 0x239B) &&
|
||||
Flags_GetSwitch(play, ENDOORETC_GET_SWITCHFLAG(&this->knobDoor.dyna.actor))) {
|
||||
Flags_UnsetSwitch(play, ENDOORETC_GET_SWITCHFLAG(&this->knobDoor.dyna.actor));
|
||||
Flags_GetSwitch(play, ENDOORETC_GET_SWITCH_FLAG(&this->knobDoor.dyna.actor))) {
|
||||
Flags_UnsetSwitch(play, ENDOORETC_GET_SWITCH_FLAG(&this->knobDoor.dyna.actor));
|
||||
this->actionFunc = func_80AC2154;
|
||||
this->knobDoor.dyna.actor.textId = 0x1800; // "It won't budge!"
|
||||
this->unk_1F4 |= 1;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
struct EnDoorEtc;
|
||||
|
||||
#define ENDOORETC_GET_SWITCHFLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define ENDOORETC_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
|
||||
typedef void (*EnDoorEtcActionFunc)(struct EnDoorEtc*, PlayState*);
|
||||
|
||||
|
|
|
@ -481,7 +481,7 @@ void EnEgol_Init(Actor* thisx, PlayState* play) {
|
|||
EYEGORE_SET_SPH_DIM(this->bodyCollider.elements[4], 300, 200, 0, 25, 1.0f);
|
||||
EYEGORE_SET_SPH_DIM(this->bodyCollider.elements[5], 2100, -300, 0, 37, 1.0f);
|
||||
|
||||
this->switchFlag = EYEGORE_GET_SWITCH(&this->actor);
|
||||
this->switchFlag = EYEGORE_GET_SWITCH_FLAG(&this->actor);
|
||||
if (this->switchFlag == 0x7F) {
|
||||
this->switchFlag = -1;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ struct EnEgol;
|
|||
typedef void (*EnEgolActionFunc)(struct EnEgol*, PlayState*);
|
||||
|
||||
#define EYEGORE_GET_PATH_INDEX(thisx) ((thisx)->params & 0x3F)
|
||||
#define EYEGORE_GET_SWITCH(thisx) (((thisx)->params >> 6) & 0x7F)
|
||||
#define EYEGORE_GET_SWITCH_FLAG(thisx) (((thisx)->params >> 6) & 0x7F)
|
||||
|
||||
#define EYEGORE_PATH_INDEX_NONE 0x3F
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ void EnElfbub_Init(Actor* thisx, PlayState* play) {
|
|||
EnElfbub* this = THIS;
|
||||
Actor* childActor;
|
||||
|
||||
if (Flags_GetSwitch(play, ENELFBUB_GET_SWITCHFLAG(&this->actor))) {
|
||||
if (Flags_GetSwitch(play, ENELFBUB_GET_SWITCH_FLAG(&this->actor))) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ void EnElfbub_Init(Actor* thisx, PlayState* play) {
|
|||
childActor = Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_ELFORG, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y + 12.0f, this->actor.world.pos.z, this->actor.world.rot.x,
|
||||
this->actor.world.rot.y, this->actor.world.rot.z,
|
||||
STRAY_FAIRY_PARAMS(ENELFBUB_GET_SWITCHFLAG(&this->actor),
|
||||
STRAY_FAIRY_PARAMS(ENELFBUB_GET_SWITCH_FLAG(&this->actor),
|
||||
STRAY_FAIRY_AREA_CLOCK_TOWN, STRAY_FAIRY_TYPE_BUBBLE));
|
||||
if (childActor != NULL) {
|
||||
childActor->parent = &this->actor;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
#define ENELFBUB_GET_SWITCHFLAG(thisx) ((((thisx)->params) & 0xFE00) >> 9)
|
||||
#define ENELFBUB_GET_SWITCH_FLAG(thisx) ((((thisx)->params) & 0xFE00) >> 9)
|
||||
|
||||
struct EnElfbub;
|
||||
|
||||
|
|
|
@ -480,7 +480,7 @@ void func_80A3A398(EnElfgrp* this, PlayState* play) {
|
|||
if (CutsceneManager_IsNext(this->actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->actor.csId, &this->actor);
|
||||
this->actionFunc = func_80A3A274;
|
||||
Flags_UnsetSwitch(play, ENELFGRP_GET_SWITCHFLAG_PARAMS(&this->actor));
|
||||
Flags_UnsetSwitch(play, ENELFGRP_GET_SWITCH_FLAG_PARAMS(&this->actor));
|
||||
|
||||
if (this->stateFlags & ELFGRP_STATE_1) {
|
||||
Item_Give(play, ITEM_MASK_GREAT_FAIRY);
|
||||
|
@ -524,7 +524,7 @@ void func_80A3A520(EnElfgrp* this, PlayState* play) {
|
|||
} else if (CutsceneManager_IsNext(this->actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->actor.csId, &this->actor);
|
||||
this->actionFunc = func_80A3A4AC;
|
||||
Flags_SetSwitch(play, ENELFGRP_GET_SWITCHFLAG_PARAMS(&this->actor));
|
||||
Flags_SetSwitch(play, ENELFGRP_GET_SWITCH_FLAG_PARAMS(&this->actor));
|
||||
|
||||
if (this->stateFlags & ELFGRP_STATE_1) {
|
||||
Item_Give(play, ITEM_MASK_GREAT_FAIRY);
|
||||
|
|
|
@ -9,7 +9,7 @@ struct EnElfgrp;
|
|||
typedef void (*EnElfgrpActionFunc)(struct EnElfgrp*, PlayState*);
|
||||
|
||||
#define ENELFGRP_GET_TYPE(thisx) ((thisx)->params & 0xF) //!< Same type as Great Fairies
|
||||
#define ENELFGRP_GET_SWITCHFLAG_PARAMS(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
#define ENELFGRP_GET_SWITCH_FLAG_PARAMS(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
#define ENELFGRP_GET_SWITCHFLAG_ROT(thisx) ((thisx)->home.rot.z)
|
||||
|
||||
typedef enum ElfgrpType {
|
||||
|
|
|
@ -87,7 +87,7 @@ void EnElforg_Init(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
|
||||
case STRAY_FAIRY_TYPE_COLLECTIBLE:
|
||||
if (Flags_GetCollectible(play, STRAY_FAIRY_FLAG(thisx))) {
|
||||
if (Flags_GetCollectible(play, STRAY_FAIRY_GET_FLAG(thisx))) {
|
||||
Actor_Kill(thisx);
|
||||
return;
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ void EnElforg_Init(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
|
||||
default:
|
||||
if (Flags_GetSwitch(play, STRAY_FAIRY_FLAG(thisx))) {
|
||||
if (Flags_GetSwitch(play, STRAY_FAIRY_GET_FLAG(thisx))) {
|
||||
Actor_Kill(thisx);
|
||||
return;
|
||||
}
|
||||
|
@ -475,15 +475,15 @@ void EnElforg_FreeFloating(EnElforg* this, PlayState* play) {
|
|||
|
||||
switch (STRAY_FAIRY_TYPE(&this->actor)) {
|
||||
case STRAY_FAIRY_TYPE_COLLECTIBLE:
|
||||
Flags_SetCollectible(play, STRAY_FAIRY_FLAG(&this->actor));
|
||||
Flags_SetCollectible(play, STRAY_FAIRY_GET_FLAG(&this->actor));
|
||||
break;
|
||||
|
||||
case STRAY_FAIRY_TYPE_CHEST:
|
||||
Flags_SetTreasure(play, STRAY_FAIRY_FLAG(&this->actor));
|
||||
Flags_SetTreasure(play, STRAY_FAIRY_GET_FLAG(&this->actor));
|
||||
break;
|
||||
|
||||
default:
|
||||
Flags_SetSwitch(play, STRAY_FAIRY_FLAG(&this->actor));
|
||||
Flags_SetSwitch(play, STRAY_FAIRY_GET_FLAG(&this->actor));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#define STRAY_FAIRY_TYPE(thisx) ((thisx)->params & 0xF)
|
||||
#define STRAY_FAIRY_GET_NON_DUNGEON_AREA(thisx) (((thisx)->params & 0x1C0) >> 6)
|
||||
#define STRAY_FAIRY_FLAG(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
#define STRAY_FAIRY_GET_FLAG(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
#define STRAY_FAIRY_SPARKLE_COUNT(thisx) ((thisx)->home.rot.x)
|
||||
|
||||
//! @note `nonDungeonArea` does not always use the enum
|
||||
|
|
|
@ -29,7 +29,7 @@ ActorInit En_Fr_InitVars = {
|
|||
void EnFr_Init(Actor* thisx, PlayState* play) {
|
||||
EnFr* this = THIS;
|
||||
|
||||
if (Flags_GetSwitch(play, ENFR_GET_SWITCHFLAG(&this->actor))) {
|
||||
if (Flags_GetSwitch(play, ENFR_GET_SWITCH_FLAG(&this->actor))) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ void EnFr_Destroy(Actor* thisx, PlayState* play) {
|
|||
void EnFr_Update(Actor* thisx, PlayState* play) {
|
||||
EnFr* this = THIS;
|
||||
|
||||
if (Flags_GetSwitch(play, ENFR_GET_SWITCHFLAG(&this->actor))) {
|
||||
if (Flags_GetSwitch(play, ENFR_GET_SWITCH_FLAG(&this->actor))) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
struct EnFr;
|
||||
|
||||
#define ENFR_GET_SWITCHFLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define ENFR_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define ENFR_GET_TARGETMODE(thisx) (((thisx)->params >> 7) & 0xF)
|
||||
|
||||
typedef struct EnFr {
|
||||
|
|
|
@ -681,7 +681,7 @@ void func_80B10A48(EnGb2* this, PlayState* play) {
|
|||
case ENGB2_7_2:
|
||||
CutsceneManager_Stop(this->csIdList[this->csIdIndex]);
|
||||
if (this->unk_26E == 0x14FB) {
|
||||
Flags_SetSwitch(play, ENGB2_GET_7F8(&this->actor));
|
||||
Flags_SetSwitch(play, ENGB2_GET_SWITCH_FLAG(&this->actor));
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
@ -752,7 +752,7 @@ void func_80B10DAC(EnGb2* this, PlayState* play) {
|
|||
if (this->csIdIndex != 2) {
|
||||
this->actionFunc = func_80B10E98;
|
||||
} else {
|
||||
Flags_SetSwitch(play, ENGB2_GET_7F8(&this->actor));
|
||||
Flags_SetSwitch(play, ENGB2_GET_SWITCH_FLAG(&this->actor));
|
||||
this->actionFunc = func_80B10868;
|
||||
}
|
||||
} else {
|
||||
|
@ -776,7 +776,7 @@ void func_80B10E98(EnGb2* this, PlayState* play) {
|
|||
if ((this->unk_26E != 0x14E8) && (this->unk_26E != 0x14EA)) {
|
||||
CutsceneManager_Stop(this->csIdList[this->csIdIndex]);
|
||||
this->actionFunc = func_80B10B5C;
|
||||
} else if (Flags_GetSwitch(play, ENGB2_GET_7F8(&this->actor))) {
|
||||
} else if (Flags_GetSwitch(play, ENGB2_GET_SWITCH_FLAG(&this->actor))) {
|
||||
this->actionFunc = func_80B10A48;
|
||||
} else {
|
||||
CutsceneManager_Stop(this->csIdList[this->csIdIndex]);
|
||||
|
@ -936,7 +936,7 @@ void EnGb2_Init(Actor* thisx, PlayState* play) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (Flags_GetSwitch(play, ENGB2_GET_7F8(thisx))) {
|
||||
if (Flags_GetSwitch(play, ENGB2_GET_SWITCH_FLAG(thisx))) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
@ -950,7 +950,7 @@ void EnGb2_Init(Actor* thisx, PlayState* play) {
|
|||
case ENGB2_7_2:
|
||||
this->csIdIndex = 0;
|
||||
this->csIdList[0] = this->actor.csId;
|
||||
if (Flags_GetSwitch(play, ENGB2_GET_7F8(thisx))) {
|
||||
if (Flags_GetSwitch(play, ENGB2_GET_SWITCH_FLAG(thisx))) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ struct EnGb2;
|
|||
typedef void (*EnGb2ActionFunc)(struct EnGb2*, PlayState*);
|
||||
|
||||
#define ENGB2_GET_7(thisx) ((thisx)->params & 7)
|
||||
#define ENGB2_GET_7F8(thisx) (((thisx)->params & 0x7F8) >> 3)
|
||||
#define ENGB2_GET_SWITCH_FLAG(thisx) (((thisx)->params & 0x7F8) >> 3)
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ ENGB2_7_0,
|
||||
|
|
|
@ -296,7 +296,7 @@ s32 func_80B50854(EnGk* this, PlayState* play) {
|
|||
|
||||
if ((player->transformation == PLAYER_FORM_GORON) && (play->msgCtx.ocarinaMode == OCARINA_MODE_EVENT) &&
|
||||
(play->msgCtx.lastPlayedSong == OCARINA_SONG_GORON_LULLABY)) {
|
||||
Flags_SetSwitch(play, ENGK_GET_3F00(&this->actor));
|
||||
Flags_SetSwitch(play, ENGK_GET_SWITCH_FLAG(&this->actor));
|
||||
this->animIndex = ENGK_ANIM_3;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGK_ANIM_3);
|
||||
this->actionFunc = func_80B521E8;
|
||||
|
@ -612,7 +612,7 @@ void func_80B51510(EnGk* this, PlayState* play) {
|
|||
break;
|
||||
|
||||
case 7:
|
||||
Flags_SetSwitch(play, ENGK_GET_3F00(&this->actor));
|
||||
Flags_SetSwitch(play, ENGK_GET_SWITCH_FLAG(&this->actor));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -673,7 +673,7 @@ void func_80B51760(EnGk* this, PlayState* play) {
|
|||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
}
|
||||
} else {
|
||||
if (Flags_GetSwitch(play, ENGK_GET_3F00(&this->actor))) {
|
||||
if (Flags_GetSwitch(play, ENGK_GET_SWITCH_FLAG(&this->actor))) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_40_40);
|
||||
this->actionFunc = func_80B51D9C;
|
||||
return;
|
||||
|
@ -1070,7 +1070,7 @@ void EnGk_Init(Actor* thisx, PlayState* play) {
|
|||
this->animIndex = ENGK_ANIM_5;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGK_ANIM_5);
|
||||
if (play->sceneId == SCENE_17SETUGEN2) {
|
||||
if (Flags_GetSwitch(play, ENGK_GET_3F00(&this->actor))) {
|
||||
if (Flags_GetSwitch(play, ENGK_GET_SWITCH_FLAG(&this->actor))) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ typedef void (*EnGkActionFunc)(struct EnGk*, PlayState*);
|
|||
|
||||
#define ENGK_GET_F(thisx) ((thisx)->params & 0xF)
|
||||
#define ENGK_GET_PATH_INDEX(thisx) (((thisx)->params & 0xF0) >> 4)
|
||||
#define ENGK_GET_3F00(thisx) (((thisx)->params & 0x3F00) >> 8)
|
||||
#define ENGK_GET_SWITCH_FLAG(thisx) (((thisx)->params & 0x3F00) >> 8)
|
||||
|
||||
#define ENGK_PATH_INDEX_NONE 0xF
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ void EnGs_Init(Actor* thisx, PlayState* play) {
|
|||
this->unk_204 = 1;
|
||||
this->unk_198 = this->actor.world.rot.z;
|
||||
this->unk_195 = ENGS_GET_1F(thisx);
|
||||
this->unk_196 = ENGS_GET_FE0(thisx);
|
||||
this->switchFlag = ENGS_GET_SWITCH_FLAG(thisx);
|
||||
this->actor.params = ENGS_GET_F000(thisx);
|
||||
this->actor.world.rot.z = 0;
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
|
@ -287,22 +287,22 @@ void func_8099807C(EnGs* this, PlayState* play) {
|
|||
switch (play->msgCtx.lastPlayedSong) {
|
||||
case OCARINA_SONG_HEALING:
|
||||
case OCARINA_SONG_EPONAS:
|
||||
if (!Flags_GetSwitch(play, this->unk_196)) {
|
||||
if (!Flags_GetSwitch(play, this->switchFlag)) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y + 40.0f, this->actor.world.pos.z, 0, 0, 0,
|
||||
FAIRY_PARAMS(FAIRY_TYPE_2, false, 0));
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_BUTTERFRY_TO_FAIRY);
|
||||
Flags_SetSwitch(play, this->unk_196);
|
||||
Flags_SetSwitch(play, this->switchFlag);
|
||||
}
|
||||
break;
|
||||
|
||||
case OCARINA_SONG_STORMS:
|
||||
if (!Flags_GetSwitch(play, this->unk_196)) {
|
||||
if (!Flags_GetSwitch(play, this->switchFlag)) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y + 40.0f, this->actor.world.pos.z, 0, 0, 0,
|
||||
FAIRY_PARAMS(FAIRY_TYPE_7, false, 0));
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_BUTTERFRY_TO_FAIRY);
|
||||
Flags_SetSwitch(play, this->unk_196);
|
||||
Flags_SetSwitch(play, this->switchFlag);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ struct EnGs;
|
|||
typedef void (*EnGsActionFunc)(struct EnGs*, PlayState*);
|
||||
|
||||
#define ENGS_GET_1F(thisx) ((thisx)->params & 0x1F)
|
||||
#define ENGS_GET_FE0(thisx) (((thisx)->params >> 5) & 0x7F)
|
||||
#define ENGS_GET_SWITCH_FLAG(thisx) (((thisx)->params >> 5) & 0x7F)
|
||||
#define ENGS_GET_F000(thisx) (((thisx)->params >> 0xC) & 0xF)
|
||||
|
||||
typedef enum {
|
||||
|
@ -24,7 +24,7 @@ typedef struct EnGs {
|
|||
/* 0x190 */ EnGsActionFunc actionFunc;
|
||||
/* 0x194 */ s8 unk_194;
|
||||
/* 0x195 */ u8 unk_195;
|
||||
/* 0x196 */ u8 unk_196;
|
||||
/* 0x196 */ u8 switchFlag;
|
||||
/* 0x197 */ s8 unk_197;
|
||||
/* 0x198 */ s16 unk_198;
|
||||
/* 0x19A */ s16 unk_19A;
|
||||
|
|
|
@ -113,7 +113,7 @@ void EnHiddenNuts_Init(Actor* thisx, PlayState* play) {
|
|||
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
|
||||
this->pathIndex = ENHIDDENNUTS_GET_PATH_INDEX(&this->actor);
|
||||
this->switchFlag = ENHIDDENNUTS_GET_SWITCHFLAG(&this->actor);
|
||||
this->switchFlag = ENHIDDENNUTS_GET_SWITCH_FLAG(&this->actor);
|
||||
|
||||
if (this->switchFlag == 0x7F) {
|
||||
this->switchFlag = -1;
|
||||
|
|
|
@ -8,7 +8,7 @@ struct EnHiddenNuts;
|
|||
|
||||
typedef void (*EnHiddenNutsActionFunc)(struct EnHiddenNuts*, PlayState*);
|
||||
|
||||
#define ENHIDDENNUTS_GET_SWITCHFLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define ENHIDDENNUTS_GET_SWITCH_FLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define ENHIDDENNUTS_GET_PATH_INDEX(thisx) (((thisx)->params >> 7) & 0x1F)
|
||||
|
||||
#define ENHIDDENNUTS_PATH_INDEX_NONE 0x1F
|
||||
|
|
|
@ -56,7 +56,7 @@ void EnHitTag_Init(Actor* thisx, PlayState* play) {
|
|||
this->actionFunc = EnHitTag_WaitForHit;
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
if (Flags_GetSwitch(play, ENHITTAG_GET_SWITCHFLAG(thisx))) {
|
||||
if (Flags_GetSwitch(play, ENHITTAG_GET_SWITCH_FLAG(thisx))) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ struct EnHitTag;
|
|||
|
||||
typedef void (*EnHitTagActionFunc)(struct EnHitTag*, PlayState*);
|
||||
|
||||
#define ENHITTAG_GET_SWITCHFLAG(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
#define ENHITTAG_GET_SWITCH_FLAG(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
|
||||
typedef struct EnHitTag {
|
||||
/* 0x000 */ Actor actor;
|
||||
|
|
|
@ -80,8 +80,8 @@ void func_80C2590C(EnInvisibleRuppe* this, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (this->unk_190 >= 0) {
|
||||
Flags_SetSwitch(play, this->unk_190);
|
||||
if (this->switchFlag >= 0) {
|
||||
Flags_SetSwitch(play, this->switchFlag);
|
||||
}
|
||||
|
||||
this->actionFunc = func_80C259E8;
|
||||
|
@ -96,13 +96,13 @@ void EnInvisibleRuppe_Init(Actor* thisx, PlayState* play) {
|
|||
s32 pad;
|
||||
EnInvisibleRuppe* this = THIS;
|
||||
|
||||
this->unk_190 = INVISIBLERUPPE_GET_1FC(&this->actor);
|
||||
this->switchFlag = INVISIBLERUPPE_GET_SWITCH_FLAG(&this->actor);
|
||||
|
||||
if (this->unk_190 == 0x7F) {
|
||||
this->unk_190 = -1;
|
||||
if (this->switchFlag == 0x7F) {
|
||||
this->switchFlag = -1;
|
||||
}
|
||||
|
||||
if ((this->unk_190 >= 0) && Flags_GetSwitch(play, this->unk_190)) {
|
||||
if ((this->switchFlag >= 0) && Flags_GetSwitch(play, this->switchFlag)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -8,12 +8,12 @@ struct EnInvisibleRuppe;
|
|||
typedef void (*EnInvisibleRuppeActionFunc)(struct EnInvisibleRuppe*, PlayState*);
|
||||
|
||||
#define INVISIBLERUPPE_GET_3(thisx) ((thisx)->params & 3)
|
||||
#define INVISIBLERUPPE_GET_1FC(thisx) (((thisx)->params & 0x1FC) >> 2)
|
||||
#define INVISIBLERUPPE_GET_SWITCH_FLAG(thisx) (((thisx)->params & 0x1FC) >> 2)
|
||||
|
||||
typedef struct EnInvisibleRuppe {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ ColliderCylinder collider;
|
||||
/* 0x190 */ s16 unk_190;
|
||||
/* 0x190 */ s16 switchFlag;
|
||||
/* 0x192 */ s16 unk_192;
|
||||
/* 0x194 */ EnInvisibleRuppeActionFunc actionFunc;
|
||||
} EnInvisibleRuppe; // size = 0x198
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue