22 #ifndef ENGINES_ENGINE_H 23 #define ENGINES_ENGINE_H 25 #include "common/scummsys.h" 26 #include "common/str.h" 27 #include "common/language.h" 28 #include "common/platform.h" 29 #include "common/queue.h" 30 #include "common/singleton.h" 31 #include "engines/enhancements.h" 43 class SaveFileManager;
46 class SeekableReadStream;
86 template<
class... TParam>
110 #if __cplusplus >= 201103L 118 #if __cplusplus >= 201103L 132 bool isActive()
const {
return _engine !=
nullptr; }
183 int32 _activeEnhancements = kEnhGameBreakingBugFixes;
203 uint32 _pauseStartTime;
210 int32 _engineStartTime;
215 int _autosaveInterval;
220 int _lastAutosaveTime;
243 static bool _quitRequested;
355 virtual void errorString(
const char *buf_input,
char *buf_output,
int buf_output_size);
370 _debugger = debugger;
385 bool enhancementEnabled(int32 cls);
404 virtual void syncSoundSettings();
416 virtual void flipMute();
452 void setGameToLoadSlot(
int slot);
492 bool saveGameDialog();
497 bool loadGameDialog();
505 virtual void pauseEngineIntern(
bool pause);
517 static void quitGame();
524 static bool shouldQuit();
565 bool warnBeforeOverwritingAutosave();
577 void openMainMenuDialog();
601 uint32 getTotalPlayTime()
const;
612 void setTotalPlayTime(uint32 time = 0);
631 bool existExtractedCDAudioFiles(uint track = 1);
636 bool isDataAndCDAudioReadFromSameCD();
640 void warnMissingExtractedCDAudio();
645 void handleAutoSave();
650 void saveAutosaveIfEnabled();
656 return canSaveGameStateCurrently();
673 void defaultSyncSoundSettings();
706 bool empty() {
return _chainedGames.empty(); }
710 #define ChainedGamesMan ChainedGamesManager::instance()
virtual int getAutosaveSlot() const
Definition: engine.h:665
Common::TimerManager * getTimerManager()
Definition: engine.h:617
EngineFeature
Definition: engine.h:253
static String format(MSVC_PRINTF const char *fmt,...) GCC_PRINTF(1
bool isActive() const
Definition: engine.h:132
Definition: debugger.h:41
bool empty()
Definition: engine.h:706
OSystem * _system
Definition: engine.h:149
MetaEngine * getMetaEngine() const
Definition: engine.h:529
int FORCEINLINE GCC_PRINTF(2, 0) int vsprintf_s(T(&dst)[N]
void GUIErrorMessageFormatU32StringPtr(const Common::U32String *fmt,...)
virtual void applyGameSettings()
Definition: engine.h:411
Definition: algorithm.h:29
void GUIErrorMessageFormat(const Common::U32String &fmt, TParam... param)
Definition: engine.h:87
void GUIErrorMessageWithURL(const Common::U32String &msg, const char *url)
const Common::String _targetName
Definition: engine.h:181
Common::EventManager * getEventManager()
Definition: engine.h:621
Common::EventManager * _eventMan
Definition: engine.h:163
bool isPaused() const
Definition: engine.h:572
void setDebugger(GUI::Debugger *debugger)
Definition: engine.h:368
GUI::Dialog * _mainMenuDialog
Definition: engine.h:172
void GUIErrorMessage(const Common::U32String &msg, const char *url=nullptr)
Definition: savefile.h:142
Common::TimerManager * _timer
Definition: engine.h:159
void setMetaEngine(MetaEngine *metaEngine)
Definition: engine.h:534
Common::SaveFileManager * getSaveFileManager()
Definition: engine.h:625
virtual GUI::Debugger * getDebugger() final
Definition: engine.h:360
virtual Common::String getSaveStateName(int slot) const
Definition: engine.h:421
Common::SaveFileManager * _saveFileMan
Definition: engine.h:167
virtual bool hasFeature(EngineFeature f) const
Definition: engine.h:383
Definition: singleton.h:42
virtual bool canSaveAutosaveCurrently()
Definition: engine.h:655
Audio::Mixer * _mixer
Definition: engine.h:153