aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra/plugin.cpp')
-rw-r--r--engines/kyra/plugin.cpp31
1 files changed, 30 insertions, 1 deletions
diff --git a/engines/kyra/plugin.cpp b/engines/kyra/plugin.cpp
index 2941adfe5a..4d35f6ced0 100644
--- a/engines/kyra/plugin.cpp
+++ b/engines/kyra/plugin.cpp
@@ -94,13 +94,21 @@ const GameSettings kyra2_games[] = {
{ 0, 0, 0, 0, 0, 0 }
};
+const GameSettings kyra3_games[] = {
+#ifdef ENABLE_KYRA3
+ { "kyra3", "The Legend of Kyrandia: Book Three",
+ GI_KYRA3, GF_LNGUNK, "3833ff312757b8e6147f464cca0a6587", "ONETIME.PAK" },
+#endif
+ { 0, 0, 0, 0, 0, 0 }
+};
+
// Keep list of different supported games
const PlainGameDescriptor kyra_list[] = {
{ "kyra1", "The Legend of Kyrandia" },
#ifdef ENABLE_KYRA2
{ "kyra2", "The Hand of Fate" },
#endif
-#if 0
+#ifdef ENABLE_KYRA3
{ "kyra3", "The Legend of Kyrandia: Book Three" },
#endif
{ 0, 0 }
@@ -198,6 +206,14 @@ DetectedGameList Engine_KYRA_detectGames(const FSList &fslist) {
if (isFound)
break;
+
+ for (g = kyra3_games; g->gameid; g++) {
+ if (scumm_stricmp(file->displayName().c_str(), g->checkFile) == 0)
+ isFound = true;
+ }
+
+ if (isFound)
+ break;
}
if (file == fslist.end())
@@ -229,6 +245,15 @@ DetectedGameList Engine_KYRA_detectGames(const FSList &fslist) {
detectedGames.push_back(dg);
}
}
+
+ for (g = kyra3_games; g->gameid; g++) {
+ if (strcmp(g->md5sum, (char *)md5str) == 0) {
+ DetectedGame dg(*g, convertKyraLang(g->features), convertKyraPlatform(g->features));
+ dg.updateDesc(getKyraVersion(g->features));
+
+ detectedGames.push_back(dg);
+ }
+ }
if (detectedGames.empty()) {
printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str);
@@ -251,6 +276,10 @@ PluginError Engine_KYRA_create(OSystem *syst, Engine **engine) {
*engine = new KyraEngine_v1(syst);
} else if (!scumm_stricmp("kyra2", gameid)) {
*engine = new KyraEngine_v2(syst);
+#ifdef ENABLE_KYRA3
+ } else if (!scumm_stricmp("kyra3", gameid)) {
+ *engine = new KyraEngine_v3(syst);
+#endif
} else
error("Kyra engine created with invalid gameid.");