From 4bc76416f551253452012d28e2bc049087e2be73 Mon Sep 17 00:00:00 2001 From: Info Teddy Date: Sun, 2 Feb 2020 14:43:42 -0800 Subject: [PATCH] Fix discoloration when entities warp in flip mode In flip mode, warping entities would appear to change color for a brief moment. This is actually them defaulting to the actual color used in flipsprites.png, instead of first being whited-out and then re-colored using graphics.setcol(). To fix this, use BlitSurfaceColoured() and pass `ct` along instead of using BlitSurfaceStandard(). --- desktop_version/src/Graphics.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 678fa29d..3468ab86 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1464,7 +1464,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help drawRect = sprites_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; - BlitSurfaceStandard(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + BlitSurfaceColoured(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); } if (tpoint.x > 300) { @@ -1472,7 +1472,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help drawRect = sprites_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; - BlitSurfaceStandard(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + BlitSurfaceColoured(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); } } else if (map.warpy) @@ -1483,7 +1483,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help drawRect = sprites_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; - BlitSurfaceStandard(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + BlitSurfaceColoured(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); } if (tpoint.y > 210) { @@ -1491,7 +1491,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help drawRect = sprites_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; - BlitSurfaceStandard(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + BlitSurfaceColoured(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); } } }