Reworked kyra debug output system. Now he have special kyra intern debug levels + the global debug levels, for now I enable all kyra debug levels if the global debug level is not -1. see 'toggle_debug' in the kyra debugger and kyra.h for the different levels. (This is just the beginning of it anyway, for example the sound debug level isn't used for now)

svn-id: r20678
This commit is contained in:
Johannes Schickel 2006-02-14 01:19:30 +00:00
parent d91b49c15c
commit 93e9639989
21 changed files with 594 additions and 485 deletions

View file

@ -217,7 +217,7 @@ bool ScriptHelper::runScript(ScriptState *script) {
if (opcode > 18) {
error("Script unknown command: %d", opcode);
} else {
debug(5, "%s(%d)", _commands[opcode].desc, _parameter);
debug(5, kDebugLevelScript, "%s([%d/%u])", _commands[opcode].desc, _parameter, (uint)_parameter);
(this->*(_commands[opcode].proc))(script);
}
@ -387,7 +387,7 @@ void ScriptHelper::c1_subSP(ScriptState* script) {
void ScriptHelper::c1_execOpcode(ScriptState* script) {
assert((uint8)_parameter < script->dataPtr->opcodeSize);
if (script->dataPtr->opcodes[(uint8)_parameter] == &KyraEngine::cmd_dummy)
debug("calling unimplemented opcode(0x%.02X)", (uint8)_parameter);
warning("calling unimplemented opcode(0x%.02X)", (uint8)_parameter);
int val = (_vm->*script->dataPtr->opcodes[(uint8)_parameter])(script);
assert(script);
script->retValue = val;