This commit is contained in:
aap 2020-06-29 12:12:52 +02:00
parent 7b22b7e2af
commit b072cbca93
2 changed files with 8 additions and 8 deletions

View File

@ -188,31 +188,31 @@ CMBlur::CreateImmediateModeData(RwCamera *cam, RwRect *rect)
} }
void void
CMBlur::MotionBlurRender(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blur, int32 type, uint32 addalpha) CMBlur::MotionBlurRender(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blur, int32 type, uint32 bluralpha)
{ {
RwRGBA color = { (RwUInt8)red, (RwUInt8)green, (RwUInt8)blue, (RwUInt8)blur }; RwRGBA color = { (RwUInt8)red, (RwUInt8)green, (RwUInt8)blue, (RwUInt8)blur };
#ifdef GTA_PS2 #ifdef GTA_PS2
if( pFrontBuffer ) if( pFrontBuffer )
OverlayRender(cam, pFrontBuffer, color, type, addalpha); OverlayRender(cam, pFrontBuffer, color, type, bluralpha);
#else #else
if(BlurOn){ if(BlurOn){
if(pFrontBuffer){ if(pFrontBuffer){
if(ms_bJustInitialised) if(ms_bJustInitialised)
ms_bJustInitialised = false; ms_bJustInitialised = false;
else else
OverlayRender(cam, pFrontBuffer, color, type, addalpha); OverlayRender(cam, pFrontBuffer, color, type, bluralpha);
} }
RwRasterPushContext(pFrontBuffer); RwRasterPushContext(pFrontBuffer);
RwRasterRenderFast(RwCameraGetRaster(cam), 0, 0); RwRasterRenderFast(RwCameraGetRaster(cam), 0, 0);
RwRasterPopContext(); RwRasterPopContext();
}else{ }else{
OverlayRender(cam, nil, color, type, addalpha); OverlayRender(cam, nil, color, type, bluralpha);
} }
#endif #endif
} }
void void
CMBlur::OverlayRender(RwCamera *cam, RwRaster *raster, RwRGBA color, int32 type, uint32 addalpha) CMBlur::OverlayRender(RwCamera *cam, RwRaster *raster, RwRGBA color, int32 type, int32 bluralpha)
{ {
int r, g, b, a; int r, g, b, a;
@ -281,7 +281,7 @@ CMBlur::OverlayRender(RwCamera *cam, RwRaster *raster, RwRGBA color, int32 type,
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA); RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
RwIm2DRenderIndexedPrimitive(rwPRIMTYPETRILIST, Vertex, 4, Index, 6); RwIm2DRenderIndexedPrimitive(rwPRIMTYPETRILIST, Vertex, 4, Index, 6);
a = addalpha/2; a = bluralpha/2;
if(a < 30) if(a < 30)
a = 30; a = 30;

View File

@ -12,6 +12,6 @@ public:
static RwBool MotionBlurOpen(RwCamera *cam); static RwBool MotionBlurOpen(RwCamera *cam);
static RwBool MotionBlurClose(void); static RwBool MotionBlurClose(void);
static void CreateImmediateModeData(RwCamera *cam, RwRect *rect); static void CreateImmediateModeData(RwCamera *cam, RwRect *rect);
static void MotionBlurRender(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blur, int32 type, uint32 addalpha); static void MotionBlurRender(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blur, int32 type, uint32 bluralpha);
static void OverlayRender(RwCamera *cam, RwRaster *raster, RwRGBA color, int32 type, uint32 bluralpha); static void OverlayRender(RwCamera *cam, RwRaster *raster, RwRGBA color, int32 type, int32 bluralpha);
}; };