summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-01-10 19:45:58 +0100
committeraap <aap@papnet.eu>2021-01-10 19:45:58 +0100
commit93ea98520bb652095c9f09ed5032842963e2a86c (patch)
tree28f7839aa1b94bcddc8f7c5eeb76f01b50cdadd0 /src/core
parentFix linux build (diff)
downloadre3-93ea98520bb652095c9f09ed5032842963e2a86c.tar
re3-93ea98520bb652095c9f09ed5032842963e2a86c.tar.gz
re3-93ea98520bb652095c9f09ed5032842963e2a86c.tar.bz2
re3-93ea98520bb652095c9f09ed5032842963e2a86c.tar.lz
re3-93ea98520bb652095c9f09ed5032842963e2a86c.tar.xz
re3-93ea98520bb652095c9f09ed5032842963e2a86c.tar.zst
re3-93ea98520bb652095c9f09ed5032842963e2a86c.zip
Diffstat (limited to '')
-rw-r--r--src/core/Frontend.cpp23
-rw-r--r--src/core/re3.cpp9
2 files changed, 25 insertions, 7 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 11488aec..e0428fcf 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -58,6 +58,19 @@ const CRGBA RADIO_SELECTOR_COLOR = SLIDEROFF_COLOR;
const CRGBA INACTIVE_RADIO_COLOR(100, 100, 255, 100);
const CRGBA SCROLLBAR_COLOR = LABEL_COLOR;
+#if 0
+// Mobile
+#define DEFAULT_BRIGHTNESS 0x150
+#define MIN_BRIGHTNESS 180
+#define MAX_BRIGHTNESS 700
+#else
+// PS2
+// 8 bars (32 step)
+#define DEFAULT_BRIGHTNESS 0x120
+#define MIN_BRIGHTNESS 0x80
+#define MAX_BRIGHTNESS 0x180
+#endif
+
#define MAP_MIN_SIZE 162.f
#define MAP_SIZE_TO_ALLOW_X_MOVE 297.f
@@ -465,7 +478,7 @@ CMenuManager::CMenuManager()
m_PrefsMusicVolume = 49;
m_PrefsRadioStation = 0;
m_PrefsStereoMono = 1;
- m_PrefsBrightness = 256;
+ m_PrefsBrightness = DEFAULT_BRIGHTNESS;
m_PrefsLOD = CRenderer::ms_lodDistScale;
m_KeyPressedCode = -1;
m_bFrontEnd_ReloadObrTxtGxt = false;
@@ -674,8 +687,8 @@ CMenuManager::CheckSliderMovement(int value)
{
switch (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action) {
case MENUACTION_BRIGHTNESS:
- m_PrefsBrightness += value * 24.19f;
- m_PrefsBrightness = clamp(m_PrefsBrightness, 0, 384);
+ m_PrefsBrightness += value * 32.0f;
+ m_PrefsBrightness = clamp(m_PrefsBrightness, MIN_BRIGHTNESS, MAX_BRIGHTNESS);
break;
case MENUACTION_DRAWDIST:
if(value > 0)
@@ -1464,7 +1477,7 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
int lastActiveBarX;
switch (aScreens[m_nCurrScreen].m_aEntries[i].m_Action) {
case MENUACTION_BRIGHTNESS:
- ProcessSlider(m_PrefsBrightness / 384.0f, 70.0f, HOVEROPTION_INCREASE_BRIGHTNESS, HOVEROPTION_DECREASE_BRIGHTNESS, SCREEN_WIDTH, true);
+ ProcessSlider((float)(m_PrefsBrightness - MIN_BRIGHTNESS) / (MAX_BRIGHTNESS - MIN_BRIGHTNESS), 70.0f, HOVEROPTION_INCREASE_BRIGHTNESS, HOVEROPTION_DECREASE_BRIGHTNESS, SCREEN_WIDTH, true);
break;
case MENUACTION_DRAWDIST:
ProcessSlider((m_PrefsLOD - 0.925f) / 0.875f, 99.0f, HOVEROPTION_INCREASE_DRAWDIST, HOVEROPTION_DECREASE_DRAWDIST, SCREEN_WIDTH, true);
@@ -4736,7 +4749,7 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
SaveSettings();
} else if (m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) {
- m_PrefsBrightness = 256;
+ m_PrefsBrightness = DEFAULT_BRIGHTNESS;
m_PrefsLOD = 1.2f;
#ifdef LEGACY_MENU_OPTIONS
m_PrefsVsync = true;
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 53a4396d..58d8cc6b 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -600,6 +600,7 @@ DebugMenuPopulate(void)
DebugMenuAddCmd("Spawn", "Spawn Freeway", [](){ SpawnCar(MI_FREEWAY); });
DebugMenuAddVarBool8("Render", "Draw hud", &CHud::m_Wants_To_Draw_Hud, nil);
+ DebugMenuAddVar("Render", "Brightness", &FrontEndMenuManager.m_PrefsBrightness, nil, 16, 0, 700, nil);
DebugMenuAddVarBool8("Render", "Backface Culling", &gBackfaceCulling, nil);
DebugMenuAddVarBool8("Render", "PS2 Alpha test Emu", &gPS2alphaTest, nil);
DebugMenuAddVarBool8("Render", "Frame limiter", &FrontEndMenuManager.m_PrefsFrameLimiter, nil);
@@ -630,8 +631,8 @@ extern bool gbRenderWorld2;
#endif
#ifdef EXTENDED_COLOURFILTER
- static const char *filternames[] = { "None", "Simple", "Normal", "Mobile" };
- e = DebugMenuAddVar("Render", "Colourfilter", &CPostFX::EffectSwitch, nil, 1, CPostFX::POSTFX_OFF, CPostFX::POSTFX_MOBILE, filternames);
+ static const char *filternames[] = { "None", "PS2" };
+ e = DebugMenuAddVar("Render", "Colourfilter", &CPostFX::EffectSwitch, nil, 1, CPostFX::POSTFX_OFF, CPostFX::POSTFX_NORMAL, filternames);
DebugMenuEntrySetWrap(e, true);
DebugMenuAddVar("Render", "Intensity", &CPostFX::Intensity, nil, 0.05f, 0, 10.0f);
DebugMenuAddVarBool8("Render", "Blur", &CPostFX::BlurOn, nil);
@@ -642,6 +643,10 @@ extern bool gbRenderWorld2;
DebugMenuAddVarBool8("Render", "Occlusion debug", &bDispayOccDebugStuff, nil);
#endif
#ifdef EXTENDED_PIPELINES
+ static const char *worldpipenames[] = { "PS2", "Mobile" };
+ e = DebugMenuAddVar("Render", "World Rendering", &CustomPipes::WorldPipeSwitch, nil,
+ 1, CustomPipes::WORLDPIPE_PS2, CustomPipes::WORLDPIPE_MOBILE, worldpipenames);
+ DebugMenuEntrySetWrap(e, true);
static const char *vehpipenames[] = { "MatFX", "Neo" };
e = DebugMenuAddVar("Render", "Vehicle Pipeline", &CustomPipes::VehiclePipeSwitch, nil,
1, CustomPipes::VEHICLEPIPE_MATFX, CustomPipes::VEHICLEPIPE_NEO, vehpipenames);