Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-06-18 21:43:54 -04:00
5 changed files with 47 additions and 49 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.56 $ $NHDT-Date: 1560611967 2019/06/15 15:19:27 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.57 $ $NHDT-Date: 1560855142 2019/06/18 10:52:22 $
This fixes36.3 file is here to capture information about updates in the 3.6.x This fixes36.3 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.2 in May 2019. Please note, however, lineage following the release of 3.6.2 in May 2019. Please note, however,
@@ -128,6 +128,7 @@ curses: don't convert ^M (or <return> or <enter> key) into ^J; both ^J and ^M
commands, ^J means run toward bottom of screen (when number_pad is commands, ^J means run toward bottom of screen (when number_pad is
off) and ^M is not bound to any command, so accidental <return> won't off) and ^M is not bound to any command, so accidental <return> won't
cause the hero to try to move cause the hero to try to move
curses: draw map in screen columns 1..79 like tty, rather than in 2..80
curses+EDIT_GETLIN: when a prompt's answer was preloaded, using ESC to discard curses+EDIT_GETLIN: when a prompt's answer was preloaded, using ESC to discard
it deleted it from the answer buffer but didn't erase it from screen it deleted it from the answer buffer but didn't erase it from screen
tty: re-do one optimization used when status conditions have all been removed tty: re-do one optimization used when status conditions have all been removed
+39 -45
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 mkroom.h $NHDT-Date: 1432512780 2015/05/25 00:13:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ */ /* NetHack 3.6 mkroom.h $NHDT-Date: 1560851014 2019/06/18 09:43:34 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.16 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2016. */ /*-Copyright (c) Pasi Kallinen, 2016. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -32,8 +32,8 @@ struct shclass {
#define D_SHOP 1 /* shop-like placement */ #define D_SHOP 1 /* shop-like placement */
#define D_TEMPLE 2 /* temple-like placement */ #define D_TEMPLE 2 /* temple-like placement */
struct itp { struct itp {
int iprob; /* probability of an item type */ int iprob; /* probability of an item type */
int itype; /* item type: if >=0 a class, if < 0 a specific item */ int itype; /* item type: if >=0 a class, if < 0 a specific item */
} iprobs[6]; } iprobs[6];
const char *const *shknms; /* list of shopkeeper names for this type */ const char *const *shknms; /* list of shopkeeper names for this type */
}; };
@@ -47,31 +47,31 @@ struct shclass {
/* values for rtype in the room definition structure */ /* values for rtype in the room definition structure */
enum roomtype_types { enum roomtype_types {
OROOM = 0, /* ordinary room */ OROOM = 0, /* ordinary room */
COURT = 2, /* contains a throne */ COURT = 2, /* contains a throne */
SWAMP, /* contains pools */ SWAMP = 3, /* contains pools */
VAULT, /* contains piles of gold */ VAULT = 4, /* detached room usually reached via teleport trap */
BEEHIVE, /* contains killer bees and royal jelly */ BEEHIVE = 5, /* contains killer bees and royal jelly */
MORGUE, /* contains corpses, undead and ghosts */ MORGUE = 6, /* contains corpses, undead and graves */
BARRACKS, /* contains soldiers and their gear */ BARRACKS = 7, /* contains soldiers and their gear */
ZOO, /* floor covered with treasure and monsters */ ZOO = 8, /* floor covered with treasure and monsters */
DELPHI, /* contains Oracle and peripherals */ DELPHI = 9, /* contains Oracle and peripherals */
TEMPLE, /* contains a shrine */ TEMPLE = 10, /* contains a shrine (altar attended by priest[ess]) */
LEPREHALL, /* leprechaun hall (Tom Proudfoot) */ LEPREHALL = 11, /* leprechaun hall (Tom Proudfoot) */
COCKNEST, /* cockatrice nest (Tom Proudfoot) */ COCKNEST = 12, /* cockatrice nest (Tom Proudfoot) */
ANTHOLE, /* ants (Tom Proudfoot) */ ANTHOLE = 13, /* ants (Tom Proudfoot) */
SHOPBASE, /* everything above this is a shop */ SHOPBASE = 14, /* everything above this is a shop */
ARMORSHOP, /* specific shop defines for level compiler */ ARMORSHOP = 15, /* specific shop defines for level compiler */
SCROLLSHOP, SCROLLSHOP = 16,
POTIONSHOP, POTIONSHOP = 17,
WEAPONSHOP, WEAPONSHOP = 18,
FOODSHOP, FOODSHOP = 19,
RINGSHOP, RINGSHOP = 20,
WANDSHOP, WANDSHOP = 21,
TOOLSHOP, TOOLSHOP = 22,
BOOKSHOP, BOOKSHOP = 23,
FODDERSHOP, /* health food store */ FODDERSHOP = 24, /* health food store */
CANDLESHOP CANDLESHOP = 25
}; };
#define MAXRTYPE (CANDLESHOP) /* maximum valid room type */ #define MAXRTYPE (CANDLESHOP) /* maximum valid room type */
@@ -81,25 +81,19 @@ enum roomtype_types {
#define ANY_TYPE (-1) #define ANY_TYPE (-1)
#define ANY_SHOP (-2) #define ANY_SHOP (-2)
#define NO_ROOM 0 /* indicates lack of room-occupancy */ #define NO_ROOM 0 /* indicates lack of room-occupancy */
#define SHARED 1 /* indicates normal shared boundary */ #define SHARED 1 /* indicates normal shared boundary */
#define SHARED_PLUS \ #define SHARED_PLUS 2 /* indicates shared boundary - extra adjacent-square
2 /* indicates shared boundary - extra adjacent- \ * searching required */
* square searching required */ #define ROOMOFFSET 3 /* (levl[x][y].roomno - ROOMOFFSET) gives g.rooms[] index,
* for inside-squares and non-shared boundaries */
#define ROOMOFFSET \ #define IS_ROOM_PTR(x) ((x) >= rooms && (x) < g.rooms + MAXNROFROOMS)
3 /* \ #define IS_ROOM_INDEX(x) ((x) >= 0 && (x) < MAXNROFROOMS)
* (levl[x][y].roomno - ROOMOFFSET) gives \ #define IS_SUBROOM_PTR(x) ((x) >= g.subrooms && (x) < g.subrooms + MAXNROFROOMS)
* g.rooms[] index, for inside-squares and \
* non-shared boundaries. \
*/
#define IS_ROOM_PTR(x) ((x) >= g.rooms && (x) < g.rooms + MAXNROFROOMS)
#define IS_ROOM_INDEX(x) ((x) >= 0 && (x) < MAXNROFROOMS)
#define IS_SUBROOM_PTR(x) ((x) >= g.subrooms && (x) < g.subrooms + MAXNROFROOMS)
#define IS_SUBROOM_INDEX(x) ((x) > MAXNROFROOMS && (x) < (MAXNROFROOMS * 2)) #define IS_SUBROOM_INDEX(x) ((x) > MAXNROFROOMS && (x) < (MAXNROFROOMS * 2))
#define ROOM_INDEX(x) ((x) -g.rooms) #define ROOM_INDEX(x) ((x) -g.rooms)
#define SUBROOM_INDEX(x) ((x) -g.subrooms) #define SUBROOM_INDEX(x) ((x) -g.subrooms)
#define IS_LAST_ROOM_PTR(x) (ROOM_INDEX(x) == g.nroom) #define IS_LAST_ROOM_PTR(x) (ROOM_INDEX(x) == g.nroom)
#define IS_LAST_SUBROOM_PTR(x) (!g.nsubroom || SUBROOM_INDEX(x) == g.nsubroom) #define IS_LAST_SUBROOM_PTR(x) (!g.nsubroom || SUBROOM_INDEX(x) == g.nsubroom)
+2 -2
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 potion.c $NHDT-Date: 1559664951 2019/06/04 16:15:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.161 $ */ /* NetHack 3.6 potion.c $NHDT-Date: 1560850774 2019/06/18 09:39:34 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.162 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -185,7 +185,7 @@ const char *msg;
if (!Slimed) { if (!Slimed) {
dealloc_killer(find_delayed_killer(SLIMED)); dealloc_killer(find_delayed_killer(SLIMED));
/* fake appearance is set late in turn-to-slime countdown */ /* fake appearance is set late in turn-to-slime countdown */
if (g.youmonst.m_ap_type == M_AP_MONSTER if (U_AP_TYPE == M_AP_MONSTER
&& g.youmonst.mappearance == PM_GREEN_SLIME) { && g.youmonst.mappearance == PM_GREEN_SLIME) {
g.youmonst.m_ap_type = M_AP_NOTHING; g.youmonst.m_ap_type = M_AP_NOTHING;
g.youmonst.mappearance = 0; g.youmonst.mappearance = 0;
+2
View File
@@ -519,6 +519,8 @@ curses_move_cursor(winid wid, int x, int y)
if (wid != MAP_WIN) { if (wid != MAP_WIN) {
return; return;
} else {
--x; /* map column [0] isn't used, so shift everything over 1 col */
} }
#ifdef PDCURSES #ifdef PDCURSES
/* PDCurses seems to not handle wmove correctly, so we use move and /* PDCurses seems to not handle wmove correctly, so we use move and
+2 -1
View File
@@ -363,10 +363,10 @@ curs_destroy_all_wins()
void void
curses_putch(winid wid, int x, int y, int ch, int color, int attr) curses_putch(winid wid, int x, int y, int ch, int color, int attr)
{ {
static boolean map_initted = FALSE;
int sx, sy, ex, ey; int sx, sy, ex, ey;
boolean border = curses_window_has_border(wid); boolean border = curses_window_has_border(wid);
nethack_char nch; nethack_char nch;
static boolean map_initted = FALSE;
/* /*
if (wid == STATUS_WIN) { if (wid == STATUS_WIN) {
curses_update_stats(); curses_update_stats();
@@ -381,6 +381,7 @@ curses_putch(winid wid, int x, int y, int ch, int color, int attr)
map_initted = TRUE; map_initted = TRUE;
} }
--x; /* map column [0] is not used; draw column [1] in first screen col */
map[y][x].ch = ch; map[y][x].ch = ch;
map[y][x].color = color; map[y][x].color = color;
map[y][x].attr = attr; map[y][x].attr = attr;