]> granicus.if.org Git - nethack/commitdiff
Merge branch 'NetHack-3.6'
authornhmall <nhmall@nethack.org>
Thu, 28 Nov 2019 04:07:29 +0000 (23:07 -0500)
committernhmall <nhmall@nethack.org>
Thu, 28 Nov 2019 04:07:29 +0000 (23:07 -0500)
1  2 
doc/Guidebook.mn
doc/Guidebook.tex
include/flag.h
src/detect.c
src/display.c
src/eat.c
src/options.c
win/curses/cursmisc.c

index 02f561fe1702bafea5b5c631544803c27b23f3d9,5bf417b7a2f86a116b597e31e36708b3a416a13c..e143fb2680fadebb97e6e8ba1622a449a61bbb7a
  .ds h0 "NetHack Guidebook
  .ds h1
  .ds h2 %
 -.ds vr "NetHack 3.6
 +.ds vr "NetHack 3.7
  .ds f0 "\*(vr
  .ds f1
- .ds f2 "November 17, 2019
+ .ds f2 "November 27, 2019
  .
  .\" A note on some special characters:
  .\" \(lq = left double quote
Simple merge
diff --cc include/flag.h
index 89535b53ea29d75d2638e9f895ec9023d3d0a67d,3b429e01fbfaefa97d72321474beda67f70d5864..19c1ec9f6a49f598e9ce9cd38029e4cc78900e4d
@@@ -91,9 -106,9 +91,10 @@@ struct flag 
  #define PARANOID_REMOVE     0x0040
  #define PARANOID_BREAKWAND  0x0080
  #define PARANOID_WERECHANGE 0x0100
+ #define PARANOID_EATING     0x0200
      int pickup_burden; /* maximum burden before prompt */
      int pile_limit;    /* controls feedback when walking over objects */
 +    char    sortloot; /* 'n'=none, 'l'=loot (pickup), 'f'=full ('l'+invent) */
      char inv_order[MAXOCLASSES];
      char pickup_types[MAXOCLASSES];
  #define NUM_DISCLOSURE_OPTIONS 6 /* i,a,v,g,c,o (decl.c) */
diff --cc src/detect.c
Simple merge
diff --cc src/display.c
index bda966cc34b86c49f94bcaae3f7d01bceefebfbe,722c2581823e122a35abf7b7abe874fcdd2dd1c8..5a6369ec282c82b10f4b73abe4d26bab0bfed1aa
   */
  #include "hack.h"
  
 -STATIC_DCL void FDECL(show_mon_or_warn, (int, int, int));
 -STATIC_DCL void FDECL(display_monster,
++static void FDECL(show_mon_or_warn, (int, int, int));
 +static void FDECL(display_monster,
                        (XCHAR_P, XCHAR_P, struct monst *, int, XCHAR_P));
 -STATIC_DCL int FDECL(swallow_to_glyph, (int, int));
 -STATIC_DCL void FDECL(display_warning, (struct monst *));
 +static int FDECL(swallow_to_glyph, (int, int));
 +static void FDECL(display_warning, (struct monst *));
  
 -STATIC_DCL int FDECL(check_pos, (int, int, int));
 -STATIC_DCL int FDECL(get_bk_glyph, (XCHAR_P, XCHAR_P));
 -STATIC_DCL int FDECL(tether_glyph, (int, int));
 +static int FDECL(check_pos, (int, int, int));
 +static int FDECL(get_bk_glyph, (XCHAR_P, XCHAR_P));
 +static int FDECL(tether_glyph, (int, int));
  
  /*#define WA_VERBOSE*/ /* give (x,y) locations for all "bad" spots */
  #ifdef WA_VERBOSE
@@@ -361,6 -362,25 +362,25 @@@ int x, y, show
      _map_location(x, y, show);
  }
  
 -STATIC_OVL void
