]> granicus.if.org Git - nethack/commitdiff
mextra.h comments (trunk only)
authornethack.rankin <nethack.rankin>
Thu, 12 Jan 2006 06:06:33 +0000 (06:06 +0000)
committernethack.rankin <nethack.rankin>
Thu, 12 Jan 2006 06:06:33 +0000 (06:06 +0000)
     Add an introductory comment for each type of extension.  Also move
ANGRY/NOTANGRY shopkeeper macros from old eshk.h out of the common header
and into shk.c so that their use doesn't end up spreading into other code.

     Not fixed:  entry #9 in the block comment at the top is truncated
mid-sentence.

include/mextra.h
src/shk.c

index 964af13b740245f8db54675f883ba3500a2202a8..99a6dcb10f12a240dd6db508bf12ed63f5bc2aa1 100644 (file)
  *         packaged up.
  */
  
+/***
+ **    formerly vault.h -- vault guard extension
+ */
 #define FCSIZ  (ROWNO+COLNO)
 
 struct fakecorridor {
-       xchar fx,fy,ftyp;
+       xchar fx, fy, ftyp;
 };
 
 struct egd {
@@ -75,17 +78,21 @@ struct egd {
        struct fakecorridor fakecorr[FCSIZ];
 };
 
+/***
+ **    formerly epri.h -- temple priest extension
+ */
 struct epri {
        aligntyp shralign;      /* alignment of priest's shrine */
-                               /* leave as first field to match emin */
        schar shroom;           /* index in rooms */
        coord shrpos;           /* position of shrine */
        d_level shrlevel;       /* level (& dungeon) of shrine */
 };
-
 /* note: roaming priests (no shrine) switch from ispriest to isminion
    (and emin extension) */
 
+/***
+ **    formerly eshk.h -- shopkeeper extension
+ */
 #define REPAIR_DELAY   5       /* minimum delay between shop damage & repair */
 #define BILLSZ 200
 
@@ -117,16 +124,18 @@ struct eshk {
        char shknam[PL_NSIZ];
 };
 
-#define NOTANGRY(mon)  ((mon)->mpeaceful)
-#define ANGRY(mon)     (!NOTANGRY(mon))
-
+/***
+ **    formerly emin.h -- minion extension
+ */
 struct emin {
        aligntyp min_align;     /* alignment of minion */
        boolean  renegade;      /* hostile co-aligned priest or Angel */
 };
 
-/*     various types of pet food, the lower, the better liked. */
-
+/***
+ **    formerly edog.h -- pet extension
+ */
+/*     various types of pet food, the lower, the better liked */
 #define DOGFOOD 0
 #define CADAVER 1
 #define ACCFOOD 2
@@ -149,6 +158,9 @@ struct edog {
        Bitfield(killed_by_u, 1);       /* you attempted to kill him */
 };
 
+/***
+ **    mextra.h -- collection of all monster extensions
+ */
 struct mextra {
        char *mname;
        struct egd *egd;
index 29c270dfefb279e0af030335296a863fae8999c5..1293a9bc7de0de8d650ed9841eb89c803e8b17bc 100644 (file)
--- a/src/shk.c
+++ b/src/shk.c
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)shk.c      3.5     2005/07/06      */
+/*     SCCS Id: @(#)shk.c      3.5     2006/01/09      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -18,6 +18,8 @@ STATIC_DCL void FDECL(call_kops, (struct monst *,BOOLEAN_P));
 STATIC_DCL void FDECL(kops_gone, (BOOLEAN_P));
 #endif /* KOPS */
 
+#define NOTANGRY(mon)  ((mon)->mpeaceful)
+#define ANGRY(mon)     (!NOTANGRY(mon))
 #define IS_SHOP(x)     (rooms[x].rtype >= SHOPBASE)
 
 extern const struct shclass shtypes[]; /* defined in shknam.c */