Mercurial > hg > early-roguelike
diff urogue/main.c @ 268:4ab49e42dd6a
UltraRogue: add logging.
The log file's name is temporarily defined in main.c.
| author | John "Elwin" Edwards | 
|---|---|
| date | Sun, 26 Feb 2017 16:51:29 -0500 | 
| parents | 08057be02f47 | 
| children | a413bc97d3ea | 
line wrap: on
 line diff
--- a/urogue/main.c Sun Feb 26 14:58:49 2017 -0500 +++ b/urogue/main.c Sun Feb 26 16:51:29 2017 -0500 @@ -28,8 +28,10 @@ #define SAVEDIR "." #define SCOREFILE "/var/local/games/roguelike/urogue.scr" +#define LOGFILE "/var/local/games/roguelike/urogue.log" FILE *fd_score = NULL; +FILE *file_log = NULL; /* Command line options */ @@ -107,6 +109,10 @@ if (fd_score == NULL) fd_score = fopen(score_file, "a+"); +#ifdef LOGFILE + file_log = fopen(LOGFILE, "a+"); +#endif + if (!use_savedir) md_normaluser();
