[Scummvm-cvs-logs] SF.net SVN: scummvm: [31662] scummvm/trunk/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Wed Apr 23 16:20:34 CEST 2008
Revision: 31662
http://scummvm.svn.sourceforge.net/scummvm/?rev=31662&view=rev
Author: lordhoto
Date: 2008-04-23 07:20:34 -0700 (Wed, 23 Apr 2008)
Log Message:
-----------
Implemented opcode 118: o3_malcolmRandomChat.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/kyra_v3.h
scummvm/trunk/engines/kyra/script_v3.cpp
scummvm/trunk/engines/kyra/text_v3.cpp
Modified: scummvm/trunk/engines/kyra/kyra_v3.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v3.h 2008-04-23 08:08:37 UTC (rev 31661)
+++ scummvm/trunk/engines/kyra/kyra_v3.h 2008-04-23 14:20:34 UTC (rev 31662)
@@ -522,6 +522,8 @@
int o3d_updateAnim(ScriptState *script);
int o3d_delay(ScriptState *script);
+ void malcolmRandomChat();
+
// conscience
bool _badConscienceShown;
int _badConscienceAnim;
@@ -617,6 +619,7 @@
int o3_defineSceneAnim(ScriptState *script);
int o3_updateSceneAnim(ScriptState *script);
int o3_runActorScript(ScriptState *script);
+ int o3_malcolmRandomChat(ScriptState *script);
int o3_setDlgIndex(ScriptState *script);
int o3_getDlgIndex(ScriptState *script);
int o3_defineScene(ScriptState *script);
Modified: scummvm/trunk/engines/kyra/script_v3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_v3.cpp 2008-04-23 08:08:37 UTC (rev 31661)
+++ scummvm/trunk/engines/kyra/script_v3.cpp 2008-04-23 14:20:34 UTC (rev 31662)
@@ -544,6 +544,12 @@
return 0;
}
+int KyraEngine_v3::o3_malcolmRandomChat(ScriptState *script) {
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_malcolmRandomChat(%p) ()", (const void *)script);
+ malcolmRandomChat();
+ return 0;
+}
+
int KyraEngine_v3::o3_setDlgIndex(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_setDlgIndex(%p) (%d)", (const void *)script, stackPos(0));
setDlgIndex(stackPos(0));
@@ -882,7 +888,7 @@
// 0x74
Opcode(o3_runActorScript);
OpcodeUnImpl();
- OpcodeUnImpl();
+ Opcode(o3_malcolmRandomChat);
Opcode(o3_setDlgIndex);
// 0x78
Opcode(o3_getDlgIndex);
Modified: scummvm/trunk/engines/kyra/text_v3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/text_v3.cpp 2008-04-23 08:08:37 UTC (rev 31661)
+++ scummvm/trunk/engines/kyra/text_v3.cpp 2008-04-23 14:20:34 UTC (rev 31662)
@@ -648,5 +648,25 @@
_chatObject= - 1;
}
+void KyraEngine_v3::malcolmRandomChat() {
+ debugC(9, kDebugLevelMain, "KyraEngine_v3::malcolmRandomChat()");
+ updateDlgBuffer();
+
+ int index = (_mainCharacter.sceneId - _chapterLowestScene[_curChapter]) * 2;
+
+ int vocHighBase = 0, vocHighIndex = 0, index1 = 0, index2 = 0;
+ loadDlgHeader(vocHighBase, vocHighIndex, index1, index2);
+
+ if (_chatAltFlag)
+ index++;
+ _chatAltFlag = !_chatAltFlag;
+
+ _cnvFile->seek(index1*6, SEEK_CUR);
+ _cnvFile->seek(index*2, SEEK_CUR);
+ _cnvFile->seek(_cnvFile->readUint16LE(), SEEK_SET);
+
+ processDialog(vocHighIndex, vocHighBase, 0);
+}
+
} // end of namespace Kyra
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list