Captain Comic II Tileset Format

From ModdingWiki
Jump to navigation Jump to search
Captain Comic II Tileset Format
Captain Comic II 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?Yes
Hidden data?No
Games

This format stores the images used for drawing the game levels in Captain Comic II. All tiles are fixed as 16×16 pixels in size. The format is similar to the Captain Comic Tileset Format, but extends the header and adds RLE compression.

File format

Data type Name Description
INT16LE lastBlockingTile index of the last blocking tile
INT16LE lastStandingTile index of the last tile that the player can stand on
INT16LE lastWaterTile index of the last underwater tile in the tileset

Tiles must be in the order: blocking, standing, underwater, background. If there are no underwater tiles, lastWaterTile is set to -1 (0xffff). Background tiles (those following the underwater tiles) are tiles that do not block the player in any way.

The tile data follows this header, in blocks of 128 bytes per tile. See Captain Comic Tileset Format for an explanation. However, first the data must be decompressed, as follows.

  1. Read one byte
    • If the high bit is NOT set (<= 127) then copy this many bytes unchanged
    • If the high bit is set (>= 128) then repeat the next byte. The repeat count is 256 - the first byte
    • If the byte is 0, break
  2. Repeat until EOF

Note the stop code (0). This means that a partial block can be decompressed instead of waiting for EOF.

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