From 7da765d616087b1347cc9240973e4697ffa1a062 Mon Sep 17 00:00:00 2001 From: "John \"Elwin\" Edwards" Date: Mon, 11 May 2015 13:36:36 -0400 Subject: [PATCH] arogue7: make the scorefile location configurable. --- arogue7/mach_dep.h | 2 +- arogue7/main.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arogue7/mach_dep.h b/arogue7/mach_dep.h index a83fa09..c599113 100644 --- a/arogue7/mach_dep.h +++ b/arogue7/mach_dep.h @@ -41,7 +41,7 @@ * where scorefile should live */ #ifndef SCOREFILE -#define SCOREFILE "/usr/games/lib/rogue_roll" +#define SCOREFILE "arogue7.scr" #endif /* diff --git a/arogue7/main.c b/arogue7/main.c index 00cd576..39e037c 100644 --- a/arogue7/main.c +++ b/arogue7/main.c @@ -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);