Mercurial > hg > early-roguelike
changeset 127:8ae3ffd6c6e7
arogue7: make the scorefile location configurable.
author | John "Elwin" Edwards |
---|---|
date | Mon, 11 May 2015 13:36:36 -0400 |
parents | b786053d2f37 |
children | c697782a9b37 |
files | arogue7/mach_dep.h arogue7/main.c |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/arogue7/mach_dep.h Fri May 08 16:45:41 2015 -0400 +++ b/arogue7/mach_dep.h Mon May 11 13:36:36 2015 -0400 @@ -41,7 +41,7 @@ * where scorefile should live */ #ifndef SCOREFILE -#define SCOREFILE "/usr/games/lib/rogue_roll" +#define SCOREFILE "arogue7.scr" #endif /*
--- a/arogue7/main.c Fri May 08 16:45:41 2015 -0400 +++ b/arogue7/main.c Mon May 11 13:36:36 2015 -0400 @@ -55,12 +55,17 @@ 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);