Fixed compilation.

svn-id: r23842
This commit is contained in:
Torbjörn Andersson 2006-09-09 10:47:32 +00:00
parent 8116f167ad
commit c51d6bb903
2 changed files with 4 additions and 2 deletions

View File

@ -193,7 +193,8 @@ void Logic::setupOpcodes() {
OPCODE(fnRefreshInventory),
OPCODE(fnChangeShadows)
};
_numOpcodes = ARRAYSIZE(opcodes);
_opcodes = opcodes;
}
@ -609,7 +610,7 @@ int Logic::runScript2(byte *scriptData, byte *objectData, byte *offsetPtr) {
case CP_CALL_MCODE:
// Call an mcode routine
Read16ip(parameter);
assert(parameter < ARRAYSIZE(opcodes));
assert(parameter < _numOpcodes);
// amount to adjust stack by (no of parameters)
Read8ip(value);
debug(9, "CP_CALL_MCODE: '%s', %d", _opcodes[parameter].desc, value);

View File

@ -184,6 +184,7 @@ public:
const char *desc;
};
const OpcodeEntry *_opcodes;
int _numOpcodes;
void setupOpcodes();
int32 fnTestFunction(int32 *params);