Mercurial > hg > early-roguelike
diff xrogue/save.c @ 136:1fbdefa82533
xrogue: initial support for the -n option.
The scorefile location is also configurable now.
author | John "Elwin" Edwards |
---|---|
date | Wed, 22 Apr 2015 16:03:00 -0400 |
parents | ce0cf824c192 |
children | 443c8bd3e290 |
line wrap: on
line diff
--- a/xrogue/save.c Tue Apr 21 10:34:01 2015 -0400 +++ b/xrogue/save.c Wed Apr 22 16:03:00 2015 -0400 @@ -151,8 +151,13 @@ if ((inf = open(file, O_RDONLY)) < 0) { + if (use_savedir && errno == ENOENT) + { + /* No game in progress, so one will be started. */ + return TRUE; + } perror(file); - return(-1); + return FALSE; } fflush(stdout); @@ -222,7 +227,7 @@ playit(); /*NOTREACHED*/ - return(1); + return FALSE; } #define ENCWBSIZ 1024