+ /* display something on monster layer; may need to fixup object layer */
++static void
+ show_mon_or_warn(x, y, monglyph)
+ int x, y, monglyph;
+ {
+     struct obj *o;
+     /* "remembered, unseen monster" is tracked by object layer so if we're
+        putting something on monster layer at same spot, stop remembering
+        that; if an object is in view there, start remembering it instead */
+     if (glyph_is_invisible(levl[x][y].glyph)) {
+         unmap_object(x, y);
+         if (cansee(x, y) && (o = vobj_at(x, y)) != 0)
+             map_object(o, FALSE);
+     }
+     show_glyph(x, y, monglyph);
+ }
  #define DETECTED 2
  #define PHYSICALLY_SEEN 1
  #define is_worm_tail(mon) ((mon) && ((x != (mon)->mx) || (y != (mon)->my)))
diff --cc src/eat.c
index 1b4a7a5a9d510a5cd601080ec5b66e33e8cf76cc,5e2aa1a09c49f548dbc5efcccf63221426713d80..7144eecf2272f7babc5ac1146e98f00064969e30
+++ b/src/eat.c
@@@ -2869,23 -2875,20 +2869,20 @@@ int num
          /* Have lesshungry() report when you're nearly full so all eating
           * warns when you're about to choke.
           */
-         if (u.uhunger >= 1500) {
-             if (!g.context.victual.eating
-                 || (g.context.victual.eating && !g.context.victual.fullwarn)) {
-                 pline("You're having a hard time getting all of it down.");
-                 g.nomovemsg = "You're finally finished.";
-                 if (!g.context.victual.eating) {
-                     g.multi = -2;
-                 } else {
-                     g.context.victual.fullwarn = TRUE;
-                     if (g.context.victual.canchoke
-                         && g.context.victual.reqtime > 1) {
-                         /* a one-gulp food will not survive a stop */
-                         if (yn_function("Continue eating?", ynchars, 'n')
-                             != 'y') {
-                             reset_eat();
-                             g.nomovemsg = (char *) 0;
-                         }
+         if (u.uhunger >= 1500
 -            && (!context.victual.eating
 -                || (context.victual.eating && !context.victual.fullwarn))) {
++            && (!g.context.victual.eating
++                || (g.context.victual.eating && !g.context.victual.fullwarn))) {
+             pline("You're having a hard time getting all of it down.");
 -            nomovemsg = "You're finally finished.";
 -            if (!context.victual.eating) {
 -                multi = -2;
++            g.nomovemsg = "You're finally finished.";
++            if (!g.context.victual.eating) {
++                g.multi = -2;
+             } else {
 -                context.victual.fullwarn = TRUE;
 -                if (context.victual.canchoke && context.victual.reqtime > 1) {
++                g.context.victual.fullwarn = TRUE;
++                if (g.context.victual.canchoke && g.context.victual.reqtime > 1) {
+                     /* a one-gulp food will not survive a stop */
+                     if (!paranoid_query(ParanoidEating, "Continue eating?")) {
+                         reset_eat();
 -                        nomovemsg = (char *) 0;
++                        g.nomovemsg = (char *) 0;
                      }
                  }
              }
diff --cc src/options.c
Simple merge
index daf7eba3a0fc8e55a4536f04f785027e9e729441,0d813cfcfd9acfc49eaec5d53b485ef524f6f102..314efe5af91e45b49f0993e4d24af994487b4201
@@@ -906,12 -920,13 +920,13 @@@ curses_convert_keys(int key
          if (iflags.num_pad) {
              ret = '7';
          } else {
-             ret = 'y';
 -            ret = !Cmd.swap_yz ? 'y' : 'z';
++            ret = !g.Cmd.swap_yz ? 'y' : 'z';
          }
          break;
- #endif /* KEY_A1 */
  #ifdef KEY_A3
      case KEY_A3:
+ #endif
+     case KEY_PPAGE:
          if (iflags.num_pad) {
              ret = '9';
          } else {