ScummVM
Made::MadeEngine Class Reference

#include <made.h>

+ Inheritance diagram for Made::MadeEngine:
+ Collaboration diagram for Made::MadeEngine:

Public Member Functions

 MadeEngine (OSystem *syst, const MadeGameDescription *gameDesc)
 
 ~MadeEngine () override
 
bool hasFeature (EngineFeature f) const override
 Determine whether the engine supports the specified feature. More...
 
void syncSoundSettings () override
 Notify the engine that the sound settings in the config manager may have changed and that it hence should adjust any internal volume etc. More...
 
uint32 getGameID () const
 
uint32 getFeatures () const
 
uint16 getVersion () const
 
Common::Platform getPlatform () const
 
int16 getTicks ()
 
int16 getTimer (int16 timerNum)
 
void setTimer (int16 timerNum, int16 value)
 
void resetTimer (int16 timerNum)
 
int16 allocTimer ()
 
void freeTimer (int16 timerNum)
 
void resetAllTimers ()
 
const Common::String getTargetName ()
 
Common::String getSavegameFilename (int16 saveNum)
 
void handleEvents ()
 
- Public Member Functions inherited from Engine
 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...
 
void setDebugger (GUI::Debugger *debugger)
 Sets the engine's debugger. More...
 
GUI::DebuggergetOrCreateDebugger ()
 Return the engine's debugger instance, or create one if none is present. More...
 
virtual void flipMute ()
 Flip mute all sound option. More...
 
virtual Common::String getSaveStateName (int slot) const
 Generates the savegame filename. More...
 
virtual Common::Error loadGameState (int slot)
 Load a game state. More...
 
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 Load a game state. More...
 
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
 
virtual bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
 
virtual Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false)
 Save a game state. More...
 
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 Save a game state. More...
 
virtual bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
 
bool saveGameDialog ()
 Shows the ScummVM save dialog, allowing users to save their game. More...
 
bool loadGameDialog ()
 Shows the ScummVM Restore dialog, allowing users to load a game. More...
 
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...
 
void handleAutoSave ()
 Checks for whether it's time to do an autosave, and if so, does it. More...
 
void saveAutosaveIfEnabled ()
 Does an autosave immediately if autosaves are turned on. More...
 
virtual bool canSaveAutosaveCurrently ()
 Indicates whether an autosave can currently be saved. More...
 
virtual int getAutosaveSlot () const
 Returns the slot that should be used for autosaves. More...
 
bool shouldPerformAutoSave (int lastSaveTime)
 

Public Attributes

Common::RandomSource_rnd
 
const MadeGameDescription_gameDescription
 
PmvPlayer_pmvPlayer
 
ResourceReader_res
 
Screen_screen
 
GameDatabase_dat
 
ScriptInterpreter_script
 
MusicPlayer_music
 
uint16 _eventNum
 
int _eventMouseX
 
int _eventMouseY
 
uint16 _eventKey
 
int _soundRate
 
bool _autoStopSound
 
uint _soundEnergyIndex
 
SoundEnergyArray_soundEnergyArray
 
uint32 _musicBeatStart
 
uint32 _cdTimeStart
 
int32 _timers [50]
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

Common::Error run () override
 Init the engine and start its main loop. More...
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 

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 MetaEnginegetMetaEngine ()
 
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Detailed Description

Definition at line 71 of file made.h.

Constructor & Destructor Documentation

◆ MadeEngine()

Made::MadeEngine::MadeEngine ( OSystem syst,
const MadeGameDescription gameDesc 
)

Definition at line 43 of file made.cpp.

◆ ~MadeEngine()

Made::MadeEngine::~MadeEngine ( )
override

Definition at line 97 of file made.cpp.

Member Function Documentation

◆ allocTimer()

int16 Made::MadeEngine::allocTimer ( )

Definition at line 142 of file made.cpp.

◆ freeTimer()

void Made::MadeEngine::freeTimer ( int16  timerNum)

Definition at line 152 of file made.cpp.

◆ getFeatures()

uint32 Made::MadeEngine::getFeatures ( ) const

Definition at line 34 of file detection.cpp.

◆ getGameID()

uint32 Made::MadeEngine::getGameID ( ) const

Definition at line 30 of file detection.cpp.

◆ getPlatform()

