# 2.11BSD#431 - /usr/src/games/hack/def.monst.h

##### Macros

    MFAST             X
    MREGEN            X
    MSLOW             X
    MTSZ              X
    NAME              X
    UNDEAD            X
    newmonst          X

##### struct's

    monst             X

       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

- in line 5(2), 50-52(6)
- in /usr/src/games/hack/hack.Decl.c line 17(2), 25(2)
- in /usr/src/games/hack/hack.apply.c line 7(2), 65(2), 192-194(6), 217(2), 233(2), 359(2)
- in /usr/src/games/hack/hack.bones.c line 7(2), 17(2)
- in /usr/src/games/hack/hack.c line 81(2), 470(2), 564(2), 741(2)
- in /usr/src/games/hack/hack.do.c line 11(2), 208(2), 231(2), 252-256(4)
- in /usr/src/games/hack/hack.do_name.c line 51(2), 188(2), 225-235(6), 243(2), 256(2), 266(2)
- in /usr/src/games/hack/hack.dog.c line 6(2), 19-24(4), 35-40(6), 56(2), 69(2), 107-110(4), 381-384(4)
- in /usr/src/games/hack/hack.end.c line 43(2), 118-119(4)
- in /usr/src/games/hack/hack.fight.c line 13(2), 70(2), 84(2), 98-99(4), 131(2), 251(2)
- in /usr/src/games/hack/hack.h line 129(2)
- in /usr/src/games/hack/hack.invent.c line 170-174(4)
- in /usr/src/games/hack/hack.lev.c line 7(2), 104-106(4), 117(2), 190(2)
- in /usr/src/games/hack/hack.main.c line 270(2), 305(2)
- in /usr/src/games/hack/hack.makemon.c line 8(2), 18-28(8), 162(2), 186(2)
- in /usr/src/games/hack/hack.mhitu.c line 5(2), 12(2), 321(2)
- in /usr/src/games/hack/hack.mklev.c line 6(2), 680(2)
- in /usr/src/games/hack/hack.mkmaze.c line 6(2), 24(2)
- in /usr/src/games/hack/hack.mkshop.c line 9(2), 20(2), 120(2), 140(2)
- in /usr/src/games/hack/hack.mon.c line 7(2), 19(2), 110(2), 127(2), 142(2), 160(2), 242-244(4), 455(2), 465(2), 481-486(4), 588(2), 604(2), 616-618(4), 629-631(4), 637(2), 645(2), 660(2), 777(2), 788(2), 817(2), 827-831(4), 841(2)
- in /usr/src/games/hack/hack.potion.c line 7-12(6), 226(2), 376(2)
- in /usr/src/games/hack/hack.pri.c line 188(2), 226(2), 295(2), 470(2), 527(2), 539(2), 556(2), 644(2)
- in /usr/src/games/hack/hack.read.c line 6(2), 97(2), 173(2), 183(2), 376(2)
- in /usr/src/games/hack/hack.save.c line 13(2), 156(2), 200-205(6), 224(2)
- in /usr/src/games/hack/hack.search.c line 6(2), 13(2), 55(2), 118(2), 127(2)
- in /usr/src/games/hack/hack.shk.c line 7(2), 22(2), 39(2), 66(2), 72(2), 86(2), 98(2), 157(2), 229(2), 291(2), 308(2), 490(2), 762(2), 781-783(4), 949(2)
- in /usr/src/games/hack/hack.steal.c line 12(2), 39(2), 64(2), 152(2), 160(2), 179(2)
- in /usr/src/games/hack/hack.trap.c line 6(2), 138(2)
- in /usr/src/games/hack/hack.unix.c line 325-328(4), 352(2)
- in /usr/src/games/hack/hack.vault.c line 8-9(4), 16(2), 32(2), 71(2), 253(2)
- in /usr/src/games/hack/hack.wizard.c line 8(2), 18(2), 37(2), 83(2), 169(2), 179-181(4)
- in /usr/src/games/hack/hack.worm.c line 12(2), 22(2), 34(2), 61(2), 73(2), 85(2), 111-116(4)
- in /usr/src/games/hack/hack.zap.c line 7-8(4), 22(2), 190(2), 273(2), 282(2), 296(2), 303(2), 341-344(4), 405(2), 544(2), 582(2)

#### Defined macros

MFAST defined in line 56; used 4 times

- in /usr/src/games/hack/hack.mon.c line 69
- in /usr/src/games/hack/hack.potion.c line 278
- in /usr/src/games/hack/hack.wizard.c line 149
- in /usr/src/games/hack/hack.zap.c line 39

MREGEN defined in line 59; used 2 times

- in /usr/src/games/hack/hack.lev.c line 208
- in /usr/src/games/hack/hack.mon.c line 172

MSLOW defined in line 55; used 3 times

- in /usr/src/games/hack/hack.mon.c line 60
- in /usr/src/games/hack/hack.wizard.c line 146
- in /usr/src/games/hack/hack.zap.c line 36

MTSZ defined in line 10; used 5 times

- in line 11
- in /usr/src/games/hack/hack.dog.c line 328, 356
- in /usr/src/games/hack/hack.mon.c line 393, 428

NAME defined in line 58; used 6 times

- in /usr/src/games/hack/hack.do_name.c line 89, 192, 219
- in /usr/src/games/hack/hack.dog.c line 409(2)
- in /usr/src/games/hack/hack.end.c line 51

UNDEAD defined in line 60; used 5 times

- in /usr/src/games/hack/hack.fight.c line 192
- in /usr/src/games/hack/hack.mhitu.c line 65
- in /usr/src/games/hack/hack.mon.c line 386
- in /usr/src/games/hack/hack.zap.c line 42, 568

newmonst defined in line 48; used 5 times

- in /usr/src/games/hack/hack.do_name.c line 84
- in /usr/src/games/hack/hack.dog.c line 406
- in /usr/src/games/hack/hack.makemon.c line 46
- in /usr/src/games/hack/hack.save.c line 221
- in /usr/src/games/hack/hack.worm.c line 136

#### Usage of this include

def.monst.h used 1 times

- in /usr/src/games/hack/hack.h line 22

Last modified: 1985-10-14 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 609 |