mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-22 06:52:03 +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:
parent
79220ba58a
commit
a9284494f2
439 changed files with 1342 additions and 1304 deletions
|
@ -3,7 +3,7 @@
|
|||
#include "objects/object_tw/object_tw.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
|
||||
#define FLAGS 0x00000035
|
||||
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5)
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ TWEFF_NONE,
|
||||
|
@ -456,7 +456,7 @@ void BossTw_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actor.update = BossTw_BlastUpdate;
|
||||
this->actor.draw = BossTw_BlastDraw;
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInitBlasts);
|
||||
|
@ -645,7 +645,7 @@ void BossTw_SetupFlyTo(BossTw* this, GlobalContext* globalCtx) {
|
|||
BossTw* otherTw = (BossTw*)this->actor.parent;
|
||||
|
||||
this->unk_5F8 = 1;
|
||||
this->actor.flags |= 1;
|
||||
this->actor.flags |= ACTOR_FLAG_0;
|
||||
this->actionFunc = BossTw_FlyTo;
|
||||
this->rotateSpeed = 0.0f;
|
||||
Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_006F28, -10.0f);
|
||||
|
@ -1469,7 +1469,7 @@ void BossTw_SetupWait(BossTw* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = BossTw_Wait;
|
||||
this->visible = false;
|
||||
this->actor.world.pos.y = -2000.0f;
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
}
|
||||
|
||||
void BossTw_Wait(BossTw* this, GlobalContext* globalCtx) {
|
||||
|
@ -1631,7 +1631,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
|
||||
this->csState1 = 1;
|
||||
this->visible = true;
|
||||
this->actor.flags |= 1;
|
||||
this->actor.flags |= ACTOR_FLAG_0;
|
||||
this->actor.shape.rot.y = 0;
|
||||
BossTw_SetupWait(sKotakePtr, globalCtx);
|
||||
BossTw_SetupWait(sKoumePtr, globalCtx);
|
||||
|
@ -1752,7 +1752,7 @@ void BossTw_SetupCSWait(BossTw* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = BossTw_CSWait;
|
||||
this->visible = false;
|
||||
this->actor.world.pos.y = -2000.0f;
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1765,7 +1765,7 @@ void BossTw_TwinrovaSetupIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = BossTw_TwinrovaIntroCS;
|
||||
this->visible = false;
|
||||
this->actor.world.pos.y = -2000.0f;
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
}
|
||||
|
||||
void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
||||
|
@ -2372,7 +2372,7 @@ void BossTw_TwinrovaSetupDeathCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = BossTw_TwinrovaDeathCS;
|
||||
Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_024374, -3.0f);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
this->csState2 = this->csState1 = 0;
|
||||
this->work[CS_TIMER_1] = this->work[CS_TIMER_2] = 0;
|
||||
this->work[INVINC_TIMER] = 10000;
|
||||
|
@ -2672,7 +2672,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_BOSS_TW,
|
||||
this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0,
|
||||
0, TW_DEATHBALL_KOTAKE);
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
}
|
||||
}
|
||||
Actor_SetScale(&this->actor, this->actor.scale.x);
|
||||
|
@ -2725,7 +2725,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
sKoumePtr->work[YAW_TGT] = sKotakePtr->work[YAW_TGT] = sKoumePtr->actor.shape.rot.x =
|
||||
sKotakePtr->actor.shape.rot.x = sKoumePtr->actor.shape.rot.y = sKotakePtr->actor.shape.rot.y = 0;
|
||||
func_8002DF54(globalCtx, &sKoumePtr->actor, 1);
|
||||
sKoumePtr->actor.flags |= 1;
|
||||
sKoumePtr->actor.flags |= ACTOR_FLAG_0;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
|
@ -2974,7 +2974,7 @@ void BossTw_TwinrovaUpdate(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
BossTw* this = (BossTw*)thisx;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
this->actor.flags &= ~0x400;
|
||||
this->actor.flags &= ~ACTOR_FLAG_10;
|
||||
this->unk_5F8 = 0;
|
||||
this->collider.base.colType = COLTYPE_HIT3;
|
||||
|
||||
|
@ -5285,7 +5285,7 @@ void BossTw_TwinrovaStun(BossTw* this, GlobalContext* globalCtx) {
|
|||
s16 cloudType;
|
||||
|
||||
this->unk_5F8 = 1;
|
||||
this->actor.flags |= 0x400;
|
||||
this->actor.flags |= ACTOR_FLAG_10;
|
||||
|
||||
cloudType = sTwinrovaBlastType == 0 ? 3 : 2;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue