1 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
2 /* def.obj.h - version 1.0.3 */
7 unsigned o_cnt_id
; /* id of container object is in */
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 */
18 Bitfield(oinvis
, 1); /* not yet implemented */
20 Bitfield(known
, 1); /* exact nature known */
21 Bitfield(dknown
, 1); /* color or text known */
23 Bitfield(unpaid
, 1); /* on some bill */
24 Bitfield(rustfree
, 1);
25 Bitfield(onamelth
, 6);
26 long age
; /* creation date */
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)
39 #define W_CHAIN 04000L
40 long oextra
[1]; /* used for name of ordinary objects - length
41 is flexible; amount for tmp gold objects */
44 extern struct obj
*fobj
;
46 #define newobj(xl) alloc((unsigned)(xl) + sizeof(struct obj))
47 #define ONAME(otmp) ((char *)otmp->oextra)
48 #define OGOLD(otmp) (otmp->oextra[0])