mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-08 12:28:10 -05:00
Player State Docs (#3280)
* state flags 1 * state flags 2 * state flags 3 * fill array
This commit is contained in:
parent
460ec1bb03
commit
46aea3aa7c
@ -495,8 +495,8 @@ void Entrance_EnableFW(void) {
|
||||
gPlayState->sceneNum == SCENE_GANONS_TOWER_COLLAPSE_EXTERIOR || gPlayState->sceneNum == SCENE_GROTTOS ||
|
||||
gPlayState->sceneNum == SCENE_FISHING_POND || gPlayState->sceneNum == SCENE_GANON_BOSS ||
|
||||
gSaveContext.eventInf[0] & 0x1 || // Ingo's Minigame state
|
||||
player->stateFlags1 & 0x08A02000 || // Swimming, riding horse, Down A, hanging from a ledge
|
||||
player->stateFlags2 & 0x00040000 // Blank A
|
||||
player->stateFlags1 & (PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LADDER | PLAYER_STATE1_ON_HORSE | PLAYER_STATE1_IN_WATER) || // Swimming, riding horse, Down A, hanging from a ledge
|
||||
player->stateFlags2 & PLAYER_STATE2_CRAWLING // Blank A
|
||||
// Shielding, spinning and getting skull tokens still disable buttons automatically
|
||||
) {
|
||||
return;
|
||||
|
@ -486,7 +486,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) {
|
||||
|
||||
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_TEXT_ON_SCREEN)) || (actor != player->unk_664)) {
|
||||
OVERLAY_DISP = Gfx_SetupDL(OVERLAY_DISP, 0x39);
|
||||
|
||||
for (spB0 = 0, spAC = targetCtx->unk_4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) {
|
||||
@ -1376,7 +1376,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_ON_HORSE) ? 32.0f : 0.0f;
|
||||
|
||||
if (LINK_IS_ADULT) {
|
||||
return offset + 68.0f;
|
||||
@ -1386,9 +1386,9 @@ f32 Player_GetHeight(Player* player) {
|
||||
}
|
||||
|
||||
f32 func_8002DCE4(Player* player) {
|
||||
if (player->stateFlags1 & 0x800000) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_ON_HORSE) {
|
||||
return 8.0f;
|
||||
} else if (player->stateFlags1 & 0x8000000) {
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_IN_WATER) {
|
||||
return (R_RUN_SPEED_LIMIT / 100.0f) * 0.6f;
|
||||
} else {
|
||||
return R_RUN_SPEED_LIMIT / 100.0f;
|
||||
@ -1396,7 +1396,7 @@ f32 func_8002DCE4(Player* player) {
|
||||
}
|
||||
|
||||
s32 func_8002DD6C(Player* player) {
|
||||
return player->stateFlags1 & 0x8;
|
||||
return player->stateFlags1 & PLAYER_STATE1_ITEM_IN_HAND;
|
||||
}
|
||||
|
||||
s32 func_8002DD78(Player* player) {
|
||||
@ -1406,19 +1406,19 @@ s32 func_8002DD78(Player* player) {
|
||||
s32 func_8002DDA8(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
return (player->stateFlags1 & 0x800) || func_8002DD78(player);
|
||||
return (player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) || func_8002DD78(player);
|
||||
}
|
||||
|
||||
s32 func_8002DDE4(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
return player->stateFlags2 & 0x8;
|
||||
return player->stateFlags2 & PLAYER_STATE2_FOOTSTEP;
|
||||
}
|
||||
|
||||
s32 func_8002DDF4(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
return player->stateFlags2 & 0x1000;
|
||||
return player->stateFlags2 & PLAYER_STATE2_STATIONARY_LADDER;
|
||||
}
|
||||
|
||||
void func_8002DE04(PlayState* play, Actor* actorA, Actor* actorB) {
|
||||
@ -1440,12 +1440,12 @@ void func_8002DE74(PlayState* play, Player* player) {
|
||||
|
||||
void Actor_MountHorse(PlayState* play, Player* player, Actor* horse) {
|
||||
player->rideActor = horse;
|
||||
player->stateFlags1 |= 0x800000;
|
||||
player->stateFlags1 |= PLAYER_STATE1_ON_HORSE;
|
||||
horse->child = &player->actor;
|
||||
}
|
||||
|
||||
s32 func_8002DEEC(Player* player) {
|
||||
return (player->stateFlags1 & 0x20000080) || (player->csAction != 0);
|
||||
return (player->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_CUTSCENE)) || (player->csAction != 0);
|
||||
}
|
||||
|
||||
void func_8002DF18(PlayState* play, Player* player) {
|
||||
@ -2005,10 +2005,13 @@ u32 Actor_HasParent(Actor* actor, PlayState* play) {
|
||||
s32 GiveItemEntryWithoutActor(PlayState* play, GetItemEntry getItemEntry) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
|
||||
if (!(player->stateFlags1 &
|
||||
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE |
|
||||
PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER)) &&
|
||||
Player_GetExplosiveHeld(player) < 0) {
|
||||
if (((player->heldActor != NULL) && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX)) ||
|
||||
(IS_RANDO && (getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))) ||
|
||||
(!(player->stateFlags1 & 0x20000800))) {
|
||||
(!(player->stateFlags1 & (PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_IN_CUTSCENE)))) {
|
||||
if ((getItemEntry.getItemId != GI_NONE)) {
|
||||
player->getItemEntry = getItemEntry;
|
||||
player->getItemId = getItemEntry.getItemId;
|
||||
@ -2041,11 +2044,14 @@ s32 GiveItemEntryWithoutActor(PlayState* play, GetItemEntry getItemEntry) {
|
||||
s32 GiveItemEntryFromActor(Actor* actor, PlayState* play, GetItemEntry getItemEntry, f32 xzRange, f32 yRange) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
|
||||
if (!(player->stateFlags1 &
|
||||
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE |
|
||||
PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER)) &&
|
||||
Player_GetExplosiveHeld(player) < 0) {
|
||||
if ((((player->heldActor != NULL) || (actor == player->targetActor)) &&
|
||||
((!IS_RANDO && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX))) ||
|
||||
(IS_RANDO && ((getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))))) ||
|
||||
(!(player->stateFlags1 & 0x20000800))) {
|
||||
(!(player->stateFlags1 & (PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_IN_CUTSCENE)))) {
|
||||
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
|
||||
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
|
||||
s32 absYawDiff = ABS(yawDiff);
|
||||
@ -2083,10 +2089,13 @@ void GiveItemEntryFromActorWithFixedRange(Actor* actor, PlayState* play, GetItem
|
||||
s32 func_8002F434(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
|
||||
if (!(player->stateFlags1 &
|
||||
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE |
|
||||
PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER)) &&
|
||||
Player_GetExplosiveHeld(player) < 0) {
|
||||
if ((((player->heldActor != NULL) || (actor == player->targetActor)) &&
|
||||
((!IS_RANDO && ((getItemId > GI_NONE) && (getItemId < GI_MAX))) || (IS_RANDO && ((getItemId > RG_NONE) && (getItemId < RG_MAX))))) ||
|
||||
(!(player->stateFlags1 & 0x20000800))) {
|
||||
(!(player->stateFlags1 & (PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_IN_CUTSCENE)))) {
|
||||
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
|
||||
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
|
||||
s32 absYawDiff = ABS(yawDiff);
|
||||
@ -2156,7 +2165,9 @@ s32 Actor_IsMounted(PlayState* play, Actor* horse) {
|
||||
u32 Actor_SetRideActor(PlayState* play, Actor* horse, s32 mountSide) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(player->stateFlags1 & 0x003C7880)) {
|
||||
if (!(player->stateFlags1 &
|
||||
(PLAYER_STATE1_DEAD | PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE |
|
||||
PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER))) {
|
||||
player->rideActor = horse;
|
||||
player->mountSide = mountSide;
|
||||
return true;
|
||||
@ -2501,8 +2512,18 @@ void func_800304DC(PlayState* play, ActorContext* actorCtx, ActorEntry* actorEnt
|
||||
}
|
||||
|
||||
u32 D_80116068[ACTORCAT_MAX] = {
|
||||
0x100000C0, 0x100000C0, 0x00000000, 0x100004C0, 0x00000080, 0x300000C0,
|
||||
0x10000080, 0x00000000, 0x300000C0, 0x100004C0, 0x00000000, 0x100000C0,
|
||||
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
|
||||
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
|
||||
0,
|
||||
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
|
||||
PLAYER_STATE1_DEAD,
|
||||
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE,
|
||||
PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
|
||||
0,
|
||||
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE,
|
||||
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
|
||||
0,
|
||||
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
|
||||
};
|
||||
|
||||
void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
||||
@ -2543,11 +2564,11 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
||||
|
||||
sp80 = &D_80116068[0];
|
||||
|
||||
if (player->stateFlags2 & 0x8000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_OCARINA_PLAYING) {
|
||||
unkFlag = ACTOR_FLAG_NO_FREEZE_OCARINA;
|
||||
}
|
||||
|
||||
if ((player->stateFlags1 & 0x40) && ((player->actor.textId & 0xFF00) != 0x600)) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_TEXT_ON_SCREEN) && ((player->actor.textId & 0xFF00) != 0x600)) {
|
||||
sp74 = player->targetActor;
|
||||
}
|
||||
|
||||
@ -3891,7 +3912,7 @@ s16 Actor_TestFloorInDirection(Actor* actor, PlayState* play, f32 distance, s16
|
||||
s32 Actor_IsTargeted(PlayState* play, Actor* actor) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((player->stateFlags1 & 0x10) && actor->isTargeted) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_ENEMY_TARGET) && actor->isTargeted) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@ -3904,7 +3925,7 @@ s32 Actor_IsTargeted(PlayState* play, Actor* actor) {
|
||||
s32 Actor_OtherIsTargeted(PlayState* play, Actor* actor) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((player->stateFlags1 & 0x10) && !actor->isTargeted) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_ENEMY_TARGET) && !actor->isTargeted) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -522,7 +522,7 @@ s32 Camera_GetWaterBoxDataIdx(Camera* camera, f32* waterY) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(camera->player->stateFlags1 & 0x8000000)) {
|
||||
if (!(camera->player->stateFlags1 & PLAYER_STATE1_IN_WATER)) {
|
||||
// player is not swimming
|
||||
*waterY = BGCHECK_Y_MIN;
|
||||
return -1;
|
||||
@ -1031,7 +1031,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_CLIMBING_LADDER) {
|
||||
*arg3 = Camera_LERPCeilF(playerPosRot->pos.y, *arg3, PCT(OREG(43)), 0.1f);
|
||||
phi_f20 = playerPosRot->pos.y - *arg3;
|
||||
posOffsetTarget.y -= phi_f20;
|
||||
@ -1134,7 +1134,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_CLIMBING_LADDER) {
|
||||
*yPosOffset = Camera_LERPCeilF(playerPosRot->pos.y, *yPosOffset, PCT(OREG(43)), 0.1f);
|
||||
yPosDelta = playerPosRot->pos.y - *yPosOffset;
|
||||
tmpPos0.y -= yPosDelta;
|
||||
@ -2203,7 +2203,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_CLIMBING_LADDER) {
|
||||
anim->yTarget = playerPosRot->pos.y;
|
||||
sp6A = 0;
|
||||
} else {
|
||||
@ -2907,7 +2907,7 @@ s32 Camera_Battle1(Camera* camera) {
|
||||
sp78 = batt1->swingPitchFinal;
|
||||
fov = batt1->fov;
|
||||
|
||||
if (camera->player->stateFlags1 & 0x1000) {
|
||||
if (camera->player->stateFlags1 & PLAYER_STATE1_CHARGING_SPIN_ATTACK) {
|
||||
// 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);
|
||||
@ -2978,7 +2978,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_CLIMBING_LADDER) {
|
||||
isOffGround = false;
|
||||
anim->yPosOffset = playerPosRot->pos.y;
|
||||
} else {
|
||||
@ -3303,7 +3303,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_CLIMBING_LADDER) {
|
||||
anim->unk_08 = playerPosRot->pos.y;
|
||||
sp80 = 0;
|
||||
} else {
|
||||
@ -3724,7 +3724,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_IN_WATER ? 0.0f : 20.0f;
|
||||
keep4->unk_1C = 0x3212;
|
||||
keep4->unk_1E = 0x1E;
|
||||
keep4->unk_18 = 50.0f;
|
||||
@ -4982,7 +4982,7 @@ s32 Camera_Unique0(Camera* camera) {
|
||||
camera->animState++;
|
||||
}
|
||||
|
||||
if (player->stateFlags1 & 0x20000000) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE) {
|
||||
anim->initalPos = playerPosRot->pos;
|
||||
}
|
||||
|
||||
@ -4990,7 +4990,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_IN_CUTSCENE)) &&
|
||||
((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) ||
|
||||
@ -5018,7 +5018,7 @@ s32 Camera_Unique0(Camera* camera) {
|
||||
anim->initalPos = playerPosRot->pos;
|
||||
}
|
||||
|
||||
if ((!(player->stateFlags1 & 0x20000000)) &&
|
||||
if ((!(player->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE)) &&
|
||||
((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) ||
|
||||
@ -5235,7 +5235,7 @@ 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_IN_WATER && player->currentBoots != PLAYER_BOOTS_IRON) {
|
||||
func_8002DF38(camera->play, camera->target, 8);
|
||||
osSyncPrintf("camera: demo: player demo set WAIT\n");
|
||||
} else {
|
||||
@ -5610,7 +5610,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_IN_WATER && player->currentBoots != PLAYER_BOOTS_IRON) {
|
||||
camera->player->actor.world.pos.y = anim->playerPos.y;
|
||||
}
|
||||
} else {
|
||||
@ -6171,16 +6171,16 @@ s32 Camera_Demo5(Camera* camera) {
|
||||
|
||||
sDemo5PrevSfxFrame = camera->play->state.frames;
|
||||
|
||||
if (camera->player->stateFlags1 & 0x8000000 && (player->currentBoots != PLAYER_BOOTS_IRON)) {
|
||||
if (camera->player->stateFlags1 & PLAYER_STATE1_IN_WATER && (player->currentBoots != PLAYER_BOOTS_IRON)) {
|
||||
// swimming, and not iron boots
|
||||
player->stateFlags1 |= 0x20000000;
|
||||
player->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE;
|
||||
// env frozen
|
||||
player->actor.freezeTimer = camera->timer;
|
||||
} else {
|
||||
sp4A = playerhead.rot.y - playerTargetGeo.yaw;
|
||||
if (camera->target->category == ACTORCAT_PLAYER) {
|
||||
pad = camera->play->state.frames - sDemo5PrevAction12Frame;
|
||||
if (player->stateFlags1 & 0x800) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) {
|
||||
// holding object over head.
|
||||
func_8002DF54(camera->play, camera->target, 8);
|
||||
} else if (ABS(pad) > 3000) {
|
||||
@ -7240,7 +7240,7 @@ s32 Camera_UpdateWater(Camera* camera) {
|
||||
}
|
||||
|
||||
if (camera->unk_14C & 0x200) {
|
||||
if (player->stateFlags2 & 0x800) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_DIVING) {
|
||||
Camera_ChangeSettingFlags(camera, CAM_SET_PIVOT_WATER_SURFACE, 6);
|
||||
camera->unk_14C |= (s16)0x8000;
|
||||
} else if (camera->unk_14C & (s16)0x8000) {
|
||||
@ -7730,7 +7730,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_IN_CUTSCENE;
|
||||
|
||||
if (player->csAction != 0) {
|
||||
func_8002DF54(camera->play, &player->actor, 7);
|
||||
|
@ -788,7 +788,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
|
||||
player->stateFlags1 |= 0x20000000;
|
||||
player->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE;
|
||||
player->actor.freezeTimer = 90;
|
||||
|
||||
i = Quake_Add(csCam, 1);
|
||||
@ -990,7 +990,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
|
||||
if (func_800C0CB8(play)) {
|
||||
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_IN_WATER) {
|
||||
D_801231B4[2].atTargetInit.z = 0.0f;
|
||||
}
|
||||
Actor_GetWorldPosShapeRot(&spA0, &player->actor);
|
||||
|
@ -3837,7 +3837,7 @@ void Interface_DrawEnemyHealthBar(TargetContext* targetCtx, PlayState* play) {
|
||||
Interface_CreateQuadVertexGroup(&sEnemyHealthVtx[12], -floorf(halfBarWidth) + endTexWidth, (-texHeight / 2) + 3,
|
||||
healthBarFill, 7, 0);
|
||||
|
||||
if (((!(player->stateFlags1 & 0x40)) || (actor != player->unk_664)) && targetCtx->unk_44 < 500.0f) {
|
||||
if (((!(player->stateFlags1 & PLAYER_STATE1_TEXT_ON_SCREEN)) || (actor != player->unk_664)) && targetCtx->unk_44 < 500.0f) {
|
||||
f32 slideInOffsetY = 0;
|
||||
|
||||
// Slide in the health bar from edge of the screen (mimic the Z-Target triangles fly in)
|
||||
@ -4316,7 +4316,7 @@ void Interface_DrawItemButtons(PlayState* play) {
|
||||
|
||||
if ((gSaveContext.unk_13EA == 1) || (gSaveContext.unk_13EA == 2) || (gSaveContext.unk_13EA == 5)) {
|
||||
temp = 0;
|
||||
} else if ((player->stateFlags1 & 0x00200000) || (Player_GetEnvironmentalHazard(play) == 4) ||
|
||||
} else if ((player->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER) || (Player_GetEnvironmentalHazard(play) == 4) ||
|
||||
(player->stateFlags2 & PLAYER_STATE2_CRAWLING)) {
|
||||
temp = 70;
|
||||
} else {
|
||||
@ -5389,7 +5389,7 @@ void Interface_Draw(PlayState* play) {
|
||||
Interface_DrawItemIconTexture(play, gItemIcons[gSaveContext.equips.buttonItems[0]], 0);
|
||||
}
|
||||
|
||||
if ((player->stateFlags1 & 0x00800000) || (play->shootingGalleryStatus > 1) ||
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_ON_HORSE) || (play->shootingGalleryStatus > 1) ||
|
||||
((play->sceneNum == SCENE_BOMBCHU_BOWLING_ALLEY) && Flags_GetSwitch(play, 0x38))) {
|
||||
|
||||
if (!fullUi) {
|
||||
@ -5854,7 +5854,7 @@ void Interface_Draw(PlayState* play) {
|
||||
|
||||
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0) &&
|
||||
(play->gameOverCtx.state == GAMEOVER_INACTIVE) && (msgCtx->msgMode == MSGMODE_NONE) &&
|
||||
!(player->stateFlags2 & 0x01000000) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
!(player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
(play->transitionMode == TRANS_MODE_OFF) && !Play_InCsMode(play) && (gSaveContext.minigameState != 1) &&
|
||||
(play->shootingGalleryStatus <= 1) &&
|
||||
!((play->sceneNum == SCENE_BOMBCHU_BOWLING_ALLEY) && Flags_GetSwitch(play, 0x38))) {
|
||||
@ -6546,7 +6546,7 @@ void Interface_Update(PlayState* play) {
|
||||
HealthMeter_Update(play);
|
||||
|
||||
if ((gSaveContext.timer1State >= 3) && (play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0) &&
|
||||
(msgCtx->msgMode == MSGMODE_NONE) && !(player->stateFlags2 & 0x01000000) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
(msgCtx->msgMode == MSGMODE_NONE) && !(player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
(play->transitionMode == TRANS_MODE_OFF) && !Play_InCsMode(play)) {}
|
||||
|
||||
if (gSaveContext.rupeeAccumulator != 0) {
|
||||
|
@ -526,7 +526,7 @@ void Player_SetBootData(PlayState* play, Player* this) {
|
||||
currentBoots = PLAYER_BOOTS_KOKIRI_CHILD;
|
||||
}
|
||||
} else if (currentBoots == PLAYER_BOOTS_IRON) {
|
||||
if (this->stateFlags1 & 0x8000000) {
|
||||
if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) {
|
||||
currentBoots = PLAYER_BOOTS_IRON_UNDERWATER;
|
||||
}
|
||||
REG(27) = 500;
|
||||
@ -564,8 +564,8 @@ uint8_t Player_IsCustomLinkModel() {
|
||||
}
|
||||
|
||||
s32 Player_InBlockingCsMode(PlayState* play, Player* this) {
|
||||
return (this->stateFlags1 & 0x20000080) || (this->csAction != 0) || (play->transitionTrigger == TRANS_TRIGGER_START) ||
|
||||
(this->stateFlags1 & 1) || (this->stateFlags3 & 0x80) ||
|
||||
return (this->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_CUTSCENE)) || (this->csAction != 0) || (play->transitionTrigger == TRANS_TRIGGER_START) ||
|
||||
(this->stateFlags1 & PLAYER_STATE1_LOADING) || (this->stateFlags3 & PLAYER_STATE3_HOOKSHOT_TRAVELLING) ||
|
||||
((gSaveContext.magicState != MAGIC_STATE_IDLE) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0));
|
||||
}
|
||||
|
||||
@ -576,7 +576,7 @@ s32 Player_InCsMode(PlayState* play) {
|
||||
}
|
||||
|
||||
s32 func_8008E9C4(Player* this) {
|
||||
return (this->stateFlags1 & 0x10);
|
||||
return (this->stateFlags1 & PLAYER_STATE1_ENEMY_TARGET);
|
||||
}
|
||||
|
||||
s32 Player_IsChildWithHylianShield(Player* this) {
|
||||
@ -595,7 +595,7 @@ s32 Player_ActionToModelGroup(Player* this, s32 actionParam) {
|
||||
}
|
||||
|
||||
void Player_SetModelsForHoldingShield(Player* this) {
|
||||
if ((this->stateFlags1 & 0x400000) &&
|
||||
if ((this->stateFlags1 & PLAYER_STATE1_SHIELDING) &&
|
||||
((this->itemAction < 0) || (this->itemAction == this->heldItemAction))) {
|
||||
if ((CVarGetInteger("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK) ||
|
||||
!Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) {
|
||||
@ -737,15 +737,15 @@ void Player_UpdateBottleHeld(PlayState* play, Player* this, s32 item, s32 action
|
||||
|
||||
void func_8008EDF0(Player* this) {
|
||||
this->unk_664 = NULL;
|
||||
this->stateFlags2 &= ~0x2000;
|
||||
this->stateFlags2 &= ~PLAYER_STATE2_SWITCH_TARGETING;
|
||||
}
|
||||
|
||||
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_CLIMBING_LADDER | PLAYER_STATE1_ON_HORSE | PLAYER_STATE1_IN_WATER)) ||
|
||||
(!(this->stateFlags1 & (PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL)) && ((this->actor.world.pos.y - this->actor.floorHeight) < 100.0f))) {
|
||||
this->stateFlags1 &= ~(PLAYER_STATE1_TARGETING | PLAYER_STATE1_TARGET_LOCKED | PLAYER_STATE1_TARGET_NOTHING | PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_30);
|
||||
} else if (!(this->stateFlags1 & (PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_CLIMBING_LADDER))) {
|
||||
this->stateFlags1 |= PLAYER_STATE1_FREEFALL;
|
||||
}
|
||||
|
||||
func_8008EDF0(this);
|
||||
@ -757,7 +757,7 @@ void func_8008EEAC(PlayState* play, Actor* actor) {
|
||||
func_8008EE08(this);
|
||||
this->unk_664 = actor;
|
||||
this->unk_684 = actor;
|
||||
this->stateFlags1 |= 0x10000;
|
||||
this->stateFlags1 |= PLAYER_STATE1_TARGET_LOCKED;
|
||||
Camera_SetParam(Play_GetCamera(play, 0), 8, actor);
|
||||
Camera_ChangeMode(Play_GetCamera(play, 0), 2);
|
||||
}
|
||||
@ -765,7 +765,7 @@ void func_8008EEAC(PlayState* play, Actor* actor) {
|
||||
s32 func_8008EF30(PlayState* play) {
|
||||
Player* this = GET_PLAYER(play);
|
||||
|
||||
return (this->stateFlags1 & 0x800000);
|
||||
return (this->stateFlags1 & PLAYER_STATE1_ON_HORSE);
|
||||
}
|
||||
|
||||
s32 func_8008EF44(PlayState* play, s32 ammo) {
|
||||
@ -942,7 +942,7 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) {
|
||||
} else if ((this->underwaterTimer > 80) &&
|
||||
((this->currentBoots == PLAYER_BOOTS_IRON) || (this->underwaterTimer >= 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_IN_WATER) { // Swimming
|
||||
var = 2;
|
||||
} else {
|
||||
return 0;
|
||||
@ -1171,7 +1171,7 @@ void func_8008F87C(PlayState* play, Player* this, SkelAnime* skelAnime, Vec3f* p
|
||||
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_DEAD) &&
|
||||
(Player_ActionToMagicSpell(this, this->itemAction) < 0)) {
|
||||
s32 pad;
|
||||
|
||||
@ -1367,10 +1367,10 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
|
||||
|
||||
if ((sLeftHandType == PLAYER_MODELTYPE_LH_BGS) && (gSaveContext.swordHealth <= 0.0f)) {
|
||||
dLists += 4;
|
||||
} else if ((sLeftHandType == PLAYER_MODELTYPE_LH_BOOMERANG) && (this->stateFlags1 & 0x2000000)) {
|
||||
} else if ((sLeftHandType == PLAYER_MODELTYPE_LH_BOOMERANG) && (this->stateFlags1 & PLAYER_STATE1_THREW_BOOMERANG)) {
|
||||
dLists = &gPlayerLeftHandOpenDLs[gSaveContext.linkAge];
|
||||
sLeftHandType = 0;
|
||||
} else if ((this->leftHandType == PLAYER_MODELTYPE_LH_OPEN) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & 0x8000000)) {
|
||||
sLeftHandType = PLAYER_MODELTYPE_LH_OPEN;
|
||||
} else if ((this->leftHandType == PLAYER_MODELTYPE_LH_OPEN) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & PLAYER_STATE1_IN_WATER)) {
|
||||
dLists = &gPlayerLeftHandClosedDLs[gSaveContext.linkAge];
|
||||
sLeftHandType = PLAYER_MODELTYPE_LH_CLOSED;
|
||||
}
|
||||
@ -1381,7 +1381,7 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
|
||||
|
||||
if (sRightHandType == PLAYER_MODELTYPE_RH_SHIELD) {
|
||||
dLists += this->currentShield * 4;
|
||||
} else if ((this->rightHandType == PLAYER_MODELTYPE_RH_OPEN) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & 0x8000000)) {
|
||||
} else if ((this->rightHandType == PLAYER_MODELTYPE_RH_OPEN) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & PLAYER_STATE1_IN_WATER)) {
|
||||
dLists = &sPlayerRightHandClosedDLs[gSaveContext.linkAge];
|
||||
sRightHandType = PLAYER_MODELTYPE_RH_CLOSED;
|
||||
}
|
||||
@ -1510,7 +1510,7 @@ void Player_UpdateShieldCollider(PlayState* play, Player* this, ColliderQuad* co
|
||||
COLTYPE_METAL,
|
||||
};
|
||||
|
||||
if (this->stateFlags1 & 0x400000) {
|
||||
if (this->stateFlags1 & PLAYER_STATE1_SHIELDING) {
|
||||
Vec3f quadDest[4];
|
||||
|
||||
this->shieldQuad.base.colType = shieldColTypes[this->currentShield];
|
||||
@ -1544,12 +1544,12 @@ void func_800906D4(PlayState* play, Player* this, Vec3f* newTipPos) {
|
||||
Matrix_MultVec3f(&D_801260A4[2], &newBasePos[2]);
|
||||
|
||||
if (func_80090480(play, NULL, &this->meleeWeaponInfo[0], &newTipPos[0], &newBasePos[0]) &&
|
||||
!(this->stateFlags1 & 0x400000)) {
|
||||
!(this->stateFlags1 & PLAYER_STATE1_SHIELDING)) {
|
||||
EffectBlure_AddVertex(Effect_GetByIndex(this->meleeWeaponEffectIndex), &this->meleeWeaponInfo[0].tip,
|
||||
&this->meleeWeaponInfo[0].base);
|
||||
}
|
||||
|
||||
if ((this->meleeWeaponState > 0) && ((this->meleeWeaponAnimation < 0x18) || (this->stateFlags2 & 0x20000))) {
|
||||
if ((this->meleeWeaponState > 0) && ((this->meleeWeaponAnimation < 0x18) || (this->stateFlags2 & PLAYER_STATE2_SPIN_ATTACKING))) {
|
||||
func_80090480(play, &this->meleeWeaponQuads[0], &this->meleeWeaponInfo[1], &newTipPos[1], &newBasePos[1]);
|
||||
func_80090480(play, &this->meleeWeaponQuads[1], &this->meleeWeaponInfo[2], &newTipPos[2], &newBasePos[2]);
|
||||
}
|
||||
@ -1818,13 +1818,13 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
|
||||
if (this->actor.scale.y >= 0.0f) {
|
||||
if (!Player_HoldsHookshot(this) && ((hookedActor = this->heldActor) != NULL)) {
|
||||
if (this->stateFlags1 & 0x200) {
|
||||
if (this->stateFlags1 & PLAYER_STATE1_READY_TO_FIRE) {
|
||||
Matrix_MultVec3f(&sLeftHandArrowVec3, &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_ITEM_OVER_HEAD) {
|
||||
Vec3s spB8;
|
||||
|
||||
Matrix_Get(&sp14C);
|
||||
@ -1858,7 +1858,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
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_READY_TO_FIRE) && (this->unk_860 >= 0) && (this->unk_834 <= 10)) {
|
||||
Vec3f sp90;
|
||||
f32 distXYZ;
|
||||
|
||||
@ -1938,7 +1938,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
}
|
||||
|
||||
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_GETTING_ITEM) && (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;
|
||||
|
@ -122,7 +122,7 @@ s32 ArmsHook_CheckForCancel(ArmsHook* this) {
|
||||
|
||||
if (Player_HoldsHookshot(player)) {
|
||||
if ((player->itemAction != player->heldItemAction) || (player->actor.flags & ACTOR_FLAG_PLAYER_TALKED_TO) ||
|
||||
((player->stateFlags1 & 0x4000080))) {
|
||||
((player->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_DAMAGED)))) {
|
||||
this->timer = 0;
|
||||
ArmsHook_DetachHookFromActor(this);
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &player->unk_3C8);
|
||||
|
@ -237,7 +237,7 @@ void BgGndIceblock_Idle(BgGndIceblock* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
if (this->dyna.unk_150 > 0.0f) {
|
||||
BgGndIceblock_SetNextPosition(this);
|
||||
if (Actor_WorldDistXZToPoint(&this->dyna.actor, &this->targetPos) > 1.0f) {
|
||||
@ -254,7 +254,7 @@ void BgGndIceblock_Reset(BgGndIceblock* this, PlayState* play) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
if (Math_StepToF(&thisx->world.pos.y, thisx->home.pos.y, 1.0f)) {
|
||||
|
@ -61,7 +61,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_SPAWN_DUST;
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ void func_8087B7E8(BgHaka* this, PlayState* play) {
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
if (play->sceneNum == SCENE_GRAVEYARD && !LINK_IS_ADULT && IS_DAY && !CVarGetInteger("gDayGravePull", 0)) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
if (!Play_InCsMode(play)) {
|
||||
Message_StartTextbox(play, 0x5073, NULL);
|
||||
this->dyna.actor.params = 100;
|
||||
@ -80,7 +80,7 @@ void func_8087B7E8(BgHaka* this, PlayState* play) {
|
||||
} else if (0.0f < this->dyna.unk_150 ||
|
||||
(play->sceneNum == SCENE_LAKE_HYLIA && !LINK_IS_ADULT && !Flags_GetSwitch(play, 0x23))) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
} else {
|
||||
this->dyna.actor.world.rot.y = this->dyna.actor.shape.rot.y + 0x8000;
|
||||
this->actionFunc = func_8087B938;
|
||||
@ -112,7 +112,7 @@ void func_8087B938(BgHaka* this, PlayState* play) {
|
||||
}
|
||||
actor = actor->next;
|
||||
}
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
|
||||
if (this->dyna.actor.params == 1) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
@ -146,7 +146,7 @@ void func_8087BAAC(BgHaka* this, PlayState* play) {
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ void func_8087BAE4(BgHaka* this, PlayState* play) {
|
||||
}
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
}
|
||||
if (this->dyna.actor.params == 0) {
|
||||
this->actionFunc = func_8087B7E8;
|
||||
|
@ -153,7 +153,7 @@ void BgHakaGate_StatueInactive(BgHakaGate* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
}
|
||||
@ -172,7 +172,7 @@ void BgHakaGate_StatueIdle(BgHakaGate* this, PlayState* play) {
|
||||
this->vTurnDirection = linkDirection * forceDirection;
|
||||
this->actionFunc = BgHakaGate_StatueTurn;
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
if (this->vTimer != 0) {
|
||||
this->vTimer--;
|
||||
@ -197,7 +197,7 @@ void BgHakaGate_StatueTurn(BgHakaGate* this, PlayState* play) {
|
||||
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_MOVING_DYNAPOLY) && (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);
|
||||
@ -209,7 +209,7 @@ void BgHakaGate_StatueTurn(BgHakaGate* this, PlayState* play) {
|
||||
}
|
||||
sStatueRotY = this->dyna.actor.shape.rot.y;
|
||||
if (turnFinished) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->vRotYDeg10 = (this->vRotYDeg10 + turnAngle) % 3600;
|
||||
this->vTurnRateDeg10 = CVarGetInteger("gFasterBlockPush", 0) * 2;
|
||||
this->vTurnAngleDeg10 = 0;
|
||||
|
@ -290,7 +290,7 @@ void BgHakaSgami_Update(Actor* thisx, PlayState* play) {
|
||||
BgHakaSgami* this = (BgHakaSgami*)thisx;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(player->stateFlags1 & 0x300000C0) || (this->actionFunc == BgHakaSgami_SetupSpin)) {
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE)) || (this->actionFunc == BgHakaSgami_SetupSpin)) {
|
||||
this->actionFunc(this, play);
|
||||
}
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ void func_8088B268(BgHidanRock* this, PlayState* play) {
|
||||
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_MOVING_DYNAPOLY;
|
||||
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;
|
||||
@ -162,7 +162,7 @@ void func_8088B268(BgHidanRock* this, PlayState* play) {
|
||||
|
||||
func_8002F974(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
@ -180,7 +180,7 @@ void func_8088B268(BgHidanRock* this, PlayState* play) {
|
||||
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_MOVING_DYNAPOLY;
|
||||
this->actionFunc = func_8088B79C;
|
||||
}
|
||||
|
||||
@ -300,7 +300,7 @@ void func_8088B990(BgHidanRock* this, PlayState* play) {
|
||||
this->timer++;
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
this->dyna.actor.speedXZ = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
}
|
||||
|
||||
if ((this->type == 0 && (Math_SmoothStepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 1820.0f,
|
||||
|
@ -118,7 +118,7 @@ void func_8088E518(BgHidanSima* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
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_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE))) {
|
||||
this->timer = 20;
|
||||
this->dyna.actor.world.rot.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x4000;
|
||||
if (this->dyna.actor.home.pos.y <= this->dyna.actor.world.pos.y) {
|
||||
|
@ -138,7 +138,7 @@ void BgIceObjects_Idle(BgIceObjects* this, PlayState* play) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
if ((this->dyna.unk_150 > 0.0f) && !Player_InCsMode(play)) {
|
||||
BgIceObjects_SetNextTarget(this, play);
|
||||
if (Actor_WorldDistXZToPoint(thisx, &this->targetPos) > 1.0f) {
|
||||
@ -203,7 +203,7 @@ void BgIceObjects_Reset(BgIceObjects* this, PlayState* play) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
if (Math_StepToF(&thisx->world.pos.y, thisx->home.pos.y, 1.0f)) {
|
||||
@ -218,7 +218,7 @@ void BgIceObjects_Stuck(BgIceObjects* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ void BgJyaBlock_Update(Actor* thisx, PlayState* play) {
|
||||
BgJyaBlock* this = (BgJyaBlock*)thisx;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -201,7 +201,7 @@ void BgJyaGoroiwa_Update(Actor* thisx, PlayState* play) {
|
||||
s32 bgId;
|
||||
Vec3f pos;
|
||||
|
||||
if (!(player->stateFlags1 & 0x300000C0)) {
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE))) {
|
||||
this->actionFunc(this, play);
|
||||
BgJyaGoroiwa_UpdateRotation(this);
|
||||
pos.x = this->actor.world.pos.x;
|
||||
|
@ -78,7 +78,7 @@ void BgJyaZurerukabe_InitDynaPoly(BgJyaZurerukabe* this, PlayState* play, Collis
|
||||
void func_8089B4C8(BgJyaZurerukabe* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((player->stateFlags1 == 0x200000) && (player->actor.wallPoly != NULL)) {
|
||||
if ((player->stateFlags1 == PLAYER_STATE1_CLIMBING_LADDER) && (player->actor.wallPoly != NULL)) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_8089BA18); i++) {
|
||||
|
@ -112,7 +112,7 @@ void BgMoriKaitenkabe_Wait(BgMoriKaitenkabe* this, PlayState* play) {
|
||||
}
|
||||
if (fabsf(this->dyna.unk_150) > 0.001f) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
}
|
||||
}
|
||||
|
||||
@ -145,7 +145,7 @@ void BgMoriKaitenkabe_Rotate(BgMoriKaitenkabe* this, PlayState* play) {
|
||||
}
|
||||
if (fabsf(this->dyna.unk_150) > 0.001f) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
}
|
||||
Math_Vec3f_Copy(&player->actor.world.pos, &this->lockedPlayerPos);
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, PlayState* play) {
|
||||
}
|
||||
} else {
|
||||
if ((gSaveContext.timer1Value == 0) && (sBgPoEventBlocksAtRest == 5)) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
sBgPoEventPuzzleState = 0x10;
|
||||
sBgPoEventBlocksAtRest = 0;
|
||||
}
|
||||
@ -367,11 +367,11 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, PlayState* play) {
|
||||
this->direction = (this->dyna.unk_150 >= 0.0f) ? 1.0f : -1.0f;
|
||||
this->actionFunc = BgPoEvent_BlockPush;
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
DECR(this->direction);
|
||||
}
|
||||
@ -394,7 +394,7 @@ void BgPoEvent_BlockPush(BgPoEvent* this, PlayState* play) {
|
||||
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_MOVING_DYNAPOLY;
|
||||
if ((this->dyna.unk_150 > 0.0f) && (func_800435D8(play, &this->dyna, 0x1E, 0x32, -0x14) == 0)) {
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
|
||||
}
|
||||
@ -419,7 +419,7 @@ void BgPoEvent_BlockReset(BgPoEvent* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
if (Math_StepToF(&this->dyna.actor.world.pos.y, 493.0f, 1.0f) &&
|
||||
@ -439,7 +439,7 @@ void BgPoEvent_BlockSolved(BgPoEvent* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
}
|
||||
if (Math_StepToF(&this->dyna.actor.world.pos.y, 369.0f, 2.0f)) {
|
||||
sBgPoEventPuzzleState = 0x20;
|
||||
|
@ -239,11 +239,11 @@ void func_808B40AC(BgSpot15Rrbox* this, PlayState* play) {
|
||||
this->unk_17C = this->dyna.unk_150;
|
||||
func_808B4178(this, play);
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
}
|
||||
@ -275,7 +275,7 @@ void func_808B4194(BgSpot15Rrbox* this, PlayState* play) {
|
||||
if (!func_808B3F58(this, play)) {
|
||||
actor->home.pos.x = actor->world.pos.x;
|
||||
actor->home.pos.z = actor->world.pos.z;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
this->unk_178 = 0.0f;
|
||||
this->unk_174 = 0.0f;
|
||||
@ -290,7 +290,7 @@ void func_808B4194(BgSpot15Rrbox* this, PlayState* play) {
|
||||
}
|
||||
actor->home.pos.x = actor->world.pos.x;
|
||||
actor->home.pos.z = actor->world.pos.z;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
this->unk_178 = 0.0f;
|
||||
this->unk_174 = 0.0f;
|
||||
@ -316,7 +316,7 @@ void func_808B43D0(BgSpot15Rrbox* this, PlayState* play) {
|
||||
|
||||
if (fabsf(this->dyna.unk_150) > 0.001f) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
}
|
||||
|
||||
Actor_MoveForward(actor);
|
||||
@ -347,7 +347,7 @@ void func_808B44B8(BgSpot15Rrbox* this, PlayState* play) {
|
||||
void func_808B44CC(BgSpot15Rrbox* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -413,7 +413,7 @@ void func_808B57E0(BgSpot16Bombstone* this, PlayState* play) {
|
||||
OnePointCutscene_Init(play, 4180, sTimer, NULL, MAIN_CAM);
|
||||
}
|
||||
}
|
||||
} else if (player->stateFlags1 & 0x800) {
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) {
|
||||
playerHeldActor = player->heldActor;
|
||||
if (playerHeldActor != NULL && playerHeldActor->category == ACTORCAT_EXPLOSIVE &&
|
||||
playerHeldActor->id == ACTOR_EN_BOMBF) {
|
||||
|
@ -213,7 +213,7 @@ void func_808B8E20(BgSpot18Obj* this, PlayState* play) {
|
||||
|
||||
if (fabsf(this->dyna.unk_150) > 0.001f) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
}
|
||||
}
|
||||
|
||||
@ -256,7 +256,7 @@ void func_808B8F08(BgSpot18Obj* this, PlayState* play) {
|
||||
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_MOVING_DYNAPOLY;
|
||||
Flags_SetSwitch(play, (this->dyna.actor.params >> 8) & 0x3F);
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
|
||||
|
@ -81,7 +81,7 @@ void BgSstFloor_Update(BgSstFloor* thisx, PlayState* play) {
|
||||
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_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE))) {
|
||||
distFromRim = 600.0f - this->dyna.actor.xzDistToPlayer;
|
||||
if (distFromRim > 0.0f) {
|
||||
if (distFromRim > 350.0f) {
|
||||
|
@ -2276,10 +2276,10 @@ void BossGanon_Wait(BossGanon* this, PlayState* play) {
|
||||
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_HANGING_OFF_LEDGE) && (fabsf(player->actor.world.pos.x) < 110.0f) &&
|
||||
(fabsf(player->actor.world.pos.z) < 110.0f)) {
|
||||
BossGanon_SetupPoundFloor(this, play);
|
||||
} else if ((this->timers[0] == 0) && !(player->stateFlags1 & 0x2000)) {
|
||||
} else if ((this->timers[0] == 0) && !(player->stateFlags1 & PLAYER_STATE1_HANGING_OFF_LEDGE)) {
|
||||
this->timers[0] = (s16)Rand_ZeroFloat(30.0f) + 30;
|
||||
|
||||
if ((s8)this->actor.colChkInfo.health >= 20) {
|
||||
|
@ -387,7 +387,7 @@ void BossSst_HeadSetupIntro(BossSst* this, PlayState* play) {
|
||||
player->targetYaw = -0x8000;
|
||||
player->currentYaw = -0x8000;
|
||||
player->fallStartHeight = 0;
|
||||
player->stateFlags1 |= 0x20;
|
||||
player->stateFlags1 |= PLAYER_STATE1_INPUT_DISABLED;
|
||||
|
||||
func_80064520(play, &play->csCtx);
|
||||
func_8002DF54(play, &this->actor, 8);
|
||||
@ -421,7 +421,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
|
||||
if (this->timer == 0) {
|
||||
sHands[RIGHT]->actor.flags |= ACTOR_FLAG_TARGETABLE;
|
||||
sHands[LEFT]->actor.flags |= ACTOR_FLAG_TARGETABLE;
|
||||
player->stateFlags1 &= ~0x20;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_INPUT_DISABLED;
|
||||
func_80064534(play, &play->csCtx);
|
||||
func_8002DF54(play, &this->actor, 7);
|
||||
sCameraAt.y += 30.0f;
|
||||
@ -667,7 +667,7 @@ void BossSst_HeadNeutral(BossSst* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->timer == 0) {
|
||||
if ((GET_PLAYER(play)->actor.world.pos.y > -50.0f) && !(GET_PLAYER(play)->stateFlags1 & 0x6080)) {
|
||||
if ((GET_PLAYER(play)->actor.world.pos.y > -50.0f) && !(GET_PLAYER(play)->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE))) {
|
||||
sHands[Rand_ZeroOne() <= 0.5f]->ready = true;
|
||||
BossSst_HeadSetupWait(this);
|
||||
} else {
|
||||
@ -1252,7 +1252,7 @@ void BossSst_HandWait(BossSst* this, PlayState* play) {
|
||||
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_DEAD | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE))) {
|
||||
BossSst_HandSelectAttack(this);
|
||||
}
|
||||
} else if (sHead->actionFunc == BossSst_HeadNeutral) {
|
||||
@ -1735,7 +1735,7 @@ void BossSst_HandClap(BossSst* this, PlayState* play) {
|
||||
if (this->ready) {
|
||||
this->timer = 30;
|
||||
this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
|
||||
if (!(player->stateFlags2 & 0x80)) {
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY)) {
|
||||
dropFlag = true;
|
||||
}
|
||||
} else {
|
||||
@ -1824,7 +1824,7 @@ void BossSst_HandGrab(BossSst* this, PlayState* play) {
|
||||
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_GRABBED_BY_ENEMY) {
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
BossSst_HandSetupCrush(this);
|
||||
} else {
|
||||
@ -1851,7 +1851,7 @@ void BossSst_HandGrab(BossSst* this, PlayState* play) {
|
||||
|
||||
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_GRABBED_BY_ENEMY) {
|
||||
player->unk_850 = 0;
|
||||
player->actor.world.pos = this->actor.world.pos;
|
||||
player->actor.shape.rot.y = this->actor.shape.rot.y;
|
||||
@ -1872,7 +1872,7 @@ void BossSst_HandCrush(BossSst* this, PlayState* play) {
|
||||
this->timer--;
|
||||
}
|
||||
|
||||
if (!(player->stateFlags2 & 0x80)) {
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY)) {
|
||||
BossSst_HandReleasePlayer(this, play, true);
|
||||
BossSst_HandSetupEndCrush(this);
|
||||
} else {
|
||||
@ -1945,7 +1945,7 @@ void BossSst_HandSwing(BossSst* this, PlayState* play) {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.z, 0, 0x800);
|
||||
}
|
||||
|
||||
if (player->stateFlags2 & 0x80) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY) {
|
||||
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;
|
||||
@ -1958,7 +1958,7 @@ void BossSst_HandSwing(BossSst* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if ((this->timer == 4) && (this->amplitude == 0) && SkelAnime_Update(&this->skelAnime) &&
|
||||
(player->stateFlags2 & 0x80)) {
|
||||
(player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY)) {
|
||||
BossSst_HandReleasePlayer(this, play, 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);
|
||||
|
@ -803,7 +803,7 @@ s32 BossTw_CheckBeamReflection(BossTw* this, PlayState* play) {
|
||||
Vec3f vec;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (player->stateFlags1 & 0x400000 &&
|
||||
if (player->stateFlags1 & PLAYER_STATE1_SHIELDING &&
|
||||
(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
|
||||
@ -945,7 +945,7 @@ void BossTw_ShootBeam(BossTw* this, PlayState* play) {
|
||||
|
||||
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_SHIELDING) &&
|
||||
((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);
|
||||
@ -4799,7 +4799,7 @@ void BossTw_UpdateEffects(PlayState* play) {
|
||||
if (eff->workf[EFF_SCALE] == 0.0f) {
|
||||
eff->type = TWEFF_NONE;
|
||||
if (eff->target == NULL) {
|
||||
player->stateFlags2 &= ~0x8000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_PAUSE_MOST_UPDATING;
|
||||
sFreezeState = 0;
|
||||
}
|
||||
}
|
||||
@ -4815,9 +4815,9 @@ void BossTw_UpdateEffects(PlayState* play) {
|
||||
|
||||
if (eff->workf[EFF_ROLL] >= 0.8f) {
|
||||
eff->workf[EFF_ROLL] -= 0.8f;
|
||||
player->stateFlags2 |= 0x8000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_PAUSE_MOST_UPDATING;
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x8000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_PAUSE_MOST_UPDATING;
|
||||
}
|
||||
|
||||
if ((sKotakePtr->workf[UNK_F11] > 10.0f) && (sKotakePtr->workf[UNK_F11] < 200.0f)) {
|
||||
|
@ -1441,14 +1441,14 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
|
||||
} 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_DAMAGED) && (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_DAMAGED) && (this->timer < -60)) {
|
||||
this->timer = -59;
|
||||
}
|
||||
if ((play->gameplayFrames % 4) == 0) {
|
||||
@ -2024,7 +2024,7 @@ void BossVa_ZapperAttack(BossVa* this, PlayState* play) {
|
||||
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_DAMAGED)) {
|
||||
|
||||
if (!this->burst) {
|
||||
sp94 = sp98 - this->actor.shape.rot.y;
|
||||
@ -2086,7 +2086,7 @@ void BossVa_ZapperAttack(BossVa* this, PlayState* play) {
|
||||
this->timer2 = 0;
|
||||
}
|
||||
|
||||
if ((this->timer2 < 0) && (player->stateFlags1 & 0x4000000)) {
|
||||
if ((this->timer2 < 0) && (player->stateFlags1 & PLAYER_STATE1_DAMAGED)) {
|
||||
BossVa_Spark(play, this, 1, 30, 0.0f, 0.0f, SPARK_LINK, 0.0f, true);
|
||||
}
|
||||
}
|
||||
@ -2287,7 +2287,7 @@ void BossVa_ZapperEnraged(BossVa* this, PlayState* play) {
|
||||
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_DAMAGED)) {
|
||||
if (!this->burst) {
|
||||
|
||||
sp68 = sp6C - this->actor.shape.rot.y;
|
||||
@ -2344,7 +2344,7 @@ void BossVa_ZapperEnraged(BossVa* this, PlayState* play) {
|
||||
this->timer2 = 0;
|
||||
}
|
||||
|
||||
if ((this->timer2 < 0) && (player->stateFlags1 & 0x4000000)) {
|
||||
if ((this->timer2 < 0) && (player->stateFlags1 & PLAYER_STATE1_DAMAGED)) {
|
||||
BossVa_Spark(play, this, 1, 30, 0.0f, 0, SPARK_LINK, 0.0f, true);
|
||||
}
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play) {
|
||||
|
||||
player = GET_PLAYER(play);
|
||||
if (Math_StepToF(&this->actor.scale.x, 0.01f, 0.001f)) {
|
||||
if ((this->actor.targetMode != 0) && (play->transitionTrigger == TRANS_TRIGGER_OFF) && (player->stateFlags1 & 0x80000000) &&
|
||||
if ((this->actor.targetMode != 0) && (play->transitionTrigger == TRANS_TRIGGER_OFF) && (player->stateFlags1 & PLAYER_STATE1_FLOOR_DISABLED) &&
|
||||
(player->unk_84F == 0)) {
|
||||
destinationIdx = ((this->actor.params >> 0xC) & 7) - 1;
|
||||
Play_SetupRespawnPoint(play, RESPAWN_MODE_RETURN, 0x4FF);
|
||||
@ -153,10 +153,10 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play) {
|
||||
|
||||
DoorAna_SetupAction(this, DoorAna_GrabPlayer);
|
||||
} else {
|
||||
if (!Player_InCsMode(play) && !(player->stateFlags1 & 0x8800000) &&
|
||||
if (!Player_InCsMode(play) && !(player->stateFlags1 & (PLAYER_STATE1_ON_HORSE | PLAYER_STATE1_IN_WATER)) &&
|
||||
this->actor.xzDistToPlayer <= 15.0f && -50.0f <= this->actor.yDistToPlayer &&
|
||||
this->actor.yDistToPlayer <= 15.0f) {
|
||||
player->stateFlags1 |= 0x80000000;
|
||||
player->stateFlags1 |= PLAYER_STATE1_FLOOR_DISABLED;
|
||||
this->actor.targetMode = 1;
|
||||
} else {
|
||||
this->actor.targetMode = 0;
|
||||
|
@ -553,7 +553,7 @@ void func_80997220(DoorShutter* this, PlayState* play) {
|
||||
}
|
||||
this->unk_164 = 0;
|
||||
this->dyna.actor.velocity.y = 0.0f;
|
||||
if (DoorShutter_SetupDoor(this, play) && !(player->stateFlags1 & 0x800)) {
|
||||
if (DoorShutter_SetupDoor(this, play) && !(player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD)) {
|
||||
DoorShutter_SetupAction(this, func_80997568);
|
||||
func_8002DF54(play, NULL, 2);
|
||||
}
|
||||
@ -637,7 +637,7 @@ void DoorShutter_Update(Actor* thisx, PlayState* play) {
|
||||
DoorShutter* this = (DoorShutter*)thisx;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(player->stateFlags1 & 0x100004C0) || (this->actionFunc == DoorShutter_SetupType)) {
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_IN_ITEM_CS)) || (this->actionFunc == DoorShutter_SetupType)) {
|
||||
this->actionFunc(this, play);
|
||||
}
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ void EffDust_UpdateFunc_8099DFC0(EffDust* this, PlayState* play) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
if (parent == NULL || parent->update == NULL || !(player->stateFlags1 & 0x1000)) {
|
||||
if (parent == NULL || parent->update == NULL || !(player->stateFlags1 & PLAYER_STATE1_CHARGING_SPIN_ATTACK)) {
|
||||
if (this->life != 0) {
|
||||
this->life -= 1;
|
||||
} else {
|
||||
|
@ -694,7 +694,7 @@ void EnAm_Statue(EnAm* this, PlayState* play) {
|
||||
((this->hurtCollider.base.ocFlags1 & OC1_HIT) && (ABS(moveDir) <= 0x2000))) {
|
||||
|
||||
this->unk_258 = 0;
|
||||
player->stateFlags2 &= ~0x151;
|
||||
player->stateFlags2 &= ~(PLAYER_STATE2_DO_ACTION_GRAB | PLAYER_STATE2_MOVING_DYNAPOLY | PLAYER_STATE2_DISABLE_ROTATION_ALWAYS | PLAYER_STATE2_GRABBING_DYNAPOLY);
|
||||
player->actor.speedXZ = 0.0f;
|
||||
this->dyna.unk_150 = this->dyna.unk_154 = 0.0f;
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ void EnBa_Idle(EnBa* this, PlayState* play) {
|
||||
}
|
||||
this->unk_2A8[13].x = this->unk_2A8[12].x;
|
||||
this->unk_2A8[13].y = this->unk_2A8[12].y;
|
||||
if (!(player->stateFlags1 & 0x4000000) && (this->actor.xzDistToPlayer <= 175.0f) &&
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_DAMAGED) && (this->actor.xzDistToPlayer <= 175.0f) &&
|
||||
(this->actor.world.pos.y == this->actor.home.pos.y + 100.0f)) {
|
||||
EnBa_SetupSwingAtPlayer(this);
|
||||
}
|
||||
@ -294,7 +294,7 @@ void EnBa_SwingAtPlayer(EnBa* this, PlayState* play) {
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk_158[i + 1]);
|
||||
}
|
||||
this->unk_31A--;
|
||||
} else if ((this->actor.xzDistToPlayer > 175.0f) || (player->stateFlags1 & 0x4000000)) {
|
||||
} else if ((this->actor.xzDistToPlayer > 175.0f) || (player->stateFlags1 & PLAYER_STATE1_DAMAGED)) {
|
||||
EnBa_SetupIdle(this);
|
||||
} else {
|
||||
EnBa_SetupSwingAtPlayer(this);
|
||||
@ -313,7 +313,7 @@ void EnBa_SwingAtPlayer(EnBa* this, PlayState* play) {
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
return;
|
||||
}
|
||||
if ((this->actor.xzDistToPlayer > 175.0f) || (player->stateFlags1 & 0x4000000)) {
|
||||
if ((this->actor.xzDistToPlayer > 175.0f) || (player->stateFlags1 & PLAYER_STATE1_DAMAGED)) {
|
||||
EnBa_SetupIdle(this);
|
||||
} else {
|
||||
EnBa_SetupSwingAtPlayer(this);
|
||||
|
@ -84,7 +84,7 @@ void EnBlkobj_Wait(EnBlkobj* this, PlayState* play) {
|
||||
if (this->dyna.actor.xzDistToPlayer < 120.0f) {
|
||||
EnBlkobj_SetupAction(this, EnBlkobj_SpawnDarkLink);
|
||||
}
|
||||
player->stateFlags2 |= 0x04000000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_REFLECTION;
|
||||
}
|
||||
|
||||
void EnBlkobj_SpawnDarkLink(EnBlkobj* this, PlayState* play) {
|
||||
|
@ -238,11 +238,11 @@ void EnBom_Explode(EnBom* this, PlayState* play) {
|
||||
if (this->timer == 0) {
|
||||
player = GET_PLAYER(play);
|
||||
|
||||
if ((player->stateFlags1 & 0x800) && (player->heldActor == &this->actor)) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) && (player->heldActor == &this->actor)) {
|
||||
player->actor.child = NULL;
|
||||
player->heldActor = NULL;
|
||||
player->interactRangeActor = NULL;
|
||||
player->stateFlags1 &= ~0x800;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD;
|
||||
}
|
||||
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -200,14 +200,14 @@ void EnBomBowlPit_GivePrize(EnBomBowlPit* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
player->stateFlags1 &= ~0x20000000;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_IN_CUTSCENE;
|
||||
this->actor.parent = NULL;
|
||||
if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, play, this->getItemId, 2000.0f, 1000.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 2000.0f, 1000.0f);
|
||||
}
|
||||
player->stateFlags1 |= 0x20000000;
|
||||
player->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE;
|
||||
this->actionFunc = EnBomBowlPit_WaitTillPrizeGiven;
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) {
|
||||
player->heldActor = NULL;
|
||||
player->interactRangeActor = NULL;
|
||||
this->actor.parent = NULL;
|
||||
player->stateFlags1 &= ~0x800;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD;
|
||||
}
|
||||
} else if (this->bombCollider.base.acFlags & AC_HIT) {
|
||||
this->bombCollider.base.acFlags &= ~AC_HIT;
|
||||
@ -200,7 +200,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) {
|
||||
player->heldActor = NULL;
|
||||
player->interactRangeActor = NULL;
|
||||
this->actor.parent = NULL;
|
||||
player->stateFlags1 &= ~0x800;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD;
|
||||
this->actor.world.pos = this->actor.home.pos;
|
||||
}
|
||||
}
|
||||
@ -218,7 +218,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) {
|
||||
player->heldActor = NULL;
|
||||
player->interactRangeActor = NULL;
|
||||
this->actor.parent = NULL;
|
||||
player->stateFlags1 &= ~0x800;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD;
|
||||
this->actor.world.pos = this->actor.home.pos;
|
||||
}
|
||||
}
|
||||
@ -302,11 +302,11 @@ void EnBombf_Explode(EnBombf* this, PlayState* play) {
|
||||
if (this->timer == 0) {
|
||||
player = GET_PLAYER(play);
|
||||
|
||||
if ((player->stateFlags1 & 0x800) && (player->heldActor == &this->actor)) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) && (player->heldActor == &this->actor)) {
|
||||
player->actor.child = NULL;
|
||||
player->heldActor = NULL;
|
||||
player->interactRangeActor = NULL;
|
||||
player->stateFlags1 &= ~0x800;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD;
|
||||
}
|
||||
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -243,7 +243,7 @@ void EnBoom_Update(Actor* thisx, PlayState* play) {
|
||||
EnBoom* this = (EnBoom*)thisx;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(player->stateFlags1 & 0x20000000)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE)) {
|
||||
this->actionFunc(this, play);
|
||||
Actor_SetFocus(&this->actor, 0.0f);
|
||||
this->activeTimer = this->activeTimer + 1;
|
||||
|
@ -320,8 +320,8 @@ void func_809C9700(EnBox* this, PlayState* play) {
|
||||
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_ATTEMPT_PLAY_FOR_ACTOR)) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
return;
|
||||
}
|
||||
this->unk_1FB = ENBOX_STATE_1;
|
||||
|
@ -359,7 +359,7 @@ void func_809CEA24(EnBw* this, PlayState* play) {
|
||||
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_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE))) {
|
||||
this->unk_221 = 3;
|
||||
this->unk_224 = 150;
|
||||
this->unk_250 = 0.0f;
|
||||
|
@ -281,7 +281,7 @@ void EnCrow_FlyIdle(EnCrow* this, PlayState* play) {
|
||||
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_ON_HORSE) &&
|
||||
(this->actor.yDistToWater < -40.0f) && (Player_GetMask(play) != PLAYER_MASK_SKULL)) {
|
||||
EnCrow_SetupDiveAttack(this);
|
||||
}
|
||||
@ -319,7 +319,7 @@ void EnCrow_DiveAttack(EnCrow* this, PlayState* play) {
|
||||
|
||||
if ((this->timer == 0) || (Player_GetMask(play) == 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_ON_HORSE) || (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);
|
||||
|
@ -230,7 +230,7 @@ void EnDha_Wait(EnDha* this, PlayState* play) {
|
||||
this->timer += 0x1194;
|
||||
this->limbAngleY = Math_SinS(this->timer) * 1820.0f;
|
||||
|
||||
if (!(player->stateFlags2 & 0x80)) {
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY)) {
|
||||
this->unk_1CC = 0;
|
||||
EnDha_SetupTakeDamage(this);
|
||||
return;
|
||||
@ -245,8 +245,8 @@ void EnDha_Wait(EnDha* this, PlayState* play) {
|
||||
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_GRABBED_BY_ENEMY) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_GRABBED_BY_ENEMY;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
}
|
||||
@ -285,8 +285,8 @@ void EnDha_Wait(EnDha* this, PlayState* play) {
|
||||
this->limbAngleX[1] *= -2;
|
||||
}
|
||||
} else {
|
||||
if ((player->stateFlags2 & 0x80) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_GRABBED_BY_ENEMY;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
}
|
||||
@ -306,8 +306,8 @@ void EnDha_SetupTakeDamage(EnDha* this) {
|
||||
void EnDha_TakeDamage(EnDha* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((player->stateFlags2 & 0x80) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_GRABBED_BY_ENEMY;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
}
|
||||
@ -344,8 +344,8 @@ void EnDha_Die(EnDha* this, PlayState* play) {
|
||||
Vec3f vec;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((player->stateFlags2 & 0x80) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_GRABBED_BY_ENEMY;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
}
|
||||
|
@ -460,7 +460,7 @@ void func_809EFF50(EnDns* this, PlayState* play) {
|
||||
void func_809EFF98(EnDns* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (player->stateFlags1 & 0x400) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_GETTING_ITEM) {
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
|
||||
this->dnsItemEntry->setRupeesAndFlags(this);
|
||||
this->dropCollectible = 1;
|
||||
|
@ -123,7 +123,7 @@ void EnDntJiji_Wait(EnDntJiji* this, PlayState* play) {
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((this->timer == 1) && (this->actor.xzDistToPlayer < 150.0f) && !Play_InCsMode(play) &&
|
||||
!(player->stateFlags1 & 0x800)) {
|
||||
!(player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD)) {
|
||||
OnePointCutscene_Init(play, 2230, -99, &this->actor, MAIN_CAM);
|
||||
this->timer = 0;
|
||||
func_8002DF54(play, NULL, 8);
|
||||
|
@ -198,7 +198,7 @@ void EnDoor_Idle(EnDoor* this, PlayState* play) {
|
||||
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_IN_WATER) ? 0.75f : 1.5f);
|
||||
if (this->lockTimer != 0) {
|
||||
gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex]--;
|
||||
Flags_SetSwitch(play, this->actor.params & 0x3F);
|
||||
|
@ -353,9 +353,9 @@ void func_809FE3B4(EnDu* this, PlayState* play) {
|
||||
void func_809FE3C0(EnDu* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
func_8010BD88(play, OCARINA_ACTION_CHECK_SARIA);
|
||||
player->stateFlags2 |= 0x2000000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_PLAY_FOR_ACTOR;
|
||||
player->unk_6A8 = &this->actor;
|
||||
EnDu_SetupAction(this, func_809FE4A4);
|
||||
return;
|
||||
@ -365,7 +365,7 @@ void func_809FE3C0(EnDu* this, PlayState* play) {
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
if (this->actor.xzDistToPlayer < 116.0f + this->collider.dim.radius) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
|
||||
@ -393,14 +393,14 @@ void func_809FE4A4(EnDu* this, PlayState* play) {
|
||||
EnDu_SetupAction(this, func_809FE890);
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
|
||||
void func_809FE638(EnDu* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(player->stateFlags1 & 0x20000000)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE)) {
|
||||
OnePointCutscene_Init(play, 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);
|
||||
|
@ -1097,13 +1097,13 @@ void func_80A0461C(EnElf* this, PlayState* play) {
|
||||
} else {
|
||||
arrowPointedActor = play->actorCtx.targetCtx.arrowPointedActor;
|
||||
|
||||
if ((player->stateFlags1 & 0x400) || ((YREG(15) & 0x10) && func_800BC56C(play, 2))) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_GETTING_ITEM) || ((YREG(15) & 0x10) && func_800BC56C(play, 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_NAVI_OUT;
|
||||
temp = 0;
|
||||
} else {
|
||||
switch (this->unk_2A8) {
|
||||
@ -1124,7 +1124,7 @@ void func_80A0461C(EnElf* this, PlayState* play) {
|
||||
this->unk_2AE--;
|
||||
temp = 7;
|
||||
} else {
|
||||
player->stateFlags2 |= 0x100000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NAVI_OUT;
|
||||
temp = 0;
|
||||
}
|
||||
} else {
|
||||
@ -1154,7 +1154,7 @@ void func_80A0461C(EnElf* this, PlayState* play) {
|
||||
|
||||
switch (temp) {
|
||||
case 0:
|
||||
if (!(player->stateFlags2 & 0x100000)) {
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_NAVI_OUT)) {
|
||||
temp = 7;
|
||||
if (this->unk_2C7 == 0) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_NAVY_VANISH);
|
||||
@ -1162,7 +1162,7 @@ void func_80A0461C(EnElf* this, PlayState* play) {
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (player->stateFlags2 & 0x100000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_NAVI_OUT) {
|
||||
func_80A0299C(this, 0x32);
|
||||
this->unk_2C0 = 42;
|
||||
temp = 11;
|
||||
@ -1172,10 +1172,10 @@ void func_80A0461C(EnElf* this, PlayState* play) {
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
player->stateFlags2 &= ~0x100000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_NAVI_OUT;
|
||||
break;
|
||||
default:
|
||||
player->stateFlags2 |= 0x100000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NAVI_OUT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1514,7 +1514,7 @@ void EnElf_Draw(Actor* thisx, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((this->unk_2A8 != 8) && !(this->fairyFlags & 8)) {
|
||||
if (!(player->stateFlags1 & 0x100000) || (kREG(90) < this->actor.projectedPos.z)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_FIRST_PERSON) || (kREG(90) < this->actor.projectedPos.z)) {
|
||||
dListHead = Graph_Alloc(play->state.gfxCtx, sizeof(Gfx) * 4);
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
@ -249,7 +249,7 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, PlayState* play) {
|
||||
(CVarGetInteger("gRandomizedEnemies", 0) && enemyCount < 15)) {
|
||||
if (play->sceneNum == SCENE_HYRULE_FIELD) {
|
||||
if ((player->floorSfxOffset == 0) || (player->actor.floorBgId != BGCHECK_SCENE) ||
|
||||
!(player->actor.bgCheckFlags & 1) || (player->stateFlags1 & 0x08000000)) {
|
||||
!(player->actor.bgCheckFlags & 1) || (player->stateFlags1 & PLAYER_STATE1_IN_WATER)) {
|
||||
|
||||
this->fieldSpawnTimer = 60;
|
||||
break;
|
||||
|
@ -362,7 +362,7 @@ void EnFireRock_Update(Actor* thisx, PlayState* play) {
|
||||
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_DAMAGED)) {
|
||||
func_8002F758(play, thisx, 2.0f, -player->actor.world.rot.y, 3.0f, 4);
|
||||
}
|
||||
return;
|
||||
|
@ -797,7 +797,7 @@ void EnFloormas_GrabLink(EnFloormas* this, PlayState* play) {
|
||||
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_GRABBED_BY_ENEMY) || (player->invincibilityTimer < 0)) {
|
||||
parent = (EnFloormas*)this->actor.parent;
|
||||
child = (EnFloormas*)this->actor.child;
|
||||
|
||||
|
@ -606,7 +606,7 @@ s32 EnFr_SetupJumpingUp(EnFr* this, s32 frogIndex) {
|
||||
void EnFr_Idle(EnFr* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (player->stateFlags2 & 0x2000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_PLAY_FOR_ACTOR) {
|
||||
if (play->msgCtx.ocarinaMode == OCARINA_MODE_04) {
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
}
|
||||
|
@ -208,17 +208,17 @@ void func_80A1DBD4(EnFu* this, PlayState* play) {
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
Flags_SetEventChkInf(EVENTCHKINF_PLAYED_SONG_OF_STORMS_IN_WINDMILL);
|
||||
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_02) {
|
||||
player->stateFlags2 &= ~0x1000000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR;
|
||||
this->actionFunc = EnFu_WaitAdult;
|
||||
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
|
||||
void EnFu_WaitForPlayback(EnFu* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
// if dialog state is 7, player has played back the song
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_SONG_DEMO_DONE) {
|
||||
func_8010BD58(play, OCARINA_ACTION_PLAYBACK_STORMS);
|
||||
@ -229,7 +229,7 @@ void EnFu_WaitForPlayback(EnFu* this, PlayState* play) {
|
||||
void EnFu_TeachSong(EnFu* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
// if dialog state is 2, start song demonstration
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
this->behaviorFlags &= ~FU_WAIT;
|
||||
@ -246,7 +246,7 @@ void EnFu_WaitAdult(EnFu* this, PlayState* play) {
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
if ((Flags_GetEventChkInf(EVENTCHKINF_LEARNED_SONG_OF_STORMS))) {
|
||||
func_80A1D94C(this, play, 0x508E, func_80A1DBA0);
|
||||
} else if (player->stateFlags2 & 0x1000000) {
|
||||
} else if (player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
this->actor.textId = 0x5035;
|
||||
Message_StartTextbox(play, this->actor.textId, NULL);
|
||||
this->actionFunc = IS_RANDO ? func_80A1DBD4 : EnFu_TeachSong;
|
||||
@ -257,7 +257,7 @@ void EnFu_WaitAdult(EnFu* this, PlayState* play) {
|
||||
if (this->actor.xzDistToPlayer < 100.0f) {
|
||||
this->actor.textId = 0x5034;
|
||||
func_8002F2CC(&this->actor, play, 100.0f);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -661,7 +661,7 @@ void EnGe1_BeginGame_Archery(EnGe1* this, PlayState* play) {
|
||||
gSaveContext.eventInf[0] |= 0x100;
|
||||
Flags_SetEventChkInf(EVENTCHKINF_PLAYED_HORSEBACK_ARCHERY);
|
||||
|
||||
if (!(player->stateFlags1 & 0x800000)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_ON_HORSE)) {
|
||||
func_8002DF54(play, &this->actor, 1);
|
||||
} else {
|
||||
horse = Actor_FindNearby(play, &player->actor, ACTOR_EN_HORSE, ACTORCAT_BG, 1200.0f);
|
||||
@ -741,7 +741,7 @@ void EnGe1_Wait_Archery(EnGe1* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
u16 textId;
|
||||
|
||||
if (!(player->stateFlags1 & 0x800000)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_ON_HORSE)) {
|
||||
EnGe1_SetTalkAction(this, play, 0x603F, 100.0f, EnGe1_TalkNoHorse_Archery);
|
||||
} else {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_PLAYED_HORSEBACK_ARCHERY)) {
|
||||
|
@ -725,7 +725,7 @@ void EnGoroiwa_Update(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
s32 sp30;
|
||||
|
||||
if (!(player->stateFlags1 & 0x300000C0)) {
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE))) {
|
||||
if (this->collisionDisabledTimer > 0) {
|
||||
this->collisionDisabledTimer--;
|
||||
}
|
||||
|
@ -144,8 +144,8 @@ void func_80A4E470(EnGs* this, PlayState* play) {
|
||||
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_NEAR_OCARINA_ACTOR;
|
||||
if (player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
func_8010BD58(play, OCARINA_ACTION_FREE_PLAY);
|
||||
this->unk_19D |= 1;
|
||||
}
|
||||
@ -168,7 +168,7 @@ void func_80A4E470(EnGs* this, PlayState* play) {
|
||||
this->unk_19D = 0;
|
||||
Flags_SetSwitch(play, (this->actor.params >> 8) & 0x3F);
|
||||
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -724,7 +724,7 @@ void EnHorse_ResetRace(EnHorse* this, PlayState* play) {
|
||||
s32 EnHorse_PlayerCanMove(EnHorse* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((player->stateFlags1 & 1) || func_8002DD78(GET_PLAYER(play)) == 1 || (player->stateFlags1 & 0x100000) ||
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_LOADING) || func_8002DD78(GET_PLAYER(play)) == 1 || (player->stateFlags1 & PLAYER_STATE1_FIRST_PERSON) ||
|
||||
((this->stateFlags & ENHORSE_FLAG_19) && !this->inRace) || this->action == ENHORSE_ACT_HBA ||
|
||||
player->actor.flags & ACTOR_FLAG_PLAYER_TALKED_TO || play->csCtx.state != 0) {
|
||||
return false;
|
||||
@ -3533,7 +3533,7 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) {
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->cyl1.base);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->cyl1.base);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->cyl2.base);
|
||||
if ((player->stateFlags1 & 1) && player->rideActor != NULL) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_LOADING) && player->rideActor != NULL) {
|
||||
if (play->sceneNum != SCENE_LON_LON_RANCH ||
|
||||
(play->sceneNum == SCENE_LON_LON_RANCH && (thisx->world.pos.z < -2400.0f))) {
|
||||
EnHorse_UpdateConveyors(this, play);
|
||||
|
@ -145,7 +145,7 @@ u16 func_80A79010(PlayState* play) {
|
||||
}
|
||||
switch (gSaveContext.eventInf[0] & 0xF) {
|
||||
case 1:
|
||||
if (!(player->stateFlags1 & 0x800000)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_ON_HORSE)) {
|
||||
return 0x2036;
|
||||
} else if (Flags_GetEventChkInf(EVENTCHKINF_RENTED_HORSE_FROM_INGO)) {
|
||||
if (Flags_GetInfTable(INFTABLE_A2)) {
|
||||
@ -657,7 +657,7 @@ void func_80A7A568(EnIn* this, PlayState* play) {
|
||||
s32 phi_a2;
|
||||
s32 transitionType;
|
||||
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_RENTED_HORSE_FROM_INGO) && (player->stateFlags1 & 0x800000)) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_RENTED_HORSE_FROM_INGO) && (player->stateFlags1 & PLAYER_STATE1_ON_HORSE)) {
|
||||
Flags_SetInfTable(INFTABLE_AB);
|
||||
}
|
||||
if (gSaveContext.timer1State == 10) {
|
||||
|
@ -213,18 +213,18 @@ void func_80A8F75C(EnKakasi* this, PlayState* play) {
|
||||
|
||||
if (absyawTowardsPlayer < 0x4300) {
|
||||
if (!this->unk_194) {
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
this->camId = OnePointCutscene_Init(play, 2260, -99, &this->actor, MAIN_CAM);
|
||||
|
||||
func_8010BD58(play, OCARINA_ACTION_SCARECROW_LONG_RECORDING);
|
||||
this->unk_19A = 0;
|
||||
this->unk_1B8 = 0.0;
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
this->actionFunc = func_80A8F8D0;
|
||||
return;
|
||||
}
|
||||
if (this->actor.xzDistToPlayer < 80.0f) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
func_8002F2CC(&this->actor, play, 100.0f);
|
||||
@ -253,7 +253,7 @@ void func_80A8F8D0(EnKakasi* this, PlayState* play) {
|
||||
}
|
||||
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
func_80A8F320(this, play, 0);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -232,33 +232,33 @@ void func_80A91348(EnKakasi3* this, PlayState* play) {
|
||||
if (absAngleTowardsLink < 0x4300) {
|
||||
if (!this->unk_194) {
|
||||
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
this->camId = OnePointCutscene_Init(play, 2260, -99, &this->actor, MAIN_CAM);
|
||||
play->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
this->unk_1B8 = 0.0f;
|
||||
Message_StartTextbox(play, 0x40A4, NULL);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
this->actionFunc = func_80A915B8;
|
||||
return;
|
||||
}
|
||||
if (this->actor.xzDistToPlayer < 80.0f) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
} else if (gSaveContext.scarecrowSpawnSongSet && !this->unk_195) {
|
||||
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
this->camId = OnePointCutscene_Init(play, 2260, -99, &this->actor, MAIN_CAM);
|
||||
play->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
this->unk_1B8 = 0.0f;
|
||||
Message_StartTextbox(play, 0x40A8, NULL);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
this->actionFunc = func_80A9187C;
|
||||
return;
|
||||
}
|
||||
if (this->actor.xzDistToPlayer < 80.0f) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
func_8002F2CC(&this->actor, play, 100.0f);
|
||||
@ -303,7 +303,7 @@ void func_80A91620(EnKakasi3* this, PlayState* play) {
|
||||
|
||||
if (play->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
func_80A90EBC(this, play, 0);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
|
||||
@ -377,7 +377,7 @@ void func_80A918E4(EnKakasi3* this, PlayState* play) {
|
||||
|
||||
if (play->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
func_80A90EBC(this, play, 0);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ void EnMThunder_Init(Actor* thisx, PlayState* play2) {
|
||||
Actor_SetScale(&this->actor, 0.1f);
|
||||
this->unk_1CA = 0;
|
||||
|
||||
if (player->stateFlags2 & 0x20000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_SPIN_ATTACKING) {
|
||||
if (!gSaveContext.isMagicAcquired || (gSaveContext.magicState != MAGIC_STATE_IDLE) ||
|
||||
(((this->actor.params & 0xFF00) >> 8) &&
|
||||
!(Magic_RequestChange(play, (this->actor.params & 0xFF00) >> 8, MAGIC_CONSUME_NOW)))) {
|
||||
@ -96,7 +96,7 @@ void EnMThunder_Init(Actor* thisx, PlayState* play2) {
|
||||
return;
|
||||
}
|
||||
|
||||
player->stateFlags2 &= ~0x20000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_SPIN_ATTACKING;
|
||||
this->unk_1CA = 1;
|
||||
this->collider.info.toucher.dmgFlags = D_80AA044C[this->unk_1C7];
|
||||
this->unk_1C6 = 1;
|
||||
@ -131,7 +131,7 @@ void func_80A9F314(PlayState* play, f32 arg1) {
|
||||
void func_80A9F350(EnMThunder* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (player->stateFlags2 & 0x20000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_SPIN_ATTACKING) {
|
||||
if (player->meleeWeaponAnimation >= 0x18) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_ROLLING_CUT, &player->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
@ -143,7 +143,7 @@ void func_80A9F350(EnMThunder* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(player->stateFlags1 & 0x1000)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_CHARGING_SPIN_ATTACK)) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
@ -176,7 +176,7 @@ void func_80A9F408(EnMThunder* this, PlayState* play) {
|
||||
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_SPIN_ATTACKING) {
|
||||
if ((child != NULL) && (child->update != NULL)) {
|
||||
child->parent = NULL;
|
||||
}
|
||||
@ -191,7 +191,7 @@ void func_80A9F408(EnMThunder* this, PlayState* play) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x20000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_SPIN_ATTACKING;
|
||||
if ((this->actor.params & 0xFF00) >> 8) {
|
||||
gSaveContext.magicState = MAGIC_STATE_CONSUME_SETUP;
|
||||
}
|
||||
@ -214,7 +214,7 @@ void func_80A9F408(EnMThunder* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!(player->stateFlags1 & 0x1000)) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_CHARGING_SPIN_ATTACK)) {
|
||||
if (this->actor.child != NULL) {
|
||||
this->actor.child->parent = NULL;
|
||||
}
|
||||
|
@ -420,8 +420,8 @@ void func_80AA0F44(EnMa1* this, PlayState* play) {
|
||||
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_INVITED_TO_SING_WITH_CHILD_MALON)) {
|
||||
// When the player pulls out the Ocarina while close to Malon
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
player->stateFlags2 |= 0x2000000;
|
||||
if (player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_PLAY_FOR_ACTOR;
|
||||
player->unk_6A8 = &this->actor;
|
||||
this->actor.textId = 0x2061;
|
||||
Message_StartTextbox(play, this->actor.textId, NULL);
|
||||
@ -432,7 +432,7 @@ void func_80AA0F44(EnMa1* this, PlayState* play) {
|
||||
} else if (this->actor.xzDistToPlayer < 30.0f + (f32)this->collider.dim.radius) {
|
||||
// somehow flags that the player is close to malon so that pulling out the Ocarina
|
||||
// triggers the code above this.
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
// If rando'ed, a textbox is closing, it's malon's 'my mom wrote this song' text, AND we do have an ocarina
|
||||
// in our inventory. This allows us to grant the check when talking to malon with the ocarina in our inventory.
|
||||
@ -444,7 +444,7 @@ void func_80AA0F44(EnMa1* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AA106C(EnMa1* this, PlayState* play) {
|
||||
GET_PLAYER(play)->stateFlags2 |= 0x800000;
|
||||
GET_PLAYER(play)->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
Audio_OcaSetInstrument(2);
|
||||
func_8010BD58(play, OCARINA_ACTION_TEACH_EPONA);
|
||||
@ -454,7 +454,7 @@ void func_80AA106C(EnMa1* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AA10EC(EnMa1* this, PlayState* play) {
|
||||
GET_PLAYER(play)->stateFlags2 |= 0x800000;
|
||||
GET_PLAYER(play)->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_SONG_DEMO_DONE) {
|
||||
func_8010BD58(play, OCARINA_ACTION_PLAYBACK_EPONA);
|
||||
this->actionFunc = func_80AA1150;
|
||||
@ -481,7 +481,7 @@ void EnMa1_EndTeachSong(EnMa1* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AA1150(EnMa1* this, PlayState* play) {
|
||||
GET_PLAYER(play)->stateFlags2 |= 0x800000;
|
||||
GET_PLAYER(play)->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
|
||||
// When rando'ed, trigger the "song learned" Ocarina mode.
|
||||
if (IS_RANDO && (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING)) {
|
||||
|
@ -265,13 +265,13 @@ void func_80AA2018(EnMa2* this, PlayState* play) {
|
||||
void func_80AA204C(EnMa2* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
player->unk_6A8 = &this->actor;
|
||||
player->stateFlags2 |= 0x2000000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_PLAY_FOR_ACTOR;
|
||||
func_8010BD58(play, 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_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ void func_80AA20E4(EnMa2* this, PlayState* play) {
|
||||
this->actionFunc = func_80AA21C8;
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
|
||||
@ -296,7 +296,7 @@ void func_80AA21C8(EnMa2* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (DECR(this->unk_208)) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
} else {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
this->actor.flags |= ACTOR_FLAG_WILL_TALK;
|
||||
|
@ -98,7 +98,7 @@ u16 func_80AA2AA0(PlayState* play, Actor* thisx) {
|
||||
return 0x2004;
|
||||
}
|
||||
}
|
||||
if ((!(player->stateFlags1 & 0x800000)) &&
|
||||
if ((!(player->stateFlags1 & PLAYER_STATE1_ON_HORSE)) &&
|
||||
(Actor_FindNearby(play, thisx, ACTOR_EN_HORSE, 1, 1200.0f) == NULL)) {
|
||||
return 0x2001;
|
||||
}
|
||||
|
@ -612,8 +612,8 @@ void EnMb_SetupStunned(EnMb* this) {
|
||||
void EnMb_Stunned(EnMb* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((player->stateFlags2 & 0x80) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_GRABBED_BY_ENEMY;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
@ -737,8 +737,8 @@ void EnMb_SpearPatrolEndCharge(EnMb* this, PlayState* play) {
|
||||
s16 relYawFromPlayer;
|
||||
s16 yawPlayerToWaypoint;
|
||||
|
||||
if ((player->stateFlags2 & 0x80) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_GRABBED_BY_ENEMY;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
@ -939,7 +939,7 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, PlayState* play) {
|
||||
|
||||
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_GRABBED_BY_ENEMY)) {
|
||||
if (player->invincibilityTimer < 0) {
|
||||
if (player->invincibilityTimer < -39) {
|
||||
player->invincibilityTimer = 0;
|
||||
@ -961,7 +961,7 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((player->stateFlags2 & 0x80) && player->actor.parent == &this->actor) {
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY) && 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;
|
||||
@ -973,10 +973,10 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (endCharge) {
|
||||
if (hasHitPlayer || (player->stateFlags2 & 0x80)) {
|
||||
if (hasHitPlayer || (player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY)) {
|
||||
this->attackCollider.base.atFlags &= ~AT_HIT;
|
||||
if (player->stateFlags2 & 0x80) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if (player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_GRABBED_BY_ENEMY;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
@ -1008,7 +1008,7 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, PlayState* play) {
|
||||
|
||||
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_GRABBED_BY_ENEMY)) {
|
||||
if (player->invincibilityTimer < 0) {
|
||||
if (player->invincibilityTimer <= -40) {
|
||||
player->invincibilityTimer = 0;
|
||||
@ -1030,7 +1030,7 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((player->stateFlags2 & 0x80) && player->actor.parent == &this->actor) {
|
||||
if ((player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY) && 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;
|
||||
@ -1042,10 +1042,10 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (endCharge) {
|
||||
if (hasHitPlayer || (player->stateFlags2 & 0x80)) {
|
||||
if (hasHitPlayer || (player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY)) {
|
||||
this->attackCollider.base.atFlags &= ~AT_HIT;
|
||||
if (player->stateFlags2 & 0x80) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
if (player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_GRABBED_BY_ENEMY;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
@ -1274,7 +1274,7 @@ void EnMb_ClubWaitPlayerNear(EnMb* this, PlayState* play) {
|
||||
|
||||
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_DAMAGED) && ABS(relYawFromPlayer) < 0x3E80) {
|
||||
// Add a height check to the Moblin's Club attack when Enemy Randomizer is on.
|
||||
// Without the height check, the Moblin will attack (and play the sound effect) a lot even though
|
||||
// the Moblin is very far away from the player in vertical rooms (like the first room in Deku Tree).
|
||||
@ -1339,8 +1339,8 @@ void EnMb_SpearDead(EnMb* this, PlayState* play) {
|
||||
|
||||
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_GRABBED_BY_ENEMY) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_GRABBED_BY_ENEMY;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
@ -1422,8 +1422,8 @@ void EnMb_CheckColliding(EnMb* this, PlayState* play) {
|
||||
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_GRABBED_BY_ENEMY) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_GRABBED_BY_ENEMY;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
func_8002F71C(play, &this->actor, 6.0f, this->actor.world.rot.y, 6.0f);
|
||||
|
@ -774,8 +774,8 @@ void func_80AAB948(EnMd* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if ((this->interactInfo.talkState == NPC_TALK_STATE_IDLE) && (play->sceneNum == SCENE_LOST_WOODS)) {
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
player->stateFlags2 |= 0x2000000;
|
||||
if (player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_PLAY_FOR_ACTOR;
|
||||
player->unk_6A8 = &this->actor;
|
||||
func_8010BD58(play, OCARINA_ACTION_CHECK_SARIA);
|
||||
this->actionFunc = func_80AABC10;
|
||||
@ -783,7 +783,7 @@ void func_80AAB948(EnMd* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->actor.xzDistToPlayer < (30.0f + this->collider.dim.radius)) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -802,7 +802,7 @@ void func_80AABC10(EnMd* this, PlayState* play) {
|
||||
this->actionFunc = func_80AAB948;
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -342,13 +342,13 @@ void EnMk_Update(Actor* thisx, PlayState* play) {
|
||||
player = GET_PLAYER(play);
|
||||
|
||||
if (this->flags & 8) {
|
||||
if (!(player->stateFlags2 & 0x400)) {
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_UNDERWATER)) {
|
||||
this->flags &= ~8;
|
||||
}
|
||||
} else {
|
||||
if (player->currentBoots == PLAYER_BOOTS_IRON) {
|
||||
this->flags |= 8;
|
||||
} else if (player->stateFlags2 & 0x400) {
|
||||
} else if (player->stateFlags2 & PLAYER_STATE2_UNDERWATER) {
|
||||
swimFlag = player->actor.yDistToWater;
|
||||
|
||||
if (swimFlag > 0) {
|
||||
|
@ -156,7 +156,7 @@ void EnNutsball_Update(Actor* thisx, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 pad;
|
||||
|
||||
if (!(player->stateFlags1 & 0x300000C0) || (this->actionFunc == func_80ABBB34)) {
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE)) || (this->actionFunc == func_80ABBB34)) {
|
||||
this->actionFunc(this, play);
|
||||
|
||||
Actor_MoveForward(&this->actor);
|
||||
|
@ -115,18 +115,18 @@ void func_80ABEF2C(EnOkarinaTag* this, PlayState* play) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
} else {
|
||||
if ((this->ocarinaSong != 6) || (gSaveContext.scarecrowSpawnSongSet)) {
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
// "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_PLAY_FOR_ACTOR) {
|
||||
ocarinaSong = this->ocarinaSong;
|
||||
if (ocarinaSong == 6) {
|
||||
ocarinaSong = 0xA;
|
||||
}
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
func_8010BD58(play, ocarinaSong + OCARINA_ACTION_CHECK_SARIA);
|
||||
this->actionFunc = func_80ABF0CC;
|
||||
} else if ((this->actor.xzDistToPlayer < (50.0f + this->interactRange) &&
|
||||
@ -180,7 +180,7 @@ void func_80ABF0CC(EnOkarinaTag* this, PlayState* play) {
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
this->actionFunc = func_80ABEF2C;
|
||||
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -196,7 +196,7 @@ void func_80ABF28C(EnOkarinaTag* this, PlayState* play) {
|
||||
((this->type != 6) || !Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) &&
|
||||
(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_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
switch (this->type) {
|
||||
case 1:
|
||||
func_8010BD58(play, OCARINA_ACTION_CHECK_LULLABY);
|
||||
@ -217,12 +217,12 @@ void func_80ABF28C(EnOkarinaTag* this, PlayState* play) {
|
||||
Actor_Kill(&this->actor);
|
||||
break;
|
||||
}
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
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_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -296,7 +296,7 @@ void func_80ABF4C8(EnOkarinaTag* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
if (play->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -629,7 +629,7 @@ void EnOkuta_Update(Actor* thisx, PlayState* play2) {
|
||||
Vec3f sp38;
|
||||
s32 sp34;
|
||||
|
||||
if (!(player->stateFlags1 & 0x300000C0)) {
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE))) {
|
||||
if (this->actor.params == 0) {
|
||||
EnOkuta_ColliderCheck(this, play);
|
||||
if (!WaterBox_GetSurfaceImpl(play, &play->colCtx, this->actor.world.pos.x,
|
||||
|
@ -678,7 +678,7 @@ void EnOssan_EndInteraction(PlayState* play, EnOssan* this) {
|
||||
Actor_ProcessTalkRequest(&this->actor, play);
|
||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
player->stateFlags2 &= ~0x20000000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_DISABLE_DRAW;
|
||||
func_800BC490(play, 1);
|
||||
Interface_ChangeAlpha(50);
|
||||
this->drawCursor = 0;
|
||||
@ -762,7 +762,7 @@ void EnOssan_State_Idle(EnOssan* this, PlayState* play, Player* player) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, play)) {
|
||||
// "Start conversation!!"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "★★★ 会話開始!! ★★★" VT_RST "\n");
|
||||
player->stateFlags2 |= 0x20000000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_DISABLE_DRAW;
|
||||
func_800BC590(play);
|
||||
EnOssan_SetStateStartShopping(play, this, false);
|
||||
} else if (this->actor.xzDistToPlayer < 100.0f) {
|
||||
@ -1403,7 +1403,7 @@ void EnOssan_GiveItemWithFanfare(PlayState* play, EnOssan* this) {
|
||||
}
|
||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
player->stateFlags2 &= ~0x20000000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_DISABLE_DRAW;
|
||||
func_800BC490(play, 1);
|
||||
Interface_ChangeAlpha(50);
|
||||
this->drawCursor = 0;
|
||||
@ -1811,7 +1811,7 @@ void EnOssan_State_ContinueShoppingPrompt(EnOssan* this, PlayState* play, Player
|
||||
case 0:
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "★★★ 続けるよ!! ★★★" VT_RST "\n");
|
||||
player->actor.shape.rot.y += 0x8000;
|
||||
player->stateFlags2 |= 0x20000000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_DISABLE_DRAW;
|
||||
func_800BC490(play, 2);
|
||||
Message_StartTextbox(play, this->actor.textId, &this->actor);
|
||||
EnOssan_SetStateStartShopping(play, this, true);
|
||||
@ -1830,7 +1830,7 @@ void EnOssan_State_ContinueShoppingPrompt(EnOssan* this, PlayState* play, Player
|
||||
selectedItem = this->shelfSlots[this->cursorIndex];
|
||||
selectedItem->updateStockedItemFunc(play, selectedItem);
|
||||
player->actor.shape.rot.y += 0x8000;
|
||||
player->stateFlags2 |= 0x20000000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_DISABLE_DRAW;
|
||||
func_800BC490(play, 2);
|
||||
Message_StartTextbox(play, this->actor.textId, &this->actor);
|
||||
EnOssan_SetStateStartShopping(play, this, true);
|
||||
|
@ -386,7 +386,7 @@ void EnPoField_CorrectYPos(EnPoField* this, PlayState* play) {
|
||||
|
||||
f32 EnPoField_SetFleeSpeed(EnPoField* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
f32 speed = ((player->stateFlags1 & 0x800000) && player->rideActor != NULL) ? player->rideActor->speedXZ : 12.0f;
|
||||
f32 speed = ((player->stateFlags1 & PLAYER_STATE1_ON_HORSE) && player->rideActor != NULL) ? player->rideActor->speedXZ : 12.0f;
|
||||
|
||||
if (this->actor.xzDistToPlayer < 300.0f) {
|
||||
this->actor.speedXZ = speed * 1.5f + 2.0f;
|
||||
@ -414,13 +414,13 @@ void EnPoField_WaitForSpawn(EnPoField* this, PlayState* play) {
|
||||
if (fabsf(sEnPoFieldSpawnPositions[i].x - player->actor.world.pos.x) < 150.0f &&
|
||||
fabsf(sEnPoFieldSpawnPositions[i].z - player->actor.world.pos.z) < 150.0f) {
|
||||
if (Flags_GetSwitch(play, sEnPoFieldSpawnSwitchFlags[i])) {
|
||||
if (player->stateFlags1 & 0x800000) { // Player riding Epona
|
||||
if (player->stateFlags1 & PLAYER_STATE1_ON_HORSE) { // 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_ON_HORSE || Rand_ZeroOne() < 0.4f) {
|
||||
this->actor.params = EN_PO_FIELD_BIG;
|
||||
this->spawnFlagIndex = i;
|
||||
spawnDist = 480.0f;
|
||||
|
@ -333,9 +333,12 @@ void func_80AE2C1C(EnRd* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if ((ABS(sp32) < 0x1554) && (Actor_WorldDistXYZToActor(&this->actor, &player->actor) <= 150.0f)) {
|
||||
if (!(player->stateFlags1 & 0x2C6080) && !(player->stateFlags2 & 0x80)) {
|
||||
if (!(player->stateFlags1 &
|
||||
(PLAYER_STATE1_DEAD | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE |
|
||||
PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_CLIMBING_LADDER)) &&
|
||||
!(player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY)) {
|
||||
if (this->unk_306 == 0) {
|
||||
if (!(this->unk_312 & 0x80) && !CVarGetInteger("gNoRedeadFreeze", 0)) {
|
||||
if (!(this->unk_312 & PLAYER_STATE2_GRABBED_BY_ENEMY) && !CVarGetInteger("gNoRedeadFreeze", 0)) {
|
||||
player->actor.freezeTimer = 40;
|
||||
func_8008EEAC(play, &this->actor);
|
||||
GET_PLAYER(play)->unk_684 = &this->actor;
|
||||
@ -405,7 +408,10 @@ void func_80AE2FD0(EnRd* this, PlayState* play) {
|
||||
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_DEAD | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE |
|
||||
PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_CLIMBING_LADDER)) &&
|
||||
!(player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY) &&
|
||||
(Actor_WorldDistXYZToPoint(&player->actor, &this->actor.home.pos) < 150.0f)) {
|
||||
this->actor.targetMode = 0;
|
||||
func_80AE2B90(this, play);
|
||||
|
@ -499,7 +499,7 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
if ((this->ocTimer == 0) && (this->actor.colorFilterTimer == 0) && (player->invincibilityTimer == 0) &&
|
||||
!(player->stateFlags2 & 0x80) &&
|
||||
!(player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY) &&
|
||||
((this->collider1.base.ocFlags1 & OC1_HIT) || (this->collider2.base.ocFlags1 & OC1_HIT))) {
|
||||
this->collider1.base.ocFlags1 &= ~OC1_HIT;
|
||||
this->collider2.base.ocFlags1 &= ~OC1_HIT;
|
||||
@ -627,7 +627,7 @@ void EnRr_GrabPlayer(EnRr* this, PlayState* play) {
|
||||
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_GRABBED_BY_ENEMY)) {
|
||||
EnRr_SetupReleasePlayer(this, play);
|
||||
} else {
|
||||
Math_ApproachF(&player->actor.world.pos.x, this->mouthPos.x, 1.0f, 30.0f);
|
||||
|
@ -866,7 +866,8 @@ void func_80AEC780(EnRu1* this, PlayState* play) {
|
||||
s32 pad;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((func_80AEC5FC(this, play)) && (!Play_InCsMode(play)) && (!(player->stateFlags1 & 0x206000)) &&
|
||||
if ((func_80AEC5FC(this, play)) && (!Play_InCsMode(play)) &&
|
||||
(!(player->stateFlags1 & (PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_CLIMBING_LADDER))) &&
|
||||
(player->actor.bgCheckFlags & 1)) {
|
||||
|
||||
play->csCtx.segment = &D_80AF0880;
|
||||
@ -1652,7 +1653,7 @@ void func_80AEE7C4(EnRu1* this, PlayState* play) {
|
||||
}
|
||||
|
||||
player = GET_PLAYER(play);
|
||||
if (player->stateFlags2 & 0x10000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_IDLING) {
|
||||
this->unk_370 += 1.0f;
|
||||
if (this->action != 32) {
|
||||
if (*unk_370 > 30.0f) {
|
||||
|
@ -722,7 +722,7 @@ void EnSkj_SariasSongKidIdle(EnSkj* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
if (EnSkj_RangeCheck(player, sSmallStumpSkullKid.skullkid)) {
|
||||
EnSkj_SetupWaitInRange(this);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
player->unk_6A8 = &sSmallStumpSkullKid.skullkid->actor;
|
||||
}
|
||||
}
|
||||
@ -906,8 +906,8 @@ void EnSkj_WaitInRange(EnSkj* this, PlayState* play) {
|
||||
|
||||
// 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_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_PLAY_FOR_ACTOR;
|
||||
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;
|
||||
@ -928,7 +928,7 @@ void EnSkj_WaitInRange(EnSkj* this, PlayState* play) {
|
||||
} else if (!EnSkj_RangeCheck(player, sSmallStumpSkullKid.skullkid)) {
|
||||
EnSkj_SetupResetFight(this);
|
||||
} else {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
if (Flags_GetItemGetInf(ITEMGETINF_16)) {
|
||||
if (Flags_GetItemGetInf(ITEMGETINF_39)) {
|
||||
this->textId = Text_GetFaceReaction(play, 0x15);
|
||||
@ -989,10 +989,10 @@ void EnSkj_WaitForSong(EnSkj* this, PlayState* play) {
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_05;
|
||||
}
|
||||
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_02) {
|
||||
player->stateFlags2 &= ~0x1000000;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR;
|
||||
Actor_Kill(&this->actor);
|
||||
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
} else {
|
||||
if (play->msgCtx.ocarinaMode >= OCARINA_MODE_05) {
|
||||
gSaveContext.sunsSongState = 0;
|
||||
@ -1214,7 +1214,7 @@ void EnSkj_SariasSongWaitForTextClear(EnSkj* this, PlayState* play) {
|
||||
|
||||
if (state == TEXT_STATE_DONE && Message_ShouldAdvance(play)) {
|
||||
EnSkj_SetupWaitInRange(this);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
player->unk_6A8 = (Actor*)sSmallStumpSkullKid.skullkid;
|
||||
}
|
||||
}
|
||||
@ -1377,8 +1377,8 @@ void EnSkj_SetupWaitForOcarina(EnSkj* this, PlayState* play) {
|
||||
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_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_PLAY_FOR_ACTOR;
|
||||
func_800F5BF0(NATURE_ID_KOKIRI_REGION);
|
||||
EnSkj_TurnPlayer(this, player);
|
||||
player->unk_6A8 = &this->actor;
|
||||
@ -1393,15 +1393,15 @@ void EnSkj_SetupWaitForOcarina(EnSkj* this, PlayState* play) {
|
||||
void EnSkj_WaitForOcarina(EnSkj* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
player->stateFlags2 |= 0x2000000;
|
||||
if (player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_PLAY_FOR_ACTOR;
|
||||
func_800F5BF0(NATURE_ID_KOKIRI_REGION);
|
||||
EnSkj_TurnPlayer(this, player);
|
||||
player->unk_6A8 = &this->actor;
|
||||
Message_StartTextbox(play, 0x10BE, &this->actor);
|
||||
this->actionFunc = EnSkj_StartOcarinaMinigame;
|
||||
} else if (EnSkj_RangeCheck(player, this)) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1535,7 +1535,7 @@ void EnSkj_WaitForOfferResponse(EnSkj* this, PlayState* play) {
|
||||
switch (play->msgCtx.choiceIndex) {
|
||||
case 0: // yes
|
||||
player = GET_PLAYER(play);
|
||||
player->stateFlags3 |= 0x20; // makes player take ocarina out right away after closing box
|
||||
player->stateFlags3 |= PLAYER_STATE3_FORCE_PULL_OCARINA; // makes player take ocarina out right away after closing box
|
||||
this->actionFunc = EnSkj_SetupWaitForOcarina;
|
||||
break;
|
||||
case 1: // no
|
||||
|
@ -103,7 +103,7 @@ void EnStream_SuckPlayer(EnStream* this, PlayState* play) {
|
||||
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_FORCED_VOID_OUT;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -718,7 +718,7 @@ s32 func_80B0DEA8(EnSw* this, PlayState* play, s32 arg2) {
|
||||
s32 sp54;
|
||||
Vec3f sp48;
|
||||
|
||||
if (!(player->stateFlags1 & 0x200000) && arg2) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER) && arg2) {
|
||||
return false;
|
||||
} else if (func_8002DDF4(play) && arg2) {
|
||||
return false;
|
||||
|
@ -579,7 +579,7 @@ s32 func_80B150AC(EnTa* this, PlayState* play, s32 idx) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
Actor* interactRangeActor;
|
||||
|
||||
if (player->stateFlags1 & 0x800) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) {
|
||||
interactRangeActor = player->interactRangeActor;
|
||||
if (interactRangeActor != NULL && interactRangeActor->id == ACTOR_EN_NIW &&
|
||||
interactRangeActor == &this->superCuccos[idx]->actor) {
|
||||
@ -613,7 +613,7 @@ void func_80B15100(EnTa* this, PlayState* play) {
|
||||
if (player->heldActor == &this->superCuccos[unk_2CA]->actor) {
|
||||
player->heldActor = NULL;
|
||||
}
|
||||
player->stateFlags1 &= ~0x800;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD;
|
||||
this->superCuccos[unk_2CA] = NULL;
|
||||
}
|
||||
this->unk_2E0 |= 1;
|
||||
|
@ -407,7 +407,7 @@ void EnTest_ChooseAction(EnTest* this, PlayState* play) {
|
||||
} else {
|
||||
if (this->actor.xzDistToPlayer < 110.0f) {
|
||||
if (Rand_ZeroOne() > 0.2f) {
|
||||
if (player->stateFlags1 & 0x10) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_ENEMY_TARGET) {
|
||||
if (this->actor.isTargeted) {
|
||||
EnTest_SetupSlashDown(this);
|
||||
} else {
|
||||
@ -693,7 +693,7 @@ void EnTest_WalkAndBlock(EnTest* this, PlayState* play) {
|
||||
|
||||
if (this->actor.xzDistToPlayer < 110.0f) {
|
||||
if (Rand_ZeroOne() > 0.2f) {
|
||||
if (player->stateFlags1 & 0x10) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_ENEMY_TARGET) {
|
||||
if (this->actor.isTargeted) {
|
||||
EnTest_SetupSlashDown(this);
|
||||
} else {
|
||||
@ -978,7 +978,7 @@ void EnTest_SlashDownEnd(EnTest* this, PlayState* play) {
|
||||
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_ENEMY_TARGET) {
|
||||
if (this->actor.isTargeted) {
|
||||
EnTest_SetupSlashDown(this);
|
||||
} else if ((play->gameplayFrames % 2) != 0) {
|
||||
|
@ -356,7 +356,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
||||
|
||||
} else if (sSwordJumpState != 0) {
|
||||
sStickTilt = 0.0f;
|
||||
player->stateFlags3 |= 4;
|
||||
player->stateFlags3 |= PLAYER_STATE3_PAUSE_ACTION_FUNC;
|
||||
Math_SmoothStepToF(&this->actor.world.pos.x,
|
||||
(Math_SinS(player->actor.shape.rot.y - 0x3E8) * 45.0f) +
|
||||
player->actor.world.pos.x,
|
||||
@ -369,7 +369,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
||||
if (((u32)sSwordJumpTimer == 0) || ((player->invincibilityTimer > 0) && (this->meleeWeaponState == 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_PAUSE_ACTION_FUNC;
|
||||
sStickTilt = 127.0f;
|
||||
player->skelAnime.curFrame = 3.0f;
|
||||
sStickAngle = this->actor.yawTowardsPlayer + 0x8000;
|
||||
@ -404,7 +404,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
||||
|
||||
sStickTilt = 0.0f;
|
||||
sSwordJumpState = 1;
|
||||
player->stateFlags3 |= 4;
|
||||
player->stateFlags3 |= PLAYER_STATE3_PAUSE_ACTION_FUNC;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
sSwordJumpTimer = 27;
|
||||
player->meleeWeaponState = 0;
|
||||
@ -452,7 +452,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
||||
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_SHIELDING))) {
|
||||
EnTorch2_SwingSword(play, input, this);
|
||||
} else if (((this->actor.xzDistToPlayer <= 70.0f) ||
|
||||
((this->actor.xzDistToPlayer <= 80.0f + sp50) && (player->meleeWeaponState != 0))) &&
|
||||
@ -523,7 +523,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
||||
this->meleeWeaponState = 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_IGNORE_CEILING_FLOOR_WATER;
|
||||
this->actor.flags |= ACTOR_FLAG_TARGETABLE;
|
||||
this->invincibilityTimer = 0;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
@ -608,7 +608,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
||||
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_SHIELDING) &&
|
||||
!(this->meleeWeaponQuads[0].base.atFlags & AT_HIT) && !(this->meleeWeaponQuads[1].base.atFlags & AT_HIT)) {
|
||||
|
||||
if (!Actor_ApplyDamage(&this->actor)) {
|
||||
@ -623,7 +623,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
||||
sActionState = ENTORCH2_DEATH;
|
||||
Enemy_StartFinishingBlow(play, &this->actor);
|
||||
Item_DropCollectibleRandom(play, &this->actor, &thisx->world.pos, 0xC0);
|
||||
this->stateFlags3 &= ~4;
|
||||
this->stateFlags3 &= ~PLAYER_STATE3_PAUSE_ACTION_FUNC;
|
||||
} else {
|
||||
func_800F5ACC(NA_BGM_MINI_BOSS);
|
||||
if (this->actor.colChkInfo.damageEffect == 1) {
|
||||
@ -640,8 +640,8 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
||||
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_PAUSE_ACTION_FUNC;
|
||||
this->stateFlags3 |= PLAYER_STATE3_IGNORE_CEILING_FLOOR_WATER;
|
||||
sActionState = ENTORCH2_DAMAGE;
|
||||
if (sAlpha == 255) {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0xC);
|
||||
@ -657,10 +657,10 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
||||
// Handles being frozen by a deku nut
|
||||
|
||||
if ((this->actor.colorFilterTimer == 0) || (this->actor.colorFilterParams & 0x4000)) {
|
||||
this->stateFlags3 &= ~4;
|
||||
this->stateFlags3 &= ~PLAYER_STATE3_PAUSE_ACTION_FUNC;
|
||||
} else {
|
||||
this->stateFlags3 |= 4;
|
||||
this->stateFlags1 &= ~0x04000000;
|
||||
this->stateFlags3 |= PLAYER_STATE3_PAUSE_ACTION_FUNC;
|
||||
this->stateFlags1 &= ~PLAYER_STATE1_SHIELDING;
|
||||
this->invincibilityTimer = 0;
|
||||
input->press.stick_x = input->press.stick_y = 0;
|
||||
/*! @bug
|
||||
|
@ -657,7 +657,7 @@ void EnTp_Update(Actor* thisx, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 yawToWall;
|
||||
|
||||
if (player->stateFlags1 & 0x4000000) { // Shielding
|
||||
if (player->stateFlags1 & PLAYER_STATE1_SHIELDING) { // Shielding
|
||||
this->damageEffect = TAILPASARAN_DMGEFF_NONE;
|
||||
}
|
||||
|
||||
|
@ -313,11 +313,11 @@ void EnWallmas_WaitToDrop(EnWallmas* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->actor.params == WMT_SHADOWTAG) {
|
||||
if ((player->stateFlags1 & 0x100000) || (player->stateFlags1 & 0x8000000) || !(player->actor.bgCheckFlags & 1)) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_FIRST_PERSON) || (player->stateFlags1 & PLAYER_STATE1_IN_WATER) || !(player->actor.bgCheckFlags & 1)) {
|
||||
Audio_StopSfxById(NA_SE_EN_FALL_AIM);
|
||||
this->timer = 0x82;
|
||||
}
|
||||
} else if ((player->stateFlags1 & 0x100000) || (player->stateFlags1 & 0x8000000) || !(player->actor.bgCheckFlags & 1) ||
|
||||
} else if ((player->stateFlags1 & PLAYER_STATE1_FIRST_PERSON) || (player->stateFlags1 & PLAYER_STATE1_IN_WATER) || !(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;
|
||||
@ -339,7 +339,7 @@ void EnWallmas_WaitToDrop(EnWallmas* this, PlayState* play) {
|
||||
void EnWallmas_Drop(EnWallmas* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!Player_InCsMode(play) && !(player->stateFlags2 & 0x10) && (player->invincibilityTimer >= 0) &&
|
||||
if (!Player_InCsMode(play) && !(player->stateFlags2 & PLAYER_STATE2_MOVING_DYNAPOLY) && (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, play);
|
||||
|
@ -392,7 +392,7 @@ s32 EnXc_SerenadeCS(EnXc* this, PlayState* play) {
|
||||
|
||||
if (((CHECK_OWNED_EQUIP(EQUIP_TYPE_BOOTS, EQUIP_INV_BOOTS_IRON) && !IS_RANDO) ||
|
||||
(Flags_GetTreasure(play, 2) && IS_RANDO)) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_LEARNED_SERENADE_OF_WATER) && !(stateFlags & 0x20000000) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_LEARNED_SERENADE_OF_WATER) && !(stateFlags & PLAYER_STATE1_IN_CUTSCENE) &&
|
||||
!Play_InCsMode(play)) {
|
||||
if (!IS_RANDO) {
|
||||
Cutscene_SetSegment(play, &gIceCavernSerenadeCs);
|
||||
|
@ -532,7 +532,7 @@ s32 EnZf_CanAttack(PlayState* play, EnZf* this) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->actor.params >= ENZF_TYPE_LIZALFOS_MINIBOSS_A) { // miniboss
|
||||
if (player->stateFlags1 & 0x6000) { // Hanging or climbing
|
||||
if (player->stateFlags1 & (PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE)) { // Hanging or climbing
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
@ -1208,7 +1208,7 @@ void EnZf_Slash(EnZf* this, PlayState* play) {
|
||||
if (yawDiff > 16000) {
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
func_80B483E4(this, play);
|
||||
} else if (player->stateFlags1 & 0x6010) {
|
||||
} else if (player->stateFlags1 & (PLAYER_STATE1_ENEMY_TARGET | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE)) {
|
||||
if (this->actor.isTargeted) {
|
||||
EnZf_SetupSlash(this);
|
||||
} else {
|
||||
|
@ -2233,7 +2233,7 @@ void Fishing_UpdateLure(Fishing* this, PlayState* play) {
|
||||
|
||||
Math_ApproachF(&D_80B7E144, 195.0f, 1.0f, 1.0f);
|
||||
|
||||
if (player->stateFlags1 & 0x8000000) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_IN_WATER) {
|
||||
D_80B7E0B4 = 0;
|
||||
player->unk_860 = 0;
|
||||
}
|
||||
|
@ -486,11 +486,11 @@ void ObjOshihiki_OnScene(ObjOshihiki* this, PlayState* play) {
|
||||
this->direction = this->dyna.unk_150;
|
||||
ObjOshihiki_SetupPush(this, play);
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
}
|
||||
@ -527,11 +527,11 @@ void ObjOshihiki_OnActor(ObjOshihiki* this, PlayState* play) {
|
||||
this->direction = this->dyna.unk_150;
|
||||
ObjOshihiki_SetupPush(this, play);
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
} else {
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
} else {
|
||||
@ -579,7 +579,7 @@ void ObjOshihiki_Push(ObjOshihiki* this, PlayState* play) {
|
||||
if (!ObjOshihiki_CheckFloor(this, play)) {
|
||||
thisx->home.pos.x = thisx->world.pos.x;
|
||||
thisx->home.pos.z = thisx->world.pos.z;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
this->pushDist = 0.0f;
|
||||
this->pushSpeed = 0.0f;
|
||||
@ -592,7 +592,7 @@ void ObjOshihiki_Push(ObjOshihiki* this, PlayState* play) {
|
||||
|
||||
thisx->home.pos.x = thisx->world.pos.x;
|
||||
thisx->home.pos.z = thisx->world.pos.z;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
this->pushDist = 0.0f;
|
||||
this->pushSpeed = 0.0f;
|
||||
@ -620,7 +620,7 @@ void ObjOshihiki_Fall(ObjOshihiki* this, PlayState* play) {
|
||||
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_MOVING_DYNAPOLY;
|
||||
}
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
if (ObjOshihiki_CheckGround(this, play)) {
|
||||
|
@ -171,11 +171,11 @@ s32 ObjTimeblock_WaitForOcarina(ObjTimeblock* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (ObjTimeblock_PlayerIsInRange(this, play)) {
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
func_8010BD58(play, OCARINA_ACTION_FREE_PLAY);
|
||||
this->songObserverFunc = ObjTimeblock_WaitForSong;
|
||||
} else {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -159,11 +159,11 @@ s32 func_80BA2218(ObjWarp2block* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (func_80BA1ECC(this, play)) {
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) {
|
||||
func_8010BD58(play, OCARINA_ACTION_FREE_PLAY);
|
||||
this->func_168 = func_80BA228C;
|
||||
} else {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,8 +128,8 @@ void func_80BADF0C(ShotSun* this, PlayState* play) {
|
||||
this->unk_1A4 = 0;
|
||||
} else {
|
||||
if (this->unk_1A4 == 0) {
|
||||
if (!(player->stateFlags2 & 0x1000000)) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR)) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
return;
|
||||
} else {
|
||||
this->unk_1A4 = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user