mirror of
https://github.com/blawar/ooot.git
synced 2024-06-30 16:29:55 +00:00
added bgcheck flags
This commit is contained in:
parent
5a083751cb
commit
9b1387ab99
|
@ -84,3 +84,22 @@ enum PlayerState3
|
|||
PLAYER_STATE3_HOOKSHOT = 1 << 7, // 0x00000080
|
||||
};
|
||||
|
||||
enum BgFlag
|
||||
{
|
||||
BG_STATE_0 = 1 << 0, // 0x00000001
|
||||
BG_STATE_1 = 1 << 1, // 0x00000002
|
||||
BG_STATE_2 = 1 << 2, // 0x00000004
|
||||
BG_STATE_3 = 1 << 3, // 0x00000008
|
||||
BG_STATE_4 = 1 << 4, // 0x00000010
|
||||
BG_STATE_5 = 1 << 5, // 0x00000020
|
||||
BG_STATE_6 = 1 << 6, // 0x00000040
|
||||
BG_STATE_7 = 1 << 7, // 0x00000080
|
||||
BG_STATE_8 = 1 << 8, // 0x00000100
|
||||
BG_STATE_9 = 1 << 9, // 0x00000200
|
||||
BG_STATE_10 = 1 << 10, // 0x00000400
|
||||
BG_STATE_11 = 1 << 11, // 0x00000800
|
||||
BG_STATE_12 = 1 << 12, // 0x00001000
|
||||
BG_STATE_13 = 1 << 13, // 0x00002000
|
||||
BG_STATE_14 = 1 << 14, // 0x00004000
|
||||
BG_STATE_15 = 1 << 15 // 0x00008000
|
||||
};
|
||||
|
|
|
@ -257,7 +257,7 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* lights, GlobalContext* globalCtx
|
|||
floorHeightPtr++;
|
||||
}
|
||||
|
||||
if(!(actor->bgCheckFlags & 1))
|
||||
if(!(actor->bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
actor->shape.feetFloorFlags = 0;
|
||||
}
|
||||
|
@ -1389,10 +1389,10 @@ s32 Actor_ActorAIsFacingAndNearActorB(Actor* actorA, Actor* actorB, f32 range, s
|
|||
|
||||
s32 func_8002E234(Actor* actor, f32 arg1, s32 arg2)
|
||||
{
|
||||
if((actor->bgCheckFlags & 0x1) && (arg1 < -11.0f))
|
||||
if((actor->bgCheckFlags & BG_STATE_0) && (arg1 < -11.0f))
|
||||
{
|
||||
actor->bgCheckFlags &= ~0x1;
|
||||
actor->bgCheckFlags |= 0x4;
|
||||
actor->bgCheckFlags &= ~BG_STATE_0;
|
||||
actor->bgCheckFlags |= BG_STATE_2;
|
||||
|
||||
if((actor->velocity.y < 0.0f) && (arg2 & 0x10))
|
||||
{
|
||||
|
@ -1413,7 +1413,7 @@ s32 func_8002E2AC(GlobalContext* globalCtx, Actor* actor, Vec3f* arg2, s32 arg3)
|
|||
arg2->y += 50.0f;
|
||||
|
||||
actor->floorHeight = BgCheck_EntityRaycastFloor5(globalCtx, &globalCtx->colCtx, &actor->floorPoly, &floorBgId, actor, arg2);
|
||||
actor->bgCheckFlags &= ~0x0086;
|
||||
actor->bgCheckFlags &= ~(BG_STATE_1 | BG_STATE_2 | BG_STATE_7);
|
||||
|
||||
if(actor->floorHeight <= BGCHECK_Y_MIN)
|
||||
{
|
||||
|
@ -1425,15 +1425,15 @@ s32 func_8002E2AC(GlobalContext* globalCtx, Actor* actor, Vec3f* arg2, s32 arg3)
|
|||
|
||||
if(floorHeightDiff >= 0.0f)
|
||||
{ // actor is on or below the ground
|
||||
actor->bgCheckFlags |= 0x80;
|
||||
actor->bgCheckFlags |= BG_STATE_7;
|
||||
|
||||
if(actor->bgCheckFlags & 0x10)
|
||||
if(actor->bgCheckFlags & BG_STATE_4)
|
||||
{
|
||||
if(floorBgId != sCurCeilingBgId)
|
||||
{
|
||||
if(floorHeightDiff > 15.0f)
|
||||
{
|
||||
actor->bgCheckFlags |= 0x100;
|
||||
actor->bgCheckFlags |= BG_STATE_8;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1447,9 +1447,9 @@ s32 func_8002E2AC(GlobalContext* globalCtx, Actor* actor, Vec3f* arg2, s32 arg3)
|
|||
|
||||
if(actor->velocity.y <= 0.0f)
|
||||
{
|
||||
if(!(actor->bgCheckFlags & 0x1))
|
||||
if(!(actor->bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
actor->bgCheckFlags |= 0x2;
|
||||
actor->bgCheckFlags |= BG_STATE_1;
|
||||
}
|
||||
else if((arg3 & 0x8) && (actor->gravity < 0.0f))
|
||||
{
|
||||
|
@ -1460,13 +1460,13 @@ s32 func_8002E2AC(GlobalContext* globalCtx, Actor* actor, Vec3f* arg2, s32 arg3)
|
|||
actor->velocity.y = 0.0f;
|
||||
}
|
||||
|
||||
actor->bgCheckFlags |= 0x1;
|
||||
actor->bgCheckFlags |= BG_STATE_0;
|
||||
func_80043334(&globalCtx->colCtx, actor, actor->floorBgId);
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // actor is above ground
|
||||
if((actor->bgCheckFlags & 0x1) && (floorHeightDiff >= -11.0f))
|
||||
if((actor->bgCheckFlags & BG_STATE_0) && (floorHeightDiff >= -11.0f))
|
||||
{
|
||||
func_80043334(&globalCtx->colCtx, actor, actor->floorBgId);
|
||||
}
|
||||
|
@ -1491,7 +1491,7 @@ void Actor_UpdateBgCheckInfo(GlobalContext* globalCtx, Actor* actor, f32 wallChe
|
|||
|
||||
sp74 = actor->world.pos.y - actor->prevPos.y;
|
||||
|
||||
if((actor->floorBgId != BGCHECK_SCENE) && (actor->bgCheckFlags & 1))
|
||||
if((actor->floorBgId != BGCHECK_SCENE) && (actor->bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
func_800433A4(&globalCtx->colCtx, actor->floorBgId, actor);
|
||||
}
|
||||
|
@ -1504,12 +1504,12 @@ void Actor_UpdateBgCheckInfo(GlobalContext* globalCtx, Actor* actor, f32 wallChe
|
|||
wallPoly = actor->wallPoly;
|
||||
Math_Vec3f_Copy(&actor->world.pos, &sp64);
|
||||
actor->wallYaw = Math_Atan2S(wallPoly->normal.z, wallPoly->normal.x);
|
||||
actor->bgCheckFlags |= 8;
|
||||
actor->bgCheckFlags |= BG_STATE_3;
|
||||
actor->wallBgId = bgId;
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->bgCheckFlags &= ~8;
|
||||
actor->bgCheckFlags &= ~BG_STATE_3;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1521,12 +1521,12 @@ void Actor_UpdateBgCheckInfo(GlobalContext* globalCtx, Actor* actor, f32 wallChe
|
|||
sp64.y = actor->prevPos.y + 10.0f;
|
||||
if(BgCheck_EntityCheckCeiling(&globalCtx->colCtx, &sp58, &sp64, (ceilingCheckHeight + sp74) - 10.0f, &sCurCeilingPoly, &sCurCeilingBgId, actor))
|
||||
{
|
||||
actor->bgCheckFlags |= 0x10;
|
||||
actor->bgCheckFlags |= BG_STATE_4;
|
||||
actor->world.pos.y = (sp58 + sp74) - 10.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->bgCheckFlags &= ~0x10;
|
||||
actor->bgCheckFlags &= ~BG_STATE_4;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1540,13 +1540,13 @@ void Actor_UpdateBgCheckInfo(GlobalContext* globalCtx, Actor* actor, f32 wallChe
|
|||
actor->yDistToWater = waterBoxYSurface - actor->world.pos.y;
|
||||
if(actor->yDistToWater < 0.0f)
|
||||
{
|
||||
actor->bgCheckFlags &= ~0x60;
|
||||
actor->bgCheckFlags &= ~(BG_STATE_5 | BG_STATE_6);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!(actor->bgCheckFlags & 0x20))
|
||||
if(!(actor->bgCheckFlags & BG_STATE_5))
|
||||
{
|
||||
actor->bgCheckFlags |= 0x40;
|
||||
actor->bgCheckFlags |= BG_STATE_6;
|
||||
if(!(flags & 0x40))
|
||||
{
|
||||
ripplePos.x = actor->world.pos.x;
|
||||
|
@ -1557,12 +1557,12 @@ void Actor_UpdateBgCheckInfo(GlobalContext* globalCtx, Actor* actor, f32 wallChe
|
|||
EffectSsGRipple_Spawn(globalCtx, &ripplePos, 100, 500, 8);
|
||||
}
|
||||
}
|
||||
actor->bgCheckFlags |= 0x20;
|
||||
actor->bgCheckFlags |= BG_STATE_5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->bgCheckFlags &= ~0x60;
|
||||
actor->bgCheckFlags &= ~(BG_STATE_5 | BG_STATE_6);
|
||||
actor->yDistToWater = BGCHECK_Y_MIN;
|
||||
}
|
||||
}
|
||||
|
@ -2025,7 +2025,7 @@ void func_8002F850(GlobalContext* globalCtx, Actor* actor)
|
|||
{
|
||||
s32 sfxId;
|
||||
|
||||
if(actor->bgCheckFlags & 0x20)
|
||||
if(actor->bgCheckFlags & BG_STATE_5)
|
||||
{
|
||||
if(actor->yDistToWater < 20.0f)
|
||||
{
|
||||
|
@ -3987,7 +3987,7 @@ s16 Actor_TestFloorInDirection(Actor* actor, GlobalContext* globalCtx, f32 dista
|
|||
|
||||
Math_Vec3f_Copy(&actor->world.pos, &prevActorPos);
|
||||
|
||||
ret = actor->bgCheckFlags & 1;
|
||||
ret = actor->bgCheckFlags & BG_STATE_0;
|
||||
actor->bgCheckFlags = prevBgCheckFlags;
|
||||
|
||||
return ret;
|
||||
|
@ -4557,12 +4557,12 @@ s32 func_80035124(Actor* actor, GlobalContext* globalCtx)
|
|||
{
|
||||
actor->params = 1;
|
||||
}
|
||||
else if(!(actor->bgCheckFlags & 1))
|
||||
else if(!(actor->bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
Actor_MoveForward(actor);
|
||||
Math_SmoothStepToF(&actor->speedXZ, 0.0f, 1.0f, 0.1f, 0.0f);
|
||||
}
|
||||
else if((actor->bgCheckFlags & 2) && (actor->velocity.y < -4.0f))
|
||||
else if((actor->bgCheckFlags & BG_STATE_1) && (actor->velocity.y < -4.0f))
|
||||
{
|
||||
ret = 1;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "z64global.h"
|
||||
#include "sfx.h"
|
||||
#include "vt.h"
|
||||
#include "player_state.h"
|
||||
#include "def/graph.h" // FORCE
|
||||
#include "def/sys_matrix.h"
|
||||
#include "def/z_actor.h"
|
||||
|
@ -316,19 +317,19 @@ void EnAObj_BoulderFragment(EnAObj* pthis, GlobalContext* globalCtx)
|
|||
pthis->dyna.actor.shape.rot.x += pthis->dyna.actor.world.rot.x >> 1;
|
||||
pthis->dyna.actor.shape.rot.z += pthis->dyna.actor.world.rot.z >> 1;
|
||||
|
||||
if(pthis->dyna.actor.speedXZ != 0.0f && pthis->dyna.actor.bgCheckFlags & 0x8)
|
||||
if(pthis->dyna.actor.speedXZ != 0.0f && pthis->dyna.actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->dyna.actor.world.rot.y = pthis->dyna.actor.wallYaw - pthis->dyna.actor.world.rot.y + pthis->dyna.actor.wallYaw - 0x8000;
|
||||
pthis->dyna.actor.bgCheckFlags &= ~0x8;
|
||||
pthis->dyna.actor.bgCheckFlags &= ~BG_STATE_3;
|
||||
}
|
||||
|
||||
if(pthis->dyna.actor.bgCheckFlags & 0x2)
|
||||
if(pthis->dyna.actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
if(pthis->dyna.actor.velocity.y < -8.0f)
|
||||
{
|
||||
pthis->dyna.actor.velocity.y *= -0.6f;
|
||||
pthis->dyna.actor.speedXZ *= 0.6f;
|
||||
pthis->dyna.actor.bgCheckFlags &= ~0x3;
|
||||
pthis->dyna.actor.bgCheckFlags &= ~(BG_STATE_0 | BG_STATE_1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
|
||||
#include "sfx.h"
|
||||
#include "player_state.h"
|
||||
#include "z64item.h"
|
||||
#include "z64player.h"
|
||||
#include "z64save.h"
|
||||
|
@ -623,7 +624,7 @@ void func_8001DFC8(EnItem00* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
}
|
||||
|
||||
if((pthis->actor.gravity != 0.0f) && !(pthis->actor.bgCheckFlags & 0x0001))
|
||||
if((pthis->actor.gravity != 0.0f) && !(pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
EnItem00_SetupAction(pthis, func_8001E1C8);
|
||||
}
|
||||
|
@ -647,7 +648,7 @@ void func_8001E1C8(EnItem00* pthis, GlobalContext* globalCtx)
|
|||
EffectSsKiraKira_SpawnSmall(globalCtx, &effectPos, &sEffectVelocity, &sEffectAccel, &sEffectPrimColor, &sEffectEnvColor);
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 0x0003)
|
||||
if(pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_1))
|
||||
{
|
||||
originalVelocity = pthis->actor.velocity.y;
|
||||
if(originalVelocity > -2.0f)
|
||||
|
@ -658,7 +659,7 @@ void func_8001E1C8(EnItem00* pthis, GlobalContext* globalCtx)
|
|||
else
|
||||
{
|
||||
pthis->actor.velocity.y = originalVelocity * -0.8f;
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -719,7 +720,7 @@ void func_8001E304(EnItem00* pthis, GlobalContext* globalCtx)
|
|||
EffectSsKiraKira_SpawnSmall(globalCtx, &pos, &sEffectVelocity, &sEffectAccel, &sEffectPrimColor, &sEffectEnvColor);
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 0x0003)
|
||||
if(pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_1))
|
||||
{
|
||||
EnItem00_SetupAction(pthis, func_8001DFC8);
|
||||
pthis->actor.shape.rot.z = 0;
|
||||
|
@ -803,7 +804,7 @@ void EnItem00_Update(Actor* pthisx, GlobalContext* globalCtx)
|
|||
|
||||
if(pthis->actor.gravity)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 0x0003)
|
||||
if(pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_1))
|
||||
{
|
||||
if(*temp != globalCtx->gameplayFrames)
|
||||
{
|
||||
|
|
|
@ -491,7 +491,7 @@ void Player_ClearZTarget(Player* pthis)
|
|||
|
||||
void func_8008EE08(Player* pthis)
|
||||
{
|
||||
if((pthis->actor.bgCheckFlags & 1) || (pthis->stateFlags1 & (PLAYER_STATE1_21 | PLAYER_STATE_HORSE_MOUNTED | PLAYER_STATE_SWIMMING)) ||
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) || (pthis->stateFlags1 & (PLAYER_STATE1_21 | PLAYER_STATE_HORSE_MOUNTED | PLAYER_STATE_SWIMMING)) ||
|
||||
(!(pthis->stateFlags1 & (PLAYER_STATE1_18 | PLAYER_STATE1_19)) && ((pthis->actor.world.pos.y - pthis->actor.floorHeight) < 100.0f)))
|
||||
{
|
||||
pthis->stateFlags1 &= ~(PLAYER_STATE1_15 | PLAYER_STATE1_16 | PLAYER_STATE1_17 | PLAYER_STATE1_18 | PLAYER_STATE1_19 | PLAYER_STATE1_30);
|
||||
|
@ -723,7 +723,7 @@ s32 Player_GetRoomTimer(GlobalContext* globalCtx)
|
|||
}
|
||||
else if((pthis->unk_840 > 80) && ((pthis->currentBoots == PLAYER_BOOTS_IRON) || (pthis->unk_840 >= 300)))
|
||||
{ // Deep underwater
|
||||
var = ((pthis->currentBoots == PLAYER_BOOTS_IRON) && (pthis->actor.bgCheckFlags & 1)) ? SCENE_ROOMTIMER_DEEP_UNDERWATER : 3;
|
||||
var = ((pthis->currentBoots == PLAYER_BOOTS_IRON) && (pthis->actor.bgCheckFlags & BG_STATE_0)) ? SCENE_ROOMTIMER_DEEP_UNDERWATER : 3;
|
||||
}
|
||||
else if(pthis->stateFlags1 & PLAYER_STATE_SWIMMING)
|
||||
{ // Swimming
|
||||
|
|
|
@ -300,7 +300,7 @@ void func_808801B8(BgHakaTrap* pthis, GlobalContext* globalCtx)
|
|||
else if(D_80881018_47 == 3)
|
||||
{
|
||||
D_80881018_47 = 4;
|
||||
player->actor.bgCheckFlags |= 0x100;
|
||||
player->actor.bgCheckFlags |= BG_STATE_8;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -240,13 +240,13 @@ void func_80882BDC(BgHakaZou* pthis, GlobalContext* globalCtx)
|
|||
pthis->dyna.actor.shape.rot.x += pthis->dyna.actor.world.rot.x;
|
||||
pthis->dyna.actor.shape.rot.z += pthis->dyna.actor.world.rot.z;
|
||||
|
||||
if(pthis->dyna.actor.bgCheckFlags & 2)
|
||||
if(pthis->dyna.actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
if(pthis->dyna.actor.velocity.y < -8.0f)
|
||||
{
|
||||
pthis->dyna.actor.velocity.y *= -0.6f;
|
||||
pthis->dyna.actor.velocity.y = CLAMP_MAX(pthis->dyna.actor.velocity.y, 10.0f);
|
||||
pthis->dyna.actor.bgCheckFlags &= ~3;
|
||||
pthis->dyna.actor.bgCheckFlags &= ~(BG_STATE_0 | BG_STATE_1);
|
||||
pthis->dyna.actor.speedXZ = 2.0f;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -205,7 +205,7 @@ void BgHeavyBlock_MovePiece(BgHeavyBlock* pthis, GlobalContext* globalCtx)
|
|||
Actor_UpdateBgCheckInfo(globalCtx, thisx, 50.0f, 50.0f, 0.0f, 5);
|
||||
thisx->world.pos.y -= pthis->unk_164.y;
|
||||
thisx->prevPos.y -= pthis->unk_164.y;
|
||||
if(thisx->bgCheckFlags & 1)
|
||||
if(thisx->bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->pieceFlags |= PIECE_FLAG_HIT_FLOOR;
|
||||
thisx->velocity.y = Rand_ZeroFloat(4.0f) + 2.0f;
|
||||
|
|
|
@ -155,8 +155,8 @@ void BgHidanDalm_Wait(BgHidanDalm* pthis, GlobalContext* globalCtx)
|
|||
func_8002DF54(globalCtx, &pthis->dyna.actor, 8);
|
||||
pthis->dyna.actor.flags |= ACTOR_FLAG_4;
|
||||
pthis->actionFunc = BgHidanDalm_Shrink;
|
||||
pthis->dyna.actor.bgCheckFlags &= ~2;
|
||||
pthis->dyna.actor.bgCheckFlags &= ~8;
|
||||
pthis->dyna.actor.bgCheckFlags &= ~BG_STATE_1;
|
||||
pthis->dyna.actor.bgCheckFlags &= ~BG_STATE_3;
|
||||
pthis->dyna.actor.speedXZ = 10.0f;
|
||||
Flags_SetSwitch(globalCtx, pthis->switchFlag);
|
||||
func_8002F7DC(&GET_PLAYER(globalCtx)->actor, NA_SE_IT_HAMMER_HIT);
|
||||
|
|
|
@ -293,7 +293,7 @@ void func_8088B69C(BgHidanRock* pthis, GlobalContext* globalCtx)
|
|||
void func_8088B79C(BgHidanRock* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
pthis->timer--;
|
||||
if(pthis->dyna.actor.bgCheckFlags & 2)
|
||||
if(pthis->dyna.actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
if(pthis->type == 0)
|
||||
{
|
||||
|
|
|
@ -183,10 +183,10 @@ void BgIceTurara_Shiver(BgIceTurara* pthis, GlobalContext* globalCtx)
|
|||
|
||||
void BgIceTurara_Fall(BgIceTurara* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if((pthis->collider.base.atFlags & AT_HIT) || (pthis->dyna.actor.bgCheckFlags & 1))
|
||||
if((pthis->collider.base.atFlags & AT_HIT) || (pthis->dyna.actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->collider.base.atFlags &= ~AT_HIT;
|
||||
pthis->dyna.actor.bgCheckFlags &= ~1;
|
||||
pthis->dyna.actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
if(pthis->dyna.actor.world.pos.y < pthis->dyna.actor.floorHeight)
|
||||
{
|
||||
pthis->dyna.actor.world.pos.y = pthis->dyna.actor.floorHeight;
|
||||
|
|
|
@ -174,7 +174,7 @@ void BgJyaHaheniron_ChairCrumble(BgJyaHaheniron* pthis, GlobalContext* globalCtx
|
|||
|
||||
Actor_MoveForward(&pthis->actor);
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->actor, 5.0f, 8.0f, 0.0f, 0x85);
|
||||
if((pthis->actor.bgCheckFlags & 9) || ((pthis->collider.base.atFlags & AT_HIT) && (pthis->collider.base.at != NULL) && (pthis->collider.base.at->category == ACTORCAT_PLAYER)))
|
||||
if((pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_3)) || ((pthis->collider.base.atFlags & AT_HIT) && (pthis->collider.base.at != NULL) && (pthis->collider.base.at->category == ACTORCAT_PLAYER)))
|
||||
{
|
||||
vec.x = -Rand_ZeroOne() * pthis->actor.velocity.x;
|
||||
vec.y = -Rand_ZeroOne() * pthis->actor.velocity.y;
|
||||
|
|
|
@ -283,7 +283,7 @@ void BgMoriHashigo_LadderFall(BgMoriHashigo* pthis, GlobalContext* globalCtx)
|
|||
Actor* thisx = &pthis->dyna.actor;
|
||||
|
||||
Actor_MoveForward(thisx);
|
||||
if((thisx->bgCheckFlags & 1) && (thisx->velocity.y < 0.0f))
|
||||
if((thisx->bgCheckFlags & BG_STATE_0) && (thisx->velocity.y < 0.0f))
|
||||
{
|
||||
if(pthis->bounceCounter >= ARRAY_COUNT(bounceSpeed_48))
|
||||
{
|
||||
|
|
|
@ -531,7 +531,7 @@ void action_808B5B6C(BgSpot16Bombstone* pthis, GlobalContext* globalCtx)
|
|||
return;
|
||||
}
|
||||
|
||||
if(actor->bgCheckFlags & 8 || (actor->bgCheckFlags & 1 && actor->velocity.y < 0.0f))
|
||||
if(actor->bgCheckFlags & BG_STATE_3 || (actor->bgCheckFlags & BG_STATE_0 && actor->velocity.y < 0.0f))
|
||||
{
|
||||
BgSpot16Bombstone_SpawnFragments(pthis, globalCtx);
|
||||
BgSpot16Bombstone_SpawnDust(pthis, globalCtx);
|
||||
|
|
|
@ -102,7 +102,7 @@ void BgSstFloor_Update(BgSstFloor* thisx, GlobalContext* globalCtx)
|
|||
{
|
||||
distFromRim = 350.0f;
|
||||
}
|
||||
player->actor.bgCheckFlags &= ~1;
|
||||
player->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
player->actor.velocity.y = 9.0f * distFromRim * (1.0f / 350.0f);
|
||||
}
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ void BgSstFloor_Update(BgSstFloor* thisx, GlobalContext* globalCtx)
|
|||
{
|
||||
distFromRim = 350.0f;
|
||||
}
|
||||
item00->bgCheckFlags &= ~3;
|
||||
item00->bgCheckFlags &= ~(BG_STATE_0 | BG_STATE_1);
|
||||
item00->velocity.y = 9.0f * distFromRim * (1.0f / 350.0f);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -892,7 +892,7 @@ void BossDodongo_Roll(BossDodongo* pthis, GlobalContext* globalCtx)
|
|||
Math_SmoothStepToF(&pthis->actor.world.pos.z, sp5C->z, 1.0f, pthis->unk_1E4, 0.0f);
|
||||
pthis->unk_1C4 += 2000;
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->unk_228 = 7700.0f;
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_DODO_K_ROLL - SFX_FLAG);
|
||||
|
|
|
@ -729,7 +729,7 @@ void BossFd_Fly(BossFd* pthis, GlobalContext* globalCtx)
|
|||
if(pthis->timers[1] == 0)
|
||||
{
|
||||
osSyncPrintf("BGCHECKKKKKKKKKKKKKKKKKKKKKKK\n");
|
||||
if(pthis->actor.bgCheckFlags & 0x10)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_4)
|
||||
{
|
||||
pthis->fwork[BFD_CEILING_BOUNCE] = -18384.0f;
|
||||
pthis->timers[1] = 10;
|
||||
|
|
|
@ -4590,7 +4590,7 @@ void BossGanon_LightBall_Update(Actor* thisx, GlobalContext* globalCtx2)
|
|||
spBA = 4;
|
||||
}
|
||||
|
||||
if((spBA != 0) || (pthis->actor.bgCheckFlags & 1))
|
||||
if((spBA != 0) || (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
f32 sp58;
|
||||
f32 sp54;
|
||||
|
|
|
@ -1183,7 +1183,7 @@ void func_808FFCFC(BossGanon2* pthis, GlobalContext* globalCtx)
|
|||
func_80900580(pthis, globalCtx);
|
||||
Audio_StopSfxById(NA_SE_EN_MGANON_UNARI);
|
||||
}
|
||||
else if((pthis->actor.bgCheckFlags & 8) && func_808FFA24(pthis, globalCtx))
|
||||
else if((pthis->actor.bgCheckFlags & BG_STATE_3) && func_808FFA24(pthis, globalCtx))
|
||||
{
|
||||
pthis->unk_311 = false;
|
||||
func_80900580(pthis, globalCtx);
|
||||
|
@ -2341,7 +2341,7 @@ void BossGanon2_Update(Actor* thisx, GlobalContext* globalCtx)
|
|||
if(pthis->unk_335 != 0)
|
||||
{
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->actor, 60.0f, 60.0f, 100.0f, 5);
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
if(pthis->actor.velocity.y < -5.0f)
|
||||
{
|
||||
|
|
|
@ -918,7 +918,7 @@ void BossGoma_Encounter(BossGoma* pthis, GlobalContext* globalCtx)
|
|||
Math_ApproachS(&pthis->actor.shape.rot.x, 0, 2, 0xBB8);
|
||||
Math_ApproachS(&pthis->actor.world.rot.y, Actor_WorldYawTowardActor(&pthis->actor, &GET_PLAYER(globalCtx)->actor), 2, 0x7D0);
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actionState = 130;
|
||||
pthis->actor.velocity.y = 0.0f;
|
||||
|
@ -1534,7 +1534,7 @@ void BossGoma_FallJump(BossGoma* pthis, GlobalContext* globalCtx)
|
|||
Math_ApproachS(&pthis->actor.shape.rot.x, 0, 2, 0xBB8);
|
||||
Math_ApproachS(&pthis->actor.world.rot.y, Actor_WorldYawTowardActor(&pthis->actor, &GET_PLAYER(globalCtx)->actor), 2, 0x7D0);
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
BossGoma_SetupFloorLand(pthis);
|
||||
pthis->actor.velocity.y = 0.0f;
|
||||
|
@ -1552,7 +1552,7 @@ void BossGoma_FallStruckDown(BossGoma* pthis, GlobalContext* globalCtx)
|
|||
Math_ApproachS(&pthis->actor.shape.rot.x, 0, 2, 0xBB8);
|
||||
Math_ApproachS(&pthis->actor.world.rot.y, Actor_WorldYawTowardActor(&pthis->actor, &GET_PLAYER(globalCtx)->actor), 3, 0x7D0);
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
BossGoma_SetupFloorLandStruckDown(pthis);
|
||||
pthis->actor.velocity.y = 0.0f;
|
||||
|
@ -1784,12 +1784,12 @@ void BossGoma_FloorMain(BossGoma* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.velocity.y = 0.0f;
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
BossGoma_SetupWallClimb(pthis);
|
||||
}
|
||||
|
@ -1843,7 +1843,7 @@ void BossGoma_CeilingMoveToCenter(BossGoma* pthis, GlobalContext* globalCtx)
|
|||
Math_ApproachS(&pthis->actor.shape.rot.x, -0x8000, 3, 0x3E8);
|
||||
|
||||
// avoid walking into a wall?
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
angle = pthis->actor.shape.rot.y + 0x8000;
|
||||
|
||||
|
|
|
@ -444,7 +444,7 @@ void BossSst_HeadIntro(BossSst* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
|
||||
Math_Vec3f_Copy(&sCameraAt, &player->actor.world.pos);
|
||||
if(player->actor.bgCheckFlags & 2)
|
||||
if(player->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
if(!pthis->ready)
|
||||
{
|
||||
|
@ -1919,7 +1919,7 @@ void BossSst_HandPunch(BossSst* pthis, GlobalContext* globalCtx)
|
|||
|
||||
pthis->actor.world.pos.x += pthis->actor.speedXZ * Math_SinS(pthis->actor.shape.rot.y);
|
||||
pthis->actor.world.pos.z += pthis->actor.speedXZ * Math_CosS(pthis->actor.shape.rot.y);
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
BossSst_HandSetupRetreat(pthis);
|
||||
}
|
||||
|
|
|
@ -1545,7 +1545,7 @@ void BossTw_HitByBeam(BossTw* pthis, GlobalContext* globalCtx)
|
|||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->actor, 50.0f, 50.0f, 100.0f, 4);
|
||||
pthis->actor.world.pos.y += 50.0f;
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
}
|
||||
|
@ -3916,7 +3916,7 @@ void BossTw_Draw(Actor* thisx, GlobalContext* globalCtx2)
|
|||
diff.y = pthis->groundBlastPos2.y - player->actor.world.pos.y;
|
||||
diff.z = pthis->groundBlastPos2.z - player->actor.world.pos.z;
|
||||
|
||||
if((fabsf(diff.y) < 10.0f) && (player->actor.bgCheckFlags & 1) && (sqrtf(SQ(diff.x) + SQ(diff.z)) < (pthis->workf[UNK_F12] * 4600.0f)) && (sFreezeState == 0) && (pthis->workf[UNK_F11] > 200.0f))
|
||||
if((fabsf(diff.y) < 10.0f) && (player->actor.bgCheckFlags & BG_STATE_0) && (sqrtf(SQ(diff.x) + SQ(diff.z)) < (pthis->workf[UNK_F12] * 4600.0f)) && (sFreezeState == 0) && (pthis->workf[UNK_F11] > 200.0f))
|
||||
{
|
||||
sFreezeState = 1;
|
||||
sTwinrovaPtr->timers[2] = 100;
|
||||
|
@ -4453,7 +4453,7 @@ void BossTw_BlastFire(BossTw* pthis, GlobalContext* globalCtx)
|
|||
yDiff = sKoumePtr->groundBlastPos2.y - player->actor.world.pos.y;
|
||||
zDiff = sKoumePtr->groundBlastPos2.z - player->actor.world.pos.z;
|
||||
|
||||
if(!player->isBurning && (player->actor.bgCheckFlags & 1) && (fabsf(yDiff) < 10.0f) && (sqrtf(SQ(xDiff) + SQ(zDiff)) < (sKoumePtr->workf[UNK_F13] * 4550.0f)))
|
||||
if(!player->isBurning && (player->actor.bgCheckFlags & BG_STATE_0) && (fabsf(yDiff) < 10.0f) && (sqrtf(SQ(xDiff) + SQ(zDiff)) < (sKoumePtr->workf[UNK_F13] * 4550.0f)))
|
||||
{
|
||||
s16 j;
|
||||
|
||||
|
@ -5904,7 +5904,7 @@ void BossTw_TwinrovaStun(BossTw* pthis, GlobalContext* globalCtx)
|
|||
Animation_MorphToLoop(&pthis->skelAnime, &object_tw_Anim_035030, 0.0f);
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.velocity.y = 0.0f;
|
||||
}
|
||||
|
|
|
@ -1560,9 +1560,9 @@ void BossVa_BodyPhase4(BossVa* pthis, GlobalContext* globalCtx)
|
|||
pthis->unk_1AC += 0xC31;
|
||||
pthis->unk_1A0 = (Math_CosS(pthis->unk_1AC) * 0.1f) + 1.0f;
|
||||
pthis->unk_1A4 = (Math_SinS(pthis->unk_1AC) * 0.05f) + 1.0f;
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->actor.bgCheckFlags &= ~8;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_3;
|
||||
pthis->actor.world.rot.y = (s16)Rand_CenteredFloat(30 * (0x10000 / 360)) + pthis->actor.wallYaw;
|
||||
}
|
||||
|
||||
|
|
|
@ -817,7 +817,7 @@ void func_8098652C(DemoIm* pthis, GlobalContext* globalCtx)
|
|||
|
||||
void func_80986570(DemoIm* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if(Animation_OnFrame(&pthis->skelAnime, 7.0f) && (pthis->actor.bgCheckFlags & 1))
|
||||
if(Animation_OnFrame(&pthis->skelAnime, 7.0f) && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
u32 sfxId = SFX_FLAG;
|
||||
|
||||
|
|
|
@ -691,7 +691,7 @@ void func_809975C0(DoorShutter* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
Actor_MoveForward(&pthis->dyna.actor);
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
if(pthis->dyna.actor.bgCheckFlags & 1)
|
||||
if(pthis->dyna.actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
DoorShutter_SetupAction(pthis, func_809976B8);
|
||||
if(!(gSaveContext.eventChkInf[7] & 1))
|
||||
|
|
|
@ -200,7 +200,7 @@ s32 EnAm_CanMove(EnAm* pthis, GlobalContext* globalCtx, f32 distance, s16 yaw)
|
|||
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
pthis->dyna.actor.world.pos = curPos;
|
||||
ret = pthis->dyna.actor.bgCheckFlags & 1;
|
||||
ret = pthis->dyna.actor.bgCheckFlags & BG_STATE_0;
|
||||
|
||||
if(!ret && (pthis->dyna.actor.floorHeight >= (pthis->dyna.actor.home.pos.y - 20.0f)))
|
||||
{
|
||||
|
@ -477,7 +477,7 @@ void EnAm_RotateToHome(EnAm* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
else if(pthis->skelAnime.curFrame > 11.0f)
|
||||
{
|
||||
if(!(pthis->dyna.actor.bgCheckFlags & 1))
|
||||
if(!(pthis->dyna.actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->skelAnime.curFrame = 11;
|
||||
}
|
||||
|
@ -521,7 +521,7 @@ void EnAm_RotateToInit(EnAm* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
else if(pthis->skelAnime.curFrame > 11.0f)
|
||||
{
|
||||
if(!(pthis->dyna.actor.bgCheckFlags & 1))
|
||||
if(!(pthis->dyna.actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->skelAnime.curFrame = 11;
|
||||
}
|
||||
|
@ -567,7 +567,7 @@ void EnAm_MoveToHome(EnAm* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
else if(pthis->skelAnime.curFrame > 11.0f)
|
||||
{
|
||||
if(!(pthis->dyna.actor.bgCheckFlags & 1))
|
||||
if(!(pthis->dyna.actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->skelAnime.curFrame = 11;
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ void EnAm_MoveToHome(EnAm* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
Math_SmoothStepToS(&pthis->dyna.actor.world.rot.y, yawToHome, 1, 0xBB8, 0);
|
||||
|
||||
if(pthis->dyna.actor.bgCheckFlags & 2)
|
||||
if(pthis->dyna.actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
pthis->unk_258--;
|
||||
}
|
||||
|
@ -593,7 +593,7 @@ void EnAm_MoveToHome(EnAm* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
|
||||
// turn away from a wall if touching one
|
||||
if((pthis->dyna.actor.speedXZ != 0.0f) && (pthis->dyna.actor.bgCheckFlags & 8))
|
||||
if((pthis->dyna.actor.speedXZ != 0.0f) && (pthis->dyna.actor.bgCheckFlags & BG_STATE_3))
|
||||
{
|
||||
pthis->dyna.actor.world.rot.y = pthis->dyna.actor.wallYaw;
|
||||
Actor_MoveForward(&pthis->dyna.actor);
|
||||
|
@ -647,7 +647,7 @@ void EnAm_Cooldown(EnAm* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
else if(pthis->skelAnime.curFrame > 11.0f)
|
||||
{
|
||||
if(!(pthis->dyna.actor.bgCheckFlags & 1))
|
||||
if(!(pthis->dyna.actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->skelAnime.curFrame = 11;
|
||||
}
|
||||
|
@ -701,7 +701,7 @@ void EnAm_Lunge(EnAm* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
else if(pthis->skelAnime.curFrame > 11.0f)
|
||||
{
|
||||
if(!(pthis->dyna.actor.bgCheckFlags & 1))
|
||||
if(!(pthis->dyna.actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->skelAnime.curFrame = 11;
|
||||
}
|
||||
|
@ -709,7 +709,7 @@ void EnAm_Lunge(EnAm* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
Math_SmoothStepToS(&pthis->dyna.actor.world.rot.y, pthis->dyna.actor.yawTowardsPlayer, 1, 0x1770, 0);
|
||||
|
||||
if(pthis->dyna.actor.bgCheckFlags & 2)
|
||||
if(pthis->dyna.actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
pthis->unk_258--;
|
||||
}
|
||||
|
@ -728,11 +728,11 @@ void EnAm_Lunge(EnAm* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
|
||||
// turn and move away from a wall if contact is made with one
|
||||
if((pthis->dyna.actor.speedXZ != 0.0f) && (pthis->dyna.actor.bgCheckFlags & 8))
|
||||
if((pthis->dyna.actor.speedXZ != 0.0f) && (pthis->dyna.actor.bgCheckFlags & BG_STATE_3))
|
||||
{
|
||||
pthis->dyna.actor.world.rot.y = (pthis->dyna.actor.wallYaw - pthis->dyna.actor.world.rot.y) + pthis->dyna.actor.wallYaw;
|
||||
Actor_MoveForward(&pthis->dyna.actor);
|
||||
pthis->dyna.actor.bgCheckFlags &= ~8;
|
||||
pthis->dyna.actor.bgCheckFlags &= ~BG_STATE_3;
|
||||
}
|
||||
|
||||
SkelAnime_Update(&pthis->skelAnime);
|
||||
|
@ -785,7 +785,7 @@ void EnAm_Statue(EnAm* pthis, GlobalContext* globalCtx)
|
|||
moveDir = Math_Vec3f_Yaw(&pthis->dyna.actor.world.pos, &pthis->hurtCollider.base.oc->world.pos) - temp158f;
|
||||
}
|
||||
|
||||
if((pthis->dyna.unk_150 == 0.0f) || (pthis->unk_258 == 0) || !(pthis->dyna.actor.bgCheckFlags & 1) || !func_800435D8(globalCtx, &pthis->dyna, 0x14, (Math_SinS(pthis->unk_258) * (pthis->dyna.unk_150 * 0.5f)) + 40.0f, 0xA) ||
|
||||
if((pthis->dyna.unk_150 == 0.0f) || (pthis->unk_258 == 0) || !(pthis->dyna.actor.bgCheckFlags & BG_STATE_0) || !func_800435D8(globalCtx, &pthis->dyna, 0x14, (Math_SinS(pthis->unk_258) * (pthis->dyna.unk_150 * 0.5f)) + 40.0f, 0xA) ||
|
||||
((pthis->hurtCollider.base.ocFlags1 & OC1_HIT) && (ABS(moveDir) <= 0x2000)))
|
||||
{
|
||||
pthis->unk_258 = 0;
|
||||
|
@ -798,7 +798,7 @@ void EnAm_Statue(EnAm* pthis, GlobalContext* globalCtx)
|
|||
pthis->dyna.actor.speedXZ = Math_SinS(pthis->unk_258) * (pthis->dyna.unk_150 * 0.5f);
|
||||
}
|
||||
|
||||
if(pthis->dyna.actor.bgCheckFlags & 2)
|
||||
if(pthis->dyna.actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
Audio_PlayActorSound2(&pthis->dyna.actor, NA_SE_EV_BLOCK_BOUND);
|
||||
}
|
||||
|
|
|
@ -377,7 +377,7 @@ void EnAnubice_Die(EnAnubice* pthis, GlobalContext* globalCtx)
|
|||
Actor_SetColorFilter(&pthis->actor, 0x4000, 0x80, 0, 8);
|
||||
EffectSsEnFire_SpawnVec3f(globalCtx, &pthis->actor, &fireEffectPos, 100, 0, 0, -1);
|
||||
|
||||
if(pthis->animLastFrame <= curFrame && (pthis->actor.bgCheckFlags & 1))
|
||||
if(pthis->animLastFrame <= curFrame && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
Math_ApproachF(&pthis->actor.shape.yOffset, -4230.0f, 0.5f, 300.0f);
|
||||
if(pthis->actor.shape.yOffset < -2000.0f)
|
||||
|
|
|
@ -236,7 +236,7 @@ void func_809B5670(EnAttackNiw* pthis, GlobalContext* globalCtx)
|
|||
Actor_SetFocus(&pthis->actor, pthis->unk_2E4);
|
||||
Actor_GetScreenPos(globalCtx, &pthis->actor, &sp4E, &sp4C);
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->unk_2D4 = pthis->actor.yawTowardsPlayer;
|
||||
pthis->unk_2D0 = pthis->actor.world.rot.x - 3000.0f;
|
||||
|
@ -250,7 +250,7 @@ void func_809B5670(EnAttackNiw* pthis, GlobalContext* globalCtx)
|
|||
pthis->unk_288 = 0.0f;
|
||||
pthis->actionFunc = func_809B59B0;
|
||||
}
|
||||
else if(((pthis->actor.projectedPos.z > 0.0f) && (fabsf(sp34.x - pthis->actor.world.pos.x) < 50.0f) && (fabsf(sp34.y - pthis->actor.world.pos.y) < 50.0f) && (fabsf(sp34.z - pthis->actor.world.pos.z) < 50.0f)) || (pthis->actor.bgCheckFlags & 1))
|
||||
else if(((pthis->actor.projectedPos.z > 0.0f) && (fabsf(sp34.x - pthis->actor.world.pos.x) < 50.0f) && (fabsf(sp34.y - pthis->actor.world.pos.y) < 50.0f) && (fabsf(sp34.z - pthis->actor.world.pos.z) < 50.0f)) || (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->unk_2D4 = pthis->actor.yawTowardsPlayer;
|
||||
pthis->unk_2D0 = pthis->actor.world.rot.x - 2000.0f;
|
||||
|
@ -280,7 +280,7 @@ void func_809B59B0(EnAttackNiw* pthis, GlobalContext* globalCtx)
|
|||
return;
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
if(pthis->unk_25A == 0)
|
||||
{
|
||||
|
@ -305,7 +305,7 @@ void func_809B59B0(EnAttackNiw* pthis, GlobalContext* globalCtx)
|
|||
Math_SmoothStepToS(&pthis->actor.world.rot.x, pthis->unk_2D0, 2, pthis->unk_2DC, 0);
|
||||
Math_ApproachF(&pthis->unk_2DC, 10000.0f, 1.0f, 1000.0f);
|
||||
Math_ApproachF(&pthis->actor.speedXZ, pthis->unk_2E0, 0.9f, 1.0f);
|
||||
if((pthis->actor.gravity == -2.0f) && (pthis->unk_262 == 0) && ((pthis->actor.bgCheckFlags & 8) || (pthis->unk_25C == 0)))
|
||||
if((pthis->actor.gravity == -2.0f) && (pthis->unk_262 == 0) && ((pthis->actor.bgCheckFlags & BG_STATE_3) || (pthis->unk_25C == 0)))
|
||||
{
|
||||
pthis->unk_2E0 = 0.0f;
|
||||
pthis->actor.gravity = 0.0f;
|
||||
|
@ -313,7 +313,7 @@ void func_809B59B0(EnAttackNiw* pthis, GlobalContext* globalCtx)
|
|||
pthis->unk_2D0 = pthis->actor.world.rot.x - 5000.0f;
|
||||
pthis->actionFunc = func_809B5C18;
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 1)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
func_809B5268(pthis, globalCtx, 5);
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ void EnAttackNiw_Update(Actor* thisx, GlobalContext* globalCtx)
|
|||
return;
|
||||
}
|
||||
|
||||
if((pthis->actor.bgCheckFlags & 0x20) && (pthis->actionFunc != func_809B5C18))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_5) && (pthis->actionFunc != func_809B5C18))
|
||||
{
|
||||
Math_Vec3f_Copy(&sp30, &pthis->actor.world.pos);
|
||||
sp30.y += pthis->actor.yDistToWater;
|
||||
|
|
|
@ -224,7 +224,7 @@ void EnBa_SetupFallAsBlob(EnBa* pthis)
|
|||
*/
|
||||
void EnBa_FallAsBlob(EnBa* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.scale.y -= 0.001f;
|
||||
pthis->actor.scale.x += 0.0005f;
|
||||
|
|
|
@ -531,7 +531,7 @@ void EnBb_SetupDamage(EnBb* pthis)
|
|||
if(pthis->actor.params > ENBB_GREEN)
|
||||
{
|
||||
pthis->actor.world.rot.y = pthis->actor.yawTowardsPlayer;
|
||||
if((pthis->actor.bgCheckFlags & 8) == 0)
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) == 0)
|
||||
{
|
||||
pthis->actor.speedXZ = -7.0f;
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ void EnBb_Blue(EnBb* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
thisYawToWall = pthis->actor.wallYaw - pthis->actor.world.rot.y;
|
||||
moveYawToWall = pthis->actor.wallYaw - pthis->vMoveAngleY;
|
||||
if((pthis->targetActor == NULL) && (pthis->actor.bgCheckFlags & 8) && (ABS(thisYawToWall) > 0x4000 || ABS(moveYawToWall) > 0x4000))
|
||||
if((pthis->targetActor == NULL) && (pthis->actor.bgCheckFlags & BG_STATE_3) && (ABS(thisYawToWall) > 0x4000 || ABS(moveYawToWall) > 0x4000))
|
||||
{
|
||||
pthis->vMoveAngleY = pthis->actor.wallYaw + pthis->actor.wallYaw - pthis->actor.world.rot.y - 0x8000;
|
||||
Math_SmoothStepToS(&pthis->actor.world.rot.y, pthis->vMoveAngleY, 1, 0xBB8, 0);
|
||||
|
@ -741,7 +741,7 @@ void EnBb_SetupDown(EnBb* pthis)
|
|||
pthis->action = BB_DOWN;
|
||||
pthis->timer = 200;
|
||||
pthis->actor.colorFilterTimer = 0;
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
pthis->actor.speedXZ = 3.0f;
|
||||
pthis->flameScaleX = 0.0f;
|
||||
pthis->flameScaleY = 0.0f;
|
||||
|
@ -755,15 +755,15 @@ void EnBb_Down(EnBb* pthis, GlobalContext* globalCtx)
|
|||
s16 yawDiff = pthis->actor.world.rot.y - pthis->actor.wallYaw;
|
||||
|
||||
SkelAnime_Update(&pthis->skelAnime);
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
if(ABS(yawDiff) > 0x4000)
|
||||
{
|
||||
pthis->actor.world.rot.y = pthis->actor.wallYaw + pthis->actor.wallYaw - pthis->actor.world.rot.y - 0x8000;
|
||||
}
|
||||
pthis->actor.bgCheckFlags &= ~8;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_3;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 3)
|
||||
if(pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_1))
|
||||
{
|
||||
if(pthis->actor.params == ENBB_RED)
|
||||
{
|
||||
|
@ -789,7 +789,7 @@ void EnBb_Down(EnBb* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
pthis->actor.velocity.y = 10.0f;
|
||||
}
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
Actor_SpawnFloorDustRing(globalCtx, &pthis->actor, &pthis->actor.world.pos, 7.0f, 2, 2.0f, 0, 0, 0);
|
||||
Math_SmoothStepToS(&pthis->actor.world.rot.y, -pthis->actor.yawTowardsPlayer, 1, 0xBB8, 0);
|
||||
}
|
||||
|
@ -840,7 +840,7 @@ void EnBb_SetupRed(GlobalContext* globalCtx, EnBb* pthis)
|
|||
pthis->actionState = BBRED_ATTACK;
|
||||
pthis->timer = 0;
|
||||
pthis->moveMode = BBMOVE_NORMAL;
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -851,7 +851,7 @@ void EnBb_SetupRed(GlobalContext* globalCtx, EnBb* pthis)
|
|||
pthis->actor.world.pos.y -= 80.0f;
|
||||
pthis->actor.home.pos = pthis->actor.world.pos;
|
||||
pthis->actor.velocity.y = pthis->actor.gravity = pthis->actor.speedXZ = 0.0f;
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
pthis->actor.flags &= ~ACTOR_FLAG_0;
|
||||
}
|
||||
pthis->action = BB_RED;
|
||||
|
@ -881,7 +881,7 @@ void EnBb_Red(EnBb* pthis, GlobalContext* globalCtx)
|
|||
pthis->actor.velocity.y = 18.0f;
|
||||
pthis->moveMode = BBMOVE_NOCLIP;
|
||||
pthis->timer = 7;
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
pthis->actionState++;
|
||||
EnBb_SpawnFlameTrail(globalCtx, pthis, false);
|
||||
}
|
||||
|
@ -895,16 +895,16 @@ void EnBb_Red(EnBb* pthis, GlobalContext* globalCtx)
|
|||
pthis->bobPhase += Rand_ZeroOne();
|
||||
Math_SmoothStepToF(&pthis->flameScaleY, 80.0f, 1.0f, 10.0f, 0.0f);
|
||||
Math_SmoothStepToF(&pthis->flameScaleX, 100.0f, 1.0f, 10.0f, 0.0f);
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
yawDiff = pthis->actor.world.rot.y - pthis->actor.wallYaw;
|
||||
if(ABS(yawDiff) > 0x4000)
|
||||
{
|
||||
pthis->actor.world.rot.y = pthis->actor.wallYaw + pthis->actor.wallYaw - pthis->actor.world.rot.y - 0x8000;
|
||||
}
|
||||
pthis->actor.bgCheckFlags &= ~8;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_3;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
floorType = func_80041D4C(&globalCtx->colCtx, pthis->actor.floorPoly, pthis->actor.floorBgId);
|
||||
if((floorType == 2) || (floorType == 3) || (floorType == 9))
|
||||
|
@ -923,7 +923,7 @@ void EnBb_Red(EnBb* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
pthis->actor.world.rot.y = Math_SinF(pthis->bobPhase) * 65535.0f;
|
||||
}
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
}
|
||||
pthis->actor.shape.rot.y = pthis->actor.world.rot.y;
|
||||
if(Actor_GetCollidedExplosive(globalCtx, &pthis->collider.base) != NULL)
|
||||
|
@ -1248,7 +1248,7 @@ void EnBb_SetupStunned(EnBb* pthis)
|
|||
Actor_SetColorFilter(&pthis->actor, 0, 0xB4, 0, 0x50);
|
||||
break;
|
||||
}
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
EnBb_SetupAction(pthis, EnBb_Stunned);
|
||||
}
|
||||
|
||||
|
@ -1256,15 +1256,15 @@ void EnBb_Stunned(EnBb* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
s16 yawDiff = pthis->actor.world.rot.y - pthis->actor.wallYaw;
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
if(ABS(yawDiff) > 0x4000)
|
||||
{
|
||||
pthis->actor.world.rot.y = pthis->actor.wallYaw + pthis->actor.wallYaw - pthis->actor.world.rot.y - 0x8000;
|
||||
}
|
||||
pthis->actor.bgCheckFlags &= ~8;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_3;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_DODO_M_GND);
|
||||
if(pthis->actor.velocity.y < -14.0f)
|
||||
|
|
|
@ -354,7 +354,7 @@ void EnBili_UpdateFloating(EnBili* pthis)
|
|||
pthis->actor.world.pos.y = pthis->actor.home.pos.y + (sinf(pthis->timer * (M_PI / 16)) * 3.0f);
|
||||
|
||||
// Turn around if touching wall
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->actor.world.rot.y = pthis->actor.wallYaw;
|
||||
}
|
||||
|
@ -599,7 +599,7 @@ void EnBili_Stunned(EnBili* pthis, GlobalContext* globalCtx)
|
|||
pthis->timer--;
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_DODO_M_GND);
|
||||
}
|
||||
|
@ -622,7 +622,7 @@ void EnBili_Frozen(EnBili* pthis, GlobalContext* globalCtx)
|
|||
pthis->actor.gravity = -1.0f;
|
||||
}
|
||||
|
||||
if((pthis->actor.bgCheckFlags & 1) || (pthis->actor.floorHeight == BGCHECK_Y_MIN))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) || (pthis->actor.floorHeight == BGCHECK_Y_MIN))
|
||||
{
|
||||
pthis->actor.colorFilterTimer = 0;
|
||||
EnBili_SetupDie(pthis);
|
||||
|
|
|
@ -136,13 +136,13 @@ void EnBom_Move(EnBom* pthis, GlobalContext* globalCtx)
|
|||
return;
|
||||
}
|
||||
|
||||
if((pthis->actor.velocity.y > 0.0f) && (pthis->actor.bgCheckFlags & 0x10))
|
||||
if((pthis->actor.velocity.y > 0.0f) && (pthis->actor.bgCheckFlags & BG_STATE_4))
|
||||
{
|
||||
pthis->actor.velocity.y = -pthis->actor.velocity.y;
|
||||
}
|
||||
|
||||
// rebound bomb off the wall it hits
|
||||
if((pthis->actor.speedXZ != 0.0f) && (pthis->actor.bgCheckFlags & 8))
|
||||
if((pthis->actor.speedXZ != 0.0f) && (pthis->actor.bgCheckFlags & BG_STATE_3))
|
||||
{
|
||||
if(ABS((s16)(pthis->actor.wallYaw - pthis->actor.world.rot.y)) > 0x4000)
|
||||
{
|
||||
|
@ -151,21 +151,21 @@ void EnBom_Move(EnBom* pthis, GlobalContext* globalCtx)
|
|||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EV_BOMB_BOUND);
|
||||
Actor_MoveForward(&pthis->actor);
|
||||
pthis->actor.speedXZ *= 0.7f;
|
||||
pthis->actor.bgCheckFlags &= ~8;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_3;
|
||||
}
|
||||
|
||||
if(!(pthis->actor.bgCheckFlags & 1))
|
||||
if(!(pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
Math_StepToF(&pthis->actor.speedXZ, 0.0f, 0.08f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Math_StepToF(&pthis->actor.speedXZ, 0.0f, 1.0f);
|
||||
if((pthis->actor.bgCheckFlags & 2) && (pthis->actor.velocity.y < -3.0f))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_1) && (pthis->actor.velocity.y < -3.0f))
|
||||
{
|
||||
func_8002F850(globalCtx, &pthis->actor);
|
||||
pthis->actor.velocity.y *= -0.3f;
|
||||
pthis->actor.bgCheckFlags &= ~2;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_1;
|
||||
}
|
||||
else if(pthis->timer >= 4)
|
||||
{
|
||||
|
@ -398,9 +398,9 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx2)
|
|||
Actor_Kill(thisx);
|
||||
return;
|
||||
}
|
||||
if(thisx->bgCheckFlags & 0x40)
|
||||
if(thisx->bgCheckFlags & BG_STATE_6)
|
||||
{
|
||||
thisx->bgCheckFlags &= ~0x40;
|
||||
thisx->bgCheckFlags &= ~BG_STATE_6;
|
||||
Audio_PlayActorSound2(thisx, NA_SE_EV_BOMB_DROP_WATER);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -505,16 +505,16 @@ void EnBomChu_Update(Actor* thisx, GlobalContext* globalCtx2)
|
|||
|
||||
if(pthis->actor.yDistToWater < 0.0f)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 0x20)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_5)
|
||||
{
|
||||
EnBomChu_SpawnRipples(pthis, globalCtx, waterY);
|
||||
}
|
||||
|
||||
pthis->actor.bgCheckFlags &= ~0x20;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_5;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!(pthis->actor.bgCheckFlags & 0x20) && (pthis->timer != 120))
|
||||
if(!(pthis->actor.bgCheckFlags & BG_STATE_5) && (pthis->timer != 120))
|
||||
{
|
||||
EnBomChu_SpawnRipples(pthis, globalCtx, waterY);
|
||||
}
|
||||
|
@ -523,12 +523,12 @@ void EnBomChu_Update(Actor* thisx, GlobalContext* globalCtx2)
|
|||
EffectSsBubble_Spawn(globalCtx, &pthis->actor.world.pos, 0.0f, 3.0f, 15.0f, 0.25f);
|
||||
}
|
||||
|
||||
pthis->actor.bgCheckFlags |= 0x20;
|
||||
pthis->actor.bgCheckFlags |= BG_STATE_5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pthis->actor.bgCheckFlags &= ~0x20;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_5;
|
||||
pthis->actor.yDistToWater = BGCHECK_Y_MIN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -270,14 +270,14 @@ void EnBombf_Move(EnBombf* pthis, GlobalContext* globalCtx)
|
|||
|
||||
pthis->flowerBombScale = 1.0f;
|
||||
|
||||
if(!(pthis->actor.bgCheckFlags & 1))
|
||||
if(!(pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
Math_SmoothStepToF(&pthis->actor.speedXZ, 0.0f, 1.0f, 0.025f, 0.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Math_SmoothStepToF(&pthis->actor.speedXZ, 0.0f, 1.0f, 1.5f, 0.0f);
|
||||
if((pthis->actor.bgCheckFlags & 2) && (pthis->actor.velocity.y < -6.0f))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_1) && (pthis->actor.velocity.y < -6.0f))
|
||||
{
|
||||
func_8002F850(globalCtx, &pthis->actor);
|
||||
pthis->actor.velocity.y *= -0.5f;
|
||||
|
@ -404,13 +404,13 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx)
|
|||
|
||||
if(thisx->params == BOMBFLOWER_BODY)
|
||||
{
|
||||
if((thisx->velocity.y > 0.0f) && (thisx->bgCheckFlags & 0x10))
|
||||
if((thisx->velocity.y > 0.0f) && (thisx->bgCheckFlags & BG_STATE_4))
|
||||
{
|
||||
thisx->velocity.y = -thisx->velocity.y;
|
||||
}
|
||||
|
||||
// rebound bomb off the wall it hits
|
||||
if((thisx->speedXZ != 0.0f) && (thisx->bgCheckFlags & 8))
|
||||
if((thisx->speedXZ != 0.0f) && (thisx->bgCheckFlags & BG_STATE_3))
|
||||
{
|
||||
if(ABS((s16)(thisx->wallYaw - thisx->world.rot.y)) > 0x4000)
|
||||
{
|
||||
|
@ -425,7 +425,7 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx)
|
|||
Actor_UpdateBgCheckInfo(globalCtx, thisx, 5.0f, 10.0f, 0.0f, 0x1F);
|
||||
DREG(6) = 0;
|
||||
thisx->speedXZ *= 0.7f;
|
||||
thisx->bgCheckFlags &= ~8;
|
||||
thisx->bgCheckFlags &= ~BG_STATE_3;
|
||||
}
|
||||
|
||||
if((pthis->bombCollider.base.acFlags & AC_HIT) || ((pthis->bombCollider.base.ocFlags1 & OC1_HIT) && (pthis->bombCollider.base.oc->category == ACTORCAT_ENEMY)))
|
||||
|
@ -534,9 +534,9 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx)
|
|||
Actor_Kill(thisx);
|
||||
return;
|
||||
}
|
||||
if(thisx->bgCheckFlags & 0x40)
|
||||
if(thisx->bgCheckFlags & BG_STATE_6)
|
||||
{
|
||||
thisx->bgCheckFlags &= ~0x40;
|
||||
thisx->bgCheckFlags &= ~BG_STATE_6;
|
||||
Audio_PlayActorSound2(thisx, NA_SE_EV_BOMB_DROP_WATER);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -204,7 +204,7 @@ void EnBoom_Fly(EnBoom* pthis, GlobalContext* globalCtx)
|
|||
if(target->id == ACTOR_EN_ITEM00)
|
||||
{
|
||||
target->gravity = -0.9f;
|
||||
target->bgCheckFlags &= ~0x03;
|
||||
target->bgCheckFlags &= ~(BG_STATE_0 | BG_STATE_1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -260,7 +260,7 @@ void EnBox_Fall(EnBox* pthis, GlobalContext* globalCtx)
|
|||
|
||||
pthis->alpha = 255;
|
||||
pthis->movementFlags &= ~ENBOX_MOVE_IMMOBILE;
|
||||
if(pthis->dyna.actor.bgCheckFlags & 1)
|
||||
if(pthis->dyna.actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->movementFlags |= ENBOX_MOVE_UNUSED;
|
||||
if(pthis->movementFlags & ENBOX_MOVE_FALL_ANGLE_SIDE)
|
||||
|
|
|
@ -284,7 +284,7 @@ void EnBubble_Fly(EnBubble* pthis, GlobalContext* globalCtx)
|
|||
pthis->graphicRotSpeed = 128.0f;
|
||||
pthis->graphicEccentricity = 0.48f;
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 0x20 && sp54.y < 0.0f)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_5 && sp54.y < 0.0f)
|
||||
{
|
||||
sp60.x = sp60.z = 0.0f;
|
||||
sp60.y = 1.0f;
|
||||
|
|
|
@ -315,7 +315,7 @@ void func_809CEA24(EnBw* pthis, GlobalContext* globalCtx)
|
|||
pthis->unk_222 = (Rand_ZeroOne() * 200.0f) + 200.0f;
|
||||
}
|
||||
}
|
||||
else if((pthis->actor.speedXZ != 0.0f) && (pthis->actor.bgCheckFlags & 8))
|
||||
else if((pthis->actor.speedXZ != 0.0f) && (pthis->actor.bgCheckFlags & BG_STATE_3))
|
||||
{
|
||||
if(pthis->unk_236 != pthis->actor.wallYaw)
|
||||
{
|
||||
|
@ -331,7 +331,7 @@ void func_809CEA24(EnBw* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
pthis->unk_238 = -0x4000;
|
||||
}
|
||||
pthis->actor.bgCheckFlags &= ~8;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_3;
|
||||
pthis->unk_222 = (Rand_ZeroOne() * 20.0f) + 160.0f;
|
||||
}
|
||||
else
|
||||
|
@ -424,7 +424,7 @@ void func_809CEA24(EnBw* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
if(((sp64 == 0) && !(pthis->actor.bgCheckFlags & 8)) || Actor_IsFacingPlayer(&pthis->actor, 0x1C70))
|
||||
if(((sp64 == 0) && !(pthis->actor.bgCheckFlags & BG_STATE_3)) || Actor_IsFacingPlayer(&pthis->actor, 0x1C70))
|
||||
{
|
||||
if(Actor_IsFacingPlayer(&pthis->actor, 0x1C70))
|
||||
{
|
||||
|
@ -529,7 +529,7 @@ void func_809CF984(EnBw* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
}
|
||||
SkelAnime_Update(&pthis->skelAnime);
|
||||
if(pthis->actor.bgCheckFlags & 3)
|
||||
if(pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_1))
|
||||
{
|
||||
floorPolyType = func_80041D4C(&globalCtx->colCtx, pthis->actor.floorPoly, pthis->actor.floorBgId);
|
||||
if((floorPolyType == 2) || (floorPolyType == 3) || (floorPolyType == 9))
|
||||
|
@ -565,7 +565,7 @@ void func_809CFC4C(EnBw* pthis, GlobalContext* globalCtx)
|
|||
Math_SmoothStepToS(&pthis->actor.shape.rot.z, 0x7FFF, 1, 0xFA0, 0);
|
||||
Math_SmoothStepToF(&pthis->unk_248, 0.0f, 1.0f, 0.05f, 0.0f);
|
||||
SkelAnime_Update(&pthis->skelAnime);
|
||||
if(pthis->actor.bgCheckFlags & 3)
|
||||
if(pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_1))
|
||||
{
|
||||
if((globalCtx->gameplayFrames % 0x80) == 0)
|
||||
{
|
||||
|
@ -574,7 +574,7 @@ void func_809CFC4C(EnBw* pthis, GlobalContext* globalCtx)
|
|||
pthis->unk_221 = 4;
|
||||
pthis->unk_258 += pthis->unk_25C;
|
||||
Math_SmoothStepToF(&pthis->unk_260, 0.075f, 1.0f, 0.005f, 0.0f);
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
Actor_SpawnFloorDustRing(globalCtx, &pthis->actor, &pthis->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_DODO_M_GND);
|
||||
|
@ -628,7 +628,7 @@ void func_809CFF10(EnBw* pthis)
|
|||
pthis->actor.speedXZ = 0.0f;
|
||||
pthis->actor.velocity.y = 11.0f;
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_BUBLEWALK_REVERSE);
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
EnBw_SetupAction(pthis, func_809CFF98);
|
||||
}
|
||||
|
||||
|
@ -637,7 +637,7 @@ void func_809CFF98(EnBw* pthis, GlobalContext* globalCtx)
|
|||
Math_SmoothStepToS(&pthis->actor.shape.rot.z, 0, 1, 0xFA0, 0);
|
||||
Math_SmoothStepToF(&pthis->unk_248, 0.6f, 1.0f, 0.05f, 0.0f);
|
||||
SkelAnime_Update(&pthis->skelAnime);
|
||||
if(pthis->actor.bgCheckFlags & 3)
|
||||
if(pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_1))
|
||||
{
|
||||
Actor_SpawnFloorDustRing(globalCtx, &pthis->actor, &pthis->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
|
||||
pthis->unk_222 = 0xBB8;
|
||||
|
@ -812,7 +812,7 @@ void func_809D0424(EnBw* pthis, GlobalContext* globalCtx)
|
|||
|
||||
void func_809D0584(EnBw* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if((pthis->actor.bgCheckFlags & 0x10) && (pthis->actor.bgCheckFlags & 1))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_4) && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->unk_230 = 0;
|
||||
pthis->actor.scale.y -= 0.009f;
|
||||
|
@ -875,7 +875,7 @@ void func_809D0584(EnBw* pthis, GlobalContext* globalCtx)
|
|||
pthis->unk_248 = 0.0f;
|
||||
}
|
||||
}
|
||||
if((globalCtx->actorCtx.unk_02 != 0) && (pthis->actor.xzDistToPlayer <= 400.0f) && (pthis->actor.bgCheckFlags & 1))
|
||||
if((globalCtx->actorCtx.unk_02 != 0) && (pthis->actor.xzDistToPlayer <= 400.0f) && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
if(pthis->unk_220 == 5)
|
||||
{
|
||||
|
|
|
@ -582,7 +582,7 @@ void EnClearTag_Update(Actor* thisx, GlobalContext* globalCtx2)
|
|||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_DODO_K_BREATH - SFX_FLAG);
|
||||
|
||||
// Check if the Arwing has hit the ground.
|
||||
if(pthis->actor.bgCheckFlags & 9)
|
||||
if(pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_3))
|
||||
{
|
||||
pthis->shouldExplode = true;
|
||||
|
||||
|
@ -618,7 +618,7 @@ void EnClearTag_Update(Actor* thisx, GlobalContext* globalCtx2)
|
|||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->actor, 50.0f, 80.0f, 100.0f, 5);
|
||||
|
||||
// Check if the laser has hit a target, timed out, or hit the ground.
|
||||
if(pthis->actor.bgCheckFlags & 9 || hasAtHit || pthis->timers[CLEAR_TAG_TIMER_LASER_DEATH] == 0)
|
||||
if(pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_3) || hasAtHit || pthis->timers[CLEAR_TAG_TIMER_LASER_DEATH] == 0)
|
||||
{
|
||||
// Kill the laser.
|
||||
Actor_Kill(&pthis->actor);
|
||||
|
|
|
@ -162,7 +162,7 @@ void EnCrow_SetupDamaged(EnCrow* pthis, GlobalContext* globalCtx)
|
|||
Animation_Change(&pthis->skelAnime, &gGuayFlyAnim, 0.4f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f);
|
||||
scale = pthis->actor.scale.x * 100.0f;
|
||||
pthis->actor.world.pos.y += 20.0f * scale;
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
pthis->actor.shape.yOffset = 0.0f;
|
||||
pthis->actor.targetArrowOffset = 0.0f;
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_KAICHO_DEAD);
|
||||
|
@ -258,7 +258,7 @@ void EnCrow_FlyIdle(EnCrow* pthis, GlobalContext* globalCtx)
|
|||
skelanimeUpdated = Animation_OnFrame(&pthis->skelAnime, 0.0f);
|
||||
pthis->actor.speedXZ = (Rand_ZeroOne() * 1.5f) + 3.0f;
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->aimRotY = pthis->actor.wallYaw;
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ void EnCrow_FlyIdle(EnCrow* pthis, GlobalContext* globalCtx)
|
|||
pthis->aimRotX = CLAMP(pthis->aimRotX, -0x1000, 0x1000);
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
Math_ScaledStepToS(&pthis->actor.shape.rot.x, -0x100, 0x400);
|
||||
}
|
||||
|
@ -359,7 +359,7 @@ void EnCrow_DiveAttack(EnCrow* pthis, GlobalContext* globalCtx)
|
|||
Math_ApproachS(&pthis->actor.shape.rot.y, pthis->actor.yawTowardsPlayer, 4, 0xC00);
|
||||
}
|
||||
|
||||
if((pthis->timer == 0) || (Player_GetMask(globalCtx) == PLAYER_MASK_SKULL) || (pthis->collider.base.atFlags & AT_HIT) || (pthis->actor.bgCheckFlags & 9) || (player->stateFlags1 & PLAYER_STATE_HORSE_MOUNTED) || (pthis->actor.yDistToWater > -40.0f))
|
||||
if((pthis->timer == 0) || (Player_GetMask(globalCtx) == PLAYER_MASK_SKULL) || (pthis->collider.base.atFlags & AT_HIT) || (pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_3)) || (player->stateFlags1 & PLAYER_STATE_HORSE_MOUNTED) || (pthis->actor.yDistToWater > -40.0f))
|
||||
{
|
||||
if(pthis->collider.base.atFlags & AT_HIT)
|
||||
{
|
||||
|
@ -383,7 +383,7 @@ void EnCrow_Damaged(EnCrow* pthis, GlobalContext* globalCtx)
|
|||
Math_ScaledStepToS(&pthis->actor.shape.rot.x, 0x4000, 0x200);
|
||||
pthis->actor.shape.rot.z += 0x1780;
|
||||
}
|
||||
if((pthis->actor.bgCheckFlags & 1) || (pthis->actor.floorHeight == BGCHECK_Y_MIN))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) || (pthis->actor.floorHeight == BGCHECK_Y_MIN))
|
||||
{
|
||||
EffectSsDeadDb_Spawn(globalCtx, &pthis->actor.world.pos, &sZeroVecAccel, &sZeroVecAccel, pthis->actor.scale.x * 10000.0f, 0, 255, 255, 255, 255, 255, 0, 0, 1, 9, 1);
|
||||
EnCrow_SetupDie(pthis);
|
||||
|
@ -425,7 +425,7 @@ void EnCrow_TurnAway(EnCrow* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
SkelAnime_Update(&pthis->skelAnime);
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->aimRotY = pthis->actor.wallYaw;
|
||||
}
|
||||
|
|
|
@ -1077,7 +1077,7 @@ void EnDekubaba_PrunedSomersault(EnDekubaba* pthis, GlobalContext* globalCtx)
|
|||
|
||||
EffectSsHahen_SpawnBurst(globalCtx, &pthis->actor.world.pos, pthis->size * 3.0f, 0, pthis->size * 12.0f, pthis->size * 5.0f, 1, HAHEN_OBJECT_DEFAULT, 10, NULL);
|
||||
|
||||
if((pthis->actor.scale.x > 0.005f) && ((pthis->actor.bgCheckFlags & 2) || (pthis->actor.bgCheckFlags & 8)))
|
||||
if((pthis->actor.scale.x > 0.005f) && ((pthis->actor.bgCheckFlags & BG_STATE_1) || (pthis->actor.bgCheckFlags & BG_STATE_3)))
|
||||
{
|
||||
pthis->actor.scale.x = pthis->actor.scale.y = pthis->actor.scale.z = 0.0f;
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
|
@ -1085,7 +1085,7 @@ void EnDekubaba_PrunedSomersault(EnDekubaba* pthis, GlobalContext* globalCtx)
|
|||
EffectSsHahen_SpawnBurst(globalCtx, &pthis->actor.world.pos, pthis->size * 3.0f, 0, pthis->size * 12.0f, pthis->size * 5.0f, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_DODO_M_GND);
|
||||
pthis->timer = 1;
|
||||
|
|
|
@ -437,11 +437,11 @@ void EnDekunuts_Run(EnDekunuts* pthis, GlobalContext* globalCtx)
|
|||
Math_StepToF(&pthis->actor.speedXZ, 7.5f, 1.0f);
|
||||
if(Math_SmoothStepToS(&pthis->actor.world.rot.y, pthis->runDirection, 1, 0xE38, 0xB6) == 0)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 0x20)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_5)
|
||||
{
|
||||
pthis->runDirection = Actor_WorldYawTowardPoint(&pthis->actor, &pthis->actor.home.pos);
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 8)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->runDirection = pthis->actor.wallYaw;
|
||||
}
|
||||
|
|
|
@ -432,7 +432,7 @@ void EnDh_Burrow(EnDh* pthis, GlobalContext* globalCtx)
|
|||
void EnDh_SetupDamage(EnDh* pthis)
|
||||
{
|
||||
Animation_MorphToPlayOnce(&pthis->skelAnime, &object_dh_Anim_003D6C, -6.0f);
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.speedXZ = -1.0f;
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ void EnDntJiji_Destroy(Actor* thisx, GlobalContext* globalCtx)
|
|||
|
||||
void EnDntJiji_SetFlower(EnDntJiji* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->flowerPos = pthis->actor.world.pos;
|
||||
pthis->actionFunc = EnDntJiji_SetupWait;
|
||||
|
@ -207,7 +207,7 @@ void EnDntJiji_Walk(EnDntJiji* pthis, GlobalContext* globalCtx)
|
|||
pthis->sfxTimer = 5;
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_NUTS_WALK);
|
||||
}
|
||||
if((pthis->actor.bgCheckFlags & 8) && (pthis->actor.bgCheckFlags & 1))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->actor.velocity.y = 9.0f;
|
||||
pthis->actor.speedXZ = 3.0f;
|
||||
|
@ -411,7 +411,7 @@ void EnDntJiji_Return(EnDntJiji* pthis, GlobalContext* globalCtx)
|
|||
dz = pthis->flowerPos.z - pthis->actor.world.pos.z;
|
||||
Math_SmoothStepToS(&pthis->actor.shape.rot.y, Math_FAtan2F(dx, dz) * (0x8000 / M_PI), 1, 0xBB8, 0);
|
||||
pthis->actor.world.rot.y = pthis->actor.shape.rot.y;
|
||||
if((pthis->actor.bgCheckFlags & 8) && (pthis->actor.bgCheckFlags & 1))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->actor.velocity.y = 9.0f;
|
||||
pthis->actor.speedXZ = 3.0f;
|
||||
|
|
|
@ -214,7 +214,7 @@ void EnDntNomal_WaitForObject(EnDntNomal* pthis, GlobalContext* globalCtx)
|
|||
|
||||
void EnDntNomal_SetFlower(EnDntNomal* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->flowerPos = pthis->actor.world.pos;
|
||||
if(pthis->type == ENDNTNOMAL_TARGET)
|
||||
|
@ -642,7 +642,7 @@ void EnDntNomal_StageCelebrate(EnDntNomal* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_NUTS_WALK);
|
||||
}
|
||||
if((pthis->actor.bgCheckFlags & 8) && (pthis->actor.bgCheckFlags & 1))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->actor.velocity.y = 7.5f;
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ s32 func_809F68B0(EnDodojr* pthis, GlobalContext* globalCtx)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_DODO_M_GND);
|
||||
pthis->dustPos = pthis->actor.world.pos;
|
||||
|
@ -511,7 +511,7 @@ void func_809F758C(EnDodojr* pthis, GlobalContext* globalCtx)
|
|||
pthis->actionFunc = func_809F799C;
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_DODO_M_DOWN);
|
||||
func_809F6BBC(pthis);
|
||||
|
|
|
@ -874,7 +874,7 @@ void EnDodongo_Update(Actor* thisx, GlobalContext* globalCtx)
|
|||
pthis->actionFunc(pthis, globalCtx);
|
||||
Actor_MoveForward(&pthis->actor);
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->actor, 75.0f, 60.0f, 70.0f, 0x1D);
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_RIZA_DOWN);
|
||||
}
|
||||
|
|
|
@ -497,7 +497,7 @@ void EnEiyer_Glide(EnEiyer* pthis, GlobalContext* globalCtx)
|
|||
Math_StepToF(&pthis->actor.speedXZ, 1.5f, 0.03f);
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->targetYaw = pthis->actor.wallYaw;
|
||||
}
|
||||
|
@ -557,7 +557,7 @@ void EnEiyer_DiveAttack(EnEiyer* pthis, GlobalContext* globalCtx)
|
|||
SkelAnime_Update(&pthis->skelanime);
|
||||
pthis->actor.speedXZ *= 1.1f;
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 8 || pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3 || pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
EnEiyer_SetupLand(pthis);
|
||||
}
|
||||
|
@ -578,12 +578,12 @@ void EnEiyer_Land(EnEiyer* pthis, GlobalContext* globalCtx)
|
|||
|
||||
if(pthis->timer == -1)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 8 || pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3 || pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->timer = 10;
|
||||
Audio_PlaySoundAtPosition(globalCtx, &pthis->actor.world.pos, 30, NA_SE_EN_OCTAROCK_SINK);
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
EffectSsGSplash_Spawn(globalCtx, &pthis->actor.world.pos, NULL, NULL, 1, 700);
|
||||
}
|
||||
|
@ -617,7 +617,7 @@ void EnEiyer_Hurt(EnEiyer* pthis, GlobalContext* globalCtx)
|
|||
Math_ApproachF(&pthis->basePos.y, pthis->actor.floorHeight + 80.0f + 5.0f, 0.5f, pthis->actor.speedXZ);
|
||||
pthis->actor.world.pos.y = pthis->basePos.y - 5.0f;
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->targetYaw = pthis->actor.wallYaw;
|
||||
}
|
||||
|
@ -662,7 +662,7 @@ void EnEiyer_Die(EnEiyer* pthis, GlobalContext* globalCtx)
|
|||
|
||||
pthis->actor.world.rot.x = -pthis->actor.shape.rot.x;
|
||||
|
||||
if(pthis->timer == 0 || pthis->actor.bgCheckFlags & 0x10)
|
||||
if(pthis->timer == 0 || pthis->actor.bgCheckFlags & BG_STATE_4)
|
||||
{
|
||||
EnEiyer_SetupDead(pthis);
|
||||
}
|
||||
|
@ -695,7 +695,7 @@ void EnEiyer_Stunned(EnEiyer* pthis, GlobalContext* globalCtx)
|
|||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_EIER_FLUTTER);
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_DODO_M_GND);
|
||||
}
|
||||
|
|
|
@ -281,7 +281,7 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* pthis, GlobalContext* globalC
|
|||
{
|
||||
if(globalCtx->sceneNum == SCENE_SPOT00)
|
||||
{
|
||||
if((player->unk_89E == 0) || (player->actor.floorBgId != BGCHECK_SCENE) || !(player->actor.bgCheckFlags & 1) || (player->stateFlags1 & PLAYER_STATE_SWIMMING))
|
||||
if((player->unk_89E == 0) || (player->actor.floorBgId != BGCHECK_SCENE) || !(player->actor.bgCheckFlags & BG_STATE_0) || (player->stateFlags1 & PLAYER_STATE_SWIMMING))
|
||||
{ // Swimming?
|
||||
|
||||
pthis->fieldSpawnTimer = 60;
|
||||
|
|
|
@ -249,7 +249,7 @@ void EnExRuppy_DropIntoWater(EnExRuppy* pthis, GlobalContext* globalCtx)
|
|||
EnExRuppy_SpawnSparkles(pthis, globalCtx, 2, 0);
|
||||
Common_PlaySfx(NA_SE_EV_RAINBOW_SHOWER - SFX_FLAG);
|
||||
divingGame = (EnDivingGame*)pthis->actor.parent;
|
||||
if((divingGame != NULL) && (divingGame->actor.update != NULL) && ((divingGame->unk_296 == 0) || (pthis->actor.bgCheckFlags & 0x20) || (pthis->timer == 0)))
|
||||
if((divingGame != NULL) && (divingGame->actor.update != NULL) && ((divingGame->unk_296 == 0) || (pthis->actor.bgCheckFlags & BG_STATE_5) || (pthis->timer == 0)))
|
||||
{
|
||||
pthis->invisible = true;
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
|
@ -292,7 +292,7 @@ void EnExRuppy_Sink(EnExRuppy* pthis, GlobalContext* globalCtx)
|
|||
Vec3f pos;
|
||||
s32 pad;
|
||||
|
||||
if((pthis->actor.bgCheckFlags & 0x20) && (pthis->actor.yDistToWater > 15.0f))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_5) && (pthis->actor.yDistToWater > 15.0f))
|
||||
{
|
||||
pos = pthis->actor.world.pos;
|
||||
pos.y += pthis->actor.yDistToWater;
|
||||
|
|
|
@ -547,7 +547,7 @@ void EnFd_SpinAndGrow(EnFd* pthis, GlobalContext* globalCtx)
|
|||
|
||||
void EnFd_JumpToGround(EnFd* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if((pthis->actor.bgCheckFlags & 1) && !(pthis->actor.velocity.y > 0.0f))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) && !(pthis->actor.velocity.y > 0.0f))
|
||||
{
|
||||
pthis->actor.velocity.y = 0.0f;
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
|
|
|
@ -166,11 +166,11 @@ void func_80A0E70C(EnFdFire* pthis, GlobalContext* globalCtx)
|
|||
targetPos.x += pthis->spawnRadius * Math_SinS(pthis->actor.world.rot.y);
|
||||
targetPos.z += pthis->spawnRadius * Math_CosS(pthis->actor.world.rot.y);
|
||||
EnFdFire_UpdatePos(pthis, &targetPos);
|
||||
if(pthis->actor.bgCheckFlags & 1 && (!(pthis->actor.velocity.y > 0.0f)))
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0 && (!(pthis->actor.velocity.y > 0.0f)))
|
||||
{
|
||||
pthis->actor.velocity = velocity;
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
if(pthis->actor.params & 0x8000)
|
||||
{
|
||||
pthis->deathTimer = 200;
|
||||
|
|
|
@ -321,7 +321,7 @@ void EnFhgFire_LightningShock(EnFhgFire* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->actor, 50.0f, 50.0f, 100.0f, 1);
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
Actor_Kill(&pthis->actor);
|
||||
}
|
||||
|
@ -653,7 +653,7 @@ void EnFhgFire_EnergyBall(EnFhgFire* pthis, GlobalContext* globalCtx)
|
|||
if(pthis->work[FHGFIRE_FX_TIMER] == 0)
|
||||
{
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->actor, 50.0f, 50.0f, 100.0f, 7);
|
||||
if((pthis->actor.bgCheckFlags & 0x19) || killMode)
|
||||
if((pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_3 | BG_STATE_4)) || killMode)
|
||||
{
|
||||
u8 lightBallColor2 = FHGFLASH_LIGHTBALL_GREEN;
|
||||
s16 i4;
|
||||
|
|
|
@ -206,7 +206,7 @@ void EnFireRock_Fall(EnFireRock* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
break;
|
||||
}
|
||||
if((pthis->actor.bgCheckFlags & 1) && (pthis->timer == 0))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) && (pthis->timer == 0))
|
||||
{
|
||||
switch(pthis->type)
|
||||
{
|
||||
|
|
|
@ -463,18 +463,18 @@ void EnFirefly_FlyIdle(EnFirefly* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->targetPitch = 0x954;
|
||||
}
|
||||
else if((pthis->actor.bgCheckFlags & 0x10) || (pthis->maxAltitude < pthis->actor.world.pos.y))
|
||||
else if((pthis->actor.bgCheckFlags & BG_STATE_4) || (pthis->maxAltitude < pthis->actor.world.pos.y))
|
||||
{
|
||||
pthis->targetPitch = 0x2154;
|
||||
}
|
||||
}
|
||||
Math_ScaledStepToS(&pthis->actor.shape.rot.x, pthis->targetPitch, 0x100);
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
Math_SmoothStepToS(&pthis->actor.shape.rot.y, pthis->actor.wallYaw, 2, 0xC00, 0x300);
|
||||
}
|
||||
|
@ -506,7 +506,7 @@ void EnFirefly_Fall(EnFirefly* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
pthis->timer--;
|
||||
}
|
||||
if((pthis->actor.bgCheckFlags & 1) || (pthis->timer == 0))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) || (pthis->timer == 0))
|
||||
{
|
||||
EnFirefly_SetupDie(pthis);
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ void EnFirefly_DiveAttack(EnFirefly* pthis, GlobalContext* globalCtx)
|
|||
pthis->timer--;
|
||||
}
|
||||
Math_StepToF(&pthis->actor.speedXZ, 4.0f, 0.5f);
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
Math_SmoothStepToS(&pthis->actor.shape.rot.y, pthis->actor.wallYaw, 2, 0xC00, 0x300);
|
||||
Math_ScaledStepToS(&pthis->actor.shape.rot.x, pthis->targetPitch, 0x100);
|
||||
|
@ -565,11 +565,11 @@ void EnFirefly_DiveAttack(EnFirefly* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
Math_SmoothStepToS(&pthis->actor.shape.rot.y, pthis->actor.yawTowardsPlayer, 2, 0xC00, 0x300);
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->targetPitch = 0x954;
|
||||
}
|
||||
if((pthis->actor.bgCheckFlags & 0x10) || (pthis->maxAltitude < pthis->actor.world.pos.y))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_4) || (pthis->maxAltitude < pthis->actor.world.pos.y))
|
||||
{
|
||||
pthis->targetPitch = 0x2154;
|
||||
}
|
||||
|
@ -617,11 +617,11 @@ void EnFirefly_FlyAway(EnFirefly* pthis, GlobalContext* globalCtx)
|
|||
return;
|
||||
}
|
||||
Math_StepToF(&pthis->actor.speedXZ, 3.0f, 0.3f);
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->targetPitch = 0x954;
|
||||
}
|
||||
else if((pthis->actor.bgCheckFlags & 0x10) || (pthis->maxAltitude < pthis->actor.world.pos.y))
|
||||
else if((pthis->actor.bgCheckFlags & BG_STATE_4) || (pthis->maxAltitude < pthis->actor.world.pos.y))
|
||||
{
|
||||
pthis->targetPitch = 0x2154;
|
||||
}
|
||||
|
@ -629,7 +629,7 @@ void EnFirefly_FlyAway(EnFirefly* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
pthis->targetPitch = 0x954;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
Math_SmoothStepToS(&pthis->actor.shape.rot.y, pthis->actor.wallYaw, 2, 0xC00, 0x300);
|
||||
}
|
||||
|
@ -665,7 +665,7 @@ void EnFirefly_Stunned(EnFirefly* pthis, GlobalContext* globalCtx)
|
|||
|
||||
void EnFirefly_FrozenFall(EnFirefly* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if((pthis->actor.bgCheckFlags & 1) || (pthis->actor.floorHeight == BGCHECK_Y_MIN))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) || (pthis->actor.floorHeight == BGCHECK_Y_MIN))
|
||||
{
|
||||
pthis->actor.colorFilterTimer = 0;
|
||||
EnFirefly_SetupDie(pthis);
|
||||
|
|
|
@ -442,12 +442,12 @@ void EnFish_Dropped_Fall(EnFish* pthis, GlobalContext* globalCtx)
|
|||
pthis->actor.shape.rot.z = pthis->actor.world.rot.z;
|
||||
SkelAnime_Update(&pthis->skelAnime);
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{ // On floor
|
||||
pthis->timer = 400;
|
||||
EnFish_Dropped_SetupFlopOnGround(pthis);
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 0x20)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_5)
|
||||
{ // In water
|
||||
EnFish_Dropped_SetupSwimAway(pthis);
|
||||
}
|
||||
|
@ -550,11 +550,11 @@ void EnFish_Dropped_FlopOnGround(EnFish* pthis, GlobalContext* globalCtx)
|
|||
pthis->actor.draw = NULL;
|
||||
}
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 0x20)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_5)
|
||||
{ // In water
|
||||
EnFish_Dropped_SetupSwimAway(pthis);
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 1)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{ // On floor
|
||||
EnFish_Dropped_SetupFlopOnGround(pthis);
|
||||
}
|
||||
|
@ -580,7 +580,7 @@ void EnFish_Dropped_SwimAway(EnFish* pthis, GlobalContext* globalCtx)
|
|||
Math_SmoothStepToF(&pthis->actor.speedXZ, 2.8f, 0.1f, 0.4f, 0.0f);
|
||||
|
||||
// If touching wall or not in water, turn back and slow down for one frame.
|
||||
if((pthis->actor.bgCheckFlags & 8) || !(pthis->actor.bgCheckFlags & 0x20))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) || !(pthis->actor.bgCheckFlags & BG_STATE_5))
|
||||
{
|
||||
pthis->actor.home.rot.y = Math_Vec3f_Yaw(&pthis->actor.world.pos, &pthis->actor.home.pos);
|
||||
pthis->actor.speedXZ *= 0.5f;
|
||||
|
@ -593,7 +593,7 @@ void EnFish_Dropped_SwimAway(EnFish* pthis, GlobalContext* globalCtx)
|
|||
pthis->actor.shape.rot = pthis->actor.world.rot;
|
||||
|
||||
// Raise if on a floor.
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
Math_StepToF(&pthis->actor.world.pos.y, pthis->actor.home.pos.y - 4.0f, 2.0f);
|
||||
}
|
||||
|
|
|
@ -566,7 +566,7 @@ void EnFloormas_BigWalk(EnFloormas* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
EnFloormas_SetupRun(pthis);
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 8)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
// set target rotation to the colliding wall's rotation
|
||||
pthis->actionTarget = pthis->actor.wallYaw;
|
||||
|
@ -602,7 +602,7 @@ void EnFloormas_Run(EnFloormas* pthis, GlobalContext* globalCtx)
|
|||
|
||||
Math_ApproachS(&pthis->actor.shape.rot.y, pthis->actor.yawTowardsPlayer, 3, 0x71C);
|
||||
|
||||
if((pthis->actor.xzDistToPlayer < 280.0f) && Actor_IsFacingPlayer(&pthis->actor, 0x2000) && !(pthis->actor.bgCheckFlags & 8))
|
||||
if((pthis->actor.xzDistToPlayer < 280.0f) && Actor_IsFacingPlayer(&pthis->actor, 0x2000) && !(pthis->actor.bgCheckFlags & BG_STATE_3))
|
||||
{
|
||||
EnFloormas_SetupHover(pthis, globalCtx);
|
||||
}
|
||||
|
@ -708,7 +708,7 @@ void EnFloormas_Charge(EnFloormas* pthis, GlobalContext* globalCtx)
|
|||
EnFloormas_Slide(pthis, globalCtx);
|
||||
}
|
||||
|
||||
if((pthis->actor.bgCheckFlags & 8) || (pthis->actionTimer == 0))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) || (pthis->actionTimer == 0))
|
||||
{
|
||||
EnFloormas_SetupLand(pthis);
|
||||
}
|
||||
|
@ -718,8 +718,8 @@ void EnFloormas_Land(EnFloormas* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
s32 isOnGround;
|
||||
|
||||
isOnGround = pthis->actor.bgCheckFlags & 1;
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
isOnGround = pthis->actor.bgCheckFlags & BG_STATE_0;
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
if(pthis->actor.params != MERGE_MASTER)
|
||||
{
|
||||
|
@ -738,7 +738,7 @@ void EnFloormas_Land(EnFloormas* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
}
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
}
|
||||
|
@ -784,7 +784,7 @@ void EnFloormas_Land(EnFloormas* pthis, GlobalContext* globalCtx)
|
|||
|
||||
void EnFloormas_Split(EnFloormas* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
if(SkelAnime_Update(&pthis->skelAnime))
|
||||
{
|
||||
|
@ -795,7 +795,7 @@ void EnFloormas_Split(EnFloormas* pthis, GlobalContext* globalCtx)
|
|||
Math_StepToF(&pthis->actor.speedXZ, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_FLOORMASTER_SM_LAND);
|
||||
}
|
||||
|
@ -815,7 +815,7 @@ void EnFloormas_SmWalk(EnFloormas* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
EnFloormas_SetupSmDecideAction(pthis);
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 8)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->actionTarget = pthis->actor.wallYaw;
|
||||
EnFloormas_SetupTurn(pthis);
|
||||
|
@ -836,7 +836,7 @@ void EnFloormas_SmDecideAction(EnFloormas* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_FLOORMASTER_SM_WALK);
|
||||
}
|
||||
isAgainstWall = pthis->actor.bgCheckFlags & 8;
|
||||
isAgainstWall = pthis->actor.bgCheckFlags & BG_STATE_3;
|
||||
if(isAgainstWall)
|
||||
{
|
||||
pthis->actionTarget = pthis->actor.wallYaw;
|
||||
|
@ -900,7 +900,7 @@ void EnFloormas_JumpAtLink(EnFloormas* pthis, GlobalContext* globalCtx)
|
|||
pthis->actor.speedXZ = 5.0f;
|
||||
pthis->actor.velocity.y = 7.0f;
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 2)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
pthis->actionTimer = 0x32;
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
|
@ -1007,7 +1007,7 @@ void EnFloormas_SmSlaveJumpAtMaster(EnFloormas* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
pthis->actor.params = 0x10;
|
||||
EnFloormas_SetupLand(pthis);
|
||||
|
@ -1028,7 +1028,7 @@ void EnFloormas_SmSlaveJumpAtMaster(EnFloormas* pthis, GlobalContext* globalCtx)
|
|||
EnFloormas_SetupSmWait(pthis);
|
||||
pthis->collider.base.ocFlags1 |= OC1_ON;
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 2)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_FLOORMASTER_SM_LAND);
|
||||
|
|
|
@ -84,7 +84,7 @@ s32 EnFw_DoBounce(EnFw* pthis, s32 totalBounces, f32 yVelocity)
|
|||
{
|
||||
s16 temp_v1;
|
||||
|
||||
if(!(pthis->actor.bgCheckFlags & 1) || (pthis->actor.velocity.y > 0.0f))
|
||||
if(!(pthis->actor.bgCheckFlags & BG_STATE_0) || (pthis->actor.velocity.y > 0.0f))
|
||||
{
|
||||
// not on the ground or moving upwards.
|
||||
return false;
|
||||
|
@ -307,7 +307,7 @@ void EnFw_Run(EnFw* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(!(pthis->actor.bgCheckFlags & 1) || pthis->actor.velocity.y > 0.0f)
|
||||
if(!(pthis->actor.bgCheckFlags & BG_STATE_0) || pthis->actor.velocity.y > 0.0f)
|
||||
{
|
||||
Actor_SetColorFilter(&pthis->actor, 0x4000, 0xC8, 0, pthis->damageTimer);
|
||||
return;
|
||||
|
@ -405,7 +405,7 @@ void EnFw_TurnToParentInitPos(EnFw* pthis, GlobalContext* globalCtx)
|
|||
|
||||
void EnFw_JumpToParentInitPos(EnFw* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 1 && pthis->actor.velocity.y <= 0.0f)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0 && pthis->actor.velocity.y <= 0.0f)
|
||||
{
|
||||
pthis->actor.parent->params |= 0x8000;
|
||||
Actor_Kill(&pthis->actor);
|
||||
|
|
|
@ -347,9 +347,9 @@ void EnFz_ApplyDamage(EnFz* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
Vec3f vec;
|
||||
|
||||
if(pthis->isMoving && ((pthis->actor.bgCheckFlags & 8) || (Actor_TestFloorInDirection(&pthis->actor, globalCtx, 60.0f, pthis->actor.world.rot.y) == 0)))
|
||||
if(pthis->isMoving && ((pthis->actor.bgCheckFlags & BG_STATE_3) || (Actor_TestFloorInDirection(&pthis->actor, globalCtx, 60.0f, pthis->actor.world.rot.y) == 0)))
|
||||
{
|
||||
pthis->actor.bgCheckFlags &= ~8;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_3;
|
||||
pthis->isMoving = false;
|
||||
pthis->speedXZ = 0.0f;
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
|
|
|
@ -309,7 +309,7 @@ s32 EnGeldB_ReactToPlayer(GlobalContext* globalCtx, EnGeldB* pthis, s16 arg2)
|
|||
if(func_800354B4(globalCtx, thisx, 100.0f, 0x5DC0, 0x2AA8, thisx->shape.rot.y))
|
||||
{
|
||||
thisx->shape.rot.y = thisx->world.rot.y = thisx->yawTowardsPlayer;
|
||||
if((thisx->bgCheckFlags & 8) && (ABS(angleToWall) < 0x2EE0) && (thisx->xzDistToPlayer < 90.0f))
|
||||
if((thisx->bgCheckFlags & BG_STATE_3) && (ABS(angleToWall) < 0x2EE0) && (thisx->xzDistToPlayer < 90.0f))
|
||||
{
|
||||
EnGeldB_SetupJump(pthis);
|
||||
return true;
|
||||
|
@ -333,7 +333,7 @@ s32 EnGeldB_ReactToPlayer(GlobalContext* globalCtx, EnGeldB* pthis, s16 arg2)
|
|||
else if((bomb = Actor_FindNearby(globalCtx, thisx, -1, ACTORCAT_EXPLOSIVE, 80.0f)) != NULL)
|
||||
{
|
||||
thisx->shape.rot.y = thisx->world.rot.y = thisx->yawTowardsPlayer;
|
||||
if(((thisx->bgCheckFlags & 8) && (angleToWall < 0x2EE0)) || (bomb->id == ACTOR_EN_BOM_CHU))
|
||||
if(((thisx->bgCheckFlags & BG_STATE_3) && (angleToWall < 0x2EE0)) || (bomb->id == ACTOR_EN_BOM_CHU))
|
||||
{
|
||||
if((bomb->id == ACTOR_EN_BOM_CHU) && (Actor_WorldDistXYZToActor(thisx, bomb) < 80.0f) && ((s16)(thisx->shape.rot.y - (bomb->world.rot.y - 0x8000)) < 0x3E80))
|
||||
{
|
||||
|
@ -385,7 +385,7 @@ void EnGeldB_SetupWait(EnGeldB* pthis)
|
|||
pthis->timer = 10;
|
||||
pthis->invisible = true;
|
||||
pthis->action = GELDB_WAIT;
|
||||
pthis->actor.bgCheckFlags &= ~3;
|
||||
pthis->actor.bgCheckFlags &= ~(BG_STATE_0 | BG_STATE_1);
|
||||
pthis->actor.gravity = -2.0f;
|
||||
pthis->actor.flags &= ~ACTOR_FLAG_0;
|
||||
EnGeldB_SetupAction(pthis, EnGeldB_Wait);
|
||||
|
@ -404,14 +404,14 @@ void EnGeldB_Wait(EnGeldB* pthis, GlobalContext* globalCtx)
|
|||
pthis->actor.shape.shadowScale = 90.0f;
|
||||
func_800F5ACC(NA_BGM_MINI_BOSS);
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_RIZA_DOWN);
|
||||
pthis->skelAnime.playSpeed = 1.0f;
|
||||
pthis->actor.world.pos.y = pthis->actor.floorHeight;
|
||||
pthis->actor.flags |= ACTOR_FLAG_0;
|
||||
pthis->actor.focus.pos = pthis->actor.world.pos;
|
||||
pthis->actor.bgCheckFlags &= ~2;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_1;
|
||||
pthis->actor.velocity.y = 0.0f;
|
||||
Actor_SpawnFloorDustRing(globalCtx, &pthis->actor, &pthis->leftFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
|
||||
Actor_SpawnFloorDustRing(globalCtx, &pthis->actor, &pthis->rightFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
|
||||
|
@ -796,9 +796,9 @@ void EnGeldB_Circle(EnGeldB* pthis, GlobalContext* globalCtx)
|
|||
pthis->actor.speedXZ = 8.0f;
|
||||
}
|
||||
}
|
||||
if((pthis->actor.bgCheckFlags & 8) || !Actor_TestFloorInDirection(&pthis->actor, globalCtx, pthis->actor.speedXZ, pthis->actor.shape.rot.y + 0x3E80))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) || !Actor_TestFloorInDirection(&pthis->actor, globalCtx, pthis->actor.speedXZ, pthis->actor.shape.rot.y + 0x3E80))
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
if(pthis->actor.speedXZ >= 0.0f)
|
||||
{
|
||||
|
@ -929,9 +929,9 @@ void EnGeldB_SpinDodge(EnGeldB* pthis, GlobalContext* globalCtx)
|
|||
s32 nextKeyFrame;
|
||||
|
||||
pthis->actor.world.rot.y = pthis->actor.yawTowardsPlayer + 0x3A98;
|
||||
if((pthis->actor.bgCheckFlags & 8) || !Actor_TestFloorInDirection(&pthis->actor, globalCtx, pthis->actor.speedXZ, pthis->actor.shape.rot.y + 0x3E80))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) || !Actor_TestFloorInDirection(&pthis->actor, globalCtx, pthis->actor.speedXZ, pthis->actor.shape.rot.y + 0x3E80))
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
if(pthis->actor.speedXZ >= 0.0f)
|
||||
{
|
||||
|
@ -1250,7 +1250,7 @@ void EnGeldB_RollBack(EnGeldB* pthis, GlobalContext* globalCtx)
|
|||
|
||||
void EnGeldB_SetupStunned(EnGeldB* pthis)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
}
|
||||
|
@ -1269,11 +1269,11 @@ void EnGeldB_SetupStunned(EnGeldB* pthis)
|
|||
|
||||
void EnGeldB_Stunned(EnGeldB* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
if(pthis->actor.speedXZ < 0.0f)
|
||||
{
|
||||
|
@ -1281,7 +1281,7 @@ void EnGeldB_Stunned(EnGeldB* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
pthis->invisible = false;
|
||||
}
|
||||
if((pthis->actor.colorFilterTimer == 0) && (pthis->actor.bgCheckFlags & 1))
|
||||
if((pthis->actor.colorFilterTimer == 0) && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
if(pthis->actor.colChkInfo.health == 0)
|
||||
{
|
||||
|
@ -1297,7 +1297,7 @@ void EnGeldB_Stunned(EnGeldB* pthis, GlobalContext* globalCtx)
|
|||
void EnGeldB_SetupDamaged(EnGeldB* pthis)
|
||||
{
|
||||
Animation_MorphToPlayOnce(&pthis->skelAnime, &gGerudoRedDamageAnim, -4.0f);
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->invisible = false;
|
||||
pthis->actor.speedXZ = -4.0f;
|
||||
|
@ -1317,11 +1317,11 @@ void EnGeldB_Damaged(EnGeldB* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
s16 angleToWall;
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
if(pthis->actor.speedXZ < 0.0f)
|
||||
{
|
||||
|
@ -1330,10 +1330,10 @@ void EnGeldB_Damaged(EnGeldB* pthis, GlobalContext* globalCtx)
|
|||
pthis->invisible = false;
|
||||
}
|
||||
Math_SmoothStepToS(&pthis->actor.shape.rot.y, pthis->actor.yawTowardsPlayer, 1, 0x1194, 0);
|
||||
if(!EnGeldB_DodgeRanged(globalCtx, pthis) && !EnGeldB_ReactToPlayer(globalCtx, pthis, 0) && SkelAnime_Update(&pthis->skelAnime) && (pthis->actor.bgCheckFlags & 1))
|
||||
if(!EnGeldB_DodgeRanged(globalCtx, pthis) && !EnGeldB_ReactToPlayer(globalCtx, pthis, 0) && SkelAnime_Update(&pthis->skelAnime) && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
angleToWall = pthis->actor.wallYaw - pthis->actor.shape.rot.y;
|
||||
if((pthis->actor.bgCheckFlags & 8) && (ABS(angleToWall) < 0x2EE0) && (pthis->actor.xzDistToPlayer < 90.0f))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) && (ABS(angleToWall) < 0x2EE0) && (pthis->actor.xzDistToPlayer < 90.0f))
|
||||
{
|
||||
EnGeldB_SetupJump(pthis);
|
||||
}
|
||||
|
@ -1374,7 +1374,7 @@ void EnGeldB_Jump(EnGeldB* pthis, GlobalContext* globalCtx)
|
|||
func_800355B8(globalCtx, &pthis->leftFootPos);
|
||||
func_800355B8(globalCtx, &pthis->rightFootPos);
|
||||
}
|
||||
if(SkelAnime_Update(&pthis->skelAnime) && (pthis->actor.bgCheckFlags & 3))
|
||||
if(SkelAnime_Update(&pthis->skelAnime) && (pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_1)))
|
||||
{
|
||||
pthis->actor.world.rot.y = pthis->actor.shape.rot.y = pthis->actor.yawTowardsPlayer;
|
||||
pthis->actor.shape.rot.x = 0;
|
||||
|
@ -1537,9 +1537,9 @@ void EnGeldB_Sidestep(EnGeldB* pthis, GlobalContext* globalCtx)
|
|||
pthis->actor.speedXZ -= 0.125f;
|
||||
}
|
||||
|
||||
if((pthis->actor.bgCheckFlags & 8) || !Actor_TestFloorInDirection(&pthis->actor, globalCtx, pthis->actor.speedXZ, pthis->actor.shape.rot.y + 0x3E80))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) || !Actor_TestFloorInDirection(&pthis->actor, globalCtx, pthis->actor.speedXZ, pthis->actor.shape.rot.y + 0x3E80))
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
if(pthis->actor.speedXZ >= 0.0f)
|
||||
{
|
||||
|
@ -1663,7 +1663,7 @@ void EnGeldB_SetupDefeated(EnGeldB* pthis)
|
|||
{
|
||||
Animation_MorphToPlayOnce(&pthis->skelAnime, &gGerudoRedDefeatAnim, -4.0f);
|
||||
pthis->actor.world.rot.y = pthis->actor.shape.rot.y = pthis->actor.yawTowardsPlayer;
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->invisible = false;
|
||||
pthis->actor.speedXZ = -6.0f;
|
||||
|
@ -1680,11 +1680,11 @@ void EnGeldB_SetupDefeated(EnGeldB* pthis)
|
|||
|
||||
void EnGeldB_Defeated(EnGeldB* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
Math_SmoothStepToF(&pthis->actor.speedXZ, 0.0f, 1.0f, 0.5f, 0.0f);
|
||||
pthis->invisible = false;
|
||||
|
|
|
@ -680,7 +680,7 @@ s32 EnGo_SpawnDust(EnGo* pthis, u8 initialTimer, f32 scale, f32 scaleStep, s32 n
|
|||
|
||||
s32 EnGo_IsRollingOnGround(EnGo* pthis, s16 unkArg1, f32 unkArg2)
|
||||
{
|
||||
if((pthis->actor.bgCheckFlags & 1) == 0 || pthis->actor.velocity.y > 0.0f)
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) == 0 || pthis->actor.velocity.y > 0.0f)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1189,7 +1189,7 @@ s32 EnGo2_IsWakingUp(EnGo2* pthis)
|
|||
|
||||
s32 EnGo2_IsRollingOnGround(EnGo2* pthis, s16 arg1, f32 arg2, s16 arg3)
|
||||
{
|
||||
if((pthis->actor.bgCheckFlags & 1) == 0 || pthis->actor.velocity.y > 0.0f)
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) == 0 || pthis->actor.velocity.y > 0.0f)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ void EnGoma_EggFallToGround(EnGoma* pthis, GlobalContext* globalCtx)
|
|||
switch(pthis->hatchState)
|
||||
{
|
||||
case 0:
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{ // floor
|
||||
if(pthis->actor.params < 6)
|
||||
{
|
||||
|
@ -310,7 +310,7 @@ void EnGoma_EggFallToGround(EnGoma* pthis, GlobalContext* globalCtx)
|
|||
break;
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
Math_ApproachZeroF(&pthis->actor.speedXZ, 0.2f, 0.05f);
|
||||
}
|
||||
|
@ -407,7 +407,7 @@ void EnGoma_Hurt(EnGoma* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
SkelAnime_Update(&pthis->skelanime);
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
Math_ApproachZeroF(&pthis->actor.speedXZ, 1.0f, 2.0f);
|
||||
}
|
||||
|
@ -448,7 +448,7 @@ void EnGoma_Die(EnGoma* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
SkelAnime_Update(&pthis->skelanime);
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
Math_ApproachZeroF(&pthis->actor.speedXZ, 1.0f, 2.0f);
|
||||
}
|
||||
|
@ -565,7 +565,7 @@ void EnGoma_Land(EnGoma* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
SkelAnime_Update(&pthis->skelanime);
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
Math_ApproachZeroF(&pthis->actor.speedXZ, 1.0f, 2.0f);
|
||||
}
|
||||
|
@ -597,7 +597,7 @@ void EnGoma_Jump(EnGoma* pthis, GlobalContext* globalCtx)
|
|||
SkelAnime_Update(&pthis->skelanime);
|
||||
Math_ApproachF(&pthis->actor.speedXZ, 10.0f, 0.5f, 5.0f);
|
||||
|
||||
if(pthis->actor.velocity.y <= 0.0f && (pthis->actor.bgCheckFlags & 1))
|
||||
if(pthis->actor.velocity.y <= 0.0f && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
EnGoma_SetupLand(pthis);
|
||||
if(pthis->actor.params < 6)
|
||||
|
@ -644,7 +644,7 @@ void EnGoma_ChasePlayer(EnGoma* pthis, GlobalContext* globalCtx)
|
|||
Math_ApproachS(&pthis->actor.world.rot.y, pthis->actor.yawTowardsPlayer, 3, 2000);
|
||||
Math_ApproachS(&pthis->actor.shape.rot.y, pthis->actor.world.rot.y, 2, 3000);
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.velocity.y = 0.0f;
|
||||
}
|
||||
|
@ -681,7 +681,7 @@ void EnGoma_Stunned(EnGoma* pthis, GlobalContext* globalCtx)
|
|||
SkelAnime_Update(&pthis->skelanime);
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.velocity.y = 0.0f;
|
||||
Math_ApproachZeroF(&pthis->actor.speedXZ, 0.5f, 2.0f);
|
||||
|
@ -1034,7 +1034,7 @@ void EnGoma_BossLimb(EnGoma* pthis, GlobalContext* globalCtx)
|
|||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->actor, 50.0f, 50.0f, 100.0f, 4);
|
||||
pthis->actor.world.pos.y += 5.0f;
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.velocity.y = 0.0f;
|
||||
}
|
||||
|
|
|
@ -748,7 +748,7 @@ void EnGoroiwa_SetupMoveAndFallToGround(EnGoroiwa* pthis)
|
|||
void EnGoroiwa_MoveAndFallToGround(EnGoroiwa* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
EnGoroiwa_MoveAndFall(pthis, globalCtx);
|
||||
if((pthis->actor.bgCheckFlags & 1) && pthis->actor.velocity.y < 0.0f)
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) && pthis->actor.velocity.y < 0.0f)
|
||||
{
|
||||
if((pthis->stateFlags & ENGOROIWA_PLAYER_IN_THE_WAY) && (pthis->actor.home.rot.z & 1) == 1)
|
||||
{
|
||||
|
|
|
@ -441,7 +441,7 @@ void func_80A4ED34(EnGs* pthis, GlobalContext* globalCtx)
|
|||
if(pthis->unk_19F == 4)
|
||||
{
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->actor, 20.0f, 20.0f, 60.0f, 3);
|
||||
if(pthis->actor.bgCheckFlags & 0x18)
|
||||
if(pthis->actor.bgCheckFlags & (BG_STATE_3 | BG_STATE_4))
|
||||
{
|
||||
bomb2Pos.x = pthis->actor.world.pos.x;
|
||||
bomb2Pos.y = pthis->actor.world.pos.y;
|
||||
|
|
|
@ -431,11 +431,11 @@ void EnHintnuts_Run(EnHintnuts* pthis, GlobalContext* globalCtx)
|
|||
Math_StepToF(&pthis->actor.speedXZ, 7.5f, 1.0f);
|
||||
if(Math_SmoothStepToS(&pthis->actor.world.rot.y, pthis->unk_196, 1, 0xE38, 0xB6) == 0)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 0x20)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_5)
|
||||
{
|
||||
pthis->unk_196 = Actor_WorldYawTowardPoint(&pthis->actor, &pthis->actor.home.pos);
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 8)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->unk_196 = pthis->actor.wallYaw;
|
||||
}
|
||||
|
@ -504,7 +504,7 @@ void EnHintnuts_Leave(EnHintnuts* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_NUTS_WALK);
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
temp_a1 = pthis->actor.wallYaw;
|
||||
}
|
||||
|
|
|
@ -501,7 +501,7 @@ void EnHonotrap_FlameChase(EnHonotrap* pthis, GlobalContext* globalCtx)
|
|||
pthis->actor.velocity.y *= 0.1f;
|
||||
EnHonotrap_SetupFlameVanish(pthis);
|
||||
}
|
||||
else if((pthis->actor.bgCheckFlags & 8) || (pthis->timer <= 0))
|
||||
else if((pthis->actor.bgCheckFlags & BG_STATE_3) || (pthis->timer <= 0))
|
||||
{
|
||||
EnHonotrap_SetupFlameVanish(pthis);
|
||||
}
|
||||
|
|
|
@ -3660,7 +3660,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
|
||||
// void 0 trick required to match, but is surely not real. revisit at a later time
|
||||
if(pthis->actor.bgCheckFlags & 8 && Math_CosS(pthis->actor.wallYaw - ((void)0, pthis->actor.world).rot.y) < -0.3f)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3 && Math_CosS(pthis->actor.wallYaw - ((void)0, pthis->actor.world).rot.y) < -0.3f)
|
||||
{
|
||||
if(pthis->actor.speedXZ > 4.0f)
|
||||
{
|
||||
|
|
|
@ -441,7 +441,7 @@ void EnHorseNormal_Wander(EnHorseNormal* pthis, GlobalContext* globalCtx)
|
|||
pthis->actor.speedXZ = 8.0f;
|
||||
phi_t0 = 6;
|
||||
}
|
||||
if(Rand_ZeroOne() < 0.1f || (pthis->unk_21E == 0 && ((pthis->actor.bgCheckFlags & 8) || (pthis->bodyCollider.base.ocFlags1 & OC1_HIT) || (pthis->headCollider.base.ocFlags1 & OC1_HIT))))
|
||||
if(Rand_ZeroOne() < 0.1f || (pthis->unk_21E == 0 && ((pthis->actor.bgCheckFlags & BG_STATE_3) || (pthis->bodyCollider.base.ocFlags1 & OC1_HIT) || (pthis->headCollider.base.ocFlags1 & OC1_HIT))))
|
||||
{
|
||||
pthis->unk_21E += (Rand_ZeroOne() * 30.0f) - 15.0f;
|
||||
if(pthis->unk_21E > 50)
|
||||
|
|
|
@ -248,7 +248,7 @@ void EnIceHono_SetupActionDroppedFlame(EnIceHono* pthis)
|
|||
|
||||
void EnIceHono_DropFlame(EnIceHono* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
u32 bgFlag = pthis->actor.bgCheckFlags & 1;
|
||||
u32 bgFlag = pthis->actor.bgCheckFlags & BG_STATE_0;
|
||||
|
||||
Math_StepToF(&pthis->actor.scale.x, 0.0017f, 0.00008f);
|
||||
pthis->actor.scale.z = pthis->actor.scale.x;
|
||||
|
|
|
@ -440,7 +440,7 @@ void func_80A74BA4(EnIk* pthis, GlobalContext* globalCtx)
|
|||
sp2E = 9;
|
||||
}
|
||||
temp_a1 = pthis->actor.wallYaw - pthis->actor.shape.rot.y;
|
||||
if((pthis->actor.bgCheckFlags & 8) && (ABS(temp_a1) >= 0x4000))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) && (ABS(temp_a1) >= 0x4000))
|
||||
{
|
||||
temp_a1 = (pthis->actor.yawTowardsPlayer > 0) ? pthis->actor.wallYaw - 0x4000 : pthis->actor.wallYaw + 0x4000;
|
||||
Math_SmoothStepToS(&pthis->actor.world.rot.y, temp_a1, 1, phi_a3, 0);
|
||||
|
|
|
@ -296,11 +296,11 @@ void func_80A7C3F4(EnInsect* pthis, GlobalContext* globalCtx)
|
|||
func_80A7C598(pthis);
|
||||
}
|
||||
|
||||
if(((pthis->unk_314 & 4) && pthis->unk_31C <= 0) || ((sp2E == 2 || sp2E == 3) && (pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & 1) && D_80A7DEB8 >= 4))
|
||||
if(((pthis->unk_314 & 4) && pthis->unk_31C <= 0) || ((sp2E == 2 || sp2E == 3) && (pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & BG_STATE_0) && D_80A7DEB8 >= 4))
|
||||
{
|
||||
func_80A7CBC8(pthis);
|
||||
}
|
||||
else if((pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & 0x40))
|
||||
else if((pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & BG_STATE_6))
|
||||
{
|
||||
func_80A7CE60(pthis);
|
||||
}
|
||||
|
@ -348,11 +348,11 @@ void func_80A7C5EC(EnInsect* pthis, GlobalContext* globalCtx)
|
|||
func_80A7C3A0(pthis);
|
||||
}
|
||||
|
||||
if(((pthis->unk_314 & 4) && pthis->unk_31C <= 0) || ((sp34 == 2 || sp34 == 3) && (pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & 1) && D_80A7DEB8 >= 4))
|
||||
if(((pthis->unk_314 & 4) && pthis->unk_31C <= 0) || ((sp34 == 2 || sp34 == 3) && (pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & BG_STATE_0) && D_80A7DEB8 >= 4))
|
||||
{
|
||||
func_80A7CBC8(pthis);
|
||||
}
|
||||
else if((pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & 0x40))
|
||||
else if((pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & BG_STATE_6))
|
||||
{
|
||||
func_80A7CE60(pthis);
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ void func_80A7C86C(EnInsect* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
func_80A7C3A0(pthis);
|
||||
}
|
||||
else if((pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & 0x40))
|
||||
else if((pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & BG_STATE_6))
|
||||
{
|
||||
func_80A7CE60(pthis);
|
||||
}
|
||||
|
@ -606,7 +606,7 @@ void func_80A7CEC0(EnInsect* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
func_80A7D1F4(pthis);
|
||||
}
|
||||
else if(!(pthis->actor.bgCheckFlags & 0x40))
|
||||
else if(!(pthis->actor.bgCheckFlags & BG_STATE_6))
|
||||
{
|
||||
if(pthis->unk_314 & 0x10)
|
||||
{
|
||||
|
@ -764,7 +764,7 @@ void func_80A7D460(EnInsect* pthis, GlobalContext* globalCtx)
|
|||
|
||||
Actor_SetScale(&pthis->actor, CLAMP_MAX(thisTemp->actor.scale.x + 0.0008f, 0.01f));
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
Math_SmoothStepToF(&pthis->actor.speedXZ, pthis->unk_324, 0.1f, 0.5f, 0.0f);
|
||||
Math_ScaledStepToS(&pthis->actor.world.rot.y, pthis->unk_328, 2000);
|
||||
|
@ -801,7 +801,7 @@ void func_80A7D460(EnInsect* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
|
||||
SkelAnime_Update(&pthis->skelAnime);
|
||||
if(!(pthis->unk_314 & 0x40) && (pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & 1))
|
||||
if(!(pthis->unk_314 & 0x40) && (pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_MUSI_LAND);
|
||||
pthis->unk_314 |= 0x40;
|
||||
|
@ -826,7 +826,7 @@ void func_80A7D460(EnInsect* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
}
|
||||
|
||||
if((pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & 0x40))
|
||||
if((pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & BG_STATE_6))
|
||||
{
|
||||
func_80A7CE60(pthis);
|
||||
}
|
||||
|
@ -836,7 +836,7 @@ void func_80A7D460(EnInsect* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
func_80A7CBC8(pthis);
|
||||
}
|
||||
else if(pthis->unk_31A <= 0 || pthis->unk_31C <= 0 || ((pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & 1) && D_80A7DEB8 >= 4 && (sp3A == 2 || sp3A == 3)))
|
||||
else if(pthis->unk_31A <= 0 || pthis->unk_31C <= 0 || ((pthis->unk_314 & 1) && (pthis->actor.bgCheckFlags & BG_STATE_0) && D_80A7DEB8 >= 4 && (sp3A == 2 || sp3A == 3)))
|
||||
{
|
||||
func_80A7CBC8(pthis);
|
||||
}
|
||||
|
@ -902,7 +902,7 @@ void EnInsect_Update(Actor* thisx, GlobalContext* globalCtx)
|
|||
{
|
||||
if(pthis->unk_314 & 1)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
func_80A7C058(pthis);
|
||||
}
|
||||
|
|
|
@ -165,13 +165,13 @@ void EnIshi_SpawnFragmentsSmall(EnIshi* pthis, GlobalContext* globalCtx)
|
|||
pos.y = pthis->actor.world.pos.y + (Rand_ZeroOne() * 5.0f) + 5.0f;
|
||||
pos.z = pthis->actor.world.pos.z + (Rand_ZeroOne() - 0.5f) * 8.0f;
|
||||
Math_Vec3f_Copy(&velocity, &pthis->actor.velocity);
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
velocity.x *= 0.8f;
|
||||
velocity.y *= -0.8f;
|
||||
velocity.z *= 0.8f;
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 8)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
velocity.x *= -0.8f;
|
||||
velocity.y *= 0.8f;
|
||||
|
@ -211,13 +211,13 @@ void EnIshi_SpawnFragmentsLarge(EnIshi* pthis, GlobalContext* globalCtx)
|
|||
pos.y = pthis->actor.world.pos.y + (Rand_ZeroOne() * 40.0f) + 5.0f;
|
||||
pos.z = pthis->actor.world.pos.z + (Math_CosS(angle) * rand);
|
||||
Math_Vec3f_Copy(&velocity, &thisx->velocity);
|
||||
if(thisx->bgCheckFlags & 1)
|
||||
if(thisx->bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
velocity.x *= 0.9f;
|
||||
velocity.y *= -0.8f;
|
||||
velocity.z *= 0.9f;
|
||||
}
|
||||
else if(thisx->bgCheckFlags & 8)
|
||||
else if(thisx->bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
velocity.x *= -0.9f;
|
||||
velocity.y *= 0.8f;
|
||||
|
@ -251,13 +251,13 @@ void EnIshi_SpawnDustSmall(EnIshi* pthis, GlobalContext* globalCtx)
|
|||
Vec3f pos;
|
||||
|
||||
Math_Vec3f_Copy(&pos, &pthis->actor.world.pos);
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pos.x += 2.0f * pthis->actor.velocity.x;
|
||||
pos.y -= 2.0f * pthis->actor.velocity.y;
|
||||
pos.z += 2.0f * pthis->actor.velocity.z;
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 8)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pos.x -= 2.0f * pthis->actor.velocity.x;
|
||||
pos.y += 2.0f * pthis->actor.velocity.y;
|
||||
|
@ -271,13 +271,13 @@ void EnIshi_SpawnDustLarge(EnIshi* pthis, GlobalContext* globalCtx)
|
|||
Vec3f pos;
|
||||
|
||||
Math_Vec3f_Copy(&pos, &pthis->actor.world.pos);
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pos.x += 2.0f * pthis->actor.velocity.x;
|
||||
pos.y -= 2.0f * pthis->actor.velocity.y;
|
||||
pos.z += 2.0f * pthis->actor.velocity.z;
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 8)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pos.x -= 2.0f * pthis->actor.velocity.x;
|
||||
pos.y += 2.0f * pthis->actor.velocity.y;
|
||||
|
@ -493,11 +493,11 @@ void EnIshi_Fly(EnIshi* pthis, GlobalContext* globalCtx)
|
|||
s32 quakeIdx;
|
||||
Vec3f contactPos;
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 9)
|
||||
if(pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_3))
|
||||
{
|
||||
EnIshi_DropCollectible(pthis, globalCtx);
|
||||
sFragmentSpawnFuncs[type](pthis, globalCtx);
|
||||
if(!(pthis->actor.bgCheckFlags & 0x20))
|
||||
if(!(pthis->actor.bgCheckFlags & BG_STATE_5))
|
||||
{
|
||||
Audio_PlaySoundAtPosition(globalCtx, &pthis->actor.world.pos, sBreakSoundDurations[type], sBreakSounds[type]);
|
||||
sDustSpawnFuncs[type](pthis, globalCtx);
|
||||
|
@ -513,7 +513,7 @@ void EnIshi_Fly(EnIshi* pthis, GlobalContext* globalCtx)
|
|||
Actor_Kill(&pthis->actor);
|
||||
return;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 0x40)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_6)
|
||||
{
|
||||
contactPos.x = pthis->actor.world.pos.x;
|
||||
contactPos.y = pthis->actor.world.pos.y + pthis->actor.yDistToWater;
|
||||
|
@ -535,7 +535,7 @@ void EnIshi_Fly(EnIshi* pthis, GlobalContext* globalCtx)
|
|||
sRotSpeedX >>= 2;
|
||||
sRotSpeedY >>= 2;
|
||||
Audio_PlaySoundAtPosition(globalCtx, &pthis->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
|
||||
pthis->actor.bgCheckFlags &= ~0x40;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_6;
|
||||
}
|
||||
Math_StepToF(&pthis->actor.shape.yOffset, 0.0f, 2.0f);
|
||||
EnIshi_Fall(pthis);
|
||||
|
|
|
@ -206,7 +206,7 @@ void EnJs_Update(Actor* thisx, GlobalContext* globalCtx)
|
|||
Actor_MoveForward(&pthis->actor);
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
if(SurfaceType_GetSfx(&globalCtx->colCtx, pthis->actor.floorPoly, pthis->actor.floorBgId) == 1)
|
||||
{
|
||||
|
|
|
@ -156,7 +156,7 @@ void func_80A8F320(EnKakasi* pthis, GlobalContext* globalCtx, s16 arg)
|
|||
if(pthis->unk_19A != 0)
|
||||
{
|
||||
pthis->actor.gravity = -1.0f;
|
||||
if(pthis->unk_19A == 8 && (pthis->actor.bgCheckFlags & 1))
|
||||
if(pthis->unk_19A == 8 && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->actor.velocity.y = 3.0f;
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_IT_KAKASHI_JUMP);
|
||||
|
|
|
@ -159,7 +159,7 @@ void func_80A90EBC(EnKakasi3* pthis, GlobalContext* globalCtx, s32 arg)
|
|||
if(pthis->unk_19A != 0)
|
||||
{
|
||||
pthis->actor.gravity = -1.0f;
|
||||
if(pthis->unk_19A == 8 && (pthis->actor.bgCheckFlags & 1))
|
||||
if(pthis->unk_19A == 8 && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->actor.velocity.y = 3.0f;
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_IT_KAKASHI_JUMP);
|
||||
|
|
|
@ -506,7 +506,7 @@ void EnKanban_Update(Actor* thisx, GlobalContext* globalCtx2)
|
|||
pthis->actor.yDistToWater = tempYDistToWater;
|
||||
|
||||
osSyncPrintf(VT_RST);
|
||||
onGround = (pthis->actor.bgCheckFlags & 1);
|
||||
onGround = (pthis->actor.bgCheckFlags & BG_STATE_0);
|
||||
if(pthis->spinXFlag)
|
||||
{
|
||||
pthis->spinRot.x += pthis->spinVel.x;
|
||||
|
@ -555,12 +555,12 @@ void EnKanban_Update(Actor* thisx, GlobalContext* globalCtx2)
|
|||
{
|
||||
pthis->spinVel.z = -0xC00;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->actor.speedXZ *= -0.5f;
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EV_WOODPLATE_BOUND);
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 0x40)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_6)
|
||||
{
|
||||
pthis->actionState = ENKANBAN_WATER;
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EV_BOMB_DROP_WATER);
|
||||
|
@ -695,7 +695,7 @@ void EnKanban_Update(Actor* thisx, GlobalContext* globalCtx2)
|
|||
pthis->spinVel.y = pthis->actor.speedXZ * -1000.0f;
|
||||
}
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
}
|
||||
|
@ -703,7 +703,7 @@ void EnKanban_Update(Actor* thisx, GlobalContext* globalCtx2)
|
|||
if(pthis->actor.speedXZ != 0.0f)
|
||||
{
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->actor, 10.0f, 10.0f, 50.0f, 5);
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->actor.speedXZ *= -0.5f;
|
||||
if(pthis->spinVel.y > 0)
|
||||
|
|
|
@ -376,7 +376,7 @@ void EnKarebaba_Dying(EnKarebaba* pthis, GlobalContext* globalCtx)
|
|||
Math_ScaledStepToS(&pthis->actor.shape.rot.x, 0x4800, 0x71C);
|
||||
EffectSsHahen_SpawnBurst(globalCtx, &pthis->actor.world.pos, 3.0f, 0, 12, 5, 1, HAHEN_OBJECT_DEFAULT, 10, NULL);
|
||||
|
||||
if(pthis->actor.scale.x > 0.005f && ((pthis->actor.bgCheckFlags & 2) || (pthis->actor.bgCheckFlags & 8)))
|
||||
if(pthis->actor.scale.x > 0.005f && ((pthis->actor.bgCheckFlags & BG_STATE_1) || (pthis->actor.bgCheckFlags & BG_STATE_3)))
|
||||
{
|
||||
pthis->actor.scale.x = pthis->actor.scale.y = pthis->actor.scale.z = 0.0f;
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
|
@ -384,7 +384,7 @@ void EnKarebaba_Dying(EnKarebaba* pthis, GlobalContext* globalCtx)
|
|||
EffectSsHahen_SpawnBurst(globalCtx, &pthis->actor.world.pos, 3.0f, 0, 12, 5, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_DODO_M_GND);
|
||||
pthis->actor.params = 1;
|
||||
|
|
|
@ -423,9 +423,9 @@ void EnKusa_Fall(EnKusa* pthis, GlobalContext* globalCtx)
|
|||
s32 pad;
|
||||
Vec3f contactPos;
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 0xB)
|
||||
if(pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_1 | BG_STATE_3))
|
||||
{
|
||||
if(!(pthis->actor.bgCheckFlags & 0x20))
|
||||
if(!(pthis->actor.bgCheckFlags & BG_STATE_5))
|
||||
{
|
||||
Audio_PlaySoundAtPosition(globalCtx, &pthis->actor.world.pos, 20, NA_SE_EV_PLANT_BROKEN);
|
||||
}
|
||||
|
@ -445,7 +445,7 @@ void EnKusa_Fall(EnKusa* pthis, GlobalContext* globalCtx)
|
|||
return;
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 0x40)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_6)
|
||||
{
|
||||
contactPos.x = pthis->actor.world.pos.x;
|
||||
contactPos.y = pthis->actor.world.pos.y + pthis->actor.yDistToWater;
|
||||
|
@ -459,7 +459,7 @@ void EnKusa_Fall(EnKusa* pthis, GlobalContext* globalCtx)
|
|||
rotSpeedXtarget >>= 1;
|
||||
rotSpeedY >>= 1;
|
||||
rotSpeedYtarget >>= 1;
|
||||
pthis->actor.bgCheckFlags &= ~0x40;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_6;
|
||||
Audio_PlaySoundAtPosition(globalCtx, &pthis->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
|
||||
}
|
||||
|
||||
|
|
|
@ -89,27 +89,27 @@ void EnLightbox_Update(Actor* thisx, GlobalContext* globalCtx)
|
|||
{
|
||||
if(thisx->speedXZ)
|
||||
{
|
||||
if(thisx->bgCheckFlags & 8)
|
||||
if(thisx->bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
thisx->world.rot.y = (thisx->world.rot.y + thisx->wallYaw) - thisx->world.rot.y;
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_BOMB_BOUND, &thisx->projectedPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
thisx->speedXZ *= 0.7f;
|
||||
thisx->bgCheckFlags &= ~0x8;
|
||||
thisx->bgCheckFlags &= ~BG_STATE_3;
|
||||
}
|
||||
}
|
||||
|
||||
if((thisx->bgCheckFlags & 1) == 0)
|
||||
if((thisx->bgCheckFlags & BG_STATE_0) == 0)
|
||||
{
|
||||
Math_StepToF(&thisx->speedXZ, 0, IREG(57) / 100.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Math_StepToF(&thisx->speedXZ, 0, IREG(58) / 100.0f);
|
||||
if((thisx->bgCheckFlags & 2) && (thisx->velocity.y < IREG(59) / 100.0f))
|
||||
if((thisx->bgCheckFlags & BG_STATE_1) && (thisx->velocity.y < IREG(59) / 100.0f))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_BOMB_BOUND, &thisx->projectedPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
thisx->velocity.y *= IREG(60) / 100.0f;
|
||||
thisx->bgCheckFlags &= ~0x1;
|
||||
thisx->bgCheckFlags &= ~BG_STATE_0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -565,7 +565,7 @@ void EnMb_SetupSpearPatrolEndCharge(EnMb* pthis)
|
|||
{
|
||||
Animation_PlayOnce(&pthis->skelAnime, &gEnMbSpearSlowDownAnim);
|
||||
pthis->state = ENMB_STATE_ATTACK_END;
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
pthis->timer1 = 0;
|
||||
pthis->timer3 = 50;
|
||||
pthis->actor.speedXZ = -8.0f;
|
||||
|
@ -803,7 +803,7 @@ void EnMb_SpearPatrolEndCharge(EnMb* pthis, GlobalContext* globalCtx)
|
|||
func_8002F71C(globalCtx, &pthis->actor, 4.0f, pthis->actor.world.rot.y, 4.0f);
|
||||
}
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
Math_SmoothStepToF(&pthis->actor.speedXZ, 0.0f, 1.0f, 1.5f, 0.0f);
|
||||
|
||||
|
|
|
@ -425,7 +425,7 @@ void func_80AB6100(EnNiw* pthis, GlobalContext* globalCtx, s32 arg2)
|
|||
{
|
||||
pthis->timer4 = 3;
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.velocity.y = 3.5f;
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ void func_80AB6100(EnNiw* pthis, GlobalContext* globalCtx, s32 arg2)
|
|||
}
|
||||
if(arg2 == 1)
|
||||
{
|
||||
if(pthis->timer6 == 0 || pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->timer6 == 0 || pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->timer6 = 150;
|
||||
if(pthis->timer8 == 0)
|
||||
|
@ -493,7 +493,7 @@ void action_80AB6324(EnNiw* pthis, GlobalContext* globalCtx)
|
|||
|
||||
void action_80AB63A8(EnNiw* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 1 && pthis->actor.velocity.y < 0.0f)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0 && pthis->actor.velocity.y < 0.0f)
|
||||
{
|
||||
pthis->unk_2AC.x = pthis->unk_2B8.x = pthis->actor.world.pos.x;
|
||||
pthis->unk_2AC.y = pthis->unk_2B8.y = pthis->actor.world.pos.y;
|
||||
|
@ -650,7 +650,7 @@ void action_80AB6570(EnNiw* pthis, GlobalContext* globalCtx)
|
|||
else
|
||||
{
|
||||
pthis->timer4 = 4;
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
pthis->actor.velocity.y = 3.5f;
|
||||
|
@ -764,7 +764,7 @@ void func_80AB6D08(EnNiw* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
if(pthis->path == 0)
|
||||
{
|
||||
if(!(pthis->actor.bgCheckFlags & 1))
|
||||
if(!(pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -788,7 +788,7 @@ void func_80AB6D08(EnNiw* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->sfxTimer1 = 0;
|
||||
pthis->actor.velocity.y = 4.0f;
|
||||
|
@ -845,7 +845,7 @@ void action_bubbly_80AB6F04(EnNiw* pthis, GlobalContext* globalCtx)
|
|||
|
||||
pthis->actor.speedXZ = 2.0f;
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 0x20)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_5)
|
||||
{
|
||||
pthis->actor.gravity = 0.0f;
|
||||
|
||||
|
@ -860,7 +860,7 @@ void action_bubbly_80AB6F04(EnNiw* pthis, GlobalContext* globalCtx)
|
|||
pos.y += pthis->actor.yDistToWater;
|
||||
EffectSsGRipple_Spawn(globalCtx, &pos, 100, 500, 30);
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->actor.velocity.y = 10.0f;
|
||||
pthis->actor.speedXZ = 1.0f;
|
||||
|
@ -870,7 +870,7 @@ void action_bubbly_80AB6F04(EnNiw* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
pthis->actor.gravity = -2.0f;
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->actor.velocity.y = 10.0f;
|
||||
pthis->actor.speedXZ = 1.0f;
|
||||
|
@ -880,7 +880,7 @@ void action_bubbly_80AB6F04(EnNiw* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
pthis->actor.speedXZ = 4.0f;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.gravity = -2.0f;
|
||||
pthis->timer6 = 100;
|
||||
|
@ -1006,7 +1006,7 @@ void action_80AB7328(EnNiw* pthis, GlobalContext* globalCtx)
|
|||
|
||||
void action_jump(EnNiw* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->jumpY = (s16)Rand_ZeroFloat(3.99f) + 5;
|
||||
pthis->actionFunc = EnNiw_ResetAction;
|
||||
|
@ -1179,7 +1179,7 @@ void EnNiw_Update(Actor* thisx, GlobalContext* globalCtx)
|
|||
return;
|
||||
}
|
||||
|
||||
if(thisx->bgCheckFlags & 0x20 && thisx->yDistToWater > 15.0f && pthis->actionFunc != action_bubbly_80AB6F04 && thisx->params != 0xD && thisx->params != 0xE && thisx->params != 0xA)
|
||||
if(thisx->bgCheckFlags & BG_STATE_5 && thisx->yDistToWater > 15.0f && pthis->actionFunc != action_bubbly_80AB6F04 && thisx->params != 0xD && thisx->params != 0xE && thisx->params != 0xA)
|
||||
{
|
||||
thisx->velocity.y = 0.0f;
|
||||
thisx->gravity = 0.0f;
|
||||
|
|
|
@ -119,7 +119,7 @@ void func_80ABBBA8(EnNutsball* pthis, GlobalContext* globalCtx)
|
|||
|
||||
pthis->actor.home.rot.z += 0x2AA8;
|
||||
|
||||
if((pthis->actor.bgCheckFlags & 8) || (pthis->actor.bgCheckFlags & 1) || (pthis->collider.base.atFlags & AT_HIT) || (pthis->collider.base.acFlags & AC_HIT) || (pthis->collider.base.ocFlags1 & OC1_HIT))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) || (pthis->actor.bgCheckFlags & BG_STATE_0) || (pthis->collider.base.atFlags & AT_HIT) || (pthis->collider.base.acFlags & AC_HIT) || (pthis->collider.base.ocFlags1 & OC1_HIT))
|
||||
{
|
||||
// Checking if the player is using a shield that reflects projectiles
|
||||
// And if so, reflects the projectile on impact
|
||||
|
|
|
@ -282,13 +282,13 @@ void EnNy_TurnToStone(EnNy* pthis, GlobalContext* globalCtx)
|
|||
if(phi_f0 <= 0.25f)
|
||||
{
|
||||
phi_f0 = 0.25f;
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
if(!(pthis->unk_1F0 < pthis->actor.yDistToWater))
|
||||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_DODO_M_GND);
|
||||
}
|
||||
pthis->actor.bgCheckFlags &= ~2;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_1;
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
pthis->actor.world.rot.y = pthis->actor.shape.rot.y;
|
||||
func_80ABCE38(pthis);
|
||||
|
|
|
@ -570,13 +570,13 @@ void EnOkuta_ProjectileFly(EnOkuta* pthis, GlobalContext* globalCtx)
|
|||
pthis->actor.gravity = -1.0f;
|
||||
}
|
||||
pthis->actor.home.rot.z += 0x1554;
|
||||
if(pthis->actor.bgCheckFlags & 0x20)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_5)
|
||||
{
|
||||
pthis->actor.gravity = -1.0f;
|
||||
pthis->actor.speedXZ -= 0.1f;
|
||||
pthis->actor.speedXZ = CLAMP_MIN(pthis->actor.speedXZ, 1.0f);
|
||||
}
|
||||
if((pthis->actor.bgCheckFlags & 8) || (pthis->actor.bgCheckFlags & 1) || (pthis->collider.base.atFlags & AT_HIT) || pthis->collider.base.acFlags & AC_HIT || pthis->collider.base.ocFlags1 & OC1_HIT || pthis->actor.floorHeight == BGCHECK_Y_MIN)
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) || (pthis->actor.bgCheckFlags & BG_STATE_0) || (pthis->collider.base.atFlags & AT_HIT) || pthis->collider.base.acFlags & AC_HIT || pthis->collider.base.ocFlags1 & OC1_HIT || pthis->actor.floorHeight == BGCHECK_Y_MIN)
|
||||
{
|
||||
if((player->currentShield == PLAYER_SHIELD_DEKU || (player->currentShield == PLAYER_SHIELD_HYLIAN && LINK_IS_ADULT)) && pthis->collider.base.atFlags & AT_HIT && pthis->collider.base.atFlags & AT_TYPE_ENEMY &&
|
||||
pthis->collider.base.atFlags & AT_BOUNCED)
|
||||
|
@ -741,17 +741,17 @@ void EnOkuta_Update(Actor* thisx, GlobalContext* globalCtx2)
|
|||
Actor_MoveForward(&pthis->actor);
|
||||
Math_Vec3f_Copy(&sp38, &pthis->actor.world.pos);
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->actor, 10.0f, 15.0f, 30.0f, 5);
|
||||
if((pthis->actor.bgCheckFlags & 8) && SurfaceType_IsIgnoredByProjectiles(&globalCtx->colCtx, pthis->actor.wallPoly, pthis->actor.wallBgId))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) && SurfaceType_IsIgnoredByProjectiles(&globalCtx->colCtx, pthis->actor.wallPoly, pthis->actor.wallBgId))
|
||||
{
|
||||
sp34 = true;
|
||||
pthis->actor.bgCheckFlags &= ~8;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_3;
|
||||
}
|
||||
if((pthis->actor.bgCheckFlags & 1) && SurfaceType_IsIgnoredByProjectiles(&globalCtx->colCtx, pthis->actor.floorPoly, pthis->actor.floorBgId))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) && SurfaceType_IsIgnoredByProjectiles(&globalCtx->colCtx, pthis->actor.floorPoly, pthis->actor.floorBgId))
|
||||
{
|
||||
sp34 = true;
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
}
|
||||
if(sp34 && !(pthis->actor.bgCheckFlags & 9))
|
||||
if(sp34 && !(pthis->actor.bgCheckFlags & (BG_STATE_0 | BG_STATE_3)))
|
||||
{
|
||||
Math_Vec3f_Copy(&pthis->actor.world.pos, &sp38);
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ void func_80ACE13C(EnPart* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->actor, 5.0f, 15.0f, 0.0f, 0x1D);
|
||||
|
||||
if((pthis->actor.bgCheckFlags & 1) || (pthis->actor.world.pos.y <= pthis->actor.floorHeight))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) || (pthis->actor.world.pos.y <= pthis->actor.floorHeight))
|
||||
{
|
||||
pthis->action = 4;
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
|
@ -273,9 +273,9 @@ void EnPart_Update(Actor* thisx, GlobalContext* globalCtx)
|
|||
if(pthis->actor.params >= 0)
|
||||
{
|
||||
Math_SmoothStepToF(&pthis->actor.speedXZ, 0.0f, 1.0f, 0.5f, 0.0f);
|
||||
if(thisx->bgCheckFlags & 1)
|
||||
if(thisx->bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
thisx->bgCheckFlags &= ~1;
|
||||
thisx->bgCheckFlags &= ~BG_STATE_0;
|
||||
thisx->velocity.y = 6.0f;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -630,7 +630,7 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* pthis, GlobalContext* globalCtx)
|
|||
pthis->colQuad.base.acFlags = pthis->colQuad.base.acFlags & ~AC_BOUNCED;
|
||||
EnPeehat_SetStateAttackRecoil(pthis);
|
||||
}
|
||||
else if((pthis->colQuad.base.atFlags & AT_HIT) || (pthis->colCylinder.base.acFlags & AC_HIT) || (pthis->actor.bgCheckFlags & 1))
|
||||
else if((pthis->colQuad.base.atFlags & AT_HIT) || (pthis->colCylinder.base.acFlags & AC_HIT) || (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
pthis->colQuad.base.atFlags &= ~AT_HIT;
|
||||
|
@ -646,7 +646,7 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
pthis->unk2D4 = 40;
|
||||
}
|
||||
else if(pthis->colCylinder.base.acFlags & AC_HIT || pthis->actor.bgCheckFlags & 1)
|
||||
else if(pthis->colCylinder.base.acFlags & AC_HIT || pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
Vec3f zeroVec = {0, 0, 0};
|
||||
s32 i;
|
||||
|
@ -661,7 +661,7 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
if(&player->actor != pthis->colQuad.base.at || pthis->colCylinder.base.acFlags & AC_HIT)
|
||||
{
|
||||
if(!(pthis->actor.bgCheckFlags & 1))
|
||||
if(!(pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
EffectSsDeadSound_SpawnStationary(globalCtx, &pthis->actor.projectedPos, NA_SE_EN_PIHAT_SM_DEAD, 1, 1, 40);
|
||||
}
|
||||
|
|
|
@ -706,7 +706,7 @@ void EnPoField_SoulIdle(EnPoField* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
pthis->actionTimer--;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
EffectSsHahen_SpawnBurst(globalCtx, &pthis->actor.world.pos, 6.0f, 0, 1, 1, 15, OBJECT_PO_FIELD, 10, gPoeFieldLanternDL);
|
||||
func_80AD42B0(pthis);
|
||||
|
|
|
@ -713,7 +713,7 @@ void func_80ADA530(EnPoSisters* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
func_80AD9368(pthis);
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
Math_ScaledStepToS(&pthis->actor.world.rot.y, Actor_WorldYawTowardPoint(&pthis->actor, &pthis->actor.home.pos), 0x71C);
|
||||
}
|
||||
|
@ -865,7 +865,7 @@ void func_80ADAC70(EnPoSisters* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
pthis->unk_19A--;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
pthis->actor.world.rot.y = pthis->actor.shape.rot.y;
|
||||
pthis->unk_199 |= 2;
|
||||
|
|
|
@ -867,7 +867,7 @@ void EnPoh_Death(EnPoh* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
pthis->unk_198--;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
objId = (pthis->infoIdx == EN_POH_INFO_COMPOSER) ? OBJECT_PO_COMPOSER : OBJECT_POH;
|
||||
EffectSsHahen_SpawnBurst(globalCtx, &pthis->actor.world.pos, 6.0f, 0, 1, 1, 15, objId, 10, pthis->info->lanternDisplayList);
|
||||
|
|
|
@ -725,7 +725,7 @@ void func_80AE3A8C(EnRd* pthis)
|
|||
{
|
||||
Animation_MorphToPlayOnce(&pthis->skelAnime, &object_rd_Anim_0074F0, -6.0f);
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.speedXZ = -2.0f;
|
||||
}
|
||||
|
|
|
@ -282,7 +282,7 @@ void func_80AE5270(EnReeba* pthis, GlobalContext* globalCtx)
|
|||
pthis->actor.speedXZ = 0.0f;
|
||||
pthis->actionfunc = func_80AE5688;
|
||||
}
|
||||
else if((pthis->unk_272 == 0) || (pthis->actor.xzDistToPlayer < 30.0f) || (pthis->actor.xzDistToPlayer > 400.0f) || (pthis->actor.bgCheckFlags & 8))
|
||||
else if((pthis->unk_272 == 0) || (pthis->actor.xzDistToPlayer < 30.0f) || (pthis->actor.xzDistToPlayer > 400.0f) || (pthis->actor.bgCheckFlags & BG_STATE_3))
|
||||
{
|
||||
pthis->actionfunc = func_80AE5688;
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ void func_80AE53AC(EnReeba* pthis, GlobalContext* globalCtx)
|
|||
|
||||
surfaceType = func_80041D4C(&globalCtx->colCtx, pthis->actor.floorPoly, pthis->actor.floorBgId);
|
||||
|
||||
if(((surfaceType != 4) && (surfaceType != 7)) || (pthis->actor.xzDistToPlayer > 400.0f) || (pthis->actor.bgCheckFlags & 8))
|
||||
if(((surfaceType != 4) && (surfaceType != 7)) || (pthis->actor.xzDistToPlayer > 400.0f) || (pthis->actor.bgCheckFlags & BG_STATE_3))
|
||||
{
|
||||
pthis->actionfunc = func_80AE5688;
|
||||
}
|
||||
|
|
|
@ -1002,7 +1002,7 @@ void func_80AEC780(EnRu1* pthis, GlobalContext* globalCtx)
|
|||
s32 pad;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if((func_80AEC5FC(pthis, globalCtx)) && (!Gameplay_InCsMode(globalCtx)) && (!(player->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21))) && (player->actor.bgCheckFlags & 1))
|
||||
if((func_80AEC5FC(pthis, globalCtx)) && (!Gameplay_InCsMode(globalCtx)) && (!(player->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21))) && (player->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
globalCtx->csCtx.segment = &D_80AF0880;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
|
@ -1063,7 +1063,7 @@ void func_80AEC9C4(EnRu1* pthis)
|
|||
|
||||
void func_80AECA18(EnRu1* pthis)
|
||||
{
|
||||
if(!(pthis->actor.bgCheckFlags & 1))
|
||||
if(!(pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->action = 13;
|
||||
pthis->unk_26C = 0.0f;
|
||||
|
@ -1549,7 +1549,7 @@ void func_80AEDAE0(EnRu1* pthis, GlobalContext* globalCtx)
|
|||
|
||||
if(dynaPolyActor == NULL || dynaPolyActor->actor.id == ACTOR_EN_BOX)
|
||||
{
|
||||
pthis->actor.bgCheckFlags &= ~0x19;
|
||||
pthis->actor.bgCheckFlags &= ~(BG_STATE_0 | BG_STATE_3 | BG_STATE_4);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1565,7 +1565,7 @@ void func_80AEDB30(EnRu1* pthis, GlobalContext* globalCtx)
|
|||
s32 temp_a0;
|
||||
s32 phi_v1;
|
||||
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
velocityY = &pthis->actor.velocity.y;
|
||||
dynaPolyActor = DynaPoly_GetActor(&globalCtx->colCtx, pthis->actor.floorBgId);
|
||||
|
@ -1617,7 +1617,7 @@ void func_80AEDB30(EnRu1* pthis, GlobalContext* globalCtx)
|
|||
func_80AED4FC(pthis);
|
||||
}
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 0x10)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_4)
|
||||
{
|
||||
speedXZ = &pthis->actor.speedXZ;
|
||||
velocityY = &pthis->actor.velocity.y;
|
||||
|
@ -1635,7 +1635,7 @@ void func_80AEDB30(EnRu1* pthis, GlobalContext* globalCtx)
|
|||
func_80AED4FC(pthis);
|
||||
}
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
speedXZ = &pthis->actor.speedXZ;
|
||||
if(*speedXZ != 0.0f)
|
||||
|
@ -1812,7 +1812,7 @@ void func_80AEE2F8(EnRu1* pthis, GlobalContext* globalCtx)
|
|||
DynaPolyActor* dynaPolyActor;
|
||||
s32 floorBgId;
|
||||
|
||||
if((pthis->actor.bgCheckFlags & 1) && (pthis->actor.floorBgId != BGCHECK_SCENE))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) && (pthis->actor.floorBgId != BGCHECK_SCENE))
|
||||
{
|
||||
floorBgId = pthis->actor.floorBgId;
|
||||
dynaPolyActor = DynaPoly_GetActor(&globalCtx->colCtx, floorBgId);
|
||||
|
@ -1835,7 +1835,7 @@ s32 func_80AEE394(EnRu1* pthis, GlobalContext* globalCtx)
|
|||
DynaPolyActor* dynaPolyActor;
|
||||
s32 floorBgId;
|
||||
|
||||
if((pthis->actor.bgCheckFlags & 1) && pthis->actor.floorBgId != BGCHECK_SCENE)
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) && pthis->actor.floorBgId != BGCHECK_SCENE)
|
||||
{
|
||||
colCtx = &globalCtx->colCtx;
|
||||
floorBgId = pthis->actor.floorBgId; // necessary match, can't move pthis out of pthis block unfortunately
|
||||
|
@ -1866,7 +1866,7 @@ void func_80AEE488(EnRu1* pthis, GlobalContext* globalCtx)
|
|||
pthis->action = 31;
|
||||
func_80AED520(pthis, globalCtx);
|
||||
}
|
||||
else if((!func_80AEE394(pthis, globalCtx)) && (!(pthis->actor.bgCheckFlags & 1)))
|
||||
else if((!func_80AEE394(pthis, globalCtx)) && (!(pthis->actor.bgCheckFlags & BG_STATE_0)))
|
||||
{
|
||||
pthis->actor.minVelocityY = -((kREG(24) * 0.01f) + 6.8f);
|
||||
pthis->actor.gravity = -((kREG(23) * 0.01f) + 1.3f);
|
||||
|
@ -1878,7 +1878,7 @@ void func_80AEE568(EnRu1* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
if(!func_80AEE394(pthis, globalCtx))
|
||||
{
|
||||
if((pthis->actor.bgCheckFlags & 1) && (pthis->actor.speedXZ == 0.0f) && (pthis->actor.minVelocityY == 0.0f))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) && (pthis->actor.speedXZ == 0.0f) && (pthis->actor.minVelocityY == 0.0f))
|
||||
{
|
||||
func_80AEE02C(pthis);
|
||||
func_8002F580(&pthis->actor, globalCtx);
|
||||
|
@ -1997,7 +1997,7 @@ void func_80AEE7C4(EnRu1* pthis, GlobalContext* globalCtx)
|
|||
|
||||
s32 func_80AEEAC8(EnRu1* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
func_80AEE02C(pthis);
|
||||
func_8002F580(&pthis->actor, globalCtx);
|
||||
|
|
|
@ -299,13 +299,13 @@ void EnSb_TurnAround(EnSb* pthis, GlobalContext* globalCtx)
|
|||
void EnSb_Lunge(EnSb* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
Math_StepToF(&pthis->actor.speedXZ, 0.0f, 0.2f);
|
||||
if((pthis->actor.velocity.y <= -0.1f) || ((pthis->actor.bgCheckFlags & 2)))
|
||||
if((pthis->actor.velocity.y <= -0.1f) || ((pthis->actor.bgCheckFlags & BG_STATE_1)))
|
||||
{
|
||||
if(!(pthis->actor.yDistToWater > 0.0f))
|
||||
{
|
||||
Audio_PlayActorSound2(&pthis->actor, NA_SE_EN_DODO_M_GND);
|
||||
}
|
||||
pthis->actor.bgCheckFlags = pthis->actor.bgCheckFlags & ~2;
|
||||
pthis->actor.bgCheckFlags = pthis->actor.bgCheckFlags & ~BG_STATE_1;
|
||||
EnSb_SetupBounce(pthis);
|
||||
}
|
||||
}
|
||||
|
@ -341,9 +341,9 @@ void EnSb_Bounce(EnSb* pthis, GlobalContext* globalCtx)
|
|||
EnSb_SpawnBubbles(globalCtx, pthis);
|
||||
EnSb_SetupLunge(pthis);
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 1)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.bgCheckFlags &= ~2;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_1;
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
pthis->timer = 1;
|
||||
EnSb_SetupWaitClosed(pthis);
|
||||
|
@ -357,17 +357,17 @@ void EnSb_Cooldown(EnSb* pthis, GlobalContext* globalCtx)
|
|||
if(pthis->timer != 0)
|
||||
{
|
||||
pthis->timer--;
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
pthis->actionFunc = EnSb_WaitClosed;
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
}
|
||||
|
|
|
@ -382,7 +382,7 @@ void func_80AFD508(EnSkb* pthis, GlobalContext* globalCtx)
|
|||
|
||||
void EnSkb_SetupStunned(EnSkb* pthis)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
}
|
||||
|
@ -394,18 +394,18 @@ void EnSkb_SetupStunned(EnSkb* pthis)
|
|||
|
||||
void func_80AFD59C(EnSkb* pthis, GlobalContext* globalCtx)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
if(pthis->actor.speedXZ < 0.0f)
|
||||
{
|
||||
pthis->actor.speedXZ += 0.05f;
|
||||
}
|
||||
}
|
||||
if((pthis->actor.colorFilterTimer == 0) && (pthis->actor.bgCheckFlags & 1))
|
||||
if((pthis->actor.colorFilterTimer == 0) && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
if(pthis->actor.colChkInfo.health == 0)
|
||||
{
|
||||
|
@ -421,7 +421,7 @@ void func_80AFD59C(EnSkb* pthis, GlobalContext* globalCtx)
|
|||
void func_80AFD644(EnSkb* pthis)
|
||||
{
|
||||
Animation_MorphToPlayOnce(&pthis->skelAnime, &gStalchildDamagedAnim, -4.0f);
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.speedXZ = -4.0f;
|
||||
}
|
||||
|
@ -443,11 +443,11 @@ void func_80AFD6CC(EnSkb* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
pthis->unk_283 = (*new_var) | 2;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
pthis->actor.speedXZ = 0;
|
||||
}
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
if(pthis->actor.speedXZ < 0.0f)
|
||||
{
|
||||
|
@ -456,7 +456,7 @@ void func_80AFD6CC(EnSkb* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
|
||||
Math_SmoothStepToS(&pthis->actor.shape.rot.y, pthis->actor.yawTowardsPlayer, 1, 0x1194, 0);
|
||||
if(SkelAnime_Update(&pthis->skelAnime) && (pthis->actor.bgCheckFlags & 1))
|
||||
if(SkelAnime_Update(&pthis->skelAnime) && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
func_80AFCD60(pthis);
|
||||
}
|
||||
|
@ -468,7 +468,7 @@ void func_80AFD7B4(EnSkb* pthis, GlobalContext* globalCtx)
|
|||
Animation_MorphToPlayOnce(&pthis->skelAnime, &gStalchildDyingAnim, -4.0f);
|
||||
pthis->actor.shape.rot.y = pthis->actor.yawTowardsPlayer;
|
||||
pthis->actor.world.rot.y = pthis->actor.yawTowardsPlayer;
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.speedXZ = -6.0f;
|
||||
}
|
||||
|
@ -513,7 +513,7 @@ void func_80AFD968(EnSkb* pthis, GlobalContext* globalCtx)
|
|||
s16 phi_v1;
|
||||
Player* player;
|
||||
|
||||
if((pthis->unk_280 != 1) && (pthis->actor.bgCheckFlags & 0x60) && (pthis->actor.yDistToWater >= 40.0f))
|
||||
if((pthis->unk_280 != 1) && (pthis->actor.bgCheckFlags & (BG_STATE_5 | BG_STATE_6)) && (pthis->actor.yDistToWater >= 40.0f))
|
||||
{
|
||||
pthis->actor.colChkInfo.health = 0;
|
||||
pthis->unk_281 = 0;
|
||||
|
|
|
@ -657,9 +657,9 @@ void EnSkj_Fade(EnSkj* pthis, GlobalContext* globalCtx)
|
|||
|
||||
if(pthis->actor.velocity.y <= 0.0f)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
pthis->actor.bgCheckFlags &= ~2;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_1;
|
||||
func_80AFF2A0(pthis);
|
||||
}
|
||||
}
|
||||
|
@ -1192,9 +1192,9 @@ void EnSkj_WaitForLanding(EnSkj* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
if(pthis->actor.velocity.y <= 0.0f)
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 2)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
pthis->actor.bgCheckFlags &= ~2;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_1;
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
EnSkj_SetupWaitForLandAnimFinish(pthis);
|
||||
}
|
||||
|
|
|
@ -740,7 +740,7 @@ s32 EnSt_IsDoneBouncing(EnSt* pthis, GlobalContext* globalCtx)
|
|||
return false;
|
||||
}
|
||||
|
||||
if(!(pthis->actor.bgCheckFlags & 1))
|
||||
if(!(pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
// the Skulltula is not on the ground.
|
||||
return false;
|
||||
|
|
|
@ -748,7 +748,7 @@ void func_80B0DB00(EnSw* pthis, GlobalContext* globalCtx)
|
|||
pthis->actor.shape.rot.z += 0x1000;
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &pthis->actor, 20.0f, 20.0f, 0.0f, 5);
|
||||
|
||||
if((pthis->actor.bgCheckFlags & 1) && (!(0.0f <= pthis->actor.velocity.y)))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) && (!(0.0f <= pthis->actor.velocity.y)))
|
||||
{
|
||||
if(pthis->actor.floorHeight <= BGCHECK_Y_MIN || pthis->actor.floorHeight >= 32000.0f)
|
||||
{
|
||||
|
@ -756,7 +756,7 @@ void func_80B0DB00(EnSw* pthis, GlobalContext* globalCtx)
|
|||
return;
|
||||
}
|
||||
|
||||
pthis->actor.bgCheckFlags &= ~1;
|
||||
pthis->actor.bgCheckFlags &= ~BG_STATE_0;
|
||||
|
||||
if(pthis->unk_38A == 0)
|
||||
{
|
||||
|
|
|
@ -261,7 +261,7 @@ void func_80B11E78(EnSyatekiNiw* pthis, GlobalContext* globalCtx)
|
|||
f32 tmpf1;
|
||||
s16 sp4A;
|
||||
|
||||
if((pthis->unk_29C != 0) && (pthis->unk_29E == 0) && (pthis->actor.bgCheckFlags & 1))
|
||||
if((pthis->unk_29C != 0) && (pthis->unk_29E == 0) && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->unk_29C = 0;
|
||||
pthis->actionFunc = func_80B123A8;
|
||||
|
@ -353,7 +353,7 @@ void func_80B11E78(EnSyatekiNiw* pthis, GlobalContext* globalCtx)
|
|||
else
|
||||
{
|
||||
pthis->unk_25C = 4;
|
||||
if(pthis->actor.bgCheckFlags & 1)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_0)
|
||||
{
|
||||
pthis->actor.velocity.y = 2.5f;
|
||||
if((Rand_ZeroFloat(10.0f) < 1.0f) && (pthis->unk_29E == 0))
|
||||
|
@ -470,7 +470,7 @@ void func_80B12460(EnSyatekiNiw* pthis, GlobalContext* globalCtx)
|
|||
pthis->actor.speedXZ = 0.0f;
|
||||
}
|
||||
|
||||
if((pthis->actor.bgCheckFlags & 1) && (pthis->actor.world.pos.z > 110.0f))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_0) && (pthis->actor.world.pos.z > 110.0f))
|
||||
{
|
||||
pthis->actor.velocity.y = 0.0f;
|
||||
pthis->actor.gravity = 0.0f;
|
||||
|
@ -606,7 +606,7 @@ void func_80B129EC(EnSyatekiNiw* pthis, GlobalContext* globalCtx)
|
|||
pthis->unk_298++;
|
||||
pthis->unk_298 &= 1;
|
||||
pthis->unk_25C = (s16)Rand_CenteredFloat(4.0f) + 5;
|
||||
if((Rand_ZeroFloat(5.0f) < 1.0f) && (pthis->actor.bgCheckFlags & 1))
|
||||
if((Rand_ZeroFloat(5.0f) < 1.0f) && (pthis->actor.bgCheckFlags & BG_STATE_0))
|
||||
{
|
||||
pthis->actor.velocity.y = 4.0f;
|
||||
}
|
||||
|
|
|
@ -987,9 +987,9 @@ void func_80860F84(EnTest* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
}
|
||||
|
||||
if((pthis->actor.bgCheckFlags & 8) || ((pthis->actor.params == STALFOS_TYPE_CEILING) && !Actor_TestFloorInDirection(&pthis->actor, globalCtx, pthis->actor.speedXZ, pthis->actor.world.rot.y)))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) || ((pthis->actor.params == STALFOS_TYPE_CEILING) && !Actor_TestFloorInDirection(&pthis->actor, globalCtx, pthis->actor.speedXZ, pthis->actor.world.rot.y)))
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
if(pthis->actor.speedXZ >= 0.0f)
|
||||
{
|
||||
|
@ -1506,7 +1506,7 @@ void func_808621D4(EnTest* pthis, GlobalContext* globalCtx)
|
|||
{
|
||||
pthis->actor.speedXZ = 0.0f;
|
||||
|
||||
if((pthis->actor.bgCheckFlags & 8) && ((ABS((s16)(pthis->actor.wallYaw - pthis->actor.shape.rot.y)) < 0x38A4) && (pthis->actor.xzDistToPlayer < 80.0f)))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) && ((ABS((s16)(pthis->actor.wallYaw - pthis->actor.shape.rot.y)) < 0x38A4) && (pthis->actor.xzDistToPlayer < 80.0f)))
|
||||
{
|
||||
EnTest_SetupJumpUp(pthis);
|
||||
}
|
||||
|
@ -1522,7 +1522,7 @@ void func_808621D4(EnTest* pthis, GlobalContext* globalCtx)
|
|||
|
||||
if(player->swordState != 0)
|
||||
{
|
||||
if((pthis->actor.bgCheckFlags & 8) && ((ABS((s16)(pthis->actor.wallYaw - pthis->actor.shape.rot.y)) < 0x38A4) && (pthis->actor.xzDistToPlayer < 80.0f)))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) && ((ABS((s16)(pthis->actor.wallYaw - pthis->actor.shape.rot.y)) < 0x38A4) && (pthis->actor.xzDistToPlayer < 80.0f)))
|
||||
{
|
||||
EnTest_SetupJumpUp(pthis);
|
||||
}
|
||||
|
@ -1571,7 +1571,7 @@ void func_80862418(EnTest* pthis, GlobalContext* globalCtx)
|
|||
|
||||
if(player->swordState != 0)
|
||||
{
|
||||
if((pthis->actor.bgCheckFlags & 8) && ((ABS((s16)(pthis->actor.wallYaw - pthis->actor.shape.rot.y)) < 0x38A4) && (pthis->actor.xzDistToPlayer < 80.0f)))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) && ((ABS((s16)(pthis->actor.wallYaw - pthis->actor.shape.rot.y)) < 0x38A4) && (pthis->actor.xzDistToPlayer < 80.0f)))
|
||||
{
|
||||
EnTest_SetupJumpUp(pthis);
|
||||
}
|
||||
|
@ -1632,7 +1632,7 @@ void EnTest_Stunned(EnTest* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
else if(player->swordState != 0)
|
||||
{
|
||||
if((pthis->actor.bgCheckFlags & 8) && ((ABS((s16)(pthis->actor.wallYaw - pthis->actor.shape.rot.y)) < 0x38A4) && (pthis->actor.xzDistToPlayer < 80.0f)))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) && ((ABS((s16)(pthis->actor.wallYaw - pthis->actor.shape.rot.y)) < 0x38A4) && (pthis->actor.xzDistToPlayer < 80.0f)))
|
||||
{
|
||||
EnTest_SetupJumpUp(pthis);
|
||||
}
|
||||
|
@ -1720,9 +1720,9 @@ void func_808628C8(EnTest* pthis, GlobalContext* globalCtx)
|
|||
}
|
||||
}
|
||||
|
||||
if((pthis->actor.bgCheckFlags & 8) || ((pthis->actor.params == STALFOS_TYPE_CEILING) && !Actor_TestFloorInDirection(&pthis->actor, globalCtx, pthis->actor.speedXZ, pthis->actor.shape.rot.y + 0x3FFF)))
|
||||
if((pthis->actor.bgCheckFlags & BG_STATE_3) || ((pthis->actor.params == STALFOS_TYPE_CEILING) && !Actor_TestFloorInDirection(&pthis->actor, globalCtx, pthis->actor.speedXZ, pthis->actor.shape.rot.y + 0x3FFF)))
|
||||
{
|
||||
if(pthis->actor.bgCheckFlags & 8)
|
||||
if(pthis->actor.bgCheckFlags & BG_STATE_3)
|
||||
{
|
||||
if(pthis->actor.speedXZ >= 0.0f)
|
||||
{
|
||||
|
@ -2148,7 +2148,7 @@ void EnTest_Update(Actor* thisx, GlobalContext* globalCtx)
|
|||
pthis->actor.floorHeight = pthis->actor.home.pos.y;
|
||||
}
|
||||
}
|
||||
else if(pthis->actor.bgCheckFlags & 2)
|
||||
else if(pthis->actor.bgCheckFlags & BG_STATE_1)
|
||||
{
|
||||
floorProperty = func_80041EA4(&globalCtx->colCtx, pthis->actor.floorPoly, pthis->actor.floorBgId);
|
||||
|
||||
|
@ -2442,7 +2442,7 @@ s32 EnTest_ReactToProjectile(GlobalContext* globalCtx, EnTest* pthis)
|
|||
{
|
||||
yawToProjectile = Actor_WorldYawTowardActor(&pthis->actor, projectileActor) - (u16)pthis->actor.shape.rot.y;
|
||||
|
||||
if((u8)(pthis->actor.bgCheckFlags & 8))
|
||||
if((u8)(pthis->actor.bgCheckFlags & BG_STATE_3))
|
||||
{
|
||||
wallYawDiff = ((u16)pthis->actor.wallYaw - (u16)pthis->actor.shape.rot.y);
|
||||
touchingWall = true;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user