ScummVM
Queen::QueenEngine Class Reference

#include <queen.h>

Inheritance diagram for Queen::QueenEngine:
Collaboration diagram for Queen::QueenEngine:

Public Types

enum  {
  SAVESTATE_CUR_VER = 1, SAVESTATE_MAX_NUM = 100, SAVESTATE_MAX_SIZE = 30000, SLOT_LISTPREFIX = -2,
  SLOT_AUTOSAVE = -1, SLOT_QUICKSAVE = 0, MIN_TEXT_SPEED = 4, MAX_TEXT_SPEED = 100
}
 
- 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 Member Functions

 QueenEngine (OSystem *syst)
 
virtual ~QueenEngine ()
 
BamScenebam () const
 
BankManagerbankMan () const
 
Commandcommand () const
 
Debuggerdebugger () const
 
Displaydisplay () const
 
Graphicsgraphics () const
 
Gridgrid () const
 
Inputinput () const
 
Logiclogic () const
 
Resourceresource () const
 
Soundsound () const
 
Walkwalk () const
 
void registerDefaultSettings ()
 
void checkOptionSettings ()
 
void readOptionSettings ()
 
void writeOptionSettings ()
 
int talkSpeed () const
 
void talkSpeed (int speed)
 
bool subtitles () const
 
void subtitles (bool enable)
 
void update (bool checkPlayerInput=false)
 
bool canLoadOrSave () const
 
bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
 
bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
 
Common::Error saveGameState (int slot, const Common::String &desc)
 Save a game state. More...
 
Common::Error loadGameState (int slot)
 Load a game state. More...
 
void makeGameStateName (int slot, char *buf) const
 
int getGameStateSlot (const char *filename) const
 
void findGameStateDescriptions (char descriptions[100][32])
 
Common::SeekableReadStreamreadGameStateHeader (int slot, GameStateHeader *gsh)
 
- 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...
 

Public Attributes

Common::RandomSource randomizer
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

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...
 
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...
 
- 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

int _talkSpeed
 
bool _subtitles
 
uint32 _lastSaveTime
 
uint32 _lastUpdateTime
 
bool _gameStarted
 
BamScene_bam
 
BankManager_bankMan
 
Command_command
 
Debugger_debugger
 
Display_display
 
Graphics_graphics
 
Grid_grid
 
Input_input
 
Logic_logic
 
Resource_resource
 
Sound_sound
 
Walk_walk
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Additional Inherited Members

- 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...
 

Detailed Description

Definition at line 63 of file queen.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SAVESTATE_CUR_VER 
SAVESTATE_MAX_NUM 
SAVESTATE_MAX_SIZE 
SLOT_LISTPREFIX 
SLOT_AUTOSAVE 
SLOT_QUICKSAVE 
MIN_TEXT_SPEED 
MAX_TEXT_SPEED 

Definition at line 106 of file queen.h.

Constructor & Destructor Documentation

◆ QueenEngine()

Queen::QueenEngine::QueenEngine ( OSystem syst)

Definition at line 52 of file queen.cpp.

◆ ~QueenEngine()

Queen::QueenEngine::~QueenEngine ( )
virtual

Definition at line 56 of file queen.cpp.

Member Function Documentation

◆ bam()

BamScene* Queen::QueenEngine::bam ( ) const
inline

Definition at line 69 of file queen.h.

◆ bankMan()

BankManager* Queen::QueenEngine::bankMan ( ) const
inline

Definition at line 70 of file queen.h.

◆ canLoadGameStateCurrently()

bool Queen::QueenEngine::canLoadGameStateCurrently ( )
virtual

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 179 of file queen.cpp.

◆ canLoadOrSave()

bool Queen::QueenEngine::canLoadOrSave ( ) const

Definition at line 175 of file queen.cpp.

◆ canSaveGameStateCurrently()

bool Queen::QueenEngine::canSaveGameStateCurrently ( )
virtual

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 183 of file queen.cpp.

◆ checkOptionSettings()

void Queen::QueenEngine::checkOptionSettings ( )

Definition at line 77 of file queen.cpp.

◆ command()

Command* Queen::QueenEngine::command ( ) const
inline

Definition at line 71 of file queen.h.

◆ debugger()

Debugger* Queen::QueenEngine::debugger ( ) const
inline

Definition at line 72 of file queen.h.

◆ display()

Display* Queen::QueenEngine::display ( ) const
inline

Definition at line 73 of file queen.h.

◆ findGameStateDescriptions()

void Queen::QueenEngine::findGameStateDescriptions ( char  descriptions[100][32])

Definition at line 299 of file queen.cpp.

◆ getDebugger()

GUI::Debugger * Queen::QueenEngine::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 314 of file queen.cpp.

◆ getGameStateSlot()

int Queen::QueenEngine::getGameStateSlot ( const char *  filename) const

Definition at line 290 of file queen.cpp.

◆ graphics()

Graphics* Queen::QueenEngine::graphics ( ) const
inline

Definition at line 74 of file queen.h.

◆ grid()

