mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-04 17:26:44 +00:00
Defines for player state flags (#1081)
* script-assisted player state flags * Run formatter * manually convert state flags in `D_80116068` * `PLAYER_STATE_FLAG_` -> `PLAYER_STATE` * Run formatter
This commit is contained in:
parent
2a4fb604fb
commit
6479913daa
@ -202,6 +202,81 @@ typedef struct {
|
||||
/* 0x10 */ Vec3f base;
|
||||
} WeaponInfo; // size = 0x1C
|
||||
|
||||
#define PLAYER_STATE1_0 (1 << 0)
|
||||
#define PLAYER_STATE1_1 (1 << 1)
|
||||
#define PLAYER_STATE1_2 (1 << 2)
|
||||
#define PLAYER_STATE1_3 (1 << 3)
|
||||
#define PLAYER_STATE1_4 (1 << 4)
|
||||
#define PLAYER_STATE1_5 (1 << 5)
|
||||
#define PLAYER_STATE1_6 (1 << 6)
|
||||
#define PLAYER_STATE1_7 (1 << 7)
|
||||
#define PLAYER_STATE1_8 (1 << 8)
|
||||
#define PLAYER_STATE1_9 (1 << 9)
|
||||
#define PLAYER_STATE1_10 (1 << 10)
|
||||
#define PLAYER_STATE1_11 (1 << 11)
|
||||
#define PLAYER_STATE1_12 (1 << 12)
|
||||
#define PLAYER_STATE1_13 (1 << 13)
|
||||
#define PLAYER_STATE1_14 (1 << 14)
|
||||
#define PLAYER_STATE1_15 (1 << 15)
|
||||
#define PLAYER_STATE1_16 (1 << 16)
|
||||
#define PLAYER_STATE1_17 (1 << 17)
|
||||
#define PLAYER_STATE1_18 (1 << 18)
|
||||
#define PLAYER_STATE1_19 (1 << 19)
|
||||
#define PLAYER_STATE1_20 (1 << 20)
|
||||
#define PLAYER_STATE1_21 (1 << 21)
|
||||
#define PLAYER_STATE1_22 (1 << 22)
|
||||
#define PLAYER_STATE1_23 (1 << 23)
|
||||
#define PLAYER_STATE1_24 (1 << 24)
|
||||
#define PLAYER_STATE1_25 (1 << 25)
|
||||
#define PLAYER_STATE1_26 (1 << 26)
|
||||
#define PLAYER_STATE1_27 (1 << 27)
|
||||
#define PLAYER_STATE1_28 (1 << 28)
|
||||
#define PLAYER_STATE1_29 (1 << 29)
|
||||
#define PLAYER_STATE1_30 (1 << 30)
|
||||
#define PLAYER_STATE1_31 (1 << 31)
|
||||
|
||||
#define PLAYER_STATE2_0 (1 << 0)
|
||||
#define PLAYER_STATE2_1 (1 << 1)
|
||||
#define PLAYER_STATE2_2 (1 << 2)
|
||||
#define PLAYER_STATE2_3 (1 << 3)
|
||||
#define PLAYER_STATE2_4 (1 << 4)
|
||||
#define PLAYER_STATE2_5 (1 << 5)
|
||||
#define PLAYER_STATE2_6 (1 << 6)
|
||||
#define PLAYER_STATE2_7 (1 << 7)
|
||||
#define PLAYER_STATE2_8 (1 << 8)
|
||||
#define PLAYER_STATE2_9 (1 << 9)
|
||||
#define PLAYER_STATE2_10 (1 << 10)
|
||||
#define PLAYER_STATE2_11 (1 << 11)
|
||||
#define PLAYER_STATE2_12 (1 << 12)
|
||||
#define PLAYER_STATE2_13 (1 << 13)
|
||||
#define PLAYER_STATE2_14 (1 << 14)
|
||||
#define PLAYER_STATE2_15 (1 << 15)
|
||||
#define PLAYER_STATE2_16 (1 << 16)
|
||||
#define PLAYER_STATE2_17 (1 << 17)
|
||||
#define PLAYER_STATE2_18 (1 << 18)
|
||||
#define PLAYER_STATE2_19 (1 << 19)
|
||||
#define PLAYER_STATE2_20 (1 << 20)
|
||||
#define PLAYER_STATE2_21 (1 << 21)
|
||||
#define PLAYER_STATE2_22 (1 << 22)
|
||||
#define PLAYER_STATE2_23 (1 << 23)
|
||||
#define PLAYER_STATE2_24 (1 << 24)
|
||||
#define PLAYER_STATE2_25 (1 << 25)
|
||||
#define PLAYER_STATE2_26 (1 << 26)
|
||||
#define PLAYER_STATE2_27 (1 << 27)
|
||||
#define PLAYER_STATE2_28 (1 << 28)
|
||||
#define PLAYER_STATE2_29 (1 << 29)
|
||||
#define PLAYER_STATE2_30 (1 << 30)
|
||||
#define PLAYER_STATE2_31 (1 << 31)
|
||||
|
||||
#define PLAYER_STATE3_0 (1 << 0)
|
||||
#define PLAYER_STATE3_1 (1 << 1)
|
||||
#define PLAYER_STATE3_2 (1 << 2)
|
||||
#define PLAYER_STATE3_3 (1 << 3)
|
||||
#define PLAYER_STATE3_4 (1 << 4)
|
||||
#define PLAYER_STATE3_5 (1 << 5)
|
||||
#define PLAYER_STATE3_6 (1 << 6)
|
||||
#define PLAYER_STATE3_7 (1 << 7)
|
||||
|
||||
typedef void (*PlayerFunc674)(struct Player*, struct GlobalContext*);
|
||||
typedef s32 (*PlayerFunc82C)(struct Player*, struct GlobalContext*);
|
||||
typedef void (*PlayerFuncA74)(struct GlobalContext*, struct Player*);
|
||||
|
@ -351,7 +351,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) {
|
||||
|
||||
func_8002BE64(targetCtx, targetCtx->unk_4C, spBC.x, spBC.y, spBC.z);
|
||||
|
||||
if ((!(player->stateFlags1 & 0x40)) || (actor != player->unk_664)) {
|
||||
if ((!(player->stateFlags1 & PLAYER_STATE1_6)) || (actor != player->unk_664)) {
|
||||
OVERLAY_DISP = Gfx_CallSetupDL(OVERLAY_DISP, 0x39);
|
||||
|
||||
for (spB0 = 0, spAC = targetCtx->unk_4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) {
|
||||
@ -948,7 +948,7 @@ f32 Actor_HeightDiff(Actor* actorA, Actor* actorB) {
|
||||
}
|
||||
|
||||
f32 Player_GetHeight(Player* player) {
|
||||
f32 offset = (player->stateFlags1 & 0x800000) ? 32.0f : 0.0f;
|
||||
f32 offset = (player->stateFlags1 & PLAYER_STATE1_23) ? 32.0f : 0.0f;
|
||||
|
||||
if (LINK_IS_ADULT) {
|
||||
return offset + 68.0f;
|
||||
@ -958,9 +958,9 @@ f32 Player_GetHeight(Player* player) {
|
||||
}
|
||||
|
||||
f32 func_8002DCE4(Player* player) {
|
||||
if (player->stateFlags1 & 0x800000) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_23) {
|
||||
return 8.0f;
|
||||
} else if (player->stateFlags1 & 0x8000000) {
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_27) {
|
||||
return (R_RUN_SPEED_LIMIT / 100.0f) * 0.6f;
|
||||
} else {
|
||||
return R_RUN_SPEED_LIMIT / 100.0f;
|
||||
@ -968,7 +968,7 @@ f32 func_8002DCE4(Player* player) {
|
||||
}
|
||||
|
||||
s32 func_8002DD6C(Player* player) {
|
||||
return player->stateFlags1 & 0x8;
|
||||
return player->stateFlags1 & PLAYER_STATE1_3;
|
||||
}
|
||||
|
||||
s32 func_8002DD78(Player* player) {
|
||||
@ -978,19 +978,19 @@ s32 func_8002DD78(Player* player) {
|
||||
s32 func_8002DDA8(GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
return (player->stateFlags1 & 0x800) || func_8002DD78(player);
|
||||
return (player->stateFlags1 & PLAYER_STATE1_11) || func_8002DD78(player);
|
||||
}
|
||||
|
||||
s32 func_8002DDE4(GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
return player->stateFlags2 & 0x8;
|
||||
return player->stateFlags2 & PLAYER_STATE2_3;
|
||||
}
|
||||
|
||||
s32 func_8002DDF4(GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
return player->stateFlags2 & 0x1000;
|
||||
return player->stateFlags2 & PLAYER_STATE2_12;
|
||||
}
|
||||
|
||||
void func_8002DE04(GlobalContext* globalCtx, Actor* actorA, Actor* actorB) {
|
||||
@ -1012,12 +1012,12 @@ void func_8002DE74(GlobalContext* globalCtx, Player* player) {
|
||||
|
||||
void Actor_MountHorse(GlobalContext* globalCtx, Player* player, Actor* horse) {
|
||||
player->rideActor = horse;
|
||||
player->stateFlags1 |= 0x800000;
|
||||
player->stateFlags1 |= PLAYER_STATE1_23;
|
||||
horse->child = &player->actor;
|
||||
}
|
||||
|
||||
s32 func_8002DEEC(Player* player) {
|
||||
return (player->stateFlags1 & 0x20000080) || (player->csMode != 0);
|
||||
return (player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (player->csMode != 0);
|
||||
}
|
||||
|
||||
void func_8002DF18(GlobalContext* globalCtx, Player* player) {
|
||||
@ -1568,10 +1568,12 @@ u32 Actor_HasParent(Actor* actor, GlobalContext* globalCtx) {
|
||||
s32 func_8002F434(Actor* actor, GlobalContext* globalCtx, s32 getItemId, f32 xzRange, f32 yRange) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_12 | PLAYER_STATE1_13 | PLAYER_STATE1_14 |
|
||||
PLAYER_STATE1_18 | PLAYER_STATE1_19 | PLAYER_STATE1_20 | PLAYER_STATE1_21)) &&
|
||||
Player_GetExplosiveHeld(player) < 0) {
|
||||
if ((((player->heldActor != NULL) || (actor == player->targetActor)) && (getItemId > GI_NONE) &&
|
||||
(getItemId < GI_MAX)) ||
|
||||
(!(player->stateFlags1 & 0x20000800))) {
|
||||
(!(player->stateFlags1 & (PLAYER_STATE1_11 | PLAYER_STATE1_29)))) {
|
||||
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
|
||||
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
|
||||
s32 absYawDiff = ABS(yawDiff);
|
||||
@ -1639,7 +1641,9 @@ s32 Actor_IsMounted(GlobalContext* globalCtx, Actor* horse) {
|
||||
u32 Actor_SetRideActor(GlobalContext* globalCtx, Actor* horse, s32 mountSide) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (!(player->stateFlags1 & 0x003C7880)) {
|
||||
if (!(player->stateFlags1 &
|
||||
(PLAYER_STATE1_7 | PLAYER_STATE1_11 | PLAYER_STATE1_12 | PLAYER_STATE1_13 | PLAYER_STATE1_14 |
|
||||
PLAYER_STATE1_18 | PLAYER_STATE1_19 | PLAYER_STATE1_20 | PLAYER_STATE1_21))) {
|
||||
player->rideActor = horse;
|
||||
player->mountSide = mountSide;
|
||||
return true;
|
||||
@ -1983,8 +1987,18 @@ void func_800304DC(GlobalContext* globalCtx, ActorContext* actorCtx, ActorEntry*
|
||||
}
|
||||
|
||||
u32 D_80116068[ACTORCAT_MAX] = {
|
||||
0x100000C0, 0x100000C0, 0x00000000, 0x100004C0, 0x00000080, 0x300000C0,
|
||||
0x10000080, 0x00000000, 0x300000C0, 0x100004C0, 0x00000000, 0x100000C0,
|
||||
PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28,
|
||||
PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28,
|
||||
0,
|
||||
PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_10 | PLAYER_STATE1_28,
|
||||
PLAYER_STATE1_7,
|
||||
PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28 | PLAYER_STATE1_29,
|
||||
PLAYER_STATE1_7 | PLAYER_STATE1_28,
|
||||
0,
|
||||
PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28 | PLAYER_STATE1_29,
|
||||
PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_10 | PLAYER_STATE1_28,
|
||||
0,
|
||||
PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28,
|
||||
};
|
||||
|
||||
void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) {
|
||||
@ -2029,11 +2043,11 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) {
|
||||
|
||||
sp80 = &D_80116068[0];
|
||||
|
||||
if (player->stateFlags2 & 0x8000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_27) {
|
||||
unkFlag = ACTOR_FLAG_25;
|
||||
}
|
||||
|
||||
if ((player->stateFlags1 & 0x40) && ((player->actor.textId & 0xFF00) != 0x600)) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_6) && ((player->actor.textId & 0xFF00) != 0x600)) {
|
||||
sp74 = player->targetActor;
|
||||
}
|
||||
|
||||
@ -3389,7 +3403,7 @@ s16 Actor_TestFloorInDirection(Actor* actor, GlobalContext* globalCtx, f32 dista
|
||||
s32 Actor_IsTargeted(GlobalContext* globalCtx, Actor* actor) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((player->stateFlags1 & 0x10) && actor->isTargeted) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_4) && actor->isTargeted) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@ -3402,7 +3416,7 @@ s32 Actor_IsTargeted(GlobalContext* globalCtx, Actor* actor) {
|
||||
s32 Actor_OtherIsTargeted(GlobalContext* globalCtx, Actor* actor) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((player->stateFlags1 & 0x10) && !actor->isTargeted) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_4) && !actor->isTargeted) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -511,7 +511,7 @@ s32 Camera_GetWaterBoxDataIdx(Camera* camera, f32* waterY) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(camera->player->stateFlags1 & 0x8000000)) {
|
||||
if (!(camera->player->stateFlags1 & PLAYER_STATE1_27)) {
|
||||
// player is not swimming
|
||||
*waterY = BGCHECK_Y_MIN;
|
||||
return -1;
|
||||
@ -1021,7 +1021,7 @@ s32 Camera_CalcAtForParallel(Camera* camera, VecSph* arg1, f32 yOffset, f32* arg
|
||||
}
|
||||
|
||||
if (camera->playerGroundY == camera->playerPosRot.pos.y || camera->player->actor.gravity > -0.1f ||
|
||||
camera->player->stateFlags1 & 0x200000) {
|
||||
camera->player->stateFlags1 & PLAYER_STATE1_21) {
|
||||
*arg3 = Camera_LERPCeilF(playerPosRot->pos.y, *arg3, PCT(OREG(43)), 0.1f);
|
||||
phi_f20 = playerPosRot->pos.y - *arg3;
|
||||
posOffsetTarget.y -= phi_f20;
|
||||
@ -1124,7 +1124,7 @@ s32 Camera_CalcAtForLockOn(Camera* camera, VecSph* eyeAtDir, Vec3f* targetPos, f
|
||||
tmpPos0.z = tmpPos0.z + lookFromOffset.z;
|
||||
|
||||
if (camera->playerGroundY == camera->playerPosRot.pos.y || camera->player->actor.gravity > -0.1f ||
|
||||
camera->player->stateFlags1 & 0x200000) {
|
||||
camera->player->stateFlags1 & PLAYER_STATE1_21) {
|
||||
*yPosOffset = Camera_LERPCeilF(playerPosRot->pos.y, *yPosOffset, PCT(OREG(43)), 0.1f);
|
||||
yPosDelta = playerPosRot->pos.y - *yPosOffset;
|
||||
tmpPos0.y -= yPosDelta;
|
||||
@ -2059,7 +2059,7 @@ s32 Camera_Parallel1(Camera* camera) {
|
||||
}
|
||||
|
||||
if (camera->playerGroundY == camera->playerPosRot.pos.y || camera->player->actor.gravity > -0.1f ||
|
||||
camera->player->stateFlags1 & 0x200000) {
|
||||
camera->player->stateFlags1 & PLAYER_STATE1_21) {
|
||||
anim->yTarget = playerPosRot->pos.y;
|
||||
sp6A = 0;
|
||||
} else {
|
||||
@ -2748,7 +2748,7 @@ s32 Camera_Battle1(Camera* camera) {
|
||||
sp78 = batt1->swingPitchFinal;
|
||||
fov = batt1->fov;
|
||||
|
||||
if (camera->player->stateFlags1 & 0x1000) {
|
||||
if (camera->player->stateFlags1 & PLAYER_STATE1_12) {
|
||||
// charging sword.
|
||||
anim->unk_10 = Camera_LERPCeilF(PCT(OREG(12)) * 0.5f, anim->unk_10, PCT(OREG(25)), 0.1f);
|
||||
camera->xzOffsetUpdateRate = Camera_LERPCeilF(0.2f, camera->xzOffsetUpdateRate, PCT(OREG(25)), 0.1f);
|
||||
@ -2819,7 +2819,7 @@ s32 Camera_Battle1(Camera* camera) {
|
||||
}
|
||||
|
||||
if (camera->playerGroundY == camera->playerPosRot.pos.y || camera->player->actor.gravity > -0.1f ||
|
||||
camera->player->stateFlags1 & 0x200000) {
|
||||
camera->player->stateFlags1 & PLAYER_STATE1_21) {
|
||||
isOffGround = false;
|
||||
anim->yPosOffset = playerPosRot->pos.y;
|
||||
} else {
|
||||
@ -3139,7 +3139,7 @@ s32 Camera_KeepOn1(Camera* camera) {
|
||||
anim->unk_0C = NULL;
|
||||
cont:
|
||||
if (camera->playerGroundY == camera->playerPosRot.pos.y || camera->player->actor.gravity > -0.1f ||
|
||||
camera->player->stateFlags1 & 0x200000) {
|
||||
camera->player->stateFlags1 & PLAYER_STATE1_21) {
|
||||
anim->unk_08 = playerPosRot->pos.y;
|
||||
sp80 = 0;
|
||||
} else {
|
||||
@ -3560,7 +3560,7 @@ s32 Camera_KeepOn4(Camera* camera) {
|
||||
keep4->unk_04 = playerHeight * 1.6f * yNormal;
|
||||
keep4->unk_08 = -2.0f;
|
||||
keep4->unk_0C = 120.0f;
|
||||
keep4->unk_10 = player->stateFlags1 & 0x8000000 ? 0.0f : 20.0f;
|
||||
keep4->unk_10 = player->stateFlags1 & PLAYER_STATE1_27 ? 0.0f : 20.0f;
|
||||
keep4->unk_1C = 0x3212;
|
||||
keep4->unk_1E = 0x1E;
|
||||
keep4->unk_18 = 50.0f;
|
||||
@ -4813,7 +4813,7 @@ s32 Camera_Unique0(Camera* camera) {
|
||||
camera->animState++;
|
||||
}
|
||||
|
||||
if (player->stateFlags1 & 0x20000000) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_29) {
|
||||
anim->initalPos = playerPosRot->pos;
|
||||
}
|
||||
|
||||
@ -4821,7 +4821,7 @@ s32 Camera_Unique0(Camera* camera) {
|
||||
if (anim->animTimer > 0) {
|
||||
anim->animTimer--;
|
||||
anim->initalPos = playerPosRot->pos;
|
||||
} else if ((!(player->stateFlags1 & 0x20000000)) &&
|
||||
} else if ((!(player->stateFlags1 & PLAYER_STATE1_29)) &&
|
||||
((OLib_Vec3fDistXZ(&playerPosRot->pos, &anim->initalPos) >= 10.0f) ||
|
||||
CHECK_BTN_ALL(D_8015BD7C->state.input[0].press.button, BTN_A) ||
|
||||
CHECK_BTN_ALL(D_8015BD7C->state.input[0].press.button, BTN_B) ||
|
||||
@ -4849,7 +4849,7 @@ s32 Camera_Unique0(Camera* camera) {
|
||||
anim->initalPos = playerPosRot->pos;
|
||||
}
|
||||
|
||||
if ((!(player->stateFlags1 & 0x20000000)) &&
|
||||
if ((!(player->stateFlags1 & PLAYER_STATE1_29)) &&
|
||||
((0.001f < camera->xzSpeed) || CHECK_BTN_ALL(D_8015BD7C->state.input[0].press.button, BTN_A) ||
|
||||
CHECK_BTN_ALL(D_8015BD7C->state.input[0].press.button, BTN_B) ||
|
||||
CHECK_BTN_ALL(D_8015BD7C->state.input[0].press.button, BTN_CLEFT) ||
|
||||
@ -5066,7 +5066,8 @@ s32 Camera_Unique9(Camera* camera) {
|
||||
D_8011D3AC = anim->curKeyFrame->unk_01 & 0xF;
|
||||
} else if ((anim->curKeyFrame->unk_01 & 0xF0) == 0xC0) {
|
||||
Camera_UpdateInterface(0xF000 | ((anim->curKeyFrame->unk_01 & 0xF) << 8));
|
||||
} else if (camera->player->stateFlags1 & 0x8000000 && player->currentBoots != PLAYER_BOOTS_IRON) {
|
||||
} else if (camera->player->stateFlags1 & PLAYER_STATE1_27 &&
|
||||
player->currentBoots != PLAYER_BOOTS_IRON) {
|
||||
func_8002DF38(camera->globalCtx, camera->target, 8);
|
||||
osSyncPrintf("camera: demo: player demo set WAIT\n");
|
||||
} else {
|
||||
@ -5442,7 +5443,7 @@ s32 Camera_Unique9(Camera* camera) {
|
||||
// Set the player's position
|
||||
camera->player->actor.world.pos.x = anim->playerPos.x;
|
||||
camera->player->actor.world.pos.z = anim->playerPos.z;
|
||||
if (camera->player->stateFlags1 & 0x8000000 && player->currentBoots != PLAYER_BOOTS_IRON) {
|
||||
if (camera->player->stateFlags1 & PLAYER_STATE1_27 && player->currentBoots != PLAYER_BOOTS_IRON) {
|
||||
camera->player->actor.world.pos.y = anim->playerPos.y;
|
||||
}
|
||||
} else {
|
||||
@ -6003,16 +6004,16 @@ s32 Camera_Demo5(Camera* camera) {
|
||||
|
||||
sDemo5PrevSfxFrame = camera->globalCtx->state.frames;
|
||||
|
||||
if (camera->player->stateFlags1 & 0x8000000 && (player->currentBoots != PLAYER_BOOTS_IRON)) {
|
||||
if (camera->player->stateFlags1 & PLAYER_STATE1_27 && (player->currentBoots != PLAYER_BOOTS_IRON)) {
|
||||
// swimming, and not iron boots
|
||||
player->stateFlags1 |= 0x20000000;
|
||||
player->stateFlags1 |= PLAYER_STATE1_29;
|
||||
// env frozen
|
||||
player->actor.freezeTimer = camera->timer;
|
||||
} else {
|
||||
sp4A = playerhead.rot.y - playerTargetGeo.yaw;
|
||||
if (camera->target->category == ACTORCAT_PLAYER) {
|
||||
pad = camera->globalCtx->state.frames - sDemo5PrevAction12Frame;
|
||||
if (player->stateFlags1 & 0x800) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_11) {
|
||||
// holding object over head.
|
||||
func_8002DF54(camera->globalCtx, camera->target, 8);
|
||||
} else if (ABS(pad) > 3000) {
|
||||
@ -7072,7 +7073,7 @@ s32 Camera_CheckWater(Camera* camera) {
|
||||
}
|
||||
|
||||
if (camera->unk_14C & 0x200) {
|
||||
if (player->stateFlags2 & 0x800) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_11) {
|
||||
Camera_ChangeSettingFlags(camera, CAM_SET_PIVOT_WATER_SURFACE, 6);
|
||||
camera->unk_14C |= (s16)0x8000;
|
||||
} else if (camera->unk_14C & (s16)0x8000) {
|
||||
@ -7556,7 +7557,7 @@ void Camera_Finish(Camera* camera) {
|
||||
|
||||
if ((camera->parentCamIdx == MAIN_CAM) && (camera->csId != 0)) {
|
||||
player->actor.freezeTimer = 0;
|
||||
player->stateFlags1 &= ~0x20000000;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_29;
|
||||
|
||||
if (player->csMode != 0) {
|
||||
func_8002DF54(camera->globalCtx, &player->actor, 7);
|
||||
|
@ -769,7 +769,7 @@ s32 OnePointCutscene_SetInfo(GlobalContext* globalCtx, s16 camIdx, s16 csId, Act
|
||||
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
func_800C0808(globalCtx, camIdx, player, CAM_SET_CS_C);
|
||||
player->stateFlags1 |= 0x20000000;
|
||||
player->stateFlags1 |= PLAYER_STATE1_29;
|
||||
player->actor.freezeTimer = 90;
|
||||
|
||||
i = Quake_Add(csCam, 1);
|
||||
@ -966,7 +966,7 @@ s32 OnePointCutscene_SetInfo(GlobalContext* globalCtx, s16 camIdx, s16 csId, Act
|
||||
if (func_800C0CB8(globalCtx)) {
|
||||
D_801231B4[0].eyeTargetInit.z = D_801231B4[1].eyeTargetInit.z = !LINK_IS_ADULT ? 100.0f : 120.0f;
|
||||
|
||||
if (player->stateFlags1 & 0x08000000) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_27) {
|
||||
D_801231B4[2].atTargetInit.z = 0.0f;
|
||||
}
|
||||
Actor_GetWorldPosShapeRot(&spA0, &player->actor);
|
||||
|
@ -612,7 +612,7 @@ void func_80083108(GlobalContext* globalCtx) {
|
||||
((globalCtx->sceneNum == SCENE_SPOT20) && (gSaveContext.cutsceneIndex == 0xFFF0))) {
|
||||
gSaveContext.unk_13E7 = 0;
|
||||
|
||||
if ((player->stateFlags1 & 0x00800000) || (globalCtx->shootingGalleryStatus > 1) ||
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_23) || (globalCtx->shootingGalleryStatus > 1) ||
|
||||
((globalCtx->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(globalCtx, 0x38))) {
|
||||
if (gSaveContext.equips.buttonItems[0] != ITEM_NONE) {
|
||||
gSaveContext.unk_13E7 = 1;
|
||||
@ -661,11 +661,11 @@ void func_80083108(GlobalContext* globalCtx) {
|
||||
Interface_ChangeAlpha(8);
|
||||
} else if ((globalCtx->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(globalCtx, 0x38)) {
|
||||
Interface_ChangeAlpha(8);
|
||||
} else if (player->stateFlags1 & 0x00800000) {
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_23) {
|
||||
Interface_ChangeAlpha(12);
|
||||
}
|
||||
} else {
|
||||
if (player->stateFlags1 & 0x00800000) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_23) {
|
||||
Interface_ChangeAlpha(12);
|
||||
}
|
||||
}
|
||||
@ -743,7 +743,7 @@ void func_80083108(GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
Interface_ChangeAlpha(50);
|
||||
} else if ((player->stateFlags1 & 0x00200000) || (player->stateFlags2 & 0x00040000)) {
|
||||
} else if ((player->stateFlags1 & PLAYER_STATE1_21) || (player->stateFlags2 & PLAYER_STATE2_18)) {
|
||||
if (gSaveContext.buttonStatus[0] != BTN_DISABLED) {
|
||||
gSaveContext.buttonStatus[0] = BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[1] = BTN_DISABLED;
|
||||
@ -753,7 +753,7 @@ void func_80083108(GlobalContext* globalCtx) {
|
||||
Interface_ChangeAlpha(50);
|
||||
}
|
||||
} else if ((gSaveContext.eventInf[0] & 0xF) == 1) {
|
||||
if (player->stateFlags1 & 0x00800000) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_23) {
|
||||
if ((gSaveContext.equips.buttonItems[0] != ITEM_NONE) &&
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_BOW)) {
|
||||
if (gSaveContext.inventory.items[SLOT_BOW] == ITEM_NONE) {
|
||||
@ -2730,8 +2730,8 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
|
||||
|
||||
if ((gSaveContext.unk_13EA == 1) || (gSaveContext.unk_13EA == 2) || (gSaveContext.unk_13EA == 5)) {
|
||||
temp = 0;
|
||||
} else if ((player->stateFlags1 & 0x00200000) || (func_8008F2F8(globalCtx) == 4) ||
|
||||
(player->stateFlags2 & 0x00040000)) {
|
||||
} else if ((player->stateFlags1 & PLAYER_STATE1_21) || (func_8008F2F8(globalCtx) == 4) ||
|
||||
(player->stateFlags2 & PLAYER_STATE2_18)) {
|
||||
temp = 70;
|
||||
} else {
|
||||
temp = interfaceCtx->healthAlpha;
|
||||
@ -3157,7 +3157,7 @@ void Interface_Draw(GlobalContext* globalCtx) {
|
||||
if (gSaveContext.equips.buttonItems[0] != ITEM_NONE) {
|
||||
Interface_DrawItemIconTexture(globalCtx, interfaceCtx->iconItemSegment, 0);
|
||||
|
||||
if ((player->stateFlags1 & 0x00800000) || (globalCtx->shootingGalleryStatus > 1) ||
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_23) || (globalCtx->shootingGalleryStatus > 1) ||
|
||||
((globalCtx->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(globalCtx, 0x38))) {
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE,
|
||||
@ -3403,7 +3403,7 @@ void Interface_Draw(GlobalContext* globalCtx) {
|
||||
|
||||
if ((globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.debugState == 0) &&
|
||||
(globalCtx->gameOverCtx.state == GAMEOVER_INACTIVE) && (msgCtx->msgMode == MSGMODE_NONE) &&
|
||||
!(player->stateFlags2 & 0x01000000) && (globalCtx->sceneLoadFlag == 0) &&
|
||||
!(player->stateFlags2 & PLAYER_STATE2_24) && (globalCtx->sceneLoadFlag == 0) &&
|
||||
(globalCtx->transitionMode == 0) && !Gameplay_InCsMode(globalCtx) && (gSaveContext.minigameState != 1) &&
|
||||
(globalCtx->shootingGalleryStatus <= 1) &&
|
||||
!((globalCtx->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(globalCtx, 0x38))) {
|
||||
@ -3962,8 +3962,8 @@ void Interface_Update(GlobalContext* globalCtx) {
|
||||
HealthMeter_Update(globalCtx);
|
||||
|
||||
if ((gSaveContext.timer1State >= 3) && (globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.debugState == 0) &&
|
||||
(msgCtx->msgMode == MSGMODE_NONE) && !(player->stateFlags2 & 0x01000000) && (globalCtx->sceneLoadFlag == 0) &&
|
||||
(globalCtx->transitionMode == 0) && !Gameplay_InCsMode(globalCtx)) {}
|
||||
(msgCtx->msgMode == MSGMODE_NONE) && !(player->stateFlags2 & PLAYER_STATE2_24) &&
|
||||
(globalCtx->sceneLoadFlag == 0) && (globalCtx->transitionMode == 0) && !Gameplay_InCsMode(globalCtx)) {}
|
||||
|
||||
if (gSaveContext.rupeeAccumulator != 0) {
|
||||
if (gSaveContext.rupeeAccumulator > 0) {
|
||||
|
@ -293,7 +293,7 @@ void Player_SetBootData(GlobalContext* globalCtx, Player* this) {
|
||||
currentBoots = PLAYER_BOOTS_NORMAL_CHILD;
|
||||
}
|
||||
} else if (currentBoots == PLAYER_BOOTS_IRON) {
|
||||
if (this->stateFlags1 & 0x8000000) {
|
||||
if (this->stateFlags1 & PLAYER_STATE1_27) {
|
||||
currentBoots = PLAYER_BOOTS_IRON_UNDERWATER;
|
||||
}
|
||||
REG(27) = 500;
|
||||
@ -325,8 +325,9 @@ void Player_SetBootData(GlobalContext* globalCtx, Player* this) {
|
||||
}
|
||||
|
||||
s32 Player_InBlockingCsMode(GlobalContext* globalCtx, Player* this) {
|
||||
return (this->stateFlags1 & 0x20000080) || (this->csMode != 0) || (globalCtx->sceneLoadFlag == 0x14) ||
|
||||
(this->stateFlags1 & 1) || (this->stateFlags3 & 0x80) ||
|
||||
return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csMode != 0) ||
|
||||
(globalCtx->sceneLoadFlag == 0x14) || (this->stateFlags1 & PLAYER_STATE1_0) ||
|
||||
(this->stateFlags3 & PLAYER_STATE3_7) ||
|
||||
((gSaveContext.unk_13F0 != 0) && (Player_ActionToMagicSpell(this, this->itemActionParam) >= 0));
|
||||
}
|
||||
|
||||
@ -337,7 +338,7 @@ s32 Player_InCsMode(GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
s32 func_8008E9C4(Player* this) {
|
||||
return (this->stateFlags1 & 0x10);
|
||||
return (this->stateFlags1 & PLAYER_STATE1_4);
|
||||
}
|
||||
|
||||
s32 Player_IsChildWithHylianShield(Player* this) {
|
||||
@ -355,7 +356,7 @@ s32 Player_ActionToModelGroup(Player* this, s32 actionParam) {
|
||||
}
|
||||
|
||||
void Player_SetModelsForHoldingShield(Player* this) {
|
||||
if ((this->stateFlags1 & 0x400000) &&
|
||||
if ((this->stateFlags1 & PLAYER_STATE1_22) &&
|
||||
((this->itemActionParam < 0) || (this->itemActionParam == this->heldItemActionParam))) {
|
||||
if (!Player_HoldsTwoHandedWeapon(this) && !Player_IsChildWithHylianShield(this)) {
|
||||
this->rightHandType = 10;
|
||||
@ -431,15 +432,18 @@ void Player_UpdateBottleHeld(GlobalContext* globalCtx, Player* this, s32 item, s
|
||||
|
||||
void func_8008EDF0(Player* this) {
|
||||
this->unk_664 = NULL;
|
||||
this->stateFlags2 &= ~0x2000;
|
||||
this->stateFlags2 &= ~PLAYER_STATE2_13;
|
||||
}
|
||||
|
||||
void func_8008EE08(Player* this) {
|
||||
if ((this->actor.bgCheckFlags & 1) || (this->stateFlags1 & 0x8A00000) ||
|
||||
(!(this->stateFlags1 & 0xC0000) && ((this->actor.world.pos.y - this->actor.floorHeight) < 100.0f))) {
|
||||
this->stateFlags1 &= ~0x400F8000;
|
||||
} else if (!(this->stateFlags1 & 0x2C0000)) {
|
||||
this->stateFlags1 |= 0x80000;
|
||||
if ((this->actor.bgCheckFlags & 1) ||
|
||||
(this->stateFlags1 & (PLAYER_STATE1_21 | PLAYER_STATE1_23 | PLAYER_STATE1_27)) ||
|
||||
(!(this->stateFlags1 & (PLAYER_STATE1_18 | PLAYER_STATE1_19)) &&
|
||||
((this->actor.world.pos.y - this->actor.floorHeight) < 100.0f))) {
|
||||
this->stateFlags1 &= ~(PLAYER_STATE1_15 | PLAYER_STATE1_16 | PLAYER_STATE1_17 | PLAYER_STATE1_18 |
|
||||
PLAYER_STATE1_19 | PLAYER_STATE1_30);
|
||||
} else if (!(this->stateFlags1 & (PLAYER_STATE1_18 | PLAYER_STATE1_19 | PLAYER_STATE1_21))) {
|
||||
this->stateFlags1 |= PLAYER_STATE1_19;
|
||||
}
|
||||
|
||||
func_8008EDF0(this);
|
||||
@ -451,7 +455,7 @@ void func_8008EEAC(GlobalContext* globalCtx, Actor* actor) {
|
||||
func_8008EE08(this);
|
||||
this->unk_664 = actor;
|
||||
this->unk_684 = actor;
|
||||
this->stateFlags1 |= 0x10000;
|
||||
this->stateFlags1 |= PLAYER_STATE1_16;
|
||||
Camera_SetParam(Gameplay_GetCamera(globalCtx, 0), 8, actor);
|
||||
Camera_ChangeMode(Gameplay_GetCamera(globalCtx, 0), 2);
|
||||
}
|
||||
@ -459,7 +463,7 @@ void func_8008EEAC(GlobalContext* globalCtx, Actor* actor) {
|
||||
s32 func_8008EF30(GlobalContext* globalCtx) {
|
||||
Player* this = GET_PLAYER(globalCtx);
|
||||
|
||||
return (this->stateFlags1 & 0x800000);
|
||||
return (this->stateFlags1 & PLAYER_STATE1_23);
|
||||
}
|
||||
|
||||
s32 func_8008EF44(GlobalContext* globalCtx, s32 ammo) {
|
||||
@ -616,7 +620,7 @@ s32 func_8008F2F8(GlobalContext* globalCtx) {
|
||||
} else if ((this->unk_840 > 80) &&
|
||||
((this->currentBoots == PLAYER_BOOTS_IRON) || (this->unk_840 >= 300))) { // Deep underwater
|
||||
var = ((this->currentBoots == PLAYER_BOOTS_IRON) && (this->actor.bgCheckFlags & 1)) ? 1 : 3;
|
||||
} else if (this->stateFlags1 & 0x8000000) { // Swimming
|
||||
} else if (this->stateFlags1 & PLAYER_STATE1_27) { // Swimming
|
||||
var = 2;
|
||||
} else {
|
||||
return 0;
|
||||
@ -779,7 +783,7 @@ void func_8008F87C(GlobalContext* globalCtx, Player* this, SkelAnime* skelAnime,
|
||||
s16 temp2;
|
||||
s32 temp3;
|
||||
|
||||
if ((this->actor.scale.y >= 0.0f) && !(this->stateFlags1 & 0x80) &&
|
||||
if ((this->actor.scale.y >= 0.0f) && !(this->stateFlags1 & PLAYER_STATE1_7) &&
|
||||
(Player_ActionToMagicSpell(this, this->itemActionParam) < 0)) {
|
||||
s32 pad;
|
||||
|
||||
@ -923,10 +927,11 @@ s32 func_80090014(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||
|
||||
if ((D_80160014 == 4) && (gSaveContext.swordHealth <= 0.0f)) {
|
||||
dLists += 4;
|
||||
} else if ((D_80160014 == 6) && (this->stateFlags1 & 0x2000000)) {
|
||||
} else if ((D_80160014 == 6) && (this->stateFlags1 & PLAYER_STATE1_25)) {
|
||||
dLists = &D_80125E08[gSaveContext.linkAge];
|
||||
D_80160014 = 0;
|
||||
} else if ((this->leftHandType == 0) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & 0x8000000)) {
|
||||
} else if ((this->leftHandType == 0) && (this->actor.speedXZ > 2.0f) &&
|
||||
!(this->stateFlags1 & PLAYER_STATE1_27)) {
|
||||
dLists = &D_80125E18[gSaveContext.linkAge];
|
||||
D_80160014 = 1;
|
||||
}
|
||||
@ -937,7 +942,8 @@ s32 func_80090014(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||
|
||||
if (D_80160018 == 10) {
|
||||
dLists += this->currentShield * 4;
|
||||
} else if ((this->rightHandType == 8) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & 0x8000000)) {
|
||||
} else if ((this->rightHandType == 8) && (this->actor.speedXZ > 2.0f) &&
|
||||
!(this->stateFlags1 & PLAYER_STATE1_27)) {
|
||||
dLists = &D_80125E58[gSaveContext.linkAge];
|
||||
D_80160018 = 9;
|
||||
}
|
||||
@ -1036,7 +1042,7 @@ void func_80090604(GlobalContext* globalCtx, Player* this, ColliderQuad* collide
|
||||
COLTYPE_METAL,
|
||||
};
|
||||
|
||||
if (this->stateFlags1 & 0x400000) {
|
||||
if (this->stateFlags1 & PLAYER_STATE1_22) {
|
||||
Vec3f quadDest[4];
|
||||
|
||||
this->shieldQuad.base.colType = shieldColTypes[this->currentShield];
|
||||
@ -1070,12 +1076,12 @@ void func_800906D4(GlobalContext* globalCtx, Player* this, Vec3f* newTipPos) {
|
||||
Matrix_MultVec3f(&D_801260A4[2], &newBasePos[2]);
|
||||
|
||||
if (func_80090480(globalCtx, NULL, &this->swordInfo[0], &newTipPos[0], &newBasePos[0]) &&
|
||||
!(this->stateFlags1 & 0x400000)) {
|
||||
!(this->stateFlags1 & PLAYER_STATE1_22)) {
|
||||
EffectBlure_AddVertex(Effect_GetByIndex(this->swordEffectIndex), &this->swordInfo[0].tip,
|
||||
&this->swordInfo[0].base);
|
||||
}
|
||||
|
||||
if ((this->swordState > 0) && ((this->swordAnimation < 0x18) || (this->stateFlags2 & 0x20000))) {
|
||||
if ((this->swordState > 0) && ((this->swordAnimation < 0x18) || (this->stateFlags2 & PLAYER_STATE2_17))) {
|
||||
func_80090480(globalCtx, &this->swordQuads[0], &this->swordInfo[1], &newTipPos[1], &newBasePos[1]);
|
||||
func_80090480(globalCtx, &this->swordQuads[1], &this->swordInfo[2], &newTipPos[2], &newBasePos[2]);
|
||||
}
|
||||
@ -1272,13 +1278,13 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
|
||||
if (this->actor.scale.y >= 0.0f) {
|
||||
if (!Player_HoldsHookshot(this) && ((hookedActor = this->heldActor) != NULL)) {
|
||||
if (this->stateFlags1 & 0x200) {
|
||||
if (this->stateFlags1 & PLAYER_STATE1_9) {
|
||||
Matrix_MultVec3f(&D_80126128, &hookedActor->world.pos);
|
||||
Matrix_RotateZYX(0x69E8, -0x5708, 0x458E, MTXMODE_APPLY);
|
||||
Matrix_Get(&sp14C);
|
||||
Matrix_MtxFToYXZRotS(&sp14C, &hookedActor->world.rot, 0);
|
||||
hookedActor->shape.rot = hookedActor->world.rot;
|
||||
} else if (this->stateFlags1 & 0x800) {
|
||||
} else if (this->stateFlags1 & PLAYER_STATE1_11) {
|
||||
Vec3s spB8;
|
||||
|
||||
Matrix_Get(&sp14C);
|
||||
@ -1308,7 +1314,7 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
Matrix_Push();
|
||||
Matrix_Translate(stringData->pos.x, stringData->pos.y, stringData->pos.z, MTXMODE_APPLY);
|
||||
|
||||
if ((this->stateFlags1 & 0x200) && (this->unk_860 >= 0) && (this->unk_834 <= 10)) {
|
||||
if ((this->stateFlags1 & PLAYER_STATE1_9) && (this->unk_860 >= 0) && (this->unk_834 <= 10)) {
|
||||
Vec3f sp90;
|
||||
f32 distXYZ;
|
||||
|
||||
@ -1370,7 +1376,8 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
}
|
||||
|
||||
if ((this->unk_862 != 0) || ((func_8002DD6C(this) == 0) && (heldActor != NULL))) {
|
||||
if (!(this->stateFlags1 & 0x400) && (this->unk_862 != 0) && (this->exchangeItemId != EXCH_ITEM_NONE)) {
|
||||
if (!(this->stateFlags1 & PLAYER_STATE1_10) && (this->unk_862 != 0) &&
|
||||
(this->exchangeItemId != EXCH_ITEM_NONE)) {
|
||||
Math_Vec3f_Copy(&sGetItemRefPos, &this->leftHandPos);
|
||||
} else {
|
||||
sGetItemRefPos.x = (this->bodyPartsPos[15].x + this->leftHandPos.x) * 0.5f;
|
||||
|
@ -121,7 +121,7 @@ s32 ArmsHook_CheckForCancel(ArmsHook* this) {
|
||||
|
||||
if (Player_HoldsHookshot(player)) {
|
||||
if ((player->itemActionParam != player->heldItemActionParam) || (player->actor.flags & ACTOR_FLAG_8) ||
|
||||
((player->stateFlags1 & 0x4000080))) {
|
||||
((player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_26)))) {
|
||||
this->timer = 0;
|
||||
ArmsHook_DetachHookFromActor(this);
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &player->unk_3C8);
|
||||
|
@ -235,7 +235,7 @@ void BgGndIceblock_Idle(BgGndIceblock* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
if (this->dyna.unk_150 > 0.0f) {
|
||||
BgGndIceblock_SetNextPosition(this);
|
||||
if (Actor_WorldDistXZToPoint(&this->dyna.actor, &this->targetPos) > 1.0f) {
|
||||
@ -252,7 +252,7 @@ void BgGndIceblock_Reset(BgGndIceblock* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
if (Math_StepToF(&thisx->world.pos.y, thisx->home.pos.y, 1.0f)) {
|
||||
|
@ -60,7 +60,7 @@ void func_8087B758(BgHaka* this, Player* player) {
|
||||
|
||||
func_8002DBD0(&this->dyna.actor, &sp1C, &player->actor.world.pos);
|
||||
if (fabsf(sp1C.x) < 34.6f && sp1C.z > -112.8f && sp1C.z < -36.0f) {
|
||||
player->stateFlags2 |= 0x200;
|
||||
player->stateFlags2 |= PLAYER_STATE2_9;
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ void func_8087B7E8(BgHaka* this, GlobalContext* globalCtx) {
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT02 && !LINK_IS_ADULT && IS_DAY) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
if (!Gameplay_InCsMode(globalCtx)) {
|
||||
Message_StartTextbox(globalCtx, 0x5073, NULL);
|
||||
this->dyna.actor.params = 100;
|
||||
@ -79,7 +79,7 @@ void func_8087B7E8(BgHaka* this, GlobalContext* globalCtx) {
|
||||
} else if (0.0f < this->dyna.unk_150 ||
|
||||
(globalCtx->sceneNum == SCENE_SPOT06 && !LINK_IS_ADULT && !Flags_GetSwitch(globalCtx, 0x23))) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
} else {
|
||||
this->dyna.actor.world.rot.y = this->dyna.actor.shape.rot.y + 0x8000;
|
||||
this->actionFunc = func_8087B938;
|
||||
@ -101,7 +101,7 @@ void func_8087B938(BgHaka* this, GlobalContext* globalCtx) {
|
||||
Math_CosS(this->dyna.actor.world.rot.y) * this->dyna.actor.minVelocityY + this->dyna.actor.home.pos.z;
|
||||
if (sp38 != 0) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
if (this->dyna.actor.params == 1) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
} else if (!IS_DAY && globalCtx->sceneNum == SCENE_SPOT02) {
|
||||
@ -119,7 +119,7 @@ void func_8087BAAC(BgHaka* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,7 +132,7 @@ void func_8087BAE4(BgHaka* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
}
|
||||
if (this->dyna.actor.params == 0) {
|
||||
this->actionFunc = func_8087B7E8;
|
||||
|
@ -151,7 +151,7 @@ void BgHakaGate_StatueInactive(BgHakaGate* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
}
|
||||
@ -170,7 +170,7 @@ void BgHakaGate_StatueIdle(BgHakaGate* this, GlobalContext* globalCtx) {
|
||||
this->vTurnDirection = linkDirection * forceDirection;
|
||||
this->actionFunc = BgHakaGate_StatueTurn;
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
if (this->vTimer != 0) {
|
||||
this->vTimer--;
|
||||
@ -195,7 +195,7 @@ void BgHakaGate_StatueTurn(BgHakaGate* this, GlobalContext* globalCtx) {
|
||||
turnFinished = Math_StepToS(&this->vTurnAngleDeg10, 600, this->vTurnRateDeg10);
|
||||
turnAngle = this->vTurnAngleDeg10 * this->vTurnDirection;
|
||||
this->dyna.actor.shape.rot.y = (this->vRotYDeg10 + turnAngle) * 0.1f * (0x10000 / 360.0f);
|
||||
if ((player->stateFlags2 & 0x10) && (sStatueDistToPlayer > 0.0f)) {
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_4) && (sStatueDistToPlayer > 0.0f)) {
|
||||
player->actor.world.pos.x =
|
||||
this->dyna.actor.home.pos.x +
|
||||
(Math_SinS(this->dyna.actor.shape.rot.y - this->vInitTurnAngle) * sStatueDistToPlayer);
|
||||
@ -207,7 +207,7 @@ void BgHakaGate_StatueTurn(BgHakaGate* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
sStatueRotY = this->dyna.actor.shape.rot.y;
|
||||
if (turnFinished) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->vRotYDeg10 = (this->vRotYDeg10 + turnAngle) % 3600;
|
||||
this->vTurnRateDeg10 = 0;
|
||||
this->vTurnAngleDeg10 = 0;
|
||||
|
@ -289,7 +289,8 @@ void BgHakaSgami_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHakaSgami* this = (BgHakaSgami*)thisx;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (!(player->stateFlags1 & 0x300000C0) || (this->actionFunc == BgHakaSgami_SetupSpin)) {
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28 | PLAYER_STATE1_29)) ||
|
||||
(this->actionFunc == BgHakaSgami_SetupSpin)) {
|
||||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ void func_8088B268(BgHidanRock* this, GlobalContext* globalCtx) {
|
||||
this->dyna.actor.world.pos.z = (Math_CosS(this->dyna.unk_158) * D_8088BFC0) + this->dyna.actor.home.pos.z;
|
||||
|
||||
if (temp_v1) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
this->dyna.actor.home.pos.x = this->dyna.actor.world.pos.x;
|
||||
this->dyna.actor.home.pos.z = this->dyna.actor.world.pos.z;
|
||||
@ -159,7 +159,7 @@ void func_8088B268(BgHidanRock* this, GlobalContext* globalCtx) {
|
||||
|
||||
func_8002F974(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
@ -177,7 +177,7 @@ void func_8088B268(BgHidanRock* this, GlobalContext* globalCtx) {
|
||||
this->dyna.actor.world.pos.z = D_8088BF60.z;
|
||||
this->dyna.actor.speedXZ = 0.0f;
|
||||
D_8088BFC0 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->actionFunc = func_8088B79C;
|
||||
}
|
||||
|
||||
@ -297,7 +297,7 @@ void func_8088B990(BgHidanRock* this, GlobalContext* globalCtx) {
|
||||
this->timer++;
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
this->dyna.actor.speedXZ = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
}
|
||||
|
||||
if ((this->type == 0 && (Math_SmoothStepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 1820.0f,
|
||||
|
@ -117,7 +117,7 @@ void func_8088E518(BgHidanSima* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 3.4f);
|
||||
if (func_8004356C(&this->dyna) && !(player->stateFlags1 & 0x6000)) {
|
||||
if (func_8004356C(&this->dyna) && !(player->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14))) {
|
||||
this->timer = 20;
|
||||
this->dyna.actor.world.rot.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x4000;
|
||||
if (this->dyna.actor.home.pos.y <= this->dyna.actor.world.pos.y) {
|
||||
|
@ -137,7 +137,7 @@ void BgIceObjects_Idle(BgIceObjects* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
if ((this->dyna.unk_150 > 0.0f) && !Player_InCsMode(globalCtx)) {
|
||||
BgIceObjects_SetNextTarget(this, globalCtx);
|
||||
if (Actor_WorldDistXZToPoint(thisx, &this->targetPos) > 1.0f) {
|
||||
@ -202,7 +202,7 @@ void BgIceObjects_Reset(BgIceObjects* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
if (Math_StepToF(&thisx->world.pos.y, thisx->home.pos.y, 1.0f)) {
|
||||
@ -217,7 +217,7 @@ void BgIceObjects_Stuck(BgIceObjects* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ void BgJyaBlock_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgJyaBlock* this = (BgJyaBlock*)thisx;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -449,7 +449,7 @@ void func_80896950(BgJyaCobra* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (fabsf(this->dyna.unk_150) > 0.001f) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
}
|
||||
}
|
||||
|
||||
@ -490,7 +490,7 @@ void func_80896ABC(BgJyaCobra* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (Math_ScaledStepToS(&this->unk_170, this->unk_16A * 0x2000, this->unk_16E)) {
|
||||
this->unk_16C = (this->unk_16C + this->unk_16A) & 7;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
func_80896918(this, globalCtx);
|
||||
} else {
|
||||
@ -498,7 +498,7 @@ void func_80896ABC(BgJyaCobra* this, GlobalContext* globalCtx) {
|
||||
(this->unk_16C * 0x2000) + this->dyna.actor.home.rot.y + this->unk_170;
|
||||
}
|
||||
|
||||
if (player->stateFlags2 & 0x10) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_4) {
|
||||
if (this->unk_172) {
|
||||
func_80895BEC(this, globalCtx);
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ void BgJyaGoroiwa_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 bgId;
|
||||
Vec3f pos;
|
||||
|
||||
if (!(player->stateFlags1 & 0x300000C0)) {
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
|
||||
this->actionFunc(this, globalCtx);
|
||||
BgJyaGoroiwa_UpdateRotation(this);
|
||||
pos.x = this->actor.world.pos.x;
|
||||
|
@ -77,7 +77,7 @@ void BgJyaZurerukabe_InitDynaPoly(BgJyaZurerukabe* this, GlobalContext* globalCt
|
||||
void func_8089B4C8(BgJyaZurerukabe* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((player->stateFlags1 == 0x200000) && (player->actor.wallPoly != NULL)) {
|
||||
if ((player->stateFlags1 == PLAYER_STATE1_21) && (player->actor.wallPoly != NULL)) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_8089BA18); i++) {
|
||||
|
@ -111,7 +111,7 @@ void BgMoriKaitenkabe_Wait(BgMoriKaitenkabe* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
if (fabsf(this->dyna.unk_150) > 0.001f) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ void BgMoriKaitenkabe_Rotate(BgMoriKaitenkabe* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
if (fabsf(this->dyna.unk_150) > 0.001f) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
}
|
||||
Math_Vec3f_Copy(&player->actor.world.pos, &this->lockedPlayerPos);
|
||||
}
|
||||
|
@ -347,7 +347,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
} else {
|
||||
if ((gSaveContext.timer1Value == 0) && (sBlocksAtRest == 5)) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
sPuzzleState = 0x10;
|
||||
sBlocksAtRest = 0;
|
||||
}
|
||||
@ -366,11 +366,11 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, GlobalContext* globalCtx) {
|
||||
this->direction = (this->dyna.unk_150 >= 0.0f) ? 1.0f : -1.0f;
|
||||
this->actionFunc = BgPoEvent_BlockPush;
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
DECR(this->direction);
|
||||
}
|
||||
@ -393,7 +393,7 @@ void BgPoEvent_BlockPush(BgPoEvent* this, GlobalContext* globalCtx) {
|
||||
this->dyna.actor.world.pos.x = (Math_SinS(this->dyna.unk_158) * displacement) + this->dyna.actor.home.pos.x;
|
||||
this->dyna.actor.world.pos.z = (Math_CosS(this->dyna.unk_158) * displacement) + this->dyna.actor.home.pos.z;
|
||||
if (blockStop) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
if ((this->dyna.unk_150 > 0.0f) && (func_800435D8(globalCtx, &this->dyna, 0x1E, 0x32, -0x14) == 0)) {
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
|
||||
}
|
||||
@ -418,7 +418,7 @@ void BgPoEvent_BlockReset(BgPoEvent* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
if (Math_StepToF(&this->dyna.actor.world.pos.y, 493.0f, 1.0f) &&
|
||||
@ -438,7 +438,7 @@ void BgPoEvent_BlockSolved(BgPoEvent* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
}
|
||||
if (Math_StepToF(&this->dyna.actor.world.pos.y, 369.0f, 2.0f)) {
|
||||
sPuzzleState = 0x20;
|
||||
|
@ -238,11 +238,11 @@ void func_808B40AC(BgSpot15Rrbox* this, GlobalContext* globalCtx) {
|
||||
this->unk_17C = this->dyna.unk_150;
|
||||
func_808B4178(this, globalCtx);
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
}
|
||||
@ -274,7 +274,7 @@ void func_808B4194(BgSpot15Rrbox* this, GlobalContext* globalCtx) {
|
||||
if (!func_808B3F58(this, globalCtx)) {
|
||||
actor->home.pos.x = actor->world.pos.x;
|
||||
actor->home.pos.z = actor->world.pos.z;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
this->unk_178 = 0.0f;
|
||||
this->unk_174 = 0.0f;
|
||||
@ -289,7 +289,7 @@ void func_808B4194(BgSpot15Rrbox* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
actor->home.pos.x = actor->world.pos.x;
|
||||
actor->home.pos.z = actor->world.pos.z;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
this->unk_178 = 0.0f;
|
||||
this->unk_174 = 0.0f;
|
||||
@ -315,7 +315,7 @@ void func_808B43D0(BgSpot15Rrbox* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (fabsf(this->dyna.unk_150) > 0.001f) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
}
|
||||
|
||||
Actor_MoveForward(actor);
|
||||
@ -346,7 +346,7 @@ void func_808B44B8(BgSpot15Rrbox* this, GlobalContext* globalCtx) {
|
||||
void func_808B44CC(BgSpot15Rrbox* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -413,7 +413,7 @@ void func_808B57E0(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
|
||||
OnePointCutscene_Init(globalCtx, 4180, sTimer, NULL, MAIN_CAM);
|
||||
}
|
||||
}
|
||||
} else if (player->stateFlags1 & 0x800) {
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_11) {
|
||||
playerHeldActor = player->heldActor;
|
||||
if (playerHeldActor != NULL && playerHeldActor->category == ACTORCAT_EXPLOSIVE &&
|
||||
playerHeldActor->id == ACTOR_EN_BOMBF) {
|
||||
|
@ -212,7 +212,7 @@ void func_808B8E20(BgSpot18Obj* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (fabsf(this->dyna.unk_150) > 0.001f) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
}
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ void func_808B8F08(BgSpot18Obj* this, GlobalContext* globalCtx) {
|
||||
this->dyna.actor.world.pos.x = (Math_SinS(this->dyna.actor.world.rot.y) * 80.0f) + this->dyna.actor.home.pos.x;
|
||||
this->dyna.actor.world.pos.z = (Math_CosS(this->dyna.actor.world.rot.y) * 80.0f) + this->dyna.actor.home.pos.z;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
Flags_SetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F);
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
|
||||
|
@ -80,7 +80,7 @@ void BgSstFloor_Update(BgSstFloor* thisx, GlobalContext* globalCtx) {
|
||||
this->dyna.actor.params = BONGOFLOOR_REST;
|
||||
this->drumPhase = 28;
|
||||
|
||||
if (func_8004356C(&this->dyna) && !(player->stateFlags1 & 0x6000)) {
|
||||
if (func_8004356C(&this->dyna) && !(player->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14))) {
|
||||
distFromRim = 600.0f - this->dyna.actor.xzDistToPlayer;
|
||||
if (distFromRim > 0.0f) {
|
||||
if (distFromRim > 350.0f) {
|
||||
|
@ -2203,10 +2203,10 @@ void BossGanon_Wait(BossGanon* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if ((this->unk_1C2 == 0) && !(player->actor.world.pos.y < 0.0f)) {
|
||||
if (!(player->stateFlags1 & 0x2000) && (fabsf(player->actor.world.pos.x) < 110.0f) &&
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_13) && (fabsf(player->actor.world.pos.x) < 110.0f) &&
|
||||
(fabsf(player->actor.world.pos.z) < 110.0f)) {
|
||||
BossGanon_SetupPoundFloor(this, globalCtx);
|
||||
} else if ((this->timers[0] == 0) && !(player->stateFlags1 & 0x2000)) {
|
||||
} else if ((this->timers[0] == 0) && !(player->stateFlags1 & PLAYER_STATE1_13)) {
|
||||
this->timers[0] = (s16)Rand_ZeroFloat(30.0f) + 30;
|
||||
|
||||
if ((s8)this->actor.colChkInfo.health >= 20) {
|
||||
@ -3927,7 +3927,7 @@ void BossGanon_LightBall_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
switch (this->unk_1C2) {
|
||||
case 0:
|
||||
if ((player->stateFlags1 & 2) &&
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_1) &&
|
||||
(ABS((s16)(player->actor.shape.rot.y - (s16)(ganondorf->actor.yawTowardsPlayer + 0x8000))) <
|
||||
0x2000) &&
|
||||
(sqrtf(SQ(xDistFromLink) + SQ(yDistFromLink) + SQ(zDistFromLink)) <= 25.0f)) {
|
||||
|
@ -370,7 +370,7 @@ void BossSst_HeadSetupIntro(BossSst* this, GlobalContext* globalCtx) {
|
||||
player->targetYaw = -0x8000;
|
||||
player->currentYaw = -0x8000;
|
||||
player->fallStartHeight = 0;
|
||||
player->stateFlags1 |= 0x20;
|
||||
player->stateFlags1 |= PLAYER_STATE1_5;
|
||||
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
@ -404,7 +404,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
||||
if (this->timer == 0) {
|
||||
sHands[RIGHT]->actor.flags |= ACTOR_FLAG_0;
|
||||
sHands[LEFT]->actor.flags |= ACTOR_FLAG_0;
|
||||
player->stateFlags1 &= ~0x20;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_5;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
sCameraAt.y += 30.0f;
|
||||
@ -650,7 +650,8 @@ void BossSst_HeadNeutral(BossSst* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (this->timer == 0) {
|
||||
if ((GET_PLAYER(globalCtx)->actor.world.pos.y > -50.0f) && !(GET_PLAYER(globalCtx)->stateFlags1 & 0x6080)) {
|
||||
if ((GET_PLAYER(globalCtx)->actor.world.pos.y > -50.0f) &&
|
||||
!(GET_PLAYER(globalCtx)->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_13 | PLAYER_STATE1_14))) {
|
||||
sHands[Rand_ZeroOne() <= 0.5f]->ready = true;
|
||||
BossSst_HeadSetupWait(this);
|
||||
} else {
|
||||
@ -1234,7 +1235,8 @@ void BossSst_HandWait(BossSst* this, GlobalContext* globalCtx) {
|
||||
this->timer--;
|
||||
}
|
||||
|
||||
if ((this->timer == 0) && (player->actor.world.pos.y > -50.0f) && !(player->stateFlags1 & 0x6080)) {
|
||||
if ((this->timer == 0) && (player->actor.world.pos.y > -50.0f) &&
|
||||
!(player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_13 | PLAYER_STATE1_14))) {
|
||||
BossSst_HandSelectAttack(this);
|
||||
}
|
||||
} else if (sHead->actionFunc == BossSst_HeadNeutral) {
|
||||
@ -1717,7 +1719,7 @@ void BossSst_HandClap(BossSst* this, GlobalContext* globalCtx) {
|
||||
if (this->ready) {
|
||||
this->timer = 30;
|
||||
this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
|
||||
if (!(player->stateFlags2 & 0x80)) {
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_7)) {
|
||||
dropFlag = true;
|
||||
}
|
||||
} else {
|
||||
@ -1806,7 +1808,7 @@ void BossSst_HandGrab(BossSst* this, GlobalContext* globalCtx) {
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
|
||||
this->actor.speedXZ = 0.0f;
|
||||
if (player->stateFlags2 & 0x80) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_7) {
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
BossSst_HandSetupCrush(this);
|
||||
} else {
|
||||
@ -1833,7 +1835,7 @@ void BossSst_HandGrab(BossSst* this, GlobalContext* globalCtx) {
|
||||
|
||||
this->actor.world.pos.x += this->actor.speedXZ * Math_SinS(this->actor.world.rot.y);
|
||||
this->actor.world.pos.z += this->actor.speedXZ * Math_CosS(this->actor.world.rot.y);
|
||||
if (player->stateFlags2 & 0x80) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_7) {
|
||||
player->unk_850 = 0;
|
||||
player->actor.world.pos = this->actor.world.pos;
|
||||
player->actor.shape.rot.y = this->actor.shape.rot.y;
|
||||
@ -1854,7 +1856,7 @@ void BossSst_HandCrush(BossSst* this, GlobalContext* globalCtx) {
|
||||
this->timer--;
|
||||
}
|
||||
|
||||
if (!(player->stateFlags2 & 0x80)) {
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_7)) {
|
||||
BossSst_HandReleasePlayer(this, globalCtx, true);
|
||||
BossSst_HandSetupEndCrush(this);
|
||||
} else {
|
||||
@ -1927,7 +1929,7 @@ void BossSst_HandSwing(BossSst* this, GlobalContext* globalCtx) {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.z, 0, 0x800);
|
||||
}
|
||||
|
||||
if (player->stateFlags2 & 0x80) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_7) {
|
||||
player->unk_850 = 0;
|
||||
Math_Vec3f_Copy(&player->actor.world.pos, &this->actor.world.pos);
|
||||
player->actor.shape.rot.x = this->actor.shape.rot.x;
|
||||
@ -1940,7 +1942,7 @@ void BossSst_HandSwing(BossSst* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if ((this->timer == 4) && (this->amplitude == 0) && SkelAnime_Update(&this->skelAnime) &&
|
||||
(player->stateFlags2 & 0x80)) {
|
||||
(player->stateFlags2 & PLAYER_STATE2_7)) {
|
||||
BossSst_HandReleasePlayer(this, globalCtx, false);
|
||||
player->actor.world.pos.x += 70.0f * Math_SinS(this->actor.shape.rot.y);
|
||||
player->actor.world.pos.z += 70.0f * Math_CosS(this->actor.shape.rot.y);
|
||||
|
@ -836,7 +836,7 @@ s32 BossTw_CheckBeamReflection(BossTw* this, GlobalContext* globalCtx) {
|
||||
Vec3f vec;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (player->stateFlags1 & 0x400000 &&
|
||||
if (player->stateFlags1 & PLAYER_STATE1_22 &&
|
||||
(s16)(player->actor.shape.rot.y - this->actor.shape.rot.y + 0x8000) < 0x2000 &&
|
||||
(s16)(player->actor.shape.rot.y - this->actor.shape.rot.y + 0x8000) > -0x2000) {
|
||||
// player is shielding and facing angles are less than 45 degrees in either direction
|
||||
@ -978,7 +978,7 @@ void BossTw_ShootBeam(BossTw* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (this->timers[1] != 0) {
|
||||
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, this->rotateSpeed);
|
||||
if ((player->stateFlags1 & 0x400000) &&
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_22) &&
|
||||
((s16)((player->actor.shape.rot.y - this->actor.shape.rot.y) + 0x8000) < 0x2000) &&
|
||||
((s16)((player->actor.shape.rot.y - this->actor.shape.rot.y) + 0x8000) > -0x2000)) {
|
||||
Math_ApproachF(&this->targetPos.x, player->bodyPartsPos[15].x, 1.0f, 400.0f);
|
||||
@ -4804,7 +4804,7 @@ void BossTw_UpdateEffects(GlobalContext* globalCtx) {
|
||||
if (eff->workf[EFF_SCALE] == 0.0f) {
|
||||
eff->type = TWEFF_NONE;
|
||||
if (eff->target == NULL) {
|
||||
player->stateFlags2 &= ~0x8000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_15;
|
||||
sFreezeState = 0;
|
||||
}
|
||||
}
|
||||
@ -4820,9 +4820,9 @@ void BossTw_UpdateEffects(GlobalContext* globalCtx) {
|
||||
|
||||
if (eff->workf[EFF_ROLL] >= 0.8f) {
|
||||
eff->workf[EFF_ROLL] -= 0.8f;
|
||||
player->stateFlags2 |= 0x8000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_15;
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x8000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_15;
|
||||
}
|
||||
|
||||
if ((sKotakePtr->workf[UNK_F11] > 10.0f) && (sKotakePtr->workf[UNK_F11] < 200.0f)) {
|
||||
|
@ -1426,14 +1426,14 @@ void BossVa_BodyPhase4(BossVa* this, GlobalContext* globalCtx) {
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->vaBodySpinRate, 0, 1, 0x96, 0);
|
||||
if (this->timer > 0) {
|
||||
if ((player->stateFlags1 & 0x4000000) && (this->timer > 35)) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_26) && (this->timer > 35)) {
|
||||
this->timer = 35;
|
||||
}
|
||||
Math_SmoothStepToF(&this->actor.shape.yOffset, -480.0f, 1.0f, 30.0f, 0.0f);
|
||||
this->colliderBody.info.bumper.dmgFlags = 0xFC00712;
|
||||
this->timer--;
|
||||
} else {
|
||||
if ((player->stateFlags1 & 0x4000000) && (this->timer < -60)) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_26) && (this->timer < -60)) {
|
||||
this->timer = -59;
|
||||
}
|
||||
if ((globalCtx->gameplayFrames % 4) == 0) {
|
||||
@ -2002,7 +2002,7 @@ void BossVa_ZapperAttack(BossVa* this, GlobalContext* globalCtx) {
|
||||
sp98 = Math_Vec3f_Yaw(&sp7C, &this->armTip);
|
||||
tmp17 = sp98 - this->actor.shape.rot.y;
|
||||
|
||||
if ((sp8E >= ABS(tmp17) || this->burst) && !(sBodyState & 0x80) && !(player->stateFlags1 & 0x04000000)) {
|
||||
if ((sp8E >= ABS(tmp17) || this->burst) && !(sBodyState & 0x80) && !(player->stateFlags1 & PLAYER_STATE1_26)) {
|
||||
|
||||
if (!this->burst) {
|
||||
sp94 = sp98 - this->actor.shape.rot.y;
|
||||
@ -2064,7 +2064,7 @@ void BossVa_ZapperAttack(BossVa* this, GlobalContext* globalCtx) {
|
||||
this->timer2 = 0;
|
||||
}
|
||||
|
||||
if ((this->timer2 < 0) && (player->stateFlags1 & 0x4000000)) {
|
||||
if ((this->timer2 < 0) && (player->stateFlags1 & PLAYER_STATE1_26)) {
|
||||
BossVa_Spark(globalCtx, this, 1, 30, 0.0f, 0.0f, SPARK_LINK, 0.0f, true);
|
||||
}
|
||||
}
|
||||
@ -2265,7 +2265,7 @@ void BossVa_ZapperEnraged(BossVa* this, GlobalContext* globalCtx) {
|
||||
sp6C = Math_Vec3f_Yaw(&sp54, &this->armTip);
|
||||
tmp16 = sp6C - this->actor.shape.rot.y;
|
||||
|
||||
if ((ABS(tmp16) <= 0x4650 || this->burst) && !(sBodyState & 0x80) && !(player->stateFlags1 & 0x04000000)) {
|
||||
if ((ABS(tmp16) <= 0x4650 || this->burst) && !(sBodyState & 0x80) && !(player->stateFlags1 & PLAYER_STATE1_26)) {
|
||||
if (!this->burst) {
|
||||
|
||||
sp68 = sp6C - this->actor.shape.rot.y;
|
||||
@ -2322,7 +2322,7 @@ void BossVa_ZapperEnraged(BossVa* this, GlobalContext* globalCtx) {
|
||||
this->timer2 = 0;
|
||||
}
|
||||
|
||||
if ((this->timer2 < 0) && (player->stateFlags1 & 0x4000000)) {
|
||||
if ((this->timer2 < 0) && (player->stateFlags1 & PLAYER_STATE1_26)) {
|
||||
BossVa_Spark(globalCtx, this, 1, 30, 0.0f, 0, SPARK_LINK, 0.0f, true);
|
||||
}
|
||||
}
|
||||
|
@ -127,8 +127,8 @@ void DoorAna_WaitOpen(DoorAna* this, GlobalContext* globalCtx) {
|
||||
|
||||
player = GET_PLAYER(globalCtx);
|
||||
if (Math_StepToF(&this->actor.scale.x, 0.01f, 0.001f)) {
|
||||
if ((this->actor.targetMode != 0) && (globalCtx->sceneLoadFlag == 0) && (player->stateFlags1 & 0x80000000) &&
|
||||
(player->unk_84F == 0)) {
|
||||
if ((this->actor.targetMode != 0) && (globalCtx->sceneLoadFlag == 0) &&
|
||||
(player->stateFlags1 & PLAYER_STATE1_31) && (player->unk_84F == 0)) {
|
||||
destinationIdx = ((this->actor.params >> 0xC) & 7) - 1;
|
||||
Gameplay_SetupRespawnPoint(globalCtx, RESPAWN_MODE_RETURN, 0x4FF);
|
||||
gSaveContext.respawn[RESPAWN_MODE_RETURN].pos.y = this->actor.world.pos.y;
|
||||
@ -140,10 +140,10 @@ void DoorAna_WaitOpen(DoorAna* this, GlobalContext* globalCtx) {
|
||||
globalCtx->nextEntranceIndex = entrances[destinationIdx];
|
||||
DoorAna_SetupAction(this, DoorAna_GrabPlayer);
|
||||
} else {
|
||||
if (!Player_InCsMode(globalCtx) && !(player->stateFlags1 & 0x8800000) &&
|
||||
if (!Player_InCsMode(globalCtx) && !(player->stateFlags1 & (PLAYER_STATE1_23 | PLAYER_STATE1_27)) &&
|
||||
this->actor.xzDistToPlayer <= 15.0f && -50.0f <= this->actor.yDistToPlayer &&
|
||||
this->actor.yDistToPlayer <= 15.0f) {
|
||||
player->stateFlags1 |= 0x80000000;
|
||||
player->stateFlags1 |= PLAYER_STATE1_31;
|
||||
this->actor.targetMode = 1;
|
||||
} else {
|
||||
this->actor.targetMode = 0;
|
||||
|
@ -552,7 +552,7 @@ void func_80997220(DoorShutter* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
this->unk_164 = 0;
|
||||
this->dyna.actor.velocity.y = 0.0f;
|
||||
if (DoorShutter_SetupDoor(this, globalCtx) && !(player->stateFlags1 & 0x800)) {
|
||||
if (DoorShutter_SetupDoor(this, globalCtx) && !(player->stateFlags1 & PLAYER_STATE1_11)) {
|
||||
DoorShutter_SetupAction(this, func_80997568);
|
||||
func_8002DF54(globalCtx, NULL, 2);
|
||||
}
|
||||
@ -636,7 +636,8 @@ void DoorShutter_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
DoorShutter* this = (DoorShutter*)thisx;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (!(player->stateFlags1 & 0x100004C0) || (this->actionFunc == DoorShutter_SetupType)) {
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_10 | PLAYER_STATE1_28)) ||
|
||||
(this->actionFunc == DoorShutter_SetupType)) {
|
||||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ void EffDust_UpdateFunc_8099DFC0(EffDust* this, GlobalContext* globalCtx) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
if (parent == NULL || parent->update == NULL || !(player->stateFlags1 & 0x1000)) {
|
||||
if (parent == NULL || parent->update == NULL || !(player->stateFlags1 & PLAYER_STATE1_12)) {
|
||||
if (this->life != 0) {
|
||||
this->life -= 1;
|
||||
} else {
|
||||
|
@ -689,7 +689,7 @@ void EnAm_Statue(EnAm* this, GlobalContext* globalCtx) {
|
||||
((this->hurtCollider.base.ocFlags1 & OC1_HIT) && (ABS(moveDir) <= 0x2000))) {
|
||||
|
||||
this->unk_258 = 0;
|
||||
player->stateFlags2 &= ~0x151;
|
||||
player->stateFlags2 &= ~(PLAYER_STATE2_0 | PLAYER_STATE2_4 | PLAYER_STATE2_6 | PLAYER_STATE2_8);
|
||||
player->actor.speedXZ = 0.0f;
|
||||
this->dyna.unk_150 = this->dyna.unk_154 = 0.0f;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ void EnBa_Idle(EnBa* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
this->unk2A8[13].x = this->unk2A8[12].x;
|
||||
this->unk2A8[13].y = this->unk2A8[12].y;
|
||||
if (!(player->stateFlags1 & 0x4000000) && (this->actor.xzDistToPlayer <= 175.0f) &&
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_26) && (this->actor.xzDistToPlayer <= 175.0f) &&
|
||||
(this->actor.world.pos.y == this->actor.home.pos.y + 100.0f)) {
|
||||
EnBa_SetupSwingAtPlayer(this);
|
||||
}
|
||||
@ -290,7 +290,7 @@ void EnBa_SwingAtPlayer(EnBa* this, GlobalContext* globalCtx) {
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]);
|
||||
}
|
||||
this->unk31A--;
|
||||
} else if ((this->actor.xzDistToPlayer > 175.0f) || (player->stateFlags1 & 0x4000000)) {
|
||||
} else if ((this->actor.xzDistToPlayer > 175.0f) || (player->stateFlags1 & PLAYER_STATE1_26)) {
|
||||
EnBa_SetupIdle(this);
|
||||
} else {
|
||||
EnBa_SetupSwingAtPlayer(this);
|
||||
@ -309,7 +309,7 @@ void EnBa_SwingAtPlayer(EnBa* this, GlobalContext* globalCtx) {
|
||||
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
return;
|
||||
}
|
||||
if ((this->actor.xzDistToPlayer > 175.0f) || (player->stateFlags1 & 0x4000000)) {
|
||||
if ((this->actor.xzDistToPlayer > 175.0f) || (player->stateFlags1 & PLAYER_STATE1_26)) {
|
||||
EnBa_SetupIdle(this);
|
||||
} else {
|
||||
EnBa_SetupSwingAtPlayer(this);
|
||||
|
@ -83,7 +83,7 @@ void EnBlkobj_Wait(EnBlkobj* this, GlobalContext* globalCtx) {
|
||||
if (this->dyna.actor.xzDistToPlayer < 120.0f) {
|
||||
EnBlkobj_SetupAction(this, EnBlkobj_SpawnDarkLink);
|
||||
}
|
||||
player->stateFlags2 |= 0x04000000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_26;
|
||||
}
|
||||
|
||||
void EnBlkobj_SpawnDarkLink(EnBlkobj* this, GlobalContext* globalCtx) {
|
||||
|
@ -206,11 +206,11 @@ void EnBom_Explode(EnBom* this, GlobalContext* globalCtx) {
|
||||
if (this->timer == 0) {
|
||||
player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((player->stateFlags1 & 0x800) && (player->heldActor == &this->actor)) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_11) && (player->heldActor == &this->actor)) {
|
||||
player->actor.child = NULL;
|
||||
player->heldActor = NULL;
|
||||
player->interactRangeActor = NULL;
|
||||
player->stateFlags1 &= ~0x800;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_11;
|
||||
}
|
||||
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -181,10 +181,10 @@ void EnBomBowlPit_GivePrize(EnBomBowlPit* this, GlobalContext* globalCtx) {
|
||||
this->getItemId = GI_BOMB_BAG_40;
|
||||
}
|
||||
|
||||
player->stateFlags1 &= ~0x20000000;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_29;
|
||||
this->actor.parent = NULL;
|
||||
func_8002F434(&this->actor, globalCtx, this->getItemId, 2000.0f, 1000.0f);
|
||||
player->stateFlags1 |= 0x20000000;
|
||||
player->stateFlags1 |= PLAYER_STATE1_29;
|
||||
this->actionFunc = EnBomBowlPit_WaitTillPrizeGiven;
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) {
|
||||
player->heldActor = NULL;
|
||||
player->interactRangeActor = NULL;
|
||||
this->actor.parent = NULL;
|
||||
player->stateFlags1 &= ~0x800;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_11;
|
||||
}
|
||||
} else if (this->bombCollider.base.acFlags & AC_HIT) {
|
||||
this->bombCollider.base.acFlags &= ~AC_HIT;
|
||||
@ -199,7 +199,7 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) {
|
||||
player->heldActor = NULL;
|
||||
player->interactRangeActor = NULL;
|
||||
this->actor.parent = NULL;
|
||||
player->stateFlags1 &= ~0x800;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_11;
|
||||
this->actor.world.pos = this->actor.home.pos;
|
||||
}
|
||||
}
|
||||
@ -217,7 +217,7 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) {
|
||||
player->heldActor = NULL;
|
||||
player->interactRangeActor = NULL;
|
||||
this->actor.parent = NULL;
|
||||
player->stateFlags1 &= ~0x800;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_11;
|
||||
this->actor.world.pos = this->actor.home.pos;
|
||||
}
|
||||
}
|
||||
@ -301,11 +301,11 @@ void EnBombf_Explode(EnBombf* this, GlobalContext* globalCtx) {
|
||||
if (this->timer == 0) {
|
||||
player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((player->stateFlags1 & 0x800) && (player->heldActor == &this->actor)) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_11) && (player->heldActor == &this->actor)) {
|
||||
player->actor.child = NULL;
|
||||
player->heldActor = NULL;
|
||||
player->interactRangeActor = NULL;
|
||||
player->stateFlags1 &= ~0x800;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_11;
|
||||
}
|
||||
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -186,7 +186,7 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
// Set player flags and kill the boomerang beacause Link caught it.
|
||||
player->stateFlags1 &= ~0x02000000;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_25;
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
} else {
|
||||
@ -240,7 +240,7 @@ void EnBoom_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnBoom* this = (EnBoom*)thisx;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (!(player->stateFlags1 & 0x20000000)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_29)) {
|
||||
this->actionFunc(this, globalCtx);
|
||||
Actor_SetFocus(&this->actor, 0.0f);
|
||||
this->activeTimer = this->activeTimer + 1;
|
||||
|
@ -293,8 +293,8 @@ void func_809C9700(EnBox* this, GlobalContext* globalCtx) {
|
||||
this->unk_1FB = ENBOX_STATE_0;
|
||||
} else {
|
||||
if (this->unk_1FB == ENBOX_STATE_0) {
|
||||
if (!(player->stateFlags2 & 0x1000000)) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_24)) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
return;
|
||||
}
|
||||
this->unk_1FB = ENBOX_STATE_1;
|
||||
|
@ -354,7 +354,8 @@ void func_809CEA24(EnBw* this, GlobalContext* globalCtx) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_236 + this->unk_238, 1,
|
||||
this->actor.speedXZ * 1000.0f, 0);
|
||||
}
|
||||
if ((this->unk_224 == 0) || (ABS(this->actor.yDistToPlayer) > 60.0f) || (player2->stateFlags1 & 0x6000)) {
|
||||
if ((this->unk_224 == 0) || (ABS(this->actor.yDistToPlayer) > 60.0f) ||
|
||||
(player2->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14))) {
|
||||
this->unk_221 = 3;
|
||||
this->unk_224 = 150;
|
||||
this->unk_250 = 0.0f;
|
||||
|
@ -276,7 +276,7 @@ void EnCrow_FlyIdle(EnCrow* this, GlobalContext* globalCtx) {
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
}
|
||||
if ((this->timer == 0) && (this->actor.xzDistToPlayer < 300.0f) && !(player->stateFlags1 & 0x00800000) &&
|
||||
if ((this->timer == 0) && (this->actor.xzDistToPlayer < 300.0f) && !(player->stateFlags1 & PLAYER_STATE1_23) &&
|
||||
(this->actor.yDistToWater < -40.0f) && (Player_GetMask(globalCtx) != PLAYER_MASK_SKULL)) {
|
||||
EnCrow_SetupDiveAttack(this);
|
||||
}
|
||||
@ -314,7 +314,7 @@ void EnCrow_DiveAttack(EnCrow* this, GlobalContext* globalCtx) {
|
||||
|
||||
if ((this->timer == 0) || (Player_GetMask(globalCtx) == PLAYER_MASK_SKULL) ||
|
||||
(this->collider.base.atFlags & AT_HIT) || (this->actor.bgCheckFlags & 9) ||
|
||||
(player->stateFlags1 & 0x00800000) || (this->actor.yDistToWater > -40.0f)) {
|
||||
(player->stateFlags1 & PLAYER_STATE1_23) || (this->actor.yDistToWater > -40.0f)) {
|
||||
if (this->collider.base.atFlags & AT_HIT) {
|
||||
this->collider.base.atFlags &= ~AT_HIT;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_KAICHO_ATTACK);
|
||||
|
@ -227,7 +227,7 @@ void EnDha_Wait(EnDha* this, GlobalContext* globalCtx) {
|
||||
this->timer += 0x1194;
|
||||
this->limbAngleY = Math_SinS(this->timer) * 1820.0f;
|
||||
|
||||
if (!(player->stateFlags2 & 0x80)) {
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_7)) {
|
||||
this->unk_1CC = 0;
|
||||
EnDha_SetupTakeDamage(this);
|
||||
return;
|
||||
@ -242,8 +242,8 @@ void EnDha_Wait(EnDha* this, GlobalContext* globalCtx) {
|
||||
this->handAngle.y -= this->actor.shape.rot.y + this->limbAngleY;
|
||||
this->handAngle.x -= this->actor.shape.rot.x + this->limbAngleX[0] + this->limbAngleX[1];
|
||||
} else {
|
||||
if ((player->stateFlags2 & 0x80) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
}
|
||||
@ -282,8 +282,8 @@ void EnDha_Wait(EnDha* this, GlobalContext* globalCtx) {
|
||||
this->limbAngleX[1] *= -2;
|
||||
}
|
||||
} else {
|
||||
if ((player->stateFlags2 & 0x80) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
}
|
||||
@ -303,8 +303,8 @@ void EnDha_SetupTakeDamage(EnDha* this) {
|
||||
void EnDha_TakeDamage(EnDha* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((player->stateFlags2 & 0x80) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
}
|
||||
@ -341,8 +341,8 @@ void EnDha_Die(EnDha* this, GlobalContext* globalCtx) {
|
||||
Vec3f vec;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((player->stateFlags2 & 0x80) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
}
|
||||
|
@ -405,7 +405,7 @@ void func_809EFF50(EnDns* this, GlobalContext* globalCtx) {
|
||||
void func_809EFF98(EnDns* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (player->stateFlags1 & 0x400) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_10) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->dnsItemEntry->setRupeesAndFlags(this);
|
||||
this->dropCollectible = 1;
|
||||
|
@ -117,7 +117,7 @@ void EnDntJiji_Wait(EnDntJiji* this, GlobalContext* globalCtx) {
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((this->timer == 1) && (this->actor.xzDistToPlayer < 150.0f) && !Gameplay_InCsMode(globalCtx) &&
|
||||
!(player->stateFlags1 & 0x800)) {
|
||||
!(player->stateFlags1 & PLAYER_STATE1_11)) {
|
||||
OnePointCutscene_Init(globalCtx, 2230, -99, &this->actor, MAIN_CAM);
|
||||
this->timer = 0;
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
|
@ -192,7 +192,7 @@ void EnDoor_Idle(EnDoor* this, GlobalContext* globalCtx) {
|
||||
if (this->playerIsOpening != 0) {
|
||||
this->actionFunc = EnDoor_Open;
|
||||
Animation_PlayOnceSetSpeed(&this->skelAnime, D_809FCECC[this->animStyle],
|
||||
(player->stateFlags1 & 0x8000000) ? 0.75f : 1.5f);
|
||||
(player->stateFlags1 & PLAYER_STATE1_27) ? 0.75f : 1.5f);
|
||||
if (this->lockTimer != 0) {
|
||||
gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex]--;
|
||||
Flags_SetSwitch(globalCtx, this->actor.params & 0x3F);
|
||||
|
@ -320,9 +320,9 @@ void func_809FE3B4(EnDu* this, GlobalContext* globalCtx) {
|
||||
void func_809FE3C0(EnDu* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
func_8010BD88(globalCtx, OCARINA_ACTION_CHECK_SARIA);
|
||||
player->stateFlags2 |= 0x2000000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_25;
|
||||
player->unk_6A8 = &this->actor;
|
||||
EnDu_SetupAction(this, func_809FE4A4);
|
||||
return;
|
||||
@ -332,7 +332,7 @@ void func_809FE3C0(EnDu* this, GlobalContext* globalCtx) {
|
||||
this->unk_1F4.unk_00 = 0;
|
||||
}
|
||||
if (this->actor.xzDistToPlayer < 116.0f + this->collider.dim.radius) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
|
||||
@ -356,14 +356,14 @@ void func_809FE4A4(EnDu* this, GlobalContext* globalCtx) {
|
||||
EnDu_SetupAction(this, func_809FE890);
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
|
||||
void func_809FE638(EnDu* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (!(player->stateFlags1 & 0x20000000)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_29)) {
|
||||
OnePointCutscene_Init(globalCtx, 3330, -99, &this->actor, MAIN_CAM);
|
||||
player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.world.rot.y + 0x7FFF;
|
||||
Audio_PlayFanfare(NA_BGM_APPEAR);
|
||||
|
@ -1081,13 +1081,13 @@ void func_80A0461C(EnElf* this, GlobalContext* globalCtx) {
|
||||
} else {
|
||||
arrowPointedActor = globalCtx->actorCtx.targetCtx.arrowPointedActor;
|
||||
|
||||
if ((player->stateFlags1 & 0x400) || ((YREG(15) & 0x10) && func_800BC56C(globalCtx, 2))) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_10) || ((YREG(15) & 0x10) && func_800BC56C(globalCtx, 2))) {
|
||||
temp = 12;
|
||||
this->unk_2C0 = 100;
|
||||
} else if (arrowPointedActor == NULL || arrowPointedActor->category == ACTORCAT_NPC) {
|
||||
if (arrowPointedActor != NULL) {
|
||||
this->unk_2C0 = 100;
|
||||
player->stateFlags2 |= 0x100000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_20;
|
||||
temp = 0;
|
||||
} else {
|
||||
switch (this->unk_2A8) {
|
||||
@ -1108,7 +1108,7 @@ void func_80A0461C(EnElf* this, GlobalContext* globalCtx) {
|
||||
this->unk_2AE--;
|
||||
temp = 7;
|
||||
} else {
|
||||
player->stateFlags2 |= 0x100000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_20;
|
||||
temp = 0;
|
||||
}
|
||||
} else {
|
||||
@ -1138,7 +1138,7 @@ void func_80A0461C(EnElf* this, GlobalContext* globalCtx) {
|
||||
|
||||
switch (temp) {
|
||||
case 0:
|
||||
if (!(player->stateFlags2 & 0x100000)) {
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_20)) {
|
||||
temp = 7;
|
||||
if (this->unk_2C7 == 0) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_NAVY_VANISH);
|
||||
@ -1146,7 +1146,7 @@ void func_80A0461C(EnElf* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (player->stateFlags2 & 0x100000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_20) {
|
||||
func_80A0299C(this, 0x32);
|
||||
this->unk_2C0 = 42;
|
||||
temp = 11;
|
||||
@ -1156,10 +1156,10 @@ void func_80A0461C(EnElf* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
player->stateFlags2 &= ~0x100000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_20;
|
||||
break;
|
||||
default:
|
||||
player->stateFlags2 |= 0x100000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_20;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1498,7 +1498,7 @@ void EnElf_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((this->unk_2A8 != 8) && !(this->fairyFlags & 8)) {
|
||||
if (!(player->stateFlags1 & 0x100000) || (kREG(90) < this->actor.projectedPos.z)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_20) || (kREG(90) < this->actor.projectedPos.z)) {
|
||||
dListHead = Graph_Alloc(globalCtx->state.gfxCtx, sizeof(Gfx) * 4);
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_elf.c", 2730);
|
||||
|
@ -242,7 +242,7 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, GlobalContext* globalCt
|
||||
while ((this->curNumSpawn < this->maxCurSpawns) && (this->totalNumSpawn < this->maxTotalSpawns)) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT00) {
|
||||
if ((player->unk_89E == 0) || (player->actor.floorBgId != BGCHECK_SCENE) ||
|
||||
!(player->actor.bgCheckFlags & 1) || (player->stateFlags1 & 0x08000000)) {
|
||||
!(player->actor.bgCheckFlags & 1) || (player->stateFlags1 & PLAYER_STATE1_27)) {
|
||||
|
||||
this->fieldSpawnTimer = 60;
|
||||
break;
|
||||
|
@ -469,7 +469,7 @@ void EnFhgFire_EnergyBall(EnFhgFire* this, GlobalContext* globalCtx) {
|
||||
switch (this->work[FHGFIRE_FIRE_MODE]) {
|
||||
case FHGFIRE_LIGHT_GREEN:
|
||||
canBottleReflect1 =
|
||||
((player->stateFlags1 & 2) &&
|
||||
((player->stateFlags1 & PLAYER_STATE1_1) &&
|
||||
(ABS((s16)(player->actor.shape.rot.y - (s16)(bossGnd->actor.yawTowardsPlayer + 0x8000))) <
|
||||
0x2000) &&
|
||||
(sqrtf(SQ(dxL) + SQ(dyL) + SQ(dzL)) <= 25.0f))
|
||||
|
@ -361,7 +361,7 @@ void EnFireRock_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
if (this->collider.base.atFlags & 2) {
|
||||
this->collider.base.atFlags &= ~2;
|
||||
if (this->collider.base.at == playerActor) {
|
||||
if (!(player->stateFlags1 & 0x04000000)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_26)) {
|
||||
func_8002F758(globalCtx, thisx, 2.0f, -player->actor.world.rot.y, 3.0f, 4);
|
||||
}
|
||||
return;
|
||||
|
@ -791,7 +791,7 @@ void EnFloormas_GrabLink(EnFloormas* this, GlobalContext* globalCtx) {
|
||||
this->actor.world.pos.z = Math_CosS(this->actor.shape.rot.y) * (xzDelta * 0.1f) + player->actor.world.pos.z;
|
||||
|
||||
// let go
|
||||
if (!(player->stateFlags2 & 0x80) || (player->invincibilityTimer < 0)) {
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_7) || (player->invincibilityTimer < 0)) {
|
||||
parent = (EnFloormas*)this->actor.parent;
|
||||
child = (EnFloormas*)this->actor.child;
|
||||
|
||||
|
@ -597,7 +597,7 @@ s32 EnFr_SetupJumpingUp(EnFr* this, s32 frogIndex) {
|
||||
void EnFr_Idle(EnFr* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (player->stateFlags2 & 0x2000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_25) {
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04) {
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
}
|
||||
|
@ -178,17 +178,17 @@ void func_80A1DBD4(EnFu* this, GlobalContext* globalCtx) {
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
gSaveContext.eventChkInf[6] |= 0x20;
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_02) {
|
||||
player->stateFlags2 &= ~0x1000000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_24;
|
||||
this->actionFunc = EnFu_WaitAdult;
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
|
||||
void EnFu_WaitForPlayback(EnFu* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
// if dialog state is 7, player has played back the song
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_SONG_DEMO_DONE) {
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_PLAYBACK_STORMS);
|
||||
@ -199,7 +199,7 @@ void EnFu_WaitForPlayback(EnFu* this, GlobalContext* globalCtx) {
|
||||
void EnFu_TeachSong(EnFu* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
// if dialog state is 2, start song demonstration
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
this->behaviorFlags &= ~FU_WAIT;
|
||||
@ -216,7 +216,7 @@ void EnFu_WaitAdult(EnFu* this, GlobalContext* globalCtx) {
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
if ((gSaveContext.eventChkInf[5] & 0x800)) {
|
||||
func_80A1D94C(this, globalCtx, 0x508E, func_80A1DBA0);
|
||||
} else if (player->stateFlags2 & 0x1000000) {
|
||||
} else if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
this->actor.textId = 0x5035;
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->actionFunc = EnFu_TeachSong;
|
||||
@ -227,7 +227,7 @@ void EnFu_WaitAdult(EnFu* this, GlobalContext* globalCtx) {
|
||||
if (this->actor.xzDistToPlayer < 100.0f) {
|
||||
this->actor.textId = 0x5034;
|
||||
func_8002F2CC(&this->actor, globalCtx, 100.0f);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -587,7 +587,7 @@ void EnGe1_BeginGame_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
gSaveContext.eventInf[0] |= 0x100;
|
||||
gSaveContext.eventChkInf[6] |= 0x100;
|
||||
|
||||
if (!(player->stateFlags1 & 0x800000)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_23)) {
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
} else {
|
||||
horse = Actor_FindNearby(globalCtx, &player->actor, ACTOR_EN_HORSE, ACTORCAT_BG, 1200.0f);
|
||||
@ -667,7 +667,7 @@ void EnGe1_Wait_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
u16 textId;
|
||||
|
||||
if (!(player->stateFlags1 & 0x800000)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_23)) {
|
||||
EnGe1_SetTalkAction(this, globalCtx, 0x603F, 100.0f, EnGe1_TalkNoHorse_Archery);
|
||||
} else {
|
||||
if (gSaveContext.eventChkInf[6] & 0x100) {
|
||||
|
@ -725,7 +725,7 @@ void EnGoroiwa_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
s32 sp30;
|
||||
|
||||
if (!(player->stateFlags1 & 0x300000C0)) {
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
|
||||
if (this->collisionDisabledTimer > 0) {
|
||||
this->collisionDisabledTimer--;
|
||||
}
|
||||
|
@ -143,8 +143,8 @@ void func_80A4E470(EnGs* this, GlobalContext* globalCtx) {
|
||||
if (this->actor.xzDistToPlayer <= 100.0f) {
|
||||
bREG(15) = 1;
|
||||
if (this->unk_19D == 0) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_FREE_PLAY);
|
||||
this->unk_19D |= 1;
|
||||
}
|
||||
@ -167,7 +167,7 @@ void func_80A4E470(EnGs* this, GlobalContext* globalCtx) {
|
||||
this->unk_19D = 0;
|
||||
Flags_SetSwitch(globalCtx, (this->actor.params >> 8) & 0x3F);
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -722,9 +722,9 @@ void EnHorse_ResetRace(EnHorse* this, GlobalContext* globalCtx) {
|
||||
s32 EnHorse_PlayerCanMove(EnHorse* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((player->stateFlags1 & 1) || func_8002DD78(GET_PLAYER(globalCtx)) == 1 || (player->stateFlags1 & 0x100000) ||
|
||||
((this->stateFlags & ENHORSE_FLAG_19) && !this->inRace) || this->action == ENHORSE_ACT_HBA ||
|
||||
player->actor.flags & ACTOR_FLAG_8 || globalCtx->csCtx.state != 0) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_0) || func_8002DD78(GET_PLAYER(globalCtx)) == 1 ||
|
||||
(player->stateFlags1 & PLAYER_STATE1_20) || ((this->stateFlags & ENHORSE_FLAG_19) && !this->inRace) ||
|
||||
this->action == ENHORSE_ACT_HBA || player->actor.flags & ACTOR_FLAG_8 || globalCtx->csCtx.state != 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -3531,7 +3531,7 @@ void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->cyl1.base);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->cyl1.base);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->cyl2.base);
|
||||
if ((player->stateFlags1 & 1) && player->rideActor != NULL) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_0) && player->rideActor != NULL) {
|
||||
if (globalCtx->sceneNum != SCENE_SPOT20 ||
|
||||
(globalCtx->sceneNum == SCENE_SPOT20 && (thisx->world.pos.z < -2400.0f))) {
|
||||
EnHorse_UpdateConveyors(this, globalCtx);
|
||||
|
@ -143,7 +143,7 @@ u16 func_80A79010(GlobalContext* globalCtx) {
|
||||
}
|
||||
switch (gSaveContext.eventInf[0] & 0xF) {
|
||||
case 1:
|
||||
if (!(player->stateFlags1 & 0x800000)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_23)) {
|
||||
return 0x2036;
|
||||
} else if (gSaveContext.eventChkInf[1] & 0x800) {
|
||||
if (gSaveContext.infTable[10] & 4) {
|
||||
@ -653,7 +653,7 @@ void func_80A7A568(EnIn* this, GlobalContext* globalCtx) {
|
||||
s32 phi_a2;
|
||||
s32 phi_a3;
|
||||
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x800) && (player->stateFlags1 & 0x800000)) {
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x800) && (player->stateFlags1 & PLAYER_STATE1_23)) {
|
||||
gSaveContext.infTable[10] |= 0x800;
|
||||
}
|
||||
if (gSaveContext.timer1State == 10) {
|
||||
|
@ -212,18 +212,18 @@ void func_80A8F75C(EnKakasi* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (absyawTowardsPlayer < 0x4300) {
|
||||
if (!this->unk_194) {
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
this->camId = OnePointCutscene_Init(globalCtx, 2260, -99, &this->actor, MAIN_CAM);
|
||||
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_SCARECROW_LONG_RECORDING);
|
||||
this->unk_19A = 0;
|
||||
this->unk_1B8 = 0.0;
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
this->actionFunc = func_80A8F8D0;
|
||||
return;
|
||||
}
|
||||
if (this->actor.xzDistToPlayer < 80.0f) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
func_8002F2CC(&this->actor, globalCtx, 100.0f);
|
||||
@ -252,7 +252,7 @@ void func_80A8F8D0(EnKakasi* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
func_80A8F320(this, globalCtx, 0);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -231,33 +231,33 @@ void func_80A91348(EnKakasi3* this, GlobalContext* globalCtx) {
|
||||
if (absAngleTowardsLink < 0x4300) {
|
||||
if (!this->unk_194) {
|
||||
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
this->camId = OnePointCutscene_Init(globalCtx, 2260, -99, &this->actor, MAIN_CAM);
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
this->unk_1B8 = 0.0f;
|
||||
Message_StartTextbox(globalCtx, 0x40A4, NULL);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
this->actionFunc = func_80A915B8;
|
||||
return;
|
||||
}
|
||||
if (this->actor.xzDistToPlayer < 80.0f) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
} else if (gSaveContext.scarecrowSpawnSongSet && !this->unk_195) {
|
||||
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
this->camId = OnePointCutscene_Init(globalCtx, 2260, -99, &this->actor, MAIN_CAM);
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
this->unk_1B8 = 0.0f;
|
||||
Message_StartTextbox(globalCtx, 0x40A8, NULL);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
this->actionFunc = func_80A9187C;
|
||||
return;
|
||||
}
|
||||
if (this->actor.xzDistToPlayer < 80.0f) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
func_8002F2CC(&this->actor, globalCtx, 100.0f);
|
||||
@ -302,7 +302,7 @@ void func_80A91620(EnKakasi3* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
func_80A90EBC(this, globalCtx, 0);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
|
||||
@ -376,7 +376,7 @@ void func_80A918E4(EnKakasi3* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
func_80A90EBC(this, globalCtx, 0);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ void EnMThunder_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
Actor_SetScale(&this->actor, 0.1f);
|
||||
this->unk_1CA = 0;
|
||||
|
||||
if (player->stateFlags2 & 0x20000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_17) {
|
||||
if (!gSaveContext.magicAcquired || gSaveContext.unk_13F0 ||
|
||||
(((this->actor.params & 0xFF00) >> 8) &&
|
||||
!(func_80087708(globalCtx, (this->actor.params & 0xFF00) >> 8, 0)))) {
|
||||
@ -95,7 +95,7 @@ void EnMThunder_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
return;
|
||||
}
|
||||
|
||||
player->stateFlags2 &= ~0x20000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_17;
|
||||
this->unk_1CA = 1;
|
||||
this->collider.info.toucher.dmgFlags = D_80AA044C[this->unk_1C7];
|
||||
this->unk_1C6 = 1;
|
||||
@ -130,7 +130,7 @@ void func_80A9F314(GlobalContext* globalCtx, f32 arg1) {
|
||||
void func_80A9F350(EnMThunder* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (player->stateFlags2 & 0x20000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_17) {
|
||||
if (player->swordAnimation >= 0x18) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_ROLLING_CUT, &player->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
@ -142,7 +142,7 @@ void func_80A9F350(EnMThunder* this, GlobalContext* globalCtx) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(player->stateFlags1 & 0x1000)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_12)) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
@ -175,7 +175,7 @@ void func_80A9F408(EnMThunder* this, GlobalContext* globalCtx) {
|
||||
func_800AA000(0.0f, (s32)(player->unk_858 * 150.0f) & 0xFF, 2, (s32)(player->unk_858 * 150.0f) & 0xFF);
|
||||
}
|
||||
|
||||
if (player->stateFlags2 & 0x20000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_17) {
|
||||
if ((child != NULL) && (child->update != NULL)) {
|
||||
child->parent = NULL;
|
||||
}
|
||||
@ -190,7 +190,7 @@ void func_80A9F408(EnMThunder* this, GlobalContext* globalCtx) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x20000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_17;
|
||||
if ((this->actor.params & 0xFF00) >> 8) {
|
||||
gSaveContext.unk_13F0 = 1;
|
||||
}
|
||||
@ -213,7 +213,7 @@ void func_80A9F408(EnMThunder* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!(player->stateFlags1 & 0x1000)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_12)) {
|
||||
if (this->actor.child != NULL) {
|
||||
this->actor.child->parent = NULL;
|
||||
}
|
||||
|
@ -350,8 +350,8 @@ void func_80AA0F44(EnMa1* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[1] & 0x40) {
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
player->stateFlags2 |= 0x2000000;
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_25;
|
||||
player->unk_6A8 = &this->actor;
|
||||
this->actor.textId = 0x2061;
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
@ -359,13 +359,13 @@ void func_80AA0F44(EnMa1* this, GlobalContext* globalCtx) {
|
||||
this->actor.flags |= ACTOR_FLAG_16;
|
||||
this->actionFunc = func_80AA106C;
|
||||
} else if (this->actor.xzDistToPlayer < 30.0f + (f32)this->collider.dim.radius) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AA106C(EnMa1* this, GlobalContext* globalCtx) {
|
||||
GET_PLAYER(globalCtx)->stateFlags2 |= 0x800000;
|
||||
GET_PLAYER(globalCtx)->stateFlags2 |= PLAYER_STATE2_23;
|
||||
if (this->unk_1E8.unk_00 == 2) {
|
||||
Audio_OcaSetInstrument(2);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_TEACH_EPONA);
|
||||
@ -375,7 +375,7 @@ void func_80AA106C(EnMa1* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_80AA10EC(EnMa1* this, GlobalContext* globalCtx) {
|
||||
GET_PLAYER(globalCtx)->stateFlags2 |= 0x800000;
|
||||
GET_PLAYER(globalCtx)->stateFlags2 |= PLAYER_STATE2_23;
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_SONG_DEMO_DONE) {
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_PLAYBACK_EPONA);
|
||||
this->actionFunc = func_80AA1150;
|
||||
@ -383,7 +383,7 @@ void func_80AA10EC(EnMa1* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_80AA1150(EnMa1* this, GlobalContext* globalCtx) {
|
||||
GET_PLAYER(globalCtx)->stateFlags2 |= 0x800000;
|
||||
GET_PLAYER(globalCtx)->stateFlags2 |= PLAYER_STATE2_23;
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03) {
|
||||
globalCtx->nextEntranceIndex = 0x157;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF1;
|
||||
|
@ -264,13 +264,13 @@ void func_80AA2018(EnMa2* this, GlobalContext* globalCtx) {
|
||||
void func_80AA204C(EnMa2* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
player->unk_6A8 = &this->actor;
|
||||
player->stateFlags2 |= 0x2000000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_25;
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_CHECK_EPONA);
|
||||
this->actionFunc = func_80AA20E4;
|
||||
} else if (this->actor.xzDistToPlayer < 30.0f + (f32)this->collider.dim.radius) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
|
||||
@ -287,7 +287,7 @@ void func_80AA20E4(EnMa2* this, GlobalContext* globalCtx) {
|
||||
this->actionFunc = func_80AA21C8;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
|
||||
@ -295,7 +295,7 @@ void func_80AA21C8(EnMa2* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (DECR(this->unk_208)) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
} else {
|
||||
if (this->unk_1E0.unk_00 == 0) {
|
||||
this->actor.flags |= ACTOR_FLAG_16;
|
||||
|
@ -97,7 +97,7 @@ u16 func_80AA2AA0(GlobalContext* globalCtx, Actor* thisx) {
|
||||
return 0x2004;
|
||||
}
|
||||
}
|
||||
if ((!(player->stateFlags1 & 0x800000)) &&
|
||||
if ((!(player->stateFlags1 & PLAYER_STATE1_23)) &&
|
||||
(Actor_FindNearby(globalCtx, thisx, ACTOR_EN_HORSE, 1, 1200.0f) == NULL)) {
|
||||
return 0x2001;
|
||||
}
|
||||
|
@ -601,8 +601,8 @@ void EnMb_SetupStunned(EnMb* this) {
|
||||
void EnMb_Stunned(EnMb* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((player->stateFlags2 & 0x80) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
func_8002F71C(globalCtx, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
@ -718,8 +718,8 @@ void EnMb_SpearPatrolEndCharge(EnMb* this, GlobalContext* globalCtx) {
|
||||
s16 relYawFromPlayer;
|
||||
s16 yawPlayerToWaypoint;
|
||||
|
||||
if ((player->stateFlags2 & 0x80) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
func_8002F71C(globalCtx, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
@ -908,7 +908,7 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (this->attackCollider.base.atFlags & AT_HIT) {
|
||||
if (this->attackCollider.base.at == &player->actor) {
|
||||
if (!endCharge && !(player->stateFlags2 & 0x80)) {
|
||||
if (!endCharge && !(player->stateFlags2 & PLAYER_STATE2_7)) {
|
||||
if (player->invincibilityTimer < 0) {
|
||||
if (player->invincibilityTimer < -39) {
|
||||
player->invincibilityTimer = 0;
|
||||
@ -930,7 +930,7 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((player->stateFlags2 & 0x80) && player->actor.parent == &this->actor) {
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
|
||||
player->actor.world.pos.x = this->actor.world.pos.x + Math_CosS(this->actor.shape.rot.y) * 10.0f +
|
||||
Math_SinS(this->actor.shape.rot.y) * 89.0f;
|
||||
hasHitPlayer = true;
|
||||
@ -942,10 +942,10 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (endCharge) {
|
||||
if (hasHitPlayer || (player->stateFlags2 & 0x80)) {
|
||||
if (hasHitPlayer || (player->stateFlags2 & PLAYER_STATE2_7)) {
|
||||
this->attackCollider.base.atFlags &= ~AT_HIT;
|
||||
if (player->stateFlags2 & 0x80) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if (player->stateFlags2 & PLAYER_STATE2_7) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
func_8002F71C(globalCtx, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
@ -977,7 +977,7 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (this->attackCollider.base.atFlags & AT_HIT) {
|
||||
if (this->attackCollider.base.at == &player->actor) {
|
||||
if (!endCharge && !(player->stateFlags2 & 0x80)) {
|
||||
if (!endCharge && !(player->stateFlags2 & PLAYER_STATE2_7)) {
|
||||
if (player->invincibilityTimer < 0) {
|
||||
if (player->invincibilityTimer <= -40) {
|
||||
player->invincibilityTimer = 0;
|
||||
@ -999,7 +999,7 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((player->stateFlags2 & 0x80) && player->actor.parent == &this->actor) {
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
|
||||
player->actor.world.pos.x = this->actor.world.pos.x + Math_CosS(this->actor.shape.rot.y) * 10.0f +
|
||||
Math_SinS(this->actor.shape.rot.y) * 89.0f;
|
||||
hasHitPlayer = true;
|
||||
@ -1011,10 +1011,10 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (endCharge) {
|
||||
if (hasHitPlayer || (player->stateFlags2 & 0x80)) {
|
||||
if (hasHitPlayer || (player->stateFlags2 & PLAYER_STATE2_7)) {
|
||||
this->attackCollider.base.atFlags &= ~AT_HIT;
|
||||
if (player->stateFlags2 & 0x80) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if (player->stateFlags2 & PLAYER_STATE2_7) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
func_8002F71C(globalCtx, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
@ -1236,7 +1236,7 @@ void EnMb_ClubWaitPlayerNear(EnMb* this, GlobalContext* globalCtx) {
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < this->playerDetectionRange &&
|
||||
!(player->stateFlags1 & 0x4000000) && ABS(relYawFromPlayer) < 0x3E80) {
|
||||
!(player->stateFlags1 & PLAYER_STATE1_26) && ABS(relYawFromPlayer) < 0x3E80) {
|
||||
EnMb_SetupClubAttack(this);
|
||||
}
|
||||
}
|
||||
@ -1295,8 +1295,8 @@ void EnMb_SpearDead(EnMb* this, GlobalContext* globalCtx) {
|
||||
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 0.5f, 0.0f);
|
||||
|
||||
if ((player->stateFlags2 & 0x80) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
func_8002F71C(globalCtx, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
@ -1378,8 +1378,8 @@ void EnMb_CheckColliding(EnMb* this, GlobalContext* globalCtx) {
|
||||
this->hitbox.base.acFlags &= ~AC_HIT;
|
||||
if (this->actor.colChkInfo.damageEffect != ENMB_DMGEFF_IGNORE &&
|
||||
this->actor.colChkInfo.damageEffect != ENMB_DMGEFF_FREEZE) {
|
||||
if ((player->stateFlags2 & 0x80) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
func_8002F71C(globalCtx, &this->actor, 6.0f, this->actor.world.rot.y, 6.0f);
|
||||
|
@ -735,8 +735,8 @@ void func_80AAB948(EnMd* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if ((this->unk_1E0.unk_00 == 0) && (globalCtx->sceneNum == SCENE_SPOT10)) {
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
player->stateFlags2 |= 0x2000000;
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_25;
|
||||
player->unk_6A8 = &this->actor;
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_CHECK_SARIA);
|
||||
this->actionFunc = func_80AABC10;
|
||||
@ -744,7 +744,7 @@ void func_80AAB948(EnMd* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (this->actor.xzDistToPlayer < (30.0f + this->collider.dim.radius)) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -763,7 +763,7 @@ void func_80AABC10(EnMd* this, GlobalContext* globalCtx) {
|
||||
this->actionFunc = func_80AAB948;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -307,13 +307,13 @@ void EnMk_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (this->flags & 8) {
|
||||
if (!(player->stateFlags2 & 0x400)) {
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_10)) {
|
||||
this->flags &= ~8;
|
||||
}
|
||||
} else {
|
||||
if (player->currentBoots == PLAYER_BOOTS_IRON) {
|
||||
this->flags |= 8;
|
||||
} else if (player->stateFlags2 & 0x400) {
|
||||
} else if (player->stateFlags2 & PLAYER_STATE2_10) {
|
||||
swimFlag = player->actor.yDistToWater;
|
||||
|
||||
if (swimFlag > 0) {
|
||||
|
@ -146,7 +146,8 @@ void EnNutsball_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
s32 pad;
|
||||
|
||||
if (!(player->stateFlags1 & 0x300000C0) || (this->actionFunc == func_80ABBB34)) {
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28 | PLAYER_STATE1_29)) ||
|
||||
(this->actionFunc == func_80ABBB34)) {
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
||||
Actor_MoveForward(&this->actor);
|
||||
|
@ -114,18 +114,18 @@ void func_80ABEF2C(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
} else {
|
||||
if ((this->ocarinaSong != 6) || (gSaveContext.scarecrowSpawnSongSet)) {
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
// "North! ! ! ! !"
|
||||
osSyncPrintf(VT_FGCOL(RED) "☆☆☆☆☆ 北!!!!! ☆☆☆☆☆ %f\n" VT_RST, this->actor.xzDistToPlayer);
|
||||
}
|
||||
if ((this->actor.xzDistToPlayer < (90.0f + this->interactRange)) &&
|
||||
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 80.0f)) {
|
||||
if (player->stateFlags2 & 0x2000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_25) {
|
||||
ocarinaSong = this->ocarinaSong;
|
||||
if (ocarinaSong == 6) {
|
||||
ocarinaSong = 0xA;
|
||||
}
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
func_8010BD58(globalCtx, ocarinaSong + OCARINA_ACTION_CHECK_SARIA);
|
||||
this->actionFunc = func_80ABF0CC;
|
||||
} else if ((this->actor.xzDistToPlayer < (50.0f + this->interactRange) &&
|
||||
@ -179,7 +179,7 @@ void func_80ABF0CC(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
this->actionFunc = func_80ABEF2C;
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -195,7 +195,7 @@ void func_80ABF28C(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
||||
((this->type != 6) || !(gSaveContext.eventChkInf[1] & 0x2000)) &&
|
||||
(this->actor.xzDistToPlayer < (90.0f + this->interactRange)) &&
|
||||
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 80.0f)) {
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
switch (this->type) {
|
||||
case 1:
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_CHECK_LULLABY);
|
||||
@ -216,12 +216,12 @@ void func_80ABF28C(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
||||
Actor_Kill(&this->actor);
|
||||
break;
|
||||
}
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
this->actionFunc = func_80ABF4C8;
|
||||
} else if ((this->actor.xzDistToPlayer < (50.0f + this->interactRange)) &&
|
||||
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 40.0f)) {
|
||||
this->unk_15A = 0;
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -272,7 +272,7 @@ void func_80ABF4C8(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -578,7 +578,7 @@ void EnOkuta_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
Vec3f sp38;
|
||||
s32 sp34;
|
||||
|
||||
if (!(player->stateFlags1 & 0x300000C0)) {
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
|
||||
if (this->actor.params == 0) {
|
||||
EnOkuta_ColliderCheck(this, globalCtx);
|
||||
if (!WaterBox_GetSurfaceImpl(globalCtx, &globalCtx->colCtx, this->actor.world.pos.x,
|
||||
|
@ -653,7 +653,7 @@ void EnOssan_EndInteraction(GlobalContext* globalCtx, EnOssan* this) {
|
||||
Actor_ProcessTalkRequest(&this->actor, globalCtx);
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
player->stateFlags2 &= ~0x20000000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_29;
|
||||
func_800BC490(globalCtx, 1);
|
||||
Interface_ChangeAlpha(50);
|
||||
this->drawCursor = 0;
|
||||
@ -737,7 +737,7 @@ void EnOssan_State_Idle(EnOssan* this, GlobalContext* globalCtx, Player* player)
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
// "Start conversation!!"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "★★★ 会話開始!! ★★★" VT_RST "\n");
|
||||
player->stateFlags2 |= 0x20000000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_29;
|
||||
func_800BC590(globalCtx);
|
||||
EnOssan_SetStateStartShopping(globalCtx, this, false);
|
||||
} else if (this->actor.xzDistToPlayer < 100.0f) {
|
||||
@ -1323,7 +1323,7 @@ void EnOssan_GiveItemWithFanfare(GlobalContext* globalCtx, EnOssan* this) {
|
||||
func_8002F434(&this->actor, globalCtx, this->shelfSlots[this->cursorIndex]->getItemId, 120.0f, 120.0f);
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
player->stateFlags2 &= ~0x20000000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_29;
|
||||
func_800BC490(globalCtx, 1);
|
||||
Interface_ChangeAlpha(50);
|
||||
this->drawCursor = 0;
|
||||
@ -1698,7 +1698,7 @@ void EnOssan_State_ContinueShoppingPrompt(EnOssan* this, GlobalContext* globalCt
|
||||
case 0:
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "★★★ 続けるよ!! ★★★" VT_RST "\n");
|
||||
player->actor.shape.rot.y += 0x8000;
|
||||
player->stateFlags2 |= 0x20000000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_29;
|
||||
func_800BC490(globalCtx, 2);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
|
||||
EnOssan_SetStateStartShopping(globalCtx, this, true);
|
||||
@ -1717,7 +1717,7 @@ void EnOssan_State_ContinueShoppingPrompt(EnOssan* this, GlobalContext* globalCt
|
||||
selectedItem = this->shelfSlots[this->cursorIndex];
|
||||
selectedItem->updateStockedItemFunc(globalCtx, selectedItem);
|
||||
player->actor.shape.rot.y += 0x8000;
|
||||
player->stateFlags2 |= 0x20000000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_29;
|
||||
func_800BC490(globalCtx, 2);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
|
||||
EnOssan_SetStateStartShopping(globalCtx, this, true);
|
||||
|
@ -379,7 +379,8 @@ void EnPoField_CorrectYPos(EnPoField* this, GlobalContext* globalCtx) {
|
||||
|
||||
f32 EnPoField_SetFleeSpeed(EnPoField* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
f32 speed = ((player->stateFlags1 & 0x800000) && player->rideActor != NULL) ? player->rideActor->speedXZ : 12.0f;
|
||||
f32 speed =
|
||||
((player->stateFlags1 & PLAYER_STATE1_23) && player->rideActor != NULL) ? player->rideActor->speedXZ : 12.0f;
|
||||
|
||||
if (this->actor.xzDistToPlayer < 300.0f) {
|
||||
this->actor.speedXZ = speed * 1.5f + 2.0f;
|
||||
@ -407,13 +408,13 @@ void EnPoField_WaitForSpawn(EnPoField* this, GlobalContext* globalCtx) {
|
||||
if (fabsf(sSpawnPositions[i].x - player->actor.world.pos.x) < 150.0f &&
|
||||
fabsf(sSpawnPositions[i].z - player->actor.world.pos.z) < 150.0f) {
|
||||
if (Flags_GetSwitch(globalCtx, sSpawnSwitchFlags[i])) {
|
||||
if (player->stateFlags1 & 0x800000) { // Player riding Epona
|
||||
if (player->stateFlags1 & PLAYER_STATE1_23) { // Player riding Epona
|
||||
return;
|
||||
} else {
|
||||
this->actor.params = EN_PO_FIELD_SMALL;
|
||||
spawnDist = 300.0f;
|
||||
}
|
||||
} else if (player->stateFlags1 & 0x800000 || Rand_ZeroOne() < 0.4f) {
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_23 || Rand_ZeroOne() < 0.4f) {
|
||||
this->actor.params = EN_PO_FIELD_BIG;
|
||||
this->spawnFlagIndex = i;
|
||||
spawnDist = 480.0f;
|
||||
|
@ -322,7 +322,9 @@ void func_80AE2C1C(EnRd* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if ((ABS(sp32) < 0x1554) && (Actor_WorldDistXYZToActor(&this->actor, &player->actor) <= 150.0f)) {
|
||||
if (!(player->stateFlags1 & 0x2C6080) && !(player->stateFlags2 & 0x80)) {
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_18 |
|
||||
PLAYER_STATE1_19 | PLAYER_STATE1_21)) &&
|
||||
!(player->stateFlags2 & PLAYER_STATE2_7)) {
|
||||
if (this->unk_306 == 0) {
|
||||
if (!(this->unk_312 & 0x80)) {
|
||||
player->actor.freezeTimer = 40;
|
||||
@ -394,7 +396,9 @@ void func_80AE2FD0(EnRd* this, GlobalContext* globalCtx) {
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (!(player->stateFlags1 & 0x2C6080) && !(player->stateFlags2 & 0x80) &&
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_18 |
|
||||
PLAYER_STATE1_19 | PLAYER_STATE1_21)) &&
|
||||
!(player->stateFlags2 & PLAYER_STATE2_7) &&
|
||||
(Actor_WorldDistXYZToPoint(&player->actor, &this->actor.home.pos) < 150.0f)) {
|
||||
this->actor.targetMode = 0;
|
||||
func_80AE2B90(this, globalCtx);
|
||||
@ -487,7 +491,7 @@ void func_80AE3454(EnRd* this, GlobalContext* globalCtx) {
|
||||
Math_SmoothStepToS(&this->unk_30E, 0, 1, 0x5DC, 0);
|
||||
Math_SmoothStepToS(&this->unk_310, 0, 1, 0x5DC, 0);
|
||||
case 2:
|
||||
if (!(player->stateFlags2 & 0x80)) {
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_7)) {
|
||||
Animation_Change(&this->skelAnime, &object_rd_Anim_0046F8, 0.5f, 0.0f,
|
||||
Animation_GetLastFrame(&object_rd_Anim_0046F8), ANIMMODE_ONCE_INTERP, 0.0f);
|
||||
this->unk_304++;
|
||||
|
@ -495,7 +495,7 @@ void EnRr_CollisionCheck(EnRr* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
if ((this->ocTimer == 0) && (this->actor.colorFilterTimer == 0) && (player->invincibilityTimer == 0) &&
|
||||
!(player->stateFlags2 & 0x80) &&
|
||||
!(player->stateFlags2 & PLAYER_STATE2_7) &&
|
||||
((this->collider1.base.ocFlags1 & OC1_HIT) || (this->collider2.base.ocFlags1 & OC1_HIT))) {
|
||||
this->collider1.base.ocFlags1 &= ~OC1_HIT;
|
||||
this->collider2.base.ocFlags1 &= ~OC1_HIT;
|
||||
@ -623,7 +623,7 @@ void EnRr_GrabPlayer(EnRr* this, GlobalContext* globalCtx) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_LIKE_EAT);
|
||||
}
|
||||
this->ocTimer = 8;
|
||||
if ((this->grabTimer == 0) || !(player->stateFlags2 & 0x80)) {
|
||||
if ((this->grabTimer == 0) || !(player->stateFlags2 & PLAYER_STATE2_7)) {
|
||||
EnRr_SetupReleasePlayer(this, globalCtx);
|
||||
} else {
|
||||
Math_ApproachF(&player->actor.world.pos.x, this->mouthPos.x, 1.0f, 30.0f);
|
||||
|
@ -855,7 +855,8 @@ void func_80AEC780(EnRu1* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((func_80AEC5FC(this, globalCtx)) && (!Gameplay_InCsMode(globalCtx)) && (!(player->stateFlags1 & 0x206000)) &&
|
||||
if ((func_80AEC5FC(this, globalCtx)) && (!Gameplay_InCsMode(globalCtx)) &&
|
||||
(!(player->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21))) &&
|
||||
(player->actor.bgCheckFlags & 1)) {
|
||||
|
||||
globalCtx->csCtx.segment = &D_80AF0880;
|
||||
@ -1641,7 +1642,7 @@ void func_80AEE7C4(EnRu1* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
player = GET_PLAYER(globalCtx);
|
||||
if (player->stateFlags2 & 0x10000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_28) {
|
||||
this->unk_370 += 1.0f;
|
||||
if (this->action != 32) {
|
||||
if (*unk_370 > 30.0f) {
|
||||
|
@ -718,7 +718,7 @@ void EnSkj_SariasSongKidIdle(EnSkj* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
if (EnSkj_RangeCheck(player, sSmallStumpSkullKid.skullkid)) {
|
||||
EnSkj_SetupWaitInRange(this);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
player->unk_6A8 = &sSmallStumpSkullKid.skullkid->actor;
|
||||
}
|
||||
}
|
||||
@ -902,8 +902,8 @@ void EnSkj_WaitInRange(EnSkj* this, GlobalContext* globalCtx) {
|
||||
|
||||
// When link pulls out the Ocarina center him on the stump
|
||||
// Link was probably supposed to be pointed towards skull kid as well
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
player->stateFlags2 |= 0x2000000;
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_25;
|
||||
player->unk_6A8 = &sSmallStumpSkullKid.skullkid->actor;
|
||||
player->actor.world.pos.x = sSmallStumpSkullKid.skullkid->actor.world.pos.x;
|
||||
player->actor.world.pos.y = sSmallStumpSkullKid.skullkid->actor.world.pos.y;
|
||||
@ -924,7 +924,7 @@ void EnSkj_WaitInRange(EnSkj* this, GlobalContext* globalCtx) {
|
||||
} else if (!EnSkj_RangeCheck(player, sSmallStumpSkullKid.skullkid)) {
|
||||
EnSkj_SetupResetFight(this);
|
||||
} else {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
if (gSaveContext.itemGetInf[1] & 0x40) {
|
||||
if (gSaveContext.itemGetInf[3] & 0x200) {
|
||||
this->textId = Text_GetFaceReaction(globalCtx, 0x15);
|
||||
@ -985,10 +985,10 @@ void EnSkj_WaitForSong(EnSkj* this, GlobalContext* globalCtx) {
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_05;
|
||||
}
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_02) {
|
||||
player->stateFlags2 &= ~0x1000000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_24;
|
||||
Actor_Kill(&this->actor);
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
} else {
|
||||
if (globalCtx->msgCtx.ocarinaMode >= OCARINA_MODE_05) {
|
||||
gSaveContext.sunsSongState = 0;
|
||||
@ -1201,7 +1201,7 @@ void EnSkj_SariasSongWaitForTextClear(EnSkj* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (state == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
EnSkj_SetupWaitInRange(this);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
player->unk_6A8 = (Actor*)sSmallStumpSkullKid.skullkid;
|
||||
}
|
||||
}
|
||||
@ -1364,8 +1364,8 @@ void EnSkj_SetupWaitForOcarina(EnSkj* this, GlobalContext* globalCtx) {
|
||||
sOcarinaMinigameSkullKids[SKULL_KID_LEFT].skullkid->playerInRange = true;
|
||||
sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].skullkid->playerInRange = true;
|
||||
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
player->stateFlags2 |= 0x2000000;
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_25;
|
||||
func_800F5BF0(NATURE_ID_KOKIRI_REGION);
|
||||
EnSkj_TurnPlayer(this, player);
|
||||
player->unk_6A8 = &this->actor;
|
||||
@ -1380,15 +1380,15 @@ void EnSkj_SetupWaitForOcarina(EnSkj* this, GlobalContext* globalCtx) {
|
||||
void EnSkj_WaitForOcarina(EnSkj* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
player->stateFlags2 |= 0x2000000;
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_25;
|
||||
func_800F5BF0(NATURE_ID_KOKIRI_REGION);
|
||||
EnSkj_TurnPlayer(this, player);
|
||||
player->unk_6A8 = &this->actor;
|
||||
Message_StartTextbox(globalCtx, 0x10BE, &this->actor);
|
||||
this->actionFunc = EnSkj_StartOcarinaMinigame;
|
||||
} else if (EnSkj_RangeCheck(player, this)) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1507,7 +1507,7 @@ void EnSkj_WaitForOfferResponse(EnSkj* this, GlobalContext* globalCtx) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // yes
|
||||
player = GET_PLAYER(globalCtx);
|
||||
player->stateFlags3 |= 0x20; // makes player take ocarina out right away after closing box
|
||||
player->stateFlags3 |= PLAYER_STATE3_5; // makes player take ocarina out right away after closing box
|
||||
this->actionFunc = EnSkj_SetupWaitForOcarina;
|
||||
break;
|
||||
case 1: // no
|
||||
|
@ -102,7 +102,7 @@ void EnStream_SuckPlayer(EnStream* this, GlobalContext* globalCtx) {
|
||||
if (yDistWithOffset > 0.0f) {
|
||||
Math_SmoothStepToF(&player->actor.velocity.y, -3.0f, 0.7f, yDistWithOffset, 0.0f);
|
||||
if (posDifference.y < -70.0f) {
|
||||
player->stateFlags2 |= 0x80000000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_31;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -692,7 +692,7 @@ s32 func_80B0DEA8(EnSw* this, GlobalContext* globalCtx, s32 arg2) {
|
||||
s32 sp54;
|
||||
Vec3f sp48;
|
||||
|
||||
if (!(player->stateFlags1 & 0x200000) && arg2) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_21) && arg2) {
|
||||
return false;
|
||||
} else if (func_8002DDF4(globalCtx) && arg2) {
|
||||
return false;
|
||||
|
@ -573,7 +573,7 @@ s32 func_80B150AC(EnTa* this, GlobalContext* globalCtx, s32 idx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
Actor* interactRangeActor;
|
||||
|
||||
if (player->stateFlags1 & 0x800) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_11) {
|
||||
interactRangeActor = player->interactRangeActor;
|
||||
if (interactRangeActor != NULL && interactRangeActor->id == ACTOR_EN_NIW &&
|
||||
interactRangeActor == &this->superCuccos[idx]->actor) {
|
||||
@ -607,7 +607,7 @@ void func_80B15100(EnTa* this, GlobalContext* globalCtx) {
|
||||
if (player->heldActor == &this->superCuccos[unk_2CA]->actor) {
|
||||
player->heldActor = NULL;
|
||||
}
|
||||
player->stateFlags1 &= ~0x800;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_11;
|
||||
this->superCuccos[unk_2CA] = NULL;
|
||||
}
|
||||
this->unk_2E0 |= 1;
|
||||
|
@ -402,7 +402,7 @@ void EnTest_ChooseAction(EnTest* this, GlobalContext* globalCtx) {
|
||||
} else {
|
||||
if (this->actor.xzDistToPlayer < 110.0f) {
|
||||
if (Rand_ZeroOne() > 0.2f) {
|
||||
if (player->stateFlags1 & 0x10) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_4) {
|
||||
if (this->actor.isTargeted) {
|
||||
EnTest_SetupSlashDown(this);
|
||||
} else {
|
||||
@ -688,7 +688,7 @@ void EnTest_WalkAndBlock(EnTest* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (this->actor.xzDistToPlayer < 110.0f) {
|
||||
if (Rand_ZeroOne() > 0.2f) {
|
||||
if (player->stateFlags1 & 0x10) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_4) {
|
||||
if (this->actor.isTargeted) {
|
||||
EnTest_SetupSlashDown(this);
|
||||
} else {
|
||||
@ -973,7 +973,7 @@ void EnTest_SlashDownEnd(EnTest* this, GlobalContext* globalCtx) {
|
||||
if ((ABS(yawDiff) > 0x3E80) && (this->actor.params != STALFOS_TYPE_CEILING)) {
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
EnTest_SetupJumpBack(this);
|
||||
} else if (player->stateFlags1 & 0x10) {
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_4) {
|
||||
if (this->actor.isTargeted) {
|
||||
EnTest_SetupSlashDown(this);
|
||||
} else if ((globalCtx->gameplayFrames % 2) != 0) {
|
||||
|
@ -344,7 +344,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
} else if (sSwordJumpState != 0) {
|
||||
sStickTilt = 0.0f;
|
||||
player->stateFlags3 |= 4;
|
||||
player->stateFlags3 |= PLAYER_STATE3_2;
|
||||
Math_SmoothStepToF(&this->actor.world.pos.x,
|
||||
(Math_SinS(player->actor.shape.rot.y - 0x3E8) * 45.0f) +
|
||||
player->actor.world.pos.x,
|
||||
@ -357,7 +357,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
if (((u32)sSwordJumpTimer == 0) || ((player->invincibilityTimer > 0) && (this->swordState == 0))) {
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
||||
input->cur.button = BTN_A;
|
||||
player->stateFlags3 &= ~4;
|
||||
player->stateFlags3 &= ~PLAYER_STATE3_2;
|
||||
sStickTilt = 127.0f;
|
||||
player->skelAnime.curFrame = 3.0f;
|
||||
sStickAngle = this->actor.yawTowardsPlayer + 0x8000;
|
||||
@ -392,7 +392,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
sStickTilt = 0.0f;
|
||||
sSwordJumpState = 1;
|
||||
player->stateFlags3 |= 4;
|
||||
player->stateFlags3 |= PLAYER_STATE3_2;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
sSwordJumpTimer = 27;
|
||||
player->swordState = 0;
|
||||
@ -440,7 +440,8 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
sStickAngle = thisx->yawTowardsPlayer;
|
||||
sp50 = 0.0f;
|
||||
if ((90.0f >= this->actor.xzDistToPlayer) && (this->actor.xzDistToPlayer > 70.0f) &&
|
||||
(ABS(sp5A) >= 0x7800) && (this->actor.isTargeted || !(player->stateFlags1 & 0x00400000))) {
|
||||
(ABS(sp5A) >= 0x7800) &&
|
||||
(this->actor.isTargeted || !(player->stateFlags1 & PLAYER_STATE1_22))) {
|
||||
EnTorch2_SwingSword(globalCtx, input, this);
|
||||
} else if (((this->actor.xzDistToPlayer <= 70.0f) ||
|
||||
((this->actor.xzDistToPlayer <= 80.0f + sp50) && (player->swordState != 0))) &&
|
||||
@ -511,7 +512,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
this->swordState = 0;
|
||||
input->cur.stick_x = input->cur.stick_y = 0;
|
||||
if ((this->invincibilityTimer > 0) && (this->actor.world.pos.y < (this->actor.floorHeight - 160.0f))) {
|
||||
this->stateFlags3 &= ~1;
|
||||
this->stateFlags3 &= ~PLAYER_STATE3_0;
|
||||
this->actor.flags |= ACTOR_FLAG_0;
|
||||
this->invincibilityTimer = 0;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
@ -591,7 +592,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
sDeathFlag = false;
|
||||
}
|
||||
if ((this->invincibilityTimer == 0) && (this->actor.colChkInfo.health != 0) &&
|
||||
(this->cylinder.base.acFlags & AC_HIT) && !(this->stateFlags1 & 0x04000000) &&
|
||||
(this->cylinder.base.acFlags & AC_HIT) && !(this->stateFlags1 & PLAYER_STATE1_26) &&
|
||||
!(this->swordQuads[0].base.atFlags & AT_HIT) && !(this->swordQuads[1].base.atFlags & AT_HIT)) {
|
||||
|
||||
if (!Actor_ApplyDamage(&this->actor)) {
|
||||
@ -606,7 +607,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
sActionState = ENTORCH2_DEATH;
|
||||
Enemy_StartFinishingBlow(globalCtx, &this->actor);
|
||||
Item_DropCollectibleRandom(globalCtx, &this->actor, &thisx->world.pos, 0xC0);
|
||||
this->stateFlags3 &= ~4;
|
||||
this->stateFlags3 &= ~PLAYER_STATE3_2;
|
||||
} else {
|
||||
func_800F5ACC(NA_BGM_MINI_BOSS);
|
||||
if (this->actor.colChkInfo.damageEffect == 1) {
|
||||
@ -623,8 +624,8 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
this->unk_8A4 = 8.0f;
|
||||
this->unk_8A2 = this->actor.yawTowardsPlayer + 0x8000;
|
||||
Actor_SetDropFlag(&this->actor, &this->cylinder.info, 1);
|
||||
this->stateFlags3 &= ~4;
|
||||
this->stateFlags3 |= 1;
|
||||
this->stateFlags3 &= ~PLAYER_STATE3_2;
|
||||
this->stateFlags3 |= PLAYER_STATE3_0;
|
||||
sActionState = ENTORCH2_DAMAGE;
|
||||
if (sAlpha == 255) {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0xC);
|
||||
@ -640,10 +641,10 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
// Handles being frozen by a deku nut
|
||||
|
||||
if ((this->actor.colorFilterTimer == 0) || (this->actor.colorFilterParams & 0x4000)) {
|
||||
this->stateFlags3 &= ~4;
|
||||
this->stateFlags3 &= ~PLAYER_STATE3_2;
|
||||
} else {
|
||||
this->stateFlags3 |= 4;
|
||||
this->stateFlags1 &= ~0x04000000;
|
||||
this->stateFlags3 |= PLAYER_STATE3_2;
|
||||
this->stateFlags1 &= ~PLAYER_STATE1_26;
|
||||
this->invincibilityTimer = 0;
|
||||
input->press.stick_x = input->press.stick_y = 0;
|
||||
/*! @bug
|
||||
|
@ -654,7 +654,7 @@ void EnTp_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
s16 yawToWall;
|
||||
|
||||
if (player->stateFlags1 & 0x4000000) { // Shielding
|
||||
if (player->stateFlags1 & PLAYER_STATE1_26) { // Shielding
|
||||
this->damageEffect = TAILPASARAN_DMGEFF_NONE;
|
||||
}
|
||||
|
||||
|
@ -303,7 +303,8 @@ void EnWallmas_WaitToDrop(EnWallmas* this, GlobalContext* globalCtx) {
|
||||
this->timer--;
|
||||
}
|
||||
|
||||
if ((player->stateFlags1 & 0x100000) || (player->stateFlags1 & 0x8000000) || !(player->actor.bgCheckFlags & 1) ||
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_20) || (player->stateFlags1 & PLAYER_STATE1_27) ||
|
||||
!(player->actor.bgCheckFlags & 1) ||
|
||||
((this->actor.params == 1) && (320.0f < Math_Vec3f_DistXZ(&this->actor.home.pos, playerPos)))) {
|
||||
Audio_StopSfxById(NA_SE_EN_FALL_AIM);
|
||||
this->timer = 0x82;
|
||||
@ -321,7 +322,7 @@ void EnWallmas_WaitToDrop(EnWallmas* this, GlobalContext* globalCtx) {
|
||||
void EnWallmas_Drop(EnWallmas* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (!Player_InCsMode(globalCtx) && !(player->stateFlags2 & 0x10) && (player->invincibilityTimer >= 0) &&
|
||||
if (!Player_InCsMode(globalCtx) && !(player->stateFlags2 & PLAYER_STATE2_4) && (player->invincibilityTimer >= 0) &&
|
||||
(this->actor.xzDistToPlayer < 30.0f) && (this->actor.yDistToPlayer < -5.0f) &&
|
||||
(-(f32)(player->cylinder.dim.height + 10) < this->actor.yDistToPlayer)) {
|
||||
EnWallmas_SetupTakePlayer(this, globalCtx);
|
||||
|
@ -347,8 +347,8 @@ s32 EnXc_SerenadeCS(EnXc* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
s32 stateFlags = player->stateFlags1;
|
||||
|
||||
if (CHECK_OWNED_EQUIP(EQUIP_BOOTS, 1) && !(gSaveContext.eventChkInf[5] & 4) && !(stateFlags & 0x20000000) &&
|
||||
!Gameplay_InCsMode(globalCtx)) {
|
||||
if (CHECK_OWNED_EQUIP(EQUIP_BOOTS, 1) && !(gSaveContext.eventChkInf[5] & 4) &&
|
||||
!(stateFlags & PLAYER_STATE1_29) && !Gameplay_InCsMode(globalCtx)) {
|
||||
Cutscene_SetSegment(globalCtx, &gIceCavernSerenadeCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
gSaveContext.eventChkInf[5] |= 4; // Learned Serenade of Water Flag
|
||||
|
@ -526,8 +526,8 @@ s32 EnZf_CanAttack(GlobalContext* globalCtx, EnZf* this) {
|
||||
Actor* targetedActor;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (this->actor.params >= ENZF_TYPE_LIZALFOS_MINIBOSS_A) { // miniboss
|
||||
if (player->stateFlags1 & 0x6000) { // Hanging or climbing
|
||||
if (this->actor.params >= ENZF_TYPE_LIZALFOS_MINIBOSS_A) { // miniboss
|
||||
if (player->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14)) { // Hanging or climbing
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
@ -1203,7 +1203,7 @@ void EnZf_Slash(EnZf* this, GlobalContext* globalCtx) {
|
||||
if (yawDiff > 16000) {
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
func_80B483E4(this, globalCtx);
|
||||
} else if (player->stateFlags1 & 0x6010) {
|
||||
} else if (player->stateFlags1 & (PLAYER_STATE1_4 | PLAYER_STATE1_13 | PLAYER_STATE1_14)) {
|
||||
if (this->actor.isTargeted) {
|
||||
EnZf_SetupSlash(this);
|
||||
} else {
|
||||
|
@ -2196,7 +2196,7 @@ void Fishing_UpdateLure(Fishing* this, GlobalContext* globalCtx) {
|
||||
|
||||
Math_ApproachF(&D_80B7E144, 195.0f, 1.0f, 1.0f);
|
||||
|
||||
if (player->stateFlags1 & 0x8000000) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_27) {
|
||||
D_80B7E0B4 = 0;
|
||||
player->unk_860 = 0;
|
||||
}
|
||||
|
@ -475,11 +475,11 @@ void ObjOshihiki_OnScene(ObjOshihiki* this, GlobalContext* globalCtx) {
|
||||
this->direction = this->dyna.unk_150;
|
||||
ObjOshihiki_SetupPush(this, globalCtx);
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
}
|
||||
@ -516,11 +516,11 @@ void ObjOshihiki_OnActor(ObjOshihiki* this, GlobalContext* globalCtx) {
|
||||
this->direction = this->dyna.unk_150;
|
||||
ObjOshihiki_SetupPush(this, globalCtx);
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
} else {
|
||||
@ -568,7 +568,7 @@ void ObjOshihiki_Push(ObjOshihiki* this, GlobalContext* globalCtx) {
|
||||
if (!ObjOshihiki_CheckFloor(this, globalCtx)) {
|
||||
thisx->home.pos.x = thisx->world.pos.x;
|
||||
thisx->home.pos.z = thisx->world.pos.z;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
this->pushDist = 0.0f;
|
||||
this->pushSpeed = 0.0f;
|
||||
@ -581,7 +581,7 @@ void ObjOshihiki_Push(ObjOshihiki* this, GlobalContext* globalCtx) {
|
||||
|
||||
thisx->home.pos.x = thisx->world.pos.x;
|
||||
thisx->home.pos.z = thisx->world.pos.z;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
this->pushDist = 0.0f;
|
||||
this->pushSpeed = 0.0f;
|
||||
@ -609,7 +609,7 @@ void ObjOshihiki_Fall(ObjOshihiki* this, GlobalContext* globalCtx) {
|
||||
this->stateFlags |= PUSHBLOCK_FALL;
|
||||
if (fabsf(this->dyna.unk_150) > 0.001f) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_4;
|
||||
}
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
if (ObjOshihiki_CheckGround(this, globalCtx)) {
|
||||
|
@ -170,11 +170,11 @@ s32 ObjTimeblock_WaitForOcarina(ObjTimeblock* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (ObjTimeblock_PlayerIsInRange(this, globalCtx)) {
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_FREE_PLAY);
|
||||
this->songObserverFunc = ObjTimeblock_WaitForSong;
|
||||
} else {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -158,11 +158,11 @@ s32 func_80BA2218(ObjWarp2block* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (func_80BA1ECC(this, globalCtx)) {
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_FREE_PLAY);
|
||||
this->func_168 = func_80BA228C;
|
||||
} else {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ void OceffSpot_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode2);
|
||||
func_800876C8(globalCtx);
|
||||
if ((gSaveContext.nayrusLoveTimer != 0) && (globalCtx->actorCtx.actorLists[ACTORCAT_PLAYER].length != 0)) {
|
||||
player->stateFlags3 |= 0x40;
|
||||
player->stateFlags3 |= PLAYER_STATE3_6;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ void OceffStorm_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
func_800876C8(globalCtx);
|
||||
if (gSaveContext.nayrusLoveTimer != 0) {
|
||||
player->stateFlags3 |= 0x40;
|
||||
player->stateFlags3 |= PLAYER_STATE3_6;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ void OceffWipe_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
func_800876C8(globalCtx);
|
||||
if (gSaveContext.nayrusLoveTimer != 0) {
|
||||
player->stateFlags3 |= 0x40;
|
||||
player->stateFlags3 |= PLAYER_STATE3_6;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ void OceffWipe2_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
func_800876C8(globalCtx);
|
||||
if (gSaveContext.nayrusLoveTimer != 0) {
|
||||
player->stateFlags3 |= 0x40;
|
||||
player->stateFlags3 |= PLAYER_STATE3_6;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ void OceffWipe3_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
func_800876C8(globalCtx);
|
||||
if (gSaveContext.nayrusLoveTimer != 0) {
|
||||
player->stateFlags3 |= 0x40;
|
||||
player->stateFlags3 |= PLAYER_STATE3_6;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -127,8 +127,8 @@ void func_80BADF0C(ShotSun* this, GlobalContext* globalCtx) {
|
||||
this->unk_1A4 = 0;
|
||||
} else {
|
||||
if (this->unk_1A4 == 0) {
|
||||
if (!(player->stateFlags2 & 0x1000000)) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_24)) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
return;
|
||||
} else {
|
||||
this->unk_1A4 = 1;
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user