[Scummvm-git-logs] scummvm master -> 4248e22cbfc54c36dcc17f4d3912a5fb30a5dbc2

athrxx noreply at scummvm.org
Wed Aug 3 15:04:44 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:
4248e22cbf SCUMM: (MI1/FM-TOWNS) - fix bug no. 13735


Commit: 4248e22cbfc54c36dcc17f4d3912a5fb30a5dbc2
    https://github.com/scummvm/scummvm/commit/4248e22cbfc54c36dcc17f4d3912a5fb30a5dbc2
Author: athrxx (athrxx at scummvm.org)
Date: 2022-08-03T17:03:25+02:00

Commit Message:
SCUMM: (MI1/FM-TOWNS) - fix bug no. 13735

("Inaccurate verb rendering in Monkey 1 FM-TOWNS)"

Actually, this is rather an emulation of an original bug than a fix...

I have also included a fix in the charset renderer that I noticed, but I don't think that one actually matters anywhere.

I haven't added a fix for exisiting saves. It would require another version bump and it is really not important enough.

Changed paths:
    engines/scumm/charset.cpp
    engines/scumm/script_v5.cpp


diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 73685802489..fa800169114 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -2365,7 +2365,7 @@ void CharsetRendererTownsClassic::processCharsetColors() {
 		if (c > 16) {
 			uint8 t = (_vm->_currentPalette[c * 3] < 32) ? 4 : 12;
 			t |= ((_vm->_currentPalette[c * 3 + 1] < 32) ? 2 : 10);
-			t |= ((_vm->_currentPalette[c * 3 + 1] < 32) ? 1 : 9);
+			t |= ((_vm->_currentPalette[c * 3 + 2] < 32) ? 1 : 9);
 			c = t;
 		}
 
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index f8d9dd30914..07e3c11416f 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -783,7 +783,7 @@ void ScummEngine_v5::o5_chainScript() {
 
 void ScummEngine_v5::o5_cursorCommand() {
 	int i, j, k;
-	int table[NUM_SCRIPT_LOCAL];
+	int table[32];
 	switch ((_opcode = fetchScriptByte()) & 0x1F) {
 	case 1:			// SO_CURSOR_ON
 		_cursor.state = 1;
@@ -843,8 +843,15 @@ void ScummEngine_v5::o5_cursorCommand() {
 			// games if needed.
 		} else {
 			getWordVararg(table);
+			// MI1 FM-Towns has a bug in the original interpreter which removes the shadow color from the verbs.
+			// getWordVararg() will generate a WORD table, but then - right here - it is accessed like a DWORD
+			// table. This is actually fixed in the original interpreters for MI2 and INDY4. It could be argued
+			// if we even want that "fixed", but it does lead to bug tickets (#13735 - "Inaccurate verb rendering
+			// in Monkey 1 FM-TOWNS") and the "fix" restores the original appearance (which - as per usual - is
+			// a matter of personal taste...)
+			int m = (_game.platform == Common::kPlatformFMTowns && _game.id == GID_MONKEY) ? 2 : 1;
 			for (i = 0; i < 16; i++)
-				_charsetColorMap[i] = _charsetData[_string[1]._default.charset][i] = (unsigned char)table[i];
+				_charsetColorMap[i] = _charsetData[_string[1]._default.charset][i] = (unsigned char)table[i * m];
 		}
 		break;
 	default:




More information about the Scummvm-git-logs mailing list