1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 14:31:17 +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

@ -7,7 +7,7 @@
#include "z_en_ds.h"
#include "objects/object_ds/object_ds.h"
#define FLAGS 0x00000009
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3)
void EnDs_Init(Actor* thisx, GlobalContext* globalCtx);
void EnDs_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -43,7 +43,7 @@ void EnDs_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc = EnDs_Wait;
this->actor.targetMode = 1;
this->unk_1E8 = 0;
this->actor.flags &= ~0x1;
this->actor.flags &= ~ACTOR_FLAG_0;
this->unk_1E4 = 0.0f;
}
@ -53,7 +53,7 @@ void EnDs_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void EnDs_Talk(EnDs* this, GlobalContext* globalCtx) {
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
this->actionFunc = EnDs_Wait;
this->actor.flags &= ~0x10000;
this->actor.flags &= ~ACTOR_FLAG_16;
}
this->unk_1E8 |= 1;
}
@ -70,7 +70,7 @@ void EnDs_TalkAfterGiveOddPotion(EnDs* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
this->actionFunc = EnDs_Talk;
} else {
this->actor.flags |= 0x10000;
this->actor.flags |= ACTOR_FLAG_16;
func_8002F2CC(&this->actor, globalCtx, 1000.0f);
}
}
@ -79,7 +79,7 @@ void EnDs_DisplayOddPotionText(EnDs* this, GlobalContext* globalCtx) {
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
this->actor.textId = 0x504F;
this->actionFunc = EnDs_TalkAfterGiveOddPotion;
this->actor.flags &= ~0x100;
this->actor.flags &= ~ACTOR_FLAG_8;
gSaveContext.itemGetInf[3] |= 1;
}
}
@ -188,7 +188,7 @@ void EnDs_OfferBluePotion(EnDs* this, GlobalContext* globalCtx) {
return;
case 2: // have 100 rupees and empty bottle
Rupees_ChangeBy(-100);
this->actor.flags &= ~0x10000;
this->actor.flags &= ~ACTOR_FLAG_16;
func_8002F434(&this->actor, globalCtx, GI_POTION_BLUE, 10000.0f, 50.0f);
this->actionFunc = EnDs_GiveBluePotion;
return;