mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 14:34:32 +00:00
Document Sequence Modes and Related Functions (#1046)
* Document Audio_SetSequenceMode * Cleanup surrounding docs * format * Clean-up * fix capital `I` in `playeridx` * Dist -> DistSq * `SetCamModeAndSeqMode` -> `UpdateCamAndSeqModes` * Get rid of extra padding * PR Feedback
This commit is contained in:
parent
e635e34265
commit
79220ba58a
8 changed files with 268 additions and 134 deletions
|
@ -129,7 +129,7 @@ static u16 sBgmList[] = {
|
|||
NA_BGM_DOOR_OF_TIME,
|
||||
NA_BGM_OWL,
|
||||
NA_BGM_SHADOW_TEMPLE,
|
||||
NA_BGM_WATAER_TEMPLE,
|
||||
NA_BGM_WATER_TEMPLE,
|
||||
NA_BGM_BRIDGE_TO_GANONS,
|
||||
NA_BGM_VARIOUS_SFX,
|
||||
NA_BGM_OCARINA_OF_TIME,
|
||||
|
|
|
@ -9626,14 +9626,14 @@ void func_80847BA0(GlobalContext* globalCtx, Player* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_808486A8(GlobalContext* globalCtx, Player* this) {
|
||||
u8 sp27;
|
||||
void Player_UpdateCamAndSeqModes(GlobalContext* globalCtx, Player* this) {
|
||||
u8 seqMode;
|
||||
s32 pad;
|
||||
Actor* unk_664;
|
||||
s32 camMode;
|
||||
|
||||
if (this->actor.category == ACTORCAT_PLAYER) {
|
||||
sp27 = 0;
|
||||
seqMode = SEQ_MODE_DEFAULT;
|
||||
|
||||
if (this->csMode != 0) {
|
||||
Camera_ChangeMode(Gameplay_GetCamera(globalCtx, 0), CAM_MODE_NORMAL);
|
||||
|
@ -9691,22 +9691,24 @@ void func_808486A8(GlobalContext* globalCtx, Player* this) {
|
|||
camMode = CAM_MODE_NORMAL;
|
||||
if ((this->linearVelocity == 0.0f) &&
|
||||
(!(this->stateFlags1 & 0x800000) || (this->rideActor->speedXZ == 0.0f))) {
|
||||
sp27 = 2;
|
||||
// not moving
|
||||
seqMode = SEQ_MODE_STILL;
|
||||
}
|
||||
}
|
||||
|
||||
Camera_ChangeMode(Gameplay_GetCamera(globalCtx, 0), camMode);
|
||||
} else {
|
||||
sp27 = 2;
|
||||
// First person mode
|
||||
seqMode = SEQ_MODE_STILL;
|
||||
}
|
||||
|
||||
if (globalCtx->actorCtx.targetCtx.unk_90 != NULL) {
|
||||
sp27 = 1;
|
||||
func_800F6114(sqrtf(globalCtx->actorCtx.targetCtx.unk_90->xyzDistToPlayerSq));
|
||||
if (globalCtx->actorCtx.targetCtx.bgmEnemy != NULL) {
|
||||
seqMode = SEQ_MODE_ENEMY;
|
||||
Audio_SetBgmEnemyVolume(sqrtf(globalCtx->actorCtx.targetCtx.bgmEnemy->xyzDistToPlayerSq));
|
||||
}
|
||||
|
||||
if (globalCtx->sceneNum != SCENE_TURIBORI) {
|
||||
func_800F5E90(sp27);
|
||||
Audio_SetSequenceMode(seqMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10155,7 +10157,7 @@ void Player_UpdateCommon(Player* this, GlobalContext* globalCtx, Input* input) {
|
|||
this->func_674(this, globalCtx);
|
||||
}
|
||||
|
||||
func_808486A8(globalCtx, this);
|
||||
Player_UpdateCamAndSeqModes(globalCtx, this);
|
||||
|
||||
if (this->skelAnime.moveFlags & 8) {
|
||||
AnimationContext_SetMoveActor(globalCtx, &this->actor, &this->skelAnime,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue