aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFlorian Kagerer2008-05-12 14:22:27 +0000
committerFlorian Kagerer2008-05-12 14:22:27 +0000
commitbde4fa1e9b6478e6d3820692048bbd7b85e56f73 (patch)
tree0732e75fdb85cb120cd935d1034405e9de35c2ae /engines
parent0b9a3f22083cb7ec61953c3c6905c4780e93619a (diff)
downloadscummvm-rg350-bde4fa1e9b6478e6d3820692048bbd7b85e56f73.tar.gz
scummvm-rg350-bde4fa1e9b6478e6d3820692048bbd7b85e56f73.tar.bz2
scummvm-rg350-bde4fa1e9b6478e6d3820692048bbd7b85e56f73.zip
fix for kyra 3 sfx (broken by last commit)
svn-id: r32061
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/sound_towns.cpp8
-rw-r--r--engines/kyra/staticres.cpp10
2 files changed, 9 insertions, 9 deletions
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index 3d8c7becae..c591646628 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -1442,7 +1442,13 @@ bool SoundTowns_v2::voicePlay(const char *file, bool) {
return false;
}
- uint8 * data = _vm->resource()->fileData(file, 0);
+ char filename [13];
+ if (scumm_stricmp(file + strlen(file) - 4, ".PCM"))
+ sprintf(filename, "%s.PCM", file);
+ else
+ strcpy(filename, file);
+
+ uint8 * data = _vm->resource()->fileData(filename, 0);
uint8 * src = data;
uint16 sfxRate = rates[READ_LE_UINT16(src)];
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index 87585c27d2..49b5b4dc49 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -44,7 +44,7 @@
namespace Kyra {
-#define RESFILE_VERSION 25
+#define RESFILE_VERSION 26
bool StaticResource::checkKyraDat() {
Common::File kyraDat;
@@ -1215,8 +1215,7 @@ void KyraEngine_HoF::initStaticResource() {
_ingameTimJpStr = _staticres->loadStrings(k2IngameTimJpStrings, _ingameTimJpStrSize);
_itemAnimData = _staticres->loadShapeAnimData_v2(k2IngameShapeAnimData, _itemAnimDataSize);
- // replace sequence talkie files with localized versions and cut off .voc
- // suffix from voc files so as to allow compression specific file extensions
+ // replace sequence talkie files with localized versions
const char* const* seqSoundList = _staticres->loadStrings(k2SeqplaySfxFiles, _sequenceSoundListSize);
const char* const* tlkfiles = _staticres->loadStrings(k2SeqplayTlkFiles, tmpSize);
char ** tmpSndLst = new char*[_sequenceSoundListSize];
@@ -1227,9 +1226,6 @@ void KyraEngine_HoF::initStaticResource() {
tmpSndLst[i] = new char[len + 1];
tmpSndLst[i][0] = 0;
- if (_flags.platform == Common::kPlatformPC)
- len -= 4;
-
if (tlkfiles) {
for (int ii = 0; ii < tmpSize; ii++) {
if (!scumm_stricmp(&seqSoundList[i][1], &tlkfiles[ii][1]))
@@ -1239,8 +1235,6 @@ void KyraEngine_HoF::initStaticResource() {
if (tmpSndLst[i][0] == 0)
strcpy(tmpSndLst[i], seqSoundList[i]);
-
- tmpSndLst[i][len] = 0;
}
tlkfiles = seqSoundList = 0;