Add typedef mmflags_t to assure enough bits for all MM_* flags.
This commit is contained in:
+1
-1
@@ -1229,7 +1229,7 @@ extern void newmonhp(struct monst *, int);
|
|||||||
extern struct mextra *newmextra(void);
|
extern struct mextra *newmextra(void);
|
||||||
extern void copy_mextra(struct monst *, struct monst *);
|
extern void copy_mextra(struct monst *, struct monst *);
|
||||||
extern void dealloc_mextra(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 struct monst *unmakemon(struct monst *, long);
|
||||||
extern boolean create_critters(int, struct permonst *, boolean);
|
extern boolean create_critters(int, struct permonst *, boolean);
|
||||||
extern struct permonst *rndmonst(void);
|
extern struct permonst *rndmonst(void);
|
||||||
|
|||||||
@@ -263,6 +263,8 @@ typedef struct sortloot_item Loot;
|
|||||||
|| (g.context.warntype.species \
|
|| (g.context.warntype.species \
|
||||||
&& (g.context.warntype.species == (mon)->data))))
|
&& (g.context.warntype.species == (mon)->data))))
|
||||||
|
|
||||||
|
typedef uint32_t mmflags_nht; /* makemon MM_ flags */
|
||||||
|
|
||||||
#include "trap.h"
|
#include "trap.h"
|
||||||
#include "flag.h"
|
#include "flag.h"
|
||||||
#include "vision.h"
|
#include "vision.h"
|
||||||
|
|||||||
+1
-1
@@ -138,7 +138,7 @@ typedef struct {
|
|||||||
paralyzed, stunned, confused, waiting;
|
paralyzed, stunned, confused, waiting;
|
||||||
long seentraps;
|
long seentraps;
|
||||||
short has_invent;
|
short has_invent;
|
||||||
long mm_flags; /* makemon flags */
|
mmflags_nht mm_flags; /* makemon flags */
|
||||||
} monster;
|
} monster;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ make_familiar(struct obj *otmp, xchar x, xchar y, boolean quietly)
|
|||||||
int chance, trycnt = 100;
|
int chance, trycnt = 100;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
long mmflags;
|
mmflags_nht mmflags;
|
||||||
int cgend, mndx;
|
int cgend, mndx;
|
||||||
|
|
||||||
if (otmp) { /* figurine; otherwise spell */
|
if (otmp) { /* figurine; otherwise spell */
|
||||||
|
|||||||
+3
-3
@@ -18,7 +18,7 @@ static boolean uncommon(int);
|
|||||||
static int align_shift(struct permonst *);
|
static int align_shift(struct permonst *);
|
||||||
static boolean mk_gen_ok(int, unsigned, unsigned);
|
static boolean mk_gen_ok(int, unsigned, unsigned);
|
||||||
static boolean wrong_elem_type(struct permonst *);
|
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_initthrow(struct monst *, int, int);
|
||||||
static void m_initweap(struct monst *);
|
static void m_initweap(struct monst *);
|
||||||
static void m_initinv(struct monst *);
|
static void m_initinv(struct monst *);
|
||||||
@@ -71,7 +71,7 @@ wrong_elem_type(struct permonst *ptr)
|
|||||||
|
|
||||||
/* make a group just like mtmp */
|
/* make a group just like mtmp */
|
||||||
static void
|
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;
|
coord mm;
|
||||||
register int cnt = rnd(n);
|
register int cnt = rnd(n);
|
||||||
@@ -1114,7 +1114,7 @@ makemon_rnd_goodpos(struct monst *mon, long gpflags, coord *cc)
|
|||||||
*/
|
*/
|
||||||
struct monst *
|
struct monst *
|
||||||
makemon(register struct permonst *ptr,
|
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;
|
register struct monst *mtmp;
|
||||||
struct monst fakemon;
|
struct monst fakemon;
|
||||||
|
|||||||
+1
-1
@@ -3024,7 +3024,7 @@ create_particular_creation(struct _create_particular_data* d)
|
|||||||
whichpm = &mons[d->which];
|
whichpm = &mons[d->which];
|
||||||
}
|
}
|
||||||
for (i = 0; i < d->quan; i++) {
|
for (i = 0; i < d->quan; i++) {
|
||||||
long mmflags = NO_MM_FLAGS;
|
mmflags_nht mmflags = NO_MM_FLAGS;
|
||||||
|
|
||||||
if (d->monclass != MAXMCLASSES)
|
if (d->monclass != MAXMCLASSES)
|
||||||
whichpm = mkclass(d->monclass, 0);
|
whichpm = mkclass(d->monclass, 0);
|
||||||
|
|||||||
+1
-1
@@ -642,7 +642,7 @@ animate_statue(
|
|||||||
wary_dog(mon, TRUE);
|
wary_dog(mon, TRUE);
|
||||||
} else {
|
} else {
|
||||||
int sgend = (statue->spe & CORPSTAT_GENDER);
|
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_MALE) ? MM_MALE : 0)
|
||||||
| ((sgend == CORPSTAT_FEMALE) ? MM_FEMALE : 0));
|
| ((sgend == CORPSTAT_FEMALE) ? MM_FEMALE : 0));
|
||||||
|
|
||||||
|
|||||||
@@ -776,7 +776,7 @@ revive(struct obj *corpse, boolean by_hero)
|
|||||||
coord xy;
|
coord xy;
|
||||||
xchar x, y;
|
xchar x, y;
|
||||||
boolean one_of;
|
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;
|
int montype, cgend, container_nesting = 0;
|
||||||
boolean is_zomb = (mons[corpse->corpsenm].mlet == S_ZOMBIE);
|
boolean is_zomb = (mons[corpse->corpsenm].mlet == S_ZOMBIE);
|
||||||
|
|
||||||
@@ -5554,7 +5554,7 @@ makewish(void)
|
|||||||
struct obj *otmp, nothing;
|
struct obj *otmp, nothing;
|
||||||
long maybe_LL_arti;
|
long maybe_LL_arti;
|
||||||
int tries = 0;
|
int tries = 0;
|
||||||
int oldwisharti = u.uconduct.wisharti;
|
long oldwisharti = u.uconduct.wisharti;
|
||||||
|
|
||||||
promptbuf[0] = '\0';
|
promptbuf[0] = '\0';
|
||||||
nothing = cg.zeroobj; /* lint suppression; only its address matters */
|
nothing = cg.zeroobj; /* lint suppression; only its address matters */
|
||||||
|
|||||||
Reference in New Issue
Block a user