summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-11-22 00:12:34 +0100
committerGitHub <noreply@github.com>2020-11-22 00:12:34 +0100
commit15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7 (patch)
tree792d26a13fb9bc1caff0012ec4ec7ba0f8f8e842 /src/core
parentno script logging (diff)
parentneo screen droplets (diff)
downloadre3-15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7.tar
re3-15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7.tar.gz
re3-15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7.tar.bz2
re3-15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7.tar.lz
re3-15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7.tar.xz
re3-15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7.tar.zst
re3-15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Game.cpp7
-rw-r--r--src/core/config.h8
-rw-r--r--src/core/main.cpp17
3 files changed, 31 insertions, 1 deletions
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index f7589d2b..1283ecd1 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -88,6 +88,7 @@
#include "debugmenu.h"
#include "postfx.h"
#include "custompipes.h"
+#include "screendroplets.h"
#include "crossplatform.h"
eLevelName CGame::currLevel;
@@ -408,6 +409,9 @@ bool CGame::Initialise(const char* datFile)
CPed::Initialise();
CRouteNode::Initialise();
CEventList::Initialise();
+#ifdef SCREEN_DROPLETS
+ ScreenDroplets::Initialise();
+#endif
LoadingScreen("Loading the Game", "Find big buildings", nil);
CRenderer::Init();
LoadingScreen("Loading the Game", "Setup game variables", nil);
@@ -559,6 +563,9 @@ void CGame::ReInitGameObjectVariables(void)
CStreaming::LoadAllRequestedModels(false);
CPed::Initialise();
CEventList::Initialise();
+#ifdef SCREEN_DROPLETS
+ ScreenDroplets::Initialise();
+#endif
CWeapon::InitialiseWeapons();
CPopulation::Initialise();
diff --git a/src/core/config.h b/src/core/config.h
index f7a3853d..6433a258 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -237,6 +237,14 @@ enum Config {
#ifdef LIBRW
//#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)
//#define EXTENDED_PIPELINES // custom render pipelines (includes Neo)
+//#define SCREEN_DROPLETS // neo water droplets
+#endif
+
+#ifndef EXTENDED_COLOURFILTER
+#undef SCREEN_DROPLETS // we need the frontbuffer for this effect
+#endif
+#ifndef EXTENDED_PIPELINES
+#undef SCREEN_DROPLETS // we need neo.txd
#endif
// Particle
diff --git a/src/core/main.cpp b/src/core/main.cpp
index 157776e0..843f0671 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -63,7 +63,9 @@
#include "SceneEdit.h"
#include "debugmenu.h"
#include "Clock.h"
+#include "postfx.h"
#include "custompipes.h"
+#include "screendroplets.h"
#include "frontendoption.h"
GlobalScene Scene;
@@ -420,6 +422,9 @@ Initialise3D(void *param)
#ifdef EXTENDED_PIPELINES
CustomPipes::CustomPipeInit(); // need Scene.world for this
#endif
+#ifdef SCREEN_DROPLETS
+ ScreenDroplets::InitDraw();
+#endif
return ret;
}
@@ -429,6 +434,9 @@ Initialise3D(void *param)
static void
Terminate3D(void)
{
+#ifdef SCREEN_DROPLETS
+ ScreenDroplets::Shutdown();
+#endif
#ifdef EXTENDED_PIPELINES
CustomPipes::CustomPipeShutdown();
#endif
@@ -1142,10 +1150,17 @@ Idle(void *arg)
RenderDebugShit();
RenderEffects();
- tbStartTimer(0, "RenderMotionBlur");
if((TheCamera.m_BlurType == MOTION_BLUR_NONE || TheCamera.m_BlurType == MOTION_BLUR_LIGHT_SCENE) &&
TheCamera.m_ScreenReductionPercentage > 0.0f)
TheCamera.SetMotionBlurAlpha(150);
+
+#ifdef SCREEN_DROPLETS
+ CPostFX::GetBackBuffer(Scene.camera);
+ ScreenDroplets::Process();
+ ScreenDroplets::Render();
+#endif
+
+ tbStartTimer(0, "RenderMotionBlur");
TheCamera.RenderMotionBlur();
tbEndTimer("RenderMotionBlur");