Sunday, June 15, 2014

FMod - Simpler Than I Thought

Today, I did a whole lot of digging through the TED5 source code, discovering all kinds of interesting things. For example, the tileinfo data stored in MAPTHEAD is RLEB compressed. The flag byte is the low byte of the RLEW flag word stored in the same file. Anyway, I used all that to implement the FromFiles and ToFiles method for loading and saving from MAPTEMP and MAPTHEAD.

After a little bit of testing and a lot of confusion, I figured out that I had wasted a lot of time. The game doesn't actually load MAPTHEAD; it uses the normal MAPHEAD as an accessor to MAPTEMP. I don't know what MAPTHEAD is actually used for, but it probably is supposed to actually be a temporary file. It turns out that I didn't need this giant TedLevels class; Abiathar will happily load the Bio Menace levels with the standard GalaxyLevels class, using the appropriate file names. (I couldn't actually see the level because I didn't bother configuring the EGA layout, but it looked like it had a sensible layout.)

So, basically, FleexCore now supports TED5 temporary files for no reason at all. At least I advanced the community's knowledge of these formats...

No comments:

Post a Comment