arogue7: make the scorefile location configurable.

This commit is contained in:
John "Elwin" Edwards 2015-05-11 13:36:36 -04:00
parent 3095366864
commit 7da765d616
2 changed files with 6 additions and 1 deletions

View file

@ -41,7 +41,7 @@
* where scorefile should live
*/
#ifndef SCOREFILE
#define SCOREFILE "/usr/games/lib/rogue_roll"
#define SCOREFILE "arogue7.scr"
#endif
/*

View file

@ -55,12 +55,17 @@ char **envp;
strcat(file_name, "arogue77.sav");
/* Get default score file */
#ifdef SCOREFILE
strncpy(score_file, SCOREFILE, LINELEN);
score_file[LINELEN-1] = '\0';
#else
strcpy(score_file, md_getroguedir());
if (*score_file)
strcat(score_file,"/");
strcat(score_file,"arogue77.scr");
#endif
if ((env = getenv("ROGUEOPTS")) != NULL)
parse_opts(env);