aboutsummaryrefslogtreecommitdiff
path: root/engines/director/score.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2019-11-24 18:40:06 +0100
committerEugene Sandulenko2019-11-24 18:42:45 +0100
commit6a650e10b1fed68e52134f6959bda5f560eebe06 (patch)
tree32b89eb27f4fef67a1421a56bb36ac7259c804a6 /engines/director/score.cpp
parent8f7df6230ea9cb6b985ffe22c2fe354704251f01 (diff)
downloadscummvm-rg350-6a650e10b1fed68e52134f6959bda5f560eebe06.tar.gz
scummvm-rg350-6a650e10b1fed68e52134f6959bda5f560eebe06.tar.bz2
scummvm-rg350-6a650e10b1fed68e52134f6959bda5f560eebe06.zip
DIRECTOR: Attach texts to buttons. Now HandV works again
Diffstat (limited to 'engines/director/score.cpp')
-rw-r--r--engines/director/score.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 82b09e8fdb..6315a5b812 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -223,14 +223,33 @@ void Score::loadArchive() {
}
void Score::copyCastStxts() {
+ debugC(2, kDebugLoading,"######### copyCastStxts(), %d texts", _loadedText->size());
Common::HashMap<int, TextCast *>::iterator tc;
for (tc = _loadedText->begin(); tc != _loadedText->end(); ++tc) {
uint stxtid = (_vm->getVersion() < 4) ?
tc->_key + 1024 :
tc->_value->children[0].index;
- if (_loadedStxts->getVal(stxtid)){
+ if (_loadedStxts->getVal(stxtid)) {
+ debugC(3, kDebugLoading,"Yes to STXT: %d", stxtid);
const Stxt *stxt = _loadedStxts->getVal(stxtid);
tc->_value->importStxt(stxt);
+ } else {
+ debugC(3, "No to STXT: %d", stxtid);
+ }
+ }
+
+ debugC(2, kDebugLoading,"######### copyCastStxts(), %d buttons", _loadedButtons->size());
+ Common::HashMap<int, ButtonCast *>::iterator bc;
+ for (bc = _loadedButtons->begin(); bc != _loadedButtons->end(); ++bc) {
+ uint stxtid = (_vm->getVersion() < 4) ?
+ bc->_key + 1024 :
+ bc->_value->children[0].index;
+ if (_loadedStxts->getVal(stxtid)) {
+ debugC(3, "Yes to STXT: %d", stxtid);
+ const Stxt *stxt = _loadedStxts->getVal(stxtid);
+ bc->_value->importStxt(stxt);
+ } else {
+ debugC(3, "No to STXT: %d", stxtid);
}
}
}