[Scummvm-git-logs] scummvm master -> 1b98b8e6a23d205665d49085cdb9753241c26b3a
bluegr
bluegr at gmail.com
Thu Mar 25 14:31:34 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1b98b8e6a2 BURIED: Update the console code
Commit: 1b98b8e6a23d205665d49085cdb9753241c26b3a
https://github.com/scummvm/scummvm/commit/1b98b8e6a23d205665d49085cdb9753241c26b3a
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-03-25T16:31:31+02:00
Commit Message:
BURIED: Update the console code
Changed paths:
engines/buried/buried.cpp
engines/buried/buried.h
diff --git a/engines/buried/buried.cpp b/engines/buried/buried.cpp
index 5f7e37da47..2c60f49862 100644
--- a/engines/buried/buried.cpp
+++ b/engines/buried/buried.cpp
@@ -57,7 +57,6 @@ BuriedEngine::BuriedEngine(OSystem *syst, const ADGameDescription *gameDesc) : E
_mainWindow = nullptr;
_focusedWindow = nullptr;
_captureWindow = nullptr;
- _console = nullptr;
_pauseStartTime = 0;
_yielding = false;
@@ -77,13 +76,12 @@ BuriedEngine::~BuriedEngine() {
delete _mainEXE;
delete _library;
delete _sound;
- delete _console;
// The queue should be empty since all windows destroy their messages
}
Common::Error BuriedEngine::run() {
- _console = new BuriedConsole(this);
+ setDebugger(new BuriedConsole(this));
#ifndef USE_ICONV
// The Japanese version needs iconv support
@@ -162,10 +160,6 @@ Common::Error BuriedEngine::run() {
return Common::kNoError;
}
-GUI::Debugger *BuriedEngine::getDebugger() {
- return _console;
-}
-
Common::String BuriedEngine::getString(uint32 stringID) {
return _mainEXE->loadString(stringID);
}
@@ -403,14 +397,8 @@ void BuriedEngine::pollForEvents() {
_focusedWindow->postMessage(new KeyUpMessage(event.kbd, 0));
break;
case Common::EVENT_KEYDOWN:
- if (event.kbd.keycode == Common::KEYCODE_d && (event.kbd.flags & Common::KBD_CTRL)) {
- // Gobble up ctrl+d for the console
- _console->attach();
- _console->onFrame();
- } else {
- if (_focusedWindow)
- _focusedWindow->postMessage(new KeyDownMessage(event.kbd, 0));
- }
+ if (_focusedWindow)
+ _focusedWindow->postMessage(new KeyDownMessage(event.kbd, 0));
break;
case Common::EVENT_LBUTTONDOWN: {
Window *window = _captureWindow ? _captureWindow : _mainWindow->childWindowAtPoint(event.mouse);
diff --git a/engines/buried/buried.h b/engines/buried/buried.h
index 9a40c838b3..5c087cd943 100644
--- a/engines/buried/buried.h
+++ b/engines/buried/buried.h
@@ -80,7 +80,6 @@ public:
Common::Language getLanguage() const;
bool hasFeature(EngineFeature f) const;
- GUI::Debugger *getDebugger();
void pauseEngineIntern(bool pause);
// Resources
@@ -108,7 +107,6 @@ public:
Window *_mainWindow; // Only one main window is supported.
Window *_focusedWindow;
Window *_captureWindow;
- BuriedConsole *_console;
// Timers
uint createTimer(Window *window, uint period);
More information about the Scummvm-git-logs
mailing list