diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-03 20:44:18 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-03 20:44:18 +0200 |
commit | 5999ddc76d3534e04cbdf8817ad28113b81448bf (patch) | |
tree | 8e6f3c39f84d387626a677d916b58414d8951c45 /src/core/MenuScreensCustom.cpp | |
parent | Merge remote-tracking branch 'upstream/miami' into miami (diff) | |
parent | CPhysical fixes and cleanup (diff) | |
download | re3-5999ddc76d3534e04cbdf8817ad28113b81448bf.tar re3-5999ddc76d3534e04cbdf8817ad28113b81448bf.tar.gz re3-5999ddc76d3534e04cbdf8817ad28113b81448bf.tar.bz2 re3-5999ddc76d3534e04cbdf8817ad28113b81448bf.tar.lz re3-5999ddc76d3534e04cbdf8817ad28113b81448bf.tar.xz re3-5999ddc76d3534e04cbdf8817ad28113b81448bf.tar.zst re3-5999ddc76d3534e04cbdf8817ad28113b81448bf.zip |
Diffstat (limited to 'src/core/MenuScreensCustom.cpp')
-rw-r--r-- | src/core/MenuScreensCustom.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/core/MenuScreensCustom.cpp b/src/core/MenuScreensCustom.cpp index 62b1ebdb..431fd794 100644 --- a/src/core/MenuScreensCustom.cpp +++ b/src/core/MenuScreensCustom.cpp @@ -27,6 +27,9 @@ #include "Pad.h" #include "ControllerConfig.h" #include "DMAudio.h" +#include "IniFile.h" +#include "CarCtrl.h" +#include "Population.h" // Menu screens array is at the bottom of the file. @@ -64,6 +67,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) }, 0, 0, MENUALIGN_LEFT, \ + MENUACTION_CFO_SLIDER, "FEM_CAR", { new CCFOSlider(&CIniFile::CarNumberMultiplier, "Display", "CarDensity", 0.2f, 3.4f, CarDensityChange) }, 0, 0, MENUALIGN_LEFT, +#else + #define DENSITY_SLIDERS +#endif + #ifdef NO_ISLAND_LOADING #define ISLAND_LOADING_SELECTOR MENUACTION_CFO_SELECT, "FEM_ISL", { new CCFOSelect((int8*)&FrontEndMenuManager.m_PrefsIslandLoading, "Graphics", "IslandLoading", islandLoadingOpts, ARRAY_SIZE(islandLoadingOpts), true, IslandLoadingAfterChange) }, 0, 0, MENUALIGN_LEFT, #else @@ -136,6 +148,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 FrontEndMenuManager.m_PrefsBrightness = 256; FrontEndMenuManager.m_PrefsLOD = 1.2f; @@ -182,6 +197,17 @@ 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; + CPopulation::MaxNumberOfPedsInUseInterior = DEFAULT_MAX_NUMBER_OF_PEDS_INTERIOR * after; +} + +void CarDensityChange(float before, float after) { + CCarCtrl::MaxNumberOfCarsInUse = DEFAULT_MAX_NUMBER_OF_CARS * after; +} +#endif + #ifndef MULTISAMPLING void GraphicsGoBack() { } @@ -417,6 +443,7 @@ CMenuScreenCustom aScreens[] = { 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}, 320, 0, MENUALIGN_CENTER, @@ -428,6 +455,7 @@ CMenuScreenCustom aScreens[] = { MENUACTION_DRAWDIST, "FEM_LOD", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT, CUTSCENE_BORDERS_TOGGLE FREE_CAM_TOGGLE + DENSITY_SLIDERS MENUACTION_LEGENDS, "MAP_LEG", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT, MENUACTION_RADARMODE, "FED_RDR", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT, MENUACTION_HUD, "FED_HUD", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT, |