diff --git a/engines/glk/comprehend/game_opcodes.cpp b/engines/glk/comprehend/game_opcodes.cpp index ea5b9fdeacd..97fd97fd2da 100644 --- a/engines/glk/comprehend/game_opcodes.cpp +++ b/engines/glk/comprehend/game_opcodes.cpp @@ -658,14 +658,6 @@ void ComprehendGameV1::execute_opcode(const Instruction *instr, const Sentence * #endif break; - case OPCODE_DRAW_OBJECT: - g_comprehend->drawItemPicture(instr->_operand[0] - 1); - break; - - case OPCODE_WAIT_KEY: - console_get_key(); - break; - case OPCODE_MOVE_DIR: doMovementVerb(instr->_operand[0]); break; @@ -709,6 +701,7 @@ ComprehendGameV2::ComprehendGameV2() { _opcodeMap[0x8c] = OPCODE_MOVE_DEFAULT; _opcodeMap[0x8e] = OPCODE_PRINT; _opcodeMap[0x8f] = OPCODE_SET_OBJECT_LONG_DESCRIPTION; + _opcodeMap[0x90] = OPCODE_WAIT_KEY; _opcodeMap[0x92] = OPCODE_CALL_FUNC; _opcodeMap[0x95] = OPCODE_CLEAR_WORD; _opcodeMap[0x99] = OPCODE_SET_FLAG; @@ -727,6 +720,7 @@ ComprehendGameV2::ComprehendGameV2() { _opcodeMap[0xcd] = OPCODE_SET_STRING_REPLACEMENT2; _opcodeMap[0xd1] = OPCODE_MOVE_DIR; _opcodeMap[0xd5] = OPCODE_DRAW_ROOM; + _opcodeMap[0xd9] = OPCODE_DRAW_OBJECT; _opcodeMap[0xdd] = OPCODE_VAR_INC; _opcodeMap[0xe1] = OPCODE_MOVE_OBJECT_TO_CURRENT_ROOM; _opcodeMap[0xe5] = OPCODE_SET_CAN_TAKE; @@ -747,11 +741,9 @@ ComprehendGameV2::ComprehendGameV2() { _opcodeMap[0x60] = OPCODE_NOT_HAVE_CURRENT_OBJECT; _opcodeMap[0x70] = OPCODE_CURRENT_OBJECT_NOT_PRESENT; _opcodeMap[0x8b] = OPCODE_SET_OBJECT_DESCRIPTION; - _opcodeMap[0x90] = OPCODE_WAIT_KEY; _opcodeMap[0x98] = OPCODE_TURN_TICK; _opcodeMap[0x9e] = OPCODE_INVENTORY_ROOM; _opcodeMap[0xc6] = OPCODE_SET_OBJECT_GRAPHIC; - _opcodeMap[0xd9] = OPCODE_DRAW_OBJECT; _opcodeMap[0xf0] = OPCODE_DROP_CURRENT_OBJECT; _opcodeMap[0xfc] = OPCODE_REMOVE_CURRENT_OBJECT; #endif @@ -781,6 +773,10 @@ void ComprehendGameV2::execute_opcode(const Instruction *instr, const Sentence * item->_flags &= ~ITEMF_INVISIBLE; break; + case OPCODE_DRAW_OBJECT: + g_comprehend->drawItemPicture(instr->_operand[0] - 1); + break; + case OPCODE_DRAW_ROOM: g_comprehend->drawLocationPicture(instr->_operand[0] - 1); break; @@ -836,6 +832,10 @@ void ComprehendGameV2::execute_opcode(const Instruction *instr, const Sentence * break; } + case OPCODE_WAIT_KEY: + console_get_key(); + break; + default: ComprehendGameOpcodes::execute_opcode(instr, sentence, func_state); break;