diff options
Diffstat (limited to 'engines/mads/user_interface.cpp')
-rw-r--r-- | engines/mads/user_interface.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp index 9a63ac32ad..d4ab0d3dc5 100644 --- a/engines/mads/user_interface.cpp +++ b/engines/mads/user_interface.cpp @@ -258,16 +258,20 @@ void Conversation::set(int quoteId, ...) { va_end(va); } -bool Conversation::read(int quoteId) { +int Conversation::read(int quoteId) { uint16 flags = _vm->_game->globals()[_globalId]; + int count = 0; for (uint idx = 0; idx < _quotes.size(); ++idx) { - if (_quotes[idx] == quoteId) { + if (flags & (1 << idx)) + ++count; + + if (_quotes[idx] == quoteId) return flags & (1 << idx); - } } - return false; + // Could not find it, simply return number of active quotes + return count; } void Conversation::write(int quoteId, bool flag) { |