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

##### Macros

    AMULET_SYM        X
    ARMOR_SYM         X
    ARM_BONUS         X
    BALL_SYM          X
    CHAIN_SYM         X
    FOOD_SYM          X
    GEM_SYM           X
    ILLOBJ_SYM        X
    IMMEDIATE         X
    NODIR             X
    POTION_SYM        X
    RAY               X
    RING_SYM          X
    ROCK_SYM          X
    SCROLL_SYM        X
    SPEC              X
    TOOL_SYM          X
    WAND_SYM          X
    WEAPON_SYM        X
    a_ac              X
    a_can             X
    bits              X
    g_val             X
    nutrition         X
    wldam             X
    wsdam             X

##### struct's

    objclass          X

       1: /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
       2: /* def.objclass.h - version 1.0.3 */
       3:
       4: /* definition of a class of objects */
       5:
       6: struct objclass {
       7:     char *oc_name;      /* actual name */
       8:     char *oc_descr;     /* description when name unknown */
       9:     char *oc_uname;     /* called by user */
      10:     Bitfield(oc_name_known,1);
      11:     Bitfield(oc_merge,1);   /* merge otherwise equal objects */
      12:     char oc_olet;
      13:     schar oc_prob;      /* probability for mkobj() */
      14:     schar oc_delay;     /* delay when using such an object */
      15:     uchar oc_weight;
      16:     schar oc_oc1, oc_oc2;
      17:     int oc_oi;
      18: #define nutrition   oc_oi   /* for foods */
      19: #define a_ac        oc_oc1  /* for armors - only used in ARM_BONUS */
      20: #define ARM_BONUS(obj)  ((10 - objects[obj->otyp].a_ac) + obj->spe)
      21: #define a_can       oc_oc2  /* for armors */
      22: #define bits        oc_oc1  /* for wands and rings */
      23:                 /* wands */
      24: #define     NODIR       1
      25: #define     IMMEDIATE   2
      26: #define     RAY     4
      27:                 /* rings */
      28: #define     SPEC        1   /* +n is meaningful */
      29: #define wldam       oc_oc1  /* for weapons and PICK_AXE */
      30: #define wsdam       oc_oc2  /* for weapons and PICK_AXE */
      31: #define g_val       oc_oi   /* for gems: value on exit */
      32: };
      33:
      34: extern struct objclass objects[];
      35:
      36: /* definitions of all object-symbols */
      37:
      38: #define ILLOBJ_SYM  '\\'
      39: #define AMULET_SYM  '"'
      40: #define FOOD_SYM    '%'
      41: #define WEAPON_SYM  ')'
      42: #define TOOL_SYM    '('
      43: #define BALL_SYM    '0'
      44: #define CHAIN_SYM   '_'
      45: #define ROCK_SYM    '`'
      46: #define ARMOR_SYM   '['
      47: #define POTION_SYM  '!'
      48: #define SCROLL_SYM  '?'
      49: #define WAND_SYM    '/'
      50: #define RING_SYM    '='
      51: #define GEM_SYM     '*'
      52: /* Other places with explicit knowledge of object symbols:
      53:  * ....shk.c:	char shtypes[] = "=/)%?![";
      54:  * mklev.c:	"=/)%?![<>"
      55:  * hack.mkobj.c:	char mkobjstr[] = "))[[!!!!????%%%%/=**";
      56:  * hack.apply.c:   otmp = getobj("0#%", "put in");
      57:  * hack.eat.c:     otmp = getobj("%", "eat");
      58:  * hack.invent.c:          if(index("!%?[)=*(0/\"", sym)){
      59:  * hack.invent.c:    || index("%?!*",otmp->olet))){
      60:  */

#### Defined struct's

objclass defined in line 6; used 8 times

- in line 34(2)
- in /usr/src/games/hack/def.objects.h line 9(2)
- in /usr/src/games/hack/hack.eat.c line 91(2)
- in /usr/src/games/hack/hack.objnam.c line 36(2)

#### Defined macros

AMULET_SYM defined in line 39; used 12 times

