summaryrefslogtreecommitdiffstats
path: root/src/core/Frontend.cpp
diff options
context:
space:
mode:
authorNikolay <nickvnuk@gmail.com>2021-08-07 17:47:28 +0200
committerGitHub <noreply@github.com>2021-08-07 17:47:28 +0200
commite947081622d337a5e22791691e5d0dbed56e0199 (patch)
tree4cf5012d9795a870caf8ec00ef69b1f9baf15210 /src/core/Frontend.cpp
parentCVehicle fixes and cleanup (diff)
parentmore cherry-pick fix (diff)
downloadre3-e947081622d337a5e22791691e5d0dbed56e0199.tar
re3-e947081622d337a5e22791691e5d0dbed56e0199.tar.gz
re3-e947081622d337a5e22791691e5d0dbed56e0199.tar.bz2
re3-e947081622d337a5e22791691e5d0dbed56e0199.tar.lz
re3-e947081622d337a5e22791691e5d0dbed56e0199.tar.xz
re3-e947081622d337a5e22791691e5d0dbed56e0199.tar.zst
re3-e947081622d337a5e22791691e5d0dbed56e0199.zip
Diffstat (limited to 'src/core/Frontend.cpp')
-rw-r--r--src/core/Frontend.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 25079cf6..64e27a32 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -572,7 +572,11 @@ CMenuManager::Initialise(void)
m_fMapCenterX = MENU_X_LEFT_ALIGNED(320.0f);
m_fMapCenterY = MENU_Y(225.0f);
CPad::StopPadsShaking();
+#ifdef MISSION_REPLAY
+ if (!m_OnlySaveMenu && m_nCurrScreen != MENUPAGE_MISSION_RETRY)
+#else
if (!m_OnlySaveMenu)
+#endif
m_nCurrScreen = MENUPAGE_NONE;
DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND);
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_STARTING, 0);
@@ -4769,6 +4773,18 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
OutputDebugString("STARTED PLAYING FRONTEND AUDIO TRACK");
}
break;
+#ifdef MISSION_REPLAY
+ case MENUACTION_REJECT_RETRY:
+ doingMissionRetry = false;
+ AllowMissionReplay = 0;
+ RequestFrontEndShutDown();
+ break;
+ case MENUACTION_UNK114:
+ doingMissionRetry = false;
+ RequestFrontEndShutDown();
+ RetryMission(2, 0);
+ return;
+#endif
case MENUACTION_SAVEGAME:
{
int saveSlot = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_SaveSlot;
@@ -5413,6 +5429,19 @@ CMenuManager::ProcessFileActions()
{
switch (m_nCurrScreen) {
case MENUPAGE_LOADING_IN_PROGRESS:
+#ifdef MISSION_REPLAY
+ if (MissionSkipLevel) {
+ if (gGameState != GS_PLAYING_GAME)
+ DoSettingsBeforeStartingAGame();
+ RequestFrontEndShutDown();
+ break;
+ }
+ if (doingMissionRetry) {
+ RetryMission(2, 0);
+ m_nCurrSaveSlot = SLOT_COUNT;
+ doingMissionRetry = false;
+ }
+#endif
if (CheckSlotDataValid(m_nCurrSaveSlot)) {
#ifdef USE_DEBUG_SCRIPT_LOADER
scriptToLoad = 0;