[Scummvm-git-logs] scummvm master -> e6674e1cb84afccb64d76a65310121e9088365aa
dreammaster
paulfgilbert at gmail.com
Thu Oct 22 05:15:22 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:
e6674e1cb8 GLK: COMPREHEND: Per-turn script for OO-Topos now working
Commit: e6674e1cb84afccb64d76a65310121e9088365aa
https://github.com/scummvm/scummvm/commit/e6674e1cb84afccb64d76a65310121e9088365aa
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-10-21T22:15:03-07:00
Commit Message:
GLK: COMPREHEND: Per-turn script for OO-Topos now working
Changed paths:
engines/glk/comprehend/game.cpp
engines/glk/comprehend/game_opcodes.cpp
diff --git a/engines/glk/comprehend/game.cpp b/engines/glk/comprehend/game.cpp
index 2489096fa4..c10e597795 100644
--- a/engines/glk/comprehend/game.cpp
+++ b/engines/glk/comprehend/game.cpp
@@ -787,8 +787,7 @@ void ComprehendGame::doBeforeTurn() {
beforeTurn();
// Run the each turn functions
- // TODO: Re-enable turn processing
- // eval_function(0, nullptr);
+ eval_function(0, nullptr);
update();
}
diff --git a/engines/glk/comprehend/game_opcodes.cpp b/engines/glk/comprehend/game_opcodes.cpp
index 02d3a109a6..a5eb7e99ee 100644
--- a/engines/glk/comprehend/game_opcodes.cpp
+++ b/engines/glk/comprehend/game_opcodes.cpp
@@ -121,6 +121,11 @@ void ComprehendGameOpcodes::execute_opcode(const Instruction *instr, const Sente
move_to(instr->_operand[0]);
break;
+ case OPCODE_OBJECT_IN_ROOM:
+ item = getItem(instr);
+ func_set_test_result(func_state, item->_room == instr->_operand[1]);
+ break;
+
case OPCODE_OBJECT_IS_NOWHERE:
item = getItem(instr);
func_set_test_result(func_state, item->_room == ROOM_NOWHERE);
@@ -455,12 +460,6 @@ void ComprehendGameV1::execute_opcode(const Instruction *instr, const Sentence *
move_object(item, _currentRoom);
break;
- case OPCODE_OBJECT_IN_ROOM:
- item = getItem(instr);
- func_set_test_result(func_state,
- item->_room == instr->_operand[1]);
- break;
-
case OPCODE_OBJECT_NOT_IN_ROOM:
item = getItem(instr);
func_set_test_result(func_state, !item || item->_room != _currentRoom);
@@ -684,6 +683,7 @@ ComprehendGameV2::ComprehendGameV2() {
_opcodeMap[0x1d] = OPCODE_TEST_ROOM_FLAG;
_opcodeMap[0x20] = OPCODE_HAVE_CURRENT_OBJECT;
_opcodeMap[0x21] = OPCODE_OBJECT_PRESENT;
+ _opcodeMap[0x22] = OPCODE_OBJECT_IN_ROOM;
_opcodeMap[0x25] = OPCODE_OBJECT_TAKEABLE;
_opcodeMap[0x29] = OPCODE_INVENTORY_FULL;
_opcodeMap[0x2d] = OPCODE_OBJECT_CAN_TAKE;
@@ -718,7 +718,6 @@ ComprehendGameV2::ComprehendGameV2() {
_opcodeMap[0x09] = OPCODE_VAR_GT1;
_opcodeMap[0x0a] = OPCODE_VAR_GTE2;
_opcodeMap[0x0d] = OPCODE_VAR_EQ1;
- _opcodeMap[0x22] = OPCODE_OBJECT_IN_ROOM;
_opcodeMap[0x30] = OPCODE_CURRENT_OBJECT_PRESENT;
_opcodeMap[0x41] = OPCODE_NOT_HAVE_OBJECT;
_opcodeMap[0x45] = OPCODE_NOT_IN_ROOM;
More information about the Scummvm-git-logs
mailing list