From e70890691621fb75a120fba605709016874a9edb Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 8 Feb 2020 20:50:36 -0800 Subject: [PATCH] BLADERUNNER: Refactor to use Engine debugger --- engines/bladerunner/bladerunner.cpp | 13 ++----------- engines/bladerunner/bladerunner.h | 1 - 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp index 85b9339de2f..529a74be8ae 100644 --- a/engines/bladerunner/bladerunner.cpp +++ b/engines/bladerunner/bladerunner.cpp @@ -502,6 +502,7 @@ bool BladeRunnerEngine::startup(bool hasSavegames) { _sceneScript = new SceneScript(this); _debugger = new Debugger(this); + setDebugger(_debugger); // This is the original startup in the game @@ -933,7 +934,7 @@ void BladeRunnerEngine::shutdown() { // These are static objects in original game - delete _debugger; + //delete _debugger; Debugger deletion is handled by Engine _debugger = nullptr; delete _sceneScript; @@ -1269,12 +1270,6 @@ void BladeRunnerEngine::handleKeyUp(Common::Event &event) { } void BladeRunnerEngine::handleKeyDown(Common::Event &event) { - if ((event.kbd.keycode == Common::KEYCODE_d) && (event.kbd.flags & Common::KBD_CTRL)) { - getDebugger()->attach(); - getDebugger()->onFrame(); - return; - } - if (_vqaIsPlaying && (event.kbd.keycode == Common::KEYCODE_ESCAPE || event.kbd.keycode == Common::KEYCODE_RETURN)) { _vqaStopIsRequested = true; _vqaIsPlaying = false; @@ -2319,10 +2314,6 @@ Graphics::Surface BladeRunnerEngine::generateThumbnail() const { return thumbnail; } -GUI::Debugger *BladeRunnerEngine::getDebugger() { - return _debugger; -} - Common::String BladeRunnerEngine::getTargetName() const { return _targetName; } diff --git a/engines/bladerunner/bladerunner.h b/engines/bladerunner/bladerunner.h index 1281301a6b7..e5cb6ddab08 100644 --- a/engines/bladerunner/bladerunner.h +++ b/engines/bladerunner/bladerunner.h @@ -322,7 +322,6 @@ public: void blitToScreen(const Graphics::Surface &src) const; Graphics::Surface generateThumbnail() const; - GUI::Debugger *getDebugger() override; Common::String getTargetName() const; };