SCI Kernel Documentation/Resource Functions
Resource Functions
Resources are the various components of a game: views, pictures, scripts, etc. and, except for the MEMORY resource, reside on disk, waiting to be loaded when needed. Resources are handled automatically by the kernel, but several functions are provided to allow the programmer a bit more control over how the handling is done.
(Load resType resID)
Loads a resource of type resType and ID (number) resID into hunk space. While any attempt to use a resource which is not loaded will cause the resource to be loaded, it is not generally a good idea to rely on this as it may cause a disk-access delay in the midst of a crucial animation sequence. It is best to do an explicit Load of all resources during the initialization phase of a room to insure that everything is in memory. The resource types are:
VIEW
PICTURE
SCRIPT
TEXT
SOUND
MEMORY (used internally by the kernel)
VOCAB (used internally by the kernel)
FONT
CURSOR
Example: (Load SCRIPT forest) loads the script whose number is in the variable forest into memory.
(UnLoad resType resID)
- Notes
< Previous: SCI OverviewNext: List Functions >