'selectsaved' extension

Instead of a menu listing
 a - hero1
 b - hero2
 n - New game
 q - Quit
show
 a - hero1-role1-race1-gend1-algn1
 b - hero2-role2-race2-gend2-algn2
 n - New game
 q - Quit
or
 a - - hero1-role1-race1-gend1-algn1
 b - X hero2-role2-race2-gend2-algn2
 c - D wizard-role3-race3-gend3-algn3
 n - New game
 q - Quit
when any game in the list wasn't saved during normal play.  (Those
are sorted by character name; the playmode is just coincidence.)

The dash for 'normal' doesn't look great but -/X/D are codes used in
entries written to paniclog.  The whole playmode prefix doesn't look
particularly good but I suspect that most players relying on restore
via menu won't see it.

It should work when the character name has dashes in it but that
hasn't been properly tested.

The gender and alignment suffices reflect their value at the time of
save rather than at the start of the game.  That might be considered
a bug but it was easiest.

Increments EDITLEVEL; existing save and bones files are invalidated.
This commit is contained in:
PatR
2024-10-10 23:14:25 -07:00
parent ac3031932f
commit 1f36b98b8f
8 changed files with 110 additions and 76 deletions

View File

@@ -603,8 +603,9 @@ vmscond lib$find_file_end(void **);
/* collect a list of character names from all save files for this player */
int
vms_get_saved_games(const char *savetemplate, /* wildcarded save file name in native VMS format */
char ***outarray)
vms_get_saved_games(
const char *savetemplate, /* wildcarded save name in native VMS format */
char ***outarray)
{
struct dsc in, out;
unsigned short l;