Grid* Queen::QueenEngine::grid ( ) const
inline

Definition at line 75 of file queen.h.

◆ hasFeature()

bool Queen::QueenEngine::hasFeature ( EngineFeature  f) const
protectedvirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 318 of file queen.cpp.

◆ input()

Input* Queen::QueenEngine::input ( ) const
inline

Definition at line 76 of file queen.h.

◆ loadGameState()

Common::Error Queen::QueenEngine::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 232 of file queen.cpp.

◆ logic()

Logic* Queen::QueenEngine::logic ( ) const
inline

Definition at line 77 of file queen.h.

◆ makeGameStateName()

void Queen::QueenEngine::makeGameStateName ( int  slot,
char *  buf 
) const

Definition at line 279 of file queen.cpp.

◆ readGameStateHeader()

Common::InSaveFile * Queen::QueenEngine::readGameStateHeader ( int  slot,
GameStateHeader gsh 
)

Definition at line 264 of file queen.cpp.

◆ readOptionSettings()

void Queen::QueenEngine::readOptionSettings ( )

Definition at line 102 of file queen.cpp.

◆ registerDefaultSettings()

void Queen::QueenEngine::registerDefaultSettings ( )

Definition at line 71 of file queen.cpp.

◆ resource()

Resource* Queen::QueenEngine::resource ( ) const
inline

Definition at line 78 of file queen.h.

◆ run()

Common::Error Queen::QueenEngine::run ( )
protectedvirtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 326 of file queen.cpp.

◆ saveGameState()

Common::Error Queen::QueenEngine::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 187 of file queen.cpp.

◆ sound()

Sound* Queen::QueenEngine::sound ( ) const
inline

Definition at line 79 of file queen.h.

◆ subtitles() [1/2]

bool Queen::QueenEngine::subtitles ( ) const
inline

Definition at line 91 of file queen.h.

◆ subtitles() [2/2]

void Queen::QueenEngine::subtitles ( bool  enable)
inline

Definition at line 92 of file queen.h.

◆ syncSoundSettings()

void Queen::QueenEngine::syncSoundSettings ( )
protectedvirtual

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 96 of file queen.cpp.

◆ talkSpeed() [1/2]

int Queen::QueenEngine::talkSpeed ( ) const
inline

Definition at line 89 of file queen.h.

◆ talkSpeed() [2/2]

void Queen::QueenEngine::talkSpeed ( int  speed)
inline

Definition at line 90 of file queen.h.

◆ update()

void Queen::QueenEngine::update ( bool  checkPlayerInput = false)

Definition at line 126 of file queen.cpp.

◆ walk()

Walk* Queen::QueenEngine::walk ( ) const
inline

Definition at line 80 of file queen.h.

◆ writeOptionSettings()

void Queen::QueenEngine::writeOptionSettings ( )

Definition at line 116 of file queen.cpp.

Member Data Documentation

◆ _bam

BamScene* Queen::QueenEngine::_bam
protected

Definition at line 134 of file queen.h.

◆ _bankMan

BankManager* Queen::QueenEngine::_bankMan
protected

Definition at line 135 of file queen.h.

◆ _command

Command* Queen::QueenEngine::_command
protected

Definition at line 136 of file queen.h.

◆ _debugger

Debugger* Queen::QueenEngine::_debugger
protected

Definition at line 137 of file queen.h.

◆ _display

Display* Queen::QueenEngine::_display
protected

Definition at line 138 of file queen.h.

◆ _gameStarted

bool Queen::QueenEngine::_gameStarted
protected

Definition at line 132 of file queen.h.

◆ _graphics

Graphics* Queen::QueenEngine::_graphics
protected

Definition at line 139 of file queen.h.

◆ _grid

Grid* Queen::QueenEngine::_grid
protected

Definition at line 140 of file queen.h.

◆ _input

Input* Queen::QueenEngine::_input
protected

Definition at line 141 of file queen.h.

◆ _lastSaveTime

uint32 Queen::QueenEngine::_lastSaveTime
protected

Definition at line 130 of file queen.h.

◆ _lastUpdateTime

uint32 Queen::QueenEngine::_lastUpdateTime
protected

Definition at line 131 of file queen.h.

◆ _logic

Logic* Queen::QueenEngine::_logic
protected

Definition at line 142 of file queen.h.

◆ _resource

Resource* Queen::QueenEngine::_resource
protected

Definition at line 143 of file queen.h.

◆ _sound

Sound* Queen::QueenEngine::_sound
protected

Definition at line 144 of file queen.h.

◆ _subtitles

bool Queen::QueenEngine::_subtitles
protected

Definition at line 129 of file queen.h.

◆ _talkSpeed

int Queen::QueenEngine::_talkSpeed
protected

Definition at line 128 of file queen.h.

◆ _walk

Walk* Queen::QueenEngine::_walk
protected

Definition at line 145 of file queen.h.

◆ randomizer

Common::RandomSource Queen::QueenEngine::randomizer

Definition at line 82 of file queen.h.


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