Difference between revisions of "S16 files"
(Update file format table) |
|||
Line 12: | Line 12: | ||
#The image data | #The image data | ||
− | = | + | {| border="1" |
− | + | |- | |
− | + | !     type     !! description | |
+ | |- | ||
+ | | File header || | ||
+ | |- | ||
+ | |     uint32 || RGB pixel format: 0=[[555/565|555]], 1=[[555/565|565]], 0x1000000=[[M16 file|M16 file (big-endian 555)]] | ||
+ | |- | ||
+ | |     uint16 || Number of images | ||
+ | |- | ||
+ | | Image headers || | ||
+ | |- | ||
+ | |     uint32 || Image #1: Offset to beginning of first line in image data | ||
+ | |- | ||
+ | |     uint16 || Image #1: width in pixels | ||
+ | |- | ||
+ | |     uint16 || Image #1: height in pixels | ||
+ | |- | ||
+ | |     ... || Repeat for each image | ||
+ | |- | ||
+ | | Image data || | ||
+ | |- | ||
+ | |     uint16[image width * image height] || Image #1: Data | ||
+ | |- | ||
+ | |     ... || Repeat for each image | ||
+ | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== M16 files == | == M16 files == | ||
− | '''.m16 files''' are a variant of S16 files used by the [[Macintosh Creatures Evolution Engine]]. All values in theses files are big-endian, rather than little-endian. They can be identified as the first 32-bit little-endian value is equal to 0x1000000 (i.e. the big-endian encoding of the value 0x1). They use the RGB555 format. | + | '''.m16 files''' are a variant of S16 files used by the [[Macintosh Creatures Evolution Engine]]. All values in theses files are [[Wikipedia:Endianness|big-endian]], rather than little-endian. They can be identified as the first 32-bit little-endian value is equal to 0x1000000 (i.e. the big-endian encoding of the value 0x1). They use the [[555/565|RGB555]] format. |
==Related Links== | ==Related Links== |
Revision as of 21:14, 21 December 2021
.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' Sprite Workshop, 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:
- A header, containing information about the file
- Image headers, one for each image
- The image data
type | description |
---|---|
File header | |
uint32 | RGB pixel format: 0=555, 1=565, 0x1000000=M16 file (big-endian 555) |
uint16 | Number of images |
Image headers | |
uint32 | Image #1: Offset to beginning of first line in image data |
uint16 | Image #1: width in pixels |
uint16 | Image #1: height in pixels |
... | Repeat for each image |
Image data | |
uint16[image width * image height] | Image #1: Data |
... | Repeat for each image |
M16 files
.m16 files are a variant of S16 files used by the Macintosh Creatures Evolution Engine. All values in theses files are big-endian, rather than little-endian. They can be identified as the first 32-bit little-endian value is equal to 0x1000000 (i.e. the big-endian encoding of the value 0x1). They use the RGB555 format.