diff options
author | Filippos Karapetis | 2009-08-18 12:49:34 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-08-18 12:49:34 +0000 |
commit | 766cdac9f392ceed879a4fe073e93b66e6764092 (patch) | |
tree | 8570e728a9e01432bcb34203bd720787c7ed29de | |
parent | 2b945eabf1acc24d289cc8489216fc007899275c (diff) | |
download | scummvm-rg350-766cdac9f392ceed879a4fe073e93b66e6764092.tar.gz scummvm-rg350-766cdac9f392ceed879a4fe073e93b66e6764092.tar.bz2 scummvm-rg350-766cdac9f392ceed879a4fe073e93b66e6764092.zip |
Mapped some Sierra internal IDs to our own ones, and added a note about a hack currently used in the fallback detector
svn-id: r43509
-rw-r--r-- | engines/sci/detection.cpp | 81 |
1 files changed, 77 insertions, 4 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index c025523ca0..959f18739b 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -3033,6 +3033,76 @@ public: const ADGameDescription *fallbackDetect(const Common::FSList &fslist) const; }; +Common::String convertSierraGameId(Common::String sierraId) { + // TODO: SCI32 IDs + + // TODO: astrochicken + // TODO: The internal id of christmas1998 is "demo" + if (sierraId == "card") + return "christmas1990"; + // TODO: christmas1992 + if (sierraId == "arthur") + return "camelot"; + if (sierraId == "brain") + return "castlebrain"; + // iceman is the same + // longbow is the same + if (sierraId == "eco") + return "ecoquest"; + if (sierraId == "rain") + return "ecoquest2"; + if (sierraId == "fp") + return "freddypharkas"; + if (sierraId == "emc") + return "funseeker"; + if (sierraId == "cardgames") + return "hoyle1"; + if (sierraId == "solitare") + return "hoyle2"; + // TODO: hoyle3 + // TODO: hoyle4 + if (sierraId == "kq1") + return "kq1sci"; + if (sierraId == "kq4") + return "kq4sci"; + if (sierraId == "lsl1") + return "lsl1sci"; + // lsl2 is the same + // lsl3 is the same + // lsl5 is the same + // lsl6 is the same + // TODO: lslcasino + // TODO: fairytales + // TODO: mothergoose + // TODO: msastrochicken + if (sierraId == "cb1") + return "laurabow"; + if (sierraId == "lb2") + return "laurabow2"; + // TODO: lb2 floppy (its resources can't be read) + if (sierraId == "twisty") + return "pepper"; + // TODO: pq1sci (its resources can't be read) + if (sierraId == "pq") + return "pq2"; + // pq3 is the same + if (sierraId == "glory") + return "qfg1"; + // TODO: qfg1 VGA (its resources can't be read) + if (sierraId == "trial") + return "qfg2"; + if (sierraId == "qfg1") + return "qfg3"; + // TODO: slater + if (sierraId == "sq1") + return "sq1sci"; + // sq3 is the same + // sq4 is the same + // sq5 is the same + // TODO: islandbrain + + return sierraId; +} const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fslist) const { bool foundResMap = false; @@ -3049,8 +3119,13 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl filename.toLowercase(); if (filename.contains("resource.map") || filename.contains("resmap.000")) { - // resource.map is located in the same directory as the other resource files, + // HACK: resource.map is located in the same directory as the other resource files, // therefore add the directory here, so that the game files can be opened later on + // TODO/FIXME: This should be removed, as it will cause problems with game detection: + // if we got a game A, and then try to detect another game B, adding a default + // directory here means that game A's files will be opened first. We either need to + // remove the directory added here, or rewrite all the functions which access game + // files Common::File::addDefaultDirectory(file->getParent().getPath()); foundResMap = true; } @@ -3104,9 +3179,7 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl Common::String gameName = obj_get_name(segManager,version, game_obj); debug(2, " \"%s\" at %04x:%04x", gameName.c_str(), PRINT_REG(game_obj)); gameName.toLowercase(); - // TODO: Sierra's game IDs are not always the same as our own ones, we need to map them - // accordingly here - s_fallbackDesc.desc.gameid = strdup(gameName.c_str()); + s_fallbackDesc.desc.gameid = strdup(convertSierraGameId(gameName).c_str()); delete kernel; delete segManager; delete resMgr; |