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 | |
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
-rw-r--r-- | devtools/create_kyradat/create_kyradat.cpp | 3 | ||||
-rw-r--r-- | devtools/create_kyradat/create_kyradat.h | 1 | ||||
-rw-r--r-- | devtools/create_kyradat/games.cpp | 3 | ||||
-rw-r--r-- | devtools/create_kyradat/resources.cpp | 3 | ||||
-rw-r--r-- | devtools/create_kyradat/resources/lok_dos.h | 11 | ||||
-rw-r--r-- | devtools/create_kyradat/resources/lok_dos_cd.h | 11 | ||||
-rw-r--r-- | devtools/create_kyradat/resources/lok_dos_oldfloppy.h | 11 | ||||
-rw-r--r-- | dists/engine-data/kyra.dat | bin | 496676 -> 496555 bytes | |||
-rw-r--r-- | engines/kyra/resource.h | 1 | ||||
-rw-r--r-- | engines/kyra/staticres.cpp | 22 |
10 files changed, 13 insertions, 53 deletions
diff --git a/devtools/create_kyradat/create_kyradat.cpp b/devtools/create_kyradat/create_kyradat.cpp index e064e899de..294eadf92b 100644 --- a/devtools/create_kyradat/create_kyradat.cpp +++ b/devtools/create_kyradat/create_kyradat.cpp @@ -45,7 +45,7 @@ enum { - kKyraDatVersion = 87 + kKyraDatVersion = 88 }; const ExtractFilename extractFilenames[] = { @@ -119,7 +119,6 @@ const ExtractFilename extractFilenames[] = { // AUDIO filename table { k1AudioTracks, kStringList, false }, - { k1AudioTracks2, kStringList, false }, { k1AudioTracksIntro, kStringList, false }, // AMULET anim diff --git a/devtools/create_kyradat/create_kyradat.h b/devtools/create_kyradat/create_kyradat.h index a6bee6f75c..1d58d7551f 100644 --- a/devtools/create_kyradat/create_kyradat.h +++ b/devtools/create_kyradat/create_kyradat.h @@ -131,7 +131,6 @@ enum kExtractID { k1ConfigStrings, k1AudioTracks, - k1AudioTracks2, k1AudioTracksIntro, k1CreditsStrings, diff --git a/devtools/create_kyradat/games.cpp b/devtools/create_kyradat/games.cpp index afe0c67dbf..e6f0b38c45 100644 --- a/devtools/create_kyradat/games.cpp +++ b/devtools/create_kyradat/games.cpp @@ -231,7 +231,6 @@ const int kyra1FloppyNeed[] = { k1NewGameString, k1ConfigStrings, k1AudioTracks, - k1AudioTracks2, k1AudioTracksIntro, -1 }; @@ -317,7 +316,6 @@ const int kyra1FloppyOldNeed[] = { k1NewGameString, k1ConfigStrings, k1AudioTracks, - k1AudioTracks2, k1AudioTracksIntro, -1 }; @@ -405,7 +403,6 @@ const int kyra1CDNeed[] = { k1NewGameString, k1ConfigStrings, k1AudioTracks, - k1AudioTracks2, k1AudioTracksIntro, -1 }; diff --git a/devtools/create_kyradat/resources.cpp b/devtools/create_kyradat/resources.cpp index 4df6bb8fb8..246811f821 100644 --- a/devtools/create_kyradat/resources.cpp +++ b/devtools/create_kyradat/resources.cpp @@ -302,7 +302,6 @@ static const ResourceProvider resourceProviders[] = { { k1NewGameString, kKyra1, kPlatformDOS, kNoSpecial, EN_ANY, &k1NewGameStringDOSEnglishProvider }, { k1ConfigStrings, kKyra1, kPlatformDOS, kNoSpecial, EN_ANY, &k1ConfigStringsDOSEnglishProvider }, { k1AudioTracks, kKyra1, kPlatformDOS, kNoSpecial, UNK_LANG, &k1AudioTracksDOSProvider }, - { k1AudioTracks2, kKyra1, kPlatformDOS, kNoSpecial, UNK_LANG, &k1AudioTracks2DOSProvider }, { k1AudioTracksIntro, kKyra1, kPlatformDOS, kNoSpecial, UNK_LANG, &k1AudioTracksIntroDOSProvider }, { k1IntroStrings, kKyra1, kPlatformDOS, kNoSpecial, DE_DEU, &k1IntroStringsDOSGermanProvider }, { k1ItemNames, kKyra1, kPlatformDOS, kNoSpecial, DE_DEU, &k1ItemNamesDOSGermanProvider }, @@ -472,7 +471,6 @@ static const ResourceProvider resourceProviders[] = { { k1NewGameString, kKyra1, kPlatformDOS, kOldFloppy, RU_RUS, &k1NewGameStringDOSOldFloppyRussianProvider }, { k1ConfigStrings, kKyra1, kPlatformDOS, kOldFloppy, RU_RUS, &k1ConfigStringsDOSOldFloppyRussianProvider }, { k1AudioTracks, kKyra1, kPlatformDOS, kOldFloppy, UNK_LANG, &k1AudioTracksDOSOldFloppyProvider }, - { k1AudioTracks2, kKyra1, kPlatformDOS, kOldFloppy, UNK_LANG, &k1AudioTracks2DOSOldFloppyProvider }, { k1AudioTracksIntro, kKyra1, kPlatformDOS, kOldFloppy, UNK_LANG, &k1AudioTracksIntroDOSOldFloppyProvider }, { k1KallakWritingSeq, kKyra1, kPlatformDOS, kTalkieVersion, UNK_LANG, &k1KallakWritingSeqDOSCDProvider }, { k1MalcolmTreeSeq, kKyra1, kPlatformDOS, kTalkieVersion, UNK_LANG, &k1MalcolmTreeSeqDOSCDProvider }, @@ -556,7 +554,6 @@ static const ResourceProvider resourceProviders[] = { { k1NewGameString, kKyra1, kPlatformDOS, kTalkieVersion, EN_ANY, &k1NewGameStringDOSCDEnglishProvider }, { k1ConfigStrings, kKyra1, kPlatformDOS, kTalkieVersion, EN_ANY, &k1ConfigStringsDOSCDEnglishProvider }, { k1AudioTracks, kKyra1, kPlatformDOS, kTalkieVersion, UNK_LANG, &k1AudioTracksDOSCDProvider }, - { k1AudioTracks2, kKyra1, kPlatformDOS, kTalkieVersion, UNK_LANG, &k1AudioTracks2DOSCDProvider }, { k1AudioTracksIntro, kKyra1, kPlatformDOS, kTalkieVersion, UNK_LANG, &k1AudioTracksIntroDOSCDProvider }, { k1IntroStrings, kKyra1, kPlatformDOS, kTalkieVersion, DE_DEU, &k1IntroStringsDOSCDGermanProvider }, { k1ItemNames, kKyra1, kPlatformDOS, kTalkieVersion, DE_DEU, &k1ItemNamesDOSCDGermanProvider }, diff --git a/devtools/create_kyradat/resources/lok_dos.h b/devtools/create_kyradat/resources/lok_dos.h index e8d987fe1b..6bc9c2525f 100644 --- a/devtools/create_kyradat/resources/lok_dos.h +++ b/devtools/create_kyradat/resources/lok_dos.h @@ -1898,7 +1898,7 @@ static const byte k1OutroReunionSeqDOS[1351] = { static const ByteProvider k1OutroReunionSeqDOSProvider = { ARRAYSIZE(k1OutroReunionSeqDOS), k1OutroReunionSeqDOS }; -static const char *const k1AudioTracksDOS[8] = { +static const char *const k1AudioTracksDOS[9] = { "KYRA1A", "KYRA1B", "KYRA2A", @@ -1906,17 +1906,12 @@ static const char *const k1AudioTracksDOS[8] = { "KYRA4A", "KYRA4B", "KYRA5A", - "KYRA5B" + "KYRA5B", + "KYRAMISC" }; static const StringListProvider k1AudioTracksDOSProvider = { ARRAYSIZE(k1AudioTracksDOS), k1AudioTracksDOS }; -static const char *const k1AudioTracks2DOS[1] = { - "kyramisc" -}; - -static const StringListProvider k1AudioTracks2DOSProvider = { ARRAYSIZE(k1AudioTracks2DOS), k1AudioTracks2DOS }; - static const char *const k1AudioTracksIntroDOS[1] = { "intro" }; diff --git a/devtools/create_kyradat/resources/lok_dos_cd.h b/devtools/create_kyradat/resources/lok_dos_cd.h index 9550d53d61..dc7a521063 100644 --- a/devtools/create_kyradat/resources/lok_dos_cd.h +++ b/devtools/create_kyradat/resources/lok_dos_cd.h @@ -1969,7 +1969,7 @@ static const byte k1OutroReunionSeqDOSCD[1509] = { static const ByteProvider k1OutroReunionSeqDOSCDProvider = { ARRAYSIZE(k1OutroReunionSeqDOSCD), k1OutroReunionSeqDOSCD }; -static const char *const k1AudioTracksDOSCD[8] = { +static const char *const k1AudioTracksDOSCD[9] = { "KYRA1A", "KYRA1B", "KYRA2A", @@ -1977,17 +1977,12 @@ static const char *const k1AudioTracksDOSCD[8] = { "KYRA4A", "KYRA4B", "KYRA5A", - "KYRA5B" + "KYRA5B", + "KYRAMISC" }; static const StringListProvider k1AudioTracksDOSCDProvider = { ARRAYSIZE(k1AudioTracksDOSCD), k1AudioTracksDOSCD }; -static const char *const k1AudioTracks2DOSCD[1] = { - "kyramisc" -}; - -static const StringListProvider k1AudioTracks2DOSCDProvider = { ARRAYSIZE(k1AudioTracks2DOSCD), k1AudioTracks2DOSCD }; - static const char *const k1AudioTracksIntroDOSCD[2] = { "intro", "intro" diff --git a/devtools/create_kyradat/resources/lok_dos_oldfloppy.h b/devtools/create_kyradat/resources/lok_dos_oldfloppy.h index e19cb5a6ef..62b1530941 100644 --- a/devtools/create_kyradat/resources/lok_dos_oldfloppy.h +++ b/devtools/create_kyradat/resources/lok_dos_oldfloppy.h @@ -1884,7 +1884,7 @@ static const byte k1OutroReunionSeqDOSOldFloppy[1351] = { static const ByteProvider k1OutroReunionSeqDOSOldFloppyProvider = { ARRAYSIZE(k1OutroReunionSeqDOSOldFloppy), k1OutroReunionSeqDOSOldFloppy }; -static const char *const k1AudioTracksDOSOldFloppy[8] = { +static const char *const k1AudioTracksDOSOldFloppy[9] = { "KYRA1A", "KYRA1B", "KYRA2A", @@ -1892,17 +1892,12 @@ static const char *const k1AudioTracksDOSOldFloppy[8] = { "KYRA4A", "KYRA4B", "KYRA5A", - "KYRA5B" + "KYRA5B", + "KYRAMISC" }; static const StringListProvider k1AudioTracksDOSOldFloppyProvider = { ARRAYSIZE(k1AudioTracksDOSOldFloppy), k1AudioTracksDOSOldFloppy }; -static const char *const k1AudioTracks2DOSOldFloppy[1] = { - "kyramisc" -}; - -static const StringListProvider k1AudioTracks2DOSOldFloppyProvider = { ARRAYSIZE(k1AudioTracks2DOSOldFloppy), k1AudioTracks2DOSOldFloppy }; - static const char *const k1AudioTracksIntroDOSOldFloppy[1] = { "intro" }; diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat Binary files differindex 1b42cfbadc..d49d107f6f 100644 --- a/dists/engine-data/kyra.dat +++ b/dists/engine-data/kyra.dat 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; } } |