From 4ae1728633fc4a36e2eb5f7574e2ee661697ad51 Mon Sep 17 00:00:00 2001 From: Justin Marshall Date: Sat, 6 Jun 2020 17:28:50 -0700 Subject: [PATCH] Fixed Linear_Scale_To_Linear not handling transparent pixels. --- REDALERT/WIN32LIB/DrawMisc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/REDALERT/WIN32LIB/DrawMisc.cpp b/REDALERT/WIN32LIB/DrawMisc.cpp index 8ef56fa..b800ac5 100644 --- a/REDALERT/WIN32LIB/DrawMisc.cpp +++ b/REDALERT/WIN32LIB/DrawMisc.cpp @@ -1882,7 +1882,8 @@ void Nearest_CopyImage(byte* source, int sourceX, int sourceY, int sourceWidth, int destPos = (destWidth * (_y + (destY))) + (_x + (destX)); int sourcePos = (sourceWidth * (_y + (sourceY))) + (_x + (sourceX)); - dest[destPos] = source[sourcePos]; + if(source[sourcePos] != 0) + dest[destPos] = source[sourcePos]; } } }