Add typedef mmflags_t to assure enough bits for all MM_* flags.

This commit is contained in:
nhkeni
2022-03-17 17:14:12 -04:00
parent f8830e69e2
commit fc5e991b06
8 changed files with 12 additions and 10 deletions

View File

@@ -1229,7 +1229,7 @@ extern void newmonhp(struct monst *, int);
extern struct mextra *newmextra(void);
extern void copy_mextra(struct monst *, struct monst *);
extern void dealloc_mextra(struct monst *);
extern struct monst *makemon(struct permonst *, int, int, long);
extern struct monst *makemon(struct permonst *, int, int, mmflags_nht);
extern struct monst *unmakemon(struct monst *, long);
extern boolean create_critters(int, struct permonst *, boolean);
extern struct permonst *rndmonst(void);

View File

@@ -263,6 +263,8 @@ typedef struct sortloot_item Loot;
|| (g.context.warntype.species \
&& (g.context.warntype.species == (mon)->data))))
typedef uint32_t mmflags_nht; /* makemon MM_ flags */
#include "trap.h"
#include "flag.h"
#include "vision.h"

View File

@@ -138,7 +138,7 @@ typedef struct {
paralyzed, stunned, confused, waiting;
long seentraps;
short has_invent;
long mm_flags; /* makemon flags */
mmflags_nht mm_flags; /* makemon flags */
} monster;
typedef struct {