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

@ -8,7 +8,7 @@
#include "objects/object_shopnuts/object_shopnuts.h"
#include "vt.h"
#define FLAGS 0x00000009
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3)
void EnDns_Init(Actor* thisx, GlobalContext* globalCtx);
void EnDns_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -326,9 +326,9 @@ void EnDns_Wait(EnDns* this, GlobalContext* globalCtx) {
this->actionFunc = EnDns_Talk;
} else {
if ((this->collider.base.ocFlags1 & OC1_HIT) || this->actor.isTargeted) {
this->actor.flags |= 0x10000;
this->actor.flags |= ACTOR_FLAG_16;
} else {
this->actor.flags &= ~0x10000;
this->actor.flags &= ~ACTOR_FLAG_16;
}
if (this->actor.xzDistToPlayer < 130.0f) {
func_8002F2F4(&this->actor, globalCtx);
@ -410,7 +410,7 @@ void func_809EFF98(EnDns* this, GlobalContext* globalCtx) {
this->dnsItemEntry->setRupeesAndFlags(this);
this->dropCollectible = 1;
this->maintainCollider = 0;
this->actor.flags &= ~1;
this->actor.flags &= ~ACTOR_FLAG_0;
EnDns_Change(this, 1);
this->actionFunc = EnDns_SetupBurrow;
}
@ -418,7 +418,7 @@ void func_809EFF98(EnDns* this, GlobalContext* globalCtx) {
this->dnsItemEntry->setRupeesAndFlags(this);
this->dropCollectible = 1;
this->maintainCollider = 0;
this->actor.flags &= ~1;
this->actor.flags &= ~ACTOR_FLAG_0;
EnDns_Change(this, 1);
this->actionFunc = EnDns_SetupBurrow;
}
@ -427,7 +427,7 @@ void func_809EFF98(EnDns* this, GlobalContext* globalCtx) {
void func_809F008C(EnDns* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
this->maintainCollider = 0;
this->actor.flags &= ~1;
this->actor.flags &= ~ACTOR_FLAG_0;
EnDns_Change(this, 1);
this->actionFunc = EnDns_SetupBurrow;
}