SPK Format

SPK files are the star backgrounds of the Space tileset in StarCraft I.

Layer count

Offset
0x0000
Length
2 bytes
Description
Number of layers.
Values
Integer value between 0 and 65535.

Image count for each layer

Image count

Offset
0x0002
Length
2 bytes
Description
Number of images in the current layer.
Values
Integer value between 0 and 65535.

Star data for each layer

Star X position

Offset
Variable
Length
2 bytes
Description
X position of the current star.
Values
Integer value between 0 and 65535.

Star Y position

Offset
Variable
Length
2 bytes
Description
Y position of the current star.
Values
Integer value between 0 and 65535.

Bitmap offset

Offset
Variable
Length
4 bytes
Description
Offset to the image data.
Values
Integer value between 0 and 4294967295.

Bitmap data for each star in each layer

Bitmap width

Offset
Variable
Length
2 bytes
Description
Width of the image in pixels.
Values
Integer value between 0 and 65535.

Bitmap height

Offset
Variable
Length
2 bytes
Description
Height of the image in pixels.
Values
Integer value between 0 and 65535.

Bitmap data

Offset
Variable
Length
bitmap width * bitmap height
Description
Image data. Each byte is an offset to a palette image.
Values
Each byte is an index value between 0 and 255.