summaryrefslogtreecommitdiffstats
path: root/src/core/Frontend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Frontend.cpp')
-rw-r--r--src/core/Frontend.cpp167
1 files changed, 134 insertions, 33 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index b0ef0627..4820427f 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -208,6 +208,7 @@ wchar* CMenuManager::m_pDialogText = nil;
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_X_MARGIN)); \
CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_X_MARGIN));
+// value must be between 0.0-1.0
#define ProcessSlider(value, origY, increaseAction, decreaseAction, hoverEndX, onlyWhenHoveringRow) \
do { \
float y = origY MINUS_SCROLL_OFFSET; \
@@ -346,7 +347,7 @@ CMenuManager::ThingsToDoBeforeLeavingPage()
option.m_CFODynamic->buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
if (option.m_Action == MENUACTION_CFO_SELECT && option.m_CFOSelect->onlyApplyOnEnter && option.m_CFOSelect->lastSavedValue != option.m_CFOSelect->displayedValue)
- option.m_CFOSelect->displayedValue = *option.m_CFO->value = option.m_CFOSelect->lastSavedValue;
+ option.m_CFOSelect->displayedValue = *(int8*)option.m_CFO->value = option.m_CFOSelect->lastSavedValue;
if (aScreens[m_nCurrScreen].returnPrevPageFunc) {
aScreens[m_nCurrScreen].returnPrevPageFunc();
@@ -545,6 +546,10 @@ CMenuManager::CMenuManager()
m_PrefsControllerType = CONTROLLER_XBOXONE;
#endif
#endif
+
+#ifdef MISSION_REPLAY
+ m_bAttemptingMissionRetry = false;
+#endif
}
void
@@ -579,8 +584,18 @@ 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) {
+ if (m_nCurrScreen == MENUPAGE_MISSION_RETRY && m_bAttemptingMissionRetry)
+ m_bAttemptingMissionRetry = false;
+ else
+ m_nCurrScreen = MENUPAGE_NONE;
+ }
+#else
if (!m_OnlySaveMenu)
m_nCurrScreen = MENUPAGE_NONE;
+#endif
+
DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND);
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_STARTING, 0);
DMAudio.Service();
@@ -704,27 +719,33 @@ CMenuManager::CheckSliderMovement(int value)
{
switch (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action) {
case MENUACTION_BRIGHTNESS:
+#ifdef FIX_BUGS
+ m_PrefsBrightness += value * (384 / MENUSLIDER_LOGICAL_BARS);
+#else
m_PrefsBrightness += value * 24.19f;
+#endif
m_PrefsBrightness = Clamp(m_PrefsBrightness, 0, 384);
break;
case MENUACTION_DRAWDIST:
if(value > 0)
- m_PrefsLOD += ((1.8f - 0.925f) / 16.0f);
+ m_PrefsLOD += ((1.8f - 0.925f) / MENUSLIDER_LOGICAL_BARS);
else
- m_PrefsLOD -= ((1.8f - 0.925f) / 16.0f);
+ m_PrefsLOD -= ((1.8f - 0.925f) / MENUSLIDER_LOGICAL_BARS);
m_PrefsLOD = Clamp(m_PrefsLOD, 0.925f, 1.8f);
CRenderer::ms_lodDistScale = m_PrefsLOD;
break;
+
+ // I wonder the idea behind clamping those max to 65
case MENUACTION_MUSICVOLUME:
if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) {
- m_PrefsMusicVolume += value * (128 / 32);
+ m_PrefsMusicVolume += value * (64 / MENUSLIDER_LOGICAL_BARS);
m_PrefsMusicVolume = Clamp(m_PrefsMusicVolume, 0, 65);
DMAudio.SetMusicMasterVolume(m_PrefsMusicVolume);
}
break;
case MENUACTION_SFXVOLUME:
if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) {
- m_PrefsSfxVolume += value * (128 / 32);
+ m_PrefsSfxVolume += value * (64 / MENUSLIDER_LOGICAL_BARS);
m_PrefsSfxVolume = Clamp(m_PrefsSfxVolume, 0, 65);
DMAudio.SetEffectsMasterVolume(m_PrefsSfxVolume);
}
@@ -732,19 +753,33 @@ CMenuManager::CheckSliderMovement(int value)
case MENUACTION_MP3VOLUMEBOOST:
if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) {
if (DMAudio.IsMP3RadioChannelAvailable()) {
- m_PrefsMP3BoostVolume += value * (128 / 32);
+ m_PrefsMP3BoostVolume += value * (64 / MENUSLIDER_LOGICAL_BARS);
m_PrefsMP3BoostVolume = Clamp(m_PrefsMP3BoostVolume, 0, 65);
DMAudio.SetMP3BoostVolume(m_PrefsMP3BoostVolume);
}
}
break;
case MENUACTION_MOUSESENS:
- TheCamera.m_fMouseAccelHorzntl += value * 1.0f/200.0f/15.0f; // ???
+ TheCamera.m_fMouseAccelHorzntl += value * 1.0f/200.0f/15.0f; // probably because diving it to 15 instead of 16(MENUSLIDER_LOGICAL_BARS) had more accurate steps
TheCamera.m_fMouseAccelHorzntl = Clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f/3200.0f, 1.0f/200.0f);
#ifdef FIX_BUGS
TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl + 0.0005f;
#endif
break;
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ case MENUACTION_CFO_SLIDER:
+ {
+ CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption];
+ float oldValue = *(float*)option.m_CFOSlider->value;
+ *(float*)option.m_CFOSlider->value += value * ((option.m_CFOSlider->max - option.m_CFOSlider->min) / MENUSLIDER_LOGICAL_BARS);
+ *(float*)option.m_CFOSlider->value = Clamp(*(float*)option.m_CFOSlider->value, option.m_CFOSlider->min, option.m_CFOSlider->max);
+
+ if (*(float*)option.m_CFOSlider->value != oldValue && option.m_CFOSlider->changeFunc)
+ option.m_CFOSlider->changeFunc(oldValue, *(float*)option.m_CFOSlider->value);
+
+ break;
+ }
+#endif
default:
return;
}
@@ -856,10 +891,10 @@ CMenuManager::DisplaySlider(float x, float y, float mostLeftBarSize, float mostR
int lastActiveBarX = 0;
float curBarX = 0.0f;
- for (int i = 0; i < 16; i++) {
- curBarX = i * rectSize/16.0f + x;
+ for (int i = 0; i < MENUSLIDER_BARS; i++) {
+ curBarX = i * rectSize/MENUSLIDER_BARS + x;
- if (i / 16.0f + 1 / 32.0f < progress) {
+ if (i / (float)MENUSLIDER_BARS + 1 / (MENUSLIDER_BARS * 2.f) < progress) {
color = CRGBA(SLIDERON_COLOR.r, SLIDERON_COLOR.g, SLIDERON_COLOR.b, FadeIn(255));
lastActiveBarX = curBarX;
} else
@@ -867,7 +902,7 @@ CMenuManager::DisplaySlider(float x, float y, float mostLeftBarSize, float mostR
maxBarHeight = Max(mostLeftBarSize, mostRightBarSize);
- float curBarFreeSpace = ((16 - i) * mostLeftBarSize + i * mostRightBarSize) / 16.0f;
+ float curBarFreeSpace = ((MENUSLIDER_BARS - i) * mostLeftBarSize + i * mostRightBarSize) / (float)MENUSLIDER_BARS;
float left = curBarX;
float top = y + maxBarHeight - curBarFreeSpace;
float right = spacing + curBarX;
@@ -1332,8 +1367,8 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
CFont::SetColor(CRGBA(DARKMENUOPTION_COLOR.r, DARKMENUOPTION_COLOR.g, DARKMENUOPTION_COLOR.b, FadeIn(255)));
// To whom manipulate option.m_CFO->value of static options externally (like RestoreDef functions)
- if (*option.m_CFO->value != option.m_CFOSelect->lastSavedValue)
- option.m_CFOSelect->displayedValue = option.m_CFOSelect->lastSavedValue = *option.m_CFO->value;
+ if (*(int8*)option.m_CFO->value != option.m_CFOSelect->lastSavedValue)
+ option.m_CFOSelect->displayedValue = option.m_CFOSelect->lastSavedValue = *(int8*)option.m_CFO->value;
if (option.m_CFOSelect->displayedValue >= option.m_CFOSelect->numRightTexts || option.m_CFOSelect->displayedValue < 0)
option.m_CFOSelect->displayedValue = 0;
@@ -1383,7 +1418,11 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
int saveSlot = aScreens[m_nCurrScreen].m_aEntries[i].m_SaveSlot;
if (rightText || action == MENUACTION_DRAWDIST || action == MENUACTION_BRIGHTNESS || action == MENUACTION_MUSICVOLUME ||
action == MENUACTION_SFXVOLUME || action == MENUACTION_MP3VOLUMEBOOST || action == MENUACTION_MOUSESENS ||
- saveSlot >= SAVESLOT_1 && saveSlot <= SAVESLOT_8) {
+ saveSlot >= SAVESLOT_1 && saveSlot <= SAVESLOT_8
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ || action == MENUACTION_CFO_SLIDER
+#endif
+ ) {
rightXMin = 600;
leftXMax = 40;
}
@@ -1510,30 +1549,41 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
}
}
+#ifdef CUSTOM_FRONTEND_OPTIONS
+#define SLIDER_Y(pos) (aScreens[m_nCurrScreen].m_aEntries[i].m_Y - 5.f)
+#else
+#define SLIDER_Y(pos) pos
+#endif
// Sliders
int lastActiveBarX;
switch (aScreens[m_nCurrScreen].m_aEntries[i].m_Action) {
case MENUACTION_BRIGHTNESS:
- ProcessSlider(m_PrefsBrightness / 384.0f, 70.0f, HOVEROPTION_INCREASE_BRIGHTNESS, HOVEROPTION_DECREASE_BRIGHTNESS, SCREEN_WIDTH, true);
+ ProcessSlider(m_PrefsBrightness / 384.0f, SLIDER_Y(70.0f), HOVEROPTION_INCREASE_BRIGHTNESS, HOVEROPTION_DECREASE_BRIGHTNESS, SCREEN_WIDTH, true);
break;
case MENUACTION_DRAWDIST:
- ProcessSlider((m_PrefsLOD - 0.925f) / 0.875f, 99.0f, HOVEROPTION_INCREASE_DRAWDIST, HOVEROPTION_DECREASE_DRAWDIST, SCREEN_WIDTH, true);
+ ProcessSlider((m_PrefsLOD - 0.925f) / 0.875f, SLIDER_Y(99.0f), HOVEROPTION_INCREASE_DRAWDIST, HOVEROPTION_DECREASE_DRAWDIST, SCREEN_WIDTH, true);
break;
case MENUACTION_MUSICVOLUME:
if(m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER)
- ProcessSlider(m_PrefsMusicVolume / 64.0f, 70.0f, HOVEROPTION_INCREASE_MUSICVOLUME, HOVEROPTION_DECREASE_MUSICVOLUME, SCREEN_WIDTH, true);
+ ProcessSlider(m_PrefsMusicVolume / 64.0f, SLIDER_Y(70.0f), HOVEROPTION_INCREASE_MUSICVOLUME, HOVEROPTION_DECREASE_MUSICVOLUME, SCREEN_WIDTH, true);
break;
case MENUACTION_SFXVOLUME:
if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER)
- ProcessSlider(m_PrefsSfxVolume / 64.0f, 99.0f, HOVEROPTION_INCREASE_SFXVOLUME, HOVEROPTION_DECREASE_SFXVOLUME, SCREEN_WIDTH, true);
+ ProcessSlider(m_PrefsSfxVolume / 64.0f, SLIDER_Y(99.0f), HOVEROPTION_INCREASE_SFXVOLUME, HOVEROPTION_DECREASE_SFXVOLUME, SCREEN_WIDTH, true);
break;
case MENUACTION_MOUSESENS:
- ProcessSlider(TheCamera.m_fMouseAccelHorzntl * 200.0f, 170.0f, HOVEROPTION_INCREASE_MOUSESENS, HOVEROPTION_DECREASE_MOUSESENS, SCREEN_WIDTH, false);
+ ProcessSlider(TheCamera.m_fMouseAccelHorzntl * 200.0f, SLIDER_Y(170.0f), HOVEROPTION_INCREASE_MOUSESENS, HOVEROPTION_DECREASE_MOUSESENS, SCREEN_WIDTH, false);
break;
case MENUACTION_MP3VOLUMEBOOST:
if(m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER && DMAudio.IsMP3RadioChannelAvailable())
- ProcessSlider(m_PrefsMP3BoostVolume / 64.f, 128.0f, HOVEROPTION_INCREASE_MP3BOOST, HOVEROPTION_DECREASE_MP3BOOST, SCREEN_WIDTH, true);
+ ProcessSlider(m_PrefsMP3BoostVolume / 64.f, SLIDER_Y(128.0f), HOVEROPTION_INCREASE_MP3BOOST, HOVEROPTION_DECREASE_MP3BOOST, SCREEN_WIDTH, true);
+ break;
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ case MENUACTION_CFO_SLIDER:
+ CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[i];
+ ProcessSlider((*(float*)option.m_CFOSlider->value - option.m_CFOSlider->min) / (option.m_CFOSlider->max - option.m_CFOSlider->min), SLIDER_Y(0), HOVEROPTION_INCREASE_CFO_SLIDER, HOVEROPTION_DECREASE_CFO_SLIDER, SCREEN_WIDTH, true);
break;
+#endif
}
// Not just unused, but also collides with the bug fix in Font.cpp. Yikes.
@@ -4271,7 +4321,11 @@ CMenuManager::UserInput(void)
int action = aScreens[m_nCurrScreen].m_aEntries[rowToCheck].m_Action;
if (action != MENUACTION_BRIGHTNESS && action != MENUACTION_DRAWDIST && action != MENUACTION_MUSICVOLUME
- && action != MENUACTION_SFXVOLUME && action != MENUACTION_MOUSESENS && action != MENUACTION_MP3VOLUMEBOOST)
+ && action != MENUACTION_SFXVOLUME && action != MENUACTION_MOUSESENS && action != MENUACTION_MP3VOLUMEBOOST
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ && action != MENUACTION_CFO_SLIDER
+#endif
+ )
m_nHoverOption = HOVEROPTION_RANDOM_ITEM;
break;
@@ -4351,6 +4405,9 @@ CMenuManager::UserInput(void)
case HOVEROPTION_INCREASE_MUSICVOLUME:
case HOVEROPTION_INCREASE_SFXVOLUME:
case HOVEROPTION_INCREASE_MOUSESENS:
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ case HOVEROPTION_INCREASE_CFO_SLIDER:
+#endif
CheckSliderMovement(1);
break;
case HOVEROPTION_DECREASE_BRIGHTNESS:
@@ -4359,6 +4416,9 @@ CMenuManager::UserInput(void)
case HOVEROPTION_DECREASE_MUSICVOLUME:
case HOVEROPTION_DECREASE_SFXVOLUME:
case HOVEROPTION_DECREASE_MOUSESENS:
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ case HOVEROPTION_DECREASE_CFO_SLIDER:
+#endif
CheckSliderMovement(-1);
break;
}
@@ -4390,7 +4450,11 @@ CMenuManager::UserInput(void)
|| CPad::GetPad(0)->GetAnaloguePadLeftJustUp() || CPad::GetPad(0)->GetAnaloguePadRightJustUp()
|| CPad::GetPad(0)->GetMouseWheelUpJustDown() || CPad::GetPad(0)->GetMouseWheelDownJustDown()) {
int option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action;
- if (option == MENUACTION_BRIGHTNESS)
+ if (option == MENUACTION_BRIGHTNESS
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ || option == MENUACTION_CFO_SLIDER
+#endif
+ )
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_ENTER_OR_ADJUST, 0);
else if (option == MENUACTION_SFXVOLUME)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_AUDIO_TEST, 0);
@@ -4401,7 +4465,11 @@ CMenuManager::UserInput(void)
if (CPad::GetPad(0)->GetBackJustDown() || CPad::GetPad(0)->GetEscapeJustDown()) {
if (m_nCurrScreen != MENUPAGE_START_MENU && m_nCurrScreen != MENUPAGE_PAUSE_MENU && m_nCurrScreen != MENUPAGE_CHOOSE_SAVE_SLOT
&& m_nCurrScreen != MENUPAGE_SAVE_CHEAT_WARNING && m_nCurrScreen != MENUPAGE_SAVING_IN_PROGRESS
- && m_nCurrScreen != MENUPAGE_DELETING_IN_PROGRESS && m_nCurrScreen != MENUPAGE_OUTRO)
+ && m_nCurrScreen != MENUPAGE_DELETING_IN_PROGRESS && m_nCurrScreen != MENUPAGE_OUTRO
+#ifdef MISSION_REPLAY
+ && m_nCurrScreen != MENUPAGE_MISSION_RETRY
+#endif
+ )
{
m_bShowMouse = false;
goBack = true;
@@ -4421,7 +4489,11 @@ CMenuManager::UserInput(void)
if (curAction == MENUACTION_BRIGHTNESS || curAction == MENUACTION_MUSICVOLUME ||
curAction == MENUACTION_SFXVOLUME || curAction == MENUACTION_RADIO ||
curAction == MENUACTION_DRAWDIST || curAction == MENUACTION_MOUSESENS ||
- curAction == MENUACTION_MP3VOLUMEBOOST)
+ curAction == MENUACTION_MP3VOLUMEBOOST
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ || curAction == MENUACTION_CFO_SLIDER
+#endif
+ )
changeValueBy = -1;
lastSliderDecrease = CTimer::GetTimeInMillisecondsPauseMode();
@@ -4432,7 +4504,11 @@ CMenuManager::UserInput(void)
if (curAction == MENUACTION_BRIGHTNESS || curAction == MENUACTION_MUSICVOLUME ||
curAction == MENUACTION_SFXVOLUME || curAction == MENUACTION_RADIO ||
curAction == MENUACTION_DRAWDIST || curAction == MENUACTION_MOUSESENS ||
- curAction == MENUACTION_MP3VOLUMEBOOST)
+ curAction == MENUACTION_MP3VOLUMEBOOST
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ || curAction == MENUACTION_CFO_SLIDER
+#endif
+ )
changeValueBy = 1;
lastSliderIncrease = CTimer::GetTimeInMillisecondsPauseMode();
}
@@ -4491,10 +4567,10 @@ CMenuManager::UserInput(void)
if (oldEntry.m_CFOSelect->displayedValue != oldEntry.m_CFOSelect->lastSavedValue)
SetHelperText(3); // Restored original value
- oldEntry.m_CFOSelect->displayedValue = oldEntry.m_CFOSelect->lastSavedValue = *oldEntry.m_CFO->value;
+ oldEntry.m_CFOSelect->displayedValue = oldEntry.m_CFOSelect->lastSavedValue = *(int8*)oldEntry.m_CFO->value;
}
} else if (oldEntry.m_Action == MENUACTION_CFO_SELECT && oldEntry.m_CFOSelect->onlyApplyOnEnter) {
- if (oldEntry.m_CFOSelect->displayedValue != *oldEntry.m_CFO->value)
+ if (oldEntry.m_CFOSelect->displayedValue != *(int8*)oldEntry.m_CFO->value)
SetHelperText(1); // Enter to apply
else if (m_nHelperTextMsgId == 1)
ResetHelperText(); // Applied
@@ -4567,7 +4643,7 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
#ifdef USE_DEBUG_SCRIPT_LOADER
if (m_nCurrScreen == MENUPAGE_START_MENU || m_nCurrScreen == MENUPAGE_NEW_GAME || m_nCurrScreen == MENUPAGE_NEW_GAME_RELOAD) {
if (CPad::GetPad(0)->GetChar('R')) {
- scriptToLoad = 1;
+ CTheScripts::ScriptToLoad = 1;
DoSettingsBeforeStartingAGame();
return;
}
@@ -4719,6 +4795,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 = MISSION_RETRY_STAGE_NORMAL;
+ RequestFrontEndShutDown();
+ break;
+ case MENUACTION_UNK114:
+ doingMissionRetry = false;
+ RequestFrontEndShutDown();
+ RetryMission(MISSION_RETRY_TYPE_BEGIN_RESTARTING);
+ return;
+#endif
case MENUACTION_SAVEGAME:
{
int saveSlot = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_SaveSlot;
@@ -4911,9 +4999,9 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
if (option.m_CFOSelect->displayedValue >= option.m_CFOSelect->numRightTexts || option.m_CFOSelect->displayedValue < 0)
option.m_CFOSelect->displayedValue = 0;
}
- int8 oldValue = *option.m_CFO->value;
+ int8 oldValue = *(int8*)option.m_CFO->value;
- *option.m_CFO->value = option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue;
+ *(int8*)option.m_CFO->value = option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue;
// Now everything is saved in .ini, and LOAD_INI_SETTINGS is fundamental for CFO
// if (option.m_CFOSelect->save)
@@ -5078,9 +5166,9 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
option.m_CFOSelect->displayedValue = option.m_CFOSelect->numRightTexts - 1;
}
if (!option.m_CFOSelect->onlyApplyOnEnter) {
- int8 oldValue = *option.m_CFO->value;
+ int8 oldValue = *(int8*)option.m_CFO->value;
- *option.m_CFO->value = option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue;
+ *(int8*)option.m_CFO->value = option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue;
// Now everything is saved in .ini, and LOAD_INI_SETTINGS is fundamental for CFO
// if (option.m_CFOSelect->save)
@@ -5363,9 +5451,22 @@ 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(MISSION_RETRY_TYPE_BEGIN_RESTARTING);
+ m_nCurrSaveSlot = SLOT_COUNT;
+ doingMissionRetry = false;
+ }
+#endif
if (CheckSlotDataValid(m_nCurrSaveSlot)) {
#ifdef USE_DEBUG_SCRIPT_LOADER
- scriptToLoad = 0;
+ CTheScripts::ScriptToLoad = 0;
#endif
#ifdef XBOX_MESSAGE_SCREEN