Difference between revisions of "MAP.DAT"

From UFOpaedia
Jump to navigation Jump to search
(Little more information about MAP files.)
m (Reverted edits by Zombie (Talk); changed back to last version by Pi Masta)
Line 3: Line 3:
 
Length of wglob[2]*wglob[3]*wglob[4]*4 bytes.
 
Length of wglob[2]*wglob[3]*wglob[4]*4 bytes.
  
The first 3 bytes indicate the width, length and height of the map module. After that, the actual cell data starts with each record containing 4 bytes. Each byte points to a different object in the MCD array summarized below.
+
Stores the map, in bitmap style. Each tile of
 
+
the map is stored as four bytes. Each of these
*The first byte is the ground.
+
bytes maps to a different object in the MCD array.
*The second is the west wall.
+
The first byte is the ground.  
*The third is the north wall.
+
The second is the west wall.  
*The forth is the contents (not usable objects - dirt and stuff).
+
The third is the north wall.
 
+
The forth is the contents (not usable objects - dirt and stuff).
Tiles are stored in order of left to right, top to bottom, top floor to bottom floor.
+
Tiles are stored in order of left to right,  
 
+
top to bottom, top floor to bottom floor.
<b>Note:</b> When opening map files with MS-EDIT, open it in 4-column widths, but remember that the ground tile of the cell will be found at the last byte in the row <b>above</b>.
 
  
 
==See Also==
 
==See Also==

Revision as of 02:10, 16 November 2008

This file is only used by tactical saves.

Length of wglob[2]*wglob[3]*wglob[4]*4 bytes.

Stores the map, in bitmap style. Each tile of the map is stored as four bytes. Each of these bytes maps to a different object in the MCD array. The first byte is the ground. The second is the west wall. The third is the north wall. The forth is the contents (not usable objects - dirt and stuff). Tiles are stored in order of left to right, top to bottom, top floor to bottom floor.

See Also