diff options
-rw-r--r-- | dists/engine-data/kyra.dat | bin | 257836 -> 263839 bytes | |||
-rw-r--r-- | engines/kyra/detection.cpp | 14 | ||||
-rw-r--r-- | engines/kyra/kyra_lok.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/resource.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/seqplayer.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/sequences_lok.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/staticres.cpp | 12 | ||||
-rw-r--r-- | tools/create_kyradat/create_kyradat.cpp | 4 | ||||
-rw-r--r-- | tools/create_kyradat/create_kyradat.h | 5 | ||||
-rw-r--r-- | tools/create_kyradat/eng.h | 16 | ||||
-rw-r--r-- | tools/create_kyradat/misc.h | 17 |
11 files changed, 73 insertions, 11 deletions
diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat Binary files differindex eb3ff24c2a..2242d4e385 100644 --- a/dists/engine-data/kyra.dat +++ b/dists/engine-data/kyra.dat diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp index 3199a043e7..11043f1e3f 100644 --- a/engines/kyra/detection.cpp +++ b/engines/kyra/detection.cpp @@ -53,6 +53,7 @@ namespace { #define KYRA1_TOWNS_SJIS_FLAGS FLAGS(false, true, false, true, false, false, false, Kyra::GI_KYRA1) #define KYRA1_CD_FLAGS FLAGS(false, true, true, false, false, false, false, Kyra::GI_KYRA1) #define KYRA1_DEMO_FLAGS FLAGS(true, false, false, false, false, false, false, Kyra::GI_KYRA1) +#define KYRA1_DEMO_CD_FLAGS FLAGS(true, true, true, false, false, false, false, Kyra::GI_KYRA1) #define KYRA2_FLOPPY_FLAGS FLAGS(false, false, false, false, false, false, false, Kyra::GI_KYRA2) #define KYRA2_FLOPPY_CMP_FLAGS FLAGS(false, false, false, false, false, false, true, Kyra::GI_KYRA2) @@ -394,6 +395,19 @@ const KYRAGameDescription adGameDescs[] = { KYRA1_DEMO_FLAGS }, + { // Special Kyrandia 1 CD demo + { + "kyra1", + "Demo/CD", + AD_ENTRY1("INTRO.VRM", "e3045fb69b8c29db84b8fda3ccbdac54"), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DEMO | ADGF_CD, + Common::GUIO_NONE + }, + KYRA1_DEMO_CD_FLAGS + }, + { // Floppy version { "kyra2", diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp index fc19b2fb65..46c189470c 100644 --- a/engines/kyra/kyra_lok.cpp +++ b/engines/kyra/kyra_lok.cpp @@ -297,7 +297,7 @@ Common::Error KyraEngine_LoK::go() { _abortIntroFlag = false; - if (_flags.isDemo) { + if (_flags.isDemo && !_flags.isTalkie) { _seqPlayerFlag = true; seq_demo(); _seqPlayerFlag = false; @@ -308,7 +308,7 @@ Common::Error KyraEngine_LoK::go() { setGameFlag(0xEF); _seqPlayerFlag = true; seq_intro(); - if (shouldQuit()) + if (shouldQuit() || _flags.isDemo) return Common::kNoError; if (_skipIntroFlag && _abortIntroFlag) resetGameFlag(0xEF); diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index bd8b62533f..112db7afdf 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -63,10 +63,10 @@ bool Resource::reset() { if (_vm->game() == GI_KYRA1) { // We only need kyra.dat for the demo. - if (_vm->gameFlags().isDemo) + if (_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie) return true; - if (_vm->gameFlags().isTalkie) { + if (!_vm->gameFlags().isDemo && _vm->gameFlags().isTalkie) { // List of files in the talkie version, which can never be unload. static const char * const list[] = { "ADL.PAK", "CHAPTER1.VRM", "COL.PAK", "FINALE.PAK", "INTRO1.PAK", "INTRO2.PAK", diff --git a/engines/kyra/seqplayer.cpp b/engines/kyra/seqplayer.cpp index 4086d06c00..3536d2db06 100644 --- a/engines/kyra/seqplayer.cpp +++ b/engines/kyra/seqplayer.cpp @@ -432,7 +432,7 @@ void SeqPlayer::s1_playTrack() { } void SeqPlayer::s1_allocTempBuffer() { - if (_vm->gameFlags().isDemo) { + if (_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie) { _seqQuitFlag = true; } else { if (!_specialBuffer && !_copyViewOffs) { @@ -637,10 +637,10 @@ bool SeqPlayer::playSequence(const uint8 *seqData, bool skipSeq) { uint8 seqCode = *_seqData++; if (seqCode < numCommands) { SeqProc currentProc = commands[seqCode].proc; - debugC(5, kDebugLevelSequence, "seqCode = %d (%s)", seqCode, commands[seqCode].desc); + debugC(5, kDebugLevelSequence, "0x%.4X seqCode = %d (%s)", (uint16)(_seqData - 1 - seqData), seqCode, commands[seqCode].desc); (this->*currentProc)(); } else { - error("Invalid sequence opcode %d", seqCode); + error("Invalid sequence opcode %d called from 0x%.04X", seqCode, (uint16)(_seqData - 1 - seqData)); } _screen->updateScreen(); diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp index 16c9b75f3a..9f149fdd87 100644 --- a/engines/kyra/sequences_lok.cpp +++ b/engines/kyra/sequences_lok.cpp @@ -105,7 +105,7 @@ void KyraEngine_LoK::seq_intro() { delete in; _skipIntroFlag = true; } else { - _skipIntroFlag = false; + _skipIntroFlag = !_flags.isDemo; } _seq->setCopyViewOffs(true); diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index be73df47f7..95f7c4ca2a 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -44,7 +44,7 @@ namespace Kyra { -#define RESFILE_VERSION 50 +#define RESFILE_VERSION 51 namespace { bool checkKyraDat(Common::SeekableReadStream *file) { @@ -92,6 +92,10 @@ enum { #define LANGUAGE_FLAGS (GF_ENGLISH | GF_FRENCH | GF_GERMAN | GF_SPANISH | GF_ITALIAN | GF_JAPANESE | GF_LNGUNK) uint32 createFeatures(const GameFlags &flags) { + // special case for kyrandia 1 CD demo + if (flags.gameID == GI_KYRA1 && flags.isTalkie && flags.isDemo) + return GF_TALKIE | GF_DEMO; + if (flags.isTalkie) return GF_TALKIE; if (flags.isDemo) @@ -1319,6 +1323,12 @@ const char *StaticResource::getFilename(const char *name) { else if (_vm->gameFlags().gameID == GI_LOL) filename += ".LOL"; + // Special case for Kyrandia 1 CD demo + if (_vm->gameFlags().gameID == GI_KYRA1 && _vm->gameFlags().isTalkie && _vm->gameFlags().isDemo) { + filename += ".CD.DEM"; + return filename.c_str(); + } + if (_vm->gameFlags().isTalkie && _vm->gameFlags().gameID != GI_KYRA3) filename += ".CD"; else if (_vm->gameFlags().isDemo) diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp index 7f43a81ec9..43e17c80e0 100644 --- a/tools/create_kyradat/create_kyradat.cpp +++ b/tools/create_kyradat/create_kyradat.cpp @@ -31,7 +31,7 @@ #include "md5.h" enum { - kKyraDatVersion = 50, + kKyraDatVersion = 51, kIndexSize = 12 }; @@ -1234,6 +1234,8 @@ uint32 getFeatures(const Game *g) { features |= GF_TALKIE; else if (g->special == kDemoVersion || g->special == k2DemoVersion || g->special == k2DemoLol) features |= GF_DEMO; + else if (g->special == kDemoCDVersion) + features |= (GF_DEMO | GF_TALKIE); else if (g->special == kFMTownsVersionE || g->special == kFMTownsVersionJ || g->special == k2TownsFile1E || g->special == k2TownsFile1J || g->special == k2TownsFile2E || g->special == k2TownsFile2J) diff --git a/tools/create_kyradat/create_kyradat.h b/tools/create_kyradat/create_kyradat.h index cc1f990a39..2a6e0a37c3 100644 --- a/tools/create_kyradat/create_kyradat.h +++ b/tools/create_kyradat/create_kyradat.h @@ -304,7 +304,10 @@ enum kSpecial { k2DemoVersionTlkG = 21, k2DemoLol = 22, - kLolCD = 23 + kLolCD = 23, + + // special case for Kyrandia 1 CD demo + kDemoCDVersion = 24 }; struct SpecialExtension { diff --git a/tools/create_kyradat/eng.h b/tools/create_kyradat/eng.h index 7ed9e06189..f83979195a 100644 --- a/tools/create_kyradat/eng.h +++ b/tools/create_kyradat/eng.h @@ -188,9 +188,25 @@ const ExtractEntry kyra1EngDemo[] = { { -1, 0, 0 } }; +const ExtractEntry kyra1EngDemoCD[] = { + { kKallakWritingSeq, 0x0002FF3F, 0x00030744 }, + { kMalcolmTreeSeq, 0x00030744, 0x00030974 }, + { kWestwoodLogoSeq, 0x00030974, 0x000309BF }, + { kKyrandiaLogoSeq, 0x000309BF, 0x00030A65 }, + { kKallakMalcolmSeq, 0x00030A65, 0x00030D1D }, + { kForestSeq, 0x00030D1D, 0x00030F90 }, + { kIntroCPSStrings, 0x00030F90, 0x00030FA5 }, + { kIntroWSAStrings, 0x00030FA5, 0x00031025 }, + { kIntroCOLStrings, 0x00031025, 0x00031050 }, + { kIntroStrings, 0x00031050, 0x00031546 }, + { kAudioTracksIntro, 0x0002FD4A, 0x0002FD5C }, + { -1, 0, 0 } +}; + const Game kyra1EngGames[] = { { kKyra1, EN_ANY, -1, "76a4fc84e173cadb6369785787e1546e", kyra1EngFloppy }, { kKyra1, EN_ANY, kTalkieVersion, "1ebc18f3e7fbb72474a55cb0fa089ed4", kyra1EngCD }, { kKyra1, EN_ANY, kDemoVersion, "7b7504c8560ffc914d34c44c71b3094c", kyra1EngDemo }, + { kKyra1, EN_ANY, kDemoCDVersion, "226fdba99cb11ef1047131d9a50e6292", kyra1EngDemoCD }, GAME_DUMMY_ENTRY }; diff --git a/tools/create_kyradat/misc.h b/tools/create_kyradat/misc.h index c4cd03bf5e..2a14dab611 100644 --- a/tools/create_kyradat/misc.h +++ b/tools/create_kyradat/misc.h @@ -187,6 +187,21 @@ const int kyra1DemoNeed[] = { -1 }; +const int kyra1DemoCDNeed[] = { + kKallakWritingSeq, + kMalcolmTreeSeq, + kWestwoodLogoSeq, + kKyrandiaLogoSeq, + kKallakMalcolmSeq, + kForestSeq, + kIntroCPSStrings, + kIntroCOLStrings, + kIntroWSAStrings, + kIntroStrings, + kAudioTracksIntro, + -1 +}; + const int kyra1TownsEngNeed[] = { kKallakWritingSeq, kMalcolmTreeSeq, @@ -587,6 +602,7 @@ const GameNeed gameNeedTable[] = { { kKyra1, kFMTownsVersionJ, kyra1TownsJapNeed }, { kKyra1, kAmigaVersion, kyra1AmigaNeed }, { kKyra1, kDemoVersion, kyra1DemoNeed }, + { kKyra1, kDemoCDVersion, kyra1DemoCDNeed }, { kKyra2, k2FloppyFile1, kyra2FloppyFile1Need }, { kKyra2, k2FloppyFile2, kyra2FloppyFile2Need }, @@ -618,6 +634,7 @@ const GameNeed gameNeedTable[] = { const SpecialExtension specialTable[] = { { kTalkieVersion, "CD" }, { kDemoVersion, "DEM" }, + { kDemoCDVersion, "CD.DEM" }, { kFMTownsVersionE , "TNS" }, { kFMTownsVersionJ, "TNS" }, { kAmigaVersion, "AMG" }, |