1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-20 22:11:16 +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

@ -3,7 +3,7 @@
#include "vt.h"
#include "objects/object_fr/object_fr.h"
#define FLAGS 0x02000019
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_25)
void EnFr_Init(Actor* thisx, GlobalContext* globalCtx);
void EnFr_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -223,7 +223,7 @@ void EnFr_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.destroy = NULL;
this->actor.draw = NULL;
this->actor.update = EnFr_UpdateIdle;
this->actor.flags &= ~0x11;
this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_4);
this->actor.flags &= ~0;
Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_PROP);
this->actor.textId = 0x40AC;
@ -265,7 +265,7 @@ void EnFr_Update(Actor* thisx, GlobalContext* globalCtx) {
s32 pad2;
if (Object_IsLoaded(&globalCtx->objectCtx, this->objBankIndex)) {
this->actor.flags &= ~0x10;
this->actor.flags &= ~ACTOR_FLAG_4;
frogIndex = this->actor.params - 1;
sEnFrPointers.frogs[frogIndex] = this;
Actor_ProcessInitChain(&this->actor, sInitChain);
@ -308,7 +308,7 @@ void EnFr_Update(Actor* thisx, GlobalContext* globalCtx) {
this->posButterflyLight.x = this->posButterfly.x = this->posLogSpot.x;
this->posButterflyLight.y = this->posButterfly.y = this->posLogSpot.y + 50.0f;
this->posButterflyLight.z = this->posButterfly.z = this->posLogSpot.z;
this->actor.flags &= ~1;
this->actor.flags &= ~ACTOR_FLAG_0;
}
}