]> granicus.if.org Git - nethack/commit
code change - oextra
authornethack.allison <nethack.allison>
Fri, 14 Apr 2006 16:23:56 +0000 (16:23 +0000)
committernethack.allison <nethack.allison>
Fri, 14 Apr 2006 16:23:56 +0000 (16:23 +0000)
commitf55210be79067bbdcea2376463e757bdab6b6be7
tree63e1389cb7b30f8a5bf8f4d5ce926cd552bf579b
parentf9314448f76409a617a345f35996a0fdf1754b5b
code change - oextra

move oattached and oname and other things that vary
the size of the obj structure into a separate
non-adjacent oextra structure, similar to what has
already been done for mextra. The obj structure
itself becomes a fixed size.

New macros:

#define ONAME(o) ((o)->oextra->oname)
#define OMID(o) ((o)->oextra->omid)
#define OMONST(o) ((o)->oextra->omonst)
#define OLONG(o) ((o)->oextra->olong)
#define OMAILCMD(o) ((o)->oextra->omailcmd)

#define has_oname(o) ((o)->oextra && ONAME(o))
#define has_omid(o) ((o)->oextra && OMID(o))
#define has_omonst(o) ((o)->oextra && OMONST(o))
#define has_olong(o) ((o)->oextra && OLONG(o))
#define has_omailcmd(o) ((o)->oextra && OMAILCMD(o))

changed macros:
has_name(mon) becomes has_mname(mon)  to correspond.

The CVS repository was tagged with
NETHACK_PRE_OEXTRA
before commiting these, and
tagged with
NETHACK_POST_OEXTRA
immediately after. The diff
between those two tags is this oextra patch.

The associated mail daemon changes to use an oextra
structure instead of a hidden command located in the
name after the terminating NUL, have not been tried
or tested.
31 files changed:
doc/fixes35.0
include/extern.h
include/mextra.h
include/obj.h
include/patchlevel.h
src/artifact.c
src/bones.c
src/cmd.c
src/do_name.c
src/dog.c
src/dothrow.c
src/eat.c
src/end.c
src/invent.c
src/mail.c
src/makemon.c
src/mkobj.c
src/mon.c
src/mplayer.c
src/music.c
src/objnam.c
src/pray.c
src/read.c
src/restore.c
src/save.c
src/shk.c
src/steed.c
src/timeout.c
src/trap.c
src/wield.c
src/zap.c