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

SPR files

From Creatures Wiki
Jump to navigation Jump to 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. A variant format, also using the extension .spr, was used in old pre-Creatures-1 prototypes.

You can find the file naming convention here.

File Format[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
type description
uint16 number of images in the file
uint32 offset to first image
uint16 width of first image
uint16 height of first image
... offset, width, and height of rest of images
image width * image height Data for first image. Each byte is a reference to palette colour id, 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.
... data for rest of images

Creatures prototypes[edit]

Prototypes prior to Creatures 1 used a slightly different format, with smaller integer encodings. No utilities can currently view or edit these.

size description
uint16 number of images in the file
uint16 offset to first image
uint8 width of first image
uint8 height of first image
... offset, width, and height of rest of images
image width * image height Data for first image. Each byte is a reference to palette colour id, 0 to 255.
... data for rest of images

Utilities[edit]

The following utilities can be used to edit SPR files:

References[edit]

See Also[edit]

External Links[edit]