Add typedef mmflags_t to assure enough bits for all MM_* flags.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -71,7 +71,7 @@ make_familiar(struct obj *otmp, xchar x, xchar y, boolean quietly)
|
||||
int chance, trycnt = 100;
|
||||
|
||||
do {
|
||||
long mmflags;
|
||||
mmflags_nht mmflags;
|
||||
int cgend, mndx;
|
||||
|
||||
if (otmp) { /* figurine; otherwise spell */
|
||||
|
||||
@@ -18,7 +18,7 @@ static boolean uncommon(int);
|
||||
static int align_shift(struct permonst *);
|
||||
static boolean mk_gen_ok(int, unsigned, unsigned);
|
||||
static boolean wrong_elem_type(struct permonst *);
|
||||
static void m_initgrp(struct monst *, int, int, int, int);
|
||||
static void m_initgrp(struct monst *, int, int, int, mmflags_nht);
|
||||
static void m_initthrow(struct monst *, int, int);
|
||||
static void m_initweap(struct monst *);
|
||||
static void m_initinv(struct monst *);
|
||||
@@ -71,7 +71,7 @@ wrong_elem_type(struct permonst *ptr)
|
||||
|
||||
/* make a group just like mtmp */
|
||||
static void
|
||||
m_initgrp(struct monst *mtmp, int x, int y, int n, int mmflags)
|
||||
m_initgrp(struct monst *mtmp, int x, int y, int n, mmflags_nht mmflags)
|
||||
{
|
||||
coord mm;
|
||||
register int cnt = rnd(n);
|
||||
@@ -1114,7 +1114,7 @@ makemon_rnd_goodpos(struct monst *mon, long gpflags, coord *cc)
|
||||
*/
|
||||
struct monst *
|
||||
makemon(register struct permonst *ptr,
|
||||
register int x, register int y, long mmflags)
|
||||
register int x, register int y, mmflags_nht mmflags)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
struct monst fakemon;
|
||||
|
||||
@@ -3024,7 +3024,7 @@ create_particular_creation(struct _create_particular_data* d)
|
||||
whichpm = &mons[d->which];
|
||||
}
|
||||
for (i = 0; i < d->quan; i++) {
|
||||
long mmflags = NO_MM_FLAGS;
|
||||
mmflags_nht mmflags = NO_MM_FLAGS;
|
||||
|
||||
if (d->monclass != MAXMCLASSES)
|
||||
whichpm = mkclass(d->monclass, 0);
|
||||
|
||||
@@ -642,7 +642,7 @@ animate_statue(
|
||||
wary_dog(mon, TRUE);
|
||||
} else {
|
||||
int sgend = (statue->spe & CORPSTAT_GENDER);
|
||||
long mmflags = (NO_MINVENT | MM_NOMSG
|
||||
mmflags_nht mmflags = (NO_MINVENT | MM_NOMSG
|
||||
| ((sgend == CORPSTAT_MALE) ? MM_MALE : 0)
|
||||
| ((sgend == CORPSTAT_FEMALE) ? MM_FEMALE : 0));
|
||||
|
||||
|
||||
@@ -776,7 +776,7 @@ revive(struct obj *corpse, boolean by_hero)
|
||||
coord xy;
|
||||
xchar x, y;
|
||||
boolean one_of;
|
||||
long mmflags = NO_MINVENT | MM_NOWAIT | MM_NOMSG;
|
||||
mmflags_nht mmflags = NO_MINVENT | MM_NOWAIT | MM_NOMSG;
|
||||
int montype, cgend, container_nesting = 0;
|
||||
boolean is_zomb = (mons[corpse->corpsenm].mlet == S_ZOMBIE);
|
||||
|
||||
@@ -5554,7 +5554,7 @@ makewish(void)
|
||||
struct obj *otmp, nothing;
|
||||
long maybe_LL_arti;
|
||||
int tries = 0;
|
||||
int oldwisharti = u.uconduct.wisharti;
|
||||
long oldwisharti = u.uconduct.wisharti;
|
||||
|
||||
promptbuf[0] = '\0';
|
||||
nothing = cg.zeroobj; /* lint suppression; only its address matters */
|
||||
|
||||
Reference in New Issue
Block a user