UltraRogue: add logging.
The log file's name is temporarily defined in main.c.
This commit is contained in:
parent
92d1275f42
commit
8eebfc0c85
3 changed files with 37 additions and 0 deletions
|
|
@ -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 @@ main(int argc, char *argv[])
|
|||
if (fd_score == NULL)
|
||||
fd_score = fopen(score_file, "a+");
|
||||
|
||||
#ifdef LOGFILE
|
||||
file_log = fopen(LOGFILE, "a+");
|
||||
#endif
|
||||
|
||||
if (!use_savedir)
|
||||
md_normaluser();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue