Welcome to the Creatures Wiki! Log in and join the community.
SPR files
Revision as of 16:31, 4 July 2022 by Sg the bee (talk | contribs) (Add Spritist to list of utilities to edit SPR files, and mention it can view prototype SPR files as well.)
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:
- A header, containing information about the file
- Image headers, one for each image
- 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. Spritist can be used to view them and convert them to other formats.
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]
- C16 files
- S16 files
- Sprite Thumbnail Viewer - Windows