- in /usr/src/games/hack/def.objects.h line 14, 286
- in /usr/src/games/hack/hack.bones.c line 65
- in /usr/src/games/hack/hack.end.c line 156
- in /usr/src/games/hack/hack.mklev.c line 715
- in /usr/src/games/hack/hack.mkmaze.c line 34
- in /usr/src/games/hack/hack.objnam.c line 536
- in /usr/src/games/hack/hack.steal.c line 165
- in /usr/src/games/hack/hack.wizard.c line 26, 40, 52
- in /usr/src/games/hack/hack.zap.c line 94

ARMOR_SYM defined in line 46; used 15 times

- in /usr/src/games/hack/def.objects.h line 143, 287
- in /usr/src/games/hack/hack.cmd.c line 77
- in /usr/src/games/hack/hack.objnam.c line 458
- in /usr/src/games/hack/hack.shk.c line 55
- in /usr/src/games/hack/hack.shknam.c line 166
- in /usr/src/games/hack/hack.u_init.c line 44, 50, 57-65(5), 87, 273

ARM_BONUS defined in line 20; used 6 times

- in /usr/src/games/hack/hack.do_wear.c line 274-278(5)
- in /usr/src/games/hack/hack.shk.c line 723

BALL_SYM defined in line 43; used 5 times

- in /usr/src/games/hack/def.objects.h line 136, 287
- in /usr/src/games/hack/hack.objnam.c line 534
- in /usr/src/games/hack/hack.read.c line 420
- in /usr/src/games/hack/hack.save.c line 148

CHAIN_SYM defined in line 44; used 5 times

- in /usr/src/games/hack/def.objects.h line 138, 287
- in /usr/src/games/hack/hack.read.c line 419
- in /usr/src/games/hack/hack.save.c line 142
- in /usr/src/games/hack/hack.steal.c line 134

FOOD_SYM defined in line 40; used 16 times

- in /usr/src/games/hack/def.objects.h line 17, 286
- in /usr/src/games/hack/hack.do.c line 375
- in /usr/src/games/hack/hack.dog.c line 300
- in /usr/src/games/hack/hack.eat.c line 98
- in /usr/src/games/hack/hack.pri.c line 514, 520
- in /usr/src/games/hack/hack.read.c line 284-287(2), 304
- in /usr/src/games/hack/hack.shk.c line 54, 752
- in /usr/src/games/hack/hack.shknam.c line 169
- in /usr/src/games/hack/hack.u_init.c line 67, 79
- in /usr/src/games/hack/hack.zap.c line 584

GEM_SYM defined in line 51; used 15 times

- in /usr/src/games/hack/def.objects.h line 262, 288
- in /usr/src/games/hack/hack.do.c line 377
- in /usr/src/games/hack/hack.end.c line 145
- in /usr/src/games/hack/hack.mkmaze.c line 65
- in /usr/src/games/hack/hack.mon.c line 364, 468-473(2)
- in /usr/src/games/hack/hack.o_init.c line 36, 79, 85
- in /usr/src/games/hack/hack.objnam.c line 65, 335, 482
- in /usr/src/games/hack/hack.zap.c line 83

ILLOBJ_SYM defined in line 38; used 4 times

- in /usr/src/games/hack/def.objects.h line 12, 282-286(2)
- in /usr/src/games/hack/hack.o_init.c line 32

IMMEDIATE defined in line 25; used 9 times

- in /usr/src/games/hack/def.objects.h line 217-224(8)
- in /usr/src/games/hack/hack.zap.c line 137

NODIR defined in line 24; used 6 times

- in /usr/src/games/hack/def.objects.h line 213-216(4)
- in /usr/src/games/hack/hack.mkobj.c line 100
- in /usr/src/games/hack/hack.zap.c line 134

POTION_SYM defined in line 47; used 12 times

- in /usr/src/games/hack/def.objects.h line 159, 287
- in /usr/src/games/hack/hack.do.c line 291, 306, 368
- in /usr/src/games/hack/hack.objnam.c line 335
- in /usr/src/games/hack/hack.read.c line 284
- in /usr/src/games/hack/hack.shk.c line 55
- in /usr/src/games/hack/hack.shknam.c line 164
- in /usr/src/games/hack/hack.u_init.c line 66, 80, 90

RAY defined in line 26; used 6 times

- in /usr/src/games/hack/def.objects.h line 225-230(6)

