1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 14:34:32 +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

@ -2,7 +2,7 @@
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
#include "objects/object_in/object_in.h"
#define FLAGS 0x00000019
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4)
void EnIn_Init(Actor* thisx, GlobalContext* globalCtx);
void EnIn_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -456,7 +456,7 @@ void func_80A79C78(EnIn* this, GlobalContext* globalCtx) {
player->rideActor->freezeTimer = 10;
}
player->actor.freezeTimer = 10;
this->actor.flags &= ~1;
this->actor.flags &= ~ACTOR_FLAG_0;
ShrinkWindow_SetVal(0x20);
Interface_ChangeAlpha(2);
}
@ -683,10 +683,10 @@ void func_80A7A568(EnIn* this, GlobalContext* globalCtx) {
void func_80A7A770(EnIn* this, GlobalContext* globalCtx) {
if (this->unk_308.unk_00 == 0) {
this->actor.flags |= 0x10000;
this->actor.flags |= ACTOR_FLAG_16;
} else if (this->unk_308.unk_00 == 2) {
Rupees_ChangeBy(-50);
this->actor.flags &= ~0x10000;
this->actor.flags &= ~ACTOR_FLAG_16;
func_80A796EC(this, 3);
this->actionFunc = func_80A7A848;
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x0F) | 7;
@ -719,7 +719,7 @@ void func_80A7A848(EnIn* this, GlobalContext* globalCtx) {
void func_80A7A940(EnIn* this, GlobalContext* globalCtx) {
if (this->unk_308.unk_00 == 0) {
this->actor.flags |= 0x10000;
this->actor.flags |= ACTOR_FLAG_16;
return;
}
if (this->unk_1EC != 0) {
@ -729,7 +729,7 @@ void func_80A7A940(EnIn* this, GlobalContext* globalCtx) {
}
}
if (this->unk_308.unk_00 == 2) {
this->actor.flags &= ~0x10000;
this->actor.flags &= ~ACTOR_FLAG_16;
func_80A79BAC(this, globalCtx, 2, 0x26);
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x000F) | 0x0002;
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;