I'm using the 256 color palette that someone saved as a gimp palette and it's working beautifully with all the in-level graphics and menu backgrounds, but for the fonts and title screen, for example, the colors are all off.
For example, on the main menu screen the font color is close to the palette I'm using, but not exact. And the purple text that is rendered above that purple planet background isn't in the palette either.
What are Tyrian's 23 different palettes, and how does it handle font palette shifting and rendering those PCX backgrounds? Once again, I've poured over the opentyrian source but I'm too stupid to figure it out. Cheers me dears!
For the font coloring, the palette is ordered in such a way that changes in brightness and hue are simple changes in the color's index in the palette: hue is the first nibble, brightness is the second nibble. So 0x00 is dark and 0x0F is bright (0x01..0x0E are all the brightnesses in between), 0x10 is dark and 0x1F is bright of a different hue, and so on.
That makes sense! In fact this is exactly how I am currently shifting palette values during a level. What doesn't make sense is that, when I take a screen grab of the main menu in opentyrian, the fonts are all of a shade that doesn't appear in tyrian's 256 color palette. Is this color shifting relative to tyrian's palette, or is it independant from it (since the color of the fonts aren't in the original palette)?
Oh, and just to clarify, I'm actually doing all of this in as3/Flex using paletteMap, using a technique that was first used in someone's attempt at creating the Doom engine in flash. Cheers mindless!
Like was said, most of the PCX backgrounds have unique palettes. The title screen palette isn't the same as the in-game one, and, is also worth mentioning, doesn't follow the brightness/hue scheme for the entire palette, just for the ranges used for text.
Hmm... are you saying that the fonts use colors straight from the PNG's palette? I think I get what you're saying now. All I need, then, is the palette data for each background then? I don't think I have it for the images I have currently (the title screen palette, for example, doesn't contain the colors of the title screen menu font).
In case you're interested, I just commited a tool to the Enhanced repository that will extract the palettes from palette.dat as GIMP palette files. You'll need to compile it though, it's in the tools\ directory.
This is the mapping of the backgrounds in .pic to their palettes: