[Scummvm-git-logs] scummvm master -> 2acbec5122d1e8cef695d222afa222556eab5c3b

AndywinXp noreply at scummvm.org
Thu Jun 27 18:09:20 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:
2acbec5122 SCUMM: HE: Fix black and white cursors for 16-bit games


Commit: 2acbec5122d1e8cef695d222afa222556eab5c3b
    https://github.com/scummvm/scummvm/commit/2acbec5122d1e8cef695d222afa222556eab5c3b
Author: AndywinXp (andywinxp at gmail.com)
Date: 2024-06-27T20:09:16+02:00

Commit Message:
SCUMM: HE: Fix black and white cursors for 16-bit games

Fixes a brown cursor during the strategy view
on Backyard Football 2002 which should actually
be black and white.

Changed paths:
    engines/scumm/he/wiz_he.cpp


diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp
index a4caed0dd8d..397b167f5e6 100644
--- a/engines/scumm/he/wiz_he.cpp
+++ b/engines/scumm/he/wiz_he.cpp
@@ -1152,10 +1152,17 @@ void Wiz::loadWizCursor(int resId, int palette, bool useColor) {
 	// In the original code, when useColor is false, the engine
 	// instructs the OS to set the cursor to black and white only.
 	// We obtain the same effect doing it like this...
-	if (!useColor && _vm->_bytesPerPixel == 1) {
-		for (int i = 0; i < ch * cw; i++) {
-			if (cursor[i] != 0 && cursor[i] != 5)
-				cursor[i] = 15;
+	if (!useColor) {
+		if (_vm->_bytesPerPixel == 1) {
+			for (int i = 0; i < ch * cw; i++) {
+				if (cursor[i] != 0 && cursor[i] != 5)
+					cursor[i] = 15;
+			}
+		} else {
+			for (int i = 0; i < ch * cw; i++) {
+				if (((uint16 *)cursor)[i] != 0 && ((uint16 *)cursor)[i] != 5)
+					((uint16 *)cursor)[i] = 0x7FFF;
+			}
 		}
 	}
 




More information about the Scummvm-git-logs mailing list