diff options
author | athrxx | 2011-12-25 15:14:20 +0100 |
---|---|---|
committer | athrxx | 2011-12-28 00:01:33 +0100 |
commit | 0e2b8413e55eb9fa2839d89d7ff3e8270b8b8c29 (patch) | |
tree | 99449c02aa42e6172b0cb44e6c870154c0c8b9c5 | |
parent | 6786c41f4fd56d588e61f329b6d81f580e9b040f (diff) | |
download | scummvm-rg350-0e2b8413e55eb9fa2839d89d7ff3e8270b8b8c29.tar.gz scummvm-rg350-0e2b8413e55eb9fa2839d89d7ff3e8270b8b8c29.tar.bz2 scummvm-rg350-0e2b8413e55eb9fa2839d89d7ff3e8270b8b8c29.zip |
KYRA: add support for another Russian HOF fan translation
-rw-r--r-- | devtools/create_kyradat/create_kyradat.cpp | 2 | ||||
-rw-r--r-- | devtools/create_kyradat/extract.cpp | 2 | ||||
-rw-r--r-- | devtools/create_kyradat/games.cpp | 1 | ||||
-rw-r--r-- | devtools/create_kyradat/tables.cpp | 2 | ||||
-rw-r--r-- | dists/engine-data/kyra.dat | bin | 465809 -> 468443 bytes | |||
-rw-r--r-- | engines/kyra/detection_tables.h | 14 | ||||
-rw-r--r-- | engines/kyra/script.h | 17 | ||||
-rw-r--r-- | engines/kyra/staticres.cpp | 2 |
8 files changed, 37 insertions, 3 deletions
diff --git a/devtools/create_kyradat/create_kyradat.cpp b/devtools/create_kyradat/create_kyradat.cpp index 13f9711d5c..0b7d4af783 100644 --- a/devtools/create_kyradat/create_kyradat.cpp +++ b/devtools/create_kyradat/create_kyradat.cpp @@ -45,7 +45,7 @@ #include <map> enum { - kKyraDatVersion = 79 + kKyraDatVersion = 80 }; const ExtractFilename extractFilenames[] = { diff --git a/devtools/create_kyradat/extract.cpp b/devtools/create_kyradat/extract.cpp index 420b661384..3c19cf0d62 100644 --- a/devtools/create_kyradat/extract.cpp +++ b/devtools/create_kyradat/extract.cpp @@ -178,7 +178,7 @@ bool extractStrings(PAKFile &out, const ExtractInformation *info, const byte *da if (id == k2IngamePakFiles) patch = 4; - if (info->lang == Common::RU_RUS) { + if (info->lang == Common::RU_RUS && info->special == kNoSpecial) { patch = 5; if (id == k2SeqplayStrings) { rusFanSkipId = rusFanSkip_k2SeqplayStrings; diff --git a/devtools/create_kyradat/games.cpp b/devtools/create_kyradat/games.cpp index 74f85177b4..e0e6f011fa 100644 --- a/devtools/create_kyradat/games.cpp +++ b/devtools/create_kyradat/games.cpp @@ -77,6 +77,7 @@ const Game kyra2Games[] = { // talkie games { kKyra2, { EN_ANY, FR_FRA, DE_DEU }, kPlatformPC, kTalkieVersion, { "85bbc1cc6c4cef6ad31fc6ee79518efb", "e20d0d2e500f01e399ec588247a7e213" } }, { kKyra2, { IT_ITA, FR_FRA, DE_DEU }, kPlatformPC, kTalkieVersion, { "130795aa8f2333250c895dae9028b9bb", "e20d0d2e500f01e399ec588247a7e213" } }, // Italian Fan Translation + { kKyra2, { RU_RUS, FR_FRA, DE_DEU }, kPlatformPC, kTalkieVersion, { "c3afd22959f515355b2a33cde950f418", "e20d0d2e500f01e399ec588247a7e213" } }, // Russian Fan Translation // FM-TOWNS games { kKyra2, { EN_ANY, JA_JPN, -1 }, kPlatformFMTowns, kNoSpecial, { "74f50d79c919cc8e7196c24942ce43d7", "a9a7fd4f05d00090e9e8bda073e6d431" } }, diff --git a/devtools/create_kyradat/tables.cpp b/devtools/create_kyradat/tables.cpp index 3ff10c2a26..e3f658a893 100644 --- a/devtools/create_kyradat/tables.cpp +++ b/devtools/create_kyradat/tables.cpp @@ -1113,6 +1113,7 @@ const ExtractEntrySearchData k2SeqplayStringsProvider[] = { { IT_ITA, kPlatformPC, { 0x00000916, 0x0003188F, { { 0xDC, 0x46, 0x06, 0xE1, 0xB0, 0x66, 0xBC, 0x18, 0x2E, 0x6E, 0x9E, 0xC9, 0xA4, 0x14, 0x8D, 0x08 } } } }, // floppy { IT_ITA, kPlatformPC, { 0x000008C8, 0x00030947, { { 0x7F, 0x75, 0x5F, 0x99, 0x94, 0xFE, 0xA1, 0xE6, 0xEF, 0xB8, 0x93, 0x71, 0x83, 0x1B, 0xAC, 0x4A } } } }, // (fan) CD + { RU_RUS, kPlatformPC, { 0x00000916, 0x00032C49, { { 0xEA, 0x5C, 0xE5, 0x06, 0x05, 0x5F, 0x36, 0xE8, 0x31, 0x3E, 0xBF, 0x74, 0x73, 0xFB, 0xAB, 0xFF } } } }, // (fan) CD - intro and outro strings haven't been translated in this fan translation { RU_RUS, kPlatformPC, { 0x000008C8, 0x00028639, { { 0xF9, 0x1D, 0x6A, 0x85, 0x23, 0x5E, 0x2A, 0x64, 0xBC, 0x45, 0xB2, 0x48, 0x13, 0x49, 0xD4, 0xF7 } } } }, // (fan) floppy { EN_ANY, kPlatformFMTowns, { 0x00000990, 0x00030C61, { { 0x60, 0x51, 0x11, 0x83, 0x3F, 0x06, 0xC3, 0xA3, 0xE0, 0xC0, 0x2F, 0x41, 0x29, 0xDE, 0x65, 0xB1 } } } }, @@ -1142,6 +1143,7 @@ const ExtractEntrySearchData k2SeqplayTlkFilesProvider[] = { { FR_FRA, kPlatformPC, { 0x0000009D, 0x00002878, { { 0x28, 0x5D, 0x7F, 0x5B, 0x57, 0xC2, 0xFF, 0x73, 0xC1, 0x8E, 0xD6, 0xE0, 0x4D, 0x03, 0x99, 0x2C } } } }, { DE_DEU, kPlatformPC, { 0x0000009D, 0x00002885, { { 0x87, 0x24, 0xB6, 0xE9, 0xD6, 0xAA, 0x68, 0x2D, 0x6B, 0x05, 0xDF, 0xE1, 0x2B, 0xA4, 0x79, 0xE5 } } } }, { IT_ITA, kPlatformPC, { 0x0000009D, 0x0000286B, { { 0x58, 0x30, 0x72, 0x62, 0xC8, 0x77, 0x2A, 0x06, 0xD6, 0x24, 0x1A, 0x7A, 0xAF, 0x79, 0xFF, 0xAE } } } }, + { RU_RUS, kPlatformPC, { 0x0000009D, 0x0000286B, { { 0x58, 0x30, 0x72, 0x62, 0xC8, 0x77, 0x2A, 0x06, 0xD6, 0x24, 0x1A, 0x7A, 0xAF, 0x79, 0xFF, 0xAE } } } }, EXTRACT_END_ENTRY }; diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat Binary files differindex 56c7184756..7fd8be0641 100644 --- a/dists/engine-data/kyra.dat +++ b/dists/engine-data/kyra.dat diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h index 31d7d6e0f3..2b3708528c 100644 --- a/engines/kyra/detection_tables.h +++ b/engines/kyra/detection_tables.h @@ -645,6 +645,20 @@ const KYRAGameDescription adGameDescs[] = { KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY) }, + // Russian fan translation + { // CD version + { + "kyra2", + "CD", + AD_ENTRY1("FERRY.CPS", "763e2103858347d4ffffc329910d323f"), + Common::RU_RUS, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK) + }, + KYRA2_CD_FAN_FLAGS(Common::RU_RUS, Common::EN_ANY) + }, + { // Interactive Demo { "kyra2", diff --git a/engines/kyra/script.h b/engines/kyra/script.h index 858b2b11b8..dffb4e27f5 100644 --- a/engines/kyra/script.h +++ b/engines/kyra/script.h @@ -81,6 +81,23 @@ public: // Both lead to some problems in our IFF parser, either reading after the end // of file or producing a "Chunk overread" error message. To work around this // we need to adjust the size field properly. + + // Fix for certain Russian fan translations: + // Westwood's original code completely ignores the FORM chunk and its size + // setting. After opening a TIM or EMC file they just check whether the FORM + // chunk exists (as a kind of file type verification) and then immediately seek + // behind the FORM chunk. + // This means that their parser is immune to weird fan translation scripts + // where the file size doesn't match the form chunk size. In our implemetation + // this would produce "Chunk overread" errors. + // Westwood also always pads all chunk sizes to 2 byte alignment after reading + // them from the file (not with FORM though, since they completely ignore it). + // This seems to do the trick for our FORM chunk size issue with the Russian + // fan translations. Another method which I have tried and which seems to work + // well would be simply setting _formChunk.size to the file size (-12 for TIM). + + _formChunk.size = (_formChunk.size + 1) & ~1; + if (_formType == MKTAG('E','M','C','2')) _formChunk.size -= 8; else if (_formType == MKTAG('A','V','F','S')) diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index e2a86d7194..6c95451c5f 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -38,7 +38,7 @@ namespace Kyra { -#define RESFILE_VERSION 79 +#define RESFILE_VERSION 80 namespace { bool checkKyraDat(Common::SeekableReadStream *file) { |