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:
parent
79220ba58a
commit
a9284494f2
439 changed files with 1342 additions and 1304 deletions
|
@ -8,7 +8,7 @@
|
|||
#include "objects/object_firefly/object_firefly.h"
|
||||
#include "overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h"
|
||||
|
||||
#define FLAGS 0x00005005
|
||||
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_12 | ACTOR_FLAG_14)
|
||||
|
||||
void EnFirefly_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnFirefly_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
@ -148,7 +148,7 @@ void EnFirefly_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
|
||||
if ((this->actor.params & 0x8000) != 0) {
|
||||
this->actor.flags |= 0x80;
|
||||
this->actor.flags |= ACTOR_FLAG_7;
|
||||
if (1) {}
|
||||
this->actor.draw = EnFirefly_DrawInvisible;
|
||||
this->actor.params &= 0x7FFF;
|
||||
|
@ -214,7 +214,7 @@ void EnFirefly_SetupFall(EnFirefly* this) {
|
|||
this->actor.velocity.y = 0.0f;
|
||||
Animation_Change(&this->skelAnime, &gKeeseFlyAnim, 0.5f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FFLY_DEAD);
|
||||
this->actor.flags |= 0x10;
|
||||
this->actor.flags |= ACTOR_FLAG_4;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 40);
|
||||
this->actionFunc = EnFirefly_Fall;
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ void EnFirefly_SetupFrozenFall(EnFirefly* this, GlobalContext* globalCtx) {
|
|||
s32 i;
|
||||
Vec3f iceParticlePos;
|
||||
|
||||
this->actor.flags |= 0x10;
|
||||
this->actor.flags |= ACTOR_FLAG_4;
|
||||
this->auraType = KEESE_AURA_NONE;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 0xFF);
|
||||
|
@ -423,7 +423,7 @@ void EnFirefly_Fall(EnFirefly* this, GlobalContext* globalCtx) {
|
|||
this->actor.colorFilterTimer = 40;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f);
|
||||
if (this->actor.flags & 0x8000) {
|
||||
if (this->actor.flags & ACTOR_FLAG_15) {
|
||||
this->actor.colorFilterTimer = 40;
|
||||
} else {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, 0x6800, 0x200);
|
||||
|
@ -626,7 +626,7 @@ void EnFirefly_UpdateDamage(EnFirefly* this, GlobalContext* globalCtx) {
|
|||
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
|
||||
if (Actor_ApplyDamage(&this->actor) == 0) {
|
||||
Enemy_StartFinishingBlow(globalCtx, &this->actor);
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
}
|
||||
|
||||
damageEffect = this->actor.colChkInfo.damageEffect;
|
||||
|
@ -682,7 +682,7 @@ void EnFirefly_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
||||
if (!(this->actor.flags & 0x8000)) {
|
||||
if (!(this->actor.flags & ACTOR_FLAG_15)) {
|
||||
if ((this->actor.colChkInfo.health == 0) || (this->actionFunc == EnFirefly_Stunned)) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue