summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-11 14:33:50 +0200
committerSergeanur <s.anureev@yandex.ua>2021-08-12 10:39:34 +0200
commitce78081a7f61fed79281fa252da6f29d9f1030dc (patch)
treed07c8d9eed074a2c41898eb9cd28ed8f960e1171 /src/core
parentAdd define to enable/disable external 3d audio simulation (diff)
downloadre3-ce78081a7f61fed79281fa252da6f29d9f1030dc.tar
re3-ce78081a7f61fed79281fa252da6f29d9f1030dc.tar.gz
re3-ce78081a7f61fed79281fa252da6f29d9f1030dc.tar.bz2
re3-ce78081a7f61fed79281fa252da6f29d9f1030dc.tar.lz
re3-ce78081a7f61fed79281fa252da6f29d9f1030dc.tar.xz
re3-ce78081a7f61fed79281fa252da6f29d9f1030dc.tar.zst
re3-ce78081a7f61fed79281fa252da6f29d9f1030dc.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Frontend.cpp2
-rw-r--r--src/core/MenuScreens.cpp2
-rw-r--r--src/core/MenuScreensCustom.cpp2
-rw-r--r--src/core/config.h10
-rw-r--r--src/core/re3.cpp4
5 files changed, 19 insertions, 1 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 8358298f..62c16cd9 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -447,7 +447,7 @@ 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 if (ScreenHasOption(m_nCurrScreen, "FEA_RSS")) {
#else
} else if (m_nCurrScreen == MENUPAGE_SOUND_SETTINGS) {
#endif
diff --git a/src/core/MenuScreens.cpp b/src/core/MenuScreens.cpp
index 3bd9adf4..0a149f27 100644
--- a/src/core/MenuScreens.cpp
+++ b/src/core/MenuScreens.cpp
@@ -40,8 +40,10 @@ CMenuScreen aScreens[MENUPAGES] = {
{ "FET_AUD", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 1, 1,
MENUACTION_MUSICVOLUME, "FEA_MUS", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
MENUACTION_SFXVOLUME, "FEA_SFX", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
+#ifdef EXTERNAL_3D_SOUND
MENUACTION_AUDIOHW, "FEA_3DH", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
MENUACTION_SPEAKERCONF, "FEA_SPK", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
+#endif
MENUACTION_DYNAMICACOUSTIC, "FET_DAM", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
MENUACTION_RADIO, "FEA_RSS", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
diff --git a/src/core/MenuScreensCustom.cpp b/src/core/MenuScreensCustom.cpp
index 033ed9b9..c22b2e3a 100644
--- a/src/core/MenuScreensCustom.cpp
+++ b/src/core/MenuScreensCustom.cpp
@@ -435,8 +435,10 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
{ "FET_AUD", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, nil, nil,
MENUACTION_MUSICVOLUME, "FEA_MUS", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
MENUACTION_SFXVOLUME, "FEA_SFX", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
+#ifdef EXTERNAL_3D_SOUND
MENUACTION_AUDIOHW, "FEA_3DH", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
MENUACTION_SPEAKERCONF, "FEA_SPK", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
+#endif
MENUACTION_DYNAMICACOUSTIC, "FET_DAM", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
MENUACTION_RADIO, "FEA_RSS", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
MENUACTION_RESTOREDEF, "FET_DEF", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
diff --git a/src/core/config.h b/src/core/config.h
index 21a8b738..782ad99f 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -166,6 +166,7 @@ enum Config {
# define ANIM_COMPRESSION
# define PS2_MENU
#elif defined GTA_PC
+# define EXTERNAL_3D_SOUND
# define PC_PLAYER_CONTROLS // mouse player/cam mode
# define GTA_REPLAY
# define GTA_SCENE_EDIT
@@ -420,6 +421,8 @@ enum Config {
#define FREE_CAM // Rotating cam
// Audio
+#define EXTERNAL_3D_SOUND // use external engine to simulate 3d audio spatialization. OpenAL would not work without it (because it works in a 3d space
+ // originally and making it work in 2d only requires more resource). Will not work on PS2
#define RADIO_SCROLL_TO_PREV_STATION
#define AUDIO_CACHE
#define PS2_AUDIO_CHANNELS // increases the maximum number of audio channels to PS2 value of 44 (PC has 28 originally)
@@ -466,3 +469,10 @@ enum Config {
#endif
#endif // VANILLA_DEFINES
+
+#if defined(AUDIO_OAL) && !defined(EXTERNAL_3D_SOUND)
+static_assert(false, "AUDIO_OAL cannot work without EXTERNAL_3D_SOUND");
+#endif
+#if defined(GTA_PS2) && defined(EXTERNAL_3D_SOUND)
+static_assert(false, "EXTERNAL_3D_SOUND cannot work on PS2");
+#endif
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index b7d89363..4914cd9c 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -493,8 +493,10 @@ bool LoadINISettings()
ReadIniIfExists("Audio", "SfxVolume", &FrontEndMenuManager.m_PrefsSfxVolume);
ReadIniIfExists("Audio", "MusicVolume", &FrontEndMenuManager.m_PrefsMusicVolume);
ReadIniIfExists("Audio", "Radio", &FrontEndMenuManager.m_PrefsRadioStation);
+#ifdef EXTERNAL_3D_SOUND
ReadIniIfExists("Audio", "SpeakerType", &FrontEndMenuManager.m_PrefsSpeakers);
ReadIniIfExists("Audio", "Provider", &FrontEndMenuManager.m_nPrefsAudio3DProviderIndex);
+#endif
ReadIniIfExists("Audio", "DynamicAcoustics", &FrontEndMenuManager.m_PrefsDMA);
ReadIniIfExists("Display", "Brightness", &FrontEndMenuManager.m_PrefsBrightness);
ReadIniIfExists("Display", "DrawDistance", &FrontEndMenuManager.m_PrefsLOD);
@@ -593,8 +595,10 @@ void SaveINISettings()
StoreIni("Audio", "SfxVolume", FrontEndMenuManager.m_PrefsSfxVolume);
StoreIni("Audio", "MusicVolume", FrontEndMenuManager.m_PrefsMusicVolume);
StoreIni("Audio", "Radio", FrontEndMenuManager.m_PrefsRadioStation);
+#ifdef EXTERNAL_3D_SOUND
StoreIni("Audio", "SpeakerType", FrontEndMenuManager.m_PrefsSpeakers);
StoreIni("Audio", "Provider", FrontEndMenuManager.m_nPrefsAudio3DProviderIndex);
+#endif
StoreIni("Audio", "DynamicAcoustics", FrontEndMenuManager.m_PrefsDMA);
StoreIni("Display", "Brightness", FrontEndMenuManager.m_PrefsBrightness);
StoreIni("Display", "DrawDistance", FrontEndMenuManager.m_PrefsLOD);