mirror of https://github.com/zeldaret/oot.git
fix comment about 0xFFFF usage
This commit is contained in:
parent
fc4e828e68
commit
4e495c44fb
|
@ -425,12 +425,7 @@ typedef enum LinkAge {
|
||||||
// (except for the value 0xFFFD, which is special-cased to do nothing in `Play_Init`).
|
// (except for the value 0xFFFD, which is special-cased to do nothing in `Play_Init`).
|
||||||
// It loads layer 4 for 0xFFF0, layer 5 for 0xFFF1, and so on.
|
// It loads layer 4 for 0xFFF0, layer 5 for 0xFFF1, and so on.
|
||||||
//
|
//
|
||||||
// The cutsceneIndex could also be set to one of these values to start a
|
// 0xFFFD is used by the cutscene system to indicate a scripted cutscene has been triggered.
|
||||||
// scripted cutscene immediately. In the vanilla game, this is used to play
|
|
||||||
// the cutscene where the barrier in Ganon's Castle is dispelled (using index 0xFFFF)
|
|
||||||
// and to preview cutscenes in debug mode (using index 0xFFFD).
|
|
||||||
//
|
|
||||||
// 0xFFFD also is used by the cutscene system to indicate a scripted cutscene has been triggered.
|
|
||||||
// This is why `Play_Init` ignores that value, so that if the cutscene is interrupted
|
// This is why `Play_Init` ignores that value, so that if the cutscene is interrupted
|
||||||
// by a new play state load (e.g. if the player falls out of bounds), it does not then
|
// by a new play state load (e.g. if the player falls out of bounds), it does not then
|
||||||
// try to wrongly load a cutscene layer.
|
// try to wrongly load a cutscene layer.
|
||||||
|
|
|
@ -1391,9 +1391,15 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti
|
||||||
play->csCtx.script = SEGMENTED_TO_VIRTUAL(gTowerBarrierCs);
|
play->csCtx.script = SEGMENTED_TO_VIRTUAL(gTowerBarrierCs);
|
||||||
play->csCtx.curFrame = 0;
|
play->csCtx.curFrame = 0;
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
|
// Force cutsceneIndex to CS_INDEX_F so that CS_STATE_STOP is handled by the "scripted" system's
|
||||||
|
// CutsceneHandler_StopScript.
|
||||||
|
// Otherwise, because cutsceneIndex is set to 0 above, CS_STATE_STOP would be handled by the
|
||||||
|
// "manual" cutscene system's CutsceneHandler_StopManual, which does not terminate the cutscene
|
||||||
|
// camera, resulting in a softlock.
|
||||||
gSaveContext.save.cutsceneIndex = CS_INDEX_F;
|
gSaveContext.save.cutsceneIndex = CS_INDEX_F;
|
||||||
csCtx->state = CS_STATE_STOP;
|
csCtx->state = CS_STATE_STOP;
|
||||||
} else {
|
} else {
|
||||||
|
// Same as above
|
||||||
gSaveContext.save.cutsceneIndex = CS_INDEX_F;
|
gSaveContext.save.cutsceneIndex = CS_INDEX_F;
|
||||||
csCtx->state = CS_STATE_STOP;
|
csCtx->state = CS_STATE_STOP;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue