1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-23 15:31:15 +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

@ -6,7 +6,7 @@
#include "z_obj_mure3.h"
#define FLAGS 0x00000000
#define FLAGS 0
void ObjMure3_Init(Actor* thisx, GlobalContext* globalCtx);
void ObjMure3_Destroy(Actor* thisx, GlobalContext* globalCtx);
@ -171,7 +171,7 @@ void func_80B9AF64(ObjMure3* this, GlobalContext* globalCtx) {
static ObjMure3SpawnFunc spawnFuncs[] = { func_80B9A9D0, func_80B9AA90, func_80B9ABA0 };
if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) < SQ(1150.0f)) {
this->actor.flags |= 0x10;
this->actor.flags |= ACTOR_FLAG_4;
spawnFuncs[(this->actor.params >> 13) & 7](this, globalCtx);
func_80B9AFEC(this);
}
@ -184,7 +184,7 @@ void func_80B9AFEC(ObjMure3* this) {
void func_80B9AFFC(ObjMure3* this, GlobalContext* globalCtx) {
func_80B9ADCC(this, globalCtx);
if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) >= SQ(1450.0f)) {
this->actor.flags &= ~0x10;
this->actor.flags &= ~ACTOR_FLAG_4;
func_80B9ACE4(this, globalCtx);
func_80B9AF54(this);
}