[Scummvm-tracker] [ScummVM :: Bugs] #15025: SCUMM: DIG: Sentence Line font has wrong colors
ScummVM :: Bugs
trac at scummvm.org
Thu Apr 18 08:08:30 UTC 2024
#15025: SCUMM: DIG: Sentence Line font has wrong colors
-------------------------+----------------------------
Reporter: ATMcashpoint | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: SCUMM
Version: | Resolution:
Keywords: fonts | Game: The Dig
-------------------------+----------------------------
Comment (by eriktorbjorn):
I added some debug messages to `CharsetRendererV7`, and this is what it
decodes the "a" in the sentence line as:
{{{
1 1 1 1 3
3 3 3 1 3
2 1 1 1 1 1 3
1 3 3 3 3 1 3
2 1 1 1 1 1 3
3 3 3 3 3 3
}}}
Transparency is 0, but I've removed them from the image above for clarity.
This is then mapped through `_charsetColorMap[]`, resulting in the
following bitmap:
{{{
15 15 15 15 0
0 0 0 15 0
0 15 15 15 15 15 0
15 0 0 0 0 15 0
0 15 15 15 15 15 0
0 0 0 0 0 0
}}}
I.e. colors 2 and 3 are both mapped to black. But color 2 should probably
be mapped to something else?
`_charsetColorMap[1]` gets set by `CharsetRendererV7::drawCharV7()` but
what about the rest of it? It does get initialized by the
`SO_CHARSET_COLOR` of `ScummEngine_v6::o6_cursorCommand()`, though.
Everything in `_charsetColorMap[]` gets set to zero, except for entries 1
and 2 which are set to 15 and 7 respectively. Well, we did get 15 but what
happened to the 7?
It seems it gets zeroed out in `ScummEngine::initCharset()`, by copying
`_charsetData[charsetno]` into it. There are a number of places where this
can happen, but that's the one that gets triggered here. If I just remove
that `memcpy()` the character seems to be rendered correctly.
Of course this is just an observation. I'm not saying that it is the
correct fix!
--
Ticket URL: <https://bugs.scummvm.org/ticket/15025#comment:2>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list