[Scummvm-git-logs] scummvm master -> dabff21c447a7657cfd48b6dfa542f641e467613
dreammaster
paulfgilbert at gmail.com
Fri Nov 20 05:43:05 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
dabff21c44 GLK: COMPREHEND: Refresh gfx & show room desc after loading from GMM
Commit: dabff21c447a7657cfd48b6dfa542f641e467613
https://github.com/scummvm/scummvm/commit/dabff21c447a7657cfd48b6dfa542f641e467613
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-11-19T21:42:40-08:00
Commit Message:
GLK: COMPREHEND: Refresh gfx & show room desc after loading from GMM
Changed paths:
engines/glk/comprehend/comprehend.cpp
engines/glk/comprehend/comprehend.h
engines/glk/comprehend/game_oo.cpp
diff --git a/engines/glk/comprehend/comprehend.cpp b/engines/glk/comprehend/comprehend.cpp
index 0f143de6fa..8b39755301 100644
--- a/engines/glk/comprehend/comprehend.cpp
+++ b/engines/glk/comprehend/comprehend.cpp
@@ -182,6 +182,15 @@ Common::Error Comprehend::readSaveData(Common::SeekableReadStream *rs) {
_game->synchronizeSave(s);
_game->_updateFlags = UPDATE_ALL;
+
+ if (isInputLineActive()) {
+ // Restored game using GMM, so update grpahics and print room description
+ g_comprehend->print("\n");
+ _game->update();
+
+ g_comprehend->print("> ");
+ }
+
return Common::kNoError;
}
@@ -245,5 +254,9 @@ void Comprehend::showGraphics() {
}
}
+bool Comprehend::isInputLineActive() const {
+ return _bottomWindow->_lineRequest || _bottomWindow->_lineRequestUni;
+}
+
} // namespace Comprehend
} // namespace Glk
diff --git a/engines/glk/comprehend/comprehend.h b/engines/glk/comprehend/comprehend.h
index 073a26ae01..4a0e403d44 100644
--- a/engines/glk/comprehend/comprehend.h
+++ b/engines/glk/comprehend/comprehend.h
@@ -207,6 +207,11 @@ public:
void setDisableSaves(bool flag) {
_disableSaves = flag;
}
+
+ /**
+ * Returns true if an input line is currently active
+ */
+ bool isInputLineActive() const;
};
extern Comprehend *g_comprehend;
diff --git a/engines/glk/comprehend/game_oo.cpp b/engines/glk/comprehend/game_oo.cpp
index e79a143768..7df35ef6f9 100644
--- a/engines/glk/comprehend/game_oo.cpp
+++ b/engines/glk/comprehend/game_oo.cpp
@@ -239,10 +239,16 @@ bool OOToposGame::handle_restart() {
}
void OOToposGame::synchronizeSave(Common::Serializer &s) {
+ if (s.isSaving())
+ _currentRoom = _currentRoomCopy;
+
ComprehendGameV2::synchronizeSave(s);
if (s.isLoading()) {
_noFloodfill = UNSET;
+ _currentRoomCopy = _currentRoom;
+
+ beforeTurn();
}
}
More information about the Scummvm-git-logs
mailing list