Mercurial > hg > early-roguelike
comparison rogue3/main.c @ 30:09da55b986ca
Slightly modify savefile location and prompt
author | edwarj4 |
---|---|
date | Fri, 01 Jan 2010 15:04:30 +0000 |
parents | da77eb183951 |
children | 2dcd75e6a736 |
comparison
equal
deleted
inserted
replaced
29:da77eb183951 | 30:09da55b986ca |
---|---|
68 if (argc >= 3 && !strcmp(argv[1], "-n")) | 68 if (argc >= 3 && !strcmp(argv[1], "-n")) |
69 { | 69 { |
70 strncpy(whoami, argv[2], 79); | 70 strncpy(whoami, argv[2], 79); |
71 whoami[79] = '\0'; | 71 whoami[79] = '\0'; |
72 use_savedir = TRUE; | 72 use_savedir = TRUE; |
73 /* look for savefile at SAVEDIR/UIDplayername.r3sav */ | 73 /* look for savefile at SAVEDIR/UID-playername.r3sav */ |
74 if (snprintf(file_name, 80, "%s%d%.10s.r3sav", SAVEDIR, md_getuid(), whoami) >= 80) | 74 if (snprintf(file_name, 80, "%s%d-%.10s.r3sav", SAVEDIR, md_getuid(), whoami) >= 80) |
75 { | 75 { |
76 /* this shouldn't happen */ | 76 /* this shouldn't happen */ |
77 strcpy(file_name, "rogue3.save"); | 77 strcpy(file_name, "rogue3.save"); |
78 use_savedir = FALSE; | 78 use_savedir = FALSE; |
79 } | 79 } |