HCl
WC EXE archaeologist
Hey that's great! Having those palette files as GIFs turns out to be pretty handy
The most interesting thing to me is that those Palette GIFs are 256x64. An 8-bit palette is 256 colors, so this suggests that there are 64 sub-palettes, one being each row of the GIF, used for gamma correction by the game.
Seems like a reasonable assumption. Lets go with that!
While I don't have my P2 files with me at the moment, I took the Xavier pic from this thread along with game.gif and made a quick-and-dirty Matlab script for testing this. Both files are 8-bit, so i can easily work with those (jpeg encoding, on the other hand, discards all indexing information...).
The results are on the attached pic!
- Figure 1 is game.gif itself. Nothing new here, just making sure i'm loading the data correctly
- Figure 2 is the Xavier pic using the GIF palette directly.
- Figures 3 and 4 are the Xavier pic using selected subsections of the palette. One of them is therefore lighter and the other darker.
So this confirms that the same WC3/StarLancer RLE algorithm works fine for P2 as well Next step then is to dig further into the header. When we understand it better, we'll be able to parse the data more robustly.
The most interesting thing to me is that those Palette GIFs are 256x64. An 8-bit palette is 256 colors, so this suggests that there are 64 sub-palettes, one being each row of the GIF, used for gamma correction by the game.
Seems like a reasonable assumption. Lets go with that!
While I don't have my P2 files with me at the moment, I took the Xavier pic from this thread along with game.gif and made a quick-and-dirty Matlab script for testing this. Both files are 8-bit, so i can easily work with those (jpeg encoding, on the other hand, discards all indexing information...).
The results are on the attached pic!
- Figure 1 is game.gif itself. Nothing new here, just making sure i'm loading the data correctly
- Figure 2 is the Xavier pic using the GIF palette directly.
- Figures 3 and 4 are the Xavier pic using selected subsections of the palette. One of them is therefore lighter and the other darker.
So this confirms that the same WC3/StarLancer RLE algorithm works fine for P2 as well Next step then is to dig further into the header. When we understand it better, we'll be able to parse the data more robustly.