[Scummvm-tracker] [ScummVM :: Bugs] #10854: SCUMM: MI1 (Floppy) - Color cycling in lava cave backwards
ScummVM :: Bugs
trac at scummvm.org
Mon May 23 19:14:07 UTC 2022
#10854: SCUMM: MI1 (Floppy) - Color cycling in lava cave backwards
-------------------------+------------------------------
Reporter: GermanTribun | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: SCUMM
Version: | Resolution:
Keywords: | Game: Monkey Island 1
-------------------------+------------------------------
Comment (by dwatteau):
It looks like it's the same effect between the floppy and CD versions, but
the floppy version "encoded" it differently and we may have an incorrect
interpretation for that one.
room.cpp has this:
{{{
ptr = findResourceData(MKTAG('C','Y','C','L'), roomptr);
}}}
If I work from there when `_roomResource == 65`, I think this is the CYCL
data we can find for this room:
{{{
MONKEY1-FLOPPY-VGA:
-------------------
(lldb) x/64xb ptr
0x1207b8018: 0x00 0x00 0x34 0x37 0x00 0x00 0x60 0x6b
0x1207b8020: 0x00 0x00 0x70 0x7f 0x00 0x00 0x97 0x9f
0x1207b8028: 0x00 0x00 0x85 0x8f 0x00 0x00 0xa0 0xaf
0x1207b8030: 0x00 0x00 0x49 0x4f 0x00 0x00 0x29 0x2f
0x1207b8038: 0x02 0x64 0xc0 0xc6 0x06 0x99 0xb0 0xbf
0x1207b8040: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x1207b8048: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x1207b8050: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
MONKEY1-CD:
-----------
(lldb) x/19xb ptr
0x11013801e: 0x01 0x0a 0x70 0x02 0x64 0x00 0x00 0xc0
0x110138026: 0xc6 0x02 0x1c 0x00 0x06 0x99 0x00 0x00
0x11013802e: 0xb0 0xbf 0x00
}}}
which I tried to quickly decode this way:
{{{
MONKEY1-FLOPPY-VGA:
-------------------
[ 8]: delay=00026, flags=00002, start=192, end=198
[ 9]: delay=00009, flags=00002, start=176, end=191
MONKEY1-CD:
-----------
[ 1]: delay=00026, flags=00000, start=192, end=198
[ 2]: delay=00009, flags=00000, start=176, end=191
}}}
i.e. same content between the floppy and CD VGA releases, but the floppy
version uses `GF_SMALL_HEADER` so we decode it a bit differently:
<https://github.com/scummvm/scummvm/blob/97a138ae2e51e357d93e2eb689ad797338fae4fb/engines/scumm/palette.cpp#L573>
where `flags = 2` is something that we hardcode ourselves (and it looks
like it's been this way for a long time; I could reproduce the same bug
with ScummVM 1.4.0 from 2011 for example).
In palette.cpp, there are some `cycl->flags & 2` checks to see in which
direction the color cycling should go (if I'm interpreting this
correctly).
Maybe that hardcoding `flags` to `2` for `GF_SMALL_HEADER` games is wrong
(at least for this game and variant), but it takes a lava-flowing-down
effect to visually notice that we've been playing color cycling in reverse
for some games?
If I apply this quick'n'dirty diff, the lava appears to match the DOS
version again:
{{{
diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp
index 190f0b25414..d30c58e70b8 100644
--- a/engines/scumm/palette.cpp
+++ b/engines/scumm/palette.cpp
@@ -583,7 +583,7 @@ void ScummEngine::initCycl(const byte *ptr) {
cycl->counter = 0;
cycl->delay = 16384 / delay;
- cycl->flags = 2;
+ cycl->flags = (_game.id == GID_MONKEY_VGA) ? 0 :
2;
cycl->start = start;
cycl->end = end;
}
}}}
but I haven't tested the full floppy VGA version with this change. It's
maybe always `cycl->flags = 0;` for `GF_SMALL_HEADER` games, actually --
no idea.
I think we'll maybe need some help from someone having the disams for the
`GF_SMALL_HEADER` games :)
--
Ticket URL: <https://bugs.scummvm.org/ticket/10854#comment:10>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list