aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/tads/detection.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2018-11-27 21:02:49 -0800
committerPaul Gilbert2018-12-08 19:05:59 -0800
commit09b682cb63fed029f43133f4a2d9daa3438ac8e2 (patch)
tree60da8622fda66f8477c463a4b99d0ffe54fb72d0 /engines/glk/tads/detection.cpp
parent0b7a29c7973025d32d8952e97cdc4d13a2794c36 (diff)
downloadscummvm-rg350-09b682cb63fed029f43133f4a2d9daa3438ac8e2.tar.gz
scummvm-rg350-09b682cb63fed029f43133f4a2d9daa3438ac8e2.tar.bz2
scummvm-rg350-09b682cb63fed029f43133f4a2d9daa3438ac8e2.zip
GLK: TADS: Skeletons for TADS 2 & 3 subengines, extra detection logic
Diffstat (limited to 'engines/glk/tads/detection.cpp')
-rw-r--r--engines/glk/tads/detection.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/engines/glk/tads/detection.cpp b/engines/glk/tads/detection.cpp
index ef2caa2edc..6627b8f53b 100644
--- a/engines/glk/tads/detection.cpp
+++ b/engines/glk/tads/detection.cpp
@@ -30,17 +30,18 @@ namespace Glk {
namespace TADS {
void TADSMetaEngine::getSupportedGames(PlainGameList &games) {
- for (const PlainGameDescriptor *pd = TADS_GAME_LIST; pd->gameId; ++pd)
+ for (const TADSDescriptor *pd = TADS_GAME_LIST; pd->gameId; ++pd) {
games.push_back(*pd);
+ }
}
-PlainGameDescriptor TADSMetaEngine::findGame(const char *gameId) {
- for (const PlainGameDescriptor *pd = TADS_GAME_LIST; pd->gameId; ++pd) {
+TADSDescriptor TADSMetaEngine::findGame(const char *gameId) {
+ for (const TADSDescriptor *pd = TADS_GAME_LIST; pd->gameId; ++pd) {
if (!strcmp(gameId, pd->gameId))
return *pd;
}
- return PlainGameDescriptor();;
+ return TADSDescriptor();;
}
bool TADSMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &gameList) {
@@ -49,8 +50,8 @@ bool TADSMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &ga
// Loop through the files of the folder
for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
- if (file->isDirectory() || !(file->getName().hasSuffixIgnoreCase(".saga")
- || file->getName().hasSuffixIgnoreCase(".dat")))
+ if (file->isDirectory() || !(file->getName().hasSuffixIgnoreCase(".gam")
+ || file->getName().hasSuffixIgnoreCase(".t3")))
continue;
if (gameFile.open(*file)) {
@@ -63,7 +64,7 @@ bool TADSMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &ga
if (p->_filesize) {
// Found a match
- PlainGameDescriptor gameDesc = findGame(p->_gameId);
+ TADSDescriptor gameDesc = findGame(p->_gameId);
DetectedGame gd(p->_gameId, gameDesc.description, Common::EN_ANY, Common::kPlatformUnknown);
gd.addExtraEntry("filename", file->getName());