diff options
author | Strangerke | 2014-02-27 08:09:57 +0100 |
---|---|---|
committer | Strangerke | 2014-02-27 08:09:57 +0100 |
commit | 6dd0a81fdfa1b39a77d845a970606d2a00004ffe (patch) | |
tree | 0ab71e3b73b8a6fbc5de5a814a2a8b27c4a04097 /engines/voyeur/voyeur.cpp | |
parent | 9f74d13c57033f5cf60b711021f0b0b1e8697f9e (diff) | |
download | scummvm-rg350-6dd0a81fdfa1b39a77d845a970606d2a00004ffe.tar.gz scummvm-rg350-6dd0a81fdfa1b39a77d845a970606d2a00004ffe.tar.bz2 scummvm-rg350-6dd0a81fdfa1b39a77d845a970606d2a00004ffe.zip |
VOYEUR: Remove setVm from FilesManager
Diffstat (limited to 'engines/voyeur/voyeur.cpp')
-rw-r--r-- | engines/voyeur/voyeur.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index 5112445182..d0cfb05569 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -41,6 +41,7 @@ VoyeurEngine::VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc) Common::Point(1, 1), 1, 0, 0) { _debugger = nullptr; _eventsManager = nullptr; + _filesManager = nullptr; _soundManager = nullptr; _voy = nullptr; _bVoy = NULL; @@ -68,11 +69,21 @@ VoyeurEngine::VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc) initializeManagers(); } +void VoyeurEngine::initializeManagers() { + _graphicsManager.setVm(this); + _debugger = new Debugger(this); + _eventsManager = new EventsManager(this); + _filesManager = new FilesManager(this); + _soundManager = new SoundManager(this, _mixer); + _voy = new SVoy(this); +} + VoyeurEngine::~VoyeurEngine() { delete _bVoy; delete _voy; delete _soundManager; delete _eventsManager; + delete _filesManager; delete _debugger; } @@ -99,15 +110,6 @@ int VoyeurEngine::getRandomNumber(int maxNumber) { return _randomSource.getRandomNumber(maxNumber); } -void VoyeurEngine::initializeManagers() { - _filesManager.setVm(this); - _graphicsManager.setVm(this); - _debugger = new Debugger(this); - _eventsManager = new EventsManager(this); - _soundManager = new SoundManager(this, _mixer); - _voy = new SVoy(this); -} - void VoyeurEngine::ESP_Init() { ThreadResource::init(); @@ -118,7 +120,7 @@ void VoyeurEngine::ESP_Init() { void VoyeurEngine::globalInitBolt() { initBolt(); - _filesManager.openBoltLib("bvoy.blt", _bVoy); + _filesManager->openBoltLib("bvoy.blt", _bVoy); _bVoy->getBoltGroup(0x000); _bVoy->getBoltGroup(0x100); @@ -233,8 +235,8 @@ void VoyeurEngine::showConversionScreen() { bool VoyeurEngine::doLock() { bool result = true; int buttonVocSize, wrongVocSize; - byte *buttonVoc = _filesManager.fload("button.voc", &buttonVocSize); - byte *wrongVoc = _filesManager.fload("wrong.voc", &wrongVocSize); + byte *buttonVoc = _filesManager->fload("button.voc", &buttonVocSize); + byte *wrongVoc = _filesManager->fload("wrong.voc", &wrongVocSize); if (_bVoy->getBoltGroup(0x700)) { _voy->_viewBounds = _bVoy->boltEntry(0x704)._rectResource; |