SCI32: Use selector lookup in Torin script patch instead of magic numbers

This commit is contained in:
Colin Snover 2016-10-01 14:06:40 -05:00
parent d527e75f32
commit 084dfe9e03

View file

@ -4600,16 +4600,16 @@ static const SciScriptPatcherEntry sq6Signatures[] = {
// references are reg_ts, so this array needs to be created as an IDArray
// instead
static const uint16 torinInventItemSlotsSignature[] = {
0x38, SIG_UINT16(0x8d), // pushi $8d (new)
0x78, // push1
0x38, SIG_SELECTOR16(new), // pushi new
0x78, // push1
SIG_MAGICDWORD,
0x67, 0x2e, // pTos $2e (invSlotsTot)
0x51, 0x0b, // class IntArray
0x67, 0x2e, // pTos $2e (invSlotsTot)
0x51, 0x0b, // class IntArray
SIG_END
};
static const uint16 torinInventItemSlotsPatch[] = {
PATCH_ADDTOOFFSET(+3), // pushi $8d (new)
PATCH_ADDTOOFFSET(+3), // pushi new
PATCH_ADDTOOFFSET(+1), // push1
PATCH_ADDTOOFFSET(+2), // pTos $2e (invSlotsTot)
0x51, 0x0c, // class IDArray