diff options
author | Florian Kagerer | 2008-05-12 21:52:44 +0000 |
---|---|---|
committer | Florian Kagerer | 2008-05-12 21:52:44 +0000 |
commit | c630fbde6a26f196c66c929faead8cc3403d0c99 (patch) | |
tree | c3bb7172f3bcffc5a830cdb04ee93a34fbafbce1 /engines/kyra | |
parent | f54036b6a45ca172512d409439ccbab8ef87433d (diff) | |
download | scummvm-rg350-c630fbde6a26f196c66c929faead8cc3403d0c99.tar.gz scummvm-rg350-c630fbde6a26f196c66c929faead8cc3403d0c99.tar.bz2 scummvm-rg350-c630fbde6a26f196c66c929faead8cc3403d0c99.zip |
fix valgrind warning and some cleanup
svn-id: r32075
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/sequences_hof.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/sound_towns.cpp | 5 | ||||
-rw-r--r-- | engines/kyra/staticres.cpp | 10 |
3 files changed, 10 insertions, 9 deletions
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index 23b6da2314..3e9f6030ac 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -284,8 +284,10 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) { seq_sequenceCommand(cseq.finalCommand); seq_resetAllTextEntries(); - if (_abortIntroFlag || skipFlag()) + if (_abortIntroFlag || skipFlag()) { _sound->haltTrack(); + _sound->voiceStop(); + } if (_flags.isDemo && !_flags.isTalkie) { if (seqNum == kSequenceDemoFisher) { diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index 9efdee6c2a..513f523194 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -1443,10 +1443,7 @@ bool SoundTowns_v2::voicePlay(const char *file, bool) { } char filename [13]; - if (scumm_stricmp(file + strlen(file) - 4, ".PCM")) - sprintf(filename, "%s.PCM", file); - else - strcpy(filename, file); + sprintf(filename, "%s.PCM", file); uint8 * data = _vm->resource()->fileData(filename, 0); uint8 * src = data; diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index a03fa82a39..3904ae550f 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -44,7 +44,7 @@ namespace Kyra { -#define RESFILE_VERSION 26 +#define RESFILE_VERSION 27 bool StaticResource::checkKyraDat() { Common::File kyraDat; @@ -1226,10 +1226,12 @@ void KyraEngine_HoF::initStaticResource() { tmpSndLst[i] = new char[len + 1]; tmpSndLst[i][0] = 0; - if (tlkfiles) { + if (tlkfiles && strlen(seqSoundList[i])) { for (int ii = 0; ii < tmpSize; ii++) { - if (!scumm_stricmp(&seqSoundList[i][1], &tlkfiles[ii][1])) - strcpy(tmpSndLst[i], tlkfiles[ii]); + if (strlen(seqSoundList[i])) { + if (!scumm_stricmp(&seqSoundList[i][1], &tlkfiles[ii][1])) + strcpy(tmpSndLst[i], tlkfiles[ii]); + } } } |