trap followup

Make the flags argument to dotrap() and mintrap() and the constants
passed to them all have consistent type: unsigned int.
This commit is contained in:
PatR
2022-02-24 12:17:21 -08:00
parent 6fa4fd46f7
commit ab2bcf4dac
6 changed files with 37 additions and 33 deletions

View File

@@ -2692,7 +2692,7 @@ extern void reset_utrap(boolean);
extern void dotrap(struct trap *, unsigned);
extern void seetrap(struct trap *);
extern void feeltrap(struct trap *);
extern int mintrap(struct monst *, long);
extern int mintrap(struct monst *, unsigned);
extern void instapetrify(const char *);
extern void minstapetrify(struct monst *, boolean);
extern void selftouch(const char *);

View File

@@ -382,15 +382,15 @@ typedef struct sortloot_item Loot;
#define PICK_RIGID 1
/* Flags to control dotrap() and mintrap() in trap.c */
#define NO_TRAP_FLAGS 0
#define FORCETRAP 0x01 /* triggering not left to chance */
#define NOWEBMSG 0x02 /* suppress stumble into web message */
#define FORCEBUNGLE 0x04 /* adjustments appropriate for bungling */
#define RECURSIVETRAP 0x08 /* trap changed into another type this same turn */
#define TOOKPLUNGE 0x10 /* used '>' to enter pit below you */
#define VIASITTING 0x20 /* #sit while at trap location (affects message) */
#define FAILEDUNTRAP 0x40 /* trap activated by failed untrap attempt */
#define HURTLING 0x80 /* monster is hurtling through air */
#define NO_TRAP_FLAGS 0x00U
#define FORCETRAP 0x01U /* triggering not left to chance */
#define NOWEBMSG 0x02U /* suppress stumble into web message */
#define FORCEBUNGLE 0x04U /* adjustments appropriate for bungling */
#define RECURSIVETRAP 0x08U /* trap changed into another type this same turn */
#define TOOKPLUNGE 0x10U /* used '>' to enter pit below you */
#define VIASITTING 0x20U /* #sit while at trap location (affects message) */
#define FAILEDUNTRAP 0x40U /* trap activated by failed untrap attempt */
#define HURTLING 0x80U /* monster is hurtling through air */
/* Flags to control test_move in hack.c */
#define DO_MOVE 0 /* really doing the move */