summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-06-20 15:03:00 +0200
committerGitHub <noreply@github.com>2020-06-20 15:03:00 +0200
commit7700970c9391afe54e7bd29a1e58db8c0fa9acfd (patch)
treeaf2f64fcfcfff22150364edf1ae203bea737158e /src/render
parentfix (diff)
parentCCamera done (diff)
downloadre3-7700970c9391afe54e7bd29a1e58db8c0fa9acfd.tar
re3-7700970c9391afe54e7bd29a1e58db8c0fa9acfd.tar.gz
re3-7700970c9391afe54e7bd29a1e58db8c0fa9acfd.tar.bz2
re3-7700970c9391afe54e7bd29a1e58db8c0fa9acfd.tar.lz
re3-7700970c9391afe54e7bd29a1e58db8c0fa9acfd.tar.xz
re3-7700970c9391afe54e7bd29a1e58db8c0fa9acfd.tar.zst
re3-7700970c9391afe54e7bd29a1e58db8c0fa9acfd.zip
Diffstat (limited to 'src/render')
-rw-r--r--src/render/MBlur.cpp12
-rw-r--r--src/render/MBlur.h5
2 files changed, 12 insertions, 5 deletions
diff --git a/src/render/MBlur.cpp b/src/render/MBlur.cpp
index 9934ae18..ec99b90f 100644
--- a/src/render/MBlur.cpp
+++ b/src/render/MBlur.cpp
@@ -146,13 +146,13 @@ CMBlur::CreateImmediateModeData(RwCamera *cam, RwRect *rect)
}
void
-CMBlur::MotionBlurRender(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blur, int32 type)
+CMBlur::MotionBlurRender(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blur, int32 type, uint32 alpha)
{
RwRGBA color = { (RwUInt8)red, (RwUInt8)green, (RwUInt8)blue, (RwUInt8)blur };
if(ms_bJustInitialised)
ms_bJustInitialised = false;
else
- OverlayRender(cam, pFrontBuffer, color, type);
+ OverlayRender(cam, pFrontBuffer, color, type, alpha);
if(BlurOn){
RwRasterPushContext(pFrontBuffer);
RwRasterRenderFast(RwCameraGetRaster(cam), 0, 0);
@@ -161,7 +161,7 @@ CMBlur::MotionBlurRender(RwCamera *cam, uint32 red, uint32 green, uint32 blue, u
}
void
-CMBlur::OverlayRender(RwCamera *cam, RwRaster *raster, RwRGBA color, int32 type)
+CMBlur::OverlayRender(RwCamera *cam, RwRaster *raster, RwRGBA color, int32 type, int32 alpha)
{
int r, g, b, a;
@@ -285,6 +285,12 @@ CMBlur::OverlayRender(RwCamera *cam, RwRaster *raster, RwRGBA color, int32 type)
}
void
+CMBlur::SetDrunkBlur(float drunkness)
+{
+ Drunkness = clamp(drunkness, 0.0f, 1.0f);
+}
+
+void
CMBlur::ClearDrunkBlur()
{
Drunkness = 0.0f;
diff --git a/src/render/MBlur.h b/src/render/MBlur.h
index 5eac8dc0..ac298c22 100644
--- a/src/render/MBlur.h
+++ b/src/render/MBlur.h
@@ -22,8 +22,9 @@ public:
static void MotionBlurOpen(RwCamera *cam);
static void MotionBlurClose(void);
static void CreateImmediateModeData(RwCamera *cam, RwRect *rect);
- static void MotionBlurRender(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blur, int32 type);
- static void OverlayRender(RwCamera *cam, RwRaster *raster, RwRGBA color, int32 type);
+ static void MotionBlurRender(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blur, int32 type, uint32 alpha);
+ static void OverlayRender(RwCamera *cam, RwRaster *raster, RwRGBA color, int32 type, int32 alpha);
+ static void SetDrunkBlur(float drunkness);
static void ClearDrunkBlur();
//TODO