MADS::MADSEngine Class Reference

#include <mads.h>

Inheritance diagram for MADS::MADSEngine:
Collaboration diagram for MADS::MADSEngine:

Public Member Functions

 MADSEngine (OSystem *syst, const MADSGameDescription *gameDesc)
virtual ~MADSEngine ()
uint32 getFeatures () const
Common::Language getLanguage () const
Common::Platform getPlatform () const
uint16 getVersion () const
uint32 getGameID () const
uint32 getGameFeatures () const
int getRandomNumber (int maxNumber)
int getRandomNumber (int minNumber, int maxNumber)
int hypotenuse (int xv, int yv)
bool canLoadGameStateCurrently ()
 Returns true if it is currently okay to restore a game. More...
bool canSaveGameStateCurrently ()
 Returns true if it is currently okay to save the game. More...
Common::String generateSaveName (int slot)
 Support method that generates a savegame name. More...
virtual Common::Error loadGameState (int slot)
 Handles loading a game via the GMM. More...
virtual Common::Error saveGameState (int slot, const Common::String &desc)
 Handles saving the game via the GMM. More...
virtual void syncSoundSettings ()
 Handles updating sound settings after they're changed in the GMM dialog. More...
void saveOptions ()
- Public Member Functions inherited from Engine
void pauseEngine (bool pause)
 Pause or resume the engine. More...
bool isPaused () const
 Return whether the engine is currently paused or not. More...
void openMainMenuDialog ()
 Run the Global Main Menu Dialog. More...
uint32 getTotalPlayTime () const
 Get the total play time. More...
void setTotalPlayTime (uint32 time=0)
 Set the game time counter to the specified time. More...
Common::TimerManagergetTimerManager ()
Common::EventManagergetEventManager ()
Common::SaveFileManagergetSaveFileManager ()
void checkCD ()
 On some systems, check if the game appears to be run from CD. More...
 Engine (OSystem *syst)
virtual ~Engine ()
virtual void initializePath (const Common::FSNode &gamePath)
 Init SearchMan according to the game path. More...
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 Prepare an error string, which is printed by the error() function. More...
virtual GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
virtual void initKeymap ()
virtual void deinitKeymap ()
virtual void flipMute ()
 Flip mute all sound option. More...
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...

Public Attributes

bool _easyMouse
bool _invObjectsAnimated
bool _textWindowStill
ScreenFade _screenFade
bool _musicFlag
bool _soundFlag
bool _dithering
bool _disableFastwalk
- Public Attributes inherited from Engine

Protected Member Functions

virtual Common::Error run ()
 Init the engine and start its main loop. More...
virtual bool hasFeature (EngineFeature f) const
 Determine whether the engine supports the specified feature. More...
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
bool shouldPerformAutoSave (int lastSaveTime)
 Indicate whether an autosave should be performed. More...
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...

Private Member Functions

void initialize ()
 Handles basic initialisation. More...
void loadOptions ()

Private Attributes

const MADSGameDescription_gameDescription
Common::RandomSource _randomSource

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
 A feature in this context means an ability of the engine which can be either available or not. More...
- Static Public Member Functions inherited from Engine
static void quitGame ()
 Request the engine to quit. More...
static bool shouldQuit ()
 Return whether the ENGINE should quit respectively should return to the launcher. More...
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
- Protected Attributes inherited from Engine
const Common::String _targetName

Detailed Description

Definition at line 79 of file mads.h.

Constructor & Destructor Documentation

◆ MADSEngine()

