mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-22 06:52:03 +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
|
@ -1,7 +1,7 @@
|
|||
#include "z_en_okuta.h"
|
||||
#include "objects/object_okuta/object_okuta.h"
|
||||
|
||||
#define FLAGS 0x00000005
|
||||
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2)
|
||||
|
||||
void EnOkuta_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnOkuta_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
@ -145,8 +145,8 @@ void EnOkuta_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnOkuta_SetupWaitToAppear(this);
|
||||
} else {
|
||||
ActorShape_Init(&thisx->shape, 1100.0f, ActorShadow_DrawCircle, 18.0f);
|
||||
thisx->flags &= ~1;
|
||||
thisx->flags |= 0x10;
|
||||
thisx->flags &= ~ACTOR_FLAG_0;
|
||||
thisx->flags |= ACTOR_FLAG_4;
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, thisx, &sProjectileColliderInit);
|
||||
Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, thisx, ACTORCAT_PROP);
|
||||
|
@ -197,7 +197,7 @@ void EnOkuta_SpawnRipple(EnOkuta* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnOkuta_SetupWaitToAppear(EnOkuta* this) {
|
||||
this->actor.draw = NULL;
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
this->actionFunc = EnOkuta_WaitToAppear;
|
||||
this->actor.world.pos.y = this->actor.home.pos.y;
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ void EnOkuta_SetupWaitToAppear(EnOkuta* this) {
|
|||
void EnOkuta_SetupAppear(EnOkuta* this, GlobalContext* globalCtx) {
|
||||
this->actor.draw = EnOkuta_Draw;
|
||||
this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
||||
this->actor.flags |= 1;
|
||||
this->actor.flags |= ACTOR_FLAG_0;
|
||||
Animation_PlayOnce(&this->skelAnime, &gOctorokAppearAnim);
|
||||
EnOkuta_SpawnBubbles(this, globalCtx);
|
||||
this->actionFunc = EnOkuta_Appear;
|
||||
|
@ -559,7 +559,7 @@ void EnOkuta_ColliderCheck(EnOkuta* this, GlobalContext* globalCtx) {
|
|||
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
|
||||
Enemy_StartFinishingBlow(globalCtx, &this->actor);
|
||||
this->actor.colChkInfo.health = 0;
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
if (this->actor.colChkInfo.damageEffect == 3) {
|
||||
EnOkuta_SetupFreeze(this);
|
||||
} else {
|
||||
|
@ -623,7 +623,7 @@ void EnOkuta_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->collider.dim.radius = sOctorockColliderInit.dim.radius * this->actor.scale.x * 100.0f;
|
||||
}
|
||||
if (this->actor.params == 0x10) {
|
||||
this->actor.flags |= 0x1000000;
|
||||
this->actor.flags |= ACTOR_FLAG_24;
|
||||
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
}
|
||||
if (this->actionFunc != EnOkuta_WaitToAppear) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue