summaryrefslogtreecommitdiff
path: root/games/hack/def.obj.h
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-18 08:53:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-18 08:53:40 +0000
commitd6583bb2a13f329cf0332ef2570eb8bb8fc0e39c (patch)
treeece253b876159b39c620e62b6c9b1174642e070e /games/hack/def.obj.h
initial import of NetBSD tree
Diffstat (limited to 'games/hack/def.obj.h')
-rw-r--r--games/hack/def.obj.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/games/hack/def.obj.h b/games/hack/def.obj.h
new file mode 100644
index 00000000000..897046f23bb
--- /dev/null
+++ b/games/hack/def.obj.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
+ *
+ * $NetBSD: def.obj.h,v 1.3 1995/03/23 08:29:32 cgd Exp $
+ */
+
+struct obj {
+ struct obj *nobj;
+ unsigned o_id;
+ unsigned o_cnt_id; /* id of container object is in */
+ xchar ox,oy;
+ xchar odx,ody;
+ uchar otyp;
+ uchar owt;
+ uchar quan; /* use oextra for tmp gold objects */
+ schar spe; /* quality of weapon, armor or ring (+ or -)
+ number of charges for wand ( >= -1 )
+ special for uball and amulet %% BAH */
+ char olet;
+ char invlet;
+ Bitfield(oinvis,1); /* not yet implemented */
+ Bitfield(odispl,1);
+ Bitfield(known,1); /* exact nature known */
+ Bitfield(dknown,1); /* color or text known */
+ Bitfield(cursed,1);
+ Bitfield(unpaid,1); /* on some bill */
+ Bitfield(rustfree,1);
+ Bitfield(onamelth,6);
+ long age; /* creation date */
+ long owornmask;
+#define W_ARM 01L
+#define W_ARM2 02L
+#define W_ARMH 04L
+#define W_ARMS 010L
+#define W_ARMG 020L
+#define W_ARMOR (W_ARM | W_ARM2 | W_ARMH | W_ARMS | W_ARMG)
+#define W_RINGL 010000L /* make W_RINGL = RING_LEFT (see uprop) */
+#define W_RINGR 020000L
+#define W_RING (W_RINGL | W_RINGR)
+#define W_WEP 01000L
+#define W_BALL 02000L
+#define W_CHAIN 04000L
+ long oextra[1]; /* used for name of ordinary objects - length
+ is flexible; amount for tmp gold objects */
+};
+
+extern struct obj *fobj;
+
+#define newobj(xl) (struct obj *) alloc((unsigned)(xl) + sizeof(struct obj))
+#define ONAME(otmp) ((char *) otmp->oextra)
+#define OGOLD(otmp) (otmp->oextra[0])