diff options
author | Max Horn | 2006-10-21 12:03:43 +0000 |
---|---|---|
committer | Max Horn | 2006-10-21 12:03:43 +0000 |
commit | f95f5ed13356233b1f1976c6a793b6e104373a4d (patch) | |
tree | 299fd488a8742bcc0245ad3ae3c5e112f6742645 /engines | |
parent | 772affc7dbb75faad85b69c00b381d12340f809d (diff) | |
download | scummvm-rg350-f95f5ed13356233b1f1976c6a793b6e104373a4d.tar.gz scummvm-rg350-f95f5ed13356233b1f1976c6a793b6e104373a4d.tar.bz2 scummvm-rg350-f95f5ed13356233b1f1976c6a793b6e104373a4d.zip |
Added OSystem::getTimerManager and OSystem::getMixer methods (wip)
svn-id: r24405
Diffstat (limited to 'engines')
-rw-r--r-- | engines/engine.cpp | 19 | ||||
-rw-r--r-- | engines/engine.h | 3 |
2 files changed, 11 insertions, 11 deletions
diff --git a/engines/engine.cpp b/engines/engine.cpp index 0790c19a1b..c2b01ac715 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -26,32 +26,31 @@ #include "common/timer.h" #include "common/savefile.h" #include "common/system.h" -#include "sound/mixer.h" #include "gui/message.h" +#include "sound/mixer.h" #ifdef _WIN32_WCE extern bool isSmartphone(void); #endif -/* FIXME - BIG HACK for MidiEmu */ +// FIXME - BIG HACK for MidiEmu & error() Engine *g_engine = 0; + Engine::Engine(OSystem *syst) : _system(syst), + _mixer(_system->getMixer()), + _timer(_system->getTimerManager()), + _saveFileMan(_system->getSavefileManager()), _gameDataPath(ConfMan.get("path")), - _targetName(ConfMan.getActiveDomainName()){ - g_engine = this; - _mixer = new Audio::Mixer(); - - _timer = Common::g_timer; - - _saveFileMan = _system->getSavefileManager(); + _targetName(ConfMan.getActiveDomainName()) { + g_engine = this; _autosavePeriod = ConfMan.getInt("autosave_period"); } Engine::~Engine() { - delete _mixer; + _mixer->stopAll(true); delete _saveFileMan; g_engine = NULL; diff --git a/engines/engine.h b/engines/engine.h index 85798c219b..62da2cc3ff 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -45,9 +45,10 @@ public: Common::TimerManager * _timer; protected: + Common::SaveFileManager *_saveFileMan; + const Common::String _targetName; // target name for saves const Common::String _gameDataPath; - Common::SaveFileManager *_saveFileMan; private: int _autosavePeriod; |