aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2019-09-29 11:17:28 -0700
committerPaul Gilbert2019-09-29 15:08:52 -0700
commit055f6f0b483f8f6b285f223ca852392ef320c76f (patch)
tree912e1c45f0fe2d85b2bc0812f0c7a0b60756bfa3 /engines
parent32c9deefb7331ae1c4f25f99b44e71189f977b76 (diff)
downloadscummvm-rg350-055f6f0b483f8f6b285f223ca852392ef320c76f.tar.gz
scummvm-rg350-055f6f0b483f8f6b285f223ca852392ef320c76f.tar.bz2
scummvm-rg350-055f6f0b483f8f6b285f223ca852392ef320c76f.zip
GLK: QUEST: Startup/logging fix
Diffstat (limited to 'engines')
-rw-r--r--engines/glk/quest/geas_runner.cpp2
-rw-r--r--engines/glk/quest/quest.cpp4
-rw-r--r--engines/glk/quest/quest.h4
-rw-r--r--engines/glk/quest/streams.cpp7
4 files changed, 11 insertions, 6 deletions
diff --git a/engines/glk/quest/geas_runner.cpp b/engines/glk/quest/geas_runner.cpp
index a029c07824..f52a89b690 100644
--- a/engines/glk/quest/geas_runner.cpp
+++ b/engines/glk/quest/geas_runner.cpp
@@ -3531,7 +3531,7 @@ void geas_implementation::tick_timers() {
GeasResult GeasInterface::print_formatted(String s, bool with_newline) {
unsigned int i, j;
- //cerr << "print_formatted (" << s << ", " << with_newline << ")" << endl;
+ cerr << "print_formatted (" << s << ", " << with_newline << ")" << endl;
for (i = 0; i < s.length(); i ++) {
//std::cerr << "i == " << i << std::endl;
diff --git a/engines/glk/quest/quest.cpp b/engines/glk/quest/quest.cpp
index 8c4a22219d..71e6ab7475 100644
--- a/engines/glk/quest/quest.cpp
+++ b/engines/glk/quest/quest.cpp
@@ -32,6 +32,10 @@ namespace Quest {
Quest *g_vm;
+Quest::Quest(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst, gameDesc), _saveSlot(-1) {
+ g_vm = this;
+}
+
void Quest::runGame() {
// Check for savegame
_saveSlot = ConfMan.hasKey("save_slot") ? ConfMan.getInt("save_slot") : -1;
diff --git a/engines/glk/quest/quest.h b/engines/glk/quest/quest.h
index 69aa2db094..87775600a8 100644
--- a/engines/glk/quest/quest.h
+++ b/engines/glk/quest/quest.h
@@ -56,9 +56,7 @@ public:
/**
* Constructor
*/
- Quest(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst, gameDesc), _saveSlot(-1) {
- g_vm = this;
- }
+ Quest(OSystem *syst, const GlkGameDescription &gameDesc);
/**
* Run the game
diff --git a/engines/glk/quest/streams.cpp b/engines/glk/quest/streams.cpp
index 37ea04298a..1b49d2a6ec 100644
--- a/engines/glk/quest/streams.cpp
+++ b/engines/glk/quest/streams.cpp
@@ -39,8 +39,11 @@ void Streams::deinitialize() {
}
uint32 ConsoleStream::write(const void *dataPtr, uint32 dataSize) {
- Common::String s((const char *)dataPtr, (const char *)dataPtr + dataSize);
- debug("%s", s.c_str());
+ if (gDebugLevel > 0) {
+ Common::String s((const char *)dataPtr, (const char *)dataPtr + dataSize);
+ debug("%s", s.c_str());
+ }
+
return dataSize;
}