mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-01 15:09:47 +00:00
DIRECTOR: Lingo: Fixed c_whencode and added debug output
This commit is contained in:
parent
18af5ea5da
commit
bb2168fe9c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user