Major Stryker Level Format
The basic layout of a level file is as follows:
|Char cMaskTiles||filename of the masked tile graphics|
|Char cSolidTiles||filename of the solid tile graphics|
|Char cBackdrop||filename of the backdrop tile graphics|
|Char cUnused1||unused filename (always "dropa.dr1")|
|Char cUnused2||unused filename (always "attr00.dr1")|
|Char cMusic||filename of the music file|
|Char cUnused3||unused filename (always "mboss.dr1")|
|UINT16LE iFlags||Flags for lights etc (see below)|
|UINT16LE iWidth||Width of map, in tiles (always 32)|
|UINT16LE iActorSize||Number of UINT16LE values in the actor data|
|UINT16LE[iActorSize] iActorData||Actor entries (3 values per actor, see below)|
|BYTE bMaskAttributes||Tile attributes (one byte per tile, see below)|
|BYTE bTileAttributes||Tile attributes (one byte per tile, see below)|
|UINT16LE iTileData||Tile codes for the entire level|
The bits in the iFlags value have the following meaning:
|0x0001||none (this is ALWAYS set but has no effects at all)|
|0x0002||lightning (only used in E2M1)|
|0x0004||scroll bottom plane faster (for bosses in E1M12, E2M12, E3M12)|
The tile attribute bits have the following effects:
|0x80||blocking (any direction)|
Actor entries use the following data structure:
|UINT16LE iType||ID number of this actor|
|UINT16LE iPosX||X coordinate of this actor, in tile units|
|UINT16LE iPosY||Y coordinate of this actor, in tile units|
The game ignores the iWidth value read from the file and sets it back to 32, thus the level's height will always be 523, leaving 31 UINT16LE values unused at the end of the tile data.
The range of valid tile data goes from 0 to 0x1ED0. Some levels also contain the invalid values 0x22C0 and 0x22E0 in the 31 unused tiles at the end, which must be handled separately.
- Values smaller than $F0 are tile indices for the masked tileset.
- Subtract $F0 from any other valid value to get an offset into the solid tileset in memory (divide the offset by 32 to get a tile index).
The map layout is special because the game uses parallax scrolling. The first 16 tiles of each row make up the actual map, the last 16 tiles of each row make up the layer that scrolls below the actual map (at half the speed). Actors can be placed in both of these "layers".
This file format was reverse engineered by K1n9_Duk3. 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!)