View Single Post
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,995

Violet CLM has disabled reputation

Aug 13, 2011, 12:09 PM
Violet CLM is offline
Reply With Quote
[TILE]INFO I describe in the opening post. It's the "Tile Types," which just means Translucent here because 1.00g only runs in full screen. Also I just noticed two additional sections between EMSK and FLIP: MASK and ANIM.

FLIP is really simple: it's a list of every tile (referenced by shorts, of course) that appears flipped somewhere in the level. Then I guess it ends in 0xFFFF, which is strictly unnecessary because the number of tiles could be deduced from the length long at the beginning, but whatever. ETA: Found some flipped tiles in [LAYR]DATA, and it's just the same as in .j2l files, the eleventh bit (1024) is set to 1.

ANIM is also simple. First there's the obligatory long giving the remaining length of the section, then a long specifying how many animations are present in the level, and then those animations. As far as I can tell, the only difference between them here vs. in .j2l files is that in .j2l, there are sixty-four frame shorts regardless of how many frames the animation actually uses, whereas in .lev, there are only as many as necessary.
Code:
struct Animated_Tile
{
    short FrameWait;
    short RandomWait;
    short PingPongWait;
    bool PingPong;
    char Speed;
    char FrameCount;
    short Frame[FrameCount]
}
(Note: I didn't actually make sure that the first seven bytes are as given, but since everything else lines up, I saw no reason to doubt it.)

TMAP, as far as I can tell, has only two different contents and appears to indicate whether the background is textured or not? Yeah, I dunno. Maybe it's an instruction to JJ2 to create the appropriate texture resources. In any case, that does appear to be the pattern:

0101000000000000:
BATTLE1, BATTLE2, BATTLE3, BATTLE4, BEACH, BEACH2, CASTLE1, CASTLE1N, COLON1, COLON2, DAMN, DAMN2, HELL, HELL2, LABRAT1, LABRAT2, LABRAT3, MEDIVO1, MEDIVO2, RACE1, RACE2, RACE3, RACE4, SHARE1, TRAINER, TREASUR1, TREASUR2, TREASUR3, TUBE1, TUBE2, TUBE3

0101010000000700:
CARROT1, CARROT1N, DIAM1, DIAM3, JUNG1, JUNG2, PSYCH1, PSYCH2, PSYCH3, SHARE2, SHARE3

Similarly, I checked programmatically, and EDI2's contents are exactly the same in every single .LEV file, so I don't think it's worth worrying about.
__________________

Last edited by Violet CLM; Aug 14, 2011 at 03:51 PM.