Common::Platform Made::MadeEngine::getPlatform ( ) const

Definition at line 38 of file detection.cpp.

◆ getSavegameFilename()

Common::String Made::MadeEngine::getSavegameFilename ( int16  saveNum)

Definition at line 162 of file made.cpp.

◆ getTargetName()

const Common::String Made::MadeEngine::getTargetName ( )
inline

Definition at line 120 of file made.h.

◆ getTicks()

int16 Made::MadeEngine::getTicks ( )

Definition at line 121 of file made.cpp.

◆ getTimer()

int16 Made::MadeEngine::getTimer ( int16  timerNum)

Definition at line 125 of file made.cpp.

◆ getVersion()

uint16 Made::MadeEngine::getVersion ( ) const

Definition at line 42 of file detection.cpp.

◆ handleEvents()

void Made::MadeEngine::handleEvents ( )

Definition at line 166 of file made.cpp.

◆ hasFeature()

bool Made::MadeEngine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 85 of file detection.cpp.

◆ resetAllTimers()

void Made::MadeEngine::resetAllTimers ( )

Definition at line 157 of file made.cpp.

◆ resetTimer()

void Made::MadeEngine::resetTimer ( int16  timerNum)

Definition at line 137 of file made.cpp.

◆ run()

Common::Error Made::MadeEngine::run ( )
overrideprotectedvirtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 256 of file made.cpp.

◆ setTimer()

void Made::MadeEngine::setTimer ( int16  timerNum,
int16  value 
)

Definition at line 132 of file made.cpp.

◆ syncSoundSettings()

void Made::MadeEngine::syncSoundSettings ( )
overridevirtual

Notify the engine that the sound settings in the config manager may have changed and that it hence should adjust any internal volume etc.

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).

Note
When setting volume levels, respect the "mute" config entry.
The volume for the plain sound type is reset to the maximum volume. If the engine can associate its own value for this type, it needs to overwrite this member and set it accordingly.
Todo:
find a better name for this

Reimplemented from Engine.

Definition at line 109 of file made.cpp.

Member Data Documentation

◆ _autoStopSound

bool Made::MadeEngine::_autoStopSound

Definition at line 104 of file made.h.

◆ _cdTimeStart

uint32 Made::MadeEngine::_cdTimeStart

Definition at line 109 of file made.h.

◆ _dat

GameDatabase* Made::MadeEngine::_dat

Definition at line 95 of file made.h.

◆ _eventKey

uint16 Made::MadeEngine::_eventKey

Definition at line 101 of file made.h.

◆ _eventMouseX

int Made::MadeEngine::_eventMouseX

Definition at line 100 of file made.h.

◆ _eventMouseY

int Made::MadeEngine::_eventMouseY

Definition at line 100 of file made.h.

◆ _eventNum

uint16 Made::MadeEngine::_eventNum

Definition at line 99 of file made.h.

◆ _gameDescription

const MadeGameDescription* Made::MadeEngine::_gameDescription

Definition at line 85 of file made.h.

◆ _music

MusicPlayer* Made::MadeEngine::_music

Definition at line 97 of file made.h.

◆ _musicBeatStart

uint32 Made::MadeEngine::_musicBeatStart

Definition at line 108 of file made.h.

◆ _pmvPlayer

PmvPlayer* Made::MadeEngine::_pmvPlayer

Definition at line 92 of file made.h.

◆ _res

ResourceReader* Made::MadeEngine::_res

Definition at line 93 of file made.h.

◆ _rnd

Common::RandomSource* Made::MadeEngine::_rnd

Definition at line 84 of file made.h.

◆ _screen

Screen* Made::MadeEngine::_screen

Definition at line 94 of file made.h.

◆ _script

ScriptInterpreter* Made::MadeEngine::_script

Definition at line 96 of file made.h.

◆ _soundEnergyArray

SoundEnergyArray* Made::MadeEngine::_soundEnergyArray

Definition at line 106 of file made.h.

◆ _soundEnergyIndex

uint Made::MadeEngine::_soundEnergyIndex

Definition at line 105 of file made.h.

◆ _soundRate

int Made::MadeEngine::_soundRate

Definition at line 103 of file made.h.

◆ _timers

int32 Made::MadeEngine::_timers[50]

Definition at line 111 of file made.h.


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