[Scummvm-git-logs] scummvm master -> ad201e3b3eded4d7203bd49c4df398881b2892b5

AndywinXp noreply at scummvm.org
Sat Sep 7 14:38:50 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:
ad201e3b3e SCUMM: MONKEY1 (CD): Improve palette enhancement in room 36


Commit: ad201e3b3eded4d7203bd49c4df398881b2892b5
    https://github.com/scummvm/scummvm/commit/ad201e3b3eded4d7203bd49c4df398881b2892b5
Author: AndywinXp (andywinxp at gmail.com)
Date: 2024-09-07T16:38:44+02:00

Commit Message:
SCUMM: MONKEY1 (CD): Improve palette enhancement in room 36

Also make it the default on Mac, which is how it should be in the original.

Changed paths:
    engines/scumm/gfx.cpp
    engines/scumm/room.cpp


diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 8274454fec2..0e9c496bdc7 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -2478,34 +2478,6 @@ bool Gdi::drawStrip(byte *dstPtr, VirtScreen *vs, int x, int y, const int width,
 			_roomPalette[13] = 80;
 	}
 
-	// WORKAROUND: In the CD version of MI1, the sign about how the dogs
-	// are only sleeping has a dark blue background instead of white. This
-	// makes the sign harder to read, so temporarily remap the color while
-	// drawing it. The text is also slightly different, but that is taken
-	// care of in ScummEngine_v5::decodeParseString().
-	//
-	// The SEGA CD version uses the old colors already, and the FM Towns
-	// version makes the text more readable by giving it a black outline.
-	// The Macintosh release fixes the background color, but not through
-	// its scripts, apparently (was it done in its interpreter?).
-
-	else if (_vm->_game.id == GID_MONKEY &&
-			!(_vm->_game.features & GF_ULTIMATE_TALKIE) &&
-			_vm->_game.platform != Common::kPlatformSegaCD &&
-			_vm->_game.platform != Common::kPlatformFMTowns &&
-			_vm->_currentRoom == 36 &&
-			vs->number == kMainVirtScreen &&
-			y == 8 && x >= 7 && x <= 30 && height == 88 &&
-			(_vm->enhancementEnabled(kEnhVisualChanges) ||
-			_vm->_game.platform == Common::kPlatformMacintosh)) {
-		_roomPalette[47] = 15;
-
-		byte result = decompressBitmap(dstPtr, vs->pitch, smap_ptr + offset, height);
-
-		_roomPalette[47] = 47;
-		return result;
-	}
-
 	// WORKAROUND: In the French VGA floppy version of MI1, the easter egg
 	// poking fun at Sierra has a dark blue background instead of white,
 	// which causes similar legibility issues (the other VGA floppy
diff --git a/engines/scumm/room.cpp b/engines/scumm/room.cpp
index 170d4896764..67b26d22c11 100644
--- a/engines/scumm/room.cpp
+++ b/engines/scumm/room.cpp
@@ -126,6 +126,30 @@ void ScummEngine::startScene(int room, Actor *a, int objectNr) {
 		if (_game.features & GF_SMALL_HEADER)
 			setDirtyColors(0, 255);
 	}
+	
+	// WORKAROUND: In the CD version of MI1 a certain palette slot (47)
+	// points to a dark blue color in room 36 (the Marley Mansion outside view).
+	// The same palette slot points to white in the Floppy VGA version.
+	// 
+	// This is believed to be an oversight in the scripts/datafiles, as it affects:
+	// - The "Important Notice" sign about how the dogs are only sleeping.
+	// - The color of some of the stars in the sky.
+	//
+	// It has been noted that the Mac version apparently fixes that on the fly
+	// within the interpreter, so we do that as well if kEnhVisualChanges is active.
+	// 
+	// The SEGA CD version points to the correct color, and the FM Towns
+	// version makes the text more readable by giving it a black outline.
+	// The Ultimate Talkie version already takes care of that within the data files.
+
+	bool canChangeMonkey1PaletteSlot = _game.platform == Common::kPlatformMacintosh;
+
+	canChangeMonkey1PaletteSlot |= enhancementEnabled(kEnhVisualChanges) &&
+		(_game.platform != Common::kPlatformSegaCD && _game.platform != Common::kPlatformFMTowns &&
+		!(_game.features & GF_ULTIMATE_TALKIE));
+
+	if (_game.id == GID_MONKEY && room == 36 && canChangeMonkey1PaletteSlot)
+		_roomPalette[47] = 15;
 
 	VAR(VAR_ROOM) = room;
 	_fullRedraw = true;




More information about the Scummvm-git-logs mailing list