mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 07:21:19 +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:
parent
79220ba58a
commit
a9284494f2
439 changed files with 1342 additions and 1304 deletions
|
@ -7,7 +7,7 @@
|
|||
#include "z_en_st.h"
|
||||
#include "objects/object_st/object_st.h"
|
||||
|
||||
#define FLAGS 0x00000035
|
||||
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5)
|
||||
|
||||
void EnSt_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnSt_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
@ -448,7 +448,7 @@ s32 EnSt_CheckHitBackside(EnSt* this, GlobalContext* globalCtx) {
|
|||
return false;
|
||||
}
|
||||
Enemy_StartFinishingBlow(globalCtx, &this->actor);
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
this->groundBounces = 3;
|
||||
this->deathTimer = 20;
|
||||
this->actor.gravity = -1.0f;
|
||||
|
@ -773,7 +773,7 @@ void EnSt_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->blureIdx = EnSt_CreateBlureEffect(globalCtx);
|
||||
EnSt_InitColliders(this, globalCtx);
|
||||
if (thisx->params == 2) {
|
||||
this->actor.flags |= 0x80;
|
||||
this->actor.flags |= ACTOR_FLAG_7;
|
||||
}
|
||||
if (this->actor.params == 1) {
|
||||
this->actor.naviEnemyId = 0x05;
|
||||
|
@ -781,8 +781,8 @@ void EnSt_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actor.naviEnemyId = 0x04;
|
||||
}
|
||||
EnSt_CheckCeilingPos(this, globalCtx);
|
||||
this->actor.flags |= 0x4000;
|
||||
this->actor.flags |= 0x1000000;
|
||||
this->actor.flags |= ACTOR_FLAG_14;
|
||||
this->actor.flags |= ACTOR_FLAG_24;
|
||||
EnSt_SetColliderScale(this);
|
||||
this->actor.gravity = 0.0f;
|
||||
this->initalYaw = this->actor.world.rot.y;
|
||||
|
@ -996,7 +996,7 @@ void EnSt_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
Color_RGBA8 color = { 0, 0, 0, 0 };
|
||||
|
||||
if (this->actor.flags & 0x8000) {
|
||||
if (this->actor.flags & ACTOR_FLAG_15) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
} else if (!EnSt_CheckColliders(this, globalCtx)) {
|
||||
// no collision has been detected.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue