View Single Post
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,995

Violet CLM has disabled reputation

Aug 20, 2011, 05:33 PM
Violet CLM is offline
Reply With Quote
Quote:
Originally Posted by Jerrythabest View Post
I've been away for a few days and I see a lot is revealed in the past week, awesome work! Are there any sections left you'd like me to look into? Otherwise I could possibly run though them all once more to see if I can say anything about the unknown bits and pieces.
EMSK is the big mystery, at least as far as format goes. It's an additional encoding of the transparency mask, so it's absolutely useless for loading (all that already being found in [TILE]DATA) but still necessary for saving. I think all that's left besides that is a bit bytes and shorts here and there which mostly seem to have constant values anyway.

Also, visualizing [TILE]DATA reveals I was simplifying [TILE]INFO. Translucent tiles in .lev files are fully opaque in terms of [TILE]DATA transparency, with a special dedicated transparent color. It's strange. Screenshot later.

Quote:
What you've found out about the MASK section is very interesting. Apparently, a single tile in the tileset could have a different mask in different levels.
Well, that much was apparent just looking at the contents of the folder, since there are no tileset files. It's a step between JJ1, which included mask in the level file and graphics in a separate file, and 1.10+, which includes mask and graphics in the same file. Of course, since the tileset itself is included in the level file, and may potentially vary across levels (e.g. Trainer vs. Castle1), the extent to which it's literally the same tileset that has the two different masks is somewhat limited.

Quote:
But even more interestingly, I'd expect there should have been some sort of tileset file back then, containing the clipping mask of all its tiles. MLLE would then copy the relevant ones, plus the complete tileset image, into the .lev files.
This would make perfect sense for them to have done, but I'm not totally sure it's accurate as framed. The EDIT section includes the tile graphics filename, that is, the original .anm file, but nothing about a tileset file that would also have included clipping and transparency masks. It's possible that there was a third masking file separate from the level file and the tileset graphics, which they loaded up each and every time they wanted to edit a level and wasn't necessarily bound to any individual tileset graphics file, but I think it's more likely that they just made one level with a tileset (/tileset group, in the case of day/night versions) and then copied it for later levels, so that the mask work that they'd already done would be intact. They did this a lot for JJ1, particularly copying LEVEL0.001 for creating boss levels, so it makes sense that they'd do it again for JJ2.

(Of course, that's all rampant speculation based almost exclusively on a .anm extension. It should hopefully be possible to say more once I get around to visualizing the masks. If tiles are masked in a level that aren't used in that level, but are used in a different, perhaps earlier level, that's a clue that they weren't imported automatically from a separate dedicated masking file. On the other hand, if each level has masks for all and only those tiles used (in layer 4), then you may well be right.)
__________________