summaryrefslogtreecommitdiffstats
path: root/src/core/MenuScreensCustom.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-07-11 23:11:11 +0200
committererorcun <erorcunerorcun@hotmail.com.tr>2021-07-11 23:12:25 +0200
commit2a6f9c27578c69742be7209d749780700453c8a1 (patch)
treea4c9b38a4a9752f4ef315c3009f887e947e9b334 /src/core/MenuScreensCustom.cpp
parentAdd PED DENSITY and CAR DENSITY lines to GXT (diff)
downloadre3-2a6f9c27578c69742be7209d749780700453c8a1.tar
re3-2a6f9c27578c69742be7209d749780700453c8a1.tar.gz
re3-2a6f9c27578c69742be7209d749780700453c8a1.tar.bz2
re3-2a6f9c27578c69742be7209d749780700453c8a1.tar.lz
re3-2a6f9c27578c69742be7209d749780700453c8a1.tar.xz
re3-2a6f9c27578c69742be7209d749780700453c8a1.tar.zst
re3-2a6f9c27578c69742be7209d749780700453c8a1.zip
Diffstat (limited to 'src/core/MenuScreensCustom.cpp')
-rw-r--r--src/core/MenuScreensCustom.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/core/MenuScreensCustom.cpp b/src/core/MenuScreensCustom.cpp
index 6e23f76a..ba5a6e80 100644
--- a/src/core/MenuScreensCustom.cpp
+++ b/src/core/MenuScreensCustom.cpp
@@ -26,6 +26,9 @@
#include "ModelInfo.h"
#include "Pad.h"
#include "ControllerConfig.h"
+#include "IniFile.h"
+#include "CarCtrl.h"
+#include "Population.h"
// Menu screens array is at the bottom of the file.
@@ -63,6 +66,15 @@
#define DUALPASS_SELECTOR
#endif
+#ifdef PED_CAR_DENSITY_SLIDERS
+ // 0.2f - 3.4f makes it possible to have 1.0f somewhere inbetween
+ #define DENSITY_SLIDERS \
+ MENUACTION_CFO_SLIDER, "FEM_PED", { new CCFOSlider(&CIniFile::PedNumberMultiplier, "Display", "PedDensity", 0.2f, 3.4f, PedDensityChange) }, \
+ MENUACTION_CFO_SLIDER, "FEM_CAR", { new CCFOSlider(&CIniFile::CarNumberMultiplier, "Display", "CarDensity", 0.2f, 3.4f, CarDensityChange) },
+#else
+ #define DENSITY_SLIDERS
+#endif
+
#ifdef NO_ISLAND_LOADING
#define ISLAND_LOADING_SELECTOR MENUACTION_CFO_SELECT, "FEM_ISL", { new CCFOSelect((int8*)&CMenuManager::m_PrefsIslandLoading, "Graphics", "IslandLoading", islandLoadingOpts, ARRAY_SIZE(islandLoadingOpts), true, IslandLoadingAfterChange) },
#else
@@ -145,6 +157,9 @@ void RestoreDefDisplay(int8 action) {
#ifdef FREE_CAM
TheCamera.bFreeCam = false;
#endif
+ #ifdef PED_CAR_DENSITY_SLIDERS
+ CIniFile::LoadIniFile();
+ #endif
#ifdef GRAPHICS_MENU_OPTIONS // otherwise Frontend will handle those
CMenuManager::m_PrefsBrightness = 256;
CMenuManager::m_PrefsLOD = 1.2f;
@@ -195,6 +210,16 @@ void IslandLoadingAfterChange(int8 before, int8 after) {
}
#endif
+#ifdef PED_CAR_DENSITY_SLIDERS
+void PedDensityChange(float before, float after) {
+ CPopulation::MaxNumberOfPedsInUse = DEFAULT_MAX_NUMBER_OF_PEDS * after;
+}
+
+void CarDensityChange(float before, float after) {
+ CCarCtrl::MaxNumberOfCarsInUse = DEFAULT_MAX_NUMBER_OF_CARS * after;
+}
+#endif
+
#ifndef MULTISAMPLING
void GraphicsGoBack() {
}
@@ -437,6 +462,7 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
DUALPASS_SELECTOR
CUTSCENE_BORDERS_TOGGLE
FREE_CAM_TOGGLE
+ DENSITY_SLIDERS
POSTFX_SELECTORS
// re3.cpp inserts here pipeline selectors if neo/neo.txd exists and EXTENDED_PIPELINES defined
MENUACTION_RESTOREDEF, "FET_DEF", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
@@ -449,6 +475,7 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
MENUACTION_DRAWDIST, "FEM_LOD", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
CUTSCENE_BORDERS_TOGGLE
FREE_CAM_TOGGLE
+ DENSITY_SLIDERS
MENUACTION_SUBTITLES, "FED_SUB", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
MENUACTION_CFO_DYNAMIC, "FET_DEF", { new CCFODynamic(nil, nil, nil, nil, RestoreDefDisplay) },
MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },