PINK: Refactor to use Engine debugger

This commit is contained in:
Paul Gilbert
2020-02-16 13:07:19 +02:00
committed by Filippos Karapetis
parent 118e024bdd
commit 4b09375739
2 changed files with 3 additions and 10 deletions
+3 -9
View File
@@ -41,7 +41,7 @@
namespace Pink {
PinkEngine::PinkEngine(OSystem *system, const ADGameDescription *desc)
: Engine(system), _console(nullptr), _rnd("pink"), _exeResources(nullptr),
: Engine(system), _rnd("pink"), _exeResources(nullptr),
_desc(desc), _bro(nullptr), _menu(nullptr), _actor(nullptr),
_module(nullptr), _director(nullptr), _pdaMgr(this) {
@@ -56,7 +56,6 @@ PinkEngine::PinkEngine(OSystem *system, const ADGameDescription *desc)
}
PinkEngine::~PinkEngine() {
delete _console;
delete _exeResources;
delete _bro;
_pdaMgr.close();
@@ -80,7 +79,7 @@ Common::Error PinkEngine::init() {
return Common::kNoGameDataFoundError;
}
_console = new Console(this);
setDebugger(new Console(this));
_director = new Director();
initMenu();
@@ -145,12 +144,7 @@ Common::Error Pink::PinkEngine::run() {
_actor->onRightButtonClick(event.mouse);
break;
case Common::EVENT_KEYDOWN:
if (event.kbd.keycode == Common::KEYCODE_d && event.kbd.hasFlags(Common::KBD_CTRL)) {
_console->attach();
_console->onFrame();
} else {
_actor->onKeyboardButtonClick(event.kbd.keycode);
}
_actor->onKeyboardButtonClick(event.kbd.keycode);
break;
default:
break;
-1
View File
@@ -146,7 +146,6 @@ private:
void openLocalWebPage(const Common::String &pageName) const;
private:
Console *_console;
Common::RandomSource _rnd;
Common::Array<Graphics::WinCursorGroup *> _cursors;