Welcome to the Creatures Wiki! Log in and join the community.

SPR files

From Creatures Wiki
(Redirected from .spr)
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 edited with Creature Labs' Sprite Workshop, BoBCoB Sprite Editor, and previewed in Windows using GreenReaper's Sprite Thumbnail Viewer.

You can find the file naming convention here.

Overview[edit]

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[edit]

  • uint16: Number of images in the file

Image header[edit]

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[edit]

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[edit]

The following utilities can be used to edit SPR files:

References[edit]

See Also[edit]

External Links[edit]