diff options
| author | Filippos Karapetis | 2009-07-11 23:45:54 +0000 |
|---|---|---|
| committer | Filippos Karapetis | 2009-07-11 23:45:54 +0000 |
| commit | 31a0c8090513023596351174aa48f787ca6384b3 (patch) | |
| tree | 56a0bf0b62d543f533fe86e479a7edb080ea548d /engines/sci/engine/scriptdebug.cpp | |
| parent | 116d2254119476f58b6b135b7a06a207f38fb5d0 (diff) | |
| download | scummvm-rg350-31a0c8090513023596351174aa48f787ca6384b3.tar.gz scummvm-rg350-31a0c8090513023596351174aa48f787ca6384b3.tar.bz2 scummvm-rg350-31a0c8090513023596351174aa48f787ca6384b3.zip | |
Moved the kernel and the vocabulary outside of the engine state (they're static data, which never changes during a game)
svn-id: r42398
Diffstat (limited to 'engines/sci/engine/scriptdebug.cpp')
| -rw-r--r-- | engines/sci/engine/scriptdebug.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 7f5f201079..92cfe9daf3 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -148,7 +148,7 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod if (print_bw_tag) printf("[%c] ", opsize ? 'B' : 'W'); - printf("%s", s->_kernel->getOpcode(opcode).name.c_str()); + printf("%s", ((SciEngine*)g_engine)->getKernel()->getOpcode(opcode).name.c_str()); i = 0; while (g_opcode_formats[opcode][i]) { @@ -183,8 +183,8 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod } if (opcode == op_callk) - printf(" %s[%x]", (param_value < s->_kernel->_kernelFuncs.size()) ? - ((param_value < s->_kernel->getKernelNamesSize()) ? s->_kernel->getKernelName(param_value).c_str() : "[Unknown(postulated)]") + printf(" %s[%x]", (param_value < ((SciEngine*)g_engine)->getKernel()->_kernelFuncs.size()) ? + ((param_value < ((SciEngine*)g_engine)->getKernel()->getKernelNamesSize()) ? ((SciEngine*)g_engine)->getKernel()->getKernelName(param_value).c_str() : "[Unknown(postulated)]") : "<invalid>", param_value); else printf(opsize ? " %02x" : " %04x", param_value); @@ -238,7 +238,7 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod int stackframe = (scr[pos.offset + 2] >> 1) + (scriptState.restAdjust); int argc = ((scriptState.xs->sp)[- stackframe - 1]).offset; - if (!s->_kernel->hasOldScriptHeader()) + if (!((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader()) argc += (scriptState.restAdjust); printf(" Kernel params: ("); @@ -273,7 +273,7 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod if (!name) name = "<invalid>"; - printf(" %s::%s[", name, (selector > s->_kernel->getSelectorNamesSize()) ? "<invalid>" : selector_name(s, selector)); + printf(" %s::%s[", name, (selector > ((SciEngine*)g_engine)->getKernel()->getSelectorNamesSize()) ? "<invalid>" : selector_name(s, selector)); switch (lookup_selector(s, called_obj_addr, selector, 0, &fun_ref)) { case kSelectorMethod: |
