1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-23 15:31:15 +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_ru1/object_ru1.h"
#include "vt.h"
#define FLAGS 0x04000011
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4 | ACTOR_FLAG_26)
void EnRu1_Init(Actor* thisx, GlobalContext* globalCtx);
void EnRu1_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -1494,7 +1494,7 @@ void func_80AEE050(EnRu1* this) {
s32 func_80AEE264(EnRu1* this, GlobalContext* globalCtx) {
if (!Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
this->actor.flags |= 9;
this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3;
if ((gSaveContext.infTable[20] & 8)) {
this->actor.textId = 0x404E;
func_8002F2F4(&this->actor, globalCtx);
@ -1815,7 +1815,7 @@ s32 func_80AEF0BC(EnRu1* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &gRutoChildSitAnim, 1.0f, 0, frameCount, ANIMMODE_ONCE, -8.0f);
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
this->action = 26;
this->actor.flags &= ~0x9;
this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3);
return true;
}
return false;
@ -1855,7 +1855,7 @@ void func_80AEF29C(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEF2AC(EnRu1* this, GlobalContext* globalCtx) {
this->action = 24;
this->drawConfig = 1;
this->actor.flags |= 9;
this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3;
}
void func_80AEF2D0(EnRu1* this, GlobalContext* globalCtx) {
@ -2012,7 +2012,7 @@ void func_80AEF890(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEF930(EnRu1* this, GlobalContext* globalCtx) {
if (func_80AEB104(this) == 3) {
this->actor.flags |= 9;
this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3;
this->actor.textId = 0x4048;
Message_ContinueTextbox(globalCtx, this->actor.textId);
func_80AEF4A8(this, globalCtx);
@ -2098,7 +2098,7 @@ void func_80AEFC54(EnRu1* this, GlobalContext* globalCtx) {
this->action = 41;
this->unk_28C = EnRu1_FindSwitch(globalCtx);
func_80AEB0EC(this, 1);
this->actor.flags &= ~0x9;
this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3);
} else {
Actor_Kill(&this->actor);
}
@ -2116,7 +2116,7 @@ void func_80AEFCE8(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEFD38(EnRu1* this, GlobalContext* globalCtx) {
if ((gSaveContext.eventChkInf[3] & 0x80) && LINK_IS_CHILD) {
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
this->actor.flags &= ~0x10;
this->actor.flags &= ~ACTOR_FLAG_4;
this->action = 44;
this->drawConfig = 1;
} else {
@ -2126,7 +2126,7 @@ void func_80AEFD38(EnRu1* this, GlobalContext* globalCtx) {
s32 func_80AEFDC0(EnRu1* this, GlobalContext* globalCtx) {
if (!Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
this->actor.flags |= 9;
this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3;
this->actor.textId = Text_GetFaceReaction(globalCtx, 0x1F);
if (this->actor.textId == 0) {
this->actor.textId = 0x402C;
@ -2139,7 +2139,7 @@ s32 func_80AEFDC0(EnRu1* this, GlobalContext* globalCtx) {
s32 func_80AEFE38(EnRu1* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
this->actor.flags &= ~0x9;
this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3);
return true;
}
return false;