mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 13:42:02 +00:00
TITANIC: Refactor to use Engine debugger
This commit is contained in:
parent
17dc909e2c
commit
7f90c4e961
@ -141,9 +141,6 @@ bool Events::checkForNextFrameCounter() {
|
||||
// Handle any idle updates
|
||||
eventTarget()->onIdle();
|
||||
|
||||
// Give time to the debugger
|
||||
_vm->_debugger->onFrame();
|
||||
|
||||
// Display the frame
|
||||
_vm->_screen->update();
|
||||
|
||||
|
@ -345,12 +345,7 @@ void CMainGameWindow::mouseWheel(const Point &mousePos, bool wheelUp) {
|
||||
}
|
||||
|
||||
void CMainGameWindow::keyDown(Common::KeyState keyState) {
|
||||
if (keyState.keycode == Common::KEYCODE_d && (keyState.flags & Common::KBD_CTRL)) {
|
||||
// Attach to the debugger
|
||||
_vm->_debugger->attach();
|
||||
_vm->_debugger->onFrame();
|
||||
|
||||
} else if (keyState.keycode == Common::KEYCODE_c && (keyState.flags & Common::KBD_CTRL)) {
|
||||
if (keyState.keycode == Common::KEYCODE_c && (keyState.flags & Common::KBD_CTRL)) {
|
||||
// Cheat action
|
||||
if (_project && g_vm->canLoadGameStateCurrently()) {
|
||||
CViewItem *newView = _project->parseView("Cheat Room.Node 1.Cheat Rooms View");
|
||||
|
@ -60,7 +60,6 @@ TitanicEngine::TitanicEngine(OSystem *syst, const TitanicGameDescription *gameDe
|
||||
: _gameDescription(gameDesc), Engine(syst), _randomSource("Titanic") {
|
||||
g_vm = this;
|
||||
g_language = getLanguage();
|
||||
_debugger = nullptr;
|
||||
_events = nullptr;
|
||||
_filesManager = nullptr;
|
||||
_window = nullptr;
|
||||
@ -93,7 +92,7 @@ bool TitanicEngine::initialize() {
|
||||
return false;
|
||||
}
|
||||
|
||||
_debugger = new Debugger(this);
|
||||
setDebugger(new Debugger(this));
|
||||
|
||||
CSaveableObject::initClassList();
|
||||
CEnterExitFirstClassState::init();
|
||||
@ -127,7 +126,6 @@ bool TitanicEngine::initialize() {
|
||||
}
|
||||
|
||||
void TitanicEngine::deinitialize() {
|
||||
delete _debugger;
|
||||
delete _events;
|
||||
delete _window;
|
||||
delete _screenManager;
|
||||
|
@ -73,7 +73,6 @@ class CFilesManager;
|
||||
class CMainGameWindow;
|
||||
class CString;
|
||||
class CTrueTalkManager;
|
||||
class Debugger;
|
||||
class Events;
|
||||
class OSScreenManager;
|
||||
class CScriptHandler;
|
||||
@ -109,7 +108,6 @@ protected:
|
||||
Common::Error run() override;
|
||||
bool hasFeature(EngineFeature f) const override;
|
||||
public:
|
||||
Debugger *_debugger;
|
||||
Events *_events;
|
||||
CFilesManager *_filesManager;
|
||||
CMovieManager _movieManager;
|
||||
|
Loading…
x
Reference in New Issue
Block a user