From 6a650e10b1fed68e52134f6959bda5f560eebe06 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 24 Nov 2019 18:40:06 +0100 Subject: DIRECTOR: Attach texts to buttons. Now HandV works again --- engines/director/score.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'engines/director/score.cpp') 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::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::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); } } } -- cgit v1.2.3