]> granicus.if.org Git - nethack/commit
mextra changes
authornethack.allison <nethack.allison>
Fri, 6 Jan 2006 05:46:03 +0000 (05:46 +0000)
committernethack.allison <nethack.allison>
Fri, 6 Jan 2006 05:46:03 +0000 (05:46 +0000)
commit0dc071bee87fadfc7d447375d0e950e46aeb797d
tree7b20959a8c38f0b2ecb70e184fa4fa7422536cf8
parentcfbc5194aedf27c78536b74d0cf9e1ea617831ef
mextra changes

Note: The CVS repository was tagged with NETHACK_PRE_MEXTRA
prior to application of this patch to allow easy withdrawal if necessary.

Adds a new mextra structure type that has a set
of pointers to various types of monster structures
including:
   mname, egd, epri, eshk, emin, edog

Replaces the mextra bits in the monst structure
with a single pointer called mtmp->mextra of type
(struct mextra *).
The pointer can be null if there are no additional
structures attached. The mextra structure is not
adjacent to the monst structure.

Reduces the in-memory footprint of the monst that
has no other structures attached, at the cost
of adding 6 extra long ints per monster to
the save file

The new mextra structure has the mextra fields
independent of each other, not overlapping as was
the case with previous NetHack versions.
This patch doesn't do anything to capitalize on
that difference however.

Consolidates vault.h, epri.h, eshk.h, emin.h and edog.h
into mextra.h

Adds a macro for checking for whether a monster has
a name:
has_name(monst)

This fixes the magic trap panic
   expels() -> spoteffects() -> dotrap() ->
domagictrap() -> tamedog()
because the monst no longer varies in size so no
replacement is required.
39 files changed:
Files
include/extern.h
include/hack.h
include/monst.h
include/patchlevel.h
include/permonst.h
src/apply.c
src/cmd.c
src/dig.c
src/do_name.c
src/dog.c
src/dogmove.c
src/dokick.c
src/dothrow.c
src/eat.c
src/end.c
src/makemon.c
src/mhitm.c
src/mhitu.c
src/minion.c
src/mkobj.c
src/mon.c
src/monst.c
src/mplayer.c
src/muse.c
src/music.c
src/pline.c
src/pray.c
src/priest.c
src/restore.c
src/save.c
src/shk.c
src/shknam.c
src/sounds.c
src/steed.c
src/timeout.c
src/trap.c
src/vault.c
src/zap.c