summaryrefslogtreecommitdiffstats
path: root/src/render/MBlur.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-08-15 17:56:52 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-08-15 17:56:52 +0200
commit1d5e3c74256038c763bbe8d1369715bc47f99dd8 (patch)
treeee2a1dac538b95ddb92d7744a6821917e7dd3056 /src/render/MBlur.cpp
parentsubmodules (diff)
parentDon't react if player's targeting with melee (diff)
downloadre3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.gz
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.bz2
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.lz
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.xz
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.zst
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.zip
Diffstat (limited to 'src/render/MBlur.cpp')
-rw-r--r--src/render/MBlur.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/render/MBlur.cpp b/src/render/MBlur.cpp
index ec811e56..de15358e 100644
--- a/src/render/MBlur.cpp
+++ b/src/render/MBlur.cpp
@@ -10,6 +10,7 @@
#include "RwHelper.h"
#include "Camera.h"
#include "MBlur.h"
+#include "postfx.h"
// Originally taken from RW example 'mblur'
@@ -27,6 +28,10 @@ extern "C" D3DCAPS8 _RwD3D8DeviceCaps;
RwBool
CMBlur::MotionBlurOpen(RwCamera *cam)
{
+#ifdef EXTENDED_COLOURFILTER
+ CPostFX::Open(cam);
+ return TRUE;
+#else
#ifdef GTA_PS2
RwRect rect = {0, 0, 0, 0};
@@ -127,18 +132,22 @@ CMBlur::MotionBlurOpen(RwCamera *cam)
return TRUE;
#endif
+#endif
}
RwBool
CMBlur::MotionBlurClose(void)
{
+#ifdef EXTENDED_COLOURFILTER
+ CPostFX::Close();
+#else
if(pFrontBuffer){
RwRasterDestroy(pFrontBuffer);
pFrontBuffer = nil;
return TRUE;
}
-
+#endif
return FALSE;
}
@@ -192,12 +201,14 @@ CMBlur::CreateImmediateModeData(RwCamera *cam, RwRect *rect)
RwIm2DVertexSetU(&Vertex[3], 1.0f, 1.0f/RwCameraGetNearClipPlane(cam));
RwIm2DVertexSetV(&Vertex[3], 0.0f, 1.0f/RwCameraGetNearClipPlane(cam));
RwIm2DVertexSetIntRGBA(&Vertex[3], 255, 255, 255, 255);
-
}
void
CMBlur::MotionBlurRender(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blur, int32 type, uint32 bluralpha)
{
+#ifdef EXTENDED_COLOURFILTER
+ CPostFX::Render(cam, red, green, blue, blur, type, bluralpha);
+#else
RwRGBA color = { (RwUInt8)red, (RwUInt8)green, (RwUInt8)blue, (RwUInt8)blur };
#ifdef GTA_PS2
if( pFrontBuffer )
@@ -217,6 +228,7 @@ CMBlur::MotionBlurRender(RwCamera *cam, uint32 red, uint32 green, uint32 blue, u
OverlayRender(cam, nil, color, type, bluralpha);
}
#endif
+#endif
}
void