[Scummvm-cvs-logs] SF.net SVN: scummvm:[43737] scummvm/trunk
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Wed Aug 26 00:37:35 CEST 2009
Revision: 43737
http://scummvm.svn.sourceforge.net/scummvm/?rev=43737&view=rev
Author: lordhoto
Date: 2009-08-25 22:37:34 +0000 (Tue, 25 Aug 2009)
Log Message:
-----------
Implement support for the Kyrandia 1 CD demo.
Modified Paths:
--------------
scummvm/trunk/dists/engine-data/kyra.dat
scummvm/trunk/engines/kyra/detection.cpp
scummvm/trunk/engines/kyra/kyra_lok.cpp
scummvm/trunk/engines/kyra/resource.cpp
scummvm/trunk/engines/kyra/seqplayer.cpp
scummvm/trunk/engines/kyra/sequences_lok.cpp
scummvm/trunk/engines/kyra/staticres.cpp
scummvm/trunk/tools/create_kyradat/create_kyradat.cpp
scummvm/trunk/tools/create_kyradat/create_kyradat.h
scummvm/trunk/tools/create_kyradat/eng.h
scummvm/trunk/tools/create_kyradat/misc.h
Modified: scummvm/trunk/dists/engine-data/kyra.dat
===================================================================
(Binary files differ)
Modified: scummvm/trunk/engines/kyra/detection.cpp
===================================================================
--- scummvm/trunk/engines/kyra/detection.cpp 2009-08-25 21:42:12 UTC (rev 43736)
+++ scummvm/trunk/engines/kyra/detection.cpp 2009-08-25 22:37:34 UTC (rev 43737)
@@ -53,6 +53,7 @@
#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 @@
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",
Modified: scummvm/trunk/engines/kyra/kyra_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_lok.cpp 2009-08-25 21:42:12 UTC (rev 43736)
+++ scummvm/trunk/engines/kyra/kyra_lok.cpp 2009-08-25 22:37:34 UTC (rev 43737)
@@ -297,7 +297,7 @@
_abortIntroFlag = false;
- if (_flags.isDemo) {
+ if (_flags.isDemo && !_flags.isTalkie) {
_seqPlayerFlag = true;
seq_demo();
_seqPlayerFlag = false;
@@ -308,7 +308,7 @@
setGameFlag(0xEF);
_seqPlayerFlag = true;
seq_intro();
- if (shouldQuit())
+ if (shouldQuit() || _flags.isDemo)
return Common::kNoError;
if (_skipIntroFlag && _abortIntroFlag)
resetGameFlag(0xEF);
Modified: scummvm/trunk/engines/kyra/resource.cpp
===================================================================
--- scummvm/trunk/engines/kyra/resource.cpp 2009-08-25 21:42:12 UTC (rev 43736)
+++ scummvm/trunk/engines/kyra/resource.cpp 2009-08-25 22:37:34 UTC (rev 43737)
@@ -63,10 +63,10 @@
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",
Modified: scummvm/trunk/engines/kyra/seqplayer.cpp
===================================================================
--- scummvm/trunk/engines/kyra/seqplayer.cpp 2009-08-25 21:42:12 UTC (rev 43736)
+++ scummvm/trunk/engines/kyra/seqplayer.cpp 2009-08-25 22:37:34 UTC (rev 43737)
@@ -432,7 +432,7 @@
}
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 @@
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();
Modified: scummvm/trunk/engines/kyra/sequences_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_lok.cpp 2009-08-25 21:42:12 UTC (rev 43736)
+++ scummvm/trunk/engines/kyra/sequences_lok.cpp 2009-08-25 22:37:34 UTC (rev 43737)
@@ -105,7 +105,7 @@
delete in;
_skipIntroFlag = true;
} else {
- _skipIntroFlag = false;
+ _skipIntroFlag = !_flags.isDemo;
}
_seq->setCopyViewOffs(true);
Modified: scummvm/trunk/engines/kyra/staticres.cpp
===================================================================
--- scummvm/trunk/engines/kyra/staticres.cpp 2009-08-25 21:42:12 UTC (rev 43736)
+++ scummvm/trunk/engines/kyra/staticres.cpp 2009-08-25 22:37:34 UTC (rev 43737)
@@ -44,7 +44,7 @@
namespace Kyra {
-#define RESFILE_VERSION 50
+#define RESFILE_VERSION 51
namespace {
bool checkKyraDat(Common::SeekableReadStream *file) {
@@ -92,6 +92,10 @@
#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 @@
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)
Modified: scummvm/trunk/tools/create_kyradat/create_kyradat.cpp
===================================================================
--- scummvm/trunk/tools/create_kyradat/create_kyradat.cpp 2009-08-25 21:42:12 UTC (rev 43736)
+++ scummvm/trunk/tools/create_kyradat/create_kyradat.cpp 2009-08-25 22:37:34 UTC (rev 43737)
@@ -31,7 +31,7 @@
#include "md5.h"
enum {
- kKyraDatVersion = 50,
+ kKyraDatVersion = 51,
kIndexSize = 12
};
@@ -1234,6 +1234,8 @@
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)
Modified: scummvm/trunk/tools/create_kyradat/create_kyradat.h
===================================================================
--- scummvm/trunk/tools/create_kyradat/create_kyradat.h 2009-08-25 21:42:12 UTC (rev 43736)
+++ scummvm/trunk/tools/create_kyradat/create_kyradat.h 2009-08-25 22:37:34 UTC (rev 43737)
@@ -304,7 +304,10 @@
k2DemoVersionTlkG = 21,
k2DemoLol = 22,
- kLolCD = 23
+ kLolCD = 23,
+
+ // special case for Kyrandia 1 CD demo
+ kDemoCDVersion = 24
};
struct SpecialExtension {
Modified: scummvm/trunk/tools/create_kyradat/eng.h
===================================================================
--- scummvm/trunk/tools/create_kyradat/eng.h 2009-08-25 21:42:12 UTC (rev 43736)
+++ scummvm/trunk/tools/create_kyradat/eng.h 2009-08-25 22:37:34 UTC (rev 43737)
@@ -188,9 +188,25 @@
{ -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
};
Modified: scummvm/trunk/tools/create_kyradat/misc.h
===================================================================
--- scummvm/trunk/tools/create_kyradat/misc.h 2009-08-25 21:42:12 UTC (rev 43736)
+++ scummvm/trunk/tools/create_kyradat/misc.h 2009-08-25 22:37:34 UTC (rev 43737)
@@ -187,6 +187,21 @@
-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 @@
{ kKyra1, kFMTownsVersionJ, kyra1TownsJapNeed },
{ kKyra1, kAmigaVersion, kyra1AmigaNeed },
{ kKyra1, kDemoVersion, kyra1DemoNeed },
+ { kKyra1, kDemoCDVersion, kyra1DemoCDNeed },
{ kKyra2, k2FloppyFile1, kyra2FloppyFile1Need },
{ kKyra2, k2FloppyFile2, kyra2FloppyFile2Need },
@@ -618,6 +634,7 @@
const SpecialExtension specialTable[] = {
{ kTalkieVersion, "CD" },
{ kDemoVersion, "DEM" },
+ { kDemoCDVersion, "CD.DEM" },
{ kFMTownsVersionE , "TNS" },
{ kFMTownsVersionJ, "TNS" },
{ kAmigaVersion, "AMG" },
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list