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_zf.h"
#include "objects/object_zf/object_zf.h"
#define FLAGS 0x00000015
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4)
void EnZf_Init(Actor* thisx, GlobalContext* globalCtx);
void EnZf_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -630,7 +630,7 @@ void EnZf_SetupDropIn(EnZf* this) {
this->hopAnimIndex = 1;
this->action = ENZF_ACTION_DROP_IN;
this->actor.bgCheckFlags &= ~2;
this->actor.flags &= ~1;
this->actor.flags &= ~ACTOR_FLAG_0;
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
EnZf_SetupAction(this, EnZf_DropIn);
}
@ -638,7 +638,7 @@ void EnZf_SetupDropIn(EnZf* this) {
void EnZf_DropIn(EnZf* this, GlobalContext* globalCtx) {
if (this->unk_3F0 == 1) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_CRY);
this->actor.flags |= 1;
this->actor.flags |= ACTOR_FLAG_0;
if (this->actor.params == ENZF_TYPE_LIZALFOS_MINIBOSS_A) {
func_800F5ACC(0x38); // Miniboss theme
@ -650,7 +650,7 @@ void EnZf_DropIn(EnZf* this, GlobalContext* globalCtx) {
this->unk_3F0--;
} else if (this->actor.xzDistToPlayer <= 160.0f) {
this->unk_3F0 = 0;
this->actor.flags |= 1;
this->actor.flags |= ACTOR_FLAG_0;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_CRY);
}
@ -1898,7 +1898,7 @@ void EnZf_SetupDie(EnZf* this) {
}
this->action = ENZF_ACTION_DIE;
this->actor.flags &= ~1;
this->actor.flags &= ~ACTOR_FLAG_0;
if (D_80B4A1B4 != -1) {
if (this->actor.prev != NULL) {