diff options
author | Johannes Schickel | 2009-09-17 13:45:29 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-09-17 13:45:29 +0000 |
commit | 858061946aa5f4911feb3fac1de47513d19d0810 (patch) | |
tree | 747fdbccfc1658f233886263877a671482a89f34 /tools | |
parent | e40cbe574ef2f71de5af5a025527446c9207971f (diff) | |
download | scummvm-rg350-858061946aa5f4911feb3fac1de47513d19d0810.tar.gz scummvm-rg350-858061946aa5f4911feb3fac1de47513d19d0810.tar.bz2 scummvm-rg350-858061946aa5f4911feb3fac1de47513d19d0810.zip |
Cleanup special id usage.
svn-id: r44156
Diffstat (limited to 'tools')
-rw-r--r-- | tools/create_kyradat/create_kyradat.cpp | 18 | ||||
-rw-r--r-- | tools/create_kyradat/create_kyradat.h | 23 | ||||
-rw-r--r-- | tools/create_kyradat/extract.cpp | 19 | ||||
-rw-r--r-- | tools/create_kyradat/games.cpp | 56 |
4 files changed, 40 insertions, 76 deletions
diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp index 341d8cb8fb..ddefde4f77 100644 --- a/tools/create_kyradat/create_kyradat.cpp +++ b/tools/create_kyradat/create_kyradat.cpp @@ -319,13 +319,9 @@ const SpecialExtension specialTable[] = { { kDemoVersion, "DEM" }, { kDemoCDVersion, "CD.DEM" }, - { k2CDFile1E, "CD" }, - { k2CDFile1F, "CD" }, - { k2CDFile1G, "CD" }, - { k2CDFile1I, "CD" }, - { k2CDFile2E, "CD" }, - { k2CDFile2F, "CD" }, - { k2CDFile2G, "CD" }, + { kTalkieFile1, "CD" }, + { kTalkieFile2, "CD" }, + { k2CDDemoE, "CD" }, { k2CDDemoF, "CD" }, { k2CDDemoG, "CD" }, @@ -333,9 +329,6 @@ const SpecialExtension specialTable[] = { { k2DemoVersion, "DEM" }, { k2DemoLol, "DEM" }, - { kLolCD1, "CD" }, - { kLolCD2, "CD" }, - { -1, 0 } }; @@ -377,11 +370,8 @@ enum { uint32 getFeatures(const Game *g) { uint32 features = 0; - if (g->special == kTalkieVersion - || g->special == k2CDFile1E || g->special == k2CDFile1F || g->special == k2CDFile1G || g->special == k2CDFile1I - || g->special == k2CDFile2E || g->special == k2CDFile2F || g->special == k2CDFile2G + if (g->special == kTalkieVersion || g->special == kTalkieFile1 || g->special == kTalkieFile2 || g->special == k2CDDemoE || g->special == k2CDDemoF || g->special == k2CDDemoG - || g->special == kLolCD1 || g->special == kLolCD2 || g->game == kKyra3) features |= GF_TALKIE; else if (g->special == kDemoVersion || g->special == k2DemoVersion || g->special == k2DemoLol) diff --git a/tools/create_kyradat/create_kyradat.h b/tools/create_kyradat/create_kyradat.h index 4eb1831a1c..edb2e083f7 100644 --- a/tools/create_kyradat/create_kyradat.h +++ b/tools/create_kyradat/create_kyradat.h @@ -284,25 +284,15 @@ struct ExtractFilename { enum kSpecial { kTalkieVersion = 0, kDemoVersion, - kFMTownsVersionE, - kFMTownsVersionJ, - - k2CDFile1E, - k2CDFile1F, - k2CDFile1G, - k2CDFile2E, - k2CDFile2F, - k2CDFile2G, + k2CDDemoE, k2CDDemoF, k2CDDemoG, - // Italian fan translation - k2CDFile1I, - k2TownsFile1E, - k2TownsFile1J, - k2TownsFile2E, - k2TownsFile2J, + kFile1, + kFile2, + kTalkieFile1, + kTalkieFile2, k2FloppyFile1, k2FloppyFile2, @@ -313,9 +303,6 @@ enum kSpecial { k2DemoVersionTlkG, k2DemoLol, - kLolCD1, - kLolCD2, - // special case for Kyrandia 1 CD demo kDemoCDVersion }; diff --git a/tools/create_kyradat/extract.cpp b/tools/create_kyradat/extract.cpp index cbcb72b455..78c0c296c7 100644 --- a/tools/create_kyradat/extract.cpp +++ b/tools/create_kyradat/extract.cpp @@ -224,10 +224,10 @@ bool extractStrings(PAKFile &out, const Game *g, const byte *data, const uint32 } if (fmtPatch == 2) { - if (g->special == kFMTownsVersionE) { + if (g->lang == EN_ANY) { targetsize--; entries += 1; - } else if (g->special == kFMTownsVersionJ) { + } else if (g->lang == JA_JPN) { targetsize += 2; entries += 2; } @@ -264,16 +264,15 @@ bool extractStrings(PAKFile &out, const Game *g, const byte *data, const uint32 while (!*input) { // Write one empty string into intro strings file if (fmtPatch == 2) { - if ((g->special == kFMTownsVersionE && input - data == 0x260) || - (g->special == kFMTownsVersionJ && input - data == 0x2BD) || - (g->special == kFMTownsVersionJ && input - data == 0x2BE)) + if ((g->lang == EN_ANY && input - data == 0x260) || + (g->lang == JA_JPN && (input - data == 0x2BD || input - data == 0x2BE))) *output++ = *input; } // insert one dummy string at hof sequence strings position 59 if (fmtPatch == 3) { - if ((g->special == k2TownsFile1E && input - data == 0x695) || - (g->special == k2TownsFile1J && input - data == 0x598)) + if ((g->lang == EN_ANY && input - data == 0x695) || + (g->lang == JA_JPN && input - data == 0x598)) *output++ = *input; } @@ -480,7 +479,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint ptr += 28; output += 28; - if (g->special == k2TownsFile1E) { // startupCommand + finalCommand + if (g->platform == kPlatformFMTowns) { // startupCommand + finalCommand memcpy(output , ptr, 2); ptr += 2; output += 2; @@ -583,7 +582,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint output += 4; } - if (g->special == k2TownsFile1E) + if (g->platform == kPlatformFMTowns) ptr += 2; } else if (cycle == 0) { @@ -679,7 +678,7 @@ int extractHofSeqData_isSequence(const void *ptr, const Game *g, uint32 maxCheck if (maxCheckSize < 41) return -2; - if (g->special == k2TownsFile1E) { + if (g->platform == kPlatformFMTowns) { if (!(s[37] | s[39]) && s[38] > s[36]) return 1; } else { diff --git a/tools/create_kyradat/games.cpp b/tools/create_kyradat/games.cpp index 35a7e46d2d..52443a80fe 100644 --- a/tools/create_kyradat/games.cpp +++ b/tools/create_kyradat/games.cpp @@ -48,8 +48,8 @@ const Game kyra1Games[] = { { kKyra1, IT_ITA, kPlatformPC, kTalkieVersion, "d0f1752098236083d81b9497bd2b6989" }, // Italian fan translation // FM-TOWNS - { kKyra1, EN_ANY, kPlatformFMTowns, kFMTownsVersionE, "5a3ad60ccd0f2e29463e0368cd14a60d" }, - { kKyra1, JA_JPN, kPlatformFMTowns, kFMTownsVersionJ, "5a3ad60ccd0f2e29463e0368cd14a60d" }, + { kKyra1, EN_ANY, kPlatformFMTowns, -1, "5a3ad60ccd0f2e29463e0368cd14a60d" }, + { kKyra1, JA_JPN, kPlatformFMTowns, -1, "5a3ad60ccd0f2e29463e0368cd14a60d" }, GAME_DUMMY_ENTRY }; @@ -72,19 +72,19 @@ const Game kyra2Games[] = { { kKyra2, IT_ITA, kPlatformPC, k2FloppyFile2, "3a61ed6b7c00ddae383a0361799e2ba6" }, // talkie games - { kKyra2, EN_ANY, kPlatformPC, k2CDFile1E, "85bbc1cc6c4cef6ad31fc6ee79518efb" }, - { kKyra2, FR_FRA, kPlatformPC, k2CDFile1F, "85bbc1cc6c4cef6ad31fc6ee79518efb" }, - { kKyra2, DE_DEU, kPlatformPC, k2CDFile1G, "85bbc1cc6c4cef6ad31fc6ee79518efb" }, - { kKyra2, EN_ANY, kPlatformPC, k2CDFile2E, "e20d0d2e500f01e399ec588247a7e213" }, - { kKyra2, FR_FRA, kPlatformPC, k2CDFile2F, "e20d0d2e500f01e399ec588247a7e213" }, - { kKyra2, DE_DEU, kPlatformPC, k2CDFile2G, "e20d0d2e500f01e399ec588247a7e213" }, - { kKyra2, IT_ITA, kPlatformPC, k2CDFile1I, "130795aa8f2333250c895dae9028b9bb" }, // Italian Fan Translation (using same offsets as English) + { kKyra2, EN_ANY, kPlatformPC, kTalkieFile1, "85bbc1cc6c4cef6ad31fc6ee79518efb" }, + { kKyra2, FR_FRA, kPlatformPC, kTalkieFile1, "85bbc1cc6c4cef6ad31fc6ee79518efb" }, + { kKyra2, DE_DEU, kPlatformPC, kTalkieFile1, "85bbc1cc6c4cef6ad31fc6ee79518efb" }, + { kKyra2, IT_ITA, kPlatformPC, kTalkieFile1, "130795aa8f2333250c895dae9028b9bb" }, // Italian Fan Translation (using same offsets as English) + { kKyra2, EN_ANY, kPlatformPC, kTalkieFile2, "e20d0d2e500f01e399ec588247a7e213" }, + { kKyra2, FR_FRA, kPlatformPC, kTalkieFile2, "e20d0d2e500f01e399ec588247a7e213" }, + { kKyra2, DE_DEU, kPlatformPC, kTalkieFile2, "e20d0d2e500f01e399ec588247a7e213" }, // FM-TOWNS games - { kKyra2, EN_ANY, kPlatformFMTowns, k2TownsFile1E, "74f50d79c919cc8e7196c24942ce43d7" }, - { kKyra2, JA_JPN, kPlatformFMTowns, k2TownsFile1J, "74f50d79c919cc8e7196c24942ce43d7" }, - { kKyra2, EN_ANY, kPlatformFMTowns, k2TownsFile2E, "a9a7fd4f05d00090e9e8bda073e6d431" }, - { kKyra2, JA_JPN, kPlatformFMTowns, k2TownsFile2J, "a9a7fd4f05d00090e9e8bda073e6d431" }, + { kKyra2, EN_ANY, kPlatformFMTowns, kFile1, "74f50d79c919cc8e7196c24942ce43d7" }, + { kKyra2, JA_JPN, kPlatformFMTowns, kFile1, "74f50d79c919cc8e7196c24942ce43d7" }, + { kKyra2, EN_ANY, kPlatformFMTowns, kFile2, "a9a7fd4f05d00090e9e8bda073e6d431" }, + { kKyra2, JA_JPN, kPlatformFMTowns, kFile2, "a9a7fd4f05d00090e9e8bda073e6d431" }, GAME_DUMMY_ENTRY }; @@ -102,8 +102,8 @@ const Game lolGames[] = { { kLol, EN_ANY, kPlatformPC, -1, "6b843869772c1b779e1386be868c15dd" }, // DOS CD - { kLol, EN_ANY, kPlatformPC, kLolCD1, "9d1778314de80598c0b0d032e2a1a1cf" }, - { kLol, EN_ANY, kPlatformPC, kLolCD2, "263998ec600afca1cc7b935c473df670" }, + { kLol, EN_ANY, kPlatformPC, kTalkieFile1, "9d1778314de80598c0b0d032e2a1a1cf" }, + { kLol, EN_ANY, kPlatformPC, kTalkieFile2, "263998ec600afca1cc7b935c473df670" }, GAME_DUMMY_ENTRY }; @@ -764,8 +764,7 @@ const GameNeed gameNeedTable[] = { { kKyra1, kPlatformPC, kTalkieVersion, kyra1CDNeed }, - { kKyra1, kPlatformFMTowns, kFMTownsVersionE , kyra1TownsNeed }, - { kKyra1, kPlatformFMTowns, kFMTownsVersionJ, kyra1TownsNeed }, + { kKyra1, kPlatformFMTowns, -1, kyra1TownsNeed }, { kKyra1, kPlatformPC, kDemoVersion, kyra1DemoNeed }, @@ -774,26 +773,15 @@ const GameNeed gameNeedTable[] = { { kKyra2, kPlatformPC, k2FloppyFile1, kyra2FloppyFile1Need }, { kKyra2, kPlatformPC, k2FloppyFile2, kyra2FloppyFile2Need }, - { kKyra2, kPlatformPC, k2CDFile1E, kyra2CDFile1Need }, - { kKyra2, kPlatformPC, k2CDFile2E, kyra2CDFile2Need }, - - { kKyra2, kPlatformPC, k2CDFile1F, kyra2CDFile1Need }, - { kKyra2, kPlatformPC, k2CDFile2F, kyra2CDFile2Need }, - - { kKyra2, kPlatformPC, k2CDFile1G, kyra2CDFile1Need }, - { kKyra2, kPlatformPC, k2CDFile2G, kyra2CDFile2Need }, - - { kKyra2, kPlatformPC, k2CDFile1I, kyra2CDFile1Need }, // Italian fan translation + { kKyra2, kPlatformPC, kTalkieFile1, kyra2CDFile1Need }, + { kKyra2, kPlatformPC, kTalkieFile2, kyra2CDFile2Need }, { kKyra2, kPlatformPC, k2CDDemoE, kyra2CDDemoNeed }, { kKyra2, kPlatformPC, k2CDDemoF, kyra2CDDemoNeed }, { kKyra2, kPlatformPC, k2CDDemoG, kyra2CDDemoNeed }, - { kKyra2, kPlatformFMTowns, k2TownsFile1E , kyra2TownsFile1Need }, - { kKyra2, kPlatformFMTowns, k2TownsFile2E , kyra2TownsFile2Need }, - - { kKyra2, kPlatformFMTowns, k2TownsFile1J, kyra2TownsFile1Need }, - { kKyra2, kPlatformFMTowns, k2TownsFile2J, kyra2TownsFile2Need }, + { kKyra2, kPlatformFMTowns, kFile1, kyra2TownsFile1Need }, + { kKyra2, kPlatformFMTowns, kFile2, kyra2TownsFile2Need }, { kKyra2, kPlatformPC, k2DemoVersion, kyra2DemoNeed }, @@ -807,8 +795,8 @@ const GameNeed gameNeedTable[] = { { kLol, kPlatformPC, -1, lolFloppyNeed }, - { kLol, kPlatformPC, kLolCD1, lolCDFile1Need }, - { kLol, kPlatformPC, kLolCD2, lolCDFile2Need }, + { kLol, kPlatformPC, kTalkieFile1, lolCDFile1Need }, + { kLol, kPlatformPC, kTalkieFile2, lolCDFile2Need }, { -1, -1, 0 } }; |