[Scummvm-git-logs] scummvm master -> 4f168f41f2aecb0f2a306d42a3f8214d40a94253

dreammaster paulfgilbert at gmail.com
Mon Oct 26 04:59:15 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
4f168f41f2 GLK: COMPREHEND: Move some v2-only opcodes to v2 class


Commit: 4f168f41f2aecb0f2a306d42a3f8214d40a94253
    https://github.com/scummvm/scummvm/commit/4f168f41f2aecb0f2a306d42a3f8214d40a94253
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-10-25T21:59:04-07:00

Commit Message:
GLK: COMPREHEND: Move some v2-only opcodes to v2 class

Changed paths:
    engines/glk/comprehend/game_opcodes.cpp


diff --git a/engines/glk/comprehend/game_opcodes.cpp b/engines/glk/comprehend/game_opcodes.cpp
index ea5b9fdeac..97fd97fd2d 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;




More information about the Scummvm-git-logs mailing list