#15861 closed defect (fixed)

secret of monkey island - fm towns version - cigarette smoke wrong colors

Reported by: gabberhead Owned by: eriktorbjorn
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Monkey Island 1

Description (last modified by gabberhead)

when enabling restore content, i think it is the restore content,the colors of the cigarette smoke from smirk are wrong compared to the dos vga version. dos vga has 2x blue color (the 2 thickest ones) and 1x grey color (the thinest one). that are the right colors fpr the game. but the fm towns version have instead of the 2x blue color, pink/violett colors, the other one, the grey color, is ok. the fix for that, must be different to the fmtowns compared to the dos vga versions.

Change History (8)

comment:1 by gabberhead, 13 months ago

Description: modified (diff)

comment:2 by gabberhead, 13 months ago

Description: modified (diff)

comment:3 by eriktorbjorn, 13 months ago

I don't have this version myself (and probably never will, given how expensive the FM Towns versions are on eBay), but just for reference this is the change made to try and fix the color of the smoke in the CD version.

https://github.com/scummvm/scummvm/pull/3253

The fix applies to the following versions, I believe:

  • DOS CD version
  • Mac version
  • Sega CD version
  • FM Towns
  • Special Edition (development version of ScummVM only)

Technically the "Ultimate Talkie" version uses the same internal ID, but we don't expose the enhancement settings for that one. From what I remember, it shows the smoke (because it has its own patch for it) but the colors are wrong.

comment:4 by gabberhead, 13 months ago

yes, this is the commit for that fix. dos cd colors are then like in the floppy version. but like i wrote, fmtowns version the colors are then violett/pink instead of blue.
i have fix it for my fan translation, the color nearly matches them now on the fm towns version. really minimal difference is there, but perhaps only, because the fm towns version is a little bit brighter the the dos version.
this is the part i changed in the script for that in room 76:

[0005] (13) ActorOps(12,[Init(),Palette(2,229),Palette(3,229),Palette(1,7),IgnoreBoxes(),NeverZClip()]);

i think, its not 100% correct with the both big numbers, but it works. but when i enable the the ehancement, the colors are again mixed up. becuase 3 is changed to 1 with that enhancement in scummvm. but i compile my own scummvm verrsion for my modified german lucasarts games, where i temporally removed the code part from it.

Last edited 13 months ago by gabberhead (previous) (diff)

comment:5 by eriktorbjorn, 13 months ago

I just wanted to make a note to - perhaps - help whoever else wants to look into this.

I've re-tested the following versions:

  • DOS CD version
  • Mac version
  • Sega CD version
  • Special Edition
  • Ultimate Talkie

As expected, the smoke looks fine in all versions except the Ultimate Talkie, where the workaround isn't applied. So this confirms that whatever change needs to be made here should only be made for the FM Towns version.

comment:6 by eriktorbjorn, 13 months ago

Something like this might work. Most of it is just trying to clarify the comments, but the rest is looking up the closest color to the desired ones. But someone else will have to test it, of course.

Edit: Come to think of it, I'm not sure if the palette lookup thing is correct for the Sega CD version. But that could be restricted all the way down to the FM Towns version, if necessary.

diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 42b36f8d660..7815aad50fc 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -549,16 +549,27 @@ void ScummEngine_v5::o5_actorOps() {
 			// CD animation uses colors 1-3, where the floppy
 			// version uses 2, 3, and 9.
 			//
-			// We don't touch the colours in general - the Special
-			// edition have pretty much made them canon anyway -
-			// but for the Smirk close-up we want the same colors
-			// as the floppy version.
+			// So we have to adjust which colors are remapped. We
+			// also need to make sure they are remapped to the
+			// correct colors, because not only does the GUI occupy
+			// some colors, apparently the FM Towns version has a
+			// different palette altogether. So we look up the
+			// closest available color to the ones we want.
+			//
+			// We could use this to get back the original smoke
+			// colors for other scenes as well, but we currently do
+			// not. The Special Edition kept the new colors too.
 
 			if (_game.id == GID_MONKEY && _currentRoom == 76 && enhancementEnabled(kEnhVisualChanges)) {
 				if (i == 3)
 					i = 1;
 				else if (i == 9)
 					i = 3;
+
+				if (j == 3)
+					j = findClosestPaletteColor(_currentPalette, 256, 0, 171, 171);
+				else if (j == 7)
+					j = findClosestPaletteColor(_currentPalette, 256, 171, 171, 171);
 			}
 
 			// WORKAROUND for original bug. The original interpreter has a color fix for CGA mode which can be seen
@@ -2360,11 +2371,12 @@ void ScummEngine_v5::o5_roomOps() {
 			_opcode = fetchScriptByte();
 			d = getVarOrDirectByte(PARAM_1);
 
-			// WORKAROUND: The CD version of Monkey Island 1 will
-			// set a couple of default colors, presumably for the
-			// GUI to use. But in the close-up of captain Smirk,
-			// we want the original color 3 for the cigar smoke. It
-			// should be ok since there is no GUI in this scene.
+			// WORKAROUND: The CD versions of Monkey Island 1 may
+			// set a few colors, presumably for the GUI. But this is
+			// the close-up of captain Smirk, so it doesn't need all
+			// of those colors. Only the ones used by the dialog
+			// boxes and such. The others we may need for the cigar
+			// smoke.
 
 			if (_game.id == GID_MONKEY && _currentRoom == 76 && d == 3 && enhancementEnabled(kEnhVisualChanges)) {
 				// Do nothing
Last edited 13 months ago by eriktorbjorn (previous) (diff)

comment:7 by gabberhead, 13 months ago

it works. when enabled, the colors in the fmtowns version look right now. and also, like before, with the cd dos vga version. testet with my own compiled scummvm version and that patch. the sega cd version i do not have.

Last edited 13 months ago by gabberhead (previous) (diff)

comment:8 by eriktorbjorn, 13 months ago

Owner: set to eriktorbjorn
Resolution: fixed
Status: newclosed

I've committed that fix, then. Al my versions still seem to work fine. Thanks for testing!

Note: See TracTickets for help on using tickets.