Implemented opcode 34: o2_removeItemSlotFromInventory

svn-id: r31145
This commit is contained in:
Johannes Schickel 2008-03-16 15:30:57 +00:00
parent 2bbaadbf95
commit 042666ca04
2 changed files with 8 additions and 1 deletions

View File

@ -970,6 +970,7 @@ protected:
int o2_displayWsaSequence(ScriptState *script);
int o2_addItemToCurScene(ScriptState *script);
int o2_checkForItem(ScriptState *script);
int o2_removeItemSlotFromInventory(ScriptState *script);
int o2_defineItem(ScriptState *script);
int o2_removeItemFromInventory(ScriptState *script);
int o2_countItemInInventory(ScriptState *script);

View File

@ -351,6 +351,12 @@ int KyraEngine_v2::o2_checkForItem(ScriptState *script) {
return findItem(stackPos(0), stackPos(1)) == -1 ? 0 : 1;
}
int KyraEngine_v2::o2_removeItemSlotFromInventory(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "o2_removeItemSlotFromInventory(%p) (%d)", (const void *)script, stackPos(0));
removeItemFromInventory(stackPos(0));
return 0;
}
int KyraEngine_v2::o2_defineItem(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "o2_defineItem(%p) (%d, %d, %d, %d)", (const void *)script,
stackPos(0), stackPos(1), stackPos(2), stackPos(3));
@ -1393,7 +1399,7 @@ void KyraEngine_v2::setupOpcodeTable() {
// 0x20
Opcode(o2_checkForItem),
OpcodeUnImpl(),
OpcodeUnImpl(),
Opcode(o2_removeItemSlotFromInventory),
Opcode(o2_defineItem),
// 0x24
Opcode(o2_removeItemFromInventory),