".map" file format:
Map file contains description of a level map (which has size 20x15 blocks) - 300 blocks written one-by-one, in one line, without any delimiters. Description of each block has the following format:
<type><image>[<invisible block background>]
<type>: bit map, 1 byte.
First seven bits are one of the following ASCII characters:
'w': solid wall. Player can't walk through it.
'h': spike. Kills player instantly if touched by player.
'b': background block. Cannot be invisible
's': save block. Saves the game if touched by player. Cannot be invisible
'0': so called "fake" block. Looks like a normal wall but entities walk through it. Cannot be invisible
If the last bit is set to 1 then the block is invisible. Invisible block looks like background block (see "invisible block background") until touched by player or an enemy.
<image>: integer, 2 bytes.
Position of block image in the file tiles.png (or bg.png for background blocks). Files tiles.png and bg.png consist of block images (40x40 pixels each), aligned one-by-one in several lines.
Position of image in the files is counted beginning from zero, from left to right, top to bottom:
<invisible block background>: integer, 2 bytes. (optional. This parameter is missing if block is not invisible.)
Position of image in bg.png. At first invisible block looks like background block, i.e. has image number <invisible block background> in file bg.png.
If player touches the invisible block, it becomes visible, i.e. its appearance changes to image number <image> in file tiles.png