diff options
author | Johannes Schickel | 2016-05-15 16:13:25 +0200 |
---|---|---|
committer | Johannes Schickel | 2016-05-15 16:13:25 +0200 |
commit | 2317e3fa58f02b6b482b124d6a63639fb73d2a85 (patch) | |
tree | 2a334a5737850b85058fa5381b5683a21824f4b4 /engines | |
parent | 18193d170e37e0744ad0a9dfe6beed0e2238f9bd (diff) | |
download | scummvm-rg350-2317e3fa58f02b6b482b124d6a63639fb73d2a85.tar.gz scummvm-rg350-2317e3fa58f02b6b482b124d6a63639fb73d2a85.tar.bz2 scummvm-rg350-2317e3fa58f02b6b482b124d6a63639fb73d2a85.zip |
KYRA: Simplify Kyra1 audio track filename handling
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/resource.h | 1 | ||||
-rw-r--r-- | engines/kyra/staticres.cpp | 22 |
2 files changed, 3 insertions, 20 deletions
diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index 3ab08a4c7c..c3ebf6e5fe 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -203,7 +203,6 @@ enum KyraResources { k1ConfigStrings, k1AudioTracks, - k1AudioTracks2, k1AudioTracksIntro, k1CreditsStrings, diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index da8eec1c60..e99321ddcb 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -39,7 +39,7 @@ namespace Kyra { -#define RESFILE_VERSION 87 +#define RESFILE_VERSION 88 namespace { bool checkKyraDat(Common::SeekableReadStream *file) { @@ -805,19 +805,11 @@ void KyraEngine_LoK::initStaticResource() { } // audio resource assignment - int size1, size2; - const char *const *soundfiles1 = _staticres->loadStrings(k1AudioTracks, size1); - const char *const *soundfiles2 = _staticres->loadStrings(k1AudioTracks2, size2); - int soundFilesSize = size1 + size2; + int soundFilesSize; + const char *const *soundFiles = _staticres->loadStrings(k1AudioTracks, soundFilesSize); int soundFilesIntroSize = 0; int cdaTableSize = 0; - const char **soundFiles = 0; - if (soundFilesSize) { - soundFiles = new const char*[soundFilesSize]; - for (int i = 0; i < soundFilesSize; i++) - soundFiles[i] = (i < size1) ? soundfiles1[i] : soundfiles2[i - size1]; - } const char *const *soundFilesIntro = _staticres->loadStrings(k1AudioTracksIntro, soundFilesIntroSize); const int32 *cdaTable = (const int32 *)_staticres->loadRawData(k1TownsCDATable, cdaTableSize); @@ -838,14 +830,6 @@ void KyraEngine_LoK::initStaticResource() { SoundResourceInfo_PC98 resInfoIngame("KYRAM%d.DAT"); _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro); _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame); - - // This should never happen, but we add this to silence static - // analysis tools which complain about memory leaks. - delete[] soundFiles; - } else { - // This should never happen, but we add this to silence static - // analysis tools which complain about memory leaks. - delete[] soundFiles; } } |