!GOLDOBJ gold in inventory (trunk only)

Simplify the insertion into and removal from of gold in inventory for
the !GOLDOBJ configuration.  If GOLDOBJ ever becomes unconditional this
will be superfluous, but in the mean time it unclutters the container and
drop code.  Also, tweak a recent getobj() hack so that its purpose might
be a bit clearer.
This commit is contained in:
nethack.rankin
2007-01-06 04:53:56 +00:00
parent 15122d269c
commit 21caf64b86
4 changed files with 68 additions and 55 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)extern.h 3.5 2006/07/08 */
/* SCCS Id: @(#)extern.h 3.5 2007/01/05 */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
@@ -878,7 +878,11 @@ E boolean FDECL(obj_here, (struct obj *,int,int));
E boolean NDECL(wearing_armor);
E boolean FDECL(is_worn, (struct obj *));
E struct obj *FDECL(g_at, (int,int));
#ifndef GOLDOBJ
E struct obj *FDECL(mkgoldobj, (long));
E struct obj *NDECL(insert_gold_into_invent);
E void NDECL(remove_gold_from_invent);
#endif
E struct obj *FDECL(getobj, (const char *,const char *));
E int FDECL(ggetobj, (const char *,int (*)(OBJ_P),int,BOOLEAN_P,unsigned *));
E void FDECL(fully_identify_obj, (struct obj *));