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.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)music.c 3.5 2003/05/25 */
|
||||
/* SCCS Id: @(#)music.c 3.5 2006/04/14 */
|
||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -330,7 +330,7 @@ do_pit: chasm = maketrap(x,y,PIT);
|
||||
else {
|
||||
You("destroy %s!", mtmp->mtame ?
|
||||
x_monnam(mtmp, ARTICLE_THE, "poor",
|
||||
(has_name(mtmp)) ? SUPPRESS_SADDLE : 0, FALSE):
|
||||
(has_mname(mtmp)) ? SUPPRESS_SADDLE : 0, FALSE):
|
||||
mon_nam(mtmp));
|
||||
}
|
||||
xkilled(mtmp,0);
|
||||
|
||||
Reference in New Issue
Block a user