mktrap() flags

This started out as a fix for a comment typo, then morphed a bit....
This commit is contained in:
PatR
2024-01-09 17:17:19 -08:00
parent d672ea3051
commit 3f3d5b7bda
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -1522,7 +1522,7 @@ extern void place_branch(branch *, coordxy, coordxy) NO_NNARGS;
extern boolean occupied(coordxy, coordxy); extern boolean occupied(coordxy, coordxy);
extern int okdoor(coordxy, coordxy); extern int okdoor(coordxy, coordxy);
extern void dodoor(coordxy, coordxy, struct mkroom *) NONNULLARG3; extern void dodoor(coordxy, coordxy, struct mkroom *) NONNULLARG3;
extern void mktrap(int, int, struct mkroom *, coord *) NO_NNARGS; extern void mktrap(int, unsigned, struct mkroom *, coord *) NO_NNARGS;
extern void mkstairs(coordxy, coordxy, char, struct mkroom *, boolean); extern void mkstairs(coordxy, coordxy, char, struct mkroom *, boolean);
extern void mkinvokearea(void); extern void mkinvokearea(void);
extern void mineralize(int, int, int, int, boolean); extern void mineralize(int, int, int, int, boolean);
+5 -5
View File
@@ -1341,11 +1341,11 @@ typedef uint32_t mmflags_nht; /* makemon MM_ flags */
#define TELEDS_TELEPORT 2 #define TELEDS_TELEPORT 2
/* flags for mktrap() */ /* flags for mktrap() */
#define MKTRAP_NOFLAGS 0x0 #define MKTRAP_NOFLAGS 0x0U
#define MKTRAP_MAZEFLAG 0x1 /* trap placed on coords as if in maze */ #define MKTRAP_SEEN 0x1U /* trap is seen */
#define MKTRAP_NOSPIDERONWEB 0x2 /* web will not generate a spider */ #define MKTRAP_MAZEFLAG 0x2U /* choose random coords instead of room */
#define MKTRAP_SEEN 0x4 /* trap is seen */ #define MKTRAP_NOSPIDERONWEB 0x4U /* web will not generate a spider */
#define MKTRAP_NOVICTIM 0x8 /* no victim corpse or items on it */ #define MKTRAP_NOVICTIM 0x8U /* no victim corpse or items on it */
#define MON_POLE_DIST 5 /* How far monsters can use pole-weapons */ #define MON_POLE_DIST 5 /* How far monsters can use pole-weapons */
#define PET_MISSILE_RANGE2 36 /* Square of distance within which pets shoot */ #define PET_MISSILE_RANGE2 36 /* Square of distance within which pets shoot */
+1 -1
View File
@@ -1724,7 +1724,7 @@ mktrap_victim(struct trap *ttmp)
void void
mktrap( mktrap(
int num, /* if non-zero, specific type of trap to make */ int num, /* if non-zero, specific type of trap to make */
int mktrapflags, /* MKTRAP_NOSPIDERWEB, WKTRAP_MAZEFLAG */ unsigned mktrapflags, /* MKTRAP_{SEEN,MAZEFLAG,NOSPIDERONWEB,NOVICTIM} */
struct mkroom *croom, /* room to hold trap */ struct mkroom *croom, /* room to hold trap */
coord *tm) /* specific location for trap */ coord *tm) /* specific location for trap */
{ {
+1 -1
View File
@@ -1788,7 +1788,7 @@ create_trap(spltrap *t, struct mkroom *croom)
{ {
coordxy x = -1, y = -1; coordxy x = -1, y = -1;
coord tm; coord tm;
int mktrap_flags = MKTRAP_MAZEFLAG; unsigned mktrap_flags = MKTRAP_MAZEFLAG;
if (t->type == VIBRATING_SQUARE) { if (t->type == VIBRATING_SQUARE) {
pick_vibrasquare_location(); pick_vibrasquare_location();