From: nhmall Date: Thu, 28 Nov 2019 04:07:29 +0000 (-0500) Subject: Merge branch 'NetHack-3.6' X-Git-Tag: NetHack-3.7.0_WIP~218 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58478061046007398d195d21ebc1ae27e23843dc;p=nethack Merge branch 'NetHack-3.6' --- 58478061046007398d195d21ebc1ae27e23843dc diff --cc doc/Guidebook.mn index 02f561fe1,5bf417b7a..e143fb268 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@@ -21,10 -21,10 +21,10 @@@ .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 diff --cc include/flag.h index 89535b53e,3b429e01f..19c1ec9f6 --- a/include/flag.h +++ b/include/flag.h @@@ -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/display.c index bda966cc3,722c25818..5a6369ec2 --- a/src/display.c +++ b/src/display.c @@@ -123,14 -123,15 +123,15 @@@ */ #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); } + /* display something on monster layer; may need to fixup object layer */ -STATIC_OVL void ++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 1b4a7a5a9,5e2aa1a09..7144eecf2 --- a/src/eat.c +++ 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 win/curses/cursmisc.c index daf7eba3a,0d813cfcf..314efe5af --- a/win/curses/cursmisc.c +++ b/win/curses/cursmisc.c @@@ -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 {