From a728a542be7b3cf5dde16184dea071c50fdd38c0 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sun, 16 Aug 2020 01:37:09 +0300 Subject: Graphics menu + MSAA --- src/core/Frontend.cpp | 215 +++++++++++++++++++++++++++++++++++++++++++++-- src/core/Frontend.h | 22 ++++- src/core/MenuScreens.cpp | 85 ++++++++++++++++--- src/core/config.h | 9 +- src/core/re3.cpp | 28 +++--- src/skel/win/win.cpp | 4 +- 6 files changed, 326 insertions(+), 37 deletions(-) (limited to 'src') diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index 95d5f6e6..df65f94f 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -116,6 +116,12 @@ int32 CMenuManager::m_PrefsSfxVolume = 102; bool CMenuManager::m_PrefsCutsceneBorders = true; #endif + +#ifdef MULTISAMPLING +int8 CMenuManager::m_nPrefsMSAALevel = 0; +int8 CMenuManager::m_nDisplayMSAALevel = 0; +#endif + char CMenuManager::m_PrefsSkinFile[256] = DEFAULT_SKIN_NAME; int32 CMenuManager::m_KeyPressedCode = -1; @@ -399,8 +405,15 @@ CMenuManager::ThingsToDoBeforeGoingBack() DMAudio.StopFrontEndTrack(); OutputDebugString("FRONTEND AUDIO TRACK STOPPED"); #endif +#ifdef GRAPHICS_MENU_OPTIONS } else if (m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) { +#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) { @@ -848,7 +861,7 @@ CMenuManager::Draw() CFont::SetCentreOn(); break; case MENUPAGE_SOUND_SETTINGS: - case MENUPAGE_GRAPHICS_SETTINGS: + case MENUPAGE_DISPLAY_SETTINGS: case MENUPAGE_MULTIPLAYER_CREATE: case MENUPAGE_SKIN_SELECT_OLD: case MENUPAGE_CONTROLLER_PC_OLD1: @@ -856,7 +869,10 @@ CMenuManager::Draw() case MENUPAGE_CONTROLLER_PC_OLD3: case MENUPAGE_CONTROLLER_PC_OLD4: case MENUPAGE_CONTROLLER_DEBUG: - case MENUPAGE_MOUSE_CONTROLS: + case MENUPAGE_MOUSE_CONTROLS: +#ifdef GRAPHICS_MENU_OPTIONS + case MENUPAGE_GRAPHICS_SETTINGS: +#endif columnWidth = 50; headerHeight = 0; lineHeight = 20; @@ -1155,6 +1171,25 @@ 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 case MENUACTION_AUDIOHW: if (m_nPrefsAudio3DProviderIndex == -1) rightText = TheText.Get("FEA_NAH"); @@ -1205,6 +1240,11 @@ 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 CUSTOM_FRONTEND_OPTIONS case MENUACTION_TRIGGERFUNC: FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu]; @@ -1306,7 +1346,14 @@ CMenuManager::Draw() CFont::SetRightJustifyOn(); if(textLayer == 1) - if(!strcmp(aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName, "FED_RES") + 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 #ifdef CUSTOM_FRONTEND_OPTIONS || isOptionDisabled @@ -1331,6 +1378,18 @@ 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 if (m_nPrefsAudio3DProviderIndex != DMAudio.GetCurrent3DProviderIndex()) { if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEA_3DH")) SetHelperText(1); @@ -1339,6 +1398,18 @@ 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 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) { @@ -1349,11 +1420,41 @@ CMenuManager::Draw() } if (m_nDisplayVideoMode != m_nPrefsVideoMode) { if (strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FED_RES") != 0 - && m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) { +#ifdef GRAPHICS_MENU_OPTIONS + && m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) { +#else + && 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) { @@ -1419,10 +1520,13 @@ CMenuManager::Draw() switch (m_nCurrScreen) { case MENUPAGE_CONTROLLER_SETTINGS: case MENUPAGE_SOUND_SETTINGS: - case MENUPAGE_GRAPHICS_SETTINGS: + case MENUPAGE_DISPLAY_SETTINGS: case MENUPAGE_SKIN_SELECT: case MENUPAGE_CONTROLLER_PC: case MENUPAGE_MOUSE_CONTROLS: +#ifdef GRAPHICS_MENU_OPTIONS + case MENUPAGE_GRAPHICS_SETTINGS: +#endif DisplayHelperText(); break; } @@ -2079,7 +2183,7 @@ CMenuManager::DrawFrontEnd() bbNames[0] = { "FEB_SAV",MENUPAGE_NEW_GAME }; bbNames[1] = { "FEB_CON",MENUPAGE_CONTROLLER_PC }; bbNames[2] = { "FEB_AUD",MENUPAGE_SOUND_SETTINGS }; - bbNames[3] = { "FEB_DIS",MENUPAGE_GRAPHICS_SETTINGS }; + bbNames[3] = { "FEB_DIS",MENUPAGE_DISPLAY_SETTINGS }; bbNames[4] = { "FEB_LAN",MENUPAGE_LANGUAGE_SETTINGS }; bbNames[5] = { "FESZ_QU",MENUPAGE_EXIT }; bbTabCount = 6; @@ -2091,7 +2195,7 @@ CMenuManager::DrawFrontEnd() bbNames[2] = { "FEB_BRI",MENUPAGE_BRIEFS }; bbNames[3] = { "FEB_CON",MENUPAGE_CONTROLLER_PC }; bbNames[4] = { "FEB_AUD",MENUPAGE_SOUND_SETTINGS }; - bbNames[5] = { "FEB_DIS",MENUPAGE_GRAPHICS_SETTINGS }; + bbNames[5] = { "FEB_DIS",MENUPAGE_DISPLAY_SETTINGS }; bbNames[6] = { "FEB_LAN",MENUPAGE_LANGUAGE_SETTINGS }; bbNames[7] = { "FESZ_QU",MENUPAGE_EXIT }; bbTabCount = 8; @@ -2212,7 +2316,7 @@ CMenuManager::DrawFrontEndNormal() case MENUPAGE_DELETE_SLOT_CONFIRM: currentSprite = FE_ICONSAVE; break; - case MENUPAGE_GRAPHICS_SETTINGS: + case MENUPAGE_DISPLAY_SETTINGS: currentSprite = FE_ICONDISPLAY; break; case MENUPAGE_SOUND_SETTINGS: @@ -3224,6 +3328,10 @@ CMenuManager::LoadSettings() #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; #endif } } @@ -3320,6 +3428,9 @@ CMenuManager::SaveSettings() #endif #ifdef CUTSCENE_BORDERS_SWITCH CFileMgr::Write(fileHandle, (char *)&CMenuManager::m_PrefsCutsceneBorders, 1); +#endif +#ifdef MULTISAMPLING + CFileMgr::Write(fileHandle, (char *)&CMenuManager::m_nPrefsMSAALevel, 1); #endif } @@ -4638,7 +4749,27 @@ CMenuManager::ProcessButtonPresses(void) SetHelperText(0); 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 case MENUACTION_AUDIOHW: { int selectedProvider = m_nPrefsAudio3DProviderIndex; @@ -4685,7 +4816,8 @@ CMenuManager::ProcessButtonPresses(void) DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1); SaveSettings(); - } else if (m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) { +#ifndef GRAPHICS_MENU_OPTIONS + } else if (m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) { m_PrefsFrameLimiter = true; m_PrefsBrightness = 256; m_PrefsVsyncDisp = true; @@ -4706,8 +4838,40 @@ CMenuManager::ProcessButtonPresses(void) } #else CMBlur::BlurOn = true; +#endif +#ifdef CUTSCENE_BORDERS_SWITCH + m_PrefsCutsceneBorders = true; #endif 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 + SaveSettings(); +#endif // GRAPHICS_MENU_OPTIONS } else if ((m_nCurrScreen != MENUPAGE_SKIN_SELECT_OLD) && (m_nCurrScreen == MENUPAGE_CONTROLLER_PC)) { ControlsManager.MakeControllerActionsBlank(); ControlsManager.InitDefaultControlConfiguration(); @@ -4966,6 +5130,32 @@ 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 case MENUACTION_AUDIOHW: if (m_nPrefsAudio3DProviderIndex != -1) { m_nPrefsAudio3DProviderIndex += changeValueBy; @@ -5131,6 +5321,13 @@ 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 } } diff --git a/src/core/Frontend.h b/src/core/Frontend.h index 7b0e2f4b..c9af7c10 100644 --- a/src/core/Frontend.h +++ b/src/core/Frontend.h @@ -183,7 +183,7 @@ enum eMenuScreen MENUPAGE_BRIEFS = 3, MENUPAGE_CONTROLLER_SETTINGS = 4, MENUPAGE_SOUND_SETTINGS = 5, - MENUPAGE_GRAPHICS_SETTINGS = 6, + MENUPAGE_DISPLAY_SETTINGS = 6, MENUPAGE_LANGUAGE_SETTINGS = 7, MENUPAGE_CHOOSE_LOAD_SLOT = 8, MENUPAGE_CHOOSE_DELETE_SLOT = 9, @@ -238,6 +238,9 @@ enum eMenuScreen MENUPAGE_58 = 58, #ifdef MENU_MAP MENUPAGE_MAP = 59, +#endif +#ifdef GRAPHICS_MENU_OPTIONS + MENUPAGE_GRAPHICS_SETTINGS, #endif MENUPAGES }; @@ -359,6 +362,19 @@ 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 CUTSCENE_BORDERS_SWITCH + MENUACTION_CUTSCENEBORDERS, +#endif #ifdef CUSTOM_FRONTEND_OPTIONS MENUACTION_TRIGGERFUNC #endif @@ -532,6 +548,10 @@ public: int32 m_nPrefsSubsystem; int32 m_nSelectedScreenMode; #endif +#ifdef MULTISAMPLING + static int8 m_nPrefsMSAALevel; + static int8 m_nDisplayMSAALevel; +#endif enum LANGUAGE { diff --git a/src/core/MenuScreens.cpp b/src/core/MenuScreens.cpp index 4685918e..c313944c 100644 --- a/src/core/MenuScreens.cpp +++ b/src/core/MenuScreens.cpp @@ -4,6 +4,32 @@ // 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 + CMenuScreen aScreens[] = { // MENUPAGE_NONE = 0 { "", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, }, @@ -46,19 +72,35 @@ CMenuScreen aScreens[] = { MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, }, - // MENUPAGE_GRAPHICS_SETTINGS = 6 + // MENUPAGE_DISPLAY_SETTINGS = 6 +#ifndef GRAPHICS_MENU_OPTIONS { "FET_DIS", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 2, 2, - MENUACTION_BRIGHTNESS, "FED_BRI", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, - 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_SUBTITLES, "FED_SUB", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, - MENUACTION_WIDESCREEN, "FED_WIS", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, - MENUACTION_SCREENRES, "FED_RES", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, - MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, + MENUACTION_BRIGHTNESS, "FED_BRI", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, + MENUACTION_DRAWDIST, "FEM_LOD", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, + MENUACTION_FRAMESYNC, "FEM_VSC", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, + 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_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, @@ -322,7 +364,10 @@ CMenuScreen aScreens[] = { { "FET_OPT", 1, MENUPAGE_NONE, MENUPAGE_NONE, 1, 4, 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_GRAPHICS_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, @@ -446,6 +491,24 @@ CMenuScreen aScreens[] = { 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_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 }; #endif \ No newline at end of file diff --git a/src/core/config.h b/src/core/config.h index bb6adce6..081d9b39 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -209,6 +209,12 @@ enum Config { //#define USE_TEXTURE_POOL #define CUTSCENE_BORDERS_SWITCH //#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur) +#define MULTISAMPLING // adds MSAA option + +#ifdef LIBRW +// these are not supported with librw yet +# undef MULTISAMPLING +#endif // Particle //#define PC_PARTICLE @@ -233,14 +239,15 @@ enum Config { #ifndef PC_MENU # define PS2_MENU //# define PS2_MENU_USEALLPAGEICONS -#else # define PS2_SAVE_DIALOG // PS2 style save dialog with transparent black box //# define PS2_LIKE_MENU // An effort to recreate PS2 menu, cycling through tabs, different bg etc. +#else # define MENU_MAP // VC-like menu map. Make sure you have new menu.txd # define SCROLLABLE_STATS_PAGE // only draggable by mouse atm # define TRIANGLE_BACK_BUTTON //# define CIRCLE_BACK_BUTTON # define CUSTOM_FRONTEND_OPTIONS +# define GRAPHICS_MENU_OPTIONS #endif // Script diff --git a/src/core/re3.cpp b/src/core/re3.cpp index 9edd9497..dbc526dd 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -111,7 +111,7 @@ void LangJapSelect(int8 action) } #endif -#ifdef IMPROVED_VIDEOMODE +/*#ifdef IMPROVED_VIDEOMODE void ScreenModeChange(int8 displayedValue) { if (displayedValue != FrontEndMenuManager.m_nPrefsWindowed) { @@ -121,7 +121,7 @@ void ScreenModeChange(int8 displayedValue) FrontEndMenuManager.SaveSettings(); } } -#endif +#endif*/ #ifdef FREE_CAM void ToggleFreeCam(int8 action) @@ -133,13 +133,13 @@ void ToggleFreeCam(int8 action) } #endif -#ifdef CUTSCENE_BORDERS_SWITCH -void BorderModeChange(int8 displayedValue) -{ - CMenuManager::m_PrefsCutsceneBorders = !!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 void @@ -154,11 +154,11 @@ CustomFrontendOptionsPopulate(void) FrontendOptionAddDynamic(TheText.Get("FEL_JAP"), nil, LangJapSelect, nil); #endif -#ifdef IMPROVED_VIDEOMODE +/*#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 +#endif*/ #ifdef MENU_MAP FrontendOptionSetPosition(MENUPAGE_PAUSE_MENU, 2); @@ -171,11 +171,11 @@ CustomFrontendOptionsPopulate(void) FrontendOptionAddDynamic(text, nil, ToggleFreeCam, nil); #endif -#ifdef CUTSCENE_BORDERS_SWITCH +/*#ifdef CUTSCENE_BORDERS_SWITCH static const wchar *off_on[] = { TheText.Get("FEM_OFF"), TheText.Get("FEM_ON") }; - FrontendOptionSetPosition(MENUPAGE_GRAPHICS_SETTINGS, 9); + FrontendOptionSetPosition(MENUPAGE_DISPLAY_SETTINGS, 3); FrontendOptionAddSelect((const wchar *)L"CUTSCENE BORDERS", off_on, 2, (int8 *)&CMenuManager::m_PrefsCutsceneBorders, false, BorderModeChange, nil); -#endif +#endif*/ } #endif diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index a064788c..e79a8150 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -1597,7 +1597,9 @@ psSelectDevice() PSGLOBAL(fullScreen) = FALSE; #endif } - +#ifdef MULTISAMPLING + RwD3D8EngineSetMultiSamplingLevels(1 << FrontEndMenuManager.m_nPrefsMSAALevel); +#endif return TRUE; } -- cgit v1.2.3