Difference between revisions of "SCI/Specifications/Graphics/SCI0 view resource"
< SCI | Specifications | Graphics
Jump to navigation
Jump to search
(Merging of the SCI documentation) |
(No difference)
|
Latest revision as of 12:06, 6 January 2009
The SCI0 View Resource
In SCI0, Views are collections of images or sprites. Each View resource contains a number of groups, which, in turn, contain one or more images. Usually, those groups contain a number of consecutive animation frames. It appears to be customary to store related animations or images in a single frame. For example, the basic movements of all protagonists (four or eight animation cycles (depending on the game)) are stored inside of a single View resource. Please note that the byte order of the following data is always little endian.
The View Resource
- 0x00 - 0x01 The number of image groups available.
- 0x02 - 0x03 A bitmask containing the ’mirrored’ flag for each of the groups, with the LSB containing the ’mirrored’ flag for group 0.
- 0x04 - 0x07 - unknown -
- 0x08... A list of indices pointing to the start of the cell list for each image group. The number of entries is equal to the number of cells as described in 0x00 - 0x01.
Cell List
- 0x00 - 0x01 The number of image cells available for this group.
- 0x02 - 0x03 - unknown -
- 0x04... A list of 16 bit pointers indexing the start of the image cell structure for each image cell. The pointers are relative to the beginning of the resource data.
Image Cell
- 0x00 - 0x01 The horizontal (X) size of the image.
- 0x02 - 0x03 The vertical (Y) size of the image.
- 0x04 The x placement modifier. This signed value determines the number of pixels a view cell is moved to the right before it is drawn.
- 0x05 The y placement modifier. This signed value determines the number of pixels a view cell is moved downwards before it is drawn.
- 0x06 The color key, i.e. the color number used for transparency in this cell.
- 0x07... A list of combined color/repeat count entries. Each byte contains a color entry (low nibble) and a repeat count (high nibble). If the color is equal to the color key from index 0x06, then no drawing should be performed, although [repeat] pixels still need to be skipped. It is not known whether this list is terminated; the FreeSCI drawing algorithm stops drawing as soon as the rectangle defined in the first two cell entries has been filled.