Captain Comic Map Format
The Captain Comic Map Format stores the playable game levels. Each level is stored in a separate file in the game directory, using the .PT filename extension.
The files only store the map background layer. It is currently unknown how to control where the player starts, or where enemies and powerups appear.
The file consists of a width, height and then a list of tiles.
There is no signature, however careful processing of the header can be used to check whether the width and height correctly describe the file size. This could be confused with an image file however, so some other checks will be required (such as the absence of certain unused byte values, perhaps.)
Each file begins with the following header.
|UINT16LE width||Width of map, in number of tiles|
|UINT16LE height||Height of map, in number of tiles|
The map data follows immediately, with one byte for each tile, left-to-right and top-to-bottom. The total size of this section is the map width multiplied by the map height.
Map codes are direct indices into the tileset. So a map code of 0x01 means the second tile in the tileset should be drawn at that location. The tileset to use is matched up by filename (FOREST.TT2 provides the tiles for FOREST[0-2].PT, for example.)
This file format was reverse engineered by Malvineous. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)