diff options
Diffstat (limited to 'engines/glk/quest')
-rw-r--r-- | engines/glk/quest/geas_runner.cpp | 2 | ||||
-rw-r--r-- | engines/glk/quest/quest.cpp | 4 | ||||
-rw-r--r-- | engines/glk/quest/quest.h | 4 | ||||
-rw-r--r-- | engines/glk/quest/streams.cpp | 7 |
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; } |