From 2e3a109826becd651075a7548dbab2fa3dc3103e Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 11 Jun 2015 08:25:56 -0400 Subject: [PATCH 1/7] alter beta identifier --- src/version.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/version.c b/src/version.c index 4e70da935..3e3eb1750 100644 --- a/src/version.c +++ b/src/version.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 version.c $NHDT-Date: 1432339708 2015/05/23 00:08:28 $ $NHDT-Branch: master $:$NHDT-Revision: 1.30 $ */ +/* NetHack 3.6 version.c $NHDT-Date: 1434025553 2015/06/11 12:25:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.31 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -15,7 +15,7 @@ #include "patchlevel.h" #endif -#define BETA_INFO "Beta1" +#define BETA_INFO "Beta2" /* fill buffer with short version (so caller can avoid including date.h) */ char * From 183bf0fbf2425fa023c2f43c1545b69138a0ebbe Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 11 Jun 2015 19:34:49 +0300 Subject: [PATCH 2/7] Fix unused variable thinko --- src/objnam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/objnam.c b/src/objnam.c index 134f784e8..d13d9721b 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -2360,7 +2360,7 @@ rnd_otyp_by_wpnskill(skill) schar skill; { int i, n = 0; - short otyp; + short otyp = STRANGE_OBJECT; for (i = bases[WEAPON_CLASS]; i < NUM_OBJECTS && objects[i].oc_class == WEAPON_CLASS; i++) if (objects[i].oc_skill == skill) { @@ -2375,7 +2375,7 @@ schar skill; if (--n < 0) return i; } - return STRANGE_OBJECT; + return otyp; } /* From 4ead4438477f93168bc84b9a8ccd4fefe16f168a Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 11 Jun 2015 19:36:08 +0300 Subject: [PATCH 3/7] Remove unused variable --- src/options.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/options.c b/src/options.c index d6c7b9553..acb1f39bc 100644 --- a/src/options.c +++ b/src/options.c @@ -4805,7 +4805,6 @@ const char *mapping; { struct autopickup_exception *ape, **apehead; char text[256], *text2; - int textsize = 0; boolean grab = FALSE; if (sscanf(mapping, "\"%255[^\"]\"", text) == 1) { @@ -4817,7 +4816,6 @@ const char *mapping; grab = FALSE; ++text2; } - textsize = strlen(text2); apehead = (grab) ? &iflags.autopickup_exceptions[AP_GRAB] : &iflags.autopickup_exceptions[AP_LEAVE]; ape = (struct autopickup_exception *) alloc( From 9bf715c8157bac6898da050e5c5dbad73987d5bc Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 11 Jun 2015 13:35:41 -0700 Subject: [PATCH 4/7] menustyle documentation Reorder the description of the values for the menustyle option, swapping 'full' and 'partial' since 'full' is closer in operation to 'combination'. --- doc/Guidebook.mn | 16 ++++++++++------ doc/Guidebook.tex | 14 +++++++++----- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index de039e5c8..a116187b9 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: master $:$NHDT-Revision: 1.174 $ $NHDT-Date: 1433842150 2015/06/09 09:29:10 $ +.\" $NHDT-Branch: master $:$NHDT-Revision: 1.175 $ $NHDT-Date: 1434054937 2015/06/11 20:35:37 $ .ds h0 "NetHack Guidebook .ds h1 .ds h2 % @@ -2082,15 +2082,19 @@ See ``Configuring Menu Colors'' on how to configure the colors. Controls the interface used when you need to choose various objects (in response to the Drop command, for instance). The value specified should be the first letter of one of the following: traditional, combination, -partial, or full. Traditional was the only interface available for -earlier versions; it consists of a prompt for object class characters, +full, or partial. +Traditional was the only interface available for +early versions; it consists of a prompt for object class characters, followed by an object-by-object prompt for all items matching the selected -object class(es). Combination starts with a prompt for object class(es) +object class(es). +Combination starts with a prompt for object class(es) of interest, but then displays a menu of matching objects rather than -prompting one-by-one. Partial skips the object class filtering and -immediately displays a menu of all objects. Full displays a menu of +prompting one-by-one. +Full displays a menu of object classes rather than a character prompt, and then a menu of matching objects for selection. +Partial skips the object class filtering and +immediately displays a menu of all objects. .lp menu_deselect_all Menu character accelerator to deselect all items in a menu. Implemented by the Amiga, Gem, X11 and tty ports. diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 3e44d6866..4ac9fdb70 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2519,15 +2519,19 @@ See ``{\it Configuring Menu Colors\/}'' on how to configure the colors. Controls the interface used when you need to choose various objects (in response to the Drop command, for instance). The value specified should be the first letter of one of the following: traditional, combination, -partial, or full. Traditional was the only interface available for -earlier versions; it consists of a prompt for object class characters, +full, or partial. +Traditional was the only interface available for +early versions; it consists of a prompt for object class characters, followed by an object-by-object prompt for all items matching the selected -object class(es). Combination starts with a prompt for object class(es) +object class(es). +Combination starts with a prompt for object class(es) of interest, but then displays a menu of matching objects rather than -prompting one-by-one. Partial skips the object class filtering and -immediately displays a menu of all objects. Full displays a menu of +prompting one-by-one. +Full displays a menu of object classes rather than a character prompt, and then a menu of matching objects for selection. +Partial skips the object class filtering and +immediately displays a menu of all objects. \item[\ib{menu\_deselect\_all}] Menu character accelerator to deselect all items in a menu. Implemented by the Amiga, Gem, X11 and tty ports. From 12c013ee28fe1d207a41bbd874cefb309cde09aa Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 11 Jun 2015 14:09:17 -0700 Subject: [PATCH 5/7] more menustyle Make the list of menustyle values in the game match their order in the revised documentation: traditional, combination, full, partial. --- dat/opthelp | 18 ++++++++++-------- include/hack.h | 6 +++--- src/options.c | 6 +++--- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/dat/opthelp b/dat/opthelp index 32edf0012..cffc7b12e 100644 --- a/dat/opthelp +++ b/dat/opthelp @@ -103,10 +103,12 @@ disclose the types of information you want offered at the end of the fruit the name of a fruit you enjoy eating [slime mold] (basically a whimsy which NetHack uses from time to time). menustyle user interface for selection of multiple objects: - Traditional -- one object at a time prompting; - Combination -- prompt for classes of interest, then menu; - Partial -- skip class prompt, use menu of all objects; - Full -- menu for classes of interest, then object menu; + Traditional -- prompt for classes of interest, then + prompt item-by-item for those classes; + Combination -- prompt for classes of interest, then + use a menu for choosing items; + Full -- menu for classes of interest, then item menu; + Partial -- skip class filtering, use menu of all items; only the first letter ('T','C','P','F') matters; 'N' (None) is a synonym for 'T', as is boolean style negation [Full] number_pad alphabetic versus numeric control over movement: @@ -202,16 +204,16 @@ menu_* create single character accelerators for menu commands. Below ports that implement them: 'x' is X11, 't' is tty, 'g' is Gem, 'a' is Amiga. menu_deselect_all deselect all items in a menu [-](gxta) - menu_deselect_page deselect all items on this page of a menu [\](gta) + menu_deselect_page deselect all items on this menu page [\](gta) menu_first_page jump to the first page in a menu [^](gta) menu_invert_all invert all items in a menu [@](gxta) - menu_invert_page invert all items on this page of a menu [~](gta) + menu_invert_page invert all items on this menu page [~](gta) menu_last_page jump to the last page in a menu [|](gta) menu_next_page goto the next menu page [>](gta) menu_previous_page goto the previous menu page [<](gta) - menu_search search for a menu item [:](gxa) + menu_search search for a menu item [:](gxta) menu_select_all select all items in a menu [.](gxta) - menu_select_page select all items on this page of a menu [,](gta) + menu_select_page select all items on this menu page [,](gta) monsters like dungeon, but for monster symbols default: abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ@\ \\&;:~] diff --git a/include/hack.h b/include/hack.h index 1320faccc..319f4d344 100644 --- a/include/hack.h +++ b/include/hack.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 hack.h $NHDT-Date: 1432512781 2015/05/25 00:13:01 $ $NHDT-Branch: master $:$NHDT-Revision: 1.64 $ */ +/* NetHack 3.6 hack.h $NHDT-Date: 1434056948 2015/06/11 21:09:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.66 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -355,8 +355,8 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */ #define MENUTYPELEN sizeof("traditional ") #define MENU_TRADITIONAL 0 #define MENU_COMBINATION 1 -#define MENU_PARTIAL 2 -#define MENU_FULL 3 +#define MENU_FULL 2 +#define MENU_PARTIAL 3 #define MENU_SELECTED TRUE #define MENU_UNSELECTED FALSE diff --git a/src/options.c b/src/options.c index acb1f39bc..ebd07b560 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1433283602 2015/06/02 22:20:02 $ $NHDT-Branch: master $:$NHDT-Revision: 1.216 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1434056951 2015/06/11 21:09:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.219 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3067,7 +3067,7 @@ boolean tinitial, tfrom_file; return; } - /* menustyle:traditional or combo or full or partial */ + /* menustyle:traditional or combination or full or partial */ if (match_optname(opts, "menustyle", 4, TRUE)) { int tmp; boolean val_required = (strlen(opts) > 5 && !negated); @@ -3361,7 +3361,7 @@ boolean tinitial, tfrom_file; } static NEARDATA const char *menutype[] = { "traditional", "combination", - "partial", "full" }; + "full", "partial" }; static NEARDATA const char *burdentype[] = { "unencumbered", "burdened", "stressed", "strained", From f2daf4f7f8d3493188b52b98aa94df8f3b699536 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 11 Jun 2015 21:11:41 -0400 Subject: [PATCH 6/7] punctuation in failed messages --- src/end.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/end.c b/src/end.c index c119cbb82..d5b8e4ed6 100644 --- a/src/end.c +++ b/src/end.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 end.c $NHDT-Date: 1432512762 2015/05/25 00:12:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.98 $ */ +/* NetHack 3.6 end.c $NHDT-Date: 1434071495 2015/06/12 01:11:35 $ $NHDT-Branch: master $:$NHDT-Revision: 1.99 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -539,21 +539,21 @@ VA_DECL(const char *, str) #else if (!wizard) { if (sysopt.support) - raw_printf("To report this error, %s%s.", sysopt.support, + raw_printf("To report this error, %s%s", sysopt.support, !program_state.something_worth_saving - ? "" + ? "." : " and it may be possible to rebuild."); else if (sysopt.wizards) { char *tmp = build_english_list(sysopt.wizards); raw_printf("To report this error, contact %s%s", tmp, !program_state.something_worth_saving - ? "" + ? "." : " and it may be possible to rebuild."); free(tmp); } else - raw_printf("Report error to \"%s\"%s.", WIZARD_NAME, + raw_printf("Report error to \"%s\"%s", WIZARD_NAME, !program_state.something_worth_saving - ? "" + ? "." : " and it may be possible to rebuild."); } #endif From af54125c2202286970915cfad1192a8ba11fe092 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 11 Jun 2015 18:19:09 -0700 Subject: [PATCH 7/7] characteristics disclosure Change end of game disclosure's display for strength, dexterity, &c to always show the maximum possible value instead of only when the final value was less than maximum. For both end of game and ^X, change the description from "limit" to "innate limit" if the current value exceeds limit due to worn items (gauntlets of power, +N ring of adornment, &c). --- src/cmd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cmd.c b/src/cmd.c index 8ca41387d..7703233e6 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 cmd.c $NHDT-Date: 1433291955 2015/06/03 00:39:15 $ $NHDT-Branch: master $:$NHDT-Revision: 1.194 $ */ +/* NetHack 3.6 cmd.c $NHDT-Date: 1434071945 2015/06/12 01:19:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.195 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1570,7 +1570,7 @@ int mode, final, attrindx; alimit = ATTRMAX(attrindx); /* criterium for whether the limit is interesting varies */ interesting_alimit = - final ? (abase != alimit) + final ? TRUE /* was originally `(abase != alimit)' */ : (alimit != (attrindx != A_STR ? 18 : STR18(100))); paren_pfx = final ? " (" : " (current; "; if (acurrent != abase) { @@ -1584,7 +1584,9 @@ int mode, final, attrindx; paren_pfx = ", "; } if (interesting_alimit) { - Sprintf(eos(valubuf), "%slimit:%s", paren_pfx, + Sprintf(eos(valubuf), "%s%slimit:%s", paren_pfx, + /* more verbose if exceeding 'limit' due to magic bonus */ + (acurrent > alimit) ? "innate " : "", attrval(attrindx, alimit, valstring)); /* paren_pfx = ", "; */ }