SCI/FreeSCI/Header files/VM headers

From ScummVM :: Wiki
Jump to navigation Jump to search

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.