It’s ok, it was a very easy thing to fix. Phew. Now, where was I…
Category: Uncategorized
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…
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…
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 :-).
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.
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*.
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…