-/* $NetBSD: use.c,v 1.8 2008/01/14 00:23:53 dholland Exp $ */
+/* $NetBSD: use.c,v 1.10 2009/08/12 08:44:45 dholland Exp $ */
/*
* Copyright (c) 1988, 1993
#if 0
static char sccsid[] = "@(#)use.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: use.c,v 1.8 2008/01/14 00:23:53 dholland Exp $");
+__RCSID("$NetBSD: use.c,v 1.10 2009/08/12 08:44:45 dholland Exp $");
#endif
#endif /* not lint */
short extra_hp = 0;
boolean detect_monster = 0;
boolean con_mon = 0;
-const char *strange_feeling = "you have a strange feeling for a moment, then it passes";
+
+static const char strange_feeling[] =
+ "you have a strange feeling for a moment, then it passes";
+
+static const char *get_ench_color(void);
+static void go_blind(void);
+static void hold_monster(void);
+static void idntfy(void);
+static void potion_heal(int);
+static void uncurse_all(void);
void
-quaff()
+quaff(void)
{
short ch;
object *obj;
}
void
-read_scroll()
+read_scroll(void)
{
short ch;
object *obj;
*/
void
-vanish(obj, rm, pack)
- object *obj;
- short rm;
- object *pack;
+vanish(object *obj, short rm, object *pack)
{
if (obj->quantity > 1) {
obj->quantity--;
}
}
-void
-potion_heal(extra)
- int extra;
+static void
+potion_heal(int extra)
{
float ratio;
short add;
if (extra) {
ratio += ratio;
}
- add = (short)(ratio * ((float)rogue.hp_max - rogue.hp_current));
+ add = (short)(ratio * (rogue.hp_max - rogue.hp_current));
rogue.hp_current += add;
if (rogue.hp_current > rogue.hp_max) {
rogue.hp_current = rogue.hp_max;
unblind();
}
if (confused && extra) {
- unconfuse();
+ unconfuse();
} else if (confused) {
confused = (confused / 2) + 1;
}
}
}
-void
-idntfy()
+static void
+idntfy(void)
{
short ch;
object *obj;
}
void
-eat()
+eat(void)
{
short ch;
short moves;
vanish(obj, 1, &rogue.pack);
}
-void
-hold_monster()
+static void
+hold_monster(void)
{
short i, j;
short mcount = 0;
}
void
-tele()
+tele(void)
{
mvaddch(rogue.row, rogue.col, get_dungeon_char(rogue.row, rogue.col));
}
void
-hallucinate()
+hallucinate(void)
{
object *obj, *monster;
short ch;
}
void
-unhallucinate()
+unhallucinate(void)
{
halluc = 0;
relight();
}
void
-unblind()
+unblind(void)
{
blind = 0;
messagef(1, "the veil of darkness lifts");
}
void
-relight()
+relight(void)
{
if (cur_room == PASSAGE) {
light_passage(rogue.row, rogue.col);
}
void
-take_a_nap()
+take_a_nap(void)
{
short i;
messagef(0, "%s", you_can_move_again);
}
-void
-go_blind()
+static void
+go_blind(void)
{
short i, j;
mvaddch(rogue.row, rogue.col, rogue.fchar);
}
-const char *
-get_ench_color()
+static const char *
+get_ench_color(void)
{
if (halluc) {
return(id_potions[get_rand(0, POTIONS-1)].title);
}
void
-cnfs()
+cnfs(void)
{
confused += get_rand(12, 22);
}
void
-unconfuse()
+unconfuse(void)
{
confused = 0;
messagef(1, "you feel less %s now", (halluc ? "trippy" : "confused"));
}
-void
-uncurse_all()
+static void
+uncurse_all(void)
{
object *obj;