DIRECTOR: Lingo: Improved stack content trace

This commit is contained in:
Eugene Sandulenko 2016-08-19 09:20:32 +02:00
parent cd8415cfd6
commit 2074fad2cf

View File

@ -57,10 +57,14 @@ void Lingo::execute(int pc) {
debugC(1, kDebugLingoExec, "[%3d]: %s", _pc, instr.c_str());
Common::String stack("Stack: ");
for (uint i = 0; i < _stack.size(); i++) {
debugCN(5, kDebugLingoExec, "%d ", _stack[i].u.i);
Datum d = _stack[i];
d.toString();
stack += Common::String::format("<%s> ", d.u.s->c_str());
}
debugCN(5, kDebugLingoExec, "%s", "");
debugC(5, kDebugLingoExec, "%s", stack.c_str());
_pc++;
(*((*_currentScript)[_pc - 1]))();
@ -78,7 +82,6 @@ Common::String Lingo::decodeInstruction(int pc) {
inst i;
while (*pars) {
warning("--- %d of %d -- %s", pc, _currentScript->size(), res.c_str());
switch (*pars++) {
case 'i':
{