From afed831aeda5415f1d99612d0f14541fdd34720f Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 13 Aug 2020 18:14:24 +0200 Subject: extended postfx and sniper hud fix --- src/core/Game.cpp | 4 ++++ src/core/config.h | 1 + src/core/re3.cpp | 9 +++++++++ 3 files changed, 14 insertions(+) (limited to 'src/core') diff --git a/src/core/Game.cpp b/src/core/Game.cpp index 08623c65..d5b376f6 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -87,6 +87,7 @@ #include "Zones.h" #include "debugmenu.h" #include "frontendoption.h" +#include "postfx.h" eLevelName CGame::currLevel; bool CGame::bDemoMode = true; @@ -148,6 +149,9 @@ CGame::InitialiseOnceBeforeRW(void) CFileMgr::Initialise(); CdStreamInit(MAX_CDCHANNELS); ValidateVersion(); +#ifdef EXTENDED_COLOURFILTER + CPostFX::InitOnce(); +#endif return true; } diff --git a/src/core/config.h b/src/core/config.h index 43fc54fa..bb6adce6 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -208,6 +208,7 @@ enum Config { //#define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU //#define USE_TEXTURE_POOL #define CUTSCENE_BORDERS_SWITCH +//#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur) // Particle //#define PC_PARTICLE diff --git a/src/core/re3.cpp b/src/core/re3.cpp index f9be4b51..9edd9497 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -29,6 +29,8 @@ #include "Text.h" #include "WaterLevel.h" #include "main.h" +#include "MBlur.h" +#include "postfx.h" #ifndef _WIN32 #include "assert.h" @@ -461,6 +463,13 @@ DebugMenuPopulate(void) DebugMenuAddVarBool8("Render", "Frame limiter", &FrontEndMenuManager.m_PrefsFrameLimiter, nil); DebugMenuAddVarBool8("Render", "VSynch", &FrontEndMenuManager.m_PrefsVsync, nil); DebugMenuAddVar("Render", "Max FPS", &RsGlobal.maxFPS, nil, 1, 1, 1000, nil); +#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); + DebugMenuEntrySetWrap(e, true); + DebugMenuAddVar("Render", "Intensity", &CPostFX::Intensity, nil, 0.05f, 0, 10.0f); + DebugMenuAddVarBool8("Render", "Motion Blur", &CPostFX::MotionBlurOn, nil); +#endif DebugMenuAddVarBool8("Render", "Show Ped Paths", &gbShowPedPaths, nil); DebugMenuAddVarBool8("Render", "Show Car Paths", &gbShowCarPaths, nil); DebugMenuAddVarBool8("Render", "Show Car Path Links", &gbShowCarPathsLinks, nil); -- cgit v1.2.3