Opened 19 years ago
Closed 18 years ago
#1502 closed defect (fixed)
COMI: Palette in Theater controls
|Reported by:||SF/bigmuzzy||Owned by:||cyxx|
|Cc:||Game:||Monkey Island 3|
Something is wrong with palette when Guybrush leaves Theater controls for the first time. I'am attaching savegame 'comi.s14' (you'll have to leave this room).
[English version of CoMI; Windows XP SP1; ScummVM 0.6.0pre (Feb 27 2004 14:30:13)]
Ticket imported from: #905833. Ticket imported from: bugs/1502.
Change History (12)
by , 19 years ago
comment:1 by , 18 years ago
I had a look at this one. I don't have solution but I think it may be interesting to share what I found so far...
In order to fade out and in the theater room, the script uses the darkenPalette() subopcode from o8_roomOps. For each fading step, there are 2 calls : darkenPalette(24, 229, ...); darkenPalette(230, 255, ...);
I checked against disassembly, the original engine doesn't operate directly on one of the room palettes in darkenPalette, but rather on a copy of the _currentPalette. My patch adds this temporary palette.
With this new palette, that's better, but some glitches are still there as the colors 0 to 23 aren't faded and are used... I don't really know why for now. Maybe the actor colors aren't remaped as the original did... Or maybe the setBannerColors() is useful in this case ? I noticed it was called in this room and there's nothing to handle it in scummvm. So I added an ugly workaround for that in the patch too...
by , 18 years ago
comment:2 by , 18 years ago
I wonder if this is related to <https://sourceforge.net/tracker/index.php? func=detail&aid=651077&group_id=37116&atid=418820> ...
comment:3 by , 18 years ago
comment:4 by , 18 years ago
Hey erik, maybe you have an idea on this one? Feel free to immediately unassign this from you if you are not interested / have no good idea -- I just wanted to make sure you are aware of it.
comment:5 by , 18 years ago
comment:6 by , 18 years ago
The problem seems to be in ScummEngine::remapPaletteColor. In the COMI disassembly, the palette loop starts at color number 24.
It would be nice to check if in other games, the loop also starts at 24. But with this fix and the patch from bug #1094340, the problem is gone.
Note: the attached .diff file also includes the patch for #1094340.
by , 18 years ago
comment:7 by , 18 years ago
I just checked the DIG and FT disasm., they both start the palette loop at 1 in remapPaletteColor().
comment:8 by , 18 years ago
Ok, thanks. So if this gets committed, we will need to add some "if (_version == x)" checks.
comment:9 by , 18 years ago
|Status:||new → closed|
Guybrush is about to leave Theater controls