diff options
Diffstat (limited to 'tools/create_kyradat')
-rw-r--r-- | tools/create_kyradat/create_kyradat.cpp | 23 | ||||
-rw-r--r-- | tools/create_kyradat/create_kyradat.h | 37 | ||||
-rw-r--r-- | tools/create_kyradat/hof_cd.h | 11 | ||||
-rw-r--r-- | tools/create_kyradat/hof_demo.h | 5 | ||||
-rw-r--r-- | tools/create_kyradat/lol_demo.h | 15 | ||||
-rw-r--r-- | tools/create_kyradat/misc.h | 23 |
6 files changed, 89 insertions, 25 deletions
diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp index 173ba0f993..78de2b6bce 100644 --- a/tools/create_kyradat/create_kyradat.cpp +++ b/tools/create_kyradat/create_kyradat.cpp @@ -31,7 +31,7 @@ #include "md5.h" enum { - kKyraDatVersion = 28, + kKyraDatVersion = 31, kIndexSize = 12 }; @@ -53,6 +53,8 @@ enum { #include "malcolm.h" +#include "lol_demo.h" + const Game kyra1FanTranslations[] = { { kKyra1, IT_ITA, kTalkieVersion, "d0f1752098236083d81b9497bd2b6989", kyra1FreCD }, GAME_DUMMY_ENTRY @@ -251,6 +253,11 @@ const ExtractFilename extractFilenames[] = { { k3ItemMagicTable, k3TypeRaw16to8, "ITEMMAGIC.MAP" }, { k3ItemStringMap, kTypeRawData, "ITEMSTRINGS.MAP" }, + // LANDS OF LORE + + // Demo Sequence Player + { lSeqplayIntroTracks, k2TypeSoundList, "S_INTRO.TRA" }, + { -1, 0, 0 } }; @@ -288,7 +295,7 @@ bool getFilename(char *dstFilename, const Game *g, const int id) { void createFilename(char *dstFilename, const int gid, const int lang, const int special, const char *filename) { strcpy(dstFilename, filename); - static const char *gidExtensions[] = { "", ".K2", ".K3" }; + static const char *gidExtensions[] = { "", ".K2", ".K3", 0, ".LOL" }; strcat(dstFilename, gidExtensions[gid]); for (const SpecialExtension *specialE = specialTable; specialE->special != -1; ++specialE) { @@ -311,7 +318,7 @@ void createLangFilename(char *dstFilename, const int gid, const int lang, const } } - static const char *gidExtensions[] = { "", ".K2", ".K3" }; + static const char *gidExtensions[] = { "", ".K2", ".K3", 0, ".LOL" }; strcat(dstFilename, gidExtensions[gid]); for (const SpecialExtension *specialE = specialTable; specialE->special != -1; ++specialE) { @@ -723,11 +730,11 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint controlOffs = 0; WRITE_BE_UINT16(output, controlOffs); - if (g->special != k2DemoVersion) + if (g->special != k2DemoVersion && g->special != k2DemoLol) ptr += 4; output += 2; - if (g->special != k2DemoVersion) { + if (g->special != k2DemoVersion && g->special != k2DemoLol) { for (int w = 0; w < 2; w++) { //startupCommand, finalCommand WRITE_BE_UINT16(output, READ_LE_UINT16(ptr)); ptr += 2; @@ -1063,9 +1070,9 @@ enum { uint32 getFeatures(const Game *g) { uint32 features = 0; - if (g->special == kTalkieVersion || g->special == k2CDFile1E || g->special == k2CDFile1F || g->special == k2CDFile1G || g->special == k2CDFile2E || g->special == k2CDFile2F || g->special == k2CDFile2G || g->game == kKyra3) + 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 || g->game == kKyra3) features |= GF_TALKIE; - else if (g->special == kDemoVersion || g->special == k2DemoVersion) + else if (g->special == kDemoVersion || g->special == k2DemoVersion || g->special == k2DemoLol) features |= GF_DEMO; else if (g->special == kFMTownsVersionE || g->special == kFMTownsVersionJ || g->special == k2TownsFile1E || g->special == k2TownsFile1J || @@ -1344,6 +1351,8 @@ const Game *gameDescs[] = { kyra3Games, + lolDemos, + 0 }; diff --git a/tools/create_kyradat/create_kyradat.h b/tools/create_kyradat/create_kyradat.h index c8bcb7d583..8e985f9031 100644 --- a/tools/create_kyradat/create_kyradat.h +++ b/tools/create_kyradat/create_kyradat.h @@ -174,6 +174,8 @@ enum kExtractID { k3ItemMagicTable, k3ItemStringMap, + lSeqplayIntroTracks, + kMaxResIDs }; @@ -202,20 +204,22 @@ enum kSpecial { k2CDFile2E = 8, k2CDFile2F = 9, k2CDFile2G = 10, - - k2TownsFile1E = 11, - k2TownsFile1J = 12, - k2TownsFile2E = 13, - k2TownsFile2J = 14, - - k2FloppyFile1 = 15, - k2FloppyFile2 = 16, - - k2DemoVersion = 17, - - k2DemoVersionTlkE = 18, - k2DemoVersionTlkF = 19, - k2DemoVersionTlkG = 20 + // Italian fan translation + k2CDFile1I = 11, + + k2TownsFile1E = 12, + k2TownsFile1J = 13, + k2TownsFile2E = 14, + k2TownsFile2J = 15, + + k2FloppyFile1 = 16, + k2FloppyFile2 = 17, + + k2DemoVersion = 18, + k2DemoVersionTlkE = 19, + k2DemoVersionTlkF = 20, + k2DemoVersionTlkG = 21, + k2DemoLol = 22 }; struct SpecialExtension { @@ -225,8 +229,9 @@ struct SpecialExtension { enum kGame { kKyra1 = 0, - kKyra2, - kKyra3 + kKyra2 = 1, + kKyra3 = 2, + kLol = 4 }; struct Game { diff --git a/tools/create_kyradat/hof_cd.h b/tools/create_kyradat/hof_cd.h index 1393f74890..431adbb674 100644 --- a/tools/create_kyradat/hof_cd.h +++ b/tools/create_kyradat/hof_cd.h @@ -23,6 +23,12 @@ const ExtractEntry kyra2File1CDG[] = { { -1, 0, 0 } }; +const ExtractEntry kyra2File1CDI[] = { + { k2SeqplayStrings, 0x0002C566, 0x0002CE7C }, + { k2SeqplayTlkFiles, 0x0002A2AC, 0x0002A349 }, + { -1, 0, 0 } +}; + const ExtractEntry kyra2File2CDE[] = { { k2IngameSfxFiles, 0x0002CB30, 0x0002D221 }, { k2IngameSfxIndex, 0x000294F0, 0x00029848 }, @@ -47,5 +53,10 @@ const Game kyra2TalkieGames[] = { { kKyra2, EN_ANY, k2CDFile2E, "e20d0d2e500f01e399ec588247a7e213", kyra2File2CDE}, { kKyra2, FR_FRA, k2CDFile2F, "e20d0d2e500f01e399ec588247a7e213", kyra2File2CDF}, { kKyra2, DE_DEU, k2CDFile2G, "e20d0d2e500f01e399ec588247a7e213", kyra2File2CDG}, + + // Italian Fan Translation (using same offsets as English) + { kKyra2, IT_ITA, k2CDFile1I, "130795aa8f2333250c895dae9028b9bb", kyra2File1CDI}, + GAME_DUMMY_ENTRY }; + diff --git a/tools/create_kyradat/hof_demo.h b/tools/create_kyradat/hof_demo.h index f7b15ffa3d..2eaaa3c413 100644 --- a/tools/create_kyradat/hof_demo.h +++ b/tools/create_kyradat/hof_demo.h @@ -26,7 +26,8 @@ const Game kyra2Demos[] = { { kKyra2, EN_ANY, k2DemoVersion, "a620a37579dd44ab0403482285e3897f", kyra2Demo}, { kKyra2, EN_ANY, k2CDFile2E, "fa54d8abfe05f9186c05f7de7eaf1480", kyra2DemoCDE}, { kKyra2, FR_FRA, k2CDFile2F, "fa54d8abfe05f9186c05f7de7eaf1480", kyra2DemoCDF}, - { kKyra2, DE_DEU, k2CDFile2G, "fa54d8abfe05f9186c05f7de7eaf1480", kyra2DemoCDG}, - + { kKyra2, DE_DEU, k2CDFile2G, "fa54d8abfe05f9186c05f7de7eaf1480", kyra2DemoCDG}, GAME_DUMMY_ENTRY }; + + diff --git a/tools/create_kyradat/lol_demo.h b/tools/create_kyradat/lol_demo.h new file mode 100644 index 0000000000..ce114f4e73 --- /dev/null +++ b/tools/create_kyradat/lol_demo.h @@ -0,0 +1,15 @@ +const ExtractEntry lolDemo[] = { + { k2SeqplayPakFiles, 0x0001AC10, 0x0001AC1C }, + { k2SeqplayStrings, 0x0001B5EE, 0x0001B6F0 }, + { k2SeqplaySfxFiles, 0x0001B6F0, 0x0001B7B5 }, + { k2SeqplaySeqData, 0x0001B320, 0x0001B56C }, + { lSeqplayIntroTracks, 0x0001B7B5, 0x0001B7CF }, + { -1, 0, 0 } +}; + +const Game lolDemos[] = { + { kLol, EN_ANY, k2DemoLol, "30bb5af87d38adb47d3e6ce06b1cb042", lolDemo}, + GAME_DUMMY_ENTRY +}; + + diff --git a/tools/create_kyradat/misc.h b/tools/create_kyradat/misc.h index 1e1cd29cc9..f0de5283ad 100644 --- a/tools/create_kyradat/misc.h +++ b/tools/create_kyradat/misc.h @@ -363,6 +363,7 @@ const int kyra2CDFile1EngNeed[] = { k2SeqplayCreditsSpecial, k2SeqplayStrings, k2SeqplaySfxFiles, + k2SeqplayTlkFiles, k2SeqplaySeqData, k2SeqplayIntroTracks, k2SeqplayFinaleTracks, @@ -371,11 +372,19 @@ const int kyra2CDFile1EngNeed[] = { const int kyra2CDFile1FreNeed[] = { k2SeqplayStrings, + k2SeqplayTlkFiles, -1 }; const int kyra2CDFile1GerNeed[] = { k2SeqplayStrings, + k2SeqplayTlkFiles, + -1 +}; + +const int kyra2CDFile1ItaNeed[] = { + k2SeqplayStrings, + k2SeqplayTlkFiles, -1 }; @@ -472,6 +481,15 @@ const int kyra3Need[] = { -1 }; +const int lolDemoNeed[] = { + k2SeqplayPakFiles, + k2SeqplayStrings, + k2SeqplaySeqData, + k2SeqplaySfxFiles, + lSeqplayIntroTracks, + -1 +}; + const GameNeed gameNeedTable[] = { { kKyra1, -1, kyra1FloppyNeed }, { kKyra1, kTalkieVersion, kyra1CDNeed }, @@ -485,6 +503,7 @@ const GameNeed gameNeedTable[] = { { kKyra2, k2CDFile1E, kyra2CDFile1EngNeed }, { kKyra2, k2CDFile1F, kyra2CDFile1FreNeed }, { kKyra2, k2CDFile1G, kyra2CDFile1GerNeed }, + { kKyra2, k2CDFile1I, kyra2CDFile1ItaNeed }, // Italian fan translation { kKyra2, k2CDFile2E, kyra2CDFile2EngNeed }, { kKyra2, k2CDFile2F, kyra2CDFile2FreNeed }, { kKyra2, k2CDFile2G, kyra2CDFile2GerNeed }, @@ -496,6 +515,7 @@ const GameNeed gameNeedTable[] = { { kKyra2, k2DemoVersionTlkE, kyra2TlkDemoNeed}, { kKyra2, k2DemoVersionTlkF, kyra2TlkDemoNeed}, { kKyra2, k2DemoVersionTlkG, kyra2TlkDemoNeed}, + { kLol, k2DemoLol, lolDemoNeed}, { kKyra3, -1, kyra3Need }, @@ -512,14 +532,17 @@ const SpecialExtension specialTable[] = { { k2CDFile1E, "CD" }, { k2CDFile1F, "CD" }, { k2CDFile1G, "CD" }, + { k2CDFile1I, "CD" }, { k2CDFile2E, "CD" }, { k2CDFile2F, "CD" }, { k2CDFile2G, "CD" }, + { k2TownsFile1E, "TNS" }, { k2TownsFile1J, "TNS" }, { k2TownsFile2E, "TNS" }, { k2TownsFile2J, "TNS" }, { k2DemoVersion, "DEM" }, + { k2DemoLol, "DEM" }, { -1, 0 } }; |