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

Difference between revisions of "S16 files"

From Creatures Wiki
Jump to navigation Jump to search
 
(modified RGB555 -> RGB5551)
 
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
S16 files were the image files of C2.  Many a developer's hour was spent editing them in an image editor and converting their well-made bitmaps into S16 files for use ingame.
+
.s16 is the extension used in '''S16 files''', i.e. [[Creatures 2]] [[sprite|image]] files (although they can still also be used in C3/DS).  These files actually store several images, so most [[COB]]s only need one s16.  They can be viewed and edited with [[Creature Labs]]' [[Sprite Workshop]], [[SpriteBuilder]] or the [[BoBCoB|BoBCoB Sprite Editor]], and previewed in Windows using [[GreenReaper|GreenReaper's]] [[Sprite Thumbnail Viewer]].   
 +
__NOTOC__
 +
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 [[Sprite|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
 +
 
 +
{| border="1"
 +
|-
 +
!      type      !! description
 +
|-
 +
| File header ||
 +
|-
 +
|     uint32 || RGB pixel format: 0=[[555/565|555]], 1=[[555/565|565]], 0x1000000=[[#M16_and_N16_files|N16]], 0x3000000=[[#M16_and_N16_files|M16]]
 +
|-
 +
|     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 and N16 files ==
 +
 
 +
'''.m16 files''' and '''.n16 files''' are variants 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 for N16 files (i.e. the big-endian encoding of the value 0x1), or 0x3000000 for M16 files (the big-endian encoding of the value 0x3; the fact that 0x3 typically denotes a [[C16 file]] might imply that M16s were originally planned on being big-endian counterparts of C16s). Both file types use the Macintosh CEE-specific [[555/565|RGB5551]] format.
 +
 
 +
==Related Links==
 +
*[[555/565]]
 +
*[[SPR files]]
 +
*[[C16 files]]
 +
*[[:Category:S16 Files|S16 Files hosted on the Creatures Wiki]]
 +
 
 +
==External links==
 +
*[http://www.double.co.nz/creatures/creatures2/s16format.htm Great explanation and an example of how to work with s16 and 555/565] at [[The Creatures Developer Resource]]
 +
[[Category:File formats]]
 +
[[Category:Sprites]]

Latest revision as of 16:11, 9 July 2022

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

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
    type     description
File header
    uint32 RGB pixel format: 0=555, 1=565, 0x1000000=N16, 0x3000000=M16
    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 and N16 files[edit]

.m16 files and .n16 files are variants 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 for N16 files (i.e. the big-endian encoding of the value 0x1), or 0x3000000 for M16 files (the big-endian encoding of the value 0x3; the fact that 0x3 typically denotes a C16 file might imply that M16s were originally planned on being big-endian counterparts of C16s). Both file types use the Macintosh CEE-specific RGB5551 format.

Related Links[edit]

External links[edit]