Opened 8 months ago
Closed 6 months ago
#15025 closed defect (fixed)
SCUMM: DIG: Sentence Line font has wrong colors
Reported by: | ATMcashpoint | Owned by: | athrxx |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | fonts | |
Cc: | ATMcashpoint | Game: | The Dig |
Description
In The Dig on DOS, the font used for the Sentence Line has at least three colors: white, black for shadows, and gray for some of the letter corners. In ScummVM, the gray pixels are changed to black by mistake.
This font is also used for the opening and closing credits, with different colors for each set of credits, but those appear to be displayed correctly in ScummVM.
Attachments (6)
Change History (14)
by , 8 months ago
Attachment: | digdosclosingcreditsfont.png added |
---|
by , 8 months ago
Attachment: | digdosopeningcreditsfont.png added |
---|
by , 8 months ago
Attachment: | digdossentencelinefont.png added |
---|
by , 8 months ago
Attachment: | digscummvmclosingcreditsfont.png added |
---|
by , 8 months ago
Attachment: | digscummvmopeningcreditsfont.png added |
---|
by , 8 months ago
Attachment: | digscummvmsentencelinefont.png added |
---|
comment:1 by , 8 months ago
Summary: | DIG: Sentence Line font has wrong colors → SCUMM: DIG: Sentence Line font has wrong colors |
---|
comment:2 by , 7 months ago
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()
. 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 earlier 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!
comment:3 by , 7 months ago
@eriktorbjorn thank you, this is actually very valuable.
_charsetColorMap[1]
being set without anything else is something I always see on about every SPUTM disassembled code. It might be different on DIG, I should check... The initCharset()
part might also work differently on DIG, that's a good point!
I'll check it out asap, I'm a little bit busy these days unfortunately...
comment:4 by , 7 months ago
I noticed there are some special cases for the demo version of The Dig too so any change may have to take that into account as well.
comment:5 by , 7 months ago
The Sentence Line font in The Dig demo is entirely different - it's just basically the Sentence Line font from Fate of Atlantis, in a light blue (not teal) color.
comment:6 by , 6 months ago
Owner: | set to |
---|---|
Resolution: | → pending |
Status: | new → pending |
I've made a fix. Please check if it works for you.
comment:7 by , 6 months ago
It appears to work properly in the daily build from May 8, 2024 (04:48:48).
comment:8 by , 6 months ago
Resolution: | pending → fixed |
---|---|
Status: | pending → closed |
Thanks for testing!
Thanks! :D I'll get to it asap!