1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-23 23:41:24 +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

@ -9,7 +9,7 @@
#include "objects/gameplay_keep/gameplay_keep.h"
#include "vt.h"
#define FLAGS 0x00400000
#define FLAGS ACTOR_FLAG_22
void ObjBean_Init(Actor* thisx, GlobalContext* globalCtx);
void ObjBean_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -638,7 +638,7 @@ void ObjBean_WaitForWater(ObjBean* this, GlobalContext* globalCtx) {
ObjBean_SetupGrowWaterPhase1(this);
D_80B90E30 = this;
OnePointCutscene_Init(globalCtx, 2210, -99, &this->dyna.actor, MAIN_CAM);
this->dyna.actor.flags |= 0x10;
this->dyna.actor.flags |= ACTOR_FLAG_4;
return;
}
@ -741,7 +741,7 @@ void ObjBean_GrowWaterPhase5(ObjBean* this, GlobalContext* globalCtx) {
this->transformFunc(this);
if (this->timer <= 0) {
func_80B8FF50(this);
this->dyna.actor.flags &= ~0x10;
this->dyna.actor.flags &= ~ACTOR_FLAG_4;
}
}
@ -766,7 +766,7 @@ void ObjBean_SetupFly(ObjBean* this) {
this->actionFunc = ObjBean_Fly;
ObjBean_SetDrawMode(this, BEAN_STATE_DRAW_PLANT);
this->dyna.actor.speedXZ = 0.0f;
this->dyna.actor.flags |= 0x10; // Never stop updating
this->dyna.actor.flags |= ACTOR_FLAG_4; // Never stop updating
}
void ObjBean_Fly(ObjBean* this, GlobalContext* globalCtx) {
@ -778,7 +778,7 @@ void ObjBean_Fly(ObjBean* this, GlobalContext* globalCtx) {
ObjBean_SetupPath(this, globalCtx);
ObjBean_SetupWaitForStepOff(this);
this->dyna.actor.flags &= ~0x10; // Never stop updating (disable)
this->dyna.actor.flags &= ~ACTOR_FLAG_4; // Never stop updating (disable)
camera = globalCtx->cameraPtrs[MAIN_CAM];
if ((camera->setting == CAM_SET_BEAN_LOST_WOODS) || (camera->setting == CAM_SET_BEAN_GENERIC)) {