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.
This commit is contained in:
nhmall
2015-03-21 10:46:11 -04:00
parent 6fcc030f37
commit e3eb74166f
2 changed files with 6 additions and 5 deletions

View 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;

View 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. */
@@ -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 */