Deathtrack Skyline Map Format

From ModdingWiki
Jump to navigation Jump to search
Deathtrack Skyline Map Format
There is no example of an image in this format — upload one!
Format typeImage
HardwareEGA, CGA
Colour depth4-bit (EGA)
Minimum size (pixels)1920×25
Maximum size (pixels)1920×25
PaletteShared
Plane count1
Transparent pixels?No
Hitmap pixels?No
Games

Despite the name, the ten .MAP files (one per city) are not road maps. Each file holds the horizon skyline that is drawn behind the road during a race. The road itself is described by the .TRK file of the same name.

The whole file is one compression envelope (method 2, LZW); there are no chunk headers.

File format

The decoded data is always 24,026 bytes.

Data type Name Description
UINT16LE count Number of strips N (6)
UINT16LE[N] widths Strip width in bytes (160 = 320 pixels)
UINT16LE[N] heights Strip height in pixels (25)
BYTE[N][width × height] strips Packed 4-bpp pixels, high nibble first, 160 bytes per row; 4,000 bytes per strip

The six strips are 320×25 each. Placed side by side they form a 1920×25 panorama; the renderer picks the strip from the camera heading (x / 320 mod 6), so the skyline wraps around.

In the original, the heights overwrite the width table in memory after loading (a harmless quirk).

Source code

From re-deathtrack, the open-source browser port:

Credits

This file format was reverse engineered by VorticonCmdr. 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!)