aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/glk/adrift/detection.cpp12
-rw-r--r--engines/glk/adrift/detection_tables.h26
-rw-r--r--engines/glk/blorb.cpp1
-rw-r--r--engines/glk/blorb.h1
4 files changed, 35 insertions, 5 deletions
diff --git a/engines/glk/adrift/detection.cpp b/engines/glk/adrift/detection.cpp
index fc76a0817f..fc41ac0787 100644
--- a/engines/glk/adrift/detection.cpp
+++ b/engines/glk/adrift/detection.cpp
@@ -22,6 +22,7 @@
#include "glk/adrift/detection.h"
#include "glk/adrift/detection_tables.h"
+#include "glk/blorb.h"
#include "common/debug.h"
#include "common/file.h"
#include "common/md5.h"
@@ -46,17 +47,13 @@ GameDescriptor AdriftMetaEngine::findGame(const char *gameId) {
}
bool AdriftMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &gameList) {
- const char *const EXTENSIONS[] = { ".taf", nullptr };
-
// Loop through the files of the folder
for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
// Check for a recognised filename
if (file->isDirectory())
continue;
Common::String filename = file->getName();
- bool hasExt = false;
- for (const char *const *ext = &EXTENSIONS[0]; *ext && !hasExt; ++ext)
- hasExt = filename.hasSuffixIgnoreCase(*ext);
+ bool hasExt = Blorb::hasBlorbExt(filename) || filename.hasSuffixIgnoreCase(".taf");
if (!hasExt)
continue;
@@ -67,8 +64,13 @@ bool AdriftMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &
Common::String md5 = Common::computeStreamMD5AsString(gameFile, 5000);
size_t filesize = gameFile.size();
+ gameFile.seek(0);
+ bool isBlorb = Blorb::isBlorb(gameFile, ID_ADRI);
gameFile.close();
+ if (!isBlorb && Blorb::hasBlorbExt(filename))
+ continue;
+
// Check for known games
const AdriftGameDescription *p = ADRIFT_GAMES;
while (p->_gameId && (md5 != p->_md5 || filesize != p->_filesize))
diff --git a/engines/glk/adrift/detection_tables.h b/engines/glk/adrift/detection_tables.h
index bbb98de427..0df9388a01 100644
--- a/engines/glk/adrift/detection_tables.h
+++ b/engines/glk/adrift/detection_tables.h
@@ -41,6 +41,7 @@ struct AdriftGameDescription {
const PlainGameDescriptor ADRIFT_GAME_LIST[] = {
{ "Adrift", "Adrift IF Game" },
+ // English Games
{ "3monkeys", "Three Monkeys, One Cage" },
{ "akron", "Akron" },
{ "albridgemanor", "Albridge Manor" },
@@ -151,10 +152,23 @@ const PlainGameDescriptor ADRIFT_GAME_LIST[] = {
{ "yadfa", "Yet Another Damn Fantasy Adventure" },
{ "yonastoundingcastle", "Yon Astounding Castle! of some sort" },
+ // English Blorb Games
+ { "advbackyard", "An Adventurer's Backyard" },
+ { "allthroughthenight", "All Through the Night" },
+ { "darkhour", "The Dark Hour" },
+ { "jacarandajim", "Jacaranda Jim" },
+ { "jacd", "Just Another Christmas Day" },
+ { "noblecrook1", "Noble Crook, episode 1" },
+ { "noblecrook2", "Noble Crook, episode 2" },
+ { "noblecrook3", "Noble Crook, episode 3" },
+ { "noblecrook4", "Noble Crook, episode 4" },
+ { "sonofcamelot", "Son of Camelot" },
+
{ nullptr, nullptr }
};
const AdriftGameDescription ADRIFT_GAMES[] = {
+ // English Games
DT_ENTRY0("3monkeys", "dec34c282511b1eadfe231dbbb49f625", 79286),
DT_ENTRY0("akron", "2461ceeef3ef1eac15a2051a549b4402", 22258),
DT_ENTRY0("albridgemanor", "268003e454c4ade042d593af8397a490", 31353),
@@ -266,6 +280,18 @@ const AdriftGameDescription ADRIFT_GAMES[] = {
DT_ENTRY0("yadfa", "5ee5906fc4b889d126cdfd83bd883a43", 77880),
DT_ENTRY0("yonastoundingcastle", "baf2c0423903a3104f67d3a19bde43df", 2320881),
+ // English Blorb Games
+ DT_ENTRY0("advbackyard", "73b1171283ffa2b3cf6fb72a0ec31a35", 48990),
+ DT_ENTRY0("allthroughthenight", "89dcb84d74f70945780ed9e719401301", 36345976),
+ DT_ENTRY0("darkhour", "75bc2ac4d561ad2a2143bd90a19d1b46", 35184),
+ DT_ENTRY0("jacarandajim", "78e0de68825eea88995d7490adb6c062", 79146),
+ DT_ENTRY0("jacd", "28ae6ee45f1d2980765d3e9645f0b269", 54256),
+ DT_ENTRY0("noblecrook1", "334c706261ab79b783403ad3315980fd", 23966),
+ DT_ENTRY0("noblecrook2", "9d460ed691ad1b45d5d7c19f1ebf61d9", 22446),
+ DT_ENTRY0("noblecrook3", "c9d4a1ba7d5c1625f2d4cad0f067275a", 22088),
+ DT_ENTRY0("noblecrook4", "cb26241f8dba982bb0cd357ebd8fac45", 20606),
+ DT_ENTRY0("sonofcamelot", "7b3e9e45edc75202b3f586d0ca8dddde", 474380),
+
DT_END_MARKER
};
diff --git a/engines/glk/blorb.cpp b/engines/glk/blorb.cpp
index 36360c3842..4678c1d75c 100644
--- a/engines/glk/blorb.cpp
+++ b/engines/glk/blorb.cpp
@@ -143,6 +143,7 @@ Common::ErrorCode Blorb::load() {
} else if (ce._type == ID_Exec) {
if (
+ (_interpType == INTERPRETER_ADRIFT && ce._id == ID_ADRI) ||
(_interpType == INTERPRETER_FROTZ && ce._id == ID_ZCOD) ||
(_interpType == INTERPRETER_GLULXE && ce._id == ID_GLUL) ||
(_interpType == INTERPRETER_TADS2 && ce._id == ID_TAD2) ||
diff --git a/engines/glk/blorb.h b/engines/glk/blorb.h
index 6076428449..cfb5897d61 100644
--- a/engines/glk/blorb.h
+++ b/engines/glk/blorb.h
@@ -57,6 +57,7 @@ enum {
ID_AUTH = MKTAG('A', 'U', 'T', 'H'),
ID_ANNO = MKTAG('A', 'N', 'N', 'O'),
+ ID_ADRI = MKTAG('A', 'D', 'R', 'I'),
ID_ZCOD = MKTAG('Z', 'C', 'O', 'D'),
ID_GLUL = MKTAG('G', 'L', 'U', 'L'),
ID_TAD2 = MKTAG('T', 'A', 'D', '2'),