Simplified SCI versions to be SCI version generations, and fixed some game entries in the process. Also, added a sanity check for invalid game entries

svn-id: r40596
This commit is contained in:
Filippos Karapetis 2009-05-15 09:04:21 +00:00
parent adaa0472c5
commit 565cfa074d
16 changed files with 588 additions and 403 deletions

View file

@ -339,15 +339,16 @@ bool getSciVersionFromString(Common::String versionString, int *version, Common:
char *endptr[3];
const char *ver = mappedVersion.c_str();
int major = strtol(ver, &endptr[0], 10);
int minor = strtol(ver + 2, &endptr[1], 10);
int patchlevel = strtol(ver + 6, &endptr[2], 10);
//int minor = strtol(ver + 2, &endptr[1], 10);
//int patchlevel = strtol(ver + 6, &endptr[2], 10);
if (endptr[0] != ver + 1 || endptr[1] != ver + 5 || *endptr[2] != '\0') {
warning("Failed to parse version string '%s'", ver);
return true;
}
*version = SCI_VERSION(major, minor, patchlevel);
//printf("Detected version: %s, parsed version: %s\n", versionString, ver);
*version = major;
return false;
}