diff options
author | Marcus Comstedt | 2003-08-03 16:37:00 +0000 |
---|---|---|
committer | Marcus Comstedt | 2003-08-03 16:37:00 +0000 |
commit | 3b5d44ff511f18b22314e980eaa26ea8391cc791 (patch) | |
tree | 1ecbaba120e9c8b9b4597040d39c9c468ec56233 /backends/dc/selector.cpp | |
parent | 6e8fb1701da859a71a327794e233d8d046821933 (diff) | |
download | scummvm-rg350-3b5d44ff511f18b22314e980eaa26ea8391cc791.tar.gz scummvm-rg350-3b5d44ff511f18b22314e980eaa26ea8391cc791.tar.bz2 scummvm-rg350-3b5d44ff511f18b22314e980eaa26ea8391cc791.zip |
Detect Simon.
svn-id: r9436
Diffstat (limited to 'backends/dc/selector.cpp')
-rw-r--r-- | backends/dc/selector.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/backends/dc/selector.cpp b/backends/dc/selector.cpp index 6677bb08b1..13561531b1 100644 --- a/backends/dc/selector.cpp +++ b/backends/dc/selector.cpp @@ -159,8 +159,29 @@ static bool checkName(const char *base, char *text = 0) return false; } +static const char *checkDetect(const char *fname) +{ + GameDetector g; + const VersionSettings *gnl = version_settings; + + do { + if (!scumm_stricmp(fname, gnl->detectname)) + return gnl->filename; + } while ((++gnl)->filename); + return false; +} + static bool isGame(const char *fn, char *base) { + if(!strcasecmp(fn, "00.LFL") || + !strcasecmp(fn, "000.LFL")) { + *base = '\0'; + return true; + } + if(const char *dtct = checkDetect(fn)) { + strcpy(base, dtct); + return true; + } #if 0 int l = strlen(fn); if(l>4 && (!strcasecmp(fn+l-4, ".000") || @@ -182,11 +203,6 @@ static bool isGame(const char *fn, char *base) return true; } #endif - if(!strcasecmp(fn, "00.LFL") || - !strcasecmp(fn, "000.LFL")) { - *base = '\0'; - return true; - } return false; } |