summaryrefslogtreecommitdiffstats
path: root/src/core/Frontend.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-08-01 11:54:05 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2021-08-07 19:24:01 +0200
commitc69edce8007178755d979f638852abb9359950c2 (patch)
treef041976b6ac5421582deae12e056b0d2e6e04ac2 /src/core/Frontend.cpp
parentlcs specific hack (diff)
downloadre3-c69edce8007178755d979f638852abb9359950c2.tar
re3-c69edce8007178755d979f638852abb9359950c2.tar.gz
re3-c69edce8007178755d979f638852abb9359950c2.tar.bz2
re3-c69edce8007178755d979f638852abb9359950c2.tar.lz
re3-c69edce8007178755d979f638852abb9359950c2.tar.xz
re3-c69edce8007178755d979f638852abb9359950c2.tar.zst
re3-c69edce8007178755d979f638852abb9359950c2.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 975cc7da..562f8ac3 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -585,7 +585,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);
@@ -4728,6 +4732,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;
@@ -5373,6 +5389,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;