Sprite table is employed to define a few metadata of the sprites found in a sprite file of the original Deadlock and its sequel (every known version on every platform). It involves the image dimensions, offset of the raw file and the relative position to be drawn.
Each tuple of the "spritetable" was named "spriteinfo". Technically, "spritetable" is an array of that structure.
The "spriteinfo" structure is 128 bit long defined as follows:
Size (bits) | Signed | Type | Name |
---|---|---|---|
16 | Yes | Integer | X Position |
16 | Yes | Integer | Y Position |
16 | No | Integer | Width |
16 | No | Integer | Height |
32 | -- | -- | Padding |
32 | No | Integer | Offset |
The "spriteinfo" structure is 128 bit long defined as follows:
Size (bits) | Signed | Type | Name |
---|---|---|---|
16 | No | Integer | Width |
16 | No | Integer | Height |
32 | -- | -- | Padding |
32 | No | Integer | Offset |
16 | Yes | Integer | X Position |
16 | Yes | Integer | Y Position |
/** spriteinfo structure, * Each line represents 32 bit of data.**/ typedef struct spriteinfo { #ifdef DL_1 int16_t x; int16_t y; #endif uint16_t width; uint16_t height; uint32_t padding; uint32_t offset; #ifdef DL_2 int16_t x; int16_t y; #endif } spriteinfo_t;
Platform | Sequel | Version | Container Offset | Dump Offset | Array Length | Size (bytes) |
---|---|---|---|---|---|---|
Windows | DL1 | 1.20 (pt_br) | 0x65CE0 | 0x481CE4 | 5615 | 89840 |
Windows | DL1 | 1.31 (en) | 0x67C7C | 0x481880 | 5615 | 89840 |
MacOS | DL1 | 1.0 (en) | 0xFDC66 | unknown | 5615 (guessed) | approx. 81802 (RLE compressed) |
Windows | DL2 | 1.0 Demo (en) | 0xCCE58 | unknown | 7509 | 120144 |
Windows | DL2 | 1.00 (en) | 0xD7FD8 | unknown | 7361 | 117776 |
Windows | DL2 | 1.20 (en) | 0xDBDB0 | 0x4DCFAC | 7361 | 117776 |
There is an isolated "Huh?" (0x48 0x75 0x68 0x3F) after the table finishes, always near to the ending of table.
This is common to all Deadlock versions (including MacOS and the sequel).
It has proven effective since the "Cr.", "%d", "SPRITELG.DAT" or "SPRITENW.DAT" that also happen to be close to the table are not unique and as common as the "Huh?" sequence (all case sensitive).
Decoding Project Blog: 2014/02/initial-version-of-sprite-decoder-added-to-decode-repository
Decode Wiki: Home