SPR files

From Creatures Wikia

Jump to: navigation, search

The .spr Sprite image file extension is associated with Creatures 1. These files store a number of images with 8-bit color, so each COB usually only needs one SPR file. They can be viewed and with BoBCoB Sprite Editor, and previewed in Windows using GreenReaper's Sprite Thumbnail Viewer.

You can find the file naming convention here.

Overview

An SPR file consists of three distinct parts:

  1. A header, containing information about the file
  2. Image headers, one for each image
  3. The image data

File header

  • uint16: Number of images in the file

Image header

Then, for each image, there is an image header containing:

  • uint32: Offset to beginning of first line in image data
  • uint16: Image width in pixels
  • uint16: Image height in pixels

Image data

For each of the specified number (i.e. image width * image height) of pixels in each image:

  • uint16: Reference to palette colour id, one byte, 0 to 255

The actual image data is simply color indexes arranged into horizontal scanlines. The mappings between color indices and 256 RGB colors is given in the PALETTE.DTA file; Multiply the red, green and blue results returned by 4 to gain the full colour range.

Utilities

The following utilities can be used to edit SPR files:

References

See Also

Personal tools