Pushover Sprite Format

From ModdingWiki
Jump to navigation Jump to search
Pushover Sprite Format
There is no example of an image in this format — upload one!
Format typeImage
HardwareEGA, VGA
Colour depth4-bit colour + transparency
Minimum size (pixels)Unknown
Maximum size (pixels)Unknown
PaletteExternal
Plane count5
Transparent pixels?Yes
Hitmap pixels?No
Games

DATA/DOMINOE0.SPX, DOMINOE1.SPX and ANT10B29.SPX contain Pushover domino and carried-domino graphics. Decompress RNC first. These are consecutive frame streams with counts supplied by the executable, not self-describing animation containers.

File format

Each frame begins with two bytes:

Data type Name Description
UINT8 layout Low 3 bits: number of stored 16-pixel units; high 5 bits: placement mask
UINT8 height Height in rows
BYTE[widthUnits * 2 * height * 5] planes Five plane-major bitmaps

A plane contains height rows of 2 * widthUnits bytes. Bits run MSB-first. Assemble the five bits into a value 0–31: zero is transparent; otherwise the low four bits select the active palette. Value 16 is opaque palette colour 0.

Placement mask

The frame occupies selected units in an 80-pixel slot centred on the blitter's X argument. Header bit 7 selects the leftmost unit (X−40); bit 3 selects the rightmost (X+24). The population count of these five bits must match the low-three-bit unit count. Store units in left-to-right order. All observed runs are contiguous; a decoder must not discard the placement bits or assume that stored pixels begin at the slot's left edge. Y is a bottom-edge anchor, so the frame's top is Y−height.

Domino banks

Family frame counts, in executable order, are:

15,15,14,8,15,15,15,15,15,17,6,6,6,6,6,6,8,1

Families 0–10 are in DOMINOE0.SPX; 11–17 are in DOMINOE1.SPX. Restart at byte zero when changing files. There is no family header on disk.

Carried-domino bank

ANT10B29.SPX contains 110 frames, arranged as eleven groups of ten (17720 decompressed bytes). Groups map to icon states 0,1,2,3,4,5,6,12,13,14,15. States 7–9 alias 6, while 10 and 11 alias 0 and 1. Within a group, domino type 1–10 selects (type−1) % 10. The bank is used both by menu decoration and by the gameplay carried-domino overlay.

Notes

The older spx.md and spx-to-png.js describe a heuristic marker/monochrome interpretation. The fixed-count five-plane decoder consumes the gameplay banks exactly; do not combine the two interpretations into an invented second file region.

Source code

From pushover, the open-source browser port and its reverse-engineering notes:

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