cowlark.com
|
SLOB filesIntroductionSLOB files are used by Skim to store intermediate data while working on SCUMM files. Each file can contain one or more SCUMM resources, plus metadata used to describe the resources to the linker and to tell the linker which other resources the SLOB file refers to. SLOB files have the following format:
Size Type Description
8 chunk tag Slob chunk tag
chunk SVer chunk
chunk Data chunk
chunks... fixup chunks
SVer: Size Type Description 8 chunk tag Sver chunk tag 1 byte SCUMM major version 1 byte SCUMM minor version 1 byte Skim major version 1 byte Skim minor version Data:
Size Type Description
8 chunk tag Data chunk tag
chunk any SCUMM chunk
Fixup chunksThere are two kind of fixup chunks. OInd is used to inform the linker that the SLOB file contains an exported resource; OFix is used to inform the linker that the SLOB file is referring to another resource, and which the linker needs to insert references to when the SLOB file is linked. The linker refers to named resources by name and class. The name can be any short string, although the Skim compiler will have trouble if the name is not a valid C identifier. When the files are linked, the linker will choose a resource number and patch all the resources that referenced that particular named resource to use it. It is also possible to patch in an offset to a resource relative to another resource. Each resource class has its own namespace, so char largetext and scrp largetext will not conflict. This mechanism is also used to manage word and bit variables for use in scripts. OInd --- named resource declaration
Size Type Description
8 chunk tag OInd chunk tag
2 word LE desired resource number
bytes... zero-terminated path
1 byte resource class
bytes... zero-terminated resource name
This chunk notifies Skim that the given resource is a named resource. The path given is relative to the Data chunk (so a path of / --- which is invalid --- refers to the Data chunk itself). The resource type is a standard SCUMM resource class, or an extension (of which more later). The resource number should be -1 if the linker is to choose a resource number when the final link is done, or else the number can be explicitly specified. Attempting to link two SLOB files that contain the same resource name with conflicting explicit object numbers will cause an error. A negative object number indicates that you don't care about the actual number. The linker is free to use any number to represent these, provided they're consistent, and to renumber them as required when linking together two different SLOB files. The object name is a string containing the name of the object, which is used to distinguish dynamically numbered objects. This is also used to keep track of other entities by use of special object types.
When these are used, the resource path is ignored. OFix --- named resource fixup
Size Type Description
8 chunk tag OInd chunk tag
4 quad LE offset into destination resource
1 byte action
1 byte fixup type
bytes... zero-terminated path of destination resource
1 byte byte C
bytes... zero-terminated string S1
bytes... zero-terminated string S2
The actual action taken is as follows:
When action is 2, the fixup byte is interpreted as follows:
|
All material © 2000-2002 David Given, unless where stated otherwise.
This page last updated on 2002-09-18 23:05:19.000000000 +0100 scumm/slob.ns .