diff options
author | Eugene Sandulenko | 2017-02-26 00:21:16 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-02-26 00:21:16 +0100 |
commit | 29b32d52fa73de3a93d7bafabe1c58c7720de61c (patch) | |
tree | 1014befc47df4f347fbf0f3da8c36ddab1e9e935 /engines/director | |
parent | 45b41357c14727a635b730a1dace047ba8edf11f (diff) | |
download | scummvm-rg350-29b32d52fa73de3a93d7bafabe1c58c7720de61c.tar.gz scummvm-rg350-29b32d52fa73de3a93d7bafabe1c58c7720de61c.tar.bz2 scummvm-rg350-29b32d52fa73de3a93d7bafabe1c58c7720de61c.zip |
DIRECTOR: Clarified and corrected movie scripts in D2/D3
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/score.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp index b876b777bf..58d9b4bb69 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -164,7 +164,9 @@ void Score::loadArchive() { if (_vm->getVersion() <= 3) { Common::Array<uint16> stxt = _movieArchive->getResourceIDList(MKTAG('S','T','X','T')); if (stxt.size() > 0) { - loadScriptText(*_movieArchive->getResource(MKTAG('S','T','X','T'), *stxt.begin())); + for (Common::Array<uint16>::iterator iterator = stxt.begin(); iterator != stxt.end(); ++iterator) { + loadScriptText(*_movieArchive->getResource(MKTAG('S','T','X','T'), *iterator)); + } } } } @@ -571,11 +573,15 @@ void Score::loadScriptText(Common::SeekableSubReadStreamEndian &stream) { script += ch; } - if (!script.empty() && ConfMan.getBool("dump_scripts")) + // Check if the script has macro. They must start with a comment. + // See D2 Interactivity Manual pp.46-47 (Ch.2.11. Using a macro) + if (script.empty() || !script.hasPrefix("--")) + return; + + if (ConfMan.getBool("dump_scripts")) dumpScript(script.c_str(), kMovieScript, _movieScriptCount); - if (!script.empty()) - _lingo->addCode(script.c_str(), kMovieScript, _movieScriptCount); + _lingo->addCode(script.c_str(), kMovieScript, _movieScriptCount); _movieScriptCount++; } |