S16 files

From Creatures Wikia

Jump to: navigation, search

.s16 is the extension used in S16 files, i.e. Creatures 2 image files (although they can still also be used in C3/DS). These files actually store several images, so most COBs only need one s16. They can be viewed and edited with Creature Labs' SpriteBuilder or the BoBCoB Sprite Editor, and previewed in Windows using GreenReaper's Sprite Thumbnail Viewer.

Many a developer's hour was spent editing them in an image editor and converting their well-made bitmaps into S16 files for use in-game.

You can find the file naming convention here.

Overview

An S16 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

  • uint32: RGB pixel format; 0=555, 1=565
  • uint16: Number of images

Image header

Then comes a series of 8 byte image headers, one for each sprite in the file:

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

Image data

The image data for each sprite simply consists of the specified number (i.e. image width * image height) of uint16 colour pixels.

Related Links

External links

Personal tools