ScummVM
Sky::SkyEngine Class Reference

#include <sky.h>

Inheritance diagram for Sky::SkyEngine:
Collaboration diagram for Sky::SkyEngine:

Public Member Functions

 SkyEngine (OSystem *syst)
 
virtual ~SkyEngine ()
 
virtual void syncSoundSettings ()
 Notify the engine that the sound settings in the config manager may have changed and that it hence should adjust any internal volume etc. More...
 
Common::Error loadGameState (int slot)
 Load a game state. More...
 
Common::Error saveGameState (int slot, const Common::String &desc)
 Save a game state. More...
 
bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
 
bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
 
- Public Member Functions inherited from Engine
void pauseEngine (bool pause)
 Pause or resume the engine. More...
 
bool isPaused () const
 Return whether the engine is currently paused or not. More...
 
void openMainMenuDialog ()
 Run the Global Main Menu Dialog. More...
 
uint32 getTotalPlayTime () const
 Get the total play time. More...
 
void setTotalPlayTime (uint32 time=0)
 Set the game time counter to the specified time. More...
 
Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
Common::SaveFileManagergetSaveFileManager ()
 
void checkCD ()
 On some systems, check if the game appears to be run from CD. More...
 
 Engine (OSystem *syst)
 
virtual ~Engine ()
 
virtual void initializePath (const Common::FSNode &gamePath)
 Init SearchMan according to the game path. More...
 
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 Prepare an error string, which is printed by the error() function. More...
 
virtual void initKeymap ()
 
virtual void deinitKeymap ()
 
virtual void flipMute ()
 Flip mute all sound option. More...
 
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
 

Static Public Member Functions

static bool isDemo ()
 
static bool isCDVersion ()
 
static voidfetchItem (uint32 num)
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 Request the engine to quit. More...
 
static bool shouldQuit ()
 Return whether the ENGINE should quit respectively should return to the launcher. More...
 
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
 

Static Public Attributes

static void_itemList [300]
 
static SystemVars _systemVars = {0, 0, 0, 0, 4316, 0, 0, false, false }
 

Protected Member Functions

Common::Error init ()
 
Common::Error go ()
 
virtual Common::Error run ()
 Init the engine and start its main loop. More...
 
virtual GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 
virtual bool hasFeature (EngineFeature f) const
 Determine whether the engine supports the specified feature. More...
 
void delay (int32 amount)
 
void handleKey ()
 
void initItemList ()
 
void initVirgin ()
 
void loadFixedItems ()
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
bool shouldPerformAutoSave (int lastSaveTime)
 Indicate whether an autosave should be performed. More...
 
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 

Protected Attributes

Common::KeyState _keyPressed
 
Sound_skySound
 
Disk_skyDisk
 
Text_skyText
 
Logic_skyLogic
 
Mouse_skyMouse
 
Screen_skyScreen
 
Control_skyControl
 
SkyCompact_skyCompact
 
Debugger_debugger
 
MusicBase_skyMusic
 
byte _fastMode
 
uint32 _lastSaveTime
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsJoystick
}
 A feature in this context means an ability of the engine which can be either available or not. More...
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Detailed Description

Definition at line 64 of file sky.h.

Constructor & Destructor Documentation

◆ SkyEngine()

Sky::SkyEngine::SkyEngine ( OSystem syst)

Definition at line 73 of file sky.cpp.

◆ ~SkyEngine()

Sky::SkyEngine::~SkyEngine ( )
virtual

Definition at line 77 of file sky.cpp.

Member Function Documentation

◆ canLoadGameStateCurrently()

bool Sky::SkyEngine::canLoadGameStateCurrently ( )
virtual

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 342 of file detection.cpp.

◆ canSaveGameStateCurrently()

bool Sky::SkyEngine::canSaveGameStateCurrently ( )
virtual

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 346 of file detection.cpp.

◆ delay()

void Sky::SkyEngine::delay ( int32  amount)
protected

Definition at line 389 of file sky.cpp.

◆ fetchItem()

void * Sky::SkyEngine::fetchItem ( uint32  num)
static

Definition at line 385 of file sky.cpp.

◆ getDebugger()

GUI::Debugger * Sky::SkyEngine::getDebugger ( )
protectedvirtual

Return the engine's debugger instance, if any.

Used by error() to invoke the debugger when a severe error is reported.

Reimplemented from Engine.

Definition at line 110 of file sky.cpp.

◆ go()

