ScummVM API documentation

Description

Modules

 Vocabulary resources in SCI
 

Typedefs

typedef Common::Array< KernelFunctionSci::Kernel::KernelFunctionArray
 

Functions

 Sci::Kernel::Kernel (ResourceManager *resMan, SegManager *segMan)
 
uint Sci::Kernel::getSelectorNamesSize () const
 
const Common::StringSci::Kernel::getSelectorName (uint selector)
 
int Sci::Kernel::findKernelFuncPos (Common::String kernelFuncName)
 
uint Sci::Kernel::getKernelNamesSize () const
 
const Common::StringSci::Kernel::getKernelName (uint number) const
 
Common::String Sci::Kernel::getKernelName (uint number, uint subFunction) const
 
int Sci::Kernel::findSelector (const char *selectorName) const
 
void Sci::Kernel::dissectScript (int scriptNumber, Vocabulary *vocab)
 
void Sci::Kernel::dumpScriptObject (const SciSpan< const byte > &script, SciSpan< const byte > object)
 
void Sci::Kernel::dumpScriptClass (const SciSpan< const byte > &script, SciSpan< const byte > clazz)
 
bool Sci::Kernel::signatureMatch (const uint16 *sig, int argc, const reg_t *argv)
 
void Sci::Kernel::signatureDebug (Common::String &signatureDetails, const uint16 *sig, int argc, const reg_t *argv)
 
uint16 Sci::Kernel::findRegType (reg_t reg)
 
Common::String Sci::Kernel::lookupText (reg_t address, int index)
 
void Sci::Kernel::loadKernelNames (GameFeatures *features)
 

Variables

KernelFunctionCall * Sci::KernelSubFunction::function
 
const char * Sci::KernelSubFunction::name
 
uint16 * Sci::KernelSubFunction::signature
 
const SciWorkaroundEntrySci::KernelSubFunction::workarounds
 
bool Sci::KernelSubFunction::debugLogging
 
bool Sci::KernelSubFunction::debugBreakpoint
 
KernelFunctionCall * Sci::KernelFunction::function
 
const char * Sci::KernelFunction::name
 
uint16 * Sci::KernelFunction::signature
 
const SciWorkaroundEntrySci::KernelFunction::workarounds
 
KernelSubFunctionSci::KernelFunction::subFunctions
 
uint16 Sci::KernelFunction::subFunctionCount
 
SelectorCache Sci::Kernel::_selectorCache
 
KernelFunctionArray Sci::Kernel::_kernelFuncs
 

Function Documentation

◆ Kernel()

Sci::Kernel::Kernel ( ResourceManager resMan,
SegManager segMan 
)

Initializes the SCI kernel.

◆ findSelector()

int Sci::Kernel::findSelector ( const char *  selectorName) const

Determines the selector ID of a selector by its name.

Parameters
selectorNameName of the selector to look up
Returns
The appropriate selector ID, or -1 on error

◆ signatureMatch()

bool Sci::Kernel::signatureMatch ( const uint16 *  sig,
int  argc,
const reg_t argv 
)

Determines whether a list of registers matches a given signature. If no signature is given (i.e., if sig is NULL), this is always treated as a match.

Parameters
sigsignature to test against
argcnumber of arguments to test
argvargument list
Returns
true if the signature was matched, false otherwise

◆ findRegType()

uint16 Sci::Kernel::findRegType ( reg_t  reg)

Determines the type of the object indicated by reg.

Parameters
regregister to check
Returns
one of KSIG_* below KSIG_NULL. KSIG_INVALID set if the type of reg can be determined, but is invalid. 0 on error.

◆ lookupText()

Common::String Sci::Kernel::lookupText ( reg_t  address,
int  index 
)

Looks up text referenced by scripts. SCI uses two values to reference to text: An address, and an index. The address determines whether the text should be read from a resource file, or from the heap. If the text is read from a resource file, then the index refers to the index of the string in the text resource. If the index does not exist in the resource, an empty string is returned.

Parameters
addressThe address to look up
indexThe relative index
Returns
The referenced text, or empty string on error.

◆ loadKernelNames()

void Sci::Kernel::loadKernelNames ( GameFeatures features)

Loads the kernel function names.

This function reads the kernel function name table from resource_map, and fills the _kernelNames array with them. The resulting list has the same format regardless of the format of the name table of the resource (the format changed between version 0 and 1).

Variable Documentation

◆ _selectorCache

SelectorCache Sci::Kernel::_selectorCache

Shortcut list for important selectors.

◆ _kernelFuncs

KernelFunctionArray Sci::Kernel::_kernelFuncs

Table of kernel functions.