]> granicus.if.org Git - nethack/commitdiff
obj change to support some upcoming work
authornhmall <mjnh@persona.ca>
Sat, 21 Mar 2015 14:46:11 +0000 (10:46 -0400)
committernhmall <mjnh@persona.ca>
Sat, 21 Mar 2015 14:46:11 +0000 (10:46 -0400)
This is an enabling patch for upcoming work. It breaks
save/bones so editlevel is incremented.

I'd like to a second overloadable int field in struct obj,
instead of just the one that is typically overloaded - corpsenm.

The second one can be used for things that are being tallied
up as opposed to a static one time assignment for reference/linkage
purposes.

The differentiation will allow both uses to co-exist for the
same object.

include/obj.h
include/patchlevel.h

index f4fd7800701e337d668378edf799e461f4f5d16c..7af927919224213794953af2b5a5d1ab02c6a34c 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.5 obj.h   $NHDT-Date$  $NHDT-Branch$:$NHDT-Revision$ */
+/* NetHack 3.5 obj.h   $NHDT-Date: 1426949157 2015/03/21 14:45:57 $  $NHDT-Branch: master $:$NHDT-Revision: 1.36 $ */
 /* NetHack 3.5 obj.h   $Date: 2012/01/10 17:47:16 $  $Revision: 1.31 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -107,9 +107,10 @@ struct obj {
 
        int     corpsenm;       /* type of corpse is mons[corpsenm] */
 #define leashmon  corpsenm     /* gets m_id of attached pet */
-#define spestudied corpsenm    /* # of times a spellbook has been studied */
 #define fromsink  corpsenm     /* a potion from a sink */
 #define record_achieve_special corpsenm
+       int usecount;           /* overloaded for various things that tally */
+#define spestudied usecount    /* # of times a spellbook has been studied */
        unsigned oeaten;        /* nutrition left in food, if partly eaten */
        long age;               /* creation date */
        long owornmask;
index 02b8b3bfa6a4df59073bdfbd961a6a8e4accdf39..eab90e89fd59822291b62e9c2f2f87394733fb51 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.5 patchlevel.h    $NHDT-Date$  $NHDT-Branch$:$NHDT-Revision$ */
+/* NetHack 3.5 patchlevel.h    $NHDT-Date: 1426948844 2015/03/21 14:40:44 $  $NHDT-Branch: master $:$NHDT-Revision: 1.95 $ */
 /* NetHack 3.5 patchlevel.h    $Date: 2012/04/14 08:31:03 $  $Revision: 1.93 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
  * Incrementing EDITLEVEL can be used to force invalidation of old bones
  * and save files.
  */
-#define EDITLEVEL      57
+#define EDITLEVEL      58
 
 #define COPYRIGHT_BANNER_A \
-"NetHack, Copyright 1985-2012"
+"NetHack, Copyright 1985-2015"
 #define COPYRIGHT_BANNER_B \
 "         By Stichting Mathematisch Centrum and M. Stephenson."
          /* COPYRIGHT_BANNER_C is generated by makedefs into date.h */