DIRECTOR: Added debug channel for executing precompiled bytecode

This commit is contained in:
Eugene Sandulenko 2019-12-17 16:58:00 +01:00
parent b62e0886b8
commit 05c046252e
3 changed files with 5 additions and 2 deletions

View File

@ -49,6 +49,7 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam
DebugMan.addDebugChannel(kDebugText, "text", "Text rendering");
DebugMan.addDebugChannel(kDebugEvents, "events", "Event processing");
DebugMan.addDebugChannel(kDebugSlow, "slow", "Slow playback");
DebugMan.addDebugChannel(kDebugBytecode, "bytecode", "Execute Lscr bytecode");
g_director = this;

View File

@ -65,7 +65,8 @@ enum {
kDebugEvents = 1 << 5,
kDebugLingoParse = 1 << 6,
kDebugLingoCompileOnly = 1 << 7,
kDebugSlow = 1 << 8
kDebugSlow = 1 << 8,
kDebugBytecode = 1 << 9
};
struct MovieReference {

View File

@ -198,7 +198,8 @@ void Score::loadArchive() {
}
// Try to load compiled Lingo scripts
if (_vm->getVersion() >= 4 && 0) {
// FIXME. Disabled by default, requires --debugflags=bytecode for now
if (_vm->getVersion() >= 4 && debugChannelSet(-1, kDebugBytecode)) {
Common::Array<uint16> lscr = _movieArchive->getResourceIDList(MKTAG('L','s','c','r'));
if (lscr.size() > 0) {
debugC(2, kDebugLoading, "****** Loading %d Lscr resources", lscr.size());