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

@ -10,7 +10,7 @@
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
#include "vt.h"
#define FLAGS 0x00000035
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5)
typedef enum {
/* 0 */ DEATH_START,
@ -523,7 +523,7 @@ void BossFd2_Vulnerable(BossFd2* this, GlobalContext* globalCtx) {
s16 i;
this->disableAT = true;
this->actor.flags |= 0x400;
this->actor.flags |= ACTOR_FLAG_10;
SkelAnime_Update(&this->skelAnime);
switch (this->work[FD2_ACTION_STATE]) {
case 0:
@ -611,7 +611,7 @@ void BossFd2_SetupDeath(BossFd2* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &gHoleVolvagiaDamagedAnim, 1.0f, 0.0f, this->fwork[FD2_END_FRAME],
ANIMMODE_ONCE_INTERP, -3.0f);
this->actionFunc = BossFd2_Death;
this->actor.flags &= ~1;
this->actor.flags &= ~ACTOR_FLAG_0;
this->deathState = DEATH_START;
}
@ -957,7 +957,7 @@ void BossFd2_Update(Actor* thisx, GlobalContext* globalCtx2) {
osSyncPrintf("FD2 move start \n");
this->disableAT = false;
this->actor.flags &= ~0x400;
this->actor.flags &= ~ACTOR_FLAG_10;
this->work[FD2_VAR_TIMER]++;
this->work[FD2_UNK_TIMER]++;
@ -992,9 +992,9 @@ void BossFd2_Update(Actor* thisx, GlobalContext* globalCtx2) {
this->fwork[FD2_TEX2_SCROLL_X] += 3.0f;
this->fwork[FD2_TEX2_SCROLL_Y] -= 2.0f;
if (this->actor.focus.pos.y < 90.0f) {
this->actor.flags &= ~1;
this->actor.flags &= ~ACTOR_FLAG_0;
} else {
this->actor.flags |= 1;
this->actor.flags |= ACTOR_FLAG_0;
}
}