ScummVM API documentation
Toltecs::ToltecsEngine Class Reference
Inheritance diagram for Toltecs::ToltecsEngine:
Engine

Classes

struct  SaveHeader
 

Public Types

enum  kReadSaveHeaderError { kRSHENoError = 0, kRSHEInvalidType = 1, kRSHEInvalidVersion = 2, kRSHEIoError = 3 }
 
- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 

Public Member Functions

 ToltecsEngine (OSystem *syst, const ToltecsGameDescription *gameDesc)
 
bool hasFeature (EngineFeature f) const override
 
uint32 getFeatures () const
 
Common::Language getLanguage () const
 
const Common::StringgetTargetName () const
 
void syncSoundSettings () override
 
void setupSysStrings ()
 
void requestSavegame (int slotNum, Common::String &description)
 
void requestLoadgame (int slotNum)
 
void loadScene (uint resIndex)
 
void updateScreen ()
 
void drawScreen ()
 
void updateInput ()
 
void setGuiHeight (int16 guiHeight)
 
void setCamera (int16 x, int16 y)
 
bool getCameraChanged ()
 
void scrollCameraUp (int16 delta)
 
void scrollCameraDown (int16 delta)
 
void scrollCameraLeft (int16 delta)
 
void scrollCameraRight (int16 delta)
 
void updateCamera ()
 
void showMenu (MenuID menuId)
 
void talk (int16 slotIndex, int16 slotOffset)
 
void walk (byte *walkData)
 
int16 findRectAtPoint (byte *rectData, int16 x, int16 y, int16 index, int16 itemSize, byte *rectDataEnd)
 
const char * getSysString (int index) const
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
Common::Error loadGameState (int slot) override
 
Common::Error saveGameState (int slot, const Common::String &description, bool isAutosave=false) override
 
void savegame (const char *filename, const char *description)
 
void loadgame (const char *filename)
 
const char * getSavegameFilename (int num)
 
- 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 ()
 
virtual int getAutosaveSlot () const
 
 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 ()
 
virtual void applyGameSettings ()
 
virtual void flipMute ()
 
virtual Common::String getSaveStateName (int slot) const
 
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 ()
 

Static Public Member Functions

static Common::String getSavegameFilename (const Common::String &target, int num)
 
static WARN_UNUSED_RESULT kReadSaveHeaderError readSaveHeader (Common::SeekableReadStream *in, SaveHeader &header, bool skipThumbnail=true)
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 
static bool shouldQuit ()
 
static MetaEngineDetectiongetMetaEngineDetection ()
 
static bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static void errorUnsupportedGame (Common::String extraMsg)
 

Public Attributes

Common::RandomSource_rnd
 
const ToltecsGameDescription_gameDescription
 
int _cfgVoicesVolume
 
int _cfgMusicVolume
 
int _cfgSoundFXVolume
 
bool _cfgText
 
bool _cfgVoices
 
AnimationPlayer_anim
 
ArchiveReader_arc
 
Input * _input
 
MenuSystem_menuSystem
 
MoviePlayer_moviePlayer
 
Music_music
 
Palette_palette
 
ResourceCache_res
 
ScriptInterpreter_script
 
Screen_screen
 
SegmentMap_segmap
 
Sound_sound
 
Common::String _sysStrings [kSysStrCount]
 
int _saveLoadRequested
 
int _saveLoadSlot
 
Common::String _saveLoadDescription
 
uint _sceneResIndex
 
int16 _sceneWidth
 
int16 _sceneHeight
 
int _counter01
 
int _counter02
 
bool _movieSceneFlag
 
byte _flag01
 
int16 _cameraX
 
int16 _cameraY
 
int16 _newCameraX
 
int16 _newCameraY
 
int16 _cameraHeight
 
int16 _guiHeight
 
bool _doSpeech
 
bool _doText
 
int16 _walkSpeedY
 
int16 _walkSpeedX
 
Common::KeyState _keyState
 
int16 _mouseX
 
int16 _mouseY
 
int16 _mouseDblClickTicks
 
bool _mouseWaitForRelease
 
byte _mouseButton
 
int16 _mouseDisabled
 
bool _leftButtonDown
 
bool _rightButtonDown
 
bool _isSaveAllowed
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Member Function Documentation

◆ run()

Common::Error Toltecs::ToltecsEngine::run ( )
overrideprotectedvirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ hasFeature()

bool Toltecs::ToltecsEngine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ syncSoundSettings()

void Toltecs::ToltecsEngine::syncSoundSettings ( )
overridevirtual

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.

◆ canLoadGameStateCurrently()

bool Toltecs::ToltecsEngine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
inlineoverridevirtual

Indicate whether a game state can be loaded.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool Toltecs::ToltecsEngine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
inlineoverridevirtual

Indicate whether a game state can be saved.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ loadGameState()

Common::Error Toltecs::ToltecsEngine::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.

◆ saveGameState()

Common::Error Toltecs::ToltecsEngine::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.


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