Common::Error Sky::SkyEngine::go ( )
protected

Definition at line 163 of file sky.cpp.

◆ handleKey()

void Sky::SkyEngine::handleKey ( )
protected

Definition at line 119 of file sky.cpp.

◆ hasFeature()

bool Sky::SkyEngine::hasFeature ( EngineFeature  f) const
protectedvirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 110 of file detection.cpp.

◆ init()

Common::Error Sky::SkyEngine::init ( void  )
protected

Definition at line 255 of file sky.cpp.

◆ initItemList()

void Sky::SkyEngine::initItemList ( )
protected

Definition at line 359 of file sky.cpp.

◆ initVirgin()

void Sky::SkyEngine::initVirgin ( )
protected

Definition at line 114 of file sky.cpp.

◆ isCDVersion()

bool Sky::SkyEngine::isCDVersion ( )
static

Definition at line 450 of file sky.cpp.

◆ isDemo()

bool Sky::SkyEngine::isDemo ( )
static

Definition at line 431 of file sky.cpp.

◆ loadFixedItems()

void Sky::SkyEngine::loadFixedItems ( )
protected

Definition at line 366 of file sky.cpp.

◆ loadGameState()

Common::Error Sky::SkyEngine::loadGameState ( int  slot)
virtual

Load a game state.

Parameters
slotthe slot from which a savestate should be loaded
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 315 of file detection.cpp.

◆ run()

virtual Common::Error Sky::SkyEngine::run ( )
inlineprotectedvirtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 103 of file sky.h.

◆ saveGameState()

Common::Error Sky::SkyEngine::saveGameState ( int  slot,
const Common::String desc 
)
virtual

Save a game state.

Parameters
slotthe slot into which the savestate should be stored
desca description for the savestate, entered by the user
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 320 of file detection.cpp.

◆ syncSoundSettings()

void Sky::SkyEngine::syncSoundSettings ( )
virtual

Notify the engine that the sound settings in the config manager may have changed and that it hence should adjust any internal volume etc.

values accordingly. The default implementation sets the volume levels of all mixer sound types according to the config entries of the active domain. When overwriting, call the default implementation first, then adjust the volumes further (if required).

Note
When setting volume levels, respect the "mute" config entry.
The volume for the plain sound type is reset to the maximum volume. If the engine can associate its own value for this type, it needs to overwrite this member and set it accordingly.
Todo:
find a better name for this

Reimplemented from Engine.

Definition at line 94 of file sky.cpp.

Member Data Documentation

◆ _debugger

Debugger* Sky::SkyEngine::_debugger
protected

Definition at line 76 of file sky.h.

◆ _fastMode

byte Sky::SkyEngine::_fastMode
protected

Definition at line 113 of file sky.h.

◆ _itemList

void * Sky::SkyEngine::_itemList
static

Definition at line 95 of file sky.h.

◆ _keyPressed

Common::KeyState Sky::SkyEngine::_keyPressed
protected

Definition at line 66 of file sky.h.

◆ _lastSaveTime

uint32 Sky::SkyEngine::_lastSaveTime
protected

Definition at line 118 of file sky.h.

◆ _skyCompact

SkyCompact* Sky::SkyEngine::_skyCompact
protected

Definition at line 75 of file sky.h.

◆ _skyControl

Control* Sky::SkyEngine::_skyControl
protected

Definition at line 74 of file sky.h.

◆ _skyDisk

Disk* Sky::SkyEngine::_skyDisk
protected

Definition at line 69 of file sky.h.

◆ _skyLogic

Logic* Sky::SkyEngine::_skyLogic
protected

Definition at line 71 of file sky.h.

◆ _skyMouse

Mouse* Sky::SkyEngine::_skyMouse
protected

Definition at line 72 of file sky.h.

◆ _skyMusic

MusicBase* Sky::SkyEngine::_skyMusic
protected

Definition at line 78 of file sky.h.

◆ _skyScreen

Screen* Sky::SkyEngine::_skyScreen
protected

Definition at line 73 of file sky.h.

◆ _skySound

Sound* Sky::SkyEngine::_skySound
protected

Definition at line 68 of file sky.h.

◆ _skyText

Text* Sky::SkyEngine::_skyText
protected

Definition at line 70 of file sky.h.

◆ _systemVars

SystemVars Sky::SkyEngine::_systemVars = {0, 0, 0, 0, 4316, 0, 0, false, false }
static

Definition at line 97 of file sky.h.


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