comparison arogue7/main.c @ 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
comparison
equal deleted inserted replaced
126:b786053d2f37 127:8ae3ffd6c6e7
53 /* Get default save file */ 53 /* Get default save file */
54 strcpy(file_name, home); 54 strcpy(file_name, home);
55 strcat(file_name, "arogue77.sav"); 55 strcat(file_name, "arogue77.sav");
56 56
57 /* Get default score file */ 57 /* Get default score file */
58 #ifdef SCOREFILE
59 strncpy(score_file, SCOREFILE, LINELEN);
60 score_file[LINELEN-1] = '\0';
61 #else
58 strcpy(score_file, md_getroguedir()); 62 strcpy(score_file, md_getroguedir());
59 63
60 if (*score_file) 64 if (*score_file)
61 strcat(score_file,"/"); 65 strcat(score_file,"/");
62 66
63 strcat(score_file,"arogue77.scr"); 67 strcat(score_file,"arogue77.scr");
68 #endif
64 69
65 if ((env = getenv("ROGUEOPTS")) != NULL) 70 if ((env = getenv("ROGUEOPTS")) != NULL)
66 parse_opts(env); 71 parse_opts(env);
67 72
68 if (whoami[0] == '\0') 73 if (whoami[0] == '\0')