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

bluegr noreply at scummvm.org
Sun Jun 5 06:01:14 UTC 2022


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:
fe16115aae SCUMM: Work around lava flowing up in MONKEY1-FLOPPY-VGA (Trac#10854)


Commit: fe16115aaec61b24a5e662acfd0597a46f3f1afe
    https://github.com/scummvm/scummvm/commit/fe16115aaec61b24a5e662acfd0597a46f3f1afe
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-06-05T09:01:10+03:00

Commit Message:
SCUMM: Work around lava flowing up in MONKEY1-FLOPPY-VGA (Trac#10854)

In the floppy VGA version of Monkey Island 1 (and only this particular
version), the lava was flowing up instead of flowing down, in the cave
under the Giant Monkey Head.  This doesn't happen with the original
interpreter. ScummVM displays this effect correctly with the VGA CD
version.

This is maybe because the game uses color-cycling for this effect in
VGA, and the floppy VGA version is still a GF_SMALL_HEADER game where
we decode this effect differently, notably by always setting its
flags to 2 (and it's been this way for a very long time).

Setting the flags to 0 instead fix this effect.  We should maybe
always use this 0 value, but it seems safer to only change this value
for the lava at the moment, until some disasm confirms or disproves
the current flags value for GF_SMALL_HEADER games.

(Also fix some incoherent indentation while there.)

Changed paths:
    engines/scumm/palette.cpp


diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp
index 190f0b25414..474b692e91c 100644
--- a/engines/scumm/palette.cpp
+++ b/engines/scumm/palette.cpp
@@ -105,7 +105,7 @@ void ScummEngine::resetPalette() {
 		0x60, 0x61, 0x5F,	0x00, 0x00, 0x83,	0x1D, 0x01, 0x95,	0x34, 0x08, 0x75,
 		0x51, 0x05, 0x5E,	0x56, 0x00, 0x0F,	0x4C, 0x07, 0x00,	0x37, 0x23, 0x08,
 		0x20, 0x3A, 0x0B,	0x0F, 0x4B, 0x0E,	0x19, 0x4C, 0x16,	0x02, 0x42, 0x1E,
-		0x02, 0x31,	0x54,	0x00, 0x00, 0x00,	0x00, 0x00, 0x00,	0x00, 0x00, 0x00,
+		0x02, 0x31, 0x54,	0x00, 0x00, 0x00,	0x00, 0x00, 0x00,	0x00, 0x00, 0x00,
 
 		0xA9, 0xAA, 0xA8,	0x10, 0x4B, 0xBF,	0x47, 0x12, 0xD8,	0x63, 0x00, 0xCA,
 		0x88, 0x00, 0xA9,	0x93, 0x0B, 0x46,	0x8A, 0x2D, 0x04,	0x6F, 0x52, 0x06,
@@ -171,7 +171,7 @@ void ScummEngine::resetPalette() {
 		0x00, 0x00, 0x00,	0xFF, 0xFF, 0xFF,	0xDD, 0x00, 0x33,	0x44, 0xFF, 0x99,
 		0xDD, 0x22, 0xDD,	0x00, 0x77, 0x22,	0x00, 0x00, 0x99,	0xFF, 0xFF, 0x00,
 		0xFF, 0x66, 0x00,	0x88, 0x55, 0x00,	0xFF, 0x99, 0x88,	0x55, 0x55, 0x55,
-		0xAA, 0xAA, 0xAA,	0x11, 0xDD, 0x00,   0x22, 0x22, 0xFF,	0xAA, 0xAA, 0xAA,
+		0xAA, 0xAA, 0xAA,	0x11, 0xDD, 0x00,	0x22, 0x22, 0xFF,	0xAA, 0xAA, 0xAA,
 
 		0x7F, 0x3B, 0xA6
 	};
@@ -584,6 +584,14 @@ void ScummEngine::initCycl(const byte *ptr) {
 			cycl->counter = 0;
 			cycl->delay = 16384 / delay;
 			cycl->flags = 2;
+			// FIXME bug #10854: lava flows up instead of down in the floppy VGA version
+			// of Monkey1 if we don't do this. It's fine in the original interpreter and
+			// in the VGA CD version (which doesn't use GF_SMALL_HEADER). This is maybe
+			// meant to be always 0 for GF_SMALL_HEADER games, but until disasm confirms
+			// or disproves this, we limit this change to the lava cave (where we can see
+			// it's wrong), just in case.
+			if (_game.id == GID_MONKEY_VGA && (_roomResource == 39 || _roomResource == 65))
+				cycl->flags = 0;
 			cycl->start = start;
 			cycl->end = end;
 		}
@@ -734,7 +742,7 @@ void ScummEngine::cyclePalette() {
 				if (_shadowPalette) {
 					if (_game.version >= 7) {
 						for (j = 0; j < NUM_SHADOW_PALETTE; j++)
-						doCycleIndirectPalette(_shadowPalette + j * 256, cycl->start, cycl->end, !(cycl->flags & 2));
+							doCycleIndirectPalette(_shadowPalette + j * 256, cycl->start, cycl->end, !(cycl->flags & 2));
 					} else {
 						doCycleIndirectPalette(_shadowPalette, cycl->start, cycl->end, !(cycl->flags & 2));
 					}




More information about the Scummvm-git-logs mailing list