ScummVM API documentation
AGS::AGSEngine Class Reference
Inheritance diagram for AGS::AGSEngine:
Engine

Public Member Functions

 AGSEngine (OSystem *syst, const AGSGameDescription *gameDesc)
 
void GUIError (const Common::String &msg)
 
void set_window_title (const char *str)
 
uint32 getFeatures () const
 
const PluginVersiongetNeededPlugins () const
 
Common::String getGameId () const
 
SaveStateList listSaves () const
 
uint32 getRandomNumber (uint maxNum)
 
void setRandomNumberSeed (uint32 seed)
 
bool getPixelFormat (int depth, Graphics::PixelFormat &format) const
 
void setGraphicsMode (size_t w, size_t h, int depth)
 
bool hasFeature (EngineFeature f) const override
 
bool isUnsupportedPre25 () const
 
bool is64BitGame () const
 
Common::FSNode getGameFolder ()
 
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 &desc, bool isAutosave=false) override
 
int getAutosaveSlot () const override
 
void syncSoundSettings () override
 
- 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 ()
 
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 ()
 

Public Attributes

EventsManager_events
 
Music_music
 
::AGS3::GFX_DRIVER_gfxDriver
 
::AGS3::Globals_globals
 
bool _forceTextAA
 
- 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

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 
- 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)
 
- 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 AGS::AGSEngine::run ( )
overrideprotectedvirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ getGameId()

Common::String AGS::AGSEngine::getGameId ( ) const

Returns the game Id

◆ listSaves()

SaveStateList AGS::AGSEngine::listSaves ( ) const

Returns the current list of savegames

◆ getRandomNumber()

uint32 AGS::AGSEngine::getRandomNumber ( uint  maxNum)
inline

Gets a random number

◆ setRandomNumberSeed()

void AGS::AGSEngine::setRandomNumberSeed ( uint32  seed)
inline

Sets the random number seed

◆ getPixelFormat()

bool AGS::AGSEngine::getPixelFormat ( int  depth,
Graphics::PixelFormat format 
) const

Returns a pixel format for the given color depth.

◆ setGraphicsMode()

void AGS::AGSEngine::setGraphicsMode ( size_t  w,
size_t  h,
int  depth 
)

Sets up the graphics mode

◆ hasFeature()

bool AGS::AGSEngine::hasFeature ( EngineFeature  f) const
inlineoverridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ isUnsupportedPre25()

bool AGS::AGSEngine::isUnsupportedPre25 ( ) const

Returns true if the selected game is an unsupported one earlier than version 2.5

◆ getGameFolder()

Common::FSNode AGS::AGSEngine::getGameFolder ( )

Returns the game folder as a ScummVM filesystem node

◆ canLoadGameStateCurrently()

bool AGS::AGSEngine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Indicate whether a game state can be loaded.

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool AGS::AGSEngine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Indicate whether a game state can be saved.

Reimplemented from Engine.

◆ loadGameState()

Common::Error AGS::AGSEngine::loadGameState ( int  slot)
overridevirtual

Load a savegame

Reimplemented from Engine.

◆ saveGameState()

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

Save a savegame

Reimplemented from Engine.

◆ getAutosaveSlot()

int AGS::AGSEngine::getAutosaveSlot ( ) const
overridevirtual

Returns autosave slot (-1 if unavailable)

Reimplemented from Engine.

◆ syncSoundSettings()

void AGS::AGSEngine::syncSoundSettings ( )
overridevirtual

Synchronize user volume settings

Reimplemented from Engine.


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