]> granicus.if.org Git - nethack/commit
selectsaved option (trunk only)
authornethack.allison <nethack.allison>
Sun, 9 Jan 2005 21:40:24 +0000 (21:40 +0000)
committernethack.allison <nethack.allison>
Sun, 9 Jan 2005 21:40:24 +0000 (21:40 +0000)
commit15ae774a785e35abacb8651db4037cdd6cb2bfc3
tree4b3edc9580d291505ce068a17be00f749047c63c
parent9a3022800b659ddccee28eb61b590c26e6720e41
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.
14 files changed:
doc/Guidebook.mn
doc/Guidebook.tex
doc/fixes35.0
doc/window.doc
include/extern.h
include/flag.h
include/ntconf.h
include/patchlevel.h
include/winprocs.h
src/files.c
src/options.c
src/restore.c
src/save.c
win/tty/wintty.c