The EGA format is surprisingly very simple. It doesn't require crazy bit-nonaligned IO, just shuffling some bits into different groups. That only has to be done at the end, so before then, I can just worry about putting the right color bytes down. Just as I expected, the header is written last, compiled from a list of entries generated while copying image data. It worked almost perfectly the first time. I had assumed, under the guidance of an online file format, that I could leave the smooth movement sprite duplicates to Keen. That was not the case. Actually duplicating the entry fixed the clipping problem.
However, when I tested the VortGraphics ToFiles method with compression, it failed in the most annoying way possible: it only partially succeeded. The tiles are only partially corrupted; I can still see the outline of the items and some of the color planes are correct. However, without looking closely, everything looks like garbage. I rewrote the core of the compression algorithm according to a different online guide and it still fails similarly. Just when I thought I was done with LZW...
No comments:
Post a Comment