mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 22:41:14 +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_Bom/z_en_bom.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
|
||||
|
||||
#define FLAGS 0x01000015
|
||||
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_24)
|
||||
|
||||
#define GROUND_HOVER_HEIGHT 75.0f
|
||||
#define MAX_LARVA 3
|
||||
|
@ -224,7 +224,7 @@ void EnPeehat_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->xzDistToRise = 2800.0f;
|
||||
this->xzDistMax = 1400.0f;
|
||||
EnPeehat_Flying_SetStateGround(this);
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
break;
|
||||
case PEAHAT_TYPE_LARVA:
|
||||
this->actor.scale.x = this->actor.scale.z = 0.006f;
|
||||
|
@ -323,7 +323,7 @@ void EnPeehat_Ground_SetStateGround(EnPeehat* this) {
|
|||
|
||||
void EnPeehat_Ground_StateGround(EnPeehat* this, GlobalContext* globalCtx) {
|
||||
if (IS_DAY) {
|
||||
this->actor.flags |= 1;
|
||||
this->actor.flags |= ACTOR_FLAG_0;
|
||||
if (this->riseDelayTimer == 0) {
|
||||
if (this->actor.xzDistToPlayer < this->xzDistToRise) {
|
||||
EnPeehat_Ground_SetStateRise(this);
|
||||
|
@ -333,7 +333,7 @@ void EnPeehat_Ground_StateGround(EnPeehat* this, GlobalContext* globalCtx) {
|
|||
this->riseDelayTimer--;
|
||||
}
|
||||
} else {
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
Math_SmoothStepToF(&this->actor.shape.yOffset, -1000.0f, 1.0f, 50.0f, 0.0f);
|
||||
if (this->unk2D4 != 0) {
|
||||
this->unk2D4--;
|
||||
|
@ -980,7 +980,7 @@ void EnPeehat_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->colQuad.base);
|
||||
}
|
||||
// if PEAHAT_TYPE_GROUNDED
|
||||
if (thisx->params < 0 && (thisx->flags & 0x40)) {
|
||||
if (thisx->params < 0 && (thisx->flags & ACTOR_FLAG_6)) {
|
||||
for (i = 1; i >= 0; i--) {
|
||||
Vec3f posResult;
|
||||
CollisionPoly* poly = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue