View Single Post
Violet CLM

JCF Éminence Grise

Joined: Mar 2001

Posts: 11,090

Violet CLM has disabled reputation

Oct 5, 2016, 11:47 PM
Violet CLM is offline
Reply With Quote
So, a level file is broken into five main sections. These are, in order: the header, the level properties, the event map, and then two separate sections that together tell JJ2 which tiles (static or animated) appear in which positions in which layers. Somewhere between the start and end of the fourth section--the first half of the tile layout data--the file begins to be corrupted. We don't know exactly where because all but the first section of the file is compressed, and while it might be possible to uncompress the part of the fourth section that isn't corrupted, it probably wouldn't do you much good without the fifth section. We know that bytes have been overwritten because the decompression code works on the second and third sections but fails on the fourth and fifth sections, and because bytes we'd expect to see in certain places aren't there; however, we know that it was overwriting specifically that happened because the file is exactly the size that the (not corrupted) header says it is.
__________________