1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-29 00:06:33 +00:00

document blue warp mode

This commit is contained in:
fig02 2024-11-19 00:01:16 -05:00
parent 8805186aa8
commit d4071a8123
2 changed files with 17 additions and 9 deletions

View file

@ -900,6 +900,7 @@ typedef struct Player {
/* 0x084F */ union {
s8 actionVar1;
s8 facingUpSlope; // Player_Action_SlideOnSlope: facing uphill when sliding on a slope
s8 isLakeHyliaCs; // Player_Action_BlueWarpArrive: In Lake Hylia CS after Water Temple. Floating down is delayed until a specific point in the cutscene.
s8 bottleCatchType; // Player_Action_SwingBottle: entry type for `sBottleCatchInfo`, corresponds to actor caught in a bottle
} av1; // "Action Variable 1": context dependent variable that has different meanings depending on what action is currently running
@ -909,6 +910,7 @@ typedef struct Player {
s16 bonked; // Player_Action_Roll: set to true after bonking into a wall or an actor
s16 startedTextbox; // Player_Action_SwingBottle: set to true when the textbox is started
s16 inWater; // Player_Action_SwingBottle: true if a bottle is swung in water. Used to determine which bottle swing animation to use.
s16 playedLandingSfx; // Player_Action_BlueWarpArrive: Played sfx when landing on the ground
} av2; // "Action Variable 2": context dependent variable that has different meanings depending on what action is currently running
/* 0x0854 */ f32 unk_854;

View file

@ -312,7 +312,7 @@ void Player_Action_ExchangeItem(Player* this, PlayState* play);
void Player_Action_SlideOnSlope(Player* this, PlayState* play);
void Player_Action_8084F608(Player* this, PlayState* play);
void Player_Action_8084F698(Player* this, PlayState* play);
void Player_Action_8084F710(Player* this, PlayState* play);
void Player_Action_BlueWarpArrive(Player* this, PlayState* play);
void Player_Action_8084F88C(Player* this, PlayState* play);
void Player_Action_8084F9A0(Player* this, PlayState* play);
void Player_Action_8084F9C0(Player* this, PlayState* play);
@ -10499,15 +10499,17 @@ void Player_StartMode_Nothing(PlayState* play, Player* this) {
}
void Player_StartMode_BlueWarp(PlayState* play, Player* this) {
Player_SetupAction(play, this, Player_Action_8084F710, 0);
Player_SetupAction(play, this, Player_Action_BlueWarpArrive, 0);
if ((play->sceneId == SCENE_LAKE_HYLIA) && IS_CUTSCENE_LAYER) {
this->av1.actionVar1 = 1;
this->av1.isLakeHyliaCs = true;
}
this->stateFlags1 |= PLAYER_STATE1_29;
LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_okarina_warp_goal, 2.0f / 3.0f, 0.0f, 24.0f,
ANIMMODE_ONCE, 0.0f);
// Start high up in the air
this->actor.world.pos.y += 800.0f;
}
@ -14275,27 +14277,30 @@ void Player_Action_8084F698(Player* this, PlayState* play) {
Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, 0.0f, 0.0f, 0.0f, 0, 0, 0, DEMOKANKYO_WARP_IN);
}
void Player_Action_8084F710(Player* this, PlayState* play) {
void Player_Action_BlueWarpArrive(Player* this, PlayState* play) {
s32 pad;
if ((this->av1.actionVar1 != 0) && (play->csCtx.curFrame < 305)) {
if ((this->av1.isLakeHyliaCs) && (play->csCtx.curFrame < 305)) {
// Delay falling down until frame 306 of the Lake Hylia cutscene after completing Water Temple
this->actor.gravity = 0.0f;
this->actor.velocity.y = 0.0f;
} else if (sYDistToFloor < 150.0f) {
if (LinkAnimation_Update(play, &this->skelAnime)) {
if (this->av2.actionVar2 == 0) {
if (!this->av2.playedLandingSfx) {
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
this->skelAnime.endFrame = this->skelAnime.animLength - 1.0f;
Player_PlayLandingSfx(this);
this->av2.actionVar2 = 1;
this->av2.playedLandingSfx = true;
}
} else {
if ((play->sceneId == SCENE_KOKIRI_FOREST) && Player_StartCsAction(play, this)) {
return;
}
func_80853080(this, play);
}
}
Math_SmoothStepToF(&this->actor.velocity.y, 2.0f, 0.3f, 8.0f, 0.5f);
}
@ -14304,9 +14309,10 @@ void Player_Action_8084F710(Player* this, PlayState* play) {
}
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.playerCue != NULL)) {
f32 sp28 = this->actor.world.pos.y;
f32 savedYPos = this->actor.world.pos.y;
func_808529D0(play, this, play->csCtx.playerCue);
this->actor.world.pos.y = sp28;
this->actor.world.pos.y = savedYPos;
}
}