diff options
-rw-r--r-- | engines/glk/alan2/detection.cpp | 19 | ||||
-rw-r--r-- | engines/glk/alan2/detection_tables.h | 29 |
2 files changed, 33 insertions, 15 deletions
diff --git a/engines/glk/alan2/detection.cpp b/engines/glk/alan2/detection.cpp index fab511772b..0b146ada6e 100644 --- a/engines/glk/alan2/detection.cpp +++ b/engines/glk/alan2/detection.cpp @@ -46,24 +46,22 @@ GameDescriptor Alan2MetaEngine::findGame(const char *gameId) { } bool Alan2MetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &gameList) { - const char *const EXTENSIONS[] = { ".acd", ".dat", 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 = filename.hasSuffix(".acd"); if (!hasExt) continue; // Open up the file and calculate the md5 Common::File gameFile; - if (!gameFile.open(*file)) + if (!gameFile.open(*file) || gameFile.readUint32BE() != MKTAG(2, 8, 1, 0)) continue; + + gameFile.seek(0); Common::String md5 = Common::computeStreamMD5AsString(gameFile, 5000); size_t filesize = gameFile.size(); gameFile.close(); @@ -75,15 +73,9 @@ bool Alan2MetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &g DetectedGame gd; if (!p->_gameId) { - if (filename.hasSuffixIgnoreCase(".dat")) - continue; - if (gDebugLevel > 0) { // Print an entry suitable for putting into the detection_tables.h, using the // name of the parent folder the game is in as the presumed game Id - Common::String folderName = file->getParent().getName(); - if (folderName.hasSuffix("\\")) - folderName.deleteLastChar(); Common::String fname = filename; const char *dot = strchr(fname.c_str(), '.'); if (dot) @@ -95,8 +87,7 @@ bool Alan2MetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &g gd = DetectedGame(desc.gameId, desc.description, Common::UNK_LANG, Common::kPlatformUnknown); } else { PlainGameDescriptor gameDesc = findGame(p->_gameId); - gd = DetectedGame(p->_gameId, gameDesc.description, p->_language, Common::kPlatformUnknown, p->_extra); - gd.setGUIOptions(GUIO4(GUIO_NOSPEECH, GUIO_NOSFX, GUIO_NOMUSIC, GUIO_NOSUBTITLES)); + gd = DetectedGame(p->_gameId, gameDesc.description, Common::EN_ANY, Common::kPlatformUnknown); } gd.addExtraEntry("filename", filename); diff --git a/engines/glk/alan2/detection_tables.h b/engines/glk/alan2/detection_tables.h index c6426520d8..277a473eec 100644 --- a/engines/glk/alan2/detection_tables.h +++ b/engines/glk/alan2/detection_tables.h @@ -41,6 +41,20 @@ struct Alan2GameDescription { const PlainGameDescriptor ALAN2_GAME_LIST[] = { { "alan2", "Alan2 Game" }, + { "bugged", "Bugged" }, + { "chasing", "The Chasing" }, + { "closet", "Closet" }, + { "dinnertime", "Dinnertime" }, + { "hebgb", "The HeBGB Horror!" }, + { "lostinnewyork", "Lost In New York" }, + { "mazemapper", "Mazemapper" }, + { "meanstory", "The Mean Story" }, + { "outofthestudy", "Out Of The Study" }, + { "plsghints", "Painless Little Stupid Games Hints" }, + { "sardoria", "Sardoria" }, + { "tgttos", "To Get To The Other Side" }, + { "afteryou", "They're After You" }, + { nullptr, nullptr } }; @@ -48,7 +62,20 @@ const PlainGameDescriptor ALAN2_GAME_LIST[] = { #define TABLE_END_MARKER { nullptr, nullptr, nullptr, 0, Common::EN_ANY } const Alan2GameDescription ALAN2_GAMES[] = { - //ENTRY0("cragne", "082f518c0120d2323ce340bef8a2d5a9", 8869096), + ENTRY0("bugged", "f4eed3db3771a456143744a0e36653db", 112640), + ENTRY0("chasing", "718ffcc9dfe85cfd8c6f50f541a3926e", 147456), + ENTRY0("closet", "5d724469e6240cde0c16c959f50ebc93", 37888), + ENTRY0("dinnertime", "1c0bad19156e8bdefe9e19d99f96f7d8", 9216), + ENTRY0("hebgb", "87f9516bc4217afb5c329cb1ae01d861", 173056), + ENTRY0("lostinnewyork", "483a8c7c84f3bb5af61150fd770806e5", 30720), + ENTRY0("mazemapper", "8e7409758c3535201aeb901923b20064", 30720), + ENTRY0("meanstory", "e4ae6873d6f2ab74fb2ec35b27752397", 13312), + ENTRY0("outofthestudy", "cc4ab3f1b406a8ce04adcfb641c3b250", 110592), + ENTRY0("plsghints", "fb9df41138691a77ea3489986fe8856c", 10240), + ENTRY0("sardoria", "b48ba08ae33b5cb224bcb4ce0eea36bc", 150528), + ENTRY0("tgttos", "0fed94b37b8add48938d8288ca5e7e4f", 29696), + ENTRY0("afteryou", "998ca167b0e9ffb671203b2057d06bef", 17408), + TABLE_END_MARKER }; |