ScummVM API documentation
Queen::QueenEngine Class Reference
Inheritance diagram for Queen::QueenEngine:
Engine

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, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 

Public Member Functions

 QueenEngine (OSystem *syst)
 
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 (Common::U32String *msg=nullptr) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 
Common::Error loadGameState (int slot) override
 
int getAutosaveSlot () const override
 
Common::String getSaveStateName (int slot) const override
 
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
MetaEnginegetMetaEngine () const
 
void setMetaEngine (MetaEngine *metaEngine)
 
PauseToken pauseEngine ()
 
bool isPaused () const
 
void openMainMenuDialog ()
 
uint32 getTotalPlayTime () const
 
void setTotalPlayTime (uint32 time=0)
 
Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
Common::SaveFileManagergetSaveFileManager ()
 
bool existExtractedCDAudioFiles (uint track=1)
 
bool isDataAndCDAudioReadFromSameCD ()
 
void warnMissingExtractedCDAudio ()
 
void handleAutoSave ()
 
void saveAutosaveIfEnabled ()
 
virtual bool canSaveAutosaveCurrently ()
 
 Engine (OSystem *syst)
 
virtual ~Engine ()
 
virtual void initializePath (const Common::FSNode &gamePath)
 
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 
virtual GUI::DebuggergetDebugger () final
 
void setDebugger (GUI::Debugger *debugger)
 
GUI::DebuggergetOrCreateDebugger ()
 
bool enhancementEnabled (int32 cls)
 
virtual void applyGameSettings ()
 
virtual void flipMute ()
 
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 
void setGameToLoadSlot (int slot)
 
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

Public Attributes

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

Protected Member Functions

Common::Error run () override
 
bool hasFeature (EngineFeature f) const override
 
void syncSoundSettings () override
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
virtual void pauseEngineIntern (bool pause)
 

Protected Attributes

int _talkSpeed
 
bool _subtitles
 
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
 
int32 _activeEnhancements = kEnhGameBreakingBugFixes
 

Additional Inherited Members

- Static Public Member Functions inherited from Engine
static void quitGame ()
 
static bool shouldQuit ()
 
static bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static void errorUnsupportedGame (Common::String extraMsg)
 

Member Function Documentation

◆ canLoadGameStateCurrently()

bool Queen::QueenEngine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Indicate whether a game state can be loaded.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool Queen::QueenEngine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Indicate whether a game state can be saved.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ saveGameState()

Common::Error Queen::QueenEngine::saveGameState ( int  slot,
const Common::String desc,
bool  isAutosave = false 
)
overridevirtual

Save a game state.

Parameters
slotThe slot into which the save state should be stored.
descDescription for the save state, entered by the user.
isAutosaveExpected to be true if an autosave is being created.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.

◆ loadGameState()

Common::Error Queen::QueenEngine::loadGameState ( int  slot)
overridevirtual

Load a game state.

Parameters
slotThe slot from which a save state should be loaded.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.

◆ getAutosaveSlot()

int Queen::QueenEngine::getAutosaveSlot ( ) const
inlineoverridevirtual

Return the slot that should be used for autosaves, or -1 for engines that don't support autosave.

Note
This should match the meta engine getAutosaveSlot() method.

Reimplemented from Engine.

◆ getSaveStateName()

Common::String Queen::QueenEngine::getSaveStateName ( int  slot) const
overridevirtual

Generate the savegame filename.

Reimplemented from Engine.

◆ run()

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

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ hasFeature()

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

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ syncSoundSettings()

void Queen::QueenEngine::syncSoundSettings ( )
overrideprotectedvirtual

Notify the engine that the sound settings in the config manager might have changed and that it should adjust any internal volume (and other) 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.

Reimplemented from Engine.


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