[Scummvm-cvs-logs] CVS: scummvm gameDetector.cpp,1.42,1.43 main.cpp,1.10,1.11

Lionel Ulmer bbrox at users.sourceforge.net
Sun Apr 28 12:41:35 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv8567

Modified Files:
	gameDetector.cpp main.cpp 
Log Message:
Applied Triskelios's patch for Unix-style configuration file (ie
.scummvmrc instead of scummvm.ini)



Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gameDetector.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** gameDetector.cpp	27 Apr 2002 20:48:13 -0000	1.42
--- gameDetector.cpp	27 Apr 2002 21:06:48 -0000	1.43
***************
*** 38,57 ****
  	"\tscummvm [-v] [-d[<num>]] [-n] [-b<num>] [-t<num>] [-s<num>] [-p<path>] [-m<num>] [-f] game\n"
  	"Flags:\n"
! 	"\t-v        - show version info and exit\n"
! 	"\t-c<num>   - use cdrom <num> for cd audio\n"
! 	"\t-d[<num>] - enable debug output (level <num>)\n"
! 	"\t-n        - no subtitles for speech\n"
! 	"\t-b<num>   - start in room <num>\n"
! 	"\t-t<num>   - set music tempo. Suggested: 1F0000\n"
! 	"\t-p<path>  - look for game in <path>\n"
! 	"\t-m<num>   - set music volume to <num> (0-100)\n"
! 	"\t-s<num>   - set sfx volume to <num> (0-255)\n"
! 	"\t-e<mode>  - set music engine. see readme.txt for details\n"
! 	"\t-r        - emulate roland mt32 instruments\n"
! 	"\t-f        - fullscreen mode\n"
! 	"\t-g<mode>  - graphics mode. normal,2x,3x,2xsai,super2xsai,supereagle.advmame2x\n"
! 	"\t-a        - specify game is amiga version\n"
! 	"\t-w[<file>]- write the config file\n"
! 	"\t-l<file>  - load a different config file\n"
  ;
  
--- 38,61 ----
  	"\tscummvm [-v] [-d[<num>]] [-n] [-b<num>] [-t<num>] [-s<num>] [-p<path>] [-m<num>] [-f] game\n"
  	"Flags:\n"
! 	"\t-v         - show version info and exit\n"
! 	"\t-c<num>    - use cdrom <num> for cd audio\n"
! 	"\t-d[<num>]  - enable debug output (debug level [1])\n"
! 	"\t-n         - no subtitles for speech\n"
! 	"\t-b<num>    - start in room <num>\n"
! 	"\t-t<num>    - set music tempo (suggested: 1F0000)\n"
! 	"\t-p<path>   - look for game in <path>\n"
! 	"\t-m<num>    - set music volume to <num> (0-100)\n"
! 	"\t-s<num>    - set sfx volume to <num> (0-255)\n"
! 	"\t-e<mode>   - set music engine (see readme.txt for details)\n"
! 	"\t-r         - emulate roland mt32 instruments\n"
! 	"\t-f         - fullscreen mode\n"
! 	"\t-g<mode>   - graphics mode (normal,2x,3x,2xsai,super2xsai,supereagle.advmame2x)\n"
! 	"\t-a         - specify game is amiga version\n"
! #if defined(UNIX) || defined(UNIX_X11)
! 	"\t-w[<file>] - write to config file [~/.scummvmrc]\n"
! #else
! 	"\t-w[<file>] - write to config file [scummvm.ini]\n"
! #endif
! 	"\t-l<file>   - load config file instead of default\n"
  ;
  

Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/main.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** main.cpp	27 Apr 2002 16:58:29 -0000	1.10
--- main.cpp	27 Apr 2002 21:06:48 -0000	1.11
***************
*** 43,47 ****
--- 43,56 ----
  #endif
  
+ #if defined(UNIX) || defined(UNIX_X11)
+ #include <sys/param.h>
+ #ifndef MAXPATHLEN
+ #define MAXPATHLEN 256
+ #endif
+ #define DEFAULT_CONFIG_FILE ".scummvmrc"
+ #else
  #define DEFAULT_CONFIG_FILE "scummvm.ini"
+ #endif
+ 
  
  int main(int argc, char *argv[])
***************
*** 80,84 ****
--- 89,102 ----
  
  #endif
+ 
+ #if defined(UNIX) || defined(UNIX_X11)
+ 	char scummhome[MAXPATHLEN];
+ 	if(getenv("HOME") != NULL)
+ 		sprintf(scummhome,"%s/%s", getenv("HOME"), DEFAULT_CONFIG_FILE);
+ 	else strcpy(scummhome,DEFAULT_CONFIG_FILE);
+ 	scummcfg = new Config(scummhome, "scummvm");
+ #else
  	scummcfg = new Config(DEFAULT_CONFIG_FILE, "scummvm");
+ #endif
  	scummcfg->set("versioninfo", SCUMMVM_VERSION);
  	if (detector.detectMain(argc, argv))





More information about the Scummvm-git-logs mailing list