[Scummvm-cvs-logs] CVS: scummvm/bs2 speech.cpp,1.15,1.16
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Mon Sep 8 23:50:05 CEST 2003
Update of /cvsroot/scummvm/scummvm/bs2
In directory sc8-pr-cvs1:/tmp/cvs-serv1537
Modified Files:
speech.cpp
Log Message:
Simplified the code to decide whether to use speech1.clu or speech2.clu
since res_man.WhichCd() appears to be working now.
Index: speech.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/speech.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- speech.cpp 31 Aug 2003 03:19:43 -0000 1.15
+++ speech.cpp 9 Sep 2003 06:49:15 -0000 1.16
@@ -1564,28 +1564,14 @@
//------------------------------
// set up path to speech cluster
// first checking if we have speech1.clu or speech2.clu in current directory (for translators to test)
- // FIXME better way to do this? debug configs used to use res_man.WhichCd
- // to determine the cd but we always return 0 for that currently
+
File fp;
- strcpy(speechFile,"speech.clu");
- if (fp.open(speechFile, g_sword2->getGameDataPath()) == false) {
- uint8 cd; // 1, 2 or 0 (if speech on both cd's, ie. no need to change)
+ sprintf(speechFile, "speech%d.clu", res_man.WhichCd());
+ if (fp.open(speechFile, g_sword2->getGameDataPath()))
fp.close();
-
- if (fp.open("cd.bin",g_sword2->getGameDataPath()) == false) {
- warning("Need cd.bin file to determine which speech cluster to use");
- } else {
- fp.seek(params[S_WAV], SEEK_SET);
- fp.read(&cd, 1);
-
- if (cd < 2)
- strcpy(speechFile,"speech1.clu");
- else
- strcpy(speechFile,"speech2.clu");
- }
- }
- fp.close();
+ else
+ strcpy(speechFile, "speech.clu");
rv = g_sword2->_sound->PlayCompSpeech(speechFile, params[S_WAV], SPEECH_VOLUME, speech_pan); // Load speech but don't start playing yet
if (rv == RD_OK)
More information about the Scummvm-git-logs
mailing list