Opened 6 weeks ago

Last modified 9 days ago

#15025 new defect

SCUMM: DIG: Sentence Line font has wrong colors

Reported by: ATMcashpoint Owned by:
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)

digdosclosingcreditsfont.png (38.9 KB ) - added by ATMcashpoint 6 weeks ago.
digdosopeningcreditsfont.png (13.0 KB ) - added by ATMcashpoint 6 weeks ago.
digdossentencelinefont.png (73.2 KB ) - added by ATMcashpoint 6 weeks ago.
digscummvmclosingcreditsfont.png (39.1 KB ) - added by ATMcashpoint 6 weeks ago.
digscummvmopeningcreditsfont.png (11.7 KB ) - added by ATMcashpoint 6 weeks ago.
digscummvmsentencelinefont.png (72.4 KB ) - added by ATMcashpoint 6 weeks ago.

Download all attachments as: .zip

Change History (11)

by ATMcashpoint, 6 weeks ago

by ATMcashpoint, 6 weeks ago

by ATMcashpoint, 6 weeks ago

Attachment: digdossentencelinefont.png added

by ATMcashpoint, 6 weeks ago

by ATMcashpoint, 6 weeks ago

by ATMcashpoint, 6 weeks ago

comment:1 by AndywinXp, 6 weeks ago

Summary: DIG: Sentence Line font has wrong colorsSCUMM: DIG: Sentence Line font has wrong colors

Thanks! :D I'll get to it asap!

comment:2 by eriktorbjorn, 9 days 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!

Last edited 9 days ago by eriktorbjorn (previous) (diff)

comment:3 by AndywinXp, 9 days 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 eriktorbjorn, 9 days 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 ATMcashpoint, 9 days 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.

Note: See TracTickets for help on using tickets.