Captain Comic Tileset Format

From ModdingWiki
Jump to: navigation, search
Captain Comic Tileset Format
Captain Comic Tileset Format.png
Format typeTileset
HardwareEGA
Max tile countUnlimited
PaletteDefault EGA
Tile names?No
Minimum tile size (pixels)16×16
Maximum tile size (pixels)16×16
Plane count4
Plane arrangementTile-planar
Transparent pixels?No
Hitmap pixels?No
Metadata?None
Supports sub-tilesets?No
Compressed tiles?No
Hidden data?No
Games

The Captain Comic Tileset Format stores the images used for drawing the game levels. All tiles are fixed as 16×16 pixels in size. The format is very similar to the Captain Comic Sprite Format.

File format

Data type Name Description
UINT8 lastPassable index of last non-blocking tile, tiles of a higher index block the player (walls, ledges, etc.)
UINT8 unknown1 ! Unknown - always 0x00
UINT8 unknown2 ! Unknown - always 0x00
UINT8 flags 0=default, 4=unknown, only used in CASTLE.TT2

The tile data follows this header, in blocks of 128 bytes per tile.

The tiles are 16-colour images, split into four planes (see Raw_EGA_data#Planar_EGA_data). Each image is stored one after the other (no header.) The planes within each image are ordered with blue first, followed by green, red and intensity last. 32 bytes per plane multipled by four planes gives 128 bytes per tile.

As each image is entirely contained within the 128 bytes, the offset of a given tile can be calculated as

offset = 4 + tile * 128

The filenames for each tileset match the levels, so FOREST.TT2 contains the tiles for the three map files FOREST[0-2].PT.

Tools

The following tools are able to work with files in this format.

Name PlatformView images in this format? Convert/export to another file/format? Import from another file/format? Access hidden data? Edit metadata? Notes
Camoto Linux/WindowsYesYesYesN/AN/A

Credits

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!)