#ifdef REDO
-static char NDECL(popch);
+STATIC_DCL char NDECL(popch);
/* Provide a means to redo the last command. The flag `in_doagain' is set
* to true while redoing the command. This flag is tested in commands that
static char pushq[BSIZE], saveq[BSIZE];
static NEARDATA int phead, ptail, shead, stail;
-static char
+STATIC_OVL char
popch() {
/* If occupied, return '\0', letting tgetch know a character should
* be read from the keyboard. If the character read is not the
#define DATAPREFIX 4
+#if defined(OVERLAY)
+# define STATIC_DCL extern
+# define STATIC_OVL
+#else /* !OVERLAY */
+# define STATIC_DCL static
+# define STATIC_OVL static
+#endif /* OVERLAY */
+
#ifdef DLB
/*
* Data librarian. Present a STDIO-like interface to NetHack while
#define MAX_LIBS 4
static library dlb_libs[MAX_LIBS];
-static boolean FDECL(readlibdir,(library *lp));
-static boolean FDECL(find_file,(const char *name, library **lib, long *startp,
+STATIC_DCL boolean FDECL(readlibdir,(library *lp));
+STATIC_DCL boolean FDECL(find_file,(const char *name, library **lib, long *startp,
long *sizep));
-static boolean NDECL(lib_dlb_init);
-static void NDECL(lib_dlb_cleanup);
-static boolean FDECL(lib_dlb_fopen,(dlb *, const char *, const char *));
-static int FDECL(lib_dlb_fclose,(dlb *));
-static int FDECL(lib_dlb_fread,(char *, int, int, dlb *));
-static int FDECL(lib_dlb_fseek,(dlb *, long, int));
-static char *FDECL(lib_dlb_fgets,(char *, int, dlb *));
-static int FDECL(lib_dlb_fgetc,(dlb *));
-static long FDECL(lib_dlb_ftell,(dlb *));
+STATIC_DCL boolean NDECL(lib_dlb_init);
+STATIC_DCL void NDECL(lib_dlb_cleanup);
+STATIC_DCL boolean FDECL(lib_dlb_fopen,(dlb *, const char *, const char *));
+STATIC_DCL int FDECL(lib_dlb_fclose,(dlb *));
+STATIC_DCL int FDECL(lib_dlb_fread,(char *, int, int, dlb *));
+STATIC_DCL int FDECL(lib_dlb_fseek,(dlb *, long, int));
+STATIC_DCL char *FDECL(lib_dlb_fgets,(char *, int, dlb *));
+STATIC_DCL int FDECL(lib_dlb_fgetc,(dlb *));
+STATIC_DCL long FDECL(lib_dlb_ftell,(dlb *));
/* not static because shared with dlb_main.c */
boolean FDECL(open_library,(const char *lib_name, library *lp));
*
* Return TRUE on success, FALSE on failure.
*/
-static boolean
+STATIC_OVL boolean
readlibdir(lp)
library *lp; /* library pointer to fill in */
{
* Look for the file in our directory structure. Return 1 if successful,
* 0 if not found. Fill in the size and starting position.
*/
-static boolean
+STATIC_OVL boolean
find_file(name, lib, startp, sizep)
const char *name;
library **lib;
* Open the library file once using stdio. Keep it open, but
* keep track of the file position.
*/
-static boolean
+STATIC_OVL boolean
lib_dlb_init()
{
/* zero out array */
return TRUE;
}
-static void
+STATIC_OVL void
lib_dlb_cleanup()
{
int i;
close_library(&dlb_libs[i]);
}
-static boolean
+STATIC_OVL boolean
lib_dlb_fopen(dp, name, mode)
dlb *dp;
const char *name, *mode;
return FALSE; /* failed */
}
-static int
+STATIC_OVL int
lib_dlb_fclose(dp)
dlb *dp;
{
return 0;
}
-static int
+STATIC_OVL int
lib_dlb_fread(buf, size, quan, dp)
char *buf;
int size, quan;
return nread;
}
-static int
+STATIC_OVL int
lib_dlb_fseek(dp, pos, whence)
dlb *dp;
long pos;
return 0;
}
-static char *
+STATIC_OVL char *
lib_dlb_fgets(buf, len, dp)
char *buf;
int len;
return buf;
}
-static int
+STATIC_OVL int
lib_dlb_fgetc(dp)
dlb *dp;
{
}
-static long
+STATIC_OVL long
lib_dlb_ftell(dp)
dlb *dp;
{
#include "hack.h"
STATIC_DCL void FDECL(do_oname, (struct obj *));
-static void FDECL(getpos_help, (BOOLEAN_P,const char *));
+STATIC_DCL void FDECL(getpos_help, (BOOLEAN_P,const char *));
extern const char what_is_an_unknown_object[]; /* from pager.c */
/* the response for '?' help request in getpos() */
-static void
+STATIC_OVL void
getpos_help(force, goal)
boolean force;
const char *goal;
#if defined(AMIGA) && !defined(AZTEC_C) && !defined(__SASC_60) && !defined(_DCC) && !defined(__GNUC__)
extern struct tm *FDECL(localtime,(time_t *));
#endif
-static struct tm *NDECL(getlt);
+STATIC_DCL struct tm *NDECL(getlt);
void
setrandom()
#endif
}
-static struct tm *
+STATIC_OVL struct tm *
getlt()
{
time_t date;
STATIC_DCL boolean FDECL(putting_on, (const char *));
STATIC_PTR int FDECL(ckunpaid,(struct obj *));
STATIC_PTR int FDECL(ckvalidcat,(struct obj *));
-static char FDECL(display_pickinv, (const char *,BOOLEAN_P, long *));
+STATIC_DCL char FDECL(display_pickinv, (const char *,BOOLEAN_P, long *));
STATIC_DCL boolean FDECL(this_type_only, (struct obj *));
STATIC_DCL void NDECL(dounpaid);
STATIC_DCL struct obj *FDECL(find_unpaid,(struct obj *,struct obj **));
* inventory and return a count as well as a letter. If out_cnt is not null,
* any count returned from the menu selection is placed here.
*/
-static char
+STATIC_OVL char
display_pickinv(lets, want_reply, out_cnt)
register const char *lets;
boolean want_reply;
#define NUMOBUF 12
STATIC_DCL char *FDECL(strprepend,(char *,const char *));
-static boolean FDECL(wishymatch, (const char *,const char *,BOOLEAN_P));
-static char *NDECL(nextobuf);
-static void FDECL(add_erosion_words, (struct obj *, char *));
+STATIC_DCL boolean FDECL(wishymatch, (const char *,const char *,BOOLEAN_P));
+STATIC_DCL char *NDECL(nextobuf);
+STATIC_DCL void FDECL(add_erosion_words, (struct obj *, char *));
struct Jitem {
int item;
}
/* manage a pool of BUFSZ buffers, so callers don't have to */
-static char *
+STATIC_OVL char *
nextobuf()
{
static char NEARDATA bufs[NUMOBUF][BUFSZ];
(obj->known || obj->otyp == AMULET_OF_YENDOR));
}
-static void
+STATIC_OVL void
add_erosion_words(obj,prefix)
struct obj *obj;
char *prefix;
}
/* compare user string against object name string using fuzzy matching */
-static boolean
+STATIC_OVL boolean
wishymatch(u_str, o_str, retry_inverted)
const char *u_str; /* from user, so might be variant spelling */
const char *o_str; /* from objects[], so is in canonical form */
{ ALL_CLASSES, SCROLL_CLASS, SPBOOK_CLASS, 0 };
static const char all_count[] = { ALLOW_COUNT, ALL_CLASSES, 0 };
-static void FDECL(wand_explode, (struct obj *));
-static void NDECL(do_class_genocide);
-static void FDECL(stripspe,(struct obj *));
-static void FDECL(p_glow1,(struct obj *));
-static void FDECL(p_glow2,(struct obj *,const char *));
-static void FDECL(randomize,(int *, int));
-static void FDECL(forget_single_object, (int));
-static void FDECL(forget, (int));
-static void FDECL(maybe_tame, (struct monst *,struct obj *));
+STATIC_DCL void FDECL(wand_explode, (struct obj *));
+STATIC_DCL void NDECL(do_class_genocide);
+STATIC_DCL void FDECL(stripspe,(struct obj *));
+STATIC_DCL void FDECL(p_glow1,(struct obj *));
+STATIC_DCL void FDECL(p_glow2,(struct obj *,const char *));
+STATIC_DCL void FDECL(randomize,(int *, int));
+STATIC_DCL void FDECL(forget_single_object, (int));
+STATIC_DCL void FDECL(forget, (int));
+STATIC_DCL void FDECL(maybe_tame, (struct monst *,struct obj *));
STATIC_PTR void FDECL(set_lit, (int,int,genericptr_t));
}
return(1);
}
-
-static void
+STATIC_OVL void
stripspe(obj)
register struct obj *obj;
{
} else pline(nothing_happens);
}
}
-
-static void
+STATIC_OVL void
p_glow1(otmp)
register struct obj *otmp;
{
Your("%s %s briefly.", xname(otmp),
otense(otmp, Blind ? "vibrate" : "glow"));
}
-
-static void
+STATIC_OVL void
p_glow2(otmp,color)
register struct obj *otmp;
register const char *color;
/* Forget known information about this object class. */
-static void
+STATIC_OVL void
forget_single_object(obj_id)
int obj_id;
{
#if 0 /* here if anyone wants it.... */
/* Forget everything known about a particular object class. */
-static void
+STATIC_OVL void
forget_objclass(oclass)
int oclass;
{
/* randomize the given list of numbers 0 <= i < count */
-static void
+STATIC_OVL void
randomize(indices, count)
int *indices;
int count;
* howmuch & ALL_MAP = forget whole map
* howmuch & ALL_SPELLS = forget all spells
*/
-static void
+STATIC_OVL void
forget(howmuch)
int howmuch;
{
}
/* monster is hit by scroll of taming's effect */
-static void
+STATIC_OVL void
maybe_tame(mtmp, sobj)
struct monst *mtmp;
struct obj *sobj;
return(0);
}
-static void
+STATIC_OVL void
wand_explode(obj)
register struct obj *obj;
{
vision_full_recalc = 1; /* delayed vision recalculation */
}
-static void
+STATIC_OVL void
do_class_genocide()
{
int i, j, immunecnt, gonecnt, goodcnt, class, feel_dead = 0;
int FDECL(get_rect_ind, (NhRect *));
-static boolean FDECL(intersect, (NhRect *,NhRect *,NhRect *));
+STATIC_DCL boolean FDECL(intersect, (NhRect *,NhRect *,NhRect *));
/*
* In this file, we will handle the various rectangle functions we
* otherwise returns FALSE
*/
-static boolean
+STATIC_OVL boolean
intersect(r1, r2, r3)
NhRect *r1, *r2, *r3;
{
NhRegion *FDECL(create_force_field, (XCHAR_P,XCHAR_P,int,int));
#endif
-static void FDECL(reset_region_mids, (NhRegion *));
+STATIC_DCL void FDECL(reset_region_mids, (NhRegion *));
static callback_proc callbacks[] = {
#define INSIDE_GAS_CLOUD 0
}
/* update monster IDs for region being loaded from bones; `ghostly' implied */
-static void
+STATIC_OVL void
reset_region_mids(reg)
NhRegion *reg;
{
STATIC_DCL void FDECL(add_to_billobjs, (struct obj *));
STATIC_DCL void FDECL(bill_box_content, (struct obj *, BOOLEAN_P, BOOLEAN_P,
struct monst *));
-static boolean FDECL(rob_shop, (struct monst *));
+STATIC_DCL boolean FDECL(rob_shop, (struct monst *));
/*
invariants: obj->unpaid iff onbill(obj) [unless bp->useup]
/* shop merchandise has been taken; pay for it with any credit available;
return false if the debt is fully covered by credit, true otherwise */
-static boolean
+STATIC_OVL boolean
rob_shop(shkp)
struct monst *shkp;
{
# endif
#endif
-static int FDECL(domonnoise,(struct monst *));
-static int NDECL(dochat);
-static int FDECL(mon_in_room, (struct monst *,int));
+STATIC_DCL int FDECL(domonnoise,(struct monst *));
+STATIC_DCL int NDECL(dochat);
+STATIC_DCL int FDECL(mon_in_room, (struct monst *,int));
/* this easily could be a macro, but it might overtax dumb compilers */
-static int
+STATIC_OVL int
mon_in_room(mon, rmtyp)
struct monst *mon;
int rmtyp;
}
}
-static int
+STATIC_OVL int
domonnoise(mtmp)
register struct monst *mtmp;
{
return result;
}
-static int
+STATIC_OVL int
dochat()
{
register struct monst *mtmp;
! ENDIF
! IF ("$(CL)"=="")
@echo CL Environment variable is defined as follows:
- SET CL=/AL $(MC) /Oo /Gy /Gs /Gt14 /Zp1 /W0 /I$(INCL) /I$(MSYS) /I$(WSHR) /nologo /c
+ SET CL=/AL $(MC) /Oo /Gy /Gs /Gt10 /Gf /Zp1 /W0 /I$(INCL) /I$(MSYS) /I$(WSHR) /nologo /c
! ELSE
@echo Warning CL Environment variable is defined:
@echo CL=$(CL)
@echo Overriding that definition as follows:
- SET CL=/AL $(MC) /Oo /Gy /Gs /Gt14 /Zp1 /W0 /I$(INCL) /I$(MSYS) /I$(WSHR) /nologo /c
+ SET CL=/AL $(MC) /Oo /Gy /Gs /Gt10 /Gf /Zp1 /W0 /I$(INCL) /I$(MSYS) /I$(WSHR) /nologo /c
! ENDIF
# The main target.
$(GAMEFILE) : $(LNKOPT) $(ALLOBJ)
@echo Linking....
- $(LINK) $(LFLAGS) /SE:1000 /DYNAMIC:2135 /NOE /ST:6000 @<<$(GAME).lnk
+ $(LINK) $(LFLAGS) /SE:1000 /DYNAMIC:2160 /NOE /ST:6000 @<<$(GAME).lnk
$(ALLOBJ:^ =+^
)
$(GAMEFILE)
functions:390 _mixtype _mk_artifact
functions:391 _makesingular
functions:392 _maketrap _makevtele _makewish
-
+functions:393 _add_erosion_words
+;
+functions:395 _display_pickinv
+functions:396 _do_class_genocide
+functions:397 _dochat
+functions:398 _domonnoise
+;
+;
+;
+;
+functions:403 _find_file
+functions:404 _forget
+functions:405 _forget_single_object
+functions:406 _getlt
+functions:407 _getpos_help
+;
+;
+;
+functions:411 _lib_dlb_cleanup
+functions:412 _lib_dlb_fclose
+functions:413 _lib_dlb_fgetc
+functions:414 _lib_dlb_fgets
+functions:415 _lib_dlb_fopen
+functions:416 _lib_dlb_fread
+functions:417 _lib_dlb_fseek
+functions:418 _lib_dlb_ftell
+functions:419 _lib_dlb_init
+functions:420 _maybe_tame
+;
+functions:422 _mon_in_room
+functions:423 _nextobuf
+functions:424 _p_glow1
+functions:425 _p_glow2
+functions:426 _popch
+functions:427 _randomize
+functions:428 _readlibdir
+functions:429 _reset_region_mids
+functions:430 _rob_shop
+functions:431 _stripspe
+;
+;
+;
+functions:435 _wand_explode
+functions:436 _wishymatch
+functions:437 _You_buf