[Scummvm-git-logs] scummvm master -> 0350abbcc29240e37102250d68114f96cc207e2e

dreammaster paulfgilbert at gmail.com
Wed Jul 1 03:32:50 UTC 2020


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

Summary:
9e8fdd0f4b GLK: COMPREHEND: Added debugger draw command
04c9057dee GLK: COMPREHEND: End dialog for CC disk 1
724bee2a81 GLK: COMPREHEND: Handle CC switchover to disk 2
cee3f46456 GLK: COMPREHEND: Switch position of disk number in CC savegame
81c5d8f781 GLK: COMPREHEND: Further tweak for current object opcodes
9d45f9264a GLK: COMPREHEND: Fix action matches with out of order words
0350abbcc2 GLK: COMPREHEND: Fixes for opcodes for items being present


Commit: 9e8fdd0f4befc72dfa5d4d90c460addf4ecbd304
    https://github.com/scummvm/scummvm/commit/9e8fdd0f4befc72dfa5d4d90c460addf4ecbd304
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-06-30T20:28:34-07:00

Commit Message:
GLK: COMPREHEND: Added debugger draw command

Changed paths:
    engines/glk/comprehend/debugger.cpp
    engines/glk/comprehend/debugger.h


diff --git a/engines/glk/comprehend/debugger.cpp b/engines/glk/comprehend/debugger.cpp
index 78a5b595ff..dd0b98e0ca 100644
--- a/engines/glk/comprehend/debugger.cpp
+++ b/engines/glk/comprehend/debugger.cpp
@@ -36,6 +36,7 @@ Debugger::Debugger() : Glk::Debugger() {
 	registerCmd("room", WRAP_METHOD(Debugger, cmdRoom));
 	registerCmd("itemroom", WRAP_METHOD(Debugger, cmdItemRoom));
 	registerCmd("findstring", WRAP_METHOD(Debugger, cmdFindString));
+	registerCmd("draw", WRAP_METHOD(Debugger, cmdDraw));
 }
 
 Debugger::~Debugger() {
@@ -140,5 +141,16 @@ bool Debugger::cmdFindString(int argc, const char **argv) {
 	return true;
 }
 
+bool Debugger::cmdDraw(int argc, const char **argv) {
+	if (argc == 1) {
+		debugPrintf("draw <number>\n");
+		return true;
+	} else {
+		g_comprehend->drawLocationPicture(strToInt(argv[1]), true);
+		return false;
+	}
+}
+
+
 } // namespace Comprehend
 } // namespace Glk
diff --git a/engines/glk/comprehend/debugger.h b/engines/glk/comprehend/debugger.h
index d658e94da5..25129ec760 100644
--- a/engines/glk/comprehend/debugger.h
+++ b/engines/glk/comprehend/debugger.h
@@ -56,6 +56,11 @@ private:
 	 */
 	bool cmdFindString(int argc, const char **argv);
 
+	/**
+	 * Draw an image to the screen
+	 */
+	bool cmdDraw(int argc, const char **argv);
+
 protected:
 	void print(const char *fmt, ...) override;
 


Commit: 04c9057deeb100277dccf1883fc7d3edc47c57bd
    https://github.com/scummvm/scummvm/commit/04c9057deeb100277dccf1883fc7d3edc47c57bd
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-06-30T20:28:34-07:00

Commit Message:
GLK: COMPREHEND: End dialog for CC disk 1

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


