Stargunner Sprites Format
The Stargunner Sprites Format is used by Stargunner to store the graphics used to draw various objects.
There is no signature, but careful parsing of the fields to ensure they have expected values can allow files to be detected. There is no data trailing the pixelData field, so if this field ends right at the end of the file, it is highly probable the file is in this format.
The file begins with short header, followed by index table and raw pixels data
|UINT32LE||DWORD1||Unknown. same as NUM|
|UINT32LE||PAYLOAD||Length of pixel data|
|UINT32LE||NUM||Number of sprites in this file|
Just after the header there are NUM of sprite descriptors. Every sprite descriptor is 40 bytes long
|UINT32LE||INDEX||Index number of this sprite|
|UINT32LE||W||Width of this sprite in pixels (only low 16 bits are set)|
|UINT32LE||H||Height of this sprite in pixels (only low 16 bits are set)|
|INT32LE||UNK1||Unknown - roughly is W/2|
|INT32LE||UNK2||Unknown - roughly is H/2|
|INT32LE||UNK3||Unknown - may be negative|
|UINT32LE||OFFSET1||Offset to the data in the payload area|
Just after the end of the sprite descriptors is the payload area. It starts at 3*sizeof(UINT32) + 40*NUM from the beginning of the file. Every offset in the sprite descriptor is relative to the payload area. Sprites are stored as 8-bit play VGA image of W*H size