[Scummvm-cvs-logs] CVS: scummvm/common gameDetector.cpp,1.16,1.17 gameDetector.h,1.5,1.6
Jonathan Gray
khalek at users.sourceforge.net
Fri Oct 18 00:09:04 CEST 2002
Update of /cvsroot/scummvm/scummvm/common
In directory usw-pr-cvs1:/tmp/cvs-serv18961
Modified Files:
gameDetector.cpp gameDetector.h
Log Message:
add -z option to list games
Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/gameDetector.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- gameDetector.cpp 2 Oct 2002 23:28:53 -0000 1.16
+++ gameDetector.cpp 18 Oct 2002 07:08:45 -0000 1.17
@@ -68,6 +68,7 @@
#endif
"\t-x[<num>] - save game slot to load (default: autosave)\n"
"\t-y - set text speed (default: 60)\n"
+ "\t-z - display list of games\n"
;
@@ -165,6 +166,34 @@
_talkSpeed = g_config->getInt("talkspeed", _talkSpeed);
}
+void GameDetector::list_games()
+{
+ const VersionSettings *v = version_settings;
+ char config[4] = "";
+
+ printf("Game SCUMM ver Full Title Config\n"
+ "----------- ----------- ---------------------------------------------- -------\n");
+
+ while (v->filename && v->gamename) {
+ if (g_config->has_domain(v->filename)) {
+ strcpy(config, "Yes");
+ }
+ else {
+ strcpy(config, "");
+ }
+
+ if (v->major != 99)
+ printf("%-12s%d.%d.%d\t%-47s%s\n", v->filename,
+ v->major, v->middle, v->minor, v->gamename, config);
+ else
+ printf("%-12s%-7s\t%-47s%s\n", v->filename, "n/a",
+ v->gamename, config);
+
+ v++;
+ }
+
+}
+
void GameDetector::parseCommandLine(int argc, char **argv)
{
int i;
@@ -288,6 +317,10 @@
_talkSpeed = atoi(option);
g_config->setInt("talkspeed", _talkSpeed);
break;
+ case 'z':
+ CHECK_OPTION();
+ list_games();
+ exit(1);
default:
goto ShowHelpAndExit;
}
Index: gameDetector.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/gameDetector.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- gameDetector.h 30 Sep 2002 00:55:47 -0000 1.5
+++ gameDetector.h 18 Oct 2002 07:08:45 -0000 1.6
@@ -86,6 +86,7 @@
bool parseMusicDriver(const char *s);
void updateconfig();
+ void list_games();
public:
OSystem *createSystem();
More information about the Scummvm-git-logs
mailing list