Add -n option and system savedir functionality

This commit is contained in:
John "Elwin" Edwards 2009-10-14 01:32:13 +00:00
parent 4662bbf65b
commit 265ac56d38
5 changed files with 65 additions and 22 deletions

View file

@ -143,8 +143,17 @@ restore(char *file, char **envp)
if ((inf = fopen(file, "r")) == NULL)
{
perror(file);
return FALSE;
if (use_savedir && errno == ENOENT)
{
/* We're using the system savefile and it doesn't exist.
* This isn't a fatal error, we'll just start a new game. */
return TRUE;
}
else
{
perror(file);
return FALSE;
}
}
fflush(stdout);