[Scummvm-cvs-logs] CVS: scummvm/common util.cpp,1.31,1.32 util.h,1.35,1.36
Max Horn
fingolfin at users.sourceforge.net
Sat Feb 7 08:04:29 CET 2004
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15112
Modified Files:
util.cpp util.h
Log Message:
Added FM-TOWNS to platforms list
Index: util.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/util.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- util.cpp 26 Jan 2004 16:52:19 -0000 1.31
+++ util.cpp 7 Feb 2004 16:00:59 -0000 1.32
@@ -184,16 +184,23 @@
struct PlatformDescription {
const char *code;
+ const char *code2;
const char *description;
Common::Platform id;
};
static const PlatformDescription g_platforms[] = {
- {"pc", "PC", kPlatformPC},
- {"amiga", "Amiga", kPlatformAmiga},
- {"atari", "Atari ST", kPlatformAtariST},
- {"macintosh", "Macintosh", kPlatformMacintosh},
- {0, "Default", kPlatformUnknown}
+ {"pc", "dos", "PC", kPlatformPC},
+ {"amiga", "ami", "Amiga", kPlatformAmiga},
+ {"atari", "atari-st", "Atari ST", kPlatformAtariST},
+ {"macintosh", "mac", "Macintosh", kPlatformMacintosh},
+
+ // The 'official' spelling seems to be "FM-TOWNS" (e.g. in the Indy4 demo).
+ // However, on the net many variations can be seen, like "FMTOWNS",
+ // "FM TOWNS", "FmTowns", etc.
+ {"fmtowns", "towns", "FM-TOWNS", kPlatformFMTowns},
+
+ {0, 0, "Default", kPlatformUnknown}
};
Platform parsePlatform(const String &str) {
@@ -204,16 +211,16 @@
// Handle some special case separately, for compatibility with old config
// files.
- if (!scumm_stricmp(s, "amiga") || !scumm_stricmp(s, "1"))
+ if (!strcmp(s, "1"))
return kPlatformAmiga;
- else if (!scumm_stricmp(s, "atari-st") || !scumm_stricmp(s, "2"))
+ else if (!strcmp(s, "2"))
return kPlatformAtariST;
- else if (!scumm_stricmp(s, "mac") || !scumm_stricmp(s, "3"))
+ else if (!strcmp(s, "3"))
return kPlatformMacintosh;
const PlatformDescription *l = g_platforms;
for (; l->code; ++l) {
- if (!scumm_stricmp(l->code, s))
+ if (!scumm_stricmp(l->code, s) || !scumm_stricmp(l->code2, s))
return l->id;
}
Index: util.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/util.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- util.h 10 Jan 2004 05:20:14 -0000 1.35
+++ util.h 7 Feb 2004 16:01:00 -0000 1.36
@@ -137,11 +137,11 @@
kPlatformPC = 0,
kPlatformAmiga = 1,
kPlatformAtariST = 2,
- kPlatformMacintosh = 3
+ kPlatformMacintosh = 3,
+ kPlatformFMTowns = 4
/*
kPlatformNES,
kPlatformSEGA,
- kPlatformFMTowns,
kPlatformPCEngine
*/
};
More information about the Scummvm-git-logs
mailing list