mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 08:25:35 +00:00
HUGO: Refactor to use Engine debugger
This commit is contained in:
parent
22d7c1c15e
commit
f1b47670bf
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user