aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-02 00:12:29 +0100
committerEugene Sandulenko2019-12-02 00:12:59 +0100
commitf122bb69f9e6f9489621982d6e451d459ba79c08 (patch)
tree13fbf3a99109090868a70601b2f90fd4f5ea3792 /engines/director
parentb6692ac7831a9475fd23f104145254d8dd507c27 (diff)
downloadscummvm-rg350-f122bb69f9e6f9489621982d6e451d459ba79c08.tar.gz
scummvm-rg350-f122bb69f9e6f9489621982d6e451d459ba79c08.tar.bz2
scummvm-rg350-f122bb69f9e6f9489621982d6e451d459ba79c08.zip
DIRECTOR: Load all STXT resources which look like scripts
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/score.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 36e32c2882..0d11c7b54a 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -207,18 +207,16 @@ void Score::loadArchive() {
// Now process STXTs
Common::Array<uint16> stxt = _movieArchive->getResourceIDList(MKTAG('S','T','X','T'));
-
- // Try to load movie script, it sits in resource A11
- if (_vm->getVersion() <= 3) {
- if (stxt.size() > 0) {
- loadScriptText(*_movieArchive->getResource(MKTAG('S','T','X','T'), *stxt.begin()));
- }
- }
-
debugC(2, kDebugLoading, "****** Loading %d STXT resources", stxt.size());
for (Common::Array<uint16>::iterator iterator = stxt.begin(); iterator != stxt.end(); ++iterator) {
_loadedStxts->setVal(*iterator,
new Stxt(*_movieArchive->getResource(MKTAG('S','T','X','T'), *iterator)));
+
+ // Try to load movie script, it starts with a comment
+ if (_vm->getVersion() <= 3) {
+ loadScriptText(*_movieArchive->getResource(MKTAG('S','T','X','T'), *iterator));
+ }
+
}
copyCastStxts();
}
@@ -231,11 +229,8 @@ void Score::copyCastStxts() {
tc->_key + 1024 :
tc->_value->_children[0].index;
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);
}
}