mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-14 07:48:58 +00:00
GLK: COMPREHEND: Added OBJECT_CAN_TAKE opcode
This commit is contained in:
parent
1cfc2ac225
commit
a80a6b5208
@ -108,6 +108,7 @@ DebuggerDumper::DebuggerDumper() : _game(nullptr) {
|
||||
_opcodes[OPCODE_DRAW_OBJECT] = "draw_object";
|
||||
_opcodes[OPCODE_WAIT_KEY] = "wait_key";
|
||||
_opcodes[OPCODE_TEST_FALSE] = "test_false";
|
||||
_opcodes[OPCODE_OBJECT_CAN_TAKE] = "object_can_take";
|
||||
}
|
||||
|
||||
Common::String DebuggerDumper::dumpInstruction(ComprehendGame *game,
|
||||
|
@ -733,6 +733,11 @@ void ComprehendGame::eval_instruction(FunctionState *func_state,
|
||||
func_set_test_result(func_state, !item || item->_room != _currentRoom);
|
||||
break;
|
||||
|
||||
case OPCODE_OBJECT_CAN_TAKE:
|
||||
item = get_item(instr->_operand[0] - 1);
|
||||
func_set_test_result(func_state, item->_flags & ITEMF_CAN_TAKE);
|
||||
break;
|
||||
|
||||
case OPCODE_CURRENT_OBJECT_NOT_IN_ROOM:
|
||||
item = get_item_by_noun(noun);
|
||||
func_set_test_result(func_state, !item || item->_room != _currentRoom);
|
||||
|
@ -126,7 +126,8 @@ enum {
|
||||
OPCODE_TEST_FALSE,
|
||||
OPCODE_CAN_TAKE,
|
||||
OPCODE_TOO_HEAVY,
|
||||
OPCODE_NOT_MAX_WEIGHT
|
||||
OPCODE_NOT_MAX_WEIGHT,
|
||||
OPCODE_OBJECT_CAN_TAKE
|
||||
};
|
||||
|
||||
/* Game state update flags */
|
||||
|
@ -122,6 +122,7 @@ void OpcodeMap::loadVersion2() {
|
||||
_opcodeMap[0x20] = OPCODE_HAVE_CURRENT_OBJECT;
|
||||
_opcodeMap[0x21] = OPCODE_OBJECT_PRESENT;
|
||||
_opcodeMap[0x22] = OPCODE_OBJECT_IN_ROOM;
|
||||
_opcodeMap[0x2d] = OPCODE_OBJECT_CAN_TAKE;
|
||||
_opcodeMap[0x30] = OPCODE_CURRENT_OBJECT_PRESENT;
|
||||
_opcodeMap[0x31] = OPCODE_TEST_ROOM_FLAG;
|
||||
_opcodeMap[0x38] = OPCODE_INVENTORY_FULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user