diff options
Diffstat (limited to 'rogue/use.c')
-rw-r--r-- | rogue/use.c | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/rogue/use.c b/rogue/use.c index 21136aa3..b02b554b 100644 --- a/rogue/use.c +++ b/rogue/use.c @@ -1,4 +1,4 @@ -/* $NetBSD: use.c,v 1.8 2008/01/14 00:23:53 dholland Exp $ */ +/* $NetBSD: use.c,v 1.9 2008/01/14 03:50:03 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #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.9 2008/01/14 03:50:03 dholland Exp $"); #endif #endif /* not lint */ @@ -64,10 +64,12 @@ boolean see_invisible = 0; 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"; void -quaff() +quaff(void) { short ch; object *obj; @@ -179,7 +181,7 @@ quaff() } void -read_scroll() +read_scroll(void) { short ch; object *obj; @@ -288,10 +290,7 @@ read_scroll() */ void -vanish(obj, rm, pack) - object *obj; - short rm; - object *pack; +vanish(object *obj, short rm, object *pack) { if (obj->quantity > 1) { obj->quantity--; @@ -312,8 +311,7 @@ vanish(obj, rm, pack) } void -potion_heal(extra) - int extra; +potion_heal(int extra) { float ratio; short add; @@ -337,7 +335,7 @@ potion_heal(extra) 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; @@ -347,7 +345,7 @@ potion_heal(extra) unblind(); } if (confused && extra) { - unconfuse(); + unconfuse(); } else if (confused) { confused = (confused / 2) + 1; } @@ -359,7 +357,7 @@ potion_heal(extra) } void -idntfy() +idntfy(void) { short ch; object *obj; @@ -387,7 +385,7 @@ AGAIN: } void -eat() +eat(void) { short ch; short moves; @@ -427,7 +425,7 @@ eat() } void -hold_monster() +hold_monster(void) { short i, j; short mcount = 0; @@ -460,7 +458,7 @@ hold_monster() } void -tele() +tele(void) { mvaddch(rogue.row, rogue.col, get_dungeon_char(rogue.row, rogue.col)); @@ -473,7 +471,7 @@ tele() } void -hallucinate() +hallucinate(void) { object *obj, *monster; short ch; @@ -503,7 +501,7 @@ hallucinate() } void -unhallucinate() +unhallucinate(void) { halluc = 0; relight(); @@ -511,7 +509,7 @@ unhallucinate() } void -unblind() +unblind(void) { blind = 0; messagef(1, "the veil of darkness lifts"); @@ -525,7 +523,7 @@ unblind() } void -relight() +relight(void) { if (cur_room == PASSAGE) { light_passage(rogue.row, rogue.col); @@ -536,7 +534,7 @@ relight() } void -take_a_nap() +take_a_nap(void) { short i; @@ -551,7 +549,7 @@ take_a_nap() } void -go_blind() +go_blind(void) { short i, j; @@ -583,7 +581,7 @@ go_blind() } const char * -get_ench_color() +get_ench_color(void) { if (halluc) { return(id_potions[get_rand(0, POTIONS-1)].title); @@ -594,20 +592,20 @@ get_ench_color() } 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() +uncurse_all(void) { object *obj; |