mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-20 14:01: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:
parent
79220ba58a
commit
a9284494f2
439 changed files with 1342 additions and 1304 deletions
|
@ -8,7 +8,7 @@
|
|||
#include "vt.h"
|
||||
#include "objects/object_gla/object_gla.h"
|
||||
|
||||
#define FLAGS 0x00000019
|
||||
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4)
|
||||
|
||||
#define GE2_STATE_ANIMCOMPLETE (1 << 1)
|
||||
#define GE2_STATE_KO (1 << 2)
|
||||
|
@ -294,7 +294,7 @@ void EnGe2_KnockedOut(EnGe2* this, GlobalContext* globalCtx) {
|
|||
s32 effectAngle;
|
||||
Vec3f effectPos;
|
||||
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
if (this->stateFlags & GE2_STATE_ANIMCOMPLETE) {
|
||||
effectAngle = (globalCtx->state.frames) * 0x2800;
|
||||
effectPos.x = this->actor.focus.pos.x + (Math_CosS(effectAngle) * 5.0f);
|
||||
|
@ -434,7 +434,7 @@ void EnGe2_SetActionAfterTalk(EnGe2* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
this->actor.update = EnGe2_UpdateFriendly;
|
||||
this->actor.flags &= ~0x10000;
|
||||
this->actor.flags &= ~ACTOR_FLAG_16;
|
||||
}
|
||||
EnGe2_TurnToFacePlayer(this, globalCtx);
|
||||
}
|
||||
|
@ -455,7 +455,7 @@ void EnGe2_WaitTillCardGiven(EnGe2* this, GlobalContext* globalCtx) {
|
|||
void EnGe2_GiveCard(EnGe2* this, GlobalContext* globalCtx) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actor.flags &= ~0x10000;
|
||||
this->actor.flags &= ~ACTOR_FLAG_16;
|
||||
this->actionFunc = EnGe2_WaitTillCardGiven;
|
||||
func_8002F434(&this->actor, globalCtx, GI_GERUDO_CARD, 10000.0f, 50.0f);
|
||||
}
|
||||
|
@ -467,7 +467,7 @@ void EnGe2_ForceTalk(EnGe2* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = EnGe2_GiveCard;
|
||||
} else {
|
||||
this->actor.textId = 0x6004;
|
||||
this->actor.flags |= 0x10000;
|
||||
this->actor.flags |= ACTOR_FLAG_16;
|
||||
func_8002F1C4(&this->actor, globalCtx, 300.0f, 300.0f, 0);
|
||||
}
|
||||
EnGe2_LookAtPlayer(this, globalCtx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue