aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2007-02-24 09:55:37 +0000
committerTravis Howell2007-02-24 09:55:37 +0000
commit990132687da85e010301c8c989638c41aaa67a79 (patch)
tree3478ebb8292b1a980b3d54684c61b0bd9e2d7879
parent967b034fa59c74d11433d9a72adb5b4731bafcff (diff)
downloadscummvm-rg350-990132687da85e010301c8c989638c41aaa67a79.tar.gz
scummvm-rg350-990132687da85e010301c8c989638c41aaa67a79.tar.bz2
scummvm-rg350-990132687da85e010301c8c989638c41aaa67a79.zip
Add the Hand of Fate demo.
svn-id: r25816
-rw-r--r--engines/kyra/kyra2.cpp37
-rw-r--r--engines/kyra/plugin.cpp7
2 files changed, 31 insertions, 13 deletions
diff --git a/engines/kyra/kyra2.cpp b/engines/kyra/kyra2.cpp
index f0009c0011..11b2e562c7 100644
--- a/engines/kyra/kyra2.cpp
+++ b/engines/kyra/kyra2.cpp
@@ -43,20 +43,28 @@ KyraEngine_v2::~KyraEngine_v2() {
int KyraEngine_v2::init() {
KyraEngine::init();
- _screen->loadFont(Screen::FID_6_FNT, "6.FNT");
- _screen->loadFont(Screen::FID_8_FNT, "8FAT.FNT");
+ if (_res->getFileSize("6.FNT")) {
+ _screen->loadFont(Screen::FID_6_FNT, "6.FNT");
+ }
+ if (_res->getFileSize("8FAT.FNT")) {
+ _screen->loadFont(Screen::FID_8_FNT, "8FAT.FNT");
+ }
_screen->loadFont(Screen::FID_GOLDFONT_FNT, "GOLDFONT.FNT");
_screen->setAnimBlockPtr(3500);
_screen->setScreenDim(0);
- _mouseSHPBuf = _res->fileData("PWGMOUSE.SHP", 0);
- assert(_mouseSHPBuf);
-
assert(_introStringsSize == 21);
for (int i = 0; i < 21; i++) {
_introStringsDuration[i] = strlen(_introStrings[i]) * 8;
}
+ // No mouse display in demo
+ if (_flags.isDemo)
+ return 0;
+
+ _mouseSHPBuf = _res->fileData("PWGMOUSE.SHP", 0);
+ assert(_mouseSHPBuf);
+
for (int i = 0; i < 2; i++) {
_gameShapes[i] = _screen->getPtrToShape(_mouseSHPBuf, i);
assert(_gameShapes[i]);
@@ -67,12 +75,19 @@ int KyraEngine_v2::init() {
}
int KyraEngine_v2::go() {
- // TODO: move this to proper place
- static const char *soundfileList[] = {
- "K2INTRO"
- };
-
- _sound->setSoundFileList(soundfileList, 1);
+ if (_flags.isDemo) {
+ static const char *soundFileList[] = {
+ "K2_DEMO",
+ "LOLSYSEX"
+ };
+ _sound->setSoundFileList(soundFileList, 2);
+ } else {
+ // TODO: move this to proper place
+ static const char *soundFileList[] = {
+ "K2INTRO"
+ };
+ _sound->setSoundFileList(soundFileList, 1);
+ }
_sound->loadSoundFile(0);
// Temporary measure to work around the fact that there's
diff --git a/engines/kyra/plugin.cpp b/engines/kyra/plugin.cpp
index 25b7df4ae4..2505519999 100644
--- a/engines/kyra/plugin.cpp
+++ b/engines/kyra/plugin.cpp
@@ -44,7 +44,8 @@ namespace {
#define KYRA1_CD_FLAGS FLAGS(false, true, true, false, Kyra::GI_KYRA1)
#define KYRA1_DEMO_FLAGS FLAGS(true, false, false, false, Kyra::GI_KYRA1)
-#define KYRA2_UNK_FLAGS FLAGS(false, false, false, false, Kyra::GI_KYRA2)
+#define KYRA2_CD_FLAGS FLAGS(false, false, false, false, Kyra::GI_KYRA2)
+#define KYRA2_DEMO_FLAGS FLAGS(true, false, false, false, Kyra::GI_KYRA2)
#define KYRA3_CD_FLAGS FLAGS(false, false, true, false, Kyra::GI_KYRA3)
@@ -67,7 +68,9 @@ const KYRAGameDescription adGameDescs[] = {
{ { "kyra1", "Demo", AD_ENTRY1("DEMO1.WSA", "fb722947d94897512b13b50cc84fd648"), Common::EN_ANY, Common::kPlatformPC, Common::ADGF_DEMO }, KYRA1_DEMO_FLAGS },
- { { "kyra2", 0, AD_ENTRY1("FATE.PAK", "28cbad1c5bf06b2d3825ae57d760d032"), Common::UNK_LANG, Common::kPlatformPC, Common::ADGF_NO_FLAGS }, KYRA2_UNK_FLAGS }, // check this! (cd version?)
+ { { "kyra2", 0, AD_ENTRY1("FATE.PAK", "28cbad1c5bf06b2d3825ae57d760d032"), Common::UNK_LANG, Common::kPlatformPC, Common::ADGF_NO_FLAGS }, KYRA2_CD_FLAGS }, // CD version
+
+ { { "kyra2", "Demo", AD_ENTRY1("GENERAL.PAK", "35825783e5b60755fd520360079f9c15"), Common::UNK_LANG, Common::kPlatformPC, Common::ADGF_DEMO }, KYRA2_DEMO_FLAGS },
{ { "kyra3", 0, AD_ENTRY1("ONETIME.PAK", "3833ff312757b8e6147f464cca0a6587"), Common::EN_ANY, Common::kPlatformPC, Common::ADGF_NO_FLAGS }, KYRA3_CD_FLAGS },
{ { "kyra3", 0, AD_ENTRY1("ONETIME.PAK", "3833ff312757b8e6147f464cca0a6587"), Common::DE_DEU, Common::kPlatformPC, Common::ADGF_NO_FLAGS }, KYRA3_CD_FLAGS },