1: /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
   2: /* def.obj.h - version 1.0.3 */
   3: 
   4: struct obj {
   5:     struct obj *nobj;
   6:     unsigned o_id;
   7:     unsigned o_cnt_id;      /* id of container object is in */
   8:     xchar ox,oy;
   9:     xchar odx,ody;
  10:     uchar otyp;
  11:     uchar owt;
  12:     uchar quan;     /* use oextra for tmp gold objects */
  13:     schar spe;      /* quality of weapon, armor or ring (+ or -)
  14: 				   number of charges for wand ( >= -1 )
  15: 				   special for uball and amulet %% BAH */
  16:     char olet;
  17:     char invlet;
  18:     EasyBitfield(oinvis,1); /* not yet implemented */
  19:     EasyBitfield(odispl,1);
  20:     EasyBitfield(known,1);  /* exact nature known */
  21:     EasyBitfield(dknown,1); /* color or text known */
  22:     EasyBitfield(cursed,1);
  23:     EasyBitfield(unpaid,1); /* on some bill */
  24:     EasyBitfield(rustfree,1);
  25:     EasyBitfield(onamelth,6);
  26:     long age;       /* creation date */
  27:     long owornmask;
  28: #define W_ARM   01L
  29: #define W_ARM2  02L
  30: #define W_ARMH  04L
  31: #define W_ARMS  010L
  32: #define W_ARMG  020L
  33: #define W_ARMOR     (W_ARM | W_ARM2 | W_ARMH | W_ARMS | W_ARMG)
  34: #define W_RINGL 010000L /* make W_RINGL = RING_LEFT (see uprop) */
  35: #define W_RINGR 020000L
  36: #define W_RING      (W_RINGL | W_RINGR)
  37: #define W_WEP   01000L
  38: #define W_BALL  02000L
  39: #define W_CHAIN 04000L
  40:     long oextra[1];     /* used for name of ordinary objects - length
  41: 				   is flexible; amount for tmp gold objects */
  42: };
  43: 
  44: extern struct obj *fobj;
  45: 
  46: #define newobj(xl)  (struct obj *) alloc((unsigned)(xl) + sizeof(struct obj))
  47: #define ONAME(otmp) ((char *) otmp->oextra)
  48: #define OGOLD(otmp) (otmp->oextra[0])

Defined struct's

obj defined in line 4; used 498 times

Defined macros

OGOLD defined in line 48; used 2 times
W_BALL defined in line 38; used 3 times
W_CHAIN defined in line 39; used 2 times

Usage of this include

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