ScummVM API documentation
Sword25::Kernel Class Reference

#include <kernel.h>

Public Member Functions

uint getMilliTicks ()
 
bool getInitSuccess () const
 
ResourceManagergetResourceManager ()
 
int getRandomNumber (int min, int max)
 
GraphicEnginegetGfx ()
 
SoundEnginegetSfx ()
 
InputEnginegetInput ()
 
PackageManagergetPackage ()
 
ScriptEnginegetScript ()
 
MoviePlayergetFMV ()
 
void sleep (uint msecs) const
 
void crash () const
 

Static Public Member Functions

static KernelgetInstance ()
 
static void deleteInstance ()
 

Detailed Description

This is the main engine class

This class creates and manages all other engine components such as sound engine, graphics engine ... It is not necessary to release all the items individually, this is performed by the Kernel class.

Member Function Documentation

◆ getMilliTicks()

uint Sword25::Kernel::getMilliTicks ( )

Returns the elapsed time since startup in milliseconds

◆ getInitSuccess()

bool Sword25::Kernel::getInitSuccess ( ) const
inline

Specifies whether the kernel was successfully initialized

◆ getResourceManager()

ResourceManager* Sword25::Kernel::getResourceManager ( )
inline

Returns a pointer to the BS_ResourceManager

◆ getRandomNumber()

int Sword25::Kernel::getRandomNumber ( int  min,
int  max 
)

Returns a random number

Parameters
MinThe minimum allowed value
MaxThe maximum allowed value

◆ getGfx()

GraphicEngine* Sword25::Kernel::getGfx ( )

Returns a pointer to the active Gfx Service, or NULL if no Gfx service is active

◆ getSfx()

SoundEngine* Sword25::Kernel::getSfx ( )

Returns a pointer to the active Sfx Service, or NULL if no Sfx service is active

◆ getInput()

InputEngine* Sword25::Kernel::getInput ( )

Returns a pointer to the active input service, or NULL if no input service is active

◆ getPackage()

PackageManager* Sword25::Kernel::getPackage ( )

Returns a pointer to the active package manager, or NULL if no manager is active

◆ getScript()

ScriptEngine* Sword25::Kernel::getScript ( )

Returns a pointer to the script engine, or NULL if it is not active

◆ getFMV()

MoviePlayer* Sword25::Kernel::getFMV ( )

Returns a pointer to the movie player, or NULL if it is not active

◆ sleep()

void Sword25::Kernel::sleep ( uint  msecs) const

Pauses for the specified amount of time

Parameters
MsecsThe amount of time in milliseconds

◆ getInstance()

static Kernel* Sword25::Kernel::getInstance ( )
inlinestatic

Returns the singleton instance for the kernel

◆ deleteInstance()

static void Sword25::Kernel::deleteInstance ( )
inlinestatic

Destroys the kernel instance This method should only be called when the game is ended. No subsequent calls to any kernel methods should be done after calling this method.

◆ crash()

void Sword25::Kernel::crash ( ) const
inline

Raises an error. This method is used in crashing testing.


The documentation for this class was generated from the following file: