summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/Cam.cpp2
-rw-r--r--src/core/Frontend.cpp716
-rw-r--r--src/core/Frontend.h48
-rw-r--r--src/core/MenuScreens.cpp92
-rw-r--r--src/core/config.h2
-rw-r--r--src/core/re3.cpp274
6 files changed, 574 insertions, 560 deletions
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp
index fcffce9b..3e016667 100644
--- a/src/core/Cam.cpp
+++ b/src/core/Cam.cpp
@@ -30,7 +30,7 @@ bool PrintDebugCode = false;
int16 DebugCamMode;
#ifdef FREE_CAM
-bool CCamera::bFreeCam;
+bool CCamera::bFreeCam = false;
int nPreviousMode = -1;
#endif
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index d1196042..fbefe354 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -116,7 +116,6 @@ int32 CMenuManager::m_PrefsSfxVolume = 102;
bool CMenuManager::m_PrefsCutsceneBorders = true;
#endif
-
#ifdef MULTISAMPLING
int8 CMenuManager::m_nPrefsMSAALevel = 0;
int8 CMenuManager::m_nDisplayMSAALevel = 0;
@@ -160,10 +159,6 @@ int32 MouseButtonJustClicked;
int32 JoyButtonJustClicked;
//int32 *pControlTemp = 0;
-#ifdef PS2_ALPHA_TEST
-extern bool gPS2alphaTest;
-#endif
-
#ifndef MASTER
bool CMenuManager::m_PrefsMarketing = false;
bool CMenuManager::m_PrefsDisableTutorials = false;
@@ -402,27 +397,40 @@ CMenuManager::PageDownList(bool playSoundOnSuccess)
}
}
+#ifdef CUSTOM_FRONTEND_OPTIONS
+bool ScreenHasOption(int screen, const char* gxtKey)
+{
+ for (int i = 0; i < NUM_MENUROWS; i++) {
+ if (strcmp(gxtKey, aScreens[screen].m_aEntries[i].m_EntryName) == 0)
+ return true;
+ }
+ return false;
+}
+#endif
+
void
CMenuManager::ThingsToDoBeforeGoingBack()
{
if ((m_nCurrScreen == MENUPAGE_SKIN_SELECT) && strcmp(m_aSkinName, m_PrefsSkinFile) != 0) {
CWorld::Players[0].SetPlayerSkin(m_PrefsSkinFile);
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ } else if (ScreenHasOption(m_nCurrScreen, "FEA_3DH")) {
+#else
} else if (m_nCurrScreen == MENUPAGE_SOUND_SETTINGS) {
+#endif
if (m_nPrefsAudio3DProviderIndex != -1)
m_nPrefsAudio3DProviderIndex = DMAudio.GetCurrent3DProviderIndex();
#ifdef TIDY_UP_PBP
DMAudio.StopFrontEndTrack();
OutputDebugString("FRONTEND AUDIO TRACK STOPPED");
#endif
-#ifdef GRAPHICS_MENU_OPTIONS
- } else if (m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) {
+
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ } else if (ScreenHasOption(m_nCurrScreen, "FED_RES")) {
#else
} else if (m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) {
#endif
m_nDisplayVideoMode = m_nPrefsVideoMode;
-#ifdef MULTISAMPLING
- m_nDisplayMSAALevel = m_nPrefsMSAALevel;
-#endif
}
if (m_nCurrScreen == MENUPAGE_SKIN_SELECT) {
@@ -440,11 +448,22 @@ CMenuManager::ThingsToDoBeforeGoingBack()
if (option.returnPrevPageFunc)
option.returnPrevPageFunc();
- if (m_nCurrOption == option.screenOptionOrder && option.type == FEOPTION_DYNAMIC)
- option.buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
+ if (m_nCurrOption == option.screenOptionOrder && (option.type == FEOPTION_DYNAMIC || option.type == FEOPTION_BUILTIN_ACTION))
+ if(option.buttonPressFunc)
+ option.buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
- if (option.onlyApplyOnEnter)
- option.displayedValue = *option.value;
+ if (option.type == FEOPTION_SELECT && option.onlyApplyOnEnter && option.lastSavedValue != option.displayedValue)
+ option.displayedValue = *option.value = option.lastSavedValue;
+ }
+ }
+
+ if (m_nCurrScreen > lastOgScreen) {
+ for (int i = 0; i < numCustomFrontendScreens; i++) {
+ FrontendScreen& screen = customFrontendScreens[i];
+ if (m_nCurrScreen == screen.id && screen.returnPrevPageFunc) {
+ screen.returnPrevPageFunc();
+ break;
+ }
}
}
#endif
@@ -464,7 +483,12 @@ CMenuManager::GetPreviousPageOption()
prevPage = prevPage == MENUPAGE_NONE ? (!m_bGameNotLoaded ? MENUPAGE_PAUSE_MENU : MENUPAGE_START_MENU) : prevPage;
for (int i = 0; i < NUM_MENUROWS; i++) {
- if (aScreens[prevPage].m_aEntries[i].m_TargetMenu == m_nCurrScreen) {
+ if (aScreens[prevPage].m_aEntries[i].m_SaveSlot == SAVESLOT_CFO) {
+ FrontendOption &option = customFrontendOptions[aScreens[prevPage].m_aEntries[i].m_TargetMenu];
+ if(option.type == FEOPTION_REDIRECT && option.to == m_nCurrScreen) {
+ return i;
+ }
+ } else if (aScreens[prevPage].m_aEntries[i].m_TargetMenu == m_nCurrScreen) {
return i;
}
}
@@ -879,9 +903,6 @@ CMenuManager::Draw()
case MENUPAGE_CONTROLLER_PC_OLD4:
case MENUPAGE_CONTROLLER_DEBUG:
case MENUPAGE_MOUSE_CONTROLS:
-#ifdef GRAPHICS_MENU_OPTIONS
- case MENUPAGE_GRAPHICS_SETTINGS:
-#endif
columnWidth = 50;
headerHeight = 0;
lineHeight = 20;
@@ -937,12 +958,43 @@ CMenuManager::Draw()
break;
#endif
default:
- columnWidth = 320;
- headerHeight = 40;
- lineHeight = 24;
- CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
- CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE));
- CFont::SetCentreOn();
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ bool custom = m_nCurrScreen > lastOgScreen;
+ if (custom) {
+ for (int i = 0; i < numCustomFrontendScreens; i++) {
+ FrontendScreen& screen = customFrontendScreens[i];
+ if (m_nCurrScreen == screen.id) {
+ columnWidth = screen.columnWidth;
+ headerHeight = screen.headerHeight;
+ lineHeight = screen.lineHeight;
+ CFont::SetFontStyle(FONT_LOCALE(screen.font));
+ CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = screen.fontScaleX), MENU_Y(MENU_TEXT_SIZE_Y = screen.fontScaleY));
+ if (screen.alignment == FESCREEN_LEFT_ALIGN) {
+ CFont::SetCentreOff();
+ CFont::SetRightJustifyOff();
+ } else if (screen.alignment == FESCREEN_RIGHT_ALIGN) {
+ CFont::SetCentreOff();
+ CFont::SetRightJustifyOn();
+ } else {
+ CFont::SetRightJustifyOff();
+ CFont::SetCentreOn();
+ }
+ break;
+ }
+ if (i == numCustomFrontendScreens - 1)
+ custom = false;
+ }
+ }
+ if (!custom)
+#endif
+ {
+ columnWidth = 320;
+ headerHeight = 40;
+ lineHeight = 24;
+ CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
+ CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE));
+ CFont::SetCentreOn();
+ }
break;
}
@@ -1014,6 +1066,12 @@ CMenuManager::Draw()
leftText = TheText.Get(gString);
}
} else {
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ if (aScreens[m_nCurrScreen].m_aEntries[i].m_SaveSlot == SAVESLOT_CFO){
+ FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu];
+ leftText = (wchar*)option.leftText;
+ } else
+#endif
leftText = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName);
}
@@ -1180,40 +1238,21 @@ CMenuManager::Draw()
AsciiToUnicode(_psGetVideoModeList()[m_nDisplayVideoMode], unicodeTemp);
rightText = unicodeTemp;
break;
-#ifdef IMPROVED_VIDEOMODE
- case MENUACTION_SCREENFORMAT:
- rightText = TheText.Get(FrontEndMenuManager.m_nSelectedScreenMode ? "FED_WND" : "FED_FLS");
- break;
-#endif
-#ifdef MULTISAMPLING
- case MENUACTION_MULTISAMPLING:
- switch (m_nDisplayMSAALevel) {
- case 0:
- rightText = TheText.Get("FEM_OFF");
- break;
- default:
- sprintf(gString, "%iX", 1 << (m_nDisplayMSAALevel));
- AsciiToUnicode(gString, unicodeTemp);
- rightText = unicodeTemp;
- break;
- }
- break;
-#endif
-#ifdef NO_ISLAND_LOADING
- case MENUACTION_ISLANDLOADING:
- switch (m_DisplayIslandLoading) {
- case ISLAND_LOADING_LOW:
- rightText = TheText.Get("FEM_LOW");
- break;
- case ISLAND_LOADING_MEDIUM:
- rightText = TheText.Get("FEM_MED");
- break;
- case ISLAND_LOADING_HIGH:
- rightText = TheText.Get("FEM_HIG");
- break;
- }
- break;
-#endif
+//#ifdef NO_ISLAND_LOADING
+// case MENUACTION_ISLANDLOADING:
+// switch (m_DisplayIslandLoading) {
+// case ISLAND_LOADING_LOW:
+// rightText = TheText.Get("FEM_LOW");
+// break;
+// case ISLAND_LOADING_MEDIUM:
+// rightText = TheText.Get("FEM_MED");
+// break;
+// case ISLAND_LOADING_HIGH:
+// rightText = TheText.Get("FEM_HIG");
+// break;
+// }
+// break;
+//#endif
case MENUACTION_AUDIOHW:
if (m_nPrefsAudio3DProviderIndex == -1)
rightText = TheText.Get("FEA_NAH");
@@ -1264,22 +1303,15 @@ CMenuManager::Draw()
case MENUACTION_MOUSESTEER:
rightText = TheText.Get(CVehicle::m_bDisableMouseSteering ? "FEM_OFF" : "FEM_ON");
break;
-#ifdef CUTSCENE_BORDERS_SWITCH
- case MENUACTION_CUTSCENEBORDERS:
- rightText = TheText.Get(m_PrefsCutsceneBorders ? "FEM_ON" : "FEM_OFF");
- break;
-#endif
-#ifdef PS2_ALPHA_TEST
- case MENUACTION_PS2_ALPHA_TEST:
- rightText = TheText.Get(gPS2alphaTest ? "FEM_ON" : "FEM_OFF");
- break;
-#endif
#ifdef CUSTOM_FRONTEND_OPTIONS
case MENUACTION_TRIGGERFUNC:
FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu];
if (m_nCurrScreen == option.screen && i == option.screenOptionOrder) {
- leftText = (wchar*)option.leftText;
if (option.type == FEOPTION_SELECT) {
+ // To whom manipulate option.value of static options externally (like RestoreDef functions)
+ if (*option.value != option.lastSavedValue)
+ option.displayedValue = option.lastSavedValue = *option.value;
+
if (option.displayedValue >= option.numRightTexts || option.displayedValue < 0)
option.displayedValue = 0;
@@ -1287,7 +1319,7 @@ CMenuManager::Draw()
} else if (option.type == FEOPTION_DYNAMIC) {
if (option.drawFunc) {
- rightText = option.drawFunc(&isOptionDisabled);
+ rightText = option.drawFunc(&isOptionDisabled, m_nCurrOption == i);
}
}
} else {
@@ -1375,15 +1407,7 @@ CMenuManager::Draw()
CFont::SetRightJustifyOn();
if(textLayer == 1)
- if((!strcmp(aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName, "FED_RES")
-#ifdef IMPROVED_VIDEOMODE
- || !strcmp(aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName, "FEM_SCF")
-#endif
-#ifdef MULTISAMPLING
- || !strcmp(aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName, "FED_AAS")
-#endif
- )
- && !m_bGameNotLoaded
+ if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName, "FED_RES") && !m_bGameNotLoaded
#ifdef CUSTOM_FRONTEND_OPTIONS
|| isOptionDisabled
#endif
@@ -1407,24 +1431,12 @@ CMenuManager::Draw()
if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FED_RES") && m_nHelperTextMsgId == 1)
ResetHelperText();
}
-#ifdef IMPROVED_VIDEOMODE
- if (m_nSelectedScreenMode == m_nPrefsWindowed) {
- if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEM_SCF") && m_nHelperTextMsgId == 1)
- ResetHelperText();
- }
-#endif
-#ifdef MULTISAMPLING
- if (m_nDisplayMSAALevel == m_nPrefsMSAALevel) {
- if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FED_AAS") && m_nHelperTextMsgId == 1)
- ResetHelperText();
- }
-#endif
-#ifdef NO_ISLAND_LOADING
- if (m_DisplayIslandLoading == m_PrefsIslandLoading) {
- if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEM_ISL") && m_nHelperTextMsgId == 1)
- ResetHelperText();
- }
-#endif
+//#ifdef NO_ISLAND_LOADING
+// if (m_DisplayIslandLoading == m_PrefsIslandLoading) {
+// if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEM_ISL") && m_nHelperTextMsgId == 1)
+// ResetHelperText();
+// }
+//#endif
if (m_nPrefsAudio3DProviderIndex != DMAudio.GetCurrent3DProviderIndex()) {
if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEA_3DH"))
SetHelperText(1);
@@ -1433,27 +1445,19 @@ CMenuManager::Draw()
if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FED_RES"))
SetHelperText(1);
}
-#ifdef IMPROVED_VIDEOMODE
- if (m_nSelectedScreenMode != m_nPrefsWindowed) {
- if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEM_SCF"))
- SetHelperText(1);
- }
-#endif
-#ifdef MULTISAMPLING
- if (m_nDisplayMSAALevel != m_nPrefsMSAALevel) {
- if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FED_AAS"))
- SetHelperText(1);
- }
-#endif
-#ifdef NO_ISLAND_LOADING
- if (m_DisplayIslandLoading != m_PrefsIslandLoading) {
- if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEM_ISL"))
- SetHelperText(1);
- }
-#endif
+//#ifdef NO_ISLAND_LOADING
+// if (m_DisplayIslandLoading != m_PrefsIslandLoading) {
+// if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEM_ISL"))
+// SetHelperText(1);
+// }
+//#endif
if (m_nPrefsAudio3DProviderIndex != DMAudio.GetCurrent3DProviderIndex()) {
if (strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEA_3DH") != 0
- && m_nCurrScreen == MENUPAGE_SOUND_SETTINGS && m_nPrefsAudio3DProviderIndex != -1) {
+ // To make assigning built-in actions to new custom options possible.
+#ifndef CUSTOM_FRONTEND_OPTIONS
+ && m_nCurrScreen == MENUPAGE_SOUND_SETTINGS
+#endif
+ && m_nPrefsAudio3DProviderIndex != -1) {
m_nPrefsAudio3DProviderIndex = DMAudio.GetCurrent3DProviderIndex();
SetHelperText(3);
@@ -1461,52 +1465,46 @@ CMenuManager::Draw()
}
if (m_nDisplayVideoMode != m_nPrefsVideoMode) {
if (strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FED_RES") != 0
-#ifdef GRAPHICS_MENU_OPTIONS
- && m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) {
+ // To make assigning built-in actions to new custom options possible.
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ && ScreenHasOption(m_nCurrScreen, "FED_RES")
#else
- && m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) {
+ && m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS
#endif
+ ){
m_nDisplayVideoMode = m_nPrefsVideoMode;
SetHelperText(3);
}
}
-#ifdef IMPROVED_VIDEOMODE
- if (m_nSelectedScreenMode != m_nPrefsWindowed) {
- if (strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEM_SCF") != 0
-#ifdef GRAPHICS_MENU_OPTIONS
- && m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) {
-#else
- && m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) {
-#endif
- m_nSelectedScreenMode = m_nPrefsWindowed;
- SetHelperText(3);
- }
- }
-#endif
-#ifdef MULTISAMPLING
- if (m_nSelectedScreenMode != m_nPrefsWindowed) {
- if (strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FED_AAS") != 0
-#ifdef GRAPHICS_MENU_OPTIONS
- && m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) {
-#else
- && m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) {
-#endif
- m_nDisplayMSAALevel = m_nPrefsMSAALevel;
- SetHelperText(3);
- }
- }
-#endif
#ifdef CUSTOM_FRONTEND_OPTIONS
- if (aScreens[m_nCurrScreen].m_aEntries[i].m_Action == MENUACTION_TRIGGERFUNC) {
+ if (aScreens[m_nCurrScreen].m_aEntries[i].m_SaveSlot == SAVESLOT_CFO) {
FrontendOption &option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu];
- if (option.onlyApplyOnEnter && m_nCurrOption != i)
- option.displayedValue = *option.value;
+ if (option.type == FEOPTION_SELECT) {
+ if (option.onlyApplyOnEnter){
+ if (m_nCurrOption != i) {
+ if (option.displayedValue != option.lastSavedValue)
+ SetHelperText(3); // Restored original value
+
+// option.displayedValue = option.lastSavedValue = *option.value;
+
+ } else {
+ if (option.displayedValue != *option.value)
+ SetHelperText(1); // Enter to apply
+ else if (m_nHelperTextMsgId == 1)
+ ResetHelperText(); // Applied
+ }
+ }
+ }
if (m_nCurrOption != lastOption && lastOption == i) {
FrontendOption &oldOption = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[lastOption].m_TargetMenu];
- if (oldOption.type == FEOPTION_DYNAMIC)
- oldOption.buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
+ if (oldOption.type == FEOPTION_DYNAMIC || oldOption.type == FEOPTION_BUILTIN_ACTION)
+ if(oldOption.buttonPressFunc)
+ oldOption.buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
+
+ if (oldOption.onlyApplyOnEnter && oldOption.type == FEOPTION_SELECT)
+ oldOption.displayedValue = oldOption.lastSavedValue = *oldOption.value;
}
}
#endif
@@ -1565,11 +1563,21 @@ CMenuManager::Draw()
case MENUPAGE_SKIN_SELECT:
case MENUPAGE_CONTROLLER_PC:
case MENUPAGE_MOUSE_CONTROLS:
-#ifdef GRAPHICS_MENU_OPTIONS
- case MENUPAGE_GRAPHICS_SETTINGS:
-#endif
DisplayHelperText();
break;
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ default:
+ if (m_nCurrScreen > lastOgScreen) {
+ for (int i = 0; i < numCustomFrontendScreens; i++) {
+ FrontendScreen& screen = customFrontendScreens[i];
+ if (m_nCurrScreen == screen.id && screen.showLeftRightHelper) {
+ DisplayHelperText();
+ break;
+ }
+ }
+ }
+ break;
+#endif
}
if (m_nCurrScreen == MENUPAGE_CONTROLLER_SETTINGS)
@@ -2558,7 +2566,22 @@ CMenuManager::DrawFrontEndNormal()
previousSprite = MENUSPRITE_PLAYERSET;
break;
default:
- previousSprite = MENUSPRITE_MAINMENU;
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ bool custom = m_nPrevScreen > lastOgScreen;
+ if (custom) {
+ for (int i = 0; i < numCustomFrontendScreens; i++) {
+ FrontendScreen& screen = customFrontendScreens[i];
+ if (m_nPrevScreen == screen.id) {
+ previousSprite = screen.sprite;
+ break;
+ }
+ if (i == numCustomFrontendScreens - 1)
+ custom = false;
+ }
+ }
+ if (!custom)
+#endif
+ previousSprite = MENUSPRITE_MAINMENU;
break;
}
@@ -2608,6 +2631,20 @@ CMenuManager::DrawFrontEndNormal()
case MENUPAGE_OPTIONS:
currentSprite = MENUSPRITE_PLAYERSET;
break;
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ default:
+ bool custom = m_nCurrScreen > lastOgScreen;
+ if (custom) {
+ for (int i = 0; i < numCustomFrontendScreens; i++) {
+ FrontendScreen& screen = customFrontendScreens[i];
+ if (m_nCurrScreen == screen.id) {
+ currentSprite = screen.sprite;
+ break;
+ }
+ }
+ }
+ break;
+#endif
}
if (m_nMenuFadeAlpha < 255) {
@@ -3368,23 +3405,19 @@ CMenuManager::LoadSettings()
CFileMgr::Read(fileHandle, m_PrefsSkinFile, 256);
CFileMgr::Read(fileHandle, (char*)&m_ControlMethod, 1);
CFileMgr::Read(fileHandle, (char*)&m_PrefsLanguage, 1);
-#ifdef FREE_CAM
- CFileMgr::Read(fileHandle, (char*)&TheCamera.bFreeCam, 1);
-#endif
-#ifdef CUTSCENE_BORDERS_SWITCH
- CFileMgr::Read(fileHandle, (char *)&CMenuManager::m_PrefsCutsceneBorders, 1);
-#endif
-#ifdef MULTISAMPLING
- CFileMgr::Read(fileHandle, (char *)&m_nPrefsMSAALevel, 1);
- m_nDisplayMSAALevel = m_nPrefsMSAALevel;
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ for (int i = 0; i < numCustomFrontendOptions; i++) {
+ FrontendOption& option = customFrontendOptions[i];
+ if (option.save) {
+ CFileMgr::Read(fileHandle, (char*)option.value, 1);
+ option.lastSavedValue = option.displayedValue = *option.value;
+ }
+ }
#endif
#ifdef NO_ISLAND_LOADING
CFileMgr::Read(fileHandle, (char *)&CMenuManager::m_PrefsIslandLoading, 1);
CMenuManager::m_DisplayIslandLoading = CMenuManager::m_PrefsIslandLoading;
#endif
-#ifdef PS2_ALPHA_TEST
- CFileMgr::Read(fileHandle, (char *)&gPS2alphaTest, 1);
-#endif // PS2_ALPHA_TEST
}
}
@@ -3475,21 +3508,17 @@ CMenuManager::SaveSettings()
CFileMgr::Write(fileHandle, m_PrefsSkinFile, 256);
CFileMgr::Write(fileHandle, (char*)&m_ControlMethod, 1);
CFileMgr::Write(fileHandle, (char*)&m_PrefsLanguage, 1);
-#ifdef FREE_CAM
- CFileMgr::Write(fileHandle, (char*)&TheCamera.bFreeCam, 1);
-#endif
-#ifdef CUTSCENE_BORDERS_SWITCH
- CFileMgr::Write(fileHandle, (char *)&CMenuManager::m_PrefsCutsceneBorders, 1);
-#endif
-#ifdef MULTISAMPLING
- CFileMgr::Write(fileHandle, (char *)&CMenuManager::m_nPrefsMSAALevel, 1);
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ for (int i = 0; i < numCustomFrontendOptions; i++) {
+ FrontendOption &option = customFrontendOptions[i];
+ if (option.save) {
+ CFileMgr::Write(fileHandle, (char*)option.value, 1);
+ }
+ }
#endif
#ifdef NO_ISLAND_LOADING
CFileMgr::Write(fileHandle, (char *)&CMenuManager::m_PrefsIslandLoading, 1);
#endif
-#ifdef PS2_ALPHA_TEST
- CFileMgr::Write(fileHandle, (char *)&gPS2alphaTest, 1);
-#endif // PS2_ALPHA_TEST
}
CFileMgr::CloseFile(fileHandle);
@@ -4808,65 +4837,45 @@ CMenuManager::ProcessButtonPresses(void)
SaveSettings();
}
break;
-#ifdef IMPROVED_VIDEOMODE
- case MENUACTION_SCREENFORMAT:
- if (m_nSelectedScreenMode != m_nPrefsWindowed) {
- m_nPrefsWindowed = m_nSelectedScreenMode;
- _psSelectScreenVM(m_nPrefsVideoMode);
- SetHelperText(0);
- SaveSettings();
- }
- break;
-#endif
-#ifdef MULTISAMPLING
- case MENUACTION_MULTISAMPLING:
- if (m_nDisplayMSAALevel != m_nPrefsMSAALevel) {
- m_nPrefsMSAALevel = m_nDisplayMSAALevel;
- _psSelectScreenVM(m_nPrefsVideoMode);
- SetHelperText(0);
- SaveSettings();
- }
- break;
-#endif
-#ifdef NO_ISLAND_LOADING
- case MENUACTION_ISLANDLOADING:
- if (m_DisplayIslandLoading != m_PrefsIslandLoading) {
- if (!m_bGameNotLoaded) {
- if (m_DisplayIslandLoading > ISLAND_LOADING_LOW) {
- if (m_DisplayIslandLoading == ISLAND_LOADING_HIGH)
- CStreaming::RemoveIslandsNotUsed(LEVEL_GENERIC);
- if (m_PrefsIslandLoading == ISLAND_LOADING_LOW) {
- if (CGame::currLevel != LEVEL_INDUSTRIAL)
- CFileLoader::LoadCollisionFromDatFile(LEVEL_INDUSTRIAL);
- if (CGame::currLevel != LEVEL_COMMERCIAL)
- CFileLoader::LoadCollisionFromDatFile(LEVEL_COMMERCIAL);
- if (CGame::currLevel != LEVEL_SUBURBAN)
- CFileLoader::LoadCollisionFromDatFile(LEVEL_SUBURBAN);
- CCollision::bAlreadyLoaded = true;
- m_PrefsIslandLoading = m_DisplayIslandLoading;
- CStreaming::RequestBigBuildings(CGame::currLevel);
- } else if (m_PrefsIslandLoading == ISLAND_LOADING_HIGH) {
- m_PrefsIslandLoading = m_DisplayIslandLoading;
- CStreaming::RequestIslands(CGame::currLevel);
- } else
- m_PrefsIslandLoading = m_DisplayIslandLoading;
- } else { // low
- m_PrefsIslandLoading = m_DisplayIslandLoading;
- CCollision::bAlreadyLoaded = false;
- CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
- CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
- CStreaming::RemoveUnusedBuildings(CGame::currLevel);
- CStreaming::RequestIslands(CGame::currLevel);
- }
-
- CStreaming::LoadAllRequestedModels(true);
- } else
- m_PrefsIslandLoading = m_DisplayIslandLoading;
- SetHelperText(0);
- SaveSettings();
- }
- break;
-#endif
+//#ifdef NO_ISLAND_LOADING
+// case MENUACTION_ISLANDLOADING:
+// if (m_DisplayIslandLoading != m_PrefsIslandLoading) {
+// if (!m_bGameNotLoaded) {
+// if (m_DisplayIslandLoading > ISLAND_LOADING_LOW) {
+// if (m_DisplayIslandLoading == ISLAND_LOADING_HIGH)
+// CStreaming::RemoveIslandsNotUsed(LEVEL_GENERIC);
+// if (m_PrefsIslandLoading == ISLAND_LOADING_LOW) {
+// if (CGame::currLevel != LEVEL_INDUSTRIAL)
+// CFileLoader::LoadCollisionFromDatFile(LEVEL_INDUSTRIAL);
+// if (CGame::currLevel != LEVEL_COMMERCIAL)
+// CFileLoader::LoadCollisionFromDatFile(LEVEL_COMMERCIAL);
+// if (CGame::currLevel != LEVEL_SUBURBAN)
+// CFileLoader::LoadCollisionFromDatFile(LEVEL_SUBURBAN);
+// CCollision::bAlreadyLoaded = true;
+// m_PrefsIslandLoading = m_DisplayIslandLoading;
+// CStreaming::RequestBigBuildings(CGame::currLevel);
+// } else if (m_PrefsIslandLoading == ISLAND_LOADING_HIGH) {
+// m_PrefsIslandLoading = m_DisplayIslandLoading;
+// CStreaming::RequestIslands(CGame::currLevel);
+// } else
+// m_PrefsIslandLoading = m_DisplayIslandLoading;
+// } else { // low
+// m_PrefsIslandLoading = m_DisplayIslandLoading;
+// CCollision::bAlreadyLoaded = false;
+// CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
+// CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
+// CStreaming::RemoveUnusedBuildings(CGame::currLevel);
+// CStreaming::RequestIslands(CGame::currLevel);
+// }
+//
+// CStreaming::LoadAllRequestedModels(true);
+// } else
+// m_PrefsIslandLoading = m_DisplayIslandLoading;
+// SetHelperText(0);
+// SaveSettings();
+// }
+// break;
+//#endif
case MENUACTION_AUDIOHW:
{
int selectedProvider = m_nPrefsAudio3DProviderIndex;
@@ -4913,7 +4922,6 @@ CMenuManager::ProcessButtonPresses(void)
DMAudio.SetRadioInCar(m_PrefsRadioStation);
DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
SaveSettings();
-#ifndef GRAPHICS_MENU_OPTIONS
} else if (m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) {
m_PrefsFrameLimiter = true;
m_PrefsBrightness = 256;
@@ -4928,121 +4936,55 @@ CMenuManager::ProcessButtonPresses(void)
if (_dwOperatingSystemVersion == OS_WIN98) {
CMBlur::BlurOn = false;
CMBlur::MotionBlurClose();
- }
- else {
+ } else {
CMBlur::BlurOn = true;
CMBlur::MotionBlurOpen(Scene.camera);
}
#else
CMBlur::BlurOn = true;
#endif
-#ifdef CUTSCENE_BORDERS_SWITCH
- m_PrefsCutsceneBorders = true;
-#endif
-#ifdef NO_ISLAND_LOADING
- m_DisplayIslandLoading = ISLAND_LOADING_LOW;
- if (!m_bGameNotLoaded) {
- if (m_DisplayIslandLoading > ISLAND_LOADING_LOW) {
- if (m_DisplayIslandLoading == ISLAND_LOADING_HIGH)
- CStreaming::RemoveIslandsNotUsed(LEVEL_GENERIC);
- if (m_PrefsIslandLoading == ISLAND_LOADING_LOW) {
- if (CGame::currLevel != LEVEL_INDUSTRIAL)
- CFileLoader::LoadCollisionFromDatFile(LEVEL_INDUSTRIAL);
- if (CGame::currLevel != LEVEL_COMMERCIAL)
- CFileLoader::LoadCollisionFromDatFile(LEVEL_COMMERCIAL);
- if (CGame::currLevel != LEVEL_SUBURBAN)
- CFileLoader::LoadCollisionFromDatFile(LEVEL_SUBURBAN);
- CCollision::bAlreadyLoaded = true;
- m_PrefsIslandLoading = m_DisplayIslandLoading;
- CStreaming::RequestBigBuildings(CGame::currLevel);
- } else if (m_PrefsIslandLoading == ISLAND_LOADING_HIGH) {
- m_PrefsIslandLoading = m_DisplayIslandLoading;
- CStreaming::RequestIslands(CGame::currLevel);
- } else
- m_PrefsIslandLoading = m_DisplayIslandLoading;
- } else { // low
- m_PrefsIslandLoading = m_DisplayIslandLoading;
- CCollision::bAlreadyLoaded = false;
- CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
- CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
- CStreaming::RemoveUnusedBuildings(CGame::currLevel);
- CStreaming::RequestIslands(CGame::currLevel);
- }
-
- CStreaming::LoadAllRequestedModels(true);
- } else
- m_PrefsIslandLoading = m_DisplayIslandLoading;
-#endif // NO_ISLAND_LOADING
-#ifdef PS2_ALPHA_TEST
- gPS2alphaTest = false;
-#endif // PS2_ALPHA_TEST
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ extern void RestoreDefGraphics(int8);
+ extern void RestoreDefDisplay(int8);
+
+ RestoreDefGraphics(FEOPTION_ACTION_SELECT);
+ RestoreDefDisplay(FEOPTION_ACTION_SELECT);
+#endif
+//#ifdef NO_ISLAND_LOADING
+// m_DisplayIslandLoading = ISLAND_LOADING_LOW;
+// if (!m_bGameNotLoaded) {
+// if (m_DisplayIslandLoading > ISLAND_LOADING_LOW) {
+// if (m_DisplayIslandLoading == ISLAND_LOADING_HIGH)
+// CStreaming::RemoveIslandsNotUsed(LEVEL_GENERIC);
+// if (m_PrefsIslandLoading == ISLAND_LOADING_LOW) {
+// if (CGame::currLevel != LEVEL_INDUSTRIAL)
+// CFileLoader::LoadCollisionFromDatFile(LEVEL_INDUSTRIAL);
+// if (CGame::currLevel != LEVEL_COMMERCIAL)
+// CFileLoader::LoadCollisionFromDatFile(LEVEL_COMMERCIAL);
+// if (CGame::currLevel != LEVEL_SUBURBAN)
+// CFileLoader::LoadCollisionFromDatFile(LEVEL_SUBURBAN);
+// CCollision::bAlreadyLoaded = true;
+// m_PrefsIslandLoading = m_DisplayIslandLoading;
+// CStreaming::RequestBigBuildings(CGame::currLevel);
+// } else if (m_PrefsIslandLoading == ISLAND_LOADING_HIGH) {
+// m_PrefsIslandLoading = m_DisplayIslandLoading;
+// CStreaming::RequestIslands(CGame::currLevel);
+// } else
+// m_PrefsIslandLoading = m_DisplayIslandLoading;
+// } else { // low
+// m_PrefsIslandLoading = m_DisplayIslandLoading;
+// CCollision::bAlreadyLoaded = false;
+// CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
+// CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
+// CStreaming::RemoveUnusedBuildings(CGame::currLevel);
+// CStreaming::RequestIslands(CGame::currLevel);
+// }
+//
+// CStreaming::LoadAllRequestedModels(true);
+// } else
+// m_PrefsIslandLoading = m_DisplayIslandLoading;
+//#endif // NO_ISLAND_LOADING
SaveSettings();
-#else
- } else if (m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) {
- m_PrefsBrightness = 256;
- m_PrefsShowSubtitles = true;
-#ifdef CUTSCENE_BORDERS_SWITCH
- m_PrefsCutsceneBorders = true;
-#endif
- SaveSettings();
- } else if (m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) {
- m_PrefsFrameLimiter = true;
- m_PrefsUseWideScreen = false;
- m_PrefsVsyncDisp = true;
- m_PrefsLOD = 1.2f;
- m_PrefsVsync = true;
- CRenderer::ms_lodDistScale = 1.2f;
- m_nDisplayVideoMode = m_nPrefsVideoMode;
-#ifdef GTA3_1_1_PATCH
- if (_dwOperatingSystemVersion == OS_WIN98) {
- CMBlur::BlurOn = false;
- CMBlur::MotionBlurClose();
- } else {
- CMBlur::BlurOn = true;
- CMBlur::MotionBlurOpen(Scene.camera);
- }
-#else
- CMBlur::BlurOn = true;
-#endif // GTA3_1_1_PATCH
-#ifdef NO_ISLAND_LOADING
- m_DisplayIslandLoading = ISLAND_LOADING_LOW;
- if (!m_bGameNotLoaded) {
- if (m_DisplayIslandLoading > ISLAND_LOADING_LOW) {
- if (m_DisplayIslandLoading == ISLAND_LOADING_HIGH)
- CStreaming::RemoveIslandsNotUsed(LEVEL_GENERIC);
- if (m_PrefsIslandLoading == ISLAND_LOADING_LOW) {
- if (CGame::currLevel != LEVEL_INDUSTRIAL)
- CFileLoader::LoadCollisionFromDatFile(LEVEL_INDUSTRIAL);
- if (CGame::currLevel != LEVEL_COMMERCIAL)
- CFileLoader::LoadCollisionFromDatFile(LEVEL_COMMERCIAL);
- if (CGame::currLevel != LEVEL_SUBURBAN)
- CFileLoader::LoadCollisionFromDatFile(LEVEL_SUBURBAN);
- CCollision::bAlreadyLoaded = true;
- m_PrefsIslandLoading = m_DisplayIslandLoading;
- CStreaming::RequestBigBuildings(CGame::currLevel);
- } else if (m_PrefsIslandLoading == ISLAND_LOADING_HIGH) {
- m_PrefsIslandLoading = m_DisplayIslandLoading;
- CStreaming::RequestIslands(CGame::currLevel);
- } else
- m_PrefsIslandLoading = m_DisplayIslandLoading;
- } else { // low
- m_PrefsIslandLoading = m_DisplayIslandLoading;
- CCollision::bAlreadyLoaded = false;
- CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
- CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
- CStreaming::RemoveUnusedBuildings(CGame::currLevel);
- CStreaming::RequestIslands(CGame::currLevel);
- }
-
- CStreaming::LoadAllRequestedModels(true);
- } else
- m_PrefsIslandLoading = m_DisplayIslandLoading;
-#endif // NO_ISLAND_LOADING
-#ifdef PS2_ALPHA_TEST
- gPS2alphaTest = false;
-#endif // PS2_ALPHA_TEST
- SaveSettings();
-#endif // GRAPHICS_MENU_OPTIONS
} else if ((m_nCurrScreen != MENUPAGE_SKIN_SELECT_OLD) && (m_nCurrScreen == MENUPAGE_CONTROLLER_PC)) {
ControlsManager.MakeControllerActionsBlank();
ControlsManager.InitDefaultControlConfiguration();
@@ -5112,7 +5054,7 @@ CMenuManager::ProcessButtonPresses(void)
option.displayedValue = 0;
}
option.changeFunc(option.displayedValue);
- *option.value = option.displayedValue;
+ *option.value = option.lastSavedValue = option.displayedValue;
} else if (option.type == FEOPTION_DYNAMIC) {
option.buttonPressFunc(FEOPTION_ACTION_SELECT);
@@ -5131,6 +5073,14 @@ CMenuManager::ProcessButtonPresses(void)
}
}
ProcessOnOffMenuOptions();
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ if (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_SaveSlot == SAVESLOT_CFO) {
+ FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu];
+ if (option.type == FEOPTION_BUILTIN_ACTION && option.buttonPressFunc) {
+ option.buttonPressFunc(FEOPTION_ACTION_SELECT);
+ }
+ }
+#endif
}
if (goBack) {
@@ -5301,41 +5251,15 @@ CMenuManager::ProcessButtonPresses(void)
}
}
break;
-#ifdef IMPROVED_VIDEOMODE
- case MENUACTION_SCREENFORMAT:
- if (m_bGameNotLoaded) {
- FrontEndMenuManager.m_nSelectedScreenMode = !FrontEndMenuManager.m_nSelectedScreenMode;
- }
- break;
-#endif
-#ifdef MULTISAMPLING
- case MENUACTION_MULTISAMPLING:
- if (m_bGameNotLoaded) {
- m_nDisplayMSAALevel += changeValueBy;
-
- int i = 0;
- int maxAA = RwD3D8EngineGetMaxMultiSamplingLevels();
- while (maxAA != 1) {
- i++;
- maxAA >>= 1;
- }
-
- if (m_nDisplayMSAALevel < 0)
- m_nDisplayMSAALevel = i;
- else if (m_nDisplayMSAALevel > i)
- m_nDisplayMSAALevel = 0;
- }
- break;
-#endif
-#ifdef NO_ISLAND_LOADING
- case MENUACTION_ISLANDLOADING:
- m_DisplayIslandLoading += changeValueBy;
- if (m_DisplayIslandLoading > ISLAND_LOADING_HIGH)
- m_DisplayIslandLoading = ISLAND_LOADING_LOW;
- else if (m_DisplayIslandLoading < ISLAND_LOADING_LOW)
- m_DisplayIslandLoading = ISLAND_LOADING_HIGH;
- break;
-#endif
+//#ifdef NO_ISLAND_LOADING
+// case MENUACTION_ISLANDLOADING:
+// m_DisplayIslandLoading += changeValueBy;
+// if (m_DisplayIslandLoading > ISLAND_LOADING_HIGH)
+// m_DisplayIslandLoading = ISLAND_LOADING_LOW;
+// else if (m_DisplayIslandLoading < ISLAND_LOADING_LOW)
+// m_DisplayIslandLoading = ISLAND_LOADING_HIGH;
+// break;
+//#endif
case MENUACTION_AUDIOHW:
if (m_nPrefsAudio3DProviderIndex != -1) {
m_nPrefsAudio3DProviderIndex += changeValueBy;
@@ -5374,7 +5298,7 @@ CMenuManager::ProcessButtonPresses(void)
}
if (!option.onlyApplyOnEnter) {
option.changeFunc(option.displayedValue);
- *option.value = option.displayedValue;
+ *option.value = option.lastSavedValue = option.displayedValue;
}
} else if (option.type == FEOPTION_DYNAMIC) {
option.buttonPressFunc(changeValueBy > 0 ? FEOPTION_ACTION_RIGHT : FEOPTION_ACTION_LEFT);
@@ -5501,20 +5425,6 @@ CMenuManager::ProcessOnOffMenuOptions()
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings();
break;
-#ifdef CUTSCENE_BORDERS_SWITCH
- case MENUACTION_CUTSCENEBORDERS:
- m_PrefsCutsceneBorders = !m_PrefsCutsceneBorders;
- DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
- SaveSettings();
- break;
-#endif
-#ifdef PS2_ALPHA_TEST
- case MENUACTION_PS2_ALPHA_TEST:
- gPS2alphaTest = !gPS2alphaTest;
- DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
- SaveSettings();
- break;
-#endif
}
}
@@ -6354,20 +6264,6 @@ CMenuManager::ConstructStatLine(int rowIdx)
#undef STAT_LINE
}
-#if 0
-uint8 CMenuManager::GetNumberOfMenuOptions()
-{
- uint8 Rows = -1;
- for (int i = 0; i < NUM_MENUROWS; i++) {
- if (aScreens[m_nCurrScreen].m_aEntries[i].m_Action == MENUACTION_NOTHING)
- break;
-
- ++Rows;
- }
- return Rows;
-}
-#endif
-
#undef GetBackJustUp
#undef GetBackJustDown
#undef ChangeScreen
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index fa3652a1..848148e7 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -155,7 +155,10 @@ enum eSaveSlot
SAVESLOT_6,
SAVESLOT_7,
SAVESLOT_8,
- SAVESLOT_LABEL = 36
+ SAVESLOT_LABEL = 36,
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ SAVESLOT_CFO
+#endif
};
#ifdef MENU_MAP
@@ -235,14 +238,15 @@ enum eMenuScreen
MENUPAGE_KEYBOARD_CONTROLS = 55,
MENUPAGE_MOUSE_CONTROLS = 56,
MENUPAGE_MISSION_RETRY = 57,
- MENUPAGE_58 = 58,
#ifdef MENU_MAP
- MENUPAGE_MAP = 59,
-#endif
-#ifdef GRAPHICS_MENU_OPTIONS
- MENUPAGE_GRAPHICS_SETTINGS,
+ MENUPAGE_MAP,
#endif
+ MENUPAGE_UNK, // 58 in game. Map page is added above, because last screen in CMenuScreens should always be empty to make CFO work
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ MENUPAGES = 65 // for some room to add more screen
+#else
MENUPAGES
+#endif
};
enum eMenuAction
@@ -362,25 +366,13 @@ enum eMenuAction
MENUACTION_UNK112,
MENUACTION_REJECT_RETRY,
MENUACTION_UNK114,
-#ifdef IMPROVED_VIDEOMODE
- MENUACTION_SCREENFORMAT,
-#endif
-#ifdef ANISOTROPIC_FILTERING
- MENUACTION_MIPMAPS,
- MENUACTION_TEXTURE_FILTERING,
-#endif
-#ifdef MULTISAMPLING
- MENUACTION_MULTISAMPLING,
-#endif
-#ifdef NO_ISLAND_LOADING
- MENUACTION_ISLANDLOADING,
-#endif
-#ifdef PS2_ALPHA_TEST
- MENUACTION_PS2_ALPHA_TEST,
-#endif
-#ifdef CUTSCENE_BORDERS_SWITCH
- MENUACTION_CUTSCENEBORDERS,
-#endif
+//#ifdef ANISOTROPIC_FILTERING
+// MENUACTION_MIPMAPS,
+// MENUACTION_TEXTURE_FILTERING,
+//#endif
+//#ifdef NO_ISLAND_LOADING
+// MENUACTION_ISLANDLOADING,
+//#endif
#ifdef CUSTOM_FRONTEND_OPTIONS
MENUACTION_TRIGGERFUNC
#endif
@@ -469,7 +461,7 @@ struct BottomBarOption
struct CMenuScreen
{
char m_ScreenName[8];
- int32 unk; // 2 on MENUPAGE_MULTIPLAYER_START, 1 on everywhere else
+ int32 unk; // 2 on MENUPAGE_MULTIPLAYER_START, 1 on everywhere else, 0 on unused.
int32 m_PreviousPage[2]; // eMenuScreen
int32 m_ParentEntry[2]; // row
@@ -704,8 +696,6 @@ public:
void PageUpList(bool);
void PageDownList(bool);
int8 GetPreviousPageOption();
-
- // uint8 GetNumberOfMenuOptions();
};
#ifndef IMPROVED_VIDEOMODE
@@ -713,6 +703,6 @@ VALIDATE_SIZE(CMenuManager, 0x564);
#endif
extern CMenuManager FrontEndMenuManager;
-extern CMenuScreen aScreens[];
+extern CMenuScreen aScreens[MENUPAGES];
#endif \ No newline at end of file
diff --git a/src/core/MenuScreens.cpp b/src/core/MenuScreens.cpp
index 02c004b3..533fc755 100644
--- a/src/core/MenuScreens.cpp
+++ b/src/core/MenuScreens.cpp
@@ -4,45 +4,7 @@
// If you want to add new options, please don't do that here and see CustomFrontendOptionsPopulate in re3.cpp.
-#ifdef CUTSCENE_BORDERS_SWITCH
-#define MENU_CUTSCENE_BORDERS_SWITCH(screen) MENUACTION_CUTSCENEBORDERS, "FEM_CSB", SAVESLOT_NONE, screen,
-#else
-#define MENU_CUTSCENE_BORDERS_SWITCH(screen)
-#endif
-
-#ifdef IMPROVED_VIDEOMODE
-#define MENU_IMPROVED_VIDEOMODE(screen) MENUACTION_SCREENFORMAT, "FEM_SCF", SAVESLOT_NONE, screen,
-#else
-#define MENU_IMPROVED_VIDEOMODE(screen)
-#endif
-
-#ifdef ANISOTROPIC_FILTERING
-#define MENU_MIPMAPS(screen) MENUACTION_MIPMAPS, "FED_MIP", SAVESLOT_NONE, screen,
-#define MENU_TEXTURE_FILTERING(screen) MENUACTION_TEXTURE_FILTERING, "FED_FIL", SAVESLOT_NONE, screen,
-#else
-#define MENU_MIPMAPS(screen)
-#define MENU_TEXTURE_FILTERING(screen)
-#endif
-
-#ifdef MULTISAMPLING
-#define MENU_MULTISAMPLING(screen) MENUACTION_MULTISAMPLING, "FED_AAS", SAVESLOT_NONE, screen,
-#else
-#define MENU_MULTISAMPLING(screen)
-#endif
-
-#ifdef NO_ISLAND_LOADING
-#define MENU_ISLAND_LOADING(screen) MENUACTION_ISLANDLOADING, "FEM_ISL", SAVESLOT_NONE, screen,
-#else
-#define MENU_ISLAND_LOADING(screen)
-#endif
-
-#ifdef PS2_ALPHA_TEST
-#define MENU_PS2_ALPHA_TEST(screen) MENUACTION_PS2_ALPHA_TEST, "FEM_2PR", SAVESLOT_NONE, screen,
-#else
-#define MENU_PS2_ALPHA_TEST(screen)
-#endif
-
-CMenuScreen aScreens[] = {
+CMenuScreen aScreens[MENUPAGES] = {
// MENUPAGE_NONE = 0
{ "", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, },
@@ -85,7 +47,6 @@ CMenuScreen aScreens[] = {
},
// MENUPAGE_DISPLAY_SETTINGS = 6
-#ifndef GRAPHICS_MENU_OPTIONS
{ "FET_DIS", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 2, 2,
MENUACTION_BRIGHTNESS, "FED_BRI", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS,
MENUACTION_DRAWDIST, "FEM_LOD", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS,
@@ -93,28 +54,11 @@ CMenuScreen aScreens[] = {
MENUACTION_FRAMELIMIT, "FEM_FRM", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS,
MENUACTION_TRAILS, "FED_TRA", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS,
MENUACTION_SUBTITLES, "FED_SUB", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS,
- MENU_CUTSCENE_BORDERS_SWITCH(MENUPAGE_DISPLAY_SETTINGS)
- MENU_MIPMAPS(MENUPAGE_DISPLAY_SETTINGS)
- MENU_TEXTURE_FILTERING(MENUPAGE_DISPLAY_SETTINGS)
- MENU_ISLAND_LOADING(MENUPAGE_DISPLAY_SETTINGS)
- MENU_PS2_ALPHA_TEST(MENUPAGE_DISPLAY_SETTINGS)
- MENU_MULTISAMPLING(MENUPAGE_DISPLAY_SETTINGS)
MENUACTION_WIDESCREEN, "FED_WIS", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS,
- MENU_IMPROVED_VIDEOMODE(MENUPAGE_DISPLAY_SETTINGS)
MENUACTION_SCREENRES, "FED_RES", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS,
MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS,
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
},
-#else
- { "FET_DIS", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 2, 2,
- MENUACTION_BRIGHTNESS, "FED_BRI", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS,
- MENUACTION_SUBTITLES, "FED_SUB", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS,
- MENU_CUTSCENE_BORDERS_SWITCH(MENUPAGE_DISPLAY_SETTINGS)
- MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS,
- MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
- },
-#endif // GRAPHICS_MENU_OPTIONS
-
// MENUPAGE_LANGUAGE_SETTINGS = 7
{ "FET_LAN", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 3, 3,
@@ -379,9 +323,6 @@ CMenuScreen aScreens[] = {
MENUACTION_CHANGEMENU, "FET_CTL", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
MENUACTION_LOADRADIO, "FET_AUD", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
MENUACTION_CHANGEMENU, "FET_DIS", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS,
-#ifdef GRAPHICS_MENU_OPTIONS
- MENUACTION_CHANGEMENU, "FET_GRA", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
-#endif
MENUACTION_CHANGEMENU, "FET_LAN", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS,
MENUACTION_PLAYERSETUP, "FET_PSU", SAVESLOT_NONE, MENUPAGE_SKIN_SELECT,
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
@@ -493,38 +434,19 @@ CMenuScreen aScreens[] = {
},
#endif
- // MENUPAGE_58 = 58
- { "", 0, MENUPAGE_NONE, MENUPAGE_NONE, 0, 0,
-
- },
-
#ifdef MENU_MAP
- // MENUPAGE_MAP = 59
+ // MENUPAGE_MAP
{ "FEG_MAP", 1, MENUPAGE_NONE, MENUPAGE_NONE, 5, 2,
MENUACTION_UNK110, "", SAVESLOT_NONE, MENUPAGE_NONE, // to prevent cross/enter to go back
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
},
#endif
-#ifdef GRAPHICS_MENU_OPTIONS
- // MENUPAGE_GRAPHICS_SETTINGS = 60
- { "FET_GRA", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 2, 2,
- MENUACTION_DRAWDIST, "FEM_LOD", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
- MENUACTION_FRAMESYNC, "FEM_VSC", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
- MENUACTION_FRAMELIMIT, "FEM_FRM", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
- MENUACTION_TRAILS, "FED_TRA", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
- MENUACTION_WIDESCREEN, "FED_WIS", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
- MENU_MIPMAPS(MENUPAGE_GRAPHICS_SETTINGS)
- MENU_TEXTURE_FILTERING(MENUPAGE_GRAPHICS_SETTINGS)
- MENU_ISLAND_LOADING(MENUPAGE_GRAPHICS_SETTINGS)
- MENU_PS2_ALPHA_TEST(MENUPAGE_GRAPHICS_SETTINGS)
- MENU_MULTISAMPLING(MENUPAGE_GRAPHICS_SETTINGS)
- MENU_IMPROVED_VIDEOMODE(MENUPAGE_GRAPHICS_SETTINGS)
- MENUACTION_SCREENRES, "FED_RES", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
- MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
- MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
- },
-#endif
+ // MENUPAGE_UNK
+ { "", 0, MENUPAGE_NONE, MENUPAGE_NONE, 0, 0,
+
+ },
+
};
#endif \ No newline at end of file
diff --git a/src/core/config.h b/src/core/config.h
index b0d89fac..498be8f3 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -250,7 +250,7 @@ enum Config {
# define TRIANGLE_BACK_BUTTON
//# define CIRCLE_BACK_BUTTON
# define CUSTOM_FRONTEND_OPTIONS
-# define GRAPHICS_MENU_OPTIONS
+# define GRAPHICS_MENU_OPTIONS // otherwise Advanced Options menu will appear if Display is full
#endif
// Script
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index dd116e27..2922f73e 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -74,12 +74,124 @@ mysrand(unsigned int seed)
#ifdef CUSTOM_FRONTEND_OPTIONS
#include "frontendoption.h"
#include "platform.h"
+#include "Font.h"
void ReloadFrontendOptions(void)
{
CustomFrontendOptionsPopulate();
}
+void RestoreDefGraphics(int8 action) {
+ if (action != FEOPTION_ACTION_SELECT)
+ return;
+
+ #ifdef PS2_ALPHA_TEST
+ gPS2alphaTest = false;
+ #endif
+ #ifdef MULTISAMPLING
+ FrontEndMenuManager.m_nPrefsMSAALevel = FrontEndMenuManager.m_nDisplayMSAALevel = 0;
+ #endif
+ #ifdef GRAPHICS_MENU_OPTIONS // otherwise Frontend will handle those
+ CMenuManager::m_PrefsFrameLimiter = true;
+ CMenuManager::m_PrefsVsyncDisp = true;
+ CMenuManager::m_PrefsVsync = true;
+ CMenuManager::m_PrefsUseWideScreen = false;
+ FrontEndMenuManager.m_nDisplayVideoMode = FrontEndMenuManager.m_nPrefsVideoMode;
+ #ifdef GTA3_1_1_PATCH
+ if (_dwOperatingSystemVersion == OS_WIN98) {
+ CMBlur::BlurOn = false;
+ CMBlur::MotionBlurClose();
+ } else {
+ CMBlur::BlurOn = true;
+ CMBlur::MotionBlurOpen(Scene.camera);
+ }
+ #else
+ CMBlur::BlurOn = true;
+ #endif
+ FrontEndMenuManager.SaveSettings();
+ #endif
+}
+
+void RestoreDefDisplay(int8 action) {
+ if (action != FEOPTION_ACTION_SELECT)
+ return;
+
+ #ifdef CUTSCENE_BORDERS_SWITCH
+ CMenuManager::m_PrefsCutsceneBorders = true;
+ #endif
+ #ifdef FREE_CAM
+ TheCamera.bFreeCam = false;
+ #endif
+ #ifdef GRAPHICS_MENU_OPTIONS // otherwise Frontend will handle those
+ CMenuManager::m_PrefsBrightness = 256;
+ CMenuManager::m_PrefsLOD = 1.2f;
+ CRenderer::ms_lodDistScale = 1.2f;
+ CMenuManager::m_PrefsShowSubtitles = true;
+ FrontEndMenuManager.SaveSettings();
+ #endif
+}
+
+#ifdef MULTISAMPLING
+void MultiSamplingGoBack() {
+ FrontEndMenuManager.m_nDisplayMSAALevel = FrontEndMenuManager.m_nPrefsMSAALevel;
+}
+
+void MultiSamplingButtonPress(int8 action) {
+ if (action == FEOPTION_ACTION_SELECT) {
+ if (FrontEndMenuManager.m_nDisplayMSAALevel != FrontEndMenuManager.m_nPrefsMSAALevel) {
+ FrontEndMenuManager.m_nPrefsMSAALevel = FrontEndMenuManager.m_nDisplayMSAALevel;
+ _psSelectScreenVM(FrontEndMenuManager.m_nPrefsVideoMode);
+ FrontEndMenuManager.SetHelperText(0);
+ FrontEndMenuManager.SaveSettings();
+ }
+ } else if (action == FEOPTION_ACTION_LEFT || action == FEOPTION_ACTION_RIGHT) {
+ if (FrontEndMenuManager.m_bGameNotLoaded) {
+ FrontEndMenuManager.m_nDisplayMSAALevel += (action == FEOPTION_ACTION_RIGHT ? 1 : -1);
+
+ int i = 0;
+ int maxAA = RwD3D8EngineGetMaxMultiSamplingLevels();
+ while (maxAA != 1) {
+ i++;
+ maxAA >>= 1;
+ }
+
+ if (FrontEndMenuManager.m_nDisplayMSAALevel < 0)
+ FrontEndMenuManager.m_nDisplayMSAALevel = i;
+ else if (FrontEndMenuManager.m_nDisplayMSAALevel > i)
+ FrontEndMenuManager.m_nDisplayMSAALevel = 0;
+ }
+ } else if (action == FEOPTION_ACTION_FOCUSLOSS) {
+ if (FrontEndMenuManager.m_nDisplayMSAALevel != FrontEndMenuManager.m_nPrefsMSAALevel) {
+ FrontEndMenuManager.m_nDisplayMSAALevel = FrontEndMenuManager.m_nPrefsMSAALevel;
+ FrontEndMenuManager.SetHelperText(3);
+ }
+ }
+}
+
+wchar* MultiSamplingDraw(bool *disabled, bool userHovering) {
+ static wchar unicodeTemp[64];
+ if (userHovering) {
+ if (FrontEndMenuManager.m_nDisplayMSAALevel == FrontEndMenuManager.m_nPrefsMSAALevel) {
+ if (FrontEndMenuManager.m_nHelperTextMsgId == 1) // Press enter to apply
+ FrontEndMenuManager.ResetHelperText();
+ } else {
+ FrontEndMenuManager.SetHelperText(1);
+ }
+ }
+ if (!FrontEndMenuManager.m_bGameNotLoaded)
+ *disabled = true;
+
+ switch (FrontEndMenuManager.m_nDisplayMSAALevel) {
+ case 0:
+ return TheText.Get("FEM_OFF");
+ default:
+ sprintf(gString, "%iX", 1 << (FrontEndMenuManager.m_nDisplayMSAALevel));
+ AsciiToUnicode(gString, unicodeTemp);
+ return unicodeTemp;
+ }
+}
+#endif
+
#ifdef MORE_LANGUAGES
void LangPolSelect(int8 action)
{
@@ -112,7 +224,7 @@ void LangJapSelect(int8 action)
}
#endif
-/*#ifdef IMPROVED_VIDEOMODE
+#ifdef IMPROVED_VIDEOMODE
void ScreenModeChange(int8 displayedValue)
{
if (displayedValue != FrontEndMenuManager.m_nPrefsWindowed) {
@@ -122,61 +234,155 @@ void ScreenModeChange(int8 displayedValue)
FrontEndMenuManager.SaveSettings();
}
}
-#endif*/
+#endif
#ifdef FREE_CAM
-void ToggleFreeCam(int8 action)
+void FreeCamChange(int8 displayedValue)
{
- if (action == FEOPTION_ACTION_SELECT) {
- TheCamera.bFreeCam = !TheCamera.bFreeCam;
- FrontEndMenuManager.SaveSettings();
- }
+ TheCamera.bFreeCam = !!displayedValue;
+ FrontEndMenuManager.SaveSettings();
+}
+#endif
+
+#ifdef CUTSCENE_BORDERS_SWITCH
+void BorderModeChange(int8 displayedValue)
+{
+ CMenuManager::m_PrefsCutsceneBorders = !!displayedValue;
+ FrontEndMenuManager.SaveSettings();
+}
+#endif
+
+#ifdef PS2_ALPHA_TEST
+void PS2AlphaTestChange(int8 displayedValue)
+{
+ gPS2alphaTest = !!displayedValue;
+ FrontEndMenuManager.SaveSettings();
}
#endif
-//#ifdef CUTSCENE_BORDERS_SWITCH
-//void BorderModeChange(int8 displayedValue)
-//{
-// CMenuManager::m_PrefsCutsceneBorders = !!displayedValue;
-// FrontEndMenuManager.SaveSettings();
-//}
-//#endif
-// Reloaded on language change, so you can use hardcoded wchar* and TheText.Get with peace of mind
+// Important: Make sure to read the warnings/informations in frontendoption.h!!
void
CustomFrontendOptionsPopulate(void)
{
RemoveCustomFrontendOptions(); // if exist
-#ifdef MORE_LANGUAGES
- FrontendOptionSetPosition(MENUPAGE_LANGUAGE_SETTINGS);
- FrontendOptionAddDynamic(TheText.Get("FEL_POL"), nil, LangPolSelect, nil);
- FrontendOptionAddDynamic(TheText.Get("FEL_RUS"), nil, LangRusSelect, nil);
- FrontendOptionAddDynamic(TheText.Get("FEL_JAP"), nil, LangJapSelect, nil);
+ // -- Graphics/display seperation preperation starts - don't add options in here!
+#ifdef GRAPHICS_MENU_OPTIONS
+ int graphicsMenu = FrontendScreenAdd("FET_GRA", MENUSPRITE_MAINMENU, MENUPAGE_OPTIONS, 50, 0, 20,
+ FONT_HEADING, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE, FESCREEN_LEFT_ALIGN, true);
+
+ int newDisplayMenu = FrontendScreenAdd("FET_DIS", MENUSPRITE_MAINMENU, MENUPAGE_OPTIONS, 50, 0, 20,
+ FONT_HEADING, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE, FESCREEN_LEFT_ALIGN, true);
+
+ FrontendOptionSetCursor(MENUPAGE_OPTIONS, 2, true);
+ FrontendOptionAddRedirect(TheText.Get("FET_DIS"), newDisplayMenu, 0);
+ FrontendOptionSetCursor(MENUPAGE_OPTIONS, 3);
+ FrontendOptionAddRedirect(TheText.Get("FET_GRA"), graphicsMenu, 0);
+
+#define SWITCH_TO_GRAPHICS_MENU FrontendOptionSetCursor(graphicsMenu, -1);
+#define SWITCH_TO_DISPLAY_MENU FrontendOptionSetCursor(newDisplayMenu, -1);
+#define CLONE_OPTION(a, b, c, d) FrontendOptionAddBuiltinAction(a, b, c, d);
+#define ADD_BACK FrontendOptionAddBackButton(TheText.Get("FEDS_TB"));
+#define ADD_RESTORE_DEFAULTS(a) FrontendOptionAddDynamic(TheText.Get("FET_DEF"), nil, nil, a, nil);
+#else
+ int advancedDisplayMenu = FrontendScreenAdd("FET_ADV", MENUSPRITE_MAINMENU, MENUPAGE_DISPLAY_SETTINGS, 50, 0, 20,
+ FONT_HEADING, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE, FESCREEN_LEFT_ALIGN, true);
+ bool movedToAdvMenu = false;
+
+#define SWITCH_TO_GRAPHICS_MENU \
+ if (GetNumberOfMenuOptions(MENUPAGE_DISPLAY_SETTINGS) >= 12) { \
+ FrontendOptionSetCursor(advancedDisplayMenu, -1); \
+ movedToAdvMenu = true; \
+ } else { \
+ FrontendOptionSetCursor(MENUPAGE_DISPLAY_SETTINGS, -3); \
+ }
+
+#define SWITCH_TO_DISPLAY_MENU SWITCH_TO_GRAPHICS_MENU
+#define CLONE_OPTION(a, b, c, d)
+#define ADD_BACK
+#define ADD_RESTORE_DEFAULTS(a)
#endif
+ // -- Graphics/display seperation preperation end
+
+ static const wchar* off_on[] = { TheText.Get("FEM_OFF"), TheText.Get("FEM_ON") };
-/*#ifdef IMPROVED_VIDEOMODE
- static const wchar *screenModes[] = { (wchar*)L"FULLSCREEN", (wchar*)L"WINDOWED" };
- FrontendOptionSetPosition(MENUPAGE_GRAPHICS_SETTINGS, 8);
- FrontendOptionAddSelect(TheText.Get("SCRFOR"), screenModes, 2, (int8*)&FrontEndMenuManager.m_nPrefsWindowed, true, ScreenModeChange, nil);
-#endif*/
+#ifdef MORE_LANGUAGES
+ FrontendOptionSetCursor(MENUPAGE_LANGUAGE_SETTINGS, -2);
+ FrontendOptionAddDynamic(TheText.Get("FEL_POL"), nil, nil, LangPolSelect, nil);
+ FrontendOptionAddDynamic(TheText.Get("FEL_RUS"), nil, nil, LangRusSelect, nil);
+ FrontendOptionAddDynamic(TheText.Get("FEL_JAP"), nil, nil, LangJapSelect, nil);
+#endif
#ifdef MENU_MAP
- FrontendOptionSetPosition(MENUPAGE_PAUSE_MENU, 2);
+ FrontendOptionSetCursor(MENUPAGE_PAUSE_MENU, 2);
FrontendOptionAddRedirect(TheText.Get("FEG_MAP"), MENUPAGE_MAP);
#endif
+ // -- Start of graphics menu - add options in display order!
+
+ SWITCH_TO_GRAPHICS_MENU
+ CLONE_OPTION(TheText.Get("FED_RES"), MENUACTION_SCREENRES, nil, nil);
+ CLONE_OPTION(TheText.Get("FED_WIS"), MENUACTION_WIDESCREEN, nil, nil)
+
+#ifdef IMPROVED_VIDEOMODE
+ static const wchar* screenModes[] = { (wchar*)L"FULLSCREEN", (wchar*)L"WINDOWED" };
+ // Storing isn't enabled because it's handled in Frontend
+ FrontendOptionAddSelect(TheText.Get("FEM_SCF"), screenModes, 2, (int8*)&FrontEndMenuManager.m_nPrefsWindowed, true, ScreenModeChange, nil);
+#endif
+
+ CLONE_OPTION(TheText.Get("FEM_VSC"), MENUACTION_FRAMESYNC, nil, nil);
+ CLONE_OPTION(TheText.Get("FEM_FRM"), MENUACTION_FRAMELIMIT, nil, nil);
+
+#ifdef MULTISAMPLING
+ SWITCH_TO_GRAPHICS_MENU
+ FrontendOptionAddDynamic(TheText.Get("FED_AAS"), MultiSamplingDraw, (int8*)&FrontEndMenuManager.m_nPrefsMSAALevel, MultiSamplingButtonPress, MultiSamplingGoBack, true);
+#endif
+
+ CLONE_OPTION(TheText.Get("FED_TRA"), MENUACTION_TRAILS, nil, nil);
+
+#ifdef PS2_ALPHA_TEST
+ SWITCH_TO_GRAPHICS_MENU
+ FrontendOptionAddSelect(TheText.Get("FEM_2PR"), off_on, 2, (int8*)&gPS2alphaTest, false, PS2AlphaTestChange, nil, true);
+#endif
+
+ ADD_RESTORE_DEFAULTS(RestoreDefGraphics)
+ ADD_BACK
+
+ // ---- End of Graphics Menu ----
+
+ // -- Start of Display menu - add options in display order!
+
+ SWITCH_TO_DISPLAY_MENU
+ CLONE_OPTION(TheText.Get("FED_BRI"), MENUACTION_BRIGHTNESS, nil, nil);
+ CLONE_OPTION(TheText.Get("FEM_LOD"), MENUACTION_DRAWDIST, nil, nil);
+
+#ifdef CUTSCENE_BORDERS_SWITCH
+ SWITCH_TO_DISPLAY_MENU
+ FrontendOptionAddSelect(TheText.Get("FEM_CSB"), off_on, 2, (int8 *)&CMenuManager::m_PrefsCutsceneBorders, false, BorderModeChange, nil, true);
+#endif
+
#ifdef FREE_CAM
- static const wchar *text = (wchar*)L"TOGGLE FREE CAM";
- FrontendOptionSetPosition(MENUPAGE_CONTROLLER_PC, 1);
- FrontendOptionAddDynamic(text, nil, ToggleFreeCam, nil);
+ SWITCH_TO_DISPLAY_MENU
+ static const wchar* text = (wchar*)L"FREE CAM";
+ FrontendOptionAddSelect(text, off_on, 2, (int8*)&TheCamera.bFreeCam, false, FreeCamChange, nil, true);
+#endif
+
+ CLONE_OPTION(TheText.Get("FED_SUB"), MENUACTION_SUBTITLES, nil, nil);
+
+ // Add link to advanced graphics menu if it's filled.
+#ifndef GRAPHICS_MENU_OPTIONS
+ if (movedToAdvMenu) {
+ FrontendOptionSetCursor(MENUPAGE_DISPLAY_SETTINGS, -3);
+ FrontendOptionAddRedirect(TheText.Get("FET_ADV"), advancedDisplayMenu, 0);
+
+ FrontendOptionSetCursor(advancedDisplayMenu, -1);
+ FrontendOptionAddBackButton(TheText.Get("FEDS_TB"));
+ }
#endif
-/*#ifdef CUTSCENE_BORDERS_SWITCH
- static const wchar *off_on[] = { TheText.Get("FEM_OFF"), TheText.Get("FEM_ON") };
- FrontendOptionSetPosition(MENUPAGE_DISPLAY_SETTINGS, 3);
- FrontendOptionAddSelect((const wchar *)L"CUTSCENE BORDERS", off_on, 2, (int8 *)&CMenuManager::m_PrefsCutsceneBorders, false, BorderModeChange, nil);
-#endif*/
+ ADD_RESTORE_DEFAULTS(RestoreDefDisplay)
+ ADD_BACK
}
#endif