ScummVM
Draci::DraciEngine Class Reference

#include <draci.h>

Inheritance diagram for Draci::DraciEngine:
Collaboration diagram for Draci::DraciEngine:

Public Member Functions

 DraciEngine (OSystem *syst, const ADGameDescription *gameDesc)
 
virtual ~DraciEngine ()
 
int init ()
 
virtual Common::Error run ()
 Init the engine and start its main loop. More...
 
virtual bool hasFeature (Engine::EngineFeature f) const
 Determine whether the engine supports the specified feature. More...
 
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 
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...
 
void handleEvents ()
 
virtual Common::Error loadGameState (int slot)
 Load a game state. More...
 
virtual bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
 
virtual Common::Error saveGameState (int slot, const Common::String &desc)
 Save a game state. More...
 
virtual bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
 
GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. 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 Common::String getSavegameFile (int saveGameIdx)
 
- 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...
 

Public Attributes

Screen_screen
 
Mouse_mouse
 
Game_game
 
Script_script
 
AnimationManager_anims
 
Sound_sound
 
MusicPlayer_music
 
Font_smallFont
 
Font_bigFont
 
BArchive_iconsArchive
 
BArchive_objectsArchive
 
BArchive_spritesArchive
 
BArchive_paletteArchive
 
BArchive_roomsArchive
 
BArchive_overlaysArchive
 
BArchive_animationsArchive
 
BArchive_walkingMapsArchive
 
BArchive_itemsArchive
 
BArchive_itemImagesArchive
 
BArchive_initArchive
 
BArchive_stringsArchive
 
SoundArchive_soundsArchive
 
SoundArchive_dubbingArchive
 
bool _showWalkingMap
 
Common::RandomSource _rnd
 
int32 _pauseStartTime
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Private Attributes

DraciConsole_console
 

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...
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
bool shouldPerformAutoSave (int lastSaveTime)
 Indicate whether an autosave should be performed. More...
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Detailed Description

Definition at line 56 of file draci.h.

Constructor & Destructor Documentation

◆ DraciEngine()

Draci::DraciEngine::DraciEngine ( OSystem syst,
const ADGameDescription gameDesc 
)

Definition at line 72 of file draci.cpp.

◆ ~DraciEngine()

Draci::DraciEngine::~DraciEngine ( )
virtual

Definition at line 373 of file draci.cpp.

Member Function Documentation

◆ canLoadGameStateCurrently()

bool Draci::DraciEngine::canLoadGameStateCurrently ( )
virtual

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 474 of file draci.cpp.

◆ canSaveGameStateCurrently()

bool Draci::DraciEngine::canSaveGameStateCurrently ( )
virtual

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 483 of file draci.cpp.

◆ getDebugger()

GUI::Debugger* Draci::DraciEngine::getDebugger ( )
inlinevirtual

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 76 of file draci.h.

◆ getSavegameFile()

Common::String Draci::DraciEngine::getSavegameFile ( int  saveGameIdx)
static

Definition at line 457 of file draci.cpp.

◆ handleEvents()

void Draci::DraciEngine::handleEvents ( )

Definition at line 261 of file draci.cpp.

◆ hasFeature()

bool Draci::DraciEngine::hasFeature ( Engine::EngineFeature  f) const
virtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 111 of file draci.cpp.

◆ init()

int Draci::DraciEngine::init ( void  )

Definition at line 151 of file draci.cpp.

◆ loadGameState()

Common::Error Draci::DraciEngine::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 461 of file draci.cpp.

◆ pauseEngineIntern()

void Draci::DraciEngine::pauseEngineIntern ( bool  pause)
virtual

Actual implementation of pauseEngine by subclasses.

See there for details.

Reimplemented from Engine.

Definition at line 428 of file draci.cpp.

◆ run()

Common::Error Draci::DraciEngine::run ( )
virtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 414 of file draci.cpp.

◆ saveGameState()

Common::Error Draci::DraciEngine::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 479 of file draci.cpp.

◆ syncSoundSettings()

void Draci::DraciEngine::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 450 of file draci.cpp.

Member Data Documentation

◆ _animationsArchive

BArchive* Draci::DraciEngine::_animationsArchive

Definition at line 95 of file draci.h.

◆ _anims

AnimationManager* Draci::DraciEngine::_anims

Definition at line 82 of file draci.h.

◆ _bigFont

Font* Draci::DraciEngine::_bigFont

Definition at line 87 of file draci.h.

◆ _console

DraciConsole* Draci::DraciEngine::_console
private

Definition at line 111 of file draci.h.

◆ _dubbingArchive

SoundArchive* Draci::DraciEngine::_dubbingArchive

Definition at line 103 of file draci.h.

◆ _game

Game* Draci::DraciEngine::_game

Definition at line 80 of file draci.h.

◆ _iconsArchive

BArchive* Draci::DraciEngine::_iconsArchive

Definition at line 89 of file draci.h.

◆ _initArchive

BArchive* Draci::DraciEngine::_initArchive

Definition at line 99 of file draci.h.

◆ _itemImagesArchive

BArchive* Draci::DraciEngine::_itemImagesArchive

Definition at line 98 of file draci.h.

◆ _itemsArchive

BArchive* Draci::DraciEngine::_itemsArchive

Definition at line 97 of file draci.h.

◆ _mouse

Mouse* Draci::DraciEngine::_mouse

Definition at line 79 of file draci.h.

◆ _music

MusicPlayer* Draci::DraciEngine::_music

Definition at line 84 of file draci.h.

◆ _objectsArchive

BArchive* Draci::DraciEngine::_objectsArchive

Definition at line 90 of file draci.h.

◆ _overlaysArchive

BArchive* Draci::DraciEngine::_overlaysArchive

Definition at line 94 of file draci.h.

◆ _paletteArchive

BArchive* Draci::DraciEngine::_paletteArchive

Definition at line 92 of file draci.h.

◆ _pauseStartTime

int32 Draci::DraciEngine::_pauseStartTime

Definition at line 109 of file draci.h.

◆ _rnd

Common::RandomSource Draci::DraciEngine::_rnd

Definition at line 107 of file draci.h.

◆ _roomsArchive

BArchive* Draci::DraciEngine::_roomsArchive

Definition at line 93 of file draci.h.

◆ _screen

Screen* Draci::DraciEngine::_screen

Definition at line 78 of file draci.h.

◆ _script

Script* Draci::DraciEngine::_script

Definition at line 81 of file draci.h.

◆ _showWalkingMap

bool Draci::DraciEngine::_showWalkingMap

Definition at line 105 of file draci.h.

◆ _smallFont

Font* Draci::DraciEngine::_smallFont

Definition at line 86 of file draci.h.

◆ _sound

Sound* Draci::DraciEngine::_sound

Definition at line 83 of file draci.h.

◆ _soundsArchive

SoundArchive* Draci::DraciEngine::_soundsArchive

Definition at line 102 of file draci.h.

◆ _spritesArchive

BArchive* Draci::DraciEngine::_spritesArchive

Definition at line 91 of file draci.h.

◆ _stringsArchive

BArchive* Draci::DraciEngine::_stringsArchive

Definition at line 100 of file draci.h.

◆ _walkingMapsArchive

BArchive* Draci::DraciEngine::_walkingMapsArchive

Definition at line 96 of file draci.h.


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