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:
parent
79220ba58a
commit
a9284494f2
439 changed files with 1342 additions and 1304 deletions
|
@ -3,7 +3,7 @@
|
|||
#include "overlays/actors/ovl_En_Bombf/z_en_bombf.h"
|
||||
#include "objects/object_dodongo/object_dodongo.h"
|
||||
|
||||
#define FLAGS 0x00000015
|
||||
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4)
|
||||
|
||||
typedef enum {
|
||||
DODONGO_SWEEP_TAIL,
|
||||
|
@ -562,12 +562,12 @@ void EnDodongo_Walk(EnDodongo* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < 400.0f) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0x1F4, 0);
|
||||
this->actor.flags |= 1;
|
||||
this->actor.flags |= ACTOR_FLAG_0;
|
||||
if ((this->actor.xzDistToPlayer < 100.0f) && (yawDiff < 0x1388) && (this->actor.yDistToPlayer < 60.0f)) {
|
||||
EnDodongo_SetupBreatheFire(this);
|
||||
}
|
||||
} else {
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
if ((Math_Vec3f_DistXZ(&this->actor.world.pos, &this->actor.home.pos) > 150.0f) || (this->retreatTimer != 0)) {
|
||||
s16 yawToHome = Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos);
|
||||
|
||||
|
@ -662,7 +662,7 @@ void EnDodongo_SetupDeath(EnDodongo* this, GlobalContext* globalCtx) {
|
|||
this->timer = 0;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_J_DEAD);
|
||||
this->actionState = DODONGO_DEATH;
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
EnDodongo_SetupAction(this, EnDodongo_Death);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue