selectsaved option (trunk only)
- always write plname into save file, no longer conditional
- add 'selectsaved' wincap option to control the display of
a menu of save files for ports/platforms that support it.
- add support for win32 tty using normal nethack menus.
- the win/tty/wintty code is generalized enough that any
tty port could support the option if the appropriate port-specific
code hooks for wildcard file lookups are added to src/file.c
specifically in the get_saved_games() routine. There is posix
code in there from Warwick already, and there is findfirst/findnext
code in there from win32. Warwick has the posix code only
enabled for Qt at present, but with wintty support, that could be expanded
to other Unix environments quite easily I would think.
Here is what the tty support looks like:
NetHack, Copyright 1985-2005
By Stichting Mathematisch Centrum and M. Stephenson.
See license for details.
Select one of your saved games
a - Bob
b - Fred
c - June
d - mine3
e - Sirius
f - Start a new character
(end)
The following files existed in the NetHack SAVEDIR directory
at the time:
ALLISONMI-Bob.NetHack-saved-game
ALLISONMI-Fred.NetHack-saved-game
ALLISONMI-June.NetHack-saved-game
ALLISONMI-mine3.NetHack-saved-game
ALLISONMI-Sirius.NetHack-saved-game
Note that despite the file names, the actual character name
is drawn from the savefile.
The WIN32CON support passes
USER-*.NetHack-saved-game
to findfirst/findnext where USER is your login name of course.
This commit is contained in:
@@ -1748,6 +1748,7 @@ E void FDECL(inven_inuse, (BOOLEAN_P));
|
||||
E int FDECL(dorecover, (int));
|
||||
E void FDECL(trickery, (char *));
|
||||
E void FDECL(getlev, (int,int,XCHAR_P,BOOLEAN_P));
|
||||
E void FDECL(get_plname_from_file, (int, char *));
|
||||
E void NDECL(minit);
|
||||
E boolean FDECL(lookup_id_mapping, (unsigned, unsigned *));
|
||||
#ifdef ZEROCOMP
|
||||
@@ -1834,6 +1835,7 @@ E void FDECL(bflush, (int));
|
||||
E void FDECL(bwrite, (int,genericptr_t,unsigned int));
|
||||
E void FDECL(bclose, (int));
|
||||
E void FDECL(savefruitchn, (int,int));
|
||||
E void FDECL(store_plname_in_file, (int));
|
||||
E void NDECL(free_dungeons);
|
||||
E void NDECL(freedynamicdata);
|
||||
|
||||
|
||||
@@ -259,6 +259,7 @@ struct instance_flags {
|
||||
boolean wc2_fullscreen; /* run fullscreen */
|
||||
boolean wc2_softkeyboard; /* use software keyboard */
|
||||
boolean wc2_wraptext; /* wrap text */
|
||||
boolean wc2_selectsaved; /* display a menu of user's saved games */
|
||||
boolean cmdassist; /* provide detailed assistance for some commands */
|
||||
boolean clicklook; /* allow right-clicking for look */
|
||||
boolean obsolete; /* obsolete options can point at this, it isn't used */
|
||||
|
||||
@@ -24,6 +24,11 @@
|
||||
#define SELF_RECOVER /* Allow the game itself to recover from an aborted game */
|
||||
|
||||
#define USER_SOUNDS
|
||||
|
||||
#ifdef WIN32CON
|
||||
#define SELECTSAVED /* Provide menu of saved games to choose from at start */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* -----------------------------------------------------------------
|
||||
* The remaining code shouldn't need modification.
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
||||
* and save files.
|
||||
*/
|
||||
#define EDITLEVEL 18
|
||||
#define EDITLEVEL 19
|
||||
|
||||
#define COPYRIGHT_BANNER_A \
|
||||
"NetHack, Copyright 1985-2005"
|
||||
|
||||
@@ -203,7 +203,8 @@ extern NEARDATA struct window_procs windowprocs;
|
||||
#define WC2_SOFTKEYBOARD 0x02L /* 02 software keyboard */
|
||||
#define WC2_WRAPTEXT 0x04L /* 03 wrap long lines of text */
|
||||
#define WC2_HILITE_STATUS 0x08L /* 04 hilite fields in status */
|
||||
/* 28 free bits */
|
||||
#define WC2_SELECTSAVED 0x10L /* 05 saved game selection menu */
|
||||
/* 27 free bits */
|
||||
|
||||
#define ALIGN_LEFT 1
|
||||
#define ALIGN_RIGHT 2
|
||||
|
||||
Reference in New Issue
Block a user