summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-05-01 20:08:39 +0200
committereray orçunus <erayorcunus@gmail.com>2020-05-01 20:16:02 +0200
commit97b288c1e44902d7bcae575c0c6629296735fdc4 (patch)
treedde53c00e763057e47009bcf41b42c6e31957932 /src/core
parentMerge pull request #499 from aap/master (diff)
downloadre3-97b288c1e44902d7bcae575c0c6629296735fdc4.tar
re3-97b288c1e44902d7bcae575c0c6629296735fdc4.tar.gz
re3-97b288c1e44902d7bcae575c0c6629296735fdc4.tar.bz2
re3-97b288c1e44902d7bcae575c0c6629296735fdc4.tar.lz
re3-97b288c1e44902d7bcae575c0c6629296735fdc4.tar.xz
re3-97b288c1e44902d7bcae575c0c6629296735fdc4.tar.zst
re3-97b288c1e44902d7bcae575c0c6629296735fdc4.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Frontend.cpp40
-rw-r--r--src/core/Frontend.h4
-rw-r--r--src/core/MenuScreens.h3
-rw-r--r--src/core/Radar.cpp7
4 files changed, 54 insertions, 0 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 97cb21fd..e078fe22 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -394,6 +394,9 @@ CMenuManager::ThingsToDoBeforeLeavingPage()
#endif
} else if (m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) {
m_nDisplayVideoMode = m_nPrefsVideoMode;
+#ifdef IMPROVED_VIDEOMODE
+ m_nSelectedScreenMode = m_nPrefsWindowed;
+#endif
}
if (m_nCurrScreen == MENUPAGE_SKIN_SELECT) {
@@ -1078,6 +1081,18 @@ CMenuManager::Draw()
AsciiToUnicode(_psGetVideoModeList()[m_nDisplayVideoMode], unicodeTemp);
rightText = unicodeTemp;
break;
+#ifdef IMPROVED_VIDEOMODE
+ case MENUACTION_SCREENMODE:
+ char mode[32];
+ if (m_nSelectedScreenMode == 0)
+ sprintf(mode, "FULLSCREEN");
+ else
+ sprintf(mode, "WINDOWED");
+
+ AsciiToUnicode(mode, unicodeTemp);
+ rightText = unicodeTemp;
+ break;
+#endif
case MENUACTION_AUDIOHW:
if (m_nPrefsAudio3DProviderIndex == -1)
rightText = TheText.Get("FEA_NAH");
@@ -1249,6 +1264,14 @@ CMenuManager::Draw()
SetHelperText(3);
}
}
+#ifdef IMPROVED_VIDEOMODE
+ if (m_nSelectedScreenMode != m_nPrefsWindowed) {
+ if (strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "SCRFOR") != 0
+ && m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) {
+ m_nSelectedScreenMode = m_nPrefsWindowed;
+ }
+ }
+#endif
// Sliders
int lastActiveBarX;
@@ -3060,6 +3083,7 @@ CMenuManager::LoadSettings()
m_nPrefsWindowed = 0;
m_nPrefsSubsystem = 0;
}
+ m_nSelectedScreenMode = m_nPrefsWindowed;
#else
CFileMgr::Read(fileHandle, gString, 20);
#endif
@@ -4489,6 +4513,16 @@ CMenuManager::ProcessButtonPresses(void)
SaveSettings();
}
break;
+#ifdef IMPROVED_VIDEOMODE
+ case MENUACTION_SCREENMODE:
+ if (m_nSelectedScreenMode != m_nPrefsWindowed) {
+ m_nPrefsWindowed = m_nSelectedScreenMode;
+ _psSelectScreenVM(m_nPrefsVideoMode); // apply same resolution
+ SetHelperText(0);
+ SaveSettings();
+ }
+ break;
+#endif
case MENUACTION_AUDIOHW:
{
int selectedProvider = m_nPrefsAudio3DProviderIndex;
@@ -4762,6 +4796,12 @@ CMenuManager::ProcessButtonPresses(void)
}
}
break;
+#ifdef IMPROVED_VIDEOMODE
+ case MENUACTION_SCREENMODE:
+ DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
+ m_nSelectedScreenMode = !m_nSelectedScreenMode;
+ break;
+#endif
case MENUACTION_AUDIOHW:
if (m_nPrefsAudio3DProviderIndex != -1) {
m_nPrefsAudio3DProviderIndex += changeValueBy;
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index fc2c5235..3286f275 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -371,6 +371,9 @@ enum eMenuAction
MENUACTION_LANG_RUS,
MENUACTION_LANG_JAP,
#endif
+#ifdef IMPROVED_VIDEOMODE
+ MENUACTION_SCREENMODE
+#endif
};
enum eCheckHover
@@ -539,6 +542,7 @@ public:
int32 m_nPrefsDepth;
int32 m_nPrefsWindowed;
int32 m_nPrefsSubsystem;
+ int32 m_nSelectedScreenMode;
#endif
public:
diff --git a/src/core/MenuScreens.h b/src/core/MenuScreens.h
index 3c22283d..339479b8 100644
--- a/src/core/MenuScreens.h
+++ b/src/core/MenuScreens.h
@@ -62,6 +62,9 @@ const CMenuScreen aScreens[] = {
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,
+#ifdef IMPROVED_VIDEOMODE
+ MENUACTION_SCREENMODE, "SCRFOR", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
+#endif
MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
},
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp
index 2b3e6f1e..3d1429bd 100644
--- a/src/core/Radar.cpp
+++ b/src/core/Radar.cpp
@@ -1064,6 +1064,13 @@ void CRadar::SaveAllRadarBlips(uint8 *buf, uint32 *size)
INITSAVEBUF
WriteSaveHeader(buf, 'R', 'D', 'R', '\0', *size - SAVE_HEADER_SIZE);
+#ifdef MENU_MAP
+ if (TargetMarkerId != -1) {
+ ClearBlip(TargetMarkerId);
+ TargetMarkerId = -1;
+ }
+#endif
+
for (int i = 0; i < NUMRADARBLIPS; i++)
WriteSaveBuf(buf, ms_RadarTrace[i]);