SWORD1: Refactor to use Engine debugger

This commit is contained in:
Paul Gilbert 2020-02-09 08:36:00 -08:00 committed by Filippos Karapetis
parent 3da28a4c25
commit 46a1f92ef6
2 changed files with 1 additions and 12 deletions

View File

@ -65,7 +65,7 @@ SwordEngine::SwordEngine(OSystem *syst)
SearchMan.addSubDirectoryMatching(gameDataDir, "english"); // PSX Demo
SearchMan.addSubDirectoryMatching(gameDataDir, "italian"); // PSX Demo
_console = new SwordConsole(this);
setDebugger(new SwordConsole(this));
_mouseState = 0;
_resMan = 0;
@ -89,7 +89,6 @@ SwordEngine::~SwordEngine() {
delete _mouse;
delete _objectMan;
delete _resMan;
delete _console;
}
Common::Error SwordEngine::init() {
@ -692,12 +691,6 @@ uint8 SwordEngine::mainLoop() {
_screen->fullRefresh();
}
// Check for Debugger Activation
if (_keyPressed.hasFlags(Common::KBD_CTRL) && _keyPressed.keycode == Common::KEYCODE_d) {
this->getDebugger()->attach();
this->getDebugger()->onFrame();
}
_mouseState = 0;
_keyPressed.reset();
} while ((Logic::_scriptVars[SCREEN] == Logic::_scriptVars[NEW_SCREEN]) && (retCode == 0) && (!shouldQuit()));

View File

@ -108,8 +108,6 @@ protected:
bool hasFeature(EngineFeature f) const override;
void syncSoundSettings() override;
GUI::Debugger *getDebugger() override { return _console; }
Common::Error loadGameState(int slot) override;
bool canLoadGameStateCurrently() override;
Common::Error saveGameState(int slot, const Common::String &desc) override;
@ -125,8 +123,6 @@ private:
void reinitRes(); //Reinits the resources after a GMM load
SwordConsole *_console;
uint8 mainLoop();
Common::Point _mouseCoord;