MADS::MADSEngine::MADSEngine ( OSystem syst,
const MADSGameDescription gameDesc 

Definition at line 38 of file mads.cpp.

◆ ~MADSEngine()

MADS::MADSEngine::~MADSEngine ( )

Definition at line 69 of file mads.cpp.

Member Function Documentation

◆ canLoadGameStateCurrently()

bool MADS::MADSEngine::canLoadGameStateCurrently ( )

Returns true if it is currently okay to restore a game.

Reimplemented from Engine.

Definition at line 185 of file mads.cpp.

◆ canSaveGameStateCurrently()

bool MADS::MADSEngine::canSaveGameStateCurrently ( )

Returns true if it is currently okay to save the game.

Reimplemented from Engine.

Definition at line 191 of file mads.cpp.

◆ generateSaveName()

Common::String MADS::MADSEngine::generateSaveName ( int  slot)

Support method that generates a savegame name.

slotSlot number

Definition at line 207 of file mads.cpp.

◆ getFeatures()

uint32 MADS::MADSEngine::getFeatures ( ) const

Definition at line 57 of file detection.cpp.

◆ getGameFeatures()

uint32 MADS::MADSEngine::getGameFeatures ( ) const

Definition at line 53 of file detection.cpp.

◆ getGameID()

uint32 MADS::MADSEngine::getGameID ( ) const

Definition at line 49 of file detection.cpp.

◆ getLanguage()

Common::Language MADS::MADSEngine::getLanguage ( ) const

Definition at line 61 of file detection.cpp.

◆ getPlatform()

Common::Platform MADS::MADSEngine::getPlatform ( ) const

Definition at line 65 of file detection.cpp.

◆ getRandomNumber() [1/2]

int MADS::MADSEngine::getRandomNumber ( int  maxNumber)

Definition at line 171 of file mads.cpp.

◆ getRandomNumber() [2/2]

int MADS::MADSEngine::getRandomNumber ( int  minNumber,
int  maxNumber 

Definition at line 175 of file mads.cpp.

◆ getVersion()

uint16 MADS::MADSEngine::getVersion ( ) const

◆ hasFeature()

bool MADS::MADSEngine::hasFeature ( EngineFeature  f) const

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 176 of file detection.cpp.

◆ hypotenuse()

int MADS::MADSEngine::hypotenuse ( int  xv,
int  yv 

Definition at line 181 of file mads.cpp.

◆ initialize()

void MADS::MADSEngine::initialize ( )

Handles basic initialisation.

Definition at line 85 of file mads.cpp.

◆ loadGameState()

Common::Error MADS::MADSEngine::loadGameState ( int  slot)

Handles loading a game via the GMM.

Reimplemented from Engine.

Definition at line 211 of file mads.cpp.

◆ loadOptions()

void MADS::MADSEngine::loadOptions ( )

Definition at line 109 of file mads.cpp.

◆ run()

Common::Error MADS::MADSEngine::run ( )

Init the engine and start its main loop.

returns kNoError on success, else an error code.

Implements Engine.

Definition at line 161 of file mads.cpp.

◆ saveGameState()

Common::Error MADS::MADSEngine::saveGameState ( int  slot,
const Common::String desc 

Handles saving the game via the GMM.

Reimplemented from Engine.

Definition at line 218 of file mads.cpp.

◆ saveOptions()

void MADS::MADSEngine::saveOptions ( )

Definition at line 143 of file mads.cpp.

◆ syncSoundSettings()

void MADS::MADSEngine::syncSoundSettings ( )

Handles updating sound settings after they're changed in the GMM dialog.

Reimplemented from Engine.

Definition at line 197 of file mads.cpp.

Member Data Documentation

◆ _audio

AudioPlayer* MADS::MADSEngine::_audio

Definition at line 105 of file mads.h.

◆ _debugger

Debugger* MADS::MADSEngine::_debugger

Definition at line 95 of file mads.h.

◆ _dialogs

Dialogs* MADS::MADSEngine::_dialogs

Definition at line 96 of file mads.h.

◆ _disableFastwalk

bool MADS::MADSEngine::_disableFastwalk

Definition at line 113 of file mads.h.

◆ _dithering

bool MADS::MADSEngine::_dithering

Definition at line 112 of file mads.h.

◆ _easyMouse

bool MADS::MADSEngine::_easyMouse

Definition at line 106 of file mads.h.

◆ _events

EventsManager* MADS::MADSEngine::_events

Definition at line 97 of file mads.h.

◆ _font

Font* MADS::MADSEngine::_font

Definition at line 98 of file mads.h.

◆ _game

Game* MADS::MADSEngine::_game

Definition at line 99 of file mads.h.

◆ _gameConv

GameConversations* MADS::MADSEngine::_gameConv

Definition at line 100 of file mads.h.

◆ _gameDescription

const MADSGameDescription* MADS::MADSEngine::_gameDescription

Definition at line 81 of file mads.h.

◆ _invObjectsAnimated

bool MADS::MADSEngine::_invObjectsAnimated

Definition at line 107 of file mads.h.

◆ _musicFlag

bool MADS::MADSEngine::_musicFlag

Definition at line 110 of file mads.h.

◆ _palette

Palette* MADS::MADSEngine::_palette

Definition at line 101 of file mads.h.

◆ _randomSource

Common::RandomSource MADS::MADSEngine::_randomSource

Definition at line 82 of file mads.h.

◆ _resources

Resources* MADS::MADSEngine::_resources

Definition at line 102 of file mads.h.

◆ _screen

Screen* MADS::MADSEngine::_screen

Definition at line 103 of file mads.h.

◆ _screenFade

ScreenFade MADS::MADSEngine::_screenFade

Definition at line 109 of file mads.h.

◆ _sound

SoundManager* MADS::MADSEngine::_sound

Definition at line 104 of file mads.h.

◆ _soundFlag

bool MADS::MADSEngine::_soundFlag

Definition at line 111 of file mads.h.

◆ _textWindowStill

bool MADS::MADSEngine::_textWindowStill

Definition at line 108 of file mads.h.

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