ScummVM API documentation
MM::MM1::MM1Engine Class Reference
Inheritance diagram for MM::MM1::MM1Engine:
MM::MMEngine MM::MM1::Events Engine MM::MM1::UIElement MM::MM1::Mouse

Public Member Functions

 MM1Engine (OSystem *syst, const MightAndMagicGameDescription *gameDesc)
 
bool isEnhanced () const
 
int getRandomNumber (int minNumber, int maxNumber)
 
int getRandomNumber (int maxNumber)
 
Common::String getTargetName () const
 
void syncSoundSettings () override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
Common::Error synchronizeSave (Common::Serializer &s)
 
Common::Error loadGameStream (Common::SeekableReadStream *stream) override
 
Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false) override
 
- Public Member Functions inherited from MM::MMEngine
 MMEngine (OSystem *syst, const MM::MightAndMagicGameDescription *gameDesc)
 
bool hasFeature (EngineFeature f) const override
 
uint32 getFeatures () const
 
Common::Language getLanguage () const
 
Common::Platform getPlatform () const
 
uint32 getGameID () const
 
bool getIsCD () const
 
uint getRandomNumber (int max)
 
- 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 ()
 
bool enhancementEnabled (int32 cls)
 
virtual void applyGameSettings ()
 
virtual void flipMute ()
 
virtual Common::String getSaveStateName (int slot) const
 
virtual Common::Error loadGameState (int slot)
 
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 MM::MM1::Events
 Events (bool enhancedMode)
 
void runGame ()
 
void replaceView (UIElement *ui, bool replaceAllViews=false)
 
void replaceView (const Common::String &name, bool replaceAllViews=false)
 
void addView (UIElement *ui)
 
void addView (const Common::String &name)
 
void clearViews ()
 
void popView ()
 
void redrawViews ()
 
UIElementfocusedView () const
 
UIElementpriorView () const
 
bool isPresent (const Common::String &name) const
 
bool isInCombat () const
 
Graphics::ScreengetScreen () const
 
void drawElements ()
 
void addKeypress (const Common::KeyCode kc)
 
void addAction (KeybindingAction action)
 
bool isKeypressPending () const
 
void draw () override
 
bool tick () override
 
void close () override
 
- Public Member Functions inherited from MM::MM1::UIElement
 UIElement (const Common::String &name, UIElement *uiParent)
 
bool needsRedraw () const
 
void redraw ()
 
void focus ()
 
bool isFocused () const
 
void replaceView (UIElement *ui, bool replaceAllViews=false)
 
void replaceView (const Common::String &name, bool replaceAllViews=false)
 
void addView (UIElement *ui)
 
void addView (const Common::String &name)
 
void addView ()
 
void open ()
 
int getRandomNumber (int minNumber, int maxNumber)
 
int getRandomNumber (int maxNumber)
 
Common::String getName () const
 
virtual void setBounds (const Common::Rect &r)
 
Common::Rect getBounds () const
 
Graphics::ManagedSurface getSurface () const
 
virtual void clearSurface ()
 
virtual UIElementfindView (const Common::String &name)
 
bool send (const Common::String &viewName, const FocusMessage &msg)
 
bool send (const FocusMessage &msg)
 
bool send (const Common::String &viewName, const UnfocusMessage &msg)
 
bool send (const UnfocusMessage &msg)
 
bool send (const Common::String &viewName, const KeypressMessage &msg)
 
bool send (const KeypressMessage &msg)
 
bool send (const Common::String &viewName, const MouseDownMessage &msg)
 
bool send (const MouseDownMessage &msg)
 
bool send (const Common::String &viewName, const MouseUpMessage &msg)
 
bool send (const MouseUpMessage &msg)
 
bool send (const Common::String &viewName, const ActionMessage &msg)
 
bool send (const ActionMessage &msg)
 
bool send (const Common::String &viewName, const GameMessage &msg)
 
bool send (const GameMessage &msg)
 
bool send (const Common::String &viewName, const HeaderMessage &msg)
 
bool send (const HeaderMessage &msg)
 
bool send (const Common::String &viewName, const InfoMessage &msg)
 
bool send (const InfoMessage &msg)
 
bool send (const Common::String &viewName, const DrawGraphicMessage &msg)
 
bool send (const DrawGraphicMessage &msg)
 
- Public Member Functions inherited from MM::MM1::Mouse
void loadCursors ()
 
void setCursor (int cursorId)
 
void showCursor ()
 
void hideCursor ()
 
bool isCursorVisible () const
 

Public Attributes

Globals _globals
 
Sound_sound = nullptr
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

bool shouldQuit () const override
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
virtual void pauseEngineIntern (bool pause)
 
- Protected Member Functions inherited from MM::MM1::Events
void processEvent (Common::Event &ev)
 
bool msgAction (const ActionMessage &e) override
 
bool msgFocus (const FocusMessage &e) override
 
bool msgUnfocus (const UnfocusMessage &e) override
 
bool msgKeypress (const KeypressMessage &e) override
 
bool msgMouseDown (const MouseDownMessage &e) override
 
bool msgMouseUp (const MouseUpMessage &e) override
 
bool msgDrawGraphic (const DrawGraphicMessage &e) override
 
- Protected Member Functions inherited from MM::MM1::UIElement
Common::Rect getLineBounds (int line1, int line2) const
 
void delaySeconds (uint seconds)
 
void delayFrames (uint frames)
 
bool isDelayActive () const
 
void cancelDelay ()
 
bool endDelay ()
 
virtual void timeout ()
 
virtual bool msgGame (const GameMessage &e)
 
virtual bool msgHeader (const HeaderMessage &e)
 
virtual bool msgInfo (const InfoMessage &e)
 

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 bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static void errorUnsupportedGame (Common::String extraMsg)
 
- Protected Attributes inherited from MM::MMEngine
const MightAndMagicGameDescription_gameDescription
 
Common::RandomSource _randomSource
 
- 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 MM::MM1::UIElement
UIElement_parent
 
Common::Array< UIElement * > _children
 
Common::Rect _innerBounds
 
Bounds _bounds
 
bool _needsRedraw = true
 
Common::String _name
 

Member Function Documentation

◆ shouldQuit()

bool MM::MM1::MM1Engine::shouldQuit ( ) const
inlineoverrideprotectedvirtual

Returns true if the game should quit

Implements MM::MM1::Events.

◆ getRandomNumber()

int MM::MM1::MM1Engine::getRandomNumber ( int  minNumber,
int  maxNumber 
)
inline

Returns a random number

◆ syncSoundSettings()

void MM::MM1::MM1Engine::syncSoundSettings ( )
overridevirtual

Sync the sound settings

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool MM::MM1::MM1Engine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Returns true if a game can be saved

Reimplemented from Engine.

◆ canLoadGameStateCurrently()

bool MM::MM1::MM1Engine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Returns true if a savegame can be loaded

Reimplemented from Engine.

◆ synchronizeSave()

Common::Error MM::MM1::MM1Engine::synchronizeSave ( Common::Serializer s)

Saves or loads a savegame

◆ loadGameStream()

Common::Error MM::MM1::MM1Engine::loadGameStream ( Common::SeekableReadStream stream)
inlineoverridevirtual

Load a savegame

Reimplemented from Engine.

◆ saveGameStream()

Common::Error MM::MM1::MM1Engine::saveGameStream ( Common::WriteStream stream,
bool  isAutosave = false 
)
inlineoverridevirtual

Save a savegame

Reimplemented from Engine.


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