Sprite Masks

Sprites page

Sprite Masks
The game employs a tile and sprite-based interface. In order to have maximum sprite re-use, the sprites themselves use a 'mask', which defines which bits of the sprite is to be drawn transparent. In this way, you only need one 'actor' sprite, which will work over any background.

The File is encoded as a list of true BIT-Maps (not the Windows BMP bitmap!). The MASKS.WLF file, as supplied with the original game contains 10 such bitmaps. Each byte of the file unpacks into 8 -bits, each bit of which defines whether a pixel is transparent or not. Therefore, for a 16x16 sprite, you would need 2 bytes per row, and 16 rows which makes 32 bytes per sprite. The MASKS.WLF file is 320 bytes long, hence 32 bytes x 10 sprite masks.

Here are the masks, when converted into a binary image representation.



Technical
This file is loaded into memory as part of the game initialisation. It's loaded into Seg003:0DA60, and occupies 0x500 bytes. It is not decyrpted on load.