Lion King Level Format

From ModdingWiki
(Redirected from MAP Format (Lion King))
Jump to: navigation, search
Lion King Level Format
320px
There is no image of a map in this format — upload one!
Format typeMap/level
Map type2D tile-based
Layer count6
Tile size (pixels)8×8
Viewport (pixels)320×200
Games

The Lion King MAP Format is used to store game levels.

File format

Header

Data type Name Description
UINT32LE paletteOffset Offset of 256-colour VGA palette
UINT32LE tilesetOffset Offset of 8x8 tiles
UINT32LE foregroundWidth Size of foreground layers in tiles
UINT32LE foregroundHeight
UINT32LE layersOffset Offset of foreground layer data
UINT32LE backgroundWidth Size of background layer in tiles
UINT32LE backgroundHeight
UINT32LE background Offset of first background layer data
BYTE[96] padding Set to 0x00

The header is padded by null bytes up to offset 0x80.

Note the different dimensions of the foreground and background layers. The game uses parallax scrolling for the background layer.

Most levels have one (backgroundWidth, backgroundHeight, background) structure, but other numbers are supported. BONUS.MAP has several, using them for both foreground and background, apparently with special case code.

PEOPLE_S.MAP (a list of credits) has none. CREDITS.MAP (studio banners, etc.) has two, which are used to store entirely separate screens.

Unknown section

The header is followed by a section of 40 unknown bytes, before the VGA palette which always occurs at offset 0xA8.

Tileset

The tileset is a raw block of 8x8 bitmaps. The end of this block is marked by layersOffset.

Foreground and background layers

All levels have four foreground layers except level four which has one. These layers are arrays of INT16LE indices into the tileset. To obtain a working index, subtract one from the layer values. An index of -1 means an undrawn tile. Bit 15 (i.e. the MSB) indicates horizontal flipping, bit 14 indicates vertical flipping. The purpose of bit 13 is currently unknown.

The first foreground layer defines tiles. The second layer appears to define platforms, the third appears to define impassable lines, and the fourth perhaps powerup and enemy positions.

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