aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/advsys
diff options
context:
space:
mode:
authorPaul Gilbert2019-06-16 14:58:35 -0700
committerPaul Gilbert2019-06-16 14:59:26 -0700
commita9261a6d315a452dfb63ead326aa72fcc3075ae9 (patch)
treea6fcd8fbe906f6e7d24046c1c1767a43aadbac31 /engines/glk/advsys
parent611bea7d735df4e318001a6fb3cc5c398fc7dcf6 (diff)
downloadscummvm-rg350-a9261a6d315a452dfb63ead326aa72fcc3075ae9.tar.gz
scummvm-rg350-a9261a6d315a452dfb63ead326aa72fcc3075ae9.tar.bz2
scummvm-rg350-a9261a6d315a452dfb63ead326aa72fcc3075ae9.zip
GLK: ADVSYS: Do a look action after loading a savegame from launcher
Diffstat (limited to 'engines/glk/advsys')
-rw-r--r--engines/glk/advsys/advsys.cpp2
-rw-r--r--engines/glk/advsys/glk_interface.cpp11
-rw-r--r--engines/glk/advsys/glk_interface.h1
3 files changed, 14 insertions, 0 deletions
diff --git a/engines/glk/advsys/advsys.cpp b/engines/glk/advsys/advsys.cpp
index 4e2451e79b..a61033a506 100644
--- a/engines/glk/advsys/advsys.cpp
+++ b/engines/glk/advsys/advsys.cpp
@@ -46,6 +46,8 @@ void AdvSys::runGame() {
_saveSlot = -1;
if (err != Common::kNoError)
print(_("Sorry, the savegame couldn't be restored"));
+ else
+ _pendingLine = "look"; // Do a look action after loading the savegame
}
// Gameplay loop
diff --git a/engines/glk/advsys/glk_interface.cpp b/engines/glk/advsys/glk_interface.cpp
index 20f9f4d3a1..c49dc983e4 100644
--- a/engines/glk/advsys/glk_interface.cpp
+++ b/engines/glk/advsys/glk_interface.cpp
@@ -47,6 +47,17 @@ Common::String GlkInterface::readLine() {
char line[200];
print(": ");
+
+ if (!_pendingLine.empty()) {
+ // The next input line has been manually provided, so return it
+ print(_pendingLine);
+ print("\n");
+
+ Common::String l = _pendingLine;
+ _pendingLine = "";
+ return l;
+ }
+
glk_request_line_event(_window, line, 199, 0);
do {
diff --git a/engines/glk/advsys/glk_interface.h b/engines/glk/advsys/glk_interface.h
index 9048818020..9e37207684 100644
--- a/engines/glk/advsys/glk_interface.h
+++ b/engines/glk/advsys/glk_interface.h
@@ -37,6 +37,7 @@ private:
winid_t _window;
protected:
int _saveSlot;
+ Common::String _pendingLine;
protected:
/**
* GLK initialization