[Scummvm-git-logs] scummvm master -> 6152568af27df2ad591ee5182cc6af5c686c0df8

dreammaster noreply at scummvm.org
Sun Feb 11 05:50:03 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6152568af2 M4: Compilation fix for MIN macro usage


Commit: 6152568af27df2ad591ee5182cc6af5c686c0df8
    https://github.com/scummvm/scummvm/commit/6152568af27df2ad591ee5182cc6af5c686c0df8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-02-10T21:49:59-08:00

Commit Message:
M4: Compilation fix for MIN macro usage

Changed paths:
    engines/m4/graphics/gr_surface.cpp


diff --git a/engines/m4/graphics/gr_surface.cpp b/engines/m4/graphics/gr_surface.cpp
index 778c87ce81d..5b3484c323f 100644
--- a/engines/m4/graphics/gr_surface.cpp
+++ b/engines/m4/graphics/gr_surface.cpp
@@ -162,19 +162,19 @@ void M4Surface::drawInner(const Buffer &src, const byte *depthCodes, int x, int
 
 					// Red component
 					adjusted = (rgb & 0xff) * v;
-					adjusted = MIN(adjusted >> 8, 31U);
+					adjusted = MIN((uint)(adjusted >> 8), 31U);
 					total = adjusted << 10;
 
 					// Green component
 					rgb >>= 8;
 					adjusted = (rgb & 0xff) * v;
-					adjusted = MIN(adjusted >> 8, 31U);
+					adjusted = MIN((uint)(adjusted >> 8), 31U);
 					total |= (adjusted << 5);
 
 					// Blue component
 					rgb >>= 8;
 					adjusted = (rgb & 0xff) * v;
-					adjusted = MIN(adjusted >> 8, 31U);
+					adjusted = MIN((uint)(adjusted >> 8), 31U);
 					total |= adjusted;
 
 					// Write out pixel from inverse table




More information about the Scummvm-git-logs mailing list