diff options
author | Torbjörn Andersson | 2003-09-09 06:49:15 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-09-09 06:49:15 +0000 |
commit | 5396901ec6909e3e03c9e70d1b05bd2ef60efa52 (patch) | |
tree | 4f84ac0b03665d19a0f7da085e512ff94dfb924a /sword2 | |
parent | 083be33f1aa8f490c26c9334195eec48db0930a0 (diff) | |
download | scummvm-rg350-5396901ec6909e3e03c9e70d1b05bd2ef60efa52.tar.gz scummvm-rg350-5396901ec6909e3e03c9e70d1b05bd2ef60efa52.tar.bz2 scummvm-rg350-5396901ec6909e3e03c9e70d1b05bd2ef60efa52.zip |
Simplified the code to decide whether to use speech1.clu or speech2.clu
since res_man.WhichCd() appears to be working now.
svn-id: r10121
Diffstat (limited to 'sword2')
-rw-r--r-- | sword2/speech.cpp | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/sword2/speech.cpp b/sword2/speech.cpp index 86defcd3ba..18c57be888 100644 --- a/sword2/speech.cpp +++ b/sword2/speech.cpp @@ -1564,28 +1564,14 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97) //------------------------------ // 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) |