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 /engines | |
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
Diffstat (limited to 'engines')
-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 |
3 files changed, 32 insertions, 1 deletions
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) { |