Data format (basedata/datalayer) | ||||||||||||||||
All data is contiguously stored in a memory bank (see table). Note that the depth is one of these values: 4,8,12, or 16 bit.
You can read in the data using one of the following code snippets (written in BlitzBasic). The returned value is a tileset frame number. A value of 0 is a transparent tile. 4 bit depth
8 bit depth
12 bit depth
16 bit depth
|
||||||||||||||||
Animations | ||||||||||||||||
The map editor was designed to create compact map-files. Layerdepth can be as small as 4 bits per tile. Such a tile can only store small values (0-15). So how does map editor save animation information in this compact space? A tile/image with a value of 0 is transparent. All values over 0 are a frame-number in the tileset. However, if you create 2 animations, values 1 and 2 are used for animations. Higher values are then used for the normal frames. (Note: This may cause some tiles to not be assigned a frame number if their value would go higher than the bit depth can hold.) You see that all animations are dynamically stored. Look at the figure (green=transparent, red=animation, gray=frame): ![]() |