From 7bcc15c0d95c6e3716807b9e258c688c21dfd5b0 Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Tue, 29 Nov 2022 16:45:05 +0000 Subject: [PATCH] KINGDOM: Simplify the console code --- engines/kingdom/kingdom.cpp | 11 +---------- engines/kingdom/kingdom.h | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/engines/kingdom/kingdom.cpp b/engines/kingdom/kingdom.cpp index f682f5c20d1..253c9683edc 100644 --- a/engines/kingdom/kingdom.cpp +++ b/engines/kingdom/kingdom.cpp @@ -49,7 +49,6 @@ namespace Kingdom { KingdomGame::KingdomGame(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) { - _console = nullptr; _rnd = new Common::RandomSource("kingdom"); _logic = nullptr; @@ -145,7 +144,6 @@ void KingdomGame::initVariables() { } KingdomGame::~KingdomGame() { - delete _console; delete _logic; delete _rnd; } @@ -161,7 +159,7 @@ Common::Error KingdomGame::run() { } else initGraphics(320, 200); - _console = new Console(this); + setDebugger(new Console(this)); _logic = new Logic(this); @@ -204,9 +202,6 @@ void KingdomGame::refreshScreen() { g_system->updateScreen(); checkTimers(); - - // Signal the ScummVM debugger - _console->onFrame(); } void KingdomGame::checkTimers() { @@ -254,8 +249,6 @@ void KingdomGame::checkTimers() { void KingdomGame::drawScreen() { //TODO - - _console->onFrame(); } void KingdomGame::setupPics() { @@ -1455,8 +1448,6 @@ int KingdomGame::getAKey() { // TODO: Reenable ScummVM custom key commands - // else if (event.kbd.keycode == Common::KEYCODE_d && event.kbd.hasFlags(Common::KBD_CTRL)) - // _console->attach(); // else if (event.kbd.keycode == Common::KEYCODE_c && event.kbd.hasFlags(Common::KBD_CTRL)) { // _userInput = 0x12D; // _QuitFlag = 2; diff --git a/engines/kingdom/kingdom.h b/engines/kingdom/kingdom.h index 892fae0e6c9..dec18a93ae1 100644 --- a/engines/kingdom/kingdom.h +++ b/engines/kingdom/kingdom.h @@ -101,7 +101,6 @@ namespace Kingdom { bool isDemo() const; private: - Console *_console; Logic *_logic; KingArtEntry *_kingartEntries;