summaryrefslogtreecommitdiffstats
path: root/src/render/MBlur.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-06-20 15:23:42 +0200
committereray orçunus <erayorcunus@gmail.com>2020-06-20 15:23:42 +0200
commitfd3cd2c26ac24fc104878cf80f59518ae51d2e8d (patch)
tree90809f252c4cbb485f5df5f23c76f9f380d9a8d2 /src/render/MBlur.cpp
parentDucking, shooting vehicle occupants and weapon fixes (diff)
parentMerge pull request #636 from aap/miami (diff)
downloadre3-fd3cd2c26ac24fc104878cf80f59518ae51d2e8d.tar
re3-fd3cd2c26ac24fc104878cf80f59518ae51d2e8d.tar.gz
re3-fd3cd2c26ac24fc104878cf80f59518ae51d2e8d.tar.bz2
re3-fd3cd2c26ac24fc104878cf80f59518ae51d2e8d.tar.lz
re3-fd3cd2c26ac24fc104878cf80f59518ae51d2e8d.tar.xz
re3-fd3cd2c26ac24fc104878cf80f59518ae51d2e8d.tar.zst
re3-fd3cd2c26ac24fc104878cf80f59518ae51d2e8d.zip
Diffstat (limited to 'src/render/MBlur.cpp')
-rw-r--r--src/render/MBlur.cpp12
1 files changed, 9 insertions, 3 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;