mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-09 13:45:23 -04:00
Introduce SaveContext.gameMode enum (#1198)
* gamemode enum * owl save * trailing enum comma
This commit is contained in:
+5
-4
@@ -558,7 +558,7 @@ void Cutscene_TerminatorImpl(PlayState* play, CutsceneContext* csCtx, CsCmdBase*
|
||||
Audio_SetCutsceneFlag(false);
|
||||
gSaveContext.cutsceneTransitionControl = 1;
|
||||
|
||||
if ((gSaveContext.gameMode != 0) && (csCtx->frames != cmd->startFrame)) {
|
||||
if ((gSaveContext.gameMode != GAMEMODE_NORMAL) && (csCtx->frames != cmd->startFrame)) {
|
||||
gSaveContext.hudVisibilityForceButtonAlphasByStatus = true;
|
||||
}
|
||||
|
||||
@@ -567,7 +567,7 @@ void Cutscene_TerminatorImpl(PlayState* play, CutsceneContext* csCtx, CsCmdBase*
|
||||
play->nextEntrance = play->csCtx.sceneCsList[play->csCtx.currentCsIndex].nextEntrance;
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
if (gSaveContext.gameMode != 1) {
|
||||
if (gSaveContext.gameMode != GAMEMODE_TITLE_SCREEN) {
|
||||
Scene_SetExitFade(play);
|
||||
} else {
|
||||
D_801BB12C++;
|
||||
@@ -1416,7 +1416,7 @@ void func_800EDA04(PlayState* play, CutsceneContext* csCtx) {
|
||||
}
|
||||
|
||||
gSaveContext.save.cutscene = 0;
|
||||
gSaveContext.gameMode = 0;
|
||||
gSaveContext.gameMode = GAMEMODE_NORMAL;
|
||||
ActorCutscene_Stop(0x7F);
|
||||
Audio_SetCutsceneFlag(false);
|
||||
csCtx->state = CS_STATE_0;
|
||||
@@ -1469,7 +1469,8 @@ void func_800EDBE0(PlayState* play) {
|
||||
SceneTableEntry* sp24;
|
||||
s32 temp_v0_3;
|
||||
|
||||
if (((gSaveContext.gameMode == 0) || (gSaveContext.gameMode == 1)) && (gSaveContext.respawnFlag <= 0)) {
|
||||
if (((gSaveContext.gameMode == GAMEMODE_NORMAL) || (gSaveContext.gameMode == GAMEMODE_TITLE_SCREEN)) &&
|
||||
(gSaveContext.respawnFlag <= 0)) {
|
||||
sp2A = func_800F21CC();
|
||||
if (sp2A != -1) {
|
||||
temp_v0_3 = func_800F2138(sp2A);
|
||||
|
||||
@@ -3701,7 +3701,7 @@ void Magic_Update(PlayState* play) {
|
||||
// Add magic until magicFillTarget is reached
|
||||
gSaveContext.save.playerData.magic += 0x10;
|
||||
|
||||
if ((gSaveContext.gameMode == 0) && (gSaveContext.sceneLayer < 4)) {
|
||||
if ((gSaveContext.gameMode == GAMEMODE_NORMAL) && (gSaveContext.sceneLayer < 4)) {
|
||||
play_sound(NA_SE_SY_GAUGE_UP - SFX_FLAG);
|
||||
}
|
||||
|
||||
@@ -4482,7 +4482,7 @@ void Interface_DrawClock(PlayState* play) {
|
||||
if (R_TIME_SPEED != 0) {
|
||||
if ((msgCtx->msgMode == 0) || ((play->actorCtx.flags & ACTORCTX_FLAG_1) && !Play_InCsMode(play)) ||
|
||||
(msgCtx->msgMode == 0) || ((msgCtx->currentTextId >= 0x100) && (msgCtx->currentTextId <= 0x200)) ||
|
||||
(gSaveContext.gameMode == 3)) {
|
||||
(gSaveContext.gameMode == GAMEMODE_END_CREDITS)) {
|
||||
if (!FrameAdvance_IsEnabled(&play->state) && !Environment_IsTimeStopped() && (gSaveContext.save.day < 4)) {
|
||||
/**
|
||||
* Changes Clock's transparancy depending if Player is moving or not and possibly other things
|
||||
|
||||
+8
-7
@@ -689,10 +689,10 @@ void Play_UpdateTransition(PlayState* this) {
|
||||
D_801D0D54 = false;
|
||||
}
|
||||
|
||||
if (gSaveContext.gameMode == 4) {
|
||||
if (gSaveContext.gameMode == GAMEMODE_OWL_SAVE) {
|
||||
STOP_GAMESTATE(&this->state);
|
||||
SET_NEXT_GAMESTATE(&this->state, TitleSetup_Init, sizeof(TitleSetupState));
|
||||
} else if (gSaveContext.gameMode != 2) {
|
||||
} else if (gSaveContext.gameMode != GAMEMODE_FILE_SELECT) {
|
||||
STOP_GAMESTATE(&this->state);
|
||||
SET_NEXT_GAMESTATE(&this->state, Play_Init, sizeof(PlayState));
|
||||
gSaveContext.save.entrance = this->nextEntrance;
|
||||
@@ -700,7 +700,7 @@ void Play_UpdateTransition(PlayState* this) {
|
||||
if (gSaveContext.minigameStatus == MINIGAME_STATUS_ACTIVE) {
|
||||
gSaveContext.minigameStatus = MINIGAME_STATUS_END;
|
||||
}
|
||||
} else { // 2
|
||||
} else { // GAMEMODE_FILE_SELECT
|
||||
STOP_GAMESTATE(&this->state);
|
||||
SET_NEXT_GAMESTATE(&this->state, FileSelect_Init, sizeof(FileSelectState));
|
||||
}
|
||||
@@ -946,7 +946,7 @@ void Play_UpdateMain(PlayState* this) {
|
||||
}
|
||||
Play_UpdateTransition(this);
|
||||
if (gTransitionTileState != TRANS_TILE_READY) {
|
||||
if ((gSaveContext.gameMode == 0) &&
|
||||
if ((gSaveContext.gameMode == GAMEMODE_NORMAL) &&
|
||||
(((this->msgCtx.msgMode == 0)) ||
|
||||
((this->msgCtx.currentTextId == 0xFF) && (this->msgCtx.msgMode == 0x42) &&
|
||||
(this->msgCtx.unk12020 == 0x41)) ||
|
||||
@@ -1076,7 +1076,7 @@ void Play_PostWorldDraw(PlayState* this) {
|
||||
KaleidoScopeCall_Draw(this);
|
||||
}
|
||||
|
||||
if (gSaveContext.gameMode == 0) {
|
||||
if (gSaveContext.gameMode == GAMEMODE_NORMAL) {
|
||||
Interface_Draw(this);
|
||||
}
|
||||
|
||||
@@ -2202,7 +2202,8 @@ void Play_Init(GameState* thisx) {
|
||||
|
||||
func_800EDDB0(this);
|
||||
|
||||
if (((gSaveContext.gameMode != 0) && (gSaveContext.gameMode != 1)) || (gSaveContext.save.cutscene >= 0xFFF0)) {
|
||||
if (((gSaveContext.gameMode != GAMEMODE_NORMAL) && (gSaveContext.gameMode != GAMEMODE_TITLE_SCREEN)) ||
|
||||
(gSaveContext.save.cutscene >= 0xFFF0)) {
|
||||
gSaveContext.unk_3DC0 = 0;
|
||||
Magic_Reset(this);
|
||||
gSaveContext.sceneLayer = (gSaveContext.save.cutscene & 0xF) + 1;
|
||||
@@ -2263,7 +2264,7 @@ void Play_Init(GameState* thisx) {
|
||||
this->haltAllActors = false;
|
||||
this->unk_18844 = false;
|
||||
|
||||
if (gSaveContext.gameMode != 1) {
|
||||
if (gSaveContext.gameMode != GAMEMODE_TITLE_SCREEN) {
|
||||
if (gSaveContext.nextTransitionType == TRANS_NEXT_TYPE_DEFAULT) {
|
||||
this->transitionType =
|
||||
(Entrance_GetTransitionFlags(((void)0, gSaveContext.save.entrance) + sceneLayer) >> 7) & 0x7F;
|
||||
|
||||
Reference in New Issue
Block a user