RING_SYM defined in line 50; used 7 times

- in /usr/src/games/hack/def.objects.h line 236, 288
- in /usr/src/games/hack/hack.cmd.c line 78
- in /usr/src/games/hack/hack.objnam.c line 335
- in /usr/src/games/hack/hack.shk.c line 54
- in /usr/src/games/hack/hack.shknam.c line 168
- in /usr/src/games/hack/hack.u_init.c line 89

ROCK_SYM defined in line 45; used 5 times

- in /usr/src/games/hack/def.objects.h line 140, 287
- in /usr/src/games/hack/hack.mklev.c line 532
- in /usr/src/games/hack/hack.mkmaze.c line 49, 69

SCROLL_SYM defined in line 48; used 8 times

- in /usr/src/games/hack/def.objects.h line 183, 287
- in /usr/src/games/hack/hack.objnam.c line 335
- in /usr/src/games/hack/hack.shk.c line 54
- in /usr/src/games/hack/hack.shknam.c line 165
- in /usr/src/games/hack/hack.trap.c line 436
- in /usr/src/games/hack/hack.u_init.c line 91
- in /usr/src/games/hack/hack.zap.c line 630

SPEC defined in line 28; used 5 times

- in /usr/src/games/hack/def.objects.h line 252-254(3)
- in /usr/src/games/hack/hack.mkobj.c line 103
- in /usr/src/games/hack/hack.objnam.c line 274

TOOL_SYM defined in line 42; used 12 times

- in /usr/src/games/hack/def.objects.h line 124-134(6), 286
- in /usr/src/games/hack/hack.o_init.c line 49
- in /usr/src/games/hack/hack.u_init.c line 68-74(3), 81

WAND_SYM defined in line 49; used 9 times

- in /usr/src/games/hack/def.objects.h line 211, 288
- in /usr/src/games/hack/hack.objnam.c line 335, 528-532(2)
- in /usr/src/games/hack/hack.shk.c line 54
- in /usr/src/games/hack/hack.shknam.c line 167
- in /usr/src/games/hack/hack.u_init.c line 88, 327

WEAPON_SYM defined in line 41; used 22 times

- in /usr/src/games/hack/def.objects.h line 102, 286
- in /usr/src/games/hack/hack.cmd.c line 76
- in /usr/src/games/hack/hack.do.c line 334
- in /usr/src/games/hack/hack.fight.c line 145, 296
- in /usr/src/games/hack/hack.invent.c line 774
- in /usr/src/games/hack/hack.objnam.c line 523
- in /usr/src/games/hack/hack.shk.c line 54
- in /usr/src/games/hack/hack.shknam.c line 170
- in /usr/src/games/hack/hack.u_init.c line 41-43(3), 49, 55-56(2), 82, 260, 292
- in /usr/src/games/hack/hack.wield.c line 48, 63
- in /usr/src/games/hack/hack.zap.c line 618

a_ac defined in line 19; used 1 times

- in line 20

a_can defined in line 21; used 1 times

- in /usr/src/games/hack/hack.mhitu.c line 69

bits defined in line 22; used 5 times

- in /usr/src/games/hack/hack.mkobj.c line 100-103(2)
- in /usr/src/games/hack/hack.objnam.c line 274
- in /usr/src/games/hack/hack.zap.c line 134-137(2)

g_val defined in line 31; used 4 times

- in /usr/src/games/hack/hack.do.c line 380
- in /usr/src/games/hack/hack.end.c line 147
- in /usr/src/games/hack/hack.mon.c line 366, 470

nutrition defined in line 18; used 8 times

- in /usr/src/games/hack/def.objects.h line 16-17(2)
- in /usr/src/games/hack/hack.dog.c line 314
- in /usr/src/games/hack/hack.eat.c line 179, 197, 211, 218
- in /usr/src/games/hack/hack.shk.c line 753

wldam defined in line 29; used 1 times

- in /usr/src/games/hack/hack.fight.c line 150

wsdam defined in line 30; used 1 times

- in /usr/src/games/hack/hack.fight.c line 154

#### Usage of this include

def.objclass.h used 2 times

- in /usr/src/games/hack/def.objects.h line 6
- in /usr/src/games/hack/hack.h line 16

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