aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/user_interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads/user_interface.cpp')
-rw-r--r--engines/mads/user_interface.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp
index 346ad2d688..493804c923 100644
--- a/engines/mads/user_interface.cpp
+++ b/engines/mads/user_interface.cpp
@@ -258,6 +258,18 @@ void Conversation::set(int quoteId, ...) {
va_end(va);
}
+bool Conversation::read(int quoteId) {
+ uint16 flags = _vm->_game->globals()[_globalId];
+
+ for (uint idx = 0; idx < _quotes.size(); ++idx) {
+ if (_quotes[idx] == quoteId) {
+ return flags & (1 << idx);
+ }
+ }
+
+ return false;
+}
+
void Conversation::write(int quoteId, bool flag) {
for (uint idx = 0; idx < _quotes.size(); ++idx) {
if (_quotes[idx] == quoteId) {