1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 22:44:30 +00:00

Use defines for actor flags (#873)

* Add ACTOR_FLAG_ defines

* Add ACTOR_FLAGS_ALL macro and use ACTOR_FLAG_* constants everywhere

* Remove unused ACTOR_FLAG_* constants

* actor flags in bigokuta & ko

* actor flags in obj_mure

* actor flags in stalfos, twinrova & ganon2

* actor flags in morpha & barinade

* name some previously missed actor flags

* found some comments using hex for actor flags

* Actor flags in ovl_En_Ganon_Mant

* Actor flags in EnWf

* Flags in en_zf

* Actor flags in BossGanon (FeelsOKMan)

* Remove `ACTOR_FLAG_NONE`

* Wrap expansion of `FLAGS` in parentheses

* `ACTOR_FLAGS_ALL` -> `CHECK_FLAG_ALL`

* Move `CHECK_FLAG_ALL` to `macros.h`

* Run formatter
This commit is contained in:
Dragorn421 2021-12-06 01:11:38 +01:00 committed by GitHub
parent 79220ba58a
commit a9284494f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
439 changed files with 1342 additions and 1304 deletions

View file

@ -77,6 +77,8 @@
#define CHECK_BTN_ALL(state, combo) (~((state) | ~(combo)) == 0) #define CHECK_BTN_ALL(state, combo) (~((state) | ~(combo)) == 0)
#define CHECK_BTN_ANY(state, combo) (((state) & (combo)) != 0) #define CHECK_BTN_ANY(state, combo) (((state) & (combo)) != 0)
#define CHECK_FLAG_ALL(flags, mask) (((flags) & (mask)) == (mask))
#define LOG(exp, value, format, file, line) \ #define LOG(exp, value, format, file, line) \
do { \ do { \

View file

@ -100,6 +100,35 @@ typedef struct {
/* 0x18 */ Vec3f feetPos[2]; // Update by using `Actor_SetFeetPos` in PostLimbDraw /* 0x18 */ Vec3f feetPos[2]; // Update by using `Actor_SetFeetPos` in PostLimbDraw
} ActorShape; // size = 0x30 } ActorShape; // size = 0x30
#define ACTOR_FLAG_0 (1 << 0)
#define ACTOR_FLAG_2 (1 << 2)
#define ACTOR_FLAG_3 (1 << 3)
#define ACTOR_FLAG_4 (1 << 4)
#define ACTOR_FLAG_5 (1 << 5)
#define ACTOR_FLAG_6 (1 << 6)
#define ACTOR_FLAG_7 (1 << 7)
#define ACTOR_FLAG_8 (1 << 8)
#define ACTOR_FLAG_9 (1 << 9)
#define ACTOR_FLAG_10 (1 << 10)
#define ACTOR_FLAG_11 (1 << 11)
#define ACTOR_FLAG_12 (1 << 12)
#define ACTOR_FLAG_13 (1 << 13)
#define ACTOR_FLAG_14 (1 << 14)
#define ACTOR_FLAG_15 (1 << 15)
#define ACTOR_FLAG_16 (1 << 16)
#define ACTOR_FLAG_17 (1 << 17)
#define ACTOR_FLAG_18 (1 << 18)
#define ACTOR_FLAG_19 (1 << 19)
#define ACTOR_FLAG_20 (1 << 20)
#define ACTOR_FLAG_21 (1 << 21)
#define ACTOR_FLAG_22 (1 << 22)
#define ACTOR_FLAG_23 (1 << 23)
#define ACTOR_FLAG_24 (1 << 24)
#define ACTOR_FLAG_25 (1 << 25)
#define ACTOR_FLAG_26 (1 << 26)
#define ACTOR_FLAG_27 (1 << 27)
#define ACTOR_FLAG_28 (1 << 28)
typedef struct Actor { typedef struct Actor {
/* 0x000 */ s16 id; // Actor ID /* 0x000 */ s16 id; // Actor ID
/* 0x002 */ u8 category; // Actor category. Refer to the corresponding enum for values /* 0x002 */ u8 category; // Actor category. Refer to the corresponding enum for values

View file

@ -62,7 +62,7 @@ void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId) {
if (dynaActor != NULL) { if (dynaActor != NULL) {
func_800434A8(dynaActor); func_800434A8(dynaActor);
if ((actor->flags & 0x4000000) == 0x4000000) { if (CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_26)) {
func_80043538(dynaActor); func_80043538(dynaActor);
} }
} }

View file

@ -1300,8 +1300,9 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
DbCamera_SetTextValue(dbCamera->sub.lookAt[dbCamera->sub.unkIdx].cameraRoll, &D_8012D084[10], 3); DbCamera_SetTextValue(dbCamera->sub.lookAt[dbCamera->sub.unkIdx].cameraRoll, &D_8012D084[10], 3);
func_8006376C(0x10, 0x16, (dbCamera->sub.unk_0A == 2) ? 7 : 4, D_8012D084); func_8006376C(0x10, 0x16, (dbCamera->sub.unk_0A == 2) ? 7 : 4, D_8012D084);
func_8006376C(0xF, 0x17, (dbCamera->sub.unk_0A == 3) ? 7 : 4, func_8006376C(0xF, 0x17, (dbCamera->sub.unk_0A == 3) ? 7 : 4,
(dbCamera->sub.mode == 1) ? D_8012CF14 (dbCamera->sub.mode == 1) ? D_8012CF14
: (dbCamera->sub.mode == 0) ? *D_8012CF18 : D_8012CFB0); : (dbCamera->sub.mode == 0) ? *D_8012CF18
: D_8012CFB0);
if (dbCamera->sub.unk_0C) { if (dbCamera->sub.unk_0C) {
D_8012D05C[80] = '>'; D_8012D05C[80] = '>';
} else { } else {
@ -1326,9 +1327,9 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
if (dbCamera->sub.mode != 1) { if (dbCamera->sub.mode != 1) {
func_8006376C(3, 0x16, func_8006376C(3, 0x16,
((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && !D_80161144) ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && !D_80161144) ? 7
? 7 : !D_80161144 ? 4
: !D_80161144 ? 4 : 3, : 3,
D_8012CF30); D_8012CF30);
sp110 = 'X'; sp110 = 'X';
DbCamera_SetTextValue(dbCamera->at.x, &sp111, 6); DbCamera_SetTextValue(dbCamera->at.x, &sp111, 6);
@ -1339,10 +1340,11 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
sp110 = 'Z'; sp110 = 'Z';
DbCamera_SetTextValue(dbCamera->at.z, &sp111, 6); DbCamera_SetTextValue(dbCamera->at.z, &sp111, 6);
func_8006376C(3, 0x19, 2, &sp110); func_8006376C(3, 0x19, 2, &sp110);
func_8006376C( func_8006376C(0x1E, 0x16,
0x1E, 0x16, ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && D_80161144) ? 7
((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && D_80161144) ? 7 : D_80161144 ? 4 : 3, : D_80161144 ? 4
D_8012CF34); : 3,
D_8012CF34);
sp110 = 'X'; sp110 = 'X';
DbCamera_SetTextValue(dbCamera->eye.x, &sp111, 6); DbCamera_SetTextValue(dbCamera->eye.x, &sp111, 6);
func_8006376C(0x1E, 0x17, 2, &sp110); func_8006376C(0x1E, 0x17, 2, &sp110);
@ -1357,9 +1359,9 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
OLib_Vec3fDiffToVecSphGeo(&spFC, sp90, sp7C); OLib_Vec3fDiffToVecSphGeo(&spFC, sp90, sp7C);
spFC.yaw -= cam->playerPosRot.rot.y; spFC.yaw -= cam->playerPosRot.rot.y;
func_8006376C(3, 0x16, func_8006376C(3, 0x16,
((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && !D_80161144) ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && !D_80161144) ? 7
? 7 : !D_80161144 ? 4
: !D_80161144 ? 4 : 3, : 3,
D_8012CF30); D_8012CF30);
DbCamera_SetTextValue(spFC.pitch * 0.00549325f, &D_8012D0E4[10], 4); DbCamera_SetTextValue(spFC.pitch * 0.00549325f, &D_8012D0E4[10], 4);
func_8006376C(3, 0x17, 3, D_8012D0E4); func_8006376C(3, 0x17, 3, D_8012D0E4);
@ -1369,10 +1371,11 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
func_8006376C(3, 0x19, 3, D_8012D0D4); func_8006376C(3, 0x19, 3, D_8012D0D4);
OLib_Vec3fDiffToVecSphGeo(&spFC, sp90, sp80); OLib_Vec3fDiffToVecSphGeo(&spFC, sp90, sp80);
spFC.yaw -= cam->playerPosRot.rot.y; spFC.yaw -= cam->playerPosRot.rot.y;
func_8006376C( func_8006376C(0x1E, 0x16,
0x1E, 0x16, ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && D_80161144) ? 7
((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && D_80161144) ? 7 : D_80161144 ? 4 : 3, : D_80161144 ? 4
D_8012CF34); : 3,
D_8012CF34);
DbCamera_SetTextValue(spFC.pitch * 0.00549325f, &D_8012D0E4[10], 4); DbCamera_SetTextValue(spFC.pitch * 0.00549325f, &D_8012D0E4[10], 4);
func_8006376C(0x1C, 0x17, 3, D_8012D0E4); func_8006376C(0x1C, 0x17, 3, D_8012D0E4);
DbCamera_SetTextValue(spFC.yaw * 0.00549325f, &D_8012D0F8[10], 4); DbCamera_SetTextValue(spFC.yaw * 0.00549325f, &D_8012D0F8[10], 4);

View file

@ -710,11 +710,10 @@ void UCodeDisas_Disassemble(UCodeDisas* this, GfxMod* ptr) {
Gfillrect setscissor = ptr->fillrect; Gfillrect setscissor = ptr->fillrect;
const char* modeStr; const char* modeStr;
modeStr = (setscissor.pad == G_SC_NON_INTERLACE) modeStr = (setscissor.pad == G_SC_NON_INTERLACE) ? "G_SC_NON_INTERLACE"
? "G_SC_NON_INTERLACE" : (setscissor.pad == G_SC_ODD_INTERLACE) ? "G_SC_ODD_INTERLACE"
: (setscissor.pad == G_SC_ODD_INTERLACE) : (setscissor.pad == G_SC_EVEN_INTERLACE) ? "G_SC_EVEN_INTERLACE"
? "G_SC_ODD_INTERLACE" : "???";
: (setscissor.pad == G_SC_EVEN_INTERLACE) ? "G_SC_EVEN_INTERLACE" : "???";
if ((setscissor.x0frac | setscissor.y0frac | setscissor.x1frac | setscissor.y1frac)) { if ((setscissor.x0frac | setscissor.y0frac | setscissor.x1frac | setscissor.y1frac)) {
if (1) {} if (1) {}
@ -740,12 +739,15 @@ void UCodeDisas_Disassemble(UCodeDisas* this, GfxMod* ptr) {
u32 siz = ((curGfx->words.w0 & 0x180000) >> 0x13) & 0xFF; u32 siz = ((curGfx->words.w0 & 0x180000) >> 0x13) & 0xFF;
DISAS_LOG("gsDPSetColorImage(G_IM_FMT_%s, G_IM_SIZ_%s, %d, 0x%08x(0x%08x) ),", DISAS_LOG("gsDPSetColorImage(G_IM_FMT_%s, G_IM_SIZ_%s, %d, 0x%08x(0x%08x) ),",
(fmt == G_IM_FMT_RGBA) (fmt == G_IM_FMT_RGBA) ? "RGBA"
? "RGBA" : (fmt == G_IM_FMT_YUV) ? "YUV"
: (fmt == G_IM_FMT_YUV) ? "YUV" : (fmt == G_IM_FMT_CI) ? "CI"
: (fmt == G_IM_FMT_CI) ? "CI" : (fmt == G_IM_FMT_IA) ? "IA" : "I", : (fmt == G_IM_FMT_IA) ? "IA"
(siz == G_IM_SIZ_4b) ? "4b" : "I",
: (siz == G_IM_SIZ_8b) ? "8b" : (siz == G_IM_SIZ_16b) ? "16b" : "32b", (siz == G_IM_SIZ_4b) ? "4b"
: (siz == G_IM_SIZ_8b) ? "8b"
: (siz == G_IM_SIZ_16b) ? "16b"
: "32b",
(curGfx->dma.len & 0xFFF) + 1, curGfx->setimg.dram, addr); (curGfx->dma.len & 0xFFF) + 1, curGfx->setimg.dram, addr);
if (this->pipeSyncRequired) { if (this->pipeSyncRequired) {
@ -768,12 +770,15 @@ void UCodeDisas_Disassemble(UCodeDisas* this, GfxMod* ptr) {
u32 siz = ((curGfx->words.w0 & 0x180000) >> 0x13) & 0xFF; u32 siz = ((curGfx->words.w0 & 0x180000) >> 0x13) & 0xFF;
DISAS_LOG("gsDPSetTextureImage(G_IM_FMT_%s, G_IM_SIZ_%s, %d, 0x%08x(0x%08x)),", DISAS_LOG("gsDPSetTextureImage(G_IM_FMT_%s, G_IM_SIZ_%s, %d, 0x%08x(0x%08x)),",
(fmt == G_IM_FMT_RGBA) (fmt == G_IM_FMT_RGBA) ? "RGBA"
? "RGBA" : (fmt == G_IM_FMT_YUV) ? "YUV"
: (fmt == G_IM_FMT_YUV) ? "YUV" : (fmt == G_IM_FMT_CI) ? "CI"
: (fmt == G_IM_FMT_CI) ? "CI" : (fmt == G_IM_FMT_IA) ? "IA" : "I", : (fmt == G_IM_FMT_IA) ? "IA"
(siz == G_IM_SIZ_4b) ? "4b" : "I",
: (siz == G_IM_SIZ_8b) ? "8b" : (siz == G_IM_SIZ_16b) ? "16b" : "32b", (siz == G_IM_SIZ_4b) ? "4b"
: (siz == G_IM_SIZ_8b) ? "8b"
: (siz == G_IM_SIZ_16b) ? "16b"
: "32b",
(curGfx->dma.len & 0xFFF) + 1, curGfx->setimg.dram, addr); (curGfx->dma.len & 0xFFF) + 1, curGfx->setimg.dram, addr);
} break; } break;
@ -989,15 +994,11 @@ void UCodeDisas_Disassemble(UCodeDisas* this, GfxMod* ptr) {
case G_MODIFYVTX: { case G_MODIFYVTX: {
DISAS_LOG("gsSPModifyVertex(%d, %s, %08x),", curGfx->dma.par, DISAS_LOG("gsSPModifyVertex(%d, %s, %08x),", curGfx->dma.par,
(curGfx->dma.len == G_MWO_POINT_RGBA) (curGfx->dma.len == G_MWO_POINT_RGBA) ? "G_MWO_POINT_RGBA"
? "G_MWO_POINT_RGBA" : (curGfx->dma.len == G_MWO_POINT_ST) ? "G_MWO_POINT_ST"
: (curGfx->dma.len == G_MWO_POINT_ST) : (curGfx->dma.len == G_MWO_POINT_XYSCREEN) ? "G_MWO_POINT_XYSCREEN"
? "G_MWO_POINT_ST" : (curGfx->dma.len == G_MWO_POINT_ZSCREEN) ? "G_MWO_POINT_ZSCREEN"
: (curGfx->dma.len == G_MWO_POINT_XYSCREEN) : "G_MWO_POINT_????",
? "G_MWO_POINT_XYSCREEN"
: (curGfx->dma.len == G_MWO_POINT_ZSCREEN)
? "G_MWO_POINT_ZSCREEN"
: "G_MWO_POINT_????",
curGfx->dma.addr); curGfx->dma.addr);
this->vtxCnt += curGfx->dma.par; this->vtxCnt += curGfx->dma.par;
this->spvtxCnt++; this->spvtxCnt++;

View file

@ -391,7 +391,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) {
} }
actor = targetCtx->unk_94; actor = targetCtx->unk_94;
if ((actor != NULL) && !(actor->flags & 0x8000000)) { if ((actor != NULL) && !(actor->flags & ACTOR_FLAG_27)) {
NaviColor* naviColor = &sNaviColorList[actor->category]; NaviColor* naviColor = &sNaviColorList[actor->category];
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x7); POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x7);
@ -484,7 +484,8 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Gl
targetCtx->unk_48 = 0; targetCtx->unk_48 = 0;
} }
lockOnSfxId = ((actorArg->flags & 5) == 5) ? NA_SE_SY_LOCK_ON : NA_SE_SY_LOCK_ON_HUMAN; lockOnSfxId = CHECK_FLAG_ALL(actorArg->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2) ? NA_SE_SY_LOCK_ON
: NA_SE_SY_LOCK_ON_HUMAN;
func_80078884(lockOnSfxId); func_80078884(lockOnSfxId);
} }
@ -762,7 +763,7 @@ s32 func_8002D53C(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
void Actor_Kill(Actor* actor) { void Actor_Kill(Actor* actor) {
actor->draw = NULL; actor->draw = NULL;
actor->update = NULL; actor->update = NULL;
actor->flags &= ~0x1; actor->flags &= ~ACTOR_FLAG_0;
} }
void Actor_SetWorldToHome(Actor* actor) { void Actor_SetWorldToHome(Actor* actor) {
@ -999,8 +1000,8 @@ void func_8002DE04(GlobalContext* globalCtx, Actor* actorA, Actor* actorB) {
hookshot->grabbedDistDiff.x = 0.0f; hookshot->grabbedDistDiff.x = 0.0f;
hookshot->grabbedDistDiff.y = 0.0f; hookshot->grabbedDistDiff.y = 0.0f;
hookshot->grabbedDistDiff.z = 0.0f; hookshot->grabbedDistDiff.z = 0.0f;
actorB->flags |= 0x2000; actorB->flags |= ACTOR_FLAG_13;
actorA->flags &= ~0x2000; actorA->flags &= ~ACTOR_FLAG_13;
} }
void func_8002DE74(GlobalContext* globalCtx, Player* player) { void func_8002DE74(GlobalContext* globalCtx, Player* player) {
@ -1435,7 +1436,7 @@ f32 func_8002EFC0(Actor* actor, Player* player, s16 arg2) {
s16 yawTempAbs = ABS(yawTemp); s16 yawTempAbs = ABS(yawTemp);
if (player->unk_664 != NULL) { if (player->unk_664 != NULL) {
if ((yawTempAbs > 0x4000) || (actor->flags & 0x8000000)) { if ((yawTempAbs > 0x4000) || (actor->flags & ACTOR_FLAG_27)) {
return FLT_MAX; return FLT_MAX;
} else { } else {
f32 ret = f32 ret =
@ -1471,7 +1472,7 @@ u32 func_8002F090(Actor* actor, f32 arg1) {
} }
s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) { s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) {
if ((actor->update == NULL) || !(actor->flags & 1)) { if ((actor->update == NULL) || !(actor->flags & ACTOR_FLAG_0)) {
return true; return true;
} }
@ -1493,8 +1494,8 @@ s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) {
} }
u32 Actor_ProcessTalkRequest(Actor* actor, GlobalContext* globalCtx) { u32 Actor_ProcessTalkRequest(Actor* actor, GlobalContext* globalCtx) {
if (actor->flags & 0x100) { if (actor->flags & ACTOR_FLAG_8) {
actor->flags &= ~0x100; actor->flags &= ~ACTOR_FLAG_8;
return true; return true;
} }
@ -1505,7 +1506,7 @@ s32 func_8002F1C4(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, u3
Player* player = GET_PLAYER(globalCtx); Player* player = GET_PLAYER(globalCtx);
// This is convoluted but it seems like it must be a single if statement to match // This is convoluted but it seems like it must be a single if statement to match
if ((player->actor.flags & 0x100) || ((exchangeItemId != EXCH_ITEM_NONE) && Player_InCsMode(globalCtx)) || if ((player->actor.flags & ACTOR_FLAG_8) || ((exchangeItemId != EXCH_ITEM_NONE) && Player_InCsMode(globalCtx)) ||
(!actor->isTargeted && (!actor->isTargeted &&
((arg3 < fabsf(actor->yDistToPlayer)) || (player->targetActorDistance < actor->xzDistToPlayer) || ((arg3 < fabsf(actor->yDistToPlayer)) || (player->targetActorDistance < actor->xzDistToPlayer) ||
(arg2 < actor->xzDistToPlayer)))) { (arg2 < actor->xzDistToPlayer)))) {
@ -1708,30 +1709,30 @@ void func_8002F850(GlobalContext* globalCtx, Actor* actor) {
void func_8002F8F0(Actor* actor, u16 sfxId) { void func_8002F8F0(Actor* actor, u16 sfxId) {
actor->sfx = sfxId; actor->sfx = sfxId;
actor->flags |= 0x80000; actor->flags |= ACTOR_FLAG_19;
actor->flags &= ~0x10300000; actor->flags &= ~(ACTOR_FLAG_20 | ACTOR_FLAG_21 | ACTOR_FLAG_28);
} }
void func_8002F91C(Actor* actor, u16 sfxId) { void func_8002F91C(Actor* actor, u16 sfxId) {
actor->sfx = sfxId; actor->sfx = sfxId;
actor->flags |= 0x100000; actor->flags |= ACTOR_FLAG_20;
actor->flags &= ~0x10280000; actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_21 | ACTOR_FLAG_28);
} }
void func_8002F948(Actor* actor, u16 sfxId) { void func_8002F948(Actor* actor, u16 sfxId) {
actor->sfx = sfxId; actor->sfx = sfxId;
actor->flags |= 0x200000; actor->flags |= ACTOR_FLAG_21;
actor->flags &= ~0x10180000; actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_20 | ACTOR_FLAG_28);
} }
void func_8002F974(Actor* actor, u16 sfxId) { void func_8002F974(Actor* actor, u16 sfxId) {
actor->flags &= ~0x10380000; actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_20 | ACTOR_FLAG_21 | ACTOR_FLAG_28);
actor->sfx = sfxId; actor->sfx = sfxId;
} }
void func_8002F994(Actor* actor, s32 arg1) { void func_8002F994(Actor* actor, s32 arg1) {
actor->flags |= 0x10000000; actor->flags |= ACTOR_FLAG_28;
actor->flags &= ~0x00380000; actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_20 | ACTOR_FLAG_21);
if (arg1 < 40) { if (arg1 < 40) {
actor->sfx = NA_SE_PL_WALK_DIRT - SFX_FLAG; actor->sfx = NA_SE_PL_WALK_DIRT - SFX_FLAG;
} else if (arg1 < 100) { } else if (arg1 < 100) {
@ -2029,7 +2030,7 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) {
sp80 = &D_80116068[0]; sp80 = &D_80116068[0];
if (player->stateFlags2 & 0x8000000) { if (player->stateFlags2 & 0x8000000) {
unkFlag = 0x2000000; unkFlag = ACTOR_FLAG_25;
} }
if ((player->stateFlags1 & 0x40) && ((player->actor.textId & 0xFF00) != 0x600)) { if ((player->stateFlags1 & 0x40) && ((player->actor.textId & 0xFF00) != 0x600)) {
@ -2076,9 +2077,9 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) {
actor->xyzDistToPlayerSq = SQ(actor->xzDistToPlayer) + SQ(actor->yDistToPlayer); actor->xyzDistToPlayerSq = SQ(actor->xzDistToPlayer) + SQ(actor->yDistToPlayer);
actor->yawTowardsPlayer = Actor_WorldYawTowardActor(actor, &player->actor); actor->yawTowardsPlayer = Actor_WorldYawTowardActor(actor, &player->actor);
actor->flags &= ~0x1000000; actor->flags &= ~ACTOR_FLAG_24;
if ((DECR(actor->freezeTimer) == 0) && (actor->flags & 0x50)) { if ((DECR(actor->freezeTimer) == 0) && (actor->flags & (ACTOR_FLAG_4 | ACTOR_FLAG_6))) {
if (actor == player->unk_664) { if (actor == player->unk_664) {
actor->isTargeted = true; actor->isTargeted = true;
} else { } else {
@ -2160,10 +2161,10 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) {
lights = LightContext_NewLights(&globalCtx->lightCtx, globalCtx->state.gfxCtx); lights = LightContext_NewLights(&globalCtx->lightCtx, globalCtx->state.gfxCtx);
Lights_BindAll(lights, globalCtx->lightCtx.listHead, (actor->flags & 0x400000) ? NULL : &actor->world.pos); Lights_BindAll(lights, globalCtx->lightCtx.listHead, (actor->flags & ACTOR_FLAG_22) ? NULL : &actor->world.pos);
Lights_Draw(lights, globalCtx->state.gfxCtx); Lights_Draw(lights, globalCtx->state.gfxCtx);
if (actor->flags & 0x1000) { if (actor->flags & ACTOR_FLAG_12) {
func_800D1694(actor->world.pos.x + globalCtx->mainCamera.skyboxOffset.x, func_800D1694(actor->world.pos.x + globalCtx->mainCamera.skyboxOffset.x,
actor->world.pos.y + actor->world.pos.y +
(f32)((actor->shape.yOffset * actor->scale.y) + globalCtx->mainCamera.skyboxOffset.y), (f32)((actor->shape.yOffset * actor->scale.y) + globalCtx->mainCamera.skyboxOffset.y),
@ -2217,13 +2218,13 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) {
} }
void func_80030ED8(Actor* actor) { void func_80030ED8(Actor* actor) {
if (actor->flags & 0x80000) { if (actor->flags & ACTOR_FLAG_19) {
Audio_PlaySoundGeneral(actor->sfx, &actor->projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8); Audio_PlaySoundGeneral(actor->sfx, &actor->projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
} else if (actor->flags & 0x100000) { } else if (actor->flags & ACTOR_FLAG_20) {
func_80078884(actor->sfx); func_80078884(actor->sfx);
} else if (actor->flags & 0x200000) { } else if (actor->flags & ACTOR_FLAG_21) {
func_800788CC(actor->sfx); func_800788CC(actor->sfx);
} else if (actor->flags & 0x10000000) { } else if (actor->flags & ACTOR_FLAG_28) {
func_800F4C58(&D_801333D4, NA_SE_SY_TIMER - SFX_FLAG, (s8)(actor->sfx - 1)); func_800F4C58(&D_801333D4, NA_SE_SY_TIMER - SFX_FLAG, (s8)(actor->sfx - 1));
} else { } else {
func_80078914(&actor->projectedPos, actor->sfx); func_80078914(&actor->projectedPos, actor->sfx);
@ -2372,17 +2373,17 @@ void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) {
if ((HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(70) == 0)) { if ((HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(70) == 0)) {
if (func_800314B0(globalCtx, actor)) { if (func_800314B0(globalCtx, actor)) {
actor->flags |= 0x40; actor->flags |= ACTOR_FLAG_6;
} else { } else {
actor->flags &= ~0x40; actor->flags &= ~ACTOR_FLAG_6;
} }
} }
actor->isDrawn = false; actor->isDrawn = false;
if ((HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(71) == 0)) { if ((HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(71) == 0)) {
if ((actor->init == NULL) && (actor->draw != NULL) && (actor->flags & 0x60)) { if ((actor->init == NULL) && (actor->draw != NULL) && (actor->flags & (ACTOR_FLAG_5 | ACTOR_FLAG_6))) {
if ((actor->flags & 0x80) && if ((actor->flags & ACTOR_FLAG_7) &&
((globalCtx->roomCtx.curRoom.showInvisActors == 0) || (globalCtx->actorCtx.unk_03 != 0) || ((globalCtx->roomCtx.curRoom.showInvisActors == 0) || (globalCtx->actorCtx.unk_03 != 0) ||
(actor->room != globalCtx->roomCtx.curRoom.num))) { (actor->room != globalCtx->roomCtx.curRoom.num))) {
ASSERT(invisibleActorCounter < INVISIBLE_ACTOR_MAX, ASSERT(invisibleActorCounter < INVISIBLE_ACTOR_MAX,
@ -2889,11 +2890,11 @@ void func_800328D4(GlobalContext* globalCtx, ActorContext* actorCtx, Player* pla
sp84 = player->unk_664; sp84 = player->unk_664;
while (actor != NULL) { while (actor != NULL) {
if ((actor->update != NULL) && ((Player*)actor != player) && ((actor->flags & 1) == 1)) { if ((actor->update != NULL) && ((Player*)actor != player) && CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_0)) {
// This block below is for determining the closest actor to player in determining the volume // This block below is for determining the closest actor to player in determining the volume
// used while playing enemy bgm music // used while playing enemy bgm music
if ((actorCategory == ACTORCAT_ENEMY) && ((actor->flags & 5) == 5) && if ((actorCategory == ACTORCAT_ENEMY) && CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2) &&
(actor->xyzDistToPlayerSq < SQ(500.0f)) && (actor->xyzDistToPlayerSq < sbgmEnemyDistSq)) { (actor->xyzDistToPlayerSq < SQ(500.0f)) && (actor->xyzDistToPlayerSq < sbgmEnemyDistSq)) {
actorCtx->targetCtx.bgmEnemy = actor; actorCtx->targetCtx.bgmEnemy = actor;
sbgmEnemyDistSq = actor->xyzDistToPlayerSq; sbgmEnemyDistSq = actor->xyzDistToPlayerSq;
@ -3845,10 +3846,10 @@ s16 func_80034DD4(Actor* actor, GlobalContext* globalCtx, s16 arg2, f32 arg3) {
} }
if (arg3 < var) { if (arg3 < var) {
actor->flags &= ~1; actor->flags &= ~ACTOR_FLAG_0;
Math_SmoothStepToS(&arg2, 0, 6, 0x14, 1); Math_SmoothStepToS(&arg2, 0, 6, 0x14, 1);
} else { } else {
actor->flags |= 1; actor->flags |= ACTOR_FLAG_0;
Math_SmoothStepToS(&arg2, 0xFF, 6, 0x14, 1); Math_SmoothStepToS(&arg2, 0xFF, 6, 0x14, 1);
} }

View file

@ -1690,9 +1690,9 @@ s32 Camera_Normal2(Camera* camera) {
anim->unk_20 = BGCAM_ROT(bgData).x; anim->unk_20 = BGCAM_ROT(bgData).x;
anim->unk_22 = BGCAM_ROT(bgData).y; anim->unk_22 = BGCAM_ROT(bgData).y;
anim->unk_24 = playerPosRot->pos.y; anim->unk_24 = playerPosRot->pos.y;
anim->unk_1C = BGCAM_FOV(bgData) == -1 anim->unk_1C = BGCAM_FOV(bgData) == -1 ? norm2->unk_14
? norm2->unk_14 : BGCAM_FOV(bgData) >= 0x169 ? PCT(BGCAM_FOV(bgData))
: BGCAM_FOV(bgData) >= 0x169 ? PCT(BGCAM_FOV(bgData)) : BGCAM_FOV(bgData); : BGCAM_FOV(bgData);
anim->unk_28 = BGCAM_JFIFID(bgData) == -1 ? 0 : BGCAM_JFIFID(bgData); anim->unk_28 = BGCAM_JFIFID(bgData) == -1 ? 0 : BGCAM_JFIFID(bgData);
@ -2923,7 +2923,9 @@ s32 Camera_Battle1(Camera* camera) {
} }
anim->roll += (((OREG(36) * camera->speedRatio) * (1.0f - distRatio)) - anim->roll) * PCT(OREG(37)); anim->roll += (((OREG(36) * camera->speedRatio) * (1.0f - distRatio)) - anim->roll) * PCT(OREG(37));
camera->roll = DEGF_TO_BINANG(anim->roll); camera->roll = DEGF_TO_BINANG(anim->roll);
camera->fov = Camera_LERPCeilF((player->swordState != 0 ? 0.8f : gSaveContext.health <= 0x10 ? 0.8f : 1.0f) * camera->fov = Camera_LERPCeilF((player->swordState != 0 ? 0.8f
: gSaveContext.health <= 0x10 ? 0.8f
: 1.0f) *
(fov - ((fov * 0.05f) * distRatio)), (fov - ((fov * 0.05f) * distRatio)),
camera->fov, camera->fovUpdateRate, 1.0f); camera->fov, camera->fovUpdateRate, 1.0f);
} }

View file

@ -151,19 +151,15 @@ void func_8006390C(Input* input) {
gGameInfo->dpadLast = dpad; gGameInfo->dpadLast = dpad;
} }
increment = CHECK_BTN_ANY(dpad, BTN_DRIGHT) increment = CHECK_BTN_ANY(dpad, BTN_DRIGHT) ? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B) ? 1000
? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B) : CHECK_BTN_ALL(input->cur.button, BTN_A) ? 100
? 1000 : CHECK_BTN_ALL(input->cur.button, BTN_B) ? 10
: CHECK_BTN_ALL(input->cur.button, BTN_A) : 1)
? 100 : CHECK_BTN_ANY(dpad, BTN_DLEFT) ? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B) ? -1000
: CHECK_BTN_ALL(input->cur.button, BTN_B) ? 10 : 1) : CHECK_BTN_ALL(input->cur.button, BTN_A) ? -100
: CHECK_BTN_ANY(dpad, BTN_DLEFT) : CHECK_BTN_ALL(input->cur.button, BTN_B) ? -10
? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B) : -1)
? -1000 : 0;
: CHECK_BTN_ALL(input->cur.button, BTN_A)
? -100
: CHECK_BTN_ALL(input->cur.button, BTN_B) ? -10 : -1)
: 0;
gGameInfo->data[gGameInfo->regCur + regGroup] += increment; gGameInfo->data[gGameInfo->regCur + regGroup] += increment;
if (CHECK_BTN_ANY(dpad, BTN_DUP)) { if (CHECK_BTN_ANY(dpad, BTN_DUP)) {

View file

@ -2,7 +2,7 @@
#include "vt.h" #include "vt.h"
#include "objects/gameplay_keep/gameplay_keep.h" #include "objects/gameplay_keep/gameplay_keep.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx); void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx);
void EnAObj_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnAObj_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -140,7 +140,7 @@ void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx) {
break; break;
case A_OBJ_UNKNOWN_6: case A_OBJ_UNKNOWN_6:
// clang-format off // clang-format off
thisx->flags |= 0x1; this->dyna.bgId = 5; this->focusYoffset = 10.0f; thisx->flags |= ACTOR_FLAG_0; this->dyna.bgId = 5; this->focusYoffset = 10.0f;
// clang-format on // clang-format on
thisx->gravity = -2.0f; thisx->gravity = -2.0f;
EnAObj_SetupWaitTalk(this, thisx->params); EnAObj_SetupWaitTalk(this, thisx->params);
@ -154,7 +154,7 @@ void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx) {
case A_OBJ_SIGNPOST_ARROW: case A_OBJ_SIGNPOST_ARROW:
thisx->textId = (this->textId & 0xFF) | 0x300; thisx->textId = (this->textId & 0xFF) | 0x300;
// clang-format off // clang-format off
thisx->flags |= 0x1 | 0x8; thisx->targetArrowOffset = 500.0f; thisx->flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; thisx->targetArrowOffset = 500.0f;
// clang-format on // clang-format on
this->focusYoffset = 45.0f; this->focusYoffset = 45.0f;
EnAObj_SetupWaitTalk(this, thisx->params); EnAObj_SetupWaitTalk(this, thisx->params);

View file

@ -3,7 +3,7 @@
#include "objects/gameplay_keep/gameplay_keep.h" #include "objects/gameplay_keep/gameplay_keep.h"
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h" #include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
#define FLAGS 0x00000000 #define FLAGS 0
void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx); void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx);
void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -1166,7 +1166,7 @@ EnItem00* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, s16 pa
(spawnedActor->actor.params != ITEM00_HEART_CONTAINER)) { (spawnedActor->actor.params != ITEM00_HEART_CONTAINER)) {
spawnedActor->actor.room = -1; spawnedActor->actor.room = -1;
} }
spawnedActor->actor.flags |= 0x0010; spawnedActor->actor.flags |= ACTOR_FLAG_4;
} }
} }
} }
@ -1198,7 +1198,7 @@ EnItem00* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s16 p
spawnedActor->actor.speedXZ = 0.0f; spawnedActor->actor.speedXZ = 0.0f;
spawnedActor->actor.gravity = param4000 ? 0.0f : -0.9f; spawnedActor->actor.gravity = param4000 ? 0.0f : -0.9f;
spawnedActor->actor.world.rot.y = Rand_CenteredFloat(65536.0f); spawnedActor->actor.world.rot.y = Rand_CenteredFloat(65536.0f);
spawnedActor->actor.flags |= 0x0010; spawnedActor->actor.flags |= ACTOR_FLAG_4;
} }
} }
} }
@ -1310,7 +1310,7 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3
spawnedActor->actor.world.rot.y = Rand_ZeroOne() * 40000.0f; spawnedActor->actor.world.rot.y = Rand_ZeroOne() * 40000.0f;
Actor_SetScale(&spawnedActor->actor, 0.0f); Actor_SetScale(&spawnedActor->actor, 0.0f);
EnItem00_SetupAction(spawnedActor, func_8001E304); EnItem00_SetupAction(spawnedActor, func_8001E304);
spawnedActor->actor.flags |= 0x0010; spawnedActor->actor.flags |= ACTOR_FLAG_4;
if ((spawnedActor->actor.params != ITEM00_SMALL_KEY) && if ((spawnedActor->actor.params != ITEM00_SMALL_KEY) &&
(spawnedActor->actor.params != ITEM00_HEART_PIECE) && (spawnedActor->actor.params != ITEM00_HEART_PIECE) &&
(spawnedActor->actor.params != ITEM00_HEART_CONTAINER)) { (spawnedActor->actor.params != ITEM00_HEART_CONTAINER)) {

View file

@ -1,6 +1,6 @@
#include "global.h" #include "global.h"
#define FLAGS 0x06000035 #define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25 | ACTOR_FLAG_26)
void (*sPlayerCallInitFunc)(Actor* thisx, GlobalContext* globalCtx); void (*sPlayerCallInitFunc)(Actor* thisx, GlobalContext* globalCtx);
void (*sPlayerCallDestroyFunc)(Actor* thisx, GlobalContext* globalCtx); void (*sPlayerCallDestroyFunc)(Actor* thisx, GlobalContext* globalCtx);

View file

@ -1253,7 +1253,7 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
Matrix_Get(&sp14C); Matrix_Get(&sp14C);
Matrix_MtxFToYXZRotS(&sp14C, &spB8, 0); Matrix_MtxFToYXZRotS(&sp14C, &spB8, 0);
if (hookedActor->flags & 0x20000) { if (hookedActor->flags & ACTOR_FLAG_17) {
hookedActor->world.rot.x = hookedActor->shape.rot.x = spB8.x - this->unk_3BC.x; hookedActor->world.rot.x = hookedActor->shape.rot.x = spB8.x - this->unk_3BC.x;
} else { } else {
hookedActor->world.rot.y = hookedActor->shape.rot.y = this->actor.shape.rot.y + this->unk_3BC.y; hookedActor->world.rot.y = hookedActor->shape.rot.y = this->actor.shape.rot.y + this->unk_3BC.y;

View file

@ -1,6 +1,6 @@
#include "z_arms_hook.h" #include "z_arms_hook.h"
#define FLAGS 0x00000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
void ArmsHook_Init(Actor* thisx, GlobalContext* globalCtx); void ArmsHook_Init(Actor* thisx, GlobalContext* globalCtx);
void ArmsHook_Destroy(Actor* thisx, GlobalContext* globalCtx); void ArmsHook_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -77,7 +77,7 @@ void ArmsHook_Destroy(Actor* thisx, GlobalContext* globalCtx) {
ArmsHook* this = (ArmsHook*)thisx; ArmsHook* this = (ArmsHook*)thisx;
if (this->grabbed != NULL) { if (this->grabbed != NULL) {
this->grabbed->flags &= ~0x2000; this->grabbed->flags &= ~ACTOR_FLAG_13;
} }
Collider_DestroyQuad(globalCtx, &this->collider); Collider_DestroyQuad(globalCtx, &this->collider);
} }
@ -113,7 +113,7 @@ s32 ArmsHook_AttachToPlayer(ArmsHook* this, Player* player) {
void ArmsHook_DetachHookFromActor(ArmsHook* this) { void ArmsHook_DetachHookFromActor(ArmsHook* this) {
if (this->grabbed != NULL) { if (this->grabbed != NULL) {
this->grabbed->flags &= ~0x2000; this->grabbed->flags &= ~ACTOR_FLAG_13;
this->grabbed = NULL; this->grabbed = NULL;
} }
} }
@ -122,7 +122,7 @@ s32 ArmsHook_CheckForCancel(ArmsHook* this) {
Player* player = (Player*)this->actor.parent; Player* player = (Player*)this->actor.parent;
if (Player_HoldsHookshot(player)) { if (Player_HoldsHookshot(player)) {
if ((player->itemActionParam != player->heldItemActionParam) || ((player->actor.flags & 0x100)) || if ((player->itemActionParam != player->heldItemActionParam) || (player->actor.flags & ACTOR_FLAG_8) ||
((player->stateFlags1 & 0x4000080))) { ((player->stateFlags1 & 0x4000080))) {
this->timer = 0; this->timer = 0;
ArmsHook_DetachHookFromActor(this); ArmsHook_DetachHookFromActor(this);
@ -134,7 +134,7 @@ s32 ArmsHook_CheckForCancel(ArmsHook* this) {
} }
void ArmsHook_AttachHookToActor(ArmsHook* this, Actor* actor) { void ArmsHook_AttachHookToActor(ArmsHook* this, Actor* actor) {
actor->flags |= 0x2000; actor->flags |= ACTOR_FLAG_13;
this->grabbed = actor; this->grabbed = actor;
Math_Vec3f_Diff(&actor->world.pos, &this->actor.world.pos, &this->grabbedDistDiff); Math_Vec3f_Diff(&actor->world.pos, &this->actor.world.pos, &this->grabbedDistDiff);
} }
@ -173,10 +173,10 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
if ((this->timer != 0) && (this->collider.base.atFlags & AT_HIT) && if ((this->timer != 0) && (this->collider.base.atFlags & AT_HIT) &&
(this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) { (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
touchedActor = this->collider.base.at; touchedActor = this->collider.base.at;
if ((touchedActor->update != NULL) && (touchedActor->flags & 0x600)) { if ((touchedActor->update != NULL) && (touchedActor->flags & (ACTOR_FLAG_9 | ACTOR_FLAG_10))) {
if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) { if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) {
ArmsHook_AttachHookToActor(this, touchedActor); ArmsHook_AttachHookToActor(this, touchedActor);
if ((touchedActor->flags & 0x400) == 0x400) { if (CHECK_FLAG_ALL(touchedActor->flags, ACTOR_FLAG_10)) {
func_80865044(this); func_80865044(this);
} }
} }
@ -187,7 +187,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
} else if (DECR(this->timer) == 0) { } else if (DECR(this->timer) == 0) {
grabbed = this->grabbed; grabbed = this->grabbed;
if (grabbed != NULL) { if (grabbed != NULL) {
if ((grabbed->update == NULL) || (grabbed->flags & 0x2000) != 0x2000) { if ((grabbed->update == NULL) || !CHECK_FLAG_ALL(grabbed->flags, ACTOR_FLAG_13)) {
grabbed = NULL; grabbed = NULL;
this->grabbed = NULL; this->grabbed = NULL;
} else if (this->actor.child != NULL) { } else if (this->actor.child != NULL) {

View file

@ -7,7 +7,7 @@
#include "z_arrow_fire.h" #include "z_arrow_fire.h"
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
#define FLAGS 0x02000010 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
void ArrowFire_Init(Actor* thisx, GlobalContext* globalCtx); void ArrowFire_Init(Actor* thisx, GlobalContext* globalCtx);
void ArrowFire_Destroy(Actor* thisx, GlobalContext* globalCtx); void ArrowFire_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -8,7 +8,7 @@
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
#define FLAGS 0x02000010 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
void ArrowIce_Init(Actor* thisx, GlobalContext* globalCtx); void ArrowIce_Init(Actor* thisx, GlobalContext* globalCtx);
void ArrowIce_Destroy(Actor* thisx, GlobalContext* globalCtx); void ArrowIce_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -8,7 +8,7 @@
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
#define FLAGS 0x02000010 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
void ArrowLight_Init(Actor* thisx, GlobalContext* globalCtx); void ArrowLight_Init(Actor* thisx, GlobalContext* globalCtx);
void ArrowLight_Destroy(Actor* thisx, GlobalContext* globalCtx); void ArrowLight_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_bdan_objects.h" #include "z_bg_bdan_objects.h"
#include "objects/object_bdan_objects/object_bdan_objects.h" #include "objects/object_bdan_objects/object_bdan_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx); void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx);
void BgBdanObjects_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgBdanObjects_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -114,7 +114,7 @@ void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx) {
this->switchFlag = (thisx->params >> 8) & 0x3F; this->switchFlag = (thisx->params >> 8) & 0x3F;
thisx->params &= 0xFF; thisx->params &= 0xFF;
if (thisx->params == 2) { if (thisx->params == 2) {
thisx->flags |= 0x30; thisx->flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5;
globalCtx->colCtx.colHeader->waterBoxes[7].ySurface = thisx->world.pos.y; globalCtx->colCtx.colHeader->waterBoxes[7].ySurface = thisx->world.pos.y;
this->actionFunc = func_8086C9A8; this->actionFunc = func_8086C9A8;
return; return;

View file

@ -7,7 +7,7 @@
#include "z_bg_bdan_switch.h" #include "z_bg_bdan_switch.h"
#include "objects/object_bdan_objects/object_bdan_objects.h" #include "objects/object_bdan_objects/object_bdan_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgBdanSwitch_Init(Actor* thisx, GlobalContext* globalCtx); void BgBdanSwitch_Init(Actor* thisx, GlobalContext* globalCtx);
void BgBdanSwitch_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgBdanSwitch_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -160,7 +160,7 @@ void BgBdanSwitch_Init(Actor* thisx, GlobalContext* globalCtx) {
case YELLOW_TALL_1: case YELLOW_TALL_1:
case YELLOW_TALL_2: case YELLOW_TALL_2:
BgBdanSwitch_InitCollision(this, globalCtx); BgBdanSwitch_InitCollision(this, globalCtx);
this->dyna.actor.flags |= 1; this->dyna.actor.flags |= ACTOR_FLAG_0;
this->dyna.actor.targetMode = 4; this->dyna.actor.targetMode = 4;
break; break;
} }

View file

@ -9,7 +9,7 @@
#include "objects/object_bowl/object_bowl.h" #include "objects/object_bowl/object_bowl.h"
#include "vt.h" #include "vt.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgBomGuard_Init(Actor* thisx, GlobalContext* globalCtx); void BgBomGuard_Init(Actor* thisx, GlobalContext* globalCtx);
void BgBomGuard_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgBomGuard_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_bombwall.h" #include "z_bg_bombwall.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h"
#define FLAGS 0x00400000 #define FLAGS ACTOR_FLAG_22
void BgBombwall_Init(Actor* thisx, GlobalContext* globalCtx); void BgBombwall_Init(Actor* thisx, GlobalContext* globalCtx);
void BgBombwall_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgBombwall_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -10,7 +10,7 @@
#include "objects/object_bowl/object_bowl.h" #include "objects/object_bowl/object_bowl.h"
#include "vt.h" #include "vt.h"
#define FLAGS 0x00000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
void BgBowlWall_Init(Actor* thisx, GlobalContext* globalCtx); void BgBowlWall_Init(Actor* thisx, GlobalContext* globalCtx);
void BgBowlWall_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgBowlWall_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -9,7 +9,7 @@
#include "objects/object_bwall/object_bwall.h" #include "objects/object_bwall/object_bwall.h"
#include "objects/object_kingdodongo/object_kingdodongo.h" #include "objects/object_kingdodongo/object_kingdodongo.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
typedef struct { typedef struct {
/* 0x00 */ CollisionHeader* colHeader; /* 0x00 */ CollisionHeader* colHeader;
@ -208,7 +208,7 @@ void BgBreakwall_WaitForObject(BgBreakwall* this, GlobalContext* globalCtx) {
this->dyna.actor.objBankIndex = this->bankIndex; this->dyna.actor.objBankIndex = this->bankIndex;
Actor_SetObjectDependency(globalCtx, &this->dyna.actor); Actor_SetObjectDependency(globalCtx, &this->dyna.actor);
this->dyna.actor.flags &= ~0x10; this->dyna.actor.flags &= ~ACTOR_FLAG_4;
this->dyna.actor.draw = BgBreakwall_Draw; this->dyna.actor.draw = BgBreakwall_Draw;
CollisionHeader_GetVirtual(sBombableWallInfo[wallType].colHeader, &colHeader); CollisionHeader_GetVirtual(sBombableWallInfo[wallType].colHeader, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);

View file

@ -7,7 +7,7 @@
#include "z_bg_ddan_jd.h" #include "z_bg_ddan_jd.h"
#include "objects/object_ddan_objects/object_ddan_objects.h" #include "objects/object_ddan_objects/object_ddan_objects.h"
#define FLAGS 0x00000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
void BgDdanJd_Init(Actor* thisx, GlobalContext* globalCtx); void BgDdanJd_Init(Actor* thisx, GlobalContext* globalCtx);
void BgDdanJd_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgDdanJd_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_ddan_kd.h" #include "z_bg_ddan_kd.h"
#include "objects/object_ddan_objects/object_ddan_objects.h" #include "objects/object_ddan_objects/object_ddan_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgDdanKd_Init(Actor* thisx, GlobalContext* globalCtx); void BgDdanKd_Init(Actor* thisx, GlobalContext* globalCtx);
void BgDdanKd_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgDdanKd_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -8,7 +8,7 @@
#include "overlays/actors/ovl_En_Bom/z_en_bom.h" #include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "objects/object_ddan_objects/object_ddan_objects.h" #include "objects/object_ddan_objects/object_ddan_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgDodoago_Init(Actor* thisx, GlobalContext* globalCtx); void BgDodoago_Init(Actor* thisx, GlobalContext* globalCtx);
void BgDodoago_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgDodoago_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -11,7 +11,7 @@
#include "scenes/indoors/yousei_izumi_yoko/yousei_izumi_yoko_scene.h" #include "scenes/indoors/yousei_izumi_yoko/yousei_izumi_yoko_scene.h"
#include "scenes/indoors/daiyousei_izumi/daiyousei_izumi_scene.h" #include "scenes/indoors/daiyousei_izumi/daiyousei_izumi_scene.h"
#define FLAGS 0x02000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25)
typedef enum { typedef enum {
/* 0 */ FAIRY_UPGRADE_MAGIC, /* 0 */ FAIRY_UPGRADE_MAGIC,

View file

@ -8,7 +8,7 @@
#include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h" #include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h"
#include "vt.h" #include "vt.h"
#define FLAGS 0x00000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
typedef enum { typedef enum {
/* 0x00 */ FLASH_NONE, /* 0x00 */ FLASH_NONE,

View file

@ -8,7 +8,7 @@
#include "objects/object_spot01_matoyab/object_spot01_matoyab.h" #include "objects/object_spot01_matoyab/object_spot01_matoyab.h"
#include "vt.h" #include "vt.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgGateShutter_Init(Actor* thisx, GlobalContext* globalCtx); void BgGateShutter_Init(Actor* thisx, GlobalContext* globalCtx);
void BgGateShutter_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgGateShutter_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -8,7 +8,7 @@
#include "objects/object_gjyo_objects/object_gjyo_objects.h" #include "objects/object_gjyo_objects/object_gjyo_objects.h"
#include "scenes/dungeons/ganon_tou/ganon_tou_scene.h" #include "scenes/dungeons/ganon_tou/ganon_tou_scene.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgGjyoBridge_Init(Actor* thisx, GlobalContext* globalCtx); void BgGjyoBridge_Init(Actor* thisx, GlobalContext* globalCtx);
void BgGjyoBridge_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgGjyoBridge_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_gnd_darkmeiro.h" #include "z_bg_gnd_darkmeiro.h"
#include "objects/object_demo_kekkai/object_demo_kekkai.h" #include "objects/object_demo_kekkai/object_demo_kekkai.h"
#define FLAGS 0x00000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx); void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx);
void BgGndDarkmeiro_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgGndDarkmeiro_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -55,7 +55,7 @@ void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx2) {
switch (this->dyna.actor.params & 0xFF) { switch (this->dyna.actor.params & 0xFF) {
case DARKMEIRO_INVISIBLE_PATH: case DARKMEIRO_INVISIBLE_PATH:
this->dyna.actor.draw = BgGndDarkmeiro_DrawInvisiblePath; this->dyna.actor.draw = BgGndDarkmeiro_DrawInvisiblePath;
this->dyna.actor.flags |= 0x80; this->dyna.actor.flags |= ACTOR_FLAG_7;
break; break;
case DARKMEIRO_CLEAR_BLOCK: case DARKMEIRO_CLEAR_BLOCK:
CollisionHeader_GetVirtual(&gClearBlockCol, &colHeader); CollisionHeader_GetVirtual(&gClearBlockCol, &colHeader);

View file

@ -7,7 +7,7 @@
#include "z_bg_gnd_firemeiro.h" #include "z_bg_gnd_firemeiro.h"
#include "objects/object_demo_kekkai/object_demo_kekkai.h" #include "objects/object_demo_kekkai/object_demo_kekkai.h"
#define FLAGS 0x00000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
void BgGndFiremeiro_Init(Actor* thisx, GlobalContext* globalCtx); void BgGndFiremeiro_Init(Actor* thisx, GlobalContext* globalCtx);
void BgGndFiremeiro_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgGndFiremeiro_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_gnd_iceblock.h" #include "z_bg_gnd_iceblock.h"
#include "objects/object_demo_kekkai/object_demo_kekkai.h" #include "objects/object_demo_kekkai/object_demo_kekkai.h"
#define FLAGS 0x00000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
typedef enum { typedef enum {
/* 0 */ GNDICE_IDLE, /* 0 */ GNDICE_IDLE,

View file

@ -7,7 +7,7 @@
#include "z_bg_gnd_nisekabe.h" #include "z_bg_gnd_nisekabe.h"
#include "objects/object_demo_kekkai/object_demo_kekkai.h" #include "objects/object_demo_kekkai/object_demo_kekkai.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgGndNisekabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgGndNisekabe_Init(Actor* thisx, GlobalContext* globalCtx);
void BgGndNisekabe_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgGndNisekabe_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -40,9 +40,9 @@ void BgGndNisekabe_Update(Actor* thisx, GlobalContext* globalCtx) {
BgGndNisekabe* this = (BgGndNisekabe*)thisx; BgGndNisekabe* this = (BgGndNisekabe*)thisx;
if (globalCtx->actorCtx.unk_03 != 0) { if (globalCtx->actorCtx.unk_03 != 0) {
this->actor.flags |= 0x80; this->actor.flags |= ACTOR_FLAG_7;
} else { } else {
this->actor.flags &= ~0x80; this->actor.flags &= ~ACTOR_FLAG_7;
} }
} }
@ -55,7 +55,7 @@ void BgGndNisekabe_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgGndNisekabe* this = (BgGndNisekabe*)thisx; BgGndNisekabe* this = (BgGndNisekabe*)thisx;
u32 index = this->actor.params & 0xFF; u32 index = this->actor.params & 0xFF;
if ((this->actor.flags & 0x80) == 0x80) { if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) {
Gfx_DrawDListXlu(globalCtx, dLists[index]); Gfx_DrawDListXlu(globalCtx, dLists[index]);
} else { } else {
Gfx_DrawDListOpa(globalCtx, dLists[index]); Gfx_DrawDListOpa(globalCtx, dLists[index]);

View file

@ -8,7 +8,7 @@
#include "objects/object_demo_kekkai/object_demo_kekkai.h" #include "objects/object_demo_kekkai/object_demo_kekkai.h"
#include "global.h" #include "global.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgGndSoulmeiro_Init(Actor* thisx, GlobalContext* globalCtx); void BgGndSoulmeiro_Init(Actor* thisx, GlobalContext* globalCtx);
void BgGndSoulmeiro_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgGndSoulmeiro_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_haka.h" #include "z_bg_haka.h"
#include "objects/object_haka/object_haka.h" #include "objects/object_haka/object_haka.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgHaka_Init(Actor* thisx, GlobalContext* globalCtx); void BgHaka_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHaka_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHaka_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -8,7 +8,7 @@
#include "objects/gameplay_keep/gameplay_keep.h" #include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_haka_objects/object_haka_objects.h" #include "objects/object_haka_objects/object_haka_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
// general purpose timer // general purpose timer
#define vTimer actionVar1 #define vTimer actionVar1
@ -97,7 +97,7 @@ void BgHakaGate_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc = BgHakaGate_FalseSkull; this->actionFunc = BgHakaGate_FalseSkull;
} }
this->vScrollTimer = Rand_ZeroOne() * 20.0f; this->vScrollTimer = Rand_ZeroOne() * 20.0f;
thisx->flags |= 0x10; thisx->flags |= ACTOR_FLAG_4;
if (Flags_GetSwitch(globalCtx, this->switchFlag)) { if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
this->vFlameScale = 350; this->vFlameScale = 350;
} }
@ -124,7 +124,7 @@ void BgHakaGate_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc = BgHakaGate_DoNothing; this->actionFunc = BgHakaGate_DoNothing;
thisx->world.pos.y += 80.0f; thisx->world.pos.y += 80.0f;
} else { } else {
thisx->flags |= 0x10; thisx->flags |= ACTOR_FLAG_4;
Actor_SetFocus(thisx, 30.0f); Actor_SetFocus(thisx, 30.0f);
this->actionFunc = BgHakaGate_GateWait; this->actionFunc = BgHakaGate_GateWait;
} }
@ -274,7 +274,7 @@ void BgHakaGate_GateWait(BgHakaGate* this, GlobalContext* globalCtx) {
void BgHakaGate_GateOpen(BgHakaGate* this, GlobalContext* globalCtx) { void BgHakaGate_GateOpen(BgHakaGate* this, GlobalContext* globalCtx) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 80.0f, 1.0f)) { if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 80.0f, 1.0f)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP);
this->dyna.actor.flags &= ~0x10; this->dyna.actor.flags &= ~ACTOR_FLAG_4;
this->actionFunc = BgHakaGate_DoNothing; this->actionFunc = BgHakaGate_DoNothing;
} else { } else {
func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG);
@ -292,9 +292,9 @@ void BgHakaGate_FalseSkull(BgHakaGate* this, GlobalContext* globalCtx) {
Math_StepToS(&this->vFlameScale, 350, 20); Math_StepToS(&this->vFlameScale, 350, 20);
} }
if (globalCtx->actorCtx.unk_03) { if (globalCtx->actorCtx.unk_03) {
this->dyna.actor.flags |= 0x80; this->dyna.actor.flags |= ACTOR_FLAG_7;
} else { } else {
this->dyna.actor.flags &= ~0x80; this->dyna.actor.flags &= ~ACTOR_FLAG_7;
} }
} }
@ -345,7 +345,7 @@ void BgHakaGate_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgHakaGate* this = (BgHakaGate*)thisx; BgHakaGate* this = (BgHakaGate*)thisx;
MtxF currentMtxF; MtxF currentMtxF;
if ((thisx->flags & 0x80) == 0x80) { if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_7)) {
Gfx_DrawDListXlu(globalCtx, object_haka_objects_DL_00F1B0); Gfx_DrawDListXlu(globalCtx, object_haka_objects_DL_00F1B0);
} else { } else {
func_80093D18(globalCtx->state.gfxCtx); func_80093D18(globalCtx->state.gfxCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_haka_huta.h" #include "z_bg_haka_huta.h"
#include "objects/object_hakach_objects/object_hakach_objects.h" #include "objects/object_hakach_objects/object_hakach_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgHakaHuta_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaHuta_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHakaHuta_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHakaHuta_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -8,7 +8,7 @@
#include "objects/object_hakach_objects/object_hakach_objects.h" #include "objects/object_hakach_objects/object_hakach_objects.h"
#include "objects/object_haka_objects/object_haka_objects.h" #include "objects/object_haka_objects/object_haka_objects.h"
#define FLAGS 0x000000B0 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_7)
void BgHakaMegane_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaMegane_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHakaMegane_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHakaMegane_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -109,10 +109,10 @@ void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx) {
Actor* thisx = &this->dyna.actor; Actor* thisx = &this->dyna.actor;
if (globalCtx->actorCtx.unk_03 != 0) { if (globalCtx->actorCtx.unk_03 != 0) {
thisx->flags |= 0x80; thisx->flags |= ACTOR_FLAG_7;
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
} else { } else {
thisx->flags &= ~0x80; thisx->flags &= ~ACTOR_FLAG_7;
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
} }
} }
@ -129,7 +129,7 @@ void BgHakaMegane_Update(Actor* thisx, GlobalContext* globalCtx) {
void BgHakaMegane_Draw(Actor* thisx, GlobalContext* globalCtx) { void BgHakaMegane_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgHakaMegane* this = (BgHakaMegane*)thisx; BgHakaMegane* this = (BgHakaMegane*)thisx;
if ((thisx->flags & 0x80) == 0x80) { if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_7)) {
Gfx_DrawDListXlu(globalCtx, sDLists[thisx->params]); Gfx_DrawDListXlu(globalCtx, sDLists[thisx->params]);
} else { } else {
Gfx_DrawDListOpa(globalCtx, sDLists[thisx->params]); Gfx_DrawDListOpa(globalCtx, sDLists[thisx->params]);

View file

@ -7,7 +7,7 @@
#include "z_bg_haka_meganebg.h" #include "z_bg_haka_meganebg.h"
#include "objects/object_haka_objects/object_haka_objects.h" #include "objects/object_haka_objects/object_haka_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgHakaMeganeBG_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaMeganeBG_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHakaMeganeBG_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHakaMeganeBG_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -64,7 +64,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, GlobalContext* globalCtx) {
if (thisx->params == 2) { if (thisx->params == 2) {
DynaPolyActor_Init(&this->dyna, DPM_UNK3); DynaPolyActor_Init(&this->dyna, DPM_UNK3);
thisx->flags |= 0x10; thisx->flags |= ACTOR_FLAG_4;
CollisionHeader_GetVirtual(&object_haka_objects_Col_005334, &colHeader); CollisionHeader_GetVirtual(&object_haka_objects_Col_005334, &colHeader);
this->actionFunc = func_8087E258; this->actionFunc = func_8087E258;
} else { } else {
@ -72,7 +72,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, GlobalContext* globalCtx) {
if (thisx->params == 0) { if (thisx->params == 0) {
CollisionHeader_GetVirtual(&object_haka_objects_Col_009168, &colHeader); CollisionHeader_GetVirtual(&object_haka_objects_Col_009168, &colHeader);
thisx->flags |= 0x80; thisx->flags |= ACTOR_FLAG_7;
this->unk_16A = 20; this->unk_16A = 20;
this->actionFunc = func_8087DFF8; this->actionFunc = func_8087DFF8;
} else if (thisx->params == 3) { } else if (thisx->params == 3) {
@ -83,7 +83,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc = func_8087E34C; this->actionFunc = func_8087E34C;
thisx->world.pos.y = thisx->home.pos.y; thisx->world.pos.y = thisx->home.pos.y;
} else { } else {
thisx->flags |= 0x10; thisx->flags |= ACTOR_FLAG_4;
this->actionFunc = func_8087E288; this->actionFunc = func_8087E288;
} }
} else { } else {

View file

@ -8,7 +8,7 @@
#include "objects/object_haka_objects/object_haka_objects.h" #include "objects/object_haka_objects/object_haka_objects.h"
#include "objects/object_ice_objects/object_ice_objects.h" #include "objects/object_ice_objects/object_ice_objects.h"
#define FLAGS 0x00000011 #define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4)
typedef enum { typedef enum {
/* 0 */ SCYTHE_TRAP_SHADOW_TEMPLE, /* 0 */ SCYTHE_TRAP_SHADOW_TEMPLE,
@ -142,7 +142,7 @@ void BgHakaSgami_Init(Actor* thisx, GlobalContext* globalCtx) {
thisx->params = (thisx->params >> 8) & 0xFF; thisx->params = (thisx->params >> 8) & 0xFF;
if (this->unk_151 != 0) { if (this->unk_151 != 0) {
thisx->flags |= 0x80; thisx->flags |= ACTOR_FLAG_7;
} }
Collider_InitTris(globalCtx, colliderScythe); Collider_InitTris(globalCtx, colliderScythe);
@ -170,7 +170,7 @@ void BgHakaSgami_Init(Actor* thisx, GlobalContext* globalCtx) {
if (thisx->params == SCYTHE_TRAP_SHADOW_TEMPLE) { if (thisx->params == SCYTHE_TRAP_SHADOW_TEMPLE) {
this->requiredObjBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_HAKA_OBJECTS); this->requiredObjBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_HAKA_OBJECTS);
thisx->flags &= ~1; thisx->flags &= ~ACTOR_FLAG_0;
} else { } else {
this->requiredObjBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_ICE_OBJECTS); this->requiredObjBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_ICE_OBJECTS);
this->colliderScytheCenter.dim.radius = 30; this->colliderScytheCenter.dim.radius = 30;
@ -200,7 +200,7 @@ void BgHakaSgami_SetupSpin(BgHakaSgami* this, GlobalContext* globalCtx) {
this->actor.objBankIndex = this->requiredObjBankIndex; this->actor.objBankIndex = this->requiredObjBankIndex;
this->actor.draw = BgHakaSgami_Draw; this->actor.draw = BgHakaSgami_Draw;
this->timer = SCYTHE_SPIN_TIME; this->timer = SCYTHE_SPIN_TIME;
this->actor.flags &= ~0x10; this->actor.flags &= ~ACTOR_FLAG_4;
this->actionFunc = BgHakaSgami_Spin; this->actionFunc = BgHakaSgami_Spin;
} }
} }

View file

@ -7,7 +7,7 @@
#include "z_bg_haka_ship.h" #include "z_bg_haka_ship.h"
#include "objects/object_haka_objects/object_haka_objects.h" #include "objects/object_haka_objects/object_haka_objects.h"
#define FLAGS 0x00000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
void BgHakaShip_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaShip_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHakaShip_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHakaShip_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_haka_trap.h" #include "z_bg_haka_trap.h"
#include "objects/object_haka_objects/object_haka_objects.h" #include "objects/object_haka_objects/object_haka_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgHakaTrap_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaTrap_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHakaTrap_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHakaTrap_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -131,7 +131,7 @@ void BgHakaTrap_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc = func_80880484; this->actionFunc = func_80880484;
} else { } else {
DynaPolyActor_Init(&this->dyna, DPM_PLAYER); DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
thisx->flags |= 0x10; thisx->flags |= ACTOR_FLAG_4;
if (thisx->params == HAKA_TRAP_SPIKED_BOX) { if (thisx->params == HAKA_TRAP_SPIKED_BOX) {
CollisionHeader_GetVirtual(&object_haka_objects_Col_009CD0, &colHeader); CollisionHeader_GetVirtual(&object_haka_objects_Col_009CD0, &colHeader);

View file

@ -8,7 +8,7 @@
#include "objects/gameplay_keep/gameplay_keep.h" #include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_haka_objects/object_haka_objects.h" #include "objects/object_haka_objects/object_haka_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgHakaTubo_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaTubo_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHakaTubo_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHakaTubo_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_haka_water.h" #include "z_bg_haka_water.h"
#include "objects/object_hakach_objects/object_hakach_objects.h" #include "objects/object_hakach_objects/object_hakach_objects.h"
#define FLAGS 0x00000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
void BgHakaWater_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaWater_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHakaWater_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHakaWater_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -8,7 +8,7 @@
#include "objects/object_hakach_objects/object_hakach_objects.h" #include "objects/object_hakach_objects/object_hakach_objects.h"
#include "objects/object_haka_objects/object_haka_objects.h" #include "objects/object_haka_objects/object_haka_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
typedef enum { typedef enum {
/* 0x0 */ STA_GIANT_BIRD_STATUE, /* 0x0 */ STA_GIANT_BIRD_STATUE,

View file

@ -8,7 +8,7 @@
#include "objects/object_heavy_object/object_heavy_object.h" #include "objects/object_heavy_object/object_heavy_object.h"
#include "vt.h" #include "vt.h"
#define FLAGS 0x00000000 #define FLAGS 0
#define PIECE_FLAG_HIT_FLOOR (1 << 0) #define PIECE_FLAG_HIT_FLOOR (1 << 0)
@ -75,7 +75,7 @@ void BgHeavyBlock_InitPiece(BgHeavyBlock* this, f32 scale) {
void BgHeavyBlock_SetupDynapoly(BgHeavyBlock* this, GlobalContext* globalCtx) { void BgHeavyBlock_SetupDynapoly(BgHeavyBlock* this, GlobalContext* globalCtx) {
s32 pad[2]; s32 pad[2];
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
this->dyna.actor.flags |= 0x20030; this->dyna.actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_17;
DynaPolyActor_Init(&this->dyna, DPM_UNK); DynaPolyActor_Init(&this->dyna, DPM_UNK);
CollisionHeader_GetVirtual(&gHeavyBlockCol, &colHeader); CollisionHeader_GetVirtual(&gHeavyBlockCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
@ -99,7 +99,7 @@ void BgHeavyBlock_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc = BgHeavyBlock_MovePiece; this->actionFunc = BgHeavyBlock_MovePiece;
BgHeavyBlock_InitPiece(this, 1.0f); BgHeavyBlock_InitPiece(this, 1.0f);
this->timer = 120; this->timer = 120;
thisx->flags |= 0x10; thisx->flags |= ACTOR_FLAG_4;
this->unk_164.y = -50.0f; this->unk_164.y = -50.0f;
break; break;
case HEAVYBLOCK_SMALL_PIECE: case HEAVYBLOCK_SMALL_PIECE:
@ -107,7 +107,7 @@ void BgHeavyBlock_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc = BgHeavyBlock_MovePiece; this->actionFunc = BgHeavyBlock_MovePiece;
BgHeavyBlock_InitPiece(this, 2.0f); BgHeavyBlock_InitPiece(this, 2.0f);
this->timer = 120; this->timer = 120;
thisx->flags |= 0x10; thisx->flags |= ACTOR_FLAG_4;
this->unk_164.y = -20.0f; this->unk_164.y = -20.0f;
break; break;
case HEAVYBLOCK_BREAKABLE: case HEAVYBLOCK_BREAKABLE:
@ -469,7 +469,7 @@ void BgHeavyBlock_Land(BgHeavyBlock* this, GlobalContext* globalCtx) {
break; break;
} }
} else { } else {
this->dyna.actor.flags &= ~0x30; this->dyna.actor.flags &= ~(ACTOR_FLAG_4 | ACTOR_FLAG_5);
this->actionFunc = BgHeavyBlock_DoNothing; this->actionFunc = BgHeavyBlock_DoNothing;
} }
} }

View file

@ -7,7 +7,7 @@
#include "z_bg_hidan_curtain.h" #include "z_bg_hidan_curtain.h"
#include "objects/gameplay_keep/gameplay_keep.h" #include "objects/gameplay_keep/gameplay_keep.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgHidanCurtain_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanCurtain_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHidanCurtain_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanCurtain_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_hidan_dalm.h" #include "z_bg_hidan_dalm.h"
#include "objects/object_hidan_objects/object_hidan_objects.h" #include "objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgHidanDalm_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanDalm_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHidanDalm_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanDalm_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -138,7 +138,7 @@ void BgHidanDalm_Wait(BgHidanDalm* this, GlobalContext* globalCtx) {
this->dyna.actor.world.pos.z += 32.5f * Math_CosS(this->dyna.actor.world.rot.y); this->dyna.actor.world.pos.z += 32.5f * Math_CosS(this->dyna.actor.world.rot.y);
func_8002DF54(globalCtx, &this->dyna.actor, 8); func_8002DF54(globalCtx, &this->dyna.actor, 8);
this->dyna.actor.flags |= 0x10; this->dyna.actor.flags |= ACTOR_FLAG_4;
this->actionFunc = BgHidanDalm_Shrink; this->actionFunc = BgHidanDalm_Shrink;
this->dyna.actor.bgCheckFlags &= ~2; this->dyna.actor.bgCheckFlags &= ~2;
this->dyna.actor.bgCheckFlags &= ~8; this->dyna.actor.bgCheckFlags &= ~8;

View file

@ -7,7 +7,7 @@
#include "z_bg_hidan_firewall.h" #include "z_bg_hidan_firewall.h"
#include "objects/object_hidan_objects/object_hidan_objects.h" #include "objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgHidanFirewall_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanFirewall_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHidanFirewall_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanFirewall_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_hidan_fslift.h" #include "z_bg_hidan_fslift.h"
#include "objects/object_hidan_objects/object_hidan_objects.h" #include "objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgHidanFslift_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanFslift_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHidanFslift_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanFslift_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -9,7 +9,7 @@
#include "objects/gameplay_keep/gameplay_keep.h" #include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_hidan_objects/object_hidan_objects.h" #include "objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
typedef enum { typedef enum {
/* 0 */ FWBIG_MOVE, /* 0 */ FWBIG_MOVE,
@ -94,7 +94,7 @@ void BgHidanFwbig_Init(Actor* thisx, GlobalContext* globalCtx2) {
BgHidanFwbig_UpdatePosition(this); BgHidanFwbig_UpdatePosition(this);
Actor_SetScale(&this->actor, 0.15f); Actor_SetScale(&this->actor, 0.15f);
this->collider.dim.height = 230; this->collider.dim.height = 230;
this->actor.flags |= 0x10; this->actor.flags |= ACTOR_FLAG_4;
this->moveState = FWBIG_MOVE; this->moveState = FWBIG_MOVE;
this->actionFunc = BgHidanFwbig_WaitForPlayer; this->actionFunc = BgHidanFwbig_WaitForPlayer;
this->actor.world.pos.y = this->actor.home.pos.y - (2400.0f * this->actor.scale.y); this->actor.world.pos.y = this->actor.home.pos.y - (2400.0f * this->actor.scale.y);

View file

@ -7,7 +7,7 @@
#include "z_bg_hidan_hamstep.h" #include "z_bg_hidan_hamstep.h"
#include "objects/object_hidan_objects/object_hidan_objects.h" #include "objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgHidanHamstep_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanHamstep_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHidanHamstep_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanHamstep_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_hidan_hrock.h" #include "z_bg_hidan_hrock.h"
#include "objects/object_hidan_objects/object_hidan_objects.h" #include "objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgHidanHrock_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanHrock_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHidanHrock_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanHrock_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -125,7 +125,7 @@ void BgHidanHrock_Init(Actor* thisx, GlobalContext* globalCtx) {
} }
} else { } else {
if (thisx->params == 0) { if (thisx->params == 0) {
thisx->flags |= 0x30; thisx->flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5;
thisx->uncullZoneForward = 3000.0f; thisx->uncullZoneForward = 3000.0f;
} }
this->actionFunc = func_808896B8; this->actionFunc = func_808896B8;
@ -184,7 +184,7 @@ void func_8088960C(BgHidanHrock* this, GlobalContext* globalCtx) {
this->dyna.actor.velocity.y++; this->dyna.actor.velocity.y++;
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, this->dyna.actor.velocity.y)) { if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, this->dyna.actor.velocity.y)) {
this->dyna.actor.flags &= ~0x30; this->dyna.actor.flags &= ~(ACTOR_FLAG_4 | ACTOR_FLAG_5);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
if (this->dyna.actor.params == 0) { if (this->dyna.actor.params == 0) {
@ -203,7 +203,7 @@ void func_808896B8(BgHidanHrock* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & 2) { if (this->collider.base.acFlags & 2) {
this->collider.base.acFlags &= ~2; this->collider.base.acFlags &= ~2;
this->actionFunc = func_808894B0; this->actionFunc = func_808894B0;
this->dyna.actor.flags |= 0x10; this->dyna.actor.flags |= ACTOR_FLAG_4;
if (this->dyna.actor.params == 0) { if (this->dyna.actor.params == 0) {
this->dyna.actor.room = -1; this->dyna.actor.room = -1;

View file

@ -7,7 +7,7 @@
#include "z_bg_hidan_kousi.h" #include "z_bg_hidan_kousi.h"
#include "objects/object_hidan_objects/object_hidan_objects.h" #include "objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgHidanKousi_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanKousi_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHidanKousi_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanKousi_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -9,7 +9,7 @@
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "objects/object_hidan_objects/object_hidan_objects.h" #include "objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
typedef enum { typedef enum {
/* 0 */ CRACKED_STONE_FLOOR, /* 0 */ CRACKED_STONE_FLOOR,

View file

@ -7,7 +7,7 @@
#include "z_bg_hidan_rock.h" #include "z_bg_hidan_rock.h"
#include "objects/object_hidan_objects/object_hidan_objects.h" #include "objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgHidanRock_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanRock_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHidanRock_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanRock_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -91,7 +91,7 @@ void BgHidanRock_Init(Actor* thisx, GlobalContext* globalCtx) {
} else { } else {
this->actionFunc = func_8088B268; this->actionFunc = func_8088B268;
} }
thisx->flags |= 0x30; thisx->flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5;
CollisionHeader_GetVirtual(&gFireTempleStoneBlock1Col, &colHeader); CollisionHeader_GetVirtual(&gFireTempleStoneBlock1Col, &colHeader);
} else { } else {
CollisionHeader_GetVirtual(&gFireTempleStoneBlock2Col, &colHeader); CollisionHeader_GetVirtual(&gFireTempleStoneBlock2Col, &colHeader);
@ -114,7 +114,7 @@ void BgHidanRock_Destroy(Actor* thisx, GlobalContext* globalCtx) {
} }
void func_8088B24C(BgHidanRock* this) { void func_8088B24C(BgHidanRock* this) {
this->dyna.actor.flags |= 0x30; this->dyna.actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5;
this->actionFunc = func_8088B990; this->actionFunc = func_8088B990;
} }
@ -247,7 +247,7 @@ void func_8088B79C(BgHidanRock* this, GlobalContext* globalCtx) {
} else { } else {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 15.0f; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 15.0f;
this->actionFunc = func_8088B90C; this->actionFunc = func_8088B90C;
this->dyna.actor.flags &= ~0x30; this->dyna.actor.flags &= ~(ACTOR_FLAG_4 | ACTOR_FLAG_5);
} }
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);

View file

@ -7,7 +7,7 @@
#include "z_bg_hidan_rsekizou.h" #include "z_bg_hidan_rsekizou.h"
#include "objects/object_hidan_objects/object_hidan_objects.h" #include "objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgHidanRsekizou_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanRsekizou_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHidanRsekizou_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanRsekizou_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_hidan_sekizou.h" #include "z_bg_hidan_sekizou.h"
#include "objects/object_hidan_objects/object_hidan_objects.h" #include "objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgHidanSekizou_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanSekizou_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHidanSekizou_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanSekizou_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_hidan_sima.h" #include "z_bg_hidan_sima.h"
#include "objects/object_hidan_objects/object_hidan_objects.h" #include "objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgHidanSima_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanSima_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHidanSima_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanSima_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_hidan_syoku.h" #include "z_bg_hidan_syoku.h"
#include "objects/object_hidan_objects/object_hidan_objects.h" #include "objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgHidanSyoku_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanSyoku_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHidanSyoku_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanSyoku_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_ice_objects.h" #include "z_bg_ice_objects.h"
#include "objects/object_ice_objects/object_ice_objects.h" #include "objects/object_ice_objects/object_ice_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgIceObjects_Init(Actor* thisx, GlobalContext* globalCtx); void BgIceObjects_Init(Actor* thisx, GlobalContext* globalCtx);
void BgIceObjects_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgIceObjects_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -141,7 +141,7 @@ void BgIceObjects_Idle(BgIceObjects* this, GlobalContext* globalCtx) {
if ((this->dyna.unk_150 > 0.0f) && !Player_InCsMode(globalCtx)) { if ((this->dyna.unk_150 > 0.0f) && !Player_InCsMode(globalCtx)) {
BgIceObjects_SetNextTarget(this, globalCtx); BgIceObjects_SetNextTarget(this, globalCtx);
if (Actor_WorldDistXZToPoint(thisx, &this->targetPos) > 1.0f) { if (Actor_WorldDistXZToPoint(thisx, &this->targetPos) > 1.0f) {
thisx->flags |= 0x10; thisx->flags |= ACTOR_FLAG_4;
func_8002DF54(globalCtx, thisx, 8); func_8002DF54(globalCtx, thisx, 8);
thisx->params = 1; thisx->params = 1;
this->actionFunc = BgIceObjects_Slide; this->actionFunc = BgIceObjects_Slide;
@ -169,7 +169,7 @@ void BgIceObjects_Slide(BgIceObjects* this, GlobalContext* globalCtx) {
this->targetPos.x = thisx->world.pos.x; this->targetPos.x = thisx->world.pos.x;
this->targetPos.z = thisx->world.pos.z; this->targetPos.z = thisx->world.pos.z;
if (thisx->velocity.y <= 0.0f) { if (thisx->velocity.y <= 0.0f) {
thisx->flags &= ~0x10; thisx->flags &= ~ACTOR_FLAG_4;
} }
thisx->params = 0; thisx->params = 0;
func_8002DF54(globalCtx, thisx, 7); func_8002DF54(globalCtx, thisx, 7);
@ -206,7 +206,7 @@ void BgIceObjects_Reset(BgIceObjects* this, GlobalContext* globalCtx) {
this->dyna.unk_150 = 0.0f; this->dyna.unk_150 = 0.0f;
} }
if (Math_StepToF(&thisx->world.pos.y, thisx->home.pos.y, 1.0f)) { if (Math_StepToF(&thisx->world.pos.y, thisx->home.pos.y, 1.0f)) {
thisx->flags &= ~0x10; thisx->flags &= ~ACTOR_FLAG_4;
Math_Vec3f_Copy(&this->targetPos, &thisx->home.pos); Math_Vec3f_Copy(&this->targetPos, &thisx->home.pos);
this->actionFunc = BgIceObjects_Idle; this->actionFunc = BgIceObjects_Idle;
thisx->speedXZ = 0.0f; thisx->speedXZ = 0.0f;

View file

@ -1,7 +1,7 @@
#include "z_bg_ice_shelter.h" #include "z_bg_ice_shelter.h"
#include "objects/object_ice_objects/object_ice_objects.h" #include "objects/object_ice_objects/object_ice_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgIceShelter_Init(Actor* thisx, GlobalContext* globalCtx); void BgIceShelter_Init(Actor* thisx, GlobalContext* globalCtx);
void BgIceShelter_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgIceShelter_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_ice_shutter.h" #include "z_bg_ice_shutter.h"
#include "objects/object_ice_objects/object_ice_objects.h" #include "objects/object_ice_objects/object_ice_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgIceShutter_Init(Actor* thisx, GlobalContext* globalCtx); void BgIceShutter_Init(Actor* thisx, GlobalContext* globalCtx);
void BgIceShutter_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgIceShutter_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_ice_turara.h" #include "z_bg_ice_turara.h"
#include "objects/object_ice_objects/object_ice_objects.h" #include "objects/object_ice_objects/object_ice_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgIceTurara_Init(Actor* thisx, GlobalContext* globalCtx); void BgIceTurara_Init(Actor* thisx, GlobalContext* globalCtx);
void BgIceTurara_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgIceTurara_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_ingate.h" #include "z_bg_ingate.h"
#include "objects/object_ingate/object_ingate.h" #include "objects/object_ingate/object_ingate.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgInGate_Init(Actor* thisx, GlobalContext* globalCtx); void BgInGate_Init(Actor* thisx, GlobalContext* globalCtx);
void BgInGate_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgInGate_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_jya_1flift.h" #include "z_bg_jya_1flift.h"
#include "objects/object_jya_obj/object_jya_obj.h" #include "objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgJya1flift_Init(Actor* thisx, GlobalContext* globalCtx); void BgJya1flift_Init(Actor* thisx, GlobalContext* globalCtx);
void BgJya1flift_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJya1flift_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_jya_amishutter.h" #include "z_bg_jya_amishutter.h"
#include "objects/object_jya_obj/object_jya_obj.h" #include "objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgJyaAmishutter_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaAmishutter_Init(Actor* thisx, GlobalContext* globalCtx);
void BgJyaAmishutter_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaAmishutter_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_jya_bigmirror.h" #include "z_bg_jya_bigmirror.h"
#include "objects/object_jya_obj/object_jya_obj.h" #include "objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0x00000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
void BgJyaBigmirror_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaBigmirror_Init(Actor* thisx, GlobalContext* globalCtx);
void BgJyaBigmirror_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaBigmirror_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_jya_block.h" #include "z_bg_jya_block.h"
#include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgJyaBlock_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaBlock_Init(Actor* thisx, GlobalContext* globalCtx);
void BgJyaBlock_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaBlock_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -1,7 +1,7 @@
#include "z_bg_jya_bombchuiwa.h" #include "z_bg_jya_bombchuiwa.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "objects/object_jya_obj/object_jya_obj.h" #include "objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0x00000001 #define FLAGS ACTOR_FLAG_0
void BgJyaBombchuiwa_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaBombchuiwa_Init(Actor* thisx, GlobalContext* globalCtx);
void BgJyaBombchuiwa_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaBombchuiwa_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -162,7 +162,7 @@ void BgJyaBombchuiwa_CleanUpAfterExplosion(BgJyaBombchuiwa* this, GlobalContext*
BgJyaBombchuiwa_SetDrawFlags(this, 4); BgJyaBombchuiwa_SetDrawFlags(this, 4);
this->lightRayIntensity = 0.3f; this->lightRayIntensity = 0.3f;
this->timer = 0; this->timer = 0;
this->actor.flags &= ~1; this->actor.flags &= ~ACTOR_FLAG_0;
} }
void func_808949B8(BgJyaBombchuiwa* this, GlobalContext* globalCtx) { void func_808949B8(BgJyaBombchuiwa* this, GlobalContext* globalCtx) {

View file

@ -9,7 +9,7 @@
#include "objects/object_jya_obj/object_jya_obj.h" #include "objects/object_jya_obj/object_jya_obj.h"
#include "vt.h" #include "vt.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgJyaBombiwa_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaBombiwa_Init(Actor* thisx, GlobalContext* globalCtx);
void BgJyaBombiwa_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaBombiwa_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -4,7 +4,7 @@
#include "objects/object_jya_obj/object_jya_obj.h" #include "objects/object_jya_obj/object_jya_obj.h"
#include "vt.h" #include "vt.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgJyaCobra_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaCobra_Init(Actor* thisx, GlobalContext* globalCtx);
void BgJyaCobra_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaCobra_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -8,7 +8,7 @@
#include "z_bg_jya_goroiwa.h" #include "z_bg_jya_goroiwa.h"
#include "objects/object_goroiwa/object_goroiwa.h" #include "objects/object_goroiwa/object_goroiwa.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgJyaGoroiwa_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaGoroiwa_Init(Actor* thisx, GlobalContext* globalCtx);
void BgJyaGoroiwa_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaGoroiwa_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -8,7 +8,7 @@
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "objects/object_jya_iron/object_jya_iron.h" #include "objects/object_jya_iron/object_jya_iron.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgJyaHaheniron_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaHaheniron_Init(Actor* thisx, GlobalContext* globalCtx);
void BgJyaHaheniron_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaHaheniron_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -8,7 +8,7 @@
#include "objects/object_jya_iron/object_jya_iron.h" #include "objects/object_jya_iron/object_jya_iron.h"
#include "overlays/actors/ovl_En_Ik/z_en_ik.h" #include "overlays/actors/ovl_En_Ik/z_en_ik.h"
#define FLAGS 0x00000000 #define FLAGS 0
typedef void (*BgJyaIronobjIkFunc)(BgJyaIronobj*, GlobalContext*, EnIk*); typedef void (*BgJyaIronobjIkFunc)(BgJyaIronobj*, GlobalContext*, EnIk*);

View file

@ -7,7 +7,7 @@
#include "z_bg_jya_kanaami.h" #include "z_bg_jya_kanaami.h"
#include "objects/object_jya_obj/object_jya_obj.h" #include "objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgJyaKanaami_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaKanaami_Init(Actor* thisx, GlobalContext* globalCtx);
void BgJyaKanaami_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaKanaami_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_jya_lift.h" #include "z_bg_jya_lift.h"
#include "objects/object_jya_obj/object_jya_obj.h" #include "objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgJyaLift_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaLift_Init(Actor* thisx, GlobalContext* globalCtx);
void BgJyaLift_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaLift_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -2,7 +2,7 @@
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "objects/object_jya_obj/object_jya_obj.h" #include "objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgJyaMegami_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaMegami_Init(Actor* thisx, GlobalContext* globalCtx);
void BgJyaMegami_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaMegami_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -8,7 +8,7 @@
#include "objects/object_jya_obj/object_jya_obj.h" #include "objects/object_jya_obj/object_jya_obj.h"
#include "vt.h" #include "vt.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgJyaZurerukabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaZurerukabe_Init(Actor* thisx, GlobalContext* globalCtx);
void BgJyaZurerukabe_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaZurerukabe_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_menkuri_eye.h" #include "z_bg_menkuri_eye.h"
#include "objects/object_menkuri_objects/object_menkuri_objects.h" #include "objects/object_menkuri_objects/object_menkuri_objects.h"
#define FLAGS 0x00000020 #define FLAGS ACTOR_FLAG_5
void BgMenkuriEye_Init(Actor* thisx, GlobalContext* globalCtx); void BgMenkuriEye_Init(Actor* thisx, GlobalContext* globalCtx);
void BgMenkuriEye_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMenkuriEye_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_menkuri_kaiten.h" #include "z_bg_menkuri_kaiten.h"
#include "objects/object_menkuri_objects/object_menkuri_objects.h" #include "objects/object_menkuri_objects/object_menkuri_objects.h"
#define FLAGS 0x00000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
void BgMenkuriKaiten_Init(Actor* thisx, GlobalContext* globalCtx); void BgMenkuriKaiten_Init(Actor* thisx, GlobalContext* globalCtx);
void BgMenkuriKaiten_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMenkuriKaiten_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_menkuri_nisekabe.h" #include "z_bg_menkuri_nisekabe.h"
#include "objects/object_menkuri_objects/object_menkuri_objects.h" #include "objects/object_menkuri_objects/object_menkuri_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgMenkuriNisekabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgMenkuriNisekabe_Init(Actor* thisx, GlobalContext* globalCtx);
void BgMenkuriNisekabe_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMenkuriNisekabe_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -41,9 +41,9 @@ void BgMenkuriNisekabe_Update(Actor* thisx, GlobalContext* globalCtx) {
BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx; BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx;
if (globalCtx->actorCtx.unk_03 != 0) { if (globalCtx->actorCtx.unk_03 != 0) {
this->actor.flags |= 0x80; this->actor.flags |= ACTOR_FLAG_7;
} else { } else {
this->actor.flags &= ~0x80; this->actor.flags &= ~ACTOR_FLAG_7;
} }
} }
@ -51,7 +51,7 @@ void BgMenkuriNisekabe_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx; BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx;
u32 index = this->actor.params & 0xFF; u32 index = this->actor.params & 0xFF;
if ((this->actor.flags & 0x80) == 0x80) { if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) {
Gfx_DrawDListXlu(globalCtx, sDLists[index]); Gfx_DrawDListXlu(globalCtx, sDLists[index]);
} else { } else {
Gfx_DrawDListOpa(globalCtx, sDLists[index]); Gfx_DrawDListOpa(globalCtx, sDLists[index]);

View file

@ -8,7 +8,7 @@
#include "overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.h" #include "overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.h"
#include "objects/object_mizu_objects/object_mizu_objects.h" #include "objects/object_mizu_objects/object_mizu_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx); void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx);
void BgMizuBwall_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMizuBwall_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -8,7 +8,7 @@
#include "overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.h" #include "overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.h"
#include "objects/object_mizu_objects/object_mizu_objects.h" #include "objects/object_mizu_objects/object_mizu_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
#define MOVEBG_TYPE(params) (((u16)(params) >> 0xC) & 0xF) #define MOVEBG_TYPE(params) (((u16)(params) >> 0xC) & 0xF)
#define MOVEBG_FLAGS(params) ((u16)(params)&0x3F) #define MOVEBG_FLAGS(params) ((u16)(params)&0x3F)
@ -310,7 +310,7 @@ void func_8089E318(BgMizuMovebg* this, GlobalContext* globalCtx) {
this->dyna.actor.child->world.pos.x = this->dyna.actor.world.pos.x + sp28.x; this->dyna.actor.child->world.pos.x = this->dyna.actor.world.pos.x + sp28.x;
this->dyna.actor.child->world.pos.y = this->dyna.actor.world.pos.y + sp28.y; this->dyna.actor.child->world.pos.y = this->dyna.actor.world.pos.y + sp28.y;
this->dyna.actor.child->world.pos.z = this->dyna.actor.world.pos.z + sp28.z; this->dyna.actor.child->world.pos.z = this->dyna.actor.world.pos.z + sp28.z;
this->dyna.actor.child->flags &= ~1; this->dyna.actor.child->flags &= ~ACTOR_FLAG_0;
} }
break; break;
} }

View file

@ -1,7 +1,7 @@
#include "z_bg_mizu_shutter.h" #include "z_bg_mizu_shutter.h"
#include "objects/object_mizu_objects/object_mizu_objects.h" #include "objects/object_mizu_objects/object_mizu_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
#define SIZE_PARAM (((u16)this->dyna.actor.params >> 0xC) & 0xF) #define SIZE_PARAM (((u16)this->dyna.actor.params >> 0xC) & 0xF)
#define TIMER_PARAM (((u16)this->dyna.actor.params >> 6) & 0x3F) #define TIMER_PARAM (((u16)this->dyna.actor.params >> 6) & 0x3F)

View file

@ -7,7 +7,7 @@
#include "z_bg_mizu_uzu.h" #include "z_bg_mizu_uzu.h"
#include "objects/object_mizu_objects/object_mizu_objects.h" #include "objects/object_mizu_objects/object_mizu_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgMizuUzu_Init(Actor* thisx, GlobalContext* globalCtx); void BgMizuUzu_Init(Actor* thisx, GlobalContext* globalCtx);
void BgMizuUzu_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMizuUzu_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_mizu_water.h" #include "z_bg_mizu_water.h"
#include "objects/object_mizu_objects/object_mizu_objects.h" #include "objects/object_mizu_objects/object_mizu_objects.h"
#define FLAGS 0x00000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
void BgMizuWater_Init(Actor* thisx, GlobalContext* globalCtx); void BgMizuWater_Init(Actor* thisx, GlobalContext* globalCtx);
void BgMizuWater_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMizuWater_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -14,7 +14,7 @@
#include "objects/object_mjin_flash/object_mjin_flash.h" #include "objects/object_mjin_flash/object_mjin_flash.h"
#include "objects/object_mjin_oka/object_mjin_oka.h" #include "objects/object_mjin_oka/object_mjin_oka.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgMjin_Init(Actor* thisx, GlobalContext* globalCtx); void BgMjin_Init(Actor* thisx, GlobalContext* globalCtx);
void BgMjin_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMjin_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -78,7 +78,7 @@ void func_808A0850(BgMjin* this, GlobalContext* globalCtx) {
if (Object_IsLoaded(&globalCtx->objectCtx, this->objBankIndex)) { if (Object_IsLoaded(&globalCtx->objectCtx, this->objBankIndex)) {
colHeader = NULL; colHeader = NULL;
this->dyna.actor.flags &= ~0x10; this->dyna.actor.flags &= ~ACTOR_FLAG_4;
this->dyna.actor.objBankIndex = this->objBankIndex; this->dyna.actor.objBankIndex = this->objBankIndex;
Actor_SetObjectDependency(globalCtx, &this->dyna.actor); Actor_SetObjectDependency(globalCtx, &this->dyna.actor);
DynaPolyActor_Init(&this->dyna, 0); DynaPolyActor_Init(&this->dyna, 0);

View file

@ -7,7 +7,7 @@
#include "z_bg_mori_bigst.h" #include "z_bg_mori_bigst.h"
#include "objects/object_mori_objects/object_mori_objects.h" #include "objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgMoriBigst_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriBigst_Init(Actor* thisx, GlobalContext* globalCtx);
void BgMoriBigst_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriBigst_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -1,7 +1,7 @@
#include "z_bg_mori_elevator.h" #include "z_bg_mori_elevator.h"
#include "objects/object_mori_objects/object_mori_objects.h" #include "objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgMoriElevator_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriElevator_Init(Actor* thisx, GlobalContext* globalCtx);
void BgMoriElevator_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriElevator_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_mori_hashigo.h" #include "z_bg_mori_hashigo.h"
#include "objects/object_mori_objects/object_mori_objects.h" #include "objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgMoriHashigo_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriHashigo_Init(Actor* thisx, GlobalContext* globalCtx);
void BgMoriHashigo_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriHashigo_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -134,7 +134,7 @@ s32 BgMoriHashigo_SpawnLadder(BgMoriHashigo* this, GlobalContext* globalCtx) {
s32 BgMoriHashigo_InitClasp(BgMoriHashigo* this, GlobalContext* globalCtx) { s32 BgMoriHashigo_InitClasp(BgMoriHashigo* this, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChainClasp); Actor_ProcessInitChain(&this->dyna.actor, sInitChainClasp);
this->dyna.actor.flags |= 1; this->dyna.actor.flags |= ACTOR_FLAG_0;
Actor_SetFocus(&this->dyna.actor, 55.0f); Actor_SetFocus(&this->dyna.actor, 55.0f);
BgMoriHashigo_InitCollider(this, globalCtx); BgMoriHashigo_InitCollider(this, globalCtx);
if ((this->dyna.actor.params == HASHIGO_CLASP) && !BgMoriHashigo_SpawnLadder(this, globalCtx)) { if ((this->dyna.actor.params == HASHIGO_CLASP) && !BgMoriHashigo_SpawnLadder(this, globalCtx)) {

View file

@ -7,7 +7,7 @@
#include "z_bg_mori_hashira4.h" #include "z_bg_mori_hashira4.h"
#include "objects/object_mori_objects/object_mori_objects.h" #include "objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
void BgMoriHashira4_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriHashira4_Init(Actor* thisx, GlobalContext* globalCtx);
void BgMoriHashira4_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriHashira4_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -13,7 +13,7 @@
#include "objects/object_mori_hineri2a/object_mori_hineri2a.h" #include "objects/object_mori_hineri2a/object_mori_hineri2a.h"
#include "objects/object_mori_tex/object_mori_tex.h" #include "objects/object_mori_tex/object_mori_tex.h"
#define FLAGS 0x00000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
void BgMoriHineri_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriHineri_Init(Actor* thisx, GlobalContext* globalCtx);
void BgMoriHineri_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriHineri_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_mori_idomizu.h" #include "z_bg_mori_idomizu.h"
#include "objects/object_mori_objects/object_mori_objects.h" #include "objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0x00000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
void BgMoriIdomizu_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriIdomizu_Init(Actor* thisx, GlobalContext* globalCtx);
void BgMoriIdomizu_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriIdomizu_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_mori_kaitenkabe.h" #include "z_bg_mori_kaitenkabe.h"
#include "objects/object_mori_objects/object_mori_objects.h" #include "objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgMoriKaitenkabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriKaitenkabe_Init(Actor* thisx, GlobalContext* globalCtx);
void BgMoriKaitenkabe_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriKaitenkabe_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_mori_rakkatenjo.h" #include "z_bg_mori_rakkatenjo.h"
#include "objects/object_mori_objects/object_mori_objects.h" #include "objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0x00000030 #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
void BgMoriRakkatenjo_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriRakkatenjo_Init(Actor* thisx, GlobalContext* globalCtx);
void BgMoriRakkatenjo_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriRakkatenjo_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_po_event.h" #include "z_bg_po_event.h"
#include "objects/object_po_sisters/object_po_sisters.h" #include "objects/object_po_sisters/object_po_sisters.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgPoEvent_Init(Actor* thisx, GlobalContext* globalCtx); void BgPoEvent_Init(Actor* thisx, GlobalContext* globalCtx);
void BgPoEvent_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgPoEvent_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -155,7 +155,7 @@ void BgPoEvent_InitBlocks(BgPoEvent* this, GlobalContext* globalCtx) {
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s32 bgId; s32 bgId;
this->dyna.actor.flags |= 0x30; this->dyna.actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5;
CollisionHeader_GetVirtual(&gPoSistersAmyBlockCol, &colHeader); CollisionHeader_GetVirtual(&gPoSistersAmyBlockCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
if ((this->type == 0) && (this->index != 3)) { if ((this->type == 0) && (this->index != 3)) {
@ -308,7 +308,7 @@ void BgPoEvent_BlockFall(BgPoEvent* this, GlobalContext* globalCtx) {
this->dyna.actor.velocity.y++; this->dyna.actor.velocity.y++;
if (Math_StepToF(&this->dyna.actor.world.pos.y, 433.0f, this->dyna.actor.velocity.y)) { if (Math_StepToF(&this->dyna.actor.world.pos.y, 433.0f, this->dyna.actor.velocity.y)) {
this->dyna.actor.flags &= ~0x20; this->dyna.actor.flags &= ~ACTOR_FLAG_5;
this->dyna.actor.velocity.y = 0.0f; this->dyna.actor.velocity.y = 0.0f;
sBlocksAtRest++; sBlocksAtRest++;
if (this->type != 1) { if (this->type != 1) {

View file

@ -8,7 +8,7 @@
#include "objects/gameplay_keep/gameplay_keep.h" #include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_syokudai/object_syokudai.h" #include "objects/object_syokudai/object_syokudai.h"
#define FLAGS 0x00000000 #define FLAGS 0
typedef enum { typedef enum {
POE_FLAME_PURPLE, // Meg POE_FLAME_PURPLE, // Meg

View file

@ -7,7 +7,7 @@
#include "z_bg_pushbox.h" #include "z_bg_pushbox.h"
#include "objects/object_pu_box/object_pu_box.h" #include "objects/object_pu_box/object_pu_box.h"
#define FLAGS 0x00000000 #define FLAGS 0
void BgPushbox_Init(Actor* thisx, GlobalContext* globalCtx); void BgPushbox_Init(Actor* thisx, GlobalContext* globalCtx);
void BgPushbox_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgPushbox_Destroy(Actor* thisx, GlobalContext* globalCtx);

View file

@ -7,7 +7,7 @@
#include "z_bg_relay_objects.h" #include "z_bg_relay_objects.h"
#include "objects/object_relay_objects/object_relay_objects.h" #include "objects/object_relay_objects/object_relay_objects.h"
#define FLAGS 0x00000010 #define FLAGS ACTOR_FLAG_4
typedef enum { typedef enum {
/* 0 */ WINDMILL_ROTATING_GEAR, /* 0 */ WINDMILL_ROTATING_GEAR,
@ -62,7 +62,7 @@ void BgRelayObjects_Init(Actor* thisx, GlobalContext* globalCtx) {
} }
func_800F5718(); func_800F5718();
thisx->room = -1; thisx->room = -1;
thisx->flags |= 0x20; thisx->flags |= ACTOR_FLAG_5;
if (D_808A9508 & 2) { if (D_808A9508 & 2) {
thisx->params = 0xFF; thisx->params = 0xFF;
Actor_Kill(thisx); Actor_Kill(thisx);
@ -154,7 +154,7 @@ void func_808A9234(BgRelayObjects* this, GlobalContext* globalCtx) {
return; return;
} }
Flags_UnsetSwitch(globalCtx, this->switchFlag); Flags_UnsetSwitch(globalCtx, this->switchFlag);
this->dyna.actor.flags &= ~0x10; this->dyna.actor.flags &= ~ACTOR_FLAG_4;
if (globalCtx->roomCtx.curRoom.num == 4) { if (globalCtx->roomCtx.curRoom.num == 4) {
gSaveContext.timer1State = 0xF; gSaveContext.timer1State = 0xF;
} }

Some files were not shown because too many files have changed in this diff Show more