]> granicus.if.org Git - nethack/commit
restore_menu (trunk only)
authornethack.rankin <nethack.rankin>
Tue, 12 Dec 2006 04:52:39 +0000 (04:52 +0000)
committernethack.rankin <nethack.rankin>
Tue, 12 Dec 2006 04:52:39 +0000 (04:52 +0000)
commit0db19f1c9605525b12736f31afe6a2458570a880
tree2484058afd9c5df16c23ccaef42ff5789dcd6ef7
parent176a59bb0a3c3491950a549702bb407553c5b751
restore_menu (trunk only)

     Move the code to use a nethack menu for restoring a saved game.  It
was inline in tty_askname() but is now a separate routine, restore_menu()
in restore.c.  There was no port-specific code and only a small amount of
tty-specific code; it should be useable by anyone (but Qt doesn't have to
switch over if it doesn't want to).

     The original behaved strangely if there were exactly 26 saved chars;
the "start new game" menu entry ended up using "{" as selection character.
There wasn't any comparable problem at 52; it was limiting the menu to 51
games.  Now it will allow 52 (with "start a new game" bumped into "#" if
there are that many), and adds an explicit quit entry (unless there are
52 or more games so that # is already used by new-game, then quit remains
implicit rather than resort to some other none-of-the-above character).
include/extern.h
src/restore.c
src/version.c
win/tty/wintty.c