mextra.h comments (trunk only)
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.
This commit is contained in:
+20
-8
@@ -57,10 +57,13 @@
|
|||||||
* packaged up.
|
* packaged up.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/***
|
||||||
|
** formerly vault.h -- vault guard extension
|
||||||
|
*/
|
||||||
#define FCSIZ (ROWNO+COLNO)
|
#define FCSIZ (ROWNO+COLNO)
|
||||||
|
|
||||||
struct fakecorridor {
|
struct fakecorridor {
|
||||||
xchar fx,fy,ftyp;
|
xchar fx, fy, ftyp;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct egd {
|
struct egd {
|
||||||
@@ -75,17 +78,21 @@ struct egd {
|
|||||||
struct fakecorridor fakecorr[FCSIZ];
|
struct fakecorridor fakecorr[FCSIZ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/***
|
||||||
|
** formerly epri.h -- temple priest extension
|
||||||
|
*/
|
||||||
struct epri {
|
struct epri {
|
||||||
aligntyp shralign; /* alignment of priest's shrine */
|
aligntyp shralign; /* alignment of priest's shrine */
|
||||||
/* leave as first field to match emin */
|
|
||||||
schar shroom; /* index in rooms */
|
schar shroom; /* index in rooms */
|
||||||
coord shrpos; /* position of shrine */
|
coord shrpos; /* position of shrine */
|
||||||
d_level shrlevel; /* level (& dungeon) of shrine */
|
d_level shrlevel; /* level (& dungeon) of shrine */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* note: roaming priests (no shrine) switch from ispriest to isminion
|
/* note: roaming priests (no shrine) switch from ispriest to isminion
|
||||||
(and emin extension) */
|
(and emin extension) */
|
||||||
|
|
||||||
|
/***
|
||||||
|
** formerly eshk.h -- shopkeeper extension
|
||||||
|
*/
|
||||||
#define REPAIR_DELAY 5 /* minimum delay between shop damage & repair */
|
#define REPAIR_DELAY 5 /* minimum delay between shop damage & repair */
|
||||||
#define BILLSZ 200
|
#define BILLSZ 200
|
||||||
|
|
||||||
@@ -117,16 +124,18 @@ struct eshk {
|
|||||||
char shknam[PL_NSIZ];
|
char shknam[PL_NSIZ];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NOTANGRY(mon) ((mon)->mpeaceful)
|
/***
|
||||||
#define ANGRY(mon) (!NOTANGRY(mon))
|
** formerly emin.h -- minion extension
|
||||||
|
*/
|
||||||
struct emin {
|
struct emin {
|
||||||
aligntyp min_align; /* alignment of minion */
|
aligntyp min_align; /* alignment of minion */
|
||||||
boolean renegade; /* hostile co-aligned priest or Angel */
|
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 DOGFOOD 0
|
||||||
#define CADAVER 1
|
#define CADAVER 1
|
||||||
#define ACCFOOD 2
|
#define ACCFOOD 2
|
||||||
@@ -149,6 +158,9 @@ struct edog {
|
|||||||
Bitfield(killed_by_u, 1); /* you attempted to kill him */
|
Bitfield(killed_by_u, 1); /* you attempted to kill him */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/***
|
||||||
|
** mextra.h -- collection of all monster extensions
|
||||||
|
*/
|
||||||
struct mextra {
|
struct mextra {
|
||||||
char *mname;
|
char *mname;
|
||||||
struct egd *egd;
|
struct egd *egd;
|
||||||
|
|||||||
@@ -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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* 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));
|
STATIC_DCL void FDECL(kops_gone, (BOOLEAN_P));
|
||||||
#endif /* KOPS */
|
#endif /* KOPS */
|
||||||
|
|
||||||
|
#define NOTANGRY(mon) ((mon)->mpeaceful)
|
||||||
|
#define ANGRY(mon) (!NOTANGRY(mon))
|
||||||
#define IS_SHOP(x) (rooms[x].rtype >= SHOPBASE)
|
#define IS_SHOP(x) (rooms[x].rtype >= SHOPBASE)
|
||||||
|
|
||||||
extern const struct shclass shtypes[]; /* defined in shknam.c */
|
extern const struct shclass shtypes[]; /* defined in shknam.c */
|
||||||
|
|||||||
Reference in New Issue
Block a user