aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2008-04-25 17:43:40 +0000
committerJohannes Schickel2008-04-25 17:43:40 +0000
commitc10f59d358c1ad8221b2151faa7cf4f5c43b5628 (patch)
treedddead9ed6d636b0061619222a2679a6e68dbd84
parent2479b03fbf94d6e565d3e83d5c70857ef02805e0 (diff)
downloadscummvm-rg350-c10f59d358c1ad8221b2151faa7cf4f5c43b5628.tar.gz
scummvm-rg350-c10f59d358c1ad8221b2151faa7cf4f5c43b5628.tar.bz2
scummvm-rg350-c10f59d358c1ad8221b2151faa7cf4f5c43b5628.zip
Implemented opcodes:
- 152: o3_customChat - 153: o3_customChatFinish svn-id: r31726
-rw-r--r--engines/kyra/kyra_v3.h2
-rw-r--r--engines/kyra/script_v3.cpp31
2 files changed, 31 insertions, 2 deletions
diff --git a/engines/kyra/kyra_v3.h b/engines/kyra/kyra_v3.h
index 13214062ec..a0844ca7e2 100644
--- a/engines/kyra/kyra_v3.h
+++ b/engines/kyra/kyra_v3.h
@@ -741,6 +741,8 @@ private:
int o3_querySpecialSceneScriptState(ScriptState *script);
int o3_setHiddenItemsEntry(ScriptState *script);
int o3_getHiddenItemsEntry(ScriptState *script);
+ int o3_customChat(ScriptState *script);
+ int o3_customChatFinish(ScriptState *script);
int o3_setupSceneAnimObject(ScriptState *script);
int o3_removeSceneAnimObject(ScriptState *script);
int o3_disableTimer(ScriptState *script);
diff --git a/engines/kyra/script_v3.cpp b/engines/kyra/script_v3.cpp
index 881fee2c56..12ba3c7da5 100644
--- a/engines/kyra/script_v3.cpp
+++ b/engines/kyra/script_v3.cpp
@@ -26,6 +26,7 @@
#include "kyra/kyra_v3.h"
#include "kyra/script.h"
#include "kyra/screen_v3.h"
+#include "kyra/text_v3.h"
#include "kyra/wsamovie.h"
#include "kyra/timer.h"
@@ -1025,6 +1026,32 @@ int KyraEngine_v3::o3_getHiddenItemsEntry(ScriptState *script) {
return (int16)_hiddenItems[stackPos(0)];
}
+int KyraEngine_v3::o3_customChat(ScriptState *script) {
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_customChat(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
+ const int id = stackPos(0);
+ const int object = stackPos(1);
+ const char *str = (const char *)getTableEntry(_sceneStrings, id);
+
+ if (!str)
+ return 0;
+
+ strcpy(_stringBuffer, str);
+ _chatText = _stringBuffer;
+ _chatObject = object;
+ _chatVocHigh = _chatVocLow = -1;
+ objectChatInit(_stringBuffer, object, _vocHigh, id);
+ playVoice(_vocHigh, id);
+ return 0;
+}
+
+int KyraEngine_v3::o3_customChatFinish(ScriptState *script) {
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_customChatFinish(%p) ()", (const void *)script);
+ _text->restoreScreen();
+ _chatText = 0;
+ _chatObject = -1;
+ return 0;
+}
+
int KyraEngine_v3::o3_setupSceneAnimObject(ScriptState *script) {
debugC(9, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_setupSceneAnimObject(%p) (%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, '%s')", (const void *)script,
stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6), stackPos(7), stackPos(8), stackPos(9),
@@ -1333,8 +1360,8 @@ void KyraEngine_v3::setupOpcodeTable() {
Opcode(o3_dummy);
OpcodeUnImpl();
// 0x98
- OpcodeUnImpl();
- OpcodeUnImpl();
+ Opcode(o3_customChat);
+ Opcode(o3_customChatFinish);
Opcode(o3_setupSceneAnimObject);
Opcode(o3_removeSceneAnimObject);
// 0x9c