[Scummvm-git-logs] scummvm master -> ea7a6ec27c52aad3240de787cfb5590cf0824910
fracturehill
76959842+fracturehill at users.noreply.github.com
Sun Mar 28 18:36:18 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4b5eefb731 NANCY: Update the console code
ea7a6ec27c ENGINES: Mark Engine::getDebugger() as final
Commit: 4b5eefb731a34d05a8c79d96ef9db1924ef65286
https://github.com/scummvm/scummvm/commit/4b5eefb731a34d05a8c79d96ef9db1924ef65286
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-03-28T21:36:15+03:00
Commit Message:
NANCY: Update the console code
Changed paths:
engines/nancy/input.cpp
engines/nancy/nancy.cpp
engines/nancy/nancy.h
diff --git a/engines/nancy/input.cpp b/engines/nancy/input.cpp
index 18275b1a91..c41579a317 100644
--- a/engines/nancy/input.cpp
+++ b/engines/nancy/input.cpp
@@ -43,10 +43,7 @@ void InputManager::processEvents() {
while (g_nancy->getEventManager()->pollEvent(event)) {
switch (event.type) {
case EVENT_KEYDOWN:
- if (event.kbd.keycode == KEYCODE_d && event.kbd.flags & Common::KBD_CTRL) {
- // Launch debug console
- g_nancy->_launchConsole = true;
- } else if (event.kbd.keycode == KEYCODE_q && event.kbd.flags & Common::KBD_CTRL) {
+ if (event.kbd.keycode == KEYCODE_q && event.kbd.flags & Common::KBD_CTRL) {
// Quit
g_nancy->quitGame();
} else {
diff --git a/engines/nancy/nancy.cpp b/engines/nancy/nancy.cpp
index ea5b10cf1b..f37fb3272a 100644
--- a/engines/nancy/nancy.cpp
+++ b/engines/nancy/nancy.cpp
@@ -60,7 +60,6 @@ NancyEngine::NancyEngine(OSystem *syst, const NancyGameDescription *gd) : Engine
DebugMan.addDebugChannel(kDebugActionRecord, "ActionRecord", "Action Record debug level");
DebugMan.addDebugChannel(kDebugScene, "Scene", "Scene debug level");
- _console = new NancyConsole();
_randomSource = new Common::RandomSource("Nancy");
_randomSource->setSeed(_randomSource->getSeed());
@@ -69,8 +68,6 @@ NancyEngine::NancyEngine(OSystem *syst, const NancyGameDescription *gd) : Engine
_graphicsManager = new GraphicsManager();
_cursorManager = new CursorManager();
- _launchConsole = false;
-
_resource = nullptr;
_firstSceneID = 0;
_startTimeHours = 0;
@@ -81,7 +78,6 @@ NancyEngine::NancyEngine(OSystem *syst, const NancyGameDescription *gd) : Engine
NancyEngine::~NancyEngine() {
clearBootChunks();
DebugMan.clearAllDebugChannels();
- delete _console;
delete _randomSource;
delete _graphicsManager;
@@ -105,10 +101,6 @@ NancyEngine *NancyEngine::create(GameType type, OSystem *syst, const NancyGameDe
}
}
-GUI::Debugger *NancyEngine::getDebugger() {
- return _console;
-}
-
Common::Error NancyEngine::loadGameStream(Common::SeekableReadStream *stream) {
Common::Serializer ser(stream, nullptr);
return synchronize(ser);
@@ -234,6 +226,8 @@ void NancyEngine::callCheatMenu(bool eventFlags) {
}
Common::Error NancyEngine::run() {
+ setDebugger(new NancyConsole());
+
// Boot the engine
setState(NancyState::kBoot);
@@ -257,12 +251,6 @@ Common::Error NancyEngine::run() {
_graphicsManager->draw();
- if (_launchConsole) {
- _console->attach();
- _launchConsole = false;
- }
- _console->onFrame();
-
_system->updateScreen();
_system->delayMillis(16);
}
diff --git a/engines/nancy/nancy.h b/engines/nancy/nancy.h
index 2ef52d600b..1579d6e169 100644
--- a/engines/nancy/nancy.h
+++ b/engines/nancy/nancy.h
@@ -90,8 +90,6 @@ public:
static NancyEngine *create(GameType type, OSystem *syst, const NancyGameDescription *gd);
- virtual GUI::Debugger *getDebugger() override;
-
virtual bool hasFeature(EngineFeature f) const override;
virtual Common::Error loadGameStream(Common::SeekableReadStream *stream) override;
@@ -125,8 +123,6 @@ public:
Common::RandomSource *_randomSource;
- bool _launchConsole;
-
uint16 _firstSceneID;
uint16 _startTimeHours;
@@ -162,8 +158,6 @@ private:
GameFlow _gameFlow;
OSystem *_system;
- NancyConsole *_console;
-
const NancyGameDescription *_gameDescription;
Common::HashMap<Common::String, Common::SeekableReadStream *> _bootChunks;
Commit: ea7a6ec27c52aad3240de787cfb5590cf0824910
https://github.com/scummvm/scummvm/commit/ea7a6ec27c52aad3240de787cfb5590cf0824910
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-03-28T21:36:15+03:00
Commit Message:
ENGINES: Mark Engine::getDebugger() as final
Changed paths:
engines/engine.h
diff --git a/engines/engine.h b/engines/engine.h
index af1704cdac..ffb82fa74b 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -322,7 +322,7 @@ public:
/**
* Return the engine's debugger instance, if any.
*/
- virtual GUI::Debugger *getDebugger() { return _debugger; }
+ virtual GUI::Debugger *getDebugger() final { return _debugger; }
/**
* Set the engine's debugger.
More information about the Scummvm-git-logs
mailing list