Skip to content

Commit

Permalink
DIRECTOR: Process Cast scripts when dumping
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jan 11, 2017
1 parent 74f008e commit a150001
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions engines/director/score.cpp
Expand Up @@ -510,14 +510,14 @@ void Score::loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id,
debugC(4, kDebugLoading, "'");

CastInfo *ci = new CastInfo();

if (castStrings.size() == 5) {
ci->script = castStrings[0];
ci->name = castStrings[1];
ci->directory = castStrings[2];
ci->fileName = castStrings[3];
ci->type = castStrings[4];

if (!ci->script.empty()) {
//the script type here could be wrong!
_lingo->addCode(ci->script.c_str(), kCastScript, id);
Expand Down Expand Up @@ -674,6 +674,9 @@ void Score::dumpScript(const char *script, ScriptType type, uint16 id) {
case kSpriteScript:
typeName = "sprite";
break;
case kCastScript:
typeName = "cast";
break;
}

sprintf(buf, "./dumps/%s-%s-%d.txt", _macName.c_str(), typeName.c_str(), id);
Expand Down

0 comments on commit a150001

Please sign in to comment.