[Scummvm-git-logs] scummvm master -> 98f242a7b72d5049dbc084f8e3518b7f5b92c13f

AndywinXp noreply at scummvm.org
Fri Jul 5 21:36:53 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:
98f242a7b7 SCUMM: SPYFOX3: Fix unreadable numbers in minigame


Commit: 98f242a7b72d5049dbc084f8e3518b7f5b92c13f
    https://github.com/scummvm/scummvm/commit/98f242a7b72d5049dbc084f8e3518b7f5b92c13f
Author: AndywinXp (andywinxp at gmail.com)
Date: 2024-07-05T23:36:46+02:00

Commit Message:
SCUMM: SPYFOX3: Fix unreadable numbers in minigame

This closes ticket #6712:
"SCUMM/HE: SPYFOX3 - Text drawing
glitch in "Radioactive Trash Collector""

HE100 (and a very late version of HE99) uses different
flags for drawBox color modes. Incidentally, the target
color (light gray) used for the background on which
text is rendered managed to trigger a different mode,
hence the text never being removed.

Changed paths:
    engines/scumm/gfx.cpp


diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 9e3c10a42de..0addb4e3568 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -1542,12 +1542,16 @@ void ScummEngine::drawBox(int x, int y, int x2, int y2, int color) {
 		}
 	} else if (_game.heversion >= 72) {
 		// Flags are used for different methods in HE games
+		uint32 colorToBack         = (!(_game.heversion > 99 || _isHE995)) ? 0x8000 : 0x1000000;
+		uint32 colorCopyForeToBack = (!(_game.heversion > 99 || _isHE995)) ? 0x4000 : 0x2000000;
+		uint32 colorCopyBackToFore = (!(_game.heversion > 99 || _isHE995)) ? 0x2000 : 0x4000000;
+
 		uint32 flags = color;
-		if ((flags & 0x2000) || (flags & 0x4000000)) {
+		if (flags & colorCopyBackToFore) {
 			blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height, vs->format.bytesPerPixel);
-		} else if ((flags & 0x4000) || (flags & 0x2000000)) {
+		} else if (flags & colorCopyForeToBack) {
 			blit(bgbuff, vs->pitch, backbuff, vs->pitch, width, height, vs->format.bytesPerPixel);
-		} else if ((flags & 0x8000) || (flags & 0x1000000)) {
+		} else if (flags & colorToBack) {
 			flags &= (flags & 0x1000000) ? 0xFFFFFF : 0x7FFF;
 			fill(backbuff, vs->pitch, flags, width, height, vs->format.bytesPerPixel);
 			fill(bgbuff, vs->pitch, flags, width, height, vs->format.bytesPerPixel);




More information about the Scummvm-git-logs mailing list