mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-05 15:34:41 +00:00
Document SaveContext.gameMode
(#1295)
* Document `SaveContext.gameMode` * end credits * Remove no longer needed comment
This commit is contained in:
parent
e16779cc33
commit
984871eb38
17 changed files with 41 additions and 31 deletions
|
@ -384,7 +384,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
|||
|
||||
if (gIsCtrlr2Valid && CHECK_BTN_ALL(gameState->input[0].press.button, BTN_Z) &&
|
||||
CHECK_BTN_ALL(gameState->input[0].cur.button, BTN_L | BTN_R)) {
|
||||
gSaveContext.gameMode = 0;
|
||||
gSaveContext.gameMode = GAMEMODE_NORMAL;
|
||||
SET_NEXT_GAMESTATE(gameState, MapSelect_Init, MapSelectState);
|
||||
gameState->running = false;
|
||||
}
|
||||
|
|
|
@ -7529,7 +7529,7 @@ Vec3s Camera_Update(Camera* camera) {
|
|||
}
|
||||
|
||||
if (camera->status == CAM_STAT_ACTIVE) {
|
||||
if ((gSaveContext.gameMode != 0) && (gSaveContext.gameMode != 3)) {
|
||||
if ((gSaveContext.gameMode != GAMEMODE_NORMAL) && (gSaveContext.gameMode != GAMEMODE_END_CREDITS)) {
|
||||
sCameraInterfaceFlags = 0;
|
||||
Camera_UpdateInterface(sCameraInterfaceFlags);
|
||||
} else if ((D_8011D3F0 != 0) && (camera->camId == CAM_ID_MAIN)) {
|
||||
|
|
|
@ -506,7 +506,7 @@ void func_80111070(void) {
|
|||
WREG(94) = 3;
|
||||
WREG(95) = 6;
|
||||
|
||||
if (gSaveContext.gameMode == 0) {
|
||||
if (gSaveContext.gameMode == GAMEMODE_NORMAL) {
|
||||
R_TEXTBOX_X = 52;
|
||||
R_TEXTBOX_Y = 36;
|
||||
VREG(2) = 214;
|
||||
|
|
|
@ -489,8 +489,8 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||
Player* player = GET_PLAYER(play);
|
||||
s32 temp = 0;
|
||||
|
||||
if ((gSaveContext.gameMode != 0) && (gSaveContext.gameMode != 3) && (play->sceneNum != SCENE_SPOT00) &&
|
||||
(csCtx->frames > 20) &&
|
||||
if ((gSaveContext.gameMode != GAMEMODE_NORMAL) && (gSaveContext.gameMode != GAMEMODE_END_CREDITS) &&
|
||||
(play->sceneNum != SCENE_SPOT00) && (csCtx->frames > 20) &&
|
||||
(CHECK_BTN_ALL(play->state.input[0].press.button, BTN_A) ||
|
||||
CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B) ||
|
||||
CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START)) &&
|
||||
|
@ -509,7 +509,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||
|
||||
osSyncPrintf("\n分岐先指定!!=[%d]番", cmd->base); // "Future fork designation=No. [%d]"
|
||||
|
||||
if ((gSaveContext.gameMode != 0) && (csCtx->frames != cmd->startFrame)) {
|
||||
if ((gSaveContext.gameMode != GAMEMODE_NORMAL) && (csCtx->frames != cmd->startFrame)) {
|
||||
gSaveContext.unk_13E7 = 1;
|
||||
}
|
||||
|
||||
|
@ -826,7 +826,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 54:
|
||||
gSaveContext.gameMode = 3;
|
||||
gSaveContext.gameMode = GAMEMODE_END_CREDITS;
|
||||
Audio_SetSoundBanksMute(0x6F);
|
||||
play->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
play->nextEntranceIndex = ENTR_SPOT09_0;
|
||||
|
@ -1207,7 +1207,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 117:
|
||||
gSaveContext.gameMode = 3;
|
||||
gSaveContext.gameMode = GAMEMODE_END_CREDITS;
|
||||
Audio_SetSoundBanksMute(0x6F);
|
||||
play->linkAgeOnLoad = LINK_AGE_ADULT;
|
||||
play->nextEntranceIndex = ENTR_SPOT00_0;
|
||||
|
@ -1959,7 +1959,7 @@ void func_80068DC0(PlayState* play, CutsceneContext* csCtx) {
|
|||
|
||||
osSyncPrintf("\n\n\n\n\nやっぱりここかいな"); // "Right here, huh"
|
||||
gSaveContext.cutsceneIndex = 0;
|
||||
gSaveContext.gameMode = 0;
|
||||
gSaveContext.gameMode = GAMEMODE_NORMAL;
|
||||
|
||||
if (D_8015FCC8 != 0) {
|
||||
switch (gSaveContext.entranceIndex) {
|
||||
|
@ -2076,7 +2076,8 @@ void Cutscene_HandleEntranceTriggers(PlayState* play) {
|
|||
void Cutscene_HandleConditionalTriggers(PlayState* play) {
|
||||
osSyncPrintf("\ngame_info.mode=[%d] restart_flag", ((void)0, gSaveContext.respawnFlag));
|
||||
|
||||
if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||
if ((gSaveContext.gameMode == GAMEMODE_NORMAL) && (gSaveContext.respawnFlag <= 0) &&
|
||||
(gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||
if ((gSaveContext.entranceIndex == ENTR_SPOT11_1) && !Flags_GetEventChkInf(EVENTCHKINF_AC)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_AC);
|
||||
gSaveContext.entranceIndex = ENTR_SPOT11_0;
|
||||
|
|
|
@ -881,7 +881,8 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
|
|||
EnvLightSettings* lightSettingsList = play->envCtx.lightSettingsList;
|
||||
s32 adjustment;
|
||||
|
||||
if ((((void)0, gSaveContext.gameMode) != 0) && (((void)0, gSaveContext.gameMode) != 3)) {
|
||||
if ((((void)0, gSaveContext.gameMode) != GAMEMODE_NORMAL) &&
|
||||
(((void)0, gSaveContext.gameMode) != GAMEMODE_END_CREDITS)) {
|
||||
func_800AA16C();
|
||||
}
|
||||
|
||||
|
@ -918,9 +919,10 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
|
|||
}
|
||||
|
||||
if ((pauseCtx->state == 0) && (gameOverCtx->state == GAMEOVER_INACTIVE)) {
|
||||
if (((msgCtx->msgLength == 0) && (msgCtx->msgMode == 0)) || (((void)0, gSaveContext.gameMode) == 3)) {
|
||||
if (((msgCtx->msgLength == 0) && (msgCtx->msgMode == GAMEMODE_NORMAL)) ||
|
||||
(((void)0, gSaveContext.gameMode) == GAMEMODE_END_CREDITS)) {
|
||||
if ((envCtx->changeSkyboxTimer == 0) && !FrameAdvance_IsEnabled(play) &&
|
||||
(play->transitionMode == TRANS_MODE_OFF || ((void)0, gSaveContext.gameMode) != 0)) {
|
||||
(play->transitionMode == TRANS_MODE_OFF || ((void)0, gSaveContext.gameMode) != GAMEMODE_NORMAL)) {
|
||||
|
||||
if (IS_DAY || gTimeSpeed >= 400) {
|
||||
gSaveContext.dayTime += gTimeSpeed;
|
||||
|
|
|
@ -2439,7 +2439,7 @@ void Magic_Update(PlayState* play) {
|
|||
// Add magic until magicFillTarget is reached
|
||||
gSaveContext.magic += 4;
|
||||
|
||||
if (gSaveContext.gameMode == 0 && gSaveContext.sceneSetupIndex < 4) {
|
||||
if (gSaveContext.gameMode == GAMEMODE_NORMAL && gSaveContext.sceneSetupIndex < 4) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
|
|
@ -288,7 +288,7 @@ void Play_Init(GameState* thisx) {
|
|||
|
||||
Cutscene_HandleConditionalTriggers(this);
|
||||
|
||||
if (gSaveContext.gameMode != 0 || gSaveContext.cutsceneIndex >= 0xFFF0) {
|
||||
if (gSaveContext.gameMode != GAMEMODE_NORMAL || gSaveContext.cutsceneIndex >= 0xFFF0) {
|
||||
gSaveContext.nayrusLoveTimer = 0;
|
||||
Magic_Reset(this);
|
||||
gSaveContext.sceneSetupIndex = (gSaveContext.cutsceneIndex & 0xF) + 4;
|
||||
|
@ -369,7 +369,7 @@ void Play_Init(GameState* thisx) {
|
|||
this->unk_11E18 = 0;
|
||||
this->unk_11DE9 = false;
|
||||
|
||||
if (gSaveContext.gameMode != 1) {
|
||||
if (gSaveContext.gameMode != GAMEMODE_TITLE_SCREEN) {
|
||||
if (gSaveContext.nextTransitionType == TRANS_NEXT_TYPE_DEFAULT) {
|
||||
this->transitionType = ENTRANCE_INFO_END_TRANS_TYPE(
|
||||
gEntranceTable[((void)0, gSaveContext.entranceIndex) + tempSetupIndex].field);
|
||||
|
@ -627,7 +627,7 @@ void Play_Update(PlayState* this) {
|
|||
} else if (this->transitionTrigger != TRANS_TRIGGER_END) {
|
||||
this->state.running = false;
|
||||
|
||||
if (gSaveContext.gameMode != 2) {
|
||||
if (gSaveContext.gameMode != GAMEMODE_FILE_SELECT) {
|
||||
SET_NEXT_GAMESTATE(&this->state, Play_Init, PlayState);
|
||||
gSaveContext.entranceIndex = this->nextEntranceIndex;
|
||||
|
||||
|
@ -832,7 +832,7 @@ void Play_Update(PlayState* this) {
|
|||
if (1 && (gTrnsnUnkState != 3)) {
|
||||
PLAY_LOG(3542);
|
||||
|
||||
if ((gSaveContext.gameMode == 0) && (this->msgCtx.msgMode == MSGMODE_NONE) &&
|
||||
if ((gSaveContext.gameMode == GAMEMODE_NORMAL) && (this->msgCtx.msgMode == MSGMODE_NONE) &&
|
||||
(this->gameOverCtx.state == GAMEOVER_INACTIVE)) {
|
||||
KaleidoSetup_Update(this);
|
||||
}
|
||||
|
@ -930,7 +930,7 @@ void Play_Update(PlayState* this) {
|
|||
Play_SetViewpoint(this, this->viewpoint ^ (VIEWPOINT_LOCKED ^ VIEWPOINT_PIVOT));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Play_ChangeViewpointBgCamIndex(this);
|
||||
}
|
||||
|
||||
|
@ -1006,7 +1006,7 @@ void Play_DrawOverlayElements(PlayState* this) {
|
|||
KaleidoScopeCall_Draw(this);
|
||||
}
|
||||
|
||||
if (gSaveContext.gameMode == 0) {
|
||||
if (gSaveContext.gameMode == GAMEMODE_NORMAL) {
|
||||
Interface_Draw(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -903,7 +903,8 @@ void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dL
|
|||
SkelAnime_DrawFlexLod(play, skeleton, jointTable, dListCount, overrideLimbDraw, postLimbDraw, data, lod);
|
||||
|
||||
if ((overrideLimbDraw != Player_OverrideLimbDrawGameplayFirstPerson) &&
|
||||
(overrideLimbDraw != Player_OverrideLimbDrawGameplay_80090440) && (gSaveContext.gameMode != 3)) {
|
||||
(overrideLimbDraw != Player_OverrideLimbDrawGameplay_80090440) &&
|
||||
(gSaveContext.gameMode != GAMEMODE_END_CREDITS)) {
|
||||
if (LINK_IS_ADULT) {
|
||||
s32 strengthUpgrade = CUR_UPG_VALUE(UPG_STRENGTH);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue