diff options
author | Johannes Schickel | 2009-09-17 15:59:45 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-09-17 15:59:45 +0000 |
commit | 297a130d5ed37926b3add153dd925b1ce3271a5a (patch) | |
tree | 879d4c32071abf1d077906ff04be72e7bb0b2dab /tools/create_kyradat | |
parent | c38f150d56e40ddc6a8c04aae72f7be8e2914a76 (diff) | |
download | scummvm-rg350-297a130d5ed37926b3add153dd925b1ce3271a5a.tar.gz scummvm-rg350-297a130d5ed37926b3add153dd925b1ce3271a5a.tar.bz2 scummvm-rg350-297a130d5ed37926b3add153dd925b1ce3271a5a.zip |
Further cleanup of special id use.
svn-id: r44162
Diffstat (limited to 'tools/create_kyradat')
-rw-r--r-- | tools/create_kyradat/create_kyradat.cpp | 12 | ||||
-rw-r--r-- | tools/create_kyradat/create_kyradat.h | 14 | ||||
-rw-r--r-- | tools/create_kyradat/extract.cpp | 14 | ||||
-rw-r--r-- | tools/create_kyradat/games.cpp | 42 |
4 files changed, 30 insertions, 52 deletions
diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp index 91e75af3ee..94ea4b004e 100644 --- a/tools/create_kyradat/create_kyradat.cpp +++ b/tools/create_kyradat/create_kyradat.cpp @@ -322,12 +322,7 @@ const SpecialExtension specialTable[] = { { kTalkieFile1, "CD" }, { kTalkieFile2, "CD" }, - { k2CDDemoE, "CD" }, - { k2CDDemoF, "CD" }, - { k2CDDemoG, "CD" }, - - { k2DemoVersion, "DEM" }, - { k2DemoLol, "DEM" }, + { k2CDDemo, "CD" }, { -1, 0 } }; @@ -371,10 +366,9 @@ uint32 getFeatures(const Game *g) { uint32 features = 0; if (g->special == kTalkieVersion || g->special == kTalkieFile1 || g->special == kTalkieFile2 - || g->special == k2CDDemoE || g->special == k2CDDemoF || g->special == k2CDDemoG - || g->game == kKyra3) + || g->special == k2CDDemo || g->game == kKyra3) features |= GF_TALKIE; - else if (g->special == kDemoVersion || g->special == k2DemoVersion || g->special == k2DemoLol) + else if (g->special == kDemoVersion) features |= GF_DEMO; else if (g->special == kDemoCDVersion) features |= (GF_DEMO | GF_TALKIE); diff --git a/tools/create_kyradat/create_kyradat.h b/tools/create_kyradat/create_kyradat.h index edb2e083f7..f15efcb5a4 100644 --- a/tools/create_kyradat/create_kyradat.h +++ b/tools/create_kyradat/create_kyradat.h @@ -285,23 +285,13 @@ enum kSpecial { kTalkieVersion = 0, kDemoVersion, - k2CDDemoE, - k2CDDemoF, - k2CDDemoG, - kFile1, kFile2, kTalkieFile1, kTalkieFile2, - k2FloppyFile1, - k2FloppyFile2, - - k2DemoVersion, - k2DemoVersionTlkE, - k2DemoVersionTlkF, - k2DemoVersionTlkG, - k2DemoLol, + k2DemoVersionTlk, + k2CDDemo, // special case for Kyrandia 1 CD demo kDemoCDVersion diff --git a/tools/create_kyradat/extract.cpp b/tools/create_kyradat/extract.cpp index 78c0c296c7..839365dfc8 100644 --- a/tools/create_kyradat/extract.cpp +++ b/tools/create_kyradat/extract.cpp @@ -172,9 +172,7 @@ bool extractStrings(PAKFile &out, const Game *g, const byte *data, const uint32 fmtPatch = 2; else if (id == k2SeqplayStrings) fmtPatch = 3; - } - - if (g->special == k2FloppyFile2) { + } else if (g->platform == kPlatformPC && g->special == kFile2) { if (id == k2IngamePakFiles) fmtPatch = 4; } @@ -446,7 +444,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint const byte *ptr = data; hdout++; - const byte * endOffs = (const byte *)(data + size); + const byte *endOffs = (const byte *)(data + size); // detect sequence structs while (ptr < endOffs) { @@ -459,7 +457,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint int v = extractHofSeqData_isSequence(ptr, g, endOffs - ptr); if (cycle == 0 && v == 1) { - if ((g->special == k2FloppyFile1 && *ptr == 5) || (g->special == k2DemoVersion && (ptr - data == 312))) { + if ((g->platform == kPlatformPC && g->special == kFile1 && *ptr == 5) || (g->special == kDemoVersion && (ptr - data == 312))) { // patch for floppy version: skips invalid ferb sequence // patch for demo: skips invalid title sequence ptr += 54; @@ -516,7 +514,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint ctrSize = (uint16)(ptr - ctrStart); - if (g->special != k2DemoVersion && + if (g->special != kDemoVersion && extractHofSeqData_isControl(ctrStart, ctrSize)) { controlOffs = (uint16) (output - buffer); *output++ = ctrSize >> 2; @@ -567,11 +565,11 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint controlOffs = 0; WRITE_BE_UINT16(output, controlOffs); - if (g->special != k2DemoVersion && g->special != k2DemoLol) + if (g->special != kDemoVersion) ptr += 4; output += 2; - if (g->special != k2DemoVersion && g->special != k2DemoLol) { + if (g->special != kDemoVersion) { for (int w = 0; w < 2; w++) { //startupCommand, finalCommand WRITE_BE_UINT16(output, READ_LE_UINT16(ptr)); ptr += 2; diff --git a/tools/create_kyradat/games.cpp b/tools/create_kyradat/games.cpp index 3c0aa5f31e..317efcf052 100644 --- a/tools/create_kyradat/games.cpp +++ b/tools/create_kyradat/games.cpp @@ -56,20 +56,20 @@ const Game kyra1Games[] = { const Game kyra2Games[] = { // demos - { kKyra2, EN_ANY, kPlatformPC, k2DemoVersion, "a620a37579dd44ab0403482285e3897f" }, - { kKyra2, EN_ANY, kPlatformPC, k2CDDemoE, "fa54d8abfe05f9186c05f7de7eaf1480" }, - { kKyra2, FR_FRA, kPlatformPC, k2CDDemoF, "fa54d8abfe05f9186c05f7de7eaf1480" }, - { kKyra2, DE_DEU, kPlatformPC, k2CDDemoG, "fa54d8abfe05f9186c05f7de7eaf1480" }, + { kKyra2, EN_ANY, kPlatformPC, kDemoVersion, "a620a37579dd44ab0403482285e3897f" }, + { kKyra2, EN_ANY, kPlatformPC, k2CDDemo, "fa54d8abfe05f9186c05f7de7eaf1480" }, + { kKyra2, FR_FRA, kPlatformPC, k2CDDemo, "fa54d8abfe05f9186c05f7de7eaf1480" }, + { kKyra2, DE_DEU, kPlatformPC, k2CDDemo, "fa54d8abfe05f9186c05f7de7eaf1480" }, // floppy games - { kKyra2, EN_ANY, kPlatformPC, k2FloppyFile1, "9b0f5e57b5a2ed88b5b989cbb402b6c7" }, - { kKyra2, FR_FRA, kPlatformPC, k2FloppyFile1, "df31cc9e37e1cf68df2fdc75ddf2d87b" }, - { kKyra2, DE_DEU, kPlatformPC, k2FloppyFile1, "0ca4f9a1438264a4c63c3218e064ed3b" }, - { kKyra2, IT_ITA, kPlatformPC, k2FloppyFile1, "178d3ab913f61bfba21d2fb196405e8c" }, - { kKyra2, EN_ANY, kPlatformPC, k2FloppyFile2, "7c3eadbe5122722cf2e5e1611e19dfb9" }, - { kKyra2, FR_FRA, kPlatformPC, k2FloppyFile2, "fc2c6782778e6c6d5a553d1cb73c98ad" }, - { kKyra2, DE_DEU, kPlatformPC, k2FloppyFile2, "0d9b0eb7b0ad889ec942d74d80dde1bf" }, - { kKyra2, IT_ITA, kPlatformPC, k2FloppyFile2, "3a61ed6b7c00ddae383a0361799e2ba6" }, + { kKyra2, EN_ANY, kPlatformPC, kFile1, "9b0f5e57b5a2ed88b5b989cbb402b6c7" }, + { kKyra2, FR_FRA, kPlatformPC, kFile1, "df31cc9e37e1cf68df2fdc75ddf2d87b" }, + { kKyra2, DE_DEU, kPlatformPC, kFile1, "0ca4f9a1438264a4c63c3218e064ed3b" }, + { kKyra2, IT_ITA, kPlatformPC, kFile1, "178d3ab913f61bfba21d2fb196405e8c" }, + { kKyra2, EN_ANY, kPlatformPC, kFile2, "7c3eadbe5122722cf2e5e1611e19dfb9" }, + { kKyra2, FR_FRA, kPlatformPC, kFile2, "fc2c6782778e6c6d5a553d1cb73c98ad" }, + { kKyra2, DE_DEU, kPlatformPC, kFile2, "0d9b0eb7b0ad889ec942d74d80dde1bf" }, + { kKyra2, IT_ITA, kPlatformPC, kFile2, "3a61ed6b7c00ddae383a0361799e2ba6" }, // talkie games { kKyra2, EN_ANY, kPlatformPC, kTalkieFile1, "85bbc1cc6c4cef6ad31fc6ee79518efb" }, @@ -98,7 +98,7 @@ const Game kyra3Games[] = { const Game lolGames[] = { // DOS demo - { kLol, EN_ANY, kPlatformPC, k2DemoLol, "30bb5af87d38adb47d3e6ce06b1cb042" }, + { kLol, EN_ANY, kPlatformPC, kDemoVersion, "30bb5af87d38adb47d3e6ce06b1cb042" }, // DOS floppy (no language specifc strings) { kLol, DE_DEU, kPlatformPC, -1, "6b843869772c1b779e1386be868c15dd" }, @@ -772,26 +772,22 @@ const GameNeed gameNeedTable[] = { { kKyra1, kPlatformPC, kDemoCDVersion, kyra1DemoCDNeed }, - { kKyra2, kPlatformPC, k2FloppyFile1, kyra2FloppyFile1Need }, - { kKyra2, kPlatformPC, k2FloppyFile2, kyra2FloppyFile2Need }, + { kKyra2, kPlatformPC, kFile1, kyra2FloppyFile1Need }, + { kKyra2, kPlatformPC, kFile2, kyra2FloppyFile2Need }, { kKyra2, kPlatformPC, kTalkieFile1, kyra2CDFile1Need }, { kKyra2, kPlatformPC, kTalkieFile2, kyra2CDFile2Need }, - { kKyra2, kPlatformPC, k2CDDemoE, kyra2CDDemoNeed }, - { kKyra2, kPlatformPC, k2CDDemoF, kyra2CDDemoNeed }, - { kKyra2, kPlatformPC, k2CDDemoG, kyra2CDDemoNeed }, + { kKyra2, kPlatformPC, k2CDDemo, kyra2CDDemoNeed }, { kKyra2, kPlatformFMTowns, kFile1, kyra2TownsFile1Need }, { kKyra2, kPlatformFMTowns, kFile2, kyra2TownsFile2Need }, - { kKyra2, kPlatformPC, k2DemoVersion, kyra2DemoNeed }, + { kKyra2, kPlatformPC, kDemoVersion, kyra2DemoNeed }, - { kKyra2, kPlatformPC, k2DemoVersionTlkE, kyra2TlkDemoNeed }, - { kKyra2, kPlatformPC, k2DemoVersionTlkF, kyra2TlkDemoNeed }, - { kKyra2, kPlatformPC, k2DemoVersionTlkG, kyra2TlkDemoNeed }, + { kKyra2, kPlatformPC, k2DemoVersionTlk, kyra2TlkDemoNeed }, - { kLol, kPlatformPC, k2DemoLol, lolDemoNeed }, + { kLol, kPlatformPC, kDemoVersion, lolDemoNeed }, { kKyra3, kPlatformPC, -1, kyra3Need }, |