[Scummvm-git-logs] scummvm master -> 509edd7b473acda38d6f6307ce7cf88a6da71de7
dreammaster
paulfgilbert at gmail.com
Tue Dec 15 03:10:03 UTC 2020
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
13c6d25c05 GLK: COMPREHEND: Implementing Talisman beforePrompt/afterPrompt
7ade799d29 GLK: COMPREHEND: Added actionSelected engine method
e87ae74a43 GLK: COMPREHEND: Fix Talisman turn operation
509edd7b47 GLK: COMPREHEND: Separate execution of action functions & special opcodes
Commit: 13c6d25c05e051688f013304c104ff3098748bb9
https://github.com/scummvm/scummvm/commit/13c6d25c05e051688f013304c104ff3098748bb9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-12-14T19:09:40-08:00
Commit Message:
GLK: COMPREHEND: Implementing Talisman beforePrompt/afterPrompt
Changed paths:
engines/glk/comprehend/game.cpp
engines/glk/comprehend/game.h
engines/glk/comprehend/game_oo.cpp
engines/glk/comprehend/game_oo.h
engines/glk/comprehend/game_tm.cpp
engines/glk/comprehend/game_tm.h
diff --git a/engines/glk/comprehend/game.cpp b/engines/glk/comprehend/game.cpp
index 1154fde6cf..8b784c755f 100644
--- a/engines/glk/comprehend/game.cpp
+++ b/engines/glk/comprehend/game.cpp
@@ -836,20 +836,20 @@ void ComprehendGame::read_input() {
if (g_comprehend->shouldQuit())
return;
- afterPrompt();
-
_inputLineIndex = 0;
- if (strlen(_inputLine) != 0)
- break;
-
- // Empty line, so toggle picture window visibility
- if (!g_comprehend->toggleGraphics())
- updateRoomDesc();
- g_comprehend->print(_("Picture window toggled\n"));
+ if (strlen(_inputLine) == 0) {
+ // Empty line, so toggle picture window visibility
+ if (!g_comprehend->toggleGraphics())
+ updateRoomDesc();
+ g_comprehend->print(_("Picture window toggled\n"));
+
+ _updateFlags |= UPDATE_GRAPHICS;
+ update_graphics();
+ continue;
+ }
- _updateFlags |= UPDATE_GRAPHICS;
- update_graphics();
- continue;
+ if (afterPrompt())
+ break;
}
for (;;) {
diff --git a/engines/glk/comprehend/game.h b/engines/glk/comprehend/game.h
index d6a60e2f7e..466baecd0a 100644
--- a/engines/glk/comprehend/game.h
+++ b/engines/glk/comprehend/game.h
@@ -137,11 +137,32 @@ public:
ComprehendGame();
virtual ~ComprehendGame();
+ /**
+ * Called before the game starts
+ */
virtual void beforeGame() {}
+
+ /**
+ * Called just before the prompt for user input
+ */
virtual void beforePrompt() {}
- virtual void afterPrompt() {}
+
+ /**
+ * Called after input has been entered.
+ * @returns If false, causes input to be repeated
+ */
+ virtual bool afterPrompt() { return true; }
+
+ /**
+ * Called before the start of a game turn
+ */
virtual void beforeTurn();
+
+ /**
+ * Called at the end of a game turn
+ */
virtual void afterTurn() {}
+
virtual int roomIsSpecial(unsigned room_index, unsigned *room_desc_string) {
return ROOM_IS_NORMAL;
}
diff --git a/engines/glk/comprehend/game_oo.cpp b/engines/glk/comprehend/game_oo.cpp
index 655a6b0f03..19b380c972 100644
--- a/engines/glk/comprehend/game_oo.cpp
+++ b/engines/glk/comprehend/game_oo.cpp
@@ -172,7 +172,7 @@ void OOToposGame::beforePrompt() {
computerConsole();
}
-void OOToposGame::afterPrompt() {
+bool OOToposGame::afterPrompt() {
ComprehendGameV2::afterPrompt();
// WORKAROUND: Allow for the Apple 2 password in the DOS version
@@ -182,6 +182,8 @@ void OOToposGame::afterPrompt() {
if (_currentRoom != _currentRoomCopy)
_updateFlags |= UPDATE_GRAPHICS;
_currentRoom = _currentRoomCopy;
+
+ return true;
}
void OOToposGame::handleSpecialOpcode(uint8 operand) {
diff --git a/engines/glk/comprehend/game_oo.h b/engines/glk/comprehend/game_oo.h
index fe2fe1091a..155264a8cb 100644
--- a/engines/glk/comprehend/game_oo.h
+++ b/engines/glk/comprehend/game_oo.h
@@ -81,7 +81,7 @@ public:
void beforeGame() override;
void beforeTurn() override;
void beforePrompt() override;
- void afterPrompt() override;
+ bool afterPrompt() override;
int roomIsSpecial(unsigned room_index, unsigned *room_desc_string) override;
void handleSpecialOpcode(uint8 operand) override;
bool handle_restart() override;
diff --git a/engines/glk/comprehend/game_tm.cpp b/engines/glk/comprehend/game_tm.cpp
index c0d9b7f61a..612bddcdf3 100644
--- a/engines/glk/comprehend/game_tm.cpp
+++ b/engines/glk/comprehend/game_tm.cpp
@@ -116,5 +116,46 @@ void TalismanGame::beforeGame() {
g_comprehend->glk_window_clear(g_comprehend->_bottomWindow);
}
+void TalismanGame::beforeTurn() {
+ ComprehendGameV2::beforeTurn();
+
+ _variables[0x62] = g_vm->getRandomNumber(255);
+
+ eval_function(17, nullptr);
+}
+
+void TalismanGame::beforePrompt() {
+ if (_nounState == NOUNSTATE_INITIAL)
+ eval_function(14, nullptr);
+}
+
+bool TalismanGame::afterPrompt() {
+ if (_savedAction.empty()) {
+ eval_function(19, nullptr);
+ return !_flags[3];
+ } else {
+ strcpy(_inputLine, _savedAction.c_str());
+ _savedAction.clear();
+ return true;
+ }
+}
+
+void TalismanGame::handleSpecialOpcode(uint8 operand) {
+ switch (operand) {
+ case 15:
+ // Switch to text screen mode
+ if (g_comprehend->isGraphicsEnabled()) {
+ g_comprehend->toggleGraphics();
+ updateRoomDesc();
+ }
+
+ eval_function(19, nullptr);
+ break;
+
+ default:
+ break;
+ }
+}
+
} // namespace Comprehend
} // namespace Glk
diff --git a/engines/glk/comprehend/game_tm.h b/engines/glk/comprehend/game_tm.h
index 4ac5ca4090..f099df263e 100644
--- a/engines/glk/comprehend/game_tm.h
+++ b/engines/glk/comprehend/game_tm.h
@@ -29,6 +29,8 @@ namespace Glk {
namespace Comprehend {
class TalismanGame : public ComprehendGameV2 {
+private:
+ Common::String _savedAction;
private:
/**
* Load strings from the executable
@@ -39,6 +41,10 @@ public:
~TalismanGame() override {}
void beforeGame() override;
+ void beforeTurn() override;
+ void beforePrompt() override;
+ bool afterPrompt() override;
+ void handleSpecialOpcode(uint8 operand) override;
};
} // namespace Comprehend
Commit: 7ade799d2917cb919aaa44c1118aed8cfb5332da
https://github.com/scummvm/scummvm/commit/7ade799d2917cb919aaa44c1118aed8cfb5332da
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-12-14T19:09:40-08:00
Commit Message:
GLK: COMPREHEND: Added actionSelected engine method
Changed paths:
engines/glk/comprehend/game.cpp
engines/glk/comprehend/game.h
engines/glk/comprehend/game_tm.cpp
engines/glk/comprehend/game_tm.h
diff --git a/engines/glk/comprehend/game.cpp b/engines/glk/comprehend/game.cpp
index 8b784c755f..4993c9b352 100644
--- a/engines/glk/comprehend/game.cpp
+++ b/engines/glk/comprehend/game.cpp
@@ -717,7 +717,11 @@ bool ComprehendGame::handle_sentence(uint tableNum, Sentence *sentence, Common::
if (isMatch) {
// Match
- eval_function(action._function, sentence);
+ uint16 function = action._function;
+ actionSelected(function);
+
+ // Execute action
+ eval_function(function, sentence);
return true;
}
}
diff --git a/engines/glk/comprehend/game.h b/engines/glk/comprehend/game.h
index 466baecd0a..9e92795997 100644
--- a/engines/glk/comprehend/game.h
+++ b/engines/glk/comprehend/game.h
@@ -163,6 +163,11 @@ public:
*/
virtual void afterTurn() {}
+ /**
+ * Called when an action function has been selected
+ */
+ virtual void actionSelected(uint16 &function) {}
+
virtual int roomIsSpecial(unsigned room_index, unsigned *room_desc_string) {
return ROOM_IS_NORMAL;
}
diff --git a/engines/glk/comprehend/game_tm.cpp b/engines/glk/comprehend/game_tm.cpp
index 612bddcdf3..ae4400a5b8 100644
--- a/engines/glk/comprehend/game_tm.cpp
+++ b/engines/glk/comprehend/game_tm.cpp
@@ -140,6 +140,13 @@ bool TalismanGame::afterPrompt() {
}
}
+void TalismanGame::actionSelected(uint16 &function) {
+ if (_flags[62] && function != _variables[125]) {
+ _variables[124] = function;
+ function = _variables[126];
+ }
+}
+
void TalismanGame::handleSpecialOpcode(uint8 operand) {
switch (operand) {
case 15:
diff --git a/engines/glk/comprehend/game_tm.h b/engines/glk/comprehend/game_tm.h
index f099df263e..70fe6d4d7e 100644
--- a/engines/glk/comprehend/game_tm.h
+++ b/engines/glk/comprehend/game_tm.h
@@ -44,6 +44,7 @@ public:
void beforeTurn() override;
void beforePrompt() override;
bool afterPrompt() override;
+ void actionSelected(uint16 &function) override;
void handleSpecialOpcode(uint8 operand) override;
};
Commit: e87ae74a4340c455a747c3ca9aba7441f7c88682
https://github.com/scummvm/scummvm/commit/e87ae74a4340c455a747c3ca9aba7441f7c88682
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-12-14T19:09:40-08:00
Commit Message:
GLK: COMPREHEND: Fix Talisman turn operation
Changed paths:
engines/glk/comprehend/game_tm.cpp
engines/glk/comprehend/game_tm.h
diff --git a/engines/glk/comprehend/game_tm.cpp b/engines/glk/comprehend/game_tm.cpp
index ae4400a5b8..f9ef6e39fe 100644
--- a/engines/glk/comprehend/game_tm.cpp
+++ b/engines/glk/comprehend/game_tm.cpp
@@ -117,21 +117,24 @@ void TalismanGame::beforeGame() {
}
void TalismanGame::beforeTurn() {
- ComprehendGameV2::beforeTurn();
-
_variables[0x62] = g_vm->getRandomNumber(255);
- eval_function(17, nullptr);
+ evalFunction0(17);
+}
+
+void TalismanGame::afterTurn() {
+ eval_function(0, nullptr);
}
void TalismanGame::beforePrompt() {
- if (_nounState == NOUNSTATE_INITIAL)
- eval_function(14, nullptr);
+ if (_nounState == NOUNSTATE_INITIAL) {
+ evalFunction0(14);
+ }
}
bool TalismanGame::afterPrompt() {
if (_savedAction.empty()) {
- eval_function(19, nullptr);
+ evalFunction0(19);
return !_flags[3];
} else {
strcpy(_inputLine, _savedAction.c_str());
@@ -164,5 +167,15 @@ void TalismanGame::handleSpecialOpcode(uint8 operand) {
}
}
+void TalismanGame::evalFunction0(int function) {
+ if (function) {
+ eval_function(function, nullptr);
+ eval_function(0, nullptr);
+ } else {
+ console_println(stringLookup(STRING_DONT_UNDERSTAND).c_str());
+ }
+}
+
+
} // namespace Comprehend
} // namespace Glk
diff --git a/engines/glk/comprehend/game_tm.h b/engines/glk/comprehend/game_tm.h
index 70fe6d4d7e..3dfacb9374 100644
--- a/engines/glk/comprehend/game_tm.h
+++ b/engines/glk/comprehend/game_tm.h
@@ -36,12 +36,18 @@ private:
* Load strings from the executable
*/
void loadStrings();
+
+ /**
+ * Executes a designated function and then function zero
+ */
+ void evalFunction0(int function);
public:
TalismanGame();
~TalismanGame() override {}
void beforeGame() override;
void beforeTurn() override;
+ void afterTurn() override;
void beforePrompt() override;
bool afterPrompt() override;
void actionSelected(uint16 &function) override;
Commit: 509edd7b473acda38d6f6307ce7cf88a6da71de7
https://github.com/scummvm/scummvm/commit/509edd7b473acda38d6f6307ce7cf88a6da71de7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-12-14T19:09:40-08:00
Commit Message:
GLK: COMPREHEND: Separate execution of action functions & special opcodes
Changed paths:
engines/glk/comprehend/game.cpp
engines/glk/comprehend/game.h
engines/glk/comprehend/game_cc.cpp
engines/glk/comprehend/game_cc.h
engines/glk/comprehend/game_oo.cpp
engines/glk/comprehend/game_oo.h
engines/glk/comprehend/game_opcodes.cpp
engines/glk/comprehend/game_tm.cpp
engines/glk/comprehend/game_tm.h
engines/glk/comprehend/game_tr1.cpp
engines/glk/comprehend/game_tr1.h
engines/glk/comprehend/game_tr2.cpp
engines/glk/comprehend/game_tr2.h
diff --git a/engines/glk/comprehend/game.cpp b/engines/glk/comprehend/game.cpp
index 4993c9b352..50928229ef 100644
--- a/engines/glk/comprehend/game.cpp
+++ b/engines/glk/comprehend/game.cpp
@@ -116,7 +116,8 @@ void Sentence::format() {
ComprehendGame::ComprehendGame() : _gameStrings(nullptr), _ended(false),
- _nounState(NOUNSTATE_INITIAL), _inputLineIndex(0), _currentRoomCopy(-1) {
+ _functionNum(0), _specialOpcode(0), _nounState(NOUNSTATE_INITIAL),
+ _inputLineIndex(0), _currentRoomCopy(-1) {
Common::fill(&_inputLine[0], &_inputLine[INPUT_LINE_SIZE], 0);
}
@@ -700,7 +701,6 @@ bool ComprehendGame::handle_sentence(Sentence *sentence) {
return true;
}
- console_println(stringLookup(STRING_DONT_UNDERSTAND).c_str());
return false;
}
@@ -717,11 +717,7 @@ bool ComprehendGame::handle_sentence(uint tableNum, Sentence *sentence, Common::
if (isMatch) {
// Match
- uint16 function = action._function;
- actionSelected(function);
-
- // Execute action
- eval_function(function, sentence);
+ _functionNum = action._function;
return true;
}
}
@@ -730,6 +726,20 @@ bool ComprehendGame::handle_sentence(uint tableNum, Sentence *sentence, Common::
return false;
}
+void ComprehendGame::handleAction(Sentence *sentence) {
+ _specialOpcode = 0;
+
+ if (_functionNum == 0) {
+ console_println(stringLookup(STRING_DONT_UNDERSTAND).c_str());
+ } else {
+ eval_function(_functionNum, nullptr);
+ _functionNum = 0;
+ eval_function(0, nullptr);
+ }
+
+ handleSpecialOpcode();
+}
+
void ComprehendGame::read_sentence(Sentence *sentence) {
bool sentence_end = false;
const char *word_string, *p = &_inputLine[_inputLineIndex];
@@ -864,6 +874,8 @@ void ComprehendGame::read_input() {
_sentence.copyFrom(tempSentence, tempSentence._formattedWords[0] || prevNounState != NOUNSTATE_STANDARD);
handled = handle_sentence(&_sentence);
+ handleAction(&_sentence);
+
if (!handled)
return;
diff --git a/engines/glk/comprehend/game.h b/engines/glk/comprehend/game.h
index 9e92795997..db58562b5b 100644
--- a/engines/glk/comprehend/game.h
+++ b/engines/glk/comprehend/game.h
@@ -80,6 +80,8 @@ protected:
char _inputLine[INPUT_LINE_SIZE];
int _inputLineIndex;
int _currentRoomCopy;
+ int _functionNum;
+ int _specialOpcode;
public:
const GameStrings *_gameStrings;
@@ -166,12 +168,12 @@ public:
/**
* Called when an action function has been selected
*/
- virtual void actionSelected(uint16 &function) {}
+ virtual void handleAction(Sentence *sentence);
virtual int roomIsSpecial(unsigned room_index, unsigned *room_desc_string) {
return ROOM_IS_NORMAL;
}
- virtual void handleSpecialOpcode(uint8 operand) {}
+ virtual void handleSpecialOpcode() {}
virtual void synchronizeSave(Common::Serializer &s);
diff --git a/engines/glk/comprehend/game_cc.cpp b/engines/glk/comprehend/game_cc.cpp
index 6eb5d8eeda..793312945e 100644
--- a/engines/glk/comprehend/game_cc.cpp
+++ b/engines/glk/comprehend/game_cc.cpp
@@ -80,8 +80,8 @@ void CrimsonCrownGame::synchronizeSave(Common::Serializer &s) {
ComprehendGame::synchronizeSave(s);
}
-void CrimsonCrownGame::handleSpecialOpcode(uint8 operand) {
- switch (operand) {
+void CrimsonCrownGame::handleSpecialOpcode() {
+ switch (_specialOpcode) {
case 1:
// Crystyal ball cutscene
if (_diskNum == 1) {
diff --git a/engines/glk/comprehend/game_cc.h b/engines/glk/comprehend/game_cc.h
index 5775e060dd..92231375b7 100644
--- a/engines/glk/comprehend/game_cc.h
+++ b/engines/glk/comprehend/game_cc.h
@@ -53,7 +53,7 @@ public:
void beforeGame() override;
void beforePrompt() override;
void beforeTurn() override;
- void handleSpecialOpcode(uint8 operand) override;
+ void handleSpecialOpcode() override;
void synchronizeSave(Common::Serializer &s) override;
void setupDisk(uint diskNum);
diff --git a/engines/glk/comprehend/game_oo.cpp b/engines/glk/comprehend/game_oo.cpp
index 19b380c972..8db755a3c9 100644
--- a/engines/glk/comprehend/game_oo.cpp
+++ b/engines/glk/comprehend/game_oo.cpp
@@ -186,8 +186,8 @@ bool OOToposGame::afterPrompt() {
return true;
}
-void OOToposGame::handleSpecialOpcode(uint8 operand) {
- switch (operand) {
+void OOToposGame::handleSpecialOpcode() {
+ switch (_specialOpcode) {
case 1:
// Update guard location
randomizeGuardLocation();
diff --git a/engines/glk/comprehend/game_oo.h b/engines/glk/comprehend/game_oo.h
index 155264a8cb..0c20e4aaf3 100644
--- a/engines/glk/comprehend/game_oo.h
+++ b/engines/glk/comprehend/game_oo.h
@@ -83,7 +83,7 @@ public:
void beforePrompt() override;
bool afterPrompt() override;
int roomIsSpecial(unsigned room_index, unsigned *room_desc_string) override;
- void handleSpecialOpcode(uint8 operand) override;
+ void handleSpecialOpcode() override;
bool handle_restart() override;
void synchronizeSave(Common::Serializer &s) override;
};
diff --git a/engines/glk/comprehend/game_opcodes.cpp b/engines/glk/comprehend/game_opcodes.cpp
index 0c5400f1e0..715ca4de1e 100644
--- a/engines/glk/comprehend/game_opcodes.cpp
+++ b/engines/glk/comprehend/game_opcodes.cpp
@@ -267,7 +267,7 @@ void ComprehendGameOpcodes::execute_opcode(const Instruction *instr, const Sente
case OPCODE_SPECIAL:
// Game specific opcode
- handleSpecialOpcode(instr->_operand[0]);
+ _specialOpcode = instr->_operand[0];
break;
case OPCODE_TAKE_CURRENT_OBJECT:
diff --git a/engines/glk/comprehend/game_tm.cpp b/engines/glk/comprehend/game_tm.cpp
index f9ef6e39fe..e8f10c1942 100644
--- a/engines/glk/comprehend/game_tm.cpp
+++ b/engines/glk/comprehend/game_tm.cpp
@@ -119,22 +119,21 @@ void TalismanGame::beforeGame() {
void TalismanGame::beforeTurn() {
_variables[0x62] = g_vm->getRandomNumber(255);
- evalFunction0(17);
-}
-
-void TalismanGame::afterTurn() {
- eval_function(0, nullptr);
+ _functionNum = 17;
+ handleAction(nullptr);
}
void TalismanGame::beforePrompt() {
if (_nounState == NOUNSTATE_INITIAL) {
- evalFunction0(14);
+ _functionNum = 14;
+ handleAction(nullptr);
}
}
bool TalismanGame::afterPrompt() {
if (_savedAction.empty()) {
- evalFunction0(19);
+ _functionNum = 19;
+ handleAction(nullptr);
return !_flags[3];
} else {
strcpy(_inputLine, _savedAction.c_str());
@@ -143,15 +142,17 @@ bool TalismanGame::afterPrompt() {
}
}
-void TalismanGame::actionSelected(uint16 &function) {
- if (_flags[62] && function != _variables[125]) {
- _variables[124] = function;
- function = _variables[126];
+void TalismanGame::handleAction(Sentence *sentence) {
+ if (_flags[62] && _functionNum != _variables[125]) {
+ _variables[124] = _functionNum;
+ _functionNum = _variables[126];
}
+
+ ComprehendGameV2::handleAction(sentence);
}
-void TalismanGame::handleSpecialOpcode(uint8 operand) {
- switch (operand) {
+void TalismanGame::handleSpecialOpcode() {
+ switch (_specialOpcode) {
case 15:
// Switch to text screen mode
if (g_comprehend->isGraphicsEnabled()) {
@@ -159,7 +160,8 @@ void TalismanGame::handleSpecialOpcode(uint8 operand) {
updateRoomDesc();
}
- eval_function(19, nullptr);
+ _functionNum = 19;
+ handleAction(nullptr);
break;
default:
@@ -167,15 +169,5 @@ void TalismanGame::handleSpecialOpcode(uint8 operand) {
}
}
-void TalismanGame::evalFunction0(int function) {
- if (function) {
- eval_function(function, nullptr);
- eval_function(0, nullptr);
- } else {
- console_println(stringLookup(STRING_DONT_UNDERSTAND).c_str());
- }
-}
-
-
} // namespace Comprehend
} // namespace Glk
diff --git a/engines/glk/comprehend/game_tm.h b/engines/glk/comprehend/game_tm.h
index 3dfacb9374..a69da175db 100644
--- a/engines/glk/comprehend/game_tm.h
+++ b/engines/glk/comprehend/game_tm.h
@@ -36,22 +36,16 @@ private:
* Load strings from the executable
*/
void loadStrings();
-
- /**
- * Executes a designated function and then function zero
- */
- void evalFunction0(int function);
public:
TalismanGame();
~TalismanGame() override {}
void beforeGame() override;
void beforeTurn() override;
- void afterTurn() override;
void beforePrompt() override;
bool afterPrompt() override;
- void actionSelected(uint16 &function) override;
- void handleSpecialOpcode(uint8 operand) override;
+ void handleAction(Sentence *sentence) override;
+ void handleSpecialOpcode() override;
};
} // namespace Comprehend
diff --git a/engines/glk/comprehend/game_tr1.cpp b/engines/glk/comprehend/game_tr1.cpp
index 21419c4dbb..34752461dc 100644
--- a/engines/glk/comprehend/game_tr1.cpp
+++ b/engines/glk/comprehend/game_tr1.cpp
@@ -200,8 +200,8 @@ void TransylvaniaGame1::synchronizeSave(Common::Serializer &s) {
get_item(ITEM_VAMPIRE)->_room = 0xff;
}
-void TransylvaniaGame1::handleSpecialOpcode(uint8 operand) {
- switch (operand) {
+void TransylvaniaGame1::handleSpecialOpcode() {
+ switch (_specialOpcode) {
case 1:
// Mice have been released
_miceReleased = true;
diff --git a/engines/glk/comprehend/game_tr1.h b/engines/glk/comprehend/game_tr1.h
index 3a765965bd..49f2cad105 100644
--- a/engines/glk/comprehend/game_tr1.h
+++ b/engines/glk/comprehend/game_tr1.h
@@ -46,7 +46,7 @@ public:
void beforeTurn() override;
void synchronizeSave(Common::Serializer &s) override;
int roomIsSpecial(unsigned room_index, unsigned *roomDescString) override;
- void handleSpecialOpcode(uint8 operand) override;
+ void handleSpecialOpcode() override;
};
} // namespace Comprehend
diff --git a/engines/glk/comprehend/game_tr2.cpp b/engines/glk/comprehend/game_tr2.cpp
index 5f29ca4961..44c30faf3f 100644
--- a/engines/glk/comprehend/game_tr2.cpp
+++ b/engines/glk/comprehend/game_tr2.cpp
@@ -193,8 +193,8 @@ void TransylvaniaGame2::synchronizeSave(Common::Serializer &s) {
get_item(ITEM_VAMPIRE)->_room = 0xff;
}
-void TransylvaniaGame2::handleSpecialOpcode(uint8 operand) {
- switch (operand) {
+void TransylvaniaGame2::handleSpecialOpcode() {
+ switch (_specialOpcode) {
case 1:
// Mice have been released
_miceReleased = true;
diff --git a/engines/glk/comprehend/game_tr2.h b/engines/glk/comprehend/game_tr2.h
index 309d7551de..dfd0a9e649 100644
--- a/engines/glk/comprehend/game_tr2.h
+++ b/engines/glk/comprehend/game_tr2.h
@@ -46,7 +46,7 @@ public:
void beforeTurn() override;
void synchronizeSave(Common::Serializer &s) override;
int roomIsSpecial(unsigned room_index, unsigned *roomDescString) override;
- void handleSpecialOpcode(uint8 operand) override;
+ void handleSpecialOpcode() override;
};
} // namespace Comprehend
More information about the Scummvm-git-logs
mailing list