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

The Sierra Creative Interpreter

PrevChapter 7. FreeSCINext
 

Header Files

This section explains what some of the header files are good for.
 

Core headers

The following headers provide what should be considered core functionality:
 

scitypes.h

This file, included from resource.h, provides some of the basic types used in FreeSCI, including some of the types used for specific functions, but also the gu?int(8|16|32) types, which provide (unsigned) types for 8, 16, and 32 bits.
 

resource.h

The main OS abstraction header file; includes scitypes.h and provides functions for the following: Queues, memory checks, time inspection, directory traversion, case-insensitive file opening, the 'sciprintf()' function, which is the primary output function in FreeSCI, functions to retreive the user's home directory and the cwd, to create a complete path in the file system, yield to the scheduler (where possible) or trigger a breakpoint.
 

sci_conf.h

In here, the configuration options (as parsed from the ~/.freesci/config file) are listed in a structure; includes function definitions for handling configuration.
 

versions.h

Lists certain SCI versions and functions/macros to examine these versions. Some kernel functions have bugs or changed their behavior in some versions of SCI; these version numbers should be listed in this file.
 

sciresource.h

Provides definitions, strings, and functions for SCI resource management, including the resource manager function prototypes.
 

sci_memory.h

Prototypes for the sci_alloc(), sci_free() etc. functions for memory management, plus the debug switches available for them.
 

console.h

Prototypes for the SCI console, including functions to hook up SCI console functions and variables.
 

sbtree.h

This header file is only used by the gfx subsystem right now. It provides statically generated binary trees.
 

VM headers

The most central VM header file is engine.h, which contains the state_t structure and several global definitions related to savegame and general path management. This file includes a number of other headers, including the following core VM ones.
 

script.h

Provides definitions for opcodes and script segment types.
 

vm.h

Definitions for handling objects on the heap, script and class objects, the selector map, execution stack and breakpoint typedefs, a few global variables for debugging the VM, functions for initializing and running it, for looking up selectors in an object, to save and load the game state and pretty much everything else that involves running SCI scripts.
 

heap.h

Prototypes and definitions for FreeSCI's SCI heap implementation.
 

vocabulary.h

This header file provides definitions and declares functions for decoding vocab resources, from parser rules to VM opcode names to selector names. It also lists explains the functions used for parsing.
 

kdebug.h

Provides the SCIkdebug() and SCIkwarn() functions (and their arguments) for selectively debugging kernel functions.
 

kernel.h

Provides GET_HEAP(), PUT_HEAP(), GET_SELECTOR() etc., also predicates to determine whether heap objects are lists and objects, and a generic text resource lookup function that distinguishes between heap text data and text resources. Also includes priority band information, view signals, and other definitions for kernel functions, plus a listing of all kernel functionality.
 

menubar.h

In here, functions for handling menu bar objects are described, as are a number of constants and values that can be used to customize menu bar displaying. The menubar functions call some gfx functions, but are themselves called from the kernel's menubar handling functions.
 

sci_graphics.h

Provides the SELECTOR_STATE and MAX_TEXT_WIDTH definitions for a number of graphical kernel functions.
 

Graphics subsystem headers

The gfx subsystem's functionality is described in the Section called The graphics subsystem>. Most of the header files it uses are prefixed with "gfx_".
 

gfx_system.h

Provides debug functionality, the core data types (points, rectangles, pixmaps, etc), rectangle and point operations (inlined) and enums and definitions for more complex functions.
 

uinput.h

Describes input events (type, modifiers, etc).
 

gfx_driver.h

Documents the gfx_driver_t structure, and the functions and capability flags it can/must provide.
 

gfx_options.h

This file covers configuration options that can be provided to the gfx subsystem's operational layer. It defines a structure that is also used by sci_conf.h.
 

gfx_widgets.h

Describes graphical widgets and the functionality they provide, including constructors for each widget.
 

gfx_state_internal.h

This file covers the "hidden" (non-public) part of graphical widgets and includes many gory details regarding their implementation.
 

sci_widgets.h

Provides more complex widgets that are specific to the needs of SCI.
 

gfx_tools.h

Provides utility functions, primarily for gfx driver writers, but also some functions used in the operational layer.
 

gfx_resmgr.h

Describes the gfx subsystem's resource manager's functions, as used by the operational layer, and prototypes for functions implemented by the interpreter specific part.
 

gfx_resource.h

Functions for operating on gfx resources in general, and also functions for loading/drawing particular resources.
 

gfx_operations.h

Describes the operational layer of the gfx subsystem. Provides an extensive set of 2D graphics functionality.


Prev - The Built-in DebuggerHomeNext - Savegames
 

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.