The ''map_offset_x'' and ''map_offset_z'' fields warrant some explanation: the map editor allows you to shift the whole map around, and instead of updating all tiles individually, these chunk-wide settings get changed. Actors' coordinates are updated, and are not affected by this offset. Whenever tiles get read, a tile that has stored location ''(x, z)'' effectively ends up at ''(x + map_offset_x, z + map_offset_z)'' instead. Why are they floats, you say? No idea.
=== Object table ===
=== Object table ===
== Tile data ==
== Tile data ==
−
The number of tiles in the tile data section is the sum of ''n_tiles'' for all chunks. Presumably the tiles are assigned to chunks in the order they appear, so the first ''chunk[0].header.n_tiles'' chunks belong to chunk 0, etc.
+
The number of tiles in the tile data section is the sum of ''n_tiles'' for all chunks. Presumably the tiles are assigned to chunks in the order they appear, so the first ''chunk[0].header.n_tiles'' tiles belong to chunk 0, etc.