Free Hero Mesh

Changes To Level file format
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

Changes to "Level file format" between 2018-08-13 00:20:05 and 2018-08-13 06:24:35

45
46
47
48
49
50
51
52

53
54
55
56


57
58
59
60
61
45
46
47
48
49
50
51

52
53
54
55
56
57
58
59
60
61
62
63







-
+




+
+






Either way, bit6 and bit5 should not both be set together. Also, if bit4 is not set for the first object, the Y coordinate is 1, and if bit5 is not set for the first object, the X coordinate is 0 (which is not a valid coordinate, unless bit6 is also set).

The MRU has two layers, one for the bottom object and one for the object directly above the bottom object. All data other than the coordinates are stored in the MRU. Objects above the second one are not stored in MRU. If the repeat count is nonzero, then in addition to the current cell, further cells to the right copy it too (this is only applicable for the bottom layer), leaving the cursor on the rightmost cell that has been written to.

The data type byte consists of:
  *  bit7-bit6 = Indicate which parameters are set. 0=Misc2 and Misc3, 1=Misc1, 2=Misc1 and Misc2, 3=Misc1 and Misc2 and Misc3.
  *  bit5-bit4 = Data type of Misc3. 0=number, 1=class, 2=message, 3=string.
  *  bit5-bit4 = Data type of Misc3. 0=number, 1=class, 2=message, 3=string. (Directions and key codes also use type 0.)
  *  bit3-bit2 = Data type of Misc2.
  *  bit1-bit0 = Data type of Misc1.

After the data type byte will be the misc data; any misc data not defined implicitly has a value of zero. The data is represented as a 16-bit number, in order Misc1, Misc2, Misc3, whichever are present (as specified above).

(Note: In EKS Hero Meshm the data type is used only in the editor. In Free Hero Mesh, data is strongly typed and so the data type is used at run time too.)

After the objects is a byte with value 0xFF to indicate there are no more objects, and then the level strings (if any). The level strings are simply null-terminated strings (which can include formatting controls).

<h2>LEVEL.IDX</h2>
This lump contains a series of 16-bit numbers, which are the ID numbers of the levels, in the display order.