dwatteau / scummtr

Fan translation tools for SCUMM engine games
MIT License
23 stars 4 forks source link

ScummFont: is the BMP palette correct? #7

Closed dwatteau closed 3 years ago

dwatteau commented 3 years ago

In ScummFont, glPalette had a single-byte change after the last "official" release of the tool:

https://github.com/dwatteau/scummtr/blob/main/src/ScummFont/scummfont.cpp#L101

This change was made in 2004, and I've checked that the last version of scummfont.exe does contain the previous palette. So, for the moment, that's the one I'm keeping.

I don't think this change was a temporary test change made in 2004, though. I think that it might be a real bugfix. For example, maybe we were generating slightly invalid BMP files, because of this. Or maybe it was invalid just for some font files.

I need to check the validity of our BMP files, and read the specification of the format.

dwatteau commented 3 years ago

So, from my understanding, it means that the #001000 color (or rgb(0, 16, 0) color) was added to the 256-color palette which is included in the bitmap files that we output.

I don't know which particular font makes uses of it, but it probably really fixed a specific use-case back then, and in my opinion this change can't cause any regression, so let's include it.