aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/lol.h1
-rw-r--r--engines/kyra/script_lol.cpp8
-rw-r--r--engines/kyra/text_lol.cpp4
-rw-r--r--engines/kyra/text_lol.h2
4 files changed, 11 insertions, 4 deletions
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index 775369b54c..8b50cb45da 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -762,6 +762,7 @@ private:
int olol_setNextFunc(EMCState *script);
int olol_dummy1(EMCState *script);
int olol_suspendMonster(EMCState *script);
+ int olol_setScriptTextParameter(EMCState *script);
int olol_triggerEventOnMouseButtonClick(EMCState *script);
int olol_printWindowText(EMCState *script);
int olol_countSpecificMonsters(EMCState *script);
diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp
index 432603be5c..318385400c 100644
--- a/engines/kyra/script_lol.cpp
+++ b/engines/kyra/script_lol.cpp
@@ -1625,6 +1625,12 @@ int LoLEngine::olol_suspendMonster(EMCState *script) {
return 1;
}
+int LoLEngine::olol_setScriptTextParameter(EMCState *script) {
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_setScriptTextParameter(%p) (%d)", (const void *)script, stackPos(0));
+ _txt->_scriptTextParameter = stackPos(0);
+ return 1;
+}
+
int LoLEngine::olol_triggerEventOnMouseButtonClick(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_triggerEventOnMouseButtonClick(%p) (%d)", (const void *)script, stackPos(0));
gui_notifyButtonListChanged();
@@ -2815,7 +2821,7 @@ void LoLEngine::setupOpcodeTable() {
Opcode(olol_suspendMonster);
// 0x80
- OpcodeUnImpl();
+ Opcode(olol_setScriptTextParameter);
Opcode(olol_triggerEventOnMouseButtonClick);
Opcode(olol_printWindowText);
Opcode(olol_countSpecificMonsters);
diff --git a/engines/kyra/text_lol.cpp b/engines/kyra/text_lol.cpp
index 2c7c71e0ee..c1b84e4b02 100644
--- a/engines/kyra/text_lol.cpp
+++ b/engines/kyra/text_lol.cpp
@@ -33,7 +33,7 @@
namespace Kyra {
TextDisplayer_LoL::TextDisplayer_LoL(LoLEngine *vm, Screen_LoL *screen) : _vm(vm), _screen(screen),
- _scriptParameter(0), _lineCount(0), _printFlag(false), _lineWidth(0), _numCharsTotal(0),
+ _scriptTextParameter(0), _lineCount(0), _printFlag(false), _lineWidth(0), _numCharsTotal(0),
_numCharsLeft(0), _numCharsPrinted(0) {
memset(_stringParameters, 0, 15 * sizeof(char *));
@@ -286,7 +286,7 @@ void TextDisplayer_LoL::preprocessString(char *str, EMCState *script, const uint
switch (para) {
case 'a':
- snprintf(dst, 7, "%d", _scriptParameter);
+ snprintf(dst, 7, "%d", _scriptTextParameter);
dst += strlen(dst);
break;
diff --git a/engines/kyra/text_lol.h b/engines/kyra/text_lol.h
index 5586be730e..cc8154fac2 100644
--- a/engines/kyra/text_lol.h
+++ b/engines/kyra/text_lol.h
@@ -49,7 +49,7 @@ public:
void printDialogueText(int dim, char *str, EMCState *script, const uint16 *paramList, int16 paramIndex);
void printMessage(uint16 type, const char *str, ...) GCC_PRINTF(3, 4);
- int16 _scriptParameter;
+ int16 _scriptTextParameter;
private:
void displayText(char *str, ...);