]> granicus.if.org Git - nethack/commitdiff
Merge branch 'NetHack-3.6'
authornhmall <nhmall@nethack.org>
Wed, 19 Jun 2019 01:43:54 +0000 (21:43 -0400)
committernhmall <nhmall@nethack.org>
Wed, 19 Jun 2019 01:43:54 +0000 (21:43 -0400)
1  2 
include/mkroom.h
src/potion.c
win/curses/cursmisc.c
win/curses/curswins.c

index 3af10c863ab7ff9a94f22ad80227bc0920cde620,3439889a0fcf60c6f65e7d41ed855bf55a505b0a..9c8fcfd609db1030b6fc6d7c7dbb459c6055a47a
@@@ -45,33 -47,37 +45,33 @@@ struct shclass 
   * there is at most one non-vault special room on a level
   */
  
 -extern struct mkroom *dnstairs_room, *upstairs_room, *sstairs_room;
 -
 -extern NEARDATA coord doors[DOORMAX];
 -
  /* values for rtype in the room definition structure */
  enum roomtype_types {
-     OROOM = 0,      /* ordinary room */
-     COURT = 2,      /* contains a throne */
-     SWAMP,      /* contains pools */
-     VAULT,      /* contains piles of gold */
-     BEEHIVE,    /* contains killer bees and royal jelly */
-     MORGUE,     /* contains corpses, undead and ghosts */
-     BARRACKS,   /* contains soldiers and their gear */
-     ZOO,        /* floor covered with treasure and monsters */
-     DELPHI,     /* contains Oracle and peripherals */
-     TEMPLE,     /* contains a shrine */
-     LEPREHALL /* leprechaun hall (Tom Proudfoot) */
-     COCKNEST,   /* cockatrice nest (Tom Proudfoot) */
-     ANTHOLE,    /* ants (Tom Proudfoot) */
-     SHOPBASE,   /* everything above this is a shop */
-     ARMORSHOP /* specific shop defines for level compiler */
-     SCROLLSHOP,
-     POTIONSHOP,
-     WEAPONSHOP,
-     FOODSHOP,
-     RINGSHOP,
-     WANDSHOP,
-     TOOLSHOP,
-     BOOKSHOP,
-     FODDERSHOP, /* health food store */
-     CANDLESHOP
+     OROOM      =  0, /* ordinary room */
+     COURT      =  2, /* contains a throne */
+     SWAMP      =  3, /* contains pools */
+     VAULT      =  4, /* detached room usually reached via teleport trap */
+     BEEHIVE    =  5, /* contains killer bees and royal jelly */
+     MORGUE     =  6, /* contains corpses, undead and graves */
+     BARRACKS   =  7, /* contains soldiers and their gear */
+     ZOO        =  8, /* floor covered with treasure and monsters */
+     DELPHI     =  9, /* contains Oracle and peripherals */
+     TEMPLE     = 10, /* contains a shrine (altar attended by priest[ess]) */
+     LEPREHALL  = 11, /* leprechaun hall (Tom Proudfoot) */
+     COCKNEST   = 12, /* cockatrice nest (Tom Proudfoot) */
+     ANTHOLE    = 13, /* ants (Tom Proudfoot) */
+     SHOPBASE   = 14, /* everything above this is a shop */
+     ARMORSHOP  = 15, /* specific shop defines for level compiler */
+     SCROLLSHOP = 16,
+     POTIONSHOP = 17,
+     WEAPONSHOP = 18,
+     FOODSHOP   = 19,
+     RINGSHOP   = 20,
+     WANDSHOP   = 21,
+     TOOLSHOP   = 22,
+     BOOKSHOP   = 23,
+     FODDERSHOP = 24, /* health food store */
+     CANDLESHOP = 25
  };
  
  #define MAXRTYPE (CANDLESHOP) /* maximum valid room type */
  #define ANY_TYPE (-1)
  #define ANY_SHOP (-2)
  
- #define NO_ROOM 0 /* indicates lack of room-occupancy */
- #define SHARED 1  /* indicates normal shared boundary */
- #define SHARED_PLUS                                  \
-     2 /* indicates shared boundary - extra adjacent- \
-        * square searching required */
+ #define NO_ROOM     0 /* indicates lack of room-occupancy */
+ #define SHARED      1 /* indicates normal shared boundary */
+ #define SHARED_PLUS 2 /* indicates shared boundary - extra adjacent-square
+                        * searching required */
 -#define ROOMOFFSET  3 /* (levl[x][y].roomno - ROOMOFFSET) gives rooms[] index,
++#define ROOMOFFSET  3 /* (levl[x][y].roomno - ROOMOFFSET) gives g.rooms[] index,
+                        * for inside-squares and non-shared boundaries */
  
- #define ROOMOFFSET                              \
-     3 /*                                        \
-        * (levl[x][y].roomno - ROOMOFFSET) gives \
-        * 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_ROOM_PTR(x)      ((x) >= rooms && (x) < rooms + MAXNROFROOMS)
++#define IS_ROOM_PTR(x)      ((x) >= rooms && (x) < g.rooms + MAXNROFROOMS)
+ #define IS_ROOM_INDEX(x)    ((x) >= 0 && (x) < MAXNROFROOMS)
 -#define IS_SUBROOM_PTR(x)   ((x) >= subrooms && (x) < subrooms + MAXNROFROOMS)
++#define IS_SUBROOM_PTR(x)   ((x) >= g.subrooms && (x) < g.subrooms + MAXNROFROOMS)
  #define IS_SUBROOM_INDEX(x) ((x) > MAXNROFROOMS && (x) < (MAXNROFROOMS * 2))
- #define ROOM_INDEX(x) ((x) -g.rooms)
- #define SUBROOM_INDEX(x) ((x) -g.subrooms)
 -#define ROOM_INDEX(x)       ((x) -rooms)
 -#define SUBROOM_INDEX(x)    ((x) -subrooms)
 -#define IS_LAST_ROOM_PTR(x) (ROOM_INDEX(x) == nroom)
 -#define IS_LAST_SUBROOM_PTR(x) (!nsubroom || SUBROOM_INDEX(x) == nsubroom)
++#define ROOM_INDEX(x)       ((x) -g.rooms)
++#define SUBROOM_INDEX(x)    ((x) -g.subrooms)
 +#define IS_LAST_ROOM_PTR(x) (ROOM_INDEX(x) == g.nroom)
 +#define IS_LAST_SUBROOM_PTR(x) (!g.nsubroom || SUBROOM_INDEX(x) == g.nsubroom)
  
  #endif /* MKROOM_H */
diff --cc src/potion.c
index e6891ffdb4e648eb9d605848bb65ffbf1c4b70fc,18c6b584ff25cc5aee10aae26e11d4213ac7ec60..f41f322c548645be619e1a0fee3ec6700b473f51
@@@ -185,10 -188,10 +185,10 @@@ const char *msg
      if (!Slimed) {
          dealloc_killer(find_delayed_killer(SLIMED));
          /* 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
 -            && youmonst.mappearance == PM_GREEN_SLIME) {
 -            youmonst.m_ap_type = M_AP_NOTHING;
 -            youmonst.mappearance = 0;
 +            && g.youmonst.mappearance == PM_GREEN_SLIME) {
 +            g.youmonst.m_ap_type = M_AP_NOTHING;
 +            g.youmonst.mappearance = 0;
          }
      }
  }
Simple merge
Simple merge