From c44a028ae7733deb62034b8370006ea459383a34 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 9 Feb 2020 09:16:57 -0800 Subject: [PATCH] ZVISION: Refactor to use Engine debugger --- engines/zvision/core/events.cpp | 8 -------- engines/zvision/zvision.cpp | 8 +------- engines/zvision/zvision.h | 2 -- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/engines/zvision/core/events.cpp b/engines/zvision/core/events.cpp index f1922c62320..4ef551af94e 100644 --- a/engines/zvision/core/events.cpp +++ b/engines/zvision/core/events.cpp @@ -224,14 +224,6 @@ void ZVision::processEvents() { case Common::EVENT_KEYDOWN: { switch (_event.kbd.keycode) { - case Common::KEYCODE_d: - if (_event.kbd.hasFlags(Common::KBD_CTRL)) { - // Start the debugger - _console->attach(); - _console->onFrame(); - } - break; - case Common::KEYCODE_LEFT: case Common::KEYCODE_RIGHT: if (_renderManager->getRenderTable()->getRenderState() == RenderTable::PANORAMA) diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp index 41b2297fdba..c3dd1894a71 100644 --- a/engines/zvision/zvision.cpp +++ b/engines/zvision/zvision.cpp @@ -90,7 +90,6 @@ ZVision::ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc) _cursorManager(nullptr), _midiManager(nullptr), _rnd(nullptr), - _console(nullptr), _menu(nullptr), _searchManager(nullptr), _textRenderer(nullptr), @@ -112,7 +111,6 @@ ZVision::~ZVision() { debug(1, "ZVision::~ZVision"); // Dispose of resources - delete _console; delete _cursorManager; delete _stringManager; delete _saveManager; @@ -234,7 +232,7 @@ void ZVision::initialize() { #endif // Create debugger console. It requires GFX to be initialized - _console = new Console(this); + setDebugger(new Console(this)); _doubleFPS = ConfMan.getBool("doublefps"); // Initialize FPS timer callback @@ -382,10 +380,6 @@ bool ZVision::canRender() { return _frameRenderDelay <= 0; } -GUI::Debugger *ZVision::getDebugger() { - return _console; -} - void ZVision::syncSoundSettings() { Engine::syncSoundSettings(); diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 46192b9cffd..b0986701ffc 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -112,7 +112,6 @@ public: const Graphics::PixelFormat _screenPixelFormat; private: - Console *_console; const ZVisionGameDescription *_gameDescription; const int _desiredFrameTime; @@ -231,7 +230,6 @@ public: return _fps; } - GUI::Debugger *getDebugger() override; void syncSoundSettings() override; void loadSettings();