diff options
author | Paul Gilbert | 2014-04-22 19:47:58 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-04-22 19:47:58 -0400 |
commit | 3f1a49b567aac10fe8a195f7a2b8e07603470a72 (patch) | |
tree | 92d10c4c98026163a338b9383cd167872554e327 /engines/mads/user_interface.cpp | |
parent | aedf8593034303066bf83d041f63731aa65a3ef6 (diff) | |
download | scummvm-rg350-3f1a49b567aac10fe8a195f7a2b8e07603470a72.tar.gz scummvm-rg350-3f1a49b567aac10fe8a195f7a2b8e07603470a72.tar.bz2 scummvm-rg350-3f1a49b567aac10fe8a195f7a2b8e07603470a72.zip |
MADS: Implemented Conversation::read method
Diffstat (limited to 'engines/mads/user_interface.cpp')
-rw-r--r-- | engines/mads/user_interface.cpp | 12 |
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) { |