diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 70b25d63cb9..b1a8601a30c 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -33,7 +33,7 @@ namespace Sci { #define END Script_None -opcode_format formats[128][4] = { +opcode_format g_opcode_formats[128][4] = { /*00*/ {Script_None}, {Script_None}, {Script_None}, {Script_None}, /*04*/ @@ -99,8 +99,8 @@ void script_adjust_opcode_formats(int res_version) { case SCI_VERSION_1_EARLY: case SCI_VERSION_1_LATE: case SCI_VERSION_1_1: - formats[op_lofsa][0] = Script_Offset; - formats[op_lofss][0] = Script_Offset; + g_opcode_formats[op_lofsa][0] = Script_Offset; + g_opcode_formats[op_lofss][0] = Script_Offset; break; default: sciprintf("script_adjust_opcode_formats(): Unknown script version %d\n", res_version); diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h index 2a882cbb198..195afcfd7d0 100644 --- a/engines/sci/engine/script.h +++ b/engines/sci/engine/script.h @@ -209,7 +209,7 @@ enum sci_opcodes { /* FIXME */ op_minusspi }; -extern opcode_format formats[128][4]; +extern opcode_format g_opcode_formats[128][4]; void script_adjust_opcode_formats(int res_version); diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 1e5b25271d7..8769945b8c1 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -1262,8 +1262,8 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod sciprintf(PREG": ", PRINT_REG(pos)); if (print_bytecode) { - while (formats[opcode][i]) { - switch (formats[opcode][i++]) { + while (g_opcode_formats[opcode][i]) { + switch (g_opcode_formats[opcode][i++]) { case Script_SByte: case Script_Byte: @@ -1311,8 +1311,8 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod sciprintf("%s", s->opcodes[opcode].name); i = 0; - while (formats[opcode][i]) { - switch (formats[opcode][i++]) { + while (g_opcode_formats[opcode][i]) { + switch (g_opcode_formats[opcode][i++]) { case Script_Invalid: sciprintf("-Invalid operation-"); break; diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index a30b6679aeb..8f596f16e77 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -737,8 +737,8 @@ void run_vm(EngineState *s, int restoring) { opnumber = opcode >> 1; - for (temp = 0; formats[opnumber][temp]; temp++) - switch (formats[opnumber][temp]) { + for (temp = 0; g_opcode_formats[opnumber][temp]; temp++) + switch (g_opcode_formats[opnumber][temp]) { case Script_Byte: opparams[temp] = GET_OP_BYTE();