Slightly modify savefile location and prompt

This commit is contained in:
John "Elwin" Edwards 2010-01-01 15:04:30 +00:00
parent 6188fd3be2
commit b24bc2e606
4 changed files with 13 additions and 7 deletions

View file

@ -77,9 +77,9 @@ char **envp;
strncpy(whoami, argv[2], MAXSTR - 1);
whoami[MAXSTR - 1] = '\0'; /* insurance */
use_savedir = TRUE;
/* look for savefile at SAVEDIR/UIDplayername.r4sav */
if (snprintf(file_name, MAXSTR, "%s%d%.10s.r4sav", SAVEDIR, md_getuid(),
whoami) >= MAXSTR)
/* look for savefile at SAVEDIR/UID-playername.r4sav */
if (snprintf(file_name, MAXSTR, "%s%d-%.10s.r4sav", SAVEDIR,
md_getuid(), whoami) >= MAXSTR)
{
/* Name is too long- this shouldn't happen */
strcpy(file_name, "rogue4.save");

View file

@ -48,7 +48,10 @@ over:
{
for (;;)
{
msg("save file (%s)? ", file_name);
if (use_savedir)
msg("Save game? ");
else
msg("save file (%s)? ", file_name);
c = getchar();
mpos = 0;
if (c == ESCAPE)