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

@ -1,7 +1,7 @@
#include "z_en_rd.h"
#include "objects/object_rd/object_rd.h"
#define FLAGS 0x00000415
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_10)
void EnRd_Init(Actor* thisx, GlobalContext* globalCtx);
void EnRd_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -163,7 +163,7 @@ void EnRd_Init(Actor* thisx, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
if (thisx->params == 3) {
thisx->flags |= 0x80;
thisx->flags |= ACTOR_FLAG_7;
}
}
@ -346,7 +346,7 @@ void func_80AE2C1C(EnRd* this, GlobalContext* globalCtx) {
Actor_IsFacingPlayer(&this->actor, 0x38E3)) {
player->actor.freezeTimer = 0;
if (globalCtx->grabPlayer(globalCtx, player)) {
this->actor.flags &= ~1;
this->actor.flags &= ~ACTOR_FLAG_0;
func_80AE33F0(this);
}
} else if (this->actor.params > 0) {
@ -530,7 +530,7 @@ void func_80AE3454(EnRd* this, GlobalContext* globalCtx) {
Math_SmoothStepToF(&this->actor.shape.yOffset, 0, 1.0f, 400.0f, 0.0f);
}
this->actor.targetMode = 0;
this->actor.flags |= 1;
this->actor.flags |= ACTOR_FLAG_0;
this->unk_306 = 0xA;
this->unk_307 = 0xF;
func_80AE2B90(this, globalCtx);
@ -599,7 +599,7 @@ void func_80AE3A8C(EnRd* this) {
this->actor.speedXZ = -2.0f;
}
this->actor.flags |= 1;
this->actor.flags |= ACTOR_FLAG_0;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_REDEAD_DAMAGE);
this->unk_31B = 9;
EnRd_SetupAction(this, func_80AE3B18);
@ -634,7 +634,7 @@ void func_80AE3C20(EnRd* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_rd_Anim_006E88, -1.0f);
this->unk_31B = 10;
this->unk_30C = 300;
this->actor.flags &= ~1;
this->actor.flags &= ~ACTOR_FLAG_0;
this->actor.speedXZ = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_REDEAD_DEAD);
EnRd_SetupAction(this, func_80AE3C98);