Author Topic: SCI Version 0 Font Resource Specs  (Read 2573 times)

0 Members and 1 Guest are viewing this topic.

Offline Cloudee1

SCI Version 0 Font Resource Specs
« on: May 23, 2013, 09:55:46 PM »
By Rainer De Temple

Header
ByteSpecification
0Resource Type(87)
1-3Always 0 (Unused in this type)
4-5Number of chars in font (usually 0x0080)
6-7Height of font (??)
8-?Locations in file of each char - 2 (ie 0x0135 is really 0x137)
?-?Font data

Character
ByteSpecification
0Width of char
1Height of char
2-?Binary data of font, 1 byte per row if width < 0x0A else 2 bytes


Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline Collector

Re: SCI Version 0 Font Resource Specs
« Reply #1 on: May 24, 2013, 12:56:47 AM »
Were these from the help file or have you found some other documentation?
KQII Remake Pic

Offline Cloudee1

Re: SCI Version 0 Font Resource Specs
« Reply #2 on: May 24, 2013, 05:05:28 PM »
Ultimate AGI SCI site of Brian's from the wayback machine. I've got a couple more specs to toss up here when I get a chance. I had them in a word file and I'm getting ready to reformat the laptop so I'm trying to tidy a little when I came across them again.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline gumby

Re: SCI Version 0 Font Resource Specs
« Reply #3 on: June 22, 2013, 04:12:58 PM »
The above specs are slightly inaccurate/incomplete.  Here's an example:

Header (in hex)
--------------------
87 00 - font resource type (2 bytes, not one)
00 00 - unused (just 2 unused bytes, always zero)
80 00 - number of chars (little endian - in this case 128 characters)
10 00 - height of font (technically, just the offset of how far do go down to the next 'line' before drawing - in this case 16 pixels)

Character address map
------------------------------
Absolute address of each character in the file.  This section will be 2 bytes per character, so in this case we have 128 * 2 bytes of data.  Note that in a patch resource these addresses will be wrong (off by 2) which is accountable for by the font resource type at the  beginning of the file (87 00).  In a resource archive, these addresses will be spot-on.

In our example, since we have 128 characters the hex address for the first character will be:
06 01 (262 in decimal) - off by two, so the actual location in the patch file is 264.

Character data
-------------------
1 byte for the width of the character
1 bytes for the height of the character
X bytes for binary data for the file.  Computed by multiplying the height by the width divided by 8 (and rounded up).

Example:
0B - width of font - (11 pixels)
10 - height of font - (16 pixels)

16 * (11/8, round up) = 16 * 2 = 32 bytes of data,  each hex value stores 8 pixels of binary font data.
« Last Edit: June 29, 2013, 12:31:23 PM by gumby »
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.106 seconds with 23 queries.