diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/director/lingo/lingo-code.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index 91ab21fd6f..405489ba44 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -758,12 +758,20 @@ void Lingo::c_whencode() { int end = READ_UINT32(&(*g_lingo->_currentScript)[start]); Common::String eventname((char *)&(*g_lingo->_currentScript)[start + 1]); - start += g_lingo->calcStringAlignment(eventname.c_str()); + start += g_lingo->calcStringAlignment(eventname.c_str()) + 1; debugC(3, kDebugLingoExec, "c_whencode([%5d][%5d], %s)", start, end, eventname.c_str()); g_lingo->define(eventname, start, 0, NULL, end); + if (debugChannelSet(3, kDebugLingoExec)) { + int pc = start; + while (pc <= end) { + Common::String instr = g_lingo->decodeInstruction(pc, &pc); + debugC(3, kDebugLingoExec, "[%5d] %s", pc, instr.c_str()); + } + } + g_lingo->_pc = end; } |