Merge branch 'keni-staticfn' into NetHack-3.7
This commit is contained in:
+14
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 config.h $NHDT-Date: 1704043695 2023/12/31 17:28:15 $ $NHDT-Branch: keni-luabits2 $:$NHDT-Revision: 1.181 $ */
|
||||
/* NetHack 3.7 config.h $NHDT-Date: 1710344316 2024/03/13 15:38:36 $ $NHDT-Branch: keni-staticfn $:$NHDT-Revision: 1.188 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2016. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -272,12 +272,24 @@
|
||||
# define PANICTRACE
|
||||
# endif
|
||||
# ifdef __linux__
|
||||
# define PANICTRACE
|
||||
# define PANICTRACE
|
||||
# define NOSTATICFN
|
||||
# endif
|
||||
// This test isn't quite right: CNG is only available from Windows 2000 on.
|
||||
// But we'll check that at runtime.
|
||||
# ifdef WIN32
|
||||
# define PANICTRACE
|
||||
# define NOSTATICFN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef NONOSTATICFN
|
||||
# define staticfn static
|
||||
#else
|
||||
# ifdef NOSTATICFN
|
||||
# define staticfn
|
||||
# else
|
||||
# define staticfn static
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
+18
-18
@@ -12,18 +12,18 @@
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
static void moveloop_preamble(boolean);
|
||||
static void u_calc_moveamt(int);
|
||||
static void maybe_do_tutorial(void);
|
||||
staticfn void moveloop_preamble(boolean);
|
||||
staticfn void u_calc_moveamt(int);
|
||||
staticfn void maybe_do_tutorial(void);
|
||||
#ifdef POSITIONBAR
|
||||
static void do_positionbar(void);
|
||||
staticfn void do_positionbar(void);
|
||||
#endif
|
||||
static void regen_pw(int);
|
||||
static void regen_hp(int);
|
||||
static void interrupt_multi(const char *);
|
||||
static void debug_fields(const char *);
|
||||
staticfn void regen_pw(int);
|
||||
staticfn void regen_hp(int);
|
||||
staticfn void interrupt_multi(const char *);
|
||||
staticfn void debug_fields(const char *);
|
||||
#ifndef NODUMPENUMS
|
||||
static void dump_enums(void);
|
||||
staticfn void dump_enums(void);
|
||||
#endif
|
||||
|
||||
/*ARGSUSED*/
|
||||
@@ -41,7 +41,7 @@ early_init(int argc UNUSED, char *argv[] UNUSED)
|
||||
runtime_info_init();
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
moveloop_preamble(boolean resuming)
|
||||
{
|
||||
/* if a save file created in normal mode is now being restored in
|
||||
@@ -101,7 +101,7 @@ moveloop_preamble(boolean resuming)
|
||||
update_inventory();
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
u_calc_moveamt(int wtcap)
|
||||
{
|
||||
int moveamt = 0;
|
||||
@@ -516,7 +516,7 @@ moveloop_core(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
maybe_do_tutorial(void)
|
||||
{
|
||||
s_level *sp = find_level("tut-1");
|
||||
@@ -549,7 +549,7 @@ moveloop(boolean resuming)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
regen_pw(int wtcap)
|
||||
{
|
||||
if (u.uen < u.uenmax
|
||||
@@ -571,7 +571,7 @@ regen_pw(int wtcap)
|
||||
#define U_CAN_REGEN() (Regeneration || (Sleepy && u.usleep))
|
||||
|
||||
/* maybe recover some lost health (or lose some when an eel out of water) */
|
||||
static void
|
||||
staticfn void
|
||||
regen_hp(int wtcap)
|
||||
{
|
||||
int heal = 0;
|
||||
@@ -832,7 +832,7 @@ welcome(boolean new_game) /* false => restoring an old game */
|
||||
}
|
||||
|
||||
#ifdef POSITIONBAR
|
||||
static void
|
||||
staticfn void
|
||||
do_positionbar(void)
|
||||
{
|
||||
/* FIXME: this will break if any coordinate is too big for (char);
|
||||
@@ -875,7 +875,7 @@ do_positionbar(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
interrupt_multi(const char *msg)
|
||||
{
|
||||
if (gm.multi > 0 && !gc.context.travel && !gc.context.run) {
|
||||
@@ -1043,7 +1043,7 @@ argcheck(int argc, char *argv[], enum earlyarg e_arg)
|
||||
* optimization so that display output
|
||||
* can be debugged without buffering.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
debug_fields(const char *opts)
|
||||
{
|
||||
char *op;
|
||||
@@ -1175,7 +1175,7 @@ static struct enum_dump arti_enum_dump[] = {
|
||||
|
||||
#ifndef NODUMPENUMS
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dump_enums(void)
|
||||
{
|
||||
enum enum_dumps {
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ char *fmt_ptr(const genericptr) NONNULL;
|
||||
#undef re_alloc
|
||||
#undef free
|
||||
extern void free(genericptr_t);
|
||||
static void heapmon_init(void);
|
||||
staticfn void heapmon_init(void);
|
||||
|
||||
static FILE *heaplog = 0;
|
||||
static boolean tried_heaplog = FALSE;
|
||||
@@ -138,7 +138,7 @@ fmt_ptr(const genericptr ptr)
|
||||
|
||||
/* If ${NH_HEAPLOG} is defined and we can create a file by that name,
|
||||
then we'll log the allocation and release information to that file. */
|
||||
static void
|
||||
staticfn void
|
||||
heapmon_init(void)
|
||||
{
|
||||
char *logname = getenv("NH_HEAPLOG");
|
||||
|
||||
+90
-90
@@ -5,56 +5,56 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static int use_camera(struct obj *);
|
||||
static int use_towel(struct obj *);
|
||||
static boolean its_dead(coordxy, coordxy, int *);
|
||||
static int use_stethoscope(struct obj *);
|
||||
static void use_whistle(struct obj *);
|
||||
static void use_magic_whistle(struct obj *);
|
||||
static void magic_whistled(struct obj *);
|
||||
static int use_leash(struct obj *);
|
||||
static boolean mleashed_next2u(struct monst *);
|
||||
static int use_mirror(struct obj *);
|
||||
static void use_bell(struct obj **);
|
||||
static void use_candelabrum(struct obj *);
|
||||
static void use_candle(struct obj **);
|
||||
static void use_lamp(struct obj *);
|
||||
static void light_cocktail(struct obj **);
|
||||
static int rub_ok(struct obj *);
|
||||
static void display_jump_positions(boolean);
|
||||
static void use_tinning_kit(struct obj *);
|
||||
static int use_figurine(struct obj **);
|
||||
static int grease_ok(struct obj *);
|
||||
static int use_grease(struct obj *);
|
||||
static void use_trap(struct obj *);
|
||||
static int touchstone_ok(struct obj *);
|
||||
static int use_stone(struct obj *);
|
||||
static int set_trap(void); /* occupation callback */
|
||||
static void display_polearm_positions(boolean);
|
||||
static int use_cream_pie(struct obj *);
|
||||
static int jelly_ok(struct obj *);
|
||||
static int use_royal_jelly(struct obj **);
|
||||
static int grapple_range(void);
|
||||
static boolean can_grapple_location(coordxy, coordxy);
|
||||
static void display_grapple_positions(boolean);
|
||||
static int use_grapple(struct obj *);
|
||||
static void discard_broken_wand(void);
|
||||
static void broken_wand_explode(struct obj *, int, int);
|
||||
static int do_break_wand(struct obj *);
|
||||
static int apply_ok(struct obj *);
|
||||
static int flip_through_book(struct obj *);
|
||||
static int flip_coin(struct obj *);
|
||||
static boolean figurine_location_checks(struct obj *, coord *, boolean);
|
||||
static boolean check_jump(genericptr_t, coordxy, coordxy);
|
||||
static boolean is_valid_jump_pos(coordxy, coordxy, int, boolean);
|
||||
static boolean get_valid_jump_position(coordxy, coordxy);
|
||||
static boolean get_valid_polearm_position(coordxy, coordxy);
|
||||
static boolean find_poleable_mon(coord *, int, int);
|
||||
staticfn int use_camera(struct obj *);
|
||||
staticfn int use_towel(struct obj *);
|
||||
staticfn boolean its_dead(coordxy, coordxy, int *);
|
||||
staticfn int use_stethoscope(struct obj *);
|
||||
staticfn void use_whistle(struct obj *);
|
||||
staticfn void use_magic_whistle(struct obj *);
|
||||
staticfn void magic_whistled(struct obj *);
|
||||
staticfn int use_leash(struct obj *);
|
||||
staticfn boolean mleashed_next2u(struct monst *);
|
||||
staticfn int use_mirror(struct obj *);
|
||||
staticfn void use_bell(struct obj **);
|
||||
staticfn void use_candelabrum(struct obj *);
|
||||
staticfn void use_candle(struct obj **);
|
||||
staticfn void use_lamp(struct obj *);
|
||||
staticfn void light_cocktail(struct obj **);
|
||||
staticfn int rub_ok(struct obj *);
|
||||
staticfn void display_jump_positions(boolean);
|
||||
staticfn void use_tinning_kit(struct obj *);
|
||||
staticfn int use_figurine(struct obj **);
|
||||
staticfn int grease_ok(struct obj *);
|
||||
staticfn int use_grease(struct obj *);
|
||||
staticfn void use_trap(struct obj *);
|
||||
staticfn int touchstone_ok(struct obj *);
|
||||
staticfn int use_stone(struct obj *);
|
||||
staticfn int set_trap(void); /* occupation callback */
|
||||
staticfn void display_polearm_positions(boolean);
|
||||
staticfn int use_cream_pie(struct obj *);
|
||||
staticfn int jelly_ok(struct obj *);
|
||||
staticfn int use_royal_jelly(struct obj **);
|
||||
staticfn int grapple_range(void);
|
||||
staticfn boolean can_grapple_location(coordxy, coordxy);
|
||||
staticfn void display_grapple_positions(boolean);
|
||||
staticfn int use_grapple(struct obj *);
|
||||
staticfn void discard_broken_wand(void);
|
||||
staticfn void broken_wand_explode(struct obj *, int, int);
|
||||
staticfn int do_break_wand(struct obj *);
|
||||
staticfn int apply_ok(struct obj *);
|
||||
staticfn int flip_through_book(struct obj *);
|
||||
staticfn int flip_coin(struct obj *);
|
||||
staticfn boolean figurine_location_checks(struct obj *, coord *, boolean);
|
||||
staticfn boolean check_jump(genericptr_t, coordxy, coordxy);
|
||||
staticfn boolean is_valid_jump_pos(coordxy, coordxy, int, boolean);
|
||||
staticfn boolean get_valid_jump_position(coordxy, coordxy);
|
||||
staticfn boolean get_valid_polearm_position(coordxy, coordxy);
|
||||
staticfn boolean find_poleable_mon(coord *, int, int);
|
||||
|
||||
static const char
|
||||
no_elbow_room[] = "don't have enough elbow-room to maneuver.";
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
use_camera(struct obj *obj)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -96,7 +96,7 @@ use_camera(struct obj *obj)
|
||||
return ECMD_TIME;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
use_towel(struct obj *obj)
|
||||
{
|
||||
boolean drying_feedback = (obj == uwep);
|
||||
@@ -182,7 +182,7 @@ use_towel(struct obj *obj)
|
||||
}
|
||||
|
||||
/* maybe give a stethoscope message based on floor objects */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
its_dead(coordxy rx, coordxy ry, int *resp)
|
||||
{
|
||||
char buf[BUFSZ];
|
||||
@@ -303,7 +303,7 @@ static const char hollow_str[] = "a hollow sound. This must be a secret %s!";
|
||||
not take any time; however, unless it did, the stethoscope would be
|
||||
almost useless. As a compromise, one use per turn is free, another
|
||||
uses up the turn; this makes curse status have a tangible effect. */
|
||||
static int
|
||||
staticfn int
|
||||
use_stethoscope(struct obj *obj)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -460,7 +460,7 @@ use_stethoscope(struct obj *obj)
|
||||
static const char whistle_str[] = "produce a %s whistling sound.",
|
||||
alt_whistle_str[] = "produce a %s, sharp vibration.";
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
use_whistle(struct obj *obj)
|
||||
{
|
||||
if (!can_blow(&gy.youmonst)) {
|
||||
@@ -479,7 +479,7 @@ use_whistle(struct obj *obj)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
use_magic_whistle(struct obj *obj)
|
||||
{
|
||||
if (!can_blow(&gy.youmonst)) {
|
||||
@@ -500,7 +500,7 @@ use_magic_whistle(struct obj *obj)
|
||||
}
|
||||
|
||||
/* 'obj' is assumed to be a magic whistle */
|
||||
static void
|
||||
staticfn void
|
||||
magic_whistled(struct obj *obj)
|
||||
{
|
||||
struct monst *mtmp, *nextmon;
|
||||
@@ -747,7 +747,7 @@ leashable(struct monst *mtmp)
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
staticfn int
|
||||
use_leash(struct obj *obj)
|
||||
{
|
||||
coord cc;
|
||||
@@ -867,7 +867,7 @@ get_mleash(struct monst *mtmp)
|
||||
return otmp;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
mleashed_next2u(struct monst *mtmp)
|
||||
{
|
||||
if (mtmp->mleashed) {
|
||||
@@ -993,7 +993,7 @@ beautiful(void)
|
||||
|
||||
static const char look_str[] = "look %s.";
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
use_mirror(struct obj *obj)
|
||||
{
|
||||
const char *mirror, *uvisage;
|
||||
@@ -1177,7 +1177,7 @@ use_mirror(struct obj *obj)
|
||||
#undef SEENMON
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
use_bell(struct obj **optr)
|
||||
{
|
||||
struct obj *obj = *optr;
|
||||
@@ -1294,7 +1294,7 @@ use_bell(struct obj **optr)
|
||||
wake_nearby();
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
use_candelabrum(struct obj *obj)
|
||||
{
|
||||
const char *s = (obj->spe != 1) ? "candles" : "candle";
|
||||
@@ -1362,7 +1362,7 @@ use_candelabrum(struct obj *obj)
|
||||
begin_burn(obj, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
use_candle(struct obj **optr)
|
||||
{
|
||||
struct obj *obj = *optr;
|
||||
@@ -1596,7 +1596,7 @@ catch_lit(struct obj *obj)
|
||||
}
|
||||
|
||||
/* light a lamp or candle */
|
||||
static void
|
||||
staticfn void
|
||||
use_lamp(struct obj *obj)
|
||||
{
|
||||
char buf[BUFSZ];
|
||||
@@ -1670,7 +1670,7 @@ use_lamp(struct obj *obj)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
light_cocktail(struct obj **optr)
|
||||
{
|
||||
struct obj *obj = *optr; /* obj is a potion of oil */
|
||||
@@ -1737,7 +1737,7 @@ light_cocktail(struct obj **optr)
|
||||
|
||||
/* getobj callback for object to be rubbed - not selecting a secondary object
|
||||
to rub on a gray stone or rub jelly on */
|
||||
static int
|
||||
staticfn int
|
||||
rub_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
@@ -1829,7 +1829,7 @@ enum jump_trajectory {
|
||||
};
|
||||
|
||||
/* callback routine for walk_path() */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
check_jump(genericptr arg, coordxy x, coordxy y)
|
||||
{
|
||||
int traj = *(int *) arg;
|
||||
@@ -1860,7 +1860,7 @@ check_jump(genericptr arg, coordxy x, coordxy y)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
is_valid_jump_pos(coordxy x, coordxy y, int magic, boolean showmsg)
|
||||
{
|
||||
if (!magic && !(HJumping & ~INTRINSIC) && !EJumping && distu(x, y) != 5) {
|
||||
@@ -1926,7 +1926,7 @@ is_valid_jump_pos(coordxy x, coordxy y, int magic, boolean showmsg)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
get_valid_jump_position(coordxy x, coordxy y)
|
||||
{
|
||||
return (isok(x, y)
|
||||
@@ -1934,7 +1934,7 @@ get_valid_jump_position(coordxy x, coordxy y)
|
||||
&& is_valid_jump_pos(x, y, gj.jumping_is_magic, FALSE));
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
display_jump_positions(boolean on_off)
|
||||
{
|
||||
coordxy x, y, dx, dy;
|
||||
@@ -2145,7 +2145,7 @@ tinnable(struct obj *corpse)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
use_tinning_kit(struct obj *obj)
|
||||
{
|
||||
struct obj *corpse, *can;
|
||||
@@ -2478,7 +2478,7 @@ fig_transform(anything *arg, long timeout)
|
||||
newsym(cc.x, cc.y);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
figurine_location_checks(struct obj *obj, coord *cc, boolean quietly)
|
||||
{
|
||||
coordxy x, y;
|
||||
@@ -2511,7 +2511,7 @@ figurine_location_checks(struct obj *obj, coord *cc, boolean quietly)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
use_figurine(struct obj **optr)
|
||||
{
|
||||
struct obj *obj = *optr;
|
||||
@@ -2552,7 +2552,7 @@ use_figurine(struct obj **optr)
|
||||
}
|
||||
|
||||
/* getobj callback for object to apply grease to */
|
||||
static int
|
||||
staticfn int
|
||||
grease_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
@@ -2569,7 +2569,7 @@ grease_ok(struct obj *obj)
|
||||
return GETOBJ_SUGGEST;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
use_grease(struct obj *obj)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -2623,7 +2623,7 @@ use_grease(struct obj *obj)
|
||||
}
|
||||
|
||||
/* getobj callback for object to rub on a known touchstone */
|
||||
static int
|
||||
staticfn int
|
||||
touchstone_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
@@ -2645,7 +2645,7 @@ touchstone_ok(struct obj *obj)
|
||||
|
||||
|
||||
/* touchstones - by Ken Arnold */
|
||||
static int
|
||||
staticfn int
|
||||
use_stone(struct obj *tstone)
|
||||
{
|
||||
static const char scritch[] = "\"scritch, scritch\"";
|
||||
@@ -2786,7 +2786,7 @@ reset_trapset(void)
|
||||
}
|
||||
|
||||
/* Place a landmine/bear trap. Helge Hafting */
|
||||
static void
|
||||
staticfn void
|
||||
use_trap(struct obj *otmp)
|
||||
{
|
||||
int ttyp, tmp;
|
||||
@@ -2880,7 +2880,7 @@ use_trap(struct obj *otmp)
|
||||
}
|
||||
|
||||
/* occupation routine called each turn while arming a beartrap or landmine */
|
||||
static int
|
||||
staticfn int
|
||||
set_trap(void)
|
||||
{
|
||||
struct obj *otmp = gt.trapinfo.tobj;
|
||||
@@ -3247,7 +3247,7 @@ static const char
|
||||
(glyph_is_monster(G) || glyph_is_invisible(G) || glyph_is_statue(G))
|
||||
|
||||
/* find pos of monster in range, if only one monster */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
find_poleable_mon(coord *pos, int min_range, int max_range)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -3285,7 +3285,7 @@ find_poleable_mon(coord *pos, int min_range, int max_range)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
get_valid_polearm_position(coordxy x, coordxy y)
|
||||
{
|
||||
int glyph;
|
||||
@@ -3298,7 +3298,7 @@ get_valid_polearm_position(coordxy x, coordxy y)
|
||||
&& glyph_is_poleable(glyph))));
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
display_polearm_positions(boolean on_off)
|
||||
{
|
||||
coordxy x, y, dx, dy;
|
||||
@@ -3470,7 +3470,7 @@ use_pole(struct obj *obj, boolean autohit)
|
||||
|
||||
#undef glyph_is_poleable
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
use_cream_pie(struct obj *obj)
|
||||
{
|
||||
boolean wasblind = Blind;
|
||||
@@ -3509,7 +3509,7 @@ use_cream_pie(struct obj *obj)
|
||||
}
|
||||
|
||||
/* getobj callback for object to rub royal jelly on */
|
||||
static int
|
||||
staticfn int
|
||||
jelly_ok(struct obj *obj)
|
||||
{
|
||||
if (obj && obj->otyp == EGG)
|
||||
@@ -3518,7 +3518,7 @@ jelly_ok(struct obj *obj)
|
||||
return GETOBJ_EXCLUDE;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
use_royal_jelly(struct obj **optr)
|
||||
{
|
||||
int oldcorpsenm;
|
||||
@@ -3588,7 +3588,7 @@ use_royal_jelly(struct obj **optr)
|
||||
return ECMD_TIME;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
grapple_range(void)
|
||||
{
|
||||
int typ = uwep_skill_type();
|
||||
@@ -3603,13 +3603,13 @@ grapple_range(void)
|
||||
return max_range;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
can_grapple_location(coordxy x, coordxy y)
|
||||
{
|
||||
return (isok(x, y) && cansee(x, y) && distu(x, y) <= grapple_range());
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
display_grapple_positions(boolean on_off)
|
||||
{
|
||||
coordxy x, y, dx, dy;
|
||||
@@ -3631,7 +3631,7 @@ display_grapple_positions(boolean on_off)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
use_grapple(struct obj *obj)
|
||||
{
|
||||
int res = ECMD_OK, typ, tohit;
|
||||
@@ -3777,7 +3777,7 @@ use_grapple(struct obj *obj)
|
||||
return ECMD_TIME;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
discard_broken_wand(void)
|
||||
{
|
||||
struct obj *obj;
|
||||
@@ -3789,7 +3789,7 @@ discard_broken_wand(void)
|
||||
nomul(0);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
broken_wand_explode(struct obj *obj, int dmg, int expltype)
|
||||
{
|
||||
explode(u.ux, u.uy, -(obj->otyp), dmg, WAND_CLASS, expltype);
|
||||
@@ -3798,7 +3798,7 @@ broken_wand_explode(struct obj *obj, int dmg, int expltype)
|
||||
}
|
||||
|
||||
/* return 1 if the wand is broken, hence some time elapsed */
|
||||
static int
|
||||
staticfn int
|
||||
do_break_wand(struct obj *obj)
|
||||
{
|
||||
#define BY_OBJECT ((struct monst *) 0)
|
||||
@@ -4031,7 +4031,7 @@ do_break_wand(struct obj *obj)
|
||||
|
||||
/* getobj callback for object to apply - this is more complex than most other
|
||||
* callbacks because there are a lot of appliables */
|
||||
static int
|
||||
staticfn int
|
||||
apply_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
@@ -4343,7 +4343,7 @@ unfixable_trouble_count(boolean is_horn)
|
||||
return unfixable_trbl;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
flip_through_book(struct obj *obj)
|
||||
{
|
||||
if (Underwater) {
|
||||
@@ -4397,7 +4397,7 @@ flip_through_book(struct obj *obj)
|
||||
return ECMD_TIME;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
flip_coin(struct obj *obj)
|
||||
{
|
||||
struct obj *otmp = obj;
|
||||
|
||||
+24
-23
@@ -21,17 +21,18 @@ static struct artifact *get_artifact(struct obj *) NONNULL; /* never returns nul
|
||||
? &artilist[(int) (o)->oartifact] \
|
||||
: &artilist[ART_NONARTIFACT]) */
|
||||
|
||||
static boolean bane_applies(const struct artifact *, struct monst *) NONNULLARG12;
|
||||
static int spec_applies(const struct artifact *, struct monst *) NONNULLARG12;
|
||||
static int invoke_ok(struct obj *);
|
||||
static int arti_invoke(struct obj *);
|
||||
static boolean Mb_hit(struct monst * magr, struct monst *mdef,
|
||||
staticfn boolean bane_applies(const struct artifact *, struct monst *)
|
||||
NONNULLARG12;
|
||||
staticfn int spec_applies(const struct artifact *, struct monst *) NONNULLARG12;
|
||||
staticfn int invoke_ok(struct obj *);
|
||||
staticfn int arti_invoke(struct obj *);
|
||||
staticfn boolean Mb_hit(struct monst * magr, struct monst *mdef,
|
||||
struct obj *, int *, int, boolean, char *);
|
||||
static unsigned long abil_to_spfx(long *) NONNULLARG1;
|
||||
static uchar abil_to_adtyp(long *) NONNULLARG1;
|
||||
static int glow_strength(int);
|
||||
static boolean untouchable(struct obj *, boolean);
|
||||
static int count_surround_traps(coordxy, coordxy);
|
||||
staticfn unsigned long abil_to_spfx(long *) NONNULLARG1;
|
||||
staticfn uchar abil_to_adtyp(long *) NONNULLARG1;
|
||||
staticfn int glow_strength(int);
|
||||
staticfn boolean untouchable(struct obj *, boolean);
|
||||
staticfn int count_surround_traps(coordxy, coordxy);
|
||||
|
||||
/* The amount added to the victim's total hit points to insure that the
|
||||
victim will be killed even after damage bonus/penalty adjustments.
|
||||
@@ -69,10 +70,10 @@ static xint16 artidisco[NROFARTIFACTS];
|
||||
*/
|
||||
static const struct arti_info zero_artiexist = {0}; /* all bits zero */
|
||||
|
||||
static void hack_artifacts(void);
|
||||
staticfn void hack_artifacts(void);
|
||||
|
||||
/* handle some special cases; must be called after u_init() */
|
||||
static void
|
||||
staticfn void
|
||||
hack_artifacts(void)
|
||||
{
|
||||
struct artifact *art;
|
||||
@@ -891,7 +892,7 @@ arti_immune(struct obj *obj, int dtyp)
|
||||
|| weap->cary.adtyp == dtyp);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
bane_applies(const struct artifact *oart, struct monst *mon)
|
||||
{
|
||||
struct artifact atmp;
|
||||
@@ -907,7 +908,7 @@ bane_applies(const struct artifact *oart, struct monst *mon)
|
||||
}
|
||||
|
||||
/* decide whether an artifact's special attacks apply against mtmp */
|
||||
static int
|
||||
staticfn int
|
||||
spec_applies(const struct artifact *weap, struct monst *mtmp)
|
||||
{
|
||||
struct permonst *ptr;
|
||||
@@ -1147,7 +1148,7 @@ static const char *const mb_verb[2][NUM_MB_INDICES] = {
|
||||
};
|
||||
|
||||
/* called when someone is being hit by Magicbane */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
Mb_hit(struct monst *magr, /* attacker */
|
||||
struct monst *mdef, /* defender */
|
||||
struct obj *mb, /* Magicbane */
|
||||
@@ -1629,7 +1630,7 @@ artifact_hit(
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
/* getobj callback for object to be invoked */
|
||||
static int
|
||||
staticfn int
|
||||
invoke_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
@@ -1664,7 +1665,7 @@ doinvoke(void)
|
||||
return arti_invoke(obj);
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
arti_invoke(struct obj *obj)
|
||||
{
|
||||
const struct artifact *oart = get_artifact(obj);
|
||||
@@ -2056,7 +2057,7 @@ arti_cost(struct obj *otmp)
|
||||
return (100L * (long) objects[otmp->otyp].oc_cost);
|
||||
}
|
||||
|
||||
static uchar
|
||||
staticfn uchar
|
||||
abil_to_adtyp(long *abil)
|
||||
{
|
||||
struct abil2adtyp_tag {
|
||||
@@ -2080,7 +2081,7 @@ abil_to_adtyp(long *abil)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
staticfn unsigned long
|
||||
abil_to_spfx(long *abil)
|
||||
{
|
||||
static const struct abil2spfx_tag {
|
||||
@@ -2174,7 +2175,7 @@ static const char *const glow_verbs[] = {
|
||||
};
|
||||
|
||||
/* relative strength that Sting is glowing (0..3), to select verb */
|
||||
static int
|
||||
staticfn int
|
||||
glow_strength(int count)
|
||||
{
|
||||
/* glow strength should also be proportional to proximity and
|
||||
@@ -2328,7 +2329,7 @@ retouch_object(
|
||||
or an artifact which conveys something via being carried or which
|
||||
has an #invoke effect currently in operation undergoes a touch test;
|
||||
if it fails, it will be unworn/unwielded and maybe dropped */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
untouchable(
|
||||
struct obj *obj, /* object to test; in invent or is steed's saddle */
|
||||
boolean drop_untouchable) /* whether to drop it if it can't be touched */
|
||||
@@ -2438,7 +2439,7 @@ retouch_equipment(
|
||||
clear_bypasses(); /* reset upon final exit */
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
count_surround_traps(coordxy x, coordxy y)
|
||||
{
|
||||
struct rm *levp;
|
||||
@@ -2552,7 +2553,7 @@ is_art(struct obj *obj, int art)
|
||||
? &artilist[(int) (o)->oartifact] \
|
||||
: &artilist[ART_NONARTIFACT]) */
|
||||
|
||||
static struct artifact *
|
||||
staticfn struct artifact *
|
||||
get_artifact(struct obj *obj)
|
||||
{
|
||||
if (obj) {
|
||||
|
||||
+14
-14
@@ -105,13 +105,13 @@ static const struct innate {
|
||||
|
||||
hum_abil[] = { { 0, 0, 0, 0 } };
|
||||
|
||||
static void exerper(void);
|
||||
static int rnd_attr(void);
|
||||
static int init_attr_role_redist(int, boolean);
|
||||
static void postadjabil(long *);
|
||||
static const struct innate *role_abil(int);
|
||||
static const struct innate *check_innate_abil(long *, long);
|
||||
static int innately(long *);
|
||||
staticfn void exerper(void);
|
||||
staticfn int rnd_attr(void);
|
||||
staticfn int init_attr_role_redist(int, boolean);
|
||||
staticfn void postadjabil(long *);
|
||||
staticfn const struct innate *role_abil(int);
|
||||
staticfn const struct innate *check_innate_abil(long *, long);
|
||||
staticfn int innately(long *);
|
||||
|
||||
/* adjust an attribute; return TRUE if change is made, FALSE otherwise */
|
||||
boolean
|
||||
@@ -505,7 +505,7 @@ exercise(int i, boolean inc_or_dec)
|
||||
(void) encumber_msg();
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
exerper(void)
|
||||
{
|
||||
if (!(gm.moves % 10)) {
|
||||
@@ -666,7 +666,7 @@ exerchk(void)
|
||||
|
||||
/* return random hero attribute (by role's attr distribution).
|
||||
returns A_MAX if failed. */
|
||||
static int
|
||||
staticfn int
|
||||
rnd_attr(void)
|
||||
{
|
||||
int i, x = rn2(100);
|
||||
@@ -683,7 +683,7 @@ rnd_attr(void)
|
||||
adjusting the base and maximum values of the attributes.
|
||||
if subtracting, np must be negative.
|
||||
returns the left over points. */
|
||||
static int
|
||||
staticfn int
|
||||
init_attr_role_redist(int np, boolean addition)
|
||||
{
|
||||
int tryct = 0;
|
||||
@@ -761,7 +761,7 @@ vary_init_attr(void)
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
staticfn
|
||||
void
|
||||
postadjabil(long *ability)
|
||||
{
|
||||
@@ -771,7 +771,7 @@ postadjabil(long *ability)
|
||||
see_monsters();
|
||||
}
|
||||
|
||||
static const struct innate *
|
||||
staticfn const struct innate *
|
||||
role_abil(int r)
|
||||
{
|
||||
const struct {
|
||||
@@ -800,7 +800,7 @@ role_abil(int r)
|
||||
return roleabils[i].abil;
|
||||
}
|
||||
|
||||
static const struct innate *
|
||||
staticfn const struct innate *
|
||||
check_innate_abil(long *ability, long frommask)
|
||||
{
|
||||
const struct innate *abil = 0;
|
||||
@@ -846,7 +846,7 @@ check_innate_abil(long *ability, long frommask)
|
||||
#define FROM_LYCN 6
|
||||
|
||||
/* check whether particular ability has been obtained via innate attribute */
|
||||
static int
|
||||
staticfn int
|
||||
innately(long *ability)
|
||||
{
|
||||
const struct innate *iptr;
|
||||
|
||||
+10
-10
@@ -8,11 +8,11 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static int bc_order(void);
|
||||
static void litter(void);
|
||||
static void placebc_core(void);
|
||||
static void unplacebc_core(void);
|
||||
static boolean check_restriction(int);
|
||||
staticfn int bc_order(void);
|
||||
staticfn void litter(void);
|
||||
staticfn void placebc_core(void);
|
||||
staticfn void unplacebc_core(void);
|
||||
staticfn boolean check_restriction(int);
|
||||
|
||||
static int bcrestriction = 0;
|
||||
#ifdef BREADCRUMBS
|
||||
@@ -116,7 +116,7 @@ ballfall(void)
|
||||
*
|
||||
* Should not be called while swallowed except on waterlevel.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
placebc_core(void)
|
||||
{
|
||||
if (!uchain || !uball) {
|
||||
@@ -143,7 +143,7 @@ placebc_core(void)
|
||||
bcrestriction = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
unplacebc_core(void)
|
||||
{
|
||||
if (u.uswallow) {
|
||||
@@ -176,7 +176,7 @@ unplacebc_core(void)
|
||||
u.bc_felt = 0; /* feel nothing */
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
check_restriction(int restriction)
|
||||
{
|
||||
boolean ret = FALSE;
|
||||
@@ -350,7 +350,7 @@ Lift_covet_and_placebc(int pin, char *funcnm, int linenum)
|
||||
* Return the stacking of the hero's ball & chain. This assumes that the
|
||||
* hero is being punished.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
bc_order(void)
|
||||
{
|
||||
struct obj *obj;
|
||||
@@ -964,7 +964,7 @@ drop_ball(coordxy x, coordxy y)
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
/* ball&chain cause hero to randomly lose stuff from inventory */
|
||||
static void
|
||||
staticfn void
|
||||
litter(void)
|
||||
{
|
||||
struct obj *otmp, *nextobj = 0;
|
||||
|
||||
+14
-14
@@ -5,15 +5,15 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static boolean no_bones_level(d_level *);
|
||||
static void goodfruit(int);
|
||||
static void resetobjs(struct obj *, boolean);
|
||||
static void give_to_nearby_mon(struct obj *, coordxy, coordxy) NONNULLARG1;
|
||||
static boolean fixuporacle(struct monst *) NONNULLARG1;
|
||||
static void remove_mon_from_bones(struct monst *) NONNULLARG1;
|
||||
static void set_ghostly_objlist(struct obj *objchain);
|
||||
staticfn boolean no_bones_level(d_level *);
|
||||
staticfn void goodfruit(int);
|
||||
staticfn void resetobjs(struct obj *, boolean);
|
||||
staticfn void give_to_nearby_mon(struct obj *, coordxy, coordxy) NONNULLARG1;
|
||||
staticfn boolean fixuporacle(struct monst *) NONNULLARG1;
|
||||
staticfn void remove_mon_from_bones(struct monst *) NONNULLARG1;
|
||||
staticfn void set_ghostly_objlist(struct obj *objchain);
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
no_bones_level(d_level *lev)
|
||||
{
|
||||
s_level *sptr;
|
||||
@@ -37,7 +37,7 @@ no_bones_level(d_level *lev)
|
||||
* ID is positive instead of negative). This way, when we later save the
|
||||
* chain of fruit types, we know to only save the types that exist.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
goodfruit(int id)
|
||||
{
|
||||
struct fruit *f = fruit_from_indx(-id);
|
||||
@@ -46,7 +46,7 @@ goodfruit(int id)
|
||||
f->fid = id;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
resetobjs(struct obj *ochain, boolean restore)
|
||||
{
|
||||
struct obj *otmp, *nobj;
|
||||
@@ -220,7 +220,7 @@ sanitize_name(char *namebuf)
|
||||
/* Give object to a random object-liking monster on or adjacent to x,y
|
||||
but skipping hero's location.
|
||||
If no such monster, place object on floor at x,y. */
|
||||
static void
|
||||
staticfn void
|
||||
give_to_nearby_mon(struct obj *otmp, coordxy x, coordxy y)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -302,7 +302,7 @@ drop_upon_death(
|
||||
|
||||
/* possibly restore oracle's room and/or put her back inside it; returns
|
||||
False if she's on the wrong level and should be removed, True otherwise */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
fixuporacle(struct monst *oracle)
|
||||
{
|
||||
coord cc;
|
||||
@@ -384,7 +384,7 @@ can_make_bones(void)
|
||||
|
||||
/* monster might need to be removed before saving a bones file,
|
||||
in case these characters are not in their home bases */
|
||||
static void
|
||||
staticfn void
|
||||
remove_mon_from_bones(struct monst *mtmp)
|
||||
{
|
||||
struct permonst *mptr = mtmp->data;
|
||||
@@ -740,7 +740,7 @@ bones_include_name(const char *name)
|
||||
}
|
||||
|
||||
/* set the ghostly bit in a list of objects */
|
||||
static void
|
||||
staticfn void
|
||||
set_ghostly_objlist(struct obj *objchain)
|
||||
{
|
||||
while (objchain) {
|
||||
|
||||
+90
-90
@@ -16,12 +16,12 @@ const char *const enc_stat[] = {
|
||||
"Strained", "Overtaxed", "Overloaded"
|
||||
};
|
||||
|
||||
static const char *rank(void);
|
||||
static void bot_via_windowport(void);
|
||||
static void stat_update_time(void);
|
||||
static char *get_strength_str(void);
|
||||
staticfn const char *rank(void);
|
||||
staticfn void bot_via_windowport(void);
|
||||
staticfn void stat_update_time(void);
|
||||
staticfn char *get_strength_str(void);
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
get_strength_str(void)
|
||||
{
|
||||
static char buf[32];
|
||||
@@ -361,7 +361,7 @@ rank_of(int lev, short monnum, boolean female)
|
||||
return "Player";
|
||||
}
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
rank(void)
|
||||
{
|
||||
return rank_of(u.ulevel, Role_switch, flags.female);
|
||||
@@ -485,52 +485,52 @@ describe_level(
|
||||
#ifdef STATUS_HILITES
|
||||
#endif /* STATUS_HILITES */
|
||||
|
||||
static boolean eval_notify_windowport_field(int, boolean *, int);
|
||||
static void evaluate_and_notify_windowport(boolean *, int);
|
||||
static void init_blstats(void);
|
||||
static int compare_blstats(struct istat_s *, struct istat_s *);
|
||||
static char *anything_to_s(char *, anything *, int);
|
||||
static int percentage(struct istat_s *, struct istat_s *);
|
||||
static int exp_percentage(void);
|
||||
static int QSORTCALLBACK cond_cmp(const genericptr, const genericptr);
|
||||
static int QSORTCALLBACK menualpha_cmp(const genericptr, const genericptr);
|
||||
staticfn boolean eval_notify_windowport_field(int, boolean *, int);
|
||||
staticfn void evaluate_and_notify_windowport(boolean *, int);
|
||||
staticfn void init_blstats(void);
|
||||
staticfn int compare_blstats(struct istat_s *, struct istat_s *);
|
||||
staticfn char *anything_to_s(char *, anything *, int);
|
||||
staticfn int percentage(struct istat_s *, struct istat_s *);
|
||||
staticfn int exp_percentage(void);
|
||||
staticfn int QSORTCALLBACK cond_cmp(const genericptr, const genericptr);
|
||||
staticfn int QSORTCALLBACK menualpha_cmp(const genericptr, const genericptr);
|
||||
|
||||
#ifdef STATUS_HILITES
|
||||
static void s_to_anything(anything *, char *, int);
|
||||
static enum statusfields fldname_to_bl_indx(const char *);
|
||||
static boolean hilite_reset_needed(struct istat_s *, long);
|
||||
static boolean noneoftheabove(const char *);
|
||||
static struct hilite_s *get_hilite(int, int, genericptr_t, int, int, int *);
|
||||
static void split_clridx(int, int *, int *);
|
||||
static boolean is_ltgt_percentnumber(const char *);
|
||||
static boolean has_ltgt_percentnumber(const char *);
|
||||
static int splitsubfields(char *, char ***, int);
|
||||
static boolean is_fld_arrayvalues(const char *, const char *const *, int, int,
|
||||
staticfn void s_to_anything(anything *, char *, int);
|
||||
staticfn enum statusfields fldname_to_bl_indx(const char *);
|
||||
staticfn boolean hilite_reset_needed(struct istat_s *, long);
|
||||
staticfn boolean noneoftheabove(const char *);
|
||||
staticfn struct hilite_s *get_hilite(int, int, genericptr_t, int, int, int *);
|
||||
staticfn void split_clridx(int, int *, int *);
|
||||
staticfn boolean is_ltgt_percentnumber(const char *);
|
||||
staticfn boolean has_ltgt_percentnumber(const char *);
|
||||
staticfn int splitsubfields(char *, char ***, int);
|
||||
staticfn boolean is_fld_arrayvalues(const char *, const char *const *, int, int,
|
||||
int *);
|
||||
static int query_arrayvalue(const char *, const char *const *, int, int);
|
||||
static void status_hilite_add_threshold(int, struct hilite_s *);
|
||||
static boolean parse_status_hl2(char (*)[QBUFSZ], boolean);
|
||||
static unsigned long query_conditions(void);
|
||||
static char *conditionbitmask2str(unsigned long);
|
||||
static unsigned long match_str2conditionbitmask(const char *);
|
||||
static unsigned long str2conditionbitmask(char *);
|
||||
static boolean parse_condition(char (*)[QBUFSZ], int);
|
||||
static char *hlattr2attrname(int, char *, size_t);
|
||||
static void status_hilite_linestr_add(int, struct hilite_s *, unsigned long,
|
||||
staticfn int query_arrayvalue(const char *, const char *const *, int, int);
|
||||
staticfn void status_hilite_add_threshold(int, struct hilite_s *);
|
||||
staticfn boolean parse_status_hl2(char (*)[QBUFSZ], boolean);
|
||||
staticfn unsigned long query_conditions(void);
|
||||
staticfn char *conditionbitmask2str(unsigned long);
|
||||
staticfn unsigned long match_str2conditionbitmask(const char *);
|
||||
staticfn unsigned long str2conditionbitmask(char *);
|
||||
staticfn boolean parse_condition(char (*)[QBUFSZ], int);
|
||||
staticfn char *hlattr2attrname(int, char *, size_t);
|
||||
staticfn void status_hilite_linestr_add(int, struct hilite_s *, unsigned long,
|
||||
const char *);
|
||||
static void status_hilite_linestr_done(void);
|
||||
static int status_hilite_linestr_countfield(int);
|
||||
static void status_hilite_linestr_gather_conditions(void);
|
||||
static void status_hilite_linestr_gather(void);
|
||||
static char *status_hilite2str(struct hilite_s *);
|
||||
static int status_hilite_menu_choose_field(void);
|
||||
static int status_hilite_menu_choose_behavior(int);
|
||||
static int status_hilite_menu_choose_updownboth(int, const char *, boolean,
|
||||
staticfn void status_hilite_linestr_done(void);
|
||||
staticfn int status_hilite_linestr_countfield(int);
|
||||
staticfn void status_hilite_linestr_gather_conditions(void);
|
||||
staticfn void status_hilite_linestr_gather(void);
|
||||
staticfn char *status_hilite2str(struct hilite_s *);
|
||||
staticfn int status_hilite_menu_choose_field(void);
|
||||
staticfn int status_hilite_menu_choose_behavior(int);
|
||||
staticfn int status_hilite_menu_choose_updownboth(int, const char *, boolean,
|
||||
boolean);
|
||||
static boolean status_hilite_menu_add(int);
|
||||
static boolean status_hilite_remove(int);
|
||||
static boolean status_hilite_menu_fld(int);
|
||||
static void status_hilites_viewall(void);
|
||||
staticfn boolean status_hilite_menu_add(int);
|
||||
staticfn boolean status_hilite_remove(int);
|
||||
staticfn boolean status_hilite_menu_fld(int);
|
||||
staticfn void status_hilites_viewall(void);
|
||||
|
||||
#define has_hilite(i) (gb.blstats[0][(i)].thresholds)
|
||||
/* TH_UPDOWN encompasses specific 'up' and 'down' also general 'changed' */
|
||||
@@ -738,7 +738,7 @@ do { \
|
||||
* without STATUS_HILITES.
|
||||
*/
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
bot_via_windowport(void)
|
||||
{
|
||||
char buf[BUFSZ];
|
||||
@@ -1032,7 +1032,7 @@ bot_via_windowport(void)
|
||||
#undef cond_cache_prepA
|
||||
|
||||
/* update just the status lines' 'time' field */
|
||||
static void
|
||||
staticfn void
|
||||
stat_update_time(void)
|
||||
{
|
||||
int idx = gn.now_or_before_idx; /* no 0/1 toggle */
|
||||
@@ -1080,7 +1080,7 @@ condopt(int idx, boolean *addr, boolean negated)
|
||||
}
|
||||
|
||||
/* qsort callback routine for sorting the condition index */
|
||||
static int QSORTCALLBACK
|
||||
staticfn int QSORTCALLBACK
|
||||
cond_cmp(const genericptr vptr1, const genericptr vptr2)
|
||||
{
|
||||
int indx1 = *(int *) vptr1, indx2 = *(int *) vptr2,
|
||||
@@ -1093,7 +1093,7 @@ cond_cmp(const genericptr vptr1, const genericptr vptr2)
|
||||
}
|
||||
|
||||
/* qsort callback routine for alphabetical sorting of index */
|
||||
static int QSORTCALLBACK
|
||||
staticfn int QSORTCALLBACK
|
||||
menualpha_cmp(const genericptr vptr1, const genericptr vptr2)
|
||||
{
|
||||
int indx1 = *(int *) vptr1, indx2 = *(int *) vptr2;
|
||||
@@ -1240,7 +1240,7 @@ opt_next_cond(int indx, char *outbuf)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
eval_notify_windowport_field(
|
||||
int fld,
|
||||
boolean *valsetlist,
|
||||
@@ -1365,7 +1365,7 @@ eval_notify_windowport_field(
|
||||
return updated;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
evaluate_and_notify_windowport(
|
||||
boolean *valsetlist,
|
||||
int idx)
|
||||
@@ -1498,7 +1498,7 @@ status_finish(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
init_blstats(void)
|
||||
{
|
||||
static boolean initalready = FALSE;
|
||||
@@ -1548,7 +1548,7 @@ init_blstats(void)
|
||||
* - for strings, 0 = stayed the same, 1 = changed
|
||||
*
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
compare_blstats(struct istat_s *bl1, struct istat_s *bl2)
|
||||
{
|
||||
anything *a1, *a2;
|
||||
@@ -1621,7 +1621,7 @@ compare_blstats(struct istat_s *bl1, struct istat_s *bl2)
|
||||
return result;
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
anything_to_s(char *buf, anything *a, int anytype)
|
||||
{
|
||||
if (!buf)
|
||||
@@ -1665,7 +1665,7 @@ anything_to_s(char *buf, anything *a, int anytype)
|
||||
}
|
||||
|
||||
#ifdef STATUS_HILITES
|
||||
static void
|
||||
staticfn void
|
||||
s_to_anything(anything *a, char *buf, int anytype)
|
||||
{
|
||||
if (!buf || !a)
|
||||
@@ -1712,7 +1712,7 @@ s_to_anything(anything *a, char *buf, int anytype)
|
||||
#endif /* STATUS_HILITES */
|
||||
|
||||
/* integer percentage is 100 * bl->a / maxbl->a */
|
||||
static int
|
||||
staticfn int
|
||||
percentage(struct istat_s *bl, struct istat_s *maxbl)
|
||||
{
|
||||
int result = 0;
|
||||
@@ -1787,7 +1787,7 @@ percentage(struct istat_s *bl, struct istat_s *maxbl)
|
||||
|
||||
/* percentage for both xp (level) and exp (points) is the percentage for
|
||||
(curr_exp - this_level_start) in (next_level_start - this_level_start) */
|
||||
static int
|
||||
staticfn int
|
||||
exp_percentage(void)
|
||||
{
|
||||
int res = 0;
|
||||
@@ -1943,7 +1943,7 @@ static const char threshold_value[] = "hilite_status threshold ",
|
||||
|
||||
|
||||
/* field name to bottom line index */
|
||||
static enum statusfields
|
||||
staticfn enum statusfields
|
||||
fldname_to_bl_indx(const char *name)
|
||||
{
|
||||
int i, nmatches = 0, fld = 0;
|
||||
@@ -1979,7 +1979,7 @@ fldname_to_bl_indx(const char *name)
|
||||
return (nmatches == 1) ? fld : BL_FLUSH;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
hilite_reset_needed(
|
||||
struct istat_s *bl_p,
|
||||
long augmented_time) /* no longer augmented; it once encoded fractional
|
||||
@@ -2058,7 +2058,7 @@ reset_status_hilites(void)
|
||||
|
||||
/* test whether the text from a title rule matches the string for
|
||||
title-while-polymorphed in the 'textmatch' menu */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
noneoftheabove(const char *hl_text)
|
||||
{
|
||||
if (fuzzymatch(hl_text, "none of the above", "\" -_", TRUE)
|
||||
@@ -2086,7 +2086,7 @@ noneoftheabove(const char *hl_text)
|
||||
* Get back:
|
||||
* pointer to rule that applies; Null if no rule does.
|
||||
*/
|
||||
static struct hilite_s *
|
||||
staticfn struct hilite_s *
|
||||
get_hilite(
|
||||
int idx, int fldidx,
|
||||
genericptr_t vp,
|
||||
@@ -2298,7 +2298,7 @@ get_hilite(
|
||||
#undef has_hilite
|
||||
#undef Is_Temp_Hilite
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
split_clridx(int idx, int *coloridx, int *attrib)
|
||||
{
|
||||
if (coloridx)
|
||||
@@ -2374,7 +2374,7 @@ parse_status_hl1(char *op, boolean from_configfile)
|
||||
}
|
||||
|
||||
/* is str in the format of "[<>]?=?[-+]?[0-9]+%?" regex */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
is_ltgt_percentnumber(const char *str)
|
||||
{
|
||||
const char *s = str;
|
||||
@@ -2395,7 +2395,7 @@ is_ltgt_percentnumber(const char *str)
|
||||
}
|
||||
|
||||
/* does str only contain "<>=-+0-9%" chars */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
has_ltgt_percentnumber(const char *str)
|
||||
{
|
||||
const char *s = str;
|
||||
@@ -2411,7 +2411,7 @@ has_ltgt_percentnumber(const char *str)
|
||||
/* splitsubfields(): splits str in place into '+' or '&' separated strings.
|
||||
* returns number of strings, or -1 if more than maxsf or MAX_SUBFIELDS
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
splitsubfields(char *str, char ***sfarr, int maxsf)
|
||||
{
|
||||
#define MAX_SUBFIELDS 16
|
||||
@@ -2453,7 +2453,7 @@ splitsubfields(char *str, char ***sfarr, int maxsf)
|
||||
#undef MAX_SUBFIELDS
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
is_fld_arrayvalues(
|
||||
const char *str,
|
||||
const char *const *arr,
|
||||
@@ -2470,7 +2470,7 @@ is_fld_arrayvalues(
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
query_arrayvalue(
|
||||
const char *querystr,
|
||||
const char *const *arr,
|
||||
@@ -2505,7 +2505,7 @@ query_arrayvalue(
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
status_hilite_add_threshold(int fld, struct hilite_s *hilite)
|
||||
{
|
||||
struct hilite_s *new_hilite, *old_hilite;
|
||||
@@ -2535,7 +2535,7 @@ status_hilite_add_threshold(int fld, struct hilite_s *hilite)
|
||||
gb.blstats[1][fld].thresholds = gb.blstats[0][fld].thresholds;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
parse_status_hl2(char (*s)[QBUFSZ], boolean from_configfile)
|
||||
{
|
||||
static const char *const aligntxt[] = { "chaotic", "neutral", "lawful" };
|
||||
@@ -2830,7 +2830,7 @@ parse_status_hl2(char (*s)[QBUFSZ], boolean from_configfile)
|
||||
return (successes > 0);
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
staticfn unsigned long
|
||||
query_conditions(void)
|
||||
{
|
||||
int i,res;
|
||||
@@ -2862,7 +2862,7 @@ query_conditions(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
conditionbitmask2str(unsigned long ul)
|
||||
{
|
||||
static char buf[BUFSZ];
|
||||
@@ -2892,7 +2892,7 @@ conditionbitmask2str(unsigned long ul)
|
||||
return buf;
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
staticfn unsigned long
|
||||
match_str2conditionbitmask(const char *str)
|
||||
{
|
||||
int i, nmatches = 0;
|
||||
@@ -2930,7 +2930,7 @@ match_str2conditionbitmask(const char *str)
|
||||
return mask;
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
staticfn unsigned long
|
||||
str2conditionbitmask(char *str)
|
||||
{
|
||||
unsigned long conditions_bitmask = 0UL;
|
||||
@@ -2954,7 +2954,7 @@ str2conditionbitmask(char *str)
|
||||
return conditions_bitmask;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
parse_condition(char (*s)[QBUFSZ], int sidx)
|
||||
{
|
||||
int i;
|
||||
@@ -3090,7 +3090,7 @@ clear_status_hilites(void)
|
||||
}
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
hlattr2attrname(int attrib, char *buf, size_t bufsz)
|
||||
{
|
||||
if (attrib && buf) {
|
||||
@@ -3138,7 +3138,7 @@ struct _status_hilite_line_str {
|
||||
static struct _status_hilite_line_str *status_hilite_str = 0;
|
||||
static int status_hilite_str_id = 0;
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
status_hilite_linestr_add(
|
||||
int fld,
|
||||
struct hilite_s *hl,
|
||||
@@ -3169,7 +3169,7 @@ status_hilite_linestr_add(
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
status_hilite_linestr_done(void)
|
||||
{
|
||||
struct _status_hilite_line_str *nxt, *tmp = status_hilite_str;
|
||||
@@ -3183,7 +3183,7 @@ status_hilite_linestr_done(void)
|
||||
status_hilite_str_id = 0;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
status_hilite_linestr_countfield(int fld)
|
||||
{
|
||||
struct _status_hilite_line_str *tmp;
|
||||
@@ -3209,7 +3209,7 @@ count_status_hilites(void)
|
||||
return count;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
status_hilite_linestr_gather_conditions(void)
|
||||
{
|
||||
int i;
|
||||
@@ -3291,7 +3291,7 @@ status_hilite_linestr_gather_conditions(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
status_hilite_linestr_gather(void)
|
||||
{
|
||||
int i;
|
||||
@@ -3311,7 +3311,7 @@ status_hilite_linestr_gather(void)
|
||||
}
|
||||
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
status_hilite2str(struct hilite_s *hl)
|
||||
{
|
||||
static char buf[BUFSZ];
|
||||
@@ -3393,7 +3393,7 @@ status_hilite2str(struct hilite_s *hl)
|
||||
return buf;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
status_hilite_menu_choose_field(void)
|
||||
{
|
||||
winid tmpwin;
|
||||
@@ -3428,7 +3428,7 @@ status_hilite_menu_choose_field(void)
|
||||
return fld;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
status_hilite_menu_choose_behavior(int fld)
|
||||
{
|
||||
winid tmpwin;
|
||||
@@ -3531,7 +3531,7 @@ status_hilite_menu_choose_behavior(int fld)
|
||||
return beh;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
status_hilite_menu_choose_updownboth(
|
||||
int fld,
|
||||
const char *str,
|
||||
@@ -3610,7 +3610,7 @@ status_hilite_menu_choose_updownboth(
|
||||
return ret;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
status_hilite_menu_add(int origfld)
|
||||
{
|
||||
int fld;
|
||||
@@ -4020,7 +4020,7 @@ status_hilite_menu_add(int origfld)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
status_hilite_remove(int id)
|
||||
{
|
||||
struct _status_hilite_line_str *hlstr = status_hilite_str;
|
||||
@@ -4072,7 +4072,7 @@ status_hilite_remove(int id)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
status_hilite_menu_fld(int fld)
|
||||
{
|
||||
winid tmpwin;
|
||||
@@ -4171,7 +4171,7 @@ status_hilite_menu_fld(int fld)
|
||||
return acted;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
status_hilites_viewall(void)
|
||||
{
|
||||
winid datawin;
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@
|
||||
#define LOCALTIME_type time_t *
|
||||
#endif
|
||||
|
||||
static struct tm *getlt(void);
|
||||
staticfn struct tm *getlt(void);
|
||||
|
||||
time_t
|
||||
getnow(void)
|
||||
@@ -37,7 +37,7 @@ getnow(void)
|
||||
return datetime;
|
||||
}
|
||||
|
||||
static struct tm *
|
||||
staticfn struct tm *
|
||||
getlt(void)
|
||||
{
|
||||
time_t date = getnow();
|
||||
|
||||
@@ -94,53 +94,53 @@ extern int dozap(void); /**/
|
||||
extern int doorganize(void); /**/
|
||||
#endif /* DUMB */
|
||||
|
||||
static int dosuspend_core(void);
|
||||
static int dosh_core(void);
|
||||
static int doherecmdmenu(void);
|
||||
static int dotherecmdmenu(void);
|
||||
static int doprev_message(void);
|
||||
static int timed_occupation(void);
|
||||
static boolean can_do_extcmd(const struct ext_func_tab *);
|
||||
static int dotravel(void);
|
||||
static int dotravel_target(void);
|
||||
static int doclicklook(void);
|
||||
static int domouseaction(void);
|
||||
static int doterrain(void);
|
||||
static boolean u_have_seen_whole_selection(struct selectionvar *);
|
||||
static boolean u_have_seen_bounds_selection(struct selectionvar *);
|
||||
static boolean u_can_see_whole_selection(struct selectionvar *);
|
||||
static int dolookaround_floodfill_findroom(coordxy, coordxy);
|
||||
static void lookaround_known_room(coordxy, coordxy);
|
||||
staticfn int dosuspend_core(void);
|
||||
staticfn int dosh_core(void);
|
||||
staticfn int doherecmdmenu(void);
|
||||
staticfn int dotherecmdmenu(void);
|
||||
staticfn int doprev_message(void);
|
||||
staticfn int timed_occupation(void);
|
||||
staticfn boolean can_do_extcmd(const struct ext_func_tab *);
|
||||
staticfn int dotravel(void);
|
||||
staticfn int dotravel_target(void);
|
||||
staticfn int doclicklook(void);
|
||||
staticfn int domouseaction(void);
|
||||
staticfn int doterrain(void);
|
||||
staticfn boolean u_have_seen_whole_selection(struct selectionvar *);
|
||||
staticfn boolean u_have_seen_bounds_selection(struct selectionvar *);
|
||||
staticfn boolean u_can_see_whole_selection(struct selectionvar *);
|
||||
staticfn int dolookaround_floodfill_findroom(coordxy, coordxy);
|
||||
staticfn void lookaround_known_room(coordxy, coordxy);
|
||||
|
||||
#if defined(__BORLANDC__) && !defined(_WIN32)
|
||||
extern void show_borlandc_stats(winid);
|
||||
#endif
|
||||
static boolean accept_menu_prefix(const struct ext_func_tab *);
|
||||
static void reset_cmd_vars(boolean);
|
||||
staticfn boolean accept_menu_prefix(const struct ext_func_tab *);
|
||||
staticfn void reset_cmd_vars(boolean);
|
||||
|
||||
static void mcmd_addmenu(winid, int, const char *);
|
||||
static int there_cmd_menu_self(winid, coordxy, coordxy, int *);
|
||||
static int there_cmd_menu_next2u(winid, coordxy, coordxy, int, int *);
|
||||
static int there_cmd_menu_far(winid, coordxy, coordxy, int);
|
||||
static int there_cmd_menu_common(winid, coordxy, coordxy, int, int *);
|
||||
static void act_on_act(int, coordxy, coordxy);
|
||||
static char there_cmd_menu(coordxy, coordxy, int);
|
||||
static char here_cmd_menu(void);
|
||||
staticfn void mcmd_addmenu(winid, int, const char *);
|
||||
staticfn int there_cmd_menu_self(winid, coordxy, coordxy, int *);
|
||||
staticfn int there_cmd_menu_next2u(winid, coordxy, coordxy, int, int *);
|
||||
staticfn int there_cmd_menu_far(winid, coordxy, coordxy, int);
|
||||
staticfn int there_cmd_menu_common(winid, coordxy, coordxy, int, int *);
|
||||
staticfn void act_on_act(int, coordxy, coordxy);
|
||||
staticfn char there_cmd_menu(coordxy, coordxy, int);
|
||||
staticfn char here_cmd_menu(void);
|
||||
|
||||
static char readchar_core(coordxy *, coordxy *, int *);
|
||||
static int parse(void);
|
||||
static void show_direction_keys(winid, char, boolean);
|
||||
static boolean help_dir(char, uchar, const char *);
|
||||
staticfn char readchar_core(coordxy *, coordxy *, int *);
|
||||
staticfn int parse(void);
|
||||
staticfn void show_direction_keys(winid, char, boolean);
|
||||
staticfn boolean help_dir(char, uchar, const char *);
|
||||
|
||||
static void handler_rebind_keys_add(boolean);
|
||||
static boolean bind_key_fn(uchar, int (*)(void));
|
||||
static void commands_init(void);
|
||||
static boolean keylist_func_has_key(const struct ext_func_tab *, boolean *);
|
||||
static int keylist_putcmds(winid, boolean, int, int, boolean *);
|
||||
static const char *spkey_name(int);
|
||||
staticfn void handler_rebind_keys_add(boolean);
|
||||
staticfn boolean bind_key_fn(uchar, int (*)(void));
|
||||
staticfn void commands_init(void);
|
||||
staticfn boolean keylist_func_has_key(const struct ext_func_tab *, boolean *);
|
||||
staticfn int keylist_putcmds(winid, boolean, int, int, boolean *);
|
||||
staticfn const char *spkey_name(int);
|
||||
|
||||
static int (*timed_occ_fn)(void);
|
||||
static char *doc_extcmd_flagstr(winid, const struct ext_func_tab *);
|
||||
staticfn int (*timed_occ_fn)(void);
|
||||
staticfn char *doc_extcmd_flagstr(winid, const struct ext_func_tab *);
|
||||
|
||||
static const char *readchar_queue = "";
|
||||
|
||||
@@ -152,7 +152,7 @@ const char unavailcmd[] = "Unavailable command '%s'.";
|
||||
static const char cmdnotavail[] = "'%s' command not available.";
|
||||
|
||||
/* the #prevmsg command */
|
||||
static int
|
||||
staticfn int
|
||||
doprev_message(void)
|
||||
{
|
||||
(void) nh_doprev_message();
|
||||
@@ -160,7 +160,7 @@ doprev_message(void)
|
||||
}
|
||||
|
||||
/* Count down by decrementing multi */
|
||||
static int
|
||||
staticfn int
|
||||
timed_occupation(void)
|
||||
{
|
||||
(*timed_occ_fn)();
|
||||
@@ -439,7 +439,7 @@ extcmd_initiator(void)
|
||||
return gc.Cmd.extcmd_char;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
can_do_extcmd(const struct ext_func_tab *extcmd)
|
||||
{
|
||||
int ecflags = extcmd->flags;
|
||||
@@ -500,7 +500,7 @@ doextcmd(void)
|
||||
}
|
||||
|
||||
/* format extended command flags for display */
|
||||
static char *
|
||||
staticfn char *
|
||||
doc_extcmd_flagstr(
|
||||
winid menuwin,
|
||||
const struct ext_func_tab *efp) /* if Null, add a footnote to the menu */
|
||||
@@ -1067,7 +1067,7 @@ levltyp_to_name(int typ)
|
||||
}
|
||||
|
||||
/* #terrain command -- show known map, inspired by crawl's '|' command */
|
||||
static int
|
||||
staticfn int
|
||||
doterrain(void)
|
||||
{
|
||||
winid men;
|
||||
@@ -1164,7 +1164,7 @@ doterrain(void)
|
||||
}
|
||||
|
||||
/* has hero seen all locations in selection? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
u_have_seen_whole_selection(struct selectionvar *sel)
|
||||
{
|
||||
coordxy x, y;
|
||||
@@ -1182,7 +1182,7 @@ u_have_seen_whole_selection(struct selectionvar *sel)
|
||||
}
|
||||
|
||||
/* has hero seen all location of the rectangular outline in the selection */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
u_have_seen_bounds_selection(struct selectionvar *sel)
|
||||
{
|
||||
coordxy x, y;
|
||||
@@ -1215,7 +1215,7 @@ u_have_seen_bounds_selection(struct selectionvar *sel)
|
||||
}
|
||||
|
||||
/* can hero currently see all locations in the selection */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
u_can_see_whole_selection(struct selectionvar *sel)
|
||||
{
|
||||
coordxy x, y;
|
||||
@@ -1232,7 +1232,7 @@ u_can_see_whole_selection(struct selectionvar *sel)
|
||||
}
|
||||
|
||||
/* selection_floofill callback to get all locations in a room */
|
||||
static int
|
||||
staticfn int
|
||||
dolookaround_floodfill_findroom(coordxy x, coordxy y)
|
||||
{
|
||||
schar typ = levl[x][y].typ;
|
||||
@@ -1245,7 +1245,7 @@ dolookaround_floodfill_findroom(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* describe the room at x,y */
|
||||
static void
|
||||
staticfn void
|
||||
lookaround_known_room(coordxy x, coordxy y)
|
||||
{
|
||||
struct selectionvar *sel = selection_new();
|
||||
@@ -2088,7 +2088,7 @@ get_changed_key_binds(strbuf_t *sbuf)
|
||||
}
|
||||
|
||||
/* interactive key binding */
|
||||
static void
|
||||
staticfn void
|
||||
handler_rebind_keys_add(boolean keyfirst)
|
||||
{
|
||||
struct ext_func_tab *ec;
|
||||
@@ -2403,7 +2403,7 @@ bind_key(uchar key, const char *command)
|
||||
}
|
||||
|
||||
/* bind key by ext cmd function */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
bind_key_fn(uchar key, int (*fn)(void))
|
||||
{
|
||||
struct ext_func_tab *extcmd;
|
||||
@@ -2421,7 +2421,7 @@ bind_key_fn(uchar key, int (*fn)(void))
|
||||
}
|
||||
|
||||
/* initialize all keyboard commands */
|
||||
static void
|
||||
staticfn void
|
||||
commands_init(void)
|
||||
{
|
||||
struct ext_func_tab *extcmd;
|
||||
@@ -2456,7 +2456,7 @@ commands_init(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
keylist_func_has_key(const struct ext_func_tab *extcmd,
|
||||
boolean *skip_keys_used) /* boolean keys_used[256] */
|
||||
{
|
||||
@@ -2472,7 +2472,7 @@ keylist_func_has_key(const struct ext_func_tab *extcmd,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
keylist_putcmds(winid datawin, boolean docount,
|
||||
int incl_flags, int excl_flags,
|
||||
boolean *keys_used) /* boolean keys_used[256] */
|
||||
@@ -2869,7 +2869,7 @@ bind_specialkey(uchar key, const char *command)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
spkey_name(int nhkf)
|
||||
{
|
||||
const char *name = 0;
|
||||
@@ -3137,7 +3137,7 @@ update_rest_on_space(void)
|
||||
/* commands which accept 'm' prefix to request menu operation or other
|
||||
alternate behavior; it's also overloaded for move-without-autopickup;
|
||||
there is no overlap between the two groups of commands */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
accept_menu_prefix(const struct ext_func_tab *ec)
|
||||
{
|
||||
return (ec && ((ec->flags & CMD_M_PREFIX) != 0));
|
||||
@@ -3225,7 +3225,7 @@ rnd_extcmd_idx(void)
|
||||
return rn2(extcmdlist_length + 1) - 1;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
reset_cmd_vars(boolean reset_cmdq)
|
||||
{
|
||||
gc.context.run = 0;
|
||||
@@ -3703,7 +3703,7 @@ getdir(const char *s)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
show_direction_keys(
|
||||
winid win, /* should specify a window which is using a fixed-width font */
|
||||
char centerchar, /* '.' or '@' or ' ' */
|
||||
@@ -3752,7 +3752,7 @@ show_direction_keys(
|
||||
/* explain choices if player has asked for getdir() help or has given
|
||||
an invalid direction after a prefix key ('F', 'g', 'm', &c), which
|
||||
might be bogus but could be up, down, or self when not applicable */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
help_dir(
|
||||
char sym,
|
||||
uchar spkey, /* actual key; either prefix or ESC */
|
||||
@@ -3915,7 +3915,7 @@ isok(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* #herecmdmenu command */
|
||||
static int
|
||||
staticfn int
|
||||
doherecmdmenu(void)
|
||||
{
|
||||
char ch = here_cmd_menu();
|
||||
@@ -3924,7 +3924,7 @@ doherecmdmenu(void)
|
||||
}
|
||||
|
||||
/* #therecmdmenu command, a way to test there_cmd_menu without mouse */
|
||||
static int
|
||||
staticfn int
|
||||
dotherecmdmenu(void)
|
||||
{
|
||||
char ch;
|
||||
@@ -4002,7 +4002,7 @@ enum menucmd {
|
||||
MCMD_TRAVEL,
|
||||
};
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mcmd_addmenu(winid win, int act, const char *txt)
|
||||
{
|
||||
anything any;
|
||||
@@ -4016,7 +4016,7 @@ mcmd_addmenu(winid win, int act, const char *txt)
|
||||
}
|
||||
|
||||
/* command menu entries when targeting self */
|
||||
static int
|
||||
staticfn int
|
||||
there_cmd_menu_self(winid win, coordxy x, coordxy y, int *act UNUSED)
|
||||
{
|
||||
int K = 0;
|
||||
@@ -4105,7 +4105,7 @@ there_cmd_menu_self(winid win, coordxy x, coordxy y, int *act UNUSED)
|
||||
}
|
||||
|
||||
/* add entries to there_cmd_menu, when x,y is next to hero */
|
||||
static int
|
||||
staticfn int
|
||||
there_cmd_menu_next2u(
|
||||
winid win,
|
||||
coordxy x, coordxy y,
|
||||
@@ -4205,7 +4205,7 @@ there_cmd_menu_next2u(
|
||||
return K;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
there_cmd_menu_far(winid win, coordxy x, coordxy y, int mod)
|
||||
{
|
||||
int K = 0;
|
||||
@@ -4220,7 +4220,7 @@ there_cmd_menu_far(winid win, coordxy x, coordxy y, int mod)
|
||||
return K;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
there_cmd_menu_common(
|
||||
winid win,
|
||||
coordxy x, coordxy y,
|
||||
@@ -4239,7 +4239,7 @@ there_cmd_menu_common(
|
||||
}
|
||||
|
||||
/* queue up command(s) to perform #therecmdmenu action */
|
||||
static void
|
||||
staticfn void
|
||||
act_on_act(
|
||||
int act, /* action */
|
||||
coordxy dx, coordxy dy) /* delta to adjacent spot (farther sometimes) */
|
||||
@@ -4424,7 +4424,7 @@ act_on_act(
|
||||
|
||||
/* offer choice of actions to perform at adjacent location <x,y>;
|
||||
a few choices can be farther away */
|
||||
static char
|
||||
staticfn char
|
||||
there_cmd_menu(coordxy x, coordxy y, int mod)
|
||||
{
|
||||
winid win;
|
||||
@@ -4480,7 +4480,7 @@ there_cmd_menu(coordxy x, coordxy y, int mod)
|
||||
return ch;
|
||||
}
|
||||
|
||||
static char
|
||||
staticfn char
|
||||
here_cmd_menu(void)
|
||||
{
|
||||
there_cmd_menu(u.ux, u.uy, CLICK_1);
|
||||
@@ -4497,7 +4497,7 @@ click_to_cmd(coordxy x, coordxy y, int mod)
|
||||
cmdq_add_ec(CQ_CANNED, gc.Cmd.mousebtn[mod-1]->ef_funct);
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
domouseaction(void)
|
||||
{
|
||||
coordxy x, y;
|
||||
@@ -4672,7 +4672,7 @@ get_count(
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
parse(void)
|
||||
{
|
||||
int foo;
|
||||
@@ -4776,7 +4776,7 @@ end_of_input(void)
|
||||
}
|
||||
#endif /* HANGUPHANDLING */
|
||||
|
||||
static char
|
||||
staticfn char
|
||||
readchar_core(coordxy *x, coordxy *y, int *mod)
|
||||
{
|
||||
int sym;
|
||||
@@ -4862,7 +4862,7 @@ readchar_poskey(coordxy *x, coordxy *y, int *mod)
|
||||
}
|
||||
|
||||
/* '_' command, #travel, via keyboard rather than mouse click */
|
||||
static int
|
||||
staticfn int
|
||||
dotravel(void)
|
||||
{
|
||||
coord cc;
|
||||
@@ -4911,7 +4911,7 @@ dotravel(void)
|
||||
}
|
||||
|
||||
/* #retravel, travel to iflags.travelcc, which must be set */
|
||||
static int
|
||||
staticfn int
|
||||
dotravel_target(void)
|
||||
{
|
||||
if (!isok(iflags.travelcc.x, iflags.travelcc.y)) {
|
||||
@@ -4944,7 +4944,7 @@ dotravel_target(void)
|
||||
}
|
||||
|
||||
/* mouse click look command */
|
||||
static int
|
||||
staticfn int
|
||||
doclicklook(void)
|
||||
{
|
||||
if (!isok(gc.clicklook_cc.x, gc.clicklook_cc.y))
|
||||
@@ -5101,7 +5101,7 @@ paranoid_query(boolean be_paranoid, const char *prompt)
|
||||
}
|
||||
|
||||
/* ^Z command, #suspend */
|
||||
static int
|
||||
staticfn int
|
||||
dosuspend_core(void)
|
||||
{
|
||||
#ifdef SUSPEND
|
||||
@@ -5121,7 +5121,7 @@ dosuspend_core(void)
|
||||
}
|
||||
|
||||
/* '!' command, #shell */
|
||||
static int
|
||||
staticfn int
|
||||
dosh_core(void)
|
||||
{
|
||||
#ifdef SHELL
|
||||
|
||||
+28
-28
@@ -19,20 +19,20 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static void get_wall_for_db(coordxy *, coordxy *);
|
||||
static struct entity *e_at(coordxy, coordxy);
|
||||
static void m_to_e(struct monst *, coordxy, coordxy, struct entity *);
|
||||
static void u_to_e(struct entity *);
|
||||
static void set_entity(coordxy, coordxy, struct entity *);
|
||||
static const char *e_nam(struct entity *);
|
||||
static const char *E_phrase(struct entity *, const char *);
|
||||
static boolean e_survives_at(struct entity *, coordxy, coordxy);
|
||||
static void e_died(struct entity *, int, int);
|
||||
static boolean automiss(struct entity *);
|
||||
static boolean e_missed(struct entity *, boolean);
|
||||
static boolean e_jumps(struct entity *);
|
||||
static void do_entity(struct entity *);
|
||||
static void nokiller(void);
|
||||
staticfn void get_wall_for_db(coordxy *, coordxy *);
|
||||
staticfn struct entity *e_at(coordxy, coordxy);
|
||||
staticfn void m_to_e(struct monst *, coordxy, coordxy, struct entity *);
|
||||
staticfn void u_to_e(struct entity *);
|
||||
staticfn void set_entity(coordxy, coordxy, struct entity *);
|
||||
staticfn const char *e_nam(struct entity *);
|
||||
staticfn const char *E_phrase(struct entity *, const char *);
|
||||
staticfn boolean e_survives_at(struct entity *, coordxy, coordxy);
|
||||
staticfn void e_died(struct entity *, int, int);
|
||||
staticfn boolean automiss(struct entity *);
|
||||
staticfn boolean e_missed(struct entity *, boolean);
|
||||
staticfn boolean e_jumps(struct entity *);
|
||||
staticfn void do_entity(struct entity *);
|
||||
staticfn void nokiller(void);
|
||||
|
||||
boolean
|
||||
is_waterwall(coordxy x, coordxy y)
|
||||
@@ -205,7 +205,7 @@ find_drawbridge(coordxy *x, coordxy *y)
|
||||
/*
|
||||
* Find the drawbridge wall associated with a drawbridge.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
get_wall_for_db(coordxy *x, coordxy *y)
|
||||
{
|
||||
switch (levl[*x][*y].drawbridgemask & DB_DIR) {
|
||||
@@ -279,7 +279,7 @@ create_drawbridge(coordxy x, coordxy y, int dir, boolean flag)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static struct entity *
|
||||
staticfn struct entity *
|
||||
e_at(coordxy x, coordxy y)
|
||||
{
|
||||
int entitycnt;
|
||||
@@ -296,7 +296,7 @@ e_at(coordxy x, coordxy y)
|
||||
: &(go.occupants[entitycnt]);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
m_to_e(struct monst *mtmp, coordxy x, coordxy y, struct entity *etmp)
|
||||
{
|
||||
etmp->emon = mtmp;
|
||||
@@ -313,7 +313,7 @@ m_to_e(struct monst *mtmp, coordxy x, coordxy y, struct entity *etmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
u_to_e(struct entity *etmp)
|
||||
{
|
||||
etmp->emon = &gy.youmonst;
|
||||
@@ -322,7 +322,7 @@ u_to_e(struct entity *etmp)
|
||||
etmp->edata = gy.youmonst.data;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
set_entity(
|
||||
coordxy x, coordxy y, /* location of span or portcullis */
|
||||
struct entity *etmp) /* pointer to occupants[0] or occupants[1] */
|
||||
@@ -343,7 +343,7 @@ set_entity(
|
||||
|
||||
/* #define e_strg(etmp, func) (is_u(etmp) ? (char *) 0 : func(etmp->emon)) */
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
e_nam(struct entity *etmp)
|
||||
{
|
||||
return is_u(etmp) ? "you" : mon_nam(etmp->emon);
|
||||
@@ -353,7 +353,7 @@ e_nam(struct entity *etmp)
|
||||
* Generates capitalized entity name, makes 2nd -> 3rd person conversion on
|
||||
* verb, where necessary.
|
||||
*/
|
||||
static const char *
|
||||
staticfn const char *
|
||||
E_phrase(struct entity *etmp, const char *verb)
|
||||
{
|
||||
static char wholebuf[80];
|
||||
@@ -372,7 +372,7 @@ E_phrase(struct entity *etmp, const char *verb)
|
||||
/*
|
||||
* Simple-minded "can it be here?" routine
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
e_survives_at(struct entity *etmp, coordxy x, coordxy y)
|
||||
{
|
||||
if (noncorporeal(etmp->edata))
|
||||
@@ -394,7 +394,7 @@ e_survives_at(struct entity *etmp, coordxy x, coordxy y)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
e_died(struct entity *etmp, int xkill_flags, int how)
|
||||
{
|
||||
if (is_u(etmp)) {
|
||||
@@ -456,7 +456,7 @@ e_died(struct entity *etmp, int xkill_flags, int how)
|
||||
/*
|
||||
* These are never directly affected by a bridge or portcullis.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
automiss(struct entity *etmp)
|
||||
{
|
||||
return (boolean) ((is_u(etmp) ? Passes_walls : passes_walls(etmp->edata))
|
||||
@@ -466,7 +466,7 @@ automiss(struct entity *etmp)
|
||||
/*
|
||||
* Does falling drawbridge or portcullis miss etmp?
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
e_missed(struct entity *etmp, boolean chunks)
|
||||
{
|
||||
int misses;
|
||||
@@ -501,7 +501,7 @@ e_missed(struct entity *etmp, boolean chunks)
|
||||
/*
|
||||
* Can etmp jump from death?
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
e_jumps(struct entity *etmp)
|
||||
{
|
||||
int tmp = 4; /* out of 10 */
|
||||
@@ -524,7 +524,7 @@ e_jumps(struct entity *etmp)
|
||||
return (tmp >= rnd(10)) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
do_entity(struct entity *etmp)
|
||||
{
|
||||
coordxy newx, newy, oldx, oldy;
|
||||
@@ -733,7 +733,7 @@ do_entity(struct entity *etmp)
|
||||
}
|
||||
|
||||
/* clear stale reason for death and both 'entities' before returning */
|
||||
static void
|
||||
staticfn void
|
||||
nokiller(void)
|
||||
{
|
||||
gk.killer.name[0] = '\0';
|
||||
|
||||
+32
-32
@@ -11,22 +11,22 @@
|
||||
#include "hack.h"
|
||||
#include "artifact.h"
|
||||
|
||||
static boolean unconstrain_map(void);
|
||||
static void reconstrain_map(void);
|
||||
static void map_redisplay(void);
|
||||
static void browse_map(unsigned, const char *);
|
||||
static void map_monst(struct monst *, boolean);
|
||||
static void do_dknown_of(struct obj *);
|
||||
static boolean check_map_spot(coordxy, coordxy, char, unsigned);
|
||||
static boolean clear_stale_map(char, unsigned);
|
||||
static void sense_trap(struct trap *, coordxy, coordxy, int);
|
||||
static int detect_obj_traps(struct obj *, boolean, int);
|
||||
static void display_trap_map(int);
|
||||
static int furniture_detect(void);
|
||||
static void findone(coordxy, coordxy, genericptr_t);
|
||||
static void openone(coordxy, coordxy, genericptr_t);
|
||||
static int mfind0(struct monst *, boolean);
|
||||
static int reveal_terrain_getglyph(coordxy, coordxy, unsigned, int, unsigned);
|
||||
staticfn boolean unconstrain_map(void);
|
||||
staticfn void reconstrain_map(void);
|
||||
staticfn void map_redisplay(void);
|
||||
staticfn void browse_map(unsigned, const char *);
|
||||
staticfn void map_monst(struct monst *, boolean);
|
||||
staticfn void do_dknown_of(struct obj *);
|
||||
staticfn boolean check_map_spot(coordxy, coordxy, char, unsigned);
|
||||
staticfn boolean clear_stale_map(char, unsigned);
|
||||
staticfn void sense_trap(struct trap *, coordxy, coordxy, int);
|
||||
staticfn int detect_obj_traps(struct obj *, boolean, int);
|
||||
staticfn void display_trap_map(int);
|
||||
staticfn int furniture_detect(void);
|
||||
staticfn void findone(coordxy, coordxy, genericptr_t);
|
||||
staticfn void openone(coordxy, coordxy, genericptr_t);
|
||||
staticfn int mfind0(struct monst *, boolean);
|
||||
staticfn int reveal_terrain_getglyph(coordxy, coordxy, unsigned, int, unsigned);
|
||||
|
||||
/* dummytrap: used when detecting traps finds a door or chest trap; the
|
||||
couple of fields that matter are always re-initialized during use so
|
||||
@@ -51,7 +51,7 @@ struct found_things {
|
||||
|
||||
/* bring hero out from underwater or underground or being engulfed;
|
||||
return True iff any change occurred */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
unconstrain_map(void)
|
||||
{
|
||||
boolean res = u.uinwater || u.uburied || u.uswallow;
|
||||
@@ -66,7 +66,7 @@ unconstrain_map(void)
|
||||
}
|
||||
|
||||
/* put hero back underwater or underground or engulfed */
|
||||
static void
|
||||
staticfn void
|
||||
reconstrain_map(void)
|
||||
{
|
||||
/* if was in water and taken out, put back; bypass set_uinwater() */
|
||||
@@ -75,7 +75,7 @@ reconstrain_map(void)
|
||||
u.uswallow = iflags.save_uswallow, iflags.save_uswallow = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
map_redisplay(void)
|
||||
{
|
||||
reconstrain_map();
|
||||
@@ -87,7 +87,7 @@ map_redisplay(void)
|
||||
}
|
||||
|
||||
/* use getpos()'s 'autodescribe' to view whatever is currently shown on map */
|
||||
static void
|
||||
staticfn void
|
||||
browse_map(unsigned ter_typ, const char *ter_explain)
|
||||
{
|
||||
coord dummy_pos; /* don't care whether player actually picks a spot */
|
||||
@@ -103,7 +103,7 @@ browse_map(unsigned ter_typ, const char *ter_explain)
|
||||
}
|
||||
|
||||
/* extracted from monster_detection() so can be shared by do_vicinity_map() */
|
||||
static void
|
||||
staticfn void
|
||||
map_monst(struct monst *mtmp, boolean showtail)
|
||||
{
|
||||
int glyph = (monsym(mtmp->data) == ' ')
|
||||
@@ -230,7 +230,7 @@ o_material(struct obj *obj, unsigned material)
|
||||
return (struct obj *) 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
do_dknown_of(struct obj *obj)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -243,7 +243,7 @@ do_dknown_of(struct obj *obj)
|
||||
}
|
||||
|
||||
/* Check whether the location has an outdated object displayed on it. */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
check_map_spot(coordxy x, coordxy y, char oclass, unsigned material)
|
||||
{
|
||||
int glyph;
|
||||
@@ -297,7 +297,7 @@ check_map_spot(coordxy x, coordxy y, char oclass, unsigned material)
|
||||
* reappear after the detection has completed. Return true if noticeable
|
||||
* change occurs.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
clear_stale_map(char oclass, unsigned material)
|
||||
{
|
||||
coordxy zx, zy;
|
||||
@@ -844,7 +844,7 @@ monster_detect(struct obj *otmp, /* detecting object (if any) */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
sense_trap(struct trap *trap, coordxy x, coordxy y, int src_cursed)
|
||||
{
|
||||
if (Hallucination || src_cursed) {
|
||||
@@ -886,7 +886,7 @@ sense_trap(struct trap *trap, coordxy x, coordxy y, int src_cursed)
|
||||
/* check a list of objects for chest traps; return 1 if found at <ux,uy>,
|
||||
2 if found at some other spot, 3 if both, 0 otherwise; optionally
|
||||
update the map to show where such traps were found */
|
||||
static int
|
||||
staticfn int
|
||||
detect_obj_traps(
|
||||
struct obj *objlist,
|
||||
boolean show_them,
|
||||
@@ -917,7 +917,7 @@ detect_obj_traps(
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
display_trap_map(int cursed_src)
|
||||
{
|
||||
struct monst *mon;
|
||||
@@ -1051,7 +1051,7 @@ trap_detect(
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
furniture_detect(void)
|
||||
{
|
||||
struct monst *mon;
|
||||
@@ -1563,7 +1563,7 @@ cvt_sdoor_to_door(struct rm *lev)
|
||||
|
||||
/* find something at one location; it should find all somethings there
|
||||
since it is used for magical detection rather than physical searching */
|
||||
static void
|
||||
staticfn void
|
||||
findone(coordxy zx, coordxy zy, genericptr_t whatfound)
|
||||
{
|
||||
struct trap *ttmp;
|
||||
@@ -1624,7 +1624,7 @@ findone(coordxy zx, coordxy zy, genericptr_t whatfound)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
openone(coordxy zx, coordxy zy, genericptr_t num)
|
||||
{
|
||||
struct trap *ttmp;
|
||||
@@ -1831,7 +1831,7 @@ find_trap(struct trap *trap)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
mfind0(struct monst *mtmp, boolean via_warning)
|
||||
{
|
||||
coordxy x = mtmp->mx, y = mtmp->my;
|
||||
@@ -2015,7 +2015,7 @@ premap_detect(void)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
reveal_terrain_getglyph(
|
||||
coordxy x, coordxy y,
|
||||
unsigned swallowed,
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static boolean rm_waslit(void);
|
||||
static void mkcavepos(coordxy, coordxy, int, boolean, boolean);
|
||||
static void mkcavearea(boolean);
|
||||
static boolean pick_can_reach(struct obj *, coordxy, coordxy) NONNULLARG1;
|
||||
static int dig(void);
|
||||
static void dig_up_grave(coord *);
|
||||
static boolean watchman_canseeu(struct monst *) NONNULLARG1;
|
||||
static int adj_pit_checks(coord *, char *) NONNULLARG2;
|
||||
static void pit_flow(struct trap *, schar);
|
||||
static boolean furniture_handled(coordxy, coordxy, boolean);
|
||||
staticfn boolean rm_waslit(void);
|
||||
staticfn void mkcavepos(coordxy, coordxy, int, boolean, boolean);
|
||||
staticfn void mkcavearea(boolean);
|
||||
staticfn boolean pick_can_reach(struct obj *, coordxy, coordxy) NONNULLARG1;
|
||||
staticfn int dig(void);
|
||||
staticfn void dig_up_grave(coord *);
|
||||
staticfn boolean watchman_canseeu(struct monst *) NONNULLARG1;
|
||||
staticfn int adj_pit_checks(coord *, char *) NONNULLARG2;
|
||||
staticfn void pit_flow(struct trap *, schar);
|
||||
staticfn boolean furniture_handled(coordxy, coordxy, boolean);
|
||||
|
||||
/* Indices returned by dig_typ() */
|
||||
enum dig_types {
|
||||
@@ -26,7 +26,7 @@ enum dig_types {
|
||||
DIGTYP_TREE
|
||||
};
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
rm_waslit(void)
|
||||
{
|
||||
coordxy x, y;
|
||||
@@ -44,7 +44,7 @@ rm_waslit(void)
|
||||
* boulders in the name of a nice effect. Vision will get fixed up again
|
||||
* immediately after the effect is complete.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
mkcavepos(coordxy x, coordxy y, int dist, boolean waslit, boolean rockit)
|
||||
{
|
||||
struct rm *lev;
|
||||
@@ -84,7 +84,7 @@ mkcavepos(coordxy x, coordxy y, int dist, boolean waslit, boolean rockit)
|
||||
feel_newsym(x, y);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mkcavearea(boolean rockit)
|
||||
{
|
||||
int dist;
|
||||
@@ -137,7 +137,7 @@ mkcavearea(boolean rockit)
|
||||
}
|
||||
|
||||
/* called when attempting to break a statue or boulder with a pick */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
pick_can_reach(struct obj *pick, coordxy x, coordxy y)
|
||||
{
|
||||
struct trap *t = t_at(x, y);
|
||||
@@ -260,7 +260,7 @@ dig_check(struct monst *madeby, boolean verbose, coordxy x, coordxy y)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
dig(void)
|
||||
{
|
||||
struct rm *lev;
|
||||
@@ -518,7 +518,7 @@ dig(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
furniture_handled(coordxy x, coordxy y, boolean madeby_u)
|
||||
{
|
||||
struct rm *lev = &levl[x][y];
|
||||
@@ -963,7 +963,7 @@ dighole(boolean pit_only, boolean by_magic, coord *cc)
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dig_up_grave(coord *cc)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -1296,7 +1296,7 @@ use_pick_axe2(struct obj *obj)
|
||||
return ECMD_TIME;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
watchman_canseeu(struct monst *mtmp)
|
||||
{
|
||||
if (is_watch(mtmp->data) && mtmp->mcansee && m_canseeu(mtmp)
|
||||
@@ -1696,7 +1696,7 @@ zap_dig(void)
|
||||
* you're zapping a wand of digging laterally while
|
||||
* down in the pit.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
adj_pit_checks(coord *cc, char *msg)
|
||||
{
|
||||
int ltyp;
|
||||
@@ -1777,7 +1777,7 @@ adj_pit_checks(coord *cc, char *msg)
|
||||
/*
|
||||
* Ensure that all conjoined pits fill up.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
pit_flow(struct trap *trap, schar filltyp)
|
||||
{
|
||||
/*
|
||||
|
||||
+41
-41
@@ -123,32 +123,32 @@
|
||||
*/
|
||||
#include "hack.h"
|
||||
|
||||
static void show_mon_or_warn(coordxy, coordxy, int);
|
||||
static void display_monster(coordxy, coordxy,
|
||||
staticfn void show_mon_or_warn(coordxy, coordxy, int);
|
||||
staticfn void display_monster(coordxy, coordxy,
|
||||
struct monst *, int, boolean) NONNULLPTRS;
|
||||
static int swallow_to_glyph(int, int);
|
||||
static void display_warning(struct monst *) NONNULLARG1;
|
||||
static boolean next_to_gas(struct monst *, coordxy, coordxy) NONNULLARG1;
|
||||
staticfn int swallow_to_glyph(int, int);
|
||||
staticfn void display_warning(struct monst *) NONNULLARG1;
|
||||
staticfn boolean next_to_gas(struct monst *, coordxy, coordxy) NONNULLARG1;
|
||||
|
||||
static int check_pos(coordxy, coordxy, int);
|
||||
static void get_bkglyph_and_framecolor(coordxy x, coordxy y, int *, uint32 *);
|
||||
static int tether_glyph(coordxy, coordxy);
|
||||
static void mimic_light_blocking(struct monst *) NONNULLARG1;
|
||||
staticfn int check_pos(coordxy, coordxy, int);
|
||||
staticfn void get_bkglyph_and_framecolor(coordxy x, coordxy y, int *, uint32 *);
|
||||
staticfn int tether_glyph(coordxy, coordxy);
|
||||
staticfn void mimic_light_blocking(struct monst *) NONNULLARG1;
|
||||
|
||||
/*#define WA_VERBOSE*/ /* give (x,y) locations for all "bad" spots */
|
||||
#ifdef WA_VERBOSE
|
||||
static boolean more_than_one(coordxy, coordxy, coordxy, coordxy, coordxy);
|
||||
staticfn boolean more_than_one(coordxy, coordxy, coordxy, coordxy, coordxy);
|
||||
#endif
|
||||
|
||||
static int set_twall(coordxy, coordxy, coordxy, coordxy,
|
||||
staticfn int set_twall(coordxy, coordxy, coordxy, coordxy,
|
||||
coordxy, coordxy, coordxy, coordxy);
|
||||
static int set_wall(coordxy, coordxy, int);
|
||||
static int set_corn(coordxy, coordxy, coordxy, coordxy,
|
||||
staticfn int set_wall(coordxy, coordxy, int);
|
||||
staticfn int set_corn(coordxy, coordxy, coordxy, coordxy,
|
||||
coordxy, coordxy, coordxy, coordxy);
|
||||
static int set_crosswall(coordxy, coordxy);
|
||||
static void set_seenv(struct rm *, coordxy, coordxy, coordxy, coordxy);
|
||||
static void t_warn(struct rm *);
|
||||
static int wall_angle(struct rm *);
|
||||
staticfn int set_crosswall(coordxy, coordxy);
|
||||
staticfn void set_seenv(struct rm *, coordxy, coordxy, coordxy, coordxy);
|
||||
staticfn void t_warn(struct rm *);
|
||||
staticfn int wall_angle(struct rm *);
|
||||
|
||||
#define _glyph_at(x, y) gg.gbuf[y][x].glyphinfo.glyph
|
||||
|
||||
@@ -468,7 +468,7 @@ map_location(coordxy x, coordxy y, int show)
|
||||
}
|
||||
|
||||
/* display something on monster layer; may need to fixup object layer */
|
||||
static void
|
||||
staticfn void
|
||||
show_mon_or_warn(coordxy x, coordxy y, int monglyph)
|
||||
{
|
||||
struct obj *o;
|
||||
@@ -500,7 +500,7 @@ show_mon_or_warn(coordxy x, coordxy y, int monglyph)
|
||||
* a worm tail.
|
||||
*
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
display_monster(
|
||||
coordxy x, coordxy y, /* display position */
|
||||
struct monst *mon, /* monster to display */
|
||||
@@ -619,7 +619,7 @@ display_monster(
|
||||
*
|
||||
* Do not call for worm tails.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
display_warning(struct monst *mon)
|
||||
{
|
||||
coordxy x = mon->mx, y = mon->my;
|
||||
@@ -653,7 +653,7 @@ warning_of(struct monst *mon)
|
||||
|
||||
/* returns True if mon is adjacent and would be seen if vision wasn't
|
||||
blocked by being in a gas cloud (implicit; caller has already checked) */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
next_to_gas(
|
||||
struct monst *mon,
|
||||
coordxy mx, coordxy my) /* won't match mon->mx,my if long worm's tail */
|
||||
@@ -1072,7 +1072,7 @@ shieldeff(coordxy x, coordxy y)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
tether_glyph(coordxy x, coordxy y)
|
||||
{
|
||||
int tdx, tdy;
|
||||
@@ -1473,7 +1473,7 @@ see_monsters(void)
|
||||
newsym(u.ux, u.uy);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mimic_light_blocking(struct monst *mtmp)
|
||||
{
|
||||
if (mtmp->minvis && is_lightblocker_mappear(mtmp)) {
|
||||
@@ -1583,7 +1583,7 @@ static glyph_info no_ginfo = {
|
||||
: &gg.gbuf[(y)][(x)].glyphinfo)
|
||||
#else
|
||||
static glyph_info ginfo;
|
||||
static glyph_info *glyphinfo_at(coordxy, coordxy, int);
|
||||
staticfn glyph_info *glyphinfo_at(coordxy, coordxy, int);
|
||||
#define Glyphinfo_at(x, y, glyph) glyphinfo_at((x), (y), (glyph))
|
||||
#endif
|
||||
|
||||
@@ -2343,7 +2343,7 @@ back_to_glyph(coordxy x, coordxy y)
|
||||
* If you don't want a patchwork monster while hallucinating, decide on
|
||||
* a random monster in swallowed() and don't use what_mon() here.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
swallow_to_glyph(int mnum, int loc)
|
||||
{
|
||||
int m_3 = what_mon(mnum, rn2_on_display_rng) << 3;
|
||||
@@ -2413,7 +2413,7 @@ glyphinfo_at(coordxy x, coordxy y, int glyph)
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
get_bkglyph_and_framecolor(
|
||||
coordxy x, coordxy y,
|
||||
int *bkglyph,
|
||||
@@ -2609,9 +2609,9 @@ int wallcolors[sokoban_walls + 1] = {
|
||||
&& gl.level.objects[(x)][(y)]->nexthere)
|
||||
#endif
|
||||
|
||||
static int cmap_to_roguecolor(int);
|
||||
staticfn int cmap_to_roguecolor(int);
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
cmap_to_roguecolor(int cmap)
|
||||
{
|
||||
int color = NO_COLOR;
|
||||
@@ -3006,8 +3006,8 @@ reset_glyphmap(enum glyphmap_change_triggers trigger)
|
||||
|
||||
#ifdef WA_VERBOSE
|
||||
|
||||
static const char *type_to_name(int);
|
||||
static void error4(coordxy, coordxy, int, int, int, int);
|
||||
staticfn const char *type_to_name(int);
|
||||
staticfn void error4(coordxy, coordxy, int, int, int, int);
|
||||
|
||||
static int bad_count[MAX_TYPE]; /* count of positions flagged as bad */
|
||||
static const char *const type_names[MAX_TYPE] = {
|
||||
@@ -3020,13 +3020,13 @@ static const char *const type_names[MAX_TYPE] = {
|
||||
"CLOUD"
|
||||
};
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
type_to_name(int type)
|
||||
{
|
||||
return (type < 0 || type >= MAX_TYPE) ? "unknown" : type_names[type];
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
error4(coordxy x, coordxy y, int a, int b, int c, int dd)
|
||||
{
|
||||
pline("set_wall_state: %s @ (%d,%d) %s%s%s%s",
|
||||
@@ -3042,7 +3042,7 @@ error4(coordxy x, coordxy y, int a, int b, int c, int dd)
|
||||
*
|
||||
* Things that are ambiguous: lava
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
check_pos(coordxy x, coordxy y, int which)
|
||||
{
|
||||
int type;
|
||||
@@ -3058,7 +3058,7 @@ check_pos(coordxy x, coordxy y, int which)
|
||||
/* Return TRUE if more than one is non-zero. */
|
||||
/*ARGSUSED*/
|
||||
#ifdef WA_VERBOSE
|
||||
static boolean
|
||||
staticfn boolean
|
||||
more_than_one(coordxy x, coordxy y, coordxy a, coordxy b, coordxy c)
|
||||
{
|
||||
if ((a && (b | c)) || (b && (a | c)) || (c && (a | b))) {
|
||||
@@ -3073,7 +3073,7 @@ more_than_one(coordxy x, coordxy y, coordxy a, coordxy b, coordxy c)
|
||||
#endif
|
||||
|
||||
/* Return the wall mode for a T wall. */
|
||||
static int
|
||||
staticfn int
|
||||
set_twall(
|
||||
#ifdef WA_VERBOSE
|
||||
coordxy x0, coordxy y0, /* used #if WA_VERBOSE */
|
||||
@@ -3096,7 +3096,7 @@ set_twall(
|
||||
}
|
||||
|
||||
/* Return wall mode for a horizontal or vertical wall. */
|
||||
static int
|
||||
staticfn int
|
||||
set_wall(coordxy x, coordxy y, int horiz)
|
||||
{
|
||||
int wmode, is_1, is_2;
|
||||
@@ -3117,7 +3117,7 @@ set_wall(coordxy x, coordxy y, int horiz)
|
||||
}
|
||||
|
||||
/* Return a wall mode for a corner wall. (x4,y4) is the "inner" position. */
|
||||
static int
|
||||
staticfn int
|
||||
set_corn(coordxy x1, coordxy y1, coordxy x2, coordxy y2, coordxy x3, coordxy y3, coordxy x4, coordxy y4)
|
||||
{
|
||||
coordxy wmode, is_1, is_2, is_3, is_4;
|
||||
@@ -3145,7 +3145,7 @@ set_corn(coordxy x1, coordxy y1, coordxy x2, coordxy y2, coordxy x3, coordxy y3,
|
||||
}
|
||||
|
||||
/* Return mode for a crosswall. */
|
||||
static int
|
||||
staticfn int
|
||||
set_crosswall(coordxy x, coordxy y)
|
||||
{
|
||||
coordxy wmode, is_1, is_2, is_3, is_4;
|
||||
@@ -3274,7 +3274,7 @@ const seenV seenv_matrix[3][3] = {
|
||||
#define sign(z) ((z) < 0 ? -1 : ((z) != 0))
|
||||
|
||||
/* Set the seen vector of lev as if seen from (x0,y0) to (x,y). */
|
||||
static void
|
||||
staticfn void
|
||||
set_seenv(
|
||||
struct rm *lev,
|
||||
coordxy x0, coordxy y0, /* from */
|
||||
@@ -3358,7 +3358,7 @@ static const int cross_matrix[4][6] = {
|
||||
};
|
||||
|
||||
/* Print out a T wall warning and all interesting info. */
|
||||
static void
|
||||
staticfn void
|
||||
t_warn(struct rm *lev)
|
||||
{
|
||||
static const char warn_str[] = "wall_angle: %s: case %d: seenv = 0x%x";
|
||||
@@ -3418,7 +3418,7 @@ t_warn(struct rm *lev)
|
||||
* draw diagrams. See rm.h for more details on the wall modes and
|
||||
* seen vector (SV).
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
wall_angle(struct rm *lev)
|
||||
{
|
||||
unsigned int seenv = lev->seenv & 0xff;
|
||||
|
||||
@@ -59,20 +59,20 @@ extern unsigned FITSuint_(unsigned long long, const char *, int);
|
||||
*/
|
||||
|
||||
#define MAX_LIBS 4
|
||||
static library dlb_libs[MAX_LIBS];
|
||||
staticfn library dlb_libs[MAX_LIBS];
|
||||
|
||||
static boolean readlibdir(library * lp);
|
||||
static boolean find_file(const char *name, library **lib, long *startp,
|
||||
staticfn boolean readlibdir(library * lp);
|
||||
staticfn boolean find_file(const char *name, library **lib, long *startp,
|
||||
long *sizep);
|
||||
static boolean lib_dlb_init(void);
|
||||
static void lib_dlb_cleanup(void);
|
||||
static boolean lib_dlb_fopen(dlb *, const char *, const char *);
|
||||
static int lib_dlb_fclose(dlb *);
|
||||
static int lib_dlb_fread(char *, int, int, dlb *);
|
||||
static int lib_dlb_fseek(dlb *, long, int);
|
||||
static char *lib_dlb_fgets(char *, int, dlb *);
|
||||
static int lib_dlb_fgetc(dlb *);
|
||||
static long lib_dlb_ftell(dlb *);
|
||||
staticfn boolean lib_dlb_init(void);
|
||||
staticfn void lib_dlb_cleanup(void);
|
||||
staticfn boolean lib_dlb_fopen(dlb *, const char *, const char *);
|
||||
staticfn int lib_dlb_fclose(dlb *);
|
||||
staticfn int lib_dlb_fread(char *, int, int, dlb *);
|
||||
staticfn int lib_dlb_fseek(dlb *, long, int);
|
||||
staticfn char *lib_dlb_fgets(char *, int, dlb *);
|
||||
staticfn int lib_dlb_fgetc(dlb *);
|
||||
staticfn long lib_dlb_ftell(dlb *);
|
||||
|
||||
/* not static because shared with dlb_main.c */
|
||||
boolean open_library(const char *lib_name, library *lp);
|
||||
@@ -123,7 +123,7 @@ extern char *eos(char *);
|
||||
*
|
||||
* Return TRUE on success, FALSE on failure.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
readlibdir(library *lp) /* library pointer to fill in */
|
||||
{
|
||||
int i;
|
||||
@@ -171,7 +171,7 @@ readlibdir(library *lp) /* library pointer to fill in */
|
||||
* Look for the file in our directory structure. Return 1 if successful,
|
||||
* 0 if not found. Fill in the size and starting position.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
find_file(const char *name, library **lib, long *startp, long *sizep)
|
||||
{
|
||||
int i, j;
|
||||
@@ -228,7 +228,7 @@ close_library(library *lp)
|
||||
* Open the library file once using stdio. Keep it open, but
|
||||
* keep track of the file position.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
lib_dlb_init(void)
|
||||
{
|
||||
/* zero out array */
|
||||
@@ -248,7 +248,7 @@ lib_dlb_init(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
lib_dlb_cleanup(void)
|
||||
{
|
||||
int i;
|
||||
@@ -269,7 +269,7 @@ build_dlb_filename(const char *lf)
|
||||
#endif
|
||||
|
||||
/*ARGSUSED*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
lib_dlb_fopen(dlb *dp, const char *name, const char *mode UNUSED)
|
||||
{
|
||||
long start, size;
|
||||
@@ -288,14 +288,14 @@ lib_dlb_fopen(dlb *dp, const char *name, const char *mode UNUSED)
|
||||
}
|
||||
|
||||
/*ARGUSED*/
|
||||
static int
|
||||
staticfn int
|
||||
lib_dlb_fclose(dlb *dp UNUSED)
|
||||
{
|
||||
/* nothing needs to be done */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
lib_dlb_fread(char *buf, int size, int quan, dlb *dp)
|
||||
{
|
||||
long pos, nread, nbytes;
|
||||
@@ -320,7 +320,7 @@ lib_dlb_fread(char *buf, int size, int quan, dlb *dp)
|
||||
return (int) nread;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
lib_dlb_fseek(dlb *dp, long pos, int whence)
|
||||
{
|
||||
long curpos;
|
||||
@@ -345,7 +345,7 @@ lib_dlb_fseek(dlb *dp, long pos, int whence)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
lib_dlb_fgets(char *buf, int len, dlb *dp)
|
||||
{
|
||||
int i;
|
||||
@@ -377,7 +377,7 @@ lib_dlb_fgets(char *buf, int len, dlb *dp)
|
||||
return buf;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
lib_dlb_fgetc(dlb *dp)
|
||||
{
|
||||
char c;
|
||||
@@ -387,7 +387,7 @@ lib_dlb_fgetc(dlb *dp)
|
||||
return (int) c;
|
||||
}
|
||||
|
||||
static long
|
||||
staticfn long
|
||||
lib_dlb_ftell(dlb *dp)
|
||||
{
|
||||
return dp->mark;
|
||||
|
||||
@@ -7,19 +7,19 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static boolean teleport_sink(void);
|
||||
static void dosinkring(struct obj *);
|
||||
static int drop(struct obj *);
|
||||
static int menudrop_split(struct obj *, long);
|
||||
static boolean engulfer_digests_food(struct obj *);
|
||||
static boolean danger_uprops(void);
|
||||
static int wipeoff(void);
|
||||
static int menu_drop(int);
|
||||
static boolean u_stuck_cannot_go(const char *);
|
||||
static NHFILE *currentlevel_rewrite(void);
|
||||
static void familiar_level_msg(void);
|
||||
static void final_level(void);
|
||||
static void temperature_change_msg(schar);
|
||||
staticfn boolean teleport_sink(void);
|
||||
staticfn void dosinkring(struct obj *);
|
||||
staticfn int drop(struct obj *);
|
||||
staticfn int menudrop_split(struct obj *, long);
|
||||
staticfn boolean engulfer_digests_food(struct obj *);
|
||||
staticfn boolean danger_uprops(void);
|
||||
staticfn int wipeoff(void);
|
||||
staticfn int menu_drop(int);
|
||||
staticfn boolean u_stuck_cannot_go(const char *);
|
||||
staticfn NHFILE *currentlevel_rewrite(void);
|
||||
staticfn void familiar_level_msg(void);
|
||||
staticfn void final_level(void);
|
||||
staticfn void temperature_change_msg(schar);
|
||||
|
||||
/* static boolean badspot(coordxy,coordxy); */
|
||||
|
||||
@@ -447,7 +447,7 @@ polymorph_sink(void)
|
||||
|
||||
/* Teleports the sink at the player's position;
|
||||
return True if sink teleported. */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
teleport_sink(void)
|
||||
{
|
||||
coordxy cx, cy;
|
||||
@@ -485,7 +485,7 @@ teleport_sink(void)
|
||||
}
|
||||
|
||||
/* obj is a ring being dropped over a kitchen sink */
|
||||
static void
|
||||
staticfn void
|
||||
dosinkring(struct obj *obj)
|
||||
{
|
||||
struct obj *otmp, *otmp2;
|
||||
@@ -701,7 +701,7 @@ canletgo(struct obj *obj, const char *word)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
drop(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
@@ -834,7 +834,7 @@ dropz(struct obj *obj, boolean with_impact)
|
||||
/* when swallowed, move dropped object from OBJ_FREE to u.ustuck's inventory;
|
||||
for purple worm, immediately eat any corpse, glob, or special meat item
|
||||
from object polymorph; return True if object is used up, False otherwise */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
engulfer_digests_food(struct obj *obj)
|
||||
{
|
||||
/* animal swallower (purple worn) eats any
|
||||
@@ -932,7 +932,7 @@ doddrop(void)
|
||||
return result;
|
||||
}
|
||||
|
||||
static int /* check callers */
|
||||
staticfn int /* check callers */
|
||||
menudrop_split(struct obj *otmp, long cnt)
|
||||
{
|
||||
if (cnt && cnt < otmp->quan) {
|
||||
@@ -949,7 +949,7 @@ menudrop_split(struct obj *otmp, long cnt)
|
||||
}
|
||||
|
||||
/* Drop things from the hero's inventory, using a menu. */
|
||||
static int
|
||||
staticfn int
|
||||
menu_drop(int retry)
|
||||
{
|
||||
int n, i, n_dropped = 0;
|
||||
@@ -1078,7 +1078,7 @@ menu_drop(int retry)
|
||||
return (n_dropped ? ECMD_TIME : ECMD_OK);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
u_stuck_cannot_go(const char *updn)
|
||||
{
|
||||
if (u.ustuck) {
|
||||
@@ -1315,7 +1315,7 @@ doup(void)
|
||||
}
|
||||
|
||||
/* check that we can write out the current level */
|
||||
static NHFILE *
|
||||
staticfn NHFILE *
|
||||
currentlevel_rewrite(void)
|
||||
{
|
||||
NHFILE *nhfp;
|
||||
@@ -1415,7 +1415,7 @@ u_collide_m(struct monst *mtmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
familiar_level_msg(void)
|
||||
{
|
||||
static const char *const fam_msgs[4] = {
|
||||
@@ -1969,7 +1969,7 @@ hellish_smoke_mesg(void)
|
||||
}
|
||||
|
||||
/* give a message when the level temperature is different from previous */
|
||||
static void
|
||||
staticfn void
|
||||
temperature_change_msg(schar prev_temperature)
|
||||
{
|
||||
if (prev_temperature != gl.level.flags.temperature) {
|
||||
@@ -1995,7 +1995,7 @@ maybe_lvltport_feedback(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
final_level(void)
|
||||
{
|
||||
/* reset monster hostility relative to player */
|
||||
@@ -2266,7 +2266,7 @@ zombify_mon(anything *arg, long timeout)
|
||||
}
|
||||
|
||||
/* return TRUE if hero properties are dangerous to hero */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
danger_uprops(void)
|
||||
{
|
||||
return (Stoned || Slimed || Strangled || Sick);
|
||||
@@ -2308,7 +2308,7 @@ donull(void)
|
||||
return ECMD_TIME; /* Do nothing, but let other things happen */
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
wipeoff(void)
|
||||
{
|
||||
unsigned udelta = u.ucreamed;
|
||||
|
||||
+14
-14
@@ -5,18 +5,18 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static char *nextmbuf(void);
|
||||
static char *name_from_player(char *, const char *, const char *);
|
||||
static void do_mgivenname(void);
|
||||
static boolean alreadynamed(struct monst *, char *, char *) NONNULLPTRS;
|
||||
static void do_oname(struct obj *) NONNULLARG1;
|
||||
static char *docall_xname(struct obj *) NONNULLARG1;
|
||||
static void namefloorobj(void);
|
||||
staticfn char *nextmbuf(void);
|
||||
staticfn char *name_from_player(char *, const char *, const char *);
|
||||
staticfn void do_mgivenname(void);
|
||||
staticfn boolean alreadynamed(struct monst *, char *, char *) NONNULLPTRS;
|
||||
staticfn void do_oname(struct obj *) NONNULLARG1;
|
||||
staticfn char *docall_xname(struct obj *) NONNULLARG1;
|
||||
staticfn void namefloorobj(void);
|
||||
|
||||
#define NUMMBUF 5
|
||||
|
||||
/* manage a pool of BUFSZ buffers, so callers don't have to */
|
||||
static char *
|
||||
staticfn char *
|
||||
nextmbuf(void)
|
||||
{
|
||||
static char NEARDATA bufs[NUMMBUF][BUFSZ];
|
||||
@@ -101,7 +101,7 @@ safe_oname(struct obj *obj)
|
||||
|
||||
/* get a name for a monster or an object from player;
|
||||
truncate if longer than PL_PSIZ, then return it */
|
||||
static char *
|
||||
staticfn char *
|
||||
name_from_player(
|
||||
char *outbuf, /* output buffer, assumed to be at least BUFSZ long;
|
||||
* anything longer than PL_PSIZ will be truncated */
|
||||
@@ -154,7 +154,7 @@ christen_monst(struct monst *mtmp, const char *name)
|
||||
/* check whether user-supplied name matches or nearly matches an unnameable
|
||||
monster's name, or is an attempt to delete the monster's name; if so, give
|
||||
alternate reject message for do_mgivenname() */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
alreadynamed(struct monst *mtmp, char *monnambuf, char *usrbuf)
|
||||
{
|
||||
char pronounbuf[10], *p;
|
||||
@@ -195,7 +195,7 @@ alreadynamed(struct monst *mtmp, char *monnambuf, char *usrbuf)
|
||||
}
|
||||
|
||||
/* allow player to assign a name to some chosen monster */
|
||||
static void
|
||||
staticfn void
|
||||
do_mgivenname(void)
|
||||
{
|
||||
char buf[BUFSZ], monnambuf[BUFSZ], qbuf[QBUFSZ];
|
||||
@@ -286,7 +286,7 @@ do_mgivenname(void)
|
||||
* used with extreme care. Applying a name to an object no longer
|
||||
* allocates a replacement object, so that old risk is gone.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
do_oname(struct obj *obj)
|
||||
{
|
||||
char *bufp, buf[BUFSZ], bufcpy[BUFSZ], qbuf[QBUFSZ];
|
||||
@@ -600,7 +600,7 @@ docallcmd(void)
|
||||
}
|
||||
|
||||
/* for use by safe_qbuf() */
|
||||
static char *
|
||||
staticfn char *
|
||||
docall_xname(struct obj *obj)
|
||||
{
|
||||
struct obj otemp;
|
||||
@@ -672,7 +672,7 @@ docall(struct obj *obj)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
namefloorobj(void)
|
||||
{
|
||||
coord cc;
|
||||
|
||||
+58
-58
@@ -20,37 +20,37 @@ static NEARDATA const long takeoff_order[] = {
|
||||
WORN_SHIRT, WORN_BOOTS, W_SWAPWEP, W_QUIVER, 0L
|
||||
};
|
||||
|
||||
static void on_msg(struct obj *);
|
||||
static void toggle_stealth(struct obj *, long, boolean);
|
||||
static int Armor_on(void);
|
||||
staticfn void on_msg(struct obj *);
|
||||
staticfn void toggle_stealth(struct obj *, long, boolean);
|
||||
staticfn int Armor_on(void);
|
||||
/* int Boots_on(void); -- moved to extern.h */
|
||||
static int Cloak_on(void);
|
||||
static int Helmet_on(void);
|
||||
static int Gloves_on(void);
|
||||
static int Shield_on(void);
|
||||
static int Shirt_on(void);
|
||||
static void dragon_armor_handling(struct obj *, boolean, boolean);
|
||||
static void Amulet_on(void);
|
||||
static void learnring(struct obj *, boolean);
|
||||
static void adjust_attrib(struct obj *, int, int);
|
||||
static void Ring_off_or_gone(struct obj *, boolean);
|
||||
static int select_off(struct obj *);
|
||||
static struct obj *do_takeoff(void);
|
||||
static int take_off(void);
|
||||
static int menu_remarm(int);
|
||||
static void wornarm_destroyed(struct obj *);
|
||||
static void count_worn_stuff(struct obj **, boolean);
|
||||
static int armor_or_accessory_off(struct obj *);
|
||||
static int accessory_or_armor_on(struct obj *);
|
||||
static void already_wearing(const char *);
|
||||
static void already_wearing2(const char *, const char *);
|
||||
static int equip_ok(struct obj *, boolean, boolean);
|
||||
static int puton_ok(struct obj *);
|
||||
static int remove_ok(struct obj *);
|
||||
static int wear_ok(struct obj *);
|
||||
static int takeoff_ok(struct obj *);
|
||||
staticfn int Cloak_on(void);
|
||||
staticfn int Helmet_on(void);
|
||||
staticfn int Gloves_on(void);
|
||||
staticfn int Shield_on(void);
|
||||
staticfn int Shirt_on(void);
|
||||
staticfn void dragon_armor_handling(struct obj *, boolean, boolean);
|
||||
staticfn void Amulet_on(void);
|
||||
staticfn void learnring(struct obj *, boolean);
|
||||
staticfn void adjust_attrib(struct obj *, int, int);
|
||||
staticfn void Ring_off_or_gone(struct obj *, boolean);
|
||||
staticfn int select_off(struct obj *);
|
||||
staticfn struct obj *do_takeoff(void);
|
||||
staticfn int take_off(void);
|
||||
staticfn int menu_remarm(int);
|
||||
staticfn void wornarm_destroyed(struct obj *);
|
||||
staticfn void count_worn_stuff(struct obj **, boolean);
|
||||
staticfn int armor_or_accessory_off(struct obj *);
|
||||
staticfn int accessory_or_armor_on(struct obj *);
|
||||
staticfn void already_wearing(const char *);
|
||||
staticfn void already_wearing2(const char *, const char *);
|
||||
staticfn int equip_ok(struct obj *, boolean, boolean);
|
||||
staticfn int puton_ok(struct obj *);
|
||||
staticfn int remove_ok(struct obj *);
|
||||
staticfn int wear_ok(struct obj *);
|
||||
staticfn int takeoff_ok(struct obj *);
|
||||
/* maybe_destroy_armor() may return NULL */
|
||||
static struct obj *maybe_destroy_armor(struct obj *, struct obj *,
|
||||
staticfn struct obj *maybe_destroy_armor(struct obj *, struct obj *,
|
||||
boolean *) NONNULLARG3;
|
||||
|
||||
/* plural "fingers" or optionally "gloves" */
|
||||
@@ -70,7 +70,7 @@ off_msg(struct obj *otmp)
|
||||
}
|
||||
|
||||
/* for items that involve no delay */
|
||||
static void
|
||||
staticfn void
|
||||
on_msg(struct obj *otmp)
|
||||
{
|
||||
if (flags.verbose) {
|
||||
@@ -91,7 +91,7 @@ on_msg(struct obj *otmp)
|
||||
give feedback and discover it iff stealth state is changing;
|
||||
stealth is blocked by riding unless hero+steed fly (handled with
|
||||
BStealth by mount and dismount routines) */
|
||||
static
|
||||
staticfn
|
||||
void
|
||||
toggle_stealth(
|
||||
struct obj *obj,
|
||||
@@ -297,7 +297,7 @@ Boots_off(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
Cloak_on(void)
|
||||
{
|
||||
long oldprop =
|
||||
@@ -405,7 +405,7 @@ Cloak_off(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
Helmet_on(void)
|
||||
{
|
||||
switch (uarmh->otyp) {
|
||||
@@ -540,7 +540,7 @@ hard_helmet(struct obj *obj)
|
||||
return (is_metallic(obj) || is_crackable(obj)) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
Gloves_on(void)
|
||||
{
|
||||
long oldprop =
|
||||
@@ -669,7 +669,7 @@ Gloves_off(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
Shield_on(void)
|
||||
{
|
||||
/* no shield currently requires special handling when put on, but we
|
||||
@@ -719,7 +719,7 @@ Shield_off(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
Shirt_on(void)
|
||||
{
|
||||
/* no shirt currently requires special handling when put on, but we
|
||||
@@ -758,7 +758,7 @@ Shirt_off(void)
|
||||
}
|
||||
|
||||
/* handle extra abilities for hero wearing dragon scale armor */
|
||||
static void
|
||||
staticfn void
|
||||
dragon_armor_handling(
|
||||
struct obj *otmp, /* armor being put on or taken off */
|
||||
boolean puton, /* True: on, False: off */
|
||||
@@ -847,7 +847,7 @@ dragon_armor_handling(
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
Armor_on(void)
|
||||
{
|
||||
if (!uarm) /* no known instances of !uarm here but play it safe */
|
||||
@@ -923,7 +923,7 @@ Armor_gone(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
Amulet_on(void)
|
||||
{
|
||||
/* make sure amulet isn't wielded; can't use remove_worn_item()
|
||||
@@ -1094,7 +1094,7 @@ Amulet_off(void)
|
||||
}
|
||||
|
||||
/* handle ring discovery; comparable to learnwand() */
|
||||
static void
|
||||
staticfn void
|
||||
learnring(struct obj *ring, boolean observed)
|
||||
{
|
||||
int ringtype = ring->otyp;
|
||||
@@ -1124,7 +1124,7 @@ learnring(struct obj *ring, boolean observed)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
adjust_attrib(struct obj *obj, int which, int val)
|
||||
{
|
||||
int old_attrib;
|
||||
@@ -1246,7 +1246,7 @@ Ring_on(struct obj *obj)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
Ring_off_or_gone(struct obj *obj, boolean gone)
|
||||
{
|
||||
long mask = (obj->owornmask & W_RING);
|
||||
@@ -1632,7 +1632,7 @@ stop_donning(struct obj *stolenobj) /* no message if stolenobj is already
|
||||
static NEARDATA int Narmorpieces, Naccessories;
|
||||
|
||||
/* assign values to Narmorpieces and Naccessories */
|
||||
static void
|
||||
staticfn void
|
||||
count_worn_stuff(struct obj **which, /* caller wants this when count is 1 */
|
||||
boolean accessorizing)
|
||||
{
|
||||
@@ -1669,7 +1669,7 @@ count_worn_stuff(struct obj **which, /* caller wants this when count is 1 */
|
||||
|
||||
/* take off one piece or armor or one accessory;
|
||||
shared by dotakeoff('T') and doremring('R') */
|
||||
static int
|
||||
staticfn int
|
||||
armor_or_accessory_off(struct obj *obj)
|
||||
{
|
||||
if (!(obj->owornmask & (W_ARMOR | W_ACCESSORY))) {
|
||||
@@ -1893,13 +1893,13 @@ armoroff(struct obj *otmp)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
already_wearing(const char *cc)
|
||||
{
|
||||
You("are already wearing %s%c", cc, (cc == c_that_) ? '!' : '.');
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
already_wearing2(const char *cc1, const char *cc2)
|
||||
{
|
||||
You_cant("wear %s because you're wearing %s there already.", cc1, cc2);
|
||||
@@ -2091,7 +2091,7 @@ canwearobj(struct obj *otmp, long *mask, boolean noisy)
|
||||
return !err;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
accessory_or_armor_on(struct obj *obj)
|
||||
{
|
||||
long mask = 0L;
|
||||
@@ -2575,7 +2575,7 @@ unchanger(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static
|
||||
staticfn
|
||||
int
|
||||
select_off(struct obj *otmp)
|
||||
{
|
||||
@@ -2702,7 +2702,7 @@ select_off(struct obj *otmp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
do_takeoff(void)
|
||||
{
|
||||
struct obj *otmp = (struct obj *) 0;
|
||||
@@ -2778,7 +2778,7 @@ do_takeoff(void)
|
||||
}
|
||||
|
||||
/* occupation callback for 'A' */
|
||||
static int
|
||||
staticfn int
|
||||
take_off(void)
|
||||
{
|
||||
int i;
|
||||
@@ -2945,7 +2945,7 @@ remarm_swapwep(void)
|
||||
return (!uswapwep || uswapwep->bknown != oldbknown) ? ECMD_TIME : ECMD_OK;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
menu_remarm(int retry)
|
||||
{
|
||||
int n, i = 0;
|
||||
@@ -2999,7 +2999,7 @@ menu_remarm(int retry)
|
||||
/* take off the specific worn object and if it still exists after that,
|
||||
destroy it (taking off the item might already destroy it by dunking
|
||||
hero into lava) */
|
||||
static void
|
||||
staticfn void
|
||||
wornarm_destroyed(struct obj *wornarm)
|
||||
{
|
||||
struct obj *invobj;
|
||||
@@ -3042,7 +3042,7 @@ wornarm_destroyed(struct obj *wornarm)
|
||||
* returns impacted armor with its in_use bit set,
|
||||
* or Null. *resisted is updated to reflect whether
|
||||
* it resisted or not */
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
maybe_destroy_armor(struct obj *armor, struct obj *atmp, boolean *resisted)
|
||||
{
|
||||
if ((armor != 0) && (!atmp || atmp == armor)
|
||||
@@ -3195,7 +3195,7 @@ inaccessible_equipment(struct obj *obj,
|
||||
}
|
||||
|
||||
/* not a getobj callback - unifies code among the other 4 getobj callbacks */
|
||||
static int
|
||||
staticfn int
|
||||
equip_ok(struct obj *obj, boolean removing, boolean accessory)
|
||||
{
|
||||
boolean is_worn;
|
||||
@@ -3240,28 +3240,28 @@ equip_ok(struct obj *obj, boolean removing, boolean accessory)
|
||||
}
|
||||
|
||||
/* getobj callback for P command */
|
||||
static int
|
||||
staticfn int
|
||||
puton_ok(struct obj *obj)
|
||||
{
|
||||
return equip_ok(obj, FALSE, TRUE);
|
||||
}
|
||||
|
||||
/* getobj callback for R command */
|
||||
static int
|
||||
staticfn int
|
||||
remove_ok(struct obj *obj)
|
||||
{
|
||||
return equip_ok(obj, TRUE, TRUE);
|
||||
}
|
||||
|
||||
/* getobj callback for W command */
|
||||
static int
|
||||
staticfn int
|
||||
wear_ok(struct obj *obj)
|
||||
{
|
||||
return equip_ok(obj, FALSE, FALSE);
|
||||
}
|
||||
|
||||
/* getobj callback for T command */
|
||||
static int
|
||||
staticfn int
|
||||
takeoff_ok(struct obj *obj)
|
||||
{
|
||||
return equip_ok(obj, TRUE, FALSE);
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static int pet_type(void);
|
||||
static struct permonst * pick_familiar_pm(struct obj *, boolean);
|
||||
static void set_mon_lastmove(struct monst *);
|
||||
static int mon_leave(struct monst *) NONNULLARG1;
|
||||
static boolean keep_mon_accessible(struct monst *);
|
||||
staticfn int pet_type(void);
|
||||
staticfn struct permonst * pick_familiar_pm(struct obj *, boolean);
|
||||
staticfn void set_mon_lastmove(struct monst *);
|
||||
staticfn int mon_leave(struct monst *) NONNULLARG1;
|
||||
staticfn boolean keep_mon_accessible(struct monst *);
|
||||
|
||||
enum arrival {
|
||||
Before_you = 0, /* monsters kept on migrating_mons for accessibility;
|
||||
@@ -63,7 +63,7 @@ initedog(struct monst *mtmp)
|
||||
u.uconduct.pets++;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
pet_type(void)
|
||||
{
|
||||
if (gu.urole.petnum != NON_PM)
|
||||
@@ -76,7 +76,7 @@ pet_type(void)
|
||||
return rn2(2) ? PM_KITTEN : PM_LITTLE_DOG;
|
||||
}
|
||||
|
||||
static struct permonst *
|
||||
staticfn struct permonst *
|
||||
pick_familiar_pm(struct obj *otmp, boolean quietly)
|
||||
{
|
||||
struct permonst *pm = (struct permonst *) 0;
|
||||
@@ -235,7 +235,7 @@ makedog(void)
|
||||
return mtmp;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
set_mon_lastmove(struct monst *mtmp)
|
||||
{
|
||||
mtmp->mlstmv = gm.moves;
|
||||
@@ -667,7 +667,7 @@ mon_catchup_elapsed_time(
|
||||
|
||||
/* bookkeeping when mtmp is about to leave the current level;
|
||||
common to keepdogs() and migrate_to_level() */
|
||||
static int
|
||||
staticfn int
|
||||
mon_leave(struct monst *mtmp)
|
||||
{
|
||||
struct obj *obj;
|
||||
@@ -706,7 +706,7 @@ mon_leave(struct monst *mtmp)
|
||||
|
||||
/* when hero leaves a level, some monsters should be placed on the
|
||||
migrating_mons list instead of being stashed inside the level's file */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
keep_mon_accessible(struct monst *mon)
|
||||
{
|
||||
/* the Wizard is kept accessible so that his harassment can fetch
|
||||
|
||||
+20
-20
@@ -11,15 +11,15 @@
|
||||
#define DOG_WEAK 500
|
||||
#define DOG_STARVE 750
|
||||
|
||||
static void dog_starve(struct monst *);
|
||||
static boolean dog_hunger(struct monst *, struct edog *);
|
||||
static int dog_invent(struct monst *, struct edog *, int);
|
||||
static int dog_goal(struct monst *, struct edog *, int, int, int);
|
||||
static struct monst *find_targ(struct monst *, int, int, int);
|
||||
static int find_friends(struct monst *, struct monst *, int);
|
||||
static struct monst *best_target(struct monst *);
|
||||
static long score_targ(struct monst *, struct monst *);
|
||||
static boolean can_reach_location(struct monst *, coordxy, coordxy, coordxy,
|
||||
staticfn void dog_starve(struct monst *);
|
||||
staticfn boolean dog_hunger(struct monst *, struct edog *);
|
||||
staticfn int dog_invent(struct monst *, struct edog *, int);
|
||||
staticfn int dog_goal(struct monst *, struct edog *, int, int, int);
|
||||
staticfn struct monst *find_targ(struct monst *, int, int, int);
|
||||
staticfn int find_friends(struct monst *, struct monst *, int);
|
||||
staticfn struct monst *best_target(struct monst *);
|
||||
staticfn long score_targ(struct monst *, struct monst *);
|
||||
staticfn boolean can_reach_location(struct monst *, coordxy, coordxy, coordxy,
|
||||
coordxy) NONNULLARG1;
|
||||
|
||||
/* pick a carried item for pet to drop */
|
||||
@@ -135,7 +135,7 @@ static NEARDATA const char nofetch[] = { BALL_CLASS, CHAIN_CLASS, ROCK_CLASS,
|
||||
0 };
|
||||
|
||||
|
||||
static void wantdoor(coordxy, coordxy, genericptr_t);
|
||||
staticfn void wantdoor(coordxy, coordxy, genericptr_t);
|
||||
|
||||
boolean
|
||||
cursed_object_at(coordxy x, coordxy y)
|
||||
@@ -325,7 +325,7 @@ dog_eat(struct monst *mtmp,
|
||||
return (DEADMONSTER(mtmp)) ? 2 : 1;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dog_starve(struct monst *mtmp)
|
||||
{
|
||||
if (mtmp->mleashed && mtmp != u.usteed)
|
||||
@@ -339,7 +339,7 @@ dog_starve(struct monst *mtmp)
|
||||
}
|
||||
|
||||
/* hunger effects -- returns TRUE on starvation */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
dog_hunger(struct monst *mtmp, struct edog *edog)
|
||||
{
|
||||
if (gm.moves > edog->hungrytime + DOG_WEAK) {
|
||||
@@ -377,7 +377,7 @@ dog_hunger(struct monst *mtmp, struct edog *edog)
|
||||
/* do something with object (drop, pick up, eat) at current position
|
||||
* returns 1 if object eaten (since that counts as dog's move), 2 if died
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
dog_invent(struct monst *mtmp, struct edog *edog, int udist)
|
||||
{
|
||||
coordxy omx, omy;
|
||||
@@ -459,7 +459,7 @@ dog_invent(struct monst *mtmp, struct edog *edog, int udist)
|
||||
|
||||
/* set dog's goal -- gtyp, gx, gy;
|
||||
returns -1/0/1 (dog's desire to approach player) or -2 (abort move) */
|
||||
static int
|
||||
staticfn int
|
||||
dog_goal(
|
||||
struct monst *mtmp,
|
||||
struct edog *edog,
|
||||
@@ -626,7 +626,7 @@ dog_goal(
|
||||
#undef FARAWAY
|
||||
}
|
||||
|
||||
static struct monst *
|
||||
staticfn struct monst *
|
||||
find_targ(
|
||||
struct monst *mtmp,
|
||||
int dx, int dy,
|
||||
@@ -670,7 +670,7 @@ find_targ(
|
||||
return targ;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
find_friends(struct monst *mtmp, struct monst *mtarg, int maxdist)
|
||||
{
|
||||
struct monst *pal;
|
||||
@@ -714,7 +714,7 @@ find_friends(struct monst *mtmp, struct monst *mtarg, int maxdist)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long
|
||||
staticfn long
|
||||
score_targ(struct monst *mtmp, struct monst *mtarg)
|
||||
{
|
||||
long score = 0L;
|
||||
@@ -814,7 +814,7 @@ score_targ(struct monst *mtmp, struct monst *mtarg)
|
||||
return score;
|
||||
}
|
||||
|
||||
static struct monst *
|
||||
staticfn struct monst *
|
||||
best_target(struct monst *mtmp) /* Pet */
|
||||
{
|
||||
int dx, dy;
|
||||
@@ -1331,7 +1331,7 @@ could_reach_item(struct monst *mon, coordxy nx, coordxy ny)
|
||||
* Since the maximum food distance is 5, this should never be more than 5
|
||||
* calls deep.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
can_reach_location(struct monst *mon, coordxy mx, coordxy my, coordxy fx, coordxy fy)
|
||||
{
|
||||
int i, j;
|
||||
@@ -1367,7 +1367,7 @@ can_reach_location(struct monst *mon, coordxy mx, coordxy my, coordxy fx, coordx
|
||||
}
|
||||
|
||||
/* do_clear_area client */
|
||||
static void
|
||||
staticfn void
|
||||
wantdoor(coordxy x, coordxy y, genericptr_t distance)
|
||||
{
|
||||
int ndist, *dist_ptr = (int *) distance;
|
||||
|
||||
+28
-28
@@ -11,26 +11,26 @@
|
||||
|
||||
/* gk.kickedobj (decl.c) tracks a kicked object until placed or destroyed */
|
||||
|
||||
static void kickdmg(struct monst *, boolean);
|
||||
static boolean maybe_kick_monster(struct monst *, coordxy, coordxy);
|
||||
static void kick_monster(struct monst *, coordxy, coordxy);
|
||||
static int kick_object(coordxy, coordxy, char *) NONNULLARG3;
|
||||
static int really_kick_object(coordxy, coordxy);
|
||||
static char *kickstr(char *, const char *) NONNULLPTRS;
|
||||
static boolean watchman_thief_arrest(struct monst *) NONNULLPTRS;
|
||||
static boolean watchman_door_damage(struct monst *,
|
||||
staticfn void kickdmg(struct monst *, boolean);
|
||||
staticfn boolean maybe_kick_monster(struct monst *, coordxy, coordxy);
|
||||
staticfn void kick_monster(struct monst *, coordxy, coordxy);
|
||||
staticfn int kick_object(coordxy, coordxy, char *) NONNULLARG3;
|
||||
staticfn int really_kick_object(coordxy, coordxy);
|
||||
staticfn char *kickstr(char *, const char *) NONNULLPTRS;
|
||||
staticfn boolean watchman_thief_arrest(struct monst *) NONNULLPTRS;
|
||||
staticfn boolean watchman_door_damage(struct monst *,
|
||||
coordxy, coordxy) NONNULLARG1;
|
||||
static void kick_dumb(coordxy, coordxy);
|
||||
static void kick_ouch(coordxy, coordxy, const char *) NONNULLARG3;
|
||||
static void kick_door(coordxy, coordxy, int);
|
||||
static int kick_nondoor(coordxy, coordxy, int);
|
||||
static void otransit_msg(struct obj *, boolean, boolean, long);
|
||||
static void drop_to(coord *, schar, coordxy, coordxy) NONNULLARG1;
|
||||
staticfn void kick_dumb(coordxy, coordxy);
|
||||
staticfn void kick_ouch(coordxy, coordxy, const char *) NONNULLARG3;
|
||||
staticfn void kick_door(coordxy, coordxy, int);
|
||||
staticfn int kick_nondoor(coordxy, coordxy, int);
|
||||
staticfn void otransit_msg(struct obj *, boolean, boolean, long);
|
||||
staticfn void drop_to(coord *, schar, coordxy, coordxy) NONNULLARG1;
|
||||
|
||||
static const char kick_passes_thru[] = "kick passes harmlessly through";
|
||||
|
||||
/* kicking damage when not poly'd into a form with a kick attack */
|
||||
static void
|
||||
staticfn void
|
||||
kickdmg(struct monst *mon, boolean clumsy)
|
||||
{
|
||||
int mdx, mdy;
|
||||
@@ -122,7 +122,7 @@ kickdmg(struct monst *mon, boolean clumsy)
|
||||
use_skill(kick_skill, 1);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
maybe_kick_monster(struct monst *mon, coordxy x, coordxy y)
|
||||
{
|
||||
if (mon) {
|
||||
@@ -142,7 +142,7 @@ maybe_kick_monster(struct monst *mon, coordxy x, coordxy y)
|
||||
return (boolean) (mon != 0);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
kick_monster(struct monst *mon, coordxy x, coordxy y)
|
||||
{
|
||||
boolean clumsy = FALSE;
|
||||
@@ -480,7 +480,7 @@ container_impact_dmg(
|
||||
}
|
||||
|
||||
/* jacket around really_kick_object */
|
||||
static int
|
||||
staticfn int
|
||||
kick_object(coordxy x, coordxy y, char *kickobjnam)
|
||||
{
|
||||
int res = 0;
|
||||
@@ -498,7 +498,7 @@ kick_object(coordxy x, coordxy y, char *kickobjnam)
|
||||
}
|
||||
|
||||
/* guts of kick_object */
|
||||
static int
|
||||
staticfn int
|
||||
really_kick_object(coordxy x, coordxy y)
|
||||
{
|
||||
int range;
|
||||
@@ -783,7 +783,7 @@ really_kick_object(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* cause of death if kicking kills kicker */
|
||||
static char *
|
||||
staticfn char *
|
||||
kickstr(char *buf, const char *kickobjnam)
|
||||
{
|
||||
const char *what;
|
||||
@@ -823,7 +823,7 @@ kickstr(char *buf, const char *kickobjnam)
|
||||
return strcat(strcpy(buf, "kicking "), what);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
watchman_thief_arrest(struct monst *mtmp)
|
||||
{
|
||||
if (is_watch(mtmp->data) && couldsee(mtmp->mx, mtmp->my)
|
||||
@@ -835,7 +835,7 @@ watchman_thief_arrest(struct monst *mtmp)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
watchman_door_damage(struct monst *mtmp, coordxy x, coordxy y)
|
||||
{
|
||||
if (is_watch(mtmp->data) && mtmp->mpeaceful
|
||||
@@ -853,7 +853,7 @@ watchman_door_damage(struct monst *mtmp, coordxy x, coordxy y)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
kick_dumb(coordxy x, coordxy y)
|
||||
{
|
||||
exercise(A_DEX, FALSE);
|
||||
@@ -870,7 +870,7 @@ kick_dumb(coordxy x, coordxy y)
|
||||
hurtle(-u.dx, -u.dy, 1, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
kick_ouch(coordxy x, coordxy y, const char *kickobjnam)
|
||||
{
|
||||
int dmg;
|
||||
@@ -899,7 +899,7 @@ kick_ouch(coordxy x, coordxy y, const char *kickobjnam)
|
||||
}
|
||||
|
||||
/* kick a door */
|
||||
static void
|
||||
staticfn void
|
||||
kick_door(coordxy x, coordxy y, int avrg_attrib)
|
||||
{
|
||||
if (gm.maploc->doormask == D_ISOPEN || gm.maploc->doormask == D_BROKEN
|
||||
@@ -958,7 +958,7 @@ kick_door(coordxy x, coordxy y, int avrg_attrib)
|
||||
}
|
||||
|
||||
/* kick non-door terrain */
|
||||
static int
|
||||
staticfn int
|
||||
kick_nondoor(coordxy x, coordxy y, int avrg_attrib)
|
||||
{
|
||||
if (gm.maploc->typ == SDOOR) {
|
||||
@@ -1455,7 +1455,7 @@ dokick(void)
|
||||
return ECMD_TIME;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
drop_to(coord *cc, schar loc, coordxy x, coordxy y)
|
||||
{
|
||||
stairway *stway = stairway_at(x, y);
|
||||
@@ -1889,7 +1889,7 @@ deliver_obj_to_mon(struct monst *mtmp, int cnt, unsigned long deliverflags)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
otransit_msg(struct obj *otmp, boolean nodrop, boolean chainthere, long num)
|
||||
{
|
||||
char *optr = 0, obuf[BUFSZ], xbuf[BUFSZ];
|
||||
|
||||
+28
-28
@@ -7,21 +7,21 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static int throw_obj(struct obj *, int);
|
||||
static boolean ok_to_throw(int *);
|
||||
static int throw_ok(struct obj *);
|
||||
static void autoquiver(void);
|
||||
static struct obj *find_launcher(struct obj *);
|
||||
static int gem_accept(struct monst *, struct obj *);
|
||||
static boolean toss_up(struct obj *, boolean) NONNULLARG1;
|
||||
static void sho_obj_return_to_u(struct obj * obj);
|
||||
static struct obj *return_throw_to_inv(struct obj *, long, boolean,
|
||||
staticfn int throw_obj(struct obj *, int);
|
||||
staticfn boolean ok_to_throw(int *);
|
||||
staticfn int throw_ok(struct obj *);
|
||||
staticfn void autoquiver(void);
|
||||
staticfn struct obj *find_launcher(struct obj *);
|
||||
staticfn int gem_accept(struct monst *, struct obj *);
|
||||
staticfn boolean toss_up(struct obj *, boolean) NONNULLARG1;
|
||||
staticfn void sho_obj_return_to_u(struct obj * obj);
|
||||
staticfn struct obj *return_throw_to_inv(struct obj *, long, boolean,
|
||||
struct obj *);
|
||||
static void tmiss(struct obj *, struct monst *, boolean);
|
||||
static int throw_gold(struct obj *);
|
||||
static void check_shop_obj(struct obj *, coordxy, coordxy, boolean);
|
||||
static void breakmsg(struct obj *, boolean);
|
||||
static boolean mhurtle_step(genericptr_t, coordxy, coordxy);
|
||||
staticfn void tmiss(struct obj *, struct monst *, boolean);
|
||||
staticfn int throw_gold(struct obj *);
|
||||
staticfn void check_shop_obj(struct obj *, coordxy, coordxy, boolean);
|
||||
staticfn void breakmsg(struct obj *, boolean);
|
||||
staticfn boolean mhurtle_step(genericptr_t, coordxy, coordxy);
|
||||
|
||||
/* uwep might already be removed from inventory so test for W_WEP instead;
|
||||
for Valk+Mjollnir, caller needs to validate the strength requirement */
|
||||
@@ -80,7 +80,7 @@ multishot_class_bonus(
|
||||
}
|
||||
|
||||
/* Throw the selected object, asking for direction */
|
||||
static int
|
||||
staticfn int
|
||||
throw_obj(struct obj *obj, int shotlimit)
|
||||
{
|
||||
struct obj *otmp, *oldslot;
|
||||
@@ -287,7 +287,7 @@ throw_obj(struct obj *obj, int shotlimit)
|
||||
}
|
||||
|
||||
/* common to dothrow() and dofire() */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
ok_to_throw(int *shotlimit_p) /* (see dothrow()) */
|
||||
{
|
||||
*shotlimit_p = LIMIT_TO_RANGE_INT(0, LARGEST_INT, gc.command_count);
|
||||
@@ -307,7 +307,7 @@ ok_to_throw(int *shotlimit_p) /* (see dothrow()) */
|
||||
}
|
||||
|
||||
/* getobj callback for object to be thrown */
|
||||
static int
|
||||
staticfn int
|
||||
throw_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
@@ -371,7 +371,7 @@ dothrow(void)
|
||||
|
||||
/* KMH -- Automatically fill quiver */
|
||||
/* Suggested by Jeffrey Bay <jbay@convex.hp.com> */
|
||||
static void
|
||||
staticfn void
|
||||
autoquiver(void)
|
||||
{
|
||||
struct obj *otmp, *oammo = 0, *omissile = 0, *omisc = 0, *altammo = 0;
|
||||
@@ -437,7 +437,7 @@ autoquiver(void)
|
||||
|
||||
/* look through hero inventory for launcher matching ammo,
|
||||
avoiding known cursed items. Returns NULL if no match. */
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
find_launcher(struct obj *ammo)
|
||||
{
|
||||
struct obj *otmp, *oX;
|
||||
@@ -992,7 +992,7 @@ will_hurtle(struct monst *mon, coordxy x, coordxy y)
|
||||
return goodpos(x, y, mon, MM_IGNOREWATER | MM_IGNORELAVA);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
mhurtle_step(genericptr_t arg, coordxy x, coordxy y)
|
||||
{
|
||||
struct monst *mon = (struct monst *) arg;
|
||||
@@ -1180,7 +1180,7 @@ mhurtle(struct monst *mon, int dx, int dy, int range)
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
check_shop_obj(struct obj *obj, coordxy x, coordxy y, boolean broken)
|
||||
{
|
||||
boolean costly_xy;
|
||||
@@ -1255,7 +1255,7 @@ harmless_missile(struct obj *obj)
|
||||
*
|
||||
* Returns FALSE if the object is gone.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
toss_up(struct obj *obj, boolean hitsroof)
|
||||
{
|
||||
const char *action;
|
||||
@@ -1432,7 +1432,7 @@ throwing_weapon(struct obj *obj)
|
||||
}
|
||||
|
||||
/* the currently thrown object is returning to you (not for boomerangs) */
|
||||
static void
|
||||
staticfn void
|
||||
sho_obj_return_to_u(struct obj *obj)
|
||||
{
|
||||
/* might already be our location (bounced off a wall) */
|
||||
@@ -1807,7 +1807,7 @@ throwit(struct obj *obj,
|
||||
/* handle a throw-and-return missile coming back into inventory; makes sure
|
||||
that if it was wielded, it will be re-wielded; if it was split off of a
|
||||
stack (boomerang), don't let it merge with a different compatible stack */
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
return_throw_to_inv(
|
||||
struct obj *obj, /* object to add to invent */
|
||||
long wep_mask, /* its owornmask before it was removed from invent */
|
||||
@@ -1903,7 +1903,7 @@ omon_adj(struct monst *mon, struct obj *obj, boolean mon_notices)
|
||||
}
|
||||
|
||||
/* thrown object misses target monster */
|
||||
static void
|
||||
staticfn void
|
||||
tmiss(struct obj *obj, struct monst *mon, boolean maybe_wakeup)
|
||||
{
|
||||
const char *missile = mshot_xname(obj);
|
||||
@@ -2259,7 +2259,7 @@ thitmonst(
|
||||
|
||||
#undef special_obj_hits_leader
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
gem_accept(struct monst *mon, struct obj *obj)
|
||||
{
|
||||
static NEARDATA const char
|
||||
@@ -2557,7 +2557,7 @@ breaktest(struct obj *obj)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
breakmsg(struct obj *obj, boolean in_view)
|
||||
{
|
||||
const char *to_pieces;
|
||||
@@ -2599,7 +2599,7 @@ breakmsg(struct obj *obj, boolean in_view)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
throw_gold(struct obj *obj)
|
||||
{
|
||||
int range, odx, ody;
|
||||
|
||||
+91
-90
@@ -33,55 +33,56 @@ struct lchoice {
|
||||
};
|
||||
|
||||
#if 0
|
||||
static void Fread(genericptr_t, int, int, dlb *);
|
||||
staticfn void Fread(genericptr_t, int, int, dlb *);
|
||||
#endif
|
||||
static xint16 dname_to_dnum(const char *);
|
||||
static int find_branch(const char *, struct proto_dungeon *);
|
||||
static xint16 parent_dnum(const char *, struct proto_dungeon *);
|
||||
static int level_range(xint16, int, int, int, struct proto_dungeon *, int *);
|
||||
static xint16 parent_dlevel(const char *, struct proto_dungeon *);
|
||||
static int correct_branch_type(struct tmpbranch *);
|
||||
static branch *add_branch(int, int, struct proto_dungeon *);
|
||||
static void add_level(s_level *);
|
||||
static void init_level(int, int, struct proto_dungeon *);
|
||||
static int possible_places(int, boolean *, struct proto_dungeon *);
|
||||
static xint16 pick_level(boolean *, int);
|
||||
static boolean place_level(int, struct proto_dungeon *);
|
||||
static int get_dgn_flags(lua_State *);
|
||||
static int get_dgn_align(lua_State *);
|
||||
static void init_dungeon_levels(lua_State *, struct proto_dungeon *, int);
|
||||
static void init_dungeon_branches(lua_State *, struct proto_dungeon *, int);
|
||||
static void init_dungeon_set_entry(struct proto_dungeon *, int);
|
||||
static void init_dungeon_set_depth(struct proto_dungeon *, int);
|
||||
static void init_castle_tune(void);
|
||||
static void fixup_level_locations(void);
|
||||
static void free_proto_dungeon(struct proto_dungeon *);
|
||||
static boolean init_dungeon_dungeons(lua_State *, struct proto_dungeon *, int);
|
||||
static boolean unplaced_floater(struct dungeon *);
|
||||
static boolean unreachable_level(d_level *, boolean);
|
||||
static void tport_menu(winid, char *, struct lchoice *, d_level *, boolean);
|
||||
static const char *br_string(int);
|
||||
static char chr_u_on_lvl(d_level *);
|
||||
static void print_branch(winid, int, int, int, boolean, struct lchoice *);
|
||||
static char *get_annotation(d_level *);
|
||||
static void query_annotation(d_level *);
|
||||
static mapseen *load_mapseen(NHFILE *);
|
||||
static void save_mapseen(NHFILE *, mapseen *);
|
||||
static mapseen *find_mapseen(d_level *);
|
||||
static mapseen *find_mapseen_by_str(const char *);
|
||||
static void print_mapseen(winid, mapseen *, int, int, boolean);
|
||||
static boolean interest_mapseen(mapseen *);
|
||||
static void count_feat_lastseentyp(mapseen *, coordxy, coordxy);
|
||||
static void traverse_mapseenchn(int, winid, int, int, int *);
|
||||
static const char *seen_string(xint16, const char *);
|
||||
static const char *br_string2(branch *);
|
||||
static const char *shop_string(int);
|
||||
static char *tunesuffix(mapseen *, char *, size_t);
|
||||
staticfn xint16 dname_to_dnum(const char *);
|
||||
staticfn int find_branch(const char *, struct proto_dungeon *);
|
||||
staticfn xint16 parent_dnum(const char *, struct proto_dungeon *);
|
||||
staticfn int level_range(xint16, int, int, int, struct proto_dungeon *, int *);
|
||||
staticfn xint16 parent_dlevel(const char *, struct proto_dungeon *);
|
||||
staticfn int correct_branch_type(struct tmpbranch *);
|
||||
staticfn branch *add_branch(int, int, struct proto_dungeon *);
|
||||
staticfn void add_level(s_level *);
|
||||
staticfn void init_level(int, int, struct proto_dungeon *);
|
||||
staticfn int possible_places(int, boolean *, struct proto_dungeon *);
|
||||
staticfn xint16 pick_level(boolean *, int);
|
||||
staticfn boolean place_level(int, struct proto_dungeon *);
|
||||
staticfn int get_dgn_flags(lua_State *);
|
||||
staticfn int get_dgn_align(lua_State *);
|
||||
staticfn void init_dungeon_levels(lua_State *, struct proto_dungeon *, int);
|
||||
staticfn void init_dungeon_branches(lua_State *, struct proto_dungeon *, int);
|
||||
staticfn void init_dungeon_set_entry(struct proto_dungeon *, int);
|
||||
staticfn void init_dungeon_set_depth(struct proto_dungeon *, int);
|
||||
staticfn void init_castle_tune(void);
|
||||
staticfn void fixup_level_locations(void);
|
||||
staticfn void free_proto_dungeon(struct proto_dungeon *);
|
||||
staticfn boolean init_dungeon_dungeons(lua_State *, struct proto_dungeon *,
|
||||
int);
|
||||
staticfn boolean unplaced_floater(struct dungeon *);
|
||||
staticfn boolean unreachable_level(d_level *, boolean);
|
||||
staticfn void tport_menu(winid, char *, struct lchoice *, d_level *, boolean);
|
||||
staticfn const char *br_string(int);
|
||||
staticfn char chr_u_on_lvl(d_level *);
|
||||
staticfn void print_branch(winid, int, int, int, boolean, struct lchoice *);
|
||||
staticfn char *get_annotation(d_level *);
|
||||
staticfn void query_annotation(d_level *);
|
||||
staticfn mapseen *load_mapseen(NHFILE *);
|
||||
staticfn void save_mapseen(NHFILE *, mapseen *);
|
||||
staticfn mapseen *find_mapseen(d_level *);
|
||||
staticfn mapseen *find_mapseen_by_str(const char *);
|
||||
staticfn void print_mapseen(winid, mapseen *, int, int, boolean);
|
||||
staticfn boolean interest_mapseen(mapseen *);
|
||||
staticfn void count_feat_lastseentyp(mapseen *, coordxy, coordxy);
|
||||
staticfn void traverse_mapseenchn(int, winid, int, int, int *);
|
||||
staticfn const char *seen_string(xint16, const char *);
|
||||
staticfn const char *br_string2(branch *);
|
||||
staticfn const char *shop_string(int);
|
||||
staticfn char *tunesuffix(mapseen *, char *, size_t);
|
||||
|
||||
#ifdef DEBUG
|
||||
static void dumpit(void);
|
||||
staticfn void dumpit(void);
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dumpit(void)
|
||||
{
|
||||
#define DD gd.dungeons[i]
|
||||
@@ -265,7 +266,7 @@ restore_dungeon(NHFILE *nhfp)
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
staticfn void
|
||||
Fread(genericptr_t ptr, int size, int nitems, dlb *stream)
|
||||
{
|
||||
int cnt;
|
||||
@@ -281,7 +282,7 @@ Fread(genericptr_t ptr, int size, int nitems, dlb *stream)
|
||||
|
||||
DISABLE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
static xint16
|
||||
staticfn xint16
|
||||
dname_to_dnum(const char *s)
|
||||
{
|
||||
xint16 i;
|
||||
@@ -308,7 +309,7 @@ find_level(const char *s)
|
||||
}
|
||||
|
||||
/* Find the branch that links the named dungeon. */
|
||||
static int
|
||||
staticfn int
|
||||
find_branch(
|
||||
const char *s, /* dungeon name */
|
||||
struct proto_dungeon *pd)
|
||||
@@ -343,7 +344,7 @@ DISABLE_WARNING_UNREACHABLE_CODE
|
||||
* Find the "parent" by searching the prototype branch list for the branch
|
||||
* listing, then figuring out to which dungeon it belongs.
|
||||
*/
|
||||
static xint16
|
||||
staticfn xint16
|
||||
parent_dnum(
|
||||
const char *s, /* dungeon name */
|
||||
struct proto_dungeon *pd)
|
||||
@@ -377,7 +378,7 @@ RESTORE_WARNING_UNREACHABLE_CODE
|
||||
* a negative random component means from the (adjusted) base to the
|
||||
* end of the dungeon.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
level_range(
|
||||
xint16 dgn,
|
||||
int base, int randc, int chain,
|
||||
@@ -412,7 +413,7 @@ level_range(
|
||||
return 1;
|
||||
}
|
||||
|
||||
static xint16
|
||||
staticfn xint16
|
||||
parent_dlevel(const char *s, struct proto_dungeon *pd)
|
||||
{
|
||||
int i, j, num, base, dnum = parent_dnum(s, pd);
|
||||
@@ -437,7 +438,7 @@ parent_dlevel(const char *s, struct proto_dungeon *pd)
|
||||
}
|
||||
|
||||
/* Convert from the temporary branch type to the dungeon branch type. */
|
||||
static int
|
||||
staticfn int
|
||||
correct_branch_type(struct tmpbranch *tbr)
|
||||
{
|
||||
switch (tbr->type) {
|
||||
@@ -511,7 +512,7 @@ insert_branch(branch *new_branch, boolean extract_first)
|
||||
#undef branch_val
|
||||
|
||||
/* Add a dungeon branch to the branch list. */
|
||||
static branch *
|
||||
staticfn branch *
|
||||
add_branch(
|
||||
int dgn, int child_entry_level,
|
||||
struct proto_dungeon *pd)
|
||||
@@ -542,7 +543,7 @@ add_branch(
|
||||
* level that has a dungeon number less than the dungeon number of the
|
||||
* last entry.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
add_level(s_level *new_lev)
|
||||
{
|
||||
s_level *prev, *curr;
|
||||
@@ -563,7 +564,7 @@ add_level(s_level *new_lev)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
init_level(int dgn, int proto_index, struct proto_dungeon *pd)
|
||||
{
|
||||
s_level *new_level;
|
||||
@@ -595,7 +596,7 @@ init_level(int dgn, int proto_index, struct proto_dungeon *pd)
|
||||
new_level->next = (s_level *) 0;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
possible_places(
|
||||
int idx, /* prototype index */
|
||||
boolean *map, /* array MAXLEVEL+1 in length */
|
||||
@@ -629,7 +630,7 @@ possible_places(
|
||||
DISABLE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
/* Pick the nth TRUE entry in the given boolean array. */
|
||||
static xint16
|
||||
staticfn xint16
|
||||
pick_level(
|
||||
boolean *map, /* an array MAXLEVEL+1 in size */
|
||||
int nth)
|
||||
@@ -646,9 +647,9 @@ pick_level(
|
||||
RESTORE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
#ifdef DDEBUG
|
||||
static void indent(int);
|
||||
staticfn void indent(int);
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
indent(int d)
|
||||
{
|
||||
while (d-- > 0)
|
||||
@@ -663,7 +664,7 @@ indent(int d)
|
||||
* all possible places have been tried. If all possible places have
|
||||
* been exhausted, return false.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
place_level(int proto_index, struct proto_dungeon *pd)
|
||||
{
|
||||
boolean map[MAXLEVEL + 1]; /* valid levels are 1..MAXLEVEL inclusive */
|
||||
@@ -741,7 +742,7 @@ static struct level_map {
|
||||
#undef X_LOCATE
|
||||
#undef X_GOAL
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
get_dgn_flags(lua_State *L)
|
||||
{
|
||||
int dgn_flags = 0;
|
||||
@@ -778,7 +779,7 @@ get_dgn_flags(lua_State *L)
|
||||
return dgn_flags;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
get_dgn_align(lua_State *L)
|
||||
{
|
||||
static const char *const dgnaligns[] = {
|
||||
@@ -794,7 +795,7 @@ get_dgn_align(lua_State *L)
|
||||
return a;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
init_dungeon_levels(
|
||||
lua_State *L,
|
||||
struct proto_dungeon *pd,
|
||||
@@ -864,7 +865,7 @@ init_dungeon_levels(
|
||||
panic("init_dungeon: too many special levels");
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
init_dungeon_branches(
|
||||
lua_State *L,
|
||||
struct proto_dungeon *pd,
|
||||
@@ -930,7 +931,7 @@ init_dungeon_branches(
|
||||
panic("init_dungeon: too many branches");
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
init_dungeon_set_entry(struct proto_dungeon *pd, int dngidx)
|
||||
{
|
||||
int dgn_entry = pd->tmpdungeon[dngidx].entry_lev;
|
||||
@@ -957,7 +958,7 @@ init_dungeon_set_entry(struct proto_dungeon *pd, int dngidx)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
init_dungeon_set_depth(struct proto_dungeon *pd, int dngidx)
|
||||
{
|
||||
branch *br;
|
||||
@@ -994,7 +995,7 @@ init_dungeon_set_depth(struct proto_dungeon *pd, int dngidx)
|
||||
- (gd.dungeons[dngidx].entry_lev - 1);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
init_dungeon_dungeons(
|
||||
lua_State *L,
|
||||
struct proto_dungeon *pd,
|
||||
@@ -1104,7 +1105,7 @@ init_dungeon_dungeons(
|
||||
}
|
||||
|
||||
/* initialize the Castle drawbridge tune */
|
||||
static void
|
||||
staticfn void
|
||||
init_castle_tune(void)
|
||||
{
|
||||
int i;
|
||||
@@ -1115,7 +1116,7 @@ init_castle_tune(void)
|
||||
}
|
||||
|
||||
/* fix up the special level names and locations for quick access */
|
||||
static void
|
||||
staticfn void
|
||||
fixup_level_locations(void)
|
||||
{
|
||||
int i;
|
||||
@@ -1177,7 +1178,7 @@ fixup_level_locations(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
free_proto_dungeon(struct proto_dungeon *pd)
|
||||
{
|
||||
int i;
|
||||
@@ -2130,7 +2131,7 @@ lev_by_name(const char *nam)
|
||||
|
||||
#undef dlev_in_current_branch
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
unplaced_floater(struct dungeon *dptr)
|
||||
{
|
||||
branch *br;
|
||||
@@ -2145,7 +2146,7 @@ unplaced_floater(struct dungeon *dptr)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
unreachable_level(d_level *lvl_p, boolean unplaced)
|
||||
{
|
||||
s_level *dummy;
|
||||
@@ -2159,7 +2160,7 @@ unreachable_level(d_level *lvl_p, boolean unplaced)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
tport_menu(
|
||||
winid win,
|
||||
char *entry,
|
||||
@@ -2195,7 +2196,7 @@ tport_menu(
|
||||
}
|
||||
|
||||
/* Convert a branch type to a string usable by print_dungeon(). */
|
||||
static const char *
|
||||
staticfn const char *
|
||||
br_string(int type)
|
||||
{
|
||||
switch (type) {
|
||||
@@ -2211,14 +2212,14 @@ br_string(int type)
|
||||
return " (unknown)";
|
||||
}
|
||||
|
||||
static char
|
||||
staticfn char
|
||||
chr_u_on_lvl(d_level *dlev)
|
||||
{
|
||||
return u.uz.dnum == dlev->dnum && u.uz.dlevel == dlev->dlevel ? '*' : ' ';
|
||||
}
|
||||
|
||||
/* Print all child branches between the lower and upper bounds. */
|
||||
static void
|
||||
staticfn void
|
||||
print_branch(
|
||||
winid win,
|
||||
int dnum, int lower_bound, int upper_bound,
|
||||
@@ -2433,7 +2434,7 @@ recbranch_mapseen(d_level *source, d_level *dest)
|
||||
}
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
get_annotation(d_level *lev)
|
||||
{
|
||||
mapseen *mptr;
|
||||
@@ -2455,7 +2456,7 @@ print_level_annotation(void)
|
||||
|
||||
/* ask user to annotate level lev.
|
||||
if lev is NULL, uses current level. */
|
||||
static void
|
||||
staticfn void
|
||||
query_annotation(d_level *lev)
|
||||
{
|
||||
mapseen *mptr;
|
||||
@@ -2592,7 +2593,7 @@ load_exclusions(NHFILE *nhfp)
|
||||
}
|
||||
|
||||
/* find the particular mapseen object in the chain; may return null */
|
||||
static mapseen *
|
||||
staticfn mapseen *
|
||||
find_mapseen(d_level *lev)
|
||||
{
|
||||
mapseen *mptr;
|
||||
@@ -2604,7 +2605,7 @@ find_mapseen(d_level *lev)
|
||||
return mptr;
|
||||
}
|
||||
|
||||
static mapseen *
|
||||
staticfn mapseen *
|
||||
find_mapseen_by_str(const char *s)
|
||||
{
|
||||
mapseen *mptr;
|
||||
@@ -2650,7 +2651,7 @@ rm_mapseen(int ledger_num)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
save_mapseen(NHFILE *nhfp, mapseen *mptr)
|
||||
{
|
||||
branch *curr;
|
||||
@@ -2681,7 +2682,7 @@ save_mapseen(NHFILE *nhfp, mapseen *mptr)
|
||||
savecemetery(nhfp, &mptr->final_resting_place);
|
||||
}
|
||||
|
||||
static mapseen *
|
||||
staticfn mapseen *
|
||||
load_mapseen(NHFILE *nhfp)
|
||||
{
|
||||
int branchnum = 0, brindx;
|
||||
@@ -2842,7 +2843,7 @@ init_mapseen(d_level *lev)
|
||||
/* || (feat).water || (feat).ice || (feat).lava */
|
||||
|
||||
/* returns true if this level has something interesting to print out */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
interest_mapseen(mapseen *mptr)
|
||||
{
|
||||
if (on_level(&u.uz, &mptr->lev))
|
||||
@@ -2913,7 +2914,7 @@ update_mapseen_for(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* count mapseen feature from lastseentyp at x,y */
|
||||
static void
|
||||
staticfn void
|
||||
count_feat_lastseentyp(
|
||||
mapseen *mptr, /* remembered data for a level; update feat.X counts */
|
||||
coordxy x, coordxy y)
|
||||
@@ -3304,7 +3305,7 @@ show_overview(
|
||||
}
|
||||
|
||||
/* display endgame levels or non-endgame levels, not both */
|
||||
static void
|
||||
staticfn void
|
||||
traverse_mapseenchn(
|
||||
int viewendgame, /* 0: show endgame branch; 1: show other branches */
|
||||
winid win, /* output window */
|
||||
@@ -3328,7 +3329,7 @@ traverse_mapseenchn(
|
||||
}
|
||||
}
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
seen_string(xint16 x, const char *obj)
|
||||
{
|
||||
/* players are computer scientists: 0, 1, 2, n */
|
||||
@@ -3348,7 +3349,7 @@ seen_string(xint16 x, const char *obj)
|
||||
}
|
||||
|
||||
/* better br_string */
|
||||
static const char *
|
||||
staticfn const char *
|
||||
br_string2(branch *br)
|
||||
{
|
||||
/* Special case: quest portal says closed if kicked from quest */
|
||||
@@ -3400,7 +3401,7 @@ endgamelevelname(char *outbuf, int indx)
|
||||
return outbuf;
|
||||
}
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
shop_string(int rtype)
|
||||
{
|
||||
const char *str = "shop"; /* catchall */
|
||||
@@ -3451,7 +3452,7 @@ shop_string(int rtype)
|
||||
|
||||
/* if player knows about the mastermind tune, append it to Castle annotation;
|
||||
if drawbridge has been destroyed, flags.castletune will be zero */
|
||||
static char *
|
||||
staticfn char *
|
||||
tunesuffix(
|
||||
mapseen *mptr,
|
||||
char *outbuf,
|
||||
@@ -3507,7 +3508,7 @@ tunesuffix(
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
print_mapseen(
|
||||
winid win, mapseen *mptr,
|
||||
int final, /* -1: as menu; 0: not final;
|
||||
|
||||
@@ -5,46 +5,46 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static int eatmdone(void);
|
||||
static int eatfood(void);
|
||||
static struct obj *costly_tin(int);
|
||||
static int opentin(void);
|
||||
static int unfaint(void);
|
||||
staticfn int eatmdone(void);
|
||||
staticfn int eatfood(void);
|
||||
staticfn struct obj *costly_tin(int);
|
||||
staticfn int opentin(void);
|
||||
staticfn int unfaint(void);
|
||||
|
||||
static const char *food_xname(struct obj *, boolean);
|
||||
static void choke(struct obj *);
|
||||
static void recalc_wt(void);
|
||||
static int adj_victual_nutrition(void);
|
||||
static struct obj *touchfood(struct obj *) NONNULL;
|
||||
static void do_reset_eat(void);
|
||||
static void done_eating(boolean);
|
||||
static void cprefx(int);
|
||||
static boolean temp_givit(int, struct permonst *);
|
||||
static void givit(int, struct permonst *);
|
||||
static void eye_of_newt_buzz(void);
|
||||
static void cpostfx(int);
|
||||
static void consume_tin(const char *);
|
||||
static void start_tin(struct obj *);
|
||||
static int eatcorpse(struct obj *);
|
||||
static void start_eating(struct obj *, boolean);
|
||||
static void garlic_breath(struct monst *);
|
||||
static void fprefx(struct obj *);
|
||||
static void fpostfx(struct obj *);
|
||||
static int bite(void);
|
||||
static int edibility_prompts(struct obj *);
|
||||
static int doeat_nonfood(struct obj *);
|
||||
static int tinopen_ok(struct obj *);
|
||||
static int rottenfood(struct obj *);
|
||||
static void eatspecial(void);
|
||||
static int bounded_increase(int, int, int);
|
||||
static void accessory_has_effect(struct obj *);
|
||||
static void eataccessory(struct obj *);
|
||||
static const char *foodword(struct obj *);
|
||||
static int tin_variety(struct obj *, boolean);
|
||||
static boolean maybe_cannibal(int, boolean);
|
||||
static int eat_ok(struct obj *);
|
||||
static int offer_ok(struct obj *);
|
||||
static int tin_ok(struct obj *);
|
||||
staticfn const char *food_xname(struct obj *, boolean);
|
||||
staticfn void choke(struct obj *);
|
||||
staticfn void recalc_wt(void);
|
||||
staticfn int adj_victual_nutrition(void);
|
||||
staticfn struct obj *touchfood(struct obj *) NONNULL;
|
||||
staticfn void do_reset_eat(void);
|
||||
staticfn void done_eating(boolean);
|
||||
staticfn void cprefx(int);
|
||||
staticfn boolean temp_givit(int, struct permonst *);
|
||||
staticfn void givit(int, struct permonst *);
|
||||
staticfn void eye_of_newt_buzz(void);
|
||||
staticfn void cpostfx(int);
|
||||
staticfn void consume_tin(const char *);
|
||||
staticfn void start_tin(struct obj *);
|
||||
staticfn int eatcorpse(struct obj *);
|
||||
staticfn void start_eating(struct obj *, boolean);
|
||||
staticfn void garlic_breath(struct monst *);
|
||||
staticfn void fprefx(struct obj *);
|
||||
staticfn void fpostfx(struct obj *);
|
||||
staticfn int bite(void);
|
||||
staticfn int edibility_prompts(struct obj *);
|
||||
staticfn int doeat_nonfood(struct obj *);
|
||||
staticfn int tinopen_ok(struct obj *);
|
||||
staticfn int rottenfood(struct obj *);
|
||||
staticfn void eatspecial(void);
|
||||
staticfn int bounded_increase(int, int, int);
|
||||
staticfn void accessory_has_effect(struct obj *);
|
||||
staticfn void eataccessory(struct obj *);
|
||||
staticfn const char *foodword(struct obj *);
|
||||
staticfn int tin_variety(struct obj *, boolean);
|
||||
staticfn boolean maybe_cannibal(int, boolean);
|
||||
staticfn int eat_ok(struct obj *);
|
||||
staticfn int offer_ok(struct obj *);
|
||||
staticfn int tin_ok(struct obj *);
|
||||
|
||||
/* also used to see if you're allowed to eat cats and dogs */
|
||||
#define CANNIBAL_ALLOWED() (Role_if(PM_CAVE_DWELLER) || Race_if(PM_ORC))
|
||||
@@ -158,7 +158,7 @@ static const struct {
|
||||
#define TTSZ SIZE(tintxts)
|
||||
|
||||
/* called after mimicking is over */
|
||||
static int
|
||||
staticfn int
|
||||
eatmdone(void)
|
||||
{
|
||||
/* release `eatmbuf' */
|
||||
@@ -212,7 +212,7 @@ eatmupdate(void)
|
||||
}
|
||||
|
||||
/* ``[the(] singular(food, xname) [)]'' */
|
||||
static const char *
|
||||
staticfn const char *
|
||||
food_xname(struct obj *food, boolean the_pfx)
|
||||
{
|
||||
const char *result;
|
||||
@@ -240,7 +240,7 @@ food_xname(struct obj *food, boolean the_pfx)
|
||||
*
|
||||
* To a full belly all food is bad. (It.)
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
choke(struct obj *food)
|
||||
{
|
||||
/* only happens if you were satiated */
|
||||
@@ -287,7 +287,7 @@ choke(struct obj *food)
|
||||
}
|
||||
|
||||
/* modify victual.piece->owt depending on time spent consuming it */
|
||||
static void
|
||||
staticfn void
|
||||
recalc_wt(void)
|
||||
{
|
||||
struct obj *piece = gc.context.victual.piece;
|
||||
@@ -333,7 +333,7 @@ obj_nutrition(struct obj *otmp)
|
||||
/* nutrition increment for next byte; this used to be factored into
|
||||
victual.piece->oeaten but that produced weight change if hero
|
||||
polymorphed to or from one of the races which has nutrition adjusted */
|
||||
static int
|
||||
staticfn int
|
||||
adj_victual_nutrition(void)
|
||||
{
|
||||
int otyp = gc.context.victual.piece->otyp;
|
||||
@@ -354,7 +354,7 @@ adj_victual_nutrition(void)
|
||||
return nut;
|
||||
}
|
||||
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
touchfood(struct obj *otmp)
|
||||
{
|
||||
if (otmp->quan > 1L) {
|
||||
@@ -414,7 +414,7 @@ food_substitution(struct obj *old_obj, struct obj *new_obj)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
do_reset_eat(void)
|
||||
{
|
||||
debugpline0("do_reset_eat...");
|
||||
@@ -484,10 +484,10 @@ eating_dangerous_corpse(int res)
|
||||
}
|
||||
|
||||
#if 0 /* no longer used */
|
||||
static void maybe_extend_timed_resist(int);
|
||||
staticfn void maybe_extend_timed_resist(int);
|
||||
|
||||
/* if temp resist against 'prop' is about to timeout, extend it slightly */
|
||||
static void
|
||||
staticfn void
|
||||
maybe_extend_timed_resist(int prop)
|
||||
{
|
||||
long timeout = temp_resist(prop);
|
||||
@@ -506,7 +506,7 @@ maybe_extend_timed_resist(int prop)
|
||||
#endif
|
||||
|
||||
/* called each move during eating process */
|
||||
static int
|
||||
staticfn int
|
||||
eatfood(void)
|
||||
{
|
||||
struct obj *food = gc.context.victual.piece;
|
||||
@@ -531,7 +531,7 @@ eatfood(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
done_eating(boolean message)
|
||||
{
|
||||
struct obj *piece = gc.context.victual.piece;
|
||||
@@ -739,7 +739,7 @@ eat_brains(
|
||||
}
|
||||
|
||||
/* eating a corpse or egg of one's own species is usually naughty */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
maybe_cannibal(int pm, boolean allowmsg)
|
||||
{
|
||||
static NEARDATA long ate_brains = 0L;
|
||||
@@ -772,7 +772,7 @@ maybe_cannibal(int pm, boolean allowmsg)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
cprefx(int pm)
|
||||
{
|
||||
(void) maybe_cannibal(pm, TRUE);
|
||||
@@ -968,7 +968,7 @@ should_givit(int type, struct permonst *ptr)
|
||||
return (ptr->mlevel > rn2(chance));
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
temp_givit(int type, struct permonst *ptr)
|
||||
{
|
||||
int chance = (type == STONE_RES) ? 6 : (type == ACID_RES) ? 3 : 0;
|
||||
@@ -979,7 +979,7 @@ temp_givit(int type, struct permonst *ptr)
|
||||
/* givit() tries to give you an intrinsic based on the monster's level
|
||||
* and what type of intrinsic it is trying to give you.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
givit(int type, struct permonst *ptr)
|
||||
{
|
||||
debugpline1("Attempting to give intrinsic %d", type);
|
||||
@@ -1079,7 +1079,7 @@ givit(int type, struct permonst *ptr)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
eye_of_newt_buzz(void)
|
||||
{
|
||||
/* MRKR: "eye of newt" may give small magical energy boost */
|
||||
@@ -1105,7 +1105,7 @@ eye_of_newt_buzz(void)
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
/* called after completely consuming a corpse */
|
||||
static void
|
||||
staticfn void
|
||||
cpostfx(int pm)
|
||||
{
|
||||
int tmp = 0;
|
||||
@@ -1351,7 +1351,7 @@ violated_vegetarian(void)
|
||||
|
||||
/* common code to check and possibly charge for 1 gc.context.tin.tin,
|
||||
* will split() gc.context.tin.tin if necessary */
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
costly_tin(int alter_type) /* COST_xxx */
|
||||
{
|
||||
struct obj *tin = gc.context.tin.tin;
|
||||
@@ -1451,7 +1451,7 @@ set_tin_variety(struct obj *obj, int forcetype)
|
||||
obj->spe = -(r + 1); /* offset by 1 to allow index 0 */
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
tin_variety(
|
||||
struct obj *obj,
|
||||
boolean displ) /* we're just displaying so leave things alone */
|
||||
@@ -1477,7 +1477,7 @@ tin_variety(
|
||||
return r;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
consume_tin(const char *mesg)
|
||||
{
|
||||
const char *what;
|
||||
@@ -1619,7 +1619,7 @@ consume_tin(const char *mesg)
|
||||
}
|
||||
|
||||
/* called during each move whilst opening a tin */
|
||||
static int
|
||||
staticfn int
|
||||
opentin(void)
|
||||
{
|
||||
/* perhaps it was stolen (although that should cause interruption) */
|
||||
@@ -1639,7 +1639,7 @@ opentin(void)
|
||||
}
|
||||
|
||||
/* called when starting to open a tin */
|
||||
static void
|
||||
staticfn void
|
||||
start_tin(struct obj *otmp)
|
||||
{
|
||||
const char *mesg = 0;
|
||||
@@ -1728,7 +1728,7 @@ Hear_again(void)
|
||||
}
|
||||
|
||||
/* called on the "first bite" of rotten food */
|
||||
static int
|
||||
staticfn int
|
||||
rottenfood(struct obj *obj)
|
||||
{
|
||||
pline("Blecch! %s %s!",
|
||||
@@ -1770,7 +1770,7 @@ rottenfood(struct obj *obj)
|
||||
}
|
||||
|
||||
/* called when a corpse is selected as food */
|
||||
static int
|
||||
staticfn int
|
||||
eatcorpse(struct obj *otmp)
|
||||
{
|
||||
int retcode = 0, tp = 0, mnum = otmp->corpsenm;
|
||||
@@ -1935,7 +1935,7 @@ eatcorpse(struct obj *otmp)
|
||||
}
|
||||
|
||||
/* called as you start to eat */
|
||||
static void
|
||||
staticfn void
|
||||
start_eating(struct obj *otmp, boolean already_partly_eaten)
|
||||
{
|
||||
const char *old_nomovemsg, *save_nomovemsg;
|
||||
@@ -1998,7 +1998,7 @@ eating_glob(struct obj *glob)
|
||||
}
|
||||
|
||||
/* scare nearby monster when hero eats garlic */
|
||||
static void
|
||||
staticfn void
|
||||
garlic_breath(struct monst *mtmp)
|
||||
{
|
||||
if (olfaction(mtmp->data) && distu(mtmp->mx, mtmp->my) < 7)
|
||||
@@ -2011,7 +2011,7 @@ garlic_breath(struct monst *mtmp)
|
||||
* Messages should use present tense since multi-turn food won't be
|
||||
* finishing at the time they're issued.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
fprefx(struct obj *otmp)
|
||||
{
|
||||
switch (otmp->otyp) {
|
||||
@@ -2120,7 +2120,7 @@ fprefx(struct obj *otmp)
|
||||
}
|
||||
|
||||
/* increment a combat intrinsic with limits on its growth */
|
||||
static int
|
||||
staticfn int
|
||||
bounded_increase(int old, int inc, int typ)
|
||||
{
|
||||
int absold, absinc, sgnold, sgninc;
|
||||
@@ -2157,14 +2157,14 @@ bounded_increase(int old, int inc, int typ)
|
||||
return old + inc;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
accessory_has_effect(struct obj *otmp)
|
||||
{
|
||||
pline("Magic spreads through your body as you digest the %s.",
|
||||
(otmp->oclass == RING_CLASS) ? "ring" : "amulet");
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
eataccessory(struct obj *otmp)
|
||||
{
|
||||
int typ = otmp->otyp;
|
||||
@@ -2312,7 +2312,7 @@ eataccessory(struct obj *otmp)
|
||||
}
|
||||
|
||||
/* called after eating non-food */
|
||||
static void
|
||||
staticfn void
|
||||
eatspecial(void)
|
||||
{
|
||||
struct obj *otmp = gc.context.victual.piece;
|
||||
@@ -2396,7 +2396,7 @@ static const char *const foodwords[] = {
|
||||
"plastic", "glass", "rich food", "stone"
|
||||
};
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
foodword(struct obj *otmp)
|
||||
{
|
||||
if (otmp->oclass == FOOD_CLASS)
|
||||
@@ -2408,7 +2408,7 @@ foodword(struct obj *otmp)
|
||||
}
|
||||
|
||||
/* called after consuming (non-corpse) food */
|
||||
static void
|
||||
staticfn void
|
||||
fpostfx(struct obj *otmp)
|
||||
{
|
||||
switch (otmp->otyp) {
|
||||
@@ -2504,9 +2504,9 @@ fpostfx(struct obj *otmp)
|
||||
/* intended for eating a spellbook while polymorphed, but not used;
|
||||
"leather" applied to appearance, not composition, and has been
|
||||
changed to "leathery" to reflect that */
|
||||
static boolean leather_cover(struct obj *);
|
||||
staticfn boolean leather_cover(struct obj *);
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
leather_cover(struct obj *otmp)
|
||||
{
|
||||
const char *odesc = OBJ_DESCR(objects[otmp->otyp]);
|
||||
@@ -2524,7 +2524,7 @@ leather_cover(struct obj *otmp)
|
||||
* return 1 if the food was dangerous and you chose to stop.
|
||||
* return 2 if the food was dangerous and you chose to eat it anyway.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
edibility_prompts(struct obj *otmp)
|
||||
{
|
||||
/* Blessed food detection grants hero a one-use
|
||||
@@ -2631,7 +2631,7 @@ edibility_prompts(struct obj *otmp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
doeat_nonfood(struct obj *otmp)
|
||||
{
|
||||
int basenutrit; /* nutrition of full item */
|
||||
@@ -2970,7 +2970,7 @@ doeat(void)
|
||||
}
|
||||
|
||||
/* getobj callback for object to be opened with a tin opener */
|
||||
static int
|
||||
staticfn int
|
||||
tinopen_ok(struct obj *obj)
|
||||
{
|
||||
if (obj && obj->otyp == TIN)
|
||||
@@ -3015,7 +3015,7 @@ use_tin_opener(struct obj *obj)
|
||||
/* Take a single bite from a piece of food, checking for choking and
|
||||
* modifying usedtime. Returns 1 if they choked and survived, 0 otherwise.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
bite(void)
|
||||
{
|
||||
/* hack to pacify static analyzer incorporated into gcc 12.2 */
|
||||
@@ -3218,7 +3218,7 @@ lesshungry(int num)
|
||||
newuhs(FALSE);
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
unfaint(void)
|
||||
{
|
||||
(void) Hear_again();
|
||||
@@ -3399,7 +3399,7 @@ newuhs(boolean incr)
|
||||
}
|
||||
|
||||
/* getobj callback for object to eat - effectively just wraps is_edible() */
|
||||
static int
|
||||
staticfn int
|
||||
eat_ok(struct obj *obj)
|
||||
{
|
||||
/* 'getobj_else' will be non-zero if floor food is present and
|
||||
@@ -3421,7 +3421,7 @@ eat_ok(struct obj *obj)
|
||||
|
||||
/* getobj callback for object to be offered (corpses and things that look like
|
||||
* the Amulet only */
|
||||
static int
|
||||
staticfn int
|
||||
offer_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
@@ -3443,7 +3443,7 @@ offer_ok(struct obj *obj)
|
||||
}
|
||||
|
||||
/* getobj callback for object to be tinned */
|
||||
static int
|
||||
staticfn int
|
||||
tin_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
|
||||
@@ -20,26 +20,26 @@
|
||||
#define nowrap_add(a, b) (a = ((a + b) < 0 ? LONG_MAX : (a + b)))
|
||||
|
||||
#ifndef NO_SIGNAL
|
||||
static void done_intr(int);
|
||||
staticfn void done_intr(int);
|
||||
# if defined(UNIX) || defined(VMS) || defined(__EMX__)
|
||||
static void done_hangup(int);
|
||||
staticfn void done_hangup(int);
|
||||
# endif
|
||||
#endif
|
||||
static void disclose(int, boolean);
|
||||
static void get_valuables(struct obj *) NO_NNARGS;
|
||||
static void sort_valuables(struct valuable_data *, int);
|
||||
static void artifact_score(struct obj *, boolean, winid);
|
||||
static boolean fuzzer_savelife(int);
|
||||
staticfn void disclose(int, boolean);
|
||||
staticfn void get_valuables(struct obj *) NO_NNARGS;
|
||||
staticfn void sort_valuables(struct valuable_data *, int);
|
||||
staticfn void artifact_score(struct obj *, boolean, winid);
|
||||
staticfn boolean fuzzer_savelife(int);
|
||||
ATTRNORETURN static void really_done(int) NORETURN;
|
||||
static void savelife(int);
|
||||
static boolean should_query_disclose_option(int, char *);
|
||||
staticfn void savelife(int);
|
||||
staticfn boolean should_query_disclose_option(int, char *);
|
||||
#ifdef DUMPLOG
|
||||
static void dump_plines(void);
|
||||
staticfn void dump_plines(void);
|
||||
#endif
|
||||
static void dump_everything(int, time_t);
|
||||
static void fixup_death(int);
|
||||
static int wordcount(char *);
|
||||
static void bel_copy1(char **, char *);
|
||||
staticfn void dump_everything(int, time_t);
|
||||
staticfn void fixup_death(int);
|
||||
staticfn int wordcount(char *);
|
||||
staticfn void bel_copy1(char **, char *);
|
||||
|
||||
#if defined(__BEOS__) || defined(MICRO) || defined(OS2) || defined(WIN32)
|
||||
ATTRNORETURN extern void nethack_exit(int) NORETURN;
|
||||
@@ -160,7 +160,7 @@ done2(void)
|
||||
#ifndef NO_SIGNAL
|
||||
/* called as signal() handler, so sent at least 1 arg */
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
staticfn void
|
||||
done_intr(int sig_unused UNUSED)
|
||||
{
|
||||
done_stopprint++;
|
||||
@@ -175,7 +175,7 @@ done_intr(int sig_unused UNUSED)
|
||||
|
||||
#if defined(UNIX) || defined(VMS) || defined(__EMX__)
|
||||
/* signal() handler */
|
||||
static void
|
||||
staticfn void
|
||||
done_hangup(int sig)
|
||||
{
|
||||
#ifdef HANGUPHANDLING
|
||||
@@ -360,7 +360,7 @@ static const struct {
|
||||
|
||||
/* clear away while-helpless when the cause of death caused that
|
||||
helplessness (ie, "petrified by <foo> while getting stoned") */
|
||||
static void
|
||||
staticfn void
|
||||
fixup_death(int how)
|
||||
{
|
||||
int i;
|
||||
@@ -470,7 +470,7 @@ panic VA_DECL(const char *, str)
|
||||
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
should_query_disclose_option(int category, char *defquery)
|
||||
{
|
||||
int idx;
|
||||
@@ -512,7 +512,7 @@ should_query_disclose_option(int category, char *defquery)
|
||||
}
|
||||
|
||||
#ifdef DUMPLOG
|
||||
static void
|
||||
staticfn void
|
||||
dump_plines(void)
|
||||
{
|
||||
int i, j;
|
||||
@@ -535,7 +535,7 @@ dump_plines(void)
|
||||
#endif /* DUMPLOG */
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
staticfn void
|
||||
dump_everything(
|
||||
int how, /* ASCENDED, ESCAPED, QUIT, etc */
|
||||
time_t when) /* date+time at end of game */
|
||||
@@ -610,7 +610,7 @@ dump_everything(
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
disclose(int how, boolean taken)
|
||||
{
|
||||
char c = '\0', defquery;
|
||||
@@ -694,7 +694,7 @@ disclose(int how, boolean taken)
|
||||
}
|
||||
|
||||
/* try to get the player back in a viable state after being killed */
|
||||
static void
|
||||
staticfn void
|
||||
savelife(int how)
|
||||
{
|
||||
int uhpmin;
|
||||
@@ -753,7 +753,7 @@ savelife(int how)
|
||||
* Get valuables from the given list. Revised code: the list always remains
|
||||
* intact.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
get_valuables(struct obj *list) /* inventory or container contents */
|
||||
{
|
||||
struct obj *obj;
|
||||
@@ -788,7 +788,7 @@ get_valuables(struct obj *list) /* inventory or container contents */
|
||||
* Sort collected valuables, most frequent to least. We could just
|
||||
* as easily use qsort, but we don't care about efficiency here.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
sort_valuables(
|
||||
struct valuable_data list[],
|
||||
int size) /* max value is less than 20 */
|
||||
@@ -897,7 +897,7 @@ done_object_cleanup(void)
|
||||
}
|
||||
|
||||
/* called twice; first to calculate total, then to list relevant items */
|
||||
static void
|
||||
staticfn void
|
||||
artifact_score(
|
||||
struct obj *list,
|
||||
boolean counting, /* true => add up points; false => display them */
|
||||
@@ -934,7 +934,7 @@ artifact_score(
|
||||
|
||||
/* when dying while running the debug fuzzer, [almost] always keep going;
|
||||
True: forced survival; False: doomed unless wearing life-save amulet */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
fuzzer_savelife(int how)
|
||||
{
|
||||
/*
|
||||
@@ -1113,7 +1113,7 @@ done(int how)
|
||||
}
|
||||
|
||||
/* separated from done() in order to specify the __noreturn__ attribute */
|
||||
static void
|
||||
staticfn void
|
||||
really_done(int how)
|
||||
{
|
||||
boolean taken;
|
||||
@@ -1774,7 +1774,7 @@ restore_killers(NHFILE *nhfp)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
wordcount(char *p)
|
||||
{
|
||||
int words = 0;
|
||||
@@ -1790,7 +1790,7 @@ wordcount(char *p)
|
||||
return words;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
bel_copy1(char **inp, char *out)
|
||||
{
|
||||
char *in = *inp;
|
||||
|
||||
+16
-16
@@ -38,14 +38,14 @@ struct _doengrave_ctx {
|
||||
size_t len; /* # of nonspace chars of new engraving text */
|
||||
};
|
||||
|
||||
static int stylus_ok(struct obj *);
|
||||
static boolean u_can_engrave(void);
|
||||
static void doengrave_ctx_init(struct _doengrave_ctx *);
|
||||
static void doengrave_sfx_item_WAN(struct _doengrave_ctx *);
|
||||
static boolean doengrave_sfx_item(struct _doengrave_ctx *);
|
||||
static void doengrave_ctx_verb(struct _doengrave_ctx *);
|
||||
static int engrave(void);
|
||||
static const char *blengr(void);
|
||||
staticfn int stylus_ok(struct obj *);
|
||||
staticfn boolean u_can_engrave(void);
|
||||
staticfn void doengrave_ctx_init(struct _doengrave_ctx *);
|
||||
staticfn void doengrave_sfx_item_WAN(struct _doengrave_ctx *);
|
||||
staticfn boolean doengrave_sfx_item(struct _doengrave_ctx *);
|
||||
staticfn void doengrave_ctx_verb(struct _doengrave_ctx *);
|
||||
staticfn int engrave(void);
|
||||
staticfn const char *blengr(void);
|
||||
|
||||
char *
|
||||
random_engraving(char *outbuf)
|
||||
@@ -423,7 +423,7 @@ freehand(void)
|
||||
}
|
||||
|
||||
/* getobj callback for an object to engrave with */
|
||||
static int
|
||||
staticfn int
|
||||
stylus_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
@@ -445,7 +445,7 @@ stylus_ok(struct obj *obj)
|
||||
}
|
||||
|
||||
/* can hero engrave at all (at their location)? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
u_can_engrave(void)
|
||||
{
|
||||
int levtyp = SURFACE_AT(u.ux, u.uy);
|
||||
@@ -487,7 +487,7 @@ u_can_engrave(void)
|
||||
}
|
||||
|
||||
/* initialize the doengrave data */
|
||||
static void
|
||||
staticfn void
|
||||
doengrave_ctx_init(struct _doengrave_ctx *de)
|
||||
{
|
||||
de->dengr = FALSE;
|
||||
@@ -525,7 +525,7 @@ doengrave_ctx_init(struct _doengrave_ctx *de)
|
||||
}
|
||||
|
||||
/* special engraving effects for WAND objects */
|
||||
static void
|
||||
staticfn void
|
||||
doengrave_sfx_item_WAN(struct _doengrave_ctx *de)
|
||||
{
|
||||
switch (de->otmp->otyp) {
|
||||
@@ -682,7 +682,7 @@ doengrave_sfx_item_WAN(struct _doengrave_ctx *de)
|
||||
}
|
||||
|
||||
/* special engraving effects for all objects */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
doengrave_sfx_item(struct _doengrave_ctx *de)
|
||||
{
|
||||
switch (de->otmp->oclass) {
|
||||
@@ -828,7 +828,7 @@ doengrave_sfx_item(struct _doengrave_ctx *de)
|
||||
}
|
||||
|
||||
/* which verb phrasing to use for engraving */
|
||||
static void
|
||||
staticfn void
|
||||
doengrave_ctx_verb(struct _doengrave_ctx *de)
|
||||
{
|
||||
switch (de->type) {
|
||||
@@ -1178,7 +1178,7 @@ doengr_exit:
|
||||
}
|
||||
|
||||
/* occupation callback for engraving some text */
|
||||
static int
|
||||
staticfn int
|
||||
engrave(void)
|
||||
{
|
||||
struct engr *oep;
|
||||
@@ -1620,7 +1620,7 @@ static const char blind_writing[][21] = {
|
||||
0x69, 0x76, 0x6b, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
};
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
blengr(void)
|
||||
{
|
||||
return ROLL_FROM(blind_writing);
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
static int enermod(int);
|
||||
staticfn int enermod(int);
|
||||
|
||||
long
|
||||
newuexp(int lev)
|
||||
@@ -22,7 +22,7 @@ newuexp(int lev)
|
||||
return (10000000L * ((long) (lev - 19)));
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
enermod(int en)
|
||||
{
|
||||
switch (Role_switch) {
|
||||
|
||||
+4
-4
@@ -4,8 +4,8 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static int explosionmask(struct monst *, uchar, char) NONNULLARG1;
|
||||
static void engulfer_explosion_msg(uchar, char);
|
||||
staticfn int explosionmask(struct monst *, uchar, char) NONNULLARG1;
|
||||
staticfn void engulfer_explosion_msg(uchar, char);
|
||||
|
||||
/* Note: Arrays are column first, while the screen is row first */
|
||||
static const int explosion[3][3] = {
|
||||
@@ -22,7 +22,7 @@ enum explode_action {
|
||||
};
|
||||
|
||||
/* check if shield effects are needed for location affected by explosion */
|
||||
static int
|
||||
staticfn int
|
||||
explosionmask(
|
||||
struct monst *m, /* target monster (might be youmonst) */
|
||||
uchar adtyp, /* damage type */
|
||||
@@ -114,7 +114,7 @@ explosionmask(
|
||||
return res;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
engulfer_explosion_msg(uchar adtyp, char olet)
|
||||
{
|
||||
const char *adj = (char *) 0;
|
||||
|
||||
+6
-9
@@ -13,12 +13,11 @@
|
||||
#define XL_LEFT 4
|
||||
#define XL_RIGHT 8
|
||||
|
||||
static void roguejoin(coordxy, coordxy, coordxy, coordxy, int);
|
||||
static void roguecorr(coordxy, coordxy, int);
|
||||
static void miniwalk(coordxy, coordxy);
|
||||
staticfn void roguejoin(coordxy, coordxy, coordxy, coordxy, int);
|
||||
staticfn void roguecorr(coordxy, coordxy, int);
|
||||
staticfn void miniwalk(coordxy, coordxy);
|
||||
|
||||
static
|
||||
void
|
||||
staticfn void
|
||||
roguejoin(coordxy x1, coordxy y1, coordxy x2, coordxy y2, int horiz)
|
||||
{
|
||||
coordxy x, y, middle;
|
||||
@@ -42,8 +41,7 @@ roguejoin(coordxy x1, coordxy y1, coordxy x2, coordxy y2, int horiz)
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
staticfn void
|
||||
roguecorr(coordxy x, coordxy y, int dir)
|
||||
{
|
||||
coordxy fromx, fromy, tox, toy;
|
||||
@@ -137,8 +135,7 @@ roguecorr(coordxy x, coordxy y, int dir)
|
||||
}
|
||||
|
||||
/* Modified walkfrom() from mkmaze.c */
|
||||
static
|
||||
void
|
||||
staticfn void
|
||||
miniwalk(coordxy x, coordxy y)
|
||||
{
|
||||
int q, dir;
|
||||
|
||||
+180
-182
@@ -120,119 +120,119 @@ extern char *translate_path_variables(const char *, char *);
|
||||
extern char *sounddir; /* defined in sounds.c */
|
||||
#endif
|
||||
|
||||
static NHFILE *new_nhfile(void);
|
||||
static void free_nhfile(NHFILE *);
|
||||
staticfn NHFILE *new_nhfile(void);
|
||||
staticfn void free_nhfile(NHFILE *);
|
||||
#ifdef SELECTSAVED
|
||||
static int QSORTCALLBACK strcmp_wrap(const void *, const void *);
|
||||
staticfn int QSORTCALLBACK strcmp_wrap(const void *, const void *);
|
||||
#endif
|
||||
static char *set_bonesfile_name(char *, d_level *);
|
||||
static char *set_bonestemp_name(void);
|
||||
staticfn char *set_bonesfile_name(char *, d_level *);
|
||||
staticfn char *set_bonestemp_name(void);
|
||||
#ifdef COMPRESS
|
||||
static void redirect(const char *, const char *, FILE *, boolean);
|
||||
staticfn void redirect(const char *, const char *, FILE *, boolean);
|
||||
#endif
|
||||
#if defined(COMPRESS) || defined(ZLIB_COMP)
|
||||
static void docompress_file(const char *, boolean);
|
||||
staticfn void docompress_file(const char *, boolean);
|
||||
#endif
|
||||
#if defined(ZLIB_COMP)
|
||||
static boolean make_compressed_name(const char *, char *);
|
||||
staticfn boolean make_compressed_name(const char *, char *);
|
||||
#endif
|
||||
#ifndef USE_FCNTL
|
||||
static char *make_lockname(const char *, char *);
|
||||
staticfn char *make_lockname(const char *, char *);
|
||||
#endif
|
||||
static void set_configfile_name(const char *);
|
||||
static FILE *fopen_config_file(const char *, int);
|
||||
static int get_uchars(char *, uchar *, boolean, int, const char *);
|
||||
staticfn void set_configfile_name(const char *);
|
||||
staticfn FILE *fopen_config_file(const char *, int);
|
||||
staticfn int get_uchars(char *, uchar *, boolean, int, const char *);
|
||||
#ifdef NOCWD_ASSUMPTIONS
|
||||
static void adjust_prefix(char *, int);
|
||||
staticfn void adjust_prefix(char *, int);
|
||||
#endif
|
||||
static char *choose_random_part(char *, char);
|
||||
static boolean config_error_nextline(const char *);
|
||||
static void free_config_sections(void);
|
||||
static char *is_config_section(char *);
|
||||
static boolean handle_config_section(char *);
|
||||
staticfn char *choose_random_part(char *, char);
|
||||
staticfn boolean config_error_nextline(const char *);
|
||||
staticfn void free_config_sections(void);
|
||||
staticfn char *is_config_section(char *);
|
||||
staticfn boolean handle_config_section(char *);
|
||||
boolean parse_config_line(char *);
|
||||
static char *find_optparam(const char *);
|
||||
static boolean cnf_line_OPTIONS(char *);
|
||||
static boolean cnf_line_AUTOPICKUP_EXCEPTION(char *);
|
||||
static boolean cnf_line_BINDINGS(char *);
|
||||
static boolean cnf_line_AUTOCOMPLETE(char *);
|
||||
static boolean cnf_line_MSGTYPE(char *);
|
||||
static boolean cnf_line_HACKDIR(char *);
|
||||
static boolean cnf_line_LEVELDIR(char *);
|
||||
static boolean cnf_line_SAVEDIR(char *);
|
||||
static boolean cnf_line_BONESDIR(char *);
|
||||
static boolean cnf_line_DATADIR(char *);
|
||||
static boolean cnf_line_SCOREDIR(char *);
|
||||
static boolean cnf_line_LOCKDIR(char *);
|
||||
static boolean cnf_line_CONFIGDIR(char *);
|
||||
static boolean cnf_line_TROUBLEDIR(char *);
|
||||
static boolean cnf_line_NAME(char *);
|
||||
static boolean cnf_line_ROLE(char *);
|
||||
static boolean cnf_line_dogname(char *);
|
||||
static boolean cnf_line_catname(char *);
|
||||
static boolean cnf_line_WIZARDS(char *);
|
||||
static boolean cnf_line_SHELLERS(char *);
|
||||
static boolean cnf_line_EXPLORERS(char *);
|
||||
static boolean cnf_line_DEBUGFILES(char *);
|
||||
static boolean cnf_line_DUMPLOGFILE(char *);
|
||||
static boolean cnf_line_GENERICUSERS(char *);
|
||||
static boolean cnf_line_BONES_POOLS(char *);
|
||||
static boolean cnf_line_SUPPORT(char *);
|
||||
static boolean cnf_line_RECOVER(char *);
|
||||
static boolean cnf_line_CHECK_SAVE_UID(char *);
|
||||
static boolean cnf_line_CHECK_PLNAME(char *);
|
||||
static boolean cnf_line_SEDUCE(char *);
|
||||
static boolean cnf_line_HIDEUSAGE(char *);
|
||||
static boolean cnf_line_MAXPLAYERS(char *);
|
||||
static boolean cnf_line_PERSMAX(char *);
|
||||
static boolean cnf_line_PERS_IS_UID(char *);
|
||||
static boolean cnf_line_ENTRYMAX(char *);
|
||||
static boolean cnf_line_POINTSMIN(char *);
|
||||
static boolean cnf_line_MAX_STATUENAME_RANK(char *);
|
||||
static boolean cnf_line_LIVELOG(char *);
|
||||
static boolean cnf_line_PANICTRACE_LIBC(char *);
|
||||
static boolean cnf_line_PANICTRACE_GDB(char *);
|
||||
static boolean cnf_line_GDBPATH(char *);
|
||||
static boolean cnf_line_GREPPATH(char *);
|
||||
static boolean cnf_line_CRASHREPORTURL(char *);
|
||||
static boolean cnf_line_SAVEFORMAT(char *);
|
||||
static boolean cnf_line_BONESFORMAT(char *);
|
||||
static boolean cnf_line_ACCESSIBILITY(char *);
|
||||
static boolean cnf_line_PORTABLE_DEVICE_PATHS(char *);
|
||||
static boolean cnf_line_BOULDER(char *);
|
||||
static boolean cnf_line_MENUCOLOR(char *);
|
||||
static boolean cnf_line_HILITE_STATUS(char *);
|
||||
static boolean cnf_line_WARNINGS(char *);
|
||||
static boolean cnf_line_ROGUESYMBOLS(char *);
|
||||
static boolean cnf_line_SYMBOLS(char *);
|
||||
static boolean cnf_line_WIZKIT(char *);
|
||||
staticfn char *find_optparam(const char *);
|
||||
staticfn boolean cnf_line_OPTIONS(char *);
|
||||
staticfn boolean cnf_line_AUTOPICKUP_EXCEPTION(char *);
|
||||
staticfn boolean cnf_line_BINDINGS(char *);
|
||||
staticfn boolean cnf_line_AUTOCOMPLETE(char *);
|
||||
staticfn boolean cnf_line_MSGTYPE(char *);
|
||||
staticfn boolean cnf_line_HACKDIR(char *);
|
||||
staticfn boolean cnf_line_LEVELDIR(char *);
|
||||
staticfn boolean cnf_line_SAVEDIR(char *);
|
||||
staticfn boolean cnf_line_BONESDIR(char *);
|
||||
staticfn boolean cnf_line_DATADIR(char *);
|
||||
staticfn boolean cnf_line_SCOREDIR(char *);
|
||||
staticfn boolean cnf_line_LOCKDIR(char *);
|
||||
staticfn boolean cnf_line_CONFIGDIR(char *);
|
||||
staticfn boolean cnf_line_TROUBLEDIR(char *);
|
||||
staticfn boolean cnf_line_NAME(char *);
|
||||
staticfn boolean cnf_line_ROLE(char *);
|
||||
staticfn boolean cnf_line_dogname(char *);
|
||||
staticfn boolean cnf_line_catname(char *);
|
||||
staticfn boolean cnf_line_WIZARDS(char *);
|
||||
staticfn boolean cnf_line_SHELLERS(char *);
|
||||
staticfn boolean cnf_line_EXPLORERS(char *);
|
||||
staticfn boolean cnf_line_DEBUGFILES(char *);
|
||||
staticfn boolean cnf_line_DUMPLOGFILE(char *);
|
||||
staticfn boolean cnf_line_GENERICUSERS(char *);
|
||||
staticfn boolean cnf_line_BONES_POOLS(char *);
|
||||
staticfn boolean cnf_line_SUPPORT(char *);
|
||||
staticfn boolean cnf_line_RECOVER(char *);
|
||||
staticfn boolean cnf_line_CHECK_SAVE_UID(char *);
|
||||
staticfn boolean cnf_line_CHECK_PLNAME(char *);
|
||||
staticfn boolean cnf_line_SEDUCE(char *);
|
||||
staticfn boolean cnf_line_HIDEUSAGE(char *);
|
||||
staticfn boolean cnf_line_MAXPLAYERS(char *);
|
||||
staticfn boolean cnf_line_PERSMAX(char *);
|
||||
staticfn boolean cnf_line_PERS_IS_UID(char *);
|
||||
staticfn boolean cnf_line_ENTRYMAX(char *);
|
||||
staticfn boolean cnf_line_POINTSMIN(char *);
|
||||
staticfn boolean cnf_line_MAX_STATUENAME_RANK(char *);
|
||||
staticfn boolean cnf_line_LIVELOG(char *);
|
||||
staticfn boolean cnf_line_PANICTRACE_LIBC(char *);
|
||||
staticfn boolean cnf_line_PANICTRACE_GDB(char *);
|
||||
staticfn boolean cnf_line_GDBPATH(char *);
|
||||
staticfn boolean cnf_line_GREPPATH(char *);
|
||||
staticfn boolean cnf_line_CRASHREPORTURL(char *);
|
||||
staticfn boolean cnf_line_SAVEFORMAT(char *);
|
||||
staticfn boolean cnf_line_BONESFORMAT(char *);
|
||||
staticfn boolean cnf_line_ACCESSIBILITY(char *);
|
||||
staticfn boolean cnf_line_PORTABLE_DEVICE_PATHS(char *);
|
||||
staticfn boolean cnf_line_BOULDER(char *);
|
||||
staticfn boolean cnf_line_MENUCOLOR(char *);
|
||||
staticfn boolean cnf_line_HILITE_STATUS(char *);
|
||||
staticfn boolean cnf_line_WARNINGS(char *);
|
||||
staticfn boolean cnf_line_ROGUESYMBOLS(char *);
|
||||
staticfn boolean cnf_line_SYMBOLS(char *);
|
||||
staticfn boolean cnf_line_WIZKIT(char *);
|
||||
#ifdef USER_SOUNDS
|
||||
static boolean cnf_line_SOUNDDIR(char *);
|
||||
static boolean cnf_line_SOUND(char *);
|
||||
staticfn boolean cnf_line_SOUNDDIR(char *);
|
||||
staticfn boolean cnf_line_SOUND(char *);
|
||||
#endif
|
||||
static boolean cnf_line_QT_TILEWIDTH(char *);
|
||||
static boolean cnf_line_QT_TILEHEIGHT(char *);
|
||||
static boolean cnf_line_QT_FONTSIZE(char *);
|
||||
static boolean cnf_line_QT_COMPACT(char *);
|
||||
staticfn boolean cnf_line_QT_TILEWIDTH(char *);
|
||||
staticfn boolean cnf_line_QT_TILEHEIGHT(char *);
|
||||
staticfn boolean cnf_line_QT_FONTSIZE(char *);
|
||||
staticfn boolean cnf_line_QT_COMPACT(char *);
|
||||
struct _cnf_parser_state; /* defined below (far below...) */
|
||||
static void cnf_parser_init(struct _cnf_parser_state *parser);
|
||||
static void cnf_parser_done(struct _cnf_parser_state *parser);
|
||||
static void parse_conf_buf(struct _cnf_parser_state *parser,
|
||||
staticfn void cnf_parser_init(struct _cnf_parser_state *parser);
|
||||
staticfn void cnf_parser_done(struct _cnf_parser_state *parser);
|
||||
staticfn void parse_conf_buf(struct _cnf_parser_state *parser,
|
||||
boolean (*proc)(char *arg));
|
||||
/* next one is in extern.h; why here too? */
|
||||
boolean parse_conf_str(const char *str, boolean (*proc)(char *arg));
|
||||
static boolean parse_conf_file(FILE *fp, boolean (*proc)(char *arg));
|
||||
static void parseformat(int *, char *);
|
||||
static FILE *fopen_wizkit_file(void);
|
||||
static void wizkit_addinv(struct obj *);
|
||||
staticfn boolean parse_conf_file(FILE *fp, boolean (*proc)(char *arg));
|
||||
staticfn void parseformat(int *, char *);
|
||||
staticfn FILE *fopen_wizkit_file(void);
|
||||
staticfn void wizkit_addinv(struct obj *);
|
||||
boolean proc_wizkit_line(char *buf);
|
||||
void read_wizkit(void); /* in extern.h; why here too? */
|
||||
static FILE *fopen_sym_file(void);
|
||||
staticfn FILE *fopen_sym_file(void);
|
||||
|
||||
#ifdef SELF_RECOVER
|
||||
static boolean copy_bytes(int, int);
|
||||
staticfn boolean copy_bytes(int, int);
|
||||
#endif
|
||||
static NHFILE *viable_nhfile(NHFILE *);
|
||||
staticfn NHFILE *viable_nhfile(NHFILE *);
|
||||
|
||||
/* return a file's name without its path and optionally trailing 'type' */
|
||||
const char *
|
||||
@@ -512,7 +512,7 @@ zero_nhfile(NHFILE *nhfp)
|
||||
nhfp->fnidx = 0;
|
||||
}
|
||||
|
||||
static NHFILE *
|
||||
staticfn NHFILE *
|
||||
new_nhfile(void)
|
||||
{
|
||||
NHFILE *nhfp = (NHFILE *) alloc(sizeof(NHFILE));
|
||||
@@ -521,7 +521,7 @@ new_nhfile(void)
|
||||
return nhfp;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
free_nhfile(NHFILE *nhfp)
|
||||
{
|
||||
if (nhfp) {
|
||||
@@ -551,8 +551,7 @@ rewind_nhfile(NHFILE *nhfp)
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
NHFILE *
|
||||
staticfn NHFILE *
|
||||
viable_nhfile(NHFILE *nhfp)
|
||||
{
|
||||
/* perform some sanity checks before returning
|
||||
@@ -718,7 +717,7 @@ clearlocks(void)
|
||||
|
||||
#if defined(SELECTSAVED)
|
||||
/* qsort comparison routine */
|
||||
static int QSORTCALLBACK
|
||||
staticfn int QSORTCALLBACK
|
||||
strcmp_wrap(const void *p, const void *q)
|
||||
{
|
||||
#if defined(UNIX) && defined(QT_GRAPHICS)
|
||||
@@ -750,7 +749,7 @@ nhclose(int fd)
|
||||
/* set up "file" to be file name for retrieving bones, and return a
|
||||
* bonesid to be read/written in the bones file.
|
||||
*/
|
||||
static char *
|
||||
staticfn char *
|
||||
set_bonesfile_name(char *file, d_level *lev)
|
||||
{
|
||||
s_level *sptr;
|
||||
@@ -799,7 +798,7 @@ set_bonesfile_name(char *file, d_level *lev)
|
||||
* (we are not reading or writing level files while writing bones files, so
|
||||
* the same array may be used instead of copying.)
|
||||
*/
|
||||
static char *
|
||||
staticfn char *
|
||||
set_bonestemp_name(void)
|
||||
{
|
||||
char *tf;
|
||||
@@ -1426,7 +1425,7 @@ free_saved_games(char **saved)
|
||||
|
||||
#ifdef COMPRESS /* external compression */
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
redirect(
|
||||
const char *filename,
|
||||
const char *mode,
|
||||
@@ -1454,7 +1453,7 @@ redirect(
|
||||
*
|
||||
* cf. child() in unixunix.c.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
docompress_file(const char *filename, boolean uncomp)
|
||||
{
|
||||
char *cfn = 0;
|
||||
@@ -1659,7 +1658,7 @@ nh_uncompress(const char *filename UNUSED_if_not_COMPRESS)
|
||||
}
|
||||
|
||||
#ifdef ZLIB_COMP /* RLC 09 Mar 1999: Support internal ZLIB */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
make_compressed_name(const char *filename, char *cfn)
|
||||
{
|
||||
#ifndef SHORT_FILENAMES
|
||||
@@ -1690,7 +1689,7 @@ make_compressed_name(const char *filename, char *cfn)
|
||||
#endif /* SHORT_FILENAMES */
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
docompress_file(const char *filename, boolean uncomp)
|
||||
{
|
||||
gzFile compressedfile;
|
||||
@@ -1843,7 +1842,7 @@ static struct flock sflock; /* for unlocking, same as above */
|
||||
|
||||
|
||||
#ifndef USE_FCNTL
|
||||
static char *
|
||||
staticfn char *
|
||||
make_lockname(const char *filename UNUSED_conditional, char *lockname)
|
||||
{
|
||||
#if defined(UNIX) || defined(VMS) || defined(AMIGA) || defined(WIN32) \
|
||||
@@ -2158,14 +2157,14 @@ do_write_config_file(void)
|
||||
|
||||
/* remember the name of the file we're accessing;
|
||||
if may be used in option reject messages */
|
||||
static void
|
||||
staticfn void
|
||||
set_configfile_name(const char *fname)
|
||||
{
|
||||
(void) strncpy(configfile, fname, sizeof configfile - 1);
|
||||
configfile[sizeof configfile - 1] = '\0';
|
||||
}
|
||||
|
||||
static FILE *
|
||||
staticfn FILE *
|
||||
fopen_config_file(const char *filename, int src)
|
||||
{
|
||||
FILE *fp;
|
||||
@@ -2306,7 +2305,7 @@ fopen_config_file(const char *filename, int src)
|
||||
* NOTE: zeros are inserted unless modlist is TRUE, in which case the list
|
||||
* location is unchanged. Callers must handle zeros if modlist is FALSE.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
get_uchars(char *bufp, /* current pointer */
|
||||
uchar *list, /* return list */
|
||||
boolean modlist, /* TRUE: list is being modified in place */
|
||||
@@ -2366,7 +2365,7 @@ get_uchars(char *bufp, /* current pointer */
|
||||
}
|
||||
|
||||
#ifdef NOCWD_ASSUMPTIONS
|
||||
static void
|
||||
staticfn void
|
||||
adjust_prefix(char *bufp, int prefixid)
|
||||
{
|
||||
char *ptr;
|
||||
@@ -2389,7 +2388,7 @@ adjust_prefix(char *bufp, int prefixid)
|
||||
#endif
|
||||
|
||||
/* Choose at random one of the sep separated parts from str. Mangles str. */
|
||||
static char *
|
||||
staticfn char *
|
||||
choose_random_part(char *str, char sep)
|
||||
{
|
||||
int nsep = 1;
|
||||
@@ -2427,7 +2426,7 @@ choose_random_part(char *str, char sep)
|
||||
return (char *) 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
free_config_sections(void)
|
||||
{
|
||||
if (gc.config_section_chosen) {
|
||||
@@ -2443,7 +2442,7 @@ free_config_sections(void)
|
||||
/* check for " [ anything-except-bracket-or-empty ] # arbitrary-comment"
|
||||
with spaces optional; returns pointer to "anything-except..." (with
|
||||
trailing " ] #..." stripped) if ok, otherwise Null */
|
||||
static char *
|
||||
staticfn char *
|
||||
is_config_section(
|
||||
char *str) /* trailing spaces are stripped, ']' too iff result is good */
|
||||
{
|
||||
@@ -2472,7 +2471,7 @@ is_config_section(
|
||||
return trimspaces(a);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
handle_config_section(char *buf)
|
||||
{
|
||||
char *sect = is_config_section(buf);
|
||||
@@ -2507,7 +2506,7 @@ handle_config_section(char *buf)
|
||||
#define match_varname(INP, NAM, LEN) match_optname(INP, NAM, LEN, TRUE)
|
||||
|
||||
/* find the '=' or ':' */
|
||||
static char *
|
||||
staticfn char *
|
||||
find_optparam(const char *buf)
|
||||
{
|
||||
char *bufp, *altp;
|
||||
@@ -2520,7 +2519,7 @@ find_optparam(const char *buf)
|
||||
return bufp;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_OPTIONS(char *origbuf)
|
||||
{
|
||||
char *bufp = find_optparam(origbuf);
|
||||
@@ -2529,33 +2528,33 @@ cnf_line_OPTIONS(char *origbuf)
|
||||
return parseoptions(bufp, TRUE, TRUE);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_AUTOPICKUP_EXCEPTION(char *bufp)
|
||||
{
|
||||
add_autopickup_exception(bufp);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_BINDINGS(char *bufp)
|
||||
{
|
||||
return parsebindings(bufp);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_AUTOCOMPLETE(char *bufp)
|
||||
{
|
||||
parseautocomplete(bufp, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_MSGTYPE(char *bufp)
|
||||
{
|
||||
return msgtype_parse_add(bufp);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_HACKDIR(char *bufp)
|
||||
{
|
||||
#ifdef NOCWD_ASSUMPTIONS
|
||||
@@ -2570,7 +2569,7 @@ cnf_line_HACKDIR(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_LEVELDIR(char *bufp)
|
||||
{
|
||||
#ifdef NOCWD_ASSUMPTIONS
|
||||
@@ -2590,7 +2589,7 @@ cnf_line_LEVELDIR(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_SAVEDIR(char *bufp)
|
||||
{
|
||||
#ifdef NOCWD_ASSUMPTIONS
|
||||
@@ -2612,7 +2611,7 @@ cnf_line_SAVEDIR(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_BONESDIR(char *bufp)
|
||||
{
|
||||
#ifdef NOCWD_ASSUMPTIONS
|
||||
@@ -2623,7 +2622,7 @@ cnf_line_BONESDIR(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_DATADIR(char *bufp)
|
||||
{
|
||||
#ifdef NOCWD_ASSUMPTIONS
|
||||
@@ -2634,7 +2633,7 @@ cnf_line_DATADIR(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_SCOREDIR(char *bufp)
|
||||
{
|
||||
#ifdef NOCWD_ASSUMPTIONS
|
||||
@@ -2645,7 +2644,7 @@ cnf_line_SCOREDIR(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_LOCKDIR(char *bufp)
|
||||
{
|
||||
#ifdef NOCWD_ASSUMPTIONS
|
||||
@@ -2656,7 +2655,7 @@ cnf_line_LOCKDIR(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_CONFIGDIR(char *bufp)
|
||||
{
|
||||
#ifdef NOCWD_ASSUMPTIONS
|
||||
@@ -2667,7 +2666,7 @@ cnf_line_CONFIGDIR(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_TROUBLEDIR(char *bufp)
|
||||
{
|
||||
#ifdef NOCWD_ASSUMPTIONS
|
||||
@@ -2678,14 +2677,14 @@ cnf_line_TROUBLEDIR(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_NAME(char *bufp)
|
||||
{
|
||||
(void) strncpy(gp.plname, bufp, PL_NSIZ - 1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_ROLE(char *bufp)
|
||||
{
|
||||
int len;
|
||||
@@ -2695,21 +2694,21 @@ cnf_line_ROLE(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_dogname(char *bufp)
|
||||
{
|
||||
(void) strncpy(gd.dogname, bufp, PL_PSIZ - 1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_catname(char *bufp)
|
||||
{
|
||||
(void) strncpy(gc.catname, bufp, PL_PSIZ - 1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_WIZARDS(char *bufp)
|
||||
{
|
||||
if (sysopt.wizards)
|
||||
@@ -2726,7 +2725,7 @@ cnf_line_WIZARDS(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_SHELLERS(char *bufp)
|
||||
{
|
||||
if (sysopt.shellers)
|
||||
@@ -2735,7 +2734,7 @@ cnf_line_SHELLERS(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_EXPLORERS(char *bufp)
|
||||
{
|
||||
if (sysopt.explorers)
|
||||
@@ -2744,7 +2743,7 @@ cnf_line_EXPLORERS(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_DEBUGFILES(char *bufp)
|
||||
{
|
||||
/* if showdebug() has already been called (perhaps we've added
|
||||
@@ -2758,7 +2757,7 @@ cnf_line_DEBUGFILES(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_DUMPLOGFILE(char *bufp)
|
||||
{
|
||||
#ifdef DUMPLOG
|
||||
@@ -2771,7 +2770,7 @@ cnf_line_DUMPLOGFILE(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_GENERICUSERS(char *bufp)
|
||||
{
|
||||
if (sysopt.genericusers)
|
||||
@@ -2780,7 +2779,7 @@ cnf_line_GENERICUSERS(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_BONES_POOLS(char *bufp)
|
||||
{
|
||||
/* max value of 10 guarantees (N % bones.pools) will be one digit
|
||||
@@ -2794,7 +2793,7 @@ cnf_line_BONES_POOLS(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_SUPPORT(char *bufp)
|
||||
{
|
||||
if (sysopt.support)
|
||||
@@ -2803,7 +2802,7 @@ cnf_line_SUPPORT(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_RECOVER(char *bufp)
|
||||
{
|
||||
if (sysopt.recover)
|
||||
@@ -2812,7 +2811,7 @@ cnf_line_RECOVER(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_CHECK_SAVE_UID(char *bufp)
|
||||
{
|
||||
int n = atoi(bufp);
|
||||
@@ -2821,7 +2820,7 @@ cnf_line_CHECK_SAVE_UID(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_CHECK_PLNAME(char *bufp)
|
||||
{
|
||||
int n = atoi(bufp);
|
||||
@@ -2830,7 +2829,7 @@ cnf_line_CHECK_PLNAME(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_SEDUCE(char *bufp)
|
||||
{
|
||||
int n = !!atoi(bufp); /* XXX this could be tighter */
|
||||
@@ -2852,7 +2851,7 @@ cnf_line_SEDUCE(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_HIDEUSAGE(char *bufp)
|
||||
{
|
||||
int n = !!atoi(bufp);
|
||||
@@ -2861,7 +2860,7 @@ cnf_line_HIDEUSAGE(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_MAXPLAYERS(char *bufp)
|
||||
{
|
||||
int n = atoi(bufp);
|
||||
@@ -2875,7 +2874,7 @@ cnf_line_MAXPLAYERS(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_PERSMAX(char *bufp)
|
||||
{
|
||||
int n = atoi(bufp);
|
||||
@@ -2888,7 +2887,7 @@ cnf_line_PERSMAX(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_PERS_IS_UID(char *bufp)
|
||||
{
|
||||
int n = atoi(bufp);
|
||||
@@ -2901,7 +2900,7 @@ cnf_line_PERS_IS_UID(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_ENTRYMAX(char *bufp)
|
||||
{
|
||||
int n = atoi(bufp);
|
||||
@@ -2914,7 +2913,7 @@ cnf_line_ENTRYMAX(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_POINTSMIN(char *bufp)
|
||||
{
|
||||
int n = atoi(bufp);
|
||||
@@ -2927,7 +2926,7 @@ cnf_line_POINTSMIN(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_MAX_STATUENAME_RANK(char *bufp)
|
||||
{
|
||||
int n = atoi(bufp);
|
||||
@@ -2941,7 +2940,7 @@ cnf_line_MAX_STATUENAME_RANK(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_LIVELOG(char *bufp)
|
||||
{
|
||||
/* using 0 for base accepts "dddd" as decimal provided that first 'd'
|
||||
@@ -2958,7 +2957,7 @@ cnf_line_LIVELOG(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_PANICTRACE_LIBC(char *bufp)
|
||||
{
|
||||
int n = atoi(bufp);
|
||||
@@ -2973,7 +2972,7 @@ cnf_line_PANICTRACE_LIBC(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_PANICTRACE_GDB(char *bufp)
|
||||
{
|
||||
int n = atoi(bufp);
|
||||
@@ -2988,7 +2987,7 @@ cnf_line_PANICTRACE_GDB(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_GDBPATH(char *bufp)
|
||||
{
|
||||
#if defined(PANICTRACE) && !defined(VMS)
|
||||
@@ -3003,7 +3002,7 @@ cnf_line_GDBPATH(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_GREPPATH(char *bufp)
|
||||
{
|
||||
#if defined(PANICTRACE) && !defined(VMS)
|
||||
@@ -3018,7 +3017,7 @@ cnf_line_GREPPATH(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_CRASHREPORTURL(char *bufp)
|
||||
{
|
||||
if (sysopt.crashreporturl)
|
||||
@@ -3027,21 +3026,21 @@ cnf_line_CRASHREPORTURL(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_SAVEFORMAT(char *bufp)
|
||||
{
|
||||
parseformat(sysopt.saveformat, bufp);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_BONESFORMAT(char *bufp)
|
||||
{
|
||||
parseformat(sysopt.bonesformat, bufp);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_ACCESSIBILITY(char *bufp)
|
||||
{
|
||||
int n = atoi(bufp);
|
||||
@@ -3054,7 +3053,7 @@ cnf_line_ACCESSIBILITY(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_PORTABLE_DEVICE_PATHS(char *bufp)
|
||||
{
|
||||
#ifdef WIN32
|
||||
@@ -3073,7 +3072,7 @@ cnf_line_PORTABLE_DEVICE_PATHS(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_BOULDER(char *bufp)
|
||||
{
|
||||
(void) get_uchars(bufp, &go.ov_primary_syms[SYM_BOULDER + SYM_OFF_X],
|
||||
@@ -3081,13 +3080,13 @@ cnf_line_BOULDER(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_MENUCOLOR(char *bufp)
|
||||
{
|
||||
return add_menu_coloring(bufp);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_HILITE_STATUS(char *bufp)
|
||||
{
|
||||
#ifdef STATUS_HILITES
|
||||
@@ -3098,7 +3097,7 @@ cnf_line_HILITE_STATUS(char *bufp)
|
||||
#endif
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_WARNINGS(char *bufp)
|
||||
{
|
||||
uchar translate[MAXPCHARS];
|
||||
@@ -3108,7 +3107,7 @@ cnf_line_WARNINGS(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_ROGUESYMBOLS(char *bufp)
|
||||
{
|
||||
if (parsesymbols(bufp, ROGUESET)) {
|
||||
@@ -3119,7 +3118,7 @@ cnf_line_ROGUESYMBOLS(char *bufp)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_SYMBOLS(char *bufp)
|
||||
{
|
||||
if (parsesymbols(bufp, PRIMARYSET)) {
|
||||
@@ -3130,7 +3129,7 @@ cnf_line_SYMBOLS(char *bufp)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_WIZKIT(char *bufp)
|
||||
{
|
||||
(void) strncpy(gw.wizkit, bufp, WIZKIT_MAX - 1);
|
||||
@@ -3138,7 +3137,7 @@ cnf_line_WIZKIT(char *bufp)
|
||||
}
|
||||
|
||||
#ifdef USER_SOUNDS
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_SOUNDDIR(char *bufp)
|
||||
{
|
||||
if (sounddir)
|
||||
@@ -3147,7 +3146,7 @@ cnf_line_SOUNDDIR(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_SOUND(char *bufp)
|
||||
{
|
||||
add_sound_mapping(bufp);
|
||||
@@ -3155,7 +3154,7 @@ cnf_line_SOUND(char *bufp)
|
||||
}
|
||||
#endif /*USER_SOUNDS*/
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_QT_TILEWIDTH(char *bufp)
|
||||
{
|
||||
#ifdef QT_GRAPHICS
|
||||
@@ -3169,7 +3168,7 @@ cnf_line_QT_TILEWIDTH(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_QT_TILEHEIGHT(char *bufp)
|
||||
{
|
||||
#ifdef QT_GRAPHICS
|
||||
@@ -3183,7 +3182,7 @@ cnf_line_QT_TILEHEIGHT(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_QT_FONTSIZE(char *bufp)
|
||||
{
|
||||
#ifdef QT_GRAPHICS
|
||||
@@ -3197,7 +3196,7 @@ cnf_line_QT_FONTSIZE(char *bufp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cnf_line_QT_COMPACT(char *bufp)
|
||||
{
|
||||
#ifdef QT_GRAPHICS
|
||||
@@ -3400,7 +3399,7 @@ config_error_init(boolean from_file, const char *sourcename, boolean secure)
|
||||
gp.program_state.config_error_ready = TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
config_error_nextline(const char *line)
|
||||
{
|
||||
struct _config_error_frame *ced = config_error_data;
|
||||
@@ -3564,7 +3563,7 @@ struct _cnf_parser_state {
|
||||
};
|
||||
|
||||
/* Initialize config parser data */
|
||||
static void
|
||||
staticfn void
|
||||
cnf_parser_init(struct _cnf_parser_state *parser)
|
||||
{
|
||||
parser->rv = TRUE; /* assume successful parse */
|
||||
@@ -3579,7 +3578,7 @@ cnf_parser_init(struct _cnf_parser_state *parser)
|
||||
}
|
||||
|
||||
/* caller has finished with 'parser' (except for 'rv' so leave that intact) */
|
||||
static void
|
||||
staticfn void
|
||||
cnf_parser_done(struct _cnf_parser_state *parser)
|
||||
{
|
||||
parser->ep = 0; /* points into parser->inbuf, so becoming stale */
|
||||
@@ -3595,7 +3594,7 @@ cnf_parser_done(struct _cnf_parser_state *parser)
|
||||
*
|
||||
* Continued lines are merged together with one space in between.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
parse_conf_buf(struct _cnf_parser_state *p, boolean (*proc)(char *arg))
|
||||
{
|
||||
p->cont = FALSE;
|
||||
@@ -3745,7 +3744,7 @@ parse_conf_str(const char *str, boolean (*proc)(char *arg))
|
||||
*
|
||||
* Read from file fp, calling parse_conf_buf for each line.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
parse_conf_file(FILE *fp, boolean (*proc)(char *arg))
|
||||
{
|
||||
struct _cnf_parser_state parser;
|
||||
@@ -3764,7 +3763,7 @@ parse_conf_file(FILE *fp, boolean (*proc)(char *arg))
|
||||
return parser.rv;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
parseformat(int *arr, char *str)
|
||||
{
|
||||
const char *legal[] = { "historical", "lendian", "ascii" };
|
||||
@@ -3801,7 +3800,7 @@ parseformat(int *arr, char *str)
|
||||
|
||||
/* ---------- BEGIN WIZKIT FILE HANDLING ----------- */
|
||||
|
||||
static FILE *
|
||||
staticfn FILE *
|
||||
fopen_wizkit_file(void)
|
||||
{
|
||||
FILE *fp;
|
||||
@@ -3873,7 +3872,7 @@ fopen_wizkit_file(void)
|
||||
}
|
||||
|
||||
/* add to hero's inventory if there's room, otherwise put item on floor */
|
||||
static void
|
||||
staticfn void
|
||||
wizkit_addinv(struct obj *obj)
|
||||
{
|
||||
if (!obj || obj == &hands_obj)
|
||||
@@ -3945,8 +3944,7 @@ read_wizkit(void)
|
||||
extern const char *const known_handling[]; /* symbols.c */
|
||||
extern const char *const known_restrictions[]; /* symbols.c */
|
||||
|
||||
static
|
||||
FILE *
|
||||
staticfn FILE *
|
||||
fopen_sym_file(void)
|
||||
{
|
||||
FILE *fp;
|
||||
@@ -4749,11 +4747,11 @@ reveal_paths(void)
|
||||
|
||||
#define MAXPASSAGES SIZE(gc.context.novel.pasg) /* 20 */
|
||||
|
||||
static int choose_passage(int, unsigned);
|
||||
staticfn int choose_passage(int, unsigned);
|
||||
|
||||
/* choose a random passage that hasn't been chosen yet; once all have
|
||||
been chosen, reset the tracking to make all passages available again */
|
||||
static int
|
||||
staticfn int
|
||||
choose_passage(int passagecnt, /* total of available passages */
|
||||
unsigned oid) /* book.o_id, used to determine whether
|
||||
re-reading same book */
|
||||
|
||||
+12
-12
@@ -6,12 +6,12 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static void dowatersnakes(void);
|
||||
static void dowaterdemon(void);
|
||||
static void dowaternymph(void);
|
||||
static void gush(coordxy, coordxy, genericptr_t) NONNULLARG3;
|
||||
static void dofindgem(void);
|
||||
static boolean watchman_warn_fountain(struct monst *) NONNULLARG1;
|
||||
staticfn void dowatersnakes(void);
|
||||
staticfn void dowaterdemon(void);
|
||||
staticfn void dowaternymph(void);
|
||||
staticfn void gush(coordxy, coordxy, genericptr_t) NONNULLARG3;
|
||||
staticfn void dofindgem(void);
|
||||
staticfn boolean watchman_warn_fountain(struct monst *) NONNULLARG1;
|
||||
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
@@ -34,7 +34,7 @@ floating_above(const char *what)
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
/* Fountain of snakes! */
|
||||
static void
|
||||
staticfn void
|
||||
dowatersnakes(void)
|
||||
{
|
||||
int num = rn1(5, 2);
|
||||
@@ -60,7 +60,7 @@ dowatersnakes(void)
|
||||
}
|
||||
|
||||
/* Water demon */
|
||||
static void
|
||||
staticfn void
|
||||
dowaterdemon(void)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -90,7 +90,7 @@ dowaterdemon(void)
|
||||
}
|
||||
|
||||
/* Water Nymph */
|
||||
static void
|
||||
staticfn void
|
||||
dowaternymph(void)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -130,7 +130,7 @@ dogushforth(int drinking)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
gush(coordxy x, coordxy y, genericptr_t poolcnt)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -161,7 +161,7 @@ gush(coordxy x, coordxy y, genericptr_t poolcnt)
|
||||
}
|
||||
|
||||
/* Find a gem in the sparkling waters. */
|
||||
static void
|
||||
staticfn void
|
||||
dofindgem(void)
|
||||
{
|
||||
if (!Blind)
|
||||
@@ -175,7 +175,7 @@ dofindgem(void)
|
||||
exercise(A_WIS, TRUE); /* a discovery! */
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
watchman_warn_fountain(struct monst *mtmp)
|
||||
{
|
||||
if (is_watch(mtmp->data) && couldsee(mtmp->mx, mtmp->my)
|
||||
|
||||
+28
-28
@@ -6,25 +6,25 @@
|
||||
|
||||
extern const char what_is_an_unknown_object[]; /* from pager.c */
|
||||
|
||||
static void getpos_toggle_hilite_state(void);
|
||||
static void getpos_getvalids_selection(struct selectionvar *,
|
||||
staticfn void getpos_toggle_hilite_state(void);
|
||||
staticfn void getpos_getvalids_selection(struct selectionvar *,
|
||||
boolean (*)(coordxy, coordxy));
|
||||
static void getpos_help_keyxhelp(winid, const char *, const char *, int);
|
||||
static void getpos_help(boolean, const char *);
|
||||
static int QSORTCALLBACK cmp_coord_distu(const void *, const void *);
|
||||
static int gloc_filter_classify_glyph(int);
|
||||
static int gloc_filter_floodfill_matcharea(coordxy, coordxy);
|
||||
static void gloc_filter_floodfill(coordxy, coordxy);
|
||||
static void gloc_filter_init(void);
|
||||
static void gloc_filter_done(void);
|
||||
static void gather_locs(coord **, int *, int);
|
||||
static void truncate_to_map(coordxy *, coordxy *, schar, schar);
|
||||
static void getpos_refresh(void);
|
||||
staticfn void getpos_help_keyxhelp(winid, const char *, const char *, int);
|
||||
staticfn void getpos_help(boolean, const char *);
|
||||
staticfn int QSORTCALLBACK cmp_coord_distu(const void *, const void *);
|
||||
staticfn int gloc_filter_classify_glyph(int);
|
||||
staticfn int gloc_filter_floodfill_matcharea(coordxy, coordxy);
|
||||
staticfn void gloc_filter_floodfill(coordxy, coordxy);
|
||||
staticfn void gloc_filter_init(void);
|
||||
staticfn void gloc_filter_done(void);
|
||||
staticfn void gather_locs(coord **, int *, int);
|
||||
staticfn void truncate_to_map(coordxy *, coordxy *, schar, schar);
|
||||
staticfn void getpos_refresh(void);
|
||||
/* Callback function for getpos() to highlight desired map locations.
|
||||
* Parameter TRUE: initialize and highlight, FALSE: done (remove highlights).
|
||||
*/
|
||||
static void (*getpos_hilitefunc)(boolean) = (void (*)(boolean)) 0;
|
||||
static boolean (*getpos_getvalid)(coordxy, coordxy)
|
||||
staticfn void (*getpos_hilitefunc)(boolean) = (void (*)(boolean)) 0;
|
||||
staticfn boolean (*getpos_getvalid)(coordxy, coordxy)
|
||||
= (boolean (*)(coordxy, coordxy)) 0;
|
||||
enum getposHiliteState {
|
||||
HiliteNormalMap = 0,
|
||||
@@ -67,7 +67,7 @@ getpos_sethilite(
|
||||
positions and showing them via temporary S_goodpos symbol;
|
||||
when 'bgcolors' is On, there are three states and showing them via
|
||||
setting background color becomes the default */
|
||||
static void
|
||||
staticfn void
|
||||
getpos_toggle_hilite_state(void)
|
||||
{
|
||||
/* getpos_hilitefunc isn't Null */
|
||||
@@ -97,7 +97,7 @@ mapxy_valid(coordxy x, coordxy y)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
getpos_getvalids_selection(
|
||||
struct selectionvar *sel,
|
||||
boolean (*validf)(coordxy, coordxy))
|
||||
@@ -132,7 +132,7 @@ static const char *const gloc_filtertxt[NUM_GFILTER] = {
|
||||
" in this area"
|
||||
};
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
getpos_help_keyxhelp(
|
||||
winid tmpwin,
|
||||
const char *k1, const char *k2,
|
||||
@@ -162,7 +162,7 @@ getpos_help_keyxhelp(
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
/* the response for '?' help request in getpos() */
|
||||
static void
|
||||
staticfn void
|
||||
getpos_help(boolean force, const char *goal)
|
||||
{
|
||||
static const char *const fastmovemode[2] = { "8 units at a time",
|
||||
@@ -307,7 +307,7 @@ getpos_help(boolean force, const char *goal)
|
||||
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static int QSORTCALLBACK
|
||||
staticfn int QSORTCALLBACK
|
||||
cmp_coord_distu(const void *a, const void *b)
|
||||
{
|
||||
const coord *c1 = a;
|
||||
@@ -336,7 +336,7 @@ cmp_coord_distu(const void *a, const void *b)
|
||||
(isok((x), (y)) \
|
||||
&& (selection_getpoint((x),(y), gg.gloc_filter_map)))
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
gloc_filter_classify_glyph(int glyph)
|
||||
{
|
||||
int c;
|
||||
@@ -359,7 +359,7 @@ gloc_filter_classify_glyph(int glyph)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
gloc_filter_floodfill_matcharea(coordxy x, coordxy y)
|
||||
{
|
||||
int glyph = back_to_glyph(x, y);
|
||||
@@ -377,7 +377,7 @@ gloc_filter_floodfill_matcharea(coordxy x, coordxy y)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
gloc_filter_floodfill(coordxy x, coordxy y)
|
||||
{
|
||||
gg.gloc_filter_floodfill_match_glyph = back_to_glyph(x, y);
|
||||
@@ -386,7 +386,7 @@ gloc_filter_floodfill(coordxy x, coordxy y)
|
||||
selection_floodfill(gg.gloc_filter_map, x, y, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
gloc_filter_init(void)
|
||||
{
|
||||
if (iflags.getloc_filter == GFILTER_AREA) {
|
||||
@@ -407,7 +407,7 @@ gloc_filter_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
gloc_filter_done(void)
|
||||
{
|
||||
if (gg.gloc_filter_map) {
|
||||
@@ -490,7 +490,7 @@ gather_locs_interesting(coordxy x, coordxy y, int gloc)
|
||||
RESTORE_WARNINGS
|
||||
|
||||
/* gather locations for monsters or objects shown on the map */
|
||||
static void
|
||||
staticfn void
|
||||
gather_locs(coord **arr_p, int *cnt_p, int gloc)
|
||||
{
|
||||
int pass, idx;
|
||||
@@ -706,7 +706,7 @@ getpos_menu(coord *ccp, int gloc)
|
||||
}
|
||||
|
||||
/* add dx,dy to cx,cy, truncating at map edges */
|
||||
static void
|
||||
staticfn void
|
||||
truncate_to_map(coordxy *cx, coordxy *cy, schar dx, schar dy)
|
||||
{
|
||||
/* diagonal moves complicate this... */
|
||||
@@ -730,7 +730,7 @@ truncate_to_map(coordxy *cx, coordxy *cy, schar dx, schar dy)
|
||||
|
||||
/* called when ^R typed; if '$' is being shown for valid spots, remove that;
|
||||
if alternate background color is being shown for that, redraw it */
|
||||
static void
|
||||
staticfn void
|
||||
getpos_refresh(void)
|
||||
{
|
||||
if (getpos_hilitefunc && getpos_hilite_state == HiliteGoodposSymbol) {
|
||||
|
||||
+64
-64
@@ -8,40 +8,40 @@
|
||||
|
||||
/* #define DEBUG */ /* uncomment for debugging */
|
||||
|
||||
static boolean could_move_onto_boulder(coordxy, coordxy);
|
||||
static int moverock(void);
|
||||
static void dosinkfall(void);
|
||||
static boolean findtravelpath(int);
|
||||
static boolean trapmove(coordxy, coordxy, struct trap *);
|
||||
static int QSORTCALLBACK notice_mons_cmp(const genericptr, const genericptr);
|
||||
static schar u_simple_floortyp(coordxy, coordxy);
|
||||
static boolean swim_move_danger(coordxy, coordxy);
|
||||
static boolean domove_bump_mon(struct monst *, int) NONNULLARG1;
|
||||
static boolean domove_attackmon_at(struct monst *, coordxy, coordxy,
|
||||
staticfn boolean could_move_onto_boulder(coordxy, coordxy);
|
||||
staticfn int moverock(void);
|
||||
staticfn void dosinkfall(void);
|
||||
staticfn boolean findtravelpath(int);
|
||||
staticfn boolean trapmove(coordxy, coordxy, struct trap *);
|
||||
staticfn int QSORTCALLBACK notice_mons_cmp(const genericptr, const genericptr);
|
||||
staticfn schar u_simple_floortyp(coordxy, coordxy);
|
||||
staticfn boolean swim_move_danger(coordxy, coordxy);
|
||||
staticfn boolean domove_bump_mon(struct monst *, int) NONNULLARG1;
|
||||
staticfn boolean domove_attackmon_at(struct monst *, coordxy, coordxy,
|
||||
boolean *) NONNULLPTRS;
|
||||
static boolean domove_fight_ironbars(coordxy, coordxy);
|
||||
static boolean domove_fight_web(coordxy, coordxy);
|
||||
static boolean domove_swap_with_pet(struct monst *,
|
||||
staticfn boolean domove_fight_ironbars(coordxy, coordxy);
|
||||
staticfn boolean domove_fight_web(coordxy, coordxy);
|
||||
staticfn boolean domove_swap_with_pet(struct monst *,
|
||||
coordxy, coordxy) NONNULLARG1;
|
||||
static boolean domove_fight_empty(coordxy, coordxy);
|
||||
static boolean air_turbulence(void);
|
||||
static void slippery_ice_fumbling(void);
|
||||
static boolean impaired_movement(coordxy *, coordxy *) NONNULLPTRS;
|
||||
static boolean avoid_moving_on_trap(coordxy, coordxy, boolean);
|
||||
static boolean avoid_moving_on_liquid(coordxy, coordxy, boolean);
|
||||
static boolean avoid_running_into_trap_or_liquid(coordxy, coordxy);
|
||||
static boolean move_out_of_bounds(coordxy, coordxy);
|
||||
static boolean carrying_too_much(void);
|
||||
static boolean escape_from_sticky_mon(coordxy, coordxy);
|
||||
static void domove_core(void);
|
||||
static void maybe_smudge_engr(coordxy, coordxy, coordxy, coordxy);
|
||||
static struct monst *monstinroom(struct permonst *, int) NONNULLARG1;
|
||||
static boolean furniture_present(int, int);
|
||||
static void move_update(boolean);
|
||||
static int pickup_checks(void);
|
||||
static boolean doorless_door(coordxy, coordxy);
|
||||
static void maybe_wail(void);
|
||||
static boolean water_turbulence(coordxy *, coordxy *);
|
||||
staticfn boolean domove_fight_empty(coordxy, coordxy);
|
||||
staticfn boolean air_turbulence(void);
|
||||
staticfn void slippery_ice_fumbling(void);
|
||||
staticfn boolean impaired_movement(coordxy *, coordxy *) NONNULLPTRS;
|
||||
staticfn boolean avoid_moving_on_trap(coordxy, coordxy, boolean);
|
||||
staticfn boolean avoid_moving_on_liquid(coordxy, coordxy, boolean);
|
||||
staticfn boolean avoid_running_into_trap_or_liquid(coordxy, coordxy);
|
||||
staticfn boolean move_out_of_bounds(coordxy, coordxy);
|
||||
staticfn boolean carrying_too_much(void);
|
||||
staticfn boolean escape_from_sticky_mon(coordxy, coordxy);
|
||||
staticfn void domove_core(void);
|
||||
staticfn void maybe_smudge_engr(coordxy, coordxy, coordxy, coordxy);
|
||||
staticfn struct monst *monstinroom(struct permonst *, int) NONNULLARG1;
|
||||
staticfn boolean furniture_present(int, int);
|
||||
staticfn void move_update(boolean);
|
||||
staticfn int pickup_checks(void);
|
||||
staticfn boolean doorless_door(coordxy, coordxy);
|
||||
staticfn void maybe_wail(void);
|
||||
staticfn boolean water_turbulence(coordxy *, coordxy *);
|
||||
|
||||
#define IS_SHOP(x) (gr.rooms[x].rtype >= SHOPBASE)
|
||||
|
||||
@@ -131,7 +131,7 @@ revive_nasty(coordxy x, coordxy y, const char *msg)
|
||||
|
||||
/* can hero move onto a spot containing one or more boulders?
|
||||
used for m<dir> and travel and during boulder push failure */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
could_move_onto_boulder(coordxy sx, coordxy sy)
|
||||
{
|
||||
/* can if able to phaze through rock (must be poly'd, so not riding) */
|
||||
@@ -152,7 +152,7 @@ could_move_onto_boulder(coordxy sx, coordxy sy)
|
||||
return squeezeablylightinvent();
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
moverock(void)
|
||||
{
|
||||
coordxy rx, ry, sx, sy;
|
||||
@@ -752,7 +752,7 @@ movobj(struct obj *obj, coordxy ox, coordxy oy)
|
||||
newsym(ox, oy);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dosinkfall(void)
|
||||
{
|
||||
static const char fell_on_sink[] = "fell onto a sink";
|
||||
@@ -1164,7 +1164,7 @@ test_move(
|
||||
* gt.travelmap keeps track of map locations we've moved through
|
||||
* this travel session. It will be cleared once the travel stops.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
findtravelpath(int mode)
|
||||
{
|
||||
if (!gt.travelmap)
|
||||
@@ -1446,7 +1446,7 @@ is_valid_travelpt(coordxy x, coordxy y)
|
||||
/* try to escape being stuck in a trapped state by walking out of it;
|
||||
return true iff moving should continue to intended destination
|
||||
(all failures and most successful escapes leave hero at original spot) */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
trapmove(
|
||||
coordxy x, coordxy y, /* targeted destination, <u.ux+u.dx,u.uy+u.dy> */
|
||||
struct trap *desttrap) /* nonnull if another trap at <x,y> */
|
||||
@@ -1631,7 +1631,7 @@ notice_mon(struct monst *mtmp)
|
||||
}
|
||||
}
|
||||
|
||||
static int QSORTCALLBACK
|
||||
staticfn int QSORTCALLBACK
|
||||
notice_mons_cmp(const genericptr ptr1, const genericptr ptr2)
|
||||
{
|
||||
const struct monst *m1 = *(const struct monst **) ptr1,
|
||||
@@ -1720,7 +1720,7 @@ u_locomotion(const char *def)
|
||||
}
|
||||
|
||||
/* Return a simplified floor solid/liquid state based on hero's state */
|
||||
static schar
|
||||
staticfn schar
|
||||
u_simple_floortyp(coordxy x, coordxy y)
|
||||
{
|
||||
boolean u_in_air = (Levitation || Flying || !grounded(gy.youmonst.data));
|
||||
@@ -1768,7 +1768,7 @@ handle_tip(int tip)
|
||||
}
|
||||
|
||||
/* Is it dangerous for hero to move to x,y due to water or lava? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
swim_move_danger(coordxy x, coordxy y)
|
||||
{
|
||||
schar newtyp = u_simple_floortyp(x, y);
|
||||
@@ -1809,7 +1809,7 @@ swim_move_danger(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* moving with 'm' prefix, bump into a monster? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
domove_bump_mon(struct monst *mtmp, int glyph)
|
||||
{
|
||||
/* If they used a 'm' command, trying to move onto a monster
|
||||
@@ -1839,7 +1839,7 @@ domove_bump_mon(struct monst *mtmp, int glyph)
|
||||
returns TRUE if hero movement is used up.
|
||||
sets displaceu, if hero and monster could swap places instead.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
domove_attackmon_at(
|
||||
struct monst *mtmp,
|
||||
coordxy x, coordxy y,
|
||||
@@ -1878,7 +1878,7 @@ domove_attackmon_at(
|
||||
}
|
||||
|
||||
/* force-fight iron bars with your weapon? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
domove_fight_ironbars(coordxy x, coordxy y)
|
||||
{
|
||||
if (gc.context.forcefight && levl[x][y].typ == IRONBARS && uwep) {
|
||||
@@ -1903,7 +1903,7 @@ domove_fight_ironbars(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* force-fight a spider web with your weapon */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
domove_fight_web(coordxy x, coordxy y)
|
||||
{
|
||||
struct trap *trap = t_at(x, y);
|
||||
@@ -1980,7 +1980,7 @@ domove_fight_web(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* maybe swap places with a pet? returns TRUE if swapped places */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
domove_swap_with_pet(struct monst *mtmp, coordxy x, coordxy y)
|
||||
{
|
||||
struct trap *trap;
|
||||
@@ -2100,7 +2100,7 @@ domove_swap_with_pet(struct monst *mtmp, coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* force-fight (x,y) which doesn't have anything to fight */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
domove_fight_empty(coordxy x, coordxy y)
|
||||
{
|
||||
static const char unknown_obstacle[] = "an unknown obstacle";
|
||||
@@ -2211,7 +2211,7 @@ domove_fight_empty(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* does the plane of air disturb movement? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
air_turbulence(void)
|
||||
{
|
||||
if (Is_airlevel(&u.uz) && rn2(4) && !Levitation && !Flying) {
|
||||
@@ -2234,7 +2234,7 @@ air_turbulence(void)
|
||||
}
|
||||
|
||||
/* does water disturb the movement? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
water_turbulence(coordxy *x, coordxy *y)
|
||||
{
|
||||
if (u.uinwater) {
|
||||
@@ -2265,7 +2265,7 @@ water_turbulence(coordxy *x, coordxy *y)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
slippery_ice_fumbling(void)
|
||||
{
|
||||
boolean on_ice = !Levitation && is_ice(u.ux, u.uy);
|
||||
@@ -2294,7 +2294,7 @@ u_maybe_impaired(void)
|
||||
}
|
||||
|
||||
/* change movement dir if impaired. return TRUE if can't move */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
impaired_movement(coordxy *x, coordxy *y)
|
||||
{
|
||||
if (u_maybe_impaired()) {
|
||||
@@ -2313,7 +2313,7 @@ impaired_movement(coordxy *x, coordxy *y)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
avoid_moving_on_trap(coordxy x, coordxy y, boolean msg)
|
||||
{
|
||||
struct trap *trap;
|
||||
@@ -2329,7 +2329,7 @@ avoid_moving_on_trap(coordxy x, coordxy y, boolean msg)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
avoid_moving_on_liquid(
|
||||
coordxy x, coordxy y,
|
||||
boolean msg)
|
||||
@@ -2361,7 +2361,7 @@ avoid_moving_on_liquid(
|
||||
|
||||
/* when running/rushing, avoid stepping on a known trap or pool of liquid.
|
||||
returns TRUE if avoided. */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
avoid_running_into_trap_or_liquid(coordxy x, coordxy y)
|
||||
{
|
||||
boolean would_stop = (gc.context.run >= 2);
|
||||
@@ -2379,7 +2379,7 @@ avoid_running_into_trap_or_liquid(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* trying to move out-of-bounds? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
move_out_of_bounds(coordxy x, coordxy y)
|
||||
{
|
||||
if (!isok(x, y)) {
|
||||
@@ -2409,7 +2409,7 @@ move_out_of_bounds(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* carrying too much to be able to move? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
carrying_too_much(void)
|
||||
{
|
||||
int wtcap;
|
||||
@@ -2432,7 +2432,7 @@ carrying_too_much(void)
|
||||
|
||||
/* try to pull free from sticking monster, or you release a monster
|
||||
you're sticking to. returns TRUE if you lose your movement. */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
escape_from_sticky_mon(coordxy x, coordxy y)
|
||||
{
|
||||
if (u.ustuck && (x != u.ustuck->mx || y != u.ustuck->my)) {
|
||||
@@ -2499,7 +2499,7 @@ domove(void)
|
||||
gd.domove_attempting = 0L;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
domove_core(void)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -2831,7 +2831,7 @@ runmode_delay_output(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
maybe_smudge_engr(coordxy x1, coordxy y1, coordxy x2, coordxy y2)
|
||||
{
|
||||
struct engr *ep;
|
||||
@@ -3181,7 +3181,7 @@ spoteffects(boolean pick)
|
||||
}
|
||||
|
||||
/* returns first matching monster */
|
||||
static struct monst *
|
||||
staticfn struct monst *
|
||||
monstinroom(struct permonst *mdat, int roomno)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -3197,7 +3197,7 @@ monstinroom(struct permonst *mdat, int roomno)
|
||||
}
|
||||
|
||||
/* check whether room contains a particular type of furniture */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
furniture_present(int furniture, int roomno)
|
||||
{
|
||||
int x, y, lx, ly, hx, hy;
|
||||
@@ -3303,7 +3303,7 @@ in_town(coordxy x, coordxy y)
|
||||
return !has_subrooms;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
move_update(boolean newlev)
|
||||
{
|
||||
char c, *ptr1, *ptr2, *ptr3, *ptr4;
|
||||
@@ -3502,7 +3502,7 @@ check_special_room(boolean newlev)
|
||||
0 = cannot pickup, no time taken
|
||||
-1 = do normal pickup
|
||||
-2 = loot the monster */
|
||||
static int
|
||||
staticfn int
|
||||
pickup_checks(void)
|
||||
{
|
||||
struct trap *traphere;
|
||||
@@ -3776,7 +3776,7 @@ lookaround(void)
|
||||
}
|
||||
|
||||
/* check for a doorway which lacks its door (NODOOR or BROKEN) */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
doorless_door(coordxy x, coordxy y)
|
||||
{
|
||||
struct rm *lev_p = &levl[x][y];
|
||||
@@ -3914,7 +3914,7 @@ unmul(const char *msg_override)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
maybe_wail(void)
|
||||
{
|
||||
static short powers[] = { TELEPORT, SEE_INVIS, POISON_RES, COLD_RES,
|
||||
|
||||
+42
-42
@@ -14,28 +14,28 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static void enlght_out(const char *);
|
||||
static void enlght_line(const char *, const char *, const char *,
|
||||
staticfn void enlght_out(const char *);
|
||||
staticfn void enlght_line(const char *, const char *, const char *,
|
||||
const char *);
|
||||
static char *enlght_combatinc(const char *, int, int, char *);
|
||||
static void enlght_halfdmg(int, int);
|
||||
static boolean walking_on_water(void);
|
||||
static boolean cause_known(int);
|
||||
static char *attrval(int, int, char *);
|
||||
static char *fmt_elapsed_time(char *, int);
|
||||
static void background_enlightenment(int, int);
|
||||
static void basics_enlightenment(int, int);
|
||||
static void characteristics_enlightenment(int, int);
|
||||
static void one_characteristic(int, int, int);
|
||||
static void status_enlightenment(int, int);
|
||||
static void weapon_insight(int);
|
||||
static void attributes_enlightenment(int, int);
|
||||
static void show_achievements(int);
|
||||
static int QSORTCALLBACK vanqsort_cmp(const genericptr, const genericptr);
|
||||
static int num_extinct(void);
|
||||
static int num_gone(int, int *);
|
||||
static char *size_str(int);
|
||||
static void item_resistance_message(int, const char *, int);
|
||||
staticfn char *enlght_combatinc(const char *, int, int, char *);
|
||||
staticfn void enlght_halfdmg(int, int);
|
||||
staticfn boolean walking_on_water(void);
|
||||
staticfn boolean cause_known(int);
|
||||
staticfn char *attrval(int, int, char *);
|
||||
staticfn char *fmt_elapsed_time(char *, int);
|
||||
staticfn void background_enlightenment(int, int);
|
||||
staticfn void basics_enlightenment(int, int);
|
||||
staticfn void characteristics_enlightenment(int, int);
|
||||
staticfn void one_characteristic(int, int, int);
|
||||
staticfn void status_enlightenment(int, int);
|
||||
staticfn void weapon_insight(int);
|
||||
staticfn void attributes_enlightenment(int, int);
|
||||
staticfn void show_achievements(int);
|
||||
staticfn int QSORTCALLBACK vanqsort_cmp(const genericptr, const genericptr);
|
||||
staticfn int num_extinct(void);
|
||||
staticfn int num_gone(int, int *);
|
||||
staticfn char *size_str(int);
|
||||
staticfn void item_resistance_message(int, const char *, int);
|
||||
|
||||
extern const char *const hu_stat[]; /* hunger status from eat.c */
|
||||
extern const char *const enc_stat[]; /* encumbrance status from botl.c */
|
||||
@@ -112,7 +112,7 @@ static struct ll_achieve_msg achieve_msg [] = {
|
||||
#define you_have_X(something) \
|
||||
enl_msg(You_, have, (const char *) "", (something), "")
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
enlght_out(const char *buf)
|
||||
{
|
||||
if (ge.en_via_menu) {
|
||||
@@ -121,7 +121,7 @@ enlght_out(const char *buf)
|
||||
putstr(ge.en_win, 0, buf);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
enlght_line(
|
||||
const char *start,
|
||||
const char *middle,
|
||||
@@ -154,7 +154,7 @@ enlght_line(
|
||||
}
|
||||
|
||||
/* format increased chance to hit or damage or defense (Protection) */
|
||||
static char *
|
||||
staticfn char *
|
||||
enlght_combatinc(const char *inctyp, int incamt, int final, char *outbuf)
|
||||
{
|
||||
const char *modif, *bonus;
|
||||
@@ -191,7 +191,7 @@ enlght_combatinc(const char *inctyp, int incamt, int final, char *outbuf)
|
||||
}
|
||||
|
||||
/* report half physical or half spell damage */
|
||||
static void
|
||||
staticfn void
|
||||
enlght_halfdmg(int category, int final)
|
||||
{
|
||||
const char *category_name;
|
||||
@@ -214,7 +214,7 @@ enlght_halfdmg(int category, int final)
|
||||
}
|
||||
|
||||
/* is hero actively using water walking capability on water (or lava)? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
walking_on_water(void)
|
||||
{
|
||||
if (u.uinwater || Levitation || Flying)
|
||||
@@ -257,7 +257,7 @@ trap_predicament(char *outbuf, int final, boolean wizxtra)
|
||||
/* check whether hero is wearing something that player definitely knows
|
||||
confers the target property; item must have been seen and its type
|
||||
discovered but it doesn't necessarily have to be fully identified */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cause_known(
|
||||
int propindx) /* index of a property which can be conveyed by worn item */
|
||||
{
|
||||
@@ -277,7 +277,7 @@ cause_known(
|
||||
}
|
||||
|
||||
/* format a characteristic value, accommodating Strength's strangeness */
|
||||
static char *
|
||||
staticfn char *
|
||||
attrval(
|
||||
int attrindx,
|
||||
int attrvalue,
|
||||
@@ -304,7 +304,7 @@ attrval(
|
||||
(note: for a list of more than two entries, nethack usually includes the
|
||||
[style-wise] optional comma before "and" but in this instance it does not)
|
||||
*/
|
||||
static char *
|
||||
staticfn char *
|
||||
fmt_elapsed_time(char *outbuf, int final)
|
||||
{
|
||||
int fieldcnt;
|
||||
@@ -432,7 +432,7 @@ enlightenment(
|
||||
|
||||
/*ARGSUSED*/
|
||||
/* display role, race, alignment and such to en_win */
|
||||
static void
|
||||
staticfn void
|
||||
background_enlightenment(int unused_mode UNUSED, int final)
|
||||
{
|
||||
const char *role_titl, *rank_titl;
|
||||
@@ -691,7 +691,7 @@ background_enlightenment(int unused_mode UNUSED, int final)
|
||||
/* hit points, energy points, armor class -- essential information which
|
||||
doesn't fit very well in other categories */
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
staticfn void
|
||||
basics_enlightenment(int mode UNUSED, int final)
|
||||
{
|
||||
static char Power[] = "energy points (spell power)";
|
||||
@@ -790,7 +790,7 @@ basics_enlightenment(int mode UNUSED, int final)
|
||||
}
|
||||
|
||||
/* characteristics: expanded version of bottom line strength, dexterity, &c */
|
||||
static void
|
||||
staticfn void
|
||||
characteristics_enlightenment(int mode, int final)
|
||||
{
|
||||
char buf[BUFSZ];
|
||||
@@ -809,7 +809,7 @@ characteristics_enlightenment(int mode, int final)
|
||||
}
|
||||
|
||||
/* display one attribute value for characteristics_enlightenment() */
|
||||
static void
|
||||
staticfn void
|
||||
one_characteristic(int mode, int final, int attrindx)
|
||||
{
|
||||
extern const char *const attrname[]; /* attrib.c */
|
||||
@@ -903,7 +903,7 @@ one_characteristic(int mode, int final, int attrindx)
|
||||
}
|
||||
|
||||
/* status: selected obvious capabilities, assorted troubles */
|
||||
static void
|
||||
staticfn void
|
||||
status_enlightenment(int mode, int final)
|
||||
{
|
||||
boolean magic = (mode & MAGICENLIGHTENMENT) ? TRUE : FALSE;
|
||||
@@ -1232,7 +1232,7 @@ status_enlightenment(int mode, int final)
|
||||
}
|
||||
|
||||
/* extracted from status_enlightenment() to reduce clutter there */
|
||||
static void
|
||||
staticfn void
|
||||
weapon_insight(int final)
|
||||
{
|
||||
char buf[BUFSZ];
|
||||
@@ -1430,7 +1430,7 @@ weapon_insight(int final)
|
||||
} /* skill applies */
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
item_resistance_message(
|
||||
int adtyp,
|
||||
const char *prot_message,
|
||||
@@ -1449,7 +1449,7 @@ item_resistance_message(
|
||||
}
|
||||
|
||||
/* attributes: intrinsics and the like, other non-obvious capabilities */
|
||||
static void
|
||||
staticfn void
|
||||
attributes_enlightenment(
|
||||
int unused_mode UNUSED,
|
||||
int final)
|
||||
@@ -2190,7 +2190,7 @@ show_conduct(int final)
|
||||
* Achievements (see 'enum achievements' in you.h).
|
||||
*/
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
show_achievements(
|
||||
int final) /* 'final' is used "behind the curtain" by enl_foo() macros */
|
||||
{
|
||||
@@ -2568,7 +2568,7 @@ const char *const vanqorders[NUM_VANQ_ORDER_MODES][3] = {
|
||||
"by count, low to high, by internal index within tied count" },
|
||||
};
|
||||
|
||||
static int QSORTCALLBACK
|
||||
staticfn int QSORTCALLBACK
|
||||
vanqsort_cmp(
|
||||
const genericptr vptr1,
|
||||
const genericptr vptr2)
|
||||
@@ -2880,7 +2880,7 @@ num_genocides(void)
|
||||
}
|
||||
|
||||
/* return a count of the number of extinct species */
|
||||
static int
|
||||
staticfn int
|
||||
num_extinct(void)
|
||||
{
|
||||
int i, n = 0;
|
||||
@@ -2895,7 +2895,7 @@ num_extinct(void)
|
||||
}
|
||||
|
||||
/* collect both genocides and extinctions, skipping uniques */
|
||||
static int
|
||||
staticfn int
|
||||
num_gone(int mvflags, int *mindx)
|
||||
{
|
||||
uchar mflg = (uchar) mvflags;
|
||||
@@ -3111,7 +3111,7 @@ align_str(aligntyp alignment)
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
size_str(int msize)
|
||||
{
|
||||
static char outbuf[40];
|
||||
|
||||
+74
-74
@@ -10,45 +10,45 @@
|
||||
#define CONTAINED_SYM '>' /* designator for inside a container */
|
||||
#define HANDS_SYM '-' /* hands|fingers|self depending on context */
|
||||
|
||||
static void inuse_classify(Loot *, struct obj *);
|
||||
static char *loot_xname(struct obj *);
|
||||
static int invletter_value(char);
|
||||
static int QSORTCALLBACK sortloot_cmp(const genericptr, const genericptr);
|
||||
static void reorder_invent(void);
|
||||
static struct obj *addinv_core0(struct obj *, struct obj *,
|
||||
staticfn void inuse_classify(Loot *, struct obj *);
|
||||
staticfn char *loot_xname(struct obj *);
|
||||
staticfn int invletter_value(char);
|
||||
staticfn int QSORTCALLBACK sortloot_cmp(const genericptr, const genericptr);
|
||||
staticfn void reorder_invent(void);
|
||||
staticfn struct obj *addinv_core0(struct obj *, struct obj *,
|
||||
boolean) NONNULLARG1;
|
||||
static void noarmor(boolean);
|
||||
static void invdisp_nothing(const char *, const char *);
|
||||
static boolean worn_wield_only(struct obj *);
|
||||
static char *cinv_doname(struct obj *);
|
||||
static char *cinv_ansimpleoname(struct obj *);
|
||||
static boolean only_here(struct obj *);
|
||||
static void compactify(char *);
|
||||
static boolean taking_off(const char *);
|
||||
static void mime_action(const char *);
|
||||
static char *getobj_hands_txt(const char *, char *);
|
||||
static int ckvalidcat(struct obj *);
|
||||
static int ckunpaid(struct obj *);
|
||||
static char *safeq_xprname(struct obj *);
|
||||
static char *safeq_shortxprname(struct obj *);
|
||||
static char display_pickinv(const char *, const char *, const char *,
|
||||
staticfn void noarmor(boolean);
|
||||
staticfn void invdisp_nothing(const char *, const char *);
|
||||
staticfn boolean worn_wield_only(struct obj *);
|
||||
staticfn char *cinv_doname(struct obj *);
|
||||
staticfn char *cinv_ansimpleoname(struct obj *);
|
||||
staticfn boolean only_here(struct obj *);
|
||||
staticfn void compactify(char *);
|
||||
staticfn boolean taking_off(const char *);
|
||||
staticfn void mime_action(const char *);
|
||||
staticfn char *getobj_hands_txt(const char *, char *);
|
||||
staticfn int ckvalidcat(struct obj *);
|
||||
staticfn int ckunpaid(struct obj *);
|
||||
staticfn char *safeq_xprname(struct obj *);
|
||||
staticfn char *safeq_shortxprname(struct obj *);
|
||||
staticfn char display_pickinv(const char *, const char *, const char *,
|
||||
boolean, boolean, long *);
|
||||
static char display_used_invlets(char);
|
||||
static boolean this_type_only(struct obj *);
|
||||
static void dounpaid(int, int, int);
|
||||
static struct obj *find_unpaid(struct obj *, struct obj **);
|
||||
static void menu_identify(int);
|
||||
static boolean tool_being_used(struct obj *);
|
||||
static int adjust_ok(struct obj *);
|
||||
static int adjust_gold_ok(struct obj *);
|
||||
static int doorganize_core(struct obj *);
|
||||
static char obj_to_let(struct obj *);
|
||||
static boolean item_naming_classification(struct obj *, char *, char *);
|
||||
static int item_reading_classification(struct obj *, char *);
|
||||
static void ia_addmenu(winid, int, char, const char *);
|
||||
static void itemactions_pushkeys(struct obj *, int);
|
||||
static int itemactions(struct obj *);
|
||||
static int dispinv_with_action(char *, boolean, const char *);
|
||||
staticfn char display_used_invlets(char);
|
||||
staticfn boolean this_type_only(struct obj *);
|
||||
staticfn void dounpaid(int, int, int);
|
||||
staticfn struct obj *find_unpaid(struct obj *, struct obj **);
|
||||
staticfn void menu_identify(int);
|
||||
staticfn boolean tool_being_used(struct obj *);
|
||||
staticfn int adjust_ok(struct obj *);
|
||||
staticfn int adjust_gold_ok(struct obj *);
|
||||
staticfn int doorganize_core(struct obj *);
|
||||
staticfn char obj_to_let(struct obj *);
|
||||
staticfn boolean item_naming_classification(struct obj *, char *, char *);
|
||||
staticfn int item_reading_classification(struct obj *, char *);
|
||||
staticfn void ia_addmenu(winid, int, char, const char *);
|
||||
staticfn void itemactions_pushkeys(struct obj *, int);
|
||||
staticfn int itemactions(struct obj *);
|
||||
staticfn int dispinv_with_action(char *, boolean, const char *);
|
||||
|
||||
/* enum and structs are defined in wintype.h */
|
||||
static win_request_info wri_info;
|
||||
@@ -76,7 +76,7 @@ static const char *inuse_headers[] = { /* [4] shown first, [1] last */
|
||||
|
||||
/* sortloot() classification for in-use sort;
|
||||
called at most once [per sort] for each object */
|
||||
static void
|
||||
staticfn void
|
||||
inuse_classify(Loot *sort_item, struct obj *obj)
|
||||
{
|
||||
long w_mask = (obj->owornmask & (W_ACCESSORY | W_WEAPONS | W_ARMOR));
|
||||
@@ -315,7 +315,7 @@ loot_classify(Loot *sort_item, struct obj *obj)
|
||||
}
|
||||
|
||||
/* sortloot() formatting routine; for alphabetizing, not shown to user */
|
||||
static char *
|
||||
staticfn char *
|
||||
loot_xname(struct obj *obj)
|
||||
{
|
||||
struct obj saveo;
|
||||
@@ -397,7 +397,7 @@ loot_xname(struct obj *obj)
|
||||
}
|
||||
|
||||
/* '$'==1, 'a'-'z'==2..27, 'A'-'Z'==28..53, '#'==54, catchall 55 */
|
||||
static int
|
||||
staticfn int
|
||||
invletter_value(char c)
|
||||
{
|
||||
return ('a' <= c && c <= 'z') ? (c - 'a' + 2)
|
||||
@@ -408,7 +408,7 @@ invletter_value(char c)
|
||||
}
|
||||
|
||||
/* qsort comparison routine for sortloot() */
|
||||
static int QSORTCALLBACK
|
||||
staticfn int QSORTCALLBACK
|
||||
sortloot_cmp(const genericptr vptr1, const genericptr vptr2)
|
||||
{
|
||||
struct sortloot_item *sli1 = (struct sortloot_item *) vptr1,
|
||||
@@ -744,7 +744,7 @@ assigninvlet(struct obj *otmp)
|
||||
#define inv_rank(o) ((o)->invlet ^ 040)
|
||||
|
||||
/* sort the inventory; used by addinv() and doorganize() */
|
||||
static void
|
||||
staticfn void
|
||||
reorder_invent(void)
|
||||
{
|
||||
struct obj *otmp, *prev, *next;
|
||||
@@ -1038,7 +1038,7 @@ addinv_core2(struct obj *obj)
|
||||
* Add obj to the hero's inventory. Make sure the object is "free".
|
||||
* Adjust hero attributes as necessary.
|
||||
*/
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
addinv_core0(struct obj *obj, struct obj *other_obj,
|
||||
boolean update_perm_invent)
|
||||
{
|
||||
@@ -1581,7 +1581,7 @@ g_at(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* compact a string of inventory letters by dashing runs of letters */
|
||||
static void
|
||||
staticfn void
|
||||
compactify(char *buf)
|
||||
{
|
||||
int i1 = 1, i2 = 1;
|
||||
@@ -1626,13 +1626,13 @@ splittable(struct obj *obj)
|
||||
}
|
||||
|
||||
/* match the prompt for either 'T' or 'R' command */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
taking_off(const char *action)
|
||||
{
|
||||
return !strcmp(action, "take off") || !strcmp(action, "remove");
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mime_action(const char *word)
|
||||
{
|
||||
char buf[BUFSZ];
|
||||
@@ -1673,7 +1673,7 @@ any_obj_ok(struct obj *obj)
|
||||
}
|
||||
|
||||
/* return string describing your hands based on action. */
|
||||
static char *
|
||||
staticfn char *
|
||||
getobj_hands_txt(const char *action, char *qbuf)
|
||||
{
|
||||
if (!strcmp(action, "grease")) {
|
||||
@@ -2092,14 +2092,14 @@ silly_thing(const char *word,
|
||||
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
ckvalidcat(struct obj *otmp)
|
||||
{
|
||||
/* use allow_category() from pickup.c */
|
||||
return (int) allow_category(otmp);
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
ckunpaid(struct obj *otmp)
|
||||
{
|
||||
return (otmp->unpaid || (Has_contents(otmp) && count_unpaid(otmp->cobj)));
|
||||
@@ -2136,7 +2136,7 @@ static struct xprnctx {
|
||||
} safeq_xprn_ctx;
|
||||
|
||||
/* safe_qbuf() -> short_oname() callback */
|
||||
static char *
|
||||
staticfn char *
|
||||
safeq_xprname(struct obj *obj)
|
||||
{
|
||||
return xprname(obj, (char *) 0, safeq_xprn_ctx.let, safeq_xprn_ctx.dot,
|
||||
@@ -2144,7 +2144,7 @@ safeq_xprname(struct obj *obj)
|
||||
}
|
||||
|
||||
/* alternate safe_qbuf() -> short_oname() callback */
|
||||
static char *
|
||||
staticfn char *
|
||||
safeq_shortxprname(struct obj *obj)
|
||||
{
|
||||
return xprname(obj, ansimpleoname(obj), safeq_xprn_ctx.let,
|
||||
@@ -2530,7 +2530,7 @@ identify(struct obj *otmp)
|
||||
}
|
||||
|
||||
/* menu of unidentified objects; select and identify up to id_limit of them */
|
||||
static void
|
||||
staticfn void
|
||||
menu_identify(int id_limit)
|
||||
{
|
||||
menu_item *pick_list;
|
||||
@@ -2728,7 +2728,7 @@ doperminv(void)
|
||||
}
|
||||
|
||||
/* should of course only be called for things in invent */
|
||||
static char
|
||||
staticfn char
|
||||
obj_to_let(struct obj *obj)
|
||||
{
|
||||
if (!flags.invlet_constant) {
|
||||
@@ -2855,7 +2855,7 @@ enum item_action_actions {
|
||||
};
|
||||
|
||||
/* construct text for the menu entries for IA_NAME_OBJ and IA_NAME_OTYP */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
item_naming_classification(
|
||||
struct obj *obj,
|
||||
char *onamebuf,
|
||||
@@ -2895,7 +2895,7 @@ item_naming_classification(
|
||||
}
|
||||
|
||||
/* construct text for the menu entries for IA_READ_OBJ */
|
||||
static int
|
||||
staticfn int
|
||||
item_reading_classification(struct obj *obj, char *outbuf)
|
||||
{
|
||||
int otyp = obj->otyp, res = IA_READ_OBJ;
|
||||
@@ -2936,7 +2936,7 @@ item_reading_classification(struct obj *obj, char *outbuf)
|
||||
return res;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
ia_addmenu(winid win, int act, char let, const char *txt)
|
||||
{
|
||||
anything any;
|
||||
@@ -2948,7 +2948,7 @@ ia_addmenu(winid win, int act, char let, const char *txt)
|
||||
ATR_NONE, clr, txt, MENU_ITEMFLAGS_NONE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
itemactions_pushkeys(struct obj *otmp, int act)
|
||||
{
|
||||
switch (act) {
|
||||
@@ -3083,7 +3083,7 @@ itemactions_pushkeys(struct obj *otmp, int act)
|
||||
}
|
||||
|
||||
/* Show menu of possible actions hero could do with item otmp */
|
||||
static int
|
||||
staticfn int
|
||||
itemactions(struct obj *otmp)
|
||||
{
|
||||
int n, act = IA_NONE;
|
||||
@@ -3420,7 +3420,7 @@ itemactions(struct obj *otmp)
|
||||
order to preform context-sensitive item action on it; always returns 'ok';
|
||||
invent subsets specified by the ')', '[', '(', '=', '"', or '*' commands
|
||||
when they're invoked with the 'm' prefix (or without it for '*') */
|
||||
static int
|
||||
staticfn int
|
||||
dispinv_with_action(
|
||||
char *lets, /* list of invlet values to include */
|
||||
boolean use_inuse_ordering, /* affects sortloot() and header labels */
|
||||
@@ -3475,7 +3475,7 @@ ddoinv(void)
|
||||
* next unpaid object is returned. This routine recursively follows
|
||||
* containers.
|
||||
*/
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
find_unpaid(struct obj *list, struct obj **last_found)
|
||||
{
|
||||
struct obj *obj;
|
||||
@@ -3511,7 +3511,7 @@ free_pickinv_cache(void)
|
||||
* Internal function used by display_inventory and getobj that can display
|
||||
* inventory and return a count as well as a letter.
|
||||
*/
|
||||
static char
|
||||
staticfn char
|
||||
display_pickinv(
|
||||
const char *lets, /* non-compacted list of invlet values */
|
||||
const char *xtra_choice, /* non-object "bare hands" or "fingers" */
|
||||
@@ -3906,7 +3906,7 @@ display_inventory(const char *lets, boolean want_reply)
|
||||
* Show what is current using inventory letters.
|
||||
*
|
||||
*/
|
||||
static char
|
||||
staticfn char
|
||||
display_used_invlets(char avoidlet)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -4092,7 +4092,7 @@ count_contents(
|
||||
return count;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dounpaid(
|
||||
int count, /* unpaid items in inventory */
|
||||
int floorcount, /* unpaid items on floor (rare) */
|
||||
@@ -4231,7 +4231,7 @@ dounpaid(
|
||||
}
|
||||
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
this_type_only(struct obj *obj)
|
||||
{
|
||||
boolean res = (obj->oclass == gt.this_type);
|
||||
@@ -4995,7 +4995,7 @@ doprwep(void)
|
||||
}
|
||||
|
||||
/* caller is responsible for checking !wearing_armor() */
|
||||
static void
|
||||
staticfn void
|
||||
noarmor(boolean report_uskin)
|
||||
{
|
||||
if (!uskin || !report_uskin) {
|
||||
@@ -5115,7 +5115,7 @@ dopramulet(void)
|
||||
}
|
||||
|
||||
/* is 'obj' a tool that's in use? can't simply check obj->owornmask */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
tool_being_used(struct obj *obj)
|
||||
{
|
||||
/*
|
||||
@@ -5334,7 +5334,7 @@ check_invent_gold(const char *why) /* 'why' == caller in case of warning */
|
||||
}
|
||||
|
||||
/* normal getobj callback for item to #adjust; excludes gold */
|
||||
static int
|
||||
staticfn int
|
||||
adjust_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj || obj->oclass == COIN_CLASS)
|
||||
@@ -5344,7 +5344,7 @@ adjust_ok(struct obj *obj)
|
||||
}
|
||||
|
||||
/* getobj callback for item to #adjust if gold is wonky; allows gold */
|
||||
static int
|
||||
staticfn int
|
||||
adjust_gold_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
@@ -5485,7 +5485,7 @@ adjust_split(void)
|
||||
return doorganize_core(obj);
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
doorganize_core(struct obj *obj)
|
||||
{
|
||||
struct obj *otmp, *splitting, *bumped;
|
||||
@@ -5696,7 +5696,7 @@ doorganize_core(struct obj *obj)
|
||||
}
|
||||
|
||||
/* common to display_minventory and display_cinventory */
|
||||
static void
|
||||
staticfn void
|
||||
invdisp_nothing(const char *hdr, const char *txt)
|
||||
{
|
||||
winid win;
|
||||
@@ -5715,7 +5715,7 @@ invdisp_nothing(const char *hdr, const char *txt)
|
||||
}
|
||||
|
||||
/* query_objlist callback: return things that are worn or wielded */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
worn_wield_only(struct obj *obj)
|
||||
{
|
||||
#if 1
|
||||
@@ -5797,7 +5797,7 @@ display_minventory(
|
||||
|
||||
/* format a container name for cinventory_display(), inserting "trapped"
|
||||
if that's appropriate */
|
||||
static char *
|
||||
staticfn char *
|
||||
cinv_doname(struct obj *obj)
|
||||
{
|
||||
char *result = doname(obj);
|
||||
@@ -5829,7 +5829,7 @@ cinv_doname(struct obj *obj)
|
||||
}
|
||||
|
||||
/* used by safe_qbuf() if the full doname() result is too long */
|
||||
static char *
|
||||
staticfn char *
|
||||
cinv_ansimpleoname(struct obj *obj)
|
||||
{
|
||||
char *result = ansimpleoname(obj);
|
||||
@@ -5883,7 +5883,7 @@ display_cinventory(struct obj *obj)
|
||||
}
|
||||
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
only_here(struct obj *obj)
|
||||
{
|
||||
return (obj->ox == go.only.x && obj->oy == go.only.y);
|
||||
|
||||
+4
-4
@@ -32,8 +32,8 @@
|
||||
|
||||
static inline uint32_t lower_bits(uint64_t);
|
||||
static inline uint32_t upper_bits(uint64_t);
|
||||
static void isaac64_update(isaac64_ctx *);
|
||||
static void isaac64_mix(uint64_t[8]);
|
||||
staticfn void isaac64_update(isaac64_ctx *);
|
||||
staticfn void isaac64_mix(uint64_t[8]);
|
||||
|
||||
/* Extract ISAAC64_SZ_LOG bits (starting at bit 3). */
|
||||
static inline uint32_t lower_bits(uint64_t x)
|
||||
@@ -47,7 +47,7 @@ static inline uint32_t upper_bits(uint64_t y)
|
||||
return (y >> (ISAAC64_SZ_LOG+3)) & (ISAAC64_SZ-1);
|
||||
}
|
||||
|
||||
static void isaac64_update(isaac64_ctx *_ctx){
|
||||
staticfn void isaac64_update(isaac64_ctx *_ctx){
|
||||
uint64_t *m;
|
||||
uint64_t *r;
|
||||
uint64_t a;
|
||||
@@ -100,7 +100,7 @@ static void isaac64_update(isaac64_ctx *_ctx){
|
||||
_ctx->n=ISAAC64_SZ;
|
||||
}
|
||||
|
||||
static void isaac64_mix(uint64_t _x[8]){
|
||||
staticfn void isaac64_mix(uint64_t _x[8]){
|
||||
static const unsigned char SHIFT[8]={9,9,23,15,14,20,17,14};
|
||||
int i;
|
||||
for(i=0;i<8;i++){
|
||||
|
||||
+10
-10
@@ -41,12 +41,12 @@
|
||||
#define LSF_SHOW 0x1 /* display the light source */
|
||||
#define LSF_NEEDS_FIXUP 0x2 /* need oid fixup */
|
||||
|
||||
static light_source *new_light_core(coordxy, coordxy,
|
||||
staticfn light_source *new_light_core(coordxy, coordxy,
|
||||
int, int, anything *) NONNULLPTRS;
|
||||
static void delete_ls(light_source *);
|
||||
static void discard_flashes(void);
|
||||
static void write_ls(NHFILE *, light_source *);
|
||||
static int maybe_write_ls(NHFILE *, int, boolean);
|
||||
staticfn void delete_ls(light_source *);
|
||||
staticfn void discard_flashes(void);
|
||||
staticfn void write_ls(NHFILE *, light_source *);
|
||||
staticfn int maybe_write_ls(NHFILE *, int, boolean);
|
||||
|
||||
/* imported from vision.c, for small circles */
|
||||
extern const coordxy circle_data[];
|
||||
@@ -62,7 +62,7 @@ new_light_source(coordxy x, coordxy y, int range, int type, anything *id)
|
||||
}
|
||||
|
||||
/* Create a new light source and return it. Only used within this file. */
|
||||
static light_source *
|
||||
staticfn light_source *
|
||||
new_light_core(coordxy x, coordxy y, int range, int type, anything *id)
|
||||
{
|
||||
light_source *ls;
|
||||
@@ -131,7 +131,7 @@ del_light_source(int type, anything *id)
|
||||
}
|
||||
|
||||
/* remove a light source from the light_base list and free it */
|
||||
static void
|
||||
staticfn void
|
||||
delete_ls(light_source *ls)
|
||||
{
|
||||
light_source *curr, *prev;
|
||||
@@ -349,7 +349,7 @@ transient_light_cleanup(void)
|
||||
}
|
||||
|
||||
/* camera flashes have Null object; caller wants to get rid of them now */
|
||||
static void
|
||||
staticfn void
|
||||
discard_flashes(void)
|
||||
{
|
||||
light_source *ls, *nxt_ls;
|
||||
@@ -529,7 +529,7 @@ relink_light_sources(boolean ghostly)
|
||||
* sources that would be written. If write_it is true, actually write
|
||||
* the light source out.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
maybe_write_ls(NHFILE *nhfp, int range, boolean write_it)
|
||||
{
|
||||
int count = 0, is_global;
|
||||
@@ -592,7 +592,7 @@ light_sources_sanity_check(void)
|
||||
}
|
||||
|
||||
/* Write a light source structure to disk. */
|
||||
static void
|
||||
staticfn void
|
||||
write_ls(NHFILE *nhfp, light_source *ls)
|
||||
{
|
||||
anything arg_save;
|
||||
|
||||
+10
-10
@@ -6,12 +6,12 @@
|
||||
#include "hack.h"
|
||||
|
||||
/* occupation callbacks */
|
||||
static int picklock(void);
|
||||
static int forcelock(void);
|
||||
staticfn int picklock(void);
|
||||
staticfn int forcelock(void);
|
||||
|
||||
static const char *lock_action(void);
|
||||
static boolean obstructed(coordxy, coordxy, boolean);
|
||||
static void chest_shatter_msg(struct obj *);
|
||||
staticfn const char *lock_action(void);
|
||||
staticfn boolean obstructed(coordxy, coordxy, boolean);
|
||||
staticfn void chest_shatter_msg(struct obj *);
|
||||
|
||||
boolean
|
||||
picking_lock(coordxy *x, coordxy *y)
|
||||
@@ -33,7 +33,7 @@ picking_at(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* produce an occupation string appropriate for the current activity */
|
||||
static const char *
|
||||
staticfn const char *
|
||||
lock_action(void)
|
||||
{
|
||||
/* "unlocking"+2 == "locking" */
|
||||
@@ -63,7 +63,7 @@ lock_action(void)
|
||||
}
|
||||
|
||||
/* try to open/close a lock */
|
||||
static int
|
||||
staticfn int
|
||||
picklock(void)
|
||||
{
|
||||
if (gx.xlock.box) {
|
||||
@@ -207,7 +207,7 @@ breakchestlock(struct obj *box, boolean destroyit)
|
||||
}
|
||||
|
||||
/* try to force a locked chest */
|
||||
static int
|
||||
staticfn int
|
||||
forcelock(void)
|
||||
{
|
||||
if ((gx.xlock.box->ox != u.ux) || (gx.xlock.box->oy != u.uy))
|
||||
@@ -908,7 +908,7 @@ doopen_indir(coordxy x, coordxy y)
|
||||
return ECMD_TIME;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
obstructed(coordxy x, coordxy y, boolean quietly)
|
||||
{
|
||||
struct monst *mtmp = m_at(x, y);
|
||||
@@ -1257,7 +1257,7 @@ doorlock(struct obj *otmp, coordxy x, coordxy y)
|
||||
return res;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
chest_shatter_msg(struct obj *otmp)
|
||||
{
|
||||
const char *disposition;
|
||||
|
||||
+10
-10
@@ -40,12 +40,12 @@
|
||||
* random intervals.
|
||||
*/
|
||||
|
||||
static boolean md_start(coord *);
|
||||
static boolean md_stop(coord *, coord *);
|
||||
static boolean md_rush(struct monst *, int, int);
|
||||
static void newmail(struct mail_info *);
|
||||
staticfn boolean md_start(coord *);
|
||||
staticfn boolean md_stop(coord *, coord *);
|
||||
staticfn boolean md_rush(struct monst *, int, int);
|
||||
staticfn void newmail(struct mail_info *);
|
||||
#if defined(SIMPLE_MAIL) || defined(SERVER_ADMIN_MSG)
|
||||
static void read_simplemail(const char *mbox, boolean adminmsg);
|
||||
staticfn void read_simplemail(const char *mbox, boolean adminmsg);
|
||||
#endif
|
||||
|
||||
#if !defined(UNIX) && !defined(VMS)
|
||||
@@ -145,7 +145,7 @@ getmailstatus(void)
|
||||
* Pick coordinates for a starting position for the mail daemon. Called
|
||||
* from newmail() and newphone().
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
md_start(coord *startp)
|
||||
{
|
||||
coord testcc; /* scratch coordinates */
|
||||
@@ -243,7 +243,7 @@ md_start(coord *startp)
|
||||
* enexto(). Use enexto() as a last resort because enexto() chooses
|
||||
* its point randomly, which is not what we want.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
md_stop(coord *stopp, /* stopping position (we fill it in) */
|
||||
coord *startp) /* starting position (read only) */
|
||||
{
|
||||
@@ -273,7 +273,7 @@ md_stop(coord *stopp, /* stopping position (we fill it in) */
|
||||
}
|
||||
|
||||
/* Let the mail daemon have a larger vocabulary. */
|
||||
static NEARDATA const char *mail_text[] = { "Gangway!", "Look out!",
|
||||
staticfn NEARDATA const char *mail_text[] = { "Gangway!", "Look out!",
|
||||
"Pardon me!" };
|
||||
#define md_exclamations() (mail_text[rn2(3)])
|
||||
|
||||
@@ -283,7 +283,7 @@ static NEARDATA const char *mail_text[] = { "Gangway!", "Look out!",
|
||||
* FALSE if the md gets stuck in a position where there is a monster. Return
|
||||
* TRUE otherwise.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
md_rush(struct monst *md,
|
||||
int tx, int ty) /* destination of mail daemon */
|
||||
{
|
||||
@@ -387,7 +387,7 @@ md_rush(struct monst *md,
|
||||
|
||||
/* Deliver a scroll of mail. */
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
staticfn void
|
||||
newmail(struct mail_info *info)
|
||||
{
|
||||
struct monst *md;
|
||||
|
||||
+22
-23
@@ -14,17 +14,17 @@
|
||||
(mptr->mlet == S_HUMAN && Role_if(role_pm) \
|
||||
&& (mptr->msound == MS_LEADER || mptr->msound == MS_NEMESIS))
|
||||
|
||||
static boolean uncommon(int);
|
||||
static int align_shift(struct permonst *);
|
||||
static int temperature_shift(struct permonst *);
|
||||
static boolean mk_gen_ok(int, unsigned, unsigned);
|
||||
static boolean wrong_elem_type(struct permonst *);
|
||||
static void m_initgrp(struct monst *, coordxy, coordxy, int, mmflags_nht);
|
||||
static void m_initthrow(struct monst *, int, int);
|
||||
static void m_initweap(struct monst *);
|
||||
static void m_initinv(struct monst *);
|
||||
static boolean makemon_rnd_goodpos(struct monst *, mmflags_nht, coord *);
|
||||
static void init_mextra(struct mextra *);
|
||||
staticfn boolean uncommon(int);
|
||||
staticfn int align_shift(struct permonst *);
|
||||
staticfn int temperature_shift(struct permonst *);
|
||||
staticfn boolean mk_gen_ok(int, unsigned, unsigned);
|
||||
staticfn boolean wrong_elem_type(struct permonst *);
|
||||
staticfn void m_initgrp(struct monst *, coordxy, coordxy, int, mmflags_nht);
|
||||
staticfn void m_initthrow(struct monst *, int, int);
|
||||
staticfn void m_initweap(struct monst *);
|
||||
staticfn void m_initinv(struct monst *);
|
||||
staticfn boolean makemon_rnd_goodpos(struct monst *, mmflags_nht, coord *);
|
||||
staticfn void init_mextra(struct mextra *);
|
||||
|
||||
#define m_initsgrp(mtmp, x, y, mmf) m_initgrp(mtmp, x, y, 3, mmf)
|
||||
#define m_initlgrp(mtmp, x, y, mmf) m_initgrp(mtmp, x, y, 10, mmf)
|
||||
@@ -51,7 +51,7 @@ is_home_elemental(struct permonst *ptr)
|
||||
/*
|
||||
* Return true if the given monster cannot exist on this elemental level.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
wrong_elem_type(struct permonst *ptr)
|
||||
{
|
||||
if (ptr->mlet == S_ELEMENTAL) {
|
||||
@@ -74,7 +74,7 @@ wrong_elem_type(struct permonst *ptr)
|
||||
}
|
||||
|
||||
/* make a group just like mtmp */
|
||||
static void
|
||||
staticfn void
|
||||
m_initgrp(struct monst *mtmp, coordxy x, coordxy y, int n, mmflags_nht mmflags)
|
||||
{
|
||||
coord mm;
|
||||
@@ -140,8 +140,7 @@ m_initgrp(struct monst *mtmp, coordxy x, coordxy y, int n, mmflags_nht mmflags)
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
staticfn void
|
||||
m_initthrow(struct monst *mtmp, int otyp, int oquan)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -154,7 +153,7 @@ m_initthrow(struct monst *mtmp, int otyp, int oquan)
|
||||
(void) mpickobj(mtmp, otmp);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
m_initweap(struct monst *mtmp)
|
||||
{
|
||||
struct permonst *ptr = mtmp->data;
|
||||
@@ -576,7 +575,7 @@ mkmonmoney(struct monst *mtmp, long amount)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
m_initinv(struct monst *mtmp)
|
||||
{
|
||||
int cnt;
|
||||
@@ -1041,7 +1040,7 @@ newmonhp(struct monst *mon, int mndx)
|
||||
|
||||
static const struct mextra zeromextra = DUMMY;
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
init_mextra(struct mextra *mex)
|
||||
{
|
||||
*mex = zeromextra;
|
||||
@@ -1058,7 +1057,7 @@ newmextra(void)
|
||||
return mextra;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
makemon_rnd_goodpos(
|
||||
struct monst *mon,
|
||||
mmflags_nht gpflags,
|
||||
@@ -1567,7 +1566,7 @@ create_critters(
|
||||
return known;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
uncommon(int mndx)
|
||||
{
|
||||
if (mons[mndx].geno & (G_NOGEN | G_UNIQ))
|
||||
@@ -1585,7 +1584,7 @@ uncommon(int mndx)
|
||||
* comparing the dungeon alignment and monster alignment.
|
||||
* return an integer in the range of 0-5.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
align_shift(struct permonst *ptr)
|
||||
{
|
||||
static NEARDATA long oldmoves = 0L; /* != 1, starting value of moves */
|
||||
@@ -1615,7 +1614,7 @@ align_shift(struct permonst *ptr)
|
||||
}
|
||||
|
||||
/* return larger value if monster prefers the level temperature */
|
||||
static int
|
||||
staticfn int
|
||||
temperature_shift(struct permonst *ptr)
|
||||
{
|
||||
if (gl.level.flags.temperature
|
||||
@@ -1710,7 +1709,7 @@ rndmonst_adj(int minadj, int maxadj)
|
||||
}
|
||||
|
||||
/* decide whether it's ok to generate a candidate monster by mkclass() */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
mk_gen_ok(int mndx, unsigned mvflagsmask, unsigned genomask)
|
||||
{
|
||||
struct permonst *ptr = &mons[mndx];
|
||||
|
||||
+16
-17
@@ -35,17 +35,17 @@ enum mcast_cleric_spells {
|
||||
CLC_GEYSER
|
||||
};
|
||||
|
||||
static void cursetxt(struct monst *, boolean);
|
||||
static int choose_magic_spell(int);
|
||||
static int choose_clerical_spell(int);
|
||||
static int m_cure_self(struct monst *, int);
|
||||
static void cast_wizard_spell(struct monst *, int, int);
|
||||
static void cast_cleric_spell(struct monst *, int, int);
|
||||
static boolean is_undirected_spell(unsigned int, int);
|
||||
static boolean spell_would_be_useless(struct monst *, unsigned int, int);
|
||||
staticfn void cursetxt(struct monst *, boolean);
|
||||
staticfn int choose_magic_spell(int);
|
||||
staticfn int choose_clerical_spell(int);
|
||||
staticfn int m_cure_self(struct monst *, int);
|
||||
staticfn void cast_wizard_spell(struct monst *, int, int);
|
||||
staticfn void cast_cleric_spell(struct monst *, int, int);
|
||||
staticfn boolean is_undirected_spell(unsigned int, int);
|
||||
staticfn boolean spell_would_be_useless(struct monst *, unsigned int, int);
|
||||
|
||||
/* feedback when frustrated monster couldn't cast a spell */
|
||||
static void
|
||||
staticfn void
|
||||
cursetxt(struct monst *mtmp, boolean undirected)
|
||||
{
|
||||
if (canseemon(mtmp) && couldsee(mtmp->mx, mtmp->my)) {
|
||||
@@ -73,7 +73,7 @@ cursetxt(struct monst *mtmp, boolean undirected)
|
||||
|
||||
/* convert a level-based random selection into a specific mage spell;
|
||||
inappropriate choices will be screened out by spell_would_be_useless() */
|
||||
static int
|
||||
staticfn int
|
||||
choose_magic_spell(int spellval)
|
||||
{
|
||||
/* for 3.4.3 and earlier, val greater than 22 selected default spell */
|
||||
@@ -126,7 +126,7 @@ choose_magic_spell(int spellval)
|
||||
}
|
||||
|
||||
/* convert a level-based random selection into a specific cleric spell */
|
||||
static int
|
||||
staticfn int
|
||||
choose_clerical_spell(int spellnum)
|
||||
{
|
||||
/* for 3.4.3 and earlier, num greater than 13 selected the default spell
|
||||
@@ -357,7 +357,7 @@ castmu(
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
m_cure_self(struct monst *mtmp, int dmg)
|
||||
{
|
||||
if (mtmp->mhp < mtmp->mhpmax) {
|
||||
@@ -439,8 +439,7 @@ death_inflicted_by(
|
||||
If you modify either of these, be sure to change is_undirected_spell()
|
||||
and spell_would_be_useless().
|
||||
*/
|
||||
static
|
||||
void
|
||||
staticfn void
|
||||
cast_wizard_spell(struct monst *mtmp, int dmg, int spellnum)
|
||||
{
|
||||
if (dmg == 0 && !is_undirected_spell(AD_SPEL, spellnum)) {
|
||||
@@ -618,7 +617,7 @@ cast_wizard_spell(struct monst *mtmp, int dmg, int spellnum)
|
||||
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
cast_cleric_spell(struct monst *mtmp, int dmg, int spellnum)
|
||||
{
|
||||
int orig_dmg = 0;
|
||||
@@ -865,7 +864,7 @@ cast_cleric_spell(struct monst *mtmp, int dmg, int spellnum)
|
||||
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
is_undirected_spell(unsigned int adtyp, int spellnum)
|
||||
{
|
||||
if (adtyp == AD_SPEL) {
|
||||
@@ -893,7 +892,7 @@ is_undirected_spell(unsigned int adtyp, int spellnum)
|
||||
}
|
||||
|
||||
/* Some spells are useless under some circumstances. */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
spell_would_be_useless(struct monst *mtmp, unsigned int adtyp, int spellnum)
|
||||
{
|
||||
/* Some spells don't require the player to really be there and can be cast
|
||||
|
||||
+12
-12
@@ -60,7 +60,7 @@ char *version_id_string(char *, size_t, const char *) NONNULL NONNULLPTRS;
|
||||
char *bannerc_string(char *, size_t, const char *) NONNULL NONNULLPTRS;
|
||||
int case_insensitive_comp(const char *, const char *) NONNULLPTRS;
|
||||
|
||||
static void make_version(void);
|
||||
staticfn void make_version(void);
|
||||
|
||||
#ifndef HAS_NO_MKSTEMP
|
||||
#ifdef _MSC_VER
|
||||
@@ -83,10 +83,10 @@ const char *do_runtime_info(int *) NO_NNARGS;
|
||||
void release_runtime_info(void);
|
||||
char *mdlib_version_string(char *, const char *) NONNULL NONNULLPTRS;
|
||||
|
||||
static void build_options(void);
|
||||
static int count_and_validate_winopts(void);
|
||||
static void opt_out_words(char *, int *) NONNULLPTRS;
|
||||
static void build_savebones_compat_string(void);
|
||||
staticfn void build_options(void);
|
||||
staticfn int count_and_validate_winopts(void);
|
||||
staticfn void opt_out_words(char *, int *) NONNULLPTRS;
|
||||
staticfn void build_savebones_compat_string(void);
|
||||
|
||||
static int idxopttext, done_runtime_opt_init_once = 0;
|
||||
#define MAXOPT 60 /* 3.7: currently 40 lines get inserted into opttext[] */
|
||||
@@ -160,7 +160,7 @@ static struct win_information window_opts[] = {
|
||||
};
|
||||
|
||||
#if !defined(MAKEDEFS_C)
|
||||
static int count_and_validate_soundlibopts(void);
|
||||
staticfn int count_and_validate_soundlibopts(void);
|
||||
|
||||
struct soundlib_information {
|
||||
enum soundlib_ids id;
|
||||
@@ -252,7 +252,7 @@ md_ignored_features(void)
|
||||
);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
make_version(void)
|
||||
{
|
||||
int i;
|
||||
@@ -415,7 +415,7 @@ mkstemp(char *template)
|
||||
|
||||
static char save_bones_compat_buf[BUFSZ];
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
build_savebones_compat_string(void)
|
||||
{
|
||||
#ifdef VERSION_COMPATIBILITY
|
||||
@@ -633,7 +633,7 @@ static const char *const build_opts[] = {
|
||||
"and basic NetHack features"
|
||||
};
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
count_and_validate_winopts(void)
|
||||
{
|
||||
int i, cnt = 0;
|
||||
@@ -658,7 +658,7 @@ count_and_validate_winopts(void)
|
||||
}
|
||||
|
||||
#if !defined(MAKEDEFS_C)
|
||||
static int
|
||||
staticfn int
|
||||
count_and_validate_soundlibopts(void)
|
||||
{
|
||||
int i, cnt = 0;
|
||||
@@ -672,7 +672,7 @@ count_and_validate_soundlibopts(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
opt_out_words(
|
||||
char *str, /* input, but modified during processing */
|
||||
int *length_p) /* in/out */
|
||||
@@ -700,7 +700,7 @@ opt_out_words(
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
build_options(void)
|
||||
{
|
||||
char buf[COLBUFSZ];
|
||||
|
||||
+20
-21
@@ -9,21 +9,21 @@
|
||||
static const char brief_feeling[] =
|
||||
"have a %s feeling for a moment, then it passes.";
|
||||
|
||||
static void noises(struct monst *, struct attack *);
|
||||
static void pre_mm_attack(struct monst *, struct monst *);
|
||||
static void missmm(struct monst *, struct monst *, struct attack *);
|
||||
static int hitmm(struct monst *, struct monst *, struct attack *,
|
||||
staticfn void noises(struct monst *, struct attack *);
|
||||
staticfn void pre_mm_attack(struct monst *, struct monst *);
|
||||
staticfn void missmm(struct monst *, struct monst *, struct attack *);
|
||||
staticfn int hitmm(struct monst *, struct monst *, struct attack *,
|
||||
struct obj *, int);
|
||||
static int gazemm(struct monst *, struct monst *, struct attack *);
|
||||
static int gulpmm(struct monst *, struct monst *, struct attack *);
|
||||
static int explmm(struct monst *, struct monst *, struct attack *);
|
||||
static int mdamagem(struct monst *, struct monst *, struct attack *,
|
||||
staticfn int gazemm(struct monst *, struct monst *, struct attack *);
|
||||
staticfn int gulpmm(struct monst *, struct monst *, struct attack *);
|
||||
staticfn int explmm(struct monst *, struct monst *, struct attack *);
|
||||
staticfn int mdamagem(struct monst *, struct monst *, struct attack *,
|
||||
struct obj *, int);
|
||||
static void mswingsm(struct monst *, struct monst *, struct obj *);
|
||||
static int passivemm(struct monst *, struct monst *, boolean, int,
|
||||
staticfn void mswingsm(struct monst *, struct monst *, struct obj *);
|
||||
staticfn int passivemm(struct monst *, struct monst *, boolean, int,
|
||||
struct obj *);
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
noises(struct monst *magr, struct attack *mattk)
|
||||
{
|
||||
boolean farq = (mdistu(magr) > 15);
|
||||
@@ -37,7 +37,7 @@ noises(struct monst *magr, struct attack *mattk)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
pre_mm_attack(struct monst *magr, struct monst *mdef)
|
||||
{
|
||||
boolean showit = FALSE;
|
||||
@@ -72,8 +72,7 @@ pre_mm_attack(struct monst *magr, struct monst *mdef)
|
||||
}
|
||||
|
||||
/* feedback for when a monster-vs-monster attack misses */
|
||||
static
|
||||
void
|
||||
staticfn void
|
||||
missmm(
|
||||
struct monst *magr, /* attacker */
|
||||
struct monst *mdef, /* defender */
|
||||
@@ -631,7 +630,7 @@ failed_grab(
|
||||
}
|
||||
|
||||
/* Returns the result of mdamagem(). */
|
||||
static int
|
||||
staticfn int
|
||||
hitmm(
|
||||
struct monst *magr,
|
||||
struct monst *mdef,
|
||||
@@ -722,7 +721,7 @@ hitmm(
|
||||
}
|
||||
|
||||
/* Returns the same values as mdamagem(). */
|
||||
static int
|
||||
staticfn int
|
||||
gazemm(struct monst *magr, struct monst *mdef, struct attack *mattk)
|
||||
{
|
||||
char buf[BUFSZ];
|
||||
@@ -835,7 +834,7 @@ engulf_target(struct monst *magr, struct monst *mdef)
|
||||
}
|
||||
|
||||
/* Returns the same values as mattackm(). */
|
||||
static int
|
||||
staticfn int
|
||||
gulpmm(
|
||||
struct monst *magr,
|
||||
struct monst *mdef,
|
||||
@@ -954,7 +953,7 @@ gulpmm(
|
||||
return status;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
explmm(struct monst *magr, struct monst *mdef, struct attack *mattk)
|
||||
{
|
||||
int result;
|
||||
@@ -1000,7 +999,7 @@ explmm(struct monst *magr, struct monst *mdef, struct attack *mattk)
|
||||
/*
|
||||
* See comment at top of mattackm(), for return values.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
mdamagem(
|
||||
struct monst *magr,
|
||||
struct monst *mdef,
|
||||
@@ -1259,7 +1258,7 @@ rustm(struct monst *mdef, struct obj *obj)
|
||||
(void) erode_obj(obj, (char *) 0, dmgtyp, EF_GREASE | EF_VERBOSE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mswingsm(
|
||||
struct monst *magr, /* attacker */
|
||||
struct monst *mdef, /* defender */
|
||||
@@ -1279,7 +1278,7 @@ mswingsm(
|
||||
* Passive responses by defenders. Does not replicate responses already
|
||||
* handled above. Returns same values as mattackm.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
passivemm(
|
||||
struct monst *magr,
|
||||
struct monst *mdef,
|
||||
|
||||
+20
-20
@@ -8,18 +8,18 @@
|
||||
|
||||
static NEARDATA struct obj *mon_currwep = (struct obj *) 0;
|
||||
|
||||
static void missmu(struct monst *, boolean, struct attack *);
|
||||
static void mswings(struct monst *, struct obj *, boolean);
|
||||
static void wildmiss(struct monst *, struct attack *);
|
||||
static void calc_mattacku_vars(struct monst *, boolean *, boolean *,
|
||||
staticfn void missmu(struct monst *, boolean, struct attack *);
|
||||
staticfn void mswings(struct monst *, struct obj *, boolean);
|
||||
staticfn void wildmiss(struct monst *, struct attack *);
|
||||
staticfn void calc_mattacku_vars(struct monst *, boolean *, boolean *,
|
||||
boolean *, boolean *);
|
||||
static void summonmu(struct monst *, boolean);
|
||||
static int hitmu(struct monst *, struct attack *);
|
||||
static int gulpmu(struct monst *, struct attack *);
|
||||
static int explmu(struct monst *, struct attack *, boolean);
|
||||
static void mayberem(struct monst *, const char *, struct obj *,
|
||||
staticfn void summonmu(struct monst *, boolean);
|
||||
staticfn int hitmu(struct monst *, struct attack *);
|
||||
staticfn int gulpmu(struct monst *, struct attack *);
|
||||
staticfn int explmu(struct monst *, struct attack *, boolean);
|
||||
staticfn void mayberem(struct monst *, const char *, struct obj *,
|
||||
const char *);
|
||||
static int passiveum(struct permonst *, struct monst *, struct attack *);
|
||||
staticfn int passiveum(struct permonst *, struct monst *, struct attack *);
|
||||
|
||||
#define ld() ((yyyymmdd((time_t) 0) - (getyear() * 10000L)) == 0xe5)
|
||||
|
||||
@@ -80,7 +80,7 @@ hitmsg(struct monst *mtmp, struct attack *mattk)
|
||||
}
|
||||
|
||||
/* monster missed you */
|
||||
static void
|
||||
staticfn void
|
||||
missmu(struct monst *mtmp, boolean nearmiss, struct attack *mattk)
|
||||
{
|
||||
gh.hitmsg_mid = 0;
|
||||
@@ -125,7 +125,7 @@ mswings_verb(
|
||||
}
|
||||
|
||||
/* monster swings obj */
|
||||
static void
|
||||
staticfn void
|
||||
mswings(
|
||||
struct monst *mtmp, /* attacker */
|
||||
struct obj *otemp, /* attacker's weapon */
|
||||
@@ -167,7 +167,7 @@ u_slow_down(void)
|
||||
|
||||
/* monster attacked wrong location due to monster blindness, hero
|
||||
invisibility, hero displacement, or hero being underwater */
|
||||
static void
|
||||
staticfn void
|
||||
wildmiss(struct monst *mtmp, struct attack *mattk)
|
||||
{
|
||||
int compat;
|
||||
@@ -405,7 +405,7 @@ getmattk(struct monst *magr, struct monst *mdef,
|
||||
}
|
||||
|
||||
/* calc some variables needed for mattacku() */
|
||||
static void
|
||||
staticfn void
|
||||
calc_mattacku_vars(
|
||||
struct monst *mtmp,
|
||||
boolean *ranged, boolean *range2,
|
||||
@@ -877,7 +877,7 @@ mattacku(struct monst *mtmp)
|
||||
}
|
||||
|
||||
/* monster summons help for its fight against hero */
|
||||
static void
|
||||
staticfn void
|
||||
summonmu(struct monst *mtmp, boolean youseeit)
|
||||
{
|
||||
struct permonst *mdat = mtmp->data;
|
||||
@@ -1062,7 +1062,7 @@ magic_negation(struct monst *mon)
|
||||
* hitmu: monster hits you
|
||||
* returns MM_ flags
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
hitmu(struct monst *mtmp, struct attack *mattk)
|
||||
{
|
||||
struct permonst *mdat = mtmp->data;
|
||||
@@ -1206,7 +1206,7 @@ gulp_blnd_check(void)
|
||||
}
|
||||
|
||||
/* monster swallows you, or damage if u.uswallow */
|
||||
static int
|
||||
staticfn int
|
||||
gulpmu(struct monst *mtmp, struct attack *mattk)
|
||||
{
|
||||
struct trap *t = t_at(u.ux, u.uy);
|
||||
@@ -1498,7 +1498,7 @@ gulpmu(struct monst *mtmp, struct attack *mattk)
|
||||
}
|
||||
|
||||
/* monster explodes in your face */
|
||||
static int
|
||||
staticfn int
|
||||
explmu(struct monst *mtmp, struct attack *mattk, boolean ufound)
|
||||
{
|
||||
boolean kill_agr = TRUE;
|
||||
@@ -2195,7 +2195,7 @@ doseduce(struct monst *mon)
|
||||
}
|
||||
|
||||
/* 'mon' tries to remove a piece of hero's armor */
|
||||
static void
|
||||
staticfn void
|
||||
mayberem(struct monst *mon,
|
||||
const char *seducer, /* only used for alternate message */
|
||||
struct obj *obj, const char *str)
|
||||
@@ -2248,7 +2248,7 @@ mayberem(struct monst *mon,
|
||||
* to know whether hero reverted in order to decide whether passive
|
||||
* damage applies.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
passiveum(
|
||||
struct permonst *olduasmon,
|
||||
struct monst *mtmp,
|
||||
|
||||
+64
-64
@@ -9,40 +9,40 @@
|
||||
/* croom->lx etc are schar (width <= int), so % arith ensures that */
|
||||
/* conversion of result to int is reasonable */
|
||||
|
||||
static boolean generate_stairs_room_good(struct mkroom *, int);
|
||||
static struct mkroom *generate_stairs_find_room(void);
|
||||
static void generate_stairs(void);
|
||||
static void mkfount(struct mkroom *);
|
||||
static boolean find_okay_roompos(struct mkroom *, coord *) NONNULLARG12;
|
||||
static void mksink(struct mkroom *);
|
||||
static void mkaltar(struct mkroom *);
|
||||
static void mkgrave(struct mkroom *);
|
||||
static void mkinvpos(coordxy, coordxy, int);
|
||||
static int mkinvk_check_wall(coordxy x, coordxy y);
|
||||
static void mk_knox_portal(coordxy, coordxy);
|
||||
static void makevtele(void);
|
||||
static void fill_ordinary_room(struct mkroom *, boolean) NONNULLARG1;
|
||||
static void makelevel(void);
|
||||
static boolean bydoor(coordxy, coordxy);
|
||||
static void mktrap_victim(struct trap *);
|
||||
static int traptype_rnd(unsigned);
|
||||
static int traptype_roguelvl(void);
|
||||
static struct mkroom *find_branch_room(coord *) NONNULLARG1;
|
||||
static struct mkroom *pos_to_room(coordxy, coordxy);
|
||||
static boolean cardinal_nextto_room(struct mkroom *, coordxy, coordxy);
|
||||
static boolean place_niche(struct mkroom *, int *, coordxy *, coordxy *);
|
||||
static void makeniche(int);
|
||||
static void make_niches(void);
|
||||
static int QSORTCALLBACK mkroom_cmp(const genericptr, const genericptr);
|
||||
static void dosdoor(coordxy, coordxy, struct mkroom *, int);
|
||||
static void join(int, int, boolean);
|
||||
static void alloc_doors(void);
|
||||
static void do_room_or_subroom(struct mkroom *,
|
||||
staticfn boolean generate_stairs_room_good(struct mkroom *, int);
|
||||
staticfn struct mkroom *generate_stairs_find_room(void);
|
||||
staticfn void generate_stairs(void);
|
||||
staticfn void mkfount(struct mkroom *);
|
||||
staticfn boolean find_okay_roompos(struct mkroom *, coord *) NONNULLARG12;
|
||||
staticfn void mksink(struct mkroom *);
|
||||
staticfn void mkaltar(struct mkroom *);
|
||||
staticfn void mkgrave(struct mkroom *);
|
||||
staticfn void mkinvpos(coordxy, coordxy, int);
|
||||
staticfn int mkinvk_check_wall(coordxy x, coordxy y);
|
||||
staticfn void mk_knox_portal(coordxy, coordxy);
|
||||
staticfn void makevtele(void);
|
||||
staticfn void fill_ordinary_room(struct mkroom *, boolean) NONNULLARG1;
|
||||
staticfn void makelevel(void);
|
||||
staticfn boolean bydoor(coordxy, coordxy);
|
||||
staticfn void mktrap_victim(struct trap *);
|
||||
staticfn int traptype_rnd(unsigned);
|
||||
staticfn int traptype_roguelvl(void);
|
||||
staticfn struct mkroom *find_branch_room(coord *) NONNULLARG1;
|
||||
staticfn struct mkroom *pos_to_room(coordxy, coordxy);
|
||||
staticfn boolean cardinal_nextto_room(struct mkroom *, coordxy, coordxy);
|
||||
staticfn boolean place_niche(struct mkroom *, int *, coordxy *, coordxy *);
|
||||
staticfn void makeniche(int);
|
||||
staticfn void make_niches(void);
|
||||
staticfn int QSORTCALLBACK mkroom_cmp(const genericptr, const genericptr);
|
||||
staticfn void dosdoor(coordxy, coordxy, struct mkroom *, int);
|
||||
staticfn void join(int, int, boolean);
|
||||
staticfn void alloc_doors(void);
|
||||
staticfn void do_room_or_subroom(struct mkroom *,
|
||||
coordxy, coordxy, coordxy, coordxy,
|
||||
boolean, schar, boolean, boolean);
|
||||
static void makerooms(void);
|
||||
static boolean door_into_nonjoined(coordxy, coordxy);
|
||||
static boolean finddpos(coord *, coordxy, coordxy, coordxy, coordxy);
|
||||
staticfn void makerooms(void);
|
||||
staticfn boolean door_into_nonjoined(coordxy, coordxy);
|
||||
staticfn boolean finddpos(coord *, coordxy, coordxy, coordxy, coordxy);
|
||||
|
||||
#define create_vault() create_room(-1, -1, 2, 2, -1, -1, VAULT, TRUE)
|
||||
#define init_vault() gv.vault_x = -1
|
||||
@@ -50,7 +50,7 @@ static boolean finddpos(coord *, coordxy, coordxy, coordxy, coordxy);
|
||||
|
||||
/* Args must be (const genericptr) so that qsort will always be happy. */
|
||||
|
||||
static int QSORTCALLBACK
|
||||
staticfn int QSORTCALLBACK
|
||||
mkroom_cmp(const genericptr vx, const genericptr vy)
|
||||
{
|
||||
const struct mkroom *x, *y;
|
||||
@@ -68,7 +68,7 @@ mkroom_cmp(const genericptr vx, const genericptr vy)
|
||||
* (such as shops) that will never randomly generate unwanted doors in order
|
||||
* to connect them up to other areas.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
door_into_nonjoined(coordxy x, coordxy y)
|
||||
{
|
||||
coordxy tx, ty, i;
|
||||
@@ -88,7 +88,7 @@ door_into_nonjoined(coordxy x, coordxy y)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
finddpos(coord *cc, coordxy xl, coordxy yl, coordxy xh, coordxy yh)
|
||||
{
|
||||
coordxy x, y;
|
||||
@@ -140,7 +140,7 @@ sort_rooms(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
do_room_or_subroom(struct mkroom *croom,
|
||||
coordxy lowx, coordxy lowy, coordxy hix, coordxy hiy,
|
||||
boolean lit, schar rtype, boolean special, boolean is_room)
|
||||
@@ -264,7 +264,7 @@ free_luathemes(enum lua_theme_group theme_group)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
makerooms(void)
|
||||
{
|
||||
boolean tried_vault = FALSE;
|
||||
@@ -341,7 +341,7 @@ makerooms(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
join(int a, int b, boolean nxcor)
|
||||
{
|
||||
coord cc, tt, org, dest;
|
||||
@@ -460,7 +460,7 @@ makecorridors(void)
|
||||
}
|
||||
|
||||
/* (re)allocate space for gd.doors array */
|
||||
static void
|
||||
staticfn void
|
||||
alloc_doors(void)
|
||||
{
|
||||
if (!gd.doors || gd.doorindex >= gd.doors_alloc) {
|
||||
@@ -518,7 +518,7 @@ add_door(coordxy x, coordxy y, struct mkroom *aroom)
|
||||
gd.doors[aroom->fdoor].y = y;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dosdoor(coordxy x, coordxy y, struct mkroom *aroom, int type)
|
||||
{
|
||||
boolean shdoor = *in_rooms(x, y, SHOPBASE) ? TRUE : FALSE;
|
||||
@@ -584,7 +584,7 @@ dosdoor(coordxy x, coordxy y, struct mkroom *aroom, int type)
|
||||
|
||||
/* is x,y location such that NEWS direction from it is inside aroom,
|
||||
excluding subrooms */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cardinal_nextto_room(struct mkroom *aroom, coordxy x, coordxy y)
|
||||
{
|
||||
int rmno = (int) ((aroom - gr.rooms) + ROOMOFFSET);
|
||||
@@ -604,7 +604,7 @@ cardinal_nextto_room(struct mkroom *aroom, coordxy x, coordxy y)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
place_niche(
|
||||
struct mkroom *aroom,
|
||||
int *dy,
|
||||
@@ -643,7 +643,7 @@ static NEARDATA const char *trap_engravings[TRAPNUM] = {
|
||||
(char *) 0, (char *) 0,
|
||||
};
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
makeniche(int trap_type)
|
||||
{
|
||||
struct mkroom *aroom;
|
||||
@@ -705,7 +705,7 @@ makeniche(int trap_type)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
make_niches(void)
|
||||
{
|
||||
int ct = rnd((gn.nroom >> 1) + 1), dep = depth(&u.uz);
|
||||
@@ -724,7 +724,7 @@ make_niches(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
makevtele(void)
|
||||
{
|
||||
makeniche(TELEP_TRAP);
|
||||
@@ -841,7 +841,7 @@ clear_level_structures(void)
|
||||
|
||||
If bonus_items is TRUE, there may be an additional special item
|
||||
generated, depending on depth. */
|
||||
static void
|
||||
staticfn void
|
||||
fill_ordinary_room(
|
||||
struct mkroom *croom,
|
||||
boolean bonus_items)
|
||||
@@ -1076,7 +1076,7 @@ fill_ordinary_room(
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
makelevel(void)
|
||||
{
|
||||
struct mkroom *croom;
|
||||
@@ -1467,7 +1467,7 @@ topologize(struct mkroom *croom)
|
||||
}
|
||||
|
||||
/* Find an unused room for a branch location. */
|
||||
static struct mkroom *
|
||||
staticfn struct mkroom *
|
||||
find_branch_room(coord *mp)
|
||||
{
|
||||
struct mkroom *croom = 0;
|
||||
@@ -1484,7 +1484,7 @@ find_branch_room(coord *mp)
|
||||
}
|
||||
|
||||
/* Find the room for (x,y). Return null if not in a room. */
|
||||
static struct mkroom *
|
||||
staticfn struct mkroom *
|
||||
pos_to_room(coordxy x, coordxy y)
|
||||
{
|
||||
int i;
|
||||
@@ -1559,7 +1559,7 @@ place_branch(
|
||||
gm.made_branch = TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
bydoor(coordxy x, coordxy y)
|
||||
{
|
||||
int typ;
|
||||
@@ -1624,7 +1624,7 @@ occupied(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* generate a corpse and some items on top of a trap */
|
||||
static void
|
||||
staticfn void
|
||||
mktrap_victim(struct trap *ttmp)
|
||||
{
|
||||
/* Object generated by the trap; initially NULL, stays NULL if
|
||||
@@ -1744,7 +1744,7 @@ mktrap_victim(struct trap *ttmp)
|
||||
}
|
||||
|
||||
/* pick a random trap type, return NO_TRAP if "too hard" */
|
||||
static int
|
||||
staticfn int
|
||||
traptype_rnd(unsigned mktrapflags)
|
||||
{
|
||||
unsigned lvl = level_difficulty();
|
||||
@@ -1808,7 +1808,7 @@ traptype_rnd(unsigned mktrapflags)
|
||||
}
|
||||
|
||||
/* random trap type for the Rogue level */
|
||||
static int
|
||||
staticfn int
|
||||
traptype_roguelvl(void)
|
||||
{
|
||||
int kind;
|
||||
@@ -1999,7 +1999,7 @@ mkstairs(
|
||||
}
|
||||
|
||||
/* is room a good one to generate up or down stairs in? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
generate_stairs_room_good(struct mkroom *croom, int phase)
|
||||
{
|
||||
/*
|
||||
@@ -2017,7 +2017,7 @@ generate_stairs_room_good(struct mkroom *croom, int phase)
|
||||
}
|
||||
|
||||
/* find a good room to generate an up or down stairs in */
|
||||
static struct mkroom *
|
||||
staticfn struct mkroom *
|
||||
generate_stairs_find_room(void)
|
||||
{
|
||||
struct mkroom *croom;
|
||||
@@ -2048,7 +2048,7 @@ generate_stairs_find_room(void)
|
||||
|
||||
/* construct stairs up and down within the same branch,
|
||||
up and down in different rooms if possible */
|
||||
static void
|
||||
staticfn void
|
||||
generate_stairs(void)
|
||||
{
|
||||
/* generate_stairs_find_room() returns Null if nroom == 0, but that
|
||||
@@ -2083,7 +2083,7 @@ generate_stairs(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mkfount(struct mkroom *croom)
|
||||
{
|
||||
coord m;
|
||||
@@ -2101,7 +2101,7 @@ mkfount(struct mkroom *croom)
|
||||
gl.level.flags.nfountains++;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
find_okay_roompos(struct mkroom *croom, coord *crd)
|
||||
{
|
||||
int tryct = 0;
|
||||
@@ -2115,7 +2115,7 @@ find_okay_roompos(struct mkroom *croom, coord *crd)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mksink(struct mkroom *croom)
|
||||
{
|
||||
coord m;
|
||||
@@ -2130,7 +2130,7 @@ mksink(struct mkroom *croom)
|
||||
gl.level.flags.nsinks++;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mkaltar(struct mkroom *croom)
|
||||
{
|
||||
coord m;
|
||||
@@ -2151,7 +2151,7 @@ mkaltar(struct mkroom *croom)
|
||||
levl[m.x][m.y].altarmask = Align2amask(al);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mkgrave(struct mkroom *croom)
|
||||
{
|
||||
coord m;
|
||||
@@ -2301,7 +2301,7 @@ mkinvokearea(void)
|
||||
/* Change level topology. Boulders in the vicinity are eliminated.
|
||||
* Temporarily overrides vision in the name of a nice effect.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
mkinvpos(coordxy x, coordxy y, int dist)
|
||||
{
|
||||
struct trap *ttmp;
|
||||
@@ -2401,7 +2401,7 @@ mkinvpos(coordxy x, coordxy y, int dist)
|
||||
|
||||
/* reduces clutter in mkinvokearea() while avoiding potential static analyzer
|
||||
confusion about using isok(x,y) to control access to levl[x][y] */
|
||||
static int
|
||||
staticfn int
|
||||
mkinvk_check_wall(coordxy x, coordxy y)
|
||||
{
|
||||
unsigned ltyp;
|
||||
@@ -2422,7 +2422,7 @@ mkinvk_check_wall(coordxy x, coordxy y)
|
||||
*
|
||||
* Ludios will remain isolated until the branch is corrected by this function.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
mk_knox_portal(coordxy x, coordxy y)
|
||||
{
|
||||
d_level *source;
|
||||
|
||||
+21
-21
@@ -8,19 +8,19 @@
|
||||
#define HEIGHT (ROWNO - 1)
|
||||
#define WIDTH (COLNO - 2)
|
||||
|
||||
static void init_map(schar);
|
||||
static void init_fill(schar, schar);
|
||||
static schar get_map(int, int, schar);
|
||||
static void pass_one(schar, schar);
|
||||
static void pass_two(schar, schar);
|
||||
static void pass_three(schar, schar);
|
||||
static void join_map_cleanup(void);
|
||||
static void join_map(schar, schar);
|
||||
static void finish_map(schar, schar, boolean, boolean, boolean);
|
||||
static void remove_room(unsigned);
|
||||
staticfn void init_map(schar);
|
||||
staticfn void init_fill(schar, schar);
|
||||
staticfn schar get_map(int, int, schar);
|
||||
staticfn void pass_one(schar, schar);
|
||||
staticfn void pass_two(schar, schar);
|
||||
staticfn void pass_three(schar, schar);
|
||||
staticfn void join_map_cleanup(void);
|
||||
staticfn void join_map(schar, schar);
|
||||
staticfn void finish_map(schar, schar, boolean, boolean, boolean);
|
||||
staticfn void remove_room(unsigned);
|
||||
void mkmap(lev_init *);
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
init_map(schar bg_typ)
|
||||
{
|
||||
int i, j;
|
||||
@@ -33,7 +33,7 @@ init_map(schar bg_typ)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
init_fill(schar bg_typ, schar fg_typ)
|
||||
{
|
||||
int i, j;
|
||||
@@ -51,7 +51,7 @@ init_fill(schar bg_typ, schar fg_typ)
|
||||
}
|
||||
}
|
||||
|
||||
static schar
|
||||
staticfn schar
|
||||
get_map(int col, int row, schar bg_typ)
|
||||
{
|
||||
if (col <= 0 || row < 0 || col > WIDTH || row >= HEIGHT)
|
||||
@@ -59,12 +59,12 @@ get_map(int col, int row, schar bg_typ)
|
||||
return levl[col][row].typ;
|
||||
}
|
||||
|
||||
static const int dirs[16] = {
|
||||
staticfn const int dirs[16] = {
|
||||
-1, -1 /**/, -1, 0 /**/, -1, 1 /**/, 0, -1 /**/,
|
||||
0, 1 /**/, 1, -1 /**/, 1, 0 /**/, 1, 1
|
||||
};
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
pass_one(schar bg_typ, schar fg_typ)
|
||||
{
|
||||
int i, j;
|
||||
@@ -97,7 +97,7 @@ pass_one(schar bg_typ, schar fg_typ)
|
||||
|
||||
#define new_loc(i, j) *(gn.new_locations + ((j) * (WIDTH + 1)) + (i))
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
pass_two(schar bg_typ, schar fg_typ)
|
||||
{
|
||||
int i, j;
|
||||
@@ -120,7 +120,7 @@ pass_two(schar bg_typ, schar fg_typ)
|
||||
levl[i][j].typ = new_loc(i, j);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
pass_three(schar bg_typ, schar fg_typ)
|
||||
{
|
||||
int i, j;
|
||||
@@ -243,7 +243,7 @@ flood_fill_rm(
|
||||
}
|
||||
|
||||
/* join_map uses temporary rooms; clean up after it */
|
||||
static void
|
||||
staticfn void
|
||||
join_map_cleanup(void)
|
||||
{
|
||||
coordxy x, y;
|
||||
@@ -255,7 +255,7 @@ join_map_cleanup(void)
|
||||
gr.rooms[gn.nroom].hx = gs.subrooms[gn.nsubroom].hx = -1;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
join_map(schar bg_typ, schar fg_typ)
|
||||
{
|
||||
struct mkroom *croom, *croom2;
|
||||
@@ -329,7 +329,7 @@ join_map(schar bg_typ, schar fg_typ)
|
||||
join_map_cleanup();
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
finish_map(
|
||||
schar fg_typ,
|
||||
schar bg_typ,
|
||||
@@ -408,7 +408,7 @@ remove_rooms(int lx, int ly, int hx, int hy)
|
||||
* level structure contents corresponding to roomno have already been reset.
|
||||
* Currently handles only the removal of rooms that have no subrooms.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
remove_room(unsigned int roomno)
|
||||
{
|
||||
struct mkroom *croom = &gr.rooms[roomno];
|
||||
|
||||
+46
-46
@@ -6,27 +6,27 @@
|
||||
#include "hack.h"
|
||||
#include "sp_lev.h"
|
||||
|
||||
static int iswall(coordxy, coordxy);
|
||||
static int iswall_or_stone(coordxy, coordxy);
|
||||
static boolean is_solid(coordxy, coordxy);
|
||||
static int extend_spine(int[3][3], int, int, int);
|
||||
static void wall_cleanup(coordxy, coordxy, coordxy, coordxy);
|
||||
static boolean okay(coordxy, coordxy, coordxy);
|
||||
static void maze0xy(coord *);
|
||||
static boolean put_lregion_here(coordxy, coordxy, coordxy, coordxy, coordxy,
|
||||
staticfn int iswall(coordxy, coordxy);
|
||||
staticfn int iswall_or_stone(coordxy, coordxy);
|
||||
staticfn boolean is_solid(coordxy, coordxy);
|
||||
staticfn int extend_spine(int[3][3], int, int, int);
|
||||
staticfn void wall_cleanup(coordxy, coordxy, coordxy, coordxy);
|
||||
staticfn boolean okay(coordxy, coordxy, coordxy);
|
||||
staticfn void maze0xy(coord *);
|
||||
staticfn boolean put_lregion_here(coordxy, coordxy, coordxy, coordxy, coordxy,
|
||||
coordxy, xint16, boolean, d_level *);
|
||||
static void baalz_fixup(void);
|
||||
static void setup_waterlevel(void);
|
||||
static void unsetup_waterlevel(void);
|
||||
static void check_ransacked(const char *);
|
||||
static void migr_booty_item(int, const char *);
|
||||
static void migrate_orc(struct monst *, unsigned long);
|
||||
static void shiny_orc_stuff(struct monst *);
|
||||
static void stolen_booty(void);
|
||||
static boolean maze_inbounds(coordxy, coordxy);
|
||||
static void maze_remove_deadends(xint16);
|
||||
static void populate_maze(void);
|
||||
static boolean is_exclusion_zone(xint16, coordxy, coordxy);
|
||||
staticfn void baalz_fixup(void);
|
||||
staticfn void setup_waterlevel(void);
|
||||
staticfn void unsetup_waterlevel(void);
|
||||
staticfn void check_ransacked(const char *);
|
||||
staticfn void migr_booty_item(int, const char *);
|
||||
staticfn void migrate_orc(struct monst *, unsigned long);
|
||||
staticfn void shiny_orc_stuff(struct monst *);
|
||||
staticfn void stolen_booty(void);
|
||||
staticfn boolean maze_inbounds(coordxy, coordxy);
|
||||
staticfn void maze_remove_deadends(xint16);
|
||||
staticfn void populate_maze(void);
|
||||
staticfn boolean is_exclusion_zone(xint16, coordxy, coordxy);
|
||||
|
||||
/* adjust a coordinate one step in the specified direction */
|
||||
#define mz_move(X, Y, dir) \
|
||||
@@ -40,7 +40,7 @@ static boolean is_exclusion_zone(xint16, coordxy, coordxy);
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
iswall(coordxy x, coordxy y)
|
||||
{
|
||||
int type;
|
||||
@@ -52,7 +52,7 @@ iswall(coordxy x, coordxy y)
|
||||
|| type == SDOOR || type == IRONBARS);
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
iswall_or_stone(coordxy x, coordxy y)
|
||||
{
|
||||
/* out of bounds = stone */
|
||||
@@ -63,7 +63,7 @@ iswall_or_stone(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* return TRUE if out of bounds, wall or rock */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
is_solid(coordxy x, coordxy y)
|
||||
{
|
||||
return (boolean) (!isok(x, y) || IS_STWALL(levl[x][y].typ));
|
||||
@@ -148,7 +148,7 @@ set_levltyp_lit(coordxy x, coordxy y, schar typ, schar lit)
|
||||
* W x W This would extend a spine from x down.
|
||||
* . W W
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
extend_spine(int locale[3][3], int wall_there, int dx, int dy)
|
||||
{
|
||||
int spine, nx, ny;
|
||||
@@ -180,7 +180,7 @@ extend_spine(int locale[3][3], int wall_there, int dx, int dy)
|
||||
}
|
||||
|
||||
/* Remove walls totally surrounded by stone */
|
||||
static void
|
||||
staticfn void
|
||||
wall_cleanup(coordxy x1, coordxy y1, coordxy x2, coordxy y2)
|
||||
{
|
||||
uchar type;
|
||||
@@ -279,7 +279,7 @@ wallification(coordxy x1, coordxy y1, coordxy x2, coordxy y2)
|
||||
fix_wall_spines(x1, y1, x2, y2);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
okay(coordxy x, coordxy y, coordxy dir)
|
||||
{
|
||||
mz_move(x, y, dir);
|
||||
@@ -291,7 +291,7 @@ okay(coordxy x, coordxy y, coordxy dir)
|
||||
}
|
||||
|
||||
/* find random starting point for maze generation */
|
||||
static void
|
||||
staticfn void
|
||||
maze0xy(coord *cc)
|
||||
{
|
||||
cc->x = 3 + 2 * rn2((gx.x_maze_max >> 1) - 1);
|
||||
@@ -299,7 +299,7 @@ maze0xy(coord *cc)
|
||||
return;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
is_exclusion_zone(xint16 type, coordxy x, coordxy y)
|
||||
{
|
||||
struct exclusion_zone *ez = ge.exclusion_zones;
|
||||
@@ -383,7 +383,7 @@ place_lregion(
|
||||
impossible("Couldn't place lregion type %d!", rtype);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
put_lregion_here(
|
||||
coordxy x, coordxy y,
|
||||
coordxy nlx, coordxy nly, coordxy nhx, coordxy nhy,
|
||||
@@ -443,7 +443,7 @@ put_lregion_here(
|
||||
/* fix up Baalzebub's lair, which depicts a level-sized beetle;
|
||||
its legs are walls within solid rock--regular wallification
|
||||
classifies them as superfluous and gets rid of them */
|
||||
static void
|
||||
staticfn void
|
||||
baalz_fixup(void)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -674,7 +674,7 @@ fixup_special(void)
|
||||
gn.num_lregions = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
check_ransacked(const char *s)
|
||||
{
|
||||
/* this kludge only works as long as orctown is minetn-1 */
|
||||
@@ -684,7 +684,7 @@ check_ransacked(const char *s)
|
||||
#define ORC_LEADER 1
|
||||
static const char *const orcfruit[] = { "paddle cactus", "dwarven root" };
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
migrate_orc(struct monst *mtmp, unsigned long mflags)
|
||||
{
|
||||
int nlev, max_depth, cur_depth;
|
||||
@@ -715,7 +715,7 @@ migrate_orc(struct monst *mtmp, unsigned long mflags)
|
||||
migrate_to_level(mtmp, ledger_no(&dest), MIGR_RANDOM, (coord *) 0);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
shiny_orc_stuff(struct monst *mtmp)
|
||||
{
|
||||
int gemprob, goldprob, otyp;
|
||||
@@ -747,7 +747,7 @@ shiny_orc_stuff(struct monst *mtmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
migr_booty_item(int otyp, const char *gang)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -766,7 +766,7 @@ migr_booty_item(int otyp, const char *gang)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
stolen_booty(void)
|
||||
{
|
||||
char *gang, gang_name[BUFSZ];
|
||||
@@ -860,7 +860,7 @@ stolen_booty(void)
|
||||
|
||||
#undef ORC_LEADER
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
maze_inbounds(coordxy x, coordxy y)
|
||||
{
|
||||
return (x >= 2 && y >= 2
|
||||
@@ -870,7 +870,7 @@ maze_inbounds(coordxy x, coordxy y)
|
||||
&& isok(x, y));
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
maze_remove_deadends(xint16 typ)
|
||||
{
|
||||
char dirok[4];
|
||||
@@ -1064,7 +1064,7 @@ pick_vibrasquare_location(void)
|
||||
}
|
||||
|
||||
/* add objects and monsters to random maze */
|
||||
static void
|
||||
staticfn void
|
||||
populate_maze(void)
|
||||
{
|
||||
int i;
|
||||
@@ -1488,9 +1488,9 @@ fumaroles(void)
|
||||
#define gbxmax (gx.xmax - 1)
|
||||
#define gbymax (gy.ymax - 1)
|
||||
|
||||
static void set_wportal(void);
|
||||
static void mk_bubble(coordxy, coordxy, int);
|
||||
static void mv_bubble(struct bubble *, coordxy, coordxy, boolean);
|
||||
staticfn void set_wportal(void);
|
||||
staticfn void mk_bubble(coordxy, coordxy, int);
|
||||
staticfn void mv_bubble(struct bubble *, coordxy, coordxy, boolean);
|
||||
|
||||
void
|
||||
movebubbles(void)
|
||||
@@ -1748,7 +1748,7 @@ restore_waterlevel(NHFILE *nhfp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
set_wportal(void)
|
||||
{
|
||||
/* there better be only one magic portal on water level... */
|
||||
@@ -1758,7 +1758,7 @@ set_wportal(void)
|
||||
impossible("set_wportal(): no portal!");
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
setup_waterlevel(void)
|
||||
{
|
||||
int typ, glyph;
|
||||
@@ -1806,7 +1806,7 @@ setup_waterlevel(void)
|
||||
mk_bubble(x, y, rn2(7));
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
unsetup_waterlevel(void)
|
||||
{
|
||||
struct bubble *b, *bb;
|
||||
@@ -1819,7 +1819,7 @@ unsetup_waterlevel(void)
|
||||
gb.bbubbles = ge.ebubbles = (struct bubble *) 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mk_bubble(coordxy x, coordxy y, int n)
|
||||
{
|
||||
/*
|
||||
@@ -1882,7 +1882,7 @@ mk_bubble(coordxy x, coordxy y, int n)
|
||||
* in the immediate neighborhood of one, he/she may get sucked inside.
|
||||
* This property also makes leaving a bubble slightly difficult.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
mv_bubble(struct bubble *b, coordxy dx, coordxy dy, boolean ini)
|
||||
{
|
||||
int i, j, colli = 0;
|
||||
|
||||
+40
-40
@@ -5,27 +5,27 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static boolean may_generate_eroded(struct obj *);
|
||||
static void mkobj_erosions(struct obj *);
|
||||
static void mkbox_cnts(struct obj *);
|
||||
static unsigned nextoid(struct obj *, struct obj *);
|
||||
static void mksobj_init(struct obj *, boolean);
|
||||
static int item_on_ice(struct obj *);
|
||||
static void shrinking_glob_gone(struct obj *);
|
||||
static void obj_timer_checks(struct obj *, coordxy, coordxy, int);
|
||||
static struct obj *save_mtraits(struct obj *, struct monst *);
|
||||
static void objlist_sanity(struct obj *, int, const char *);
|
||||
static void shop_obj_sanity(struct obj *, const char *);
|
||||
static void mon_obj_sanity(struct monst *, const char *);
|
||||
static void insane_obj_bits(struct obj *, struct monst *);
|
||||
static boolean nomerge_exception(struct obj *);
|
||||
static const char *where_name(struct obj *);
|
||||
static void insane_object(struct obj *, const char *, const char *,
|
||||
staticfn boolean may_generate_eroded(struct obj *);
|
||||
staticfn void mkobj_erosions(struct obj *);
|
||||
staticfn void mkbox_cnts(struct obj *);
|
||||
staticfn unsigned nextoid(struct obj *, struct obj *);
|
||||
staticfn void mksobj_init(struct obj *, boolean);
|
||||
staticfn int item_on_ice(struct obj *);
|
||||
staticfn void shrinking_glob_gone(struct obj *);
|
||||
staticfn void obj_timer_checks(struct obj *, coordxy, coordxy, int);
|
||||
staticfn struct obj *save_mtraits(struct obj *, struct monst *);
|
||||
staticfn void objlist_sanity(struct obj *, int, const char *);
|
||||
staticfn void shop_obj_sanity(struct obj *, const char *);
|
||||
staticfn void mon_obj_sanity(struct monst *, const char *);
|
||||
staticfn void insane_obj_bits(struct obj *, struct monst *);
|
||||
staticfn boolean nomerge_exception(struct obj *);
|
||||
staticfn const char *where_name(struct obj *);
|
||||
staticfn void insane_object(struct obj *, const char *, const char *,
|
||||
struct monst *);
|
||||
static void check_contained(struct obj *, const char *);
|
||||
static void check_glob(struct obj *, const char *);
|
||||
static void sanity_check_worn(struct obj *);
|
||||
static void init_oextra(struct oextra *);
|
||||
staticfn void check_contained(struct obj *, const char *);
|
||||
staticfn void check_glob(struct obj *, const char *);
|
||||
staticfn void sanity_check_worn(struct obj *);
|
||||
staticfn void init_oextra(struct oextra *);
|
||||
|
||||
struct icp {
|
||||
int iprob; /* probability of an item type */
|
||||
@@ -75,7 +75,7 @@ static const struct icp hellprobs[] = { { 20, WEAPON_CLASS },
|
||||
|
||||
static const struct oextra zerooextra = DUMMY;
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
init_oextra(struct oextra *oex)
|
||||
{
|
||||
*oex = zerooextra;
|
||||
@@ -172,7 +172,7 @@ free_omailcmd(struct obj *otmp)
|
||||
}
|
||||
|
||||
/* can object be generated eroded? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
may_generate_eroded(struct obj *otmp)
|
||||
{
|
||||
/* initial hero inventory */
|
||||
@@ -191,7 +191,7 @@ may_generate_eroded(struct obj *otmp)
|
||||
}
|
||||
|
||||
/* random chance of applying erosions/grease to object */
|
||||
static void
|
||||
staticfn void
|
||||
mkobj_erosions(struct obj *otmp)
|
||||
{
|
||||
if (may_generate_eroded(otmp)) {
|
||||
@@ -299,7 +299,7 @@ mkobj(int oclass, boolean artif)
|
||||
return mksobj(i, TRUE, artif);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mkbox_cnts(struct obj *box)
|
||||
{
|
||||
int n;
|
||||
@@ -527,7 +527,7 @@ next_ident(void)
|
||||
|
||||
/* when splitting a stack that has o_id-based shop prices, pick an
|
||||
o_id value for the new stack that will maintain the same price */
|
||||
static unsigned
|
||||
staticfn unsigned
|
||||
nextoid(struct obj *oldobj, struct obj *newobj)
|
||||
{
|
||||
int olddif, newdif, trylimit = 256; /* limit of 4 suffices at present */
|
||||
@@ -857,7 +857,7 @@ unknow_object(struct obj *obj)
|
||||
}
|
||||
|
||||
/* do some initialization to newly created object; otyp must already be set */
|
||||
static void
|
||||
staticfn void
|
||||
mksobj_init(struct obj *otmp, boolean artif)
|
||||
{
|
||||
int mndx, tryct;
|
||||
@@ -1374,7 +1374,7 @@ enum obj_on_ice {
|
||||
};
|
||||
|
||||
/* used by shrink_glob(); is 'item' or enclosing container on or under ice? */
|
||||
static int
|
||||
staticfn int
|
||||
item_on_ice(struct obj *item)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -1604,7 +1604,7 @@ shrink_glob(
|
||||
}
|
||||
|
||||
/* a glob has shrunk away to nothing; handle owornmask, then delete glob */
|
||||
static void
|
||||
staticfn void
|
||||
shrinking_glob_gone(struct obj *obj)
|
||||
{
|
||||
xint16 owhere = obj->where;
|
||||
@@ -2075,7 +2075,7 @@ obj_attach_mid(struct obj *obj, unsigned int mid)
|
||||
return obj;
|
||||
}
|
||||
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
save_mtraits(struct obj *obj, struct monst *mtmp)
|
||||
{
|
||||
if (mtmp->ispriest)
|
||||
@@ -2356,7 +2356,7 @@ peek_at_iced_corpse_age(struct obj *otmp)
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
obj_timer_checks(
|
||||
struct obj *otmp,
|
||||
coordxy x, coordxy y,
|
||||
@@ -2897,7 +2897,7 @@ obj_sanity_check(void)
|
||||
}
|
||||
|
||||
/* sanity check for objects on specified list (fobj, &c) */
|
||||
static void
|
||||
staticfn void
|
||||
objlist_sanity(struct obj *objlist, int wheretype, const char *mesg)
|
||||
{
|
||||
struct obj *obj;
|
||||
@@ -2960,7 +2960,7 @@ objlist_sanity(struct obj *objlist, int wheretype, const char *mesg)
|
||||
|
||||
/* check obj->unpaid and obj->no_charge for shop sanity; caller has
|
||||
verified that at least one of them is set */
|
||||
static void
|
||||
staticfn void
|
||||
shop_obj_sanity(struct obj *obj, const char *mesg)
|
||||
{
|
||||
struct obj *otop;
|
||||
@@ -3030,7 +3030,7 @@ shop_obj_sanity(struct obj *obj, const char *mesg)
|
||||
}
|
||||
|
||||
/* sanity check for objects carried by all monsters in specified list */
|
||||
static void
|
||||
staticfn void
|
||||
mon_obj_sanity(struct monst *monlist, const char *mesg)
|
||||
{
|
||||
struct monst *mon;
|
||||
@@ -3063,7 +3063,7 @@ mon_obj_sanity(struct monst *monlist, const char *mesg)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
insane_obj_bits(struct obj *obj, struct monst *mon)
|
||||
{
|
||||
unsigned o_in_use = obj->in_use, o_bypass = obj->bypass,
|
||||
@@ -3086,7 +3086,7 @@ insane_obj_bits(struct obj *obj, struct monst *mon)
|
||||
}
|
||||
|
||||
/* does 'obj' use the 'nomerge' flag persistently? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
nomerge_exception(struct obj *obj)
|
||||
{
|
||||
/* special prize objects for achievement tracking are set 'nomerge'
|
||||
@@ -3104,7 +3104,7 @@ static const char *const obj_state_names[NOBJ_STATES] = {
|
||||
"luafree"
|
||||
};
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
where_name(struct obj *obj)
|
||||
{
|
||||
static char unknown[32]; /* big enough to handle rogue 64-bit int */
|
||||
@@ -3122,7 +3122,7 @@ where_name(struct obj *obj)
|
||||
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
insane_object(
|
||||
struct obj *obj,
|
||||
const char *fmt,
|
||||
@@ -3180,7 +3180,7 @@ init_dummyobj(struct obj *obj, short otyp, long oquan)
|
||||
}
|
||||
|
||||
/* obj sanity check: check objects inside container */
|
||||
static void
|
||||
staticfn void
|
||||
check_contained(struct obj *container, const char *mesg)
|
||||
{
|
||||
struct obj *obj;
|
||||
@@ -3226,7 +3226,7 @@ check_contained(struct obj *container, const char *mesg)
|
||||
}
|
||||
|
||||
/* called when 'obj->globby' is set so we don't recheck it here */
|
||||
static void
|
||||
staticfn void
|
||||
check_glob(struct obj *obj, const char *mesg)
|
||||
{
|
||||
#define LOWEST_GLOB GLOB_OF_GRAY_OOZE
|
||||
@@ -3253,7 +3253,7 @@ check_glob(struct obj *obj, const char *mesg)
|
||||
}
|
||||
|
||||
/* check an object in hero's or monster's inventory which has worn mask set */
|
||||
static void
|
||||
staticfn void
|
||||
sanity_check_worn(struct obj *obj)
|
||||
{
|
||||
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) || defined(DEBUG)
|
||||
|
||||
+24
-24
@@ -17,23 +17,23 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static boolean isbig(struct mkroom *);
|
||||
static struct mkroom *pick_room(boolean);
|
||||
static void mkshop(void), mkzoo(int), mkswamp(void);
|
||||
static void mk_zoo_thronemon(coordxy, coordxy);
|
||||
static void mktemple(void);
|
||||
static coord *shrine_pos(int);
|
||||
static struct permonst *morguemon(void);
|
||||
static struct permonst *squadmon(void);
|
||||
static void save_room(NHFILE *, struct mkroom *);
|
||||
static void rest_room(NHFILE *, struct mkroom *);
|
||||
static boolean invalid_shop_shape(struct mkroom *sroom);
|
||||
staticfn boolean isbig(struct mkroom *);
|
||||
staticfn struct mkroom *pick_room(boolean);
|
||||
staticfn void mkshop(void), mkzoo(int), mkswamp(void);
|
||||
staticfn void mk_zoo_thronemon(coordxy, coordxy);
|
||||
staticfn void mktemple(void);
|
||||
staticfn coord *shrine_pos(int);
|
||||
staticfn struct permonst *morguemon(void);
|
||||
staticfn struct permonst *squadmon(void);
|
||||
staticfn void save_room(NHFILE *, struct mkroom *);
|
||||
staticfn void rest_room(NHFILE *, struct mkroom *);
|
||||
staticfn boolean invalid_shop_shape(struct mkroom *sroom);
|
||||
|
||||
#define sq(x) ((x) * (x))
|
||||
|
||||
extern const struct shclass shtypes[]; /* defined in shknam.c */
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
isbig(struct mkroom *sroom)
|
||||
{
|
||||
int area = (sroom->hx - sroom->lx + 1)
|
||||
@@ -86,7 +86,7 @@ do_mkroom(int roomtype)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mkshop(void)
|
||||
{
|
||||
struct mkroom *sroom;
|
||||
@@ -211,7 +211,7 @@ mkshop(void)
|
||||
}
|
||||
|
||||
/* pick an unused room, preferably with only one door */
|
||||
static struct mkroom *
|
||||
staticfn struct mkroom *
|
||||
pick_room(boolean strict)
|
||||
{
|
||||
struct mkroom *sroom;
|
||||
@@ -235,7 +235,7 @@ pick_room(boolean strict)
|
||||
return (struct mkroom *) 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mkzoo(int type)
|
||||
{
|
||||
struct mkroom *sroom;
|
||||
@@ -248,7 +248,7 @@ mkzoo(int type)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mk_zoo_thronemon(coordxy x, coordxy y)
|
||||
{
|
||||
int i = rnd(level_difficulty());
|
||||
@@ -465,7 +465,7 @@ mkundead(
|
||||
gl.level.flags.graveyard = TRUE; /* reduced chance for undead corpse */
|
||||
}
|
||||
|
||||
static struct permonst *
|
||||
staticfn struct permonst *
|
||||
morguemon(void)
|
||||
{
|
||||
int i = rn2(100), hd = rn2(level_difficulty());
|
||||
@@ -517,7 +517,7 @@ antholemon(void)
|
||||
: &mons[mtyp]);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mkswamp(void) /* Michiel Huisjes & Fred de Wilde */
|
||||
{
|
||||
struct mkroom *sroom;
|
||||
@@ -564,7 +564,7 @@ mkswamp(void) /* Michiel Huisjes & Fred de Wilde */
|
||||
}
|
||||
}
|
||||
|
||||
static coord *
|
||||
staticfn coord *
|
||||
shrine_pos(int roomno)
|
||||
{
|
||||
static coord buf;
|
||||
@@ -585,7 +585,7 @@ shrine_pos(int roomno)
|
||||
return &buf;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mktemple(void)
|
||||
{
|
||||
struct mkroom *sroom;
|
||||
@@ -804,7 +804,7 @@ static const struct {
|
||||
{ PM_CAPTAIN, 1 } };
|
||||
|
||||
/* return soldier types. */
|
||||
static struct permonst *
|
||||
staticfn struct permonst *
|
||||
squadmon(void)
|
||||
{
|
||||
int sel_prob, i, cpro, mndx;
|
||||
@@ -831,7 +831,7 @@ squadmon(void)
|
||||
* save_room : A recursive function that saves a room and its subrooms
|
||||
* (if any).
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
save_room(NHFILE *nhfp, struct mkroom *r)
|
||||
{
|
||||
short i;
|
||||
@@ -863,7 +863,7 @@ save_rooms(NHFILE *nhfp)
|
||||
save_room(nhfp, &gr.rooms[i]);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
rest_room(NHFILE *nhfp, struct mkroom *r)
|
||||
{
|
||||
short i;
|
||||
@@ -1039,7 +1039,7 @@ cmap_to_type(int sym)
|
||||
* Note that the invalidity of the shape derives from the position of its door
|
||||
* already being chosen. It's quite possible that if the door were somewhere
|
||||
* else on the perimeter of this room, it would work fine as a shop.*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
invalid_shop_shape(struct mkroom *sroom)
|
||||
{
|
||||
coordxy x, y;
|
||||
|
||||
@@ -7,33 +7,33 @@
|
||||
#include "mfndpos.h"
|
||||
#include <ctype.h>
|
||||
|
||||
static void sanity_check_single_mon(struct monst *, boolean, const char *);
|
||||
static struct obj *make_corpse(struct monst *, unsigned);
|
||||
static int minliquid_core(struct monst *);
|
||||
static void m_calcdistress(struct monst *);
|
||||
static boolean monlineu(struct monst *, int, int);
|
||||
static long mm_2way_aggression(struct monst *, struct monst *);
|
||||
static long mm_aggression(struct monst *, struct monst *);
|
||||
static long mm_displacement(struct monst *, struct monst *);
|
||||
static void mon_leaving_level(struct monst *);
|
||||
static void m_detach(struct monst *, struct permonst *, boolean);
|
||||
static void set_mon_min_mhpmax(struct monst *, int);
|
||||
static void lifesaved_monster(struct monst *);
|
||||
static boolean vamprises(struct monst *);
|
||||
static void logdeadmon(struct monst *, int);
|
||||
static boolean ok_to_obliterate(struct monst *);
|
||||
static void qst_guardians_respond(void);
|
||||
static void peacefuls_respond(struct monst *);
|
||||
static void m_restartcham(struct monst *);
|
||||
static boolean restrap(struct monst *);
|
||||
static int pick_animal(void);
|
||||
static int pickvampshape(struct monst *);
|
||||
static boolean isspecmon(struct monst *);
|
||||
static boolean validspecmon(struct monst *, int);
|
||||
static int wiz_force_cham_form(struct monst *);
|
||||
static struct permonst *accept_newcham_form(struct monst *, int);
|
||||
static void kill_eggs(struct obj *) NO_NNARGS;
|
||||
static void pacify_guard(struct monst *);
|
||||
staticfn void sanity_check_single_mon(struct monst *, boolean, const char *);
|
||||
staticfn struct obj *make_corpse(struct monst *, unsigned);
|
||||
staticfn int minliquid_core(struct monst *);
|
||||
staticfn void m_calcdistress(struct monst *);
|
||||
staticfn boolean monlineu(struct monst *, int, int);
|
||||
staticfn long mm_2way_aggression(struct monst *, struct monst *);
|
||||
staticfn long mm_aggression(struct monst *, struct monst *);
|
||||
staticfn long mm_displacement(struct monst *, struct monst *);
|
||||
staticfn void mon_leaving_level(struct monst *);
|
||||
staticfn void m_detach(struct monst *, struct permonst *, boolean);
|
||||
staticfn void set_mon_min_mhpmax(struct monst *, int);
|
||||
staticfn void lifesaved_monster(struct monst *);
|
||||
staticfn boolean vamprises(struct monst *);
|
||||
staticfn void logdeadmon(struct monst *, int);
|
||||
staticfn boolean ok_to_obliterate(struct monst *);
|
||||
staticfn void qst_guardians_respond(void);
|
||||
staticfn void peacefuls_respond(struct monst *);
|
||||
staticfn void m_restartcham(struct monst *);
|
||||
staticfn boolean restrap(struct monst *);
|
||||
staticfn int pick_animal(void);
|
||||
staticfn int pickvampshape(struct monst *);
|
||||
staticfn boolean isspecmon(struct monst *);
|
||||
staticfn boolean validspecmon(struct monst *, int);
|
||||
staticfn int wiz_force_cham_form(struct monst *);
|
||||
staticfn struct permonst *accept_newcham_form(struct monst *, int);
|
||||
staticfn void kill_eggs(struct obj *) NO_NNARGS;
|
||||
staticfn void pacify_guard(struct monst *);
|
||||
|
||||
extern const struct shclass shtypes[]; /* defined in shknam.c */
|
||||
|
||||
@@ -51,7 +51,7 @@ const char *warnings[] = {
|
||||
#endif /* 0 */
|
||||
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
sanity_check_single_mon(
|
||||
struct monst *mtmp,
|
||||
boolean chk_geno,
|
||||
@@ -515,7 +515,7 @@ pm_to_cham(int mndx)
|
||||
* G_NOCORPSE set in order to prevent wishing for one, finding tins of one,
|
||||
* etc....
|
||||
*/
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
make_corpse(struct monst *mtmp, unsigned int corpseflags)
|
||||
{
|
||||
struct permonst *mdat = mtmp->data;
|
||||
@@ -746,7 +746,7 @@ minliquid(struct monst *mtmp)
|
||||
}
|
||||
|
||||
/* guts of minliquid() */
|
||||
static int
|
||||
staticfn int
|
||||
minliquid_core(struct monst *mtmp)
|
||||
{
|
||||
boolean inpool, inlava, infountain;
|
||||
@@ -944,7 +944,7 @@ mcalcdistress(void)
|
||||
iter_mons(m_calcdistress);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
m_calcdistress(struct monst *mtmp)
|
||||
{
|
||||
/* must check non-moving monsters once/turn in case they managed
|
||||
@@ -1824,7 +1824,7 @@ can_carry(struct monst *mtmp, struct obj *otmp)
|
||||
}
|
||||
|
||||
/* is <nx,ny> in direct line with where 'mon' thinks hero is? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
monlineu(struct monst *mon, int nx, int ny)
|
||||
{
|
||||
return online2(nx, ny, mon->mux, mon->muy);
|
||||
@@ -2151,7 +2151,7 @@ mfndpos(
|
||||
/* Part of mm_aggression that represents two-way aggression. To avoid
|
||||
having to code each case twice, this function contains those cases that
|
||||
ought to happen twice, and mm_aggression will call it twice. */
|
||||
static long
|
||||
staticfn long
|
||||
mm_2way_aggression(struct monst *magr, struct monst *mdef)
|
||||
{
|
||||
/* zombies vs things that can be zombified */
|
||||
@@ -2166,7 +2166,7 @@ mm_2way_aggression(struct monst *magr, struct monst *mdef)
|
||||
in the absence of Conflict. There is no provision for targeting
|
||||
other monsters; just hand to hand fighting when they happen to be
|
||||
next to each other. */
|
||||
static long
|
||||
staticfn long
|
||||
mm_aggression(
|
||||
struct monst *magr, /* monster that is currently deciding where to move */
|
||||
struct monst *mdef) /* another monster which is next to it */
|
||||
@@ -2189,7 +2189,7 @@ mm_aggression(
|
||||
}
|
||||
|
||||
/* Monster displacing another monster out of the way */
|
||||
static long
|
||||
staticfn long
|
||||
mm_displacement(
|
||||
struct monst *magr, /* monster that is currently deciding where to move */
|
||||
struct monst *mdef) /* another monster which is next to it */
|
||||
@@ -2426,7 +2426,7 @@ dealloc_monst(struct monst *mon)
|
||||
|
||||
/* 'mon' is being removed from level due to migration [relmon from keepdogs
|
||||
or migrate_to_level] or due to death [m_detach from mondead or mongone] */
|
||||
static void
|
||||
staticfn void
|
||||
mon_leaving_level(struct monst *mon)
|
||||
{
|
||||
coordxy mx = mon->mx, my = mon->my;
|
||||
@@ -2464,7 +2464,7 @@ mon_leaving_level(struct monst *mon)
|
||||
}
|
||||
|
||||
/* 'mtmp' is going away; remove effects of mtmp from other data structures */
|
||||
static void
|
||||
staticfn void
|
||||
m_detach(
|
||||
struct monst *mtmp,
|
||||
struct permonst *mptr, /* reflects mtmp->data _prior_ to mtmp's death */
|
||||
@@ -2536,7 +2536,7 @@ m_detach(
|
||||
|
||||
/* give a life-saved monster a reasonable mhpmax value in case it has
|
||||
been the victim of excessive life draining */
|
||||
static void
|
||||
staticfn void
|
||||
set_mon_min_mhpmax(
|
||||
struct monst *mon,
|
||||
int minimum_mhpmax) /* monster life-saving has traditionally used 10 */
|
||||
@@ -2567,7 +2567,7 @@ mlifesaver(struct monst *mon)
|
||||
return (struct obj *) 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
lifesaved_monster(struct monst *mtmp)
|
||||
{
|
||||
boolean surviver;
|
||||
@@ -2619,7 +2619,7 @@ DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
/* when a shape-shifted vampire is killed, it reverts to base form instead
|
||||
of dying; moved into separate routine to unclutter mondead() */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
vamprises(struct monst *mtmp)
|
||||
{
|
||||
int mndx = mtmp->cham;
|
||||
@@ -2694,7 +2694,7 @@ RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
/* when a mon has died, maybe record an achievement or issue livelog message;
|
||||
moved into separate routine to unclutter mondead() */
|
||||
static void
|
||||
staticfn void
|
||||
logdeadmon(struct monst *mtmp, int mndx)
|
||||
{
|
||||
int howmany = gm.mvitals[mndx].died;
|
||||
@@ -3528,7 +3528,7 @@ migrate_mon(
|
||||
migrate_to_level(mtmp, target_lev, xyloc, (coord *) 0);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
ok_to_obliterate(struct monst *mtmp)
|
||||
{
|
||||
/*
|
||||
@@ -3786,7 +3786,7 @@ m_respond(struct monst *mtmp)
|
||||
}
|
||||
|
||||
/* how quest guardians respond when you attack the quest leader */
|
||||
static void
|
||||
staticfn void
|
||||
qst_guardians_respond(void)
|
||||
{
|
||||
struct monst *mon;
|
||||
@@ -3814,7 +3814,7 @@ qst_guardians_respond(void)
|
||||
}
|
||||
|
||||
/* how other peacefuls react when you attack monster */
|
||||
static void
|
||||
staticfn void
|
||||
peacefuls_respond(struct monst *mtmp)
|
||||
{
|
||||
struct monst *mon;
|
||||
@@ -4226,7 +4226,7 @@ rescham(void)
|
||||
iter_mons(normal_shape);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
m_restartcham(struct monst *mtmp)
|
||||
{
|
||||
if (!mtmp->mcan)
|
||||
@@ -4261,7 +4261,7 @@ restore_cham(struct monst *mon)
|
||||
}
|
||||
|
||||
/* unwatched hiders may hide again; if so, returns True */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
restrap(struct monst *mtmp)
|
||||
{
|
||||
struct trap *t;
|
||||
@@ -4443,7 +4443,7 @@ mon_animal_list(boolean construct)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
pick_animal(void)
|
||||
{
|
||||
int res;
|
||||
@@ -4528,7 +4528,7 @@ decide_to_shapeshift(struct monst *mon, int shiftflags)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
pickvampshape(struct monst *mon)
|
||||
{
|
||||
int mndx = mon->cham, wolfchance = 10;
|
||||
@@ -4565,7 +4565,7 @@ pickvampshape(struct monst *mon)
|
||||
}
|
||||
|
||||
/* nonshapechangers who warrant special polymorph handling */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
isspecmon(struct monst *mon)
|
||||
{
|
||||
return (mon->isshk || mon->ispriest || mon->isgd
|
||||
@@ -4575,7 +4575,7 @@ isspecmon(struct monst *mon)
|
||||
/* restrict certain special monsters (shopkeepers, aligned priests,
|
||||
vault guards) to forms that allow them to behave sensibly (catching
|
||||
gold, speaking?) so that they don't need too much extra code */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
validspecmon(struct monst *mon, int mndx)
|
||||
{
|
||||
if (mndx == NON_PM)
|
||||
@@ -4659,7 +4659,7 @@ validvamp(struct monst *mon, int *mndx_p, int monclass)
|
||||
return (boolean) (*mndx_p != NON_PM);
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
wiz_force_cham_form(struct monst *mon)
|
||||
{
|
||||
char pprompt[BUFSZ], parttwo[QBUFSZ], buf[BUFSZ], prevbuf[BUFSZ];
|
||||
@@ -4810,7 +4810,7 @@ select_newcham_form(struct monst *mon)
|
||||
}
|
||||
|
||||
/* this used to be inline within newcham() but monpolycontrol needs it too */
|
||||
static struct permonst *
|
||||
staticfn struct permonst *
|
||||
accept_newcham_form(struct monst *mon, int mndx)
|
||||
{
|
||||
struct permonst *mdat;
|
||||
@@ -5168,7 +5168,7 @@ dead_species(int m_idx, boolean egg)
|
||||
}
|
||||
|
||||
/* kill off any eggs of genocided monsters */
|
||||
static void
|
||||
staticfn void
|
||||
kill_eggs(struct obj *obj_list)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -5325,7 +5325,7 @@ angry_guards(boolean silent)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
pacify_guard(struct monst *mtmp)
|
||||
{
|
||||
if (is_watch(mtmp->data))
|
||||
|
||||
+1
-1
@@ -401,7 +401,7 @@ mstrength(struct permonst *ptr)
|
||||
}
|
||||
|
||||
/* returns True if monster can attack at range */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
mstrength_ranged_attk(struct permonst *ptr)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
+36
-36
@@ -7,29 +7,29 @@
|
||||
#include "mfndpos.h"
|
||||
#include "artifact.h"
|
||||
|
||||
static void msg_mon_movement(struct monst *, coordxy, coordxy) NONNULLARG1;
|
||||
static void watch_on_duty(struct monst *);
|
||||
static int disturb(struct monst *);
|
||||
static void release_hero(struct monst *);
|
||||
static void distfleeck(struct monst *, int *, int *, int *);
|
||||
static int m_arrival(struct monst *);
|
||||
static void mind_blast(struct monst *);
|
||||
static boolean holds_up_web(coordxy, coordxy);
|
||||
static int count_webbing_walls(coordxy, coordxy);
|
||||
static boolean soko_allow_web(struct monst *);
|
||||
static boolean m_search_items(struct monst *, coordxy *, coordxy *, int *,
|
||||
staticfn void msg_mon_movement(struct monst *, coordxy, coordxy) NONNULLARG1;
|
||||
staticfn void watch_on_duty(struct monst *);
|
||||
staticfn int disturb(struct monst *);
|
||||
staticfn void release_hero(struct monst *);
|
||||
staticfn void distfleeck(struct monst *, int *, int *, int *);
|
||||
staticfn int m_arrival(struct monst *);
|
||||
staticfn void mind_blast(struct monst *);
|
||||
staticfn boolean holds_up_web(coordxy, coordxy);
|
||||
staticfn int count_webbing_walls(coordxy, coordxy);
|
||||
staticfn boolean soko_allow_web(struct monst *);
|
||||
staticfn boolean m_search_items(struct monst *, coordxy *, coordxy *, int *,
|
||||
int *);
|
||||
static int postmov(struct monst *, struct permonst *, coordxy, coordxy, int,
|
||||
staticfn int postmov(struct monst *, struct permonst *, coordxy, coordxy, int,
|
||||
boolean, boolean, boolean, boolean);
|
||||
static boolean leppie_avoidance(struct monst *);
|
||||
static void leppie_stash(struct monst *);
|
||||
static boolean m_balks_at_approaching(struct monst *);
|
||||
static boolean stuff_prevents_passage(struct monst *);
|
||||
static int vamp_shift(struct monst *, struct permonst *, boolean);
|
||||
static void maybe_spin_web(struct monst *);
|
||||
staticfn boolean leppie_avoidance(struct monst *);
|
||||
staticfn void leppie_stash(struct monst *);
|
||||
staticfn boolean m_balks_at_approaching(struct monst *);
|
||||
staticfn boolean stuff_prevents_passage(struct monst *);
|
||||
staticfn int vamp_shift(struct monst *, struct permonst *, boolean);
|
||||
staticfn void maybe_spin_web(struct monst *);
|
||||
|
||||
/* a11y: give a message when monster moved */
|
||||
static void
|
||||
staticfn void
|
||||
msg_mon_movement(struct monst *mtmp, coordxy omx, coordxy omy)
|
||||
{
|
||||
if (a11y.mon_movement && canspotmon(mtmp) && mtmp->mspotted) {
|
||||
@@ -158,7 +158,7 @@ m_break_boulder(struct monst *mtmp, coordxy x, coordxy y)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
watch_on_duty(struct monst *mtmp)
|
||||
{
|
||||
coordxy x, y;
|
||||
@@ -299,7 +299,7 @@ mon_regen(struct monst *mon, boolean digest_meal)
|
||||
* Possibly awaken the given monster. Return a 1 if the monster has been
|
||||
* jolted awake.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
disturb(struct monst *mtmp)
|
||||
{
|
||||
/*
|
||||
@@ -334,7 +334,7 @@ disturb(struct monst *mtmp)
|
||||
}
|
||||
|
||||
/* ungrab/expel held/swallowed hero */
|
||||
static void
|
||||
staticfn void
|
||||
release_hero(struct monst *mon)
|
||||
{
|
||||
if (mon == u.ustuck) {
|
||||
@@ -478,7 +478,7 @@ monflee(
|
||||
mon_track_clear(mtmp);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
distfleeck(
|
||||
struct monst *mtmp,
|
||||
int *inrange, int *nearby, int *scared) /* output */
|
||||
@@ -519,7 +519,7 @@ distfleeck(
|
||||
|
||||
/* perform a special one-time action for a monster; returns -1 if nothing
|
||||
special happened, 0 if monster uses up its turn, 1 if monster is killed */
|
||||
static int
|
||||
staticfn int
|
||||
m_arrival(struct monst *mon)
|
||||
{
|
||||
mon->mstrategy &= ~STRAT_ARRIVE; /* always reset */
|
||||
@@ -528,7 +528,7 @@ m_arrival(struct monst *mon)
|
||||
}
|
||||
|
||||
/* a mind flayer unleashes a mind blast */
|
||||
static void
|
||||
staticfn void
|
||||
mind_blast(struct monst *mtmp)
|
||||
{
|
||||
struct monst *m2, *nmon = (struct monst *) 0;
|
||||
@@ -1052,7 +1052,7 @@ m_digweapon_check(
|
||||
}
|
||||
|
||||
/* does leprechaun want to avoid the hero? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
leppie_avoidance(struct monst *mtmp)
|
||||
{
|
||||
struct obj *lepgold, *ygold;
|
||||
@@ -1067,7 +1067,7 @@ leppie_avoidance(struct monst *mtmp)
|
||||
}
|
||||
|
||||
/* unseen leprechaun with gold might stash it */
|
||||
static void
|
||||
staticfn void
|
||||
leppie_stash(struct monst *mtmp)
|
||||
{
|
||||
struct obj *gold;
|
||||
@@ -1088,7 +1088,7 @@ leppie_stash(struct monst *mtmp)
|
||||
}
|
||||
|
||||
/* does monster want to avoid you? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
m_balks_at_approaching(struct monst *mtmp)
|
||||
{
|
||||
/* peaceful, far away, or can't see you */
|
||||
@@ -1115,7 +1115,7 @@ m_balks_at_approaching(struct monst *mtmp)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
holds_up_web(coordxy x, coordxy y)
|
||||
{
|
||||
stairway *sway;
|
||||
@@ -1132,7 +1132,7 @@ holds_up_web(coordxy x, coordxy y)
|
||||
|
||||
/* returns the number of walls in the four cardinal directions that could
|
||||
hold up a web */
|
||||
static int
|
||||
staticfn int
|
||||
count_webbing_walls(coordxy x, coordxy y)
|
||||
{
|
||||
return (holds_up_web(x, y - 1) + holds_up_web(x + 1, y)
|
||||
@@ -1140,7 +1140,7 @@ count_webbing_walls(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* reject webs which interfere with solving Sokoban */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
soko_allow_web(struct monst *mon)
|
||||
{
|
||||
stairway *stway;
|
||||
@@ -1157,7 +1157,7 @@ soko_allow_web(struct monst *mon)
|
||||
}
|
||||
|
||||
/* monster might spin a web */
|
||||
static void
|
||||
staticfn void
|
||||
maybe_spin_web(struct monst *mtmp)
|
||||
{
|
||||
if (webmaker(mtmp->data)
|
||||
@@ -1188,7 +1188,7 @@ maybe_spin_web(struct monst *mtmp)
|
||||
#define SQSRCHRADIUS 5
|
||||
|
||||
/* monster looks for items it wants nearby */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
m_search_items(
|
||||
struct monst *mtmp,
|
||||
coordxy *ggx, coordxy *ggy,
|
||||
@@ -1313,7 +1313,7 @@ finish_search:
|
||||
|
||||
#undef SQSRCHRADIUS
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
postmov(
|
||||
struct monst *mtmp,
|
||||
struct permonst *ptr,
|
||||
@@ -2156,7 +2156,7 @@ undesirable_disp(
|
||||
* Inventory prevents passage under door.
|
||||
* Used by can_ooze() and can_fog().
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
stuff_prevents_passage(struct monst *mtmp)
|
||||
{
|
||||
struct obj *chain, *obj;
|
||||
@@ -2211,7 +2211,7 @@ can_fog(struct monst *mtmp)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
vamp_shift(
|
||||
struct monst *mon,
|
||||
struct permonst *ptr,
|
||||
|
||||
+6
-6
@@ -4,9 +4,9 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static const char *dev_name(void);
|
||||
static void get_mplname(struct monst *, char *);
|
||||
static void mk_mplayer_armor(struct monst *, short);
|
||||
staticfn const char *dev_name(void);
|
||||
staticfn void get_mplname(struct monst *, char *);
|
||||
staticfn void mk_mplayer_armor(struct monst *, short);
|
||||
|
||||
/* These are the names of those who
|
||||
* contributed to the development of NetHack 3.2/3.3/3.4/3.6.
|
||||
@@ -40,7 +40,7 @@ static const char *const developers[] = {
|
||||
};
|
||||
|
||||
/* return a randomly chosen developer name */
|
||||
static const char *
|
||||
staticfn const char *
|
||||
dev_name(void)
|
||||
{
|
||||
int i, m = 0, n = SIZE(developers);
|
||||
@@ -68,7 +68,7 @@ dev_name(void)
|
||||
return (developers[i]);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
get_mplname(struct monst* mtmp, char *nam)
|
||||
{
|
||||
boolean fmlkind = is_female(mtmp->data);
|
||||
@@ -91,7 +91,7 @@ get_mplname(struct monst* mtmp, char *nam)
|
||||
(boolean) mtmp->female));
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mk_mplayer_armor(struct monst *mon, short typ)
|
||||
{
|
||||
struct obj *obj;
|
||||
|
||||
+14
-14
@@ -5,13 +5,13 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static int monmulti(struct monst *, struct obj *, struct obj *);
|
||||
static void monshoot(struct monst *, struct obj *, struct obj *);
|
||||
static boolean ucatchgem(struct obj *, struct monst *);
|
||||
static const char *breathwep_name(int);
|
||||
static boolean drop_throw(struct obj *, boolean, coordxy, coordxy);
|
||||
static boolean blocking_terrain(coordxy, coordxy);
|
||||
static int m_lined_up(struct monst *, struct monst *) NONNULLARG12;
|
||||
staticfn int monmulti(struct monst *, struct obj *, struct obj *);
|
||||
staticfn void monshoot(struct monst *, struct obj *, struct obj *);
|
||||
staticfn boolean ucatchgem(struct obj *, struct monst *);
|
||||
staticfn const char *breathwep_name(int);
|
||||
staticfn boolean drop_throw(struct obj *, boolean, coordxy, coordxy);
|
||||
staticfn boolean blocking_terrain(coordxy, coordxy);
|
||||
staticfn int m_lined_up(struct monst *, struct monst *) NONNULLARG12;
|
||||
|
||||
#define URETREATING(x, y) \
|
||||
(distmin(u.ux, u.uy, x, y) > distmin(u.ux0, u.uy0, x, y))
|
||||
@@ -156,7 +156,7 @@ thitu(
|
||||
* dothrow.c (for consistency). --KAA
|
||||
* Returns FALSE if object still exists (not destroyed).
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
drop_throw(
|
||||
struct obj *obj,
|
||||
boolean ohit,
|
||||
@@ -195,7 +195,7 @@ drop_throw(
|
||||
|
||||
/* calculate multishot volley count for mtmp throwing otmp (if not ammo) or
|
||||
shooting otmp with mwep (if otmp is ammo and mwep appropriate launcher) */
|
||||
static int
|
||||
staticfn int
|
||||
monmulti(struct monst *mtmp, struct obj *otmp, struct obj *mwep)
|
||||
{
|
||||
int multishot = 1;
|
||||
@@ -254,7 +254,7 @@ monmulti(struct monst *mtmp, struct obj *otmp, struct obj *mwep)
|
||||
}
|
||||
|
||||
/* mtmp throws otmp, or shoots otmp with mwep, at hero or at monster mtarg */
|
||||
static void
|
||||
staticfn void
|
||||
monshoot(struct monst *mtmp, struct obj *otmp, struct obj *mwep)
|
||||
{
|
||||
struct monst *mtarg = gm.mtarget;
|
||||
@@ -498,7 +498,7 @@ ohitmon(
|
||||
}
|
||||
|
||||
/* hero catches gem thrown by mon iff poly'd into unicorn; might drop it */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
ucatchgem(
|
||||
struct obj *gem, /* caller has verified gem->oclass */
|
||||
struct monst *mon)
|
||||
@@ -888,7 +888,7 @@ spitmm(struct monst *mtmp, struct attack *mattk, struct monst *mtarg)
|
||||
/* Return the name of a breath weapon. If the player is hallucinating, return
|
||||
* a silly name instead.
|
||||
* typ is AD_MAGM, AD_FIRE, etc */
|
||||
static const char *
|
||||
staticfn const char *
|
||||
breathwep_name(int typ)
|
||||
{
|
||||
if (Hallucination)
|
||||
@@ -1078,7 +1078,7 @@ breamu(struct monst *mtmp, struct attack *mattk)
|
||||
}
|
||||
|
||||
/* return TRUE if terrain at x,y blocks linedup checks */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
blocking_terrain(coordxy x, coordxy y)
|
||||
{
|
||||
if (!isok(x, y) || IS_ROCK(levl[x][y].typ) || closed_door(x, y)
|
||||
@@ -1172,7 +1172,7 @@ linedup(
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
m_lined_up(struct monst *mtarg, struct monst *mtmp)
|
||||
{
|
||||
boolean utarget = (mtarg == &gy.youmonst);
|
||||
|
||||
+50
-50
@@ -14,43 +14,43 @@
|
||||
* are confused don't know not to read scrolls, etc....
|
||||
*/
|
||||
|
||||
static int precheck(struct monst *, struct obj *);
|
||||
static void mzapwand(struct monst *, struct obj *, boolean);
|
||||
static void mplayhorn(struct monst *, struct obj *, boolean);
|
||||
static void mreadmsg(struct monst *, struct obj *);
|
||||
static void mquaffmsg(struct monst *, struct obj *);
|
||||
static boolean m_use_healing(struct monst *);
|
||||
static boolean m_sees_sleepy_soldier(struct monst *);
|
||||
static void m_tele(struct monst *, boolean, boolean, int);
|
||||
static boolean m_next2m(struct monst *);
|
||||
static void reveal_trap(struct trap *, boolean);
|
||||
static boolean linedup_chk_corpse(coordxy, coordxy);
|
||||
static void m_use_undead_turning(struct monst *, struct obj *);
|
||||
static boolean hero_behind_chokepoint(struct monst *);
|
||||
static boolean mon_has_friends(struct monst *);
|
||||
static int mbhitm(struct monst *, struct obj *);
|
||||
static void mbhit(struct monst *, int, int (*)(MONST_P, OBJ_P),
|
||||
staticfn int precheck(struct monst *, struct obj *);
|
||||
staticfn void mzapwand(struct monst *, struct obj *, boolean);
|
||||
staticfn void mplayhorn(struct monst *, struct obj *, boolean);
|
||||
staticfn void mreadmsg(struct monst *, struct obj *);
|
||||
staticfn void mquaffmsg(struct monst *, struct obj *);
|
||||
staticfn boolean m_use_healing(struct monst *);
|
||||
staticfn boolean m_sees_sleepy_soldier(struct monst *);
|
||||
staticfn void m_tele(struct monst *, boolean, boolean, int);
|
||||
staticfn boolean m_next2m(struct monst *);
|
||||
staticfn void reveal_trap(struct trap *, boolean);
|
||||
staticfn boolean linedup_chk_corpse(coordxy, coordxy);
|
||||
staticfn void m_use_undead_turning(struct monst *, struct obj *);
|
||||
staticfn boolean hero_behind_chokepoint(struct monst *);
|
||||
staticfn boolean mon_has_friends(struct monst *);
|
||||
staticfn int mbhitm(struct monst *, struct obj *);
|
||||
staticfn void mbhit(struct monst *, int, int (*)(MONST_P, OBJ_P),
|
||||
int (*)(OBJ_P, OBJ_P), struct obj *);
|
||||
static struct permonst *muse_newcham_mon(struct monst *);
|
||||
static int mloot_container(struct monst *mon, struct obj *, boolean);
|
||||
static void you_aggravate(struct monst *);
|
||||
staticfn struct permonst *muse_newcham_mon(struct monst *);
|
||||
staticfn int mloot_container(struct monst *mon, struct obj *, boolean);
|
||||
staticfn void you_aggravate(struct monst *);
|
||||
#if 0
|
||||
static boolean necrophiliac(struct obj *, boolean);
|
||||
#endif
|
||||
static void mon_consume_unstone(struct monst *, struct obj *, boolean,
|
||||
staticfn void mon_consume_unstone(struct monst *, struct obj *, boolean,
|
||||
boolean);
|
||||
static boolean cures_stoning(struct monst *, struct obj *, boolean);
|
||||
static boolean mcould_eat_tin(struct monst *);
|
||||
static boolean muse_unslime(struct monst *, struct obj *, struct trap *,
|
||||
staticfn boolean cures_stoning(struct monst *, struct obj *, boolean);
|
||||
staticfn boolean mcould_eat_tin(struct monst *);
|
||||
staticfn boolean muse_unslime(struct monst *, struct obj *, struct trap *,
|
||||
boolean);
|
||||
static int cures_sliming(struct monst *, struct obj *);
|
||||
static boolean green_mon(struct monst *);
|
||||
staticfn int cures_sliming(struct monst *, struct obj *);
|
||||
staticfn boolean green_mon(struct monst *);
|
||||
|
||||
/* Any preliminary checks which may result in the monster being unable to use
|
||||
* the item. Returns 0 if nothing happened, 2 if the monster can't do
|
||||
* anything (i.e. it teleported) and 1 if it's dead.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
precheck(struct monst *mon, struct obj *obj)
|
||||
{
|
||||
boolean vis;
|
||||
@@ -155,7 +155,7 @@ precheck(struct monst *mon, struct obj *obj)
|
||||
|
||||
/* when a monster zaps a wand give a message, deduct a charge, and if it
|
||||
isn't directly seen, remove hero's memory of the number of charges */
|
||||
static void
|
||||
staticfn void
|
||||
mzapwand(
|
||||
struct monst *mtmp,
|
||||
struct obj *otmp,
|
||||
@@ -185,7 +185,7 @@ mzapwand(
|
||||
}
|
||||
|
||||
/* similar to mzapwand() but for magical horns (only instrument mons play) */
|
||||
static void
|
||||
staticfn void
|
||||
mplayhorn(
|
||||
struct monst *mtmp,
|
||||
struct obj *otmp,
|
||||
@@ -228,7 +228,7 @@ mplayhorn(
|
||||
|
||||
/* see or hear a monster reading a scroll;
|
||||
when scroll hasn't been seen, its label is revealed unless hero is deaf */
|
||||
static void
|
||||
staticfn void
|
||||
mreadmsg(struct monst *mtmp, struct obj *otmp)
|
||||
{
|
||||
char onambuf[BUFSZ];
|
||||
@@ -276,7 +276,7 @@ mreadmsg(struct monst *mtmp, struct obj *otmp)
|
||||
vismon ? mon_nam(mtmp) : mhe(mtmp));
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mquaffmsg(struct monst *mtmp, struct obj *otmp)
|
||||
{
|
||||
if (canseemon(mtmp)) {
|
||||
@@ -320,7 +320,7 @@ mquaffmsg(struct monst *mtmp, struct obj *otmp)
|
||||
* that if you polymorph into one you teleport at will.
|
||||
*/
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
m_use_healing(struct monst *mtmp)
|
||||
{
|
||||
struct obj *obj;
|
||||
@@ -344,7 +344,7 @@ m_use_healing(struct monst *mtmp)
|
||||
}
|
||||
|
||||
/* return TRUE if monster mtmp can see at least one sleeping soldier */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
m_sees_sleepy_soldier(struct monst *mtmp)
|
||||
{
|
||||
coordxy x = mtmp->mx, y = mtmp->my;
|
||||
@@ -367,7 +367,7 @@ m_sees_sleepy_soldier(struct monst *mtmp)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
m_tele(
|
||||
struct monst *mtmp, /* monst that might be teleported */
|
||||
boolean vismon, /* can see it */
|
||||
@@ -403,7 +403,7 @@ m_tele(
|
||||
* Called from find_defensive() where it is limited to Is_knox()
|
||||
* only, otherwise you could trap two monsters next to each other
|
||||
* in a boulder fort, and they would be happy to stay in there. */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
m_next2m(struct monst *mtmp)
|
||||
{
|
||||
coordxy x, y;
|
||||
@@ -740,7 +740,7 @@ find_defensive(struct monst *mtmp, boolean tryescape)
|
||||
accessible (trap doors and teleporters inside niches are located at
|
||||
secret corridor locations; convert such into normal corridor even if
|
||||
hero doesn't see it happen) */
|
||||
static void
|
||||
staticfn void
|
||||
reveal_trap(struct trap *t, boolean seeit)
|
||||
{
|
||||
struct rm *lev = &levl[t->tx][t->ty];
|
||||
@@ -1241,13 +1241,13 @@ rnd_defensive_item(struct monst *mtmp)
|
||||
/*#define MUSE_WAN_UNDEAD_TURNING 20*/ /* also a defensive item so don't
|
||||
* redefine; nonconsecutive value is ok */
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
linedup_chk_corpse(coordxy x, coordxy y)
|
||||
{
|
||||
return (sobj_at(CORPSE, x, y) != 0);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
m_use_undead_turning(struct monst *mtmp, struct obj *obj)
|
||||
{
|
||||
coordxy ax = u.ux + sgn(mtmp->mux - mtmp->mx) * 3,
|
||||
@@ -1293,7 +1293,7 @@ m_use_undead_turning(struct monst *mtmp, struct obj *obj)
|
||||
}
|
||||
|
||||
/* from monster's point of view, is hero behind a chokepoint? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
hero_behind_chokepoint(struct monst *mtmp)
|
||||
{
|
||||
coordxy dx = sgn(mtmp->mx - mtmp->mux);
|
||||
@@ -1320,7 +1320,7 @@ hero_behind_chokepoint(struct monst *mtmp)
|
||||
}
|
||||
|
||||
/* hostile monster has another hostile next to it */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
mon_has_friends(struct monst *mtmp)
|
||||
{
|
||||
coordxy dx, dy;
|
||||
@@ -1514,7 +1514,7 @@ find_offensive(struct monst *mtmp)
|
||||
#undef nomore
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
mbhitm(struct monst *mtmp, struct obj *otmp)
|
||||
{
|
||||
int tmp;
|
||||
@@ -1627,7 +1627,7 @@ mbhitm(struct monst *mtmp, struct obj *otmp)
|
||||
* zapping you, so we need a special function for it. (Unless someone wants
|
||||
* to merge the two functions...)
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
mbhit(
|
||||
struct monst *mon, /* monster shooting the wand */
|
||||
int range, /* direction and range */
|
||||
@@ -2151,7 +2151,7 @@ find_misc(struct monst *mtmp)
|
||||
|
||||
/* type of monster to polymorph into; defaults to one suitable for the
|
||||
current level rather than the totally arbitrary choice of newcham() */
|
||||
static struct permonst *
|
||||
staticfn struct permonst *
|
||||
muse_newcham_mon(struct monst *mon)
|
||||
{
|
||||
struct obj *m_armr;
|
||||
@@ -2165,7 +2165,7 @@ muse_newcham_mon(struct monst *mon)
|
||||
return rndmonst();
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
mloot_container(
|
||||
struct monst *mon,
|
||||
struct obj *container,
|
||||
@@ -2501,7 +2501,7 @@ use_misc(struct monst *mtmp)
|
||||
|
||||
RESTORE_WARNINGS
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
you_aggravate(struct monst *mtmp)
|
||||
{
|
||||
pline("For some reason, %s presence is known to you.",
|
||||
@@ -2776,7 +2776,7 @@ munstone(struct monst *mon, boolean by_you)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mon_consume_unstone(
|
||||
struct monst *mon,
|
||||
struct obj *obj,
|
||||
@@ -2855,7 +2855,7 @@ mon_consume_unstone(
|
||||
}
|
||||
|
||||
/* decide whether obj can cure petrification; also used when picking up */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cures_stoning(struct monst *mon, struct obj *obj, boolean tinok)
|
||||
{
|
||||
if (obj->otyp == POT_ACID)
|
||||
@@ -2871,7 +2871,7 @@ cures_stoning(struct monst *mon, struct obj *obj, boolean tinok)
|
||||
|| acidic(&mons[obj->corpsenm]));
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
mcould_eat_tin(struct monst *mon)
|
||||
{
|
||||
struct obj *obj, *mwep;
|
||||
@@ -2974,7 +2974,7 @@ munslime(struct monst *mon, boolean by_you)
|
||||
}
|
||||
|
||||
/* mon uses an item--selected by caller--to burn away incipient slime */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
muse_unslime(
|
||||
struct monst *mon,
|
||||
struct obj *obj,
|
||||
@@ -3115,7 +3115,7 @@ muse_unslime(
|
||||
}
|
||||
|
||||
/* decide whether obj can be used to cure green slime */
|
||||
static int
|
||||
staticfn int
|
||||
cures_sliming(struct monst *mon, struct obj *obj)
|
||||
{
|
||||
/* scroll of fire */
|
||||
@@ -3138,7 +3138,7 @@ cures_sliming(struct monst *mon, struct obj *obj)
|
||||
seem plausibly green (which didn't necessarily match the categorization
|
||||
by the color of the text).
|
||||
iflags.use_color is not meant for game behavior decisions */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
green_mon(struct monst *mon)
|
||||
{
|
||||
struct permonst *ptr = mon->data;
|
||||
|
||||
+20
-20
@@ -28,19 +28,19 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static void awaken_scare(struct monst *, boolean);
|
||||
static void awaken_monsters(int);
|
||||
static void put_monsters_to_sleep(int);
|
||||
static void charm_snakes(int);
|
||||
static void calm_nymphs(int);
|
||||
static void charm_monsters(int);
|
||||
static void do_earthquake(int);
|
||||
static const char *generic_lvl_desc(void);
|
||||
static int do_improvisation(struct obj *);
|
||||
static char *improvised_notes(boolean *);
|
||||
staticfn void awaken_scare(struct monst *, boolean);
|
||||
staticfn void awaken_monsters(int);
|
||||
staticfn void put_monsters_to_sleep(int);
|
||||
staticfn void charm_snakes(int);
|
||||
staticfn void calm_nymphs(int);
|
||||
staticfn void charm_monsters(int);
|
||||
staticfn void do_earthquake(int);
|
||||
staticfn const char *generic_lvl_desc(void);
|
||||
staticfn int do_improvisation(struct obj *);
|
||||
staticfn char *improvised_notes(boolean *);
|
||||
|
||||
/* wake up monster, possibly scare it */
|
||||
static void
|
||||
staticfn void
|
||||
awaken_scare(struct monst *mtmp, boolean scary)
|
||||
{
|
||||
mtmp->msleeping = 0;
|
||||
@@ -62,7 +62,7 @@ awaken_scare(struct monst *mtmp, boolean scary)
|
||||
* Wake every monster in range...
|
||||
*/
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
awaken_monsters(int distance)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -80,7 +80,7 @@ awaken_monsters(int distance)
|
||||
* Make monsters fall asleep. Note that they may resist the spell.
|
||||
*/
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
put_monsters_to_sleep(int distance)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -100,7 +100,7 @@ put_monsters_to_sleep(int distance)
|
||||
* Charm snakes in range. Note that the snakes are NOT tamed.
|
||||
*/
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
charm_snakes(int distance)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -134,7 +134,7 @@ charm_snakes(int distance)
|
||||
* Calm nymphs in range.
|
||||
*/
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
calm_nymphs(int distance)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -191,7 +191,7 @@ awaken_soldiers(struct monst* bugler /* monster that played instrument */)
|
||||
}
|
||||
|
||||
/* Charm monsters in range. Note that they may resist the spell. */
|
||||
static void
|
||||
staticfn void
|
||||
charm_monsters(int distance)
|
||||
{
|
||||
struct monst *mtmp, *mtmp2;
|
||||
@@ -218,7 +218,7 @@ charm_monsters(int distance)
|
||||
/* Generate earthquake :-) of desired force.
|
||||
* That is: create random chasms (pits).
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
do_earthquake(int force)
|
||||
{
|
||||
static const char into_a_chasm[] = " into a chasm";
|
||||
@@ -455,7 +455,7 @@ do_earthquake(int force)
|
||||
}
|
||||
}
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
generic_lvl_desc(void)
|
||||
{
|
||||
if (Is_astralevel(&u.uz))
|
||||
@@ -480,7 +480,7 @@ static const char *beats[] = {
|
||||
/*
|
||||
* The player is trying to extract something from his/her instrument.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
do_improvisation(struct obj *instr)
|
||||
{
|
||||
int damage, mode, do_spec = !(Stunned || Confusion);
|
||||
@@ -709,7 +709,7 @@ do_improvisation(struct obj *instr)
|
||||
return 2; /* That takes time */
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
improvised_notes(boolean *same_as_last_time)
|
||||
{
|
||||
static const char notes[7] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G' };
|
||||
|
||||
+36
-36
@@ -10,28 +10,28 @@ struct _lua_obj {
|
||||
struct obj *obj;
|
||||
};
|
||||
|
||||
static struct _lua_obj *l_obj_check(lua_State *, int);
|
||||
static int l_obj_add_to_container(lua_State *);
|
||||
static int l_obj_gc(lua_State *);
|
||||
static int l_obj_getcontents(lua_State *);
|
||||
static int l_obj_isnull(lua_State *);
|
||||
static int l_obj_new_readobjnam(lua_State *);
|
||||
static int l_obj_nextobj(lua_State *);
|
||||
static int l_obj_objects_to_table(lua_State *);
|
||||
static int l_obj_placeobj(lua_State *);
|
||||
static int l_obj_to_table(lua_State *);
|
||||
static int l_obj_at(lua_State *);
|
||||
static int l_obj_container(lua_State *);
|
||||
static int l_obj_timer_has(lua_State *);
|
||||
static int l_obj_timer_peek(lua_State *);
|
||||
static int l_obj_timer_stop(lua_State *);
|
||||
static int l_obj_timer_start(lua_State *);
|
||||
static int l_obj_bury(lua_State *);
|
||||
static struct _lua_obj *l_obj_push(lua_State *, struct obj *);
|
||||
staticfn struct _lua_obj *l_obj_check(lua_State *, int);
|
||||
staticfn int l_obj_add_to_container(lua_State *);
|
||||
staticfn int l_obj_gc(lua_State *);
|
||||
staticfn int l_obj_getcontents(lua_State *);
|
||||
staticfn int l_obj_isnull(lua_State *);
|
||||
staticfn int l_obj_new_readobjnam(lua_State *);
|
||||
staticfn int l_obj_nextobj(lua_State *);
|
||||
staticfn int l_obj_objects_to_table(lua_State *);
|
||||
staticfn int l_obj_placeobj(lua_State *);
|
||||
staticfn int l_obj_to_table(lua_State *);
|
||||
staticfn int l_obj_at(lua_State *);
|
||||
staticfn int l_obj_container(lua_State *);
|
||||
staticfn int l_obj_timer_has(lua_State *);
|
||||
staticfn int l_obj_timer_peek(lua_State *);
|
||||
staticfn int l_obj_timer_stop(lua_State *);
|
||||
staticfn int l_obj_timer_start(lua_State *);
|
||||
staticfn int l_obj_bury(lua_State *);
|
||||
staticfn struct _lua_obj *l_obj_push(lua_State *, struct obj *);
|
||||
|
||||
#define lobj_is_ok(lo) ((lo) && (lo)->obj && (lo)->obj->where != OBJ_LUAFREE)
|
||||
|
||||
static struct _lua_obj *
|
||||
staticfn struct _lua_obj *
|
||||
l_obj_check(lua_State *L, int indx)
|
||||
{
|
||||
struct _lua_obj *lo;
|
||||
@@ -43,7 +43,7 @@ l_obj_check(lua_State *L, int indx)
|
||||
return lo;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_gc(lua_State *L)
|
||||
{
|
||||
struct obj *obj, *otmp;
|
||||
@@ -69,7 +69,7 @@ l_obj_gc(lua_State *L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct _lua_obj *
|
||||
staticfn struct _lua_obj *
|
||||
l_obj_push(lua_State *L, struct obj *otmp)
|
||||
{
|
||||
struct _lua_obj *lo = (struct _lua_obj *) lua_newuserdata(L, sizeof(struct _lua_obj));
|
||||
@@ -92,7 +92,7 @@ nhl_push_obj(lua_State *L, struct obj *otmp)
|
||||
|
||||
/* local o = obj.new("large chest");
|
||||
local cobj = o:contents(); */
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_getcontents(lua_State *L)
|
||||
{
|
||||
struct _lua_obj *lo = l_obj_check(L, 1);
|
||||
@@ -109,7 +109,7 @@ l_obj_getcontents(lua_State *L)
|
||||
/* local box = obj.new("large chest");
|
||||
box:addcontent(obj.new("rock"));
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_add_to_container(lua_State *L)
|
||||
{
|
||||
struct _lua_obj *lobox = l_obj_check(L, 1);
|
||||
@@ -166,7 +166,7 @@ DISABLE_WARNING_UNREACHABLE_CODE
|
||||
/* local odata = obj.class(otbl.otyp); */
|
||||
/* local odata = obj.class(obj.new("rock")); */
|
||||
/* local odata = o:class(); */
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_objects_to_table(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -242,7 +242,7 @@ RESTORE_WARNING_UNREACHABLE_CODE
|
||||
object fields.
|
||||
local o = obj.new("rock");
|
||||
local otbl = o:totable(); */
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_to_table(lua_State *L)
|
||||
{
|
||||
struct _lua_obj *lo = l_obj_check(L, 1);
|
||||
@@ -343,7 +343,7 @@ DISABLE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
/* create a new object via wishing routine */
|
||||
/* local o = obj.new("rock"); */
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_new_readobjnam(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -366,7 +366,7 @@ l_obj_new_readobjnam(lua_State *L)
|
||||
|
||||
/* Get the topmost object on the map at x,y */
|
||||
/* local o = obj.at(x, y); */
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_at(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -390,7 +390,7 @@ l_obj_at(lua_State *L)
|
||||
/* Place an object on the map at (x,y).
|
||||
local o = obj.new("rock");
|
||||
o:placeobj(u.ux, u.uy); */
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_placeobj(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -422,7 +422,7 @@ RESTORE_WARNING_UNREACHABLE_CODE
|
||||
local o2 = o:next(true);
|
||||
local firstobj = obj.next();
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_nextobj(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -446,7 +446,7 @@ l_obj_nextobj(lua_State *L)
|
||||
|
||||
/* Get the container object is in */
|
||||
/* local box = o:container(); */
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_container(lua_State *L)
|
||||
{
|
||||
struct _lua_obj *lo = l_obj_check(L, 1);
|
||||
@@ -460,7 +460,7 @@ l_obj_container(lua_State *L)
|
||||
|
||||
/* Is the object a null? */
|
||||
/* local badobj = o:isnull(); */
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_isnull(lua_State *L)
|
||||
{
|
||||
struct _lua_obj *lo = l_obj_check(L, 1);
|
||||
@@ -473,7 +473,7 @@ DISABLE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
/* does object have a timer of certain type? */
|
||||
/* local hastimer = o:has_timer("rot-organic"); */
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_timer_has(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -497,7 +497,7 @@ l_obj_timer_has(lua_State *L)
|
||||
/* peek at an object timer. return the turn when timer triggers.
|
||||
returns 0 if no such timer attached to the object. */
|
||||
/* local timeout = o:peek_timer("hatch-egg"); */
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_timer_peek(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -524,7 +524,7 @@ l_obj_timer_peek(lua_State *L)
|
||||
without a timer type parameter, stops all timers for the object. */
|
||||
/* local timeout = o:stop_timer("rot-organic"); */
|
||||
/* o:stop_timer(); */
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_timer_stop(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -556,7 +556,7 @@ RESTORE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
/* start an object timer. */
|
||||
/* o:start_timer("hatch-egg", 10); */
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_timer_start(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -580,7 +580,7 @@ l_obj_timer_start(lua_State *L)
|
||||
false otherwise. */
|
||||
/* local ogone = o:bury(); */
|
||||
/* local ogone = o:bury(5,5); */
|
||||
static int
|
||||
staticfn int
|
||||
l_obj_bury(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
|
||||
+61
-61
@@ -7,41 +7,41 @@
|
||||
|
||||
|
||||
struct selectionvar *l_selection_check(lua_State *, int);
|
||||
static struct selectionvar *l_selection_push_new(lua_State *);
|
||||
staticfn struct selectionvar *l_selection_push_new(lua_State *);
|
||||
|
||||
/* lua_CFunction prototypes */
|
||||
static int l_selection_new(lua_State *);
|
||||
static int l_selection_clone(lua_State *);
|
||||
static int l_selection_numpoints(lua_State *);
|
||||
static int l_selection_getpoint(lua_State *);
|
||||
static int l_selection_setpoint(lua_State *);
|
||||
static int l_selection_filter_percent(lua_State *);
|
||||
static int l_selection_rndcoord(lua_State *);
|
||||
static int l_selection_room(lua_State *);
|
||||
static int l_selection_getbounds(lua_State *);
|
||||
static boolean params_sel_2coords(lua_State *, struct selectionvar **,
|
||||
staticfn int l_selection_new(lua_State *);
|
||||
staticfn int l_selection_clone(lua_State *);
|
||||
staticfn int l_selection_numpoints(lua_State *);
|
||||
staticfn int l_selection_getpoint(lua_State *);
|
||||
staticfn int l_selection_setpoint(lua_State *);
|
||||
staticfn int l_selection_filter_percent(lua_State *);
|
||||
staticfn int l_selection_rndcoord(lua_State *);
|
||||
staticfn int l_selection_room(lua_State *);
|
||||
staticfn int l_selection_getbounds(lua_State *);
|
||||
staticfn boolean params_sel_2coords(lua_State *, struct selectionvar **,
|
||||
coordxy *, coordxy *, coordxy *, coordxy *);
|
||||
static int l_selection_line(lua_State *);
|
||||
static int l_selection_randline(lua_State *);
|
||||
static int l_selection_rect(lua_State *);
|
||||
static int l_selection_fillrect(lua_State *);
|
||||
static int l_selection_grow(lua_State *);
|
||||
static int l_selection_filter_mapchar(lua_State *);
|
||||
static int l_selection_match(lua_State *);
|
||||
static int l_selection_flood(lua_State *);
|
||||
static int l_selection_circle(lua_State *);
|
||||
static int l_selection_ellipse(lua_State *);
|
||||
static int l_selection_gradient(lua_State *);
|
||||
static int l_selection_iterate(lua_State *);
|
||||
static int l_selection_gc(lua_State *);
|
||||
static int l_selection_not(lua_State *);
|
||||
static int l_selection_and(lua_State *);
|
||||
static int l_selection_or(lua_State *);
|
||||
static int l_selection_xor(lua_State *);
|
||||
staticfn int l_selection_line(lua_State *);
|
||||
staticfn int l_selection_randline(lua_State *);
|
||||
staticfn int l_selection_rect(lua_State *);
|
||||
staticfn int l_selection_fillrect(lua_State *);
|
||||
staticfn int l_selection_grow(lua_State *);
|
||||
staticfn int l_selection_filter_mapchar(lua_State *);
|
||||
staticfn int l_selection_match(lua_State *);
|
||||
staticfn int l_selection_flood(lua_State *);
|
||||
staticfn int l_selection_circle(lua_State *);
|
||||
staticfn int l_selection_ellipse(lua_State *);
|
||||
staticfn int l_selection_gradient(lua_State *);
|
||||
staticfn int l_selection_iterate(lua_State *);
|
||||
staticfn int l_selection_gc(lua_State *);
|
||||
staticfn int l_selection_not(lua_State *);
|
||||
staticfn int l_selection_and(lua_State *);
|
||||
staticfn int l_selection_or(lua_State *);
|
||||
staticfn int l_selection_xor(lua_State *);
|
||||
/* There doesn't seem to be a point in having a l_selection_add since it would
|
||||
* do the same thing as l_selection_or. The addition operator is mapped to
|
||||
* l_selection_or. */
|
||||
static int l_selection_sub(lua_State *);
|
||||
staticfn int l_selection_sub(lua_State *);
|
||||
#if 0
|
||||
/* the following do not appear to currently be
|
||||
used and because they are static, the OSX
|
||||
@@ -49,8 +49,8 @@ static int l_selection_sub(lua_State *);
|
||||
if ifdef'd out the prototype here and the
|
||||
function body below.
|
||||
*/
|
||||
static int l_selection_ipairs(lua_State *);
|
||||
static struct selectionvar *l_selection_to(lua_State *, int);
|
||||
staticfn int l_selection_ipairs(lua_State *);
|
||||
staticfn struct selectionvar *l_selection_to(lua_State *, int);
|
||||
#endif
|
||||
|
||||
struct selectionvar *
|
||||
@@ -65,7 +65,7 @@ l_selection_check(lua_State *L, int index)
|
||||
return sel;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_gc(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = l_selection_check(L, 1);
|
||||
@@ -76,7 +76,7 @@ l_selection_gc(lua_State *L)
|
||||
}
|
||||
|
||||
#if 0
|
||||
static struct selectionvar *
|
||||
staticfn struct selectionvar *
|
||||
l_selection_to(lua_State *L, int index)
|
||||
{
|
||||
struct selectionvar *sel = (struct selectionvar *) lua_touserdata(L, index);
|
||||
@@ -88,7 +88,7 @@ l_selection_to(lua_State *L, int index)
|
||||
#endif
|
||||
|
||||
/* push a new selection into lua stack, return the selectionvar */
|
||||
static struct selectionvar *
|
||||
staticfn struct selectionvar *
|
||||
l_selection_push_new(lua_State *L)
|
||||
{
|
||||
struct selectionvar *tmp = selection_new();
|
||||
@@ -121,7 +121,7 @@ l_selection_push_copy(lua_State *L, struct selectionvar *tmp)
|
||||
|
||||
|
||||
/* local sel = selection.new(); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_new(lua_State *L)
|
||||
{
|
||||
(void) l_selection_push_new(L);
|
||||
@@ -130,7 +130,7 @@ l_selection_new(lua_State *L)
|
||||
|
||||
/* Replace the topmost selection in the stack with a clone of it. */
|
||||
/* local sel = selection.clone(sel); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_clone(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = l_selection_check(L, 1);
|
||||
@@ -153,7 +153,7 @@ DISABLE_WARNING_UNREACHABLE_CODE
|
||||
/* local sel = sel:set(); */
|
||||
/* local sel = selection.set(sel); */
|
||||
/* TODO: allow setting multiple coordinates at once: set({x,y}, {x,y}, ...); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_setpoint(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = (struct selectionvar *) 0;
|
||||
@@ -197,7 +197,7 @@ l_selection_setpoint(lua_State *L)
|
||||
}
|
||||
|
||||
/* local numpoints = selection.numpoints(sel); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_numpoints(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = l_selection_check(L, 1);
|
||||
@@ -218,7 +218,7 @@ l_selection_numpoints(lua_State *L)
|
||||
}
|
||||
|
||||
/* local value = selection.get(sel, x, y); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_getpoint(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = l_selection_check(L, 1);
|
||||
@@ -253,7 +253,7 @@ RESTORE_WARNING_UNREACHABLE_CODE
|
||||
/* local s = selection.negate(sel); */
|
||||
/* local s = selection.negate(); */
|
||||
/* local s = sel:negate(); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_not(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -274,7 +274,7 @@ l_selection_not(lua_State *L)
|
||||
}
|
||||
|
||||
/* local sel = selection.area(4,5, 40,10) & selection.rect(7,8, 60,14); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_and(lua_State *L)
|
||||
{
|
||||
int x,y;
|
||||
@@ -297,7 +297,7 @@ l_selection_and(lua_State *L)
|
||||
}
|
||||
|
||||
/* local sel = selection.area(4,5, 40,10) | selection.rect(7,8, 60,14); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_or(lua_State *L)
|
||||
{
|
||||
int x,y;
|
||||
@@ -321,7 +321,7 @@ l_selection_or(lua_State *L)
|
||||
}
|
||||
|
||||
/* local sel = selection.area(4,5, 40,10) ~ selection.rect(7,8, 60,14); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_xor(lua_State *L)
|
||||
{
|
||||
int x,y;
|
||||
@@ -348,7 +348,7 @@ l_selection_xor(lua_State *L)
|
||||
|
||||
/* local sel = selection.area(10,10, 20,20) - selection.area(14,14, 17,17)
|
||||
* - i.e. points that are in A but not in B */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_sub(lua_State *L)
|
||||
{
|
||||
int x,y;
|
||||
@@ -376,7 +376,7 @@ l_selection_sub(lua_State *L)
|
||||
}
|
||||
|
||||
/* local s = selection.percentage(sel, 50); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_filter_percent(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -394,7 +394,7 @@ l_selection_filter_percent(lua_State *L)
|
||||
|
||||
/* local pt = selection.rndcoord(sel); */
|
||||
/* local pt = selection.rndcoord(sel, 1); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_rndcoord(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = l_selection_check(L, 1);
|
||||
@@ -419,7 +419,7 @@ l_selection_rndcoord(lua_State *L)
|
||||
}
|
||||
|
||||
/* local s = selection.room(); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_room(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel;
|
||||
@@ -441,7 +441,7 @@ l_selection_room(lua_State *L)
|
||||
}
|
||||
|
||||
/* local rect = sel:bounds(); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_getbounds(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = l_selection_check(L, 1);
|
||||
@@ -463,7 +463,7 @@ l_selection_getbounds(lua_State *L)
|
||||
*/
|
||||
/* function(selection, x1,y1, x2,y2) */
|
||||
/* selection:function(x1,y1, x2,y2) */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
params_sel_2coords(lua_State *L, struct selectionvar **sel,
|
||||
coordxy *x1, coordxy *y1, coordxy *x2, coordxy *y2)
|
||||
{
|
||||
@@ -496,7 +496,7 @@ params_sel_2coords(lua_State *L, struct selectionvar **sel,
|
||||
/* local s = selection.line(sel, x1,y1, x2,y2); */
|
||||
/* local s = selection.line(x1,y1, x2,y2); */
|
||||
/* s:line(x1,y1, x2,y2); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_line(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = NULL;
|
||||
@@ -516,7 +516,7 @@ l_selection_line(lua_State *L)
|
||||
}
|
||||
|
||||
/* local s = selection.rect(sel, x1,y1, x2,y2); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_rect(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = NULL;
|
||||
@@ -544,7 +544,7 @@ l_selection_rect(lua_State *L)
|
||||
/* local s = selection.fillrect(x1,y1, x2,y2); */
|
||||
/* s:fillrect(x1,y1, x2,y2); */
|
||||
/* selection.area(x1,y1, x2,y2); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_fillrect(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = NULL;
|
||||
@@ -576,7 +576,7 @@ l_selection_fillrect(lua_State *L)
|
||||
/* local s = selection.randline(x1,y1, x2,y2, roughness); */
|
||||
/* TODO: selection.randline(x1,y1, x2,y2, roughness); */
|
||||
/* TODO: selection.randline({x1,y1}, {x2,y2}, roughness); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_randline(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -616,7 +616,7 @@ l_selection_randline(lua_State *L)
|
||||
|
||||
/* local s = selection.grow(sel); */
|
||||
/* local s = selection.grow(sel, "north"); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_grow(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -637,7 +637,7 @@ l_selection_grow(lua_State *L)
|
||||
|
||||
|
||||
/* local s = selection.filter_mapchar(sel, mapchar, lit); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_filter_mapchar(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -662,7 +662,7 @@ l_selection_filter_mapchar(lua_State *L)
|
||||
}
|
||||
|
||||
/* local s = selection.match([[...]]); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_match(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -702,7 +702,7 @@ l_selection_match(lua_State *L)
|
||||
|
||||
/* local s = selection.floodfill(x,y); */
|
||||
/* local s = selection.floodfill(x,y, diagonals); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_flood(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -738,7 +738,7 @@ l_selection_flood(lua_State *L)
|
||||
/* local s = selection.circle(x, y, radius, filled); */
|
||||
/* local s = selection.circle(sel, x, y, radius); */
|
||||
/* local s = selection.circle(sel, x, y, radius, filled); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_circle(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -786,7 +786,7 @@ l_selection_circle(lua_State *L)
|
||||
/* local s = selection.ellipse(x, y, radius1, radius2, filled); */
|
||||
/* local s = selection.ellipse(sel, x, y, radius1, radius2); */
|
||||
/* local s = selection.ellipse(sel, x, y, radius1, radius2, filled); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_ellipse(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -838,7 +838,7 @@ l_selection_ellipse(lua_State *L)
|
||||
* non-obvious argument order. */
|
||||
/* selection.gradient({ type = "radial", x = 3, y = 5, x2 = 10, y2 = 12,
|
||||
* mindist = 4, maxdist = 10, limited = false }); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_gradient(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -898,7 +898,7 @@ l_selection_gradient(lua_State *L)
|
||||
* The x, y coordinates passed to the function are map- or room-relative
|
||||
* rather than absolute, unless there has been no previous map or room defined.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_iterate(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
|
||||
+112
-112
@@ -27,68 +27,68 @@ struct e;
|
||||
|
||||
/* lua_CFunction prototypes */
|
||||
#ifdef DUMPLOG
|
||||
static int nhl_dump_fmtstr(lua_State *);
|
||||
staticfn int nhl_dump_fmtstr(lua_State *);
|
||||
#endif /* DUMPLOG */
|
||||
static int nhl_dnum_name(lua_State *);
|
||||
static int nhl_stairways(lua_State *);
|
||||
static int nhl_pushkey(lua_State *);
|
||||
static int nhl_doturn(lua_State *);
|
||||
static int nhl_debug_flags(lua_State *);
|
||||
static int nhl_timer_has_at(lua_State *);
|
||||
static int nhl_timer_peek_at(lua_State *);
|
||||
static int nhl_timer_stop_at(lua_State *);
|
||||
static int nhl_timer_start_at(lua_State *);
|
||||
static int nhl_get_cmd_key(lua_State *);
|
||||
static int nhl_callback(lua_State *);
|
||||
static int nhl_gamestate(lua_State *);
|
||||
static int nhl_test(lua_State *);
|
||||
static int nhl_getmap(lua_State *);
|
||||
static char splev_typ2chr(schar);
|
||||
static int nhl_gettrap(lua_State *);
|
||||
static int nhl_deltrap(lua_State *);
|
||||
staticfn int nhl_dnum_name(lua_State *);
|
||||
staticfn int nhl_stairways(lua_State *);
|
||||
staticfn int nhl_pushkey(lua_State *);
|
||||
staticfn int nhl_doturn(lua_State *);
|
||||
staticfn int nhl_debug_flags(lua_State *);
|
||||
staticfn int nhl_timer_has_at(lua_State *);
|
||||
staticfn int nhl_timer_peek_at(lua_State *);
|
||||
staticfn int nhl_timer_stop_at(lua_State *);
|
||||
staticfn int nhl_timer_start_at(lua_State *);
|
||||
staticfn int nhl_get_cmd_key(lua_State *);
|
||||
staticfn int nhl_callback(lua_State *);
|
||||
staticfn int nhl_gamestate(lua_State *);
|
||||
staticfn int nhl_test(lua_State *);
|
||||
staticfn int nhl_getmap(lua_State *);
|
||||
staticfn char splev_typ2chr(schar);
|
||||
staticfn int nhl_gettrap(lua_State *);
|
||||
staticfn int nhl_deltrap(lua_State *);
|
||||
#if 0
|
||||
static int nhl_setmap(lua_State *);
|
||||
staticfn int nhl_setmap(lua_State *);
|
||||
#endif
|
||||
static int nhl_impossible(lua_State *);
|
||||
static int nhl_pline(lua_State *);
|
||||
static int nhl_verbalize(lua_State *);
|
||||
static int nhl_parse_config(lua_State *);
|
||||
static int nhl_menu(lua_State *);
|
||||
static int nhl_text(lua_State *);
|
||||
static int nhl_getlin(lua_State *);
|
||||
static int nhl_makeplural(lua_State *);
|
||||
static int nhl_makesingular(lua_State *);
|
||||
static int nhl_s_suffix(lua_State *);
|
||||
static int nhl_ing_suffix(lua_State *);
|
||||
static int nhl_an(lua_State *);
|
||||
static int nhl_rn2(lua_State *);
|
||||
static int nhl_random(lua_State *);
|
||||
static int nhl_level_difficulty(lua_State *);
|
||||
static void init_nhc_data(lua_State *);
|
||||
static int nhl_push_anything(lua_State *, int, void *);
|
||||
static int nhl_meta_u_index(lua_State *);
|
||||
static int nhl_meta_u_newindex(lua_State *);
|
||||
static int nhl_u_clear_inventory(lua_State *);
|
||||
static int nhl_u_giveobj(lua_State *);
|
||||
static void init_u_data(lua_State *);
|
||||
staticfn int nhl_impossible(lua_State *);
|
||||
staticfn int nhl_pline(lua_State *);
|
||||
staticfn int nhl_verbalize(lua_State *);
|
||||
staticfn int nhl_parse_config(lua_State *);
|
||||
staticfn int nhl_menu(lua_State *);
|
||||
staticfn int nhl_text(lua_State *);
|
||||
staticfn int nhl_getlin(lua_State *);
|
||||
staticfn int nhl_makeplural(lua_State *);
|
||||
staticfn int nhl_makesingular(lua_State *);
|
||||
staticfn int nhl_s_suffix(lua_State *);
|
||||
staticfn int nhl_ing_suffix(lua_State *);
|
||||
staticfn int nhl_an(lua_State *);
|
||||
staticfn int nhl_rn2(lua_State *);
|
||||
staticfn int nhl_random(lua_State *);
|
||||
staticfn int nhl_level_difficulty(lua_State *);
|
||||
staticfn void init_nhc_data(lua_State *);
|
||||
staticfn int nhl_push_anything(lua_State *, int, void *);
|
||||
staticfn int nhl_meta_u_index(lua_State *);
|
||||
staticfn int nhl_meta_u_newindex(lua_State *);
|
||||
staticfn int nhl_u_clear_inventory(lua_State *);
|
||||
staticfn int nhl_u_giveobj(lua_State *);
|
||||
staticfn void init_u_data(lua_State *);
|
||||
#ifdef notyet
|
||||
static int nhl_set_package_path(lua_State *, const char *);
|
||||
staticfn int nhl_set_package_path(lua_State *, const char *);
|
||||
#endif
|
||||
static int traceback_handler(lua_State *);
|
||||
static uint32_t nhl_getmeminuse(lua_State *);
|
||||
staticfn int traceback_handler(lua_State *);
|
||||
staticfn uint32_t nhl_getmeminuse(lua_State *);
|
||||
#ifdef NHL_SANDBOX
|
||||
static void nhlL_openlibs(lua_State *, uint32_t);
|
||||
staticfn void nhlL_openlibs(lua_State *, uint32_t);
|
||||
#endif
|
||||
static void *nhl_alloc(void *, void *, size_t, size_t);
|
||||
static lua_State *nhlL_newstate (nhl_sandbox_info *, const char *);
|
||||
static void end_luapat(void);
|
||||
static int nhl_get_config(lua_State *);
|
||||
static int nhl_variable(lua_State *);
|
||||
static void nhl_clearfromtable(lua_State *, int, int, struct e *);
|
||||
static void nhl_warn(void *, const char *, int);
|
||||
static void nhl_clearfromtable(lua_State *, int, int, struct e *);
|
||||
static int nhl_panic(lua_State *);
|
||||
static void nhl_hookfn(lua_State *, lua_Debug *);
|
||||
staticfn void *nhl_alloc(void *, void *, size_t, size_t);
|
||||
staticfn lua_State *nhlL_newstate (nhl_sandbox_info *, const char *);
|
||||
staticfn void end_luapat(void);
|
||||
staticfn int nhl_get_config(lua_State *);
|
||||
staticfn int nhl_variable(lua_State *);
|
||||
staticfn void nhl_clearfromtable(lua_State *, int, int, struct e *);
|
||||
staticfn void nhl_warn(void *, const char *, int);
|
||||
staticfn void nhl_clearfromtable(lua_State *, int, int, struct e *);
|
||||
staticfn int nhl_panic(lua_State *);
|
||||
staticfn void nhl_hookfn(lua_State *, lua_Debug *);
|
||||
|
||||
static const char *const nhcore_call_names[NUM_NHCORE_CALLS] = {
|
||||
"start_new_game",
|
||||
@@ -389,7 +389,7 @@ check_mapchr(const char *s)
|
||||
return INVALID_TYPE;
|
||||
}
|
||||
|
||||
static char
|
||||
staticfn char
|
||||
splev_typ2chr(schar typ)
|
||||
{
|
||||
int i;
|
||||
@@ -404,7 +404,7 @@ DISABLE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
/* local t = nh.gettrap(x,y); */
|
||||
/* local t = nh.gettrap({ x = 10, y = 10 }); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_gettrap(lua_State *L)
|
||||
{
|
||||
lua_Integer lx, ly;
|
||||
@@ -458,7 +458,7 @@ nhl_gettrap(lua_State *L)
|
||||
}
|
||||
|
||||
/* nh.deltrap(x,y); nh.deltrap({ x = 10, y = 15 }); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_deltrap(lua_State *L)
|
||||
{
|
||||
lua_Integer lx, ly;
|
||||
@@ -517,7 +517,7 @@ DISABLE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
/* local loc = nh.getmap(x,y); */
|
||||
/* local loc = nh.getmap({ x = 10, y = 35 }); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_getmap(lua_State *L)
|
||||
{
|
||||
lua_Integer lx, ly;
|
||||
@@ -607,7 +607,7 @@ nhl_getmap(lua_State *L)
|
||||
}
|
||||
|
||||
/* impossible("Error!") */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_impossible(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -621,7 +621,7 @@ nhl_impossible(lua_State *L)
|
||||
|
||||
/* pline("It hits!") */
|
||||
/* pline("It hits!", true) */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_pline(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -637,7 +637,7 @@ nhl_pline(lua_State *L)
|
||||
}
|
||||
|
||||
/* verbalize("Fool!") */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_verbalize(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -651,7 +651,7 @@ nhl_verbalize(lua_State *L)
|
||||
}
|
||||
|
||||
/* parse_config("OPTIONS=!color") */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_parse_config(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -665,7 +665,7 @@ nhl_parse_config(lua_State *L)
|
||||
}
|
||||
|
||||
/* local windowtype = get_config("windowtype"); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_get_config(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -682,7 +682,7 @@ nhl_get_config(lua_State *L)
|
||||
/*
|
||||
str = getlin("What do you want to call this dungeon level?");
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
nhl_getlin(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -707,7 +707,7 @@ nhl_getlin(lua_State *L)
|
||||
|
||||
selected = menu("prompt", default, pickX,
|
||||
{ {key:"a", text:"option a"}, {key:"b", text:"option b"}, ... } ) */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_menu(lua_State *L)
|
||||
{
|
||||
static const char *const pickX[] = { "none", "one", "any" }; /* PICK_x */
|
||||
@@ -796,7 +796,7 @@ nhl_menu(lua_State *L)
|
||||
}
|
||||
|
||||
/* text("foo\nbar\nbaz") */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_text(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -841,7 +841,7 @@ nhl_text(lua_State *L)
|
||||
}
|
||||
|
||||
/* makeplural("zorkmid") */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_makeplural(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -855,7 +855,7 @@ nhl_makeplural(lua_State *L)
|
||||
}
|
||||
|
||||
/* makesingular("zorkmids") */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_makesingular(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -869,7 +869,7 @@ nhl_makesingular(lua_State *L)
|
||||
}
|
||||
|
||||
/* s_suffix("foo") */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_s_suffix(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -883,7 +883,7 @@ nhl_s_suffix(lua_State *L)
|
||||
}
|
||||
|
||||
/* ing_suffix("foo") */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_ing_suffix(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -897,7 +897,7 @@ nhl_ing_suffix(lua_State *L)
|
||||
}
|
||||
|
||||
/* an("foo") */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_an(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -911,7 +911,7 @@ nhl_an(lua_State *L)
|
||||
}
|
||||
|
||||
/* rn2(10) */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_rn2(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -926,7 +926,7 @@ nhl_rn2(lua_State *L)
|
||||
|
||||
/* random(10); -- is the same as rn2(10); */
|
||||
/* random(5,8); -- same as 5 + rn2(8); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_random(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -943,7 +943,7 @@ nhl_random(lua_State *L)
|
||||
}
|
||||
|
||||
/* level_difficulty() */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_level_difficulty(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -1070,7 +1070,7 @@ get_table_option(lua_State *L,
|
||||
|
||||
#ifdef DUMPLOG
|
||||
/* local fname = dump_fmtstr("/tmp/nethack.%n.%d.log"); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_dump_fmtstr(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -1085,7 +1085,7 @@ nhl_dump_fmtstr(lua_State *L)
|
||||
#endif /* DUMPLOG */
|
||||
|
||||
/* local dungeon_name = dnum_name(u.dnum); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_dnum_name(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -1108,7 +1108,7 @@ DISABLE_WARNING_UNREACHABLE_CODE
|
||||
/* set or get variables which are saved and restored along with the game.
|
||||
nh.variable("test", 10);
|
||||
local ten = nh.variable("test"); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_variable(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -1243,7 +1243,7 @@ restore_luadata(NHFILE *nhfp)
|
||||
}
|
||||
|
||||
/* local stairs = stairways(); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_stairways(lua_State *L)
|
||||
{
|
||||
stairway *tmp = gs.stairs;
|
||||
@@ -1274,7 +1274,7 @@ nhl_stairways(lua_State *L)
|
||||
/*
|
||||
test( { x = 123, y = 456 } );
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
nhl_test(lua_State *L)
|
||||
{
|
||||
coordxy x, y;
|
||||
@@ -1298,7 +1298,7 @@ nhl_test(lua_State *L)
|
||||
|
||||
/* push a key into command queue */
|
||||
/* nh.pushkey("i"); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_pushkey(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -1314,7 +1314,7 @@ nhl_pushkey(lua_State *L)
|
||||
|
||||
/* do a turn of moveloop, or until gm.multi is done if param is true. */
|
||||
/* nh.doturn(); nh.doturn(true); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_doturn(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -1334,7 +1334,7 @@ nhl_doturn(lua_State *L)
|
||||
/* nh.debug_flags({ mongen = false,
|
||||
hunger = false,
|
||||
overwrite_stairs = true }); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_debug_flags(lua_State *L)
|
||||
{
|
||||
int val;
|
||||
@@ -1377,7 +1377,7 @@ DISABLE_WARNING_UNREACHABLE_CODE
|
||||
/* does location at x,y have timer? */
|
||||
/* local has_melttimer = nh.has_timer_at(x,y, "melt-ice"); */
|
||||
/* local has_melttimer = nh.has_timer_at({x=4,y=7}, "melt-ice"); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_timer_has_at(lua_State *L)
|
||||
{
|
||||
boolean ret = FALSE;
|
||||
@@ -1408,7 +1408,7 @@ nhl_timer_has_at(lua_State *L)
|
||||
/* when does location at x,y timer trigger? */
|
||||
/* local melttime = nh.peek_timer_at(x,y, "melt-ice"); */
|
||||
/* local melttime = nh.peek_timer_at({x=5,y=6}, "melt-ice"); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_timer_peek_at(lua_State *L)
|
||||
{
|
||||
long when = 0L;
|
||||
@@ -1436,7 +1436,7 @@ nhl_timer_peek_at(lua_State *L)
|
||||
/* stop timer at location x,y */
|
||||
/* nh.stop_timer_at(x,y, "melt-ice"); */
|
||||
/* nh.stop_timer_at({x=6,y=8}, "melt-ice"); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_timer_stop_at(lua_State *L)
|
||||
{
|
||||
short timertype = nhl_get_timertype(L, -1);
|
||||
@@ -1461,7 +1461,7 @@ nhl_timer_stop_at(lua_State *L)
|
||||
|
||||
/* start timer at location x,y */
|
||||
/* nh.start_timer_at(x,y, "melt-ice", 10); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_timer_start_at(lua_State *L)
|
||||
{
|
||||
short timertype = nhl_get_timertype(L, -2);
|
||||
@@ -1493,7 +1493,7 @@ nhl_timer_start_at(lua_State *L)
|
||||
/* returns the visual interpretation of the key bound to an extended command,
|
||||
or the ext cmd name if not bound to any key */
|
||||
/* local helpkey = eckey("help"); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_get_cmd_key(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -1513,7 +1513,7 @@ nhl_get_cmd_key(lua_State *L)
|
||||
/* callback("level_enter", "function_name"); */
|
||||
/* callback("level_enter", "function_name", true); */
|
||||
/* level_enter, level_leave, cmd_before */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_callback(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -1563,7 +1563,7 @@ nhl_callback(lua_State *L)
|
||||
/* currently handles inventory and turns. */
|
||||
/* gamestate(); -- save state */
|
||||
/* gamestate(true); -- restore state */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_gamestate(lua_State *L)
|
||||
{
|
||||
static struct obj *gmst_invent = NULL;
|
||||
@@ -1702,7 +1702,7 @@ static const struct {
|
||||
};
|
||||
|
||||
/* register and init the constants table */
|
||||
static void
|
||||
staticfn void
|
||||
init_nhc_data(lua_State *L)
|
||||
{
|
||||
int i;
|
||||
@@ -1718,7 +1718,7 @@ init_nhc_data(lua_State *L)
|
||||
lua_setglobal(L, "nhc");
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
nhl_push_anything(lua_State *L, int anytype, void *src)
|
||||
{
|
||||
anything any = cg.zeroany;
|
||||
@@ -1742,7 +1742,7 @@ nhl_push_anything(lua_State *L, int anytype, void *src)
|
||||
|
||||
DISABLE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
nhl_meta_u_index(lua_State *L)
|
||||
{
|
||||
static const struct {
|
||||
@@ -1809,7 +1809,7 @@ nhl_meta_u_index(lua_State *L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
nhl_meta_u_newindex(lua_State *L)
|
||||
{
|
||||
nhl_error(L, "Cannot set u table values");
|
||||
@@ -1819,7 +1819,7 @@ nhl_meta_u_newindex(lua_State *L)
|
||||
|
||||
RESTORE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
nhl_u_clear_inventory(lua_State *L UNUSED)
|
||||
{
|
||||
while (gi.invent)
|
||||
@@ -1829,7 +1829,7 @@ nhl_u_clear_inventory(lua_State *L UNUSED)
|
||||
|
||||
/* Put object into player's inventory */
|
||||
/* u.giveobj(obj.new("rock")); */
|
||||
static int
|
||||
staticfn int
|
||||
nhl_u_giveobj(lua_State *L)
|
||||
{
|
||||
return nhl_obj_u_giveobj(L);
|
||||
@@ -1841,7 +1841,7 @@ static const struct luaL_Reg nhl_u_functions[] = {
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
init_u_data(lua_State *L)
|
||||
{
|
||||
lua_newtable(L);
|
||||
@@ -1856,7 +1856,7 @@ init_u_data(lua_State *L)
|
||||
}
|
||||
|
||||
#ifdef notyet
|
||||
static int
|
||||
staticfn int
|
||||
nhl_set_package_path(lua_State *L, const char *path)
|
||||
{
|
||||
if (LUA_TTABLE != lua_getglobal(L, "package")) {
|
||||
@@ -1870,7 +1870,7 @@ nhl_set_package_path(lua_State *L, const char *path)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
traceback_handler(lua_State *L)
|
||||
{
|
||||
luaL_traceback(L, L, lua_tostring(L, 1), 0);
|
||||
@@ -1878,7 +1878,7 @@ traceback_handler(lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
staticfn uint32_t
|
||||
nhl_getmeminuse(lua_State *L)
|
||||
{
|
||||
return lua_gc(L, LUA_GCCOUNT) * 1024 + lua_gc(L, LUA_GCCOUNTB);
|
||||
@@ -2377,7 +2377,7 @@ static struct e ct_os_files[] = {
|
||||
#define DROPIF(flag, lib, ct) \
|
||||
nhl_clearfromtable(L, !!(lflags & flag), lib, ct)
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
nhl_clearfromtable(lua_State *L, int flag, int tndx, struct e *todo)
|
||||
{
|
||||
while (todo->when != EOT) {
|
||||
@@ -2428,7 +2428,7 @@ return values from "call it":
|
||||
* We're going to do #3.
|
||||
*/
|
||||
#ifdef notyet
|
||||
static boolean
|
||||
staticfn boolean
|
||||
start_luapat(void)
|
||||
{
|
||||
int rv;
|
||||
@@ -2449,7 +2449,7 @@ start_luapat(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
end_luapat(void)
|
||||
{
|
||||
if (luapat) {
|
||||
@@ -2459,7 +2459,7 @@ end_luapat(void)
|
||||
}
|
||||
|
||||
#ifdef notyet
|
||||
static int
|
||||
staticfn int
|
||||
opencheckpat(lua_State *L, const char *ename, int param)
|
||||
{
|
||||
/* careful - we're using 2 different and unrelated Lua states */
|
||||
@@ -2513,7 +2513,7 @@ nhl_pushhooked_open_table(lua_State *L)
|
||||
}
|
||||
|
||||
#ifdef notyet
|
||||
static int
|
||||
staticfn int
|
||||
hooked_open(lua_State *L)
|
||||
{
|
||||
const char *mode;
|
||||
@@ -2581,7 +2581,7 @@ hooked_open(lua_State *L)
|
||||
return (*io_open)(L);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
hook_open(lua_State *L)
|
||||
{
|
||||
boolean rv = FALSE;
|
||||
@@ -2613,7 +2613,7 @@ hook_open(lua_State *L)
|
||||
DISABLE_WARNING_CONDEXPR_IS_CONSTANT
|
||||
|
||||
#ifdef NHL_SANDBOX
|
||||
static void
|
||||
staticfn void
|
||||
nhlL_openlibs(lua_State *L, uint32_t lflags)
|
||||
{
|
||||
/* translate lflags from user-friendly to internal */
|
||||
@@ -2736,7 +2736,7 @@ UNSAFEIO:
|
||||
|
||||
RESTORE_WARNING_CONDEXPR_IS_CONSTANT
|
||||
|
||||
static void *
|
||||
staticfn void *
|
||||
nhl_alloc(void *ud, void *ptr, size_t osize UNUSED, size_t nsize)
|
||||
{
|
||||
nhl_user_data *nud = ud;
|
||||
@@ -2759,7 +2759,7 @@ nhl_alloc(void *ud, void *ptr, size_t osize UNUSED, size_t nsize)
|
||||
|
||||
DISABLE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
nhl_panic(lua_State *L)
|
||||
{
|
||||
const char *msg = lua_tostring(L, -1);
|
||||
@@ -2775,7 +2775,7 @@ RESTORE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
/* called when lua issues a warning message; the text of the message
|
||||
is passed to us in pieces across multiple function calls */
|
||||
static void
|
||||
staticfn void
|
||||
nhl_warn(
|
||||
void *userdata UNUSED,
|
||||
const char *msg_fragment,
|
||||
@@ -2796,7 +2796,7 @@ nhl_warn(
|
||||
}
|
||||
|
||||
#ifdef NHL_SANDBOX
|
||||
static void
|
||||
staticfn void
|
||||
nhl_hookfn(lua_State *L, lua_Debug *ar UNUSED)
|
||||
{
|
||||
nhl_user_data *nud;
|
||||
@@ -2811,7 +2811,7 @@ nhl_hookfn(lua_State *L, lua_Debug *ar UNUSED)
|
||||
}
|
||||
#endif
|
||||
|
||||
static lua_State *
|
||||
staticfn lua_State *
|
||||
nhlL_newstate(nhl_sandbox_info *sbi, const char *name)
|
||||
{
|
||||
nhl_user_data *nud = 0;
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "nhmd4.h"
|
||||
|
||||
static const unsigned char *nhmd4_body(struct nhmd4_context *,
|
||||
staticfn const unsigned char *nhmd4_body(struct nhmd4_context *,
|
||||
const unsigned char *, size_t);
|
||||
|
||||
/* Avoid a conflict from a Lua header */
|
||||
@@ -79,7 +79,7 @@ static const unsigned char *nhmd4_body(struct nhmd4_context *,
|
||||
* This processes one or more 64-byte data blocks, but does NOT update
|
||||
* the bit counters. There're no alignment requirements.
|
||||
*/
|
||||
static const unsigned char *
|
||||
staticfn const unsigned char *
|
||||
nhmd4_body(
|
||||
struct nhmd4_context *ctx,
|
||||
const unsigned char *data,
|
||||
|
||||
+22
-22
@@ -5,20 +5,20 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static void setgemprobs(d_level *);
|
||||
static void randomize_gem_colors(void);
|
||||
static void shuffle(int, int, boolean);
|
||||
static void shuffle_all(void);
|
||||
static int QSORTCALLBACK discovered_cmp(const genericptr, const genericptr);
|
||||
static char *sortloot_descr(int, char *);
|
||||
static char *disco_typename(int);
|
||||
static void disco_append_typename(char *, int);
|
||||
static void disco_output_sorted(winid, char **, int, boolean);
|
||||
static char *oclass_to_name(char, char *);
|
||||
staticfn void setgemprobs(d_level *);
|
||||
staticfn void randomize_gem_colors(void);
|
||||
staticfn void shuffle(int, int, boolean);
|
||||
staticfn void shuffle_all(void);
|
||||
staticfn int QSORTCALLBACK discovered_cmp(const genericptr, const genericptr);
|
||||
staticfn char *sortloot_descr(int, char *);
|
||||
staticfn char *disco_typename(int);
|
||||
staticfn void disco_append_typename(char *, int);
|
||||
staticfn void disco_output_sorted(winid, char **, int, boolean);
|
||||
staticfn char *oclass_to_name(char, char *);
|
||||
|
||||
#ifdef TILES_IN_GLYPHMAP
|
||||
extern glyph_map glyphmap[MAX_GLYPH];
|
||||
static void shuffle_tiles(void);
|
||||
staticfn void shuffle_tiles(void);
|
||||
|
||||
/* Shuffle tile assignments to match descriptions, so a red potion isn't
|
||||
* displayed with a blue tile and so on.
|
||||
@@ -29,7 +29,7 @@ static void shuffle_tiles(void);
|
||||
* is restored. So might as well do that the first time instead of writing
|
||||
* another routine.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
shuffle_tiles(void)
|
||||
{
|
||||
int i;
|
||||
@@ -48,7 +48,7 @@ shuffle_tiles(void)
|
||||
}
|
||||
#endif /* TILES_IN_GLYPHMAP */
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
setgemprobs(d_level *dlev)
|
||||
{
|
||||
int j, first, lev, sum = 0;
|
||||
@@ -79,7 +79,7 @@ setgemprobs(d_level *dlev)
|
||||
}
|
||||
|
||||
/* some gems can have different colors */
|
||||
static void
|
||||
staticfn void
|
||||
randomize_gem_colors(void)
|
||||
{
|
||||
#define COPY_OBJ_DESCR(o_dst, o_src) \
|
||||
@@ -107,7 +107,7 @@ randomize_gem_colors(void)
|
||||
}
|
||||
|
||||
/* shuffle descriptions on objects o_low to o_high */
|
||||
static void
|
||||
staticfn void
|
||||
shuffle(int o_low, int o_high, boolean domaterial)
|
||||
{
|
||||
int i, j, num_to_shuffle;
|
||||
@@ -312,7 +312,7 @@ obj_shuffle_range(
|
||||
}
|
||||
|
||||
/* randomize object descriptions */
|
||||
static void
|
||||
staticfn void
|
||||
shuffle_all(void)
|
||||
{
|
||||
/* entire classes; obj_shuffle_range() handles their exceptions */
|
||||
@@ -516,7 +516,7 @@ static const short uniq_objs[] = {
|
||||
};
|
||||
|
||||
/* discoveries qsort comparison function */
|
||||
static int QSORTCALLBACK
|
||||
staticfn int QSORTCALLBACK
|
||||
discovered_cmp(const genericptr v1, const genericptr v2)
|
||||
{
|
||||
const char *s1 = *(const char **) v1;
|
||||
@@ -530,7 +530,7 @@ discovered_cmp(const genericptr v1, const genericptr v2)
|
||||
return res;
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
sortloot_descr(int otyp, char *outbuf)
|
||||
{
|
||||
Loot sl_cookie;
|
||||
@@ -621,7 +621,7 @@ choose_disco_sort(
|
||||
}
|
||||
|
||||
/* augment obj_typename() with explanation of Japanese item names */
|
||||
static char *
|
||||
staticfn char *
|
||||
disco_typename(int otyp)
|
||||
{
|
||||
char *result = obj_typename(otyp);
|
||||
@@ -653,7 +653,7 @@ disco_typename(int otyp)
|
||||
}
|
||||
|
||||
/* append typename(dis) to buf[], possibly truncating in the process */
|
||||
static void
|
||||
staticfn void
|
||||
disco_append_typename(char *buf, int dis)
|
||||
{
|
||||
unsigned len = (unsigned) strlen(buf);
|
||||
@@ -677,7 +677,7 @@ disco_append_typename(char *buf, int dis)
|
||||
}
|
||||
|
||||
/* sort and output sorted_lines to window and free the lines */
|
||||
static void
|
||||
staticfn void
|
||||
disco_output_sorted(winid tmpwin,
|
||||
char **sorted_lines, int sorted_ct,
|
||||
boolean lootsort)
|
||||
@@ -799,7 +799,7 @@ dodiscovered(void) /* free after Robert Viduya */
|
||||
}
|
||||
|
||||
/* lower case let_to_name() output, which differs from def_oc_syms[].name */
|
||||
static char *
|
||||
staticfn char *
|
||||
oclass_to_name(char oclass, char *buf)
|
||||
{
|
||||
char *s;
|
||||
|
||||
+46
-46
@@ -32,30 +32,30 @@ struct _readobjnam_data {
|
||||
char fruitbuf[BUFSZ];
|
||||
};
|
||||
|
||||
static char *strprepend(char *, const char *);
|
||||
static char *nextobuf(void);
|
||||
static void releaseobuf(char *);
|
||||
static void xcalled(char *, int, const char *, const char *);
|
||||
static char *xname_flags(struct obj *, unsigned);
|
||||
static char *minimal_xname(struct obj *);
|
||||
static void add_erosion_words(struct obj *, char *);
|
||||
static char *doname_base(struct obj *obj, unsigned);
|
||||
static boolean singplur_lookup(char *, char *, boolean,
|
||||
staticfn char *strprepend(char *, const char *);
|
||||
staticfn char *nextobuf(void);
|
||||
staticfn void releaseobuf(char *);
|
||||
staticfn void xcalled(char *, int, const char *, const char *);
|
||||
staticfn char *xname_flags(struct obj *, unsigned);
|
||||
staticfn char *minimal_xname(struct obj *);
|
||||
staticfn void add_erosion_words(struct obj *, char *);
|
||||
staticfn char *doname_base(struct obj *obj, unsigned);
|
||||
staticfn boolean singplur_lookup(char *, char *, boolean,
|
||||
const char *const *);
|
||||
static char *singplur_compound(char *);
|
||||
static boolean ch_ksound(const char *basestr);
|
||||
static boolean badman(const char *, boolean);
|
||||
static boolean wishymatch(const char *, const char *, boolean);
|
||||
static short rnd_otyp_by_wpnskill(schar);
|
||||
static short rnd_otyp_by_namedesc(const char *, char, int);
|
||||
static struct obj *wizterrainwish(struct _readobjnam_data *);
|
||||
static void dbterrainmesg(const char *, coordxy, coordxy) NONNULLARG1;
|
||||
static void readobjnam_init(char *, struct _readobjnam_data *);
|
||||
static int readobjnam_preparse(struct _readobjnam_data *);
|
||||
static void readobjnam_parse_charges(struct _readobjnam_data *);
|
||||
static int readobjnam_postparse1(struct _readobjnam_data *);
|
||||
static int readobjnam_postparse2(struct _readobjnam_data *);
|
||||
static int readobjnam_postparse3(struct _readobjnam_data *);
|
||||
staticfn char *singplur_compound(char *);
|
||||
staticfn boolean ch_ksound(const char *basestr);
|
||||
staticfn boolean badman(const char *, boolean);
|
||||
staticfn boolean wishymatch(const char *, const char *, boolean);
|
||||
staticfn short rnd_otyp_by_wpnskill(schar);
|
||||
staticfn short rnd_otyp_by_namedesc(const char *, char, int);
|
||||
staticfn struct obj *wizterrainwish(struct _readobjnam_data *);
|
||||
staticfn void dbterrainmesg(const char *, coordxy, coordxy) NONNULLARG1;
|
||||
staticfn void readobjnam_init(char *, struct _readobjnam_data *);
|
||||
staticfn int readobjnam_preparse(struct _readobjnam_data *);
|
||||
staticfn void readobjnam_parse_charges(struct _readobjnam_data *);
|
||||
staticfn int readobjnam_postparse1(struct _readobjnam_data *);
|
||||
staticfn int readobjnam_postparse2(struct _readobjnam_data *);
|
||||
staticfn int readobjnam_postparse3(struct _readobjnam_data *);
|
||||
|
||||
struct Jitem {
|
||||
int item;
|
||||
@@ -118,7 +118,7 @@ static const struct Jitem Japanese_items[] = {
|
||||
{ 0, "" }
|
||||
};
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
strprepend(char *s, const char *pref)
|
||||
{
|
||||
int i = (int) strlen(pref);
|
||||
@@ -136,7 +136,7 @@ strprepend(char *s, const char *pref)
|
||||
static char NEARDATA obufs[NUMOBUF][BUFSZ];
|
||||
static int obufidx = 0;
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
nextobuf(void)
|
||||
{
|
||||
obufidx = (obufidx + 1) % NUMOBUF;
|
||||
@@ -144,7 +144,7 @@ nextobuf(void)
|
||||
}
|
||||
|
||||
/* put the most recently allocated buffer back if possible */
|
||||
static void
|
||||
staticfn void
|
||||
releaseobuf(char *bufp)
|
||||
{
|
||||
/* caller may not know whether bufp is the most recently allocated
|
||||
@@ -528,7 +528,7 @@ reorder_fruit(boolean forward)
|
||||
}
|
||||
|
||||
/* add "<pfx> called <sfx>" to end of buf, truncating if necessary */
|
||||
static void
|
||||
staticfn void
|
||||
xcalled(
|
||||
char *buf, /* eos(obuf) or eos(&obuf[PREFIX]) */
|
||||
int siz, /* BUFSZ or BUFSZ-PREFIX */
|
||||
@@ -551,7 +551,7 @@ xname(struct obj *obj)
|
||||
return xname_flags(obj, CXN_NORMAL);
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
xname_flags(
|
||||
struct obj *obj,
|
||||
unsigned cxn_flags) /* bitmask of CXN_xxx values */
|
||||
@@ -995,7 +995,7 @@ xname_flags(
|
||||
brown potion -- if oc_name_known not set
|
||||
potion of object detection -- if discovered
|
||||
*/
|
||||
static char *
|
||||
staticfn char *
|
||||
minimal_xname(struct obj *obj)
|
||||
{
|
||||
char *bufp;
|
||||
@@ -1098,7 +1098,7 @@ the_unique_pm(struct permonst *ptr)
|
||||
return uniq;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
add_erosion_words(struct obj *obj, char *prefix)
|
||||
{
|
||||
boolean iscrys = (obj->otyp == CRYSKNIFE);
|
||||
@@ -1177,7 +1177,7 @@ erosion_matters(struct obj *obj)
|
||||
#define DONAME_FOR_MENU 4 /* [not used anywhere yet] */
|
||||
|
||||
/* core of doname() */
|
||||
static char *
|
||||
staticfn char *
|
||||
doname_base(
|
||||
struct obj *obj, /* object to format */
|
||||
unsigned doname_flags) /* special case requests */
|
||||
@@ -2596,7 +2596,7 @@ static const char *const as_is[] = {
|
||||
};
|
||||
|
||||
/* singularize/pluralize decisions common to both makesingular & makeplural */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
singplur_lookup(
|
||||
char *basestr, char *endstring, /* base string, pointer to eos(string) */
|
||||
boolean to_plural, /* true => makeplural, false => makesingular */
|
||||
@@ -2671,7 +2671,7 @@ singplur_lookup(
|
||||
}
|
||||
|
||||
/* searches for common compounds, ex. lump of royal jelly */
|
||||
static char *
|
||||
staticfn char *
|
||||
singplur_compound(char *str)
|
||||
{
|
||||
/* if new entries are added, be sure to keep compound_start[] in sync */
|
||||
@@ -3056,7 +3056,7 @@ makesingular(const char *oldstr)
|
||||
}
|
||||
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
ch_ksound(const char *basestr)
|
||||
{
|
||||
/* these are some *ch words/suffixes that make a k-sound. They pluralize by
|
||||
@@ -3082,7 +3082,7 @@ ch_ksound(const char *basestr)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
badman(
|
||||
const char *basestr,
|
||||
boolean to_plural) /* True: makeplural, False: makesingular */
|
||||
@@ -3131,7 +3131,7 @@ badman(
|
||||
}
|
||||
|
||||
/* compare user string against object name string using fuzzy matching */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
wishymatch(
|
||||
const char *u_str, /* from user, so might be variant spelling */
|
||||
const char *o_str, /* from objects[], so is in canonical form */
|
||||
@@ -3318,7 +3318,7 @@ static const struct alt_spellings {
|
||||
{ (const char *) 0, 0 },
|
||||
};
|
||||
|
||||
static short
|
||||
staticfn short
|
||||
rnd_otyp_by_wpnskill(schar skill)
|
||||
{
|
||||
int i, n = 0;
|
||||
@@ -3341,7 +3341,7 @@ rnd_otyp_by_wpnskill(schar skill)
|
||||
return otyp;
|
||||
}
|
||||
|
||||
static short
|
||||
staticfn short
|
||||
rnd_otyp_by_namedesc(
|
||||
const char *name,
|
||||
char oclass,
|
||||
@@ -3425,7 +3425,7 @@ shiny_obj(char oclass)
|
||||
}
|
||||
|
||||
/* in wizard mode, readobjnam() can accept wishes for traps and terrain */
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
wizterrainwish(struct _readobjnam_data *d)
|
||||
{
|
||||
struct rm *lev;
|
||||
@@ -3796,7 +3796,7 @@ wizterrainwish(struct _readobjnam_data *d)
|
||||
}
|
||||
|
||||
/* message common to several wizterrainwish() results */
|
||||
static void
|
||||
staticfn void
|
||||
dbterrainmesg(
|
||||
const char *newtype,
|
||||
coordxy x, coordxy y)
|
||||
@@ -3809,7 +3809,7 @@ dbterrainmesg(
|
||||
#define TIN_EMPTY 1
|
||||
#define TIN_SPINACH 2
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
readobjnam_init(char *bp, struct _readobjnam_data *d)
|
||||
{
|
||||
d->otmp = (struct obj *) 0;
|
||||
@@ -3842,7 +3842,7 @@ readobjnam_init(char *bp, struct _readobjnam_data *d)
|
||||
|
||||
/* return 1 if d->bp is empty or contains only various qualifiers like
|
||||
"blessed", "rustproof", and so on, or 0 if anything else is present */
|
||||
static int
|
||||
staticfn int
|
||||
readobjnam_preparse(struct _readobjnam_data *d)
|
||||
{
|
||||
char *save_bp = 0;
|
||||
@@ -4054,7 +4054,7 @@ readobjnam_preparse(struct _readobjnam_data *d)
|
||||
return res;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
readobjnam_parse_charges(struct _readobjnam_data *d)
|
||||
{
|
||||
if (strlen(d->bp) > 1 && (d->p = strrchr(d->bp, '(')) != 0) {
|
||||
@@ -4116,7 +4116,7 @@ readobjnam_parse_charges(struct _readobjnam_data *d)
|
||||
d->rechrg = 7; /* recharge_limit */
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
readobjnam_postparse1(struct _readobjnam_data *d)
|
||||
{
|
||||
int i;
|
||||
@@ -4528,7 +4528,7 @@ readobjnam_postparse1(struct _readobjnam_data *d)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
readobjnam_postparse2(struct _readobjnam_data *d)
|
||||
{
|
||||
int i;
|
||||
@@ -4589,7 +4589,7 @@ readobjnam_postparse2(struct _readobjnam_data *d)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
readobjnam_postparse3(struct _readobjnam_data *d)
|
||||
{
|
||||
int i;
|
||||
|
||||
+256
-256
File diff suppressed because it is too large
Load Diff
+62
-62
@@ -11,46 +11,46 @@
|
||||
#include "hack.h"
|
||||
#include "dlb.h"
|
||||
|
||||
static boolean is_swallow_sym(int);
|
||||
static int append_str(char *, const char *) NONNULLPTRS;
|
||||
static void trap_description(char *, int, coordxy, coordxy) NONNULLARG1;
|
||||
static void look_at_object(char *, coordxy, coordxy, int) NONNULLARG1;
|
||||
static void look_at_monster(char *, char *, struct monst *,
|
||||
staticfn boolean is_swallow_sym(int);
|
||||
staticfn int append_str(char *, const char *) NONNULLPTRS;
|
||||
staticfn void trap_description(char *, int, coordxy, coordxy) NONNULLARG1;
|
||||
staticfn void look_at_object(char *, coordxy, coordxy, int) NONNULLARG1;
|
||||
staticfn void look_at_monster(char *, char *, struct monst *,
|
||||
coordxy, coordxy) NONNULLARG13;
|
||||
/* lookat() can return Null */
|
||||
static struct permonst *lookat(coordxy, coordxy, char *, char *) NONNULLPTRS;
|
||||
static boolean checkfile(char *, struct permonst *, unsigned,
|
||||
staticfn struct permonst *lookat(coordxy, coordxy, char *, char *) NONNULLPTRS;
|
||||
staticfn boolean checkfile(char *, struct permonst *, unsigned,
|
||||
char *) NO_NNARGS;
|
||||
static int add_cmap_descr(int, int, int, int, coord,
|
||||
staticfn int add_cmap_descr(int, int, int, int, coord,
|
||||
const char *, const char *,
|
||||
boolean *, const char **, char *) NONNULLPTRS;
|
||||
static void look_region_nearby(coordxy *, coordxy *, coordxy *, coordxy *,
|
||||
staticfn void look_region_nearby(coordxy *, coordxy *, coordxy *, coordxy *,
|
||||
boolean) NONNULLPTRS;
|
||||
static void look_all(boolean, boolean);
|
||||
static void look_traps(boolean);
|
||||
static void look_engrs(boolean);
|
||||
static void do_supplemental_info(char *, struct permonst *,
|
||||
staticfn void look_all(boolean, boolean);
|
||||
staticfn void look_traps(boolean);
|
||||
staticfn void look_engrs(boolean);
|
||||
staticfn void do_supplemental_info(char *, struct permonst *,
|
||||
boolean) NONNULLPTRS;
|
||||
static void whatdoes_help(void);
|
||||
static void docontact(void);
|
||||
static void dispfile_help(void);
|
||||
static void dispfile_shelp(void);
|
||||
static void dispfile_optionfile(void);
|
||||
static void dispfile_optmenu(void);
|
||||
static void dispfile_license(void);
|
||||
static void dispfile_debughelp(void);
|
||||
static void dispfile_usagehelp(void);
|
||||
static void hmenu_doextversion(void);
|
||||
static void hmenu_dohistory(void);
|
||||
static void hmenu_dowhatis(void);
|
||||
static void hmenu_dowhatdoes(void);
|
||||
static void hmenu_doextlist(void);
|
||||
static void domenucontrols(void);
|
||||
staticfn void whatdoes_help(void);
|
||||
staticfn void docontact(void);
|
||||
staticfn void dispfile_help(void);
|
||||
staticfn void dispfile_shelp(void);
|
||||
staticfn void dispfile_optionfile(void);
|
||||
staticfn void dispfile_optmenu(void);
|
||||
staticfn void dispfile_license(void);
|
||||
staticfn void dispfile_debughelp(void);
|
||||
staticfn void dispfile_usagehelp(void);
|
||||
staticfn void hmenu_doextversion(void);
|
||||
staticfn void hmenu_dohistory(void);
|
||||
staticfn void hmenu_dowhatis(void);
|
||||
staticfn void hmenu_dowhatdoes(void);
|
||||
staticfn void hmenu_doextlist(void);
|
||||
staticfn void domenucontrols(void);
|
||||
#ifdef PORT_HELP
|
||||
extern void port_help(void);
|
||||
#endif
|
||||
static char *setopt_cmd(char *) NONNULL NONNULLARG1;
|
||||
static boolean add_quoted_engraving(coordxy, coordxy, char *) NONNULLARG3;
|
||||
staticfn char *setopt_cmd(char *) NONNULL NONNULLARG1;
|
||||
staticfn boolean add_quoted_engraving(coordxy, coordxy, char *) NONNULLARG3;
|
||||
|
||||
enum checkfileflags {
|
||||
chkfilNone = 0,
|
||||
@@ -63,7 +63,7 @@ static const char invisexplain[] = "remembered, unseen, creature",
|
||||
altinvisexplain[] = "unseen creature"; /* for clairvoyance */
|
||||
|
||||
/* Returns "true" for characters that could represent a monster's stomach. */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
is_swallow_sym(int c)
|
||||
{
|
||||
int i;
|
||||
@@ -77,7 +77,7 @@ is_swallow_sym(int c)
|
||||
/* Append " or "+new_str to the end of buf if new_str doesn't already exist
|
||||
as a substring of buf. Return 1 if the string was appended, 0 otherwise.
|
||||
It is expected that buf is of size BUFSZ. */
|
||||
static int
|
||||
staticfn int
|
||||
append_str(char *buf, const char *new_str)
|
||||
{
|
||||
static const char sep[] = " or ";
|
||||
@@ -159,7 +159,7 @@ monhealthdescr(struct monst *mon, boolean addspace, char *outbuf)
|
||||
}
|
||||
|
||||
/* copy a trap's description into outbuf[] */
|
||||
static void
|
||||
staticfn void
|
||||
trap_description(char *outbuf, int tnum, coordxy x, coordxy y)
|
||||
{
|
||||
/*
|
||||
@@ -310,7 +310,7 @@ object_from_map(int glyph, coordxy x, coordxy y, struct obj **obj_p)
|
||||
return fakeobj; /* when True, caller needs to dealloc *obj_p */
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
look_at_object(
|
||||
char *buf, /* output buffer */
|
||||
coordxy x, coordxy y,
|
||||
@@ -346,7 +346,7 @@ look_at_object(
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
look_at_monster(
|
||||
char *buf, char *monbuf, /* buf: output, monbuf: optional output */
|
||||
struct monst *mtmp,
|
||||
@@ -578,7 +578,7 @@ ice_descr(coordxy x, coordxy y, char *outbuf)
|
||||
* Return the name of the glyph found at (x,y).
|
||||
* If not hallucinating and the glyph is a monster, also monster data.
|
||||
*/
|
||||
static struct permonst *
|
||||
staticfn struct permonst *
|
||||
lookat(coordxy x, coordxy y, char *buf, char *monbuf)
|
||||
{
|
||||
struct monst *mtmp = (struct monst *) 0;
|
||||
@@ -751,7 +751,7 @@ ia_checkfile(struct obj *otmp)
|
||||
*
|
||||
* Returns True if an entry is found, False otherwise.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
checkfile(
|
||||
char *inp, /* string to look up */
|
||||
struct permonst *pm, /* monster type to look up (overrides 'inp') */
|
||||
@@ -1054,7 +1054,7 @@ checkfile(
|
||||
}
|
||||
|
||||
/* extracted from do_screen_description() */
|
||||
static int
|
||||
staticfn int
|
||||
add_cmap_descr(
|
||||
int found, /* number of matching descriptions so far */
|
||||
int idx, /* cmap index into defsyms[] */
|
||||
@@ -1529,7 +1529,7 @@ do_screen_description(
|
||||
}
|
||||
|
||||
/* when farlook is reporting on an engraving, include its text */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
add_quoted_engraving(coordxy x, coordxy y, char *buf)
|
||||
{
|
||||
char temp_buf[BUFSZ];
|
||||
@@ -1828,7 +1828,7 @@ do_look(int mode, coord *click_cc)
|
||||
return ECMD_OK;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
look_region_nearby(
|
||||
coordxy *lo_x, coordxy *lo_y,
|
||||
coordxy *hi_x, coordxy *hi_y, boolean nearby)
|
||||
@@ -1841,7 +1841,7 @@ look_region_nearby(
|
||||
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL /* RESTORE is after do_supplemental_info() */
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
look_all(
|
||||
boolean nearby, /* True => within BOLTLIM, False => entire map */
|
||||
boolean do_mons) /* True => monsters, False => objects */
|
||||
@@ -1942,7 +1942,7 @@ look_all(
|
||||
}
|
||||
|
||||
/* give a /M style display of discovered traps, even when they're covered */
|
||||
static void
|
||||
staticfn void
|
||||
look_traps(boolean nearby)
|
||||
{
|
||||
winid win;
|
||||
@@ -2008,7 +2008,7 @@ look_traps(boolean nearby)
|
||||
|
||||
/* display of discovered engravings including headstones, even when they're
|
||||
covered provided they've been read */
|
||||
static void
|
||||
staticfn void
|
||||
look_engrs(boolean nearby)
|
||||
{
|
||||
winid win;
|
||||
@@ -2119,7 +2119,7 @@ static const char *suptext2[] = {
|
||||
(char *) 0,
|
||||
};
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
do_supplemental_info(
|
||||
char *name,
|
||||
struct permonst *pm,
|
||||
@@ -2287,7 +2287,7 @@ doidtrap(void)
|
||||
rest_on_space, #if SHELL, #if SUSPEND) are booleans.
|
||||
*/
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
whatdoes_help(void)
|
||||
{
|
||||
dlb *fp;
|
||||
@@ -2322,9 +2322,9 @@ struct wd_stack_frame {
|
||||
Bitfield(else_seen, 1);
|
||||
};
|
||||
|
||||
static boolean whatdoes_cond(char *, struct wd_stack_frame *, int *, int);
|
||||
staticfn boolean whatdoes_cond(char *, struct wd_stack_frame *, int *, int);
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
whatdoes_cond(char *buf, struct wd_stack_frame *stack, int *depth, int lnum)
|
||||
{
|
||||
const char badstackfmt[] = "cmdhlp: too many &%c directives at line %d.";
|
||||
@@ -2584,7 +2584,7 @@ dowhatdoes(void)
|
||||
return ECMD_OK;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
docontact(void)
|
||||
{
|
||||
winid cwin = create_nhwindow(NHW_TEXT);
|
||||
@@ -2614,79 +2614,79 @@ docontact(void)
|
||||
destroy_nhwindow(cwin);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dispfile_help(void)
|
||||
{
|
||||
display_file(HELP, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dispfile_shelp(void)
|
||||
{
|
||||
display_file(SHELP, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dispfile_optionfile(void)
|
||||
{
|
||||
display_file(OPTIONFILE, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dispfile_optmenu(void)
|
||||
{
|
||||
display_file(OPTMENUHELP, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dispfile_license(void)
|
||||
{
|
||||
display_file(LICENSE, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dispfile_debughelp(void)
|
||||
{
|
||||
display_file(DEBUGHELP, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dispfile_usagehelp(void)
|
||||
{
|
||||
display_file(USAGEHELP, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmenu_doextversion(void)
|
||||
{
|
||||
(void) doextversion();
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmenu_dohistory(void)
|
||||
{
|
||||
(void) dohistory();
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmenu_dowhatis(void)
|
||||
{
|
||||
(void) dowhatis();
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmenu_dowhatdoes(void)
|
||||
{
|
||||
(void) dowhatdoes();
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmenu_doextlist(void)
|
||||
{
|
||||
(void) doextlist();
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
domenucontrols(void)
|
||||
{
|
||||
winid cwin = create_nhwindow(NHW_TEXT);
|
||||
@@ -2774,7 +2774,7 @@ RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
normally 'O' but could be bound to something else, or not bound at all;
|
||||
with the implementation of a simple options subset, now need 'mO' to get
|
||||
the full options command; format it as 'm O' */
|
||||
static char *
|
||||
staticfn char *
|
||||
setopt_cmd(char *outbuf)
|
||||
{
|
||||
char cmdbuf[QBUFSZ];
|
||||
|
||||
+74
-75
@@ -11,47 +11,47 @@
|
||||
|
||||
#define CONTAINED_SYM '>' /* from invent.c */
|
||||
|
||||
static void simple_look(struct obj *, boolean);
|
||||
static boolean query_classes(char *, boolean *, boolean *, const char *,
|
||||
staticfn void simple_look(struct obj *, boolean);
|
||||
staticfn boolean query_classes(char *, boolean *, boolean *, const char *,
|
||||
struct obj *, boolean, int *);
|
||||
static boolean fatal_corpse_mistake(struct obj *, boolean);
|
||||
static boolean describe_decor(void);
|
||||
static void check_here(boolean);
|
||||
static boolean n_or_more(struct obj *);
|
||||
static boolean all_but_uchain(struct obj *);
|
||||
staticfn boolean fatal_corpse_mistake(struct obj *, boolean);
|
||||
staticfn boolean describe_decor(void);
|
||||
staticfn void check_here(boolean);
|
||||
staticfn boolean n_or_more(struct obj *);
|
||||
staticfn boolean all_but_uchain(struct obj *);
|
||||
#if 0 /* not used */
|
||||
static boolean allow_cat_no_uchain(struct obj *);
|
||||
staticfn boolean allow_cat_no_uchain(struct obj *);
|
||||
#endif
|
||||
static int autopick(struct obj *, int, menu_item **);
|
||||
static int count_categories(struct obj *, int);
|
||||
static int delta_cwt(struct obj *, struct obj *);
|
||||
static long carry_count(struct obj *, struct obj *, long, boolean, int *,
|
||||
staticfn int autopick(struct obj *, int, menu_item **);
|
||||
staticfn int count_categories(struct obj *, int);
|
||||
staticfn int delta_cwt(struct obj *, struct obj *);
|
||||
staticfn long carry_count(struct obj *, struct obj *, long, boolean, int *,
|
||||
int *);
|
||||
static int lift_object(struct obj *, struct obj *, long *, boolean);
|
||||
static void pickup_prinv(struct obj *, long, const char *);
|
||||
static boolean mbag_explodes(struct obj *, int);
|
||||
static boolean is_boh_item_gone(void);
|
||||
static void do_boh_explosion(struct obj *, boolean);
|
||||
static long boh_loss(struct obj *, boolean);
|
||||
static int in_container(struct obj *);
|
||||
static int out_container(struct obj *);
|
||||
static long mbag_item_gone(boolean, struct obj *, boolean);
|
||||
static int stash_ok(struct obj *);
|
||||
static void explain_container_prompt(boolean);
|
||||
static int traditional_loot(boolean);
|
||||
static int menu_loot(int, boolean);
|
||||
static int tip_ok(struct obj *);
|
||||
static int choose_tip_container_menu(void);
|
||||
static struct obj *tipcontainer_gettarget(struct obj *, boolean *);
|
||||
static int tipcontainer_checks(struct obj *, struct obj *, boolean);
|
||||
static char in_or_out_menu(const char *, struct obj *, boolean, boolean,
|
||||
staticfn int lift_object(struct obj *, struct obj *, long *, boolean);
|
||||
staticfn void pickup_prinv(struct obj *, long, const char *);
|
||||
staticfn boolean mbag_explodes(struct obj *, int);
|
||||
staticfn boolean is_boh_item_gone(void);
|
||||
staticfn void do_boh_explosion(struct obj *, boolean);
|
||||
staticfn long boh_loss(struct obj *, boolean);
|
||||
staticfn int in_container(struct obj *);
|
||||
staticfn int out_container(struct obj *);
|
||||
staticfn long mbag_item_gone(boolean, struct obj *, boolean);
|
||||
staticfn int stash_ok(struct obj *);
|
||||
staticfn void explain_container_prompt(boolean);
|
||||
staticfn int traditional_loot(boolean);
|
||||
staticfn int menu_loot(int, boolean);
|
||||
staticfn int tip_ok(struct obj *);
|
||||
staticfn int choose_tip_container_menu(void);
|
||||
staticfn struct obj *tipcontainer_gettarget(struct obj *, boolean *);
|
||||
staticfn int tipcontainer_checks(struct obj *, struct obj *, boolean);
|
||||
staticfn char in_or_out_menu(const char *, struct obj *, boolean, boolean,
|
||||
boolean, boolean);
|
||||
static boolean able_to_loot(coordxy, coordxy, boolean);
|
||||
static boolean reverse_loot(void);
|
||||
static boolean mon_beside(coordxy, coordxy);
|
||||
static int do_loot_cont(struct obj **, int, int);
|
||||
static int doloot_core(void);
|
||||
static void tipcontainer(struct obj *);
|
||||
staticfn boolean able_to_loot(coordxy, coordxy, boolean);
|
||||
staticfn boolean reverse_loot(void);
|
||||
staticfn boolean mon_beside(coordxy, coordxy);
|
||||
staticfn int do_loot_cont(struct obj **, int, int);
|
||||
staticfn int doloot_core(void);
|
||||
staticfn void tipcontainer(struct obj *);
|
||||
|
||||
/* define for query_objlist() and autopickup() */
|
||||
#define FOLLOW(curr, flags) \
|
||||
@@ -72,7 +72,7 @@ static const char
|
||||
/* BUG: this lets you look at cockatrice corpses while blind without
|
||||
touching them */
|
||||
/* much simpler version of the look-here code; used by query_classes() */
|
||||
static void
|
||||
staticfn void
|
||||
simple_look(struct obj *otmp, /* list of objects */
|
||||
boolean here) /* flag for type of obj list linkage */
|
||||
{
|
||||
@@ -137,7 +137,7 @@ collect_obj_classes(char ilets[], struct obj *otmp, boolean here,
|
||||
* it was changed to enhance menu entry ordering ('A' stands out, but
|
||||
* some players complain that it is too easy to choose accidentally).
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
query_classes(
|
||||
char oclasses[], /* selected classes */
|
||||
boolean *one_at_a_time, /* to tell caller that user picked 'A' */
|
||||
@@ -262,7 +262,7 @@ query_classes(
|
||||
}
|
||||
|
||||
/* check whether hero is bare-handedly touching a cockatrice corpse */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
fatal_corpse_mistake(struct obj *obj, boolean remotely)
|
||||
{
|
||||
if (uarmg || remotely || obj->otyp != CORPSE
|
||||
@@ -331,7 +331,7 @@ deferred_decor(
|
||||
|
||||
/* handle 'mention_decor' (when walking onto a dungeon feature such as
|
||||
stairs or altar, describe it even if it isn't covered up by an object) */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
describe_decor(void)
|
||||
{
|
||||
char outbuf[BUFSZ], fbuf[QBUFSZ];
|
||||
@@ -408,7 +408,7 @@ describe_decor(void)
|
||||
}
|
||||
|
||||
/* look at the objects at our location, unless there are too many of them */
|
||||
static void
|
||||
staticfn void
|
||||
check_here(boolean picked_some)
|
||||
{
|
||||
struct obj *obj;
|
||||
@@ -438,7 +438,7 @@ check_here(boolean picked_some)
|
||||
}
|
||||
|
||||
/* query_objlist callback: return TRUE if obj's count is >= reference value */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
n_or_more(struct obj *obj)
|
||||
{
|
||||
if (obj == uchain)
|
||||
@@ -487,7 +487,7 @@ add_valid_menu_class(int c)
|
||||
}
|
||||
|
||||
/* query_objlist callback: return TRUE if not uchain */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
all_but_uchain(struct obj *obj)
|
||||
{
|
||||
return (boolean) (obj != uchain);
|
||||
@@ -575,7 +575,7 @@ allow_category(struct obj *obj)
|
||||
|
||||
#if 0 /* not used */
|
||||
/* query_objlist callback: return TRUE if valid category (class), no uchain */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
allow_cat_no_uchain(struct obj *obj)
|
||||
{
|
||||
if (obj != uchain
|
||||
@@ -949,7 +949,7 @@ autopick_testobj(struct obj *otmp, boolean calc_costly)
|
||||
* picked is zero, the pickup list is left alone. The caller of this
|
||||
* function must free the pickup list.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
autopick(
|
||||
struct obj *olist, /* the object list */
|
||||
int follow, /* how to follow the object list */
|
||||
@@ -1484,7 +1484,7 @@ query_category(
|
||||
return n;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
count_categories(struct obj *olist, int qflags)
|
||||
{
|
||||
char *pack;
|
||||
@@ -1517,7 +1517,7 @@ count_categories(struct obj *olist, int qflags)
|
||||
* object is removed from it. Use before and after weight amounts rather
|
||||
* than trying to match the calculation used by weight() in mkobj.c.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
delta_cwt(struct obj *container, struct obj *obj)
|
||||
{
|
||||
struct obj **prev;
|
||||
@@ -1543,7 +1543,7 @@ delta_cwt(struct obj *container, struct obj *obj)
|
||||
}
|
||||
|
||||
/* could we carry `obj'? if not, could we carry some of it/them? */
|
||||
static long
|
||||
staticfn long
|
||||
carry_count(struct obj *obj, /* object to pick up... */
|
||||
struct obj *container, /* ...bag it is coming out of */
|
||||
long count,
|
||||
@@ -1678,8 +1678,7 @@ carry_count(struct obj *obj, /* object to pick up... */
|
||||
}
|
||||
|
||||
/* determine whether character is able and player is willing to carry `obj' */
|
||||
static
|
||||
int
|
||||
staticfn int
|
||||
lift_object(
|
||||
struct obj *obj, /* object to pick up... */
|
||||
struct obj *container, /* ...bag it's coming out of */
|
||||
@@ -1922,7 +1921,7 @@ pick_obj(struct obj *otmp)
|
||||
/* pickup_object()/out_container() helper;
|
||||
print an added-to-invent message for current object, limiting feedback
|
||||
about encumbrance to the first item which causes that to change */
|
||||
static void
|
||||
staticfn void
|
||||
pickup_prinv(
|
||||
struct obj *obj,
|
||||
long count,
|
||||
@@ -2017,7 +2016,7 @@ container_at(coordxy x, coordxy y, boolean countem)
|
||||
return container_count;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
able_to_loot(
|
||||
coordxy x, coordxy y,
|
||||
boolean looting) /* loot vs tip */
|
||||
@@ -2048,7 +2047,7 @@ able_to_loot(
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
mon_beside(coordxy x, coordxy y)
|
||||
{
|
||||
int i, j;
|
||||
@@ -2064,7 +2063,7 @@ mon_beside(coordxy x, coordxy y)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
do_loot_cont(
|
||||
struct obj **cobjp,
|
||||
int cindex, /* index of this container (1..N)... */
|
||||
@@ -2153,7 +2152,7 @@ doloot(void)
|
||||
}
|
||||
|
||||
/* loot a container on the floor or loot saddle from mon. */
|
||||
static int
|
||||
staticfn int
|
||||
doloot_core(void)
|
||||
{
|
||||
struct obj *cobj, *nobj;
|
||||
@@ -2325,7 +2324,7 @@ doloot_core(void)
|
||||
}
|
||||
|
||||
/* called when attempting to #loot while confused */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
reverse_loot(void)
|
||||
{
|
||||
struct obj *goldob = 0, *coffers, *otmp, boxdummy;
|
||||
@@ -2462,7 +2461,7 @@ loot_mon(struct monst *mtmp, int *passed_info, boolean *prev_loot)
|
||||
* Decide whether an object being placed into a magic bag will cause
|
||||
* it to explode. If the object is a bag itself, check recursively.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
mbag_explodes(struct obj *obj, int depthin)
|
||||
{
|
||||
/* these won't cause an explosion when they're empty */
|
||||
@@ -2484,7 +2483,7 @@ mbag_explodes(struct obj *obj, int depthin)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
is_boh_item_gone(void)
|
||||
{
|
||||
return (boolean) (!rn2(13));
|
||||
@@ -2492,7 +2491,7 @@ is_boh_item_gone(void)
|
||||
|
||||
/* Scatter most of Bag of holding contents around. Some items will be
|
||||
destroyed with the same chance as looting a cursed bag. */
|
||||
static void
|
||||
staticfn void
|
||||
do_boh_explosion(struct obj *boh, boolean on_floor)
|
||||
{
|
||||
struct obj *otmp, *nobj;
|
||||
@@ -2511,7 +2510,7 @@ do_boh_explosion(struct obj *boh, boolean on_floor)
|
||||
/* boh is about to be deleted so no need to reset its in_use flag here */
|
||||
}
|
||||
|
||||
static long
|
||||
staticfn long
|
||||
boh_loss(struct obj *container, boolean held)
|
||||
{
|
||||
/* sometimes toss objects if a cursed magic bag */
|
||||
@@ -2532,7 +2531,7 @@ boh_loss(struct obj *container, boolean held)
|
||||
}
|
||||
|
||||
/* Returns: -1 to stop, 1 item was inserted, 0 item was not inserted. */
|
||||
static int
|
||||
staticfn int
|
||||
in_container(struct obj *obj)
|
||||
{
|
||||
boolean floor_container = !carried(gc.current_container);
|
||||
@@ -2699,7 +2698,7 @@ ck_bag(struct obj *obj)
|
||||
}
|
||||
|
||||
/* Returns: -1 to stop, 1 item was removed, 0 item was not removed. */
|
||||
static int
|
||||
staticfn int
|
||||
out_container(struct obj *obj)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -2775,7 +2774,7 @@ removed_from_icebox(struct obj *obj)
|
||||
}
|
||||
|
||||
/* an object inside a cursed bag of holding is being destroyed */
|
||||
static long
|
||||
staticfn long
|
||||
mbag_item_gone(boolean held, struct obj *item, boolean silent)
|
||||
{
|
||||
struct monst *shkp;
|
||||
@@ -2869,7 +2868,7 @@ container_gone(int (*fn)(OBJ_P))
|
||||
&& !gc.current_container);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
explain_container_prompt(boolean more_containers)
|
||||
{
|
||||
static const char *const explaintext[] = {
|
||||
@@ -2915,7 +2914,7 @@ u_handsy(void)
|
||||
}
|
||||
|
||||
/* getobj callback for object to be stashed into a container */
|
||||
static int
|
||||
staticfn int
|
||||
stash_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
@@ -3186,7 +3185,7 @@ use_container(
|
||||
}
|
||||
|
||||
/* loot current_container (take things out or put things in), by prompting */
|
||||
static int
|
||||
staticfn int
|
||||
traditional_loot(boolean put_in)
|
||||
{
|
||||
int (*actionfunc)(OBJ_P), (*checkfunc)(OBJ_P);
|
||||
@@ -3221,7 +3220,7 @@ traditional_loot(boolean put_in)
|
||||
}
|
||||
|
||||
/* loot current_container (take things out or put things in), using a menu */
|
||||
static int
|
||||
staticfn int
|
||||
menu_loot(int retry, boolean put_in)
|
||||
{
|
||||
int n, i, n_looted = 0;
|
||||
@@ -3352,7 +3351,7 @@ menu_loot(int retry, boolean put_in)
|
||||
return n_looted ? ECMD_TIME : ECMD_OK;
|
||||
}
|
||||
|
||||
static char
|
||||
staticfn char
|
||||
in_or_out_menu(
|
||||
const char *prompt,
|
||||
struct obj *obj,
|
||||
@@ -3435,7 +3434,7 @@ in_or_out_menu(
|
||||
}
|
||||
|
||||
/* getobj callback for object to tip */
|
||||
static int
|
||||
staticfn int
|
||||
tip_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj || obj->oclass == COIN_CLASS)
|
||||
@@ -3459,7 +3458,7 @@ tip_ok(struct obj *obj)
|
||||
returns ECMD_CANCEL if menu was canceled,
|
||||
ECMD_TIME if a container was picked,
|
||||
otherwise returns ECMD_OK. */
|
||||
static int
|
||||
staticfn int
|
||||
choose_tip_container_menu(void)
|
||||
{
|
||||
int n, i;
|
||||
@@ -3641,7 +3640,7 @@ enum tipping_check_values {
|
||||
TIPCHECK_EMPTY
|
||||
};
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
tipcontainer(struct obj *box) /* or bag */
|
||||
{
|
||||
coordxy ox = u.ux, oy = u.uy; /* #tip only works at hero's location */
|
||||
@@ -3797,11 +3796,11 @@ tipcontainer(struct obj *box) /* or bag */
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int count_target_containers(struct obj *, struct obj *);
|
||||
staticfn int count_target_containers(struct obj *, struct obj *);
|
||||
|
||||
/* returns number of containers in object chain; does not recurse into
|
||||
containers; skips bags of tricks when they're known */
|
||||
static int
|
||||
staticfn int
|
||||
count_target_containers(
|
||||
struct obj *olist, /* list of objects (invent) */
|
||||
struct obj *excludo) /* particular object to exclude if found in list */
|
||||
@@ -3823,7 +3822,7 @@ count_target_containers(
|
||||
/* ask user for a carried container into which they want box to be emptied;
|
||||
cancelled is TRUE if user cancelled the menu pick; hands aren't required
|
||||
when tipping to the floor but are when tipping into another container */
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
tipcontainer_gettarget(
|
||||
struct obj *box,
|
||||
boolean *cancelled)
|
||||
@@ -3906,7 +3905,7 @@ tipcontainer_gettarget(
|
||||
/* Perform check on box if we can tip it.
|
||||
Returns one of TIPCHECK_foo values.
|
||||
If allowempty if TRUE, return TIPCHECK_OK instead of TIPCHECK_EMPTY. */
|
||||
static int
|
||||
staticfn int
|
||||
tipcontainer_checks(
|
||||
struct obj *box, /* container player wants to tip */
|
||||
struct obj *targetbox, /* destination (used here for horn of plenty) */
|
||||
|
||||
+12
-12
@@ -9,10 +9,10 @@
|
||||
* config file parsing) with modest decoration;
|
||||
* result will then be truncated to BUFSZ-1 */
|
||||
|
||||
static void putmesg(const char *);
|
||||
static char *You_buf(int);
|
||||
staticfn void putmesg(const char *);
|
||||
staticfn char *You_buf(int);
|
||||
#if defined(MSGHANDLER)
|
||||
static void execplinehandler(const char *);
|
||||
staticfn void execplinehandler(const char *);
|
||||
#endif
|
||||
#ifdef USER_SOUNDS
|
||||
extern void maybe_play_sound(const char *);
|
||||
@@ -63,7 +63,7 @@ dumplogfreemessages(void)
|
||||
#endif
|
||||
|
||||
/* keeps windowprocs usage out of pline() */
|
||||
static void
|
||||
staticfn void
|
||||
putmesg(const char *line)
|
||||
{
|
||||
int attr = ATR_NONE;
|
||||
@@ -78,7 +78,7 @@ putmesg(const char *line)
|
||||
SoundSpeak(line);
|
||||
}
|
||||
|
||||
static void vpline(const char *, va_list);
|
||||
staticfn void vpline(const char *, va_list);
|
||||
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
@@ -133,7 +133,7 @@ set_msg_xy(coordxy x, coordxy y)
|
||||
a11y.msg_loc.y = y;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
vpline(const char *line, va_list the_args)
|
||||
{
|
||||
static int in_pline = 0;
|
||||
@@ -312,7 +312,7 @@ Norep(const char *line, ...)
|
||||
va_end(the_args);
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
You_buf(int siz)
|
||||
{
|
||||
if (siz > gy.you_buf_siz) {
|
||||
@@ -520,7 +520,7 @@ livelog_printf(
|
||||
|
||||
#endif /* !CHRONICLE */
|
||||
|
||||
static void vraw_printf(const char *, va_list);
|
||||
staticfn void vraw_printf(const char *, va_list);
|
||||
|
||||
void
|
||||
raw_printf(const char *line, ...)
|
||||
@@ -536,7 +536,7 @@ raw_printf(const char *line, ...)
|
||||
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
vraw_printf(const char *line, va_list the_args)
|
||||
{
|
||||
char pbuf[BIGBUFSZ]; /* will be chopped down to BUFSZ-1 if longer */
|
||||
@@ -609,7 +609,7 @@ RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
#if defined(MSGHANDLER)
|
||||
static boolean use_pline_handler = TRUE;
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
execplinehandler(const char *line)
|
||||
{
|
||||
#if defined(POSIX_TYPES) || defined(__GNUC__)
|
||||
@@ -664,7 +664,7 @@ execplinehandler(const char *line)
|
||||
/*
|
||||
* varargs handling for files.c
|
||||
*/
|
||||
static void vconfig_error_add(const char *, va_list);
|
||||
staticfn void vconfig_error_add(const char *, va_list);
|
||||
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
@@ -678,7 +678,7 @@ config_error_add(const char *str, ...)
|
||||
va_end(the_args);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
vconfig_error_add(const char *str, va_list the_args)
|
||||
{ /* start of vconf...() or of nested block in USE_OLDARG's conf...() */
|
||||
int vlen = 0;
|
||||
|
||||
+16
-16
@@ -21,14 +21,14 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static void check_strangling(boolean);
|
||||
static void polyman(const char *, const char *);
|
||||
static void dropp(struct obj *);
|
||||
static void break_armor(void);
|
||||
static void drop_weapon(int);
|
||||
static int armor_to_dragon(int);
|
||||
static void newman(void);
|
||||
static void polysense(void);
|
||||
staticfn void check_strangling(boolean);
|
||||
staticfn void polyman(const char *, const char *);
|
||||
staticfn void dropp(struct obj *);
|
||||
staticfn void break_armor(void);
|
||||
staticfn void drop_weapon(int);
|
||||
staticfn int armor_to_dragon(int);
|
||||
staticfn void newman(void);
|
||||
staticfn void polysense(void);
|
||||
|
||||
static const char no_longer_petrify_resistant[] =
|
||||
"No longer petrify-resistant, you";
|
||||
@@ -157,7 +157,7 @@ steed_vs_stealth(void)
|
||||
}
|
||||
|
||||
/* for changing into form that's immune to strangulation */
|
||||
static void
|
||||
staticfn void
|
||||
check_strangling(boolean on)
|
||||
{
|
||||
/* on -- maybe resume strangling */
|
||||
@@ -189,7 +189,7 @@ check_strangling(boolean on)
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
/* make a (new) human out of the player */
|
||||
static void
|
||||
staticfn void
|
||||
polyman(const char *fmt, const char *arg)
|
||||
{
|
||||
boolean sticking = (sticks(gy.youmonst.data) && u.ustuck && !u.uswallow),
|
||||
@@ -321,7 +321,7 @@ livelog_newform(boolean viapoly, int oldgend, int newgend)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
newman(void)
|
||||
{
|
||||
const char *newform;
|
||||
@@ -1108,7 +1108,7 @@ uasmon_maxStr(void)
|
||||
}
|
||||
|
||||
/* dropx() jacket for break_armor() */
|
||||
static void
|
||||
staticfn void
|
||||
dropp(struct obj *obj)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -1133,7 +1133,7 @@ dropp(struct obj *obj)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
break_armor(void)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -1276,7 +1276,7 @@ break_armor(void)
|
||||
/* rings stay worn even when no hands */
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
drop_weapon(int alone)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -2160,7 +2160,7 @@ ugolemeffects(int damtype, int dam)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
armor_to_dragon(int atyp)
|
||||
{
|
||||
switch (atyp) {
|
||||
@@ -2205,7 +2205,7 @@ armor_to_dragon(int atyp)
|
||||
}
|
||||
|
||||
/* some species have awareness of other species */
|
||||
static void
|
||||
staticfn void
|
||||
polysense(void)
|
||||
{
|
||||
short warnidx = NON_PM;
|
||||
|
||||
+70
-70
@@ -5,43 +5,43 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static long itimeout(long);
|
||||
static long itimeout_incr(long, int);
|
||||
static void ghost_from_bottle(void);
|
||||
static int drink_ok(struct obj *);
|
||||
static void peffect_restore_ability(struct obj *);
|
||||
static void peffect_hallucination(struct obj *);
|
||||
static void peffect_water(struct obj *);
|
||||
static void peffect_booze(struct obj *);
|
||||
static void peffect_enlightenment(struct obj *);
|
||||
static void peffect_invisibility(struct obj *);
|
||||
static void peffect_see_invisible(struct obj *);
|
||||
static void peffect_paralysis(struct obj *);
|
||||
static void peffect_sleeping(struct obj *);
|
||||
static int peffect_monster_detection(struct obj *);
|
||||
static int peffect_object_detection(struct obj *);
|
||||
static void peffect_sickness(struct obj *);
|
||||
static void peffect_confusion(struct obj *);
|
||||
static void peffect_gain_ability(struct obj *);
|
||||
static void peffect_speed(struct obj *);
|
||||
static void peffect_blindness(struct obj *);
|
||||
static void peffect_gain_level(struct obj *);
|
||||
static void peffect_healing(struct obj *);
|
||||
static void peffect_extra_healing(struct obj *);
|
||||
static void peffect_full_healing(struct obj *);
|
||||
static void peffect_levitation(struct obj *);
|
||||
static void peffect_gain_energy(struct obj *);
|
||||
static void peffect_oil(struct obj *);
|
||||
static void peffect_acid(struct obj *);
|
||||
static void peffect_polymorph(struct obj *);
|
||||
static boolean H2Opotion_dip(struct obj *, struct obj *, boolean,
|
||||
staticfn long itimeout(long);
|
||||
staticfn long itimeout_incr(long, int);
|
||||
staticfn void ghost_from_bottle(void);
|
||||
staticfn int drink_ok(struct obj *);
|
||||
staticfn void peffect_restore_ability(struct obj *);
|
||||
staticfn void peffect_hallucination(struct obj *);
|
||||
staticfn void peffect_water(struct obj *);
|
||||
staticfn void peffect_booze(struct obj *);
|
||||
staticfn void peffect_enlightenment(struct obj *);
|
||||
staticfn void peffect_invisibility(struct obj *);
|
||||
staticfn void peffect_see_invisible(struct obj *);
|
||||
staticfn void peffect_paralysis(struct obj *);
|
||||
staticfn void peffect_sleeping(struct obj *);
|
||||
staticfn int peffect_monster_detection(struct obj *);
|
||||
staticfn int peffect_object_detection(struct obj *);
|
||||
staticfn void peffect_sickness(struct obj *);
|
||||
staticfn void peffect_confusion(struct obj *);
|
||||
staticfn void peffect_gain_ability(struct obj *);
|
||||
staticfn void peffect_speed(struct obj *);
|
||||
staticfn void peffect_blindness(struct obj *);
|
||||
staticfn void peffect_gain_level(struct obj *);
|
||||
staticfn void peffect_healing(struct obj *);
|
||||
staticfn void peffect_extra_healing(struct obj *);
|
||||
staticfn void peffect_full_healing(struct obj *);
|
||||
staticfn void peffect_levitation(struct obj *);
|
||||
staticfn void peffect_gain_energy(struct obj *);
|
||||
staticfn void peffect_oil(struct obj *);
|
||||
staticfn void peffect_acid(struct obj *);
|
||||
staticfn void peffect_polymorph(struct obj *);
|
||||
staticfn boolean H2Opotion_dip(struct obj *, struct obj *, boolean,
|
||||
const char *);
|
||||
static short mixtype(struct obj *, struct obj *);
|
||||
static int dip_ok(struct obj *);
|
||||
static int dip_hands_ok(struct obj *);
|
||||
static void hold_potion(struct obj *, const char *, const char *,
|
||||
staticfn short mixtype(struct obj *, struct obj *);
|
||||
staticfn int dip_ok(struct obj *);
|
||||
staticfn int dip_hands_ok(struct obj *);
|
||||
staticfn void hold_potion(struct obj *, const char *, const char *,
|
||||
const char *);
|
||||
static int potion_dip(struct obj *obj, struct obj *potion);
|
||||
staticfn int potion_dip(struct obj *obj, struct obj *potion);
|
||||
|
||||
/* used to indicate whether quaff or dip has skipped an opportunity to
|
||||
use a fountain or such, in order to vary the feedback if hero lacks
|
||||
@@ -50,7 +50,7 @@ static int potion_dip(struct obj *obj, struct obj *potion);
|
||||
static int drink_ok_extra = 0;
|
||||
|
||||
/* force `val' to be within valid range for intrinsic timeout value */
|
||||
static long
|
||||
staticfn long
|
||||
itimeout(long val)
|
||||
{
|
||||
if (val >= TIMEOUT)
|
||||
@@ -62,7 +62,7 @@ itimeout(long val)
|
||||
}
|
||||
|
||||
/* increment `old' by `incr' and force result to be valid intrinsic timeout */
|
||||
static long
|
||||
staticfn long
|
||||
itimeout_incr(long old, int incr)
|
||||
{
|
||||
return itimeout((old & TIMEOUT) + (long) incr);
|
||||
@@ -475,7 +475,7 @@ self_invis_message(void)
|
||||
: "can't see yourself");
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
ghost_from_bottle(void)
|
||||
{
|
||||
struct monst *mtmp = makemon(&mons[PM_GHOST], u.ux, u.uy, MM_NOMSG);
|
||||
@@ -499,7 +499,7 @@ ghost_from_bottle(void)
|
||||
|
||||
/* getobj callback for object to drink from, which also does double duty as
|
||||
the callback for dipping into (both just allow potions). */
|
||||
static int
|
||||
staticfn int
|
||||
drink_ok(struct obj *obj)
|
||||
{
|
||||
/* getobj()'s callback to test whether hands/self is a valid "item" to
|
||||
@@ -630,7 +630,7 @@ dopotion(struct obj *otmp)
|
||||
|
||||
/* potion or spell of restore ability; for spell, otmp is a temporary
|
||||
spellbook object that will be blessed if hero is skilled in healing */
|
||||
static void
|
||||
staticfn void
|
||||
peffect_restore_ability(struct obj *otmp)
|
||||
{
|
||||
gp.potion_unkn++;
|
||||
@@ -677,7 +677,7 @@ peffect_restore_ability(struct obj *otmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_hallucination(struct obj *otmp)
|
||||
{
|
||||
if (Halluc_resistance) {
|
||||
@@ -698,7 +698,7 @@ peffect_hallucination(struct obj *otmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_water(struct obj *otmp)
|
||||
{
|
||||
if (!otmp->blessed && !otmp->cursed) {
|
||||
@@ -752,7 +752,7 @@ peffect_water(struct obj *otmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_booze(struct obj *otmp)
|
||||
{
|
||||
gp.potion_unkn++;
|
||||
@@ -776,7 +776,7 @@ peffect_booze(struct obj *otmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_enlightenment(struct obj *otmp)
|
||||
{
|
||||
if (otmp->cursed) {
|
||||
@@ -792,7 +792,7 @@ peffect_enlightenment(struct obj *otmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_invisibility(struct obj *otmp)
|
||||
{
|
||||
boolean is_spell = (otmp->oclass == SPBOOK_CLASS);
|
||||
@@ -818,7 +818,7 @@ peffect_invisibility(struct obj *otmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_see_invisible(struct obj *otmp)
|
||||
{
|
||||
int msg = Invisible && !Blind;
|
||||
@@ -857,7 +857,7 @@ peffect_see_invisible(struct obj *otmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_paralysis(struct obj *otmp)
|
||||
{
|
||||
if (Free_action) {
|
||||
@@ -877,7 +877,7 @@ peffect_paralysis(struct obj *otmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_sleeping(struct obj *otmp)
|
||||
{
|
||||
if (Sleep_resistance || Free_action) {
|
||||
@@ -890,7 +890,7 @@ peffect_sleeping(struct obj *otmp)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
peffect_monster_detection(struct obj *otmp)
|
||||
{
|
||||
if (otmp->blessed) {
|
||||
@@ -931,7 +931,7 @@ peffect_monster_detection(struct obj *otmp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
peffect_object_detection(struct obj *otmp)
|
||||
{
|
||||
if (object_detect(otmp, 0))
|
||||
@@ -940,7 +940,7 @@ peffect_object_detection(struct obj *otmp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_sickness(struct obj *otmp)
|
||||
{
|
||||
pline("Yecch! This stuff tastes like poison.");
|
||||
@@ -990,7 +990,7 @@ peffect_sickness(struct obj *otmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_confusion(struct obj *otmp)
|
||||
{
|
||||
if (!Confusion) {
|
||||
@@ -1006,7 +1006,7 @@ peffect_confusion(struct obj *otmp)
|
||||
FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_gain_ability(struct obj *otmp)
|
||||
{
|
||||
if (otmp->cursed) {
|
||||
@@ -1028,7 +1028,7 @@ peffect_gain_ability(struct obj *otmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_speed(struct obj *otmp)
|
||||
{
|
||||
boolean is_speed = (otmp->otyp == POT_SPEED);
|
||||
@@ -1049,7 +1049,7 @@ peffect_speed(struct obj *otmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_blindness(struct obj *otmp)
|
||||
{
|
||||
if (Blind || ((HBlinded || EBlinded) && BBlinded))
|
||||
@@ -1059,7 +1059,7 @@ peffect_blindness(struct obj *otmp)
|
||||
(boolean) !Blind);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_gain_level(struct obj *otmp)
|
||||
{
|
||||
if (otmp->cursed) {
|
||||
@@ -1095,7 +1095,7 @@ peffect_gain_level(struct obj *otmp)
|
||||
u.uexp = rndexp(TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_healing(struct obj *otmp)
|
||||
{
|
||||
You_feel("better.");
|
||||
@@ -1104,7 +1104,7 @@ peffect_healing(struct obj *otmp)
|
||||
exercise(A_CON, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_extra_healing(struct obj *otmp)
|
||||
{
|
||||
You_feel("much better.");
|
||||
@@ -1120,7 +1120,7 @@ peffect_extra_healing(struct obj *otmp)
|
||||
heal_legs(0);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_full_healing(struct obj *otmp)
|
||||
{
|
||||
You_feel("completely healed.");
|
||||
@@ -1141,7 +1141,7 @@ peffect_full_healing(struct obj *otmp)
|
||||
heal_legs(0);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_levitation(struct obj *otmp)
|
||||
{
|
||||
/*
|
||||
@@ -1200,7 +1200,7 @@ peffect_levitation(struct obj *otmp)
|
||||
float_vs_flight();
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_gain_energy(struct obj *otmp)
|
||||
{
|
||||
int num;
|
||||
@@ -1236,7 +1236,7 @@ peffect_gain_energy(struct obj *otmp)
|
||||
exercise(A_WIS, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_oil(struct obj *otmp)
|
||||
{
|
||||
boolean good_for_you = FALSE, vulnerable;
|
||||
@@ -1273,7 +1273,7 @@ peffect_oil(struct obj *otmp)
|
||||
exercise(A_WIS, good_for_you);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_acid(struct obj *otmp)
|
||||
{
|
||||
if (Acid_resistance) {
|
||||
@@ -1294,7 +1294,7 @@ peffect_acid(struct obj *otmp)
|
||||
gp.potion_unkn++; /* holy/unholy water can burn like acid too */
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
peffect_polymorph(struct obj *otmp)
|
||||
{
|
||||
You_feel("a little %s.", Hallucination ? "normal" : "strange");
|
||||
@@ -1474,7 +1474,7 @@ bottlename(void)
|
||||
}
|
||||
|
||||
/* handle item dipped into water potion or steed saddle splashed by same */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
H2Opotion_dip(
|
||||
struct obj *potion, /* water */
|
||||
struct obj *targobj, /* item being dipped into the water */
|
||||
@@ -2085,7 +2085,7 @@ potionbreathe(struct obj *obj)
|
||||
}
|
||||
|
||||
/* returns the potion type when o1 is dipped in o2 */
|
||||
static short
|
||||
staticfn short
|
||||
mixtype(struct obj *o1, struct obj *o2)
|
||||
{
|
||||
int o1typ = o1->otyp, o2typ = o2->otyp;
|
||||
@@ -2175,7 +2175,7 @@ mixtype(struct obj *o1, struct obj *o2)
|
||||
|
||||
/* getobj callback for object to be dipped (not the thing being dipped into,
|
||||
* that uses drink_ok) */
|
||||
static int
|
||||
staticfn int
|
||||
dip_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
@@ -2192,7 +2192,7 @@ dip_ok(struct obj *obj)
|
||||
}
|
||||
|
||||
/* getobj callback for object to be dipped when hero has slippery hands */
|
||||
static int
|
||||
staticfn int
|
||||
dip_hands_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj && (Glib && can_reach_floor(FALSE)))
|
||||
@@ -2204,7 +2204,7 @@ dip_hands_ok(struct obj *obj)
|
||||
/* call hold_another_object() to deal with a transformed potion; its weight
|
||||
won't have changed but it might require an extra slot that isn't available
|
||||
or it might merge into some other carried stack */
|
||||
static void
|
||||
staticfn void
|
||||
hold_potion(
|
||||
struct obj *potobj,
|
||||
const char *drop_fmt, const char *drop_arg,
|
||||
@@ -2370,7 +2370,7 @@ dip_into(void)
|
||||
}
|
||||
|
||||
/* called by dodip() or dip_into() after obj and potion have been chosen */
|
||||
static int
|
||||
staticfn int
|
||||
potion_dip(struct obj *obj, struct obj *potion)
|
||||
{
|
||||
struct obj *singlepotion;
|
||||
|
||||
+52
-52
@@ -4,32 +4,32 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static int prayer_done(void);
|
||||
static void maybe_turn_mon_iter(struct monst *);
|
||||
static struct obj *worst_cursed_item(void);
|
||||
static int in_trouble(void);
|
||||
static void fix_curse_trouble(struct obj *, const char *);
|
||||
static void fix_worst_trouble(int);
|
||||
static void angrygods(aligntyp);
|
||||
static void at_your_feet(const char *);
|
||||
static void gcrownu(void);
|
||||
static void give_spell(void);
|
||||
static void pleased(aligntyp);
|
||||
static void godvoice(aligntyp, const char *);
|
||||
static void god_zaps_you(aligntyp);
|
||||
static void fry_by_god(aligntyp, boolean);
|
||||
static void gods_angry(aligntyp);
|
||||
static void gods_upset(aligntyp);
|
||||
static void consume_offering(struct obj *);
|
||||
static void offer_too_soon(aligntyp);
|
||||
static void offer_real_amulet(struct obj *, aligntyp); /* NORETURN */
|
||||
static void offer_fake_amulet(struct obj *, boolean, aligntyp);
|
||||
static void offer_different_alignment_altar(struct obj *, aligntyp);
|
||||
static void sacrifice_your_race(struct obj *, boolean, aligntyp);
|
||||
static int bestow_artifact(void);
|
||||
static boolean pray_revive(void);
|
||||
static boolean water_prayer(boolean);
|
||||
static boolean blocked_boulder(int, int);
|
||||
staticfn int prayer_done(void);
|
||||
staticfn void maybe_turn_mon_iter(struct monst *);
|
||||
staticfn struct obj *worst_cursed_item(void);
|
||||
staticfn int in_trouble(void);
|
||||
staticfn void fix_curse_trouble(struct obj *, const char *);
|
||||
staticfn void fix_worst_trouble(int);
|
||||
staticfn void angrygods(aligntyp);
|
||||
staticfn void at_your_feet(const char *);
|
||||
staticfn void gcrownu(void);
|
||||
staticfn void give_spell(void);
|
||||
staticfn void pleased(aligntyp);
|
||||
staticfn void godvoice(aligntyp, const char *);
|
||||
staticfn void god_zaps_you(aligntyp);
|
||||
staticfn void fry_by_god(aligntyp, boolean);
|
||||
staticfn void gods_angry(aligntyp);
|
||||
staticfn void gods_upset(aligntyp);
|
||||
staticfn void consume_offering(struct obj *);
|
||||
staticfn void offer_too_soon(aligntyp);
|
||||
staticfn void offer_real_amulet(struct obj *, aligntyp); /* NORETURN */
|
||||
staticfn void offer_fake_amulet(struct obj *, boolean, aligntyp);
|
||||
staticfn void offer_different_alignment_altar(struct obj *, aligntyp);
|
||||
staticfn void sacrifice_your_race(struct obj *, boolean, aligntyp);
|
||||
staticfn int bestow_artifact(void);
|
||||
staticfn boolean pray_revive(void);
|
||||
staticfn boolean water_prayer(boolean);
|
||||
staticfn boolean blocked_boulder(int, int);
|
||||
|
||||
/* simplify a few tests */
|
||||
#define Cursed_obj(obj, typ) ((obj) && (obj)->otyp == (typ) && (obj)->cursed)
|
||||
@@ -190,7 +190,7 @@ stuck_in_wall(void)
|
||||
* 3.4.2: make an exception if polymorphed into a form which lacks
|
||||
* hands; that's a case where the ramifications override this doubt.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
in_trouble(void)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -280,7 +280,7 @@ in_trouble(void)
|
||||
}
|
||||
|
||||
/* select an item for TROUBLE_CURSED_ITEMS */
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
worst_cursed_item(void)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -341,7 +341,7 @@ worst_cursed_item(void)
|
||||
return otmp;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
fix_curse_trouble(struct obj *otmp, const char *what)
|
||||
{
|
||||
if (!otmp) {
|
||||
@@ -365,7 +365,7 @@ fix_curse_trouble(struct obj *otmp, const char *what)
|
||||
update_inventory();
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
fix_worst_trouble(int trouble)
|
||||
{
|
||||
int i;
|
||||
@@ -601,7 +601,7 @@ fix_worst_trouble(int trouble)
|
||||
* bathroom walls, but who is foiled by bathrobes." --Bertrand Russell, 1943
|
||||
* Divine wrath, dungeon walls, and armor follow the same principle.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
god_zaps_you(aligntyp resp_god)
|
||||
{
|
||||
if (u.uswallow) {
|
||||
@@ -685,7 +685,7 @@ god_zaps_you(aligntyp resp_god)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
fry_by_god(aligntyp resp_god, boolean via_disintegration)
|
||||
{
|
||||
You("%s!", !via_disintegration ? "fry to a crisp"
|
||||
@@ -695,7 +695,7 @@ fry_by_god(aligntyp resp_god, boolean via_disintegration)
|
||||
done(DIED);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
angrygods(aligntyp resp_god)
|
||||
{
|
||||
int maxanger, new_ublesscnt;
|
||||
@@ -776,7 +776,7 @@ angrygods(aligntyp resp_god)
|
||||
}
|
||||
|
||||
/* helper to print "str appears at your feet", or appropriate */
|
||||
static void
|
||||
staticfn void
|
||||
at_your_feet(const char *str)
|
||||
{
|
||||
if (Blind)
|
||||
@@ -793,7 +793,7 @@ at_your_feet(const char *str)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
gcrownu(void)
|
||||
{
|
||||
struct obj *obj;
|
||||
@@ -986,7 +986,7 @@ gcrownu(void)
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
give_spell(void)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -1057,7 +1057,7 @@ give_spell(void)
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
pleased(aligntyp g_align)
|
||||
{
|
||||
/* don't use p_trouble, worst trouble may get fixed while praying */
|
||||
@@ -1365,7 +1365,7 @@ pleased(aligntyp g_align)
|
||||
/* either blesses or curses water on the altar,
|
||||
* returns true if it found any water here.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
water_prayer(boolean bless_water)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -1393,7 +1393,7 @@ water_prayer(boolean bless_water)
|
||||
return (boolean) (changed > 0L);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
godvoice(aligntyp g_align, const char *words)
|
||||
{
|
||||
const char *quot = "";
|
||||
@@ -1407,14 +1407,14 @@ godvoice(aligntyp g_align, const char *words)
|
||||
ROLL_FROM(godvoices), quot, words, quot);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
gods_angry(aligntyp g_align)
|
||||
{
|
||||
godvoice(g_align, "Thou hast angered me.");
|
||||
}
|
||||
|
||||
/* The g_align god is upset with you. */
|
||||
static void
|
||||
staticfn void
|
||||
gods_upset(aligntyp g_align)
|
||||
{
|
||||
if (g_align == u.ualign.type)
|
||||
@@ -1424,7 +1424,7 @@ gods_upset(aligntyp g_align)
|
||||
angrygods(g_align);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
consume_offering(struct obj *otmp)
|
||||
{
|
||||
if (Hallucination)
|
||||
@@ -1458,7 +1458,7 @@ consume_offering(struct obj *otmp)
|
||||
|
||||
/* feedback when attempting to offer the Amulet on a "low altar" (not one of
|
||||
the high altars in the temples on the Astral Plane or Moloch's Sanctum) */
|
||||
static void
|
||||
staticfn void
|
||||
offer_too_soon(aligntyp altaralign)
|
||||
{
|
||||
if (altaralign == A_NONE && Inhell) {
|
||||
@@ -1507,7 +1507,7 @@ desecrate_altar(boolean highaltar, aligntyp altaralign)
|
||||
/* offering the Amulet on a high altar (checked by caller) ends the game;
|
||||
we don't declare this 'NORETURN' because done() can return (if called
|
||||
with some reasons other than ASCENDED and ESCAPED) */
|
||||
static void
|
||||
staticfn void
|
||||
offer_real_amulet(struct obj *otmp, aligntyp altaralign)
|
||||
{
|
||||
static NEARDATA const char
|
||||
@@ -1570,7 +1570,7 @@ offer_real_amulet(struct obj *otmp, aligntyp altaralign)
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
offer_fake_amulet(
|
||||
struct obj *otmp,
|
||||
boolean highaltar,
|
||||
@@ -1604,7 +1604,7 @@ offer_fake_amulet(
|
||||
}
|
||||
|
||||
/* possibly convert an altar's alignment or the hero's alignment */
|
||||
static void
|
||||
staticfn void
|
||||
offer_different_alignment_altar(
|
||||
struct obj *otmp,
|
||||
aligntyp altaralign)
|
||||
@@ -1671,7 +1671,7 @@ offer_different_alignment_altar(
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
sacrifice_your_race(
|
||||
struct obj *otmp,
|
||||
boolean highaltar,
|
||||
@@ -1754,7 +1754,7 @@ sacrifice_your_race(
|
||||
useupf(otmp, 1L);
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
bestow_artifact(void)
|
||||
{
|
||||
int nartifacts = nartifact_exist();
|
||||
@@ -2090,7 +2090,7 @@ can_pray(boolean praying) /* false means no messages should be given */
|
||||
}
|
||||
|
||||
/* return TRUE if praying revived a pet corpse */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
pray_revive(void)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -2183,7 +2183,7 @@ dopray(void)
|
||||
return ECMD_TIME;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
prayer_done(void) /* M. Stephenson (1.0.3b) */
|
||||
{
|
||||
aligntyp alignment = gp.p_aligntyp;
|
||||
@@ -2254,7 +2254,7 @@ prayer_done(void) /* M. Stephenson (1.0.3b) */
|
||||
}
|
||||
|
||||
/* iterable for undead turning by priest/knight */
|
||||
static void
|
||||
staticfn void
|
||||
maybe_turn_mon_iter(struct monst *mtmp)
|
||||
{
|
||||
/* 3.6.3: used to use cansee() here but the purpose is to prevent
|
||||
@@ -2578,7 +2578,7 @@ altar_wrath(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* assumes isok() at one space away, but not necessarily at two */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
blocked_boulder(int dx, int dy)
|
||||
{
|
||||
struct obj *otmp;
|
||||
|
||||
+4
-4
@@ -9,8 +9,8 @@
|
||||
#define ALGN_SINNED (-4) /* worse than strayed (-1..-3) */
|
||||
#define ALGN_PIOUS 14 /* better than fervent (9..13) */
|
||||
|
||||
static boolean histemple_at(struct monst *, coordxy, coordxy);
|
||||
static boolean has_shrine(struct monst *);
|
||||
staticfn boolean histemple_at(struct monst *, coordxy, coordxy);
|
||||
staticfn boolean has_shrine(struct monst *);
|
||||
|
||||
void
|
||||
newepri(struct monst *mtmp)
|
||||
@@ -148,7 +148,7 @@ temple_occupied(char *array)
|
||||
return '\0';
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
histemple_at(struct monst *priest, coordxy x, coordxy y)
|
||||
{
|
||||
return (boolean) (priest && priest->ispriest
|
||||
@@ -377,7 +377,7 @@ p_coaligned(struct monst *priest)
|
||||
return (boolean) (u.ualign.type == mon_aligntyp(priest));
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
has_shrine(struct monst *pri)
|
||||
{
|
||||
struct rm *lev;
|
||||
|
||||
+20
-20
@@ -11,18 +11,18 @@
|
||||
#define Not_firsttime (on_level(&u.uz0, &u.uz))
|
||||
#define Qstat(x) (gq.quest_status.x)
|
||||
|
||||
static void on_start(void);
|
||||
static void on_locate(void);
|
||||
static void on_goal(void);
|
||||
static boolean not_capable(void);
|
||||
static int is_pure(boolean);
|
||||
static void expulsion(boolean);
|
||||
static void chat_with_leader(struct monst *);
|
||||
static void chat_with_nemesis(void);
|
||||
static void chat_with_guardian(void);
|
||||
static void prisoner_speaks(struct monst *);
|
||||
staticfn void on_start(void);
|
||||
staticfn void on_locate(void);
|
||||
staticfn void on_goal(void);
|
||||
staticfn boolean not_capable(void);
|
||||
staticfn int is_pure(boolean);
|
||||
staticfn void expulsion(boolean);
|
||||
staticfn void chat_with_leader(struct monst *);
|
||||
staticfn void chat_with_nemesis(void);
|
||||
staticfn void chat_with_guardian(void);
|
||||
staticfn void prisoner_speaks(struct monst *);
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
on_start(void)
|
||||
{
|
||||
if (!Qstat(first_start)) {
|
||||
@@ -36,7 +36,7 @@ on_start(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
on_locate(void)
|
||||
{
|
||||
/* the locate messages are phrased in a manner such that they only
|
||||
@@ -58,7 +58,7 @@ on_locate(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
on_goal(void)
|
||||
{
|
||||
if (Qstat(killed_nemesis)) {
|
||||
@@ -143,13 +143,13 @@ ok_to_quest(void)
|
||||
&& is_pure(FALSE) > 0) || Qstat(killed_leader));
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
not_capable(void)
|
||||
{
|
||||
return (boolean) (u.ulevel < MIN_QUEST_LEVEL);
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
is_pure(boolean talk)
|
||||
{
|
||||
int purity;
|
||||
@@ -182,7 +182,7 @@ is_pure(boolean talk)
|
||||
* This assumes that the hero is currently _in_ the quest dungeon and that
|
||||
* there is a single branch to and from it.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
expulsion(boolean seal)
|
||||
{
|
||||
branch *br;
|
||||
@@ -278,7 +278,7 @@ finish_quest(struct obj *obj) /* quest artifact or thrown unique item or faux
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
chat_with_leader(struct monst *mtmp)
|
||||
{
|
||||
if (!mtmp->mpeaceful || Qstat(pissed_off))
|
||||
@@ -376,7 +376,7 @@ leader_speaks(struct monst *mtmp)
|
||||
chat_with_leader(mtmp);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
chat_with_nemesis(void)
|
||||
{
|
||||
/* The nemesis will do most of the talking, but... */
|
||||
@@ -423,7 +423,7 @@ nemesis_stinks(coordxy mx, coordxy my)
|
||||
gc.context.mon_moving = save_mon_moving;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
chat_with_guardian(void)
|
||||
{
|
||||
/* These guys/gals really don't have much to say... */
|
||||
@@ -433,7 +433,7 @@ chat_with_guardian(void)
|
||||
qt_pager("guardtalk_before");
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
prisoner_speaks(struct monst *mtmp)
|
||||
{
|
||||
if (mtmp->data == &mons[PM_PRISONER]
|
||||
|
||||
+24
-24
@@ -13,19 +13,19 @@
|
||||
#include "wintty.h"
|
||||
#endif
|
||||
|
||||
static const char *intermed(void);
|
||||
staticfn const char *intermed(void);
|
||||
/* sometimes find_qarti(gi.invent), and gi.invent can be null */
|
||||
static struct obj *find_qarti(struct obj *) NO_NNARGS;
|
||||
static const char *neminame(void);
|
||||
static const char *guardname(void);
|
||||
static const char *homebase(void);
|
||||
static void qtext_pronoun(char, char);
|
||||
static void convert_arg(char);
|
||||
static void convert_line(char *,char *);
|
||||
static void deliver_by_pline(const char *);
|
||||
static void deliver_by_window(const char *, int);
|
||||
static boolean skip_pager(boolean);
|
||||
static boolean com_pager_core(const char *, const char *, boolean, char **);
|
||||
staticfn struct obj *find_qarti(struct obj *) NO_NNARGS;
|
||||
staticfn const char *neminame(void);
|
||||
staticfn const char *guardname(void);
|
||||
staticfn const char *homebase(void);
|
||||
staticfn void qtext_pronoun(char, char);
|
||||
staticfn void convert_arg(char);
|
||||
staticfn void convert_line(char *,char *);
|
||||
staticfn void deliver_by_pline(const char *);
|
||||
staticfn void deliver_by_window(const char *, int);
|
||||
staticfn boolean skip_pager(boolean);
|
||||
staticfn boolean com_pager_core(const char *, const char *, boolean, char **);
|
||||
|
||||
short
|
||||
quest_info(int typ)
|
||||
@@ -57,7 +57,7 @@ ldrname(void)
|
||||
}
|
||||
|
||||
/* return your intermediate target string */
|
||||
static const char *
|
||||
staticfn const char *
|
||||
intermed(void)
|
||||
{
|
||||
return gu.urole.intermed;
|
||||
@@ -69,7 +69,7 @@ is_quest_artifact(struct obj *otmp)
|
||||
return (boolean) (otmp->oartifact == gu.urole.questarti);
|
||||
}
|
||||
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
find_qarti(struct obj *ochain)
|
||||
{
|
||||
struct obj *otmp, *qarti;
|
||||
@@ -120,7 +120,7 @@ find_quest_artifact(unsigned whichchains)
|
||||
}
|
||||
|
||||
/* return your role nemesis' name */
|
||||
static const char *
|
||||
staticfn const char *
|
||||
neminame(void)
|
||||
{
|
||||
int i = gu.urole.neminum;
|
||||
@@ -130,7 +130,7 @@ neminame(void)
|
||||
return gn.nambuf;
|
||||
}
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
guardname(void) /* return your role leader's guard monster name */
|
||||
{
|
||||
int i = gu.urole.guardnum;
|
||||
@@ -138,7 +138,7 @@ guardname(void) /* return your role leader's guard monster name */
|
||||
return mons[i].pmnames[NEUTRAL];
|
||||
}
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
homebase(void) /* return your role leader's location */
|
||||
{
|
||||
return gu.urole.homebase;
|
||||
@@ -195,7 +195,7 @@ stinky_nemesis(struct monst *mon)
|
||||
|
||||
/* replace deity, leader, nemesis, or artifact name with pronoun;
|
||||
overwrites cvt_buf[] */
|
||||
static void
|
||||
staticfn void
|
||||
qtext_pronoun(
|
||||
char who, /* 'd' => deity, 'l' => leader, 'n' => nemesis, 'o' => arti */
|
||||
char which) /* 'h'|'H'|'i'|'I'|'j'|'J' */
|
||||
@@ -232,7 +232,7 @@ qtext_pronoun(
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
convert_arg(char c)
|
||||
{
|
||||
const char *str;
|
||||
@@ -324,7 +324,7 @@ convert_arg(char c)
|
||||
Strcpy(gc.cvt_buf, str);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
convert_line(char *in_line, char *out_line)
|
||||
{
|
||||
char *c, *cc;
|
||||
@@ -416,7 +416,7 @@ convert_line(char *in_line, char *out_line)
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
deliver_by_pline(const char *str)
|
||||
{
|
||||
char in_line[BUFSZ], out_line[BUFSZ];
|
||||
@@ -432,7 +432,7 @@ deliver_by_pline(const char *str)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
deliver_by_window(const char *msg, int how)
|
||||
{
|
||||
char in_line[BUFSZ], out_line[BUFSZ];
|
||||
@@ -452,7 +452,7 @@ deliver_by_window(const char *msg, int how)
|
||||
destroy_nhwindow(datawin);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
skip_pager(boolean common UNUSED)
|
||||
{
|
||||
/* WIZKIT: suppress plot feedback if starting with quest artifact */
|
||||
@@ -461,7 +461,7 @@ skip_pager(boolean common UNUSED)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
com_pager_core(
|
||||
const char *section,
|
||||
const char *msgid,
|
||||
|
||||
+80
-80
@@ -8,51 +8,51 @@
|
||||
#define Your_Own_Role(mndx) ((mndx) == gu.urole.mnum)
|
||||
#define Your_Own_Race(mndx) ((mndx) == gu.urace.mnum)
|
||||
|
||||
static boolean learnscrolltyp(short);
|
||||
static void cap_spe(struct obj *);
|
||||
static char *erode_obj_text(struct obj *, char *);
|
||||
static char *hawaiian_design(struct obj *, char *);
|
||||
static int read_ok(struct obj *);
|
||||
static void stripspe(struct obj *);
|
||||
static void p_glow1(struct obj *);
|
||||
static void p_glow2(struct obj *, const char *);
|
||||
static void forget(int);
|
||||
static int maybe_tame(struct monst *, struct obj *);
|
||||
static boolean can_center_cloud(coordxy, coordxy);
|
||||
static void display_stinking_cloud_positions(boolean);
|
||||
static void seffect_enchant_armor(struct obj **);
|
||||
static void seffect_destroy_armor(struct obj **);
|
||||
static void seffect_confuse_monster(struct obj **);
|
||||
static void seffect_scare_monster(struct obj **);
|
||||
static void seffect_remove_curse(struct obj **);
|
||||
static void seffect_create_monster(struct obj **);
|
||||
static void seffect_enchant_weapon(struct obj **);
|
||||
static void seffect_taming(struct obj **);
|
||||
static void seffect_genocide(struct obj **);
|
||||
static void seffect_light(struct obj **);
|
||||
static void seffect_charging(struct obj **);
|
||||
static void seffect_amnesia(struct obj **);
|
||||
static void seffect_fire(struct obj **);
|
||||
static void seffect_earth(struct obj **);
|
||||
static void seffect_punishment(struct obj **);
|
||||
static void seffect_stinking_cloud(struct obj **);
|
||||
static void seffect_blank_paper(struct obj **);
|
||||
static void seffect_teleportation(struct obj **);
|
||||
static void seffect_gold_detection(struct obj **);
|
||||
static void seffect_food_detection(struct obj **);
|
||||
static void seffect_identify(struct obj **);
|
||||
static void seffect_magic_mapping(struct obj **);
|
||||
staticfn boolean learnscrolltyp(short);
|
||||
staticfn void cap_spe(struct obj *);
|
||||
staticfn char *erode_obj_text(struct obj *, char *);
|
||||
staticfn char *hawaiian_design(struct obj *, char *);
|
||||
staticfn int read_ok(struct obj *);
|
||||
staticfn void stripspe(struct obj *);
|
||||
staticfn void p_glow1(struct obj *);
|
||||
staticfn void p_glow2(struct obj *, const char *);
|
||||
staticfn void forget(int);
|
||||
staticfn int maybe_tame(struct monst *, struct obj *);
|
||||
staticfn boolean can_center_cloud(coordxy, coordxy);
|
||||
staticfn void display_stinking_cloud_positions(boolean);
|
||||
staticfn void seffect_enchant_armor(struct obj **);
|
||||
staticfn void seffect_destroy_armor(struct obj **);
|
||||
staticfn void seffect_confuse_monster(struct obj **);
|
||||
staticfn void seffect_scare_monster(struct obj **);
|
||||
staticfn void seffect_remove_curse(struct obj **);
|
||||
staticfn void seffect_create_monster(struct obj **);
|
||||
staticfn void seffect_enchant_weapon(struct obj **);
|
||||
staticfn void seffect_taming(struct obj **);
|
||||
staticfn void seffect_genocide(struct obj **);
|
||||
staticfn void seffect_light(struct obj **);
|
||||
staticfn void seffect_charging(struct obj **);
|
||||
staticfn void seffect_amnesia(struct obj **);
|
||||
staticfn void seffect_fire(struct obj **);
|
||||
staticfn void seffect_earth(struct obj **);
|
||||
staticfn void seffect_punishment(struct obj **);
|
||||
staticfn void seffect_stinking_cloud(struct obj **);
|
||||
staticfn void seffect_blank_paper(struct obj **);
|
||||
staticfn void seffect_teleportation(struct obj **);
|
||||
staticfn void seffect_gold_detection(struct obj **);
|
||||
staticfn void seffect_food_detection(struct obj **);
|
||||
staticfn void seffect_identify(struct obj **);
|
||||
staticfn void seffect_magic_mapping(struct obj **);
|
||||
#ifdef MAIL_STRUCTURES
|
||||
static void seffect_mail(struct obj **);
|
||||
staticfn void seffect_mail(struct obj **);
|
||||
#endif /* MAIL_STRUCTURES */
|
||||
static void set_lit(coordxy, coordxy, genericptr);
|
||||
static void do_class_genocide(void);
|
||||
static void do_stinking_cloud(struct obj *, boolean);
|
||||
static boolean create_particular_parse(char *,
|
||||
staticfn void set_lit(coordxy, coordxy, genericptr);
|
||||
staticfn void do_class_genocide(void);
|
||||
staticfn void do_stinking_cloud(struct obj *, boolean);
|
||||
staticfn boolean create_particular_parse(char *,
|
||||
struct _create_particular_data *);
|
||||
static boolean create_particular_creation(struct _create_particular_data *);
|
||||
staticfn boolean create_particular_creation(struct _create_particular_data *);
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
learnscrolltyp(short scrolltyp)
|
||||
{
|
||||
if (!objects[scrolltyp].oc_name_known) {
|
||||
@@ -74,7 +74,7 @@ learnscroll(struct obj *sobj)
|
||||
}
|
||||
|
||||
/* max spe is +99, min is -99 */
|
||||
static void
|
||||
staticfn void
|
||||
cap_spe(struct obj *obj)
|
||||
{
|
||||
if (obj) {
|
||||
@@ -83,7 +83,7 @@ cap_spe(struct obj *obj)
|
||||
}
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
erode_obj_text(struct obj *otmp, char *buf)
|
||||
{
|
||||
int erosion = greatest_erosion(otmp);
|
||||
@@ -218,7 +218,7 @@ hawaiian_motif(struct obj *shirt, char *buf)
|
||||
return buf;
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
hawaiian_design(struct obj *shirt, char *buf)
|
||||
{
|
||||
static const char *const hawaiian_bgs[] = {
|
||||
@@ -309,7 +309,7 @@ assign_candy_wrapper(struct obj *obj)
|
||||
}
|
||||
|
||||
/* getobj callback for object to read */
|
||||
static int
|
||||
staticfn int
|
||||
read_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
@@ -644,7 +644,7 @@ doread(void)
|
||||
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
stripspe(struct obj *obj)
|
||||
{
|
||||
if (obj->blessed || obj->spe <= 0) {
|
||||
@@ -659,13 +659,13 @@ stripspe(struct obj *obj)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
p_glow1(struct obj *otmp)
|
||||
{
|
||||
pline("%s briefly.", Yobjnam2(otmp, Blind ? "vibrate" : "glow"));
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
p_glow2(struct obj *otmp, const char *color)
|
||||
{
|
||||
pline("%s%s%s for a moment.", Yobjnam2(otmp, Blind ? "vibrate" : "glow"),
|
||||
@@ -999,7 +999,7 @@ recharge(struct obj *obj, int curse_bless)
|
||||
* Other things are subject to flags:
|
||||
* howmuch & ALL_SPELLS = forget all spells
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
forget(int howmuch)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -1023,7 +1023,7 @@ forget(int howmuch)
|
||||
}
|
||||
|
||||
/* monster is hit by scroll of taming's effect */
|
||||
static int
|
||||
staticfn int
|
||||
maybe_tame(struct monst *mtmp, struct obj *sobj)
|
||||
{
|
||||
int was_tame = mtmp->mtame;
|
||||
@@ -1058,7 +1058,7 @@ valid_cloud_pos(coordxy x, coordxy y)
|
||||
/* Callback for getpos_sethilite, also used in determining whether a scroll
|
||||
* should have its regular effects, or not because it was out of range.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
can_center_cloud(coordxy x, coordxy y)
|
||||
{
|
||||
if (!valid_cloud_pos(x, y))
|
||||
@@ -1066,7 +1066,7 @@ can_center_cloud(coordxy x, coordxy y)
|
||||
return (cansee(x, y) && distu(x, y) < 32);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
display_stinking_cloud_positions(boolean on_off)
|
||||
{
|
||||
coordxy x, y, dx, dy;
|
||||
@@ -1093,7 +1093,7 @@ display_stinking_cloud_positions(boolean on_off)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_enchant_armor(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1243,7 +1243,7 @@ seffect_enchant_armor(struct obj **sobjp)
|
||||
Blind ? "again" : "unexpectedly");
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_destroy_armor(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1291,7 +1291,7 @@ seffect_destroy_armor(struct obj **sobjp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_confuse_monster(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1346,7 +1346,7 @@ seffect_confuse_monster(struct obj **sobjp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_scare_monster(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1381,7 +1381,7 @@ seffect_scare_monster(struct obj **sobjp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_remove_curse(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp; /* scroll or fake spellbook */
|
||||
@@ -1500,7 +1500,7 @@ seffect_remove_curse(struct obj **sobjp)
|
||||
update_inventory();
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_create_monster(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1519,7 +1519,7 @@ seffect_create_monster(struct obj **sobjp)
|
||||
*/
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_enchant_weapon(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1569,7 +1569,7 @@ seffect_enchant_weapon(struct obj **sobjp)
|
||||
cap_spe(uwep);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_taming(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1612,7 +1612,7 @@ seffect_taming(struct obj **sobjp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_genocide(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1631,7 +1631,7 @@ seffect_genocide(struct obj **sobjp)
|
||||
do_genocide((!scursed) | (2 * !!Confusion));
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_light(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1678,7 +1678,7 @@ seffect_light(struct obj **sobjp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_charging(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1720,7 +1720,7 @@ seffect_charging(struct obj **sobjp)
|
||||
recharge(otmp, scursed ? -1 : sblessed ? 1 : 0);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_amnesia(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1740,7 +1740,7 @@ seffect_amnesia(struct obj **sobjp)
|
||||
exercise(A_WIS, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_fire(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1809,7 +1809,7 @@ seffect_fire(struct obj **sobjp)
|
||||
#undef ZT_SPELL_O_FIRE
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_earth(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1866,7 +1866,7 @@ seffect_earth(struct obj **sobjp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_punishment(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1881,7 +1881,7 @@ seffect_punishment(struct obj **sobjp)
|
||||
punish(sobj);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_stinking_cloud(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1895,7 +1895,7 @@ seffect_stinking_cloud(struct obj **sobjp)
|
||||
do_stinking_cloud(sobj, already_known);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_blank_paper(struct obj **sobjp UNUSED)
|
||||
{
|
||||
if (Blind)
|
||||
@@ -1905,7 +1905,7 @@ seffect_blank_paper(struct obj **sobjp UNUSED)
|
||||
gk.known = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_teleportation(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1925,7 +1925,7 @@ seffect_teleportation(struct obj **sobjp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_gold_detection(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1936,7 +1936,7 @@ seffect_gold_detection(struct obj **sobjp)
|
||||
*sobjp = 0; /* failure: strange_feeling() -> useup() */
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_food_detection(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1945,7 +1945,7 @@ seffect_food_detection(struct obj **sobjp)
|
||||
*sobjp = 0; /* nothing detected: strange_feeling -> useup */
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_identify(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -1992,7 +1992,7 @@ seffect_identify(struct obj **sobjp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
seffect_magic_mapping(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -2044,7 +2044,7 @@ seffect_magic_mapping(struct obj **sobjp)
|
||||
}
|
||||
|
||||
#ifdef MAIL_STRUCTURES
|
||||
static void
|
||||
staticfn void
|
||||
seffect_mail(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
@@ -2357,7 +2357,7 @@ static struct litmon *gremlins = 0;
|
||||
/*
|
||||
* Low-level lit-field update routine.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
set_lit(coordxy x, coordxy y, genericptr_t val)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -2513,7 +2513,7 @@ litroom(
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
do_class_genocide(void)
|
||||
{
|
||||
int i, j, immunecnt, gonecnt, goodcnt, class, feel_dead = 0;
|
||||
@@ -2950,7 +2950,7 @@ unpunish(void)
|
||||
|
||||
/* prompt the player to create a stinking cloud and then create it if they
|
||||
give a location */
|
||||
static void
|
||||
staticfn void
|
||||
do_stinking_cloud(struct obj *sobj, boolean mention_stinking)
|
||||
{
|
||||
coord cc;
|
||||
@@ -3005,7 +3005,7 @@ cant_revive(
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
create_particular_parse(
|
||||
char *str,
|
||||
struct _create_particular_data *d)
|
||||
@@ -3120,7 +3120,7 @@ create_particular_parse(
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
create_particular_creation(
|
||||
struct _create_particular_data *d)
|
||||
{
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
|
||||
int get_rect_ind(NhRect *);
|
||||
|
||||
static boolean intersect(NhRect *, NhRect *, NhRect *);
|
||||
staticfn boolean intersect(NhRect *, NhRect *, NhRect *);
|
||||
|
||||
/*
|
||||
* In this file, we will handle the various rectangle functions we
|
||||
@@ -111,7 +111,7 @@ rnd_rect(void)
|
||||
* otherwise returns FALSE
|
||||
*/
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
intersect(NhRect *r1, NhRect *r2, NhRect *r3)
|
||||
{
|
||||
if (r2->lx > r1->hx || r2->ly > r1->hy || r2->hx < r1->lx
|
||||
|
||||
+4
-4
@@ -37,8 +37,8 @@ boolean enter_force_field(genericptr,genericptr);
|
||||
NhRegion *create_force_field(coordxy,coordxy,int,long);
|
||||
#endif
|
||||
|
||||
static void reset_region_mids(NhRegion *);
|
||||
static boolean is_hero_inside_gas_cloud(void);
|
||||
staticfn void reset_region_mids(NhRegion *);
|
||||
staticfn boolean is_hero_inside_gas_cloud(void);
|
||||
|
||||
static const callback_proc callbacks[] = {
|
||||
#define INSIDE_GAS_CLOUD 0
|
||||
@@ -875,7 +875,7 @@ region_stats(
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
/* update monster IDs for region being loaded from bones; `ghostly' implied */
|
||||
static void
|
||||
staticfn void
|
||||
reset_region_mids(NhRegion *reg)
|
||||
{
|
||||
int i = 0, n = reg->n_monst;
|
||||
@@ -1109,7 +1109,7 @@ inside_gas_cloud(genericptr_t p1, genericptr_t p2)
|
||||
return FALSE; /* Monster is still alive */
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
is_hero_inside_gas_cloud(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
+45
-46
@@ -12,30 +12,30 @@ extern int dotrow; /* shared with save */
|
||||
#endif
|
||||
|
||||
#ifdef ZEROCOMP
|
||||
static void zerocomp_minit(void);
|
||||
static void zerocomp_mread(int, genericptr_t, unsigned int);
|
||||
static int zerocomp_mgetc(void);
|
||||
staticfn void zerocomp_minit(void);
|
||||
staticfn void zerocomp_mread(int, genericptr_t, unsigned int);
|
||||
staticfn int zerocomp_mgetc(void);
|
||||
#endif
|
||||
|
||||
static void find_lev_obj(void);
|
||||
static void restlevchn(NHFILE *);
|
||||
static void restdamage(NHFILE *);
|
||||
static void restobj(NHFILE *, struct obj *);
|
||||
static struct obj *restobjchn(NHFILE *, boolean);
|
||||
static void restmon(NHFILE *, struct monst *);
|
||||
static struct monst *restmonchn(NHFILE *);
|
||||
static struct fruit *loadfruitchn(NHFILE *);
|
||||
static void freefruitchn(struct fruit *);
|
||||
static void ghostfruit(struct obj *);
|
||||
static boolean restgamestate(NHFILE *);
|
||||
static void restlevelstate(void);
|
||||
static int restlevelfile(xint8);
|
||||
static void rest_bubbles(NHFILE *);
|
||||
static void restore_gamelog(NHFILE *);
|
||||
static void restore_msghistory(NHFILE *);
|
||||
static void reset_oattached_mids(boolean);
|
||||
static void rest_levl(NHFILE *, boolean);
|
||||
static void rest_stairs(NHFILE *);
|
||||
staticfn void find_lev_obj(void);
|
||||
staticfn void restlevchn(NHFILE *);
|
||||
staticfn void restdamage(NHFILE *);
|
||||
staticfn void restobj(NHFILE *, struct obj *);
|
||||
staticfn struct obj *restobjchn(NHFILE *, boolean);
|
||||
staticfn void restmon(NHFILE *, struct monst *);
|
||||
staticfn struct monst *restmonchn(NHFILE *);
|
||||
staticfn struct fruit *loadfruitchn(NHFILE *);
|
||||
staticfn void freefruitchn(struct fruit *);
|
||||
staticfn void ghostfruit(struct obj *);
|
||||
staticfn boolean restgamestate(NHFILE *);
|
||||
staticfn void restlevelstate(void);
|
||||
staticfn int restlevelfile(xint8);
|
||||
staticfn void rest_bubbles(NHFILE *);
|
||||
staticfn void restore_gamelog(NHFILE *);
|
||||
staticfn void restore_msghistory(NHFILE *);
|
||||
staticfn void reset_oattached_mids(boolean);
|
||||
staticfn void rest_levl(NHFILE *, boolean);
|
||||
staticfn void rest_stairs(NHFILE *);
|
||||
|
||||
/*
|
||||
* Save a mapping of IDs from ghost levels to the current level. This
|
||||
@@ -50,8 +50,8 @@ struct bucket {
|
||||
} map[N_PER_BUCKET];
|
||||
};
|
||||
|
||||
static void clear_id_mapping(void);
|
||||
static void add_id_mapping(unsigned, unsigned);
|
||||
staticfn void clear_id_mapping(void);
|
||||
staticfn void add_id_mapping(unsigned, unsigned);
|
||||
|
||||
#ifdef AMII_GRAPHICS
|
||||
void amii_setpens(int); /* use colors from save file */
|
||||
@@ -68,7 +68,7 @@ extern int amii_numcolors;
|
||||
#define Mread(fd,adr,siz) mread((fd), (genericptr_t) (adr), (unsigned) (siz))
|
||||
|
||||
/* Recalculate gl.level.objects[x][y], since this info was not saved. */
|
||||
static void
|
||||
staticfn void
|
||||
find_lev_obj(void)
|
||||
{
|
||||
struct obj *fobjtmp = (struct obj *) 0;
|
||||
@@ -125,7 +125,7 @@ inven_inuse(boolean quietly)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
restlevchn(NHFILE *nhfp)
|
||||
{
|
||||
int cnt = 0;
|
||||
@@ -151,7 +151,7 @@ restlevchn(NHFILE *nhfp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
restdamage(NHFILE *nhfp)
|
||||
{
|
||||
unsigned int dmgcount = 0;
|
||||
@@ -179,7 +179,7 @@ restdamage(NHFILE *nhfp)
|
||||
}
|
||||
|
||||
/* restore one object */
|
||||
static void
|
||||
staticfn void
|
||||
restobj(NHFILE *nhfp, struct obj *otmp)
|
||||
{
|
||||
int buflen = 0;
|
||||
@@ -234,7 +234,7 @@ restobj(NHFILE *nhfp, struct obj *otmp)
|
||||
}
|
||||
}
|
||||
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
restobjchn(NHFILE *nhfp, boolean frozen)
|
||||
{
|
||||
struct obj *otmp, *otmp2 = 0;
|
||||
@@ -303,7 +303,7 @@ restobjchn(NHFILE *nhfp, boolean frozen)
|
||||
}
|
||||
|
||||
/* restore one monster */
|
||||
static void
|
||||
staticfn void
|
||||
restmon(NHFILE *nhfp, struct monst *mtmp)
|
||||
{
|
||||
int buflen = 0;
|
||||
@@ -373,7 +373,7 @@ restmon(NHFILE *nhfp, struct monst *mtmp)
|
||||
} /* mextra */
|
||||
}
|
||||
|
||||
static struct monst *
|
||||
staticfn struct monst *
|
||||
restmonchn(NHFILE *nhfp)
|
||||
{
|
||||
struct monst *mtmp, *mtmp2 = 0;
|
||||
@@ -451,7 +451,7 @@ restmonchn(NHFILE *nhfp)
|
||||
return first;
|
||||
}
|
||||
|
||||
static struct fruit *
|
||||
staticfn struct fruit *
|
||||
loadfruitchn(NHFILE *nhfp)
|
||||
{
|
||||
struct fruit *flist, *fnext;
|
||||
@@ -471,7 +471,7 @@ loadfruitchn(NHFILE *nhfp)
|
||||
return flist;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
freefruitchn(struct fruit *flist)
|
||||
{
|
||||
struct fruit *fnext;
|
||||
@@ -483,7 +483,7 @@ freefruitchn(struct fruit *flist)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
ghostfruit(struct obj *otmp)
|
||||
{
|
||||
struct fruit *oldf;
|
||||
@@ -504,8 +504,7 @@ ghostfruit(struct obj *otmp)
|
||||
#define SYSOPT_CHECK_SAVE_UID TRUE
|
||||
#endif
|
||||
|
||||
static
|
||||
boolean
|
||||
staticfn boolean
|
||||
restgamestate(NHFILE *nhfp)
|
||||
{
|
||||
struct flag newgameflags;
|
||||
@@ -700,7 +699,7 @@ restgamestate(NHFILE *nhfp)
|
||||
|
||||
/* update game state pointers to those valid for the current level (so we
|
||||
don't dereference a wild u.ustuck when saving game state, for instance) */
|
||||
static void
|
||||
staticfn void
|
||||
restlevelstate(void)
|
||||
{
|
||||
/*
|
||||
@@ -711,7 +710,7 @@ restlevelstate(void)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
staticfn int
|
||||
restlevelfile(xint8 ltmp)
|
||||
{
|
||||
char whynot[BUFSZ];
|
||||
@@ -882,7 +881,7 @@ dorecover(NHFILE *nhfp)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
rest_stairs(NHFILE *nhfp)
|
||||
{
|
||||
int buflen = 0;
|
||||
@@ -937,7 +936,7 @@ restcemetery(NHFILE *nhfp, struct cemetery **cemeteryaddr)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
staticfn void
|
||||
rest_levl(
|
||||
NHFILE *nhfp,
|
||||
#ifdef RLECOMP
|
||||
@@ -1249,7 +1248,7 @@ get_plname_from_file(NHFILE *nhfp, char *plbuf)
|
||||
}
|
||||
|
||||
/* restore Plane of Water's air bubbles and Plane of Air's clouds */
|
||||
static void
|
||||
staticfn void
|
||||
rest_bubbles(NHFILE *nhfp)
|
||||
{
|
||||
xint8 bbubbly;
|
||||
@@ -1265,7 +1264,7 @@ rest_bubbles(NHFILE *nhfp)
|
||||
restore_waterlevel(nhfp);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
restore_gamelog(NHFILE *nhfp)
|
||||
{
|
||||
int slen = 0;
|
||||
@@ -1288,7 +1287,7 @@ restore_gamelog(NHFILE *nhfp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
restore_msghistory(NHFILE *nhfp)
|
||||
{
|
||||
int msgsize = 0, msgcount = 0;
|
||||
@@ -1313,7 +1312,7 @@ restore_msghistory(NHFILE *nhfp)
|
||||
}
|
||||
|
||||
/* Clear all structures for object and monster ID mapping. */
|
||||
static void
|
||||
staticfn void
|
||||
clear_id_mapping(void)
|
||||
{
|
||||
struct bucket *curr;
|
||||
@@ -1326,7 +1325,7 @@ clear_id_mapping(void)
|
||||
}
|
||||
|
||||
/* Add a mapping to the ID map. */
|
||||
static void
|
||||
staticfn void
|
||||
add_id_mapping(unsigned int gid, unsigned int nid)
|
||||
{
|
||||
int idx;
|
||||
@@ -1376,7 +1375,7 @@ lookup_id_mapping(unsigned int gid, unsigned int *nidp)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
reset_oattached_mids(boolean ghostly)
|
||||
{
|
||||
struct obj *otmp;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef TEXT_TOMBSTONE
|
||||
static void center(int, char *);
|
||||
staticfn void center(int, char *);
|
||||
|
||||
#ifndef NH320_DEDICATION
|
||||
/* A normal tombstone for end of game display. */
|
||||
@@ -70,7 +70,7 @@ static const char *const rip_txt[] = {
|
||||
#define DEATH_LINE 8 /* *char[] line # for death description */
|
||||
#define YEAR_LINE 12 /* *char[] line # for year */
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
center(int line, char *text)
|
||||
{
|
||||
char *ip, *op;
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
#ifdef USE_ISAAC64
|
||||
#include "isaac64.h"
|
||||
|
||||
static int whichrng(int (*fn)(int));
|
||||
static int RND(int);
|
||||
staticfn int whichrng(int (*fn)(int));
|
||||
staticfn int RND(int);
|
||||
staticfn void set_random(unsigned long, int (*)(int));
|
||||
|
||||
#if 0
|
||||
static isaac64_ctx rng_state;
|
||||
@@ -27,7 +28,7 @@ static struct rnglist_t rnglist[] = {
|
||||
{ rn2_on_display_rng, FALSE, { 0 } }, /* DISP */
|
||||
};
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
whichrng(int (*fn)(int))
|
||||
{
|
||||
int i;
|
||||
@@ -56,7 +57,7 @@ init_isaac64(unsigned long seed, int (*fn)(int))
|
||||
(int) sizeof seed);
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
RND(int x)
|
||||
{
|
||||
return (isaac64_next_uint64(&rnglist[CORE].rng_state) % x);
|
||||
@@ -230,7 +231,7 @@ rnz(int i)
|
||||
/* Sets the seed for the random number generator */
|
||||
#ifdef USE_ISAAC64
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
set_random(unsigned long seed,
|
||||
int (*fn)(int))
|
||||
{
|
||||
@@ -240,7 +241,7 @@ set_random(unsigned long seed,
|
||||
#else /* USE_ISAAC64 */
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
staticfn void
|
||||
set_random(unsigned long seed,
|
||||
int (*fn)(int) UNUSED)
|
||||
{
|
||||
|
||||
+8
-8
@@ -696,10 +696,10 @@ const struct Align aligns[] = {
|
||||
{ "evil", "unaligned", "Una", 0, A_NONE }
|
||||
};
|
||||
|
||||
static int randrole_filtered(void);
|
||||
static char *promptsep(char *, int);
|
||||
static int role_gendercount(int);
|
||||
static int race_alignmentcount(int);
|
||||
staticfn int randrole_filtered(void);
|
||||
staticfn char *promptsep(char *, int);
|
||||
staticfn int role_gendercount(int);
|
||||
staticfn int race_alignmentcount(int);
|
||||
|
||||
/* used by str2XXX() */
|
||||
static char NEARDATA randomstr[] = "random";
|
||||
@@ -722,7 +722,7 @@ randrole(boolean for_display)
|
||||
return res;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
randrole_filtered(void)
|
||||
{
|
||||
int i, n = 0, set[SIZE(roles)];
|
||||
@@ -1374,7 +1374,7 @@ clearrolefilter(int which)
|
||||
}
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
promptsep(char *buf, int num_post_attribs)
|
||||
{
|
||||
const char *conjuct = "and ";
|
||||
@@ -1389,7 +1389,7 @@ promptsep(char *buf, int num_post_attribs)
|
||||
return buf;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
role_gendercount(int rolenum)
|
||||
{
|
||||
int gendcount = 0;
|
||||
@@ -1405,7 +1405,7 @@ role_gendercount(int rolenum)
|
||||
return gendcount;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
race_alignmentcount(int racenum)
|
||||
{
|
||||
int aligncount = 0;
|
||||
|
||||
+14
-14
@@ -41,14 +41,14 @@
|
||||
* and placed there by 'makedefs'.
|
||||
*/
|
||||
|
||||
static void unpadline(char *);
|
||||
static void init_rumors(dlb *);
|
||||
static char *get_rnd_line(dlb *, char *, unsigned, int (*)(int),
|
||||
staticfn void unpadline(char *);
|
||||
staticfn void init_rumors(dlb *);
|
||||
staticfn char *get_rnd_line(dlb *, char *, unsigned, int (*)(int),
|
||||
long, long, unsigned);
|
||||
static void init_oracles(dlb *);
|
||||
static void others_check(const char *ftype, const char *, winid *);
|
||||
static void couldnt_open_file(const char *);
|
||||
static void init_CapMons(void);
|
||||
staticfn void init_oracles(dlb *);
|
||||
staticfn void others_check(const char *ftype, const char *, winid *);
|
||||
staticfn void couldnt_open_file(const char *);
|
||||
staticfn void init_CapMons(void);
|
||||
|
||||
/* used by CapitalMon(); set up by init_CapMons(), released by free_CapMons();
|
||||
there's no need for these to be put into 'struct instance_globals g' */
|
||||
@@ -62,7 +62,7 @@ extern const char bogon_codes[]; /* from do_name.c */
|
||||
|
||||
/* makedefs pads short rumors, epitaphs, engravings, and hallucinatory
|
||||
monster names with trailing underscores; strip those off */
|
||||
static void
|
||||
staticfn void
|
||||
unpadline(char *line)
|
||||
{
|
||||
char *p = eos(line);
|
||||
@@ -80,7 +80,7 @@ unpadline(char *line)
|
||||
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
init_rumors(dlb *fp)
|
||||
{
|
||||
static const char rumors_header[] = "%d,%ld,%lx;%d,%ld,%lx;0,0,%lx\n";
|
||||
@@ -303,7 +303,7 @@ rumor_check(void)
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
/* 3.7: augments rumors_check(); test 'engrave' or 'epitaph' or 'bogusmon' */
|
||||
static void
|
||||
staticfn void
|
||||
others_check(
|
||||
const char *ftype, /* header: "{Engravings|Epitaphs|Bogus monsters}:" */
|
||||
const char *fname, /* filename: {ENGRAVEFILE|EPITAPHFILE|BOGUSMONFILE} */
|
||||
@@ -415,7 +415,7 @@ RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
chosen; however, if padlength is 0, lines following long lines are
|
||||
more likely than average to be picked, and lines after short lines
|
||||
are less likely */
|
||||
static char *
|
||||
staticfn char *
|
||||
get_rnd_line(
|
||||
dlb *fh, /* already opened file */
|
||||
char *buf, /* output buffer */
|
||||
@@ -571,7 +571,7 @@ outrumor(
|
||||
pline1(line);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
init_oracles(dlb *fp)
|
||||
{
|
||||
int i;
|
||||
@@ -760,7 +760,7 @@ doconsult(struct monst *oracl)
|
||||
return ECMD_TIME;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
couldnt_open_file(const char *filename)
|
||||
{
|
||||
int save_something = gp.program_state.something_worth_saving;
|
||||
@@ -819,7 +819,7 @@ CapitalMon(
|
||||
having a capitalized type name like Green-elf or Archon, plus unique
|
||||
monsters whose "name" is a title rather than a personal name, plus
|
||||
hallucinatory monster names that fall into either of those categories */
|
||||
static void
|
||||
staticfn void
|
||||
init_CapMons(void)
|
||||
{
|
||||
unsigned pass;
|
||||
|
||||
+35
-35
@@ -16,28 +16,28 @@
|
||||
int dotcnt, dotrow; /* also used in restore */
|
||||
#endif
|
||||
|
||||
static void savelevchn(NHFILE *);
|
||||
static void savelevl(NHFILE *,boolean);
|
||||
static void savedamage(NHFILE *);
|
||||
static void save_bubbles(NHFILE *, xint8);
|
||||
static void save_stairs(NHFILE *);
|
||||
static void save_bc(NHFILE *);
|
||||
static void saveobj(NHFILE *, struct obj *);
|
||||
static void saveobjchn(NHFILE *, struct obj **) NO_NNARGS;
|
||||
static void savemon(NHFILE *, struct monst *);
|
||||
static void savemonchn(NHFILE *, struct monst *) NO_NNARGS;
|
||||
static void savetrapchn(NHFILE *, struct trap *) NO_NNARGS;
|
||||
static void save_gamelog(NHFILE *);
|
||||
static void savegamestate(NHFILE *);
|
||||
static void savelev_core(NHFILE *, xint8);
|
||||
static void save_msghistory(NHFILE *);
|
||||
staticfn void savelevchn(NHFILE *);
|
||||
staticfn void savelevl(NHFILE *,boolean);
|
||||
staticfn void savedamage(NHFILE *);
|
||||
staticfn void save_bubbles(NHFILE *, xint8);
|
||||
staticfn void save_stairs(NHFILE *);
|
||||
staticfn void save_bc(NHFILE *);
|
||||
staticfn void saveobj(NHFILE *, struct obj *);
|
||||
staticfn void saveobjchn(NHFILE *, struct obj **) NO_NNARGS;
|
||||
staticfn void savemon(NHFILE *, struct monst *);
|
||||
staticfn void savemonchn(NHFILE *, struct monst *) NO_NNARGS;
|
||||
staticfn void savetrapchn(NHFILE *, struct trap *) NO_NNARGS;
|
||||
staticfn void save_gamelog(NHFILE *);
|
||||
staticfn void savegamestate(NHFILE *);
|
||||
staticfn void savelev_core(NHFILE *, xint8);
|
||||
staticfn void save_msghistory(NHFILE *);
|
||||
|
||||
#ifdef ZEROCOMP
|
||||
static void zerocomp_bufon(int);
|
||||
static void zerocomp_bufoff(int);
|
||||
static void zerocomp_bflush(int);
|
||||
static void zerocomp_bwrite(int, genericptr_t, unsigned int);
|
||||
static void zerocomp_bputc(int);
|
||||
staticfn void zerocomp_bufon(int);
|
||||
staticfn void zerocomp_bufoff(int);
|
||||
staticfn void zerocomp_bflush(int);
|
||||
staticfn void zerocomp_bwrite(int, genericptr_t, unsigned int);
|
||||
staticfn void zerocomp_bputc(int);
|
||||
#endif
|
||||
|
||||
#if defined(HANGUPHANDLING)
|
||||
@@ -238,7 +238,7 @@ dosave0(void)
|
||||
return res;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
save_gamelog(NHFILE *nhfp)
|
||||
{
|
||||
struct gamelog_line *tmp = gg.gamelog, *tmp2;
|
||||
@@ -271,7 +271,7 @@ save_gamelog(NHFILE *nhfp)
|
||||
gg.gamelog = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
savegamestate(NHFILE *nhfp)
|
||||
{
|
||||
unsigned long uid;
|
||||
@@ -462,7 +462,7 @@ savelev(NHFILE *nhfp, xint8 lev)
|
||||
gu.uz_save.dnum = gu.uz_save.dlevel = 0; /* unset */
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
savelev_core(NHFILE *nhfp, xint8 lev)
|
||||
{
|
||||
#ifdef TOS
|
||||
@@ -574,7 +574,7 @@ savelev_core(NHFILE *nhfp, xint8 lev)
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
savelevl(NHFILE *nhfp, boolean rlecomp)
|
||||
{
|
||||
#ifdef RLECOMP
|
||||
@@ -635,7 +635,7 @@ savelevl(NHFILE *nhfp, boolean rlecomp)
|
||||
}
|
||||
|
||||
/* save Plane of Water's air bubbles and Plane of Air's clouds */
|
||||
static void
|
||||
staticfn void
|
||||
save_bubbles(NHFILE *nhfp, xint8 lev)
|
||||
{
|
||||
xint8 bbubbly;
|
||||
@@ -682,7 +682,7 @@ savecemetery(NHFILE *nhfp, struct cemetery **cemeteryaddr)
|
||||
*cemeteryaddr = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
savedamage(NHFILE *nhfp)
|
||||
{
|
||||
struct damage *damageptr, *tmp_dam;
|
||||
@@ -709,7 +709,7 @@ savedamage(NHFILE *nhfp)
|
||||
gl.level.damagelist = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
save_stairs(NHFILE *nhfp)
|
||||
{
|
||||
stairway *stway = gs.stairs;
|
||||
@@ -744,7 +744,7 @@ save_stairs(NHFILE *nhfp)
|
||||
|
||||
/* if ball and/or chain are loose, make an object chain for it/them and
|
||||
save that separately from other objects */
|
||||
static void
|
||||
staticfn void
|
||||
save_bc(NHFILE *nhfp)
|
||||
{
|
||||
struct obj *bc_objs = 0;
|
||||
@@ -774,7 +774,7 @@ save_bc(NHFILE *nhfp)
|
||||
|
||||
/* save one object;
|
||||
caveat: this is only for perform_bwrite(); caller handles release_data() */
|
||||
static void
|
||||
staticfn void
|
||||
saveobj(NHFILE *nhfp, struct obj *otmp)
|
||||
{
|
||||
int buflen, zerobuf = 0;
|
||||
@@ -818,7 +818,7 @@ saveobj(NHFILE *nhfp, struct obj *otmp)
|
||||
|
||||
/* save an object chain; sets head of list to Null when done;
|
||||
handles release_data() for each object in the list */
|
||||
static void
|
||||
staticfn void
|
||||
saveobjchn(NHFILE *nhfp, struct obj **obj_p)
|
||||
{
|
||||
struct obj *otmp = *obj_p;
|
||||
@@ -881,7 +881,7 @@ saveobjchn(NHFILE *nhfp, struct obj **obj_p)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
savemon(NHFILE *nhfp, struct monst *mtmp)
|
||||
{
|
||||
int buflen;
|
||||
@@ -944,7 +944,7 @@ savemon(NHFILE *nhfp, struct monst *mtmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
savemonchn(NHFILE *nhfp, struct monst *mtmp)
|
||||
{
|
||||
struct monst *mtmp2;
|
||||
@@ -981,7 +981,7 @@ savemonchn(NHFILE *nhfp, struct monst *mtmp)
|
||||
}
|
||||
|
||||
/* save traps; gf.ftrap is the only trap chain so the 2nd arg is superfluous */
|
||||
static void
|
||||
staticfn void
|
||||
savetrapchn(NHFILE *nhfp, struct trap *trap)
|
||||
{
|
||||
static struct trap zerotrap;
|
||||
@@ -1039,7 +1039,7 @@ savefruitchn(NHFILE *nhfp)
|
||||
gf.ffruit = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
savelevchn(NHFILE *nhfp)
|
||||
{
|
||||
s_level *tmplev, *tmplev2;
|
||||
@@ -1079,7 +1079,7 @@ store_plname_in_file(NHFILE *nhfp)
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
save_msghistory(NHFILE *nhfp)
|
||||
{
|
||||
char *msg;
|
||||
|
||||
+6
-5
@@ -6,8 +6,9 @@
|
||||
#include "selvar.h"
|
||||
#include "sp_lev.h"
|
||||
|
||||
static boolean sel_flood_havepoint(coordxy, coordxy, coordxy *, coordxy *, int);
|
||||
static long line_dist_coord(long, long, long, long, long, long);
|
||||
staticfn boolean sel_flood_havepoint(coordxy, coordxy, coordxy *, coordxy *,
|
||||
int);
|
||||
staticfn long line_dist_coord(long, long, long, long, long, long);
|
||||
|
||||
/* selection */
|
||||
struct selectionvar *
|
||||
@@ -358,7 +359,7 @@ selection_do_grow(struct selectionvar *ov, int dir)
|
||||
selection_free(tmp, TRUE);
|
||||
}
|
||||
|
||||
static int (*selection_flood_check_func)(coordxy, coordxy);
|
||||
staticfn int (*selection_flood_check_func)(coordxy, coordxy);
|
||||
|
||||
void
|
||||
set_selection_floodfillchk(int (*f)(coordxy, coordxy))
|
||||
@@ -367,7 +368,7 @@ set_selection_floodfillchk(int (*f)(coordxy, coordxy))
|
||||
}
|
||||
|
||||
/* check whethere <x,y> is already in xs[],ys[] */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
sel_flood_havepoint(
|
||||
coordxy x, coordxy y,
|
||||
coordxy xs[], coordxy ys[],
|
||||
@@ -530,7 +531,7 @@ selection_do_ellipse(
|
||||
}
|
||||
|
||||
/* square of distance from line segment (x1,y1, x2,y2) to point (x3,y3) */
|
||||
static long
|
||||
staticfn long
|
||||
line_dist_coord(long x1, long y1, long x2, long y2, long x3, long y3)
|
||||
{
|
||||
long px = x2 - x1;
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
* These were moved here from save.c and restore.c between 3.6.3 and 3.7.0.
|
||||
*/
|
||||
|
||||
static int getidx(int, int);
|
||||
staticfn int getidx(int, int);
|
||||
|
||||
#if defined(UNIX) || defined(WIN32)
|
||||
#define USE_BUFFERING
|
||||
@@ -66,7 +66,7 @@ static FILE *bw_FILE[MAXFD] = {0,0,0,0,0};
|
||||
* happen.
|
||||
*/
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
getidx(int fd, int flg)
|
||||
{
|
||||
int i, retval = -1;
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
#define PAY_SKIP (-1)
|
||||
#define PAY_BROKE (-2)
|
||||
|
||||
static void makekops(coord *);
|
||||
static void call_kops(struct monst *, boolean);
|
||||
static void kops_gone(boolean);
|
||||
staticfn void makekops(coord *);
|
||||
staticfn void call_kops(struct monst *, boolean);
|
||||
staticfn void kops_gone(boolean);
|
||||
|
||||
#define NOTANGRY(mon) ((mon)->mpeaceful)
|
||||
#define ANGRY(mon) (!NOTANGRY(mon))
|
||||
@@ -26,61 +26,61 @@ extern const struct shclass shtypes[]; /* defined in shknam.c */
|
||||
static const char and_its_contents[] = " and its contents";
|
||||
static const char the_contents_of[] = "the contents of ";
|
||||
|
||||
static void append_honorific(char *);
|
||||
static long addupbill(struct monst *);
|
||||
static void pacify_shk(struct monst *, boolean);
|
||||
static struct bill_x *onbill(struct obj *, struct monst *, boolean);
|
||||
static struct monst *next_shkp(struct monst *, boolean);
|
||||
static long shop_debt(struct eshk *);
|
||||
static char *shk_owns(char *, struct obj *);
|
||||
static char *mon_owns(char *, struct obj *);
|
||||
static void clear_unpaid_obj(struct monst *, struct obj *);
|
||||
static void clear_unpaid(struct monst *, struct obj *);
|
||||
static void clear_no_charge_obj(struct monst *, struct obj *);
|
||||
static void clear_no_charge(struct monst *, struct obj *);
|
||||
static long check_credit(long, struct monst *);
|
||||
static void pay(long, struct monst *);
|
||||
static long get_cost(struct obj *, struct monst *);
|
||||
static long set_cost(struct obj *, struct monst *);
|
||||
static const char *shk_embellish(struct obj *, long);
|
||||
static long cost_per_charge(struct monst *, struct obj *, boolean);
|
||||
static long cheapest_item(struct monst *);
|
||||
static int menu_pick_pay_items(struct monst *);
|
||||
static int dopayobj(struct monst *, struct bill_x *, struct obj **, int,
|
||||
staticfn void append_honorific(char *);
|
||||
staticfn long addupbill(struct monst *);
|
||||
staticfn void pacify_shk(struct monst *, boolean);
|
||||
staticfn struct bill_x *onbill(struct obj *, struct monst *, boolean);
|
||||
staticfn struct monst *next_shkp(struct monst *, boolean);
|
||||
staticfn long shop_debt(struct eshk *);
|
||||
staticfn char *shk_owns(char *, struct obj *);
|
||||
staticfn char *mon_owns(char *, struct obj *);
|
||||
staticfn void clear_unpaid_obj(struct monst *, struct obj *);
|
||||
staticfn void clear_unpaid(struct monst *, struct obj *);
|
||||
staticfn void clear_no_charge_obj(struct monst *, struct obj *);
|
||||
staticfn void clear_no_charge(struct monst *, struct obj *);
|
||||
staticfn long check_credit(long, struct monst *);
|
||||
staticfn void pay(long, struct monst *);
|
||||
staticfn long get_cost(struct obj *, struct monst *);
|
||||
staticfn long set_cost(struct obj *, struct monst *);
|
||||
staticfn const char *shk_embellish(struct obj *, long);
|
||||
staticfn long cost_per_charge(struct monst *, struct obj *, boolean);
|
||||
staticfn long cheapest_item(struct monst *);
|
||||
staticfn int menu_pick_pay_items(struct monst *);
|
||||
staticfn int dopayobj(struct monst *, struct bill_x *, struct obj **, int,
|
||||
boolean);
|
||||
static long stolen_container(struct obj *, struct monst *, long, boolean);
|
||||
static long corpsenm_price_adj(struct obj *);
|
||||
static long getprice(struct obj *, boolean);
|
||||
static void shk_names_obj(struct monst *, struct obj *, const char *, long,
|
||||
staticfn long stolen_container(struct obj *, struct monst *, long, boolean);
|
||||
staticfn long corpsenm_price_adj(struct obj *);
|
||||
staticfn long getprice(struct obj *, boolean);
|
||||
staticfn void shk_names_obj(struct monst *, struct obj *, const char *, long,
|
||||
const char *);
|
||||
static boolean inherits(struct monst *, int, int, boolean);
|
||||
static void set_repo_loc(struct monst *);
|
||||
static struct obj *bp_to_obj(struct bill_x *);
|
||||
static long get_pricing_units(struct obj *);
|
||||
static boolean angry_shk_exists(void);
|
||||
static void home_shk(struct monst *, boolean);
|
||||
static void rile_shk(struct monst *);
|
||||
static void rouse_shk(struct monst *, boolean);
|
||||
static boolean shk_impaired(struct monst *);
|
||||
static boolean repairable_damage(struct damage *, struct monst *);
|
||||
static struct damage *find_damage(struct monst *);
|
||||
static void discard_damage_struct(struct damage *);
|
||||
static void discard_damage_owned_by(struct monst *);
|
||||
static void shk_fixes_damage(struct monst *);
|
||||
static uint8 litter_getpos(uint8 *, coordxy, coordxy, struct monst *);
|
||||
static void litter_scatter(uint8 *, coordxy, coordxy, struct monst *);
|
||||
static void litter_newsyms(uint8 *, coordxy, coordxy);
|
||||
static int repair_damage(struct monst *, struct damage *, boolean);
|
||||
static void sub_one_frombill(struct obj *, struct monst *);
|
||||
static void add_one_tobill(struct obj *, boolean, struct monst *);
|
||||
static void dropped_container(struct obj *, struct monst *, boolean);
|
||||
static void add_to_billobjs(struct obj *);
|
||||
static void bill_box_content(struct obj *, boolean, boolean,
|
||||
staticfn boolean inherits(struct monst *, int, int, boolean);
|
||||
staticfn void set_repo_loc(struct monst *);
|
||||
staticfn struct obj *bp_to_obj(struct bill_x *);
|
||||
staticfn long get_pricing_units(struct obj *);
|
||||
staticfn boolean angry_shk_exists(void);
|
||||
staticfn void home_shk(struct monst *, boolean);
|
||||
staticfn void rile_shk(struct monst *);
|
||||
staticfn void rouse_shk(struct monst *, boolean);
|
||||
staticfn boolean shk_impaired(struct monst *);
|
||||
staticfn boolean repairable_damage(struct damage *, struct monst *);
|
||||
staticfn struct damage *find_damage(struct monst *);
|
||||
staticfn void discard_damage_struct(struct damage *);
|
||||
staticfn void discard_damage_owned_by(struct monst *);
|
||||
staticfn void shk_fixes_damage(struct monst *);
|
||||
staticfn uint8 litter_getpos(uint8 *, coordxy, coordxy, struct monst *);
|
||||
staticfn void litter_scatter(uint8 *, coordxy, coordxy, struct monst *);
|
||||
staticfn void litter_newsyms(uint8 *, coordxy, coordxy);
|
||||
staticfn int repair_damage(struct monst *, struct damage *, boolean);
|
||||
staticfn void sub_one_frombill(struct obj *, struct monst *);
|
||||
staticfn void add_one_tobill(struct obj *, boolean, struct monst *);
|
||||
staticfn void dropped_container(struct obj *, struct monst *, boolean);
|
||||
staticfn void add_to_billobjs(struct obj *);
|
||||
staticfn void bill_box_content(struct obj *, boolean, boolean,
|
||||
struct monst *);
|
||||
static boolean rob_shop(struct monst *);
|
||||
static void deserted_shop(char *);
|
||||
static boolean special_stock(struct obj *, struct monst *, boolean);
|
||||
static const char *cad(boolean);
|
||||
staticfn boolean rob_shop(struct monst *);
|
||||
staticfn void deserted_shop(char *);
|
||||
staticfn boolean special_stock(struct obj *, struct monst *, boolean);
|
||||
staticfn const char *cad(boolean);
|
||||
|
||||
/*
|
||||
invariants: obj->unpaid iff onbill(obj) [unless bp->useup]
|
||||
@@ -162,7 +162,7 @@ money2u(struct monst *mon, long amount)
|
||||
}
|
||||
}
|
||||
|
||||
static struct monst *
|
||||
staticfn struct monst *
|
||||
next_shkp(struct monst *shkp, boolean withbill)
|
||||
{
|
||||
for (; shkp; shkp = shkp->nmon) {
|
||||
@@ -256,7 +256,7 @@ restshk(struct monst *shkp, boolean ghostly)
|
||||
}
|
||||
|
||||
/* clear the unpaid bit on a single object and its contents */
|
||||
static void
|
||||
staticfn void
|
||||
clear_unpaid_obj(struct monst *shkp, struct obj *otmp)
|
||||
{
|
||||
if (Has_contents(otmp))
|
||||
@@ -266,7 +266,7 @@ clear_unpaid_obj(struct monst *shkp, struct obj *otmp)
|
||||
}
|
||||
|
||||
/* clear the unpaid bit on all of the objects in the list */
|
||||
static void
|
||||
staticfn void
|
||||
clear_unpaid(struct monst *shkp, struct obj *list)
|
||||
{
|
||||
while (list) {
|
||||
@@ -276,7 +276,7 @@ clear_unpaid(struct monst *shkp, struct obj *list)
|
||||
}
|
||||
|
||||
/* clear the no_charge bit on a single object and its contents */
|
||||
static void
|
||||
staticfn void
|
||||
clear_no_charge_obj(
|
||||
struct monst *shkp, /* if null, clear regardless of shop */
|
||||
struct obj *otmp)
|
||||
@@ -324,7 +324,7 @@ clear_no_charge_obj(
|
||||
}
|
||||
|
||||
/* clear the no_charge bit on all of the objects in the list */
|
||||
static void
|
||||
staticfn void
|
||||
clear_no_charge(struct monst *shkp, struct obj *list)
|
||||
{
|
||||
while (list) {
|
||||
@@ -373,7 +373,7 @@ setpaid(struct monst *shkp)
|
||||
}
|
||||
}
|
||||
|
||||
static long
|
||||
staticfn long
|
||||
addupbill(struct monst *shkp)
|
||||
{
|
||||
int ct = ESHK(shkp)->billct;
|
||||
@@ -387,7 +387,7 @@ addupbill(struct monst *shkp)
|
||||
return total;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
call_kops(struct monst *shkp, boolean nearshop)
|
||||
{
|
||||
/* Keystone Kops srt@ucla */
|
||||
@@ -564,7 +564,7 @@ remote_burglary(coordxy x, coordxy y)
|
||||
|
||||
/* shop merchandise has been taken; pay for it with any credit available;
|
||||
return false if the debt is fully covered by credit, true otherwise */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
rob_shop(struct monst *shkp)
|
||||
{
|
||||
struct eshk *eshkp;
|
||||
@@ -600,7 +600,7 @@ rob_shop(struct monst *shkp)
|
||||
}
|
||||
|
||||
/* give a message when entering an untended shop (caller has verified that) */
|
||||
static void
|
||||
staticfn void
|
||||
deserted_shop(/*const*/ char *enterstring)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -867,7 +867,7 @@ same_price(struct obj *obj1, struct obj *obj2)
|
||||
* turning the `$' command into a way to discover that the current
|
||||
* level is bones data which has a shk on the warpath.
|
||||
*/
|
||||
static long
|
||||
staticfn long
|
||||
shop_debt(struct eshk *eshkp)
|
||||
{
|
||||
struct bill_x *bp;
|
||||
@@ -1003,7 +1003,7 @@ tended_shop(struct mkroom *sroom)
|
||||
return !mtmp ? FALSE : (boolean) inhishop(mtmp);
|
||||
}
|
||||
|
||||
static struct bill_x *
|
||||
staticfn struct bill_x *
|
||||
onbill(struct obj *obj, struct monst *shkp, boolean silent)
|
||||
{
|
||||
if (shkp) {
|
||||
@@ -1150,7 +1150,7 @@ obfree(struct obj *obj, struct obj *merge)
|
||||
dealloc_obj(obj);
|
||||
}
|
||||
|
||||
static long
|
||||
staticfn long
|
||||
check_credit(long tmp, struct monst *shkp)
|
||||
{
|
||||
long credit = ESHK(shkp)->credit;
|
||||
@@ -1169,7 +1169,7 @@ check_credit(long tmp, struct monst *shkp)
|
||||
return tmp;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
pay(long tmp, struct monst *shkp)
|
||||
{
|
||||
long robbed = ESHK(shkp)->robbed;
|
||||
@@ -1189,7 +1189,7 @@ pay(long tmp, struct monst *shkp)
|
||||
}
|
||||
|
||||
/* return shkp to home position */
|
||||
static void
|
||||
staticfn void
|
||||
home_shk(struct monst *shkp, boolean killkops)
|
||||
{
|
||||
coordxy x = ESHK(shkp)->shk.x, y = ESHK(shkp)->shk.y;
|
||||
@@ -1203,7 +1203,7 @@ home_shk(struct monst *shkp, boolean killkops)
|
||||
after_shk_move(shkp);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
angry_shk_exists(void)
|
||||
{
|
||||
struct monst *shkp;
|
||||
@@ -1216,7 +1216,7 @@ angry_shk_exists(void)
|
||||
}
|
||||
|
||||
/* remove previously applied surcharge from all billed items */
|
||||
static void
|
||||
staticfn void
|
||||
pacify_shk(struct monst *shkp, boolean clear_surcharge)
|
||||
{
|
||||
NOTANGRY(shkp) = TRUE; /* make peaceful */
|
||||
@@ -1234,7 +1234,7 @@ pacify_shk(struct monst *shkp, boolean clear_surcharge)
|
||||
}
|
||||
|
||||
/* add aggravation surcharge to all billed items */
|
||||
static void
|
||||
staticfn void
|
||||
rile_shk(struct monst *shkp)
|
||||
{
|
||||
NOTANGRY(shkp) = FALSE; /* make angry */
|
||||
@@ -1253,7 +1253,7 @@ rile_shk(struct monst *shkp)
|
||||
}
|
||||
|
||||
/* wakeup and/or unparalyze shopkeeper */
|
||||
static void
|
||||
staticfn void
|
||||
rouse_shk(struct monst *shkp, boolean verbosely)
|
||||
{
|
||||
if (helpless(shkp)) {
|
||||
@@ -1368,7 +1368,7 @@ static const char
|
||||
not_enough_money[] = "Besides, you don't have enough to interest %s.";
|
||||
|
||||
/* delivers the cheapest item on the list */
|
||||
static long
|
||||
staticfn long
|
||||
cheapest_item(struct monst *shkp)
|
||||
{
|
||||
int ct = ESHK(shkp)->billct;
|
||||
@@ -1385,7 +1385,7 @@ cheapest_item(struct monst *shkp)
|
||||
|
||||
/* show items on your bill in a menu, and ask which to pay.
|
||||
returns the number of entries selected. */
|
||||
static int
|
||||
staticfn int
|
||||
menu_pick_pay_items(struct monst *shkp)
|
||||
{
|
||||
struct eshk *eshkp = ESHK(shkp);
|
||||
@@ -1819,7 +1819,7 @@ dopay(void)
|
||||
* -1 if skip this object
|
||||
* -2 if no money/credit left
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
dopayobj(
|
||||
struct monst *shkp,
|
||||
struct bill_x *bp,
|
||||
@@ -2026,7 +2026,7 @@ paybill(
|
||||
when this returns True, it should call set_repo_loc() before returning;
|
||||
when it returns False, it should not do such because that might have
|
||||
already been called for some shopkeeper */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
inherits(
|
||||
struct monst *shkp,
|
||||
int numsk,
|
||||
@@ -2131,7 +2131,7 @@ inherits(
|
||||
return taken;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
set_repo_loc(struct monst *shkp)
|
||||
{
|
||||
coordxy ox, oy;
|
||||
@@ -2208,7 +2208,7 @@ finish_paybill(void)
|
||||
}
|
||||
|
||||
/* find obj on one of the lists */
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
bp_to_obj(struct bill_x *bp)
|
||||
{
|
||||
struct obj *obj;
|
||||
@@ -2295,7 +2295,7 @@ get_cost_of_shop_item(
|
||||
return cost;
|
||||
}
|
||||
|
||||
static long
|
||||
staticfn long
|
||||
get_pricing_units(struct obj *obj)
|
||||
{
|
||||
long units = obj->quan;
|
||||
@@ -2326,7 +2326,7 @@ oid_price_adjustment(struct obj *obj, unsigned int oid)
|
||||
}
|
||||
|
||||
/* calculate the value that the shk will charge for [one of] an object */
|
||||
static long
|
||||
staticfn long
|
||||
get_cost(
|
||||
struct obj *obj,
|
||||
struct monst *shkp) /* if angry, impose a surcharge */
|
||||
@@ -2506,7 +2506,7 @@ contained_gold(
|
||||
return value;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dropped_container(
|
||||
struct obj *obj,
|
||||
struct monst *shkp,
|
||||
@@ -2545,7 +2545,7 @@ picked_container(struct obj *obj)
|
||||
}
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
special_stock(
|
||||
struct obj *obj,
|
||||
struct monst *shkp,
|
||||
@@ -2590,7 +2590,7 @@ special_stock(
|
||||
}
|
||||
|
||||
/* calculate how much the shk will pay when buying [all of] an object */
|
||||
static long
|
||||
staticfn long
|
||||
set_cost(struct obj *obj, struct monst *shkp)
|
||||
{
|
||||
long tmp, unit_price = getprice(obj, TRUE), multiplier = 1L, divisor = 1L;
|
||||
@@ -2744,7 +2744,7 @@ unpaid_cost(
|
||||
return amt;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
add_one_tobill(struct obj *obj, boolean dummy, struct monst *shkp)
|
||||
{
|
||||
struct eshk *eshkp;
|
||||
@@ -2793,7 +2793,7 @@ add_one_tobill(struct obj *obj, boolean dummy, struct monst *shkp)
|
||||
obj->unpaid = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
add_to_billobjs(struct obj *obj)
|
||||
{
|
||||
if (obj->where != OBJ_FREE)
|
||||
@@ -2814,7 +2814,7 @@ add_to_billobjs(struct obj *obj)
|
||||
}
|
||||
|
||||
/* recursive billing of objects within containers. */
|
||||
static void
|
||||
staticfn void
|
||||
bill_box_content(
|
||||
struct obj *obj,
|
||||
boolean ininv,
|
||||
@@ -2840,7 +2840,7 @@ bill_box_content(
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
/* shopkeeper tells you what you bought or sold, sometimes partly IDing it */
|
||||
static void
|
||||
staticfn void
|
||||
shk_names_obj(
|
||||
struct monst *shkp,
|
||||
struct obj *obj,
|
||||
@@ -3026,7 +3026,7 @@ addtobill(
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
append_honorific(char *buf)
|
||||
{
|
||||
/* (chooses among [0]..[3] normally; [1]..[4] after the
|
||||
@@ -3085,7 +3085,7 @@ splitbill(struct obj *obj, struct obj *otmp)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
sub_one_frombill(struct obj *obj, struct monst *shkp)
|
||||
{
|
||||
struct bill_x *bp;
|
||||
@@ -3144,7 +3144,7 @@ subfrombill(struct obj *obj, struct monst *shkp)
|
||||
}
|
||||
}
|
||||
|
||||
static long
|
||||
staticfn long
|
||||
stolen_container(
|
||||
struct obj *obj,
|
||||
struct monst *shkp,
|
||||
@@ -3700,7 +3700,7 @@ doinvbill(
|
||||
}
|
||||
|
||||
/* adjust tin, egg, or corpse price based on monster data */
|
||||
static long
|
||||
staticfn long
|
||||
corpsenm_price_adj(struct obj *obj)
|
||||
{
|
||||
long val = 0L;
|
||||
@@ -3744,7 +3744,7 @@ corpsenm_price_adj(struct obj *obj)
|
||||
return val;
|
||||
}
|
||||
|
||||
static long
|
||||
staticfn long
|
||||
getprice(struct obj *obj, boolean shk_buying)
|
||||
{
|
||||
long tmp = (long) objects[obj->otyp].oc_cost;
|
||||
@@ -3866,7 +3866,7 @@ add_damage(
|
||||
}
|
||||
|
||||
/* is shopkeeper impaired, so they cannot act? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
shk_impaired(struct monst *shkp)
|
||||
{
|
||||
if (!shkp || !shkp->isshk || !inhishop(shkp))
|
||||
@@ -3877,7 +3877,7 @@ shk_impaired(struct monst *shkp)
|
||||
}
|
||||
|
||||
/* is damage dam repairable by shopkeeper shkp? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
repairable_damage(struct damage *dam, struct monst *shkp)
|
||||
{
|
||||
coordxy x, y;
|
||||
@@ -3916,7 +3916,7 @@ repairable_damage(struct damage *dam, struct monst *shkp)
|
||||
}
|
||||
|
||||
/* find any damage shopkeeper shkp could repair. returns NULL is none found */
|
||||
static struct damage *
|
||||
staticfn struct damage *
|
||||
find_damage(struct monst *shkp)
|
||||
{
|
||||
struct damage *dam = gl.level.damagelist;
|
||||
@@ -3934,7 +3934,7 @@ find_damage(struct monst *shkp)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
discard_damage_struct(struct damage *dam)
|
||||
{
|
||||
if (!dam)
|
||||
@@ -3955,7 +3955,7 @@ discard_damage_struct(struct damage *dam)
|
||||
}
|
||||
|
||||
/* discard all damage structs owned by shopkeeper */
|
||||
static void
|
||||
staticfn void
|
||||
discard_damage_owned_by(struct monst *shkp)
|
||||
{
|
||||
struct damage *dam = gl.level.damagelist, *dam2, *prevdam = NULL;
|
||||
@@ -3982,7 +3982,7 @@ discard_damage_owned_by(struct monst *shkp)
|
||||
}
|
||||
|
||||
/* Shopkeeper tries to repair damage belonging to them */
|
||||
static void
|
||||
staticfn void
|
||||
shk_fixes_damage(struct monst *shkp)
|
||||
{
|
||||
struct damage *dam = find_damage(shkp);
|
||||
@@ -4017,7 +4017,7 @@ shk_fixes_damage(struct monst *shkp)
|
||||
shop (possibly in the "free spot" or even in doorway or an adjacent
|
||||
wall gap), but if they are in a gap in a wall shared by two shops
|
||||
they might have started in the other shop */
|
||||
static uint8
|
||||
staticfn uint8
|
||||
litter_getpos(
|
||||
uint8 *litter, /* array of 9 uint8's */
|
||||
coordxy x, coordxy y,
|
||||
@@ -4048,7 +4048,7 @@ litter_getpos(
|
||||
litter[] guarantees that items will end up inside shkp's shop, but
|
||||
if the wall being repaired is shared by two shops the items might
|
||||
have started in the other shop */
|
||||
static void
|
||||
staticfn void
|
||||
litter_scatter(
|
||||
uint8 *litter,
|
||||
coordxy x, coordxy y,
|
||||
@@ -4138,7 +4138,7 @@ litter_scatter(
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
litter_newsyms(uint8 *litter, coordxy x, coordxy y)
|
||||
{
|
||||
int i;
|
||||
@@ -4158,7 +4158,7 @@ litter_newsyms(uint8 *litter, coordxy x, coordxy y)
|
||||
* 0: repair postponed, 1: silent repair (no messages), 2: normal repair
|
||||
* 3: untrap
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
repair_damage(
|
||||
struct monst *shkp,
|
||||
struct damage *tmp_dam,
|
||||
@@ -4538,7 +4538,7 @@ shopdig(int fall)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
makekops(coord *mm)
|
||||
{
|
||||
static const short k_mndx[4] = { PM_KEYSTONE_KOP, PM_KOP_SERGEANT,
|
||||
@@ -4882,7 +4882,7 @@ price_quote(struct obj *first_obj)
|
||||
destroy_nhwindow(tmpwin);
|
||||
}
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
shk_embellish(struct obj *itm, long cost)
|
||||
{
|
||||
if (!rn2(3)) {
|
||||
@@ -5020,7 +5020,7 @@ shk_chat(struct monst *shkp)
|
||||
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
kops_gone(boolean silent)
|
||||
{
|
||||
int cnt = 0;
|
||||
@@ -5041,7 +5041,7 @@ kops_gone(boolean silent)
|
||||
plur(cnt), (cnt == 1) ? "es" : "");
|
||||
}
|
||||
|
||||
static long
|
||||
staticfn long
|
||||
cost_per_charge(
|
||||
struct monst *shkp,
|
||||
struct obj *otmp,
|
||||
@@ -5299,7 +5299,7 @@ Shk_Your(char *buf, struct obj *obj)
|
||||
return buf;
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
shk_owns(char *buf, struct obj *obj)
|
||||
{
|
||||
struct monst *shkp;
|
||||
@@ -5314,7 +5314,7 @@ shk_owns(char *buf, struct obj *obj)
|
||||
return (char *) 0;
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
mon_owns(char *buf, struct obj *obj)
|
||||
{
|
||||
if (obj->where == OBJ_MINVENT)
|
||||
@@ -5322,7 +5322,7 @@ mon_owns(char *buf, struct obj *obj)
|
||||
return (char *) 0;
|
||||
}
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
cad(
|
||||
boolean altusage) /* used as a verbalized exclamation: \"Cad! ...\" */
|
||||
{
|
||||
|
||||
+16
-16
@@ -7,14 +7,14 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static boolean stock_room_goodpos(struct mkroom *, int, int, int, int);
|
||||
static boolean veggy_item(struct obj * obj, int);
|
||||
static int shkveg(void);
|
||||
static void mkveggy_at(int, int);
|
||||
static void mkshobj_at(const struct shclass *, int, int, boolean);
|
||||
static void nameshk(struct monst *, const char *const *);
|
||||
static int good_shopdoor(struct mkroom *, coordxy *, coordxy *);
|
||||
static int shkinit(const struct shclass *, struct mkroom *);
|
||||
staticfn boolean stock_room_goodpos(struct mkroom *, int, int, int, int);
|
||||
staticfn boolean veggy_item(struct obj * obj, int);
|
||||
staticfn int shkveg(void);
|
||||
staticfn void mkveggy_at(int, int);
|
||||
staticfn void mkshobj_at(const struct shclass *, int, int, boolean);
|
||||
staticfn void nameshk(struct monst *, const char *const *);
|
||||
staticfn int good_shopdoor(struct mkroom *, coordxy *, coordxy *);
|
||||
staticfn int shkinit(const struct shclass *, struct mkroom *);
|
||||
|
||||
#define VEGETARIAN_CLASS (MAXOCLASSES + 1)
|
||||
|
||||
@@ -373,7 +373,7 @@ init_shop_selection()
|
||||
|
||||
/* decide whether an object or object type is considered vegetarian;
|
||||
for types, items which might go either way are assumed to be veggy */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
veggy_item(struct obj* obj, int otyp /* used iff obj is null */)
|
||||
{
|
||||
int corpsenm;
|
||||
@@ -401,7 +401,7 @@ veggy_item(struct obj* obj, int otyp /* used iff obj is null */)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
shkveg(void)
|
||||
{
|
||||
int i, j, maxprob, prob;
|
||||
@@ -436,7 +436,7 @@ shkveg(void)
|
||||
}
|
||||
|
||||
/* make a random item for health food store */
|
||||
static void
|
||||
staticfn void
|
||||
mkveggy_at(int sx, int sy)
|
||||
{
|
||||
struct obj *obj = mksobj_at(shkveg(), sx, sy, TRUE, TRUE);
|
||||
@@ -447,7 +447,7 @@ mkveggy_at(int sx, int sy)
|
||||
}
|
||||
|
||||
/* make an object of the appropriate type for a shop square */
|
||||
static void
|
||||
staticfn void
|
||||
mkshobj_at(const struct shclass *shp, int sx, int sy, boolean mkspecl)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -480,7 +480,7 @@ mkshobj_at(const struct shclass *shp, int sx, int sy, boolean mkspecl)
|
||||
}
|
||||
|
||||
/* extract a shopkeeper name for the given shop type */
|
||||
static void
|
||||
staticfn void
|
||||
nameshk(struct monst *shk, const char *const *nlp)
|
||||
{
|
||||
int i, trycnt, names_avail;
|
||||
@@ -574,7 +574,7 @@ free_eshk(struct monst *mtmp)
|
||||
/* find a door in room sroom which is good for shop entrance.
|
||||
returns -1 if no good door found, or the gd.doors index
|
||||
and the door coordinates in sx, sy */
|
||||
static int
|
||||
staticfn int
|
||||
good_shopdoor(struct mkroom *sroom, coordxy *sx, coordxy *sy)
|
||||
{
|
||||
int i;
|
||||
@@ -620,7 +620,7 @@ good_shopdoor(struct mkroom *sroom, coordxy *sx, coordxy *sy)
|
||||
}
|
||||
|
||||
/* create a new shopkeeper in the given room */
|
||||
static int
|
||||
staticfn int
|
||||
shkinit(const struct shclass *shp, struct mkroom *sroom)
|
||||
{
|
||||
int sh;
|
||||
@@ -683,7 +683,7 @@ shkinit(const struct shclass *shp, struct mkroom *sroom)
|
||||
return sh;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
stock_room_goodpos(struct mkroom *sroom, int rmno, int sh, int sx, int sy)
|
||||
{
|
||||
if (sroom->irregular) {
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
#include "hack.h"
|
||||
#include "artifact.h"
|
||||
|
||||
static void throne_sit_effect(void);
|
||||
static int lay_an_egg(void);
|
||||
staticfn void throne_sit_effect(void);
|
||||
staticfn int lay_an_egg(void);
|
||||
|
||||
/* take away the hero's money */
|
||||
void
|
||||
@@ -33,7 +33,7 @@ take_gold(void)
|
||||
}
|
||||
|
||||
/* maybe do something when hero sits on a throne */
|
||||
static void
|
||||
staticfn void
|
||||
throne_sit_effect(void)
|
||||
{
|
||||
if (rnd(6) > 4) {
|
||||
@@ -194,7 +194,7 @@ throne_sit_effect(void)
|
||||
}
|
||||
|
||||
/* hero lays an egg */
|
||||
static int
|
||||
staticfn int
|
||||
lay_an_egg(void)
|
||||
{
|
||||
struct obj *uegg;
|
||||
|
||||
+42
-42
@@ -4,20 +4,20 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static boolean throne_mon_sound(struct monst *);
|
||||
static boolean beehive_mon_sound(struct monst *);
|
||||
static boolean morgue_mon_sound(struct monst *);
|
||||
static boolean zoo_mon_sound(struct monst *);
|
||||
static boolean temple_priest_sound(struct monst *);
|
||||
static boolean mon_is_gecko(struct monst *);
|
||||
static int domonnoise(struct monst *);
|
||||
static int dochat(void);
|
||||
static struct monst *responsive_mon_at(int, int);
|
||||
static int mon_in_room(struct monst *, int);
|
||||
static boolean oracle_sound(struct monst *);
|
||||
staticfn boolean throne_mon_sound(struct monst *);
|
||||
staticfn boolean beehive_mon_sound(struct monst *);
|
||||
staticfn boolean morgue_mon_sound(struct monst *);
|
||||
staticfn boolean zoo_mon_sound(struct monst *);
|
||||
staticfn boolean temple_priest_sound(struct monst *);
|
||||
staticfn boolean mon_is_gecko(struct monst *);
|
||||
staticfn int domonnoise(struct monst *);
|
||||
staticfn int dochat(void);
|
||||
staticfn struct monst *responsive_mon_at(int, int);
|
||||
staticfn int mon_in_room(struct monst *, int);
|
||||
staticfn boolean oracle_sound(struct monst *);
|
||||
|
||||
/* this easily could be a macro, but it might overtax dumb compilers */
|
||||
static int
|
||||
staticfn int
|
||||
mon_in_room(struct monst *mon, int rmtyp)
|
||||
{
|
||||
int rno = levl[mon->mx][mon->my].roomno;
|
||||
@@ -27,7 +27,7 @@ mon_in_room(struct monst *mon, int rmtyp)
|
||||
}
|
||||
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
throne_mon_sound(struct monst *mtmp)
|
||||
{
|
||||
if ((mtmp->msleeping || is_lord(mtmp->data)
|
||||
@@ -59,7 +59,7 @@ throne_mon_sound(struct monst *mtmp)
|
||||
}
|
||||
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
beehive_mon_sound(struct monst *mtmp)
|
||||
{
|
||||
if ((mtmp->data->mlet == S_ANT && is_flyer(mtmp->data))
|
||||
@@ -86,7 +86,7 @@ beehive_mon_sound(struct monst *mtmp)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
morgue_mon_sound(struct monst *mtmp)
|
||||
{
|
||||
if ((is_undead(mtmp->data) || is_vampshifter(mtmp))
|
||||
@@ -112,7 +112,7 @@ morgue_mon_sound(struct monst *mtmp)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
zoo_mon_sound(struct monst *mtmp)
|
||||
{
|
||||
if ((mtmp->msleeping || is_animal(mtmp->data))
|
||||
@@ -128,7 +128,7 @@ zoo_mon_sound(struct monst *mtmp)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
temple_priest_sound(struct monst *mtmp)
|
||||
{
|
||||
if (mtmp->ispriest && inhistemple(mtmp)
|
||||
@@ -178,7 +178,7 @@ temple_priest_sound(struct monst *mtmp)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
oracle_sound(struct monst *mtmp)
|
||||
{
|
||||
if (mtmp->data != &mons[PM_ORACLE])
|
||||
@@ -655,7 +655,7 @@ cry_sound(struct monst *mtmp)
|
||||
}
|
||||
|
||||
/* return True if mon is a gecko or seems to look like one (hallucination) */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
mon_is_gecko(struct monst *mon)
|
||||
{
|
||||
int glyph;
|
||||
@@ -675,7 +675,7 @@ mon_is_gecko(struct monst *mon)
|
||||
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static int /* check calls to this */
|
||||
staticfn int /* check calls to this */
|
||||
domonnoise(struct monst *mtmp)
|
||||
{
|
||||
char verbuf[BUFSZ];
|
||||
@@ -1248,7 +1248,7 @@ dotalk(void)
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
dochat(void)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -1403,7 +1403,7 @@ dochat(void)
|
||||
}
|
||||
|
||||
/* is there a monster at <x,y> that can see the hero and react? */
|
||||
static struct monst *
|
||||
staticfn struct monst *
|
||||
responsive_mon_at(int x, int y)
|
||||
{
|
||||
struct monst *mtmp = isok(x, y) ? m_at(x, y) : 0;
|
||||
@@ -1616,7 +1616,7 @@ add_sound_mapping(const char *mapping)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static audio_mapping *
|
||||
staticfn audio_mapping *
|
||||
sound_matches_message(const char *msg)
|
||||
{
|
||||
audio_mapping *snd = soundmap;
|
||||
@@ -1796,7 +1796,7 @@ assign_soundlib(int idx)
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
staticfn void
|
||||
choose_soundlib(const char *s)
|
||||
{
|
||||
int i;
|
||||
@@ -1878,54 +1878,54 @@ get_soundlib_name(char *dest, int maxlen)
|
||||
*/
|
||||
|
||||
#if 0
|
||||
static void nosound_init_nhsound(void);
|
||||
static void nosound_exit_nhsound(const char *);
|
||||
static void nosound_suspend_nhsound(const char *);
|
||||
static void nosound_resume_nhsound(void);
|
||||
static void nosound_achievement(schar, schar, int32_t);
|
||||
static void nosound_soundeffect(int32_t, int32_t);
|
||||
static void nosound_play_usersound(char *, int32_t, int32_t);
|
||||
static void nosound_ambience(int32_t, int32_t, int32_t);
|
||||
static void nosound_verbal(char *text, int32_t gender, int32_t tone,
|
||||
staticfn void nosound_init_nhsound(void);
|
||||
staticfn void nosound_exit_nhsound(const char *);
|
||||
staticfn void nosound_suspend_nhsound(const char *);
|
||||
staticfn void nosound_resume_nhsound(void);
|
||||
staticfn void nosound_achievement(schar, schar, int32_t);
|
||||
staticfn void nosound_soundeffect(int32_t, int32_t);
|
||||
staticfn void nosound_play_usersound(char *, int32_t, int32_t);
|
||||
staticfn void nosound_ambience(int32_t, int32_t, int32_t);
|
||||
staticfn void nosound_verbal(char *text, int32_t gender, int32_t tone,
|
||||
int32_t vol, int32_t moreinfo);
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
nosound_init_nhsound(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
nosound_exit_nhsound(const char *reason)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
nosound_achievement(schar ach1, schar ach2, int32_t repeat)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
nosound_soundeffect(int32_t seid, int volume)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
nosound_hero_playnotes(int32_t instr, const char *notes, int32_t vol)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
nosound_play_usersound(char *filename, int volume, int idx)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
nosound_ambience(int32_t ambienceid, int32_t ambience_action,
|
||||
int32_t hero_proximity)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
nosound_verbal(char *text, int32_t gender, int32_t tone,
|
||||
int32_t vol, int32_t moreinfo)
|
||||
{
|
||||
@@ -1949,7 +1949,7 @@ static const struct soundeffect_automapping
|
||||
static const char *semap_basenames[SIZE(se_mappings_init)];
|
||||
static boolean basenames_initialized = FALSE;
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
initialize_semap_basenames(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
+178
-178
@@ -16,114 +16,114 @@
|
||||
|
||||
extern void mkmap(lev_init *);
|
||||
|
||||
static void solidify_map(void);
|
||||
static void map_cleanup(void);
|
||||
static void lvlfill_maze_grid(int, int, int, int, schar);
|
||||
static void lvlfill_solid(schar, schar);
|
||||
static void lvlfill_swamp(schar, schar, schar);
|
||||
static void flip_dbridge_horizontal(struct rm *);
|
||||
static void flip_dbridge_vertical(struct rm *);
|
||||
static void flip_visuals(int, int, int, int, int);
|
||||
static int flip_encoded_dir_bits(int, int);
|
||||
static void flip_vault_guard(int, struct monst *,
|
||||
staticfn void solidify_map(void);
|
||||
staticfn void map_cleanup(void);
|
||||
staticfn void lvlfill_maze_grid(int, int, int, int, schar);
|
||||
staticfn void lvlfill_solid(schar, schar);
|
||||
staticfn void lvlfill_swamp(schar, schar, schar);
|
||||
staticfn void flip_dbridge_horizontal(struct rm *);
|
||||
staticfn void flip_dbridge_vertical(struct rm *);
|
||||
staticfn void flip_visuals(int, int, int, int, int);
|
||||
staticfn int flip_encoded_dir_bits(int, int);
|
||||
staticfn void flip_vault_guard(int, struct monst *,
|
||||
coordxy, coordxy, coordxy, coordxy);
|
||||
static void sel_set_wall_property(coordxy, coordxy, genericptr_t);
|
||||
static void set_wall_property(coordxy, coordxy, coordxy, coordxy, int);
|
||||
static void remove_boundary_syms(void);
|
||||
static void set_door_orientation(int, int);
|
||||
static boolean shared_with_room(int, int, struct mkroom *);
|
||||
static void maybe_add_door(int, int, struct mkroom *);
|
||||
static void link_doors_rooms(void);
|
||||
static int rnddoor(void);
|
||||
static int rndtrap(void);
|
||||
static void get_location(coordxy *, coordxy *, getloc_flags_t,
|
||||
staticfn void sel_set_wall_property(coordxy, coordxy, genericptr_t);
|
||||
staticfn void set_wall_property(coordxy, coordxy, coordxy, coordxy, int);
|
||||
staticfn void remove_boundary_syms(void);
|
||||
staticfn void set_door_orientation(int, int);
|
||||
staticfn boolean shared_with_room(int, int, struct mkroom *);
|
||||
staticfn void maybe_add_door(int, int, struct mkroom *);
|
||||
staticfn void link_doors_rooms(void);
|
||||
staticfn int rnddoor(void);
|
||||
staticfn int rndtrap(void);
|
||||
staticfn void get_location(coordxy *, coordxy *, getloc_flags_t,
|
||||
struct mkroom *);
|
||||
static void set_ok_location_func(boolean (*)(coordxy, coordxy));
|
||||
static boolean is_ok_location(coordxy, coordxy, getloc_flags_t);
|
||||
static unpacked_coord get_unpacked_coord(long, int);
|
||||
static void get_room_loc(coordxy *, coordxy *, struct mkroom *);
|
||||
static void get_free_room_loc(coordxy *, coordxy *, struct mkroom *,
|
||||
staticfn void set_ok_location_func(boolean (*)(coordxy, coordxy));
|
||||
staticfn boolean is_ok_location(coordxy, coordxy, getloc_flags_t);
|
||||
staticfn unpacked_coord get_unpacked_coord(long, int);
|
||||
staticfn void get_room_loc(coordxy *, coordxy *, struct mkroom *);
|
||||
staticfn void get_free_room_loc(coordxy *, coordxy *, struct mkroom *,
|
||||
packed_coord);
|
||||
static boolean create_subroom(struct mkroom *, coordxy, coordxy, coordxy,
|
||||
staticfn boolean create_subroom(struct mkroom *, coordxy, coordxy, coordxy,
|
||||
coordxy, xint16, xint16);
|
||||
static void create_door(room_door *, struct mkroom *);
|
||||
static void create_trap(spltrap *, struct mkroom *);
|
||||
static int noncoalignment(aligntyp);
|
||||
static boolean m_bad_boulder_spot(coordxy, coordxy);
|
||||
static int pm_to_humidity(struct permonst *);
|
||||
static unsigned int sp_amask_to_amask(unsigned int sp_amask);
|
||||
static void create_monster(monster *, struct mkroom *);
|
||||
static struct obj *create_object(object *, struct mkroom *);
|
||||
static void create_altar(altar *, struct mkroom *);
|
||||
static boolean search_door(struct mkroom *, coordxy *, coordxy *, xint16, int);
|
||||
static void create_corridor(corridor *);
|
||||
static struct mkroom *build_room(room *, struct mkroom *);
|
||||
static void light_region(region *);
|
||||
static void maze1xy(coord *, int);
|
||||
static void fill_empty_maze(void);
|
||||
static void splev_initlev(lev_init *);
|
||||
static boolean generate_way_out_method(coordxy nx, coordxy ny,
|
||||
staticfn void create_door(room_door *, struct mkroom *);
|
||||
staticfn void create_trap(spltrap *, struct mkroom *);
|
||||
staticfn int noncoalignment(aligntyp);
|
||||
staticfn boolean m_bad_boulder_spot(coordxy, coordxy);
|
||||
staticfn int pm_to_humidity(struct permonst *);
|
||||
staticfn unsigned int sp_amask_to_amask(unsigned int sp_amask);
|
||||
staticfn void create_monster(monster *, struct mkroom *);
|
||||
staticfn struct obj *create_object(object *, struct mkroom *);
|
||||
staticfn void create_altar(altar *, struct mkroom *);
|
||||
staticfn boolean search_door(struct mkroom *, coordxy *, coordxy *, xint16, int);
|
||||
staticfn void create_corridor(corridor *);
|
||||
staticfn struct mkroom *build_room(room *, struct mkroom *);
|
||||
staticfn void light_region(region *);
|
||||
staticfn void maze1xy(coord *, int);
|
||||
staticfn void fill_empty_maze(void);
|
||||
staticfn void splev_initlev(lev_init *);
|
||||
staticfn boolean generate_way_out_method(coordxy nx, coordxy ny,
|
||||
struct selectionvar *ov);
|
||||
static void l_push_wid_hei_table(lua_State *, int, int);
|
||||
static boolean good_stair_loc(coordxy, coordxy);
|
||||
static void ensure_way_out(void);
|
||||
staticfn void l_push_wid_hei_table(lua_State *, int, int);
|
||||
staticfn boolean good_stair_loc(coordxy, coordxy);
|
||||
staticfn void ensure_way_out(void);
|
||||
|
||||
#if 0
|
||||
/* macosx complains that these are unused */
|
||||
static long sp_code_jmpaddr(long, long);
|
||||
static void spo_room(struct sp_coder *);
|
||||
static void spo_trap(struct sp_coder *);
|
||||
static void spo_gold(struct sp_coder *);
|
||||
static void spo_corridor(struct sp_coder *);
|
||||
static void spo_feature(struct sp_coder *);
|
||||
static void spo_terrain(struct sp_coder *);
|
||||
static void spo_replace_terrain(struct sp_coder *);
|
||||
static void spo_levregion(struct sp_coder *);
|
||||
static void spo_region(struct sp_coder *);
|
||||
static void spo_drawbridge(struct sp_coder *);
|
||||
static void spo_mazewalk(struct sp_coder *);
|
||||
static void spo_wall_property(struct sp_coder *);
|
||||
static void spo_room_door(struct sp_coder *);
|
||||
static void spo_wallify(struct sp_coder *);
|
||||
static void sel_set_wallify(coordxy, coordxy, genericptr_t);
|
||||
staticfn long sp_code_jmpaddr(long, long);
|
||||
staticfn void spo_room(struct sp_coder *);
|
||||
staticfn void spo_trap(struct sp_coder *);
|
||||
staticfn void spo_gold(struct sp_coder *);
|
||||
staticfn void spo_corridor(struct sp_coder *);
|
||||
staticfn void spo_feature(struct sp_coder *);
|
||||
staticfn void spo_terrain(struct sp_coder *);
|
||||
staticfn void spo_replace_terrain(struct sp_coder *);
|
||||
staticfn void spo_levregion(struct sp_coder *);
|
||||
staticfn void spo_region(struct sp_coder *);
|
||||
staticfn void spo_drawbridge(struct sp_coder *);
|
||||
staticfn void spo_mazewalk(struct sp_coder *);
|
||||
staticfn void spo_wall_property(struct sp_coder *);
|
||||
staticfn void spo_room_door(struct sp_coder *);
|
||||
staticfn void spo_wallify(struct sp_coder *);
|
||||
staticfn void sel_set_wallify(coordxy, coordxy, genericptr_t);
|
||||
#endif
|
||||
static void spo_end_moninvent(void);
|
||||
static void spo_pop_container(void);
|
||||
static int l_create_stairway(lua_State *, boolean);
|
||||
static void spo_endroom(struct sp_coder *);
|
||||
static void l_table_getset_feature_flag(lua_State *, int, int, const char *,
|
||||
staticfn void spo_end_moninvent(void);
|
||||
staticfn void spo_pop_container(void);
|
||||
staticfn int l_create_stairway(lua_State *, boolean);
|
||||
staticfn void spo_endroom(struct sp_coder *);
|
||||
staticfn void l_table_getset_feature_flag(lua_State *, int, int, const char *,
|
||||
int);
|
||||
static void l_get_lregion(lua_State *, lev_region *);
|
||||
static void sel_set_lit(coordxy, coordxy, genericptr_t);
|
||||
static void add_doors_to_room(struct mkroom *);
|
||||
static void get_table_coords_or_region(lua_State *,
|
||||
staticfn void l_get_lregion(lua_State *, lev_region *);
|
||||
staticfn void sel_set_lit(coordxy, coordxy, genericptr_t);
|
||||
staticfn void add_doors_to_room(struct mkroom *);
|
||||
staticfn void get_table_coords_or_region(lua_State *,
|
||||
coordxy *, coordxy *, coordxy *, coordxy *);
|
||||
static void sel_set_ter(coordxy, coordxy, genericptr_t);
|
||||
static void sel_set_door(coordxy, coordxy, genericptr_t);
|
||||
static void sel_set_feature(coordxy, coordxy, genericptr_t);
|
||||
static void levregion_add(lev_region *);
|
||||
static void get_table_xy_or_coord(lua_State *, lua_Integer *, lua_Integer *);
|
||||
static int get_table_region(lua_State *, const char *, lua_Integer *,
|
||||
staticfn void sel_set_ter(coordxy, coordxy, genericptr_t);
|
||||
staticfn void sel_set_door(coordxy, coordxy, genericptr_t);
|
||||
staticfn void sel_set_feature(coordxy, coordxy, genericptr_t);
|
||||
staticfn void levregion_add(lev_region *);
|
||||
staticfn void get_table_xy_or_coord(lua_State *, lua_Integer *, lua_Integer *);
|
||||
staticfn int get_table_region(lua_State *, const char *, lua_Integer *,
|
||||
lua_Integer *, lua_Integer *, lua_Integer *, boolean);
|
||||
static void set_wallprop_in_selection(lua_State *, int);
|
||||
static int floodfillchk_match_under(coordxy, coordxy);
|
||||
static int floodfillchk_match_accessible(coordxy, coordxy);
|
||||
static void l_push_mkroom_table(lua_State *, struct mkroom *);
|
||||
static int get_table_align(lua_State *);
|
||||
static int get_table_monclass(lua_State *);
|
||||
static int find_montype(lua_State *, const char *, int *);
|
||||
static int get_table_montype(lua_State *, int *);
|
||||
static lua_Integer get_table_int_or_random(lua_State *, const char *, int);
|
||||
static int get_table_buc(lua_State *);
|
||||
static int get_table_objclass(lua_State *);
|
||||
static int find_objtype(lua_State *, const char *);
|
||||
static int get_table_objtype(lua_State *);
|
||||
static const char *get_mkroom_name(int) NONNULL;
|
||||
static int get_table_roomtype_opt(lua_State *, const char *, int);
|
||||
static int get_table_traptype_opt(lua_State *, const char *, int);
|
||||
static int get_traptype_byname(const char *);
|
||||
static lua_Integer get_table_intarray_entry(lua_State *, int, int);
|
||||
static struct sp_coder *sp_level_coder_init(void);
|
||||
staticfn void set_wallprop_in_selection(lua_State *, int);
|
||||
staticfn int floodfillchk_match_under(coordxy, coordxy);
|
||||
staticfn int floodfillchk_match_accessible(coordxy, coordxy);
|
||||
staticfn void l_push_mkroom_table(lua_State *, struct mkroom *);
|
||||
staticfn int get_table_align(lua_State *);
|
||||
staticfn int get_table_monclass(lua_State *);
|
||||
staticfn int find_montype(lua_State *, const char *, int *);
|
||||
staticfn int get_table_montype(lua_State *, int *);
|
||||
staticfn lua_Integer get_table_int_or_random(lua_State *, const char *, int);
|
||||
staticfn int get_table_buc(lua_State *);
|
||||
staticfn int get_table_objclass(lua_State *);
|
||||
staticfn int find_objtype(lua_State *, const char *);
|
||||
staticfn int get_table_objtype(lua_State *);
|
||||
staticfn const char *get_mkroom_name(int) NONNULL;
|
||||
staticfn int get_table_roomtype_opt(lua_State *, const char *, int);
|
||||
staticfn int get_table_traptype_opt(lua_State *, const char *, int);
|
||||
staticfn int get_traptype_byname(const char *);
|
||||
staticfn lua_Integer get_table_intarray_entry(lua_State *, int, int);
|
||||
staticfn struct sp_coder *sp_level_coder_init(void);
|
||||
|
||||
/* lua_CFunction prototypes */
|
||||
int lspo_altar(lua_State *);
|
||||
@@ -311,7 +311,7 @@ mapfrag_match(struct mapfragment *mf, int x, int y)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
solidify_map(void)
|
||||
{
|
||||
coordxy x, y;
|
||||
@@ -324,7 +324,7 @@ solidify_map(void)
|
||||
|
||||
/* do a post-level-creation cleanup of map, such as
|
||||
removing boulders and traps from lava */
|
||||
static void
|
||||
staticfn void
|
||||
map_cleanup(void)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -355,7 +355,7 @@ map_cleanup(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
lvlfill_maze_grid(int x1, int y1, int x2, int y2, schar filling)
|
||||
{
|
||||
int x, y;
|
||||
@@ -370,7 +370,7 @@ lvlfill_maze_grid(int x1, int y1, int x2, int y2, schar filling)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
lvlfill_solid(schar filling, schar lit)
|
||||
{
|
||||
int x, y;
|
||||
@@ -387,7 +387,7 @@ lvlfill_solid(schar filling, schar lit)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
lvlfill_swamp(schar fg, schar bg, schar lit)
|
||||
{
|
||||
int x, y;
|
||||
@@ -424,7 +424,7 @@ lvlfill_swamp(schar fg, schar bg, schar lit)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
flip_dbridge_horizontal(struct rm *lev)
|
||||
{
|
||||
if (IS_DRAWBRIDGE(lev->typ)) {
|
||||
@@ -438,7 +438,7 @@ flip_dbridge_horizontal(struct rm *lev)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
flip_dbridge_vertical(struct rm *lev)
|
||||
{
|
||||
if (IS_DRAWBRIDGE(lev->typ)) {
|
||||
@@ -454,7 +454,7 @@ flip_dbridge_vertical(struct rm *lev)
|
||||
|
||||
/* for #wizfliplevel; not needed when flipping during level creation;
|
||||
update seen vector for whole flip area and glyph for known walls */
|
||||
static void
|
||||
staticfn void
|
||||
flip_visuals(int flp, int minx, int miny, int maxx, int maxy)
|
||||
{
|
||||
struct rm *lev;
|
||||
@@ -495,7 +495,7 @@ flip_visuals(int flp, int minx, int miny, int maxx, int maxy)
|
||||
}
|
||||
|
||||
/* transpose an encoded direction */
|
||||
static int
|
||||
staticfn int
|
||||
flip_encoded_dir_bits(int flp, int val)
|
||||
{
|
||||
/* these depend on xdir[] and ydir[] order */
|
||||
@@ -897,7 +897,7 @@ flip_level(
|
||||
}
|
||||
|
||||
/* for #wizfliplevel, flip guard's egd data; not needed for level creation */
|
||||
static void
|
||||
staticfn void
|
||||
flip_vault_guard(
|
||||
int flp, /* 1: transpose vertically, 2: transpose horizontally, 3: both */
|
||||
struct monst *grd, /* the vault guard, has monst->mextra->egd data */
|
||||
@@ -957,7 +957,7 @@ flip_level_rnd(int flp, boolean extras)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
sel_set_wall_property(coordxy x, coordxy y, genericptr_t arg)
|
||||
{
|
||||
int prop = *(int *) arg;
|
||||
@@ -972,7 +972,7 @@ sel_set_wall_property(coordxy x, coordxy y, genericptr_t arg)
|
||||
/*
|
||||
* Make walls of the area (x1, y1, x2, y2) non diggable/non passwall-able
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
set_wall_property(coordxy x1, coordxy y1, coordxy x2, coordxy y2, int prop)
|
||||
{
|
||||
coordxy x, y;
|
||||
@@ -987,7 +987,7 @@ set_wall_property(coordxy x1, coordxy y1, coordxy x2, coordxy y2, int prop)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
remove_boundary_syms(void)
|
||||
{
|
||||
/*
|
||||
@@ -1013,7 +1013,7 @@ remove_boundary_syms(void)
|
||||
}
|
||||
|
||||
/* used by sel_set_door() and link_doors_rooms() */
|
||||
static void
|
||||
staticfn void
|
||||
set_door_orientation(int x, int y)
|
||||
{
|
||||
boolean wleft, wright, wup, wdown;
|
||||
@@ -1060,7 +1060,7 @@ set_door_orientation(int x, int y)
|
||||
}
|
||||
|
||||
/* is x,y right next to room droom? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
shared_with_room(int x, int y, struct mkroom *droom)
|
||||
{
|
||||
int rmno = (droom - gr.rooms) + ROOMOFFSET;
|
||||
@@ -1081,7 +1081,7 @@ shared_with_room(int x, int y, struct mkroom *droom)
|
||||
}
|
||||
|
||||
/* maybe add door at x,y to room droom */
|
||||
static void
|
||||
staticfn void
|
||||
maybe_add_door(int x, int y, struct mkroom *droom)
|
||||
{
|
||||
if (droom->hx >= 0
|
||||
@@ -1093,7 +1093,7 @@ maybe_add_door(int x, int y, struct mkroom *droom)
|
||||
}
|
||||
|
||||
/* link all doors in the map to their corresponding rooms */
|
||||
static void
|
||||
staticfn void
|
||||
link_doors_rooms(void)
|
||||
{
|
||||
int x, y;
|
||||
@@ -1119,7 +1119,7 @@ link_doors_rooms(void)
|
||||
/*
|
||||
* Choose randomly the state (nodoor, open, closed or locked) for a door
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
rnddoor(void)
|
||||
{
|
||||
static int state[] = { D_NODOOR, D_BROKEN, D_ISOPEN, D_CLOSED, D_LOCKED };
|
||||
@@ -1130,7 +1130,7 @@ rnddoor(void)
|
||||
/*
|
||||
* Select a random trap
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
rndtrap(void)
|
||||
{
|
||||
int rtrap;
|
||||
@@ -1173,7 +1173,7 @@ rndtrap(void)
|
||||
* The "humidity" flag is used to ensure that engravings aren't created
|
||||
* underwater, or eels on dry land.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
get_location(
|
||||
coordxy *x, coordxy *y,
|
||||
getloc_flags_t humidity,
|
||||
@@ -1245,13 +1245,13 @@ get_location(
|
||||
|
||||
static boolean (*is_ok_location_func)(coordxy, coordxy) = NULL;
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
set_ok_location_func(boolean (*func)(coordxy, coordxy))
|
||||
{
|
||||
is_ok_location_func = func;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
is_ok_location(coordxy x, coordxy y, getloc_flags_t humidity)
|
||||
{
|
||||
int typ = levl[x][y].typ;
|
||||
@@ -1288,7 +1288,7 @@ pm_good_location(coordxy x, coordxy y, struct permonst *pm)
|
||||
return is_ok_location(x, y, pm_to_humidity(pm));
|
||||
}
|
||||
|
||||
static unpacked_coord
|
||||
staticfn unpacked_coord
|
||||
get_unpacked_coord(long loc, int defhumidity)
|
||||
{
|
||||
static unpacked_coord c;
|
||||
@@ -1331,7 +1331,7 @@ get_location_coord(
|
||||
* Get a relative position inside a room.
|
||||
* negative values for x or y means RANDOM!
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
get_room_loc(coordxy *x, coordxy *y, struct mkroom *croom)
|
||||
{
|
||||
coord c;
|
||||
@@ -1356,7 +1356,7 @@ get_room_loc(coordxy *x, coordxy *y, struct mkroom *croom)
|
||||
* Get a relative position inside a room.
|
||||
* negative values for x or y means RANDOM!
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
get_free_room_loc(
|
||||
coordxy *x, coordxy *y,
|
||||
struct mkroom *croom,
|
||||
@@ -1638,7 +1638,7 @@ create_room(
|
||||
* Create a subroom in room proom at pos x,y with width w & height h.
|
||||
* x & y are relative to the parent room.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
create_subroom(
|
||||
struct mkroom *proom,
|
||||
coordxy x, coordxy y,
|
||||
@@ -1684,7 +1684,7 @@ create_subroom(
|
||||
* Create a new door in a room.
|
||||
* It's placed on a wall (north, south, east or west).
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
create_door(room_door *dd, struct mkroom *broom)
|
||||
{
|
||||
int x = 0, y = 0;
|
||||
@@ -1782,7 +1782,7 @@ create_door(room_door *dd, struct mkroom *broom)
|
||||
/*
|
||||
* Create a trap in a room.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
create_trap(spltrap *t, struct mkroom *croom)
|
||||
{
|
||||
coordxy x = -1, y = -1;
|
||||
@@ -1822,7 +1822,7 @@ create_trap(spltrap *t, struct mkroom *croom)
|
||||
/*
|
||||
* Create a monster in a room.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
noncoalignment(aligntyp alignment)
|
||||
{
|
||||
int k;
|
||||
@@ -1834,7 +1834,7 @@ noncoalignment(aligntyp alignment)
|
||||
}
|
||||
|
||||
/* attempt to screen out locations where a mimic-as-boulder shouldn't occur */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
m_bad_boulder_spot(coordxy x, coordxy y)
|
||||
{
|
||||
struct rm *lev;
|
||||
@@ -1854,7 +1854,7 @@ m_bad_boulder_spot(coordxy x, coordxy y)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
pm_to_humidity(struct permonst *pm)
|
||||
{
|
||||
int loc = DRY;
|
||||
@@ -1878,7 +1878,7 @@ pm_to_humidity(struct permonst *pm)
|
||||
*
|
||||
* When random: there is an 80% chance that the altar will be co-aligned.
|
||||
*/
|
||||
static unsigned int
|
||||
staticfn unsigned int
|
||||
sp_amask_to_amask(unsigned int sp_amask)
|
||||
{
|
||||
unsigned int amask;
|
||||
@@ -1895,7 +1895,7 @@ sp_amask_to_amask(unsigned int sp_amask)
|
||||
return amask;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
create_monster(monster *m, struct mkroom *croom)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -2149,7 +2149,7 @@ create_monster(monster *m, struct mkroom *croom)
|
||||
/*
|
||||
* Create an object in a room.
|
||||
*/
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
create_object(object *o, struct mkroom *croom)
|
||||
{
|
||||
struct obj *otmp;
|
||||
@@ -2400,7 +2400,7 @@ create_object(object *o, struct mkroom *croom)
|
||||
/*
|
||||
* Create an altar in a room.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
create_altar(altar *a, struct mkroom *croom)
|
||||
{
|
||||
schar sproom;
|
||||
@@ -2446,7 +2446,7 @@ create_altar(altar *a, struct mkroom *croom)
|
||||
/*
|
||||
* Search for a door in a room on a specified wall.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
search_door(
|
||||
struct mkroom *croom,
|
||||
coordxy *x, coordxy *y,
|
||||
@@ -2618,7 +2618,7 @@ dig_corridor(
|
||||
* Basically we search for door coordinates or for endpoints coordinates
|
||||
* (from a distance).
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
create_corridor(corridor *c)
|
||||
{
|
||||
coord org, dest;
|
||||
@@ -2754,7 +2754,7 @@ fill_special_room(struct mkroom *croom)
|
||||
}
|
||||
}
|
||||
|
||||
static struct mkroom *
|
||||
staticfn struct mkroom *
|
||||
build_room(room *r, struct mkroom *mkr)
|
||||
{
|
||||
boolean okroom;
|
||||
@@ -2786,7 +2786,7 @@ build_room(room *r, struct mkroom *mkr)
|
||||
/*
|
||||
* set lighting in a region that will not become a room.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
light_region(region *tmpregion)
|
||||
{
|
||||
boolean litstate = tmpregion->rlit ? 1 : 0;
|
||||
@@ -2847,7 +2847,7 @@ wallify_map(coordxy x1, coordxy y1, coordxy x2, coordxy y2)
|
||||
* We want a place not 'touched' by the loader. That is, a place in
|
||||
* the maze outside every part of the special level.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
maze1xy(coord *m, int humidity)
|
||||
{
|
||||
int x, y, tryct = 2000;
|
||||
@@ -2873,7 +2873,7 @@ maze1xy(coord *m, int humidity)
|
||||
* Makes the number of traps, monsters, etc. proportional
|
||||
* to the size of the maze.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
fill_empty_maze(void)
|
||||
{
|
||||
int mapcountmax, mapcount, mapfact;
|
||||
@@ -2924,7 +2924,7 @@ fill_empty_maze(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
splev_initlev(lev_init *linit)
|
||||
{
|
||||
switch (linit->init_style) {
|
||||
@@ -2964,7 +2964,7 @@ splev_initlev(lev_init *linit)
|
||||
}
|
||||
|
||||
#if 0
|
||||
static long
|
||||
staticfn long
|
||||
sp_code_jmpaddr(long curpos, long jmpaddr)
|
||||
{
|
||||
return (curpos + jmpaddr);
|
||||
@@ -2973,7 +2973,7 @@ sp_code_jmpaddr(long curpos, long jmpaddr)
|
||||
|
||||
|
||||
/*ARGUSED*/
|
||||
static void
|
||||
staticfn void
|
||||
spo_end_moninvent(void)
|
||||
{
|
||||
if (invent_carrying_monster)
|
||||
@@ -2982,7 +2982,7 @@ spo_end_moninvent(void)
|
||||
}
|
||||
|
||||
/*ARGUSED*/
|
||||
static void
|
||||
staticfn void
|
||||
spo_pop_container(void)
|
||||
{
|
||||
if (container_idx > 0) {
|
||||
@@ -2992,7 +2992,7 @@ spo_pop_container(void)
|
||||
}
|
||||
|
||||
/* push a table on lua stack: {width=wid, height=hei} */
|
||||
static void
|
||||
staticfn void
|
||||
l_push_wid_hei_table(lua_State *L, int wid, int hei)
|
||||
{
|
||||
lua_newtable(L);
|
||||
@@ -3001,7 +3001,7 @@ l_push_wid_hei_table(lua_State *L, int wid, int hei)
|
||||
}
|
||||
|
||||
/* push a table on lua stack containing room data */
|
||||
static void
|
||||
staticfn void
|
||||
l_push_mkroom_table(lua_State *L, struct mkroom *tmpr)
|
||||
{
|
||||
lua_newtable(L);
|
||||
@@ -3056,7 +3056,7 @@ lspo_message(lua_State *L)
|
||||
|
||||
RESTORE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
get_table_align(lua_State *L)
|
||||
{
|
||||
static const char *const gtaligns[] = {
|
||||
@@ -3073,7 +3073,7 @@ get_table_align(lua_State *L)
|
||||
return a;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
get_table_monclass(lua_State *L)
|
||||
{
|
||||
char *s = get_table_str_opt(L, "class", NULL);
|
||||
@@ -3085,7 +3085,7 @@ get_table_monclass(lua_State *L)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
find_montype(
|
||||
lua_State *L UNUSED,
|
||||
const char *s,
|
||||
@@ -3109,7 +3109,7 @@ find_montype(
|
||||
return NON_PM;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
get_table_montype(lua_State *L, int *mgender)
|
||||
{
|
||||
char *s = get_table_str_opt(L, "id", NULL);
|
||||
@@ -3130,7 +3130,7 @@ get_table_montype(lua_State *L, int *mgender)
|
||||
* Returns absolute rather than map-relative coordinates; the caller of this
|
||||
* function must decide if it wants to interpret the coordinates as
|
||||
* map-relative and adjust accordingly. */
|
||||
static void
|
||||
staticfn void
|
||||
get_table_xy_or_coord(
|
||||
lua_State *L,
|
||||
lua_Integer *x,
|
||||
@@ -3332,7 +3332,7 @@ DISABLE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
/* the hash key 'name' is an integer or "random",
|
||||
or if not existent, also return rndval */
|
||||
static lua_Integer
|
||||
staticfn lua_Integer
|
||||
get_table_int_or_random(lua_State *L, const char *name, int rndval)
|
||||
{
|
||||
lua_Integer ret;
|
||||
@@ -3367,7 +3367,7 @@ get_table_int_or_random(lua_State *L, const char *name, int rndval)
|
||||
|
||||
RESTORE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
get_table_buc(lua_State *L)
|
||||
{
|
||||
static const char *const bucs[] = {
|
||||
@@ -3380,7 +3380,7 @@ get_table_buc(lua_State *L)
|
||||
return curse_state;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
get_table_objclass(lua_State *L)
|
||||
{
|
||||
char *s = get_table_str_opt(L, "class", NULL);
|
||||
@@ -3392,7 +3392,7 @@ get_table_objclass(lua_State *L)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
find_objtype(lua_State *L, const char *s)
|
||||
{
|
||||
if (s && *s) {
|
||||
@@ -3460,7 +3460,7 @@ find_objtype(lua_State *L, const char *s)
|
||||
return STRANGE_OBJECT;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
get_table_objtype(lua_State *L)
|
||||
{
|
||||
char *s = get_table_str_opt(L, "id", NULL);
|
||||
@@ -3909,7 +3909,7 @@ static const struct {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
get_mkroom_name(int rtype)
|
||||
{
|
||||
int i;
|
||||
@@ -3922,7 +3922,7 @@ get_mkroom_name(int rtype)
|
||||
return "unknown"; /* not NULL */
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
get_table_roomtype_opt(lua_State *L, const char *name, int defval)
|
||||
{
|
||||
char *roomstr = get_table_str_opt(L, name, emptystr);
|
||||
@@ -4037,7 +4037,7 @@ lspo_room(lua_State *L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
spo_endroom(struct sp_coder *coder UNUSED)
|
||||
{
|
||||
if (gc.coder->n_subroom > 1) {
|
||||
@@ -4057,7 +4057,7 @@ spo_endroom(struct sp_coder *coder UNUSED)
|
||||
|
||||
/* callback for is_ok_location.
|
||||
stairs generated at random location shouldn't overwrite special terrain */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
good_stair_loc(coordxy x, coordxy y)
|
||||
{
|
||||
schar typ = levl[x][y].typ;
|
||||
@@ -4065,7 +4065,7 @@ good_stair_loc(coordxy x, coordxy y)
|
||||
return (typ == ROOM || typ == CORR || typ == ICE);
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
l_create_stairway(lua_State *L, boolean using_ladder)
|
||||
{
|
||||
static const char *const stairdirs[] = { "down", "up", NULL };
|
||||
@@ -4268,7 +4268,7 @@ static const struct {
|
||||
{ "random", -1 },
|
||||
{ 0, NO_TRAP } };
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
get_table_traptype_opt(lua_State *L, const char *name, int defval)
|
||||
{
|
||||
char *trapstr = get_table_str_opt(L, name, emptystr);
|
||||
@@ -4297,7 +4297,7 @@ get_trapname_bytype(int ttyp)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
get_traptype_byname(const char *trapname)
|
||||
{
|
||||
int i;
|
||||
@@ -4493,7 +4493,7 @@ random_wdir(void)
|
||||
|
||||
static schar floodfillchk_match_under_typ;
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
floodfillchk_match_under(coordxy x, coordxy y)
|
||||
{
|
||||
return (floodfillchk_match_under_typ == levl[x][y].typ);
|
||||
@@ -4506,7 +4506,7 @@ set_floodfillchk_match_under(coordxy typ)
|
||||
set_selection_floodfillchk(floodfillchk_match_under);
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
floodfillchk_match_accessible(coordxy x, coordxy y)
|
||||
{
|
||||
return (ACCESSIBLE(levl[x][y].typ)
|
||||
@@ -4515,7 +4515,7 @@ floodfillchk_match_accessible(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* change map location terrain type during level creation */
|
||||
static void
|
||||
staticfn void
|
||||
sel_set_ter(coordxy x, coordxy y, genericptr_t arg)
|
||||
{
|
||||
terrain terr;
|
||||
@@ -4539,7 +4539,7 @@ sel_set_ter(coordxy x, coordxy y, genericptr_t arg)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
sel_set_feature(coordxy x, coordxy y, genericptr_t arg)
|
||||
{
|
||||
if (!isok(x, y)) {
|
||||
@@ -4553,7 +4553,7 @@ sel_set_feature(coordxy x, coordxy y, genericptr_t arg)
|
||||
levl[x][y].typ = (*(int *) arg);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
sel_set_door(coordxy dx, coordxy dy, genericptr_t arg)
|
||||
{
|
||||
coordxy typ = *(coordxy *) arg;
|
||||
@@ -4644,7 +4644,7 @@ lspo_door(lua_State *L)
|
||||
|
||||
RESTORE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
l_table_getset_feature_flag(
|
||||
lua_State *L,
|
||||
int x, int y,
|
||||
@@ -5051,7 +5051,7 @@ lspo_replace_terrain(lua_State *L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
generate_way_out_method(
|
||||
coordxy nx, coordxy ny,
|
||||
struct selectionvar *ov)
|
||||
@@ -5122,7 +5122,7 @@ generate_way_out_method(
|
||||
return res;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
ensure_way_out(void)
|
||||
{
|
||||
struct selectionvar *ov = selection_new();
|
||||
@@ -5165,7 +5165,7 @@ ensure_way_out(void)
|
||||
|
||||
DISABLE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
static lua_Integer
|
||||
staticfn lua_Integer
|
||||
get_table_intarray_entry(lua_State *L, int tableidx, int entrynum)
|
||||
{
|
||||
lua_Integer ret = 0;
|
||||
@@ -5187,7 +5187,7 @@ get_table_intarray_entry(lua_State *L, int tableidx, int entrynum)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
get_table_region(
|
||||
lua_State *L,
|
||||
const char *name,
|
||||
@@ -5276,7 +5276,7 @@ get_coord(lua_State *L, int i, lua_Integer *x, lua_Integer *y)
|
||||
|
||||
RESTORE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
levregion_add(lev_region *lregion)
|
||||
{
|
||||
if (!lregion->in_islev) {
|
||||
@@ -5315,7 +5315,7 @@ levregion_add(lev_region *lregion)
|
||||
- exclude = {x1,y1,x2,y2} (optional)
|
||||
- region_islev=true, exclude_islev=true (optional)
|
||||
- negative x and y are invalid */
|
||||
static void
|
||||
staticfn void
|
||||
l_get_lregion(lua_State *L, lev_region *tmplregion)
|
||||
{
|
||||
lua_Integer x1,y1,x2,y2;
|
||||
@@ -5431,7 +5431,7 @@ lspo_exclusion(lua_State *L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
sel_set_lit(coordxy x, coordxy y, genericptr_t arg)
|
||||
{
|
||||
int lit = *(int *) arg;
|
||||
@@ -5440,7 +5440,7 @@ sel_set_lit(coordxy x, coordxy y, genericptr_t arg)
|
||||
}
|
||||
|
||||
/* Add to the room any doors within/bordering it */
|
||||
static void
|
||||
staticfn void
|
||||
add_doors_to_room(struct mkroom *croom)
|
||||
{
|
||||
coordxy x, y;
|
||||
@@ -5457,7 +5457,7 @@ add_doors_to_room(struct mkroom *croom)
|
||||
DISABLE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
/* inside a lua table, get fields x1,y1,x2,y2 or region table */
|
||||
static void
|
||||
staticfn void
|
||||
get_table_coords_or_region(lua_State *L,
|
||||
coordxy *dx1, coordxy *dy1,
|
||||
coordxy *dx2, coordxy *dy2)
|
||||
@@ -5807,7 +5807,7 @@ lspo_wall_property(lua_State *L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
set_wallprop_in_selection(lua_State *L, int prop)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -5851,7 +5851,7 @@ lspo_non_passwall(lua_State *L)
|
||||
|
||||
#if 0
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
staticfn void
|
||||
sel_set_wallify(coordxy x, coordxy y, genericptr_t arg UNUSED)
|
||||
{
|
||||
wallify_map(x, y, x, y);
|
||||
@@ -6227,7 +6227,7 @@ update_croom(void)
|
||||
gc.coder->croom = NULL;
|
||||
}
|
||||
|
||||
static struct sp_coder *
|
||||
staticfn struct sp_coder *
|
||||
sp_level_coder_init(void)
|
||||
{
|
||||
int tmpi;
|
||||
|
||||
+48
-48
@@ -28,30 +28,30 @@
|
||||
struct chain_lightning_queue;
|
||||
struct chain_lightning_zap;
|
||||
|
||||
static int spell_let_to_idx(char);
|
||||
static boolean cursed_book(struct obj * bp);
|
||||
static boolean confused_book(struct obj *);
|
||||
static void deadbook_pacify_undead(struct monst *);
|
||||
static void deadbook(struct obj *);
|
||||
static int learn(void);
|
||||
static boolean rejectcasting(void);
|
||||
static boolean getspell(int *);
|
||||
static int QSORTCALLBACK spell_cmp(const genericptr, const genericptr);
|
||||
static void sortspells(void);
|
||||
static boolean spellsortmenu(void);
|
||||
static boolean dospellmenu(const char *, int, int *);
|
||||
static int percent_success(int);
|
||||
static char *spellretention(int, char *);
|
||||
static int throwspell(void);
|
||||
static void cast_protection(void);
|
||||
static void cast_chain_lightning(void);
|
||||
static void spell_backfire(int);
|
||||
static boolean spelleffects_check(int, int *, int *);
|
||||
static const char *spelltypemnemonic(int);
|
||||
static boolean can_center_spell_location(coordxy, coordxy);
|
||||
static void display_spell_target_positions(boolean);
|
||||
static boolean spell_aim_step(genericptr_t, coordxy, coordxy);
|
||||
static void propagate_chain_lightning(struct chain_lightning_queue *,
|
||||
staticfn int spell_let_to_idx(char);
|
||||
staticfn boolean cursed_book(struct obj * bp);
|
||||
staticfn boolean confused_book(struct obj *);
|
||||
staticfn void deadbook_pacify_undead(struct monst *);
|
||||
staticfn void deadbook(struct obj *);
|
||||
staticfn int learn(void);
|
||||
staticfn boolean rejectcasting(void);
|
||||
staticfn boolean getspell(int *);
|
||||
staticfn int QSORTCALLBACK spell_cmp(const genericptr, const genericptr);
|
||||
staticfn void sortspells(void);
|
||||
staticfn boolean spellsortmenu(void);
|
||||
staticfn boolean dospellmenu(const char *, int, int *);
|
||||
staticfn int percent_success(int);
|
||||
staticfn char *spellretention(int, char *);
|
||||
staticfn int throwspell(void);
|
||||
staticfn void cast_protection(void);
|
||||
staticfn void cast_chain_lightning(void);
|
||||
staticfn void spell_backfire(int);
|
||||
staticfn boolean spelleffects_check(int, int *, int *);
|
||||
staticfn const char *spelltypemnemonic(int);
|
||||
staticfn boolean can_center_spell_location(coordxy, coordxy);
|
||||
staticfn void display_spell_target_positions(boolean);
|
||||
staticfn boolean spell_aim_step(genericptr_t, coordxy, coordxy);
|
||||
staticfn void propagate_chain_lightning(struct chain_lightning_queue *,
|
||||
struct chain_lightning_zap);
|
||||
|
||||
/* The roles[] table lists the role-specific values for tuning
|
||||
@@ -110,7 +110,7 @@ static void propagate_chain_lightning(struct chain_lightning_queue *,
|
||||
static const char explodes[] = "radiates explosive energy";
|
||||
|
||||
/* convert a letter into a number in the range 0..51, or -1 if not a letter */
|
||||
static int
|
||||
staticfn int
|
||||
spell_let_to_idx(char ilet)
|
||||
{
|
||||
int indx;
|
||||
@@ -125,7 +125,7 @@ spell_let_to_idx(char ilet)
|
||||
}
|
||||
|
||||
/* TRUE: book should be destroyed by caller */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
cursed_book(struct obj *bp)
|
||||
{
|
||||
boolean was_in_use;
|
||||
@@ -184,7 +184,7 @@ cursed_book(struct obj *bp)
|
||||
}
|
||||
|
||||
/* study while confused: returns TRUE if the book is destroyed */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
confused_book(struct obj *spellbook)
|
||||
{
|
||||
boolean gone = FALSE;
|
||||
@@ -206,7 +206,7 @@ confused_book(struct obj *spellbook)
|
||||
}
|
||||
|
||||
/* pacify or tame an undead monster */
|
||||
static void
|
||||
staticfn void
|
||||
deadbook_pacify_undead(struct monst *mtmp)
|
||||
{
|
||||
if ((is_undead(mtmp->data) || is_vampshifter(mtmp))
|
||||
@@ -226,7 +226,7 @@ deadbook_pacify_undead(struct monst *mtmp)
|
||||
|
||||
/* special effects for The Book of the Dead; reading it while blind is
|
||||
allowed so that needs to be taken into account too */
|
||||
static void
|
||||
staticfn void
|
||||
deadbook(struct obj *book2)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -352,7 +352,7 @@ book_cursed(struct obj *book)
|
||||
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
learn(void)
|
||||
{
|
||||
int i;
|
||||
@@ -669,7 +669,7 @@ age_spells(void)
|
||||
|
||||
/* return True if spellcasting is inhibited;
|
||||
only covers a small subset of reasons why casting won't work */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
rejectcasting(void)
|
||||
{
|
||||
/* rejections which take place before selecting a particular spell */
|
||||
@@ -697,7 +697,7 @@ rejectcasting(void)
|
||||
* Return TRUE if a spell was picked, with the spell index in the return
|
||||
* parameter. Otherwise return FALSE.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
getspell(int *spell_no)
|
||||
{
|
||||
int nspells, idx;
|
||||
@@ -808,7 +808,7 @@ docast(void)
|
||||
return ECMD_FAIL;
|
||||
}
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
spelltypemnemonic(int skill)
|
||||
{
|
||||
switch (skill) {
|
||||
@@ -922,7 +922,7 @@ struct chain_lightning_queue {
|
||||
|
||||
zap is passed by value, so the move-forward doesn't change the passed
|
||||
argument. */
|
||||
static void
|
||||
staticfn void
|
||||
propagate_chain_lightning(
|
||||
struct chain_lightning_queue *clq,
|
||||
struct chain_lightning_zap zap)
|
||||
@@ -973,7 +973,7 @@ propagate_chain_lightning(
|
||||
tmp_at(zap.x, zap.y);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
cast_chain_lightning(void)
|
||||
{
|
||||
struct chain_lightning_queue clq = {
|
||||
@@ -1054,7 +1054,7 @@ cast_chain_lightning(void)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
cast_protection(void)
|
||||
{
|
||||
int l = u.ulevel, loglev = 0,
|
||||
@@ -1131,7 +1131,7 @@ cast_protection(void)
|
||||
}
|
||||
|
||||
/* attempting to cast a forgotten spell will cause disorientation */
|
||||
static void
|
||||
staticfn void
|
||||
spell_backfire(int spell)
|
||||
{
|
||||
long duration = (long) ((spellev(spell) + 1) * 3), /* 6..24 */
|
||||
@@ -1170,7 +1170,7 @@ spell_backfire(int spell)
|
||||
return;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
spelleffects_check(int spell, int *res, int *energy)
|
||||
{
|
||||
int chance;
|
||||
@@ -1542,7 +1542,7 @@ spelleffects(int spell_otyp, boolean atme, boolean force)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
spell_aim_step(genericptr_t arg UNUSED, coordxy x, coordxy y)
|
||||
{
|
||||
if (!isok(x,y))
|
||||
@@ -1554,7 +1554,7 @@ spell_aim_step(genericptr_t arg UNUSED, coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* not quite the same as throwspell limits, but close enough */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
can_center_spell_location(coordxy x, coordxy y)
|
||||
{
|
||||
if (distmin(u.ux, u.uy, x, y) > 10)
|
||||
@@ -1562,7 +1562,7 @@ can_center_spell_location(coordxy x, coordxy y)
|
||||
return (isok(x, y) && cansee(x, y) && !(IS_STWALL(levl[x][y].typ)));
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
display_spell_target_positions(boolean on_off)
|
||||
{
|
||||
coordxy x, y, dx, dy;
|
||||
@@ -1590,7 +1590,7 @@ display_spell_target_positions(boolean on_off)
|
||||
}
|
||||
|
||||
/* Choose location where spell takes effect. */
|
||||
static int
|
||||
staticfn int
|
||||
throwspell(void)
|
||||
{
|
||||
coord cc, uc;
|
||||
@@ -1805,7 +1805,7 @@ static const char *const spl_sortchoices[NUM_SPELL_SORTBY] = {
|
||||
};
|
||||
|
||||
/* qsort callback routine */
|
||||
static int QSORTCALLBACK
|
||||
staticfn int QSORTCALLBACK
|
||||
spell_cmp(const genericptr vptr1, const genericptr vptr2)
|
||||
{
|
||||
/*
|
||||
@@ -1862,7 +1862,7 @@ spell_cmp(const genericptr vptr1, const genericptr vptr2)
|
||||
/* sort the index used for display order of the "view known spells"
|
||||
list (sortmode == SORTBY_xxx), or sort the spellbook itself to make
|
||||
the current display order stick (sortmode == SORTRETAINORDER) */
|
||||
static void
|
||||
staticfn void
|
||||
sortspells(void)
|
||||
{
|
||||
int i;
|
||||
@@ -1911,7 +1911,7 @@ sortspells(void)
|
||||
}
|
||||
|
||||
/* called if the [sort spells] entry in the view spells menu gets chosen */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
spellsortmenu(void)
|
||||
{
|
||||
winid tmpwin;
|
||||
@@ -1996,7 +1996,7 @@ DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
/* shows menu of known spells, with options to sort them.
|
||||
return FALSE on cancel, TRUE otherwise.
|
||||
spell_no is set to the internal spl_book index, if any selected */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
dospellmenu(
|
||||
const char *prompt,
|
||||
int splaction, /* SPELLMENU_CAST, SPELLMENU_VIEW, or gs.spl_book[] index */
|
||||
@@ -2089,7 +2089,7 @@ dospellmenu(
|
||||
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
percent_success(int spell)
|
||||
{
|
||||
/* Intrinsic and learned ability are combined to calculate
|
||||
@@ -2211,7 +2211,7 @@ percent_success(int spell)
|
||||
return chance;
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
spellretention(int idx, char * outbuf)
|
||||
{
|
||||
long turnsleft, percent, accuracy;
|
||||
|
||||
+8
-8
@@ -5,12 +5,12 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static const char *equipname(struct obj *);
|
||||
static int unstolenarm(void);
|
||||
static int stealarm(void);
|
||||
static void worn_item_removal(struct monst *, struct obj *);
|
||||
staticfn const char *equipname(struct obj *);
|
||||
staticfn int unstolenarm(void);
|
||||
staticfn int stealarm(void);
|
||||
staticfn void worn_item_removal(struct monst *, struct obj *);
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
equipname(struct obj *otmp)
|
||||
{
|
||||
return ((otmp == uarmu) ? shirt_simple_name(otmp)
|
||||
@@ -156,7 +156,7 @@ unresponsive(void)
|
||||
|
||||
/* called via (*ga.afternmv)() when hero finishes taking off armor that
|
||||
was slated to be stolen but the thief died in the interim */
|
||||
static int
|
||||
staticfn int
|
||||
unstolenarm(void)
|
||||
{
|
||||
struct obj *obj;
|
||||
@@ -174,7 +174,7 @@ unstolenarm(void)
|
||||
}
|
||||
|
||||
/* finish stealing an item of armor which takes multiple turns to take off */
|
||||
static int
|
||||
staticfn int
|
||||
stealarm(void)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -313,7 +313,7 @@ remove_worn_item(
|
||||
}
|
||||
|
||||
/* during theft of a worn item: remove_worn_item(), prefaced by a message */
|
||||
static void
|
||||
staticfn void
|
||||
worn_item_removal(
|
||||
struct monst *mon,
|
||||
struct obj *obj)
|
||||
|
||||
+4
-4
@@ -9,8 +9,8 @@ static NEARDATA const char steeds[] = { S_QUADRUPED, S_UNICORN, S_ANGEL,
|
||||
S_CENTAUR, S_DRAGON, S_JABBERWOCK,
|
||||
'\0' };
|
||||
|
||||
static boolean landing_spot(coord *, int, int);
|
||||
static void maybewakesteed(struct monst *);
|
||||
staticfn boolean landing_spot(coord *, int, int);
|
||||
staticfn void maybewakesteed(struct monst *);
|
||||
|
||||
/* caller has decided that hero can't reach something while mounted */
|
||||
void
|
||||
@@ -444,7 +444,7 @@ kick_steed(void)
|
||||
* room's walls, which is not what we want.
|
||||
* Adapted from mail daemon code.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
landing_spot(
|
||||
coord *spot, /* landing position (we fill it in) */
|
||||
int reason,
|
||||
@@ -810,7 +810,7 @@ dismount_steed(
|
||||
|
||||
/* when attempting to saddle or mount a sleeping steed, try to wake it up
|
||||
(for the saddling case, it won't be u.usteed yet) */
|
||||
static void
|
||||
staticfn void
|
||||
maybewakesteed(struct monst *steed)
|
||||
{
|
||||
int frozen = (int) steed->mfrozen;
|
||||
|
||||
+2
-2
@@ -97,11 +97,11 @@ Strlen_(
|
||||
return (unsigned) len;
|
||||
}
|
||||
|
||||
static boolean pmatch_internal(const char *, const char *, boolean,
|
||||
staticfn boolean pmatch_internal(const char *, const char *, boolean,
|
||||
const char *);
|
||||
/* guts of pmatch(), pmatchi(), and pmatchz();
|
||||
match a string against a pattern */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
pmatch_internal(const char *patrn, const char *strng,
|
||||
boolean ci, /* True => case-insensitive,
|
||||
False => case-sensitive */
|
||||
|
||||
+8
-8
@@ -5,10 +5,10 @@
|
||||
#include "hack.h"
|
||||
#include "tcap.h"
|
||||
|
||||
static void savedsym_add(const char *, const char *, int);
|
||||
static struct _savedsym *savedsym_find(const char *, int);
|
||||
staticfn void savedsym_add(const char *, const char *, int);
|
||||
staticfn struct _savedsym *savedsym_find(const char *, int);
|
||||
#ifdef ENHANCED_SYMBOLS
|
||||
static void purge_custom_entries(enum graphics_sets which_set);
|
||||
staticfn void purge_custom_entries(enum graphics_sets which_set);
|
||||
#endif
|
||||
|
||||
extern const uchar def_r_oc_syms[MAXOCLASSES]; /* drawing.c */
|
||||
@@ -717,7 +717,7 @@ savedsym_free(void)
|
||||
}
|
||||
}
|
||||
|
||||
static struct _savedsym *
|
||||
staticfn struct _savedsym *
|
||||
savedsym_find(const char *name, int which_set)
|
||||
{
|
||||
struct _savedsym *tmp = saved_symbols;
|
||||
@@ -730,7 +730,7 @@ savedsym_find(const char *name, int which_set)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
savedsym_add(const char *name, const char *val, int which_set)
|
||||
{
|
||||
struct _savedsym *tmp = NULL;
|
||||
@@ -1114,7 +1114,7 @@ struct customization_detail *find_display_urep_customization(
|
||||
const char *customization_name, int glyphidx,
|
||||
enum graphics_sets which_set);
|
||||
extern glyph_map glyphmap[MAX_GLYPH];
|
||||
static void shuffle_customizations(void);
|
||||
staticfn void shuffle_customizations(void);
|
||||
|
||||
void
|
||||
apply_customizations_to_symset(enum graphics_sets which_set)
|
||||
@@ -1142,7 +1142,7 @@ apply_customizations_to_symset(enum graphics_sets which_set)
|
||||
/* Shuffle the customizations to match shuffled object descriptions,
|
||||
* so a red potion isn't displayed with a blue customization, and so on.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
shuffle_customizations(void)
|
||||
{
|
||||
static const int offsets[2] = { GLYPH_OBJ_OFF, GLYPH_OBJ_PILETOP_OFF };
|
||||
@@ -1210,7 +1210,7 @@ find_matching_symset_customiz(
|
||||
return (struct customization_detail *) 0;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
purge_custom_entries(enum graphics_sets which_set)
|
||||
{
|
||||
struct symset_customization *gdc = &gs.sym_customizations[which_set];
|
||||
|
||||
+18
-18
@@ -6,18 +6,18 @@
|
||||
#include "hack.h"
|
||||
#define NEW_ENEXTO
|
||||
|
||||
static boolean goodpos_onscary(coordxy, coordxy, struct permonst *);
|
||||
static boolean tele_jump_ok(coordxy, coordxy, coordxy, coordxy);
|
||||
static boolean teleok(coordxy, coordxy, boolean);
|
||||
static void vault_tele(void);
|
||||
static boolean rloc_pos_ok(coordxy, coordxy, struct monst *);
|
||||
static void rloc_to_core(struct monst *, coordxy, coordxy, unsigned);
|
||||
static void mvault_tele(struct monst *);
|
||||
static boolean m_blocks_teleporting(struct monst *);
|
||||
static stairway *stairway_find_forwiz(boolean, boolean);
|
||||
staticfn boolean goodpos_onscary(coordxy, coordxy, struct permonst *);
|
||||
staticfn boolean tele_jump_ok(coordxy, coordxy, coordxy, coordxy);
|
||||
staticfn boolean teleok(coordxy, coordxy, boolean);
|
||||
staticfn void vault_tele(void);
|
||||
staticfn boolean rloc_pos_ok(coordxy, coordxy, struct monst *);
|
||||
staticfn void rloc_to_core(struct monst *, coordxy, coordxy, unsigned);
|
||||
staticfn void mvault_tele(struct monst *);
|
||||
staticfn boolean m_blocks_teleporting(struct monst *);
|
||||
staticfn stairway *stairway_find_forwiz(boolean, boolean);
|
||||
|
||||
/* does monster block others from teleporting? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
m_blocks_teleporting(struct monst *mtmp)
|
||||
{
|
||||
if (is_dlord(mtmp->data) || is_dprince(mtmp->data))
|
||||
@@ -44,7 +44,7 @@ noteleport_level(struct monst *mon)
|
||||
/* this is an approximation of onscary() that doesn't use any 'struct monst'
|
||||
fields aside from 'monst->data'; used primarily for new monster creation
|
||||
and monster teleport destination, not for ordinary monster movement */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
goodpos_onscary(
|
||||
coordxy x, coordxy y,
|
||||
struct permonst *mptr)
|
||||
@@ -363,7 +363,7 @@ enexto_core(
|
||||
* need to be augmented to allow deliberate passage in wizard mode, but
|
||||
* only for explicitly chosen destinations.)
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
tele_jump_ok(coordxy x1, coordxy y1, coordxy x2, coordxy y2)
|
||||
{
|
||||
if (!isok(x2, y2))
|
||||
@@ -397,7 +397,7 @@ tele_jump_ok(coordxy x1, coordxy y1, coordxy x2, coordxy y2)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
teleok(coordxy x, coordxy y, boolean trapok)
|
||||
{
|
||||
if (!trapok) {
|
||||
@@ -750,7 +750,7 @@ safe_teleds(int teleds_flags)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
vault_tele(void)
|
||||
{
|
||||
struct mkroom *croom = search_special(VAULT);
|
||||
@@ -1491,7 +1491,7 @@ level_tele_trap(struct trap *trap, unsigned int trflags)
|
||||
}
|
||||
|
||||
/* check whether monster can arrive at location <x,y> via Tport (or fall) */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
rloc_pos_ok(
|
||||
coordxy x, coordxy y, /* coordinates of candidate location */
|
||||
struct monst *mtmp)
|
||||
@@ -1558,7 +1558,7 @@ rloc_pos_ok(
|
||||
* a value because mtmp is a migrating_mon. Worm tails are always
|
||||
* placed randomly around the head of the worm.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
rloc_to_core(
|
||||
struct monst *mtmp,
|
||||
coordxy x, coordxy y,
|
||||
@@ -1689,7 +1689,7 @@ rloc_to_flag(
|
||||
rloc_to_core(mtmp, x, y, rlocflags);
|
||||
}
|
||||
|
||||
static stairway *
|
||||
staticfn stairway *
|
||||
stairway_find_forwiz(boolean isladder, boolean up)
|
||||
{
|
||||
stairway *stway = gs.stairs;
|
||||
@@ -1840,7 +1840,7 @@ control_mon_tele(
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
mvault_tele(struct monst *mtmp)
|
||||
{
|
||||
struct mkroom *croom = search_special(VAULT);
|
||||
|
||||
+44
-44
@@ -5,20 +5,20 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static void stoned_dialogue(void);
|
||||
static void vomiting_dialogue(void);
|
||||
static void sleep_dialogue(void);
|
||||
static void choke_dialogue(void);
|
||||
static void levitation_dialogue(void);
|
||||
static void slime_dialogue(void);
|
||||
static void slimed_to_death(struct kinfo *) NO_NNARGS;
|
||||
static void sickness_dialogue(void);
|
||||
static void phaze_dialogue(void);
|
||||
static void done_timeout(int, int);
|
||||
static void slip_or_trip(void);
|
||||
static void see_lamp_flicker(struct obj *, const char *) NONNULLPTRS;
|
||||
static void lantern_message(struct obj *) NONNULLARG1;
|
||||
static void cleanup_burn(ANY_P *, long) NONNULLARG1;
|
||||
staticfn void stoned_dialogue(void);
|
||||
staticfn void vomiting_dialogue(void);
|
||||
staticfn void sleep_dialogue(void);
|
||||
staticfn void choke_dialogue(void);
|
||||
staticfn void levitation_dialogue(void);
|
||||
staticfn void slime_dialogue(void);
|
||||
staticfn void slimed_to_death(struct kinfo *) NO_NNARGS;
|
||||
staticfn void sickness_dialogue(void);
|
||||
staticfn void phaze_dialogue(void);
|
||||
staticfn void done_timeout(int, int);
|
||||
staticfn void slip_or_trip(void);
|
||||
staticfn void see_lamp_flicker(struct obj *, const char *) NONNULLPTRS;
|
||||
staticfn void lantern_message(struct obj *) NONNULLARG1;
|
||||
staticfn void cleanup_burn(ANY_P *, long) NONNULLARG1;
|
||||
|
||||
/* used by wizard mode #timeout and #wizintrinsic; order by 'interest'
|
||||
for timeout countdown, where most won't occur in normal play */
|
||||
@@ -129,7 +129,7 @@ static NEARDATA const char *const stoned_texts[] = {
|
||||
"You are a statue." /* 1 */
|
||||
};
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
stoned_dialogue(void)
|
||||
{
|
||||
long i = (Stoned & TIMEOUT);
|
||||
@@ -189,7 +189,7 @@ static NEARDATA const char *const vomiting_texts[] = {
|
||||
"are about to vomit." /* 2 */
|
||||
};
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
vomiting_dialogue(void)
|
||||
{
|
||||
const char *txt = 0;
|
||||
@@ -259,7 +259,7 @@ vomiting_dialogue(void)
|
||||
exercise(A_CON, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
sleep_dialogue(void)
|
||||
{
|
||||
long i = (HSleepy & TIMEOUT);
|
||||
@@ -286,7 +286,7 @@ static NEARDATA const char *const choke_texts2[] = {
|
||||
"You suffocate."
|
||||
};
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
choke_dialogue(void)
|
||||
{
|
||||
long i = (Strangled & TIMEOUT);
|
||||
@@ -314,7 +314,7 @@ static NEARDATA const char *const sickness_texts[] = {
|
||||
"You are at Death's door.",
|
||||
};
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
sickness_dialogue(void)
|
||||
{
|
||||
long j = (Sick & TIMEOUT), i = j / 2L;
|
||||
@@ -344,7 +344,7 @@ static NEARDATA const char *const levi_texts[] = {
|
||||
"You wobble unsteadily %s the %s."
|
||||
};
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
levitation_dialogue(void)
|
||||
{
|
||||
/* -1 because the last message comes via float_down() */
|
||||
@@ -380,7 +380,7 @@ static NEARDATA const char *const slime_texts[] = {
|
||||
"You have become %s." /* 1 */
|
||||
};
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
slime_dialogue(void)
|
||||
{
|
||||
long t = (Slimed & TIMEOUT), i = t / 2L;
|
||||
@@ -448,7 +448,7 @@ burn_away_slime(void)
|
||||
}
|
||||
|
||||
/* countdown timer for turning into green slime has run out; kill our hero */
|
||||
static void
|
||||
staticfn void
|
||||
slimed_to_death(struct kinfo *kptr)
|
||||
{
|
||||
uchar save_mvflags;
|
||||
@@ -525,7 +525,7 @@ static NEARDATA const char *const phaze_texts[] = {
|
||||
"You are feeling rather flabby.",
|
||||
};
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
phaze_dialogue(void)
|
||||
{
|
||||
long i = ((HPasses_walls & TIMEOUT) / 2L);
|
||||
@@ -540,7 +540,7 @@ phaze_dialogue(void)
|
||||
/* when a status timeout is fatal, keep the status line indicator shown
|
||||
during end of game rundown (and potential dumplog);
|
||||
timeout has already counted down to 0 by the time we get here */
|
||||
static void
|
||||
staticfn void
|
||||
done_timeout(int how, int which)
|
||||
{
|
||||
long *intrinsic_p = &u.uprops[which].intrinsic;
|
||||
@@ -1169,7 +1169,7 @@ attach_fig_transform_timeout(struct obj *figurine)
|
||||
}
|
||||
|
||||
/* give a fumble message */
|
||||
static void
|
||||
staticfn void
|
||||
slip_or_trip(void)
|
||||
{
|
||||
struct obj *otmp = vobj_at(u.ux, u.uy), *otmp2, *saddle;
|
||||
@@ -1292,7 +1292,7 @@ slip_or_trip(void)
|
||||
}
|
||||
|
||||
/* Print a lamp flicker message with tailer. Only called if seen. */
|
||||
static void
|
||||
staticfn void
|
||||
see_lamp_flicker(struct obj *obj, const char *tailer)
|
||||
{
|
||||
switch (obj->where) {
|
||||
@@ -1307,7 +1307,7 @@ see_lamp_flicker(struct obj *obj, const char *tailer)
|
||||
}
|
||||
|
||||
/* Print a dimming message for brass lanterns. Only called if seen. */
|
||||
static void
|
||||
staticfn void
|
||||
lantern_message(struct obj *obj)
|
||||
{
|
||||
/* from adventure */
|
||||
@@ -1771,7 +1771,7 @@ end_burn(struct obj *obj, boolean timer_attached)
|
||||
/*
|
||||
* Cleanup a burning object if timer stopped.
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
cleanup_burn(anything *arg, long expire_time)
|
||||
{
|
||||
struct obj *obj = arg->a_obj;
|
||||
@@ -1897,14 +1897,14 @@ do_storms(void)
|
||||
* Check whether object has a timer of type timer_type.
|
||||
*/
|
||||
|
||||
static const char *kind_name(short);
|
||||
static void print_queue(winid, timer_element *);
|
||||
static void insert_timer(timer_element *);
|
||||
static timer_element *remove_timer(timer_element **, short, ANY_P *);
|
||||
static void write_timer(NHFILE *, timer_element *);
|
||||
static boolean mon_is_local(struct monst *);
|
||||
static boolean timer_is_local(timer_element *);
|
||||
static int maybe_write_timer(NHFILE *, int, boolean);
|
||||
staticfn const char *kind_name(short);
|
||||
staticfn void print_queue(winid, timer_element *);
|
||||
staticfn void insert_timer(timer_element *);
|
||||
staticfn timer_element *remove_timer(timer_element **, short, ANY_P *);
|
||||
staticfn void write_timer(NHFILE *, timer_element *);
|
||||
staticfn boolean mon_is_local(struct monst *);
|
||||
staticfn boolean timer_is_local(timer_element *);
|
||||
staticfn int maybe_write_timer(NHFILE *, int, boolean);
|
||||
|
||||
/* If defined, then include names when printing out the timer queue */
|
||||
#define VERBOSE_TIMER
|
||||
@@ -1938,7 +1938,7 @@ static const ttable timeout_funcs[NUM_TIME_FUNCS] = {
|
||||
};
|
||||
#undef TTAB
|
||||
|
||||
static const char *
|
||||
staticfn const char *
|
||||
kind_name(short kind)
|
||||
{
|
||||
switch (kind) {
|
||||
@@ -1954,7 +1954,7 @@ kind_name(short kind)
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
print_queue(winid win, timer_element *base)
|
||||
{
|
||||
timer_element *curr;
|
||||
@@ -2386,7 +2386,7 @@ spot_time_left(coordxy x, coordxy y, short func_index)
|
||||
}
|
||||
|
||||
/* Insert timer into the global queue */
|
||||
static void
|
||||
staticfn void
|
||||
insert_timer(timer_element *gnu)
|
||||
{
|
||||
timer_element *curr, *prev;
|
||||
@@ -2402,7 +2402,7 @@ insert_timer(timer_element *gnu)
|
||||
gt.timer_base = gnu;
|
||||
}
|
||||
|
||||
static timer_element *
|
||||
staticfn timer_element *
|
||||
remove_timer(
|
||||
timer_element **base,
|
||||
short func_index,
|
||||
@@ -2424,7 +2424,7 @@ remove_timer(
|
||||
return curr;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
write_timer(NHFILE *nhfp, timer_element *timer)
|
||||
{
|
||||
anything arg_save;
|
||||
@@ -2508,7 +2508,7 @@ obj_is_local(struct obj *obj)
|
||||
* Return TRUE if the given monster will stay on the level when the
|
||||
* level is saved.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
mon_is_local(struct monst *mon)
|
||||
{
|
||||
struct monst *curr;
|
||||
@@ -2527,7 +2527,7 @@ mon_is_local(struct monst *mon)
|
||||
* Return TRUE if the timer is attached to something that will stay on the
|
||||
* level when the level is saved.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
timer_is_local(timer_element *timer)
|
||||
{
|
||||
switch (timer->kind) {
|
||||
@@ -2551,7 +2551,7 @@ RESTORE_WARNING_UNREACHABLE_CODE
|
||||
* Part of the save routine. Count up the number of timers that would
|
||||
* be written. If write_it is true, actually write the timer.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
maybe_write_timer(NHFILE *nhfp, int range, boolean write_it)
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
+38
-38
@@ -60,29 +60,29 @@ static struct toptenentry *tt_head;
|
||||
|
||||
static struct toptenentry zerott;
|
||||
|
||||
static void topten_print(const char *);
|
||||
static void topten_print_bold(const char *);
|
||||
static void outheader(void);
|
||||
static void outentry(int, struct toptenentry *, boolean);
|
||||
static void discardexcess(FILE *);
|
||||
static void readentry(FILE *, struct toptenentry *);
|
||||
static void writeentry(FILE *, struct toptenentry *);
|
||||
staticfn void topten_print(const char *);
|
||||
staticfn void topten_print_bold(const char *);
|
||||
staticfn void outheader(void);
|
||||
staticfn void outentry(int, struct toptenentry *, boolean);
|
||||
staticfn void discardexcess(FILE *);
|
||||
staticfn void readentry(FILE *, struct toptenentry *);
|
||||
staticfn void writeentry(FILE *, struct toptenentry *);
|
||||
#ifdef XLOGFILE
|
||||
static void writexlentry(FILE *, struct toptenentry *, int);
|
||||
static long encodexlogflags(void);
|
||||
static long encodeconduct(void);
|
||||
static long encodeachieve(boolean);
|
||||
static void add_achieveX(char *, const char *, boolean);
|
||||
static char *encode_extended_achievements(char *);
|
||||
static char *encode_extended_conducts(char *);
|
||||
staticfn void writexlentry(FILE *, struct toptenentry *, int);
|
||||
staticfn long encodexlogflags(void);
|
||||
staticfn long encodeconduct(void);
|
||||
staticfn long encodeachieve(boolean);
|
||||
staticfn void add_achieveX(char *, const char *, boolean);
|
||||
staticfn char *encode_extended_achievements(char *);
|
||||
staticfn char *encode_extended_conducts(char *);
|
||||
#endif
|
||||
static void free_ttlist(struct toptenentry *);
|
||||
static int classmon(char *);
|
||||
static int score_wanted(boolean, int, struct toptenentry *, int,
|
||||
staticfn void free_ttlist(struct toptenentry *);
|
||||
staticfn int classmon(char *);
|
||||
staticfn int score_wanted(boolean, int, struct toptenentry *, int,
|
||||
const char **, int);
|
||||
#ifdef NO_SCAN_BRACK
|
||||
static void nsb_mung_line(char *);
|
||||
static void nsb_unmung_line(char *);
|
||||
staticfn void nsb_mung_line(char *);
|
||||
staticfn void nsb_unmung_line(char *);
|
||||
#endif
|
||||
|
||||
/* "killed by",&c ["an"] 'gk.killer.name' */
|
||||
@@ -159,7 +159,7 @@ formatkiller(
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
topten_print(const char *x)
|
||||
{
|
||||
if (gt.toptenwin == WIN_ERR)
|
||||
@@ -168,7 +168,7 @@ topten_print(const char *x)
|
||||
putstr(gt.toptenwin, ATR_NONE, x);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
topten_print_bold(const char *x)
|
||||
{
|
||||
if (gt.toptenwin == WIN_ERR)
|
||||
@@ -202,7 +202,7 @@ observable_depth(d_level *lev)
|
||||
}
|
||||
|
||||
/* throw away characters until current record has been entirely consumed */
|
||||
static void
|
||||
staticfn void
|
||||
discardexcess(FILE *rfile)
|
||||
{
|
||||
int c;
|
||||
@@ -214,7 +214,7 @@ discardexcess(FILE *rfile)
|
||||
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
readentry(FILE *rfile, struct toptenentry *tt)
|
||||
{
|
||||
char inbuf[SCANBUFSZ], s1[SCANBUFSZ], s2[SCANBUFSZ], s3[SCANBUFSZ],
|
||||
@@ -295,7 +295,7 @@ readentry(FILE *rfile, struct toptenentry *tt)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
writeentry(FILE *rfile, struct toptenentry *tt)
|
||||
{
|
||||
static const char fmt32[] = "%c%c "; /* role,gender */
|
||||
@@ -334,7 +334,7 @@ RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
#ifdef XLOGFILE
|
||||
|
||||
/* as tab is never used in eg. gp.plname or death, no need to mangle those. */
|
||||
static void
|
||||
staticfn void
|
||||
writexlentry(FILE *rfile, struct toptenentry *tt, int how)
|
||||
{
|
||||
#define Fprintf (void) fprintf
|
||||
@@ -387,7 +387,7 @@ writexlentry(FILE *rfile, struct toptenentry *tt, int how)
|
||||
#undef XLOG_SEP
|
||||
}
|
||||
|
||||
static long
|
||||
staticfn long
|
||||
encodexlogflags(void)
|
||||
{
|
||||
long e = 0L;
|
||||
@@ -402,7 +402,7 @@ encodexlogflags(void)
|
||||
return e;
|
||||
}
|
||||
|
||||
static long
|
||||
staticfn long
|
||||
encodeconduct(void)
|
||||
{
|
||||
long e = 0L;
|
||||
@@ -446,7 +446,7 @@ encodeconduct(void)
|
||||
return e;
|
||||
}
|
||||
|
||||
static long
|
||||
staticfn long
|
||||
encodeachieve(
|
||||
boolean secondlong) /* False: handle achievements 1..31, True: 32..62 */
|
||||
{
|
||||
@@ -471,7 +471,7 @@ encodeachieve(
|
||||
}
|
||||
|
||||
/* add the achievement or conduct comma-separated to string */
|
||||
static void
|
||||
staticfn void
|
||||
add_achieveX(char *buf, const char *achievement, boolean condition)
|
||||
{
|
||||
if (condition) {
|
||||
@@ -482,7 +482,7 @@ add_achieveX(char *buf, const char *achievement, boolean condition)
|
||||
}
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
encode_extended_achievements(char *buf)
|
||||
{
|
||||
char rnkbuf[40];
|
||||
@@ -575,7 +575,7 @@ encode_extended_achievements(char *buf)
|
||||
return buf;
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
encode_extended_conducts(char *buf)
|
||||
{
|
||||
buf[0] = '\0';
|
||||
@@ -604,7 +604,7 @@ encode_extended_conducts(char *buf)
|
||||
|
||||
#endif /* XLOGFILE */
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
free_ttlist(struct toptenentry *tt)
|
||||
{
|
||||
struct toptenentry *ttnext;
|
||||
@@ -918,7 +918,7 @@ topten(int how, time_t when)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
outheader(void)
|
||||
{
|
||||
char linebuf[BUFSZ];
|
||||
@@ -935,7 +935,7 @@ outheader(void)
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
/* so>0: standout line; so=0: ordinary line */
|
||||
static void
|
||||
staticfn void
|
||||
outentry(int rank, struct toptenentry *t1, boolean so)
|
||||
{
|
||||
boolean second_line = TRUE;
|
||||
@@ -1101,7 +1101,7 @@ outentry(int rank, struct toptenentry *t1, boolean so)
|
||||
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
score_wanted(
|
||||
boolean current_ver,
|
||||
int rank,
|
||||
@@ -1345,7 +1345,7 @@ prscore(int argc, char **argv)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
classmon(char *plch)
|
||||
{
|
||||
int i;
|
||||
@@ -1460,7 +1460,7 @@ tt_doppel(struct monst *mon) {
|
||||
/* Lattice scanf isn't up to reading the scorefile. What */
|
||||
/* follows deals with that; I admit it's ugly. (KL) */
|
||||
/* Now generally available (KL) */
|
||||
static void
|
||||
staticfn void
|
||||
nsb_mung_line(p)
|
||||
char *p;
|
||||
{
|
||||
@@ -1468,7 +1468,7 @@ char *p;
|
||||
*p = '|';
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
nsb_unmung_line(p)
|
||||
char *p;
|
||||
{
|
||||
|
||||
+116
-116
@@ -7,70 +7,70 @@
|
||||
|
||||
extern const char *const destroy_strings[][3]; /* from zap.c */
|
||||
|
||||
static void mk_trap_statue(coordxy, coordxy);
|
||||
static int dng_bottom(d_level *lev);
|
||||
static void hole_destination(d_level *);
|
||||
static boolean keep_saddle_with_steedcorpse(unsigned, struct obj *,
|
||||
staticfn void mk_trap_statue(coordxy, coordxy);
|
||||
staticfn int dng_bottom(d_level *lev);
|
||||
staticfn void hole_destination(d_level *);
|
||||
staticfn boolean keep_saddle_with_steedcorpse(unsigned, struct obj *,
|
||||
struct obj *);
|
||||
static boolean mu_maybe_destroy_web(struct monst *, boolean, struct trap *);
|
||||
static struct obj *t_missile(int, struct trap *);
|
||||
static boolean floor_trigger(int);
|
||||
static boolean check_in_air(struct monst *, unsigned);
|
||||
static int trapeffect_arrow_trap(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_dart_trap(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_rocktrap(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_sqky_board(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_bear_trap(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_slp_gas_trap(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_rust_trap(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_fire_trap(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_pit(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_hole(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_telep_trap(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_level_telep(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_web(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_statue_trap(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_magic_trap(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_anti_magic(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_poly_trap(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_landmine(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_rolling_boulder_trap(struct monst *, struct trap *,
|
||||
staticfn boolean mu_maybe_destroy_web(struct monst *, boolean, struct trap *);
|
||||
staticfn struct obj *t_missile(int, struct trap *);
|
||||
staticfn boolean floor_trigger(int);
|
||||
staticfn boolean check_in_air(struct monst *, unsigned);
|
||||
staticfn int trapeffect_arrow_trap(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_dart_trap(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_rocktrap(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_sqky_board(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_bear_trap(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_slp_gas_trap(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_rust_trap(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_fire_trap(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_pit(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_hole(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_telep_trap(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_level_telep(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_web(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_statue_trap(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_magic_trap(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_anti_magic(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_poly_trap(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_landmine(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_rolling_boulder_trap(struct monst *, struct trap *,
|
||||
unsigned);
|
||||
static int trapeffect_magic_portal(struct monst *, struct trap *, unsigned);
|
||||
static int trapeffect_vibrating_square(struct monst *, struct trap *,
|
||||
staticfn int trapeffect_magic_portal(struct monst *, struct trap *, unsigned);
|
||||
staticfn int trapeffect_vibrating_square(struct monst *, struct trap *,
|
||||
unsigned);
|
||||
static int trapeffect_selector(struct monst *, struct trap *, unsigned);
|
||||
static char *trapnote(struct trap *, boolean);
|
||||
static int choose_trapnote(struct trap *);
|
||||
static int steedintrap(struct trap *, struct obj *);
|
||||
static void launch_drop_spot(struct obj *, coordxy, coordxy);
|
||||
static boolean find_random_launch_coord(struct trap *, coord *);
|
||||
static int mkroll_launch(struct trap *, coordxy, coordxy, short, long);
|
||||
static boolean isclearpath(coord *, int, schar, schar);
|
||||
static void dofiretrap(struct obj *);
|
||||
static void domagictrap(void);
|
||||
static void pot_acid_damage(struct obj *, boolean, boolean);
|
||||
static boolean emergency_disrobe(boolean *);
|
||||
static int untrap_prob(struct trap *);
|
||||
static void move_into_trap(struct trap *);
|
||||
static int try_disarm(struct trap *, boolean);
|
||||
static void reward_untrap(struct trap *, struct monst *);
|
||||
static int disarm_holdingtrap(struct trap *);
|
||||
static int disarm_landmine(struct trap *);
|
||||
static int unsqueak_ok(struct obj *);
|
||||
static int disarm_squeaky_board(struct trap *);
|
||||
static int disarm_shooting_trap(struct trap *, int);
|
||||
static void clear_conjoined_pits(struct trap *);
|
||||
static boolean adj_nonconjoined_pit(struct trap *);
|
||||
static int try_lift(struct monst *, struct trap *, int, boolean);
|
||||
static int help_monster_out(struct monst *, struct trap *);
|
||||
static void untrap_box(struct obj *, boolean, boolean);
|
||||
staticfn int trapeffect_selector(struct monst *, struct trap *, unsigned);
|
||||
staticfn char *trapnote(struct trap *, boolean);
|
||||
staticfn int choose_trapnote(struct trap *);
|
||||
staticfn int steedintrap(struct trap *, struct obj *);
|
||||
staticfn void launch_drop_spot(struct obj *, coordxy, coordxy);
|
||||
staticfn boolean find_random_launch_coord(struct trap *, coord *);
|
||||
staticfn int mkroll_launch(struct trap *, coordxy, coordxy, short, long);
|
||||
staticfn boolean isclearpath(coord *, int, schar, schar);
|
||||
staticfn void dofiretrap(struct obj *);
|
||||
staticfn void domagictrap(void);
|
||||
staticfn void pot_acid_damage(struct obj *, boolean, boolean);
|
||||
staticfn boolean emergency_disrobe(boolean *);
|
||||
staticfn int untrap_prob(struct trap *);
|
||||
staticfn void move_into_trap(struct trap *);
|
||||
staticfn int try_disarm(struct trap *, boolean);
|
||||
staticfn void reward_untrap(struct trap *, struct monst *);
|
||||
staticfn int disarm_holdingtrap(struct trap *);
|
||||
staticfn int disarm_landmine(struct trap *);
|
||||
staticfn int unsqueak_ok(struct obj *);
|
||||
staticfn int disarm_squeaky_board(struct trap *);
|
||||
staticfn int disarm_shooting_trap(struct trap *, int);
|
||||
staticfn void clear_conjoined_pits(struct trap *);
|
||||
staticfn boolean adj_nonconjoined_pit(struct trap *);
|
||||
staticfn int try_lift(struct monst *, struct trap *, int, boolean);
|
||||
staticfn int help_monster_out(struct monst *, struct trap *);
|
||||
staticfn void untrap_box(struct obj *, boolean, boolean);
|
||||
#if 0
|
||||
static void join_adjacent_pits(struct trap *);
|
||||
staticfn void join_adjacent_pits(struct trap *);
|
||||
#endif
|
||||
static boolean thitm(int, struct monst *, struct obj *, int,
|
||||
staticfn boolean thitm(int, struct monst *, struct obj *, int,
|
||||
boolean) NONNULLARG2;
|
||||
static void maybe_finish_sokoban(void);
|
||||
staticfn void maybe_finish_sokoban(void);
|
||||
|
||||
static const char *const a_your[2] = { "a", "your" };
|
||||
static const char *const A_Your[2] = { "A", "Your" };
|
||||
@@ -384,7 +384,7 @@ grease_protect(
|
||||
}
|
||||
|
||||
/* create a "living" statue at x,y */
|
||||
static void
|
||||
staticfn void
|
||||
mk_trap_statue(coordxy x, coordxy y)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -412,7 +412,7 @@ mk_trap_statue(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
/* find "bottom" level of specified dungeon, stopping at quest locate */
|
||||
static int
|
||||
staticfn int
|
||||
dng_bottom(d_level *lev)
|
||||
{
|
||||
int bottom = dunlevs_in_dungeon(lev);
|
||||
@@ -436,7 +436,7 @@ dng_bottom(d_level *lev)
|
||||
}
|
||||
|
||||
/* destination dlevel for holes or trapdoors */
|
||||
static void
|
||||
staticfn void
|
||||
hole_destination(d_level *dst)
|
||||
{
|
||||
int bottom = dng_bottom(&u.uz);
|
||||
@@ -895,7 +895,7 @@ activate_statue_trap(
|
||||
return mtmp;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
keep_saddle_with_steedcorpse(
|
||||
unsigned steed_mid,
|
||||
struct obj *objchn,
|
||||
@@ -928,7 +928,7 @@ keep_saddle_with_steedcorpse(
|
||||
|
||||
/* monster or you go through and possibly destroy a web.
|
||||
return TRUE if could go through. */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
mu_maybe_destroy_web(
|
||||
struct monst *mtmp,
|
||||
boolean domsg,
|
||||
@@ -972,7 +972,7 @@ mu_maybe_destroy_web(
|
||||
}
|
||||
|
||||
/* make a single arrow/dart/rock for a trap to shoot or drop */
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
t_missile(int otyp, struct trap *trap)
|
||||
{
|
||||
struct obj *otmp = mksobj(otyp, TRUE, FALSE);
|
||||
@@ -1015,7 +1015,7 @@ reset_utrap(boolean msg)
|
||||
}
|
||||
|
||||
/* is trap type ttyp triggered by touching the floor? */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
floor_trigger(int ttyp)
|
||||
{
|
||||
switch (ttyp) {
|
||||
@@ -1040,7 +1040,7 @@ floor_trigger(int ttyp)
|
||||
}
|
||||
|
||||
/* return TRUE if monster mtmp is up in the air, considering trap flags */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
check_in_air(struct monst *mtmp, unsigned trflags)
|
||||
{
|
||||
boolean is_you = mtmp == &gy.youmonst,
|
||||
@@ -1133,7 +1133,7 @@ m_harmless_trap(struct monst *mtmp, struct trap *ttmp)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_arrow_trap(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -1191,7 +1191,7 @@ trapeffect_arrow_trap(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_dart_trap(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -1262,7 +1262,7 @@ trapeffect_dart_trap(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_rocktrap(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -1340,7 +1340,7 @@ trapeffect_rocktrap(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_sqky_board(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -1414,7 +1414,7 @@ trapeffect_sqky_board(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_bear_trap(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -1492,7 +1492,7 @@ trapeffect_bear_trap(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_slp_gas_trap(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -1523,7 +1523,7 @@ trapeffect_slp_gas_trap(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_rust_trap(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -1653,7 +1653,7 @@ trapeffect_rust_trap(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_fire_trap(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -1745,7 +1745,7 @@ trapeffect_fire_trap(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_pit(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -1926,7 +1926,7 @@ trapeffect_pit(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_hole(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -1985,7 +1985,7 @@ trapeffect_hole(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_telep_trap(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -2003,7 +2003,7 @@ trapeffect_telep_trap(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_level_telep(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -2021,7 +2021,7 @@ trapeffect_level_telep(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_web(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -2190,7 +2190,7 @@ trapeffect_web(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_statue_trap(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -2204,7 +2204,7 @@ trapeffect_statue_trap(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_magic_trap(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -2234,7 +2234,7 @@ trapeffect_magic_trap(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_anti_magic(
|
||||
struct monst *mtmp, /* monster, possibly youmonst */
|
||||
struct trap *trap, /* trap->ttyp == ANTI_MAGIC */
|
||||
@@ -2345,7 +2345,7 @@ trapeffect_anti_magic(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_poly_trap(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -2396,7 +2396,7 @@ trapeffect_poly_trap(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_landmine(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -2521,7 +2521,7 @@ trapeffect_landmine(
|
||||
}
|
||||
#undef MINE_TRIGGER_WT
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_rolling_boulder_trap(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -2571,7 +2571,7 @@ trapeffect_rolling_boulder_trap(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_magic_portal(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -2586,7 +2586,7 @@ trapeffect_magic_portal(
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_vibrating_square(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -2795,7 +2795,7 @@ immune_to_trap(struct monst *mon, unsigned ttype)
|
||||
return TRAP_NOT_IMMUNE;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
trapeffect_selector(
|
||||
struct monst *mtmp,
|
||||
struct trap *trap,
|
||||
@@ -2916,7 +2916,7 @@ dotrap(struct trap *trap, unsigned trflags)
|
||||
(void) trapeffect_selector(&gy.youmonst, trap, trflags);
|
||||
}
|
||||
|
||||
static char *
|
||||
staticfn char *
|
||||
trapnote(struct trap *trap, boolean noprefix)
|
||||
{
|
||||
static const char *const tnnames[] = {
|
||||
@@ -2936,7 +2936,7 @@ trapnote(struct trap *trap, boolean noprefix)
|
||||
|
||||
/* choose a note not used by any trap on current level,
|
||||
ignoring ttmp; if all are in use, pick a random one */
|
||||
static int
|
||||
staticfn int
|
||||
choose_trapnote(struct trap *ttmp)
|
||||
{
|
||||
int tavail[12], tpick[12], tcnt = 0, k;
|
||||
@@ -2955,7 +2955,7 @@ choose_trapnote(struct trap *ttmp)
|
||||
return ((tcnt > 0) ? tpick[rn2(tcnt)] : rn2(12));
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
steedintrap(struct trap *trap, struct obj *otmp)
|
||||
{
|
||||
struct monst *steed = u.usteed;
|
||||
@@ -3071,7 +3071,7 @@ blow_up_landmine(struct trap *trap)
|
||||
spot_checks(x, y, old_typ);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
launch_drop_spot(struct obj *obj, coordxy x, coordxy y)
|
||||
{
|
||||
if (!obj) {
|
||||
@@ -3418,7 +3418,7 @@ feeltrap(struct trap *trap)
|
||||
|
||||
/* try to find a random coordinate where launching a rolling boulder
|
||||
could work. return TRUE if found, with coordinate in cc. */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
find_random_launch_coord(struct trap *ttmp, coord *cc)
|
||||
{
|
||||
int tmp;
|
||||
@@ -3478,7 +3478,7 @@ find_random_launch_coord(struct trap *ttmp, coord *cc)
|
||||
return success;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
mkroll_launch(
|
||||
struct trap *ttmp,
|
||||
coordxy x,
|
||||
@@ -3514,7 +3514,7 @@ mkroll_launch(
|
||||
return 1;
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
isclearpath(
|
||||
coord *cc,
|
||||
int distance,
|
||||
@@ -4031,7 +4031,7 @@ climb_pit(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
dofiretrap(
|
||||
struct obj *box) /* null for floor trap */
|
||||
{
|
||||
@@ -4115,7 +4115,7 @@ dofiretrap(
|
||||
melt_ice(u.ux, u.uy, (char *) 0);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
domagictrap(void)
|
||||
{
|
||||
int fate = rnd(20);
|
||||
@@ -4450,7 +4450,7 @@ acid_damage(struct obj *obj)
|
||||
erode_obj(obj, (char *) 0, ERODE_CORRODE, EF_GREASE | EF_VERBOSE);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
pot_acid_damage(
|
||||
struct obj *obj,
|
||||
boolean in_invent,
|
||||
@@ -4698,7 +4698,7 @@ water_damage_chain(
|
||||
* Returns TRUE if disrobing made player unencumbered enough to
|
||||
* crawl out of the current predicament.
|
||||
*/
|
||||
static boolean
|
||||
staticfn boolean
|
||||
emergency_disrobe(boolean *lostsome)
|
||||
{
|
||||
int invc = inv_cnt(TRUE);
|
||||
@@ -5086,7 +5086,7 @@ could_untrap(boolean verbosely, boolean check_floor)
|
||||
|
||||
/* Probability of disabling a trap. Helge Hafting;
|
||||
Returns 0 for success, non-0 for failure. */
|
||||
static int
|
||||
staticfn int
|
||||
untrap_prob(
|
||||
struct trap *ttmp) /* must not be Null */
|
||||
{
|
||||
@@ -5172,7 +5172,7 @@ cnv_trap_obj(
|
||||
}
|
||||
|
||||
/* while attempting to disarm an adjacent trap, we've fallen into it */
|
||||
static void
|
||||
staticfn void
|
||||
move_into_trap(struct trap *ttmp)
|
||||
{
|
||||
int bc = 0;
|
||||
@@ -5211,7 +5211,7 @@ move_into_trap(struct trap *ttmp)
|
||||
}
|
||||
|
||||
/* 0: doesn't even try; 1: tries and fails; 2: succeeds */
|
||||
static int
|
||||
staticfn int
|
||||
try_disarm(
|
||||
struct trap *ttmp,
|
||||
boolean force_failure)
|
||||
@@ -5300,7 +5300,7 @@ try_disarm(
|
||||
return 2;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
reward_untrap(struct trap *ttmp, struct monst *mtmp)
|
||||
{
|
||||
if (!ttmp->madeby_u) {
|
||||
@@ -5323,7 +5323,7 @@ reward_untrap(struct trap *ttmp, struct monst *mtmp)
|
||||
|
||||
/* Help a monster out of a bear trap or web, or if no monster is
|
||||
present, disarm a bear trap or destroy a web. Helge Hafting */
|
||||
static int
|
||||
staticfn int
|
||||
disarm_holdingtrap(struct trap *ttmp)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
@@ -5364,7 +5364,7 @@ disarm_holdingtrap(struct trap *ttmp)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
disarm_landmine(struct trap *ttmp) /* Helge Hafting */
|
||||
{
|
||||
int fails = try_disarm(ttmp, FALSE);
|
||||
@@ -5377,7 +5377,7 @@ disarm_landmine(struct trap *ttmp) /* Helge Hafting */
|
||||
}
|
||||
|
||||
/* getobj callback for object to disarm a squeaky board with */
|
||||
static int
|
||||
staticfn int
|
||||
unsqueak_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
@@ -5400,7 +5400,7 @@ unsqueak_ok(struct obj *obj)
|
||||
}
|
||||
|
||||
/* it may not make much sense to use grease on floor boards, but so what? */
|
||||
static int
|
||||
staticfn int
|
||||
disarm_squeaky_board(struct trap *ttmp)
|
||||
{
|
||||
struct obj *obj;
|
||||
@@ -5434,7 +5434,7 @@ disarm_squeaky_board(struct trap *ttmp)
|
||||
}
|
||||
|
||||
/* removes traps that shoot arrows, darts, etc. */
|
||||
static int
|
||||
staticfn int
|
||||
disarm_shooting_trap(struct trap *ttmp, int otyp)
|
||||
{
|
||||
int fails = try_disarm(ttmp, FALSE);
|
||||
@@ -5447,7 +5447,7 @@ disarm_shooting_trap(struct trap *ttmp, int otyp)
|
||||
}
|
||||
|
||||
/* trying to #untrap a monster from a pit; is the weight too heavy? */
|
||||
static int
|
||||
staticfn int
|
||||
try_lift(
|
||||
struct monst *mtmp, /* trapped monster */
|
||||
struct trap *ttmp, /* pit, possibly made by hero, or spiked pit */
|
||||
@@ -5470,7 +5470,7 @@ try_lift(
|
||||
}
|
||||
|
||||
/* Help trapped monster (out of a (spiked) pit) */
|
||||
static int
|
||||
staticfn int
|
||||
help_monster_out(
|
||||
struct monst *mtmp,
|
||||
struct trap *ttmp)
|
||||
@@ -5565,7 +5565,7 @@ help_monster_out(
|
||||
}
|
||||
|
||||
/* check a particular container for a trap and optionally disarm it */
|
||||
static void
|
||||
staticfn void
|
||||
untrap_box(
|
||||
struct obj *box,
|
||||
boolean force,
|
||||
@@ -6304,7 +6304,7 @@ conjoined_pits(
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
clear_conjoined_pits(struct trap *trap)
|
||||
{
|
||||
int diridx, adjidx;
|
||||
@@ -6328,7 +6328,7 @@ clear_conjoined_pits(struct trap *trap)
|
||||
}
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
adj_nonconjoined_pit(struct trap *adjtrap)
|
||||
{
|
||||
struct trap *trap_with_u = t_at(u.ux0, u.uy0);
|
||||
@@ -6346,7 +6346,7 @@ adj_nonconjoined_pit(struct trap *adjtrap)
|
||||
* Mark all neighboring pits as conjoined pits.
|
||||
* (currently not called from anywhere)
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
join_adjacent_pits(struct trap *trap)
|
||||
{
|
||||
struct trap *t;
|
||||
@@ -6435,7 +6435,7 @@ b_trapped(const char *item, int bodypart)
|
||||
}
|
||||
|
||||
/* Monster is hit by trap. */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
thitm(
|
||||
int tlev, /* missile's attack level */
|
||||
struct monst *mon, /* target */
|
||||
@@ -6777,7 +6777,7 @@ sokoban_guilt(void)
|
||||
}
|
||||
|
||||
/* called when a trap has been deleted or had its ttyp replaced */
|
||||
static void
|
||||
staticfn void
|
||||
maybe_finish_sokoban(void)
|
||||
{
|
||||
struct trap *t;
|
||||
|
||||
+22
-22
@@ -13,19 +13,19 @@ struct trobj {
|
||||
Bitfield(trbless, 2);
|
||||
};
|
||||
|
||||
static struct obj *ini_inv_mkobj_filter(int, boolean);
|
||||
static short ini_inv_obj_substitution(struct trobj *,
|
||||
staticfn struct obj *ini_inv_mkobj_filter(int, boolean);
|
||||
staticfn short ini_inv_obj_substitution(struct trobj *,
|
||||
struct obj *) NONNULLPTRS;
|
||||
static void ini_inv_adjust_obj(struct trobj *,
|
||||
staticfn void ini_inv_adjust_obj(struct trobj *,
|
||||
struct obj *) NONNULLPTRS;
|
||||
static void ini_inv_use_obj(struct obj *) NONNULLARG1;
|
||||
static void ini_inv(struct trobj *) NONNULLARG1;
|
||||
static void knows_object(int);
|
||||
static void knows_class(char);
|
||||
static void u_init_role(void);
|
||||
static void u_init_race(void);
|
||||
static void u_init_carry_attr_boost(void);
|
||||
static boolean restricted_spell_discipline(int);
|
||||
staticfn void ini_inv_use_obj(struct obj *) NONNULLARG1;
|
||||
staticfn void ini_inv(struct trobj *) NONNULLARG1;
|
||||
staticfn void knows_object(int);
|
||||
staticfn void knows_class(char);
|
||||
staticfn void u_init_role(void);
|
||||
staticfn void u_init_race(void);
|
||||
staticfn void u_init_carry_attr_boost(void);
|
||||
staticfn boolean restricted_spell_discipline(int);
|
||||
|
||||
#define UNDEF_TYP 0
|
||||
#define UNDEF_SPE '\177'
|
||||
@@ -558,7 +558,7 @@ static const struct def_skill Skill_W[] = {
|
||||
{ P_NONE, 0 }
|
||||
};
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
knows_object(int obj)
|
||||
{
|
||||
discover_object(obj, TRUE, FALSE);
|
||||
@@ -567,7 +567,7 @@ knows_object(int obj)
|
||||
|
||||
/* Know ordinary (non-magical) objects of a certain class,
|
||||
like all gems except the loadstone and luckstone. */
|
||||
static void
|
||||
staticfn void
|
||||
knows_class(char sym)
|
||||
{
|
||||
struct obj odummy, *o;
|
||||
@@ -609,7 +609,7 @@ knows_class(char sym)
|
||||
}
|
||||
|
||||
/* role-specific initializations */
|
||||
static void
|
||||
staticfn void
|
||||
u_init_role(void)
|
||||
{
|
||||
int i;
|
||||
@@ -766,7 +766,7 @@ u_init_role(void)
|
||||
}
|
||||
|
||||
/* race-specific initializations */
|
||||
static void
|
||||
staticfn void
|
||||
u_init_race(void)
|
||||
{
|
||||
switch (Race_switch) {
|
||||
@@ -839,7 +839,7 @@ u_init_race(void)
|
||||
}
|
||||
|
||||
/* boost STR and CON until hero can carry inventory */
|
||||
static void
|
||||
staticfn void
|
||||
u_init_carry_attr_boost(void)
|
||||
{
|
||||
/* make sure you can carry all you have - especially for Tourists */
|
||||
@@ -968,7 +968,7 @@ u_init(void)
|
||||
}
|
||||
|
||||
/* skills aren't initialized, so we use the role-specific skill lists */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
restricted_spell_discipline(int otyp)
|
||||
{
|
||||
const struct def_skill *skills;
|
||||
@@ -1028,7 +1028,7 @@ restricted_spell_discipline(int otyp)
|
||||
}
|
||||
|
||||
/* create random object of certain class, filtering out too powerful items */
|
||||
static struct obj *
|
||||
staticfn struct obj *
|
||||
ini_inv_mkobj_filter(int oclass, boolean got_level1_spellbook)
|
||||
{
|
||||
struct obj *obj;
|
||||
@@ -1092,7 +1092,7 @@ ini_inv_mkobj_filter(int oclass, boolean got_level1_spellbook)
|
||||
|
||||
/* substitute object with something else based on race.
|
||||
only changes otyp, and returns it. */
|
||||
static short
|
||||
staticfn short
|
||||
ini_inv_obj_substitution(struct trobj *trop, struct obj *obj)
|
||||
{
|
||||
if (gu.urace.mnum != PM_HUMAN) {
|
||||
@@ -1116,7 +1116,7 @@ ini_inv_obj_substitution(struct trobj *trop, struct obj *obj)
|
||||
return obj->otyp;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
ini_inv_adjust_obj(struct trobj *trop, struct obj *obj)
|
||||
{
|
||||
if (trop->trclass == COIN_CLASS) {
|
||||
@@ -1159,7 +1159,7 @@ ini_inv_adjust_obj(struct trobj *trop, struct obj *obj)
|
||||
}
|
||||
|
||||
/* initial inventory: wear, wield, learn the spell/obj */
|
||||
static void
|
||||
staticfn void
|
||||
ini_inv_use_obj(struct obj *obj)
|
||||
{
|
||||
/* Make the type known if necessary */
|
||||
@@ -1206,7 +1206,7 @@ ini_inv_use_obj(struct obj *obj)
|
||||
initialspell(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
ini_inv(struct trobj *trop)
|
||||
{
|
||||
struct obj *obj;
|
||||
|
||||
+71
-70
@@ -8,66 +8,67 @@
|
||||
static const char brief_feeling[] =
|
||||
"have a %s feeling for a moment, then it passes.";
|
||||
|
||||
static boolean mhitm_mgc_atk_negated(struct monst *, struct monst *,
|
||||
staticfn boolean mhitm_mgc_atk_negated(struct monst *, struct monst *,
|
||||
boolean) NONNULLPTRS;
|
||||
static boolean known_hitum(struct monst *, struct obj *, int *, int, int,
|
||||
staticfn boolean known_hitum(struct monst *, struct obj *, int *, int, int,
|
||||
struct attack *, int) NONNULLARG13;
|
||||
static boolean theft_petrifies(struct obj *) NONNULLARG1;
|
||||
static void steal_it(struct monst *, struct attack *) NONNULLARG1;
|
||||
staticfn boolean theft_petrifies(struct obj *) NONNULLARG1;
|
||||
staticfn void steal_it(struct monst *, struct attack *) NONNULLARG1;
|
||||
/* hitum_cleave() has contradictory information. There's a comment
|
||||
* beside the 1st arg 'target' stating non-null, but later on there
|
||||
* is a test for 'target' being null */
|
||||
static boolean hitum_cleave(struct monst *, struct attack *) NO_NNARGS;
|
||||
static boolean double_punch(void);
|
||||
static boolean hitum(struct monst *, struct attack *) NONNULLARG1;
|
||||
static void hmon_hitmon_barehands(struct _hitmon_data *,
|
||||
staticfn boolean hitum_cleave(struct monst *, struct attack *) NO_NNARGS;
|
||||
staticfn boolean double_punch(void);
|
||||
staticfn boolean hitum(struct monst *, struct attack *) NONNULLARG1;
|
||||
staticfn void hmon_hitmon_barehands(struct _hitmon_data *,
|
||||
struct monst *) NONNULLARG12;
|
||||
static void hmon_hitmon_weapon_ranged(struct _hitmon_data *, struct monst *,
|
||||
staticfn void hmon_hitmon_weapon_ranged(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
static void hmon_hitmon_weapon_melee(struct _hitmon_data *, struct monst *,
|
||||
staticfn void hmon_hitmon_weapon_melee(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
static void hmon_hitmon_weapon(struct _hitmon_data *, struct monst *,
|
||||
staticfn void hmon_hitmon_weapon(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
static void hmon_hitmon_potion(struct _hitmon_data *, struct monst *,
|
||||
staticfn void hmon_hitmon_potion(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
static void hmon_hitmon_misc_obj(struct _hitmon_data *, struct monst *,
|
||||
staticfn void hmon_hitmon_misc_obj(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
static void hmon_hitmon_do_hit(struct _hitmon_data *, struct monst *,
|
||||
staticfn void hmon_hitmon_do_hit(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
static void hmon_hitmon_dmg_recalc(struct _hitmon_data *, struct obj *);
|
||||
static void hmon_hitmon_poison(struct _hitmon_data *, struct monst *,
|
||||
staticfn void hmon_hitmon_dmg_recalc(struct _hitmon_data *, struct obj *);
|
||||
staticfn void hmon_hitmon_poison(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
static void hmon_hitmon_jousting(struct _hitmon_data *, struct monst *,
|
||||
staticfn void hmon_hitmon_jousting(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
static void hmon_hitmon_stagger(struct _hitmon_data *, struct monst *,
|
||||
staticfn void hmon_hitmon_stagger(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
static void hmon_hitmon_pet(struct _hitmon_data *, struct monst *,
|
||||
staticfn void hmon_hitmon_pet(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
static void hmon_hitmon_splitmon(struct _hitmon_data *, struct monst *,
|
||||
staticfn void hmon_hitmon_splitmon(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
static void hmon_hitmon_msg_hit(struct _hitmon_data *, struct monst *,
|
||||
staticfn void hmon_hitmon_msg_hit(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
static void hmon_hitmon_msg_silver(struct _hitmon_data *, struct monst *,
|
||||
staticfn void hmon_hitmon_msg_silver(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
static void hmon_hitmon_msg_lightobj(struct _hitmon_data *, struct monst *,
|
||||
staticfn void hmon_hitmon_msg_lightobj(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
static boolean hmon_hitmon(struct monst *, struct obj *, int, int) NONNULLARG1;
|
||||
static int joust(struct monst *, struct obj *) NONNULLARG12;
|
||||
static void demonpet(void);
|
||||
static boolean m_slips_free(struct monst *, struct attack *) NONNULLPTRS;
|
||||
static void start_engulf(struct monst *) NONNULLARG1;
|
||||
static void end_engulf(void);
|
||||
static int gulpum(struct monst *, struct attack *) NONNULLPTRS;
|
||||
static boolean hmonas(struct monst *) NONNULLARG1;
|
||||
static void nohandglow(struct monst *) NONNULLARG1;
|
||||
static boolean mhurtle_to_doom(struct monst *, int,
|
||||
staticfn boolean hmon_hitmon(struct monst *, struct obj *, int, int)
|
||||
NONNULLARG1;
|
||||
staticfn int joust(struct monst *, struct obj *) NONNULLARG12;
|
||||
staticfn void demonpet(void);
|
||||
staticfn boolean m_slips_free(struct monst *, struct attack *) NONNULLPTRS;
|
||||
staticfn void start_engulf(struct monst *) NONNULLARG1;
|
||||
staticfn void end_engulf(void);
|
||||
staticfn int gulpum(struct monst *, struct attack *) NONNULLPTRS;
|
||||
staticfn boolean hmonas(struct monst *) NONNULLARG1;
|
||||
staticfn void nohandglow(struct monst *) NONNULLARG1;
|
||||
staticfn boolean mhurtle_to_doom(struct monst *, int,
|
||||
struct permonst **) NONNULLARG13;
|
||||
static void first_weapon_hit(struct obj *) NONNULLARG1;
|
||||
static boolean shade_aware(struct obj *) NO_NNARGS;
|
||||
staticfn void first_weapon_hit(struct obj *) NONNULLARG1;
|
||||
staticfn boolean shade_aware(struct obj *) NO_NNARGS;
|
||||
|
||||
#define PROJECTILE(obj) ((obj) && is_ammo(obj))
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
mhitm_mgc_atk_negated(
|
||||
struct monst *magr, struct monst *mdef,
|
||||
boolean verbosely) /* give mesg if magical cancellation prevents damage */
|
||||
@@ -578,7 +579,7 @@ do_attack(struct monst *mtmp)
|
||||
}
|
||||
|
||||
/* really hit target monster; returns TRUE if it still lives */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
known_hitum(
|
||||
struct monst *mon, /* target */
|
||||
struct obj *weapon, /* uwep or uswapwep */
|
||||
@@ -642,7 +643,7 @@ known_hitum(
|
||||
|
||||
/* hit the monster next to you and the monsters to the left and right of it;
|
||||
return False if the primary target is killed, True otherwise */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
hitum_cleave(
|
||||
struct monst *target, /* non-Null; forcefight at nothing doesn't cleave +*/
|
||||
struct attack *uattk) /*+ but we don't enforce that here; Null works ok */
|
||||
@@ -727,7 +728,7 @@ hitum_cleave(
|
||||
|
||||
/* returns True if hero is fighting without a weapon and without a shield and
|
||||
has sufficient skill in bare-handed/martial arts to attack twice */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
double_punch(void)
|
||||
{
|
||||
/* note: P_BARE_HANDED_COMBAT and P_MARTIAL_ARTS are equivalent */
|
||||
@@ -749,7 +750,7 @@ double_punch(void)
|
||||
}
|
||||
|
||||
/* hit target monster; returns TRUE if it still lives */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
hitum(struct monst *mon, struct attack *uattk)
|
||||
{
|
||||
boolean malive, wep_was_destroyed = FALSE;
|
||||
@@ -829,7 +830,7 @@ hmon(struct monst *mon,
|
||||
}
|
||||
|
||||
/* hero hits monster bare handed */
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_barehands(struct _hitmon_data *hmd, struct monst *mon)
|
||||
{
|
||||
long spcdmgflg, silverhit = 0L; /* worn masks */
|
||||
@@ -876,7 +877,7 @@ hmon_hitmon_barehands(struct _hitmon_data *hmd, struct monst *mon)
|
||||
hmd->silvermsg = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_weapon_ranged(
|
||||
struct _hitmon_data *hmd,
|
||||
struct monst *mon,
|
||||
@@ -911,7 +912,7 @@ hmon_hitmon_weapon_ranged(
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_weapon_melee(
|
||||
struct _hitmon_data *hmd,
|
||||
struct monst *mon,
|
||||
@@ -1023,7 +1024,7 @@ hmon_hitmon_weapon_melee(
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_weapon(
|
||||
struct _hitmon_data *hmd,
|
||||
struct monst *mon,
|
||||
@@ -1047,7 +1048,7 @@ hmon_hitmon_weapon(
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_potion(
|
||||
struct _hitmon_data *hmd,
|
||||
struct monst *mon,
|
||||
@@ -1071,7 +1072,7 @@ hmon_hitmon_potion(
|
||||
hmd->dmg = (hmd->mdat == &mons[PM_SHADE]) ? 0 : 1;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_misc_obj(
|
||||
struct _hitmon_data *hmd,
|
||||
struct monst *mon,
|
||||
@@ -1323,7 +1324,7 @@ hmon_hitmon_misc_obj(
|
||||
}
|
||||
|
||||
/* do the actual hitting monster with obj/fists */
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_do_hit(
|
||||
struct _hitmon_data *hmd,
|
||||
struct monst *mon,
|
||||
@@ -1372,7 +1373,7 @@ hmon_hitmon_do_hit(
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_dmg_recalc(struct _hitmon_data *hmd, struct obj *obj)
|
||||
{
|
||||
int dmgbonus = 0, strbonus, absbonus;
|
||||
@@ -1446,7 +1447,7 @@ hmon_hitmon_dmg_recalc(struct _hitmon_data *hmd, struct obj *obj)
|
||||
hmd->dmg = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_poison(
|
||||
struct _hitmon_data *hmd,
|
||||
struct monst *mon,
|
||||
@@ -1477,7 +1478,7 @@ hmon_hitmon_poison(
|
||||
hmd->poiskilled = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_jousting(
|
||||
struct _hitmon_data *hmd,
|
||||
struct monst *mon, /* target */
|
||||
@@ -1506,7 +1507,7 @@ hmon_hitmon_jousting(
|
||||
hmd->hittxt = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_stagger(
|
||||
struct _hitmon_data *hmd,
|
||||
struct monst *mon,
|
||||
@@ -1524,7 +1525,7 @@ hmon_hitmon_stagger(
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_pet(
|
||||
struct _hitmon_data *hmd,
|
||||
struct monst *mon,
|
||||
@@ -1540,7 +1541,7 @@ hmon_hitmon_pet(
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_splitmon(
|
||||
struct _hitmon_data *hmd,
|
||||
struct monst *mon,
|
||||
@@ -1573,7 +1574,7 @@ hmon_hitmon_splitmon(
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_msg_hit(
|
||||
struct _hitmon_data *hmd,
|
||||
struct monst *mon,
|
||||
@@ -1599,7 +1600,7 @@ hmon_hitmon_msg_hit(
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_msg_silver(
|
||||
struct _hitmon_data *hmd,
|
||||
struct monst *mon,
|
||||
@@ -1638,7 +1639,7 @@ hmon_hitmon_msg_silver(
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
hmon_hitmon_msg_lightobj(
|
||||
struct _hitmon_data *hmd,
|
||||
struct monst *mon,
|
||||
@@ -1690,7 +1691,7 @@ hmon_hitmon_msg_lightobj(
|
||||
*/
|
||||
|
||||
/* guts of hmon(); returns True if 'mon' survives */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
hmon_hitmon(
|
||||
struct monst *mon,
|
||||
struct obj *obj,
|
||||
@@ -1849,7 +1850,7 @@ hmon_hitmon(
|
||||
/* joust or martial arts punch is knocking the target back; that might
|
||||
kill 'mon' (via trap) before known_hitum() has a chance to do so;
|
||||
return True if we kill mon, False otherwise */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
mhurtle_to_doom(
|
||||
struct monst *mon, /* target monster */
|
||||
int tmp, /* amount of pending damage */
|
||||
@@ -1870,7 +1871,7 @@ mhurtle_to_doom(
|
||||
|
||||
/* gamelog version of "you've broken never-hit-with-wielded-weapon conduct;
|
||||
the conduct is tracked in known_hitum(); we're called by hmon_hitmon() */
|
||||
static void
|
||||
staticfn void
|
||||
first_weapon_hit(struct obj *weapon)
|
||||
{
|
||||
char buf[BUFSZ];
|
||||
@@ -1899,7 +1900,7 @@ first_weapon_hit(struct obj *weapon)
|
||||
"hit with a wielded weapon (%s) for the first time", buf);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
shade_aware(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
@@ -1963,7 +1964,7 @@ shade_miss(
|
||||
|
||||
/* check whether slippery clothing protects from hug or wrap attack */
|
||||
/* [currently assumes that you are the attacker] */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
m_slips_free(struct monst *mdef, struct attack *mattk)
|
||||
{
|
||||
struct obj *obj;
|
||||
@@ -2005,7 +2006,7 @@ m_slips_free(struct monst *mdef, struct attack *mattk)
|
||||
|
||||
/* used when hitting a monster with a lance while mounted;
|
||||
1: joust hit; 0: ordinary hit; -1: joust but break lance */
|
||||
static int
|
||||
staticfn int
|
||||
joust(struct monst *mon, /* target */
|
||||
struct obj *obj) /* weapon */
|
||||
{
|
||||
@@ -2035,7 +2036,7 @@ joust(struct monst *mon, /* target */
|
||||
}
|
||||
|
||||
/* send in a demon pet for the hero; exercise wisdom */
|
||||
static void
|
||||
staticfn void
|
||||
demonpet(void)
|
||||
{
|
||||
int i;
|
||||
@@ -2050,7 +2051,7 @@ demonpet(void)
|
||||
exercise(A_WIS, TRUE);
|
||||
}
|
||||
|
||||
static boolean
|
||||
staticfn boolean
|
||||
theft_petrifies(struct obj *otmp)
|
||||
{
|
||||
if (uarmg || otmp->otyp != CORPSE
|
||||
@@ -2076,7 +2077,7 @@ theft_petrifies(struct obj *otmp)
|
||||
* If the target is wearing body armor, take all of its possessions;
|
||||
* otherwise, take one object. [Is this really the behavior we want?]
|
||||
*/
|
||||
static void
|
||||
staticfn void
|
||||
steal_it(struct monst *mdef, struct attack *mattk)
|
||||
{
|
||||
struct obj *otmp, *gold = 0, *ustealo, **minvent_ptr;
|
||||
@@ -4783,7 +4784,7 @@ explum(struct monst *mdef, struct attack *mattk)
|
||||
return M_ATTK_HIT;
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
start_engulf(struct monst *mdef)
|
||||
{
|
||||
boolean u_digest = digests(gy.youmonst.data),
|
||||
@@ -4801,7 +4802,7 @@ start_engulf(struct monst *mdef)
|
||||
nh_delay_output();
|
||||
}
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
end_engulf(void)
|
||||
{
|
||||
if (!Invisible) {
|
||||
@@ -4810,7 +4811,7 @@ end_engulf(void)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
gulpum(struct monst *mdef, struct attack *mattk)
|
||||
{
|
||||
static char msgbuf[BUFSZ]; /* for gn.nomovemsg */
|
||||
@@ -5244,7 +5245,7 @@ mhitm_knockback(
|
||||
}
|
||||
|
||||
/* attack monster as a monster; returns True if mon survives */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
hmonas(struct monst *mon)
|
||||
{
|
||||
struct attack *mattk, alt_attk;
|
||||
@@ -6050,7 +6051,7 @@ stumble_onto_mimic(struct monst *mtmp)
|
||||
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static void
|
||||
staticfn void
|
||||
nohandglow(struct monst *mon)
|
||||
{
|
||||
char *hands;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user