Opened 20 years ago

Closed 19 years ago

#1502 closed defect (fixed)

COMI: Palette in Theater controls

Reported by: SF/bigmuzzy Owned by: cyxx
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Monkey Island 3

Description

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.

Attachments (3)

comi.s14 (52.9 KB ) - added by SF/bigmuzzy 20 years ago.
Guybrush is about to leave Theater controls
theater.diff (3.3 KB ) - added by cyxx 19 years ago.
comi_905833.diff (3.2 KB ) - added by cyxx 19 years ago.

Download all attachments as: .zip

Change History (12)

by SF/bigmuzzy, 20 years ago

Attachment: comi.s14 added

Guybrush is about to leave Theater controls

comment:1 by cyxx, 19 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 cyxx, 19 years ago

Attachment: theater.diff added

comment:2 by fingolfin, 19 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 fingolfin, 19 years ago

Owner: set to eriktorbjorn

comment:4 by fingolfin, 19 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 eriktorbjorn, 19 years ago

Owner: eriktorbjorn removed

comment:6 by cyxx, 19 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 cyxx, 19 years ago

Attachment: comi_905833.diff added

comment:7 by Kirben, 19 years ago

I just checked the DIG and FT disasm., they both start the palette loop at 1 in remapPaletteColor().

comment:8 by cyxx, 19 years ago

Ok, thanks. So if this gets committed, we will need to add some "if (_version == x)" checks.

comment:9 by Kirben, 19 years ago

Owner: set to cyxx
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.