diff --git a/engines/glk/comprehend/game_cc.cpp b/engines/glk/comprehend/game_cc.cpp
index f1c97905a5..2768fcb987 100644
--- a/engines/glk/comprehend/game_cc.cpp
+++ b/engines/glk/comprehend/game_cc.cpp
@@ -81,7 +81,12 @@ void CrimsonCrownGame::handleSpecialOpcode(uint8 operand) {
 	case 5:
 		if (_diskNum == 1) {
 			// Finished disk 1
-			error("[Completed disk 1 - handle switch to disk 2]");
+			g_comprehend->readChar();
+			g_comprehend->drawLocationPicture(41);
+			console_println(_strings2[26].c_str());
+			g_comprehend->readChar();
+
+			// TODO: Switch to disk 2
 		} else {
 			// Won the game.
 			// FIXME: The merchant ship should arrives, etc.


Commit: 724bee2a818006bc09c18c7c8a4a8e32afb5c444
    https://github.com/scummvm/scummvm/commit/724bee2a818006bc09c18c7c8a4a8e32afb5c444
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-06-30T20:28:34-07:00

Commit Message:
GLK: COMPREHEND: Handle CC switchover to disk 2

Changed paths:
    engines/glk/comprehend/game_cc.cpp
    engines/glk/comprehend/game_cc.h


diff --git a/engines/glk/comprehend/game_cc.cpp b/engines/glk/comprehend/game_cc.cpp
index 2768fcb987..48b38059f9 100644
--- a/engines/glk/comprehend/game_cc.cpp
+++ b/engines/glk/comprehend/game_cc.cpp
@@ -29,7 +29,8 @@ namespace Comprehend {
 
 static const GameStrings CC1_STRINGS = {0x9};
 
-CrimsonCrownGame::CrimsonCrownGame() : ComprehendGame(), _diskNum(1) {
+CrimsonCrownGame::CrimsonCrownGame() : ComprehendGame(),
+		_diskNum(1), _newDiskNum(1) {
 	setupDisk(1);
 }
 
@@ -37,7 +38,11 @@ void CrimsonCrownGame::setupDisk(uint diskNum) {
 	assert(diskNum == 1 || diskNum == 2);
 
 	_gameDataFile = Common::String::format("cc%u.gda", diskNum);
+
+	_stringFiles.clear();
 	_stringFiles.push_back(StringFile(Common::String::format("ma.ms%u", diskNum), 0x89));
+
+	_locationGraphicFiles.clear();
 	_locationGraphicFiles.push_back(Common::String::format("ra.ms%u", diskNum));
 	_locationGraphicFiles.push_back(Common::String::format("rb.ms%u", diskNum));
 	if (diskNum == 1)
@@ -51,6 +56,7 @@ void CrimsonCrownGame::setupDisk(uint diskNum) {
 		_gameStrings = nullptr;
 
 	_titleGraphicFile = "cctitle.ms1";
+	_diskNum = diskNum;
 }
 
 void CrimsonCrownGame::beforeGame() {
@@ -86,7 +92,10 @@ void CrimsonCrownGame::handleSpecialOpcode(uint8 operand) {
 			console_println(_strings2[26].c_str());
 			g_comprehend->readChar();
 
-			// TODO: Switch to disk 2
+			_newDiskNum = 2;
+			move_to(21);
+			console_println(_strings[407].c_str());
+
 		} else {
 			// Won the game.
 			// FIXME: The merchant ship should arrives, etc.
@@ -124,5 +133,13 @@ void CrimsonCrownGame::beforePrompt() {
 	_flags[0xb] = 0;
 }
 
+void CrimsonCrownGame::beforeTurn() {
+	if (_newDiskNum != _diskNum) {
+		setupDisk(_newDiskNum);
+		loadGame();
+		move_to(_currentRoom);
+	}
+}
+
 } // namespace Comprehend
 } // namespace Glk
diff --git a/engines/glk/comprehend/game_cc.h b/engines/glk/comprehend/game_cc.h
index 949fa211ad..553b6d238f 100644
--- a/engines/glk/comprehend/game_cc.h
+++ b/engines/glk/comprehend/game_cc.h
@@ -31,6 +31,7 @@ namespace Comprehend {
 class CrimsonCrownGame : public ComprehendGame {
 private:
 	uint _diskNum;
+	uint _newDiskNum;
 
 private:
 	/**
@@ -44,6 +45,7 @@ public:
 
 	void beforeGame() override;
 	void beforePrompt() override;
+	void beforeTurn() override;
 	void handleSpecialOpcode(uint8 operand) override;
 	void synchronizeSave(Common::Serializer &s) override;
 


Commit: cee3f46456676d70c065f18f37836543f7113e71
    https://github.com/scummvm/scummvm/commit/cee3f46456676d70c065f18f37836543f7113e71
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-06-30T20:28:34-07:00

Commit Message:
GLK: COMPREHEND: Switch position of disk number in CC savegame

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


diff --git a/engines/glk/comprehend/game_cc.cpp b/engines/glk/comprehend/game_cc.cpp
index 48b38059f9..46a4d8e422 100644
--- a/engines/glk/comprehend/game_cc.cpp
+++ b/engines/glk/comprehend/game_cc.cpp
@@ -66,8 +66,16 @@ void CrimsonCrownGame::beforeGame() {
 }
 
 void CrimsonCrownGame::synchronizeSave(Common::Serializer &s) {
+	if (s.isSaving()) {
+		s.syncAsByte(_diskNum);
+	} else {
+		// Get the disk the save is for. The beforeTurn call allows
+		// for the currently loaded disk to be switched if necessary
+		s.syncAsByte(_newDiskNum);
+		beforeTurn();
+	}
+
 	ComprehendGame::synchronizeSave(s);
-	s.syncAsByte(_diskNum);
 }
 
 void CrimsonCrownGame::handleSpecialOpcode(uint8 operand) {


Commit: 81c5d8f781f0698b4175465e6c78422023dc61c6
    https://github.com/scummvm/scummvm/commit/81c5d8f781f0698b4175465e6c78422023dc61c6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-06-30T20:28:34-07:00

Commit Message:
GLK: COMPREHEND: Further tweak for current object opcodes

Changed paths:
    engines/glk/comprehend/debugger_dumper.cpp
    engines/glk/comprehend/game.cpp
    engines/glk/comprehend/game_data.h
    engines/glk/comprehend/opcode_map.cpp


diff --git a/engines/glk/comprehend/debugger_dumper.cpp b/engines/glk/comprehend/debugger_dumper.cpp
index 08846d5bdc..678e92bc24 100644
--- a/engines/glk/comprehend/debugger_dumper.cpp
+++ b/engines/glk/comprehend/debugger_dumper.cpp
@@ -40,7 +40,7 @@ DebuggerDumper::DebuggerDumper() : _game(nullptr) {
 	_opcodes[OPCODE_CURRENT_OBJECT_TAKEABLE] = "current_object_takeable";
 	_opcodes[OPCODE_CURRENT_OBJECT_NOT_TAKEABLE] = "current_object_not_takeable";
 
-	_opcodes[OPCODE_CURRENT_OBJECT_IS_IN_INVENTORY] = "current_object_is_in_inventory";
+	_opcodes[OPCODE_CURRENT_OBJECT_IN_INVENTORY] = "current_object_in_inventory";
 	_opcodes[OPCODE_CURRENT_OBJECT_IS_NOWHERE] = "current_object_is_nowhere";
 
 	_opcodes[OPCODE_CURRENT_OBJECT_NOT_PRESENT] = "current_object_not_present";
diff --git a/engines/glk/comprehend/game.cpp b/engines/glk/comprehend/game.cpp
index 6cf71e91fc..6425552051 100644
--- a/engines/glk/comprehend/game.cpp
+++ b/engines/glk/comprehend/game.cpp
@@ -803,10 +803,9 @@ void ComprehendGame::eval_instruction(FunctionState *func_state,
 			                     !(item->_flags & ITEMF_CAN_TAKE));
 		break;
 
-	case OPCODE_CURRENT_OBJECT_IS_IN_INVENTORY:
+	case OPCODE_CURRENT_OBJECT_IN_INVENTORY:
 		item = get_item_by_noun(noun);
-		assert(item);
-		func_set_test_result(func_state, item->_room == ROOM_INVENTORY);
+		func_set_test_result(func_state, item && item->_room == ROOM_INVENTORY);
 		break;
 
 	case OPCODE_OBJECT_IS_NOWHERE:
@@ -816,8 +815,7 @@ void ComprehendGame::eval_instruction(FunctionState *func_state,
 
 	case OPCODE_CURRENT_OBJECT_IS_NOWHERE:
 		item = get_item_by_noun(noun);
-		assert(item);
-		func_set_test_result(func_state, item->_room == ROOM_NOWHERE);
+		func_set_test_result(func_state, item && item->_room == ROOM_NOWHERE);
 		break;
 
 	case OPCODE_OBJECT_IS_NOT_NOWHERE:
diff --git a/engines/glk/comprehend/game_data.h b/engines/glk/comprehend/game_data.h
index 0c58e24fb3..03dcb0ee97 100644
--- a/engines/glk/comprehend/game_data.h
+++ b/engines/glk/comprehend/game_data.h
@@ -69,7 +69,7 @@ enum {
 	OPCODE_TEST_ROOM_FLAG,
 	OPCODE_NOT_HAVE_OBJECT,
 	OPCODE_NOT_IN_ROOM,
-	OPCODE_CURRENT_OBJECT_IS_IN_INVENTORY,
+	OPCODE_CURRENT_OBJECT_IN_INVENTORY,
 	OPCODE_OBJECT_NOT_PRESENT,
 	OPCODE_OBJECT_NOT_IN_ROOM,
 	OPCODE_TEST_NOT_FLAG,
diff --git a/engines/glk/comprehend/opcode_map.cpp b/engines/glk/comprehend/opcode_map.cpp
index 772396583d..c3314661db 100644
--- a/engines/glk/comprehend/opcode_map.cpp
+++ b/engines/glk/comprehend/opcode_map.cpp
@@ -59,7 +59,7 @@ void OpcodeMap::loadVersion1() {
 	_opcodeMap[0x41] = OPCODE_NOT_HAVE_OBJECT;
 	_opcodeMap[0x43] = OPCODE_OBJECT_NOT_IN_ROOM;
 	_opcodeMap[0x45] = OPCODE_NOT_IN_ROOM;
-	_opcodeMap[0x48] = OPCODE_CURRENT_OBJECT_IS_IN_INVENTORY;
+	_opcodeMap[0x48] = OPCODE_CURRENT_OBJECT_IN_INVENTORY;
 	_opcodeMap[0x49] = OPCODE_OBJECT_NOT_PRESENT;
 	_opcodeMap[0x4E] = OPCODE_TEST_FALSE;
 	_opcodeMap[0x50] = OPCODE_CURRENT_OBJECT_IS_NOWHERE;
@@ -120,7 +120,7 @@ void OpcodeMap::loadVersion2() {
 	_opcodeMap[0x38] = OPCODE_INVENTORY_FULL;
 	_opcodeMap[0x41] = OPCODE_NOT_HAVE_OBJECT;
 	_opcodeMap[0x45] = OPCODE_NOT_IN_ROOM;
-	_opcodeMap[0x48] = OPCODE_CURRENT_OBJECT_IS_IN_INVENTORY;
+	_opcodeMap[0x48] = OPCODE_CURRENT_OBJECT_IN_INVENTORY;
 	_opcodeMap[0x43] = OPCODE_OBJECT_NOT_IN_ROOM;
 	_opcodeMap[0x59] = OPCODE_TEST_NOT_FLAG;
 	_opcodeMap[0x5d] = OPCODE_TEST_NOT_ROOM_FLAG;


Commit: 9d45f9264a08c3d45cea46c95f9166e77d5b1ff6
    https://github.com/scummvm/scummvm/commit/9d45f9264a08c3d45cea46c95f9166e77d5b1ff6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-06-30T20:28:34-07:00

Commit Message:
GLK: COMPREHEND: Fix action matches with out of order words

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


diff --git a/engines/glk/comprehend/game.cpp b/engines/glk/comprehend/game.cpp
index 6425552051..26bccfe226 100644
--- a/engines/glk/comprehend/game.cpp
+++ b/engines/glk/comprehend/game.cpp
@@ -1201,23 +1201,31 @@ bool ComprehendGame::handle_sentence(Sentence *sentence) {
 }
 
 bool ComprehendGame::handle_sentence(Sentence *sentence, Common::Array<byte> &words) {
-	Action *action;
-
-	// Find a matching action
 	for (uint i = 0; i < _actions.size(); i++) {
-		action = &_actions[i];
-
-		if (action->_nr_words <= words.size()) {
-			bool isMatch = true;
-			for (uint idx = 0; idx < action->_nr_words && isMatch; ++idx)
-				isMatch = action->_word[idx] == words[idx];
-
-			if (isMatch) {
-				// Match
-				const Function &func = _functions[action->_function];
-				eval_function(func, &sentence->_words[0], &sentence->_words[1]);
-				return true;
-			}
+		const Action &action = _actions[i];
+
+		// Check the verb first. It must match the first passed word
+		if (action._word[0] != words[0])
+			continue;
+
+		// Check for the remaining words of the action. They can be in
+		// any order in the passed words
+		uint actionWord;
+		for (actionWord = 1; actionWord < action._nr_words; ++actionWord) {
+			// Scan for next action word
+			bool isMatch = false;
+			for (uint idx = 0; idx < words.size() && !isMatch; ++idx)
+				isMatch = action._word[actionWord] == words[idx];
+
+			if (!isMatch)
+				break;
+		}
+
+		if (actionWord == action._nr_words) {
+			// Match
+			const Function &func = _functions[action._function];
+			eval_function(func, &sentence->_words[0], &sentence->_words[1]);
+			return true;
 		}
 	}
 


Commit: 0350abbcc29240e37102250d68114f96cc207e2e
    https://github.com/scummvm/scummvm/commit/0350abbcc29240e37102250d68114f96cc207e2e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-06-30T20:28:34-07:00

Commit Message:
GLK: COMPREHEND: Fixes for opcodes for items being present

Changed paths:
    engines/glk/comprehend/debugger_dumper.cpp
    engines/glk/comprehend/game.cpp
    engines/glk/comprehend/game.h
    engines/glk/comprehend/game_data.h
    engines/glk/comprehend/opcode_map.cpp


diff --git a/engines/glk/comprehend/debugger_dumper.cpp b/engines/glk/comprehend/debugger_dumper.cpp
index 678e92bc24..1cd05e62ed 100644
--- a/engines/glk/comprehend/debugger_dumper.cpp
+++ b/engines/glk/comprehend/debugger_dumper.cpp
@@ -40,7 +40,7 @@ DebuggerDumper::DebuggerDumper() : _game(nullptr) {
 	_opcodes[OPCODE_CURRENT_OBJECT_TAKEABLE] = "current_object_takeable";
 	_opcodes[OPCODE_CURRENT_OBJECT_NOT_TAKEABLE] = "current_object_not_takeable";
 
-	_opcodes[OPCODE_CURRENT_OBJECT_IN_INVENTORY] = "current_object_in_inventory";
+	_opcodes[OPCODE_CURRENT_OBJECT_NOT_IN_ROOM] = "current_object_not_in_room";
 	_opcodes[OPCODE_CURRENT_OBJECT_IS_NOWHERE] = "current_object_is_nowhere";
 
 	_opcodes[OPCODE_CURRENT_OBJECT_NOT_PRESENT] = "current_object_not_present";
diff --git a/engines/glk/comprehend/game.cpp b/engines/glk/comprehend/game.cpp
index 26bccfe226..dd7c8754df 100644
--- a/engines/glk/comprehend/game.cpp
+++ b/engines/glk/comprehend/game.cpp
@@ -697,8 +697,12 @@ void ComprehendGame::eval_instruction(FunctionState *func_state,
 
 	case OPCODE_OBJECT_NOT_IN_ROOM:
 		item = get_item(instr->_operand[0] - 1);
-		func_set_test_result(func_state,
-		                     item->_room != instr->_operand[1]);
+		func_set_test_result(func_state, !item || item->_room != instr->_operand[1]);
+		break;
+
+	case OPCODE_CURRENT_OBJECT_NOT_IN_ROOM:
+		item = get_item_by_noun(noun);
+		func_set_test_result(func_state, !item || item->_room != _currentRoom);
 		break;
 
 	case OPCODE_MOVE_OBJECT_TO_ROOM:
@@ -742,16 +746,6 @@ void ComprehendGame::eval_instruction(FunctionState *func_state,
 		func_set_test_result(func_state, test);
 		break;
 
-	case OPCODE_CURRENT_OBJECT_NOT_PRESENT:
-		/* FIXME - use common code for these two ops */
-		item = get_item_by_noun(noun);
-		if (item)
-			func_set_test_result(func_state,
-			                     item->_room != _currentRoom);
-		else
-			func_set_test_result(func_state, true);
-		break;
-
 	case OPCODE_CURRENT_OBJECT_PRESENT:
 		item = get_item_by_noun(noun);
 		if (item)
@@ -803,11 +797,6 @@ void ComprehendGame::eval_instruction(FunctionState *func_state,
 			                     !(item->_flags & ITEMF_CAN_TAKE));
 		break;
 
-	case OPCODE_CURRENT_OBJECT_IN_INVENTORY:
-		item = get_item_by_noun(noun);
-		func_set_test_result(func_state, item && item->_room == ROOM_INVENTORY);
-		break;
-
 	case OPCODE_OBJECT_IS_NOWHERE:
 		item = get_item(instr->_operand[0] - 1);
 		func_set_test_result(func_state, item->_room == ROOM_NOWHERE);
@@ -823,10 +812,14 @@ void ComprehendGame::eval_instruction(FunctionState *func_state,
 		func_set_test_result(func_state, item->_room != ROOM_NOWHERE);
 		break;
 
+	case OPCODE_CURRENT_OBJECT_NOT_PRESENT:
+		item = get_item_by_noun(noun);
+		func_set_test_result(func_state, !isItemPresent(item));
+		break;
+
 	case OPCODE_OBJECT_NOT_PRESENT:
 		item = get_item(instr->_operand[0] - 1);
-		func_set_test_result(func_state,
-		                     item->_room != _currentRoom);
+		func_set_test_result(func_state, !isItemPresent(item));
 		break;
 
 	case OPCODE_OBJECT_PRESENT:
@@ -1400,5 +1393,12 @@ void ComprehendGame::doMovementVerb(uint verbNum) {
 		console_println(_strings[0].c_str());
 }
 
+bool ComprehendGame::isItemPresent(Item *item) const {
+	return item && (
+		item->_room == _currentRoom || item->_room == ROOM_INVENTORY
+		|| item->_room == ROOM_CONTAINER
+	);
+}
+
 } // namespace Comprehend
 } // namespace Glk
diff --git a/engines/glk/comprehend/game.h b/engines/glk/comprehend/game.h
index 2c0e2a8496..10b9d8c00d 100644
--- a/engines/glk/comprehend/game.h
+++ b/engines/glk/comprehend/game.h
@@ -62,6 +62,7 @@ private:
 	void doAfterTurn();
 	void read_input();
 	void doMovementVerb(uint verbNum);
+	bool isItemPresent(Item *item) const;
 
 protected:
 	void game_save();
diff --git a/engines/glk/comprehend/game_data.h b/engines/glk/comprehend/game_data.h
index 03dcb0ee97..ed039685a7 100644
--- a/engines/glk/comprehend/game_data.h
+++ b/engines/glk/comprehend/game_data.h
@@ -69,12 +69,12 @@ enum {
 	OPCODE_TEST_ROOM_FLAG,
 	OPCODE_NOT_HAVE_OBJECT,
 	OPCODE_NOT_IN_ROOM,
-	OPCODE_CURRENT_OBJECT_IN_INVENTORY,
-	OPCODE_OBJECT_NOT_PRESENT,
+	OPCODE_CURRENT_OBJECT_NOT_IN_ROOM,
 	OPCODE_OBJECT_NOT_IN_ROOM,
 	OPCODE_TEST_NOT_FLAG,
 	OPCODE_NOT_HAVE_CURRENT_OBJECT,
 	OPCODE_OBJECT_IS_NOWHERE,
+	OPCODE_OBJECT_NOT_PRESENT,
 	OPCODE_CURRENT_OBJECT_IS_NOWHERE,
 	OPCODE_CURRENT_OBJECT_NOT_PRESENT,
 	OPCODE_CURRENT_OBJECT_NOT_TAKEABLE,
@@ -156,6 +156,7 @@ enum {
 
 /* Special rooms */
 #define ROOM_INVENTORY 0x00
+#define ROOM_CONTAINER 0xfe
 #define ROOM_NOWHERE 0xff
 
 /* Item flags */
diff --git a/engines/glk/comprehend/opcode_map.cpp b/engines/glk/comprehend/opcode_map.cpp
index c3314661db..646e94853d 100644
--- a/engines/glk/comprehend/opcode_map.cpp
+++ b/engines/glk/comprehend/opcode_map.cpp
@@ -57,17 +57,16 @@ void OpcodeMap::loadVersion1() {
 	_opcodeMap[0x24] = OPCODE_CURRENT_OBJECT_PRESENT;
 	_opcodeMap[0x31] = OPCODE_TEST_ROOM_FLAG;
 	_opcodeMap[0x41] = OPCODE_NOT_HAVE_OBJECT;
-	_opcodeMap[0x43] = OPCODE_OBJECT_NOT_IN_ROOM;
 	_opcodeMap[0x45] = OPCODE_NOT_IN_ROOM;
-	_opcodeMap[0x48] = OPCODE_CURRENT_OBJECT_IN_INVENTORY;
-	_opcodeMap[0x49] = OPCODE_OBJECT_NOT_PRESENT;
+	_opcodeMap[0x48] = OPCODE_CURRENT_OBJECT_NOT_PRESENT;
+	_opcodeMap[0x49] = OPCODE_OBJECT_NOT_IN_ROOM;
 	_opcodeMap[0x4E] = OPCODE_TEST_FALSE;
 	_opcodeMap[0x50] = OPCODE_CURRENT_OBJECT_IS_NOWHERE;
 	_opcodeMap[0x59] = OPCODE_TEST_NOT_FLAG;
 	_opcodeMap[0x5D] = OPCODE_TEST_FALSE;
 	_opcodeMap[0x60] = OPCODE_NOT_HAVE_CURRENT_OBJECT;
 	_opcodeMap[0x61] = OPCODE_OBJECT_IS_NOWHERE;
-	_opcodeMap[0x64] = OPCODE_CURRENT_OBJECT_NOT_PRESENT;
+	_opcodeMap[0x64] = OPCODE_CURRENT_OBJECT_NOT_IN_ROOM;
 	_opcodeMap[0x68] = OPCODE_CURRENT_OBJECT_NOT_TAKEABLE;
 	_opcodeMap[0x71] = OPCODE_TEST_NOT_ROOM_FLAG;
 	_opcodeMap[0x80] = OPCODE_INVENTORY;
@@ -120,7 +119,7 @@ void OpcodeMap::loadVersion2() {
 	_opcodeMap[0x38] = OPCODE_INVENTORY_FULL;
 	_opcodeMap[0x41] = OPCODE_NOT_HAVE_OBJECT;
 	_opcodeMap[0x45] = OPCODE_NOT_IN_ROOM;
-	_opcodeMap[0x48] = OPCODE_CURRENT_OBJECT_IN_INVENTORY;
+	_opcodeMap[0x48] = OPCODE_CURRENT_OBJECT_NOT_PRESENT;
 	_opcodeMap[0x43] = OPCODE_OBJECT_NOT_IN_ROOM;
 	_opcodeMap[0x59] = OPCODE_TEST_NOT_FLAG;
 	_opcodeMap[0x5d] = OPCODE_TEST_NOT_ROOM_FLAG;




More information about the Scummvm-git-logs mailing list