[Scummvm-git-logs] scummvm master -> 7c1c5fc23e2dd0cd33a33746d2e7146d9b20594b
sev-
noreply at scummvm.org
Sun Jul 7 21:12:24 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7c1c5fc23e DIRECTOR: Decompile scripts only when the debugger is on or dump_scripts is set
Commit: 7c1c5fc23e2dd0cd33a33746d2e7146d9b20594b
https://github.com/scummvm/scummvm/commit/7c1c5fc23e2dd0cd33a33746d2e7146d9b20594b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-07-07T23:11:46+02:00
Commit Message:
DIRECTOR: Decompile scripts only when the debugger is on or dump_scripts is set
Changed paths:
engines/director/cast.cpp
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 0dd8d51a5c6..5d45b86aeba 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -1265,16 +1265,18 @@ void Cast::loadLingoContext(Common::SeekableReadStreamEndian &stream) {
error("Cast::loadLingoContext: unsupported Director version (%d)", _version);
}
- // Rewind stream
- stream.seek(0);
- _chunkResolver = new ChunkResolver(this);
- _lingodec = new LingoDec::ScriptContext(_version, _chunkResolver);
- _lingodec->read(stream);
+ if (debugChannelSet(-1, kDebugImGui) || ConfMan.getBool("dump_scripts")) {
+ // Rewind stream
+ stream.seek(0);
+ _chunkResolver = new ChunkResolver(this);
+ _lingodec = new LingoDec::ScriptContext(_version, _chunkResolver);
+ _lingodec->read(stream);
- _lingodec->parseScripts();
+ _lingodec->parseScripts();
- for (auto it = _lingodec->scripts.begin(); it != _lingodec->scripts.end(); ++it) {
- debugC(9, kDebugCompile, "[%d/%d] %s", it->second->castID, it->first, it->second->scriptText("\n", false).c_str());
+ for (auto it = _lingodec->scripts.begin(); it != _lingodec->scripts.end(); ++it) {
+ debugC(9, kDebugCompile, "[%d/%d] %s", it->second->castID, it->first, it->second->scriptText("\n", false).c_str());
+ }
}
}
More information about the Scummvm-git-logs
mailing list