From: nhmall Date: Sat, 21 Mar 2015 14:46:11 +0000 (-0400) Subject: obj change to support some upcoming work X-Git-Tag: NetHack-3.6.0_RC01~576 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3eb74166fc238a55e8c1dcc0332155855b7ce92;p=nethack obj change to support some upcoming work 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. --- diff --git a/include/obj.h b/include/obj.h index f4fd78007..7af927919 100644 --- a/include/obj.h +++ b/include/obj.h @@ -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; diff --git a/include/patchlevel.h b/include/patchlevel.h index 02b8b3bfa..eab90e89f 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -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. */ @@ -14,10 +14,10 @@ * 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 */