From 39a1066cab493ece48c6e692513d1311b7e27c44 Mon Sep 17 00:00:00 2001 From: dholland Date: Wed, 12 Aug 2009 08:44:45 +0000 Subject: sprinkle static --- rogue/inventory.c | 14 +++++++++----- rogue/message.c | 8 +++++--- rogue/monster.c | 26 +++++++++++++++++--------- rogue/move.c | 23 +++++++++++++++-------- rogue/object.c | 35 +++++++++++++++++++++++------------ rogue/pack.c | 17 +++++++++++------ rogue/random.c | 8 +++++--- rogue/rogue.h | 54 +----------------------------------------------------- rogue/room.c | 20 +++++++++++++------- rogue/score.c | 20 +++++++++++++------- rogue/throw.c | 8 ++++++-- rogue/trap.c | 6 +++--- rogue/use.c | 23 +++++++++++++++-------- 13 files changed, 136 insertions(+), 126 deletions(-) (limited to 'rogue') diff --git a/rogue/inventory.c b/rogue/inventory.c index b1bc1595..1f744bde 100644 --- a/rogue/inventory.c +++ b/rogue/inventory.c @@ -1,4 +1,4 @@ -/* $NetBSD: inventory.c,v 1.13 2008/01/14 03:50:01 dholland Exp $ */ +/* $NetBSD: inventory.c,v 1.14 2009/08/12 08:44:45 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)inventory.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: inventory.c,v 1.13 2008/01/14 03:50:01 dholland Exp $"); +__RCSID("$NetBSD: inventory.c,v 1.14 2009/08/12 08:44:45 dholland Exp $"); #endif #endif /* not lint */ @@ -211,6 +211,10 @@ static const struct id_com_s com_id_tab[COMS] = { {'q', "q quaff potion" } }; +static int get_com_id(int *, short); +static int pr_com_id(int); +static int pr_motion_char(int); + void inventory(const object *pack, unsigned short mask) { @@ -355,7 +359,7 @@ MORE: } } -int +static int pr_com_id(int ch) { int i; @@ -368,7 +372,7 @@ pr_com_id(int ch) return(1); } -int +static int get_com_id(int *indexp, short ch) { short i; @@ -382,7 +386,7 @@ get_com_id(int *indexp, short ch) return(0); } -int +static int pr_motion_char(int ch) { if ( (ch == 'J') || diff --git a/rogue/message.c b/rogue/message.c index 73efdd9a..e38377de 100644 --- a/rogue/message.c +++ b/rogue/message.c @@ -1,4 +1,4 @@ -/* $NetBSD: message.c,v 1.13 2008/01/14 03:50:01 dholland Exp $ */ +/* $NetBSD: message.c,v 1.14 2009/08/12 08:44:45 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)message.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: message.c,v 1.13 2008/01/14 03:50:01 dholland Exp $"); +__RCSID("$NetBSD: message.c,v 1.14 2009/08/12 08:44:45 dholland Exp $"); #endif #endif /* not lint */ @@ -67,6 +67,8 @@ boolean msg_cleared = 1; char hunger_str[HUNGER_STR_LEN] = ""; const char *more = "-more-"; +static void save_screen(void); + static void message(const char *msg, boolean intrpt) @@ -316,7 +318,7 @@ print_stats(int stat_mask) refresh(); } -void +static void save_screen(void) { FILE *fp; diff --git a/rogue/monster.c b/rogue/monster.c index 3bfd918e..fd90f36d 100644 --- a/rogue/monster.c +++ b/rogue/monster.c @@ -1,4 +1,4 @@ -/* $NetBSD: monster.c,v 1.14 2008/01/14 03:50:01 dholland Exp $ */ +/* $NetBSD: monster.c,v 1.15 2009/08/12 08:44:45 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)monster.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: monster.c,v 1.14 2008/01/14 03:50:01 dholland Exp $"); +__RCSID("$NetBSD: monster.c,v 1.15 2009/08/12 08:44:45 dholland Exp $"); #endif #endif /* not lint */ @@ -120,6 +120,14 @@ static object mon_tab[MONSTERS] = { {(ASLEEP|WAKENS|WANDERS),"1d7",21,'Z',8,5,14,69,0,0,0,0,0} }; +static void aim_monster(object *); +static int flit(object *); +static int move_confused(object *); +static int mtry(object *, short, short); +static int no_room_for_monster(int); +static void put_m_at(short, short, object *); +static int rogue_is_around(int, int); + void put_mons(void) { @@ -433,7 +441,7 @@ O: } } -int +static int mtry(object *monster, short row, short col) { if (mon_can_go(monster, row, col)) { @@ -591,7 +599,7 @@ mon_name(const object *monster) return(m_names[ch]); } -int +static int rogue_is_around(int row, int col) { short rdif, cdif, retval; @@ -694,7 +702,7 @@ create_monster(void) } } -void +static void put_m_at(short row, short col, object *monster) { monster->row = row; @@ -705,7 +713,7 @@ put_m_at(short row, short col, object *monster) aim_monster(monster); } -void +static void aim_monster(object *monster) { short i, rn, d, r; @@ -738,7 +746,7 @@ rogue_can_see(int row, int col) return(retval); } -int +static int move_confused(object *monster) { short i, row, col; @@ -768,7 +776,7 @@ move_confused(object *monster) return(0); } -int +static int flit(object *monster) { short i, row, col; @@ -805,7 +813,7 @@ gr_obj_char(void) return(rs[r]); } -int +static int no_room_for_monster(int rn) { short i, j; diff --git a/rogue/move.c b/rogue/move.c index 73a2ce0e..7d1c2ca1 100644 --- a/rogue/move.c +++ b/rogue/move.c @@ -1,4 +1,4 @@ -/* $NetBSD: move.c,v 1.11 2008/01/14 03:50:02 dholland Exp $ */ +/* $NetBSD: move.c,v 1.12 2009/08/12 08:44:45 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: move.c,v 1.11 2008/01/14 03:50:02 dholland Exp $"); +__RCSID("$NetBSD: move.c,v 1.12 2009/08/12 08:44:45 dholland Exp $"); #endif #endif /* not lint */ @@ -59,6 +59,13 @@ short m_moves = 0; boolean jump = 0; const char *you_can_move_again = "you can move again"; +static boolean can_turn(short, short); +static boolean check_hunger(boolean); +static char gr_dir(void); +static void heal(void); +static boolean next_to_something(int, int); +static void turn_passage(short, boolean); + int one_move_rogue(short dirch, short pickup) { @@ -231,7 +238,7 @@ is_passable(int row, int col) return(dungeon[row][col] & (FLOOR | TUNNEL | DOOR | STAIRS | TRAP)); } -boolean +static boolean next_to_something(int drow, int dcol) { short i, j, i_end, j_end, row, col; @@ -364,7 +371,7 @@ is_direction(short c, short *d) return(1); } -boolean +static boolean check_hunger(boolean msg_only) { short i, n; @@ -504,7 +511,7 @@ rest(int count) } } -char +static char gr_dir(void) { short d; @@ -540,7 +547,7 @@ gr_dir(void) return(d); } -void +static void heal(void) { static short heal_exp = -1, n, c = 0; @@ -605,7 +612,7 @@ heal(void) } } -boolean +static boolean can_turn(short nrow, short ncol) { if ((dungeon[nrow][ncol] & TUNNEL) && is_passable(nrow, ncol)) { @@ -614,7 +621,7 @@ can_turn(short nrow, short ncol) return(0); } -void +static void turn_passage(short dir, boolean fast) { short crow = rogue.row, ccol = rogue.col, turns = 0; diff --git a/rogue/object.c b/rogue/object.c index 0f475613..9897ec6a 100644 --- a/rogue/object.c +++ b/rogue/object.c @@ -1,4 +1,4 @@ -/* $NetBSD: object.c,v 1.13 2008/01/14 03:50:02 dholland Exp $ */ +/* $NetBSD: object.c,v 1.14 2009/08/12 08:44:45 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)object.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: object.c,v 1.13 2008/01/14 03:50:02 dholland Exp $"); +__RCSID("$NetBSD: object.c,v 1.14 2009/08/12 08:44:45 dholland Exp $"); #endif #endif /* not lint */ @@ -162,6 +162,17 @@ struct id id_rings[RINGS] = { {270, "", "of searching ",0}, }; +static void gr_armor(object *); +static void gr_potion(object *); +static void gr_scroll(object *); +static void gr_wand(object *); +static void gr_weapon(object *, int); +static unsigned short gr_what_is(void); +static void make_party(void); +static void plant_gold(short, short, boolean); +static void put_gold(void); +static void rand_place(object *); + void put_objects(void) { @@ -185,7 +196,7 @@ put_objects(void) put_gold(); } -void +static void put_gold(void) { short i, j; @@ -215,7 +226,7 @@ put_gold(void) } } -void +static void plant_gold(short row, short col, boolean is_maze) { object *obj; @@ -379,7 +390,7 @@ gr_object(void) return(obj); } -unsigned short +static unsigned short gr_what_is(void) { short percent; @@ -405,7 +416,7 @@ gr_what_is(void) return(what_is); } -void +static void gr_scroll(object *obj) { short percent; @@ -443,7 +454,7 @@ gr_scroll(object *obj) } } -void +static void gr_potion(object *obj) { short percent; @@ -483,7 +494,7 @@ gr_potion(object *obj) } } -void +static void gr_weapon(object *obj, int assign_wk) { short percent; @@ -547,7 +558,7 @@ gr_weapon(object *obj, int assign_wk) } } -void +static void gr_armor(object *obj) { short percent; @@ -573,7 +584,7 @@ gr_armor(object *obj) } } -void +static void gr_wand(object *obj) { obj->what_is = WAND; @@ -640,7 +651,7 @@ free_object(object *obj) free_list = obj; } -void +static void make_party(void) { short n; @@ -702,7 +713,7 @@ put_amulet(void) rand_place(obj); } -void +static void rand_place(object *obj) { short row, col; diff --git a/rogue/pack.c b/rogue/pack.c index ac516df0..14bb6369 100644 --- a/rogue/pack.c +++ b/rogue/pack.c @@ -1,4 +1,4 @@ -/* $NetBSD: pack.c,v 1.10 2008/01/14 03:50:02 dholland Exp $ */ +/* $NetBSD: pack.c,v 1.11 2009/08/12 08:44:45 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)pack.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: pack.c,v 1.10 2008/01/14 03:50:02 dholland Exp $"); +__RCSID("$NetBSD: pack.c,v 1.11 2009/08/12 08:44:45 dholland Exp $"); #endif #endif /* not lint */ @@ -57,6 +57,11 @@ __RCSID("$NetBSD: pack.c,v 1.10 2008/01/14 03:50:02 dholland Exp $"); const char *curse_message = "you can't, it appears to be cursed"; +static object *check_duplicate(object *, object *); +static boolean is_pack_letter(short *, unsigned short *); +static boolean mask_pack(const object *, unsigned short); +static short next_avail_ichar(void); + object * add_to_pack(object *obj, object *pack, int condense) { @@ -205,7 +210,7 @@ drop(void) (void)reg_move(); } -object * +static object * check_duplicate(object *obj, object *pack) { object *op; @@ -238,7 +243,7 @@ check_duplicate(object *obj, object *pack) return(0); } -short +static short next_avail_ichar(void) { object *obj; @@ -488,7 +493,7 @@ pack_count(const object *new_obj) return(count); } -boolean +static boolean mask_pack(const object *pack, unsigned short mask) { while (pack->next_object) { @@ -500,7 +505,7 @@ mask_pack(const object *pack, unsigned short mask) return(0); } -boolean +static boolean is_pack_letter(short *c, unsigned short *mask) { if (((*c == '?') || (*c == '!') || (*c == ':') || (*c == '=') || diff --git a/rogue/random.c b/rogue/random.c index e527903c..f119c0f9 100644 --- a/rogue/random.c +++ b/rogue/random.c @@ -1,4 +1,4 @@ -/* $NetBSD: random.c,v 1.7 2008/01/14 03:50:02 dholland Exp $ */ +/* $NetBSD: random.c,v 1.8 2009/08/12 08:44:45 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)random.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: random.c,v 1.7 2008/01/14 03:50:02 dholland Exp $"); +__RCSID("$NetBSD: random.c,v 1.8 2009/08/12 08:44:45 dholland Exp $"); #endif #endif /* not lint */ @@ -73,6 +73,8 @@ static int rand_deg = 31; static int rand_sep = 3; static long *end_ptr = &rntb[32]; +static long rrandom(void); + void srrandom(int x) { @@ -91,7 +93,7 @@ srrandom(int x) } } -long +static long rrandom(void) { long i; diff --git a/rogue/rogue.h b/rogue/rogue.h index e765467b..e46de5d8 100644 --- a/rogue/rogue.h +++ b/rogue/rogue.h @@ -1,4 +1,4 @@ -/* $NetBSD: rogue.h,v 1.19 2008/01/14 03:50:02 dholland Exp $ */ +/* $NetBSD: rogue.h,v 1.20 2009/08/12 08:44:45 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -443,10 +443,7 @@ struct rogue_time { #include object *alloc_object(void); -object *check_duplicate(object *, object *); -const char *get_ench_color(void); object *get_letter_object(int); -object *get_thrown_at_monster(object *, short, short *, short *); object *gr_monster(object *, int); object *gr_object(void); char *md_getenv(const char *); @@ -460,16 +457,12 @@ object *pick_up(int, int, short *); void add_exp(int, boolean); void add_traps(void); void aggravate(void); -void aim_monster(object *); void bounce(short, short, short, short, short); void byebye(int); void c_object_for_wizard(void); void call_it(void); boolean can_move(int, int, int, int); -boolean can_turn(short, short); -void center(short, const char *); void check_gold_seeker(object *); -boolean check_hunger(boolean); boolean check_imitator(object *); void check_message(void); int check_up(void); @@ -493,12 +486,9 @@ void edit_opts(void); void error_save(int) __attribute__((__noreturn__)); void fight(boolean); boolean flame_broil(object *); -int flit(object *); -void flop_weapon(object *, short, short); void free_object(object *); void free_stuff(object *); int get_armor_class(const object *); -int get_com_id(int *, short); int get_damage(const char *, boolean); void get_desc(const object *, char *, size_t); void get_dir_rc(short, short *, short *, short); @@ -508,35 +498,22 @@ int get_hit_chance(const object *); int get_input_line(const char *, const char *, char *, size_t, const char *, boolean, boolean); char get_mask_char(unsigned short); int get_number(const char *); -boolean get_oth_room(short, short *, short *); int get_rand(int, int); short get_room_number(int, int); -int get_value(const object *); void get_wand_and_ring_materials(void); int get_weapon_damage(const object *); char gmc(object *); char gmc_row_col(int, int); -void go_blind(void); -void gr_armor(object *); -char gr_dir(void); char gr_obj_char(void); -void gr_potion(object *); void gr_ring(object *, boolean); short gr_room(void); void gr_row_col(short *, short *, unsigned short); -void gr_scroll(object *); -void gr_wand(object *); -void gr_weapon(object *, int); void hallucinate(void); boolean has_amulet(void); -void heal(void); -void hold_monster(void); int hp_raise(void); -void id_all(void); void id_com(void); void id_trap(void); void id_type(void); -void idntfy(void); boolean imitating(short, short); int init(int, char **); void insert_score(char [][82], char [][30], const char *, short, short, const object *, int); @@ -546,7 +523,6 @@ void inventory(const object *, unsigned short); boolean is_all_connected(void); boolean is_digit(int); boolean is_direction(short, short *); -boolean is_pack_letter(short *, unsigned short *); boolean is_passable(int, int); boolean is_vowel(short); void kick_into_pack(void); @@ -556,9 +532,7 @@ void light_passage(int, int); void light_up_room(int); boolean m_confuse(object *); void make_level(void); -void make_party(void); void make_scroll_titles(void); -boolean mask_pack(const object *, unsigned short); boolean md_df(const char *); void md_exit(int) __attribute__((__noreturn__)); void md_gct(struct rogue_time *); @@ -580,39 +554,25 @@ int mon_can_go(const object *, short, short); int mon_damage(object *, short); void mon_hit(object *); boolean mon_sees(const object *, int, int); -int move_confused(object *); void move_mon_to(object *, short, short); void move_onto(void); -int mtry(object *, short, short); void multiple_move_rogue(short); void mv_1_monster(object *, short, short); void mv_aquatars(void); void mv_mons(void); int name_cmp(char *, const char *); -short next_avail_ichar(void); -boolean next_to_something(int, int); void nickize(char *, const char *, const char *); -int no_room_for_monster(int); int one_move_rogue(short, short); void onintr(int); -void opt_erase(int); -void opt_go(int); -void opt_show(int); short pack_count(const object *); short pack_letter(const char *, unsigned short); void pad(const char *, short); void party_monsters(int, int); short party_objects(int); void place_at(object *, int, int); -void plant_gold(short, short, boolean); void play_level(void); -void potion_heal(int); -int pr_com_id(int); -int pr_motion_char(int); void print_stats(int); void put_amulet(void); -void put_gold(void); -void put_m_at(short, short, object *); void put_mons(void); void put_objects(void); void put_on_ring(void); @@ -624,7 +584,6 @@ void quit(boolean); int r_index(const char *, int, boolean); void rand_around(short, short *, short *); int rand_percent(int); -void rand_place(object *); void read_scroll(void); boolean reg_move(void); void relight(void); @@ -637,17 +596,12 @@ void ring_stats(boolean); int rogue_can_see(int, int); void rogue_damage(short, object *, short); void rogue_hit(object *, boolean); -int rogue_is_around(int, int); -long rrandom(void); void rust(object *); void s_con_mon(object *); void save_game(void); void save_into_file(const char *); -void save_screen(void); void search(short, boolean); boolean seek_gold(object *); -void sell_pack(void); -void sf_error(void) __attribute__((__noreturn__)); void show_average_hp(void); void show_monsters(void); void show_objects(void); @@ -663,19 +617,14 @@ void take_from_pack(object *, object *); void take_off(void); void tele(void); void throw(void); -boolean throw_at_monster(object *, object *); -short trap_at(int, int); void trap_player(short, short); -void turn_passage(short, boolean); void un_put_on(object *); void unblind(void); void unconfuse(void); -void uncurse_all(void); void unhallucinate(void); void unwear(object *); void unwield(object *); void vanish(object *, short, object *); -void visit_rooms(int); void wait_for_ack(void); void wake_room(short, boolean, short, short); void wake_up(object *); @@ -689,7 +638,6 @@ void xxxx(char *, short); void zapp(void); object *add_to_pack(object *, object *, int); struct id *get_id_table(const object *); -unsigned short gr_what_is(void); extern boolean ask_quit; extern boolean being_held; diff --git a/rogue/room.c b/rogue/room.c index 6494046d..0071489f 100644 --- a/rogue/room.c +++ b/rogue/room.c @@ -1,4 +1,4 @@ -/* $NetBSD: room.c,v 1.12 2008/01/14 03:50:02 dholland Exp $ */ +/* $NetBSD: room.c,v 1.13 2009/08/12 08:44:45 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)room.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: room.c,v 1.12 2008/01/14 03:50:02 dholland Exp $"); +__RCSID("$NetBSD: room.c,v 1.13 2009/08/12 08:44:45 dholland Exp $"); #endif #endif /* not lint */ @@ -96,6 +96,12 @@ static const struct option { } }; +static boolean get_oth_room(short, short *, short *); +static void opt_erase(int); +static void opt_go(int); +static void opt_show(int); +static void visit_rooms(int); + void light_up_room(int rn) { @@ -346,7 +352,7 @@ is_all_connected(void) return(1); } -void +static void visit_rooms(int rn) { short i; @@ -486,7 +492,7 @@ dr_course(object *monster, boolean entering, short row, short col) } } -boolean +static boolean get_oth_room(short rn, short *row, short *col) { short d = -1; @@ -612,7 +618,7 @@ CH: } } -void +static void opt_show(int i) { const char *s; @@ -628,7 +634,7 @@ opt_show(int i) addstr(s); } -void +static void opt_erase(int i) { const struct option *opt = &options[i]; @@ -637,7 +643,7 @@ opt_erase(int i) clrtoeol(); } -void +static void opt_go(int i) { move(i, strlen(options[i].prompt)); diff --git a/rogue/score.c b/rogue/score.c index f094fa2d..231f0c6d 100644 --- a/rogue/score.c +++ b/rogue/score.c @@ -1,4 +1,4 @@ -/* $NetBSD: score.c,v 1.14 2008/01/14 03:50:02 dholland Exp $ */ +/* $NetBSD: score.c,v 1.15 2009/08/12 08:44:45 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: score.c,v 1.14 2008/01/14 03:50:02 dholland Exp $"); +__RCSID("$NetBSD: score.c,v 1.15 2009/08/12 08:44:45 dholland Exp $"); #endif #endif /* not lint */ @@ -57,6 +57,12 @@ __RCSID("$NetBSD: score.c,v 1.14 2008/01/14 03:50:02 dholland Exp $"); #include "rogue.h" #include "pathnames.h" +static void center(short, const char *); +static int get_value(const object *); +static void id_all(void); +static void sell_pack(void); +static void sf_error(void) __attribute__((__noreturn__)); + void killed_by(const object *monster, short other) { @@ -516,7 +522,7 @@ is_vowel(short ch) (ch == 'u') ); } -void +static void sell_pack(void) { object *obj; @@ -548,7 +554,7 @@ sell_pack(void) messagef(0, "%s", ""); /* gcc objects to just "" */ } -int +static int get_value(const object *obj) { short wc; @@ -596,7 +602,7 @@ get_value(const object *obj) return(val); } -void +static void id_all(void) { short i; @@ -650,7 +656,7 @@ xxx(boolean st) return(r); } -void +static void center(short row, const char *buf) { short margin; @@ -659,7 +665,7 @@ center(short row, const char *buf) mvaddstr(row, margin, buf); } -void +static void sf_error(void) { md_lock(0); diff --git a/rogue/throw.c b/rogue/throw.c index e55e05ee..f8663dc9 100644 --- a/rogue/throw.c +++ b/rogue/throw.c @@ -1,4 +1,4 @@ -/* $NetBSD: throw.c,v 1.10 2008/01/14 03:50:03 dholland Exp $ */ +/* $NetBSD: throw.c,v 1.11 2009/08/12 08:44:45 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)throw.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: throw.c,v 1.10 2008/01/14 03:50:03 dholland Exp $"); +__RCSID("$NetBSD: throw.c,v 1.11 2009/08/12 08:44:45 dholland Exp $"); #endif #endif /* not lint */ @@ -55,6 +55,10 @@ __RCSID("$NetBSD: throw.c,v 1.10 2008/01/14 03:50:03 dholland Exp $"); #include "rogue.h" +static void flop_weapon(object *, short, short); +static object *get_thrown_at_monster(object *, short, short *, short *); +static boolean throw_at_monster(object *, object *); + void throw(void) { diff --git a/rogue/trap.c b/rogue/trap.c index 6b9188e5..ae3c9186 100644 --- a/rogue/trap.c +++ b/rogue/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.9 2008/01/14 03:50:03 dholland Exp $ */ +/* $NetBSD: trap.c,v 1.10 2009/08/12 08:44:45 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)trap.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: trap.c,v 1.9 2008/01/14 03:50:03 dholland Exp $"); +__RCSID("$NetBSD: trap.c,v 1.10 2009/08/12 08:44:45 dholland Exp $"); #endif #endif /* not lint */ @@ -74,7 +74,7 @@ static const char *const trap_strings[TRAPS * 2] = { "a gush of water hits you on the head" }; -short +static short trap_at(int row, int col) { short i; diff --git a/rogue/use.c b/rogue/use.c index b02b554b..8371a6f0 100644 --- a/rogue/use.c +++ b/rogue/use.c @@ -1,4 +1,4 @@ -/* $NetBSD: use.c,v 1.9 2008/01/14 03:50:03 dholland Exp $ */ +/* $NetBSD: use.c,v 1.10 2009/08/12 08:44:45 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.9 2008/01/14 03:50:03 dholland Exp $"); +__RCSID("$NetBSD: use.c,v 1.10 2009/08/12 08:44:45 dholland Exp $"); #endif #endif /* not lint */ @@ -68,6 +68,13 @@ boolean con_mon = 0; 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(void) { @@ -310,7 +317,7 @@ vanish(object *obj, short rm, object *pack) } } -void +static void potion_heal(int extra) { float ratio; @@ -356,7 +363,7 @@ potion_heal(int extra) } } -void +static void idntfy(void) { short ch; @@ -424,7 +431,7 @@ eat(void) vanish(obj, 1, &rogue.pack); } -void +static void hold_monster(void) { short i, j; @@ -548,7 +555,7 @@ take_a_nap(void) messagef(0, "%s", you_can_move_again); } -void +static void go_blind(void) { short i, j; @@ -580,7 +587,7 @@ go_blind(void) mvaddch(rogue.row, rogue.col, rogue.fchar); } -const char * +static const char * get_ench_color(void) { if (halluc) { @@ -604,7 +611,7 @@ unconfuse(void) messagef(1, "you feel less %s now", (halluc ? "trippy" : "confused")); } -void +static void uncurse_all(void) { object *obj; -- cgit v1.2.3-56-ge451