Home | SCI Documentation | SCI Tutorials | SCI Tools | SCI Wiki | Community

The Sierra Creative Interpreter

PrevChapter 3. The Graphics subsystemNext
 

The SCI Font Resource

SCI font resources remained unchanged during the SCI revisions and were still used in SCI32. Their format is relatively straightforward and completely sufficient for any 8 or even 16 bit character table:

Table 3-1. The SCI font resource data structure

Offset Type Meaning
0 16 bit integer, little endian encoding Always zero (?)
2 16 bit integer, little endian encoding NUMCHAR: Number of characters
4 16 bit integer, little endian encoding HEIGHT: Number of pixel lines per text line
6 + NR * 2 16 bit integer, little endian encoding Absolute offset of the character #NR, where 0 <= NR < NUMCHAR
 

HEIGHT does not affect the height of a character, though- it only tells the interpreter how far to move downwards when displaying a line of text. The characters referenced to starting at offset 6 are encoded as follows:

Table 3-2. The SCI font resource character data structure

Offset Type Meaning
0 unsigned 8 bit integer character HEIGHT
1 unsigned 8 bit integer character WIDTH
2... bitmask, size HEIGHT * round_up(WIDTH / 8) Bitmask for the character
 

The bitmap consists of HEIGHT lines of n bytes, where n equals the number of bytes required for storing WIDTH bits. Data is stored with the MSB first, in little-endian encoding (first byte describes the 8 leftmost pixels), where a pixel is drawn iff the bit it corresponds to is set.
 


Prev - The SCI0 View ResourceHomeNext - The SCI0 and SCI01 PITURE Resource
 

by helping to defray some of the costs of hosting this site. If it has been of help to you, please consider contributing to help keep it online.
Thank you.
pixe
Top

© 2013 to present The Sierra Help Pages. All rights reserved. All Sierra games, artwork and music © Sierra.