Benny Posted September 19, 2004 Share Posted September 19, 2004 After messing with Antti's Character Set Viewer I decided to knock up a quick version of my own. The specs as set out in various places are: 4 bytes Header 4 bytes BE Size 6 bytes Unknown 15 bytes Colour Map 1 byte Bits per pixel 1 byte Max char height? 1 byte No chars 1 byte Unknown 4 bytes * NoChars Character Offsets if NoChars=0 then NoChars=256 Character Offsets are relative to the end of the Colour Map data (byte 29) Individual char data: 1 byte Char width 1 byte Char height 1 byte X offset 1 byte Y offset x bits Data bitstream Thats all fine, but I dont know how to choose the correct colours for the character data. At 1bpp theres 2 possible colours, at 2bpp 4 and at 4bpp 16. I can guess at colour values of course, but I'm unsure as to how the colour values are obtained or how they relate to the colour map. I've got a nasty suspicion that the colours are set in the game scripts and that they specify what colour values go into the colourmap but of course I dont really know. If anyone could explain this to me, or work out the answer from the scummvm source it'd be much appreciated Oh, I'm also unsure what bits map to which colour in the colourmap at 4bpp. I've looked at the ScummVM source for all this, but being ignorant of C++ I couldnt figure it out.. Link to comment Share on other sites More sharing options...
Scummbuddy Posted September 19, 2004 Share Posted September 19, 2004 you may be right about the color being controlled by script. MI2, when Lechuck comes in in Guybrush's dream, he's suspiciously wearing a blue coat, for no reason. Unless I missed something? Link to comment Share on other sites More sharing options...
Ender Posted September 19, 2004 Share Posted September 19, 2004 Okay. In the case of a 1BPP image (thru to SCUMM V4), the only colour used is the talkColour set by the script. Yes, this is script controlled. In the case of 2BPP-8BPP fonts (SCUMM5+), the first indexed colour is the talkColour. The others are mapped somehow, I think into the font data itself. map[...] = ?? map[1] = talkColor; (do RLE loop and stuff...) color = (bits >> (8 - bpp)) & 0xFF; if (color) { putPixel(map); } (...) Link to comment Share on other sites More sharing options...
Benny Posted September 20, 2004 Author Share Posted September 20, 2004 Cheers Endy, I'll have a go at that Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.