HUGO: Refactor to use Engine debugger

This commit is contained in:
Paul Gilbert 2020-02-08 21:40:28 -08:00 committed by Filippos Karapetis
parent 22d7c1c15e
commit f1b47670bf
3 changed files with 1 additions and 14 deletions

View File

@ -68,7 +68,7 @@ HugoEngine::HugoEngine(OSystem *syst, const HugoGameDescription *gd) : Engine(sy
DebugMan.addDebugChannel(kDebugObject, "Object", "Object debug level"); DebugMan.addDebugChannel(kDebugObject, "Object", "Object debug level");
DebugMan.addDebugChannel(kDebugMusic, "Music", "Music debug level"); DebugMan.addDebugChannel(kDebugMusic, "Music", "Music debug level");
_console = new HugoConsole(this); setDebugger(new HugoConsole(this));
_rnd = 0; _rnd = 0;
_screen = nullptr; _screen = nullptr;
@ -149,14 +149,9 @@ HugoEngine::~HugoEngine() {
delete _text; delete _text;
DebugMan.clearAllDebugChannels(); DebugMan.clearAllDebugChannels();
delete _console;
delete _rnd; delete _rnd;
} }
GUI::Debugger *HugoEngine::getDebugger() {
return _console;
}
Status &HugoEngine::getGameStatus() { Status &HugoEngine::getGameStatus() {
return _status; return _status;
} }

View File

@ -239,8 +239,6 @@ public:
Maze _maze; // Maze control structure Maze _maze; // Maze control structure
hugoBoot _boot; // Boot info structure hugoBoot _boot; // Boot info structure
GUI::Debugger *getDebugger() override;
Common::RandomSource *_rnd; Common::RandomSource *_rnd;
const char *_episode; const char *_episode;
@ -320,8 +318,6 @@ private:
static HugoEngine *s_Engine; static HugoEngine *s_Engine;
HugoConsole *_console;
GameType _gameType; GameType _gameType;
Common::Platform _platform; Common::Platform _platform;
bool _packedFl; bool _packedFl;

View File

@ -286,10 +286,6 @@ void Parser::keyHandler(Common::Event event) {
if (event.kbd.hasFlags(Common::KBD_CTRL)) { if (event.kbd.hasFlags(Common::KBD_CTRL)) {
switch (nChar) { switch (nChar) {
case Common::KEYCODE_d:
_vm->getDebugger()->attach();
_vm->getDebugger()->onFrame();
break;
case Common::KEYCODE_l: case Common::KEYCODE_l:
_vm->_file->restoreGame(-1); _vm->_file->restoreGame(-1);
break; break;