1
0
Fork 0
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:
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

@ -8,7 +8,7 @@
#include "objects/object_bombf/object_bombf.h"
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
#define FLAGS 0x00000011
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4)
void EnBombf_Init(Actor* thisx, GlobalContext* globalCtx);
void EnBombf_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -104,7 +104,7 @@ void EnBombf_Init(Actor* thisx, GlobalContext* globalCtx) {
thisx->focus.pos = thisx->world.pos;
if (Actor_FindNearby(globalCtx, thisx, ACTOR_BG_DDAN_KD, ACTORCAT_BG, 10000.0f) != NULL) {
thisx->flags |= 0x20;
thisx->flags |= ACTOR_FLAG_5;
}
thisx->colChkInfo.cylRadius = 10.0f;
@ -117,7 +117,7 @@ void EnBombf_Init(Actor* thisx, GlobalContext* globalCtx) {
thisx->gravity = -1.5f;
Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, thisx, ACTORCAT_EXPLOSIVE);
thisx->colChkInfo.mass = 200;
thisx->flags &= ~1;
thisx->flags &= ~ACTOR_FLAG_0;
EnBombf_SetupAction(this, EnBombf_Move);
} else {
thisx->colChkInfo.mass = MASS_IMMOVABLE;
@ -157,7 +157,7 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) {
this->timer = 180;
this->flowerBombScale = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_PL_PULL_UP_ROCK);
this->actor.flags &= ~1;
this->actor.flags &= ~ACTOR_FLAG_0;
} else {
player->actor.child = NULL;
player->heldActor = NULL;
@ -176,7 +176,7 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) {
bombFlower->unk_200 = 1;
bombFlower->timer = 0;
this->timer = 180;
this->actor.flags &= ~1;
this->actor.flags &= ~ACTOR_FLAG_0;
this->flowerBombScale = 0.0f;
}
}
@ -188,7 +188,7 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) {
if (bombFlower != NULL) {
bombFlower->timer = 100;
this->timer = 180;
this->actor.flags &= ~1;
this->actor.flags &= ~ACTOR_FLAG_0;
this->flowerBombScale = 0.0f;
}
} else {
@ -208,7 +208,7 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) {
if (this->timer == 0) {
this->flowerBombScale += 0.05f;
if (this->flowerBombScale >= 1.0f) {
this->actor.flags |= 1;
this->actor.flags |= ACTOR_FLAG_0;
}
}
@ -262,7 +262,7 @@ void EnBombf_Explode(EnBombf* this, GlobalContext* globalCtx) {
Player* player;
if (this->explosionCollider.elements[0].dim.modelSphere.radius == 0) {
this->actor.flags |= 0x20;
this->actor.flags |= ACTOR_FLAG_5;
func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96);
}
@ -430,7 +430,7 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) {
Camera_AddQuake(&globalCtx->mainCamera, 2, 0xB, 8);
thisx->params = BOMBFLOWER_EXPLOSION;
this->timer = 10;
thisx->flags |= 0x20;
thisx->flags |= ACTOR_FLAG_5;
EnBombf_SetupAction(this, EnBombf_Explode);
}
}