1: /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
   2: /* def.monst.h - version 1.0.2 */
   3: 
   4: struct monst {
   5:     struct monst *nmon;
   6:     struct permonst *data;
   7:     unsigned m_id;
   8:     xchar mx,my;
   9:     xchar mdx,mdy;      /* if mdispl then pos where last displayed */
  10: #define MTSZ    4
  11:     coord mtrack[MTSZ]; /* monster track */
  12:     schar mhp,mhpmax;
  13:     char mappearance;   /* nonzero for undetected 'M's and for '1's */
  14:     EasyBitfield(mimic,1);  /* undetected mimic */
  15:     EasyBitfield(mdispl,1); /* mdx,mdy valid */
  16:     EasyBitfield(minvis,1); /* invisible */
  17:     EasyBitfield(cham,1);   /* shape-changer */
  18:     EasyBitfield(mhide,1);  /* hides beneath objects */
  19:     EasyBitfield(mundetected,1);    /* not seen in present hiding place */
  20:     EasyBitfield(mspeed,2);
  21:     EasyBitfield(msleep,1);
  22:     EasyBitfield(mfleetim,7);   /* timeout for mflee */
  23:     EasyBitfield(mfroz,1);
  24:     EasyBitfield(mconf,1);
  25:     EasyBitfield(mflee,1);  /* fleeing */
  26:     EasyBitfield(mcan,1);   /* has been cancelled */
  27:     EasyBitfield(mtame,1);      /* implies peaceful */
  28:     EasyBitfield(mpeaceful,1);  /* does not attack unprovoked */
  29:     EasyBitfield(isshk,1);  /* is shopkeeper */
  30:     EasyBitfield(isgd,1);   /* is guard */
  31:     EasyBitfield(mcansee,1);    /* cansee 1, temp.blinded 0, blind 0 */
  32:     EasyBitfield(mblinded,7);   /* cansee 0, temp.blinded n, blind 0 */
  33:     EasyBitfield(mtrapped,1);   /* trapped in a pit or bear trap */
  34:     EasyBitfield(mnamelth,6);   /* length of name (following mxlth) */
  35: #ifndef NOWORM
  36:     EasyBitfield(wormno,5); /* at most 31 worms on any level */
  37: #endif NOWORM
  38:     unsigned mtrapseen; /* bitmap of traps we've been trapped in */
  39:     long mlstmv;    /* prevent two moves at once */
  40:     struct obj *minvent;
  41:     long mgold;
  42:     unsigned mxlth;     /* length of following data */
  43:     /* in order to prevent alignment problems mextra should
  44: 	   be (or follow) a long int */
  45:     long mextra[1];     /* monster dependent info */
  46: };
  47: 
  48: #define newmonst(xl)    (struct monst *) alloc((unsigned)(xl) + sizeof(struct monst))
  49: 
  50: extern struct monst *fmon;
  51: extern struct monst *fallen_down;
  52: struct monst *m_at();
  53: 
  54: /* these are in mspeed */
  55: #define MSLOW 1 /* slow monster */
  56: #define MFAST 2 /* speeded monster */
  57: 
  58: #define NAME(mtmp)  (((char *) mtmp->mextra) + mtmp->mxlth)
  59: #define MREGEN      "TVi1"
  60: #define UNDEAD      "ZVW "

Defined struct's

monst defined in line 4; used 400 times

Defined macros

MREGEN defined in line 59; used 2 times
MTSZ defined in line 10; used 5 times

Usage of this include

Last modified: 1985-10-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2347
Valid CSS Valid XHTML 1.0 Strict