[Scummvm-cvs-logs] SF.net SVN: scummvm: [31163] scummvm/trunk/engines/kyra
athrxx at users.sourceforge.net
athrxx at users.sourceforge.net
Mon Mar 17 22:15:24 CET 2008
Revision: 31163
http://scummvm.svn.sourceforge.net/scummvm/?rev=31163&view=rev
Author: athrxx
Date: 2008-03-17 14:15:24 -0700 (Mon, 17 Mar 2008)
Log Message:
-----------
remove unnecessary code duplication
Modified Paths:
--------------
scummvm/trunk/engines/kyra/kyra_v2.cpp
scummvm/trunk/engines/kyra/kyra_v2.h
scummvm/trunk/engines/kyra/script_v2.cpp
scummvm/trunk/engines/kyra/text_v2.cpp
Modified: scummvm/trunk/engines/kyra/kyra_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.cpp 2008-03-17 20:36:58 UTC (rev 31162)
+++ scummvm/trunk/engines/kyra/kyra_v2.cpp 2008-03-17 21:15:24 UTC (rev 31163)
@@ -1620,7 +1620,7 @@
static bool scriptAnimation = false;
if (!scriptAnimation && _flags.isTalkie) {
scriptAnimation = true;
- zanthIdleChat();
+ zanthRandomIdleChat();
} else {
scriptAnimation = false;
if (_loadedZTable > 8)
Modified: scummvm/trunk/engines/kyra/kyra_v2.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.h 2008-03-17 20:36:58 UTC (rev 31162)
+++ scummvm/trunk/engines/kyra/kyra_v2.h 2008-03-17 21:15:24 UTC (rev 31163)
@@ -798,8 +798,7 @@
void startDialogue(int dlgIndex);
void zanthSceneStartupChat();
- void zanthRandomChat();
- void zanthIdleChat();
+ void zanthRandomIdleChat();
void updateDlgBuffer();
void loadDlgHeader(int &csEntry, int &vocH, int &scIndex1, int &scIndex2);
void processDialogue(int dlgOffset, int vocH = 0, int csEntry = 0);
Modified: scummvm/trunk/engines/kyra/script_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_v2.cpp 2008-03-17 20:36:58 UTC (rev 31162)
+++ scummvm/trunk/engines/kyra/script_v2.cpp 2008-03-17 21:15:24 UTC (rev 31163)
@@ -904,7 +904,7 @@
int KyraEngine_v2::o2_zanthRandomChat(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_zanthRandomChat(%p)", (const void *)script);
- zanthRandomChat();
+ zanthRandomIdleChat();
return 0;
}
Modified: scummvm/trunk/engines/kyra/text_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/text_v2.cpp 2008-03-17 20:36:58 UTC (rev 31162)
+++ scummvm/trunk/engines/kyra/text_v2.cpp 2008-03-17 21:15:24 UTC (rev 31163)
@@ -410,7 +410,7 @@
_newSceneDlgState[tableIndex] = 1;
}
-void KyraEngine_v2::zanthRandomChat() {
+void KyraEngine_v2::zanthRandomIdleChat() {
int lowest = _flags.isTalkie ? 6 : 5;
int tableIndex = (_mainCharacter.sceneId - READ_LE_UINT16(&_ingameTalkObjIndex[lowest + _newChapterFile])) << 2;
if (queryGameFlag(0x164))
@@ -432,28 +432,6 @@
processDialogue(offs, vocH, csEntry);
}
-void KyraEngine_v2::zanthIdleChat() {
- int lowest = _flags.isTalkie ? 6 : 5;
- int tableIndex = (_mainCharacter.sceneId - READ_LE_UINT16(&_ingameTalkObjIndex[lowest + _newChapterFile])) << 2;
- if (queryGameFlag(0x164))
- return;
-
- int csEntry, vocH, scIndex1, unused;
- updateDlgBuffer();
- loadDlgHeader(csEntry, vocH, scIndex1, unused);
-
- if (_chatAltFlag) {
- _chatAltFlag = 0;
- tableIndex += 2;
- } else {
- _chatAltFlag = 1;
- }
-
- uint8 bufferIndex = 8 + scIndex1 * 6 + tableIndex;
- int offs = READ_LE_UINT16(_dlgBuffer + bufferIndex);
- processDialogue(offs, vocH, csEntry);
-}
-
void KyraEngine_v2::updateDlgBuffer() {
static const char DlgFileTemplate[] = "CH**-S**.DLG";
char filename[13];
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