diff options
author | Strangerke | 2014-02-26 22:54:13 +0100 |
---|---|---|
committer | Strangerke | 2014-02-26 22:54:13 +0100 |
commit | 8215f598612a61e472ec56db0f93fb43908a1348 (patch) | |
tree | cf3d2f4db24e612f54bcd820f7d7ab3d5920014d /engines/voyeur | |
parent | ccde2d5b7604756f5333ea16807c82ef1b387c10 (diff) | |
download | scummvm-rg350-8215f598612a61e472ec56db0f93fb43908a1348.tar.gz scummvm-rg350-8215f598612a61e472ec56db0f93fb43908a1348.tar.bz2 scummvm-rg350-8215f598612a61e472ec56db0f93fb43908a1348.zip |
VOYEUR: Remove setVm from Debugger
Diffstat (limited to 'engines/voyeur')
-rw-r--r-- | engines/voyeur/debugger.cpp | 2 | ||||
-rw-r--r-- | engines/voyeur/debugger.h | 4 | ||||
-rw-r--r-- | engines/voyeur/events.cpp | 12 | ||||
-rw-r--r-- | engines/voyeur/files_threads.cpp | 2 | ||||
-rw-r--r-- | engines/voyeur/voyeur.cpp | 4 | ||||
-rw-r--r-- | engines/voyeur/voyeur.h | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/engines/voyeur/debugger.cpp b/engines/voyeur/debugger.cpp index f5453210b9..fdd0825181 100644 --- a/engines/voyeur/debugger.cpp +++ b/engines/voyeur/debugger.cpp @@ -27,7 +27,7 @@ namespace Voyeur { -Debugger::Debugger() : GUI::Debugger() { +Debugger::Debugger(VoyeurEngine *vm) : GUI::Debugger(), _vm(vm) { // Register methods DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit)); DCmd_Register("exit", WRAP_METHOD(Debugger, Cmd_Exit)); diff --git a/engines/voyeur/debugger.h b/engines/voyeur/debugger.h index 0edf04eac4..12d62c51a1 100644 --- a/engines/voyeur/debugger.h +++ b/engines/voyeur/debugger.h @@ -61,10 +61,8 @@ protected: */ bool Cmd_Mouse(int argc, const char **argv); public: - Debugger(); + Debugger(VoyeurEngine *vm); virtual ~Debugger() {} - void setVm(VoyeurEngine *vm) { _vm = vm; } - }; } // End of namespace Voyeur diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp index c438883509..ea726ac0ff 100644 --- a/engines/voyeur/events.cpp +++ b/engines/voyeur/events.cpp @@ -96,7 +96,7 @@ void EventsManager::mainVoyeurIntFunc() { if (!(_vm->_voy->_eventFlags & EVTFLAG_TIME_DISABLED)) { ++_vm->_voy->_switchBGNum; - if (_vm->_debugger._isTimeActive) { + if (_vm->_debugger->_isTimeActive) { // Increase camera discharge ++_vm->_voy->_RTVNum; @@ -149,10 +149,10 @@ void EventsManager::checkForNextFrameCounter() { mainVoyeurIntFunc(); // Give time to the debugger - _vm->_debugger.onFrame(); + _vm->_debugger->onFrame(); // If mouse position display is on, display the position - if (_vm->_debugger._showMousePosition) + if (_vm->_debugger->_showMousePosition) showMousePosition(); // Display the frame @@ -161,7 +161,7 @@ void EventsManager::checkForNextFrameCounter() { g_system->updateScreen(); // Signal the ScummVM debugger - _vm->_debugger.onFrame(); + _vm->_debugger->onFrame(); } } @@ -263,8 +263,8 @@ void EventsManager::pollEvents() { // Check for debugger if (event.kbd.keycode == Common::KEYCODE_d && (event.kbd.flags & Common::KBD_CTRL)) { // Attach to the debugger - _vm->_debugger.attach(); - _vm->_debugger.onFrame(); + _vm->_debugger->attach(); + _vm->_debugger->onFrame(); } return; case Common::EVENT_LBUTTONDOWN: diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp index 2c3b5f2454..7e776cef8f 100644 --- a/engines/voyeur/files_threads.cpp +++ b/engines/voyeur/files_threads.cpp @@ -1299,7 +1299,7 @@ int ThreadResource::doInterface() { if (_vm->_voy->_RTVNum >= _vm->_voy->_RTVLimit || _vm->_voy->_RTVNum < 0) _vm->_voy->_RTVNum = _vm->_voy->_RTVLimit - 1; - if (_vm->_voy->_transitionId < 15 && _vm->_debugger._isTimeActive && + if (_vm->_voy->_transitionId < 15 && _vm->_debugger->_isTimeActive && (_vm->_voy->_RTVLimit - 3) < _vm->_voy->_RTVNum) { _vm->_voy->_RTVNum = _vm->_voy->_RTVLimit; _vm->makeViewFinder(); diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index abb539f883..b1ead5a8c4 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -40,6 +40,7 @@ VoyeurEngine::VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc) _defaultFontInfo(3, 0xff, 0xff, 0, 0, ALIGN_LEFT, 0, Common::Point(), 1, 1, Common::Point(1, 1), 1, 0, 0) { _voy = nullptr; + _debugger = nullptr; _bVoy = NULL; _iForceDeath = ConfMan.getInt("boot_param"); @@ -68,6 +69,7 @@ VoyeurEngine::VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc) VoyeurEngine::~VoyeurEngine() { delete _bVoy; delete _voy; + delete _debugger; } Common::Error VoyeurEngine::run() { @@ -94,11 +96,11 @@ int VoyeurEngine::getRandomNumber(int maxNumber) { } void VoyeurEngine::initializeManagers() { - _debugger.setVm(this); _eventsManager.setVm(this); _filesManager.setVm(this); _graphicsManager.setVm(this); _soundManager.setVm(this); + _debugger = new Debugger(this); _voy = new SVoy(this); } diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h index 032ef24996..b7fcad49f4 100644 --- a/engines/voyeur/voyeur.h +++ b/engines/voyeur/voyeur.h @@ -157,7 +157,7 @@ protected: virtual bool hasFeature(EngineFeature f) const; public: BoltFile *_bVoy; - Debugger _debugger; + Debugger *_debugger; EventsManager _eventsManager; FilesManager _filesManager; GraphicsManager _graphicsManager; |