Public Types | |
| enum | LoadDialogSource { kLoadFromMainMenu, kLoadFromGameDialog, kLoadFromHotkey } |
Public Types inherited from Engine | |
| enum | EngineFeature { kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime, kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride } |
Public Member Functions | |
| M4Engine (OSystem *syst, const M4GameDescription *gameDesc) | |
| uint32 | getFeatures () const |
| bool | useOriginalSaveLoad () const |
| Common::String | getGameId () const |
| int | getGameType () const |
| Common::Language | getLanguage () const |
| int | isDemo () const |
| uint32 | getRandomNumber (uint maxNum) |
| void | initializePath (const Common::FSNode &gamePath) override |
| bool | hasFeature (EngineFeature f) const override |
| bool | canLoadGameStateCurrently (Common::U32String *msg=nullptr) override |
| bool | canSaveGameStateCurrently (Common::U32String *msg=nullptr) override |
| void | syncSoundSettings () override |
| Common::Error | loadGameState (int slot) override |
| Common::Error | loadGameStateDoIt (int slot) |
| Common::Error | syncGame (Common::Serializer &s) |
| virtual void | syncFlags (Common::Serializer &s)=0 |
| Common::Error | saveGameStream (Common::WriteStream *stream, bool isAutosave=false) override |
| Common::Error | loadGameStream (Common::SeekableReadStream *stream) override |
| bool | autosaveExists () const |
| bool | savesExist () const |
| SaveStateList | listSaves () const |
| bool | loadSaveThumbnail (int slotNum, M4sprite *thumbnail) const |
| bool | saveGameFromMenu (int slotNum, const Common::String &desc, Graphics::Surface &thumbnail) |
| virtual void | showSaveScreen () |
| virtual void | showLoadScreen (LoadDialogSource fromMainMenu) |
| virtual void | showEngineInfo ()=0 |
Public Member Functions inherited from Engine | |
| MetaEngine * | getMetaEngine () const |
| void | setMetaEngine (MetaEngine *metaEngine) |
| PauseToken | pauseEngine () |
| bool | isPaused () const |
| void | openMainMenuDialog () |
| uint32 | getTotalPlayTime () const |
| void | setTotalPlayTime (uint32 time=0) |
| Common::TimerManager * | getTimerManager () |
| Common::EventManager * | getEventManager () |
| Common::SaveFileManager * | getSaveFileManager () |
| bool | existExtractedCDAudioFiles (uint track=1) |
| bool | isDataAndCDAudioReadFromSameCD () |
| void | warnMissingExtractedCDAudio () |
| void | handleAutoSave () |
| void | saveAutosaveIfEnabled () |
| virtual bool | canSaveAutosaveCurrently () |
| virtual int | getAutosaveSlot () const |
| virtual bool | gameTypeHasAddOns () const |
| virtual bool | dirCanBeGameAddOn (const Common::FSDirectory &dir) const |
| virtual bool | dirMustBeGameAddOn (const Common::FSDirectory &dir) const |
| Common::ErrorCode | updateAddOns (const MetaEngine *metaEngine) const |
| Engine (OSystem *syst) | |
| virtual | ~Engine () |
| virtual void | errorString (const char *buf_input, char *buf_output, int buf_output_size) |
| virtual GUI::Debugger * | getDebugger () final |
| void | setDebugger (GUI::Debugger *debugger) |
| GUI::Debugger * | getOrCreateDebugger () |
| bool | enhancementEnabled (int32 cls) |
| virtual void | applyGameSettings () |
| virtual void | flipMute () |
| virtual Common::String | getSaveStateName (int slot) const |
| void | setGameToLoadSlot (int slot) |
| virtual Common::Error | saveGameState (int slot, const Common::String &desc, bool isAutosave=false) |
| bool | saveGameDialog () |
| bool | loadGameDialog () |
Public Member Functions inherited from M4::Sections | |
| void | global_section_constructor () |
| void | section_room_constructor () |
| void | game_daemon_code () |
| void | parse_player_command_now () |
| void | section_init () |
| void | daemon () |
| void | global_room_init () |
| void | tick () |
| void | section_parser () |
| void | room_preload () |
| void | room_init () |
| void | room_daemon () |
| void | room_pre_parser () |
| void | room_parser () |
| void | room_error () |
| void | room_shutdown () |
| HotSpotRec * | custom_hotspot_which (int x, int y) |
| Room * | getRoom (int room) const |
| void | m4SceneLoad () |
| void | m4RunScene () |
| void | m4EndScene () |
| void | pal_game_task () |
| void | camera_shift_xy (int32 x, int32 y) |
| void | set_camera_delta_pan (int32 deltaX, int32 deltaY) |
| void | adv_camera_pan_step (int32 step) |
| bool | game_camera_panning () const |
| virtual void | global_daemon ()=0 |
| virtual void | global_pre_parser () |
| virtual void | global_parser ()=0 |
| void | global_error_code () |
Protected Member Functions | |
| Common::Error | run () override |
| virtual Vars * | createVars ()=0 |
| virtual void | setupConsole ()=0 |
Protected Member Functions inherited from Engine | |
| virtual int | runDialog (GUI::Dialog &dialog) |
| void | defaultSyncSoundSettings () |
| virtual void | pauseEngineIntern (bool pause) |
Protected Attributes | |
| bool | _useOriginalSaveLoad = false |
Protected Attributes inherited from Engine | |
| Common::TimerManager * | _timer |
| Common::EventManager * | _eventMan |
| Common::SaveFileManager * | _saveFileMan |
| GUI::Dialog * | _mainMenuDialog |
| const Common::String | _targetName |
| int32 | _activeEnhancements = kEnhGameBreakingBugFixes |
Protected Attributes inherited from M4::Sections | |
| Common::Array< Section * > | _sections |
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 bool | warnUserAboutUnsupportedAddOn (Common::String addOnName) |
| static void | errorAddingAddOnWithoutBaseGame (Common::String addOnName, Common::String gameId) |
| static void | errorUnsupportedGame (Common::String extraMsg) |
Public Attributes inherited from Engine | |
| OSystem * | _system |
| Audio::Mixer * | _mixer |
Public Attributes inherited from M4::Sections | |
| Section * | _activeSection = nullptr |
| Room * | _activeRoom = nullptr |
|
overrideprotectedvirtual |
Initialize the engine and start its main loop.
Implements Engine.
|
protectedpure virtual |
Creates globals
Implemented in M4::Riddle::RiddleEngine, and M4::Burger::BurgerEngine.
|
protectedpure virtual |
Sets up the debugging console
Implemented in M4::Riddle::RiddleEngine, and M4::Burger::BurgerEngine.
| Common::String M4::M4Engine::getGameId | ( | ) | const |
Returns the game Id
| int M4::M4Engine::getGameType | ( | ) | const |
Returns the game type
| Common::Language M4::M4Engine::getLanguage | ( | ) | const |
Return game language
| int M4::M4Engine::isDemo | ( | ) | const |
Return if it's a demo
|
inline |
Gets a random number
|
overridevirtual |
Initialize SearchMan according to the game path.
By default, this adds the directory in non-flat mode with a depth of 4 as priority 0 to SearchMan.
| gamePath | The base directory of the game data. |
Reimplemented from Engine.
Reimplemented in M4::Riddle::RiddleEngine.
|
inlineoverridevirtual |
Determine whether the engine supports the specified feature.
Reimplemented from Engine.
|
overridevirtual |
Indicate whether a game state can be loaded.
| msg | Optional pointer to message explaining why it is disabled |
Reimplemented from Engine.
|
overridevirtual |
Indicate whether a game state can be saved.
| msg | Optional pointer to message explaining why it is disabled |
Reimplemented from Engine.
|
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).
Reimplemented from Engine.
|
overridevirtual |
Load a game state.
| slot | The slot from which a save state should be loaded. |
Reimplemented from Engine.
| Common::Error M4::M4Engine::syncGame | ( | Common::Serializer & | s | ) |
Uses a serializer to allow implementing savegame loading and saving using a single method
|
overridevirtual |
Save a game state.
| stream | The write stream to save the savegame data to. |
| isAutosave | Expected to be true if an autosave is being created. |
Reimplemented from Engine.
|
overridevirtual |
Load a game state.
| stream | The stream to load the save state from. |
Reimplemented from Engine.
| bool M4::M4Engine::autosaveExists | ( | ) | const |
Returns true if an autosave exists
| bool M4::M4Engine::savesExist | ( | ) | const |
Returns true if any saves exist
| SaveStateList M4::M4Engine::listSaves | ( | ) | const |
Lists the saves
| bool M4::M4Engine::loadSaveThumbnail | ( | int | slotNum, |
| M4sprite * | thumbnail | ||
| ) | const |
Returns the savegame thumbnail for a save
| bool M4::M4Engine::saveGameFromMenu | ( | int | slotNum, |
| const Common::String & | desc, | ||
| Graphics::Surface & | thumbnail | ||
| ) |
Save game from in-game save menu
|
virtual |
Show save game dialog
Reimplemented in M4::Riddle::RiddleEngine, and M4::Burger::BurgerEngine.
|
virtual |
Show restore game dialog
Reimplemented in M4::Riddle::RiddleEngine, and M4::Burger::BurgerEngine.
|
pure virtual |
Show the engine information
Implemented in M4::Riddle::RiddleEngine, and M4::Burger::BurgerEngine.