Remove vestiges of old overlay source split

[trunk only]
This commit is contained in:
nethack.allison
2003-09-05 02:45:18 +00:00
parent 1a94dcfca3
commit 416412f92b
66 changed files with 25 additions and 1306 deletions
+5 -14
View File
@@ -295,28 +295,19 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
#define getlogin() ((char *)0) #define getlogin() ((char *)0)
#endif /* MICRO */ #endif /* MICRO */
#if defined(OVERLAY)&&(defined(OVL0)||defined(OVL1)||defined(OVL2)||defined(OVL3)||defined(OVLB)) #if defined(OVERLAY)
# define USE_OVLx # define USE_OVLx
# define STATIC_DCL extern # define STATIC_DCL extern
# define STATIC_OVL # define STATIC_OVL
# ifdef OVLB # define STATIC_VAR
# define STATIC_VAR
# else #else /* !OVERLAY */
# define STATIC_VAR extern
# endif
#else /* !OVERLAY || (!OVL0 && !OVL1 && !OVL2 && !OVL3 && !OVLB) */
# define STATIC_DCL static # define STATIC_DCL static
# define STATIC_OVL static # define STATIC_OVL static
# define STATIC_VAR static # define STATIC_VAR static
/* If not compiling an overlay, compile everything. */ #endif /* OVERLAY */
# define OVL0 /* highest priority */
# define OVL1
# define OVL2
# define OVL3 /* lowest specified priority */
# define OVLB /* the base overlay segment */
#endif /* OVERLAY && (OVL0 || OVL1 || OVL2 || OVL3 || OVLB) */
/* Macro for a few items that are only static if we're not overlaid.... */ /* Macro for a few items that are only static if we're not overlaid.... */
#if defined(USE_TRAMPOLI) || defined(USE_OVLx) #if defined(USE_TRAMPOLI) || defined(USE_OVLx)
-5
View File
@@ -250,11 +250,6 @@
#if defined(FUNCTION_LEVEL_LINKING) #if defined(FUNCTION_LEVEL_LINKING)
#define OVERLAY #define OVERLAY
#define OVL0
#define OVL1
#define OVL2
#define OVL3
#define OVLB
#endif #endif
#if defined(OVERLAY) && !defined(MOVERLAY) && !defined(VROOMM) && !defined(FUNCTION_LEVEL_LINKING) #if defined(OVERLAY) && !defined(MOVERLAY) && !defined(VROOMM) && !defined(FUNCTION_LEVEL_LINKING)
-10
View File
@@ -14,8 +14,6 @@
STATIC_DCL void NDECL(do_positionbar); STATIC_DCL void NDECL(do_positionbar);
#endif #endif
#ifdef OVL0
void void
moveloop() moveloop()
{ {
@@ -423,9 +421,6 @@ moveloop()
} }
} }
#endif /* OVL0 */
#ifdef OVL1
void void
stop_occupation() stop_occupation()
{ {
@@ -444,9 +439,6 @@ stop_occupation()
} }
} }
#endif /* OVL1 */
#ifdef OVLB
void void
display_gamewindows() display_gamewindows()
{ {
@@ -628,6 +620,4 @@ do_positionbar()
} }
#endif #endif
#endif /* OVLB */
/*allmain.c*/ /*allmain.c*/
-11
View File
@@ -5,7 +5,6 @@
#include "hack.h" #include "hack.h"
#include "edog.h" #include "edog.h"
#ifdef OVLB
static const char tools[] = { TOOL_CLASS, WEAPON_CLASS, WAND_CLASS, 0 }; static const char tools[] = { TOOL_CLASS, WEAPON_CLASS, WAND_CLASS, 0 };
static const char tools_too[] = { ALL_CLASSES, TOOL_CLASS, POTION_CLASS, static const char tools_too[] = { ALL_CLASSES, TOOL_CLASS, POTION_CLASS,
@@ -502,8 +501,6 @@ register struct monst *mtmp;
return((struct obj *)0); return((struct obj *)0);
} }
#endif /* OVLB */
#ifdef OVL1
boolean boolean
next_to_u() next_to_u()
@@ -535,9 +532,6 @@ next_to_u()
return(TRUE); return(TRUE);
} }
#endif /* OVL1 */
#ifdef OVL0
void void
check_leash(x, y) check_leash(x, y)
register xchar x, y; register xchar x, y;
@@ -596,9 +590,6 @@ register xchar x, y;
} }
} }
#endif /* OVL0 */
#ifdef OVLB
#define WEAK 3 /* from eat.c */ #define WEAK 3 /* from eat.c */
static const char look_str[] = "look %s."; static const char look_str[] = "look %s.";
@@ -3055,6 +3046,4 @@ unfixable_trouble_count(is_horn)
return unfixable_trbl; return unfixable_trbl;
} }
#endif /* OVLB */
/*apply.c*/ /*apply.c*/
+1 -23
View File
@@ -4,11 +4,8 @@
#include "hack.h" #include "hack.h"
#include "artifact.h" #include "artifact.h"
#ifdef OVLB
#include "artilist.h" #include "artilist.h"
#else
STATIC_DCL struct artifact artilist[];
#endif
/* /*
* Note: both artilist[] and artiexist[] have a dummy element #0, * Note: both artilist[] and artiexist[] have a dummy element #0,
* so loops over them should normally start at #1. The primary * so loops over them should normally start at #1. The primary
@@ -36,10 +33,6 @@ STATIC_DCL boolean FDECL(Mb_hit, (struct monst *magr,struct monst *mdef,
of hit points that will fit in a 15 bit integer. */ of hit points that will fit in a 15 bit integer. */
#define FATAL_DAMAGE_MODIFIER 200 #define FATAL_DAMAGE_MODIFIER 200
#ifndef OVLB
STATIC_DCL int spec_dbon_applies;
STATIC_DCL xchar artidisco[NROFARTIFACTS];
#else /* OVLB */
/* coordinate effects from spec_dbon() with messages in artifact_hit() */ /* coordinate effects from spec_dbon() with messages in artifact_hit() */
STATIC_OVL int spec_dbon_applies = 0; STATIC_OVL int spec_dbon_applies = 0;
@@ -238,8 +231,6 @@ nartifact_exist()
return a; return a;
} }
#endif /* OVLB */
#ifdef OVL0
boolean boolean
spec_ability(otmp, abil) spec_ability(otmp, abil)
@@ -279,9 +270,6 @@ struct obj *obj;
return FALSE; return FALSE;
} }
#endif /* OVL0 */
#ifdef OVLB
boolean boolean
restrict_name(otmp, name) /* returns 1 if name is restricted for otmp->otyp */ restrict_name(otmp, name) /* returns 1 if name is restricted for otmp->otyp */
register struct obj *otmp; register struct obj *otmp;
@@ -554,9 +542,6 @@ touch_artifact(obj,mon)
return 1; return 1;
} }
#endif /* OVLB */
#ifdef OVL1
/* decide whether an artifact's special attacks apply against mtmp */ /* decide whether an artifact's special attacks apply against mtmp */
STATIC_OVL int STATIC_OVL int
spec_applies(weap, mtmp) spec_applies(weap, mtmp)
@@ -717,11 +702,6 @@ winid tmpwin; /* supplied by dodiscover() */
return i; return i;
} }
#endif /* OVL1 */
#ifdef OVLB
/* /*
* Magicbane's intrinsic magic is incompatible with normal * Magicbane's intrinsic magic is incompatible with normal
* enchantment magic. Thus, its effects have a negative * enchantment magic. Thus, its effects have a negative
@@ -1456,6 +1436,4 @@ struct obj *otmp;
return (100L * (long)objects[otmp->otyp].oc_cost); return (100L * (long)objects[otmp->otyp].oc_cost);
} }
#endif /* OVLB */
/*artifact.c*/ /*artifact.c*/
-16
View File
@@ -8,8 +8,6 @@
/* #define DEBUG */ /* uncomment for debugging info */ /* #define DEBUG */ /* uncomment for debugging info */
#ifdef OVLB
/* part of the output on gain or loss of attribute */ /* part of the output on gain or loss of attribute */
static static
const char * const plusattr[] = { const char * const plusattr[] = {
@@ -232,9 +230,6 @@ set_moreluck()
else u.moreluck = -LUCKADD; else u.moreluck = -LUCKADD;
} }
#endif /* OVLB */
#ifdef OVL1
void void
restore_attrib() restore_attrib()
{ {
@@ -254,9 +249,6 @@ restore_attrib()
(void)encumber_msg(); (void)encumber_msg();
} }
#endif /* OVL1 */
#ifdef OVLB
#define AVAL 50 /* tune value for exercise gains */ #define AVAL 50 /* tune value for exercise gains */
void void
@@ -658,9 +650,6 @@ newhp()
return((hp <= 0) ? 1 : hp); return((hp <= 0) ? 1 : hp);
} }
#endif /* OVLB */
#ifdef OVL0
schar schar
acurr(x) acurr(x)
int x; int x;
@@ -703,9 +692,6 @@ acurrstr()
else return((schar)(str - 100)); else return((schar)(str - 100));
} }
#endif /* OVL0 */
#ifdef OVL2
/* avoid possible problems with alignment overflow, and provide a centralized /* avoid possible problems with alignment overflow, and provide a centralized
* location for any future alignment limits * location for any future alignment limits
*/ */
@@ -726,6 +712,4 @@ register int n;
} }
} }
#endif /* OVL2 */
/*attrib.c*/ /*attrib.c*/
-17
View File
@@ -4,7 +4,6 @@
#include "hack.h" #include "hack.h"
#ifdef OVL0
extern const char *hu_stat[]; /* defined in eat.c */ extern const char *hu_stat[]; /* defined in eat.c */
const char * const enc_stat[] = { const char * const enc_stat[] = {
@@ -18,7 +17,6 @@ const char * const enc_stat[] = {
STATIC_DCL void NDECL(bot1); STATIC_DCL void NDECL(bot1);
STATIC_DCL void NDECL(bot2); STATIC_DCL void NDECL(bot2);
#endif /* OVL0 */
/* MAXCO must hold longest uncompressed status line, and must be larger /* MAXCO must hold longest uncompressed status line, and must be larger
* than COLNO * than COLNO
@@ -34,16 +32,9 @@ STATIC_DCL void NDECL(bot2);
#define MAXCO (COLNO+20) #define MAXCO (COLNO+20)
#endif #endif
#ifndef OVLB
STATIC_DCL int mrank_sz;
#else /* OVLB */
STATIC_OVL NEARDATA int mrank_sz = 0; /* loaded by max_rank_sz (from u_init) */ STATIC_OVL NEARDATA int mrank_sz = 0; /* loaded by max_rank_sz (from u_init) */
#endif /* OVLB */
STATIC_DCL const char *NDECL(rank); STATIC_DCL const char *NDECL(rank);
#ifdef OVL1
/* convert experience level (1..30) to rank index (0..8) */ /* convert experience level (1..30) to rank index (0..8) */
int int
xlev_to_rank(xlev) xlev_to_rank(xlev)
@@ -126,9 +117,6 @@ int *rank_indx, *title_length;
return NON_PM; return NON_PM;
} }
#endif /* OVL1 */
#ifdef OVLB
void void
max_rank_sz() max_rank_sz()
{ {
@@ -141,9 +129,6 @@ max_rank_sz()
return; return;
} }
#endif /* OVLB */
#ifdef OVL0
#ifdef SCORE_ON_BOTL #ifdef SCORE_ON_BOTL
long long
botl_score() botl_score()
@@ -304,6 +289,4 @@ bot()
flags.botl = flags.botlx = 0; flags.botl = flags.botlx = 0;
} }
#endif /* OVL0 */
/*botl.c*/ /*botl.c*/
-27
View File
@@ -101,9 +101,7 @@ extern int NDECL(dozap); /**/
extern int NDECL(doorganize); /**/ extern int NDECL(doorganize); /**/
#endif /* DUMB */ #endif /* DUMB */
#ifdef OVL1
static int NDECL((*timed_occ_fn)); static int NDECL((*timed_occ_fn));
#endif /* OVL1 */
STATIC_PTR int NDECL(doprev_message); STATIC_PTR int NDECL(doprev_message);
STATIC_PTR int NDECL(timed_occupation); STATIC_PTR int NDECL(timed_occupation);
@@ -143,13 +141,11 @@ STATIC_PTR int NDECL(doattributes);
STATIC_PTR int NDECL(doconduct); /**/ STATIC_PTR int NDECL(doconduct); /**/
STATIC_PTR boolean NDECL(minimal_enlightenment); STATIC_PTR boolean NDECL(minimal_enlightenment);
#ifdef OVLB
STATIC_DCL void FDECL(enlght_line, (const char *,const char *,const char *)); STATIC_DCL void FDECL(enlght_line, (const char *,const char *,const char *));
STATIC_DCL char *FDECL(enlght_combatinc, (const char *,int,int,char *)); STATIC_DCL char *FDECL(enlght_combatinc, (const char *,int,int,char *));
#ifdef UNIX #ifdef UNIX
static void NDECL(end_of_input); static void NDECL(end_of_input);
#endif #endif
#endif /* OVLB */
static const char* readchar_queue=""; static const char* readchar_queue="";
static coord clicklook_cc; static coord clicklook_cc;
@@ -157,8 +153,6 @@ static coord clicklook_cc;
STATIC_DCL char *NDECL(parse); STATIC_DCL char *NDECL(parse);
STATIC_DCL boolean FDECL(help_dir, (CHAR_P,const char *)); STATIC_DCL boolean FDECL(help_dir, (CHAR_P,const char *));
#ifdef OVL1
STATIC_PTR int STATIC_PTR int
doprev_message() doprev_message()
{ {
@@ -280,9 +274,6 @@ char ch;
} }
#endif /* REDO */ #endif /* REDO */
#endif /* OVL1 */
#ifdef OVLB
STATIC_PTR int STATIC_PTR int
doextcmd() /* here after # - now read a full-word command */ doextcmd() /* here after # - now read a full-word command */
{ {
@@ -1335,9 +1326,6 @@ int final;
destroy_nhwindow(en_win); destroy_nhwindow(en_win);
} }
#endif /* OVLB */
#ifdef OVL1
#ifndef M #ifndef M
# ifndef NHSTDC # ifndef NHSTDC
# define M(c) (0x80 | (c)) # define M(c) (0x80 | (c))
@@ -2153,9 +2141,6 @@ const char *msg;
return TRUE; return TRUE;
} }
#endif /* OVL1 */
#ifdef OVLB
void void
confdir() confdir()
{ {
@@ -2165,9 +2150,6 @@ confdir()
return; return;
} }
#endif /* OVLB */
#ifdef OVL0
int int
isok(x,y) isok(x,y)
register int x, y; register int x, y;
@@ -2355,9 +2337,6 @@ parse()
return(in_line); return(in_line);
} }
#endif /* OVL0 */
#ifdef OVLB
#ifdef UNIX #ifdef UNIX
static static
void void
@@ -2373,9 +2352,6 @@ end_of_input()
} }
#endif #endif
#endif /* OVLB */
#ifdef OVL0
char char
readchar() readchar()
{ {
@@ -2496,8 +2472,6 @@ wiz_port_debug()
} }
# endif /*PORT_DEBUG*/ # endif /*PORT_DEBUG*/
#endif /* OVL0 */
#ifdef OVLB
/* /*
* Parameter validator for generic yes/no function to prevent * Parameter validator for generic yes/no function to prevent
* the core from sending too long a prompt string to the * the core from sending too long a prompt string to the
@@ -2522,6 +2496,5 @@ char def;
Strcat(qbuf,"..."); Strcat(qbuf,"...");
return (*windowprocs.win_yn_function)(qbuf, resp, def); return (*windowprocs.win_yn_function)(qbuf, resp, def);
} }
#endif
/*cmd.c*/ /*cmd.c*/
-13
View File
@@ -12,7 +12,6 @@
#include "hack.h" #include "hack.h"
#ifdef OVLB
STATIC_DCL void FDECL(get_wall_for_db, (int *, int *)); STATIC_DCL void FDECL(get_wall_for_db, (int *, int *));
STATIC_DCL struct entity *FDECL(e_at, (int, int)); STATIC_DCL struct entity *FDECL(e_at, (int, int));
STATIC_DCL void FDECL(m_to_e, (struct monst *, int, int, struct entity *)); STATIC_DCL void FDECL(m_to_e, (struct monst *, int, int, struct entity *));
@@ -29,9 +28,6 @@ STATIC_DCL boolean FDECL(automiss, (struct entity *));
STATIC_DCL boolean FDECL(e_missed, (struct entity *, BOOLEAN_P)); STATIC_DCL boolean FDECL(e_missed, (struct entity *, BOOLEAN_P));
STATIC_DCL boolean FDECL(e_jumps, (struct entity *)); STATIC_DCL boolean FDECL(e_jumps, (struct entity *));
STATIC_DCL void FDECL(do_entity, (struct entity *)); STATIC_DCL void FDECL(do_entity, (struct entity *));
#endif /* OVLB */
#ifdef OVL0
boolean boolean
is_pool(x,y) is_pool(x,y)
@@ -75,10 +71,6 @@ int x,y;
return FALSE; return FALSE;
} }
#endif /* OVL0 */
#ifdef OVL1
/* /*
* We want to know whether a wall (or a door) is the portcullis (passageway) * We want to know whether a wall (or a door) is the portcullis (passageway)
* of an eventual drawbridge. * of an eventual drawbridge.
@@ -150,9 +142,6 @@ int *x,*y;
return FALSE; return FALSE;
} }
#endif /* OVL1 */
#ifdef OVLB
/* /*
* Find the drawbridge wall associated with a drawbridge. * Find the drawbridge wall associated with a drawbridge.
*/ */
@@ -928,6 +917,4 @@ int x,y;
} }
} }
#endif /* OVLB */
/*dbridge.c*/ /*dbridge.c*/
-10
View File
@@ -6,8 +6,6 @@
#include "edog.h" #include "edog.h"
/* #define DEBUG */ /* turn on for diagnostics */ /* #define DEBUG */ /* turn on for diagnostics */
#ifdef OVLB
static NEARDATA boolean did_dig_msg; static NEARDATA boolean did_dig_msg;
STATIC_DCL boolean NDECL(rm_waslit); STATIC_DCL boolean NDECL(rm_waslit);
@@ -1062,9 +1060,6 @@ watch_dig(mtmp, x, y, zap)
} }
} }
#endif /* OVLB */
#ifdef OVL0
/* Return TRUE if monster died, FALSE otherwise. Called from m_move(). */ /* Return TRUE if monster died, FALSE otherwise. Called from m_move(). */
boolean boolean
mdig_tunnel(mtmp) mdig_tunnel(mtmp)
@@ -1138,9 +1133,6 @@ register struct monst *mtmp;
return FALSE; return FALSE;
} }
#endif /* OVL0 */
#ifdef OVL3
/* digging via wand zap or spell cast */ /* digging via wand zap or spell cast */
void void
zap_dig() zap_dig()
@@ -1663,8 +1655,6 @@ wiz_debug_cmd() /* in this case, bury everything at your loc and around */
if (isok(x,y)) bury_objs(x,y); if (isok(x,y)) bury_objs(x,y);
return 0; return 0;
} }
#endif /* DEBUG */ #endif /* DEBUG */
#endif /* OVL3 */
/*dig.c*/ /*dig.c*/
-28
View File
@@ -8,25 +8,17 @@
#include "lev.h" #include "lev.h"
#ifdef SINKS #ifdef SINKS
# ifdef OVLB
STATIC_DCL void FDECL(trycall, (struct obj *)); STATIC_DCL void FDECL(trycall, (struct obj *));
# endif /* OVLB */
STATIC_DCL void FDECL(dosinkring, (struct obj *)); STATIC_DCL void FDECL(dosinkring, (struct obj *));
#endif /* SINKS */ #endif /* SINKS */
STATIC_PTR int FDECL(drop, (struct obj *)); STATIC_PTR int FDECL(drop, (struct obj *));
STATIC_PTR int NDECL(wipeoff); STATIC_PTR int NDECL(wipeoff);
#ifdef OVL0
STATIC_DCL int FDECL(menu_drop, (int)); STATIC_DCL int FDECL(menu_drop, (int));
#endif
#ifdef OVL2
STATIC_DCL int NDECL(currentlevel_rewrite); STATIC_DCL int NDECL(currentlevel_rewrite);
STATIC_DCL void NDECL(final_level); STATIC_DCL void NDECL(final_level);
/* static boolean FDECL(badspot, (XCHAR_P,XCHAR_P)); */ /* static boolean FDECL(badspot, (XCHAR_P,XCHAR_P)); */
#endif
#ifdef OVLB
static NEARDATA const char drop_types[] = static NEARDATA const char drop_types[] =
{ ALLOW_COUNT, COIN_CLASS, ALL_CLASSES, 0 }; { ALLOW_COUNT, COIN_CLASS, ALL_CLASSES, 0 };
@@ -49,9 +41,6 @@ dodrop()
return result; return result;
} }
#endif /* OVLB */
#ifdef OVL0
/* Called when a boulder is dropped, thrown, or pushed. If it ends up /* Called when a boulder is dropped, thrown, or pushed. If it ends up
* in a pool, it either fills the pool up or sinks away. In either case, * in a pool, it either fills the pool up or sinks away. In either case,
* it's gone for good... If the destination is not a pool, returns FALSE. * it's gone for good... If the destination is not a pool, returns FALSE.
@@ -210,9 +199,6 @@ const char *verb;
return FALSE; return FALSE;
} }
#endif /* OVL0 */
#ifdef OVLB
void void
doaltarobj(obj) /* obj is an object dropped on an altar */ doaltarobj(obj) /* obj is an object dropped on an altar */
register struct obj *obj; register struct obj *obj;
@@ -389,9 +375,6 @@ giveback:
} }
#endif #endif
#endif /* OVLB */
#ifdef OVL0
/* some common tests when trying to drop or throw items */ /* some common tests when trying to drop or throw items */
boolean boolean
canletgo(obj,word) canletgo(obj,word)
@@ -722,9 +705,6 @@ int retry;
return n_dropped; return n_dropped;
} }
#endif /* OVL0 */
#ifdef OVL2
/* on a ladder, used in goto_level */ /* on a ladder, used in goto_level */
static NEARDATA boolean at_ladder = FALSE; static NEARDATA boolean at_ladder = FALSE;
@@ -1452,9 +1432,6 @@ deferred_goto()
free((genericptr_t)dfr_post_msg), dfr_post_msg = 0; free((genericptr_t)dfr_post_msg), dfr_post_msg = 0;
} }
#endif /* OVL2 */
#ifdef OVL3
/* /*
* Return TRUE if we created a monster for the corpse. If successful, the * Return TRUE if we created a monster for the corpse. If successful, the
* corpse is gone. * corpse is gone.
@@ -1567,9 +1544,6 @@ donull()
return(1); /* Do nothing, but let other things happen */ return(1); /* Do nothing, but let other things happen */
} }
#endif /* OVL3 */
#ifdef OVLB
STATIC_PTR int STATIC_PTR int
wipeoff() wipeoff()
{ {
@@ -1658,6 +1632,4 @@ heal_legs()
(void)encumber_msg(); (void)encumber_msg();
} }
#endif /* OVLB */
/*do.c*/ /*do.c*/
-18
View File
@@ -4,8 +4,6 @@
#include "hack.h" #include "hack.h"
#ifdef OVLB
STATIC_DCL void FDECL(do_oname, (struct obj *)); STATIC_DCL void FDECL(do_oname, (struct obj *));
static void FDECL(getpos_help, (BOOLEAN_P,const char *)); static void FDECL(getpos_help, (BOOLEAN_P,const char *));
@@ -528,9 +526,6 @@ register struct obj *obj;
} }
} }
#endif /*OVLB*/
#ifdef OVL0
static const char * const ghostnames[] = { static const char * const ghostnames[] = {
/* these names should have length < PL_NSIZ */ /* these names should have length < PL_NSIZ */
/* Capitalize the names for aesthetics -dgk */ /* Capitalize the names for aesthetics -dgk */
@@ -750,9 +745,6 @@ boolean called;
} }
} }
#endif /* OVL0 */
#ifdef OVLB
char * char *
l_monnam(mtmp) l_monnam(mtmp)
register struct monst *mtmp; register struct monst *mtmp;
@@ -761,9 +753,6 @@ register struct monst *mtmp;
mtmp->mnamelth ? SUPPRESS_SADDLE : 0, TRUE)); mtmp->mnamelth ? SUPPRESS_SADDLE : 0, TRUE));
} }
#endif /* OVLB */
#ifdef OVL0
char * char *
mon_nam(mtmp) mon_nam(mtmp)
register struct monst *mtmp; register struct monst *mtmp;
@@ -831,9 +820,6 @@ struct monst *mtmp;
return x_monnam(mtmp, prefix, (char *)0, suppression_flag, FALSE); return x_monnam(mtmp, prefix, (char *)0, suppression_flag, FALSE);
} }
#endif /* OVL0 */
#ifdef OVLB
char * char *
Adjmonnam(mtmp, adj) Adjmonnam(mtmp, adj)
register struct monst *mtmp; register struct monst *mtmp;
@@ -978,9 +964,6 @@ roguename() /* Name of a Rogue player */
: "Glenn Wichman"; : "Glenn Wichman";
} }
#endif /* REINCARNATION */ #endif /* REINCARNATION */
#endif /* OVLB */
#ifdef OVL2
static NEARDATA const char * const hcolors[] = { static NEARDATA const char * const hcolors[] = {
"ultraviolet", "infrared", "bluish-orange", "ultraviolet", "infrared", "bluish-orange",
@@ -1039,6 +1022,5 @@ char *buf;
} }
return buf; return buf;
} }
#endif /* OVL2 */
/*do_name.c*/ /*do_name.c*/
-15
View File
@@ -4,12 +4,6 @@
#include "hack.h" #include "hack.h"
#ifndef OVLB
STATIC_DCL long takeoff_mask, taking_off;
#else /* OVLB */
STATIC_OVL NEARDATA long takeoff_mask = 0L; STATIC_OVL NEARDATA long takeoff_mask = 0L;
static NEARDATA long taking_off = 0L; static NEARDATA long taking_off = 0L;
@@ -1512,10 +1506,6 @@ doputon()
return(1); return(1);
} }
#endif /* OVLB */
#ifdef OVL0
void void
find_ac() find_ac()
{ {
@@ -1541,9 +1531,6 @@ find_ac()
} }
} }
#endif /* OVL0 */
#ifdef OVLB
void void
glibr() glibr()
{ {
@@ -2097,6 +2084,4 @@ register schar delta;
} }
} }
#endif /* OVLB */
/*do_wear.c*/ /*do_wear.c*/
-16
View File
@@ -5,8 +5,6 @@
#include "hack.h" #include "hack.h"
#include "edog.h" #include "edog.h"
#ifdef OVLB
STATIC_DCL int NDECL(pet_type); STATIC_DCL int NDECL(pet_type);
void void
@@ -443,9 +441,6 @@ long nmv; /* number of moves */
else mtmp->mhp += imv; else mtmp->mhp += imv;
} }
#endif /* OVLB */
#ifdef OVL2
/* called when you move to another level */ /* called when you move to another level */
void void
keepdogs(pets_only) keepdogs(pets_only)
@@ -545,9 +540,6 @@ boolean pets_only; /* true for ascension or final escape */
} }
} }
#endif /* OVL2 */
#ifdef OVLB
void void
migrate_to_level(mtmp, tolev, xyloc, cc) migrate_to_level(mtmp, tolev, xyloc, cc)
register struct monst *mtmp; register struct monst *mtmp;
@@ -604,9 +596,6 @@ migrate_to_level(mtmp, tolev, xyloc, cc)
mtmp->mx = mtmp->my = 0; /* this implies migration */ mtmp->mx = mtmp->my = 0; /* this implies migration */
} }
#endif /* OVLB */
#ifdef OVL1
/* return quality of food; the lower the better */ /* return quality of food; the lower the better */
/* fungi will eat even tainted food */ /* fungi will eat even tainted food */
int int
@@ -705,9 +694,6 @@ register struct obj *obj;
} }
} }
#endif /* OVL1 */
#ifdef OVLB
struct monst * struct monst *
tamedog(mtmp, obj) tamedog(mtmp, obj)
register struct monst *mtmp; register struct monst *mtmp;
@@ -901,6 +887,4 @@ struct monst *mtmp;
} }
} }
#endif /* OVLB */
/*dog.c*/ /*dog.c*/
-13
View File
@@ -9,8 +9,6 @@
extern boolean notonhead; extern boolean notonhead;
#ifdef OVL0
STATIC_DCL boolean FDECL(dog_hunger,(struct monst *,struct edog *)); STATIC_DCL boolean FDECL(dog_hunger,(struct monst *,struct edog *));
STATIC_DCL int FDECL(dog_invent,(struct monst *,struct edog *,int)); STATIC_DCL int FDECL(dog_invent,(struct monst *,struct edog *,int));
STATIC_DCL int FDECL(dog_goal,(struct monst *,struct edog *,int,int,int)); STATIC_DCL int FDECL(dog_goal,(struct monst *,struct edog *,int,int,int));
@@ -48,15 +46,12 @@ register struct monst *mon;
static NEARDATA const char nofetch[] = { BALL_CLASS, CHAIN_CLASS, ROCK_CLASS, 0 }; static NEARDATA const char nofetch[] = { BALL_CLASS, CHAIN_CLASS, ROCK_CLASS, 0 };
#endif /* OVL0 */
STATIC_OVL boolean FDECL(cursed_object_at, (int, int)); STATIC_OVL boolean FDECL(cursed_object_at, (int, int));
STATIC_VAR xchar gtyp, gx, gy; /* type and position of dog's current goal */ STATIC_VAR xchar gtyp, gx, gy; /* type and position of dog's current goal */
STATIC_PTR void FDECL(wantdoor, (int, int, genericptr_t)); STATIC_PTR void FDECL(wantdoor, (int, int, genericptr_t));
#ifdef OVLB
STATIC_OVL boolean STATIC_OVL boolean
cursed_object_at(x, y) cursed_object_at(x, y)
int x, y; int x, y;
@@ -204,9 +199,6 @@ boolean devour;
return 1; return 1;
} }
#endif /* OVLB */
#ifdef OVL0
/* hunger effects -- returns TRUE on starvation */ /* hunger effects -- returns TRUE on starvation */
STATIC_OVL boolean STATIC_OVL boolean
dog_hunger(mtmp, edog) dog_hunger(mtmp, edog)
@@ -832,9 +824,6 @@ xchar mx, my, fx, fy;
return FALSE; return FALSE;
} }
#endif /* OVL0 */
#ifdef OVLB
/*ARGSUSED*/ /* do_clear_area client */ /*ARGSUSED*/ /* do_clear_area client */
STATIC_PTR void STATIC_PTR void
wantdoor(x, y, distance) wantdoor(x, y, distance)
@@ -850,6 +839,4 @@ genericptr_t distance;
} }
} }
#endif /* OVLB */
/*dogmove.c*/ /*dogmove.c*/
-28
View File
@@ -6,8 +6,6 @@
#include "dgn_file.h" #include "dgn_file.h"
#include "dlb.h" #include "dlb.h"
#ifdef OVL1
#define DUNGEON_FILE "dungeon" #define DUNGEON_FILE "dungeon"
#define X_START "x-strt" #define X_START "x-strt"
@@ -986,9 +984,6 @@ xchar ledgerno;
return((xchar)(ledgerno - dungeons[ledger_to_dnum(ledgerno)].ledger_start)); return((xchar)(ledgerno - dungeons[ledger_to_dnum(ledgerno)].ledger_start));
} }
#endif /* OVL1 */
#ifdef OVL0
/* returns the depth of a level, in floors below the surface */ /* returns the depth of a level, in floors below the surface */
/* (note levels in different dungeons can have the same depth). */ /* (note levels in different dungeons can have the same depth). */
schar schar
@@ -1005,9 +1000,6 @@ d_level *lev1, *lev2;
return((boolean)((lev1->dnum == lev2->dnum) && (lev1->dlevel == lev2->dlevel))); return((boolean)((lev1->dnum == lev2->dnum) && (lev1->dlevel == lev2->dlevel)));
} }
#endif /* OVL0 */
#ifdef OVL1
/* is this level referenced in the special level chain? */ /* is this level referenced in the special level chain? */
s_level * s_level *
Is_special(lev) Is_special(lev)
@@ -1253,9 +1245,6 @@ int levnum;
newlevel->dlevel = levnum; newlevel->dlevel = levnum;
} }
#endif /* OVL1 */
#ifdef OVL0
boolean boolean
In_quest(lev) /* are you in the quest dungeon? */ In_quest(lev) /* are you in the quest dungeon? */
d_level *lev; d_level *lev;
@@ -1263,9 +1252,6 @@ d_level *lev;
return((boolean)(lev->dnum == quest_dnum)); return((boolean)(lev->dnum == quest_dnum));
} }
#endif /* OVL0 */
#ifdef OVL1
boolean boolean
In_mines(lev) /* are you in the mines dungeon? */ In_mines(lev) /* are you in the mines dungeon? */
d_level *lev; d_level *lev;
@@ -1352,9 +1338,6 @@ d_level *lev;
return FALSE; return FALSE;
} }
#endif /* OVL1 */
#ifdef OVL0
boolean boolean
In_hell(lev) /* are you in one of the Hell levels? */ In_hell(lev) /* are you in one of the Hell levels? */
d_level *lev; d_level *lev;
@@ -1362,9 +1345,6 @@ d_level *lev;
return((boolean)(dungeons[lev->dnum].flags.hellish)); return((boolean)(dungeons[lev->dnum].flags.hellish));
} }
#endif /* OVL0 */
#ifdef OVL1
void void
find_hell(lev) /* sets *lev to be the gateway to Gehennom... */ find_hell(lev) /* sets *lev to be the gateway to Gehennom... */
d_level *lev; d_level *lev;
@@ -1405,9 +1385,6 @@ int range;
dest->dlevel = 1; dest->dlevel = 1;
} }
#endif /* OVL1 */
#ifdef OVL0
int int
induced_align(pct) induced_align(pct)
int pct; int pct;
@@ -1425,9 +1402,6 @@ int pct;
return(Align2amask(al)); return(Align2amask(al));
} }
#endif /* OVL0 */
#ifdef OVL1
boolean boolean
Invocation_lev(lev) Invocation_lev(lev)
d_level *lev; d_level *lev;
@@ -1721,6 +1695,4 @@ boolean bymenu;
} }
#endif /* WIZARD */ #endif /* WIZARD */
#endif /* OVL1 */
/*dungeon.c*/ /*dungeon.c*/
-34
View File
@@ -18,7 +18,6 @@ STATIC_PTR int NDECL(eatfood);
STATIC_PTR int NDECL(opentin); STATIC_PTR int NDECL(opentin);
STATIC_PTR int NDECL(unfaint); STATIC_PTR int NDECL(unfaint);
#ifdef OVLB
STATIC_DCL const char *FDECL(food_xname, (struct obj *,BOOLEAN_P)); STATIC_DCL const char *FDECL(food_xname, (struct obj *,BOOLEAN_P));
STATIC_DCL void FDECL(choke, (struct obj *)); STATIC_DCL void FDECL(choke, (struct obj *));
STATIC_DCL void NDECL(recalc_wt); STATIC_DCL void NDECL(recalc_wt);
@@ -45,8 +44,6 @@ STATIC_DCL const char *FDECL(foodword, (struct obj *));
char msgbuf[BUFSZ]; char msgbuf[BUFSZ];
#endif /* OVLB */
/* hunger texts used on bottom line (each 8 chars long) */ /* hunger texts used on bottom line (each 8 chars long) */
#define SATIATED 0 #define SATIATED 0
#define NOT_HUNGRY 1 #define NOT_HUNGRY 1
@@ -59,14 +56,6 @@ char msgbuf[BUFSZ];
/* also used to see if you're allowed to eat cats and dogs */ /* also used to see if you're allowed to eat cats and dogs */
#define CANNIBAL_ALLOWED() (Role_if(PM_CAVEMAN) || Race_if(PM_ORC)) #define CANNIBAL_ALLOWED() (Role_if(PM_CAVEMAN) || Race_if(PM_ORC))
#ifndef OVLB
STATIC_DCL NEARDATA const char comestibles[];
STATIC_DCL NEARDATA const char allobj[];
STATIC_DCL boolean force_save_hs;
#else
STATIC_OVL NEARDATA const char comestibles[] = { FOOD_CLASS, 0 }; STATIC_OVL NEARDATA const char comestibles[] = { FOOD_CLASS, 0 };
/* Gold must come first for getobj(). */ /* Gold must come first for getobj(). */
@@ -87,9 +76,6 @@ const char *hu_stat[] = {
"Starved " "Starved "
}; };
#endif /* OVLB */
#ifdef OVL1
/* /*
* Decide whether a particular object can be eaten by the possibly * Decide whether a particular object can be eaten by the possibly
* polymorphed character. Not used for monster checks. * polymorphed character. Not used for monster checks.
@@ -118,9 +104,6 @@ register struct obj *obj;
return (boolean)(obj->oclass == FOOD_CLASS); return (boolean)(obj->oclass == FOOD_CLASS);
} }
#endif /* OVL1 */
#ifdef OVLB
void void
init_uhunger() init_uhunger()
{ {
@@ -2097,9 +2080,6 @@ bite()
return 0; return 0;
} }
#endif /* OVLB */
#ifdef OVL0
void void
gethungry() /* as time goes by - called by moveloop() and domove() */ gethungry() /* as time goes by - called by moveloop() and domove() */
{ {
@@ -2141,9 +2121,6 @@ gethungry() /* as time goes by - called by moveloop() and domove() */
newuhs(TRUE); newuhs(TRUE);
} }
#endif /* OVL0 */
#ifdef OVLB
void void
morehungry(num) /* called after vomiting and after performing feats of magic */ morehungry(num) /* called after vomiting and after performing feats of magic */
register int num; register int num;
@@ -2210,9 +2187,6 @@ unfaint()
return 0; return 0;
} }
#endif /* OVLB */
#ifdef OVL0
boolean boolean
is_fainted() is_fainted()
{ {
@@ -2369,9 +2343,6 @@ boolean incr;
} }
} }
#endif /* OVL0 */
#ifdef OVLB
/* Returns an object representing food. Object may be either on floor or /* Returns an object representing food. Object may be either on floor or
* in inventory. * in inventory.
*/ */
@@ -2541,9 +2512,6 @@ int amt;
} }
} }
#endif /* OVLB */
#ifdef OVL1
/* called when eatfood occupation has been interrupted, /* called when eatfood occupation has been interrupted,
or in the case of theft, is about to be interrupted */ or in the case of theft, is about to be interrupted */
boolean boolean
@@ -2559,6 +2527,4 @@ boolean stopping;
return FALSE; return FALSE;
} }
#endif /* OVL1 */
/*eat.c*/ /*eat.c*/
-18
View File
@@ -8,7 +8,6 @@
STATIC_VAR NEARDATA struct engr *head_engr; STATIC_VAR NEARDATA struct engr *head_engr;
#ifdef OVLB
/* random engravings */ /* random engravings */
static const char *random_mesg[] = { static const char *random_mesg[] = {
"Elbereth", "Elbereth",
@@ -141,8 +140,6 @@ can_reach_floor()
(!Levitation || (!Levitation ||
Is_airlevel(&u.uz) || Is_waterlevel(&u.uz))); Is_airlevel(&u.uz) || Is_waterlevel(&u.uz)));
} }
#endif /* OVLB */
#ifdef OVL0
const char * const char *
surface(x, y) surface(x, y)
@@ -236,9 +233,6 @@ sengr_at(s, x, y)
} }
#endif /* ELBERETH */ #endif /* ELBERETH */
#endif /* OVL0 */
#ifdef OVL2
void void
u_wipe_engr(cnt) u_wipe_engr(cnt)
register int cnt; register int cnt;
@@ -247,9 +241,6 @@ register int cnt;
wipe_engr_at(u.ux, u.uy, cnt); wipe_engr_at(u.ux, u.uy, cnt);
} }
#endif /* OVL2 */
#ifdef OVL1
void void
wipe_engr_at(x,y,cnt) wipe_engr_at(x,y,cnt)
register xchar x,y,cnt; register xchar x,y,cnt;
@@ -270,9 +261,6 @@ register xchar x,y,cnt;
} }
} }
#endif /* OVL1 */
#ifdef OVL2
void void
read_engr_at(x,y) read_engr_at(x,y)
register int x,y; register int x,y;
@@ -348,9 +336,6 @@ register int x,y;
} }
} }
#endif /* OVL2 */
#ifdef OVLB
void void
make_engr_at(x,y,s,e_time,e_type) make_engr_at(x,y,s,e_time,e_type)
register int x,y; register int x,y;
@@ -1253,7 +1238,4 @@ const char *str;
return; return;
} }
#endif /* OVLB */
/*engrave.c*/ /*engrave.c*/
-6
View File
@@ -4,8 +4,6 @@
#include "hack.h" #include "hack.h"
#ifdef OVL0
/* Note: Arrays are column first, while the screen is row first */ /* Note: Arrays are column first, while the screen is row first */
static int expl[3][3] = { static int expl[3][3] = {
{ S_explode1, S_explode4, S_explode7 }, { S_explode1, S_explode4, S_explode7 },
@@ -376,8 +374,6 @@ int expltype;
if (i < 50) i = 50; /* in case random damage is very small */ if (i < 50) i = 50; /* in case random damage is very small */
wake_nearto(x, y, i); wake_nearto(x, y, i);
} }
#endif /* OVL0 */
#ifdef OVL1
struct scatter_chain { struct scatter_chain {
struct scatter_chain *next; /* pointer to next scatter item */ struct scatter_chain *next; /* pointer to next scatter item */
@@ -575,6 +571,4 @@ splatter_burning_oil(x, y)
explode(x, y, ZT_SPELL_O_FIRE, d(4,4), BURNING_OIL, EXPL_FIERY); explode(x, y, ZT_SPELL_O_FIRE, d(4,4), BURNING_OIL, EXPL_FIERY);
} }
#endif /* OVL1 */
/*explode.c*/ /*explode.c*/
-29
View File
@@ -4,9 +4,7 @@
#include "hack.h" #include "hack.h"
#ifdef OVL1
STATIC_DCL void NDECL(maybe_wail); STATIC_DCL void NDECL(maybe_wail);
#endif /*OVL1*/
STATIC_DCL int NDECL(moverock); STATIC_DCL int NDECL(moverock);
STATIC_DCL int FDECL(still_chewing,(XCHAR_P,XCHAR_P)); STATIC_DCL int FDECL(still_chewing,(XCHAR_P,XCHAR_P));
#ifdef SINKS #ifdef SINKS
@@ -19,8 +17,6 @@ STATIC_DCL void FDECL(move_update, (BOOLEAN_P));
#define IS_SHOP(x) (rooms[x].rtype >= SHOPBASE) #define IS_SHOP(x) (rooms[x].rtype >= SHOPBASE)
#ifdef OVL2
boolean boolean
revive_nasty(x, y, msg) revive_nasty(x, y, msg)
int x,y; int x,y;
@@ -429,9 +425,6 @@ still_chewing(x,y)
return 0; return 0;
} }
#endif /* OVL2 */
#ifdef OVLB
void void
movobj(obj, ox, oy) movobj(obj, ox, oy)
register struct obj *obj; register struct obj *obj;
@@ -516,9 +509,6 @@ register xchar x,y;
(levl[x][y].wall_info & W_NONPASSWALL))); (levl[x][y].wall_info & W_NONPASSWALL)));
} }
#endif /* OVLB */
#ifdef OVL1
boolean boolean
bad_rock(mdat,x,y) bad_rock(mdat,x,y)
struct permonst *mdat; struct permonst *mdat;
@@ -537,9 +527,6 @@ xchar x, y;
return((boolean)(Invocation_lev(&u.uz) && x == inv_pos.x && y == inv_pos.y)); return((boolean)(Invocation_lev(&u.uz) && x == inv_pos.x && y == inv_pos.y));
} }
#endif /* OVL1 */
#ifdef OVL3
/* return TRUE if (dx,dy) is an OK place to move /* return TRUE if (dx,dy) is an OK place to move
* mode is one of DO_MOVE, TEST_MOVE or TEST_TRAV * mode is one of DO_MOVE, TEST_MOVE or TEST_TRAV
*/ */
@@ -1430,9 +1417,6 @@ invocation_message()
} }
} }
#endif /* OVL3 */
#ifdef OVL2
void void
spoteffects(pick) spoteffects(pick)
boolean pick; boolean pick;
@@ -1804,9 +1788,6 @@ register boolean newlev;
return; return;
} }
#endif /* OVL2 */
#ifdef OVLB
int int
dopickup() dopickup()
{ {
@@ -1867,9 +1848,6 @@ dopickup()
return (pickup(-count)); return (pickup(-count));
} }
#endif /* OVLB */
#ifdef OVL2
/* stop running if we see something interesting */ /* stop running if we see something interesting */
/* turn around a corner if that is the only way we can proceed */ /* turn around a corner if that is the only way we can proceed */
/* do not turn left or right twice */ /* do not turn left or right twice */
@@ -2049,9 +2027,6 @@ const char *msg_override;
afternmv = 0; afternmv = 0;
} }
#endif /* OVL2 */
#ifdef OVL1
STATIC_OVL void STATIC_OVL void
maybe_wail() maybe_wail()
{ {
@@ -2225,9 +2200,6 @@ const char *str;
return 0; return 0;
} }
#endif /* OVL1 */
#ifdef OVLB
int int
inv_cnt() inv_cnt()
{ {
@@ -2258,6 +2230,5 @@ struct obj *otmp;
return 0; return 0;
} }
#endif #endif
#endif /* OVLB */
/*hack.c*/ /*hack.c*/
-31
View File
@@ -50,7 +50,6 @@ NetHack, except that rounddiv may call panic().
# define Static static # define Static static
#endif #endif
#ifdef OVLB
boolean boolean
digit(c) /* is 'c' a digit? */ digit(c) /* is 'c' a digit? */
char c; char c;
@@ -64,9 +63,7 @@ letter(c) /* is 'c' a letter? note: '@' classed as letter */
{ {
return((boolean)(('@' <= c && c <= 'Z') || ('a' <= c && c <= 'z'))); return((boolean)(('@' <= c && c <= 'Z') || ('a' <= c && c <= 'z')));
} }
#endif /* OVLB */
#ifdef OVL1
char char
highc(c) /* force 'c' into uppercase */ highc(c) /* force 'c' into uppercase */
char c; char c;
@@ -80,9 +77,7 @@ lowc(c) /* force 'c' into lowercase */
{ {
return((char)(('A' <= c && c <= 'Z') ? (c | 040) : c)); return((char)(('A' <= c && c <= 'Z') ? (c | 040) : c));
} }
#endif /* OVL1 */
#ifdef OVLB
char * char *
lcase(s) /* convert a string into all lowercase */ lcase(s) /* convert a string into all lowercase */
char *s; char *s;
@@ -120,9 +115,6 @@ char *bp;
return bp; return bp;
} }
#endif /* OVLB */
#ifdef OVL0
char * char *
eos(s) /* return the end of a string (pointing at '\0') */ eos(s) /* return the end of a string (pointing at '\0') */
register char *s; register char *s;
@@ -177,9 +169,7 @@ char *buf;
*q = '\0'; *q = '\0';
return buf; return buf;
} }
#endif /* OVL0 */
#ifdef OVL2
boolean boolean
onlyspace(s) /* is a string entirely whitespace? */ onlyspace(s) /* is a string entirely whitespace? */
const char *s; const char *s;
@@ -188,9 +178,7 @@ onlyspace(s) /* is a string entirely whitespace? */
if (*s != ' ' && *s != '\t') return FALSE; if (*s != ' ' && *s != '\t') return FALSE;
return TRUE; return TRUE;
} }
#endif /* OVL2 */
#ifdef OVLB
char * char *
tabexpand(sbuf) /* expand tabs into proper number of spaces */ tabexpand(sbuf) /* expand tabs into proper number of spaces */
char *sbuf; char *sbuf;
@@ -234,9 +222,7 @@ visctrl(c) /* make a displayable string from a character */
} }
return ccc; return ccc;
} }
#endif /* OVLB */
#ifdef OVL2
const char * const char *
ordin(n) /* return the ordinal suffix of a number */ ordin(n) /* return the ordinal suffix of a number */
int n; /* note: should be non-negative */ int n; /* note: should be non-negative */
@@ -246,9 +232,7 @@ ordin(n) /* return the ordinal suffix of a number */
return (dd == 0 || dd > 3 || (n % 100) / 10 == 1) ? "th" : return (dd == 0 || dd > 3 || (n % 100) / 10 == 1) ? "th" :
(dd == 1) ? "st" : (dd == 2) ? "nd" : "rd"; (dd == 1) ? "st" : (dd == 2) ? "nd" : "rd";
} }
#endif /* OVL2 */
#ifdef OVL1
char * char *
sitoa(n) /* make a signed digit string from a number */ sitoa(n) /* make a signed digit string from a number */
int n; int n;
@@ -265,9 +249,7 @@ sgn(n) /* return the sign of a number: -1, 0, or 1 */
{ {
return (n < 0) ? -1 : (n != 0); return (n < 0) ? -1 : (n != 0);
} }
#endif /* OVL1 */
#ifdef OVLB
int int
rounddiv(x, y) /* calculate x/y, rounding as appropriate */ rounddiv(x, y) /* calculate x/y, rounding as appropriate */
long x; long x;
@@ -290,9 +272,7 @@ rounddiv(x, y) /* calculate x/y, rounding as appropriate */
return divsgn * r; return divsgn * r;
} }
#endif /* OVLB */
#ifdef OVL0
int int
distmin(x0, y0, x1, y1) /* distance between two points, in moves */ distmin(x0, y0, x1, y1) /* distance between two points, in moves */
int x0, y0, x1, y1; int x0, y0, x1, y1;
@@ -325,9 +305,6 @@ online2(x0, y0, x1, y1) /* are two points lined up (on a straight line)? */
return((boolean)(!dy || !dx || (dy == dx) || (dy + dx == 0))); /* (dy == -dx) */ return((boolean)(!dy || !dx || (dy == dx) || (dy + dx == 0))); /* (dy == -dx) */
} }
#endif /* OVL0 */
#ifdef OVLB
boolean boolean
pmatch(patrn, strng) /* match a string against a pattern */ pmatch(patrn, strng) /* match a string against a pattern */
const char *patrn, *strng; const char *patrn, *strng;
@@ -349,9 +326,7 @@ pmatch_top:
else /* return pmatch(patrn, strng); */ else /* return pmatch(patrn, strng); */
goto pmatch_top; /* optimize tail recursion */ goto pmatch_top; /* optimize tail recursion */
} }
#endif /* OVLB */
#ifdef OVL2
#ifndef STRNCMPI #ifndef STRNCMPI
int int
strncmpi(s1, s2, n) /* case insensitive counted string comparison */ strncmpi(s1, s2, n) /* case insensitive counted string comparison */
@@ -370,9 +345,7 @@ strncmpi(s1, s2, n) /* case insensitive counted string comparison */
return 0; /* s1 == s2 */ return 0; /* s1 == s2 */
} }
#endif /* STRNCMPI */ #endif /* STRNCMPI */
#endif /* OVL2 */
#ifdef OVLB
#ifndef STRSTRI #ifndef STRSTRI
char * char *
@@ -438,9 +411,6 @@ fuzzymatch(s1, s2, ignore_chars, caseblind)
return (boolean)(!c1 && !c2); return (boolean)(!c1 && !c2);
} }
#endif /* OVLB */
#ifdef OVL2
/* /*
* Time routines * Time routines
* *
@@ -610,6 +580,5 @@ midnight()
{ {
return(getlt()->tm_hour == 0); return(getlt()->tm_hour == 0);
} }
#endif /* OVL2 */
/*hacklib.c*/ /*hacklib.c*/
-62
View File
@@ -7,30 +7,24 @@
#define NOINVSYM '#' #define NOINVSYM '#'
#define CONTAINED_SYM '>' /* designator for inside a container */ #define CONTAINED_SYM '>' /* designator for inside a container */
#ifdef OVL1
STATIC_DCL void NDECL(reorder_invent); STATIC_DCL void NDECL(reorder_invent);
STATIC_DCL boolean FDECL(mergable,(struct obj *,struct obj *)); STATIC_DCL boolean FDECL(mergable,(struct obj *,struct obj *));
STATIC_DCL void FDECL(invdisp_nothing, (const char *,const char *)); STATIC_DCL void FDECL(invdisp_nothing, (const char *,const char *));
STATIC_DCL boolean FDECL(worn_wield_only, (struct obj *)); STATIC_DCL boolean FDECL(worn_wield_only, (struct obj *));
STATIC_DCL boolean FDECL(only_here, (struct obj *)); STATIC_DCL boolean FDECL(only_here, (struct obj *));
#endif /* OVL1 */
STATIC_DCL void FDECL(compactify,(char *)); STATIC_DCL void FDECL(compactify,(char *));
STATIC_DCL boolean FDECL(taking_off, (const char *)); STATIC_DCL boolean FDECL(taking_off, (const char *));
STATIC_DCL boolean FDECL(putting_on, (const char *)); STATIC_DCL boolean FDECL(putting_on, (const char *));
STATIC_PTR int FDECL(ckunpaid,(struct obj *)); STATIC_PTR int FDECL(ckunpaid,(struct obj *));
STATIC_PTR int FDECL(ckvalidcat,(struct obj *)); STATIC_PTR int FDECL(ckvalidcat,(struct obj *));
static char FDECL(display_pickinv, (const char *,BOOLEAN_P, long *)); static char FDECL(display_pickinv, (const char *,BOOLEAN_P, long *));
#ifdef OVLB
STATIC_DCL boolean FDECL(this_type_only, (struct obj *)); STATIC_DCL boolean FDECL(this_type_only, (struct obj *));
STATIC_DCL void NDECL(dounpaid); STATIC_DCL void NDECL(dounpaid);
STATIC_DCL struct obj *FDECL(find_unpaid,(struct obj *,struct obj **)); STATIC_DCL struct obj *FDECL(find_unpaid,(struct obj *,struct obj **));
STATIC_DCL void FDECL(menu_identify, (int)); STATIC_DCL void FDECL(menu_identify, (int));
STATIC_DCL boolean FDECL(tool_in_use, (struct obj *)); STATIC_DCL boolean FDECL(tool_in_use, (struct obj *));
#endif /* OVLB */
STATIC_DCL char FDECL(obj_to_let,(struct obj *)); STATIC_DCL char FDECL(obj_to_let,(struct obj *));
#ifdef OVLB
static int lastinvnr = 51; /* 0 ... 51 (never saved&restored) */ static int lastinvnr = 51; /* 0 ... 51 (never saved&restored) */
#ifdef WIZARD #ifdef WIZARD
@@ -79,9 +73,6 @@ register struct obj *otmp;
lastinvnr = i; lastinvnr = i;
} }
#endif /* OVLB */
#ifdef OVL1
/* note: assumes ASCII; toggling a bit puts lowercase in front of uppercase */ /* note: assumes ASCII; toggling a bit puts lowercase in front of uppercase */
#define inv_rank(o) ((o)->invlet ^ 040) #define inv_rank(o) ((o)->invlet ^ 040)
@@ -360,9 +351,6 @@ struct obj *obj;
} }
} }
#endif /* OVL1 */
#ifdef OVLB
/* Add an item to the inventory unless we're fumbling or it refuses to be /* Add an item to the inventory unless we're fumbling or it refuses to be
* held (via touch_artifact), and give a message. * held (via touch_artifact), and give a message.
* If there aren't any free inventory slots, we'll drop it instead. * If there aren't any free inventory slots, we'll drop it instead.
@@ -475,9 +463,6 @@ boolean maybe_unpaid; /* false if caller handles shop billing */
if (obj->known) update_inventory(); if (obj->known) update_inventory();
} }
#endif /* OVLB */
#ifdef OVL3
/* /*
Adjust hero's attributes as if this object was being removed from the Adjust hero's attributes as if this object was being removed from the
hero's inventory. This should only be called from freeinv() and hero's inventory. This should only be called from freeinv() and
@@ -554,9 +539,6 @@ int x, y;
} }
} }
#endif /* OVL3 */
#ifdef OVL2
/* destroy object in fobj chain (if unpaid, it remains on the bill) */ /* destroy object in fobj chain (if unpaid, it remains on the bill) */
void void
delobj(obj) delobj(obj)
@@ -581,9 +563,6 @@ register struct obj *obj;
obfree(obj, (struct obj *) 0); /* frees contents also */ obfree(obj, (struct obj *) 0); /* frees contents also */
} }
#endif /* OVL2 */
#ifdef OVL0
struct obj * struct obj *
sobj_at(n,x,y) sobj_at(n,x,y)
register int n, x, y; register int n, x, y;
@@ -596,9 +575,6 @@ register int n, x, y;
return((struct obj *)0); return((struct obj *)0);
} }
#endif /* OVL0 */
#ifdef OVLB
struct obj * struct obj *
carrying(type) carrying(type)
register int type; register int type;
@@ -658,9 +634,6 @@ int x, y;
return(FALSE); return(FALSE);
} }
#endif /* OVLB */
#ifdef OVL2
struct obj * struct obj *
g_at(x,y) g_at(x,y)
register int x, y; register int x, y;
@@ -673,8 +646,6 @@ register int x, y;
return((struct obj *)0); return((struct obj *)0);
} }
#endif /* OVL2 */
#ifdef OVLB
#ifndef GOLDOBJ #ifndef GOLDOBJ
/* Make a gold object from the hero's gold. */ /* Make a gold object from the hero's gold. */
struct obj * struct obj *
@@ -691,8 +662,6 @@ register long q;
return(otmp); return(otmp);
} }
#endif #endif
#endif /* OVLB */
#ifdef OVL1
STATIC_OVL void STATIC_OVL void
compactify(buf) compactify(buf)
@@ -1125,9 +1094,6 @@ struct obj *otmp;
} }
} }
#endif /* OVL1 */
#ifdef OVLB
STATIC_PTR int STATIC_PTR int
ckvalidcat(otmp) ckvalidcat(otmp)
register struct obj *otmp; register struct obj *otmp;
@@ -1553,9 +1519,6 @@ int id_limit;
update_inventory(); update_inventory();
} }
#endif /* OVLB */
#ifdef OVL2
STATIC_OVL char STATIC_OVL char
obj_to_let(obj) /* should of course only be called for things in invent */ obj_to_let(obj) /* should of course only be called for things in invent */
register struct obj *obj; register struct obj *obj;
@@ -1587,9 +1550,6 @@ long quan;
xprname(obj, (char *)0, obj_to_let(obj), TRUE, 0L, quan)); xprname(obj, (char *)0, obj_to_let(obj), TRUE, 0L, quan));
} }
#endif /* OVL2 */
#ifdef OVL1
char * char *
xprname(obj, txt, let, dot, cost, quan) xprname(obj, txt, let, dot, cost, quan)
struct obj *obj; struct obj *obj;
@@ -1638,9 +1598,6 @@ long quan; /* if non-0, print this quantity, not obj->quan */
return li; return li;
} }
#endif /* OVL1 */
#ifdef OVLB
/* the 'i' command */ /* the 'i' command */
int int
ddoinv() ddoinv()
@@ -2300,9 +2257,6 @@ boolean force_touch;
} }
} }
#endif /* OVLB */
#ifdef OVL1
void void
stackobj(obj) stackobj(obj)
struct obj *obj; struct obj *obj;
@@ -2413,9 +2367,6 @@ doprgold()
return 0; return 0;
} }
#endif /* OVL1 */
#ifdef OVLB
int int
doprwep() doprwep()
{ {
@@ -2558,11 +2509,6 @@ long numused;
u.uundetected = OBJ_AT(u.ux, u.uy); u.uundetected = OBJ_AT(u.ux, u.uy);
} }
#endif /* OVLB */
#ifdef OVL1
/* /*
* Conversion from a class to a string for printing. * Conversion from a class to a string for printing.
* This must match the object class order. * This must match the object class order.
@@ -2623,9 +2569,6 @@ free_invbuf()
invbufsiz = 0; invbufsiz = 0;
} }
#endif /* OVL1 */
#ifdef OVLB
void void
reassign() reassign()
{ {
@@ -2637,9 +2580,6 @@ reassign()
lastinvnr = i; lastinvnr = i;
} }
#endif /* OVLB */
#ifdef OVL1
int int
doorganize() /* inventory organizer by Del Lamb */ doorganize() /* inventory organizer by Del Lamb */
{ {
@@ -2927,6 +2867,4 @@ boolean as_if_seen;
return n; return n;
} }
#endif /* OVL1 */
/*invent.c*/ /*invent.c*/
-4
View File
@@ -38,8 +38,6 @@
* across saves and restores. * across saves and restores.
*/ */
#ifdef OVL3
/* flags */ /* flags */
#define LSF_SHOW 0x1 /* display the light source */ #define LSF_SHOW 0x1 /* display the light source */
#define LSF_NEEDS_FIXUP 0x2 /* need oid fixup */ #define LSF_NEEDS_FIXUP 0x2 /* need oid fixup */
@@ -621,6 +619,4 @@ wiz_light_sources()
#endif /* WIZARD */ #endif /* WIZARD */
#endif /* OVL3 */
/*light.c*/ /*light.c*/
-10
View File
@@ -14,8 +14,6 @@ STATIC_VAR NEARDATA struct xlock_s {
int picktyp, chance, usedtime; int picktyp, chance, usedtime;
} xlock; } xlock;
#ifdef OVLB
STATIC_DCL const char *NDECL(lock_action); STATIC_DCL const char *NDECL(lock_action);
STATIC_DCL boolean FDECL(obstructed,(int,int)); STATIC_DCL boolean FDECL(obstructed,(int,int));
STATIC_DCL void FDECL(chest_shatter_msg, (struct obj *)); STATIC_DCL void FDECL(chest_shatter_msg, (struct obj *));
@@ -208,9 +206,6 @@ forcelock() /* try to force a locked chest */
return((xlock.usedtime = 0)); return((xlock.usedtime = 0));
} }
#endif /* OVLB */
#ifdef OVL0
void void
reset_pick() reset_pick()
{ {
@@ -219,9 +214,6 @@ reset_pick()
xlock.box = 0; xlock.box = 0;
} }
#endif /* OVL0 */
#ifdef OVLB
int int
pick_lock(pick) /* pick a lock with a given object */ pick_lock(pick) /* pick a lock with a given object */
register struct obj *pick; register struct obj *pick;
@@ -916,6 +908,4 @@ struct obj *otmp;
pline("%s %s!", An(thing), disposition); pline("%s %s!", An(thing), disposition);
} }
#endif /* OVLB */
/*lock.c*/ /*lock.c*/
-10
View File
@@ -38,15 +38,10 @@ STATIC_DCL void FDECL(newmail, (struct mail_info *));
extern char *viz_rmin, *viz_rmax; /* line-of-sight limits (vision.c) */ extern char *viz_rmin, *viz_rmax; /* line-of-sight limits (vision.c) */
#ifdef OVL0
# if !defined(UNIX) && !defined(VMS) && !defined(LAN_MAIL) # if !defined(UNIX) && !defined(VMS) && !defined(LAN_MAIL)
int mustgetmail = -1; int mustgetmail = -1;
# endif # endif
#endif /* OVL0 */
#ifdef OVLB
# ifdef UNIX # ifdef UNIX
#include <sys/stat.h> #include <sys/stat.h>
#include <pwd.h> #include <pwd.h>
@@ -117,9 +112,6 @@ getmailstatus()
} }
# endif /* UNIX */ # endif /* UNIX */
#endif /* OVLB */
#ifdef OVL0
/* /*
* Pick coordinates for a starting position for the mail daemon. Called * Pick coordinates for a starting position for the mail daemon. Called
* from newmail() and newphone(). * from newmail() and newphone().
@@ -618,8 +610,6 @@ struct obj *otmp;
# endif /* LAN_MAIL */ # endif /* LAN_MAIL */
#endif /* OVL0 */
#endif /* MAIL */ #endif /* MAIL */
/*mail.c*/ /*mail.c*/
-34
View File
@@ -19,17 +19,13 @@ STATIC_VAR NEARDATA struct monst zeromonst;
(mptr->mlet == S_HUMAN && Role_if(role_pm) && \ (mptr->mlet == S_HUMAN && Role_if(role_pm) && \
(mptr->msound == MS_LEADER || mptr->msound == MS_NEMESIS)) (mptr->msound == MS_LEADER || mptr->msound == MS_NEMESIS))
#ifdef OVL0
STATIC_DCL boolean FDECL(uncommon, (int)); STATIC_DCL boolean FDECL(uncommon, (int));
STATIC_DCL int FDECL(align_shift, (struct permonst *)); STATIC_DCL int FDECL(align_shift, (struct permonst *));
#endif /* OVL0 */
STATIC_DCL boolean FDECL(wrong_elem_type, (struct permonst *)); STATIC_DCL boolean FDECL(wrong_elem_type, (struct permonst *));
STATIC_DCL void FDECL(m_initgrp,(struct monst *,int,int,int)); STATIC_DCL void FDECL(m_initgrp,(struct monst *,int,int,int));
STATIC_DCL void FDECL(m_initthrow,(struct monst *,int,int)); STATIC_DCL void FDECL(m_initthrow,(struct monst *,int,int));
STATIC_DCL void FDECL(m_initweap,(struct monst *)); STATIC_DCL void FDECL(m_initweap,(struct monst *));
#ifdef OVL1
STATIC_DCL void FDECL(m_initinv,(struct monst *)); STATIC_DCL void FDECL(m_initinv,(struct monst *));
#endif /* OVL1 */
extern const int monstr[]; extern const int monstr[];
@@ -38,7 +34,6 @@ extern const int monstr[];
#define toostrong(monindx, lev) (monstr[monindx] > lev) #define toostrong(monindx, lev) (monstr[monindx] > lev)
#define tooweak(monindx, lev) (monstr[monindx] < lev) #define tooweak(monindx, lev) (monstr[monindx] < lev)
#ifdef OVLB
boolean boolean
is_home_elemental(ptr) is_home_elemental(ptr)
register struct permonst *ptr; register struct permonst *ptr;
@@ -157,9 +152,6 @@ int otyp,oquan;
(void) mpickobj(mtmp, otmp); (void) mpickobj(mtmp, otmp);
} }
#endif /* OVLB */
#ifdef OVL2
STATIC_OVL void STATIC_OVL void
m_initweap(mtmp) m_initweap(mtmp)
register struct monst *mtmp; register struct monst *mtmp;
@@ -465,9 +457,6 @@ register struct monst *mtmp;
(void) mongets(mtmp, rnd_offensive_item(mtmp)); (void) mongets(mtmp, rnd_offensive_item(mtmp));
} }
#endif /* OVL2 */
#ifdef OVL1
#ifdef GOLDOBJ #ifdef GOLDOBJ
/* /*
* Makes up money for monster's inventory. * Makes up money for monster's inventory.
@@ -1101,9 +1090,6 @@ struct permonst *mptr; /* usually null; used for confused reading */
return known; return known;
} }
#endif /* OVL1 */
#ifdef OVL0
STATIC_OVL boolean STATIC_OVL boolean
uncommon(mndx) uncommon(mndx)
int mndx; int mndx;
@@ -1254,9 +1240,6 @@ int mndx; /* particular species that can no longer be created */
} /* note: safe to ignore extinction of unique monsters */ } /* note: safe to ignore extinction of unique monsters */
} }
#endif /* OVL0 */
#ifdef OVL1
/* The routine below is used to make one of the multiple types /* The routine below is used to make one of the multiple types
* of a given monster class. The second parameter specifies a * of a given monster class. The second parameter specifies a
* special casing bit mask to allow the normal genesis * special casing bit mask to allow the normal genesis
@@ -1343,9 +1326,6 @@ register struct permonst *ptr;
return((tmp > tmp2) ? tmp2 : (tmp > 0 ? tmp : 0)); /* 0 lower limit */ return((tmp > tmp2) ? tmp2 : (tmp > 0 ? tmp : 0)); /* 0 lower limit */
} }
#endif /* OVL1 */
#ifdef OVLB
struct permonst * struct permonst *
grow_up(mtmp, victim) /* `mtmp' might "grow up" into a bigger version */ grow_up(mtmp, victim) /* `mtmp' might "grow up" into a bigger version */
struct monst *mtmp, *victim; struct monst *mtmp, *victim;
@@ -1435,9 +1415,6 @@ struct monst *mtmp, *victim;
return ptr; return ptr;
} }
#endif /* OVLB */
#ifdef OVL1
int int
mongets(mtmp, otyp) mongets(mtmp, otyp)
register struct monst *mtmp; register struct monst *mtmp;
@@ -1487,9 +1464,6 @@ register int otyp;
} else return(0); } else return(0);
} }
#endif /* OVL1 */
#ifdef OVLB
int int
golemhp(type) golemhp(type)
int type; int type;
@@ -1510,9 +1484,6 @@ int type;
} }
} }
#endif /* OVLB */
#ifdef OVL1
/* /*
* Alignment vs. yours determines monster's attitude to you. * Alignment vs. yours determines monster's attitude to you.
* ( some "animal" types are co-aligned, but also hungry ) * ( some "animal" types are co-aligned, but also hungry )
@@ -1609,9 +1580,6 @@ struct monst *mtmp;
mtmp->malign = abs(mal); mtmp->malign = abs(mal);
} }
#endif /* OVL1 */
#ifdef OVLB
static NEARDATA char syms[] = { static NEARDATA char syms[] = {
MAXOCLASSES, MAXOCLASSES+1, RING_CLASS, WAND_CLASS, WEAPON_CLASS, MAXOCLASSES, MAXOCLASSES+1, RING_CLASS, WAND_CLASS, WEAPON_CLASS,
FOOD_CLASS, COIN_CLASS, SCROLL_CLASS, POTION_CLASS, ARMOR_CLASS, FOOD_CLASS, COIN_CLASS, SCROLL_CLASS, POTION_CLASS, ARMOR_CLASS,
@@ -1752,6 +1720,4 @@ struct obj *bag;
} }
} }
#endif /* OVLB */
/*makemon.c*/ /*makemon.c*/
-10
View File
@@ -38,8 +38,6 @@ STATIC_DCL void FDECL(cast_cleric_spell,(struct monst *, int,int));
STATIC_DCL boolean FDECL(is_undirected_spell,(unsigned int,int)); STATIC_DCL boolean FDECL(is_undirected_spell,(unsigned int,int));
STATIC_DCL boolean FDECL(spell_would_be_useless,(struct monst *,unsigned int,int)); STATIC_DCL boolean FDECL(spell_would_be_useless,(struct monst *,unsigned int,int));
#ifdef OVL0
extern const char * const flash_types[]; /* from zap.c */ extern const char * const flash_types[]; /* from zap.c */
/* feedback when frustrated monster couldn't cast a spell */ /* feedback when frustrated monster couldn't cast a spell */
@@ -71,9 +69,6 @@ boolean undirected;
} }
} }
#endif /* OVL0 */
#ifdef OVLB
/* convert a level based random selection into a specific mage spell; /* convert a level based random selection into a specific mage spell;
inappropriate choices will be screened out by spell_would_be_useless() */ inappropriate choices will be screened out by spell_would_be_useless() */
STATIC_OVL int STATIC_OVL int
@@ -750,9 +745,6 @@ int spellnum;
return FALSE; return FALSE;
} }
#endif /* OVLB */
#ifdef OVL0
/* convert 1..10 to 0..9; add 10 for second group (spell casting) */ /* convert 1..10 to 0..9; add 10 for second group (spell casting) */
#define ad_to_typ(k) (10 + (int)k - 1) #define ad_to_typ(k) (10 + (int)k - 1)
@@ -783,6 +775,4 @@ buzzmu(mtmp, mattk) /* monster uses spell (ranged) */
return(1); return(1);
} }
#endif /* OVL0 */
/*mcastu.c*/ /*mcastu.c*/
-12
View File
@@ -8,8 +8,6 @@
extern boolean notonhead; extern boolean notonhead;
#ifdef OVLB
static NEARDATA boolean vis, far_noise; static NEARDATA boolean vis, far_noise;
static NEARDATA long noisetime; static NEARDATA long noisetime;
static NEARDATA struct obj *otmp; static NEARDATA struct obj *otmp;
@@ -1150,11 +1148,6 @@ mdamagem(magr, mdef, mattk)
return(MM_HIT); return(MM_HIT);
} }
#endif /* OVLB */
#ifdef OVL0
int int
noattacks(ptr) /* returns 1 if monster doesn't attack */ noattacks(ptr) /* returns 1 if monster doesn't attack */
struct permonst *ptr; struct permonst *ptr;
@@ -1201,9 +1194,6 @@ struct monst *mon;
} }
} }
#endif /* OVL0 */
#ifdef OVLB
STATIC_OVL void STATIC_OVL void
mrustm(magr, mdef, obj) mrustm(magr, mdef, obj)
register struct monst *magr, *mdef; register struct monst *magr, *mdef;
@@ -1442,7 +1432,5 @@ int aatyp;
return w_mask; return w_mask;
} }
#endif /* OVLB */
/*mhitm.c*/ /*mhitm.c*/
+2 -45
View File
@@ -8,16 +8,12 @@
STATIC_VAR NEARDATA struct obj *otmp; STATIC_VAR NEARDATA struct obj *otmp;
STATIC_DCL void FDECL(urustm, (struct monst *, struct obj *)); STATIC_DCL void FDECL(urustm, (struct monst *, struct obj *));
# ifdef OVL1
STATIC_DCL boolean FDECL(u_slip_free, (struct monst *,struct attack *)); STATIC_DCL boolean FDECL(u_slip_free, (struct monst *,struct attack *));
STATIC_DCL int FDECL(passiveum, (struct permonst *,struct monst *,struct attack *)); STATIC_DCL int FDECL(passiveum, (struct permonst *,struct monst *,struct attack *));
# endif /* OVL1 */
#ifdef OVLB #ifdef SEDUCE
# ifdef SEDUCE
STATIC_DCL void FDECL(mayberem, (struct obj *, const char *)); STATIC_DCL void FDECL(mayberem, (struct obj *, const char *));
# endif #endif
#endif /* OVLB */
STATIC_DCL boolean FDECL(diseasemu, (struct permonst *)); STATIC_DCL boolean FDECL(diseasemu, (struct permonst *));
STATIC_DCL int FDECL(hitmu, (struct monst *,struct attack *)); STATIC_DCL int FDECL(hitmu, (struct monst *,struct attack *));
@@ -34,9 +30,6 @@ STATIC_DCL void FDECL(hitmsg,(struct monst *,struct attack *));
/* changed to a parameter to mhitu. */ /* changed to a parameter to mhitu. */
static int dieroll; static int dieroll;
#ifdef OVL1
STATIC_OVL void STATIC_OVL void
hitmsg(mtmp, mattk) hitmsg(mtmp, mattk)
register struct monst *mtmp; register struct monst *mtmp;
@@ -144,9 +137,6 @@ u_slow_down()
exercise(A_DEX, FALSE); exercise(A_DEX, FALSE);
} }
#endif /* OVL1 */
#ifdef OVLB
STATIC_OVL void STATIC_OVL void
wildmiss(mtmp, mattk) /* monster attacked your displaced image */ wildmiss(mtmp, mattk) /* monster attacked your displaced image */
register struct monst *mtmp; register struct monst *mtmp;
@@ -263,9 +253,6 @@ boolean message;
pline("Brrooaa... You land hard at some distance."); pline("Brrooaa... You land hard at some distance.");
} }
#endif /* OVLB */
#ifdef OVL0
/* select a monster's next attack, possibly substituting for its usual one */ /* select a monster's next attack, possibly substituting for its usual one */
struct attack * struct attack *
getmattk(mptr, indx, prev_result, alt_attk_buf) getmattk(mptr, indx, prev_result, alt_attk_buf)
@@ -670,9 +657,6 @@ mattacku(mtmp)
return(0); return(0);
} }
#endif /* OVL0 */
#ifdef OVLB
/* /*
* helper function for some compilers that have trouble with hitmu * helper function for some compilers that have trouble with hitmu
*/ */
@@ -736,9 +720,6 @@ int attk;
} }
} }
#endif /* OVLB */
#ifdef OVL1
STATIC_OVL boolean STATIC_OVL boolean
diseasemu(mdat) diseasemu(mdat)
struct permonst *mdat; struct permonst *mdat;
@@ -1586,9 +1567,6 @@ dopois:
return res; return res;
} }
#endif /* OVL1 */
#ifdef OVLB
/* An interface for use when taking a blindfold off, for example, /* An interface for use when taking a blindfold off, for example,
* to see if an engulfing attack should immediately take affect, like * to see if an engulfing attack should immediately take affect, like
* a passive attack. TRUE if engulfing blindness occurred */ * a passive attack. TRUE if engulfing blindness occurred */
@@ -2020,9 +1998,6 @@ gazemu(mtmp, mattk) /* monster gazes at you */
return(0); return(0);
} }
#endif /* OVLB */
#ifdef OVL1
void void
mdamageu(mtmp, n) /* mtmp hits you for n points damage */ mdamageu(mtmp, n) /* mtmp hits you for n points damage */
register struct monst *mtmp; register struct monst *mtmp;
@@ -2038,9 +2013,6 @@ register int n;
} }
} }
#endif /* OVL1 */
#ifdef OVLB
STATIC_OVL void STATIC_OVL void
urustm(mon, obj) urustm(mon, obj)
register struct monst *mon; register struct monst *mon;
@@ -2079,9 +2051,6 @@ register struct obj *obj;
} }
} }
#endif /* OVLB */
#ifdef OVL1
int int
could_seduce(magr,mdef,mattk) could_seduce(magr,mdef,mattk)
struct monst *magr, *mdef; struct monst *magr, *mdef;
@@ -2133,9 +2102,6 @@ struct attack *mattk;
return (pagr->mlet == S_NYMPH) ? 2 : 0; return (pagr->mlet == S_NYMPH) ? 2 : 0;
} }
#endif /* OVL1 */
#ifdef OVLB
#ifdef SEDUCE #ifdef SEDUCE
/* Returns 1 if monster teleported */ /* Returns 1 if monster teleported */
int int
@@ -2423,10 +2389,6 @@ const char *str;
} }
#endif /* SEDUCE */ #endif /* SEDUCE */
#endif /* OVLB */
#ifdef OVL1
STATIC_OVL int STATIC_OVL int
passiveum(olduasmon,mtmp,mattk) passiveum(olduasmon,mtmp,mattk)
struct permonst *olduasmon; struct permonst *olduasmon;
@@ -2588,9 +2550,6 @@ register struct attack *mattk;
return 1; return 1;
} }
#endif /* OVL1 */
#ifdef OVLB
#include "edog.h" #include "edog.h"
struct monst * struct monst *
cloneu() cloneu()
@@ -2611,6 +2570,4 @@ cloneu()
return(mon); return(mon);
} }
#endif /* OVLB */
/*mhitu.c*/ /*mhitu.c*/
-29
View File
@@ -7,14 +7,12 @@
STATIC_DCL void FDECL(mkbox_cnts,(struct obj *)); STATIC_DCL void FDECL(mkbox_cnts,(struct obj *));
STATIC_DCL void FDECL(obj_timer_checks,(struct obj *, XCHAR_P, XCHAR_P, int)); STATIC_DCL void FDECL(obj_timer_checks,(struct obj *, XCHAR_P, XCHAR_P, int));
#ifdef OVL1
STATIC_DCL void FDECL(container_weight, (struct obj *)); STATIC_DCL void FDECL(container_weight, (struct obj *));
STATIC_DCL struct obj *FDECL(save_mtraits, (struct obj *, struct monst *)); STATIC_DCL struct obj *FDECL(save_mtraits, (struct obj *, struct monst *));
#ifdef WIZARD #ifdef WIZARD
STATIC_DCL const char *FDECL(where_name, (int)); STATIC_DCL const char *FDECL(where_name, (int));
STATIC_DCL void FDECL(check_contained, (struct obj *,const char *)); STATIC_DCL void FDECL(check_contained, (struct obj *,const char *));
#endif #endif
#endif /* OVL1 */
extern struct obj *thrownobj; /* defined in dothrow.c */ extern struct obj *thrownobj; /* defined in dothrow.c */
@@ -25,8 +23,6 @@ struct icp {
char iclass; /* item class */ char iclass; /* item class */
}; };
#ifdef OVL1
const struct icp mkobjprobs[] = { const struct icp mkobjprobs[] = {
{10, WEAPON_CLASS}, {10, WEAPON_CLASS},
{10, ARMOR_CLASS}, {10, ARMOR_CLASS},
@@ -351,9 +347,6 @@ register struct obj *otmp;
return; return;
} }
#endif /* OVL1 */
#ifdef OVLB
static const char dknowns[] = { static const char dknowns[] = {
WAND_CLASS, RING_CLASS, POTION_CLASS, SCROLL_CLASS, WAND_CLASS, RING_CLASS, POTION_CLASS, SCROLL_CLASS,
GEM_CLASS, SPBOOK_CLASS, WEAPON_CLASS, TOOL_CLASS, 0 GEM_CLASS, SPBOOK_CLASS, WEAPON_CLASS, TOOL_CLASS, 0
@@ -756,9 +749,6 @@ register struct obj *otmp;
return; return;
} }
#endif /* OVLB */
#ifdef OVL1
void void
blessorcurse(otmp, chance) blessorcurse(otmp, chance)
register struct obj *otmp; register struct obj *otmp;
@@ -776,9 +766,6 @@ register int chance;
return; return;
} }
#endif /* OVL1 */
#ifdef OVLB
int int
bcsign(otmp) bcsign(otmp)
register struct obj *otmp; register struct obj *otmp;
@@ -786,9 +773,6 @@ register struct obj *otmp;
return(!!otmp->blessed - !!otmp->cursed); return(!!otmp->blessed - !!otmp->cursed);
} }
#endif /* OVLB */
#ifdef OVL0
/* /*
* Calculate the weight of the given object. This will recursively follow * Calculate the weight of the given object. This will recursively follow
* and calculate the weight of any containers. * and calculate the weight of any containers.
@@ -863,8 +847,6 @@ int x, y;
{ {
return mksobj_at(treefruits[rn2(SIZE(treefruits))], x, y, TRUE, FALSE); return mksobj_at(treefruits[rn2(SIZE(treefruits))], x, y, TRUE, FALSE);
} }
#endif /* OVL0 */
#ifdef OVLB
struct obj * struct obj *
mkgold(amount, x, y) mkgold(amount, x, y)
@@ -885,9 +867,6 @@ int x, y;
return (gold); return (gold);
} }
#endif /* OVLB */
#ifdef OVL1
/* return TRUE if the corpse has special timing */ /* return TRUE if the corpse has special timing */
#define special_corpse(num) (((num) == PM_LIZARD) \ #define special_corpse(num) (((num) == PM_LIZARD) \
|| ((num) == PM_LICHEN) \ || ((num) == PM_LICHEN) \
@@ -1023,9 +1002,6 @@ boolean copyof;
return mnew; return mnew;
} }
#endif /* OVL1 */
#ifdef OVLB
/* make an object named after someone listed in the scoreboard file */ /* make an object named after someone listed in the scoreboard file */
struct obj * struct obj *
mk_tt_object(objtype, x, y) mk_tt_object(objtype, x, y)
@@ -1084,9 +1060,6 @@ register struct obj *otmp;
objects[otyp].oc_material != LIQUID)); objects[otyp].oc_material != LIQUID));
} }
#endif /* OVLB */
#ifdef OVL1
/* /*
* These routines maintain the single-linked lists headed in level.objects[][] * These routines maintain the single-linked lists headed in level.objects[][]
* and threaded through the nexthere fields in the object-instance structure. * and threaded through the nexthere fields in the object-instance structure.
@@ -1628,6 +1601,4 @@ check_contained(container, mesg)
} }
#endif /* WIZARD */ #endif /* WIZARD */
#endif /* OVL1 */
/*mkobj.c*/ /*mkobj.c*/
-11
View File
@@ -15,7 +15,6 @@
#include "hack.h" #include "hack.h"
#ifdef OVLB
STATIC_DCL boolean FDECL(isbig, (struct mkroom *)); STATIC_DCL boolean FDECL(isbig, (struct mkroom *));
STATIC_DCL struct mkroom * FDECL(pick_room,(BOOLEAN_P)); STATIC_DCL struct mkroom * FDECL(pick_room,(BOOLEAN_P));
STATIC_DCL void NDECL(mkshop), FDECL(mkzoo,(int)), NDECL(mkswamp); STATIC_DCL void NDECL(mkshop), FDECL(mkzoo,(int)), NDECL(mkswamp);
@@ -26,14 +25,11 @@ STATIC_DCL struct permonst * NDECL(antholemon);
STATIC_DCL struct permonst * NDECL(squadmon); STATIC_DCL struct permonst * NDECL(squadmon);
STATIC_DCL void FDECL(save_room, (int,struct mkroom *)); STATIC_DCL void FDECL(save_room, (int,struct mkroom *));
STATIC_DCL void FDECL(rest_room, (int,struct mkroom *)); STATIC_DCL void FDECL(rest_room, (int,struct mkroom *));
#endif /* OVLB */
#define sq(x) ((x)*(x)) #define sq(x) ((x)*(x))
extern const struct shclass shtypes[]; /* defined in shknam.c */ extern const struct shclass shtypes[]; /* defined in shknam.c */
#ifdef OVLB
STATIC_OVL boolean STATIC_OVL boolean
isbig(sroom) isbig(sroom)
register struct mkroom *sroom; register struct mkroom *sroom;
@@ -553,9 +549,6 @@ register struct mkroom *sroom;
return FALSE; return FALSE;
} }
#endif /* OVLB */
#ifdef OVL0
int int
somex(croom) somex(croom)
register struct mkroom *croom; register struct mkroom *croom;
@@ -656,9 +649,6 @@ schar type;
return (struct mkroom *) 0; return (struct mkroom *) 0;
} }
#endif /* OVL0 */
#ifdef OVLB
struct permonst * struct permonst *
courtmon() courtmon()
{ {
@@ -776,6 +766,5 @@ int fd;
rooms[nroom].hx = -1; /* restore ending flags */ rooms[nroom].hx = -1; /* restore ending flags */
subrooms[nsubroom].hx = -1; subrooms[nsubroom].hx = -1;
} }
#endif /* OVLB */
/*mkroom.c*/ /*mkroom.c*/
-31
View File
@@ -14,11 +14,9 @@
STATIC_DCL boolean FDECL(restrap,(struct monst *)); STATIC_DCL boolean FDECL(restrap,(struct monst *));
STATIC_DCL long FDECL(mm_aggression, (struct monst *,struct monst *)); STATIC_DCL long FDECL(mm_aggression, (struct monst *,struct monst *));
#ifdef OVL2
STATIC_DCL int NDECL(pick_animal); STATIC_DCL int NDECL(pick_animal);
STATIC_DCL int FDECL(select_newcham_form, (struct monst *)); STATIC_DCL int FDECL(select_newcham_form, (struct monst *));
STATIC_DCL void FDECL(kill_eggs, (struct obj *)); STATIC_DCL void FDECL(kill_eggs, (struct obj *));
#endif
#ifdef REINCARNATION #ifdef REINCARNATION
#define LEVEL_SPECIFIC_NOCORPSE(mdat) \ #define LEVEL_SPECIFIC_NOCORPSE(mdat) \
@@ -32,7 +30,6 @@ STATIC_DCL void FDECL(kill_eggs, (struct obj *));
#if 0 #if 0
/* part of the original warning code which was replaced in 3.3.1 */ /* part of the original warning code which was replaced in 3.3.1 */
#ifdef OVL1
#define warnDelay 10 #define warnDelay 10
long lastwarntime; long lastwarntime;
int lastwarnlev; int lastwarnlev;
@@ -42,12 +39,8 @@ const char *warnings[] = {
}; };
STATIC_DCL void NDECL(warn_effects); STATIC_DCL void NDECL(warn_effects);
#endif /* OVL1 */
#endif /* 0 */ #endif /* 0 */
#ifndef OVLB
STATIC_VAR short cham_to_pm[];
#else
STATIC_DCL struct obj *FDECL(make_corpse,(struct monst *)); STATIC_DCL struct obj *FDECL(make_corpse,(struct monst *));
STATIC_DCL void FDECL(m_detach, (struct monst *, struct permonst *)); STATIC_DCL void FDECL(m_detach, (struct monst *, struct permonst *));
STATIC_DCL void FDECL(lifesaved_monster, (struct monst *)); STATIC_DCL void FDECL(lifesaved_monster, (struct monst *));
@@ -315,9 +308,6 @@ register struct monst *mtmp;
return obj; return obj;
} }
#endif /* OVLB */
#ifdef OVL1
#if 0 #if 0
/* part of the original warning code which was replaced in 3.3.1 */ /* part of the original warning code which was replaced in 3.3.1 */
STATIC_OVL void STATIC_OVL void
@@ -636,9 +626,6 @@ movemon()
return somebody_can_move; return somebody_can_move;
} }
#endif /* OVL1 */
#ifdef OVLB
#define mstoning(obj) (ofood(obj) && \ #define mstoning(obj) (ofood(obj) && \
(touch_petrifies(&mons[(obj)->corpsenm]) || \ (touch_petrifies(&mons[(obj)->corpsenm]) || \
(obj)->corpsenm == PM_MEDUSA)) (obj)->corpsenm == PM_MEDUSA))
@@ -853,8 +840,6 @@ mpickgold(mtmp)
} }
} }
} }
#endif /* OVLB */
#ifdef OVL2
boolean boolean
mpickstuff(mtmp, str) mpickstuff(mtmp, str)
@@ -899,9 +884,6 @@ mpickstuff(mtmp, str)
return FALSE; return FALSE;
} }
#endif /* OVL2 */
#ifdef OVL0
int int
curr_mon_load(mtmp) curr_mon_load(mtmp)
register struct monst *mtmp; register struct monst *mtmp;
@@ -1197,9 +1179,6 @@ impossible("A monster looked at a very strange trap of type %d.", ttmp->ttyp);
return(cnt); return(cnt);
} }
#endif /* OVL0 */
#ifdef OVL1
/* Monster against monster special attacks; for the specified monster /* Monster against monster special attacks; for the specified monster
combinations, this allows one monster to attack another adjacent one combinations, this allows one monster to attack another adjacent one
in the absence of Conflict. There is no provision for targetting in the absence of Conflict. There is no provision for targetting
@@ -1255,9 +1234,6 @@ dmonsfree()
iflags.purge_monsters = 0; iflags.purge_monsters = 0;
} }
#endif /* OVL1 */
#ifdef OVLB
/* called when monster is moved to larger structure */ /* called when monster is moved to larger structure */
void void
replmon(mtmp, mtmp2) replmon(mtmp, mtmp2)
@@ -2080,9 +2056,6 @@ register struct monst *mtmp;
} }
} }
#endif /* OVLB */
#ifdef OVL2
void void
setmangry(mtmp) setmangry(mtmp)
register struct monst *mtmp; register struct monst *mtmp;
@@ -2689,9 +2662,6 @@ kill_genocided_monsters()
kill_eggs(level.buriedobjlist); kill_eggs(level.buriedobjlist);
} }
#endif /* OVL2 */
#ifdef OVLB
void void
golemeffects(mon, damtype, dam) golemeffects(mon, damtype, dam)
register struct monst *mon; register struct monst *mon;
@@ -2798,6 +2768,5 @@ short otyp;
break; break;
} }
} }
#endif /* OVLB */
/*mon.c*/ /*mon.c*/
-34
View File
@@ -8,8 +8,6 @@
/* These routines provide basic data for any type of monster. */ /* These routines provide basic data for any type of monster. */
#ifdef OVLB
void void
set_mon_data(mon, ptr, flag) set_mon_data(mon, ptr, flag)
struct monst *mon; struct monst *mon;
@@ -26,9 +24,6 @@ int flag;
return; return;
} }
#endif /* OVLB */
#ifdef OVL0
struct attack * struct attack *
attacktype_fordmg(ptr, atyp, dtyp) attacktype_fordmg(ptr, atyp, dtyp)
struct permonst *ptr; struct permonst *ptr;
@@ -51,9 +46,6 @@ int atyp;
return attacktype_fordmg(ptr, atyp, AD_ANY) ? TRUE : FALSE; return attacktype_fordmg(ptr, atyp, AD_ANY) ? TRUE : FALSE;
} }
#endif /* OVL0 */
#ifdef OVLB
boolean boolean
poly_when_stoned(ptr) poly_when_stoned(ptr)
struct permonst *ptr; struct permonst *ptr;
@@ -212,9 +204,6 @@ struct obj *obj; /* aatyp == AT_WEAP, AT_SPIT */
return TRUE; return TRUE;
} }
#endif /* OVLB */
#ifdef OVL0
boolean boolean
ranged_attk(ptr) /* returns TRUE if monster can attack at range */ ranged_attk(ptr) /* returns TRUE if monster can attack at range */
struct permonst *ptr; struct permonst *ptr;
@@ -257,9 +246,6 @@ struct permonst *mptr;
(slithy(mptr) && !bigmonst(mptr))); (slithy(mptr) && !bigmonst(mptr)));
} }
#endif /* OVL0 */
#ifdef OVL1
boolean boolean
can_track(ptr) /* returns TRUE if monster can track well */ can_track(ptr) /* returns TRUE if monster can track well */
register struct permonst *ptr; register struct permonst *ptr;
@@ -270,9 +256,6 @@ can_track(ptr) /* returns TRUE if monster can track well */
return((boolean)haseyes(ptr)); return((boolean)haseyes(ptr));
} }
#endif /* OVL1 */
#ifdef OVLB
boolean boolean
sliparm(ptr) /* creature will slide out of armor */ sliparm(ptr) /* creature will slide out of armor */
register struct permonst *ptr; register struct permonst *ptr;
@@ -290,8 +273,6 @@ breakarm(ptr) /* creature will break out of armor */
ptr == &mons[PM_MARILITH] || ptr == &mons[PM_WINGED_GARGOYLE]) ptr == &mons[PM_MARILITH] || ptr == &mons[PM_WINGED_GARGOYLE])
&& !sliparm(ptr)); && !sliparm(ptr));
} }
#endif /* OVLB */
#ifdef OVL1
boolean boolean
sticks(ptr) /* creature sticks other creatures it hits */ sticks(ptr) /* creature sticks other creatures it hits */
@@ -373,9 +354,6 @@ max_passive_dmg(mdef, magr)
return 0; return 0;
} }
#endif /* OVL1 */
#ifdef OVL0
int int
monsndx(ptr) /* return an index into the mons array */ monsndx(ptr) /* return an index into the mons array */
struct permonst *ptr; struct permonst *ptr;
@@ -393,10 +371,6 @@ monsndx(ptr) /* return an index into the mons array */
return(i); return(i);
} }
#endif /* OVL0 */
#ifdef OVL1
int int
name_to_mon(in_str) name_to_mon(in_str)
const char *in_str; const char *in_str;
@@ -505,9 +479,6 @@ const char *in_str;
return mntmp; return mntmp;
} }
#endif /* OVL1 */
#ifdef OVL2
/* returns 3 values (0=male, 1=female, 2=none) */ /* returns 3 values (0=male, 1=female, 2=none) */
int int
gender(mtmp) gender(mtmp)
@@ -528,9 +499,6 @@ register struct monst *mtmp;
type_is_pname(mtmp->data)) ? (int)mtmp->female : 2; type_is_pname(mtmp->data)) ? (int)mtmp->female : 2;
} }
#endif /* OVL2 */
#ifdef OVLB
/* used for nearby monsters when you go to another level */ /* used for nearby monsters when you go to another level */
boolean boolean
levl_follower(mtmp) levl_follower(mtmp)
@@ -747,6 +715,4 @@ struct attack *mattk;
return what; return what;
} }
#endif /* OVLB */
/*mondata.c*/ /*mondata.c*/
-25
View File
@@ -9,16 +9,11 @@
extern boolean notonhead; extern boolean notonhead;
#ifdef OVL0
STATIC_DCL int FDECL(disturb,(struct monst *)); STATIC_DCL int FDECL(disturb,(struct monst *));
STATIC_DCL void FDECL(distfleeck,(struct monst *,int *,int *,int *)); STATIC_DCL void FDECL(distfleeck,(struct monst *,int *,int *,int *));
STATIC_DCL int FDECL(m_arrival, (struct monst *)); STATIC_DCL int FDECL(m_arrival, (struct monst *));
STATIC_DCL void FDECL(watch_on_duty,(struct monst *)); STATIC_DCL void FDECL(watch_on_duty,(struct monst *));
#endif /* OVL0 */
#ifdef OVLB
boolean /* TRUE : mtmp died */ boolean /* TRUE : mtmp died */
mb_trapped(mtmp) mb_trapped(mtmp)
register struct monst *mtmp; register struct monst *mtmp;
@@ -42,9 +37,6 @@ register struct monst *mtmp;
return(FALSE); return(FALSE);
} }
#endif /* OVLB */
#ifdef OVL0
STATIC_OVL void STATIC_OVL void
watch_on_duty(mtmp) watch_on_duty(mtmp)
register struct monst *mtmp; register struct monst *mtmp;
@@ -76,9 +68,6 @@ register struct monst *mtmp;
} }
} }
#endif /* OVL0 */
#ifdef OVL1
int int
dochugw(mtmp) dochugw(mtmp)
register struct monst *mtmp; register struct monst *mtmp;
@@ -123,9 +112,6 @@ dochugw(mtmp)
return(rd); return(rd);
} }
#endif /* OVL1 */
#ifdef OVL2
boolean boolean
onscary(x, y, mtmp) onscary(x, y, mtmp)
int x, y; int x, y;
@@ -145,9 +131,6 @@ struct monst *mtmp;
&& IS_ALTAR(levl[x][y].typ))); && IS_ALTAR(levl[x][y].typ)));
} }
#endif /* OVL2 */
#ifdef OVL0
/* regenerate lost hit points */ /* regenerate lost hit points */
void void
mon_regen(mon, digest_meal) mon_regen(mon, digest_meal)
@@ -1210,9 +1193,6 @@ postmov:
return(mmoved); return(mmoved);
} }
#endif /* OVL0 */
#ifdef OVL2
boolean boolean
closed_door(x, y) closed_door(x, y)
register int x, y; register int x, y;
@@ -1228,9 +1208,6 @@ register int x, y;
return((boolean)(ACCESSIBLE(levl[x][y].typ) && !closed_door(x, y))); return((boolean)(ACCESSIBLE(levl[x][y].typ) && !closed_door(x, y)));
} }
#endif /* OVL2 */
#ifdef OVL0
/* decide where the monster thinks you are standing */ /* decide where the monster thinks you are standing */
void void
set_apparxy(mtmp) set_apparxy(mtmp)
@@ -1360,6 +1337,4 @@ struct monst *mtmp;
return TRUE; return TRUE;
} }
#endif /* OVL0 */
/*monmove.c*/ /*monmove.c*/
-26
View File
@@ -10,12 +10,6 @@ STATIC_DCL int FDECL(drop_throw,(struct obj *,BOOLEAN_P,int,int));
#define POLE_LIM 5 /* How far monsters can use pole-weapons */ #define POLE_LIM 5 /* How far monsters can use pole-weapons */
#ifndef OVLB
STATIC_DCL const char *breathwep[];
#else /* OVLB */
/* /*
* Keep consistent with breath weapons in zap.c, and AD_* in monattk.h. * Keep consistent with breath weapons in zap.c, and AD_* in monattk.h.
*/ */
@@ -132,9 +126,6 @@ int x,y;
return retvalu; return retvalu;
} }
#endif /* OVLB */
#ifdef OVL1
/* an object launched by someone/thing other than player attacks a monster; /* an object launched by someone/thing other than player attacks a monster;
return 1 if the object has stopped moving (hit or its range used up) */ return 1 if the object has stopped moving (hit or its range used up) */
int int
@@ -454,9 +445,6 @@ m_throw(mon, x, y, dx, dy, range, obj)
} }
} }
#endif /* OVL1 */
#ifdef OVLB
/* Remove an item from the monster's inventory and destroy it. */ /* Remove an item from the monster's inventory and destroy it. */
void void
m_useup(mon, obj) m_useup(mon, obj)
@@ -477,9 +465,6 @@ struct obj *obj;
} }
} }
#endif /* OVLB */
#ifdef OVL1
/* monster attempts ranged weapon attack against player */ /* monster attempts ranged weapon attack against player */
void void
thrwmu(mtmp) thrwmu(mtmp)
@@ -611,9 +596,6 @@ struct monst *mtmp;
nomul(0); nomul(0);
} }
#endif /* OVL1 */
#ifdef OVLB
int int
spitmu(mtmp, mattk) /* monster spits substance at you */ spitmu(mtmp, mattk) /* monster spits substance at you */
register struct monst *mtmp; register struct monst *mtmp;
@@ -653,9 +635,6 @@ register struct attack *mattk;
return 0; return 0;
} }
#endif /* OVLB */
#ifdef OVL1
int int
breamu(mtmp, mattk) /* monster breathes at you (ranged) */ breamu(mtmp, mattk) /* monster breathes at you (ranged) */
register struct monst *mtmp; register struct monst *mtmp;
@@ -724,9 +703,6 @@ lined_up(mtmp) /* is mtmp in position to use ranged attack? */
return(linedup(mtmp->mux,mtmp->muy,mtmp->mx,mtmp->my)); return(linedup(mtmp->mux,mtmp->muy,mtmp->mx,mtmp->my));
} }
#endif /* OVL1 */
#ifdef OVL0
/* Check if a monster is carrying a particular item. /* Check if a monster is carrying a particular item.
*/ */
struct obj * struct obj *
@@ -819,6 +795,4 @@ int whodidit; /* 1==hero, 0=other, -1==just check whether it'll pass thru */
return hits; return hits;
} }
#endif /* OVL0 */
/*mthrowu.c*/ /*mthrowu.c*/
-35
View File
@@ -10,9 +10,7 @@
#define NUMOBUF 12 #define NUMOBUF 12
STATIC_DCL char *FDECL(strprepend,(char *,const char *)); STATIC_DCL char *FDECL(strprepend,(char *,const char *));
#ifdef OVLB
static boolean FDECL(wishymatch, (const char *,const char *,BOOLEAN_P)); static boolean FDECL(wishymatch, (const char *,const char *,BOOLEAN_P));
#endif
static char *NDECL(nextobuf); static char *NDECL(nextobuf);
static void FDECL(add_erosion_words, (struct obj *, char *)); static void FDECL(add_erosion_words, (struct obj *, char *));
@@ -29,12 +27,6 @@ struct Jitem {
typ != BLACK_OPAL && \ typ != BLACK_OPAL && \
typ != EMERALD && typ != OPAL))) typ != EMERALD && typ != OPAL)))
#ifndef OVLB
STATIC_DCL struct Jitem Japanese_items[];
#else /* OVLB */
STATIC_OVL struct Jitem Japanese_items[] = { STATIC_OVL struct Jitem Japanese_items[] = {
{ SHORT_SWORD, "wakizashi" }, { SHORT_SWORD, "wakizashi" },
{ BROADSWORD, "ninja-to" }, { BROADSWORD, "ninja-to" },
@@ -51,12 +43,8 @@ STATIC_OVL struct Jitem Japanese_items[] = {
{0, "" } {0, "" }
}; };
#endif /* OVLB */
STATIC_DCL const char *FDECL(Japanese_item_name,(int i)); STATIC_DCL const char *FDECL(Japanese_item_name,(int i));
#ifdef OVL1
STATIC_OVL char * STATIC_OVL char *
strprepend(s,pref) strprepend(s,pref)
register char *s; register char *s;
@@ -73,9 +61,6 @@ register const char *pref;
return(s); return(s);
} }
#endif /* OVL1 */
#ifdef OVLB
/* manage a pool of BUFSZ buffers, so callers don't have to */ /* manage a pool of BUFSZ buffers, so callers don't have to */
static char * static char *
nextobuf() nextobuf()
@@ -227,9 +212,6 @@ boolean juice; /* whether or not to append " juice" to the name */
return buf; return buf;
} }
#endif /* OVLB */
#ifdef OVL1
char * char *
xname(obj) xname(obj)
register struct obj *obj; register struct obj *obj;
@@ -500,8 +482,6 @@ struct obj *obj;
return onm; return onm;
} }
#endif /* OVL1 */
#ifdef OVL0
/* used for naming "the unique_item" instead of "a unique_item" */ /* used for naming "the unique_item" instead of "a unique_item" */
boolean boolean
@@ -789,9 +769,6 @@ ring:
return(bp); return(bp);
} }
#endif /* OVL0 */
#ifdef OVLB
/* used from invent.c */ /* used from invent.c */
boolean boolean
not_fully_identified(otmp) not_fully_identified(otmp)
@@ -1251,9 +1228,6 @@ static const char wrpsym[] = {
FOOD_CLASS FOOD_CLASS
}; };
#endif /* OVLB */
#ifdef OVL0
/* Plural routine; chiefly used for user-defined fruits. We have to try to /* Plural routine; chiefly used for user-defined fruits. We have to try to
* account for everything reasonable the player has; something unreasonable * account for everything reasonable the player has; something unreasonable
* can still break the code. However, it's still a lot more accurate than * can still break the code. However, it's still a lot more accurate than
@@ -1481,19 +1455,11 @@ bottom: if (excess) Strcpy(eos(str), excess);
return str; return str;
} }
#endif /* OVL0 */
struct o_range { struct o_range {
const char *name, oclass; const char *name, oclass;
int f_o_range, l_o_range; int f_o_range, l_o_range;
}; };
#ifndef OVLB
STATIC_DCL const struct o_range o_ranges[];
#else /* OVLB */
/* wishable subranges of objects */ /* wishable subranges of objects */
STATIC_OVL NEARDATA const struct o_range o_ranges[] = { STATIC_OVL NEARDATA const struct o_range o_ranges[] = {
{ "bag", TOOL_CLASS, SACK, BAG_OF_TRICKS }, { "bag", TOOL_CLASS, SACK, BAG_OF_TRICKS },
@@ -2784,6 +2750,5 @@ struct monst *mtmp;
} }
return "whatcha-may-callit"; return "whatcha-may-callit";
} }
#endif /* OVLB */
/*objnam.c*/ /*objnam.c*/
-3
View File
@@ -9,8 +9,6 @@
#include "edog.h" #include "edog.h"
#endif #endif
#ifdef OVLB
static boolean no_repeat = FALSE; static boolean no_repeat = FALSE;
static char *FDECL(You_buf, (int)); static char *FDECL(You_buf, (int));
@@ -432,5 +430,4 @@ self_invis_message()
"can't see yourself"); "can't see yourself");
} }
#endif /* OVLB */
/*pline.c*/ /*pline.c*/
-12
View File
@@ -12,7 +12,6 @@
#include "hack.h" #include "hack.h"
#ifdef OVLB
STATIC_DCL void FDECL(polyman, (const char *,const char *)); STATIC_DCL void FDECL(polyman, (const char *,const char *));
STATIC_DCL void NDECL(break_armor); STATIC_DCL void NDECL(break_armor);
STATIC_DCL void FDECL(drop_weapon,(int)); STATIC_DCL void FDECL(drop_weapon,(int));
@@ -1135,9 +1134,6 @@ boolean silently;
} }
} }
#endif /* OVLB */
#ifdef OVL1
const char * const char *
mbodypart(mon, part) mbodypart(mon, part)
struct monst *mon; struct monst *mon;
@@ -1258,9 +1254,6 @@ int part;
return mbodypart(&youmonst, part); return mbodypart(&youmonst, part);
} }
#endif /* OVL1 */
#ifdef OVL0
int int
poly_gender() poly_gender()
{ {
@@ -1271,9 +1264,6 @@ poly_gender()
return flags.female; return flags.female;
} }
#endif /* OVL0 */
#ifdef OVLB
void void
ugolemeffects(damtype, dam) ugolemeffects(damtype, dam)
int damtype, dam; int damtype, dam;
@@ -1344,6 +1334,4 @@ int atyp;
} }
} }
#endif /* OVLB */
/*polyself.c*/ /*polyself.c*/
-3
View File
@@ -4,7 +4,6 @@
#include "hack.h" #include "hack.h"
#ifdef OVLB
boolean notonhead = FALSE; boolean notonhead = FALSE;
static NEARDATA int nothing, unkn; static NEARDATA int nothing, unkn;
@@ -2006,6 +2005,4 @@ struct monst *mon, /* monster being split */
return mtmp2; return mtmp2;
} }
#endif /* OVLB */
/*potion.c*/ /*potion.c*/
-11
View File
@@ -11,8 +11,6 @@
/* this matches the categorizations shown by enlightenment */ /* this matches the categorizations shown by enlightenment */
#define ALGN_SINNED (-4) /* worse than strayed */ #define ALGN_SINNED (-4) /* worse than strayed */
#ifdef OVLB
STATIC_DCL boolean FDECL(histemple_at,(struct monst *,XCHAR_P,XCHAR_P)); STATIC_DCL boolean FDECL(histemple_at,(struct monst *,XCHAR_P,XCHAR_P));
STATIC_DCL boolean FDECL(has_shrine,(struct monst *)); STATIC_DCL boolean FDECL(has_shrine,(struct monst *));
@@ -109,10 +107,6 @@ pick_move:
return(0); return(0);
} }
#endif /* OVLB */
#ifdef OVL0
char char
temple_occupied(array) temple_occupied(array)
register char *array; register char *array;
@@ -125,9 +119,6 @@ register char *array;
return('\0'); return('\0');
} }
#endif /* OVL0 */
#ifdef OVLB
STATIC_OVL boolean STATIC_OVL boolean
histemple_at(priest, x, y) histemple_at(priest, x, y)
register struct monst *priest; register struct monst *priest;
@@ -714,6 +705,4 @@ boolean ghostly;
} }
} }
#endif /* OVLB */
/*priest.c*/ /*priest.c*/
-4
View File
@@ -15,8 +15,6 @@
((mndx) == urace.malenum || \ ((mndx) == urace.malenum || \
(urace.femalenum != NON_PM && (mndx) == urace.femalenum)) (urace.femalenum != NON_PM && (mndx) == urace.femalenum))
#ifdef OVLB
boolean known; boolean known;
static NEARDATA const char readable[] = static NEARDATA const char readable[] =
@@ -1911,6 +1909,4 @@ create_particular()
} }
#endif /* WIZARD */ #endif /* WIZARD */
#endif /* OVLB */
/*read.c*/ /*read.c*/
-16
View File
@@ -16,8 +16,6 @@ extern int NDECL(rand);
# endif # endif
#endif /* LINT */ #endif /* LINT */
#ifdef OVL0
int int
rn2(x) /* 0 <= rn2(x) < x */ rn2(x) /* 0 <= rn2(x) < x */
register int x; register int x;
@@ -34,9 +32,6 @@ register int x;
#endif #endif
} }
#endif /* OVL0 */
#ifdef OVLB
int int
rnl(x) /* 0 <= rnl(x) < x; sometimes subtracting Luck */ rnl(x) /* 0 <= rnl(x) < x; sometimes subtracting Luck */
register int x; /* good luck approaches 0, bad luck approaches (x-1) */ register int x; /* good luck approaches 0, bad luck approaches (x-1) */
@@ -60,9 +55,6 @@ register int x; /* good luck approaches 0, bad luck approaches (x-1) */
return i; return i;
} }
#endif /* OVLB */
#ifdef OVL0
int int
rnd(x) /* 1 <= rnd(x) <= x */ rnd(x) /* 1 <= rnd(x) <= x */
register int x; register int x;
@@ -79,9 +71,6 @@ register int x;
#endif #endif
} }
#endif /* OVL0 */
#ifdef OVL1
int int
d(n,x) /* n <= d(n,x) <= (n*x) */ d(n,x) /* n <= d(n,x) <= (n*x) */
register int n, x; register int n, x;
@@ -98,9 +87,6 @@ register int n, x;
return(tmp); /* Alea iacta est. -- J.C. */ return(tmp); /* Alea iacta est. -- J.C. */
} }
#endif /* OVL1 */
#ifdef OVLB
int int
rne(x) rne(x)
register int x; register int x;
@@ -140,6 +126,4 @@ int i;
return((int)x); return((int)x);
} }
#endif /* OVLB */
/*rnd.c*/ /*rnd.c*/
+2 -76
View File
@@ -16,9 +16,7 @@
#ifdef KOPS #ifdef KOPS
STATIC_DCL void FDECL(makekops, (coord *)); STATIC_DCL void FDECL(makekops, (coord *));
STATIC_DCL void FDECL(call_kops, (struct monst *,BOOLEAN_P)); STATIC_DCL void FDECL(call_kops, (struct monst *,BOOLEAN_P));
# ifdef OVLB
STATIC_DCL void FDECL(kops_gone, (BOOLEAN_P)); STATIC_DCL void FDECL(kops_gone, (BOOLEAN_P));
# endif /* OVLB */
#endif /* KOPS */ #endif /* KOPS */
#define IS_SHOP(x) (rooms[x].rtype >= SHOPBASE) #define IS_SHOP(x) (rooms[x].rtype >= SHOPBASE)
@@ -65,11 +63,8 @@ STATIC_DCL void FDECL(dropped_container, (struct obj *, struct monst *,
STATIC_DCL void FDECL(add_to_billobjs, (struct obj *)); STATIC_DCL void FDECL(add_to_billobjs, (struct obj *));
STATIC_DCL void FDECL(bill_box_content, (struct obj *, BOOLEAN_P, BOOLEAN_P, STATIC_DCL void FDECL(bill_box_content, (struct obj *, BOOLEAN_P, BOOLEAN_P,
struct monst *)); struct monst *));
#ifdef OVL1
static boolean FDECL(rob_shop, (struct monst *)); static boolean FDECL(rob_shop, (struct monst *));
#endif
#ifdef OVLB
/* /*
invariants: obj->unpaid iff onbill(obj) [unless bp->useup] invariants: obj->unpaid iff onbill(obj) [unless bp->useup]
obj->quan <= bp->bquan obj->quan <= bp->bquan
@@ -256,9 +251,6 @@ boolean ghostly;
} }
} }
#endif /* OVLB */
#ifdef OVL3
/* Clear the unpaid bit on all of the objects in the list. */ /* Clear the unpaid bit on all of the objects in the list. */
STATIC_OVL void STATIC_OVL void
clear_unpaid(list) clear_unpaid(list)
@@ -270,8 +262,6 @@ register struct obj *list;
list = list->nobj; list = list->nobj;
} }
} }
#endif /*OVL3*/
#ifdef OVLB
/* either you paid or left the shop or the shopkeeper died */ /* either you paid or left the shop or the shopkeeper died */
STATIC_OVL void STATIC_OVL void
@@ -320,9 +310,6 @@ register struct monst *shkp;
return(total); return(total);
} }
#endif /* OVLB */
#ifdef OVL1
#ifdef KOPS #ifdef KOPS
STATIC_OVL void STATIC_OVL void
call_kops(shkp, nearshop) call_kops(shkp, nearshop)
@@ -700,9 +687,6 @@ shopper_financial_report()
} }
} }
#endif /* OVL1 */
#ifdef OVLB
int int
inhishop(mtmp) inhishop(mtmp)
register struct monst *mtmp; register struct monst *mtmp;
@@ -833,8 +817,6 @@ register struct obj *obj, *merge;
} }
dealloc_obj(obj); dealloc_obj(obj);
} }
#endif /* OVLB */
#ifdef OVL3
STATIC_OVL long STATIC_OVL long
check_credit(tmp, shkp) check_credit(tmp, shkp)
@@ -878,8 +860,6 @@ register struct monst *shkp;
ESHK(shkp)->robbed = robbed; ESHK(shkp)->robbed = robbed;
} }
} }
#endif /*OVL3*/
#ifdef OVLB
/* return shkp to home position */ /* return shkp to home position */
void void
@@ -1060,13 +1040,6 @@ STATIC_VAR const char no_money[] = "Moreover, you%s have no money.";
STATIC_VAR const char not_enough_money[] = STATIC_VAR const char not_enough_money[] =
"Besides, you don't have enough to interest %s."; "Besides, you don't have enough to interest %s.";
#else
STATIC_VAR const char no_money[];
STATIC_VAR const char not_enough_money[];
#endif /*OVLB*/
#ifdef OVL3
STATIC_OVL long STATIC_OVL long
cheapest_item(shkp) /* delivers the cheapest item on the list */ cheapest_item(shkp) /* delivers the cheapest item on the list */
register struct monst *shkp; register struct monst *shkp;
@@ -1082,8 +1055,6 @@ register struct monst *shkp;
} }
return(gmin); return(gmin);
} }
#endif /*OVL3*/
#ifdef OVL0
int int
dopay() dopay()
@@ -1471,8 +1442,6 @@ proceed:
shtypes[eshkp->shoptype - SHOPBASE].name); shtypes[eshkp->shoptype - SHOPBASE].name);
return(1); return(1);
} }
#endif /*OVL0*/
#ifdef OVL3
/* return 2 if used-up portion paid */ /* return 2 if used-up portion paid */
/* 1 if paid successfully */ /* 1 if paid successfully */
@@ -1582,8 +1551,6 @@ boolean itemize;
update_inventory(); /* Done just once in dopay() if !itemize. */ update_inventory(); /* Done just once in dopay() if !itemize. */
return buy; return buy;
} }
#endif /*OVL3*/
#ifdef OVLB
static coord repo_location; /* repossession context */ static coord repo_location; /* repossession context */
@@ -1833,8 +1800,6 @@ unsigned id;
/* not found at all */ /* not found at all */
return (struct obj *)0; return (struct obj *)0;
} }
#endif /*OVLB*/
#ifdef OVL3
/* calculate the value that the shk will charge for [one of] an object */ /* calculate the value that the shk will charge for [one of] an object */
STATIC_OVL long STATIC_OVL long
@@ -1914,8 +1879,6 @@ register struct monst *shkp; /* if angry, impose a surcharge */
if (shkp && ESHK(shkp)->surcharge) tmp += (tmp + 2L) / 3L; if (shkp && ESHK(shkp)->surcharge) tmp += (tmp + 2L) / 3L;
return tmp; return tmp;
} }
#endif /*OVL3*/
#ifdef OVLB
/* returns the price of a container's content. the price /* returns the price of a container's content. the price
* of the "top" container is added in the calling functions. * of the "top" container is added in the calling functions.
@@ -2008,8 +1971,6 @@ register struct obj *obj;
picked_container(otmp); picked_container(otmp);
} }
} }
#endif /*OVLB*/
#ifdef OVL3
/* calculate how much the shk will pay when buying [all of] an object */ /* calculate how much the shk will pay when buying [all of] an object */
STATIC_OVL long STATIC_OVL long
@@ -2046,9 +2007,6 @@ register struct monst *shkp;
return tmp; return tmp;
} }
#endif /*OVL3*/
#ifdef OVLB
/* called from doinv(invent.c) for inventory of unpaid objects */ /* called from doinv(invent.c) for inventory of unpaid objects */
long long
unpaid_cost(unp_obj) unpaid_cost(unp_obj)
@@ -2390,9 +2348,6 @@ register struct monst *shkp;
} }
} }
#endif /*OVLB*/
#ifdef OVL3
STATIC_OVL long STATIC_OVL long
stolen_container(obj, shkp, price, ininv) stolen_container(obj, shkp, price, ininv)
register struct obj *obj; register struct obj *obj;
@@ -2432,8 +2387,6 @@ register boolean ininv;
return(price); return(price);
} }
#endif /*OVL3*/
#ifdef OVLB
long long
stolen_value(obj, x, y, peaceful, silent) stolen_value(obj, x, y, peaceful, silent)
@@ -2946,9 +2899,6 @@ long cost;
levl[x][y].seenv = SVALL; levl[x][y].seenv = SVALL;
} }
#endif /*OVLB*/
#ifdef OVL0
/* /*
* Do something about damage. Either (!croaked) try to repair it, or * Do something about damage. Either (!croaked) try to repair it, or
* (croaked) just discard damage structs for non-shared locations, since * (croaked) just discard damage structs for non-shared locations, since
@@ -3180,8 +3130,7 @@ boolean catchup; /* restoring a level */
#undef vert #undef vert
#undef horiz #undef horiz
} }
#endif /*OVL0*/
#ifdef OVL3
/* /*
* shk_move: return 1: moved 0: didn't -1: let m_move do it -2: died * shk_move: return 1: moved 0: didn't -1: let m_move do it -2: died
*/ */
@@ -3309,9 +3258,6 @@ struct monst *shkp;
} }
} }
#endif /*OVL3*/
#ifdef OVLB
/* for use in levl_follower (mondata.c) */ /* for use in levl_follower (mondata.c) */
boolean boolean
is_fshk(mtmp) is_fshk(mtmp)
@@ -3592,8 +3538,7 @@ getcad:
adjalign(-sgn(u.ualign.type)); adjalign(-sgn(u.ualign.type));
} }
} }
#endif /*OVLB*/
#ifdef OVL0
/* called in dokick.c when we kick an object that might be in a store */ /* called in dokick.c when we kick an object that might be in a store */
boolean boolean
costly_spot(x, y) costly_spot(x, y)
@@ -3609,8 +3554,6 @@ register xchar x, y;
!(x == ESHK(shkp)->shk.x && !(x == ESHK(shkp)->shk.x &&
y == ESHK(shkp)->shk.y))); y == ESHK(shkp)->shk.y)));
} }
#endif /*OVL0*/
#ifdef OVLB
/* called by dotalk(sounds.c) when #chatting; returns obj if location /* called by dotalk(sounds.c) when #chatting; returns obj if location
contains shop goods and shopkeeper is willing & able to speak */ contains shop goods and shopkeeper is willing & able to speak */
@@ -3680,8 +3623,6 @@ register struct obj *first_obj;
} }
destroy_nhwindow(tmpwin); destroy_nhwindow(tmpwin);
} }
#endif /*OVLB*/
#ifdef OVL3
STATIC_OVL const char * STATIC_OVL const char *
shk_embellish(itm, cost) shk_embellish(itm, cost)
@@ -3712,8 +3653,6 @@ long cost;
} }
return "."; return ".";
} }
#endif /*OVL3*/
#ifdef OVLB
/* First 4 supplied by Ronen and Tamar, remainder by development team */ /* First 4 supplied by Ronen and Tamar, remainder by development team */
const char *Izchak_speaks[]={ const char *Izchak_speaks[]={
@@ -3815,9 +3754,6 @@ register boolean silent;
} }
#endif /* KOPS */ #endif /* KOPS */
#endif /*OVLB*/
#ifdef OVL3
STATIC_OVL long STATIC_OVL long
cost_per_charge(shkp, otmp, altusage) cost_per_charge(shkp, otmp, altusage)
struct monst *shkp; struct monst *shkp;
@@ -3870,8 +3806,6 @@ boolean altusage; /* some items have an "alternate" use with different cost */
} }
return(tmp); return(tmp);
} }
#endif /*OVL3*/
#ifdef OVLB
/* Charge the player for partial use of an unpaid object. /* Charge the player for partial use of an unpaid object.
* *
@@ -4028,9 +3962,6 @@ register xchar x, y;
return(FALSE); return(FALSE);
} }
#endif /* OVLB */
#ifdef OVL2
char * char *
shk_your(buf, obj) shk_your(buf, obj)
char *buf; char *buf;
@@ -4078,9 +4009,6 @@ struct obj *obj;
return (char *)0; return (char *)0;
} }
#endif /* OVL2 */
#ifdef OVLB
#ifdef __SASC #ifdef __SASC
void void
sasc_bug(struct obj *op, unsigned x){ sasc_bug(struct obj *op, unsigned x){
@@ -4088,6 +4016,4 @@ sasc_bug(struct obj *op, unsigned x){
} }
#endif #endif
#endif /* OVLB */
/*shk.c*/ /*shk.c*/
-10
View File
@@ -7,11 +7,6 @@
#include "hack.h" #include "hack.h"
#include "eshk.h" #include "eshk.h"
#ifndef OVLB
extern const struct shclass shtypes[];
#else
STATIC_DCL void FDECL(mkshobj_at, (const struct shclass *,int,int)); STATIC_DCL void FDECL(mkshobj_at, (const struct shclass *,int,int));
STATIC_DCL void FDECL(nameshk, (struct monst *,const char * const *)); STATIC_DCL void FDECL(nameshk, (struct monst *,const char * const *));
STATIC_DCL int FDECL(shkinit, (const struct shclass *,struct mkroom *)); STATIC_DCL int FDECL(shkinit, (const struct shclass *,struct mkroom *));
@@ -498,9 +493,6 @@ register struct mkroom *sroom;
level.flags.has_shop = TRUE; level.flags.has_shop = TRUE;
} }
#endif /* OVLB */
#ifdef OVL0
/* does shkp's shop stock this item type? */ /* does shkp's shop stock this item type? */
boolean boolean
saleable(shkp, obj) saleable(shkp, obj)
@@ -534,6 +526,4 @@ int type;
return shp->iprobs[i].itype; return shp->iprobs[i].itype;
} }
#endif /* OVL0 */
/*shknam.c*/ /*shknam.c*/
-12
View File
@@ -10,15 +10,8 @@
# endif # endif
#endif #endif
#ifdef OVLB
static int FDECL(domonnoise,(struct monst *)); static int FDECL(domonnoise,(struct monst *));
static int NDECL(dochat); static int NDECL(dochat);
#endif /* OVLB */
#ifdef OVL0
static int FDECL(mon_in_room, (struct monst *,int)); static int FDECL(mon_in_room, (struct monst *,int));
/* this easily could be a macro, but it might overtax dumb compilers */ /* this easily could be a macro, but it might overtax dumb compilers */
@@ -258,9 +251,6 @@ dosounds()
} }
} }
#endif /* OVL0 */
#ifdef OVLB
static const char * const h_sounds[] = { static const char * const h_sounds[] = {
"beep", "boing", "sing", "belche", "creak", "cough", "rattle", "beep", "boing", "sing", "belche", "creak", "cough", "rattle",
"ululate", "pop", "jingle", "sniffle", "tinkle", "eep" "ululate", "pop", "jingle", "sniffle", "tinkle", "eep"
@@ -1028,6 +1018,4 @@ const char* msg;
#endif /* USER_SOUNDS */ #endif /* USER_SOUNDS */
#endif /* OVLB */
/*sounds.c*/ /*sounds.c*/
-12
View File
@@ -6,7 +6,6 @@
STATIC_PTR int NDECL(stealarm); STATIC_PTR int NDECL(stealarm);
#ifdef OVLB
STATIC_DCL const char *FDECL(equipname, (struct obj *)); STATIC_DCL const char *FDECL(equipname, (struct obj *));
STATIC_OVL const char * STATIC_OVL const char *
@@ -420,9 +419,6 @@ gotobj:
return((multi < 0) ? 0 : 1); return((multi < 0) ? 0 : 1);
} }
#endif /* OVLB */
#ifdef OVL1
/* Returns 1 if otmp is free'd, 0 otherwise. */ /* Returns 1 if otmp is free'd, 0 otherwise. */
int int
mpickobj(mtmp,otmp) mpickobj(mtmp,otmp)
@@ -463,9 +459,6 @@ register struct obj *otmp;
return freed_otmp; return freed_otmp;
} }
#endif /* OVL1 */
#ifdef OVLB
void void
stealamulet(mtmp) stealamulet(mtmp)
struct monst *mtmp; struct monst *mtmp;
@@ -510,9 +503,6 @@ struct monst *mtmp;
} }
} }
#endif /* OVLB */
#ifdef OVL0
/* release the objects the creature is carrying */ /* release the objects the creature is carrying */
void void
relobj(mtmp,show,is_pet) relobj(mtmp,show,is_pet)
@@ -589,6 +579,4 @@ boolean is_pet; /* If true, pet should keep wielded/worn items */
newsym(omx, omy); newsym(omx, omy);
} }
#endif /* OVL0 */
/*steal.c*/ /*steal.c*/
-19
View File
@@ -14,8 +14,6 @@ STATIC_DCL void FDECL(see_lamp_flicker, (struct obj *, const char *));
STATIC_DCL void FDECL(lantern_message, (struct obj *)); STATIC_DCL void FDECL(lantern_message, (struct obj *));
STATIC_DCL void FDECL(cleanup_burn, (genericptr_t,long)); STATIC_DCL void FDECL(cleanup_burn, (genericptr_t,long));
#ifdef OVLB
/* He is being petrified - dialogue by inmet!tower */ /* He is being petrified - dialogue by inmet!tower */
static NEARDATA const char * const stoned_texts[] = { static NEARDATA const char * const stoned_texts[] = {
"You are slowing down.", /* 5 */ "You are slowing down.", /* 5 */
@@ -154,9 +152,6 @@ burn_away_slime()
} }
#endif /* OVLB */
#ifdef OVL0
void void
nh_timeout() nh_timeout()
{ {
@@ -358,9 +353,6 @@ nh_timeout()
run_timers(); run_timers();
} }
#endif /* OVL0 */
#ifdef OVL1
void void
fall_asleep(how_long, wakeup_msg) fall_asleep(how_long, wakeup_msg)
int how_long; int how_long;
@@ -1160,9 +1152,6 @@ end_burn(obj, timer_attached)
impossible("end_burn: obj %s not timed!", xname(obj)); impossible("end_burn: obj %s not timed!", xname(obj));
} }
#endif /* OVL1 */
#ifdef OVL0
/* /*
* Cleanup a burning object if timer stopped. * Cleanup a burning object if timer stopped.
*/ */
@@ -1188,9 +1177,6 @@ cleanup_burn(arg, expire_time)
update_inventory(); update_inventory();
} }
#endif /* OVL0 */
#ifdef OVL1
void void
do_storms() do_storms()
{ {
@@ -1230,10 +1216,7 @@ do_storms()
} else } else
You_hear("a rumbling noise."); You_hear("a rumbling noise.");
} }
#endif /* OVL1 */
#ifdef OVL0
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
/* /*
* Generic Timeout Functions. * Generic Timeout Functions.
@@ -1856,6 +1839,4 @@ relink_timers(ghostly)
} }
} }
#endif /* OVL0 */
/*timeout.c*/ /*timeout.c*/
-10
View File
@@ -10,17 +10,12 @@
STATIC_VAR NEARDATA int utcnt, utpnt; STATIC_VAR NEARDATA int utcnt, utpnt;
STATIC_VAR NEARDATA coord utrack[UTSZ]; STATIC_VAR NEARDATA coord utrack[UTSZ];
#ifdef OVLB
void void
initrack() initrack()
{ {
utcnt = utpnt = 0; utcnt = utpnt = 0;
} }
#endif /* OVLB */
#ifdef OVL1
/* add to track */ /* add to track */
void void
settrack() settrack()
@@ -32,9 +27,6 @@ settrack()
utpnt++; utpnt++;
} }
#endif /* OVL1 */
#ifdef OVL0
coord * coord *
gettrack(x, y) gettrack(x, y)
register int x, y; register int x, y;
@@ -63,6 +55,4 @@ register int x, y;
return (coord *)0; return (coord *)0;
} }
#endif /* OVL0 */
/*track.c*/ /*track.c*/
-40
View File
@@ -30,16 +30,6 @@ STATIC_OVL boolean FDECL(keep_saddle_with_steedcorpse,
(unsigned, struct obj *, struct obj *)); (unsigned, struct obj *, struct obj *));
#endif #endif
#ifndef OVLB
STATIC_VAR const char *a_your[2];
STATIC_VAR const char *A_Your[2];
STATIC_VAR const char *the_your[2];
STATIC_VAR const char tower_of_flame[];
STATIC_VAR const char *A_gush_of_water_hits;
STATIC_VAR const char * const blindgas[6];
#else
STATIC_VAR const char * const a_your[2] = { "a", "your" }; STATIC_VAR const char * const a_your[2] = { "a", "your" };
STATIC_VAR const char * const A_Your[2] = { "A", "Your" }; STATIC_VAR const char * const A_Your[2] = { "A", "Your" };
STATIC_VAR const char * const the_your[2] = { "the", "your" }; STATIC_VAR const char * const the_your[2] = { "the", "your" };
@@ -48,10 +38,6 @@ STATIC_VAR const char * const A_gush_of_water_hits = "A gush of water hits";
STATIC_VAR const char * const blindgas[6] = STATIC_VAR const char * const blindgas[6] =
{"humid", "odorless", "pungent", "chilling", "acrid", "biting"}; {"humid", "odorless", "pungent", "chilling", "acrid", "biting"};
#endif /* OVLB */
#ifdef OVLB
/* called when you're hit by fire (dofiretrap,buzz,zapyourself,explode) */ /* called when you're hit by fire (dofiretrap,buzz,zapyourself,explode) */
boolean /* returns TRUE if hit on torso */ boolean /* returns TRUE if hit on torso */
burnarmor(victim) burnarmor(victim)
@@ -1292,9 +1278,6 @@ struct trap *trap;
seetrap(trap); /* and it isn't concealed */ seetrap(trap); /* and it isn't concealed */
} }
#endif /* OVLB */
#ifdef OVL3
/* /*
* Move obj from (x1,y1) to (x2,y2) * Move obj from (x1,y1) to (x2,y2)
* *
@@ -1534,9 +1517,6 @@ int style;
return 2; return 2;
} }
#endif /* OVL3 */
#ifdef OVLB
void void
seetrap(trap) seetrap(trap)
register struct trap *trap; register struct trap *trap;
@@ -1547,9 +1527,6 @@ seetrap(trap)
} }
} }
#endif /* OVLB */
#ifdef OVL3
STATIC_OVL int STATIC_OVL int
mkroll_launch(ttmp, x, y, otyp, ocount) mkroll_launch(ttmp, x, y, otyp, ocount)
struct trap *ttmp; struct trap *ttmp;
@@ -1634,8 +1611,6 @@ schar dx,dy;
cc->y = y; cc->y = y;
return TRUE; return TRUE;
} }
#endif /* OVL3 */
#ifdef OVL1
int int
mintrap(mtmp) mintrap(mtmp)
@@ -2152,9 +2127,6 @@ glovecheck: target = which_armor(mtmp, W_ARMG);
return mtmp->mtrapped; return mtmp->mtrapped;
} }
#endif /* OVL1 */
#ifdef OVLB
/* Combine cockatrice checks into single functions to avoid repeating code. */ /* Combine cockatrice checks into single functions to avoid repeating code. */
void void
instapetrify(str) instapetrify(str)
@@ -2980,8 +2952,6 @@ dountrap() /* disarm a trap */
} }
return untrap(FALSE); return untrap(FALSE);
} }
#endif /* OVLB */
#ifdef OVL2
/* Probability of disabling a trap. Helge Hafting */ /* Probability of disabling a trap. Helge Hafting */
STATIC_OVL int STATIC_OVL int
@@ -3576,8 +3546,6 @@ boolean force;
return(1); return(1);
} }
} }
#endif /* OVL2 */
#ifdef OVLB
/* only called when the player is doing something to the chest directly */ /* only called when the player is doing something to the chest directly */
boolean boolean
@@ -3758,9 +3726,6 @@ boolean disarm;
return FALSE; return FALSE;
} }
#endif /* OVLB */
#ifdef OVL0
struct trap * struct trap *
t_at(x,y) t_at(x,y)
register int x, y; register int x, y;
@@ -3773,9 +3738,6 @@ register int x, y;
return((struct trap *)0); return((struct trap *)0);
} }
#endif /* OVL0 */
#ifdef OVLB
void void
deltrap(trap) deltrap(trap)
register struct trap *trap; register struct trap *trap;
@@ -3994,6 +3956,4 @@ burn_stuff:
return(FALSE); return(FALSE);
} }
#endif /* OVLB */
/*trap.c*/ /*trap.c*/
-10
View File
@@ -10,8 +10,6 @@ STATIC_DCL struct monst *NDECL(findgd);
#define g_monnam(mtmp) \ #define g_monnam(mtmp) \
x_monnam(mtmp, ARTICLE_NONE, (char *)0, SUPPRESS_IT, FALSE) x_monnam(mtmp, ARTICLE_NONE, (char *)0, SUPPRESS_IT, FALSE)
#ifdef OVLB
STATIC_DCL boolean FDECL(clear_fcorr, (struct monst *,BOOLEAN_P)); STATIC_DCL boolean FDECL(clear_fcorr, (struct monst *,BOOLEAN_P));
STATIC_DCL void FDECL(restfakecorr,(struct monst *)); STATIC_DCL void FDECL(restfakecorr,(struct monst *));
STATIC_DCL boolean FDECL(in_fcorridor, (struct monst *,int,int)); STATIC_DCL boolean FDECL(in_fcorridor, (struct monst *,int,int));
@@ -111,9 +109,6 @@ findgd()
return((struct monst *)0); return((struct monst *)0);
} }
#endif /* OVLB */
#ifdef OVL0
char char
vault_occupied(array) vault_occupied(array)
char *array; char *array;
@@ -346,9 +341,6 @@ fnd:
} }
} }
#endif /* OVL0 */
#ifdef OVLB
STATIC_OVL void STATIC_OVL void
move_gold(gold, vroom) move_gold(gold, vroom)
struct obj *gold; struct obj *gold;
@@ -821,6 +813,4 @@ gd_sound() /* prevent "You hear footsteps.." when inappropriate */
else return((boolean)(grd == (struct monst *)0)); else return((boolean)(grd == (struct monst *)0));
} }
#endif /* OVLB */
/*vault.c*/ /*vault.c*/
-27
View File
@@ -28,14 +28,6 @@
STATIC_DCL void FDECL(give_may_advance_msg, (int)); STATIC_DCL void FDECL(give_may_advance_msg, (int));
#ifndef OVLB
STATIC_DCL NEARDATA const short skill_names_indices[];
STATIC_DCL NEARDATA const char *odd_skill_names[];
STATIC_DCL NEARDATA const char *barehands_or_martial[];
#else /* OVLB */
STATIC_VAR NEARDATA const short skill_names_indices[P_NUM_SKILLS] = { STATIC_VAR NEARDATA const short skill_names_indices[P_NUM_SKILLS] = {
0, DAGGER, KNIFE, AXE, 0, DAGGER, KNIFE, AXE,
PICK_AXE, SHORT_SWORD, BROADSWORD, LONG_SWORD, PICK_AXE, SHORT_SWORD, BROADSWORD, LONG_SWORD,
@@ -92,27 +84,19 @@ int skill;
"fighting "); "fighting ");
} }
#endif /* OVLB */
STATIC_DCL boolean FDECL(can_advance, (int, BOOLEAN_P)); STATIC_DCL boolean FDECL(can_advance, (int, BOOLEAN_P));
STATIC_DCL boolean FDECL(could_advance, (int)); STATIC_DCL boolean FDECL(could_advance, (int));
STATIC_DCL boolean FDECL(peaked_skill, (int)); STATIC_DCL boolean FDECL(peaked_skill, (int));
STATIC_DCL int FDECL(slots_required, (int)); STATIC_DCL int FDECL(slots_required, (int));
#ifdef OVL1
STATIC_DCL char *FDECL(skill_level_name, (int,char *)); STATIC_DCL char *FDECL(skill_level_name, (int,char *));
STATIC_DCL void FDECL(skill_advance, (int)); STATIC_DCL void FDECL(skill_advance, (int));
#endif /* OVL1 */
#define P_NAME(type) ((skill_names_indices[type] > 0) ? \ #define P_NAME(type) ((skill_names_indices[type] > 0) ? \
OBJ_NAME(objects[skill_names_indices[type]]) : \ OBJ_NAME(objects[skill_names_indices[type]]) : \
(type == P_BARE_HANDED_COMBAT) ? \ (type == P_BARE_HANDED_COMBAT) ? \
barehands_or_martial[martial_bonus()] : \ barehands_or_martial[martial_bonus()] : \
odd_skill_names[-skill_names_indices[type]]) odd_skill_names[-skill_names_indices[type]])
#ifdef OVLB
static NEARDATA const char kebabable[] = { static NEARDATA const char kebabable[] = {
S_XORN, S_DRAGON, S_JABBERWOCK, S_NAGA, S_GIANT, '\0' S_XORN, S_DRAGON, S_JABBERWOCK, S_NAGA, S_GIANT, '\0'
}; };
@@ -314,9 +298,6 @@ struct monst *mon;
return(tmp); return(tmp);
} }
#endif /* OVLB */
#ifdef OVL0
STATIC_DCL struct obj *FDECL(oselect, (struct monst *,int)); STATIC_DCL struct obj *FDECL(oselect, (struct monst *,int));
#define Oselect(x) if ((otmp = oselect(mtmp, x)) != 0) return(otmp); #define Oselect(x) if ((otmp = oselect(mtmp, x)) != 0) return(otmp);
@@ -709,9 +690,6 @@ abon() /* attack bonus for strength & dexterity */
else return(sbon + dex-14); else return(sbon + dex-14);
} }
#endif /* OVL0 */
#ifdef OVL1
int int
dbon() /* damage bonus for strength */ dbon() /* damage bonus for strength */
{ {
@@ -1006,9 +984,6 @@ int skill;
} }
} }
#endif /* OVL1 */
#ifdef OVLB
void void
use_skill(skill,degree) use_skill(skill,degree)
int skill; int skill;
@@ -1314,6 +1289,4 @@ register struct obj *obj;
obj->owornmask &= ~W_WEP; obj->owornmask &= ~W_WEP;
} }
#endif /* OVLB */
/*weapon.c*/ /*weapon.c*/
-7
View File
@@ -4,8 +4,6 @@
#include "hack.h" #include "hack.h"
#ifdef OVL0
void void
were_change(mon) were_change(mon)
register struct monst *mon; register struct monst *mon;
@@ -35,9 +33,6 @@ register struct monst *mon;
} }
} }
#endif /* OVL0 */
#ifdef OVLB
STATIC_DCL int FDECL(counter_were,(int)); STATIC_DCL int FDECL(counter_were,(int));
STATIC_OVL int STATIC_OVL int
@@ -151,6 +146,4 @@ boolean purify;
rehumanize(); rehumanize();
} }
#endif /* OVLB */
/*were.c*/ /*were.c*/
-10
View File
@@ -13,8 +13,6 @@
extern const int monstr[]; extern const int monstr[];
#ifdef OVLB
STATIC_DCL short FDECL(which_arti, (int)); STATIC_DCL short FDECL(which_arti, (int));
STATIC_DCL boolean FDECL(mon_has_arti, (struct monst *,SHORT_P)); STATIC_DCL boolean FDECL(mon_has_arti, (struct monst *,SHORT_P));
STATIC_DCL struct monst *FDECL(other_mon_has_arti, (struct monst *,SHORT_P)); STATIC_DCL struct monst *FDECL(other_mon_has_arti, (struct monst *,SHORT_P));
@@ -44,9 +42,6 @@ static NEARDATA const unsigned wizapp[] = {
PM_TRAPPER PM_TRAPPER
}; };
#endif /* OVLB */
#ifdef OVL0
/* If you've found the Amulet, make the Wizard appear after some time */ /* If you've found the Amulet, make the Wizard appear after some time */
/* Also, give hints about portal locations, if amulet is worn/wielded -dlc */ /* Also, give hints about portal locations, if amulet is worn/wielded -dlc */
void void
@@ -92,9 +87,6 @@ amulet()
} }
} }
#endif /* OVL0 */
#ifdef OVLB
int int
mon_has_amulet(mtmp) mon_has_amulet(mtmp)
register struct monst *mtmp; register struct monst *mtmp;
@@ -633,6 +625,4 @@ register struct monst *mtmp;
} }
} }
#endif /* OVLB */
/*wizard.c*/ /*wizard.c*/
-47
View File
@@ -11,10 +11,8 @@
*/ */
#define MAGIC_COOKIE 1000 #define MAGIC_COOKIE 1000
#ifdef OVLB
static NEARDATA boolean obj_zapped; static NEARDATA boolean obj_zapped;
static NEARDATA int poly_zapped; static NEARDATA int poly_zapped;
#endif
extern boolean notonhead; /* for long worms */ extern boolean notonhead; /* for long worms */
@@ -32,13 +30,9 @@ STATIC_DCL void FDECL(revive_egg, (struct obj *));
STATIC_DCL boolean FDECL(zap_steed, (struct obj *)); STATIC_DCL boolean FDECL(zap_steed, (struct obj *));
#endif #endif
#ifdef OVLB
STATIC_DCL int FDECL(zap_hit, (int,int)); STATIC_DCL int FDECL(zap_hit, (int,int));
#endif
#ifdef OVL0
STATIC_DCL void FDECL(backfire, (struct obj *)); STATIC_DCL void FDECL(backfire, (struct obj *));
STATIC_DCL int FDECL(spell_hit_bonus, (int)); STATIC_DCL int FDECL(spell_hit_bonus, (int));
#endif
#define ZT_MAGIC_MISSILE (AD_MAGM-1) #define ZT_MAGIC_MISSILE (AD_MAGM-1)
#define ZT_FIRE (AD_FIRE-1) #define ZT_FIRE (AD_FIRE-1)
@@ -56,10 +50,6 @@ STATIC_DCL int FDECL(spell_hit_bonus, (int));
#define is_hero_spell(type) ((type) >= 10 && (type) < 20) #define is_hero_spell(type) ((type) >= 10 && (type) < 20)
#ifndef OVLB
STATIC_VAR const char are_blinded_by_the_flash[];
extern const char * const flash_types[];
#else
STATIC_VAR const char are_blinded_by_the_flash[] = "are blinded by the flash!"; STATIC_VAR const char are_blinded_by_the_flash[] = "are blinded by the flash!";
const char * const flash_types[] = { /* also used in buzzmu(mcastu.c) */ const char * const flash_types[] = { /* also used in buzzmu(mcastu.c) */
@@ -382,9 +372,6 @@ struct monst *mtmp;
} }
} }
#endif /*OVLB*/
#ifdef OVL1
/* /*
* Return the object's physical location. This only makes sense for * Return the object's physical location. This only makes sense for
* objects that are currently on the level (i.e. migrating objects * objects that are currently on the level (i.e. migrating objects
@@ -768,9 +755,7 @@ struct monst *mon;
} }
return res; return res;
} }
#endif /*OVL1*/
#ifdef OVLB
static const char charged_objs[] = { WAND_CLASS, WEAPON_CLASS, ARMOR_CLASS, 0 }; static const char charged_objs[] = { WAND_CLASS, WEAPON_CLASS, ARMOR_CLASS, 0 };
STATIC_OVL void STATIC_OVL void
@@ -976,9 +961,6 @@ register struct obj *obj;
return (TRUE); return (TRUE);
} }
#endif /*OVLB*/
#ifdef OVL0
boolean boolean
obj_resists(obj, ochance, achance) obj_resists(obj, ochance, achance)
struct obj *obj; struct obj *obj;
@@ -1017,8 +999,6 @@ struct obj *obj;
return((boolean)(! rn2(zap_odds))); return((boolean)(! rn2(zap_odds)));
} }
#endif /*OVL0*/
#ifdef OVLB
/* Use up at least minwt number of things made of material mat. /* Use up at least minwt number of things made of material mat.
* There's also a chance that other stuff will be used up. Finally, * There's also a chance that other stuff will be used up. Finally,
@@ -1729,8 +1709,6 @@ bhitpile(obj,fhito,tx,ty)
return hitanything; return hitanything;
} }
#endif /*OVLB*/
#ifdef OVL1
/* /*
* zappable - returns 1 if zap is available, 0 otherwise. * zappable - returns 1 if zap is available, 0 otherwise.
@@ -1796,8 +1774,6 @@ register struct obj *obj;
more_experienced(0,10); more_experienced(0,10);
} }
} }
#endif /*OVL1*/
#ifdef OVL0
STATIC_OVL void STATIC_OVL void
backfire(otmp) backfire(otmp)
@@ -2202,9 +2178,6 @@ struct obj *obj; /* wand or spell */
} }
#endif #endif
#endif /*OVL0*/
#ifdef OVL3
/* /*
* cancel a monster (possibly the hero). inventory is cancelled only * cancel a monster (possibly the hero). inventory is cancelled only
* if the monster is zapping itself directly, since otherwise the * if the monster is zapping itself directly, since otherwise the
@@ -2429,9 +2402,6 @@ struct obj *obj; /* wand or spell */
return disclose; return disclose;
} }
#endif /*OVL3*/
#ifdef OVLB
/* called for various wand and spell effects - M. Stephenson */ /* called for various wand and spell effects - M. Stephenson */
void void
weffects(obj) weffects(obj)
@@ -2488,8 +2458,6 @@ register struct obj *obj;
} }
return; return;
} }
#endif /*OVLB*/
#ifdef OVL0
/* /*
* Generate the to damage bonus for a spell. Based on the hero's intelligence * Generate the to damage bonus for a spell. Based on the hero's intelligence
@@ -2582,8 +2550,6 @@ register struct monst *mtmp;
&& flags.verbose) ? && flags.verbose) ?
mon_nam(mtmp) : "it"); mon_nam(mtmp) : "it");
} }
#endif /*OVL0*/
#ifdef OVL1
/* /*
* Called for the following distance effects: * Called for the following distance effects:
@@ -3177,9 +3143,6 @@ xchar sx, sy;
return; return;
} }
#endif /*OVL1*/
#ifdef OVLB
/* /*
* burn scrolls and spellbooks on floor at position x,y * burn scrolls and spellbooks on floor at position x,y
* return the number of scrolls and spellbooks burned * return the number of scrolls and spellbooks burned
@@ -3506,8 +3469,6 @@ register int dx,dy;
abstype == ZT_DEATH ? "disintegrate" : "destroy", FALSE); abstype == ZT_DEATH ? "disintegrate" : "destroy", FALSE);
bhitpos = save_bhitpos; bhitpos = save_bhitpos;
} }
#endif /*OVLB*/
#ifdef OVL0
void void
melt_ice(x, y) melt_ice(x, y)
@@ -3745,9 +3706,6 @@ boolean *shopdamage;
return rangemod; return rangemod;
} }
#endif /*OVL0*/
#ifdef OVL3
void void
fracture_rock(obj) /* fractured by pick-axe or wand of striking */ fracture_rock(obj) /* fractured by pick-axe or wand of striking */
register struct obj *obj; /* no texts here! */ register struct obj *obj; /* no texts here! */
@@ -4032,9 +3990,6 @@ int osym, dmgtyp;
return(tmp); return(tmp);
} }
#endif /*OVL3*/
#ifdef OVL2
int int
resist(mtmp, oclass, damage, tell) resist(mtmp, oclass, damage, tell)
struct monst *mtmp; struct monst *mtmp;
@@ -4130,6 +4085,4 @@ retry:
} }
} }
#endif /*OVL2*/
/*zap.c*/ /*zap.c*/
-4
View File
@@ -47,8 +47,6 @@
void FDECL(get_cursor,(int *, int *)); void FDECL(get_cursor,(int *, int *));
#ifdef OVL0
/* direct bios calls are used only when iflags.BIOS is set */ /* direct bios calls are used only when iflags.BIOS is set */
static char NDECL(DOSgetch); static char NDECL(DOSgetch);
@@ -515,6 +513,4 @@ unsigned setvalue;
return (regs.x.dx); return (regs.x.dx);
} }
# endif /* OVLB */
#endif /* MSDOS */ #endif /* MSDOS */
-6
View File
@@ -45,8 +45,6 @@ boolean otiles_in_ram = FALSE;
extern int total_tiles_used; /* tile.c */ extern int total_tiles_used; /* tile.c */
#endif #endif
# ifdef OVLB
/* /*
* Read the header/palette information at the start of the * Read the header/palette information at the start of the
* NetHack.tib file. * NetHack.tib file.
@@ -161,9 +159,6 @@ boolean filestyle;
} }
#endif #endif
} }
# endif /* OVLB */
# ifdef OVL0
struct planar_cell_struct plancell; struct planar_cell_struct plancell;
struct overview_planar_cell_struct oplancell; struct overview_planar_cell_struct oplancell;
@@ -253,7 +248,6 @@ char (*pta)[TILE_X];
return 0; return 0;
} }
# endif # endif
# endif /* OVL0 */
#endif /* USE_TILES */ #endif /* USE_TILES */
/* pctiles.c */ /* pctiles.c */
+4 -53
View File
@@ -73,7 +73,6 @@
*/ */
#ifdef OVLB
void void
get_scr_size() get_scr_size()
{ {
@@ -84,7 +83,6 @@ get_scr_size()
# endif # endif
txt_get_scr_size(); txt_get_scr_size();
} }
#endif /*OVLB*/
/* /*
* -------------------------------------------------------------- * --------------------------------------------------------------
@@ -122,7 +120,6 @@ void FDECL(cmov, (int, int));
void FDECL(nocmov, (int, int)); void FDECL(nocmov, (int, int));
STATIC_DCL void NDECL(init_ttycolor); STATIC_DCL void NDECL(init_ttycolor);
# ifdef OVLB
int savevmode; /* store the original video mode in here */ int savevmode; /* store the original video mode in here */
int curcol,currow; /* graphics mode current cursor locations */ int curcol,currow; /* graphics mode current cursor locations */
int g_attribute; /* Current attribute to use */ int g_attribute; /* Current attribute to use */
@@ -136,23 +133,7 @@ boolean inmap = FALSE; /* in the map window */
# ifdef TEXTCOLOR # ifdef TEXTCOLOR
char ttycolors[CLR_MAX]; /* also used/set in options.c */ char ttycolors[CLR_MAX]; /* also used/set in options.c */
# endif /* TEXTCOLOR */ # endif /* TEXTCOLOR */
# else
extern int savevmode;
extern int curcol,currow;
extern int g_attribute;
extern int monoflag;
extern int attrib_text_normal;
extern int attrib_gr_normal;
extern int attrib_text_intense;
extern int attrib_gr_intense;
extern boolean traditonal;
extern boolean inmap;
# ifdef TEXTCOLOR
extern char ttycolors[CLR_MAX]; /* also used/set in options.c */
# endif /* TEXTCOLOR */
# endif /* OVLB */
# ifdef OVLB
void void
backsp() backsp()
{ {
@@ -164,9 +145,7 @@ backsp()
# endif # endif
} }
} }
# endif /* OVLB */
# ifdef OVL0
void void
clear_screen() clear_screen()
{ {
@@ -227,9 +206,7 @@ register int col, row;
# endif # endif
} }
} }
# endif /* OVL0 */
# ifdef OVLB
int int
has_color(int color) has_color(int color)
{ {
@@ -240,9 +217,7 @@ has_color(int color)
return 0; return 0;
# endif # endif
} }
# endif /* OVLB */
# ifdef OVL0
void void
home() home()
{ {
@@ -283,10 +258,7 @@ standoutend()
g_attribute = iflags.grmode ? attrib_gr_normal g_attribute = iflags.grmode ? attrib_gr_normal
: attrib_text_normal; : attrib_text_normal;
} }
# endif /* OVL0 */
# ifdef OVLB
void void
term_end_attr(int attr) term_end_attr(int attr)
{ {
@@ -378,9 +350,7 @@ term_start_raw_bold(void)
{ {
standoutbeg(); standoutbeg();
} }
# endif /* OVLB */
# ifdef OVL0
void void
tty_delay_output() tty_delay_output()
{ {
@@ -393,9 +363,6 @@ tty_delay_output()
#endif #endif
} }
# endif /* OVL0 */
# ifdef OVLB
void void
tty_end_screen() tty_end_screen()
{ {
@@ -514,8 +481,6 @@ gr_finish()
} }
} }
# endif /* OVLB */
/* /*
* Screen output routines (these are heavily used). * Screen output routines (these are heavily used).
* *
@@ -546,7 +511,6 @@ gr_finish()
* (that include wintty.h) are actually using these routines. * (that include wintty.h) are actually using these routines.
*/ */
# ifdef OVL0
void void
xputs(s) xputs(s)
const char *s; const char *s;
@@ -659,7 +623,6 @@ HideCursor()
} }
# endif /* SIMULATE_CURSOR */ # endif /* SIMULATE_CURSOR */
# endif /* OVL0 */
# ifdef TEXTCOLOR # ifdef TEXTCOLOR
/* /*
@@ -688,21 +651,12 @@ HideCursor()
/* assign_videocolors() is prototyped in extern.h */ /* assign_videocolors() is prototyped in extern.h */
/* assign_video() is prototyped in extern.h */ /* assign_video() is prototyped in extern.h */
# ifdef OVLB
int shadeflag; /* shades are initialized */ int shadeflag; /* shades are initialized */
int colorflag; /* colors are initialized */ int colorflag; /* colors are initialized */
char *schoice[3] = {"dark","normal","light"}; char *schoice[3] = {"dark","normal","light"};
char *shade[3]; char *shade[3];
# else
extern int shadeflag;
extern int colorflag;
extern char *schoice[3];
extern char *shade[3];
# endif /* OVLB */
# endif /* VIDEOSHADES */ # endif /* VIDEOSHADES */
# ifdef OVLB
STATIC_OVL void STATIC_OVL void
init_ttycolor() init_ttycolor()
{ {
@@ -741,9 +695,7 @@ init_ttycolor()
} }
# endif # endif
} }
# endif /* OVLB */
# ifdef OVL1
static int FDECL(convert_uchars,(char *, uchar *, int)); static int FDECL(convert_uchars,(char *, uchar *, int));
# ifdef VIDEOSHADES # ifdef VIDEOSHADES
int assign_videoshades(char *choiceptr) int assign_videoshades(char *choiceptr)
@@ -872,7 +824,6 @@ convert_uchars(bufp,list,size)
} }
# endif /* VIDEOSHADES */ # endif /* VIDEOSHADES */
# endif /* OVL1 */
# endif /* TEXTCOLOR */ # endif /* TEXTCOLOR */
/* /*
@@ -884,7 +835,6 @@ convert_uchars(bufp,list,size)
* default (force use of the default video method for environment) * default (force use of the default video method for environment)
* vga (use vga adapter code) * vga (use vga adapter code)
*/ */
# ifdef OVL1
int int
assign_video(sopt) assign_video(sopt)
char *sopt; char *sopt;
@@ -948,8 +898,6 @@ char *sopt;
} }
return 1; return 1;
} }
# endif /* OVL1 */
# ifdef OVL0
void tileview(enable) void tileview(enable)
boolean enable; boolean enable;
@@ -958,12 +906,15 @@ boolean enable;
if (iflags.grmode) vga_traditional(enable ? FALSE : TRUE); if (iflags.grmode) vga_traditional(enable ? FALSE : TRUE);
#endif #endif
} }
# endif /* OVL0 */
#endif /* NO_TERMS */ #endif /* NO_TERMS */
#else /* STUBVIDEO */ #else /* STUBVIDEO */
void tileview(enable) void tileview(enable)
boolean enable; boolean enable;
{ {
} }
#endif /* STUBVIDEO */ #endif /* STUBVIDEO */
/*video.c*/
-15
View File
@@ -38,8 +38,6 @@ extern int attrib_gr_normal; /* graphics mode normal attribute */
extern int attrib_text_intense; /* text mode intense attribute */ extern int attrib_text_intense; /* text mode intense attribute */
extern int attrib_gr_intense; /* graphics mode intense attribute */ extern int attrib_gr_intense; /* graphics mode intense attribute */
#ifdef OVLB
void void
txt_get_scr_size() txt_get_scr_size()
{ {
@@ -84,7 +82,6 @@ txt_get_scr_size()
CO = regs.h.ah; CO = regs.h.ah;
# endif /* PC9800 */ # endif /* PC9800 */
} }
#endif /*OVLB*/
/* /*
* -------------------------------------------------------------- * --------------------------------------------------------------
@@ -113,7 +110,6 @@ void FDECL(txt_get_cursor, (int *, int *));
extern int g_attribute; /* Current attribute to use */ extern int g_attribute; /* Current attribute to use */
extern int monoflag; /* 0 = not monochrome, else monochrome */ extern int monoflag; /* 0 = not monochrome, else monochrome */
# ifdef OVLB
void void
txt_backsp() txt_backsp()
{ {
@@ -145,9 +141,7 @@ txt_nhbell()
regs.h.ah = 0x02; /* Character Output function */ regs.h.ah = 0x02; /* Character Output function */
(void) int86(DOSCALL, &regs, &regs); (void) int86(DOSCALL, &regs, &regs);
} }
# endif /* OVLB */
# ifdef OVL0
void void
txt_clear_screen() txt_clear_screen()
/* djgpp provides ScreenClear(), but in version 1.09 it is broken /* djgpp provides ScreenClear(), but in version 1.09 it is broken
@@ -254,9 +248,7 @@ txt_cl_eos() /* clear to end of screen */
(void) int86(VIDEO_BIOS, &regs, &regs); /* Scroll or initialize window */ (void) int86(VIDEO_BIOS, &regs, &regs); /* Scroll or initialize window */
# endif # endif
} }
# endif /* OVL0 */
# ifdef OVLB
void void
txt_startup(wid, hgt) txt_startup(wid, hgt)
int *wid, *hgt; int *wid, *hgt;
@@ -269,7 +261,6 @@ txt_startup(wid, hgt)
attrib_gr_intense = attrib_text_intense; attrib_gr_intense = attrib_text_intense;
g_attribute = attrib_text_normal; /* Give it a starting value */ g_attribute = attrib_text_normal; /* Give it a starting value */
} }
# endif /* OVLB */
/* /*
* Screen output routines (these are heavily used). * Screen output routines (these are heavily used).
@@ -295,7 +286,6 @@ txt_startup(wid, hgt)
* (that include wintty.h) are actually using these routines. * (that include wintty.h) are actually using these routines.
*/ */
# ifdef OVL0
void void
txt_xputs(s,col,row) txt_xputs(s,col,row)
const char *s; const char *s;
@@ -372,7 +362,6 @@ int attr;
txt_gotoxy(col,row); txt_gotoxy(col,row);
# endif /* PC9800 */ # endif /* PC9800 */
} }
# endif /* OVL0 */
/* /*
* This marks the end of the general screen output routines that are * This marks the end of the general screen output routines that are
@@ -396,7 +385,6 @@ int attr;
* the location of the player on the NetHack level. * the location of the player on the NetHack level.
*/ */
# ifdef OVL0
# if defined(SCREEN_BIOS) && !defined(PC9800) # if defined(SCREEN_BIOS) && !defined(PC9800)
/* /*
* This is implemented as a macro under DJGPPFAST. * This is implemented as a macro under DJGPPFAST.
@@ -447,14 +435,12 @@ int x,y;
* returns nothing. -3. * returns nothing. -3.
*/ */
} }
# endif /* OVL0 */
/* /*
* This marks the end of the cursor manipulation/information routines. * This marks the end of the cursor manipulation/information routines.
* ------------------------------------------------------------------- * -------------------------------------------------------------------
*/ */
# ifdef OVLB
# ifdef MONO_CHECK # ifdef MONO_CHECK
int txt_monoadapt_check() int txt_monoadapt_check()
{ {
@@ -466,7 +452,6 @@ int txt_monoadapt_check()
return (regs.h.al == 7) ? 1 : 0; /* 7 means monochrome mode */ return (regs.h.al == 7) ? 1 : 0; /* 7 means monochrome mode */
} }
# endif /* MONO_CHECK */ # endif /* MONO_CHECK */
# endif /* OVLB */
#endif /* NO_TERMS */ #endif /* NO_TERMS */
/* vidtxt.c */ /* vidtxt.c */
+1 -41
View File
@@ -54,11 +54,6 @@
* the Video BIOS ROM on board the VGA adapter. Code in vga_WriteChar * the Video BIOS ROM on board the VGA adapter. Code in vga_WriteChar
* copies the appropriate pixels from the video ROM to the Video buffer. * copies the appropriate pixels from the video ROM to the Video buffer.
* *
* - Currently, most of the routines are in an ifdef OVLB.
* If you change that, you may have to muck with some of the
* variable declarations which now assume this. This is not a
* problem in a non-overlaid environment (djgpp for example).
*
* - VGA 640 by 480, 16 colour mode (0x12) uses an odd method to * - VGA 640 by 480, 16 colour mode (0x12) uses an odd method to
* represent a colour value from the palette. There are four * represent a colour value from the palette. There are four
* planes of video memory, all overlaid at the same memory location. * planes of video memory, all overlaid at the same memory location.
@@ -153,7 +148,7 @@ STATIC_VAR struct map_struct {
for (x=0; x < COLNO; ++x) { map[y][x].glyph = cmap_to_glyph(S_stone); \ for (x=0; x < COLNO; ++x) { map[y][x].glyph = cmap_to_glyph(S_stone); \
map[y][x].ch = S_stone; map[y][x].attr = 0; map[y][x].special = 0;} } map[y][x].ch = S_stone; map[y][x].attr = 0; map[y][x].special = 0;} }
# define TOP_MAP_ROW 1 # define TOP_MAP_ROW 1
# if defined(OVLB)
STATIC_VAR int vgacmap[CLR_MAX] = {0,3,5,9,4,8,12,14,11,2,6,7,1,8,12,13}; STATIC_VAR int vgacmap[CLR_MAX] = {0,3,5,9,4,8,12,14,11,2,6,7,1,8,12,13};
STATIC_VAR int viewport_size = 40; STATIC_VAR int viewport_size = 40;
/* STATIC_VAR char masktable[8]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01}; */ /* STATIC_VAR char masktable[8]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01}; */
@@ -183,17 +178,6 @@ STATIC_VAR char defpalette[] = { /* Default VGA palette */
int vp[SCREENPLANES] = {8,4,2,1}; int vp[SCREENPLANES] = {8,4,2,1};
# endif # endif
int vp2[SCREENPLANES] = {1,2,4,8}; int vp2[SCREENPLANES] = {1,2,4,8};
# else
extern int vgacmap[CLR_MAX];
extern int viewport_size;
extern char masktable[8];
extern char bittable[8];
extern char defpalette[];
# ifndef ALTERNATE_VIDEO_METHOD
extern int vp[SCREENPLANES];
# endif
extern int vp2[SCREENPLANES];
# endif /* OVLB */
STATIC_VAR struct planar_cell_struct *planecell; STATIC_VAR struct planar_cell_struct *planecell;
STATIC_VAR struct overview_planar_cell_struct *planecell_O; STATIC_VAR struct overview_planar_cell_struct *planecell_O;
@@ -205,18 +189,12 @@ STATIC_VAR struct tibhdr_struct tibheader;
/* STATIC_VAR int g_attribute; */ /* Current attribute to use */ /* STATIC_VAR int g_attribute; */ /* Current attribute to use */
#ifdef OVLB
void void
vga_get_scr_size() vga_get_scr_size()
{ {
CO = 80; CO = 80;
LI = 29; LI = 29;
} }
#endif /*OVLB*/
# ifdef OVLB
void void
vga_backsp() vga_backsp()
@@ -230,9 +208,6 @@ vga_backsp()
vga_gotoloc(col,row); vga_gotoloc(col,row);
} }
# endif /* OVLB */
# ifdef OVL0
void void
vga_clear_screen(colour) vga_clear_screen(colour)
int colour; int colour;
@@ -292,10 +267,6 @@ int cy;
} }
} }
# endif /* OVL0 */
# ifdef OVLB
void void
vga_tty_end_screen() vga_tty_end_screen()
{ {
@@ -321,7 +292,6 @@ vga_tty_startup(wid, hgt)
attrib_gr_intense = ATTRIB_VGA_INTENSE; attrib_gr_intense = ATTRIB_VGA_INTENSE;
g_attribute = attrib_gr_normal; /* Give it a starting value */ g_attribute = attrib_gr_normal; /* Give it a starting value */
} }
# endif /* OVLB */
/* /*
* Screen output routines (these are heavily used). * Screen output routines (these are heavily used).
@@ -344,7 +314,6 @@ vga_tty_startup(wid, hgt)
* *
*/ */
# ifdef OVL0
void void
vga_xputs(s,col,row) vga_xputs(s,col,row)
const char *s; const char *s;
@@ -537,8 +506,6 @@ boolean clearfirst;
} }
} }
# endif /* USE_TILES && CLIPPING */ # endif /* USE_TILES && CLIPPING */
# endif /* OVL0 */
# ifdef OVL2
void void
vga_userpan(left) vga_userpan(left)
@@ -668,9 +635,7 @@ boolean left;
} }
} }
# endif /* SCROLLMAP */ # endif /* SCROLLMAP */
# endif /* OVL2 */
# ifdef OVLB
STATIC_OVL void STATIC_OVL void
decal_planar(gp, special) decal_planar(gp, special)
struct planar_cell_struct *gp; struct planar_cell_struct *gp;
@@ -1004,10 +969,6 @@ int len,col,row,colour;
} }
} }
# endif /* OVLB */
# ifdef OVLB
/* /*
* Initialize the VGA palette with the desired colours. This * Initialize the VGA palette with the desired colours. This
* must be a series of 48 bytes for use with a card in * must be a series of 48 bytes for use with a card in
@@ -1474,7 +1435,6 @@ vga_HideCursor()
egawriteplane(15); egawriteplane(15);
} }
# endif /* SIMULATE_CURSOR */ # endif /* SIMULATE_CURSOR */
# endif /* OVLB */
#endif /* SCREEN_VGA */ #endif /* SCREEN_VGA */
/* vidvga.c */ /* vidvga.c */
+2 -20
View File
@@ -29,14 +29,7 @@
#include <unistd.h> /* for getcwd() prototype */ #include <unistd.h> /* for getcwd() prototype */
#endif #endif
#ifdef OVL0 char orgdir[PATHLEN]; /* also used in pcsys.c, amidos.c */
#define SHARED_DCL
#else
#define SHARED_DCL extern
#endif
SHARED_DCL char orgdir[PATHLEN]; /* also used in pcsys.c, amidos.c */
#ifdef TOS #ifdef TOS
boolean run_from_desktop = TRUE; /* should we pause before exiting?? */ boolean run_from_desktop = TRUE; /* should we pause before exiting?? */
@@ -67,23 +60,16 @@ extern void NDECL(mswin_destroy_reg);
STATIC_DCL char *FDECL(exepath,(char *)); STATIC_DCL char *FDECL(exepath,(char *));
#endif #endif
#ifdef OVL0
int FDECL(main, (int,char **)); int FDECL(main, (int,char **));
#endif
extern void FDECL(pcmain, (int,char **)); extern void FDECL(pcmain, (int,char **));
#if defined(__BORLANDC__) && !defined(_WIN32) #if defined(__BORLANDC__) && !defined(_WIN32)
void NDECL( startup ); void NDECL( startup );
# ifdef OVLB
unsigned _stklen = STKSIZ; unsigned _stklen = STKSIZ;
# else
extern unsigned _stklen;
# endif
#endif #endif
#ifdef OVL0
/* If the graphics version is built, we don't need a main; it is skipped /* If the graphics version is built, we don't need a main; it is skipped
* to help MinGW decide which entry point to choose. If both main and * to help MinGW decide which entry point to choose. If both main and
* WinMain exist, the resulting executable won't work correctly. * WinMain exist, the resulting executable won't work correctly.
@@ -104,8 +90,6 @@ char *argv[];
return 0; return 0;
} }
#endif /*MSWIN_GRAPHICS*/ #endif /*MSWIN_GRAPHICS*/
#endif /*OVL0*/
#ifdef OVL1
void void
pcmain(argc,argv) pcmain(argc,argv)
@@ -667,8 +651,6 @@ boolean wr;
if (wr) check_recordfile(dir ? dir : thisdir); if (wr) check_recordfile(dir ? dir : thisdir);
} }
#endif /* CHDIR */ #endif /* CHDIR */
#endif /*OVL1*/
#ifdef OVLB
#ifdef PORT_HELP #ifdef PORT_HELP
# if defined(MSDOS) || defined(WIN32) # if defined(MSDOS) || defined(WIN32)
@@ -718,5 +700,5 @@ char *str;
return tmp; return tmp;
} }
#endif /* EXEPATH */ #endif /* EXEPATH */
#endif /*OVLB*/
/*pcmain.c*/ /*pcmain.c*/
-4
View File
@@ -19,8 +19,6 @@ extern void NDECL(backsp);
extern void NDECL(clear_screen); extern void NDECL(clear_screen);
#endif #endif
#ifdef OVLB
#if 0 #if 0
static struct stat buf; static struct stat buf;
#endif #endif
@@ -292,8 +290,6 @@ register char *s;
*lp = '_'; *lp = '_';
} }
# endif /* WIN32 */ # endif /* WIN32 */
#endif /* OVLB */
#ifdef __EMX__ #ifdef __EMX__
void seteuid(int i){;} void seteuid(int i){;}
+1 -7
View File
@@ -8,13 +8,7 @@
#include "mhmain.h" #include "mhmain.h"
#include "mhmap.h" #include "mhmap.h"
#ifdef OVL0 extern char orgdir[PATHLEN]; /* also used in pcsys.c, amidos.c */
#define SHARED_DCL
#else
#define SHARED_DCL extern
#endif
SHARED_DCL char orgdir[PATHLEN]; /* also used in pcsys.c, amidos.c */
extern void FDECL(nethack_exit,(int)); extern void FDECL(nethack_exit,(int));
static TCHAR* _get_cmd_arg(TCHAR* pCmdLine); static TCHAR* _get_cmd_arg(TCHAR* pCmdLine);
-9
View File
@@ -13,9 +13,7 @@
#include "wintty.h" #include "wintty.h"
#include "func_tab.h" #include "func_tab.h"
#ifdef OVL1
char morc = 0; /* tell the outside world what char you chose */ char morc = 0; /* tell the outside world what char you chose */
#endif /* OVL1 */
STATIC_DCL boolean FDECL(ext_cmd_getlin_hook, (char *)); STATIC_DCL boolean FDECL(ext_cmd_getlin_hook, (char *));
typedef boolean FDECL((*getlin_hook_proc), (char *)); typedef boolean FDECL((*getlin_hook_proc), (char *));
@@ -25,8 +23,6 @@ extern int NDECL(extcmd_via_menu); /* cmd.c */
extern char erase_char, kill_char; /* from appropriate tty.c file */ extern char erase_char, kill_char; /* from appropriate tty.c file */
#ifdef OVL1
/* /*
* Read a line closed with '\n' into the array char bufp[BUFSZ]. * Read a line closed with '\n' into the array char bufp[BUFSZ].
* (The '\n' is not stored. The string is closed with a '\0'.) * (The '\n' is not stored. The string is closed with a '\0'.)
@@ -197,9 +193,6 @@ register const char *s; /* chars allowed besides return */
} }
#endif /* OVL1 */
#ifdef OVL2
/* /*
* Implement extended command completion by using this hook into * Implement extended command completion by using this hook into
* tty_getlin. Check the characters already typed, if they uniquely * tty_getlin. Check the characters already typed, if they uniquely
@@ -277,8 +270,6 @@ tty_get_ext_cmd()
return i; return i;
} }
#endif /* OVL2 */
#endif /* TTY_GRAPHICS */ #endif /* TTY_GRAPHICS */
/*getline.c*/ /*getline.c*/
+7 -41
View File
@@ -23,22 +23,18 @@ static char * FDECL(e_atr2str, (int));
void FDECL(cmov, (int, int)); void FDECL(cmov, (int, int));
void FDECL(nocmov, (int, int)); void FDECL(nocmov, (int, int));
#if defined(TEXTCOLOR) && defined(TERMLIB) #if defined(TEXTCOLOR) && defined(TERMLIB)
# ifdef OVLB # if !defined(UNIX) || !defined(TERMINFO)
# if !defined(UNIX) || !defined(TERMINFO) # ifndef TOS
# ifndef TOS
static void FDECL(analyze_seq, (char *, int *, int *)); static void FDECL(analyze_seq, (char *, int *, int *));
# endif
# endif # endif
# endif
static void NDECL(init_hilite); static void NDECL(init_hilite);
static void NDECL(kill_hilite); static void NDECL(kill_hilite);
# endif /* OVLB */
#endif #endif
#ifdef OVLB
/* (see tcap.h) -- nh_CM, nh_ND, nh_CD, nh_HI,nh_HE, nh_US,nh_UE, /* (see tcap.h) -- nh_CM, nh_ND, nh_CD, nh_HI,nh_HE, nh_US,nh_UE,
ul_hack */ ul_hack */
struct tc_lcl_data tc_lcl_data = { 0, 0, 0, 0,0, 0,0, FALSE }; struct tc_lcl_data tc_lcl_data = { 0, 0, 0, 0,0, 0,0, FALSE };
#endif /* OVLB */
STATIC_VAR char *HO, *CL, *CE, *UP, *XD, *BC, *SO, *SE, *TI, *TE; STATIC_VAR char *HO, *CL, *CE, *UP, *XD, *BC, *SO, *SE, *TI, *TE;
STATIC_VAR char *VS, *VE; STATIC_VAR char *VS, *VE;
@@ -48,18 +44,15 @@ STATIC_VAR char *MR;
STATIC_VAR char *MB, *MH; STATIC_VAR char *MB, *MH;
STATIC_VAR char *MD; /* may already be in use below */ STATIC_VAR char *MD; /* may already be in use below */
#endif #endif
#ifdef TERMLIB #ifdef TERMLIB
# ifdef TEXTCOLOR # ifdef TEXTCOLOR
STATIC_VAR char *MD; STATIC_VAR char *MD;
# endif # endif
STATIC_VAR int SG; STATIC_VAR int SG;
#ifdef OVLB
STATIC_OVL char PC = '\0'; STATIC_OVL char PC = '\0';
#else /* OVLB */
STATIC_DCL char PC;
#endif /* OVLB */
STATIC_VAR char tbuf[512]; STATIC_VAR char tbuf[512];
#endif #endif /*TERMLIB*/
#ifdef TEXTCOLOR #ifdef TEXTCOLOR
# ifdef TOS # ifdef TOS
@@ -69,10 +62,8 @@ char NEARDATA *hilites[CLR_MAX]; /* terminal escapes for the various colors */
# endif # endif
#endif #endif
#ifdef OVLB
static char *KS = (char *)0, *KE = (char *)0; /* keypad sequences */ static char *KS = (char *)0, *KE = (char *)0; /* keypad sequences */
static char nullstr[] = ""; static char nullstr[] = "";
#endif /* OVLB */
#if defined(ASCIIGRAPH) && !defined(NO_TERMS) #if defined(ASCIIGRAPH) && !defined(NO_TERMS)
extern boolean HE_resets_AS; extern boolean HE_resets_AS;
@@ -87,8 +78,6 @@ STATIC_VAR char tgotobuf[20];
# endif # endif
#endif /* TERMLIB */ #endif /* TERMLIB */
#ifdef OVLB
void void
tty_startup(wid, hgt) tty_startup(wid, hgt)
int *wid, *hgt; int *wid, *hgt;
@@ -489,10 +478,7 @@ tty_end_screen()
/* Cursor movements */ /* Cursor movements */
#endif /* OVLB */ /* Note to overlay tinkerers. The placement of this overlay controls the location
#ifdef OVL0
/* Note to OVLx tinkerers. The placement of this overlay controls the location
of the function xputc(). This function is not currently in trampoli.[ch] of the function xputc(). This function is not currently in trampoli.[ch]
files for what is deemed to be performance reasons. If this define is moved files for what is deemed to be performance reasons. If this define is moved
and or xputc() is taken out of the ROOT overlay, then action must be taken and or xputc() is taken out of the ROOT overlay, then action must be taken
@@ -554,7 +540,7 @@ register int x, y;
ttyDisplay->curx = x; ttyDisplay->curx = x;
} }
/* See note at OVLx ifdef above. xputc() is a special function. */ /* See note above. xputc() is a special function. */
void void
xputc(c) xputc(c)
#if defined(apollo) #if defined(apollo)
@@ -600,9 +586,6 @@ cl_end()
} }
} }
#endif /* OVL0 */
#ifdef OVLB
void void
clear_screen() clear_screen()
{ {
@@ -615,9 +598,6 @@ clear_screen()
} }
} }
#endif /* OVLB */
#ifdef OVL0
void void
home() home()
{ {
@@ -675,9 +655,6 @@ m_end()
} }
#endif #endif
#endif /* OVL0 */
#ifdef OVLB
void void
backsp() backsp()
{ {
@@ -692,9 +669,6 @@ tty_nhbell()
(void) fflush(stdout); (void) fflush(stdout);
} }
#endif /* OVLB */
#ifdef OVL0
#ifdef ASCIIGRAPH #ifdef ASCIIGRAPH
void void
graph_on() { graph_on() {
@@ -707,9 +681,6 @@ graph_off() {
} }
#endif #endif
#endif /* OVL0 */
#ifdef OVL1
#if !defined(MICRO) #if !defined(MICRO)
# ifdef VMS # ifdef VMS
static const short tmspc10[] = { /* from termcap */ static const short tmspc10[] = { /* from termcap */
@@ -776,9 +747,6 @@ tty_delay_output()
#endif /* MICRO */ #endif /* MICRO */
} }
#endif /* OVL1 */
#ifdef OVLB
void void
cl_eos() /* free after Robert Viduya */ cl_eos() /* free after Robert Viduya */
{ /* must only be called with curx = 1 */ { /* must only be called with curx = 1 */
@@ -1175,8 +1143,6 @@ int color;
#endif /* TEXTCOLOR */ #endif /* TEXTCOLOR */
#endif /* OVLB */
#endif /* TTY_GRAPHICS */ #endif /* TTY_GRAPHICS */
/*termcap.c*/ /*termcap.c*/
-11
View File
@@ -19,8 +19,6 @@ STATIC_DCL void FDECL(topl_putsym, (CHAR_P));
STATIC_DCL void NDECL(remember_topl); STATIC_DCL void NDECL(remember_topl);
STATIC_DCL void FDECL(removetopl, (int)); STATIC_DCL void FDECL(removetopl, (int));
#ifdef OVLB
int int
tty_doprev_message() tty_doprev_message()
{ {
@@ -117,9 +115,6 @@ tty_doprev_message()
return 0; return 0;
} }
#endif /* OVLB */
#ifdef OVL1
STATIC_OVL void STATIC_OVL void
redotoplin(str) redotoplin(str)
const char *str; const char *str;
@@ -169,9 +164,6 @@ const char *s;
ttyDisplay->toplin = 1; ttyDisplay->toplin = 1;
} }
#endif /* OVL1 */
#ifdef OVL2
void void
more() more()
{ {
@@ -451,9 +443,6 @@ char def;
return q; return q;
} }
#endif /* OVL2 */
#endif /* TTY_GRAPHICS */ #endif /* TTY_GRAPHICS */
/*topl.c*/ /*topl.c*/
-6
View File
@@ -33,12 +33,6 @@ typedef HRESULT (CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *);
#endif #endif
#ifdef OVL0
#define SHARED_DCL
#else
#define SHARED_DCL extern
#endif
/* Minimal common control library version /* Minimal common control library version
Version _WIN_32IE Platform/IE Version _WIN_32IE Platform/IE
======= ========= =========== ======= ========= ===========