mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 20:17:49 +00:00
LURE: Refactor to use Engine debugger
This commit is contained in:
parent
afa27aa7c5
commit
83d7030d84
@ -129,7 +129,6 @@ void FightsManager::fightLoop() {
|
||||
}
|
||||
|
||||
Screen::getReference().update();
|
||||
game.debugger().onFrame();
|
||||
|
||||
g_system->delayMillis(10);
|
||||
}
|
||||
@ -200,14 +199,6 @@ void FightsManager::checkEvents() {
|
||||
engine.quitGame();
|
||||
return;
|
||||
|
||||
case Common::KEYCODE_d:
|
||||
if (events.event().kbd.hasFlags(Common::KBD_CTRL)) {
|
||||
// Activate the debugger
|
||||
game.debugger().attach();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// Scan through the mapping list for a move for the keypress
|
||||
const KeyMapping *keyPtr = &keyList[0];
|
||||
|
@ -47,7 +47,7 @@ Game &Game::getReference() {
|
||||
|
||||
Game::Game() {
|
||||
int_game = this;
|
||||
_debugger = new Debugger();
|
||||
g_engine->setDebugger(new Debugger());
|
||||
_fastTextFlag = false;
|
||||
_preloadFlag = false;
|
||||
_debugFlag = gDebugLevel >= ERROR_BASIC;
|
||||
@ -56,7 +56,6 @@ Game::Game() {
|
||||
}
|
||||
|
||||
Game::~Game() {
|
||||
delete _debugger;
|
||||
}
|
||||
|
||||
void Game::tick() {
|
||||
@ -190,13 +189,6 @@ void Game::execute() {
|
||||
if (events.type() == Common::EVENT_KEYDOWN) {
|
||||
uint16 roomNum = room.roomNumber();
|
||||
|
||||
if ((events.event().kbd.hasFlags(Common::KBD_CTRL)) &&
|
||||
(events.event().kbd.keycode == Common::KEYCODE_d)) {
|
||||
// Activate the debugger
|
||||
_debugger->attach();
|
||||
break;
|
||||
}
|
||||
|
||||
// Handle special keys
|
||||
bool handled = true;
|
||||
switch (events.event().kbd.keycode) {
|
||||
@ -276,8 +268,6 @@ void Game::execute() {
|
||||
|
||||
system.updateScreen();
|
||||
system.delayMillis(10);
|
||||
|
||||
_debugger->onFrame();
|
||||
}
|
||||
|
||||
room.leaveRoom();
|
||||
|
@ -43,7 +43,6 @@ enum GameState {GS_ERROR = 1, GS_TICK = 2, GS_TOCK = 4, GS_PROT = 8, GS_RESTART
|
||||
|
||||
class Game {
|
||||
private:
|
||||
Debugger *_debugger;
|
||||
bool _fastTextFlag, _soundFlag;
|
||||
uint8 _state;
|
||||
uint16 _tellCommands[MAX_TELL_COMMANDS * 3 + 1];
|
||||
@ -82,7 +81,6 @@ public:
|
||||
bool &debugFlag() { return _debugFlag; }
|
||||
bool fastTextFlag() { return _fastTextFlag; }
|
||||
bool soundFlag() { return _soundFlag; }
|
||||
Debugger &debugger() { return *_debugger; }
|
||||
|
||||
// Menu item support methods
|
||||
void doDebugMenu();
|
||||
|
@ -248,10 +248,6 @@ bool LureEngine::loadGame(uint8 slotNumber) {
|
||||
return true;
|
||||
}
|
||||
|
||||
GUI::Debugger *LureEngine::getDebugger() {
|
||||
return !Game::isCreated() ? NULL : &Game::getReference().debugger();
|
||||
}
|
||||
|
||||
void LureEngine::syncSoundSettings() {
|
||||
Engine::syncSoundSettings();
|
||||
|
||||
|
@ -116,7 +116,6 @@ public:
|
||||
LureLanguage getLureLanguage() const;
|
||||
Common::Language getLanguage() const;
|
||||
Common::Platform getPlatform() const;
|
||||
GUI::Debugger *getDebugger() override;
|
||||
bool isEGA() const { return (getFeatures() & GF_EGA) != 0; }
|
||||
|
||||
Common::Error loadGameState(int slot) override {
|
||||
|
Loading…
Reference in New Issue
Block a user