Don’t Panic!

It’s ok, it was a very easy thing to fix. Phew. Now, where was I…

Well, at least I liked Square 1 when I was there first time round…

There is no expletive to express this.

Up until now, I have been working with the smaller GJD files that get installed to the hard drive, but I couldn’t find a delta frame there that had a palette change. So I went for a biggy: the INTRO.GJD file on disc one. It’s good I did, because I’ve discovered that the bit that was easy, the extraction from the GJD file, doesn’t work properly. It gets about two into it (out of a couple of dozen), then falls over.

Still, I’ve already learnt / re-learnt quite a lot since I did that bit, so it might be obvious…

Decompressing V.EXE

As a distraction from those scary delta frames, I used a combination of unlzexe and dosbox to decompress V.EXE, which was compressed using LZEXE. So now all I’ve gotta do is disassemble it 🙂

Procrastination, that’s what you need

As expected, I’m putting off delving into the delta frames format. As you might expect, it’s pretty complicated, so I’ve been trying to make sure my program is ready for it. I’ve now got a proper image struct for storing the images, which makes it much easier to have a second one to store the new image. Part of me feels I should be doing this properly in C++ classes though… I’ll have to eventually…

Tada!

And it was just a comparatively small step from there to here!

The video frames (i.e. each one after this, the first one) are stored differently again, I think they’re going to be even more tricky to pull out, but at least I know my BMP writer works!

Picture posting

So I figure, now would be a good time to start posting pictures. Here’s the mansion, as my program outputs it atm. Clearly far from right, but it is there if you stand on your head and look hard…

Decompression fixed

Yes, there was a problem with the decompression. This would have been obvious with a little bit of arithmetic: the output .dat file was 2.5k, and it should have been about 50k. Fixed now. The BMP is still screwed, but in a much less terminal way (I hope :-).

Bugger

Hmph. I think there is a problem in my decompresser. And after I was so happy that I got it working and everything.

The problem is that I have no intermediate. I can check the vdx files are correct, but after that I have to go:

vdx -> individual chunk -> decompresser -> read image -> write bmp

The only stage where I can actually check that everything is going according to plan is at the stage where it has made me a bmp file. Which is rather frustrating. I’m used to checking at every single stage along the way, to make sure all is going well, but here I don’t get that option. Unless I try to take apart the pascal code… no, I think that would be going too far. This will work, it will just take care and hard work.

Ugh…

And now, the task ahead is to convert my pretty little file into a bmp file, so that I can view it. Which is a decidedly dull task, so I keep putting it off and off.

I emailed the guy who re’ed the vdx and gjd files, and he was supportive, but he only ever concentrated on those files. Looks like I’ve got all the help anyone’s able to give me…

Right. BMP files. *sigh*.

Decompression complete

Woohoo! It was a challenge, more mentally taxing than I’m used to, but I now understand the algorithm and have it working in my program. At the moment it just dumps the decompressed files to disk rather than converting them into any sort of viewable format, but that should, I hope, be comparatively straight-forward…