GLK: ADVSYS: Do a look action after loading a savegame from launcher

This commit is contained in:
Paul Gilbert 2019-06-16 14:58:35 -07:00
parent 611bea7d73
commit a9261a6d31
3 changed files with 14 additions and 0 deletions

View File

@ -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

View File

@ -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 {

View File

@ -37,6 +37,7 @@ private:
winid_t _window;
protected:
int _saveSlot;
Common::String _pendingLine;
protected:
/**
* GLK initialization