diff options
| author | Johannes Schickel | 2008-03-16 15:30:57 +0000 | 
|---|---|---|
| committer | Johannes Schickel | 2008-03-16 15:30:57 +0000 | 
| commit | 042666ca0444f351cfe36eaa272b0dc0758c82f6 (patch) | |
| tree | 5f4a5752f9e926b5d50d01e8461e6756b9412a34 | |
| parent | 2bbaadbf95f7ec46c11457099418b742d7108064 (diff) | |
| download | scummvm-rg350-042666ca0444f351cfe36eaa272b0dc0758c82f6.tar.gz scummvm-rg350-042666ca0444f351cfe36eaa272b0dc0758c82f6.tar.bz2 scummvm-rg350-042666ca0444f351cfe36eaa272b0dc0758c82f6.zip | |
Implemented opcode 34: o2_removeItemSlotFromInventory
svn-id: r31145
| -rw-r--r-- | engines/kyra/kyra_v2.h | 1 | ||||
| -rw-r--r-- | engines/kyra/script_v2.cpp | 8 | 
2 files changed, 8 insertions, 1 deletions
| diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index 382ef91388..e839d7869e 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -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); diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp index 5f9a62d678..5ac9531db1 100644 --- a/engines/kyra/script_v2.cpp +++ b/engines/kyra/script_v2.cpp @@ -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), | 
