KYRA: add support for another Russian HOF fan translation

This commit is contained in:
athrxx 2011-12-25 15:14:20 +01:00
parent 6786c41f4f
commit 0e2b8413e5
8 changed files with 37 additions and 3 deletions

View File

@ -45,7 +45,7 @@
#include <map>
enum {
kKyraDatVersion = 79
kKyraDatVersion = 80
};
const ExtractFilename extractFilenames[] = {

View File

@ -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;

View File

@ -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" } },

View File

@ -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
};

Binary file not shown.

View File

@ -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",

View File

@ -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'))

View File

@ -38,7 +38,7 @@
namespace Kyra {
#define RESFILE_VERSION 79
#define RESFILE_VERSION 80
namespace {
bool checkKyraDat(Common::SeekableReadStream *file) {