Annotation of 43BSDTahoe/games/hack/def.obj.h, revision 1.1

1.1     ! root        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:        Bitfield(oinvis,1);     /* not yet implemented */
        !            19:        Bitfield(odispl,1);
        !            20:        Bitfield(known,1);      /* exact nature known */
        !            21:        Bitfield(dknown,1);     /* color or text known */
        !            22:        Bitfield(cursed,1);
        !            23:        Bitfield(unpaid,1);     /* on some bill */
        !            24:        Bitfield(rustfree,1);
        !            25:        Bitfield(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])

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.