diff options
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/2dEffect.h | 6 | ||||
-rw-r--r-- | src/render/Clouds.cpp | 15 | ||||
-rw-r--r-- | src/render/MBlur.cpp | 12 | ||||
-rw-r--r-- | src/render/Rubbish.cpp | 12 | ||||
-rw-r--r-- | src/render/Skidmarks.cpp | 9 | ||||
-rw-r--r-- | src/render/SpecialFX.cpp | 6 |
6 files changed, 54 insertions, 6 deletions
diff --git a/src/render/2dEffect.h b/src/render/2dEffect.h index 62216bca..b0615e4d 100644 --- a/src/render/2dEffect.h +++ b/src/render/2dEffect.h @@ -76,8 +76,14 @@ public: if(type == EFFECT_LIGHT){ if(light.corona) RwTextureDestroy(light.corona); +#ifdef GTA3_1_1_PATCH + light.corona = nil; +#endif if(light.shadow) RwTextureDestroy(light.shadow); +#ifdef GTA3_1_1_PATCH + light.shadow = nil; +#endif } } }; diff --git a/src/render/Clouds.cpp b/src/render/Clouds.cpp index cb08a997..07688491 100644 --- a/src/render/Clouds.cpp +++ b/src/render/Clouds.cpp @@ -44,10 +44,25 @@ void CClouds::Shutdown(void) { RwTextureDestroy(gpCloudTex[0]); +#ifdef GTA3_1_1_PATCH + gpCloudTex[0] = nil; +#endif RwTextureDestroy(gpCloudTex[1]); +#ifdef GTA3_1_1_PATCH + gpCloudTex[1] = nil; +#endif RwTextureDestroy(gpCloudTex[2]); +#ifdef GTA3_1_1_PATCH + gpCloudTex[2] = nil; +#endif RwTextureDestroy(gpCloudTex[3]); +#ifdef GTA3_1_1_PATCH + gpCloudTex[3] = nil; +#endif RwTextureDestroy(gpCloudTex[4]); +#ifdef GTA3_1_1_PATCH + gpCloudTex[4] = nil; +#endif } void diff --git a/src/render/MBlur.cpp b/src/render/MBlur.cpp index c3a25bce..68ec1194 100644 --- a/src/render/MBlur.cpp +++ b/src/render/MBlur.cpp @@ -58,13 +58,13 @@ CMBlur::CreateImmediateModeData(RwCamera *cam, RwRect *rect) float zero, xmax, ymax; if(RwRasterGetDepth(RwCameraGetRaster(cam)) == 16){ - zero = 0.5f; - xmax = rect->w + 0.5f; - ymax = rect->h + 0.5f; + zero = HALFPX; + xmax = rect->w + HALFPX; + ymax = rect->h + HALFPX; }else{ - zero = -0.5f; - xmax = rect->w - 0.5f; - ymax = rect->h - 0.5f; + zero = -HALFPX; + xmax = rect->w - HALFPX; + ymax = rect->h - HALFPX; } RwIm2DVertexSetScreenX(&Vertex[0], zero); diff --git a/src/render/Rubbish.cpp b/src/render/Rubbish.cpp index d21dd558..bfd50c07 100644 --- a/src/render/Rubbish.cpp +++ b/src/render/Rubbish.cpp @@ -414,7 +414,19 @@ void CRubbish::Shutdown(void) { RwTextureDestroy(gpRubbishTexture[0]); +#ifdef GTA3_1_1_PATCH + gpRubbishTexture[0] = nil; +#endif RwTextureDestroy(gpRubbishTexture[1]); +#ifdef GTA3_1_1_PATCH + gpRubbishTexture[1] = nil; +#endif RwTextureDestroy(gpRubbishTexture[2]); +#ifdef GTA3_1_1_PATCH + gpRubbishTexture[2] = nil; +#endif RwTextureDestroy(gpRubbishTexture[3]); +#ifdef GTA3_1_1_PATCH + gpRubbishTexture[3] = nil; +#endif } diff --git a/src/render/Skidmarks.cpp b/src/render/Skidmarks.cpp index f3479536..5d521041 100644 --- a/src/render/Skidmarks.cpp +++ b/src/render/Skidmarks.cpp @@ -54,8 +54,17 @@ void CSkidmarks::Shutdown(void) { RwTextureDestroy(gpSkidTex); +#ifdef GTA3_1_1_PATCH + gpSkidTex = nil; +#endif RwTextureDestroy(gpSkidBloodTex); +#ifdef GTA3_1_1_PATCH + gpSkidBloodTex = nil; +#endif RwTextureDestroy(gpSkidMudTex); +#ifdef GTA3_1_1_PATCH + gpSkidMudTex = nil; +#endif } void diff --git a/src/render/SpecialFX.cpp b/src/render/SpecialFX.cpp index fc081fa3..7e08fbad 100644 --- a/src/render/SpecialFX.cpp +++ b/src/render/SpecialFX.cpp @@ -298,6 +298,12 @@ void CBulletTraces::Render(void) if (!aTraces[i].m_bInUse) continue; RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE); +#ifdef FIX_BUGS + // Raster has no transparent pixels so it relies on the raster format having alpha + // to turn on blending. librw image conversion might get rid of it right now so let's + // just force it on. + RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); +#endif RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDONE); RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDONE); RwRenderStateSet(rwRENDERSTATETEXTURERASTER, RwTextureGetRaster(gpShadowExplosionTex)); |