mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-07 01:01:45 +00:00
DIRECTOR: LINGO: Print variable lists as an extra debug step
This commit is contained in:
parent
6ab1d6ac7b
commit
ecaebf7ced
@ -58,6 +58,11 @@ void Lingo::execute(uint pc) {
|
|||||||
if (debugChannelSet(5, kDebugLingoExec))
|
if (debugChannelSet(5, kDebugLingoExec))
|
||||||
printStack("Stack before: ", current);
|
printStack("Stack before: ", current);
|
||||||
|
|
||||||
|
if (debugChannelSet(9, kDebugLingoExec)) {
|
||||||
|
debug("Vars after");
|
||||||
|
printAllVars();
|
||||||
|
}
|
||||||
|
|
||||||
debugC(1, kDebugLingoExec, "[%3d]: %s", current, instr.c_str());
|
debugC(1, kDebugLingoExec, "[%3d]: %s", current, instr.c_str());
|
||||||
|
|
||||||
_pc++;
|
_pc++;
|
||||||
@ -66,6 +71,11 @@ void Lingo::execute(uint pc) {
|
|||||||
if (debugChannelSet(5, kDebugLingoExec))
|
if (debugChannelSet(5, kDebugLingoExec))
|
||||||
printStack("Stack after: ", current);
|
printStack("Stack after: ", current);
|
||||||
|
|
||||||
|
if (debugChannelSet(9, kDebugLingoExec)) {
|
||||||
|
debug("Vars after");
|
||||||
|
printAllVars();
|
||||||
|
}
|
||||||
|
|
||||||
if (_pc >= (*_currentScript).size()) {
|
if (_pc >= (*_currentScript).size()) {
|
||||||
warning("Lingo::execute(): Bad PC (%d)", _pc);
|
warning("Lingo::execute(): Bad PC (%d)", _pc);
|
||||||
break;
|
break;
|
||||||
|
@ -487,4 +487,18 @@ void Lingo::executeImmediateScripts(Frame *frame) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Lingo::printAllVars() {
|
||||||
|
debugN(" Local vars: ");
|
||||||
|
for (SymbolHash::iterator i = _localvars->begin(); i != _localvars->end(); ++i) {
|
||||||
|
debugN("%s, ", (*i)._key.c_str());
|
||||||
|
}
|
||||||
|
debug("");
|
||||||
|
|
||||||
|
debugN(" Global vars: ");
|
||||||
|
for (SymbolHash::iterator i = _globalvars.begin(); i != _globalvars.end(); ++i) {
|
||||||
|
debugN("%s, ", (*i)._key.c_str());
|
||||||
|
}
|
||||||
|
debug("");
|
||||||
|
}
|
||||||
|
|
||||||
} // End of namespace Director
|
} // End of namespace Director
|
||||||
|
@ -231,6 +231,8 @@ public:
|
|||||||
|
|
||||||
int alignTypes(Datum &d1, Datum &d2);
|
int alignTypes(Datum &d1, Datum &d2);
|
||||||
|
|
||||||
|
void printAllVars();
|
||||||
|
|
||||||
int code1(inst code) { _currentScript->push_back(code); return _currentScript->size() - 1; }
|
int code1(inst code) { _currentScript->push_back(code); return _currentScript->size() - 1; }
|
||||||
int code2(inst code_1, inst code_2) { int o = code1(code_1); code1(code_2); return o; }
|
int code2(inst code_1, inst code_2) { int o = code1(code_1); code1(code_2); return o; }
|
||||||
int code3(inst code_1, inst code_2, inst code_3) { int o = code1(code_1); code1(code_2); code1(code_3); return o; }
|
int code3(inst code_1, inst code_2, inst code_3) { int o = code1(code_1); code1(code_2); code1(code_3); return o; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user