NOSTATICFN for src/*
This commit is contained in:
173
src/uhitm.c
173
src/uhitm.c
@@ -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 *,
|
||||
struct monst *) NONNULLARG12;
|
||||
static void hmon_hitmon_weapon_ranged(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
static void hmon_hitmon_weapon_melee(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
static void hmon_hitmon_weapon(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
static void hmon_hitmon_potion(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
static void hmon_hitmon_misc_obj(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
static 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 *,
|
||||
struct obj *) NONNULLARG123;
|
||||
static void hmon_hitmon_jousting(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
static void hmon_hitmon_stagger(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
static void hmon_hitmon_pet(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
static void hmon_hitmon_splitmon(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
static void hmon_hitmon_msg_hit(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
static void hmon_hitmon_msg_silver(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
static 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,
|
||||
struct permonst **) NONNULLARG13;
|
||||
static void first_weapon_hit(struct obj *) NONNULLARG1;
|
||||
static boolean shade_aware(struct obj *) NO_NNARGS;
|
||||
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;
|
||||
staticfn void hmon_hitmon_weapon_ranged(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
staticfn void hmon_hitmon_weapon_melee(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
staticfn void hmon_hitmon_weapon(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
staticfn void hmon_hitmon_potion(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
staticfn void hmon_hitmon_misc_obj(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
staticfn void hmon_hitmon_do_hit(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
staticfn void hmon_hitmon_dmg_recalc(struct _hitmon_data *, struct obj *);
|
||||
staticfn void hmon_hitmon_poison(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
staticfn void hmon_hitmon_jousting(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG123;
|
||||
staticfn void hmon_hitmon_stagger(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
staticfn void hmon_hitmon_pet(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
staticfn void hmon_hitmon_splitmon(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
staticfn void hmon_hitmon_msg_hit(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
staticfn void hmon_hitmon_msg_silver(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
staticfn void hmon_hitmon_msg_lightobj(struct _hitmon_data *, struct monst *,
|
||||
struct obj *) NONNULLARG12;
|
||||
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;
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user