From 6a35e3de332df186eab39c3b67506882409a3ca2 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Tue, 2 May 2017 19:20:57 +0200 Subject: Remove redundant (void) parameters and return value casts --- src/birth.cc | 26 ++-- src/birth.hpp | 6 +- src/bldg.cc | 10 +- src/bldg.hpp | 2 +- src/cave.cc | 32 ++--- src/cave.hpp | 26 ++-- src/cmd1.cc | 4 +- src/cmd1.hpp | 8 +- src/cmd2.cc | 36 +++--- src/cmd2.hpp | 40 +++--- src/cmd3.cc | 40 +++--- src/cmd3.hpp | 36 +++--- src/cmd4.cc | 72 +++++------ src/cmd4.hpp | 40 +++--- src/cmd5.cc | 18 +-- src/cmd5.hpp | 10 +- src/cmd6.cc | 386 +++++++++++++++++++++++++++---------------------------- src/cmd6.hpp | 22 ++-- src/cmd7.cc | 60 ++++----- src/cmd7.hpp | 28 ++-- src/dungeon.cc | 176 ++++++++++++------------- src/files.cc | 74 +++++------ src/files.h | 2 +- src/files.hpp | 14 +- src/generate.cc | 24 ++-- src/generate.hpp | 2 +- src/init1.cc | 2 +- src/init2.cc | 20 +-- src/init2.h | 2 +- src/init2.hpp | 2 +- src/levels.hpp | 8 +- src/loadsave.cc | 16 +-- src/loadsave.h | 4 +- src/loadsave.hpp | 2 +- src/main.cc | 2 +- src/melee1.cc | 8 +- src/melee2.cc | 52 ++++---- src/melee2.hpp | 2 +- src/messages.cc | 2 +- src/modules.hpp | 2 +- src/monster1.cc | 2 +- src/monster2.cc | 48 +++---- src/monster2.hpp | 8 +- src/monster3.cc | 14 +- src/monster3.hpp | 16 +-- src/notes.cc | 6 +- src/notes.hpp | 2 +- src/object1.cc | 22 ++-- src/object1.hpp | 10 +- src/object2.cc | 12 +- src/object2.hpp | 12 +- src/powers.cc | 60 ++++----- src/q_betwen.cc | 2 +- src/q_eol.cc | 2 +- src/q_hobbit.cc | 2 +- src/q_nazgul.cc | 2 +- src/q_poison.cc | 4 +- src/q_shroom.cc | 2 +- src/q_spider.cc | 2 +- src/randart.cc | 4 +- src/randart.hpp | 2 +- src/skills.hpp | 18 +-- src/spells1.cc | 70 +++++----- src/spells1.hpp | 6 +- src/spells2.cc | 102 +++++++-------- src/spells2.hpp | 48 +++---- src/squeltch.cc | 4 +- src/squeltch.hpp | 6 +- src/store.cc | 32 ++--- src/util.cc | 46 +++---- src/util.h | 4 +- src/util.hpp | 10 +- src/wild.cc | 2 +- src/wild.hpp | 2 +- src/wizard2.cc | 66 +++++----- src/wizard2.hpp | 4 +- src/xtra1.cc | 84 ++++++------ src/xtra1.hpp | 18 +-- src/xtra2.cc | 28 ++-- src/xtra2.hpp | 22 ++-- src/z-term.h | 16 +-- 81 files changed, 1070 insertions(+), 1070 deletions(-) diff --git a/src/birth.cc b/src/birth.cc index c94fbf4d..36f319d6 100644 --- a/src/birth.cc +++ b/src/birth.cc @@ -174,7 +174,7 @@ void print_desc(cptr txt) /* * Save the current data for later */ -static void save_prev_data(void) +static void save_prev_data() { auto &previous_char = game->previous_char; @@ -318,7 +318,7 @@ static int adjust_stat(int value, int amount, int auto_roll) * * For efficiency, we include a chunk of "calc_bonuses()". */ -static void get_stats(void) +static void get_stats() { int i, j; @@ -434,7 +434,7 @@ void roll_player_hp() /* * Roll for some info that the auto-roller ignores */ -static void get_extra(void) +static void get_extra() { /* Level one */ p_ptr->max_plv = p_ptr->lev = 1; @@ -463,7 +463,7 @@ static void get_extra(void) /* * Fill the random_artifacts array with relevant info. */ -static errr init_randart(void) +static errr init_randart() { int i; @@ -502,7 +502,7 @@ static errr init_randart(void) /* * Get the player's starting money */ -static void get_money(void) +static void get_money() { /* Starting gold */ int gold = randint(100) + 300; @@ -531,7 +531,7 @@ static void get_money(void) * * See 'display_player()' for basic method. */ -static void birth_put_stats(void) +static void birth_put_stats() { int i, p; @@ -568,7 +568,7 @@ static void birth_put_stats(void) /* * Clear all the global "character" data */ -static void player_wipe(void) +static void player_wipe() { auto const &d_info = game->edit_data.d_info; auto &r_info = game->edit_data.r_info; @@ -770,7 +770,7 @@ static void outfit_obj(object_proto const *proto) object_aware(q_ptr); object_known(q_ptr); - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); } @@ -794,7 +794,7 @@ static void player_outfit_object(int qty, int tval, int sval) q_ptr->number = qty; object_aware(q_ptr); object_known(q_ptr); - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); } @@ -817,7 +817,7 @@ static void player_outfit_spellbook(cptr spell_name) * * Having an item makes the player "aware" of its purpose. */ -static void player_outfit(void) +static void player_outfit() { // Shorthand names for convenience cptr class_name = spp_ptr->title; @@ -980,7 +980,7 @@ static void player_outfit(void) q_ptr->timeout = rand_range(3, 7) * 500; object_aware(q_ptr); object_known(q_ptr); - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); } /* Outfit the player with starting items */ @@ -2099,7 +2099,7 @@ static const int birth_stat_costs[(18-10) + 1] = * * Taken from V 2.9.0 */ -static bool_ player_birth_aux_point(void) +static bool_ player_birth_aux_point() { int i; @@ -2682,7 +2682,7 @@ static void init_town(int t_idx) * Note that we may be called with "junk" leftover in the various * fields, so we must be sure to clear them first. */ -void player_birth(void) +void player_birth() { auto const &st_info = game->edit_data.st_info; auto &d_info = game->edit_data.d_info; diff --git a/src/birth.hpp b/src/birth.hpp index 27ad3d2b..82bdfcf6 100644 --- a/src/birth.hpp +++ b/src/birth.hpp @@ -3,9 +3,9 @@ #include "h-basic.h" void print_desc_aux(cptr txt, int y, int x); -void save_savefile_names(void); -bool_ begin_screen(void); -void player_birth(void); +void save_savefile_names(); +bool_ begin_screen(); +void player_birth(); void roll_player_hp(); extern bool_ no_begin_screen; diff --git a/src/bldg.cc b/src/bldg.cc index 8f681744..9b3750a6 100644 --- a/src/bldg.cc +++ b/src/bldg.cc @@ -551,7 +551,7 @@ static bool_ inn_comm(int cmd) { msg_print("The barkeep gives you some gruel and a beer."); msg_print(NULL); - (void) set_food(PY_FOOD_MAX - 1); + set_food(PY_FOOD_MAX - 1); } else msg_print("You're a vampire and I don't have any food for you!"); @@ -754,7 +754,7 @@ static bool_ castle_quest(int y, int x) /* * Displaying town history -KMW- */ -static void town_history(void) +static void town_history() { /* Save screen */ screen_save(); @@ -902,7 +902,7 @@ static bool item_tester_hook_melee_weapon(object_type const *o_ptr) /* * compare_weapons -KMW- */ -static bool_ compare_weapons(void) +static bool_ compare_weapons() { int item, i; @@ -1080,7 +1080,7 @@ static bool_ fix_item(int istart, int iend, int ispecific, bool_ iac) /* * Research Item */ -static bool_ research_item(void) +static bool_ research_item() { clear_bldg(5, 18); return (identify_fully()); @@ -1425,7 +1425,7 @@ bool_ bldg_process_command(const store_type *s_ptr, store_action_type const *ba_ /* * Enter quest level */ -void enter_quest(void) +void enter_quest() { if (!(cave[p_ptr->py][p_ptr->px].feat == FEAT_QUEST_ENTER)) { diff --git a/src/bldg.hpp b/src/bldg.hpp index a55d7419..3b3412fa 100644 --- a/src/bldg.hpp +++ b/src/bldg.hpp @@ -7,4 +7,4 @@ bool_ bldg_process_command(store_type const *s_ptr, store_action_type const *action); void show_building(store_type const *s_ptr); bool_ is_state(store_type const *s_ptr, int state); -void enter_quest(void); +void enter_quest(); diff --git a/src/cave.cc b/src/cave.cc index 4e804d81..cad1506e 100644 --- a/src/cave.cc +++ b/src/cave.cc @@ -358,7 +358,7 @@ bool_ los(int y1, int x1, int y2, int x2) /* * Returns true if the player's grid is dark */ -bool_ no_lite(void) +bool_ no_lite() { return (!player_can_see_bold(p_ptr->py, p_ptr->px)); } @@ -1781,17 +1781,17 @@ void lite_spot(int y, int x) * of both "lite_spot()" and "print_rel()", and that we use the * "lite_spot()" function to display the player grid, if needed. */ -void prt_map(void) +void prt_map() { int x, y; int v; /* Access the cursor state */ - (void)Term_get_cursor(&v); + Term_get_cursor(&v); /* Hide the cursor */ - (void)Term_set_cursor(0); + Term_set_cursor(0); /* Dump the map */ for (y = panel_row_min; y <= panel_row_max; y++) @@ -1814,7 +1814,7 @@ void prt_map(void) lite_spot(p_ptr->py, p_ptr->px); /* Restore the cursor */ - (void)Term_set_cursor(v); + Term_set_cursor(v); } @@ -2098,7 +2098,7 @@ void display_map(int *cy, int *cx) * * Currently, the "player" is displayed on the map. XXX XXX XXX */ -void do_cmd_view_map(void) +void do_cmd_view_map() { int cy, cx; int wid, hgt; @@ -2761,7 +2761,7 @@ static void vinfo_init_aux(vinfo_hack *hack, int y, int x, long m) * a number which is too high, running this function, and using the * error messages to obtain the correct values. */ -errr vinfo_init(void) +errr vinfo_init() { int i, y, x; @@ -2983,7 +2983,7 @@ errr vinfo_init(void) /* * Forget the "CAVE_VIEW" grids, redrawing as needed */ -void forget_view(void) +void forget_view() { int i; @@ -3091,7 +3091,7 @@ void forget_view(void) * special grids. Because the actual number of required grids is bizarre, * we simply allocate twice as many as we would normally need. XXX XXX XXX */ -void update_view(void) +void update_view() { int i, o; int y, x; @@ -3410,7 +3410,7 @@ void update_view(void) /* * Clear monster light */ -void forget_mon_lite(void) +void forget_mon_lite() { int i, y, x; @@ -3475,7 +3475,7 @@ void forget_mon_lite(void) * or brighter light, and it doesn't work well with PernAngband's already * colourful terrain features in aesthetically pleasing ways... -- pelpel */ -void update_mon_lite(void) +void update_mon_lite() { auto const &f_info = game->edit_data.f_info; @@ -3791,7 +3791,7 @@ static void update_flow_aux(int y, int x, int n) * We do not need a priority queue because the cost from grid * to grid is always "one" and we process them in order. */ -void update_flow(void) +void update_flow() { int x, y, d; @@ -3859,7 +3859,7 @@ void update_flow(void) /* * Hack -- map the current panel (plus some) ala "magic mapping" */ -void map_area(void) +void map_area() { /* Scan the whole map */ for (int y = 1; y < cur_hgt - 1; y++) @@ -3919,7 +3919,7 @@ void map_area(void) * since this would prevent the use of "view_torch_grids" as a method to * keep track of what grids have been observed directly. */ -void wiz_lite(void) +void wiz_lite() { int i, y, x; @@ -4002,7 +4002,7 @@ void wiz_lite(void) p_ptr->window |= (PW_OVERHEAD); } -void wiz_lite_extra(void) +void wiz_lite_extra() { int y, x; for (y = 0; y < cur_hgt; y++) @@ -4018,7 +4018,7 @@ void wiz_lite_extra(void) /* * Forget the dungeon map (ala "Thinking of Maud..."). */ -void wiz_dark(void) +void wiz_dark() { int i, y, x; diff --git a/src/cave.hpp b/src/cave.hpp index a014279f..ce1631a1 100644 --- a/src/cave.hpp +++ b/src/cave.hpp @@ -7,25 +7,25 @@ int distance(int y1, int x1, int y2, int x2); bool_ los(int y1, int x1, int y2, int x2); bool_ cave_valid_bold(int y, int x); -bool_ no_lite(void); +bool_ no_lite(); void map_info_default(int y, int x, byte *ap, char *cp); void move_cursor_relative(int row, int col); void print_rel(char c, byte a, int y, int x); void note_spot(int y, int x); void lite_spot(int y, int x); -void prt_map(void); +void prt_map(); void display_map(int *cy, int *cx); -void do_cmd_view_map(void); -errr vinfo_init(void); -void forget_view(void); -void update_view(void); -void forget_mon_lite(void); -void update_mon_lite(void); -void update_flow(void); -void map_area(void); -void wiz_lite(void); -void wiz_lite_extra(void); -void wiz_dark(void); +void do_cmd_view_map(); +errr vinfo_init(); +void forget_view(); +void update_view(); +void forget_mon_lite(); +void update_mon_lite(); +void update_flow(); +void map_area(); +void wiz_lite(); +void wiz_lite_extra(); +void wiz_dark(); void cave_set_feat(int y, int x, int feat); void place_floor(int y, int x); void place_floor_convert_glass(int y, int x); diff --git a/src/cmd1.cc b/src/cmd1.cc index 6b2214c3..13edf0ff 100644 --- a/src/cmd1.cc +++ b/src/cmd1.cc @@ -3417,7 +3417,7 @@ static void run_init(int dir) * * Return TRUE if the running should be stopped */ -static bool_ run_test(void) +static bool_ run_test() { auto const &f_info = game->edit_data.f_info; @@ -3835,7 +3835,7 @@ void run_step(int dir) /* * Issue a pet command */ -void do_cmd_pet(void) +void do_cmd_pet() { auto const &r_info = game->edit_data.r_info; diff --git a/src/cmd1.hpp b/src/cmd1.hpp index 3d5d72b8..19b40ebf 100644 --- a/src/cmd1.hpp +++ b/src/cmd1.hpp @@ -10,16 +10,16 @@ bool_ test_hit_norm(int chance, int ac, int vis); s16b critical_shot(int weight, int plus, int dam, int skill); s16b critical_norm(int weight, int plus, int dam, int weapon_tval, bool_ *done_crit); s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, s32b *special); -void search(void); +void search(); void carry(int pickup); void py_attack(int y, int x, int max_blow); bool_ player_can_enter(byte feature); void move_player(int dir, int do_pickup); void move_player_aux(int dir, int do_pickup, int run); void run_step(int dir); -void do_cmd_pet(void); +void do_cmd_pet(); void do_cmd_integrate_body(); bool_ do_cmd_leave_body(bool_ drop_body); bool_ execute_inscription(byte i, byte y, byte x); -void do_cmd_engrave(void); -void do_spin(void); +void do_cmd_engrave(); +void do_spin(); diff --git a/src/cmd2.cc b/src/cmd2.cc index 11e70583..e3d7cafe 100644 --- a/src/cmd2.cc +++ b/src/cmd2.cc @@ -60,7 +60,7 @@ using std::this_thread::sleep_for; using std::chrono::milliseconds; -void do_cmd_immovable_special(void); +void do_cmd_immovable_special(); /* * Try to bash an altar @@ -162,7 +162,7 @@ static bool ask_leave() /* * Go up one level */ -void do_cmd_go_up(void) +void do_cmd_go_up() { auto const &d_info = game->edit_data.d_info; @@ -314,7 +314,7 @@ void do_cmd_go_up(void) /* * Returns TRUE if we are in the Between... */ -static bool_ between_effect(void) +static bool_ between_effect() { byte bx, by; @@ -358,7 +358,7 @@ static bool_ between_effect(void) /* * Go down one level */ -void do_cmd_go_down(void) +void do_cmd_go_down() { auto const &d_info = game->edit_data.d_info; @@ -1005,7 +1005,7 @@ static bool_ do_cmd_open_aux(int y, int x, int dir) * * Unlocking a locked door/chest is worth one experience point. */ -void do_cmd_open(void) +void do_cmd_open() { auto const &r_info = game->edit_data.r_info; @@ -1180,7 +1180,7 @@ static bool_ do_cmd_close_aux(int y, int x, int dir) /* * Close an open door. */ -void do_cmd_close(void) +void do_cmd_close() { int y, x, dir; @@ -1631,7 +1631,7 @@ static bool_ do_cmd_tunnel_aux(int y, int x, int dir) * Digging is very difficult without a "digger" weapon, but can be * accomplished by strong players using heavy weapons. */ -void do_cmd_tunnel(void) +void do_cmd_tunnel() { int y, x, dir; @@ -1791,7 +1791,7 @@ static bool_ do_cmd_bash_aux(int y, int x, int dir) msg_print("You are off-balance."); /* Hack -- Lose balance ala paralysis */ - (void)set_paralyzed(2 + rand_int(2)); + set_paralyzed(2 + rand_int(2)); } /* Result */ @@ -1813,7 +1813,7 @@ static bool_ do_cmd_bash_aux(int y, int x, int dir) * * Creatures can also open or bash doors, see elsewhere. */ -void do_cmd_bash(void) +void do_cmd_bash() { auto const &r_info = game->edit_data.r_info; @@ -1912,7 +1912,7 @@ void do_cmd_bash(void) * This command must always take a turn, to prevent free detection * of invisible monsters. */ -void do_cmd_alter(void) +void do_cmd_alter() { auto const &f_info = game->edit_data.f_info; @@ -2024,7 +2024,7 @@ static bool_ get_spike(int *ip) * * This command may NOT be repeated */ -void do_cmd_spike(void) +void do_cmd_spike() { int y, x, dir, item; @@ -2372,7 +2372,7 @@ void do_cmd_run_run() /* * Start running. */ -void do_cmd_run(void) +void do_cmd_run() { if (p_ptr->immovable) { @@ -2430,7 +2430,7 @@ void do_cmd_stay(int pickup) /* * Resting allows a player to safely restore his hp -RAK- */ -void do_cmd_rest(void) +void do_cmd_rest() { auto const &f_info = game->edit_data.f_info; @@ -2659,7 +2659,7 @@ int get_shooter_mult(object_type *o_ptr) * * Note that Bows of "Extra Shots" give an extra shot. */ -void do_cmd_fire(void) +void do_cmd_fire() { int dir, item; @@ -3090,7 +3090,7 @@ void do_cmd_fire(void) * to hit bonus of the weapon to have an effect? Should it ever cause * the item to be destroyed? Should it do any damage at all? */ -void do_cmd_throw(void) +void do_cmd_throw() { auto const &k_info = game->edit_data.k_info; @@ -3466,7 +3466,7 @@ void do_cmd_throw(void) * to hit bonus of the weapon to have an effect? Should it ever cause * the item to be destroyed? Should it do any damage at all? */ -void do_cmd_boomerang(void) +void do_cmd_boomerang() { auto const &k_info = game->edit_data.k_info; @@ -3841,7 +3841,7 @@ static bool_ tport_vertically(bool_ how) * Do a special ``movement'' action. Meant to be used for ``immovable'' * characters. */ -void do_cmd_immovable_special(void) +void do_cmd_immovable_special() { int i, ii, ij, dir; @@ -4071,7 +4071,7 @@ static void do_cmd_sacrifice_aule() * Handle sacrifices. * Grace is increased by value of sacrifice. */ -void do_cmd_sacrifice(void) +void do_cmd_sacrifice() { auto const &r_info = game->edit_data.r_info; diff --git a/src/cmd2.hpp b/src/cmd2.hpp index 9c903dba..9641dc72 100644 --- a/src/cmd2.hpp +++ b/src/cmd2.hpp @@ -6,27 +6,27 @@ std::vector show_monster_inven(int m_idx); int breakage_chance(object_type *o_ptr); -void do_cmd_go_up(void); -void do_cmd_go_down(void); -void do_cmd_search(void); -void do_cmd_toggle_search(void); -void do_cmd_open(void); -void do_cmd_close(void); -void do_cmd_chat(void); -void do_cmd_give(void); -void do_cmd_tunnel(void); -void do_cmd_bash(void); -void do_cmd_alter(void); -void do_cmd_spike(void); +void do_cmd_go_up(); +void do_cmd_go_down(); +void do_cmd_search(); +void do_cmd_toggle_search(); +void do_cmd_open(); +void do_cmd_close(); +void do_cmd_chat(); +void do_cmd_give(); +void do_cmd_tunnel(); +void do_cmd_bash(); +void do_cmd_alter(); +void do_cmd_spike(); void do_cmd_walk(int pickup); void do_cmd_stay(int pickup); -void do_cmd_run(void); -void do_cmd_rest(void); +void do_cmd_run(); +void do_cmd_rest(); int get_shooter_mult(object_type *o_ptr); -void do_cmd_fire(void); -void do_cmd_throw(void); -void do_cmd_boomerang(void); -void do_cmd_immovable_special(void); +void do_cmd_fire(); +void do_cmd_throw(); +void do_cmd_boomerang(); +void do_cmd_immovable_special(); void fetch(int dir, int wgt, bool_ require_los); -void do_cmd_sacrifice(void); -void do_cmd_steal(void); +void do_cmd_sacrifice(); +void do_cmd_steal(); diff --git a/src/cmd3.cc b/src/cmd3.cc index 259efd67..cbf58820 100644 --- a/src/cmd3.cc +++ b/src/cmd3.cc @@ -49,7 +49,7 @@ /* * Display p_ptr->inventory */ -void do_cmd_inven(void) +void do_cmd_inven() { char out_val[160]; @@ -104,7 +104,7 @@ void do_cmd_inven(void) /* * Display equipment */ -void do_cmd_equip(void) +void do_cmd_equip() { char out_val[160]; @@ -204,7 +204,7 @@ bool_ is_slot_ok(int slot) /* * Wield or wear a single item from the pack or floor */ -void do_cmd_wield(void) +void do_cmd_wield() { auto const &a_info = game->edit_data.a_info; @@ -347,7 +347,7 @@ void do_cmd_wield(void) if (o_ptr->k_idx) { /* Take off existing item */ - (void)inven_takeoff(slot, 255, FALSE); + inven_takeoff(slot, 255, FALSE); } } else @@ -357,7 +357,7 @@ void do_cmd_wield(void) if (!object_similar(o_ptr, q_ptr)) { /* Take off existing item */ - (void)inven_takeoff(slot, 255, FALSE); + inven_takeoff(slot, 255, FALSE); } else { @@ -449,7 +449,7 @@ void do_cmd_wield(void) /* * Take off an item */ -void do_cmd_takeoff(void) +void do_cmd_takeoff() { /* Get an item */ int item; @@ -479,7 +479,7 @@ void do_cmd_takeoff(void) energy_use = 50; /* Take off the item */ - (void)inven_takeoff(item, 255, FALSE); + inven_takeoff(item, 255, FALSE); /* Recalculate hitpoint */ p_ptr->update |= (PU_HP); @@ -491,7 +491,7 @@ void do_cmd_takeoff(void) /* * Drop an item */ -void do_cmd_drop(void) +void do_cmd_drop() { /* Get an item */ int item; @@ -557,7 +557,7 @@ void do_cmd_drop(void) /* * Destroy an item */ -void do_cmd_destroy(void) +void do_cmd_destroy() { auto const &k_info = game->edit_data.k_info; @@ -688,7 +688,7 @@ void do_cmd_destroy(void) /* * Observe an item which has been *identify*-ed */ -void do_cmd_observe(void) +void do_cmd_observe() { /* Get an item */ int item; @@ -720,7 +720,7 @@ void do_cmd_observe(void) * Remove the inscription from an object * XXX Mention item (when done)? */ -void do_cmd_uninscribe(void) +void do_cmd_uninscribe() { /* Get an item */ int item; @@ -759,7 +759,7 @@ void do_cmd_uninscribe(void) /* * Inscribe an object with a comment */ -void do_cmd_inscribe(void) +void do_cmd_inscribe() { /* Get an item */ int item; @@ -820,7 +820,7 @@ static object_filter_t const &item_tester_refill_lantern() /* * Refill the players lamp (from the pack or floor) */ -static void do_cmd_refill_lamp(void) +static void do_cmd_refill_lamp() { /* Get an item */ int item; @@ -883,7 +883,7 @@ static object_filter_t const &item_tester_refill_torch() /* * Refuel the players torch (from the pack or floor) */ -static void do_cmd_refill_torch(void) +static void do_cmd_refill_torch() { /* Get an item */ int item; @@ -935,7 +935,7 @@ static void do_cmd_refill_torch(void) /* * Refill the players lamp, or restock his torches */ -void do_cmd_refill(void) +void do_cmd_refill() { /* Get the light */ auto o_ptr = &p_ptr->inventory[INVEN_LITE]; @@ -978,7 +978,7 @@ void do_cmd_refill(void) /* * Target command */ -void do_cmd_target(void) +void do_cmd_target() { /* Target set */ if (target_set(TARGET_KILL)) @@ -998,7 +998,7 @@ void do_cmd_target(void) /* * Look command */ -void do_cmd_look(void) +void do_cmd_look() { /* Look around */ if (target_set(TARGET_LOOK)) @@ -1012,7 +1012,7 @@ void do_cmd_look(void) /* * Allow the player to examine other sectors on the map */ -void do_cmd_locate(void) +void do_cmd_locate() { int dir, y1, x1, y2, x2; int panel_hgt, panel_wid; @@ -1341,7 +1341,7 @@ static void roff_top(int r_idx) * * Note that the player ghosts are ignored. XXX XXX XXX */ -void do_cmd_query_symbol(void) +void do_cmd_query_symbol() { auto const &r_info = game->edit_data.r_info; @@ -1740,7 +1740,7 @@ static bool_ get_string_cli(cptr prompt, char *buf, int len) * * See defines.h for a list of the codes used. */ -void do_cmd_cli(void) +void do_cmd_cli() { char buff[80]; diff --git a/src/cmd3.hpp b/src/cmd3.hpp index 4b240dda..97d3e22f 100644 --- a/src/cmd3.hpp +++ b/src/cmd3.hpp @@ -2,22 +2,22 @@ #include "h-basic.h" -void do_cmd_html_dump(void); +void do_cmd_html_dump(); void cli_add(cptr active, cptr trigger, cptr descr); -void do_cmd_cli(void); -void do_cmd_cli_help(void); -void do_cmd_inven(void); -void do_cmd_equip(void); -void do_cmd_wield(void); -void do_cmd_takeoff(void); -void do_cmd_drop(void); -void do_cmd_destroy(void); -void do_cmd_observe(void); -void do_cmd_uninscribe(void); -void do_cmd_inscribe(void); -void do_cmd_refill(void); -void do_cmd_target(void); -void do_cmd_look(void); -void do_cmd_locate(void); -void do_cmd_query_symbol(void); -bool_ do_cmd_sense_grid_mana(void); +void do_cmd_cli(); +void do_cmd_cli_help(); +void do_cmd_inven(); +void do_cmd_equip(); +void do_cmd_wield(); +void do_cmd_takeoff(); +void do_cmd_drop(); +void do_cmd_destroy(); +void do_cmd_observe(); +void do_cmd_uninscribe(); +void do_cmd_inscribe(); +void do_cmd_refill(); +void do_cmd_target(); +void do_cmd_look(); +void do_cmd_locate(); +void do_cmd_query_symbol(); +bool_ do_cmd_sense_grid_mana(); diff --git a/src/cmd4.cc b/src/cmd4.cc index 59554dc4..3216e339 100644 --- a/src/cmd4.cc +++ b/src/cmd4.cc @@ -60,7 +60,7 @@ * selecting various things, such as graphics mode, so it must call * the "TERM_XTRA_REACT" hook before redrawing the windows. */ -void do_cmd_redraw(void) +void do_cmd_redraw() { int j; @@ -131,7 +131,7 @@ void do_cmd_redraw(void) /* * Hack -- change name */ -void do_cmd_change_name(void) +void do_cmd_change_name() { char c; @@ -205,11 +205,11 @@ void do_cmd_change_name(void) /* Change tactic */ if (c == 't') { - (void)do_cmd_change_tactic( -1); + do_cmd_change_tactic( -1); } else if (c == 'T') { - (void)do_cmd_change_tactic(1); + do_cmd_change_tactic(1); } /* Change movement */ @@ -253,7 +253,7 @@ void do_cmd_change_name(void) /* * Recall the most recent message */ -void do_cmd_message_one(void) +void do_cmd_message_one() { auto message = message_at(0); @@ -282,7 +282,7 @@ void do_cmd_message_one(void) * * Now taking advantages of big-screen. -pav- */ -void do_cmd_messages(void) +void do_cmd_messages() { int i, j, k, n; u32b q; @@ -815,7 +815,7 @@ void do_cmd_options_aux(int page, cptr info, bool_ read_only) /* * Modify the "window" options */ -static void do_cmd_options_win(void) +static void do_cmd_options_win() { int i, j, d; @@ -1129,7 +1129,7 @@ static void do_cmd_pref_file_hack(int row) * The user must use the "Ctrl-R" command to "adapt" to changes * in any options which control "visual" aspects of the game. */ -void do_cmd_options(void) +void do_cmd_options() { int k; @@ -1405,7 +1405,7 @@ void do_cmd_options(void) * * XXX XXX XXX Allow absolute file names? */ -void do_cmd_pref(void) +void do_cmd_pref() { char buf[80]; @@ -1417,7 +1417,7 @@ void do_cmd_pref(void) if (!get_string("Pref: ", buf, 80)) return; /* Process that pref command */ - (void)process_pref_file_aux(buf); + process_pref_file_aux(buf); } @@ -1646,7 +1646,7 @@ static errr keymap_dump(cptr fname) * * Could use some helpful instructions on this page. XXX XXX XXX */ -void do_cmd_macros(void) +void do_cmd_macros() { /* Keymap mode */ int mode = get_keymap_mode(); @@ -2017,7 +2017,7 @@ void do_cmd_macros(void) /* * Interact with "visuals" */ -void do_cmd_visuals(void) +void do_cmd_visuals() { auto &r_info = game->edit_data.r_info; auto &f_info = game->edit_data.f_info; @@ -2085,7 +2085,7 @@ void do_cmd_visuals(void) if (!askfor_aux(tmp, 70)) continue; /* Process the given filename */ - (void)process_pref_file(tmp); + process_pref_file(tmp); } /* Dump monster attr/chars */ @@ -2453,7 +2453,7 @@ void do_cmd_visuals(void) /* * Interact with "colors" */ -void do_cmd_colors(void) +void do_cmd_colors() { int i; @@ -2510,7 +2510,7 @@ void do_cmd_colors(void) if (!askfor_aux(tmp, 70)) continue; /* Process the given filename */ - (void)process_pref_file(tmp); + process_pref_file(tmp); /* Mega-Hack -- react to changes */ Term_xtra(TERM_XTRA_REACT, 0); @@ -2675,7 +2675,7 @@ void do_cmd_colors(void) * Take notes. There are two ways this can happen, either in the message * recall or a file. */ -void do_cmd_note(void) +void do_cmd_note() { char buf[80]; @@ -2696,7 +2696,7 @@ void do_cmd_note(void) /* * Mention the current version */ -void do_cmd_version(void) +void do_cmd_version() { /* Silly message */ msg_format("You are playing %s made by %s (%s).", @@ -2730,7 +2730,7 @@ static cptr do_cmd_feeling_text[11] = * Note that "feeling" is set to zero unless some time has passed. * Note that this is done when the level is GENERATED, not entered. */ -void do_cmd_feeling(void) +void do_cmd_feeling() { auto const &d_info = game->edit_data.d_info; @@ -2802,7 +2802,7 @@ static char hack[17] = "dwsorgbuDWvyRGBU"; /* * Hack -- load a screen dump from a file */ -void do_cmd_load_screen(void) +void do_cmd_load_screen() { int i, y, x; @@ -2890,7 +2890,7 @@ void do_cmd_load_screen(void) for (x = 0; x < len; x++) { /* Get the attr/char */ - (void)(Term_what(x, y, &a, &c)); + (Term_what(x, y, &a, &c)); /* Look up the attr */ for (i = 0; i < 16; i++) @@ -2926,7 +2926,7 @@ void do_cmd_load_screen(void) /* * Hack -- save a screen dump to a file */ -void do_cmd_save_screen(void) +void do_cmd_save_screen() { int y, x; int wid, hgt; @@ -2966,7 +2966,7 @@ void do_cmd_save_screen(void) for (x = 0; x < wid; x++) { /* Get the attr/char */ - (void)(Term_what(x, y, &a, &c)); + (Term_what(x, y, &a, &c)); /* Dump it */ buf[x] = c; @@ -2990,7 +2990,7 @@ void do_cmd_save_screen(void) for (x = 0; x < wid; x++) { /* Get the attr/char */ - (void)(Term_what(x, y, &a, &c)); + (Term_what(x, y, &a, &c)); /* Dump it */ buf[x] = hack[a & 0x0F]; @@ -3027,7 +3027,7 @@ void do_cmd_save_screen(void) /* * Check the status of "artifacts" */ -void do_cmd_knowledge_artifacts(void) +void do_cmd_knowledge_artifacts() { auto const &k_info = game->edit_data.k_info; auto const &a_info = game->edit_data.a_info; @@ -3257,7 +3257,7 @@ static int monster_get_race_level(int r_idx) /* * Display known uniques */ -static void do_cmd_knowledge_uniques(void) +static void do_cmd_knowledge_uniques() { auto const &r_info = game->edit_data.r_info; @@ -3409,7 +3409,7 @@ static void plural_aux(char *name) /* * Display current pets */ -static void do_cmd_knowledge_pets(void) +static void do_cmd_knowledge_pets() { int t_friends = 0; int t_levels = 0; @@ -3470,7 +3470,7 @@ static void do_cmd_knowledge_pets(void) /* * Total kill count */ -static void do_cmd_knowledge_kill_count(void) +static void do_cmd_knowledge_kill_count() { auto const &r_info = game->edit_data.r_info; @@ -3572,7 +3572,7 @@ static void do_cmd_knowledge_kill_count(void) /* * Display known objects */ -static void do_cmd_knowledge_objects(void) +static void do_cmd_knowledge_objects() { auto const &k_info = game->edit_data.k_info; @@ -3614,7 +3614,7 @@ static void do_cmd_knowledge_objects(void) /* * List recall depths */ -static void do_cmd_knowledge_dungeons(void) +static void do_cmd_knowledge_dungeons() { auto const &d_info = game->edit_data.d_info; @@ -3642,7 +3642,7 @@ static void do_cmd_knowledge_dungeons(void) /* * List known towns */ -void do_cmd_knowledge_towns(void) +void do_cmd_knowledge_towns() { auto const &d_info = game->edit_data.d_info; @@ -3680,7 +3680,7 @@ void do_cmd_knowledge_towns(void) /* * List corruptions */ -static void do_cmd_knowledge_corruptions(void) +static void do_cmd_knowledge_corruptions() { show_string(dump_corruptions(true, false).c_str(), "Corruptions"); } @@ -3689,7 +3689,7 @@ static void do_cmd_knowledge_corruptions(void) /* * Print quest status of all active quests */ -static void do_cmd_knowledge_quests(void) +static void do_cmd_knowledge_quests() { /* Figure out display order of quests */ int order[MAX_Q_IDX]; @@ -3746,7 +3746,7 @@ static void do_cmd_knowledge_quests(void) /* * Print fate status */ -static void do_cmd_knowledge_fates(void) +static void do_cmd_knowledge_fates() { show_string(dump_fates().c_str(), "Fate status"); } @@ -3755,7 +3755,7 @@ static void do_cmd_knowledge_fates(void) /* * Print the note file */ -void do_cmd_knowledge_notes(void) +void do_cmd_knowledge_notes() { /* Spawn */ show_notes_file(); @@ -3768,7 +3768,7 @@ void do_cmd_knowledge_notes(void) /* * Interact with "knowledge" */ -void do_cmd_knowledge(void) +void do_cmd_knowledge() { int i; @@ -3926,7 +3926,7 @@ void do_cmd_knowledge(void) * Check on the status of an active quest -KMW- * TODO: Spill out status when not a simple kill # monster. */ -void do_cmd_checkquest(void) +void do_cmd_checkquest() { /* Enter "icky" mode */ character_icky = TRUE; diff --git a/src/cmd4.hpp b/src/cmd4.hpp index 44a7b97c..39f1c16c 100644 --- a/src/cmd4.hpp +++ b/src/cmd4.hpp @@ -2,27 +2,27 @@ #include "h-basic.h" -void macro_recorder_start(void); +void macro_recorder_start(); void macro_recorder_add(char c); -void macro_recorder_stop(void); -void do_cmd_macro_recorder(void); -void do_cmd_redraw(void); -void do_cmd_change_name(void); -void do_cmd_message_one(void); -void do_cmd_messages(void); -void do_cmd_options(void); -void do_cmd_pref(void); -void do_cmd_macros(void); -void do_cmd_visuals(void); -void do_cmd_colors(void); -void do_cmd_note(void); -void do_cmd_version(void); -void do_cmd_feeling(void); -void do_cmd_load_screen(void); -void do_cmd_save_screen(void); -void do_cmd_knowledge(void); -void do_cmd_checkquest(void); +void macro_recorder_stop(); +void do_cmd_macro_recorder(); +void do_cmd_redraw(); +void do_cmd_change_name(); +void do_cmd_message_one(); +void do_cmd_messages(); +void do_cmd_options(); +void do_cmd_pref(); +void do_cmd_macros(); +void do_cmd_visuals(); +void do_cmd_colors(); +void do_cmd_note(); +void do_cmd_version(); +void do_cmd_feeling(); +void do_cmd_load_screen(); +void do_cmd_save_screen(); +void do_cmd_knowledge(); +void do_cmd_checkquest(); void do_cmd_change_tactic(int i); void do_cmd_change_movement(int i); -void do_cmd_time(void); +void do_cmd_time(); void do_cmd_options_aux(int page, cptr info, bool_ read_only); diff --git a/src/cmd5.cc b/src/cmd5.cc index f9094482..a93759b0 100644 --- a/src/cmd5.cc +++ b/src/cmd5.cc @@ -239,7 +239,7 @@ void do_cmd_browse_aux(object_type *o_ptr) } } -void do_cmd_browse(void) +void do_cmd_browse() { /* Get an item */ int item; @@ -286,7 +286,7 @@ static void do_poly_wounds() } } -void do_poly_self(void) +void do_poly_self() { auto const &race_info = game->edit_data.race_info; @@ -314,14 +314,14 @@ void do_poly_self(void) { if ( rand_int(2) == 0) { - (void)dec_stat(tmp, randint(6) + 6, (rand_int(3) == 0)); + dec_stat(tmp, randint(6) + 6, (rand_int(3) == 0)); power -= 1; } tmp++; } /* Deformities are discriminated against! */ - (void)dec_stat(A_CHR, randint(6), TRUE); + dec_stat(A_CHR, randint(6), TRUE); if (effect_msg[0]) { @@ -409,7 +409,7 @@ void do_poly_self(void) msg_print("Your internal organs are rearranged!"); while (tmp < 6) { - (void)dec_stat(tmp, randint(6) + 6, (rand_int(3) == 0)); + dec_stat(tmp, randint(6) + 6, (rand_int(3) == 0)); tmp++; } if (rand_int(6) == 0) @@ -1438,11 +1438,11 @@ static void apply_monster_power(monster_race const *r_ptr, std::size_t monster_s { if (!p_ptr->fast) { - (void)set_fast(randint(20 + (plev) ) + plev, 10); + set_fast(randint(20 + (plev) ) + plev, 10); } else { - (void)set_fast(p_ptr->fast + randint(5), 10); + set_fast(p_ptr->fast + randint(5), 10); } break; @@ -1541,7 +1541,7 @@ static void apply_monster_power(monster_race const *r_ptr, std::size_t monster_s int dir; if (!get_aim_dir(&dir)) break; - (void)fire_beam(GF_AWAY_ALL, dir, plev); + fire_beam(GF_AWAY_ALL, dir, plev); break; } @@ -1561,7 +1561,7 @@ static void apply_monster_power(monster_race const *r_ptr, std::size_t monster_s case SF_DARKNESS_IDX: { - (void)project( -1, 3, p_ptr->py, p_ptr->px, 0, GF_DARK_WEAK, + project( -1, 3, p_ptr->py, p_ptr->px, 0, GF_DARK_WEAK, PROJECT_GRID | PROJECT_KILL); /* Unlite the room */ diff --git a/src/cmd5.hpp b/src/cmd5.hpp index 753b8f68..d25efb73 100644 --- a/src/cmd5.hpp +++ b/src/cmd5.hpp @@ -8,16 +8,16 @@ #include #include -bool_ is_magestaff(void); +bool_ is_magestaff(); void do_cmd_browse_aux(object_type *o_ptr); -void do_cmd_browse(void); +void do_cmd_browse(); void fetch(int dir, int wgt, bool_ require_los); -void do_poly_self(void); +void do_poly_self(); std::string symbiote_name(bool capitalize); int use_symbiotic_power(int r_idx, bool great); void use_monster_power(int r_idx, bool great); bool_ is_ok_spell(s32b spell_idx, s32b pval); s32b get_school_spell(cptr do_what, s16b force_book); -void do_cmd_copy_spell(void); -void cast_school_spell(void); +void do_cmd_copy_spell(); +void cast_school_spell(); std::vector extract_monster_powers(monster_race const *r_ptr, bool great); diff --git a/src/cmd6.cc b/src/cmd6.cc index 80a033eb..d609298d 100644 --- a/src/cmd6.cc +++ b/src/cmd6.cc @@ -638,7 +638,7 @@ static void corpse_effect(object_type *o_ptr, bool_ cutting) if (!(p_ptr->resist_pois || p_ptr->oppose_pois)) { - (void)set_poisoned(p_ptr->poisoned + rand_int(brdam) + 10); + set_poisoned(p_ptr->poisoned + rand_int(brdam) + 10); } /* Take damage */ @@ -713,12 +713,12 @@ static void corpse_effect(object_type *o_ptr, bool_ cutting) if (!p_ptr->resist_conf) { - (void)set_confused(p_ptr->confused + rand_int(20) + 10); + set_confused(p_ptr->confused + rand_int(20) + 10); } if (!p_ptr->resist_chaos) { - (void)set_image(p_ptr->image + randint(10)); + set_image(p_ptr->image + randint(10)); } if (!p_ptr->resist_neth && !p_ptr->resist_chaos) @@ -758,7 +758,7 @@ static void corpse_effect(object_type *o_ptr, bool_ cutting) } else { - (void)apply_disenchant(0); + apply_disenchant(0); } /* Take damage */ @@ -779,7 +779,7 @@ static void corpse_effect(object_type *o_ptr, bool_ cutting) if (!p_ptr->resist_sound) { int k = (randint((brdam > 40) ? 35 : (brdam * 3 / 4 + 5))); - (void)set_stun(p_ptr->stun + k); + set_stun(p_ptr->stun + k); } /* Take damage */ @@ -856,30 +856,30 @@ static void corpse_effect(object_type *o_ptr, bool_ cutting) } if (r_ptr->flags & RF_SHAPECHANGER) { - /* DGDGDG (void)set_mimic(20 , rand_int(MIMIC_VALAR)); */ + /* DGDGDG set_mimic(20 , rand_int(MIMIC_VALAR)); */ } if (r_ptr->flags & RF_DEMON) { - /* DGDGDG (void)set_mimic(30 , MIMIC_DEMON); */ + /* DGDGDG set_mimic(30 , MIMIC_DEMON); */ } if (r_ptr->flags & RF_UNDEAD) { - /* DGDGDG (void)set_mimic(30 , MIMIC_VAMPIRE); */ + /* DGDGDG set_mimic(30 , MIMIC_VAMPIRE); */ } if (r_ptr->flags & RF_NO_FEAR) { - (void)set_afraid(0); + set_afraid(0); } if (r_ptr->flags & RF_NO_STUN) { - (void)set_stun(0); + set_stun(0); } if (r_ptr->flags & RF_NO_CONF) { - (void)set_confused(0); + set_confused(0); } if (r_ptr->spells & SF_S_THUNDERLORD) { @@ -974,7 +974,7 @@ static object_filter_t const &item_tester_hook_eatable() /* * Eat some food (from the pack or floor) */ -void do_cmd_eat_food(void) +void do_cmd_eat_food() { auto const &r_info = game->edit_data.r_info; auto const &k_info = game->edit_data.k_info; @@ -1113,7 +1113,7 @@ void do_cmd_eat_food(void) case SV_FOOD_WEAKNESS: { take_hit(damroll(6, 6), "poisonous food"); - (void)do_dec_stat(A_STR, STAT_DEC_NORMAL); + do_dec_stat(A_STR, STAT_DEC_NORMAL); ident = TRUE; @@ -1123,7 +1123,7 @@ void do_cmd_eat_food(void) case SV_FOOD_SICKNESS: { take_hit(damroll(6, 6), "poisonous food"); - (void)do_dec_stat(A_CON, STAT_DEC_NORMAL); + do_dec_stat(A_CON, STAT_DEC_NORMAL); ident = TRUE; @@ -1133,7 +1133,7 @@ void do_cmd_eat_food(void) case SV_FOOD_STUPIDITY: { take_hit(damroll(8, 8), "poisonous food"); - (void)do_dec_stat(A_INT, STAT_DEC_NORMAL); + do_dec_stat(A_INT, STAT_DEC_NORMAL); ident = TRUE; @@ -1143,7 +1143,7 @@ void do_cmd_eat_food(void) case SV_FOOD_NAIVETY: { take_hit(damroll(8, 8), "poisonous food"); - (void)do_dec_stat(A_WIS, STAT_DEC_NORMAL); + do_dec_stat(A_WIS, STAT_DEC_NORMAL); ident = TRUE; @@ -1153,7 +1153,7 @@ void do_cmd_eat_food(void) case SV_FOOD_UNHEALTH: { take_hit(damroll(10, 10), "poisonous food"); - (void)do_dec_stat(A_CON, STAT_DEC_NORMAL); + do_dec_stat(A_CON, STAT_DEC_NORMAL); ident = TRUE; @@ -1163,7 +1163,7 @@ void do_cmd_eat_food(void) case SV_FOOD_DISEASE: { take_hit(damroll(10, 10), "poisonous food"); - (void)do_dec_stat(A_STR, STAT_DEC_NORMAL); + do_dec_stat(A_STR, STAT_DEC_NORMAL); ident = TRUE; @@ -1307,8 +1307,8 @@ void do_cmd_eat_food(void) case SV_FOOD_WAYBREAD: { msg_print("That tastes very good."); - (void)set_poisoned(0); - (void)hp_player(damroll(4, 8)); + set_poisoned(0); + hp_player(damroll(4, 8)); set_food(PY_FOOD_MAX - 1); ident = TRUE; @@ -1329,7 +1329,7 @@ void do_cmd_eat_food(void) object_aware(q_ptr); object_known(q_ptr); q_ptr->ident |= IDENT_STOREB; - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); break; } @@ -1338,9 +1338,9 @@ void do_cmd_eat_food(void) { msg_print("A fresh, clean essence rises, driving away wounds and poison."); - (void)set_poisoned(0); - (void)set_stun(0); - (void)set_cut(0); + set_poisoned(0); + set_stun(0); + set_cut(0); if (p_ptr->black_breath) { msg_print("The hold of the Black Breath on you is broken!"); @@ -1493,7 +1493,7 @@ void do_cmd_eat_food(void) if ((race_flags_p(PR_VAMPIRE)) || (p_ptr->mimic_form == resolve_mimic_name("Vampire"))) { /* Reduced nutritional benefit */ - /* (void)set_food(p_ptr->food + (fval / 10)); -- No more */ + /* set_food(p_ptr->food + (fval / 10)); -- No more */ msg_print("Mere victuals hold scant sustenance for a being such as yourself."); /* Hungry */ @@ -1519,7 +1519,7 @@ void do_cmd_eat_food(void) /* Those living in fresh */ else { - (void)set_food(p_ptr->food + fval); + set_food(p_ptr->food + fval); } @@ -1534,7 +1534,7 @@ void do_cmd_eat_food(void) /* * Cut a corpse up for convenient storage */ -void do_cmd_cut_corpse(void) +void do_cmd_cut_corpse() { auto const &r_info = game->edit_data.r_info; @@ -1635,7 +1635,7 @@ void do_cmd_cut_corpse(void) * * Salt water works well. */ -void do_cmd_cure_meat(void) +void do_cmd_cure_meat() { int item, num, cure; @@ -1814,9 +1814,9 @@ static bool_ quaff_potion(int tval, int sval, int pval, int pval2) case SV_POTION_SALT_WATER: { msg_print("The potion makes you vomit!"); - (void)set_food(PY_FOOD_STARVE - 1); - (void)set_poisoned(0); - (void)set_paralyzed(4); + set_food(PY_FOOD_STARVE - 1); + set_poisoned(0); + set_paralyzed(4); ident = TRUE; break; @@ -1908,12 +1908,12 @@ static bool_ quaff_potion(int tval, int sval, int pval, int pval2) { msg_print("Your nerves and muscles feel weak and lifeless!"); take_hit(damroll(10, 10), "a potion of Ruination"); - (void)dec_stat(A_DEX, 25, TRUE); - (void)dec_stat(A_WIS, 25, TRUE); - (void)dec_stat(A_CON, 25, TRUE); - (void)dec_stat(A_STR, 25, TRUE); - (void)dec_stat(A_CHR, 25, TRUE); - (void)dec_stat(A_INT, 25, TRUE); + dec_stat(A_DEX, 25, TRUE); + dec_stat(A_WIS, 25, TRUE); + dec_stat(A_CON, 25, TRUE); + dec_stat(A_STR, 25, TRUE); + dec_stat(A_CHR, 25, TRUE); + dec_stat(A_INT, 25, TRUE); ident = TRUE; break; @@ -1965,8 +1965,8 @@ static bool_ quaff_potion(int tval, int sval, int pval, int pval2) { msg_print("Massive explosions rupture your body!"); take_hit(damroll(50, 20), "a potion of Detonation"); - (void)set_stun(p_ptr->stun + 75); - (void)set_cut(p_ptr->cut + 5000); + set_stun(p_ptr->stun + 75); + set_cut(p_ptr->cut + 5000); ident = TRUE; break; @@ -2030,7 +2030,7 @@ static bool_ quaff_potion(int tval, int sval, int pval, int pval2) } else { - (void)set_fast(p_ptr->fast + 5, 10); + set_fast(p_ptr->fast + 5, 10); } break; @@ -2134,18 +2134,18 @@ static bool_ quaff_potion(int tval, int sval, int pval, int pval2) msg_print("You feel life flow through your body!"); restore_level(); hp_player(5000); - (void)set_poisoned(0); - (void)set_blind(0); - (void)set_confused(0); - (void)set_image(0); - (void)set_stun(0); - (void)set_cut(0); - (void)do_res_stat(A_STR, TRUE); - (void)do_res_stat(A_CON, TRUE); - (void)do_res_stat(A_DEX, TRUE); - (void)do_res_stat(A_WIS, TRUE); - (void)do_res_stat(A_INT, TRUE); - (void)do_res_stat(A_CHR, TRUE); + set_poisoned(0); + set_blind(0); + set_confused(0); + set_image(0); + set_stun(0); + set_cut(0); + do_res_stat(A_STR, TRUE); + do_res_stat(A_CON, TRUE); + do_res_stat(A_DEX, TRUE); + do_res_stat(A_WIS, TRUE); + do_res_stat(A_INT, TRUE); + do_res_stat(A_CHR, TRUE); if (p_ptr->black_breath) { msg_print("The hold of the Black Breath on you is broken!"); @@ -2288,13 +2288,13 @@ static bool_ quaff_potion(int tval, int sval, int pval, int pval2) msg_print("You begin to feel more enlightened..."); msg_print(NULL); wiz_lite_extra(); - (void)do_inc_stat(A_INT); - (void)do_inc_stat(A_WIS); - (void)detect_doors(DEFAULT_RADIUS); - (void)detect_stairs(DEFAULT_RADIUS); - (void)detect_treasure(DEFAULT_RADIUS); - (void)detect_objects_gold(DEFAULT_RADIUS); - (void)detect_objects_normal(DEFAULT_RADIUS); + do_inc_stat(A_INT); + do_inc_stat(A_WIS); + detect_doors(DEFAULT_RADIUS); + detect_stairs(DEFAULT_RADIUS); + detect_treasure(DEFAULT_RADIUS); + detect_objects_gold(DEFAULT_RADIUS); + detect_objects_normal(DEFAULT_RADIUS); identify_pack(); ident = TRUE; @@ -2315,11 +2315,11 @@ static bool_ quaff_potion(int tval, int sval, int pval, int pval2) case SV_POTION_RESISTANCE: { - (void)set_oppose_acid(p_ptr->oppose_acid + randint(20) + 20); - (void)set_oppose_elec(p_ptr->oppose_elec + randint(20) + 20); - (void)set_oppose_fire(p_ptr->oppose_fire + randint(20) + 20); - (void)set_oppose_cold(p_ptr->oppose_cold + randint(20) + 20); - (void)set_oppose_pois(p_ptr->oppose_pois + randint(20) + 20); + set_oppose_acid(p_ptr->oppose_acid + randint(20) + 20); + set_oppose_elec(p_ptr->oppose_elec + randint(20) + 20); + set_oppose_fire(p_ptr->oppose_fire + randint(20) + 20); + set_oppose_cold(p_ptr->oppose_cold + randint(20) + 20); + set_oppose_pois(p_ptr->oppose_pois + randint(20) + 20); ident = TRUE; break; @@ -2341,7 +2341,7 @@ static bool_ quaff_potion(int tval, int sval, int pval, int pval2) case SV_POTION_INVULNERABILITY: { - (void)set_invuln(p_ptr->invuln + randint(7) + 7); + set_invuln(p_ptr->invuln + randint(7) + 7); ident = TRUE; break; @@ -2478,7 +2478,7 @@ static bool_ quaff_potion(int tval, int sval, int pval, int pval2) /* * Quaff a potion (from the pack or the floor) */ -void do_cmd_quaff_potion(void) +void do_cmd_quaff_potion() { auto const &k_info = game->edit_data.k_info; @@ -2539,7 +2539,7 @@ void do_cmd_quaff_potion(void) /* Potions can feed the player */ - (void)set_food(p_ptr->food + o_ptr->pval); + set_food(p_ptr->food + o_ptr->pval); /* Destroy potion */ @@ -2550,7 +2550,7 @@ void do_cmd_quaff_potion(void) /* * Fill an empty bottle */ -static void do_cmd_fill_bottle(void) +static void do_cmd_fill_bottle() { cave_type *c_ptr = &cave[p_ptr->py][p_ptr->px]; @@ -2636,7 +2636,7 @@ static void do_cmd_fill_bottle(void) /* * Drink from a fountain */ -void do_cmd_drink_fountain(void) +void do_cmd_drink_fountain() { auto const &k_info = game->edit_data.k_info; @@ -2711,7 +2711,7 @@ void do_cmd_drink_fountain(void) /* * Curse the players armor */ -bool_ curse_armor(void) +bool_ curse_armor() { object_type *o_ptr; @@ -2773,7 +2773,7 @@ bool_ curse_armor(void) /* * Curse the players weapon */ -bool_ curse_weapon(void) +bool_ curse_weapon() { object_type *o_ptr; @@ -2855,7 +2855,7 @@ static object_filter_t const &item_tester_hook_readable() * include scrolls with no effects but recharge or identify, which are * cancelled before use. XXX Reading them still takes a turn, though. */ -void do_cmd_read_scroll(void) +void do_cmd_read_scroll() { auto const &d_info = game->edit_data.d_info; auto const &k_info = game->edit_data.k_info; @@ -3009,7 +3009,7 @@ void do_cmd_read_scroll(void) { if (!(p_ptr->resist_blind) && !(p_ptr->resist_dark)) { - (void)set_blind(p_ptr->blind + 3 + randint(5)); + set_blind(p_ptr->blind + 3 + randint(5)); } if (unlite_area(10, 3)) ident = TRUE; @@ -3096,7 +3096,7 @@ void do_cmd_read_scroll(void) case SV_SCROLL_TELEPORT_LEVEL: { - (void)teleport_player_level(); + teleport_player_level(); ident = TRUE; @@ -3354,7 +3354,7 @@ void do_cmd_read_scroll(void) case SV_SCROLL_GENOCIDE: { - (void)genocide(TRUE); + genocide(TRUE); ident = TRUE; @@ -3363,7 +3363,7 @@ void do_cmd_read_scroll(void) case SV_SCROLL_MASS_GENOCIDE: { - (void)mass_genocide(TRUE); + mass_genocide(TRUE); ident = TRUE; @@ -3657,7 +3657,7 @@ static void activate_stick(object_type *o_ptr, bool_ *obvious, bool_ *use_charge * * Hack -- staffs of identify can be "cancelled". */ -void do_cmd_use_staff(void) +void do_cmd_use_staff() { bool_ obvious, use_charge; @@ -3828,7 +3828,7 @@ void do_cmd_use_staff(void) * basic "bolt" rods, but the basic "ball" wands do the same damage * as the basic "ball" rods. */ -void do_cmd_aim_wand(void) +void do_cmd_aim_wand() { bool_ obvious, use_charge; @@ -4040,7 +4040,7 @@ void zap_combine_rod_tip(object_type *q_ptr, int tip_item) /* * Zap a rod, or attack a rod tip to a rod */ -void do_cmd_zap_rod(void) +void do_cmd_zap_rod() { auto const &k_info = game->edit_data.k_info; @@ -4314,7 +4314,7 @@ void do_cmd_zap_rod(void) } else { - (void)set_fast(p_ptr->fast + 5, 10); + set_fast(p_ptr->fast + 5, 10); } break; @@ -4588,7 +4588,7 @@ int ring_of_power() /* * Enchant some bolts */ -bool_ brand_bolts(void) +bool_ brand_bolts() { int i; @@ -4794,7 +4794,7 @@ static void activate_valaroma() * Note that it always takes a turn to activate an object, even if * the user hits "escape" at the "direction" prompt. */ -void do_cmd_activate(void) +void do_cmd_activate() { auto const &k_info = game->edit_data.k_info; auto const &a_info = game->edit_data.a_info; @@ -5097,12 +5097,12 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) msg_print("The phial wells with dark light..."); unlite_area(damroll(2, 15), 3); take_hit(damroll(10, 10), "activating The Phial of Undeath"); - (void)dec_stat(A_DEX, 25, STAT_DEC_PERMANENT); - (void)dec_stat(A_WIS, 25, STAT_DEC_PERMANENT); - (void)dec_stat(A_CON, 25, STAT_DEC_PERMANENT); - (void)dec_stat(A_STR, 25, STAT_DEC_PERMANENT); - (void)dec_stat(A_CHR, 25, STAT_DEC_PERMANENT); - (void)dec_stat(A_INT, 25, STAT_DEC_PERMANENT); + dec_stat(A_DEX, 25, STAT_DEC_PERMANENT); + dec_stat(A_WIS, 25, STAT_DEC_PERMANENT); + dec_stat(A_CON, 25, STAT_DEC_PERMANENT); + dec_stat(A_STR, 25, STAT_DEC_PERMANENT); + dec_stat(A_CHR, 25, STAT_DEC_PERMANENT); + dec_stat(A_INT, 25, STAT_DEC_PERMANENT); o_ptr->timeout = rand_int(10) + 10; @@ -5124,7 +5124,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return "dispel small life every 55+d55 turns"; msg_print("You exterminate small life."); - (void)dispel_monsters(4); + dispel_monsters(4); o_ptr->timeout = rand_int(55) + 55; @@ -5137,11 +5137,11 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) msg_print("The ring glows brightly..."); if (!p_ptr->fast) { - (void)set_fast(randint(75) + 75, 10); + set_fast(randint(75) + 75, 10); } else { - (void)set_fast(p_ptr->fast + 5, 10); + set_fast(p_ptr->fast + 5, 10); } o_ptr->timeout = rand_int(150) + 150; @@ -5242,10 +5242,10 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) msg_print("You are too weak to control the stone!"); /* Hack -- Bypass free action */ - (void)set_paralyzed(randint(5 * oops + 1)); + set_paralyzed(randint(5 * oops + 1)); /* Confusing. */ - (void)set_confused(p_ptr->confused + + set_confused(p_ptr->confused + randint(5 * oops + 1)); } @@ -5258,7 +5258,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) /* Confusing. */ if (rand_int(5) == 0) { - (void)set_confused(p_ptr->confused + randint(10)); + set_confused(p_ptr->confused + randint(10)); } /* Exercise a little care... */ @@ -5300,15 +5300,15 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) msg_print("You breathe the elements."); fire_ball(GF_MISSILE, dir, 300, 4); msg_print("Your armor glows many colours..."); - (void)set_afraid(0); - (void)set_shero(p_ptr->shero + randint(50) + 50); - (void)hp_player(30); - (void)set_blessed(p_ptr->blessed + randint(50) + 50); - (void)set_oppose_acid(p_ptr->oppose_acid + randint(50) + 50); - (void)set_oppose_elec(p_ptr->oppose_elec + randint(50) + 50); - (void)set_oppose_fire(p_ptr->oppose_fire + randint(50) + 50); - (void)set_oppose_cold(p_ptr->oppose_cold + randint(50) + 50); - (void)set_oppose_pois(p_ptr->oppose_pois + randint(50) + 50); + set_afraid(0); + set_shero(p_ptr->shero + randint(50) + 50); + hp_player(30); + set_blessed(p_ptr->blessed + randint(50) + 50); + set_oppose_acid(p_ptr->oppose_acid + randint(50) + 50); + set_oppose_elec(p_ptr->oppose_elec + randint(50) + 50); + set_oppose_fire(p_ptr->oppose_fire + randint(50) + 50); + set_oppose_cold(p_ptr->oppose_cold + randint(50) + 50); + set_oppose_pois(p_ptr->oppose_pois + randint(50) + 50); o_ptr->timeout = 400; @@ -5319,13 +5319,13 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return ("heal (777), curing and heroism every 300 turns"); msg_print("A heavenly choir sings..."); - (void)set_poisoned(0); - (void)set_cut(0); - (void)set_stun(0); - (void)set_confused(0); - (void)set_blind(0); - (void)set_hero(p_ptr->hero + randint(25) + 25); - (void)hp_player(777); + set_poisoned(0); + set_cut(0); + set_stun(0); + set_confused(0); + set_blind(0); + set_hero(p_ptr->hero + randint(25) + 25); + hp_player(777); o_ptr->timeout = 300; @@ -5346,11 +5346,11 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return "resistance (20+d20 turns) every 111 turns"; msg_print("Your cloak glows many colours..."); - (void)set_oppose_acid(p_ptr->oppose_acid + randint(20) + 20); - (void)set_oppose_elec(p_ptr->oppose_elec + randint(20) + 20); - (void)set_oppose_fire(p_ptr->oppose_fire + randint(20) + 20); - (void)set_oppose_cold(p_ptr->oppose_cold + randint(20) + 20); - (void)set_oppose_pois(p_ptr->oppose_pois + randint(20) + 20); + set_oppose_acid(p_ptr->oppose_acid + randint(20) + 20); + set_oppose_elec(p_ptr->oppose_elec + randint(20) + 20); + set_oppose_fire(p_ptr->oppose_fire + randint(20) + 20); + set_oppose_cold(p_ptr->oppose_cold + randint(20) + 20); + set_oppose_pois(p_ptr->oppose_pois + randint(20) + 20); o_ptr->timeout = 111; @@ -5400,7 +5400,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case 11: case 12: { - (void)stair_creation(); + stair_creation(); break; } @@ -5446,7 +5446,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return "summon the Legion of the Dawn every 500+d500 turns"; msg_print("You summon the Legion of the Dawn."); - (void)summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_DAWN, TRUE); + summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_DAWN, TRUE); o_ptr->timeout = 500 + randint(500); @@ -5481,7 +5481,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return "fire branding of bolts every 999 turns"; msg_print("Your crossbow glows deep red..."); - (void)brand_bolts(); + brand_bolts(); o_ptr->timeout = 999; @@ -5552,8 +5552,8 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) if (!doit) return "clairvoyance every 100+d100 turns"; msg_print("The stone glows a deep green..."); wiz_lite_extra(); - (void)detect_doors(DEFAULT_RADIUS); - (void)detect_stairs(DEFAULT_RADIUS); + detect_doors(DEFAULT_RADIUS); + detect_stairs(DEFAULT_RADIUS); o_ptr->timeout = rand_int(100) + 100; @@ -5638,11 +5638,11 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) if (!doit) return "berserker and +10 to speed (50) every 100+d200 turns"; if (!p_ptr->fast) { - (void)set_fast(randint(50) + 50, 10); + set_fast(randint(50) + 50, 10); } else { - (void)set_fast(p_ptr->fast + 5, 10); + set_fast(p_ptr->fast + 5, 10); } hp_player(30); set_afraid(0); @@ -6097,7 +6097,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return "teleport away every 200 turns"; if (!get_aim_dir(&dir)) break; - (void)fire_beam(GF_AWAY_ALL, dir, plev); + fire_beam(GF_AWAY_ALL, dir, plev); o_ptr->timeout = 200; @@ -6121,7 +6121,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return "genocide every 500 turns"; msg_print("It glows deep blue..."); - (void)genocide(TRUE); + genocide(TRUE); o_ptr->timeout = 500; @@ -6132,7 +6132,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return "mass genocide every 1000 turns"; msg_print("It lets out a long, shrill note..."); - (void)mass_genocide(TRUE); + mass_genocide(TRUE); o_ptr->timeout = 1000; @@ -6145,7 +6145,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return "charm animal every 300 turns"; if (!get_aim_dir(&dir)) break; - (void) charm_animal(dir, plev); + charm_animal(dir, plev); o_ptr->timeout = 300; @@ -6156,7 +6156,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return "enslave undead every 333 turns"; if (!get_aim_dir(&dir)) break; - (void)control_one_undead(dir, plev); + control_one_undead(dir, plev); o_ptr->timeout = 333; @@ -6167,7 +6167,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return "charm monster every 400 turns"; if (!get_aim_dir(&dir)) break; - (void) charm_monster(dir, plev); + charm_monster(dir, plev); o_ptr->timeout = 400; @@ -6177,7 +6177,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_CHARM_ANIMALS: { if (!doit) return "animal friendship every 500 turns"; - (void) charm_animals(plev * 2); + charm_animals(plev * 2); o_ptr->timeout = 500; @@ -6197,7 +6197,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_SUMMON_ANIMAL: { if (!doit) return "summon animal every 200+d300 turns"; - (void)summon_specific_friendly(p_ptr->py, p_ptr->px, plev, SUMMON_ANIMAL_RANGER, TRUE); + summon_specific_friendly(p_ptr->py, p_ptr->px, plev, SUMMON_ANIMAL_RANGER, TRUE); o_ptr->timeout = 200 + randint(300); @@ -6208,7 +6208,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return "summon phantasmal servant every 200+d200 turns"; msg_print("You summon a phantasmal servant."); - (void)summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_PHANTOM, TRUE); + summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_PHANTOM, TRUE); o_ptr->timeout = 200 + randint(200); @@ -6300,8 +6300,8 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_CURE_LW: { if (!doit) return format("cure light wounds every %d turns", (is_junkart ? 50 : 10)); - (void)set_afraid(0); - (void)hp_player(30); + set_afraid(0); + hp_player(30); o_ptr->timeout = 10; @@ -6313,7 +6313,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) if (!doit) return format("cure serious wounds every %s turns", (is_junkart? "75" : "3+d3")); msg_print("It radiates deep purple..."); hp_player(damroll(4, 8)); - (void)set_cut((p_ptr->cut / 2) - 50); + set_cut((p_ptr->cut / 2) - 50); o_ptr->timeout = rand_int(3) + 3; @@ -6324,8 +6324,8 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return "remove fear and cure poison every 5 turns"; msg_print("It glows deep blue..."); - (void)set_afraid(0); - (void)set_poisoned(0); + set_afraid(0); + set_poisoned(0); o_ptr->timeout = 5; @@ -6347,13 +6347,13 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return format("restore stats and life levels every %d turns", (is_junkart ? 200 : 750)); msg_print("It glows a deep green..."); - (void)do_res_stat(A_STR, TRUE); - (void)do_res_stat(A_INT, TRUE); - (void)do_res_stat(A_WIS, TRUE); - (void)do_res_stat(A_DEX, TRUE); - (void)do_res_stat(A_CON, TRUE); - (void)do_res_stat(A_CHR, TRUE); - (void)restore_level(); + do_res_stat(A_STR, TRUE); + do_res_stat(A_INT, TRUE); + do_res_stat(A_WIS, TRUE); + do_res_stat(A_DEX, TRUE); + do_res_stat(A_CON, TRUE); + do_res_stat(A_CHR, TRUE); + restore_level(); o_ptr->timeout = 750; @@ -6365,8 +6365,8 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) if (!doit) return format("heal 700 hit points every %d turns", (is_junkart ? 100 : 250)); msg_print("It glows deep blue..."); msg_print("You feel a warm tingling inside..."); - (void)hp_player(700); - (void)set_cut(0); + hp_player(700); + set_cut(0); o_ptr->timeout = 250; @@ -6378,8 +6378,8 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) if (!doit) return "heal 1000 hit points every 888 turns"; msg_print("It glows a bright white..."); msg_print("You feel much better..."); - (void)hp_player(1000); - (void)set_cut(0); + hp_player(1000); + set_cut(0); o_ptr->timeout = 888; @@ -6389,7 +6389,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_ESP: { if (!doit) return "temporary ESP (dur 25+d30) every 200 turns"; - (void)set_tim_esp(p_ptr->tim_esp + randint(30) + 25); + set_tim_esp(p_ptr->tim_esp + randint(30) + 25); o_ptr->timeout = 200; @@ -6399,8 +6399,8 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_BERSERK: { if (!doit) return "heroism and berserk (dur 50+d50) every 100+d100 turns"; - (void)set_shero(p_ptr->shero + randint(50) + 50); - (void)set_blessed(p_ptr->blessed + randint(50) + 50); + set_shero(p_ptr->shero + randint(50) + 50); + set_blessed(p_ptr->blessed + randint(50) + 50); o_ptr->timeout = 100 + randint(100); @@ -6412,7 +6412,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) if (!doit) return "protection from evil (dur level*3 + d25) every 225+d225 turns"; msg_print("It lets out a shrill wail..."); k = 3 * p_ptr->lev; - (void)set_protevil(p_ptr->protevil + randint(25) + k); + set_protevil(p_ptr->protevil + randint(25) + k); o_ptr->timeout = rand_int(225) + 225; @@ -6423,11 +6423,11 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return "resist elements (dur 40+d40) every 200 turns"; msg_print("It glows many colours..."); - (void)set_oppose_acid(p_ptr->oppose_acid + randint(40) + 40); - (void)set_oppose_elec(p_ptr->oppose_elec + randint(40) + 40); - (void)set_oppose_fire(p_ptr->oppose_fire + randint(40) + 40); - (void)set_oppose_cold(p_ptr->oppose_cold + randint(40) + 40); - (void)set_oppose_pois(p_ptr->oppose_pois + randint(40) + 40); + set_oppose_acid(p_ptr->oppose_acid + randint(40) + 40); + set_oppose_elec(p_ptr->oppose_elec + randint(40) + 40); + set_oppose_fire(p_ptr->oppose_fire + randint(40) + 40); + set_oppose_cold(p_ptr->oppose_cold + randint(40) + 40); + set_oppose_pois(p_ptr->oppose_pois + randint(40) + 40); o_ptr->timeout = 200; @@ -6440,11 +6440,11 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) msg_print("It glows bright green..."); if (!p_ptr->fast) { - (void)set_fast(randint(20) + 20, 10); + set_fast(randint(20) + 20, 10); } else { - (void)set_fast(p_ptr->fast + 5, 10); + set_fast(p_ptr->fast + 5, 10); } o_ptr->timeout = 250; @@ -6458,11 +6458,11 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) msg_print("It glows brightly..."); if (!p_ptr->fast) { - (void)set_fast(randint(75) + 75, 10); + set_fast(randint(75) + 75, 10); } else { - (void)set_fast(p_ptr->fast + 5, 10); + set_fast(p_ptr->fast + 5, 10); } o_ptr->timeout = rand_int(200) + 200; @@ -6483,7 +6483,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_INVULN: { if (!doit) return "invulnerability (dur 8+d8) every 1000 turns"; - (void)set_invuln(p_ptr->invuln + randint(8) + 8); + set_invuln(p_ptr->invuln + randint(8) + 8); o_ptr->timeout = 1000; @@ -6585,7 +6585,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_SATIATE: { if (!doit) return "satisfy hunger every 200 turns"; - (void)set_food(PY_FOOD_MAX - 1); + set_food(PY_FOOD_MAX - 1); o_ptr->timeout = 200; @@ -6629,7 +6629,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (!doit) return "alchemy every 500 turns"; msg_print("It glows bright yellow..."); - (void) alchemy(); + alchemy(); o_ptr->timeout = 500; @@ -6710,12 +6710,12 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) msg_print("Your nerves and muscles feel weak and lifeless!"); take_hit(damroll(10, 10), "activating Ruination"); - (void)dec_stat(A_DEX, 25, TRUE); - (void)dec_stat(A_WIS, 25, TRUE); - (void)dec_stat(A_CON, 25, TRUE); - (void)dec_stat(A_STR, 25, TRUE); - (void)dec_stat(A_CHR, 25, TRUE); - (void)dec_stat(A_INT, 25, TRUE); + dec_stat(A_DEX, 25, TRUE); + dec_stat(A_WIS, 25, TRUE); + dec_stat(A_CON, 25, TRUE); + dec_stat(A_STR, 25, TRUE); + dec_stat(A_CHR, 25, TRUE); + dec_stat(A_INT, 25, TRUE); /* Timeout is set before return */ @@ -6735,7 +6735,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_UNINT: { if (!doit) return "decreasing Intelligence"; - (void)dec_stat(A_INT, 25, FALSE); + dec_stat(A_INT, 25, FALSE); /* Timeout is set before return */ @@ -6745,7 +6745,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_UNSTR: { if (!doit) return "decreasing Strength"; - (void)dec_stat(A_STR, 25, FALSE); + dec_stat(A_STR, 25, FALSE); /* Timeout is set before return */ @@ -6755,7 +6755,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_UNCON: { if (!doit) return "decreasing Constitution"; - (void)dec_stat(A_CON, 25, FALSE); + dec_stat(A_CON, 25, FALSE); /* Timeout is set before return */ @@ -6765,7 +6765,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_UNCHR: { if (!doit) return "decreasing Charisma"; - (void)dec_stat(A_CHR, 25, FALSE); + dec_stat(A_CHR, 25, FALSE); /* Timeout is set before return */ @@ -6775,7 +6775,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_UNDEX: { if (!doit) return "decreasing Dexterity"; - (void)dec_stat(A_DEX, 25, FALSE); + dec_stat(A_DEX, 25, FALSE); /* Timeout is set before return */ @@ -6785,7 +6785,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_UNWIS: { if (!doit) return "decreasing Wisdom"; - (void)dec_stat(A_WIS, 25, FALSE); + dec_stat(A_WIS, 25, FALSE); /* Timeout is set before return */ @@ -6795,12 +6795,12 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_STATLOSS: { if (!doit) return "stat loss"; - (void)dec_stat(A_STR, 15, FALSE); - (void)dec_stat(A_INT, 15, FALSE); - (void)dec_stat(A_WIS, 15, FALSE); - (void)dec_stat(A_DEX, 15, FALSE); - (void)dec_stat(A_CON, 15, FALSE); - (void)dec_stat(A_CHR, 15, FALSE); + dec_stat(A_STR, 15, FALSE); + dec_stat(A_INT, 15, FALSE); + dec_stat(A_WIS, 15, FALSE); + dec_stat(A_DEX, 15, FALSE); + dec_stat(A_CON, 15, FALSE); + dec_stat(A_CHR, 15, FALSE); /* Timeout is set before return */ @@ -6810,12 +6810,12 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_HISTATLOSS: { if (!doit) return "high stat loss"; - (void)dec_stat(A_STR, 25, FALSE); - (void)dec_stat(A_INT, 25, FALSE); - (void)dec_stat(A_WIS, 25, FALSE); - (void)dec_stat(A_DEX, 25, FALSE); - (void)dec_stat(A_CON, 25, FALSE); - (void)dec_stat(A_CHR, 25, FALSE); + dec_stat(A_STR, 25, FALSE); + dec_stat(A_INT, 25, FALSE); + dec_stat(A_WIS, 25, FALSE); + dec_stat(A_DEX, 25, FALSE); + dec_stat(A_CON, 25, FALSE); + dec_stat(A_CHR, 25, FALSE); /* Timeout is set before return */ @@ -6885,7 +6885,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_HUNGER: { if (!doit) return "create hunger"; - (void)set_food(PY_FOOD_WEAK); + set_food(PY_FOOD_WEAK); /* Timeout is set before return */ @@ -6986,7 +6986,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) case ACT_CURE_HUNGER: { if (!doit) return "satisfy hunger every 100 turns"; - (void)set_food(PY_FOOD_MAX - 1); + set_food(PY_FOOD_MAX - 1); /* Timeout is set before return */ @@ -7350,7 +7350,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) if (!get_aim_dir(&dir)) break; fire_ball(GF_COLD, dir, 50, 2); - (void)set_oppose_cold(p_ptr->oppose_cold + randint(20) + 20); + set_oppose_cold(p_ptr->oppose_cold + randint(20) + 20); o_ptr->timeout = rand_int(50) + 50; @@ -7364,7 +7364,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) if (!get_aim_dir(&dir)) break; fire_ball(GF_FIRE, dir, 50, 2); - (void)set_oppose_fire(p_ptr->oppose_fire + randint(20) + 20); + set_oppose_fire(p_ptr->oppose_fire + randint(20) + 20); o_ptr->timeout = rand_int(50) + 50; @@ -7377,7 +7377,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) if (!get_aim_dir(&dir)) break; fire_ball(GF_ACID, dir, 50, 2); - (void)set_oppose_acid(p_ptr->oppose_acid + randint(20) + 20); + set_oppose_acid(p_ptr->oppose_acid + randint(20) + 20); o_ptr->timeout = rand_int(50) + 50; @@ -7391,7 +7391,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) if (!get_aim_dir(&dir)) break; fire_ball(GF_ELEC, dir, 50, 2); - (void)set_oppose_elec(p_ptr->oppose_elec + randint(20) + 20); + set_oppose_elec(p_ptr->oppose_elec + randint(20) + 20); o_ptr->timeout = rand_int(50) + 50; diff --git a/src/cmd6.hpp b/src/cmd6.hpp index 6c4b0d47..076a9abb 100644 --- a/src/cmd6.hpp +++ b/src/cmd6.hpp @@ -4,15 +4,15 @@ #include "object_type_fwd.hpp" void set_stick_mode(object_type *o_ptr); -void unset_stick_mode(void); -void do_cmd_eat_food(void); -void do_cmd_quaff_potion(void); -void do_cmd_read_scroll(void); -void do_cmd_aim_wand(void); -void do_cmd_use_staff(void); -void do_cmd_zap_rod(void); +void unset_stick_mode(); +void do_cmd_eat_food(); +void do_cmd_quaff_potion(); +void do_cmd_read_scroll(); +void do_cmd_aim_wand(); +void do_cmd_use_staff(); +void do_cmd_zap_rod(); const char *activation_aux(object_type *o_ptr, bool_ desc, int item); -void do_cmd_activate(void); -void do_cmd_cut_corpse(void); -void do_cmd_cure_meat(void); -void do_cmd_drink_fountain(void); +void do_cmd_activate(); +void do_cmd_cut_corpse(); +void do_cmd_cure_meat(); +void do_cmd_drink_fountain(); diff --git a/src/cmd7.cc b/src/cmd7.cc index b51ba229..312c657e 100644 --- a/src/cmd7.cc +++ b/src/cmd7.cc @@ -347,7 +347,7 @@ static bool_ get_magic_power(int *sn, magic_power *powers, int max_powers, * do_cmd_cast calls this function if the player's class * is 'mindcrafter'. */ -void do_cmd_mindcraft(void) +void do_cmd_mindcraft() { int n = 0, b = 0; @@ -629,7 +629,7 @@ void do_cmd_mindcraft(void) } else { - (void)mindblast_monsters(plev * ((plev - 5) / 10 + 1)); + mindblast_monsters(plev * ((plev - 5) / 10 + 1)); } break; @@ -656,11 +656,11 @@ void do_cmd_mindcraft(void) if (!p_ptr->fast) { /* Haste */ - (void)set_fast(b, plev / 5); + set_fast(b, plev / 5); } else { - (void)set_fast(p_ptr->fast + b, plev / 5); + set_fast(p_ptr->fast + b, plev / 5); } break; @@ -724,7 +724,7 @@ void do_cmd_mindcraft(void) msg_print("You faint from the effort!"); /* Hack -- Bypass free action */ - (void)set_paralyzed(randint(5 * oops + 1)); + set_paralyzed(randint(5 * oops + 1)); /* Damage WIS (possibly permanently) */ if (rand_int(100) < 50) @@ -735,7 +735,7 @@ void do_cmd_mindcraft(void) msg_print("You have damaged your mind!"); /* Reduce constitution */ - (void)dec_stat(A_WIS, 15 + randint(10), perm); + dec_stat(A_WIS, 15 + randint(10), perm); } } @@ -862,7 +862,7 @@ static bool_ mimic_forbid_travel(void *, void *, void *) * do_cmd_cast calls this function if the player's class * is 'mimic'. */ -void do_cmd_mimic(void) +void do_cmd_mimic() { int n = 0, b = 0; @@ -1131,7 +1131,7 @@ void do_cmd_mimic(void) msg_print("You faint from the effort!"); /* Hack -- Bypass free action */ - (void)set_paralyzed(randint(5 * oops + 1)); + set_paralyzed(randint(5 * oops + 1)); /* Damage WIS (possibly permanently) */ if (rand_int(100) < 50) @@ -1142,7 +1142,7 @@ void do_cmd_mimic(void) msg_print("You have damaged your mind!"); /* Reduce constitution */ - (void)dec_stat(A_DEX, 15 + randint(10), perm); + dec_stat(A_DEX, 15 + randint(10), perm); } } @@ -1158,7 +1158,7 @@ void do_cmd_mimic(void) * do_cmd_cast calls this function if the player's class * is 'beastmaster'. */ -void do_cmd_beastmaster(void) +void do_cmd_beastmaster() { int plev = p_ptr->lev, i, num; @@ -1200,7 +1200,7 @@ void do_cmd_beastmaster(void) /* * Command to ask favors from your god. */ -void do_cmd_pray(void) +void do_cmd_pray() { if (p_ptr->pgod == GOD_NONE) { @@ -1472,7 +1472,7 @@ static random_spell* select_spell() } -void do_cmd_powermage(void) +void do_cmd_powermage() { random_spell *s_ptr; @@ -1820,7 +1820,7 @@ static object_filter_t const &item_tester_hook_convertible() * do_cmd_cast calls this function if the player's class * is 'archer'. */ -void do_cmd_archer(void) +void do_cmd_archer() { int ext = 0; char ch; @@ -1912,11 +1912,11 @@ void do_cmd_archer(void) q_ptr->discount = 90; q_ptr->found = OBJ_FOUND_SELFMADE; - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); msg_print("You make some ammo."); - (void)wall_to_mud(dir); + wall_to_mud(dir); p_ptr->update |= (PU_VIEW | PU_FLOW | PU_MON_LITE); p_ptr->window |= (PW_OVERHEAD); } @@ -1955,7 +1955,7 @@ void do_cmd_archer(void) inc_stack_size(item, -1); - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); } /**********Create bolts*********/ @@ -1991,14 +1991,14 @@ void do_cmd_archer(void) inc_stack_size(item, -1); - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); } } /* * Control whether shots are allowed to pierce */ -void do_cmd_set_piercing(void) +void do_cmd_set_piercing() { char ch; char com[80]; @@ -2068,7 +2068,7 @@ void necro_info(char *p, int power) /* * Cast a Necromancy spell */ -void do_cmd_necromancer(void) +void do_cmd_necromancer() { int n = 0, b = 0; int chance; @@ -2252,7 +2252,7 @@ void do_cmd_necromancer(void) object_aware(o_ptr); object_known(o_ptr); - (void)inven_carry(o_ptr, FALSE); + inven_carry(o_ptr, FALSE); k_allow_special[k_idx] = FALSE; @@ -2342,7 +2342,7 @@ void do_cmd_necromancer(void) msg_print("You faint from the effort!"); /* Hack -- Bypass free action */ - (void)set_paralyzed(randint(5 * oops + 1)); + set_paralyzed(randint(5 * oops + 1)); /* Damage CON (possibly permanently) */ if (rand_int(100) < 50) @@ -2353,7 +2353,7 @@ void do_cmd_necromancer(void) msg_print("You have damaged your body!"); /* Reduce constitution */ - (void)dec_stat(A_CON, 15 + randint(10), perm); + dec_stat(A_CON, 15 + randint(10), perm); } } @@ -2553,7 +2553,7 @@ void do_cmd_summoner_extract() object_aware(q_ptr); object_known(q_ptr); q_ptr->ident |= IDENT_MENTAL; - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); msg_print("You extract a totem from the dead corpse."); energy_use += 100; @@ -2731,7 +2731,7 @@ void do_cmd_summoner_summon() } -void do_cmd_summoner(void) +void do_cmd_summoner() { int ext = 0; @@ -2805,7 +2805,7 @@ void do_cmd_summoner(void) /* * Dodge Chance Feedback. */ -void use_ability_blade(void) +void use_ability_blade() { int chance = p_ptr->dodge_chance - ((dun_level * 5) / 6); @@ -2871,7 +2871,7 @@ void symbiotic_info(char *p, int power) /* * Cast a symbiotic spell */ -void do_cmd_symbiotic(void) +void do_cmd_symbiotic() { int n = 0; int chance; @@ -3223,7 +3223,7 @@ void do_cmd_symbiotic(void) msg_print("You faint from the effort!"); /* Hack -- Bypass free action */ - (void)set_paralyzed(randint(5 * oops + 1)); + set_paralyzed(randint(5 * oops + 1)); /* Damage CON (possibly permanently) */ if (rand_int(100) < 50) @@ -3234,7 +3234,7 @@ void do_cmd_symbiotic(void) msg_print("You have damaged your body!"); /* Reduce constitution */ - (void)dec_stat(A_CHR, 15 + randint(10), perm); + dec_stat(A_CHR, 15 + randint(10), perm); } } @@ -3267,7 +3267,7 @@ void do_cmd_create_boulder() object_type forge; object_type *q_ptr; - (void)wall_to_mud(dir); + wall_to_mud(dir); /* Get local object */ q_ptr = &forge; @@ -3281,7 +3281,7 @@ void do_cmd_create_boulder() q_ptr->discount = 90; q_ptr->found = OBJ_FOUND_SELFMADE; - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); msg_print("You make some boulders."); diff --git a/src/cmd7.hpp b/src/cmd7.hpp index 4d8b5240..b9d518b2 100644 --- a/src/cmd7.hpp +++ b/src/cmd7.hpp @@ -3,23 +3,23 @@ #include "h-basic.h" #include "object_type_fwd.hpp" -void do_cmd_pray(void); -void do_cmd_create_boulder(void); +void do_cmd_pray(); +void do_cmd_create_boulder(); void necro_info(char *p, int power); void mindcraft_info(char *p, int power); void symbiotic_info(char *p, int power); void mimic_info(char *p, int power); -void do_cmd_summoner(void); -void do_cmd_mindcraft(void); -void do_cmd_mimic(void); -void use_ability_blade(void); -void do_cmd_beastmaster(void); -void do_cmd_powermage(void); -void do_cmd_possessor(void); -void do_cmd_archer(void); -void do_cmd_set_piercing(void); -void do_cmd_necromancer(void); -void do_cmd_unbeliever(void); -void do_cmd_symbiotic(void); +void do_cmd_summoner(); +void do_cmd_mindcraft(); +void do_cmd_mimic(); +void use_ability_blade(); +void do_cmd_beastmaster(); +void do_cmd_powermage(); +void do_cmd_possessor(); +void do_cmd_archer(); +void do_cmd_set_piercing(); +void do_cmd_necromancer(); +void do_cmd_unbeliever(); +void do_cmd_symbiotic(); s32b sroot(s32b n); int clamp_failure_chance(int chance, int minfail); diff --git a/src/dungeon.cc b/src/dungeon.cc index 26a34815..e7bdf34b 100644 --- a/src/dungeon.cc +++ b/src/dungeon.cc @@ -292,7 +292,7 @@ static byte value_check_aux2_magic(object_type const *o_ptr) /* * Can a player be resurrected? */ -static bool_ granted_resurrection(void) +static bool_ granted_resurrection() { if (praying_to(GOD_ERU)) { @@ -480,7 +480,7 @@ void sense_objects(std::vector const &object_idxs) squeltch_inventory(); } -void sense_inventory(void) +void sense_inventory() { static std::vector idxs; // Initialize static vector if necessary @@ -498,7 +498,7 @@ void sense_inventory(void) /* * Go to any level (ripped off from wiz_jump) */ -static void pattern_teleport(void) +static void pattern_teleport() { /* Ask for level */ if (get_check("Teleport level? ")) @@ -551,27 +551,27 @@ static void pattern_teleport(void) /* * Returns TRUE if we are on the Straight Road... */ -static bool_ pattern_effect(void) +static bool_ pattern_effect() { if ((cave[p_ptr->py][p_ptr->px].feat < FEAT_PATTERN_START) || (cave[p_ptr->py][p_ptr->px].feat > FEAT_PATTERN_XTRA2)) return (FALSE); if (cave[p_ptr->py][p_ptr->px].feat == FEAT_PATTERN_END) { - (void)set_poisoned(0); - (void)set_image(0); - (void)set_stun(0); - (void)set_cut(0); - (void)set_blind(0); - (void)set_afraid(0); - (void)do_res_stat(A_STR, TRUE); - (void)do_res_stat(A_INT, TRUE); - (void)do_res_stat(A_WIS, TRUE); - (void)do_res_stat(A_DEX, TRUE); - (void)do_res_stat(A_CON, TRUE); - (void)do_res_stat(A_CHR, TRUE); - (void)restore_level(); - (void)hp_player(1000); + set_poisoned(0); + set_image(0); + set_stun(0); + set_cut(0); + set_blind(0); + set_afraid(0); + do_res_stat(A_STR, TRUE); + do_res_stat(A_INT, TRUE); + do_res_stat(A_WIS, TRUE); + do_res_stat(A_DEX, TRUE); + do_res_stat(A_CON, TRUE); + do_res_stat(A_CHR, TRUE); + restore_level(); + hp_player(1000); cave_set_feat(p_ptr->py, p_ptr->px, FEAT_PATTERN_OLD); msg_print("This section of the Straight Road looks less powerful."); } @@ -776,7 +776,7 @@ static void regenmana(int percent) * * XXX XXX XXX Should probably be done during monster turns. */ -static void regen_monsters(void) +static void regen_monsters() { auto const &r_info = game->edit_data.r_info; @@ -1220,7 +1220,7 @@ static void process_world_gods() * Note that a single movement in the overhead wilderness mode * consumes 132 times as much energy as a normal one... */ -static void process_world(void) +static void process_world() { auto const &d_info = game->edit_data.d_info; auto const &r_info = game->edit_data.r_info; @@ -1413,7 +1413,7 @@ static void process_world(void) /* Make a new monster */ if (!(dungeon_flags & DF_NO_NEW_MONSTER)) { - (void)alloc_monster(MAX_SIGHT + 5, FALSE); + alloc_monster(MAX_SIGHT + 5, FALSE); } } @@ -1601,7 +1601,7 @@ static void process_world(void) if (i < 1) i = 1; /* Digest some food */ - (void)set_food(p_ptr->food - i); + set_food(p_ptr->food - i); } } @@ -1609,7 +1609,7 @@ static void process_world(void) else { /* Digest a lot of food */ - (void)set_food(p_ptr->food - 100); + set_food(p_ptr->food - 100); } /* Starve to death (slowly) */ @@ -1653,7 +1653,7 @@ static void process_world(void) disturb(); /* Hack -- faint (bypass free action) */ - (void)set_paralyzed(1 + rand_int(5)); + set_paralyzed(1 + rand_int(5)); } } } @@ -1841,19 +1841,19 @@ static void process_world(void) /* Hack -- Hallucinating */ if (p_ptr->image) { - (void)set_image(p_ptr->image - 1); + set_image(p_ptr->image - 1); } /* Holy Aura */ if (p_ptr->holy) { - (void)set_holy(p_ptr->holy - 1); + set_holy(p_ptr->holy - 1); } /* Soul absorbtion */ if (p_ptr->absorb_soul) { - (void)set_absorb_soul(p_ptr->absorb_soul - 1); + set_absorb_soul(p_ptr->absorb_soul - 1); } /* Undead loose Death Points */ @@ -1886,7 +1886,7 @@ static void process_world(void) { char death_message[80]; - (void)get_rnd_line("death.txt", death_message); + get_rnd_line("death.txt", death_message); msg_print(death_message); } @@ -1935,29 +1935,29 @@ static void process_world(void) /* True Strike */ if (p_ptr->strike) { - (void)set_strike(p_ptr->strike - 1); + set_strike(p_ptr->strike - 1); } /* Timed project */ if (p_ptr->tim_project) { - (void)set_project(p_ptr->tim_project - 1, p_ptr->tim_project_gf, p_ptr->tim_project_dam, p_ptr->tim_project_rad, p_ptr->tim_project_flag); + set_project(p_ptr->tim_project - 1, p_ptr->tim_project_gf, p_ptr->tim_project_dam, p_ptr->tim_project_rad, p_ptr->tim_project_flag); } /* Timed roots */ if (p_ptr->tim_roots) { - (void)set_roots(p_ptr->tim_roots - 1, p_ptr->tim_roots_ac, p_ptr->tim_roots_dam); + set_roots(p_ptr->tim_roots - 1, p_ptr->tim_roots_ac, p_ptr->tim_roots_dam); } /* Timed breath */ if (p_ptr->tim_water_breath) { - (void)set_tim_breath(p_ptr->tim_water_breath - 1, FALSE); + set_tim_breath(p_ptr->tim_water_breath - 1, FALSE); } if (p_ptr->tim_magic_breath) { - (void)set_tim_breath(p_ptr->tim_magic_breath - 1, TRUE); + set_tim_breath(p_ptr->tim_magic_breath - 1, TRUE); } /* Timed precognition */ @@ -1969,41 +1969,41 @@ static void process_world(void) /* Timed regen */ if (p_ptr->tim_regen) { - (void)set_tim_regen(p_ptr->tim_regen - 1, p_ptr->tim_regen_pow); + set_tim_regen(p_ptr->tim_regen - 1, p_ptr->tim_regen_pow); } /* Timed Disrupt shield */ if (p_ptr->disrupt_shield) { - (void)set_disrupt_shield(p_ptr->disrupt_shield - 1); + set_disrupt_shield(p_ptr->disrupt_shield - 1); } /* Timed Parasite */ if (p_ptr->parasite) { - (void)set_parasite(p_ptr->parasite - 1, p_ptr->parasite_r_idx); + set_parasite(p_ptr->parasite - 1, p_ptr->parasite_r_idx); } /* Timed Reflection */ if (p_ptr->tim_reflect) { - (void)set_tim_reflect(p_ptr->tim_reflect - 1); + set_tim_reflect(p_ptr->tim_reflect - 1); } /* Timed Prob Travel */ if (p_ptr->prob_travel) { - (void)set_prob_travel(p_ptr->prob_travel - 1); + set_prob_travel(p_ptr->prob_travel - 1); } /* Timed Levitation */ if (p_ptr->tim_ffall) { - (void)set_tim_ffall(p_ptr->tim_ffall - 1); + set_tim_ffall(p_ptr->tim_ffall - 1); } if (p_ptr->tim_fly) { - (void)set_tim_fly(p_ptr->tim_fly - 1); + set_tim_fly(p_ptr->tim_fly - 1); } /* Thunderstorm */ @@ -2045,37 +2045,37 @@ static void process_world(void) PROJECT_KILL | PROJECT_ITEM | PROJECT_HIDE); } - (void)set_tim_thunder(p_ptr->tim_thunder - 1, p_ptr->tim_thunder_p1, p_ptr->tim_thunder_p2); + set_tim_thunder(p_ptr->tim_thunder - 1, p_ptr->tim_thunder_p1, p_ptr->tim_thunder_p2); } /* Poisonned hands */ if (p_ptr->tim_poison) { - (void)set_poison(p_ptr->tim_poison - 1); + set_poison(p_ptr->tim_poison - 1); } /* Brightness */ if (p_ptr->tim_lite) { - (void)set_lite(p_ptr->tim_lite - 1); + set_lite(p_ptr->tim_lite - 1); } /* Blindness */ if (p_ptr->blind) { - (void)set_blind(p_ptr->blind - 1); + set_blind(p_ptr->blind - 1); } /* Timed no_breeds */ if (no_breeds) { - (void)set_no_breeders(no_breeds - 1); + set_no_breeders(no_breeds - 1); } /* Timed mimic */ if (p_ptr->tim_mimic) { - (void)set_mimic(p_ptr->tim_mimic - 1, p_ptr->mimic_form, p_ptr->mimic_level); + set_mimic(p_ptr->tim_mimic - 1, p_ptr->mimic_form, p_ptr->mimic_level); } /* Timed special move commands */ @@ -2087,25 +2087,25 @@ static void process_world(void) /* Timed invisibility */ if (p_ptr->tim_invisible) { - (void)set_invis(p_ptr->tim_invisible - 1, p_ptr->tim_inv_pow); + set_invis(p_ptr->tim_invisible - 1, p_ptr->tim_inv_pow); } /* Times see-invisible */ if (p_ptr->tim_invis) { - (void)set_tim_invis(p_ptr->tim_invis - 1); + set_tim_invis(p_ptr->tim_invis - 1); } /* Timed esp */ if (p_ptr->tim_esp) { - (void)set_tim_esp(p_ptr->tim_esp - 1); + set_tim_esp(p_ptr->tim_esp - 1); } /* Timed infra-vision */ if (p_ptr->tim_infra) { - (void)set_tim_infra(p_ptr->tim_infra - 1); + set_tim_infra(p_ptr->tim_infra - 1); } /* Paralysis */ @@ -2117,109 +2117,109 @@ static void process_world(void) /* Confusion */ if (p_ptr->confused) { - (void)set_confused(p_ptr->confused - 1); + set_confused(p_ptr->confused - 1); } /* Afraid */ if (p_ptr->afraid) { - (void)set_afraid(p_ptr->afraid - 1); + set_afraid(p_ptr->afraid - 1); } /* Fast */ if (p_ptr->fast) { - (void)set_fast(p_ptr->fast - 1, p_ptr->speed_factor); + set_fast(p_ptr->fast - 1, p_ptr->speed_factor); } /* Light speed */ if (p_ptr->lightspeed) { - (void)set_light_speed(p_ptr->lightspeed - 1); + set_light_speed(p_ptr->lightspeed - 1); } /* Slow */ if (p_ptr->slow) { - (void)set_slow(p_ptr->slow - 1); + set_slow(p_ptr->slow - 1); } /* Protection from evil */ if (p_ptr->protevil) { - (void)set_protevil(p_ptr->protevil - 1); + set_protevil(p_ptr->protevil - 1); } /* Invulnerability */ if (p_ptr->invuln) { - (void)set_invuln(p_ptr->invuln - 1); + set_invuln(p_ptr->invuln - 1); } /* Wraith form */ if (p_ptr->tim_wraith) { - (void)set_shadow(p_ptr->tim_wraith - 1); + set_shadow(p_ptr->tim_wraith - 1); } /* Heroism */ if (p_ptr->hero) { - (void)set_hero(p_ptr->hero - 1); + set_hero(p_ptr->hero - 1); } /* Super Heroism */ if (p_ptr->shero) { - (void)set_shero(p_ptr->shero - 1); + set_shero(p_ptr->shero - 1); } /* Blessed */ if (p_ptr->blessed) { - (void)set_blessed(p_ptr->blessed - 1); + set_blessed(p_ptr->blessed - 1); } /* Shield */ if (p_ptr->shield) { - (void)set_shield(p_ptr->shield - 1, p_ptr->shield_power, p_ptr->shield_opt, p_ptr->shield_power_opt, p_ptr->shield_power_opt2); + set_shield(p_ptr->shield - 1, p_ptr->shield_power, p_ptr->shield_opt, p_ptr->shield_power_opt, p_ptr->shield_power_opt2); } /* Oppose Acid */ if (p_ptr->oppose_acid) { - (void)set_oppose_acid(p_ptr->oppose_acid - 1); + set_oppose_acid(p_ptr->oppose_acid - 1); } /* Oppose Lightning */ if (p_ptr->oppose_elec) { - (void)set_oppose_elec(p_ptr->oppose_elec - 1); + set_oppose_elec(p_ptr->oppose_elec - 1); } /* Oppose Fire */ if (p_ptr->oppose_fire) { - (void)set_oppose_fire(p_ptr->oppose_fire - 1); + set_oppose_fire(p_ptr->oppose_fire - 1); } /* Oppose Cold */ if (p_ptr->oppose_cold) { - (void)set_oppose_cold(p_ptr->oppose_cold - 1); + set_oppose_cold(p_ptr->oppose_cold - 1); } /* Oppose Poison */ if (p_ptr->oppose_pois) { - (void)set_oppose_pois(p_ptr->oppose_pois - 1); + set_oppose_pois(p_ptr->oppose_pois - 1); } /* Oppose Chaos & Confusion */ if (p_ptr->oppose_cc) { - (void)set_oppose_cc(p_ptr->oppose_cc - 1); + set_oppose_cc(p_ptr->oppose_cc - 1); } /* Timed mimicry */ @@ -2261,7 +2261,7 @@ static void process_world(void) int adjust = (adj_con_fix[p_ptr->stat_ind[A_CON]] + 1); /* Apply some healing */ - (void)set_poisoned(p_ptr->poisoned - adjust); + set_poisoned(p_ptr->poisoned - adjust); } /* Stun */ @@ -2270,7 +2270,7 @@ static void process_world(void) int adjust = (adj_con_fix[p_ptr->stat_ind[A_CON]] + 1); /* Apply some healing */ - (void)set_stun(p_ptr->stun - adjust); + set_stun(p_ptr->stun - adjust); } /* Cut */ @@ -2282,7 +2282,7 @@ static void process_world(void) if (p_ptr->cut > 1000) adjust = 0; /* Apply some healing */ - (void)set_cut(p_ptr->cut - adjust); + set_cut(p_ptr->cut - adjust); } /* Hack - damage done by the dungeon -SC- */ @@ -2657,7 +2657,7 @@ static void process_world(void) { p_ptr->exp -= 1 + plev / 5; p_ptr->max_exp -= 1 + plev / 5; - (void)do_dec_stat(rand_int(6), STAT_DEC_NORMAL); + do_dec_stat(rand_int(6), STAT_DEC_NORMAL); check_experience(); } } @@ -3162,7 +3162,7 @@ static void process_world(void) /* * Verify use of "wizard" mode */ -static bool_ enter_wizard_mode(void) +static bool_ enter_wizard_mode() { /* Ask first time, but not while loading a dead char with the -w option */ if (!noscore && !(p_ptr->chp < 0)) @@ -3190,7 +3190,7 @@ static bool_ enter_wizard_mode(void) /* * Verify use of "debug" commands */ -static bool_ enter_debug_mode(void) +static bool_ enter_debug_mode() { /* Ask first time */ if (!noscore && !wizard) @@ -3221,7 +3221,7 @@ static bool_ enter_debug_mode(void) * * XXX XXX XXX Make some "blocks" */ -static void process_command(void) +static void process_command() { auto const &wf_info = game->edit_data.wf_info; @@ -4151,7 +4151,7 @@ static void process_command(void) * must come first just in case somebody manages to corrupt * the savefiles by clever use of menu commands or something. */ -static void process_player(void) +static void process_player() { auto const &f_info = game->edit_data.f_info; auto const &k_info = game->edit_data.k_info; @@ -4603,7 +4603,7 @@ static void process_player(void) * This function will not exit until the level is completed, * the user dies, or the game is terminated. */ -static void dungeon(void) +static void dungeon() { auto const &d_info = game->edit_data.d_info; @@ -4981,7 +4981,7 @@ static void dungeon(void) /* * Load some "user pref files" */ -static void load_all_pref_files(void) +static void load_all_pref_files() { char buf[1024]; @@ -5055,7 +5055,7 @@ void play_game() /* Hack -- turn off the cursor */ - (void)Term_set_cursor(0); + Term_set_cursor(0); /* Character list */ bool_ new_game = FALSE; @@ -5363,14 +5363,14 @@ void play_game() p_ptr->csp_frac = 0; /* Hack -- Healing */ - (void)set_blind(0); - (void)set_confused(0); - (void)set_poisoned(0); - (void)set_afraid(0); - (void)set_paralyzed(0); - (void)set_image(0); - (void)set_stun(0); - (void)set_cut(0); + set_blind(0); + set_confused(0); + set_poisoned(0); + set_afraid(0); + set_paralyzed(0); + set_image(0); + set_stun(0); + set_cut(0); /* accounting for a new ailment. -LM- */ p_ptr->black_breath = FALSE; @@ -5379,7 +5379,7 @@ void play_game() p_ptr->necro_extra &= ~CLASS_UNDEAD; /* Hack -- Prevent starvation */ - (void)set_food(PY_FOOD_MAX - 1); + set_food(PY_FOOD_MAX - 1); /* Hack -- cancel recall */ if (p_ptr->word_recall) diff --git a/src/files.cc b/src/files.cc index e148a679..81fdeeec 100644 --- a/src/files.cc +++ b/src/files.cc @@ -1045,7 +1045,7 @@ errr process_pref_file(cptr name) if (buf[0] == '%') { /* Process that file if allowed */ - (void)process_pref_file(buf + 2); + process_pref_file(buf + 2); /* Continue */ continue; @@ -1088,7 +1088,7 @@ static void prt_lnum(cptr header, s32b num, int row, int col, byte color) char out_val[32]; put_str(header, row, col); - (void)sprintf(out_val, "%9ld", (long)num); + sprintf(out_val, "%9ld", (long)num); c_put_str(color, out_val, row, col + len); } @@ -1104,7 +1104,7 @@ static void prt_num(cptr header, int num, int row, int col, byte color, put_str(header, row, col); put_str(space, row, col + len); - (void)sprintf(out_val, "%6ld", (long)num); + sprintf(out_val, "%6ld", (long)num); c_put_str(color, out_val, row, col + len + strlen(space)); } @@ -1119,7 +1119,7 @@ static void prt_str(cptr header, cptr str, int row, int col, byte color) put_str(header, row, col); put_str(" ", row, col + len); - (void)sprintf(out_val, "%6s", str); + sprintf(out_val, "%6s", str); c_put_str(color, out_val, row, col + len + 3); } @@ -1130,7 +1130,7 @@ static void prt_str(cptr header, cptr str, int row, int col, byte color) * For this to look right, the following should be spaced the * same as in the prt_lnum code... -CFT */ -static void display_player_middle(void) +static void display_player_middle() { int show_tohit = p_ptr->dis_to_h; int show_todam = p_ptr->dis_to_d; @@ -1207,10 +1207,10 @@ static void display_player_middle(void) { color = TERM_L_RED; } - (void)sprintf(num, "%6ld", (long)p_ptr->chp); + sprintf(num, "%6ld", (long)p_ptr->chp); c_put_str(color, num, 9, 65); put_str("/", 9, 71); - (void)sprintf(num, "%6ld", (long)p_ptr->mhp); + sprintf(num, "%6ld", (long)p_ptr->mhp); c_put_str(TERM_L_BLUE, num, 9, 72); } else @@ -1228,10 +1228,10 @@ static void display_player_middle(void) { color = TERM_RED; } - (void)sprintf(num, "%6ld", (long)p_ptr->chp); + sprintf(num, "%6ld", (long)p_ptr->chp); c_put_str(color, num, 9, 65); put_str("/", 9, 71); - (void)sprintf(num, "%6ld", (long)p_ptr->mhp); + sprintf(num, "%6ld", (long)p_ptr->mhp); c_put_str(TERM_L_GREEN, num, 9, 72); } @@ -1248,10 +1248,10 @@ static void display_player_middle(void) { color = TERM_RED; } - (void)sprintf(num, "%6ld", (long)p_ptr->csp); + sprintf(num, "%6ld", (long)p_ptr->csp); c_put_str(color, num, 10, 65); put_str("/", 10, 71); - (void)sprintf(num, "%6ld", (long)p_ptr->msp); + sprintf(num, "%6ld", (long)p_ptr->msp); c_put_str(TERM_L_GREEN, num, 10, 72); put_str("Sanity ", 11, 52); @@ -1267,10 +1267,10 @@ static void display_player_middle(void) { color = TERM_RED; } - (void)sprintf(num, "%6ld", (long)p_ptr->csane); + sprintf(num, "%6ld", (long)p_ptr->csane); c_put_str(color, num, 11, 65); put_str("/", 11, 71); - (void)sprintf(num, "%6ld", (long)p_ptr->msane); + sprintf(num, "%6ld", (long)p_ptr->msane); c_put_str(TERM_L_GREEN, num, 11, 72); if (p_ptr->pgod != GOD_NONE) @@ -1283,13 +1283,13 @@ static void display_player_middle(void) if (speed > 110) { char s[11]; - (void)sprintf(s, "Fast (+%d)", speed - 110); + sprintf(s, "Fast (+%d)", speed - 110); c_put_str(TERM_L_GREEN, s, 13, (speed >= 120) ? 68 : 69); } else if (speed < 110) { char s[11]; - (void)sprintf(s, "Slow (-%d)", 110 - speed); + sprintf(s, "Slow (-%d)", 110 - speed); c_put_str(TERM_L_UMBER, s, 13, (speed <= 100) ? 68 : 69); } else @@ -1392,7 +1392,7 @@ static cptr likert(int x, int y) * * This code is "imitated" elsewhere to "dump" a character sheet. */ -static void display_player_various(void) +static void display_player_various() { auto const &r_info = game->edit_data.r_info; @@ -2454,7 +2454,7 @@ static void file_character_print_grid(FILE *fff, bool_ show_gaps, bool_ show_leg { for (x = 0; x < 40; x++) { - (void)(Term_what(x, y, &a, &c)); + (Term_what(x, y, &a, &c)); buf[x] = c; } @@ -2467,7 +2467,7 @@ static void file_character_print_grid(FILE *fff, bool_ show_gaps, bool_ show_leg { for (x = 40; x < 80; x++) { - (void)(Term_what(x, y, &a, &c)); + (Term_what(x, y, &a, &c)); buf[x - 40] = c; } @@ -2579,10 +2579,10 @@ errr file_character(cptr name, bool_ full) char out_val[160]; /* Close the file */ - (void)fd_close(fd); + fd_close(fd); /* Build query */ - (void)sprintf(out_val, "Replace existing file %s? ", buf); + sprintf(out_val, "Replace existing file %s? ", buf); /* Ask */ if (get_check(out_val)) fd = -1; @@ -2617,7 +2617,7 @@ errr file_character(cptr name, bool_ full) for (x = 0; x < 79; x++) { /* Get the attr/char */ - (void)(Term_what(x, y, &a, &c)); + (Term_what(x, y, &a, &c)); /* Dump it */ buf[x] = c; @@ -2640,7 +2640,7 @@ errr file_character(cptr name, bool_ full) for (x = 0; x < 79; x++) { /* Get the attr/char */ - (void)(Term_what(x, y, &a, &c)); + (Term_what(x, y, &a, &c)); /* Dump it */ buf[x] = c; @@ -3381,7 +3381,7 @@ static bool_ show_file_aux(cptr name, cptr what, int line) { /* Get "h_ptr->shower" */ prt("Show: ", hgt - 1, 0); - (void)askfor_aux(h_ptr->shower, 80); + askfor_aux(h_ptr->shower, 80); } /* Hack -- try finding */ @@ -3718,7 +3718,7 @@ void html_screenshot(cptr name) /* * Peruse the On-Line-Help */ -void do_cmd_help(void) +void do_cmd_help() { /* Save screen */ screen_save(); @@ -3799,7 +3799,7 @@ void process_player_name(bool_ sf) * * What a horrible name for a global function. XXX XXX XXX */ -void get_name(void) +void get_name() { char tmp[32]; @@ -3846,7 +3846,7 @@ void get_name(void) /* * Hack -- commit suicide */ -void do_cmd_suicide(void) +void do_cmd_suicide() { int i; @@ -3923,7 +3923,7 @@ void remove_cave_view(bool_ remove) /* * Save the game */ -void do_cmd_save_game(void) +void do_cmd_save_game() { remove_cave_view(TRUE); @@ -3990,7 +3990,7 @@ void autosave_checkpoint() /* * Hack -- Calculates the total number of points earned -JWT- */ -static long total_points(void) +static long total_points() { auto const &d_info = game->edit_data.d_info; auto const &r_info = game->edit_data.r_info; @@ -4104,7 +4104,7 @@ static long total_points(void) /* * Display a "tomb-stone" */ -static void print_tomb(void) +static void print_tomb() { time_t ct = time(nullptr); @@ -4164,7 +4164,7 @@ static void print_tomb(void) /* * Display some character info */ -static void show_info(void) +static void show_info() { /* Hack -- Know everything in the inven/equip */ for (auto &o_ref: p_ptr->inventory) @@ -4235,7 +4235,7 @@ static void show_info(void) Term_save(); /* Dump a character file */ - (void)file_character(out_val, TRUE); + file_character(out_val, TRUE); /* Load screen */ Term_load(); @@ -4694,7 +4694,7 @@ void race_score(int race_num) * Race Legends * -KMW- */ -void race_legends(void) +void race_legends() { auto const &race_info = game->edit_data.race_info; @@ -4717,7 +4717,7 @@ void race_legends(void) * Enters a players name on a hi-score table, if "legal", and in any * case, displays some relevant portion of the high score list. */ -static errr top_twenty(void) +static errr top_twenty() { int j; @@ -4850,7 +4850,7 @@ out: /* * Predict the players location, and display it. */ -static errr predict_score(void) +static errr predict_score() { int j; @@ -4989,7 +4989,7 @@ void predict_score_gui(bool_ *initialized_p, bool_ *game_in_progress_p) } /* Close the high score file */ - (void)fd_close(highscore_fd); + fd_close(highscore_fd); /* Forget the fd */ highscore_fd = -1; @@ -5008,7 +5008,7 @@ void predict_score_gui(bool_ *initialized_p, bool_ *game_in_progress_p) /* * Change the player into a King! -RAK- */ -static void kingly(void) +static void kingly() { /* Hack -- retire in town */ dun_level = 0; @@ -5100,7 +5100,7 @@ void wipe_saved() * * This function is called only from "main.c" and "signals.c". */ -void close_game(void) +void close_game() { /* Handle stuff */ handle_stuff(); diff --git a/src/files.h b/src/files.h index ddb9c5c8..78521f4c 100644 --- a/src/files.h +++ b/src/files.h @@ -7,7 +7,7 @@ extern "C" { #endif -void do_cmd_save_game(void); +void do_cmd_save_game(); void predict_score_gui(bool_ *initialized, bool_ *game_in_progress); #ifdef __cplusplus diff --git a/src/files.hpp b/src/files.hpp index d86307e8..f431eb69 100644 --- a/src/files.hpp +++ b/src/files.hpp @@ -10,7 +10,7 @@ void html_screenshot(cptr name); void help_file_screenshot(cptr name); object_flag_set player_flags(); -void wipe_saved(void); +void wipe_saved(); s16b tokenize(char *buf, s16b num, char **tokens, char delim1, char delim2); void display_player(int mode); std::string describe_player_location(); @@ -19,15 +19,15 @@ errr process_pref_file_aux(char *buf); errr process_pref_file(cptr name); void show_string(const char *lines, const char *title, int line = 0); void show_file(cptr name, cptr what, int line = 0); -void do_cmd_help(void); -void process_player_base(void); -void get_name(void); -void do_cmd_suicide(void); +void do_cmd_help(); +void process_player_base(); +void get_name(); +void do_cmd_suicide(); void autosave_checkpoint(); -void close_game(void); +void close_game(); errr get_rnd_line(const char * file_name, char * output); char *get_line(const char* fname, cptr fdir, char *linbuf, int line); -void race_legends(void); +void race_legends(); void show_highclass(int building); errr get_xtra_line(const char * file_name, monster_type *m_ptr, char * output); void process_player_name(bool_ sf); diff --git a/src/generate.cc b/src/generate.cc index 714238a8..5286532d 100644 --- a/src/generate.cc +++ b/src/generate.cc @@ -1594,7 +1594,7 @@ static void build_streamer2(int feat, int killwall) /* * Build a destroyed level */ -static void destroy_level(void) +static void destroy_level() { int y1, x1, y, x, k, t, n; @@ -1865,7 +1865,7 @@ static void vault_monsters(int y1, int x1, int num) /* Place the monster (allow groups) */ monster_level = dun_level + 2; - (void)place_monster(y, x, TRUE, TRUE); + place_monster(y, x, TRUE, TRUE); monster_level = dun_level; } } @@ -3030,7 +3030,7 @@ static void build_type5(int by0, int bx0) int r_idx = what[rand_int(64)]; /* Place that "random" monster (no groups) */ - (void)place_monster_aux(y, x, r_idx, FALSE, FALSE, MSTATUS_ENEMY); + place_monster_aux(y, x, r_idx, FALSE, FALSE, MSTATUS_ENEMY); } } } @@ -4435,7 +4435,7 @@ bool_ generate_fracave(int y0, int x0, int xsize, int ysize, /* * Makes a cave system in the center of the dungeon */ -static void build_cavern(void) +static void build_cavern() { int grd, roug, cutoff, xsize, ysize, x0, y0; bool_ done, light, room; @@ -6868,7 +6868,7 @@ bool_ level_generate_dungeon() while (dun->cent_n == 0) { /* ...force the creation of a small rectangular room */ - (void)room_build(0, 0, 1); + room_build(0, 0, 1); } /* Hack -- Scramble the room order */ @@ -7184,7 +7184,7 @@ static void save_all_friends() * *hint* *hint* with this made extern, and we no longer have to * store fill_type and floor_type in the savefile... */ -static void init_feat_info(void) +static void init_feat_info() { auto const &d_info = game->edit_data.d_info; @@ -7546,7 +7546,7 @@ static void supersize_grid_tile(int sy, int sx, int ty, int tx) * * Note that "dun_body" adds about 4000 bytes of memory to the stack. */ -static bool_ cave_gen(void) +static bool_ cave_gen() { auto const &d_info = game->edit_data.d_info; auto const &r_info = game->edit_data.r_info; @@ -7696,7 +7696,7 @@ static bool_ cave_gen(void) /* Put some monsters in the dungeon */ for (i = i + k; i > 0; i--) { - (void)alloc_monster(0, TRUE); + alloc_monster(0, TRUE); } } @@ -8066,7 +8066,7 @@ static bool_ cave_gen(void) /* Mega-Hack */ #define REGEN_HACK 0x02 -bool_ build_special_level(void) +bool_ build_special_level() { auto const &d_info = game->edit_data.d_info; @@ -8129,7 +8129,7 @@ bool_ build_special_level(void) * Prepare regeneration of a special level, which should not happen, * but just in case... */ -static void wipe_special_level(void) +static void wipe_special_level() { auto const &d_info = game->edit_data.d_info; @@ -8157,7 +8157,7 @@ static void wipe_special_level(void) /* * Finalise generation of a special level */ -static void finalise_special_level(void) +static void finalise_special_level() { auto const &d_info = game->edit_data.d_info; @@ -8229,7 +8229,7 @@ static void generate_grid_mana() * * Hack -- allow auto-scumming via a gameplay option. */ -void generate_cave(void) +void generate_cave() { auto const &d_info = game->edit_data.d_info; auto &a_info = game->edit_data.a_info; diff --git a/src/generate.hpp b/src/generate.hpp index 296afb8d..a21ba069 100644 --- a/src/generate.hpp +++ b/src/generate.hpp @@ -8,5 +8,5 @@ bool_ level_generate_dungeon(); bool_ generate_fracave(int y0, int x0,int xsize,int ysize,int cutoff,bool_ light,bool_ room); void generate_hmap(int y0, int x0,int xsiz,int ysiz,int grd,int roug,int cutoff); bool_ room_alloc(int x,int y,bool_ crowded,int by0,int bx0,int *xx,int *yy); -void generate_cave(void); +void generate_cave(); void build_rectangle(int y1, int x1, int y2, int x2, int feat, int info); diff --git a/src/init1.cc b/src/init1.cc index 056b5b51..e367f603 100644 --- a/src/init1.cc +++ b/src/init1.cc @@ -6910,7 +6910,7 @@ errr process_dungeon_file(cptr name, int *yval, int *xval, int ymax, int xmax, b if (buf[0] == '%') { /* Process that file if allowed */ - (void)process_dungeon_file(buf + 2, yval, xval, ymax, xmax, FALSE, full); + process_dungeon_file(buf + 2, yval, xval, ymax, xmax, FALSE, full); /* Continue */ continue; diff --git a/src/init2.cc b/src/init2.cc index 88fd5470..e79ba87c 100644 --- a/src/init2.cc +++ b/src/init2.cc @@ -528,7 +528,7 @@ static void init_basic() /* * Initialise misc. values */ -static errr init_misc(void) +static errr init_misc() { int xstart = 0; int ystart = 0; @@ -558,7 +558,7 @@ static errr init_misc(void) /* * Initialise town array */ -static errr init_towns(void) +static errr init_towns() { auto const &st_info = game->edit_data.st_info; @@ -614,7 +614,7 @@ void create_stores_stock(int t) /* * Initialise some other arrays */ -static errr init_other(void) +static errr init_other() { auto const &d_info = game->edit_data.d_info; auto const &r_info = game->edit_data.r_info; @@ -632,7 +632,7 @@ static errr init_other(void) /*** Prepare "vinfo" array ***/ /* Used by "update_view()" */ - (void)vinfo_init(); + vinfo_init(); /* Allocate and Wipe the object list */ @@ -687,7 +687,7 @@ static errr init_other(void) /*** Pre-allocate space for the "format()" buffer ***/ /* Hack -- Just call the "format()" function */ - (void)format("%s (%s).", "Dark God ", MAINTAINER); + format("%s (%s).", "Dark God ", MAINTAINER); /* Success */ return (0); @@ -698,7 +698,7 @@ static errr init_other(void) /* * Initialise some other arrays */ -static errr init_alloc(void) +static errr init_alloc() { auto const &r_info = game->edit_data.r_info; auto const &k_info = game->edit_data.k_info; @@ -910,7 +910,7 @@ static void init_sets_aux() /* * Mark guardians and their artifacts with SPECIAL_GENE flag */ -static void init_guardians(void) +static void init_guardians() { auto const &d_info = game->edit_data.d_info; auto &r_info = game->edit_data.r_info; @@ -1026,7 +1026,7 @@ static void init_angband_aux(cptr why) * Note that the "graf-xxx.prf" file must be loaded separately, * if needed, in the first (?) pass through "TERM_XTRA_REACT". */ -void init_angband(void) +void init_angband() { int fd = -1; @@ -1083,7 +1083,7 @@ void init_angband(void) } /* Close it */ - (void)fd_close(fd); + fd_close(fd); /*** Display the "news" file ***/ @@ -1145,7 +1145,7 @@ void init_angband(void) } /* Close it */ - (void)fd_close(fd); + fd_close(fd); /*** Initialise some arrays ***/ diff --git a/src/init2.h b/src/init2.h index d99cd62c..bdc525bf 100644 --- a/src/init2.h +++ b/src/init2.h @@ -6,7 +6,7 @@ extern "C" { #endif void init_file_paths(char *path); -void init_angband(void); +void init_angband(); #ifdef __cplusplus } // extern "C" diff --git a/src/init2.hpp b/src/init2.hpp index e1c3b4ef..de575e77 100644 --- a/src/init2.hpp +++ b/src/init2.hpp @@ -4,6 +4,6 @@ void init_corruptions(); void create_stores_stock(int t); -errr init_v_info(void); +errr init_v_info(); extern s16b error_idx; extern s16b error_line; diff --git a/src/levels.hpp b/src/levels.hpp index fb3169b4..a48f1d95 100644 --- a/src/levels.hpp +++ b/src/levels.hpp @@ -4,10 +4,10 @@ bool_ get_dungeon_generator(char *buf); bool_ get_level_desc(char *buf); -void get_level_flags(void); +void get_level_flags(); bool_ get_dungeon_name(char *buf); bool_ get_dungeon_special(char *buf); -int get_branch(void); -int get_fbranch(void); -int get_flevel(void); +int get_branch(); +int get_fbranch(); +int get_flevel(); bool_ get_dungeon_save(char *buf); diff --git a/src/loadsave.cc b/src/loadsave.cc index 196e8d81..86c67956 100644 --- a/src/loadsave.cc +++ b/src/loadsave.cc @@ -94,7 +94,7 @@ struct option_value { * not to save it. There's no point. -- takkaria */ -static byte sf_get(void) +static byte sf_get() { byte c; @@ -108,7 +108,7 @@ static byte sf_get(void) static void sf_put(byte v) { - (void)putc((int)v, fff); + putc((int)v, fff); } /* @@ -1547,7 +1547,7 @@ static bool_ do_dungeon(ls_flag_t flag, bool no_companions) } /* Save the current persistent dungeon -SC- */ -void save_dungeon(void) +void save_dungeon() { char tmp[16]; char name[1024], buf[5]; @@ -2579,7 +2579,7 @@ static bool_ do_savefile_aux(ls_flag_t flag) /* * Actually read the savefile */ -static errr rd_savefile(void) +static errr rd_savefile() { errr err = 0; @@ -2617,7 +2617,7 @@ static errr rd_savefile(void) * Note that we always try to load the "current" savefile, even if * there is no such file, so we must check for "empty" savefile names. */ -bool_ load_player(void) +bool_ load_player() { errr err = 0; @@ -2780,7 +2780,7 @@ static bool_ save_player_aux(char *name) if (fd >= 0) { /* Close the "fd" */ - (void)fd_close(fd); + fd_close(fd); /* Open the savefile */ fff = my_fopen(name, "wb"); @@ -2799,7 +2799,7 @@ static bool_ save_player_aux(char *name) if (!ok) { /* Remove "broken" files */ - (void)fd_kill(name); + fd_kill(name); } } @@ -2813,7 +2813,7 @@ static bool_ save_player_aux(char *name) /* * Attempt to save the player in a savefile */ -bool_ save_player(void) +bool_ save_player() { int result = FALSE; char safe[1024]; diff --git a/src/loadsave.h b/src/loadsave.h index 0d2c4ff5..52782dac 100644 --- a/src/loadsave.h +++ b/src/loadsave.h @@ -7,8 +7,8 @@ extern "C" { #endif -void save_dungeon(void); -bool_ save_player(void); +void save_dungeon(); +bool_ save_player(); #ifdef __cplusplus } // extern "C" diff --git a/src/loadsave.hpp b/src/loadsave.hpp index d80a3e7e..01a3cb87 100644 --- a/src/loadsave.hpp +++ b/src/loadsave.hpp @@ -4,4 +4,4 @@ bool_ file_exist(cptr buf); bool_ load_dungeon(char *ext); -bool_ load_player(void); +bool_ load_player(); diff --git a/src/main.cc b/src/main.cc index 3a08c6b0..c0ac3826 100644 --- a/src/main.cc +++ b/src/main.cc @@ -47,7 +47,7 @@ static void quit_hook(cptr s) * home directory or try to create it if it doesn't exist. * Returns FALSE if all the attempts fail. */ -static void init_save_dir(void) +static void init_save_dir() { char dirpath[1024]; char versionpath[1024]; diff --git a/src/melee1.cc b/src/melee1.cc index 1b20588a..58ebfbaa 100644 --- a/src/melee1.cc +++ b/src/melee1.cc @@ -1100,7 +1100,7 @@ bool_ carried_make_attack_normal(int r_idx) } /* Apply the cut */ - if (k) (void)set_cut(p_ptr->cut + k); + if (k) set_cut(p_ptr->cut + k); } /* Handle stun */ @@ -1141,7 +1141,7 @@ bool_ carried_make_attack_normal(int r_idx) } /* Apply the stun */ - if (k) (void)set_stun(p_ptr->stun + k); + if (k) set_stun(p_ptr->stun + k); } } @@ -2518,7 +2518,7 @@ bool_ make_attack_normal(int m_idx, byte divis) } /* Apply the cut */ - if (k) (void)set_cut(p_ptr->cut + k); + if (k) set_cut(p_ptr->cut + k); } /* Handle stun */ @@ -2559,7 +2559,7 @@ bool_ make_attack_normal(int m_idx, byte divis) } /* Apply the stun */ - if (k) (void)set_stun(p_ptr->stun + k); + if (k) set_stun(p_ptr->stun + k); } if (explode) diff --git a/src/melee2.cc b/src/melee2.cc index fbc793bd..3ab3cc1c 100644 --- a/src/melee2.cc +++ b/src/melee2.cc @@ -607,7 +607,7 @@ static void bolt(int m_idx, int typ, int dam_hp) int flg = PROJECT_STOP | PROJECT_KILL; /* Target the player with a bolt attack */ - (void)project(m_idx, 0, p_ptr->py, p_ptr->px, dam_hp, typ, flg); + project(m_idx, 0, p_ptr->py, p_ptr->px, dam_hp, typ, flg); } @@ -837,7 +837,7 @@ static void breath(int m_idx, int typ, int dam_hp, int rad) if (rad < 1) rad = (r_ptr->flags & RF_POWERFUL) ? 3 : 2; /* Target the player with a ball attack */ - (void)project(m_idx, rad, p_ptr->py, p_ptr->px, dam_hp, typ, flg); + project(m_idx, rad, p_ptr->py, p_ptr->px, dam_hp, typ, flg); } @@ -856,7 +856,7 @@ static void monst_breath_monst(int m_idx, int y, int x, int typ, int dam_hp, int /* Determine the radius of the blast */ if (rad < 1) rad = (r_ptr->flags & RF_POWERFUL) ? 3 : 2; - (void)project(m_idx, rad, y, x, dam_hp, typ, flg); + project(m_idx, rad, y, x, dam_hp, typ, flg); } @@ -869,7 +869,7 @@ static void monst_bolt_monst(int m_idx, int y, int x, int typ, int dam_hp) { int flg = PROJECT_STOP | PROJECT_KILL; - (void)project(m_idx, 0, y, x, dam_hp, typ, flg); + project(m_idx, 0, y, x, dam_hp, typ, flg); } @@ -883,7 +883,7 @@ static void monster_msg(cptr fmt, ...) va_start(vp, fmt); /* Format the args, save the length */ - (void)vstrnfmt(buf, 1024, fmt, vp); + vstrnfmt(buf, 1024, fmt, vp); /* End the Varargs Stuff */ va_end(vp); @@ -916,7 +916,7 @@ void cmonster_msg(char a, cptr fmt, ...) va_start(vp, fmt); /* Format the args, save the length */ - (void)vstrnfmt(buf, 1024, fmt, vp); + vstrnfmt(buf, 1024, fmt, vp); /* End the Varargs Stuff */ va_end(vp); @@ -2119,7 +2119,7 @@ static bool_ monst_spell_monst(int m_idx) else monster_msg("%^s gestures in shadow.", m_name); if (seen) monster_msg("%^s is surrounded by darkness.", t_name); - (void)project(m_idx, 3, y, x, 0, GF_DARK_WEAK, PROJECT_GRID | PROJECT_KILL); + project(m_idx, 3, y, x, 0, GF_DARK_WEAK, PROJECT_GRID | PROJECT_KILL); /* Lite up the room */ unlite_room(y, x); break; @@ -3103,12 +3103,12 @@ static bool_ make_attack_spell(int m_idx) if (!p_ptr->resist_conf) { - (void)set_confused(p_ptr->confused + rand_int(4) + 4); + set_confused(p_ptr->confused + rand_int(4) + 4); } if ((!p_ptr->resist_chaos) && (randint(3) == 1)) { - (void) set_image(p_ptr->image + rand_int(250) + 150); + set_image(p_ptr->image + rand_int(250) + 150); } take_sanity_hit(damroll(8, 8), ddesc); @@ -3138,26 +3138,26 @@ static bool_ make_attack_spell(int m_idx) take_sanity_hit(damroll(12, 15), ddesc); if (!p_ptr->resist_blind) { - (void)set_blind(p_ptr->blind + 8 + rand_int(8)); + set_blind(p_ptr->blind + 8 + rand_int(8)); } if (!p_ptr->resist_conf) { - (void)set_confused(p_ptr->confused + rand_int(4) + 4); + set_confused(p_ptr->confused + rand_int(4) + 4); } if (!p_ptr->free_act) { - (void)set_paralyzed(rand_int(4) + 4); + set_paralyzed(rand_int(4) + 4); } - (void)set_slow(p_ptr->slow + rand_int(4) + 4); + set_slow(p_ptr->slow + rand_int(4) + 4); while (rand_int(100) > p_ptr->skill_sav) - (void)do_dec_stat(A_INT, STAT_DEC_NORMAL); + do_dec_stat(A_INT, STAT_DEC_NORMAL); while (rand_int(100) > p_ptr->skill_sav) - (void)do_dec_stat(A_WIS, STAT_DEC_NORMAL); + do_dec_stat(A_WIS, STAT_DEC_NORMAL); if (!p_ptr->resist_chaos) { - (void) set_image(p_ptr->image + rand_int(250) + 150); + set_image(p_ptr->image + rand_int(250) + 150); } } break; @@ -3226,7 +3226,7 @@ static bool_ make_attack_spell(int m_idx) else { take_hit(damroll(15, 15), ddesc); - (void)set_cut(p_ptr->cut + damroll(10, 10)); + set_cut(p_ptr->cut + damroll(10, 10)); } break; } @@ -3358,7 +3358,7 @@ static bool_ make_attack_spell(int m_idx) } else { - (void)set_afraid(p_ptr->afraid + rand_int(4) + 4); + set_afraid(p_ptr->afraid + rand_int(4) + 4); } update_smart_learn(m_idx, DRS_FEAR); break; @@ -3379,7 +3379,7 @@ static bool_ make_attack_spell(int m_idx) } else { - (void)set_blind(12 + rand_int(4)); + set_blind(12 + rand_int(4)); } update_smart_learn(m_idx, DRS_BLIND); break; @@ -3400,7 +3400,7 @@ static bool_ make_attack_spell(int m_idx) } else { - (void)set_confused(p_ptr->confused + rand_int(4) + 4); + set_confused(p_ptr->confused + rand_int(4) + 4); } update_smart_learn(m_idx, DRS_CONF); break; @@ -3420,7 +3420,7 @@ static bool_ make_attack_spell(int m_idx) } else { - (void)set_slow(p_ptr->slow + rand_int(4) + 4); + set_slow(p_ptr->slow + rand_int(4) + 4); } update_smart_learn(m_idx, DRS_FREE); break; @@ -3441,7 +3441,7 @@ static bool_ make_attack_spell(int m_idx) } else { - (void)set_paralyzed(rand_int(4) + 4); + set_paralyzed(rand_int(4) + 4); } update_smart_learn(m_idx, DRS_FREE); break; @@ -3617,7 +3617,7 @@ static bool_ make_attack_spell(int m_idx) disturb(); if (blind) msg_format("%^s mumbles.", m_name); else msg_format("%^s gestures in shadow.", m_name); - (void)unlite_area(0, 3); + unlite_area(0, 3); break; } @@ -4443,7 +4443,7 @@ static bool_ get_moves(int m_idx, int *mm) if (options->flow_by_sound) { /* Adjust movement */ - (void)get_fear_moves_aux(m_idx, &y, &x); + get_fear_moves_aux(m_idx, &y, &x); } } } @@ -5974,7 +5974,7 @@ static void process_monster(int m_idx, bool_ is_frien) if (do_move && (ny == p_ptr->py) && (nx == p_ptr->px)) { /* Do the attack */ - (void)make_attack_normal(m_idx, 1); + make_attack_normal(m_idx, 1); /* Do not move */ do_move = FALSE; @@ -6370,7 +6370,7 @@ void summon_maint(int m_idx) * changes (flags, attacks, spells), we induce a redraw of the monster * recall window. */ -void process_monsters(void) +void process_monsters() { auto const &r_info = game->edit_data.r_info; diff --git a/src/melee2.hpp b/src/melee2.hpp index d3af972f..d5106850 100644 --- a/src/melee2.hpp +++ b/src/melee2.hpp @@ -7,6 +7,6 @@ extern int monst_spell_monst_spell; bool_ mon_take_hit_mon(int s_idx, int m_idx, int dam, bool_ *fear, cptr note); void mon_handle_fear(monster_type *m_ptr, int dam, bool_ *fear); int check_hit2(int power, int level, int ac); -void process_monsters(void); +void process_monsters(); void curse_equipment(int chance, int heavy_chance); void curse_equipment_dg(int chance, int heavy_chance); diff --git a/src/messages.cc b/src/messages.cc index c2f8d079..637fa991 100644 --- a/src/messages.cc +++ b/src/messages.cc @@ -19,7 +19,7 @@ static boost::circular_buffer *buffer() return instance; } -s16b message_num(void) +s16b message_num() { return buffer()->size(); } diff --git a/src/modules.hpp b/src/modules.hpp index e8a413df..b57120c3 100644 --- a/src/modules.hpp +++ b/src/modules.hpp @@ -2,7 +2,7 @@ #include "h-basic.h" -bool_ select_module(void); +bool_ select_module(); bool_ module_savefile_loadable(cptr savefile_mod); void tome_intro(); void theme_intro(); diff --git a/src/monster1.cc b/src/monster1.cc index 244fbf94..50c8c548 100644 --- a/src/monster1.cc +++ b/src/monster1.cc @@ -1559,7 +1559,7 @@ static bool_ monster_lava(int r_idx) } -void set_mon_num_hook(void) +void set_mon_num_hook() { auto const &wf_info = game->edit_data.wf_info; diff --git a/src/monster2.cc b/src/monster2.cc index 9fee393e..ab60a9e3 100644 --- a/src/monster2.cc +++ b/src/monster2.cc @@ -711,7 +711,7 @@ void compact_monsters(int size) * This is an efficient method of simulating multiple calls to the * "delete_monster()" function, with no visual effects. */ -void wipe_m_list(void) +void wipe_m_list() { int i; @@ -759,7 +759,7 @@ void wipe_m_list(void) * * This routine should almost never fail, but it *can* happen. */ -s16b m_pop(void) +s16b m_pop() { int i; @@ -813,7 +813,7 @@ s16b m_pop(void) /* * Apply a "monster restriction function" to the "monster allocation table" */ -errr get_mon_num_prep(void) +errr get_mon_num_prep() { int i; @@ -1327,7 +1327,7 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode) } /* Copy the result */ - (void)strcpy(desc, res); + strcpy(desc, res); } @@ -1348,7 +1348,7 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode) if ((r_ptr->flags & RF_UNIQUE) && !(p_ptr->image)) { /* Start with the name (thus nominative and objective) */ - (void)strcpy(desc, name); + strcpy(desc, name); } /* It could be an indefinite monster */ @@ -1357,8 +1357,8 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode) /* XXX Check plurality for "some" */ /* Indefinite monsters need an indefinite article */ - (void)strcpy(desc, is_a_vowel(name[0]) ? "an " : "a "); - (void)strcat(desc, name); + strcpy(desc, is_a_vowel(name[0]) ? "an " : "a "); + strcat(desc, name); } /* It could be a normal, definite, monster */ @@ -1366,11 +1366,11 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode) { /* Definite monsters need a definite article */ if (m_ptr->status >= MSTATUS_PET) - (void)strcpy(desc, "your "); + strcpy(desc, "your "); else - (void)strcpy(desc, "the "); + strcpy(desc, "the "); - (void)strcat(desc, name); + strcat(desc, name); } /* Handle the Possessive as a special afterthought */ @@ -1379,7 +1379,7 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode) /* XXX Check for trailing "s" */ /* Simply append "apostrophe" and "s" */ - (void)strcat(desc, "'s"); + strcat(desc, "'s"); } } } @@ -1414,16 +1414,16 @@ void monster_race_desc(char *desc, int r_idx, int ego) if (r_ptr->flags & RF_UNIQUE) { /* Start with the name (thus nominative and objective) */ - (void)strcpy(desc, name); + strcpy(desc, name); } /* It could be a normal, definite, monster */ else { /* Definite monsters need a definite article */ - (void)strcpy(desc, is_a_vowel(name[0]) ? "an " : "a "); + strcpy(desc, is_a_vowel(name[0]) ? "an " : "a "); - (void)strcat(desc, name); + strcat(desc, name); } } @@ -1510,11 +1510,11 @@ static void sanity_blast(monster_type * m_ptr, bool_ necro) { if (!p_ptr->resist_conf) { - (void)set_confused(p_ptr->confused + rand_int(4) + 4); + set_confused(p_ptr->confused + rand_int(4) + 4); } if ((!p_ptr->resist_chaos) && (randint(3) == 1)) { - (void) set_image(p_ptr->image + rand_int(250) + 150); + set_image(p_ptr->image + rand_int(250) + 150); } return; } @@ -1531,19 +1531,19 @@ static void sanity_blast(monster_type * m_ptr, bool_ necro) { if (!p_ptr->resist_conf) { - (void)set_confused(p_ptr->confused + rand_int(4) + 4); + set_confused(p_ptr->confused + rand_int(4) + 4); } if (!p_ptr->free_act) { - (void)set_paralyzed(rand_int(4) + 4); + set_paralyzed(rand_int(4) + 4); } while (rand_int(100) > p_ptr->skill_sav) - (void)do_dec_stat(A_INT, STAT_DEC_NORMAL); + do_dec_stat(A_INT, STAT_DEC_NORMAL); while (rand_int(100) > p_ptr->skill_sav) - (void)do_dec_stat(A_WIS, STAT_DEC_NORMAL); + do_dec_stat(A_WIS, STAT_DEC_NORMAL); if (!p_ptr->resist_chaos) { - (void) set_image(p_ptr->image + rand_int(250) + 150); + set_image(p_ptr->image + rand_int(250) + 150); } return; } @@ -2689,7 +2689,7 @@ bool_ place_monster_aux(int y, int x, int r_idx, bool_ slp, bool_ grp, int statu if (r_ptr->flags & RF_FRIENDS) { /* Attempt to place a group */ - (void)place_monster_group(y, x, r_idx, slp, status); + place_monster_group(y, x, r_idx, slp, status); } @@ -2743,7 +2743,7 @@ bool_ place_monster_aux(int y, int x, int r_idx, bool_ slp, bool_ grp, int statu (r_ptr->flags & RF_ESCORTS)) { /* Place a group of monsters */ - (void)place_monster_group(ny, nx, z, slp, status); + place_monster_group(ny, nx, z, slp, status); } } @@ -2847,7 +2847,7 @@ bool_ alloc_horde(int y, int x) for (attempts = randint(10) + 5; attempts; attempts--) { - (void) summon_specific(m_ptr->fy, m_ptr->fx, dun_level, SUMMON_KIN); + summon_specific(m_ptr->fy, m_ptr->fx, dun_level, SUMMON_KIN); } return TRUE; diff --git a/src/monster2.hpp b/src/monster2.hpp index 552331ef..ddd0b6bc 100644 --- a/src/monster2.hpp +++ b/src/monster2.hpp @@ -17,9 +17,9 @@ std::shared_ptr race_info_idx(int r_idx, int ego); void delete_monster_idx(int i); void delete_monster(int y, int x); void compact_monsters(int size); -void wipe_m_list(void); -s16b m_pop(void); -errr get_mon_num_prep(void); +void wipe_m_list(); +s16b m_pop(); +errr get_mon_num_prep(); s16b get_mon_num(int level); void monster_desc(char *desc, monster_type *m_ptr, int mode); void monster_race_desc(char *desc, int r_idx, int ego); @@ -45,6 +45,6 @@ s16b player_place(int y, int x); void monster_drop_carried_objects(monster_type *m_ptr); bool_ monster_dungeon(int r_idx); bool_ monster_quest(int r_idx); -void set_mon_num_hook(void); +void set_mon_num_hook(); void set_mon_num2_hook(int y, int x); bool_ monster_can_cross_terrain(byte feat, std::shared_ptr r_ptr); diff --git a/src/monster3.cc b/src/monster3.cc index 9a7921a7..6dd1f74e 100644 --- a/src/monster3.cc +++ b/src/monster3.cc @@ -307,7 +307,7 @@ void ai_deincarnate(int m_idx) } /* Returns if a new companion is allowed */ -bool_ can_create_companion(void) +bool_ can_create_companion() { int i, mcnt = 0; @@ -328,7 +328,7 @@ bool_ can_create_companion(void) /* Player controlled monsters */ -bool_ do_control_walk(void) +bool_ do_control_walk() { /* Get a "repeated" direction */ if (p_ptr->control) @@ -349,18 +349,18 @@ bool_ do_control_walk(void) return FALSE; } -bool_ do_control_inven(void) +bool_ do_control_inven() { if (!p_ptr->control) return FALSE; screen_save(); prt("Carried items", 0, 0); - (void) show_monster_inven(p_ptr->control); + show_monster_inven(p_ptr->control); inkey(); screen_load(); return TRUE; } -bool_ do_control_pickup(void) +bool_ do_control_pickup() { if (!p_ptr->control) return FALSE; @@ -411,7 +411,7 @@ bool_ do_control_pickup(void) return TRUE; } -bool_ do_control_drop(void) +bool_ do_control_drop() { monster_type *m_ptr = &m_list[p_ptr->control]; @@ -420,7 +420,7 @@ bool_ do_control_drop(void) return TRUE; } -bool_ do_control_magic(void) +bool_ do_control_magic() { auto const &r_info = game->edit_data.r_info; diff --git a/src/monster3.hpp b/src/monster3.hpp index 2ad6ba30..ac26b102 100644 --- a/src/monster3.hpp +++ b/src/monster3.hpp @@ -4,14 +4,14 @@ #include "monster_type_fwd.hpp" void dump_companions(FILE *outfile); -void do_cmd_companion(void); -bool_ do_control_reconnect(void); -bool_ do_control_drop(void); -bool_ do_control_magic(void); -bool_ do_control_pickup(void); -bool_ do_control_inven(void); -bool_ do_control_walk(void); -bool_ can_create_companion(void); +void do_cmd_companion(); +bool_ do_control_reconnect(); +bool_ do_control_drop(); +bool_ do_control_magic(); +bool_ do_control_pickup(); +bool_ do_control_inven(); +bool_ do_control_walk(); +bool_ can_create_companion(); void ai_deincarnate(int m_idx); bool_ ai_possessor(int m_idx, int o_idx); bool_ ai_multiply(int m_idx); diff --git a/src/notes.cc b/src/notes.cc index 33c6bf76..17990992 100644 --- a/src/notes.cc +++ b/src/notes.cc @@ -21,14 +21,14 @@ /* * Show the notes file on the screen */ -void show_notes_file(void) +void show_notes_file() { char basename[13]; char buf[1024]; char caption[10 + 13]; /* Hack -- extract first 8 characters of name and append an extension */ - (void)strnfmt(basename, sizeof(basename), "%.8s.nte", game->player_base.c_str()); + strnfmt(basename, sizeof(basename), "%.8s.nte", game->player_base.c_str()); basename[sizeof(basename) - 1] = '\0'; /* Build the path */ @@ -55,7 +55,7 @@ void output_note(const char *final_note) char buf[1024]; /* Hack -- extract first 8 characters of name and append an extension */ - (void)strnfmt(basename, sizeof(basename), "%.8s.nte", game->player_base.c_str()); + strnfmt(basename, sizeof(basename), "%.8s.nte", game->player_base.c_str()); basename[sizeof(basename) - 1] = '\0'; /* Build the path */ diff --git a/src/notes.hpp b/src/notes.hpp index 05514635..5c182858 100644 --- a/src/notes.hpp +++ b/src/notes.hpp @@ -1,6 +1,6 @@ #pragma once -void show_notes_file(void); +void show_notes_file(); void output_note(char const *final_note); void add_note(char *note, char code); void add_note_type(int note_number); diff --git a/src/object1.cc b/src/object1.cc index 8d2a2bb0..d10f3042 100644 --- a/src/object1.cc +++ b/src/object1.cc @@ -496,7 +496,7 @@ static void shuffle_flavors(cptr adj[], byte col[]) * * Note that the "hacked seed" may provide an RNG with alternating parity! */ -void flavor_init(void) +void flavor_init() { auto &k_info = game->edit_data.k_info; @@ -627,7 +627,7 @@ void flavor_init(void) * * The "prefs" parameter is no longer meaningful. XXX XXX XXX */ -void reset_visuals(void) +void reset_visuals() { auto &st_info = game->edit_data.st_info; auto &race_mod_info = game->edit_data.race_mod_info; @@ -3908,7 +3908,7 @@ static void show_inven_aux(bool_ mirror, object_filter_t const &filter); /* * Choice window "shadow" of the "show_inven()" function */ -void display_inven(void) +void display_inven() { show_inven_aux(TRUE, object_filter::True()); } @@ -3918,7 +3918,7 @@ void display_inven(void) /* * Choice window "shadow" of the "show_equip()" function */ -void display_equip(void) +void display_equip() { show_equip_aux(TRUE, object_filter::True()); } @@ -4018,7 +4018,7 @@ void show_inven_aux(bool_ mirror, const object_filter_t &filter) /* Save the object color, and description */ out_color[k] = tval_to_attr[o_ptr->tval % 128]; - (void)strcpy(out_desc[k], o_name); + strcpy(out_desc[k], o_name); /* Find the predicted "line length" */ l = strlen(out_desc[k]) + 5; @@ -4211,7 +4211,7 @@ void show_equip_aux(bool_ mirror, object_filter_t const &filter) /* Save the color */ out_color[k] = TERM_L_RED; - (void)strcpy(out_desc[k], o_name); + strcpy(out_desc[k], o_name); continue; } } @@ -4231,7 +4231,7 @@ void show_equip_aux(bool_ mirror, object_filter_t const &filter) /* Save the color */ out_color[k] = TERM_L_BLUE; - (void)strcpy(out_desc[k], o_name); + strcpy(out_desc[k], o_name); } else { @@ -4256,7 +4256,7 @@ void show_equip_aux(bool_ mirror, object_filter_t const &filter) /* Save the color */ out_color[k] = tval_to_attr[o_ptr->tval % 128]; - (void)strcpy(out_desc[k], o_name); + strcpy(out_desc[k], o_name); } /* Extract the maximal length (see below) */ @@ -4318,7 +4318,7 @@ void show_equip_aux(bool_ mirror, object_filter_t const &filter) /* Use labels */ { /* Mention the use */ - (void)sprintf(tmp_val, "%-14s: ", mention_use(out_rindex[j])); + sprintf(tmp_val, "%-14s: ", mention_use(out_rindex[j])); put_str(tmp_val, row + j, col + 5); /* Display the entry itself */ @@ -4361,7 +4361,7 @@ void show_equip_aux(bool_ mirror, object_filter_t const &filter) /* * Flip "inven" and "equip" in any sub-windows */ -void toggle_inven_equip(void) +void toggle_inven_equip() { int j; @@ -4417,7 +4417,7 @@ bool_ verify(cptr prompt, int item) object_desc(o_name, o_ptr, TRUE, 3); /* Prompt */ - (void)sprintf(out_val, "%s %s? ", prompt, o_name); + sprintf(out_val, "%s %s? ", prompt, o_name); /* Query */ return (get_check(out_val)); diff --git a/src/object1.hpp b/src/object1.hpp index 2701d1bb..8b9d6dc9 100644 --- a/src/object1.hpp +++ b/src/object1.hpp @@ -15,8 +15,8 @@ void apply_set(s16b a_idx, s16b set_idx); bool_ takeoff_set(s16b a_idx, s16b set_idx); bool_ wield_set(s16b a_idx, s16b set_idx, bool_ silent); bool_ verify(cptr prompt, int item); -void flavor_init(void); -void reset_visuals(void); +void flavor_init(); +void reset_visuals(); int object_power(object_type *o_ptr); extern bool_ object_flags_no_set; object_flag_set object_flags(object_type const *o_ptr); @@ -30,11 +30,11 @@ char index_to_label(int i); s16b wield_slot_ideal(object_type const *o_ptr, bool_ ideal); s16b wield_slot(object_type const *o_ptr); cptr describe_use(int i); -void display_inven(void); -void display_equip(void); +void display_inven(); +void display_equip(); void show_inven_full(); void show_equip_full(); -void toggle_inven_equip(void); +void toggle_inven_equip(); bool_ get_item(int *cp, cptr pmt, cptr str, int mode, object_filter_t const &filter = object_filter::True(), select_by_name_t const &select_by_name = select_by_name_t()); cptr item_activation(object_type *o_ptr); void py_pickup_floor(int pickup); diff --git a/src/object2.cc b/src/object2.cc index 51fdcb95..a9f0f7ce 100644 --- a/src/object2.cc +++ b/src/object2.cc @@ -54,7 +54,7 @@ /* * Calculate the player's total inventory weight. */ -s32b calc_total_weight(void) +s32b calc_total_weight() { int i; s32b total; @@ -376,7 +376,7 @@ void compact_objects(int size) * clear those fields for grids/monsters containing objects, * and we clear it once for every such object. */ -void wipe_o_list(void) +void wipe_o_list() { auto &k_info = game->edit_data.k_info; auto &a_info = game->edit_data.a_info; @@ -457,7 +457,7 @@ void wipe_o_list(void) * This routine should almost never fail, but in case it does, * we must be sure to handle "failure" of this routine. */ -s16b o_pop(void) +s16b o_pop() { int i; @@ -510,7 +510,7 @@ s16b o_pop(void) /* * Apply a "object restriction function" to the "object allocation table" */ -errr get_obj_num_prep(void) +errr get_obj_num_prep() { int i; @@ -5973,7 +5973,7 @@ void inven_drop(int item, int amt, int dy, int dx, bool_ silent) * * Note special handling of the "overflow" slot */ -void combine_pack(void) +void combine_pack() { int i, j, k; object_type *o_ptr; @@ -6040,7 +6040,7 @@ void combine_pack(void) * * Note special handling of the "overflow" slot */ -void reorder_pack(void) +void reorder_pack() { int i, j, k; s32b o_value; diff --git a/src/object2.hpp b/src/object2.hpp index 8444f408..a91631aa 100644 --- a/src/object2.hpp +++ b/src/object2.hpp @@ -13,7 +13,7 @@ typedef enum { DESCRIBE, NO_DESCRIBE } describe_flag; void inc_stack_size(int item, int delta); void inc_stack_size_ex(int item, int delta, optimize_flag opt, describe_flag desc); object_type *get_object(int item); -s32b calc_total_weight(void); +s32b calc_total_weight(); void add_random_ego_flag(object_type *o_ptr, ego_flag_set const &fego, bool_ *limit_blows); bool init_match_theme(obj_theme const &theme); bool_ kind_is_artifactable(int k_idx); @@ -34,9 +34,9 @@ void excise_object_idx(int o_idx); void delete_object_idx(int o_idx); void delete_object(int y, int x); void compact_objects(int size); -void wipe_o_list(void); -s16b o_pop(void); -errr get_obj_num_prep(void); +void wipe_o_list(); +s16b o_pop(); +errr get_obj_num_prep(); s16b get_obj_num(int level); void object_known(object_type *o_ptr); bool object_known_p(object_type const *o_ptr); @@ -59,8 +59,8 @@ bool_ make_gold(object_type *j_ptr); void place_gold(int y, int x); s16b drop_near(object_type *o_ptr, int chance, int y, int x); void acquirement(int y1, int x1, int num, bool_ great, bool_ known); -void combine_pack(void); -void reorder_pack(void); +void combine_pack(); +void reorder_pack(); void random_artifact_resistance(object_type * o_ptr); s16b floor_carry(int y, int x, object_type *j_ptr); void pack_decay(int item); diff --git a/src/powers.cc b/src/powers.cc index 5d26b7dd..f3ffe668 100644 --- a/src/powers.cc +++ b/src/powers.cc @@ -235,17 +235,17 @@ static void power_activate(int power) case PWR_UNFEAR: { msg_print("You play tough."); - (void)set_afraid(0); + set_afraid(0); } break; case PWR_BERSERK: { msg_print("RAAAGH!"); - (void)set_afraid(0); + set_afraid(0); - (void)set_shero(p_ptr->shero + 10 + randint(plev)); - (void)hp_player(30); + set_shero(p_ptr->shero + 10 + randint(plev)); + hp_player(30); } break; @@ -260,7 +260,7 @@ static void power_activate(int power) { if (!get_aim_dir(&dir)) break; msg_print("You bash at a stone wall."); - (void)wall_to_mud(dir); + wall_to_mud(dir); } break; @@ -311,7 +311,7 @@ static void power_activate(int power) x_ptr_foo.diff = 7; if (power_chance(&x_ptr_foo)) { - (void)set_light_speed(p_ptr->lightspeed + 3); + set_light_speed(p_ptr->lightspeed + 3); } } break; @@ -328,8 +328,8 @@ static void power_activate(int power) case PWR_DETECT_TD: { msg_print("You examine your surroundings."); - (void)detect_doors(DEFAULT_RADIUS); - (void)detect_stairs(DEFAULT_RADIUS); + detect_doors(DEFAULT_RADIUS); + detect_stairs(DEFAULT_RADIUS); } break; @@ -510,7 +510,7 @@ static void power_activate(int power) { if (p_ptr->food < PY_FOOD_FULL) /* No heal if we are "full" */ - (void)hp_player(dummy); + hp_player(dummy); else msg_print("You were not hungry."); /* Gain nutritional sustenance: 150/hp drained */ @@ -519,7 +519,7 @@ static void power_activate(int power) /* But if we ARE Gorged, it won't cure us */ dummy = p_ptr->food + MIN(5000, 100 * dummy); if (p_ptr->food < PY_FOOD_MAX) /* Not gorged already */ - (void)set_food(dummy >= PY_FOOD_MAX ? PY_FOOD_MAX - 1 : dummy); + set_food(dummy >= PY_FOOD_MAX ? PY_FOOD_MAX - 1 : dummy); } else msg_print("Yechh. That tastes foul."); @@ -530,14 +530,14 @@ static void power_activate(int power) { msg_print("You emit an eldritch howl!"); if (!get_aim_dir(&dir)) break; - (void)fear_monster(dir, plev); + fear_monster(dir, plev); } break; case PWR_REST_LIFE: { msg_print("You attempt to restore your lost energies."); - (void)restore_level(); + restore_level(); } break; @@ -653,7 +653,7 @@ static void power_activate(int power) { msg_print("Your eyes look mesmerising..."); if (get_aim_dir(&dir)) - (void) charm_monster(dir, p_ptr->lev); + charm_monster(dir, p_ptr->lev); } break; @@ -689,13 +689,13 @@ static void power_activate(int power) case PWR_SMELL_MET: { - (void)detect_treasure(DEFAULT_RADIUS); + detect_treasure(DEFAULT_RADIUS); } break; case PWR_SMELL_MON: { - (void)detect_monsters_normal(DEFAULT_RADIUS); + detect_monsters_normal(DEFAULT_RADIUS); } break; @@ -739,25 +739,25 @@ static void power_activate(int power) if ((c_ptr->feat >= FEAT_DOOR_HEAD) && (c_ptr->feat <= FEAT_RUBBLE)) { - (void)set_food(p_ptr->food + 3000); + set_food(p_ptr->food + 3000); } else if ((c_ptr->feat >= FEAT_MAGMA) && (c_ptr->feat <= FEAT_QUARTZ_K)) { - (void)set_food(p_ptr->food + 5000); + set_food(p_ptr->food + 5000); } else if ((c_ptr->feat >= FEAT_SANDWALL) && (c_ptr->feat <= FEAT_SANDWALL_K)) { - (void)set_food(p_ptr->food + 500); + set_food(p_ptr->food + 500); } else { msg_print("This granite is very filling!"); - (void)set_food(p_ptr->food + 10000); + set_food(p_ptr->food + 10000); } } - (void)wall_to_mud(dir); + wall_to_mud(dir); oy = p_ptr->py; ox = p_ptr->px; @@ -779,20 +779,20 @@ static void power_activate(int power) case PWR_SWAP_POS: { if (!get_aim_dir(&dir)) return; - (void)teleport_swap(dir); + teleport_swap(dir); } break; case PWR_SHRIEK: { - (void)fire_ball(GF_SOUND, 0, 4 * p_ptr->lev, 8); - (void)aggravate_monsters(0); + fire_ball(GF_SOUND, 0, 4 * p_ptr->lev, 8); + aggravate_monsters(0); } break; case PWR_ILLUMINE: { - (void)lite_area(damroll(2, (p_ptr->lev / 2)), (p_ptr->lev / 10) + 1); + lite_area(damroll(2, (p_ptr->lev / 2)), (p_ptr->lev / 10) + 1); } break; @@ -820,7 +820,7 @@ static void power_activate(int power) case PWR_MIDAS_TCH: { - (void)alchemy(); + alchemy(); } break; @@ -841,27 +841,27 @@ static void power_activate(int power) if (rand_int(5) < num) { - (void)set_oppose_acid(p_ptr->oppose_acid + dur); + set_oppose_acid(p_ptr->oppose_acid + dur); num--; } if (rand_int(4) < num) { - (void)set_oppose_elec(p_ptr->oppose_elec + dur); + set_oppose_elec(p_ptr->oppose_elec + dur); num--; } if (rand_int(3) < num) { - (void)set_oppose_fire(p_ptr->oppose_fire + dur); + set_oppose_fire(p_ptr->oppose_fire + dur); num--; } if (rand_int(2) < num) { - (void)set_oppose_cold(p_ptr->oppose_cold + dur); + set_oppose_cold(p_ptr->oppose_cold + dur); num--; } if (num) { - (void)set_oppose_pois(p_ptr->oppose_pois + dur); + set_oppose_pois(p_ptr->oppose_pois + dur); num--; } } diff --git a/src/q_betwen.cc b/src/q_betwen.cc index ac4b665e..8deb6667 100644 --- a/src/q_betwen.cc +++ b/src/q_betwen.cc @@ -129,7 +129,7 @@ static bool_ quest_between_finish_hook(void *, void *in_, void *) object_known(q_ptr); q_ptr->discount = 100; q_ptr->ident |= IDENT_STOREB; - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); /* Continue the plot */ *(quest[q_idx].plot) = QUEST_NULL; diff --git a/src/q_eol.cc b/src/q_eol.cc index 24825da3..ae1cd96a 100644 --- a/src/q_eol.cc +++ b/src/q_eol.cc @@ -125,7 +125,7 @@ static bool_ quest_eol_finish_hook(void *, void *in_, void *) object_aware(q_ptr); object_known(q_ptr); q_ptr->ident |= IDENT_STOREB; - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); /* Continue the plot */ *(quest[q_idx].plot) = QUEST_NIRNAETH; diff --git a/src/q_hobbit.cc b/src/q_hobbit.cc index c32510ec..04cd3064 100644 --- a/src/q_hobbit.cc +++ b/src/q_hobbit.cc @@ -168,7 +168,7 @@ static bool_ quest_hobbit_chat_hook(void *, void *in_, void *) object_aware(q_ptr); object_known(q_ptr); q_ptr->ident |= IDENT_STOREB; - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); cquest.status = QUEST_STATUS_FINISHED; diff --git a/src/q_nazgul.cc b/src/q_nazgul.cc index 119c39d9..a59a8df3 100644 --- a/src/q_nazgul.cc +++ b/src/q_nazgul.cc @@ -76,7 +76,7 @@ static bool_ quest_nazgul_finish_hook(void *, void *in_, void *) object_aware(q_ptr); object_known(q_ptr); q_ptr->ident |= IDENT_STOREB; - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); /* End the plot */ *(quest[q_idx].plot) = QUEST_NULL; diff --git a/src/q_poison.cc b/src/q_poison.cc index 24d0320c..c1a637e9 100644 --- a/src/q_poison.cc +++ b/src/q_poison.cc @@ -143,7 +143,7 @@ static bool_ quest_poison_finish_hook(void *, void *in_, void *) object_aware(q_ptr); object_known(q_ptr); q_ptr->ident |= IDENT_STOREB; - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); /* Continue the plot */ *(quest[q_idx].plot) = QUEST_NULL; @@ -182,7 +182,7 @@ static bool_ quest_poison_quest_hook(void *, void *in_, void *) q_ptr->ident |= IDENT_STOREB; q_ptr->inscription = "quest"; - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); del_hook_new(HOOK_INIT_QUEST, quest_poison_quest_hook); process_hooks_restart = TRUE; diff --git a/src/q_shroom.cc b/src/q_shroom.cc index ee5f9d1f..8834e0f7 100644 --- a/src/q_shroom.cc +++ b/src/q_shroom.cc @@ -199,7 +199,7 @@ static bool_ quest_shroom_give_hook(void *, void *in_, void *) object_known(q_ptr); q_ptr->discount = 100; q_ptr->ident |= IDENT_STOREB; - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); delete_monster_idx(m_idx); diff --git a/src/q_spider.cc b/src/q_spider.cc index 9fcf37c3..a39c60d5 100644 --- a/src/q_spider.cc +++ b/src/q_spider.cc @@ -103,7 +103,7 @@ static bool_ quest_spider_finish_hook(void *, void *in_, void *) object_aware(q_ptr); object_known(q_ptr); q_ptr->ident |= IDENT_STOREB; - (void)inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, FALSE); /* Continue the plot */ *(quest[q_idx].plot) = QUEST_POISON; diff --git a/src/randart.cc b/src/randart.cc index 55ffd265..a902d734 100644 --- a/src/randart.cc +++ b/src/randart.cc @@ -174,7 +174,7 @@ void build_prob(cptr learn) * set. Relies on European vowels (a, e, i, o, u). The generated name should * be copied/used before calling this function again. */ -static char *make_word(void) +static char *make_word() { static char word_buf[90]; int r, totalfreq; @@ -391,7 +391,7 @@ bool_ create_artifact(object_type *o_ptr, bool_ a_scroll, bool_ get_name) } -bool_ artifact_scroll(void) +bool_ artifact_scroll() { bool_ okay = FALSE; diff --git a/src/randart.hpp b/src/randart.hpp index 99e4b9b8..6f91f36d 100644 --- a/src/randart.hpp +++ b/src/randart.hpp @@ -5,4 +5,4 @@ void build_prob(cptr learn); bool_ create_artifact(object_type *o_ptr, bool_ a_scroll, bool_ get_name); -bool_ artifact_scroll(void); +bool_ artifact_scroll(); diff --git a/src/skills.hpp b/src/skills.hpp index edb96796..8b1437d9 100644 --- a/src/skills.hpp +++ b/src/skills.hpp @@ -10,19 +10,19 @@ s16b find_skill(cptr name); s16b find_skill_i(cptr name); s16b get_skill(int skill); s16b get_skill_scale(int skill, u32b scale); -void do_cmd_skill(void); -void do_cmd_activate_skill(void); +void do_cmd_skill(); +void do_cmd_activate_skill(); cptr get_melee_name(); -s16b get_melee_skills(void); -s16b get_melee_skill(void); -bool_ forbid_gloves(void); -bool_ forbid_non_blessed(void); +s16b get_melee_skills(); +s16b get_melee_skill(); +bool_ forbid_gloves(); +bool_ forbid_non_blessed(); void compute_skills(s32b *v, s32b *m, std::size_t i); -void select_default_melee(void); -void do_get_new_skill(void); +void select_default_melee(); +void do_get_new_skill(); void init_skill(s32b value, s32b mod, std::size_t i); s16b find_ability(cptr name); void dump_abilities(FILE *fff); -void do_cmd_ability(void); +void do_cmd_ability(); void apply_level_abilities(int level); void recalc_skills(bool_ init); diff --git a/src/spells1.cc b/src/spells1.cc index 3c7999d1..4df1a7c6 100644 --- a/src/spells1.cc +++ b/src/spells1.cc @@ -855,7 +855,7 @@ void teleport_player_to(int ny, int nx) /* * Teleport the player one level up or down (random when legal) */ -void teleport_player_level(void) +void teleport_player_level() { /* No effect in arena or quest */ if (p_ptr->inside_quest) @@ -1329,7 +1329,7 @@ void take_hit(int damage, cptr hit_from) } else { - (void)get_rnd_line("death.txt", death_message); + get_rnd_line("death.txt", death_message); cmsg_print(TERM_RED, death_message); } @@ -1505,7 +1505,7 @@ void take_sanity_hit(int damage, cptr hit_from) } else { - (void)get_rnd_line("death.txt", death_message); + get_rnd_line("death.txt", death_message); cmsg_print(TERM_RED, death_message); } @@ -1828,7 +1828,7 @@ static int inven_damage(inven_func typ, int perc) /* Potions smash open */ if (k_info[o_ptr->k_idx].tval == TV_POTION) { - (void)potion_smash_effect(0, p_ptr->py, p_ptr->px, o_ptr->sval); + potion_smash_effect(0, p_ptr->py, p_ptr->px, o_ptr->sval); } /* @@ -1865,7 +1865,7 @@ static int inven_damage(inven_func typ, int perc) * * If any armor is damaged (or resists), the player takes less damage. */ -static int minus_ac(void) +static int minus_ac() { object_type *o_ptr = NULL; @@ -1949,7 +1949,7 @@ void acid_dam(int dam, cptr kb_str) if ((!(p_ptr->oppose_acid || p_ptr->resist_acid)) && randint(HURT_CHANCE) == 1) - (void) do_dec_stat(A_CHR, STAT_DEC_NORMAL); + do_dec_stat(A_CHR, STAT_DEC_NORMAL); /* If any armor gets hit, defend the player */ if (minus_ac()) dam = (dam + 1) / 2; @@ -1979,7 +1979,7 @@ void elec_dam(int dam, cptr kb_str) if ((!(p_ptr->oppose_elec || p_ptr->resist_elec)) && randint(HURT_CHANCE) == 1) - (void) do_dec_stat(A_DEX, STAT_DEC_NORMAL); + do_dec_stat(A_DEX, STAT_DEC_NORMAL); /* Take damage */ take_hit(dam, kb_str); @@ -2009,7 +2009,7 @@ void fire_dam(int dam, cptr kb_str) if ((!(p_ptr->oppose_fire || p_ptr->resist_fire)) && randint(HURT_CHANCE) == 1) - (void) do_dec_stat(A_STR, STAT_DEC_NORMAL); + do_dec_stat(A_STR, STAT_DEC_NORMAL); /* Take damage */ @@ -2037,7 +2037,7 @@ void cold_dam(int dam, cptr kb_str) if ((!(p_ptr->oppose_cold || p_ptr->resist_cold)) && randint(HURT_CHANCE) == 1) - (void) do_dec_stat(A_STR, STAT_DEC_NORMAL); + do_dec_stat(A_STR, STAT_DEC_NORMAL); /* Take damage */ take_hit(dam, kb_str); @@ -2356,7 +2356,7 @@ bool_ apply_disenchant(int mode) } -void corrupt_player(void) +void corrupt_player() { int max1, cur1, max2, cur2, ii, jj; @@ -3692,7 +3692,7 @@ static bool_ project_f(int who, int r, int y, int x, int dam, int typ) if (!p_ptr->resist_blind && !p_ptr->resist_lite) { /* Become blind */ - (void)set_blind(p_ptr->blind + 10 + randint(10)); + set_blind(p_ptr->blind + 10 + randint(10)); } } @@ -4080,7 +4080,7 @@ static bool_ project_o(int who, int r, int y, int x, int dam, int typ) /* Potions produce effects when 'shattered' */ if (is_potion) { - (void)potion_smash_effect(who, y, x, o_sval); + potion_smash_effect(who, y, x, o_sval); } @@ -5126,7 +5126,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ) } default: if (!p_ptr->free_act) - (void)set_paralyzed(randint(dam)); + set_paralyzed(randint(dam)); break; } } @@ -7069,7 +7069,7 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad if (!p_ptr->resist_sound) { int k = (randint((dam > 40) ? 35 : (dam * 3 / 4 + 5))); - (void)set_stun(p_ptr->stun + k); + set_stun(p_ptr->stun + k); } if (!(p_ptr->resist_fire || @@ -7154,11 +7154,11 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad } if (!p_ptr->resist_conf) { - (void)set_confused(p_ptr->confused + rand_int(20) + 10); + set_confused(p_ptr->confused + rand_int(20) + 10); } if (!p_ptr->resist_chaos) { - (void)set_image(p_ptr->image + randint(10)); + set_image(p_ptr->image + randint(10)); } if (!p_ptr->resist_neth && !p_ptr->resist_chaos) { @@ -7197,7 +7197,7 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad } else { - (void)set_cut(p_ptr->cut + dam); + set_cut(p_ptr->cut + dam); } if ((!p_ptr->resist_shard) || (randint(13) == 1)) @@ -7221,7 +7221,7 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad else { int k = (randint((dam > 90) ? 35 : (dam / 3 + 5))); - (void)set_stun(p_ptr->stun + k); + set_stun(p_ptr->stun + k); } if ((!p_ptr->resist_sound) || (randint(13) == 1)) @@ -7244,7 +7244,7 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad } if (!p_ptr->resist_conf) { - (void)set_confused(p_ptr->confused + randint(20) + 10); + set_confused(p_ptr->confused + randint(20) + 10); } take_hit(dam, killer); break; @@ -7261,7 +7261,7 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad } else { - (void)apply_disenchant(0); + apply_disenchant(0); } take_hit(dam, killer); break; @@ -7290,7 +7290,7 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad if (fuzzy) msg_print("You are hit by kinetic force!"); if (!p_ptr->resist_sound) { - (void)set_stun(p_ptr->stun + randint(20)); + set_stun(p_ptr->stun + randint(20)); /* * If fired by player, try pushing monster. * First get vector from player to monster. @@ -7380,7 +7380,7 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad if (fuzzy) msg_print("There is an explosion!"); if (!p_ptr->resist_sound) { - (void)set_stun(p_ptr->stun + randint(20)); + set_stun(p_ptr->stun + randint(20)); } if (p_ptr->resist_shard) { @@ -7388,7 +7388,7 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad } else { - (void)set_cut(p_ptr-> cut + ( dam / 2) ); + set_cut(p_ptr-> cut + ( dam / 2) ); } if ((!p_ptr->resist_shard) || (randint(12) == 1)) @@ -7404,7 +7404,7 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad case GF_INERTIA: { if (fuzzy) msg_print("You are hit by something slow!"); - (void)set_slow(p_ptr->slow + rand_int(4) + 4); + set_slow(p_ptr->slow + rand_int(4) + 4); take_hit(dam, killer); break; } @@ -7420,7 +7420,7 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad } else if (!blind && !p_ptr->resist_blind) { - (void)set_blind(p_ptr->blind + randint(5) + 2); + set_blind(p_ptr->blind + randint(5) + 2); } if (p_ptr->sensible_lite) { @@ -7455,7 +7455,7 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad } else if (!blind && !p_ptr->resist_blind) { - (void)set_blind(p_ptr->blind + randint(5) + 2); + set_blind(p_ptr->blind + randint(5) + 2); } if (p_ptr->wraith_form) hp_player(dam); else take_hit(dam, killer); @@ -7556,11 +7556,11 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad teleport_player(5); if (!p_ptr->ffall) - (void)set_slow(p_ptr->slow + rand_int(4) + 4); + set_slow(p_ptr->slow + rand_int(4) + 4); if (!(p_ptr->resist_sound || p_ptr->ffall)) { int k = (randint((dam > 90) ? 35 : (dam / 3 + 5))); - (void)set_stun(p_ptr->stun + k); + set_stun(p_ptr->stun + k); } if (p_ptr->ffall) { @@ -7587,7 +7587,7 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad case GF_OLD_HEAL: { if (fuzzy) msg_print("You are hit by something invigorating!"); - (void)hp_player(dam); + hp_player(dam); dam = 0; break; } @@ -7595,7 +7595,7 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad case GF_OLD_SPEED: { if (fuzzy) msg_print("You are hit by something!"); - (void)set_fast(p_ptr->fast + randint(5), 10); + set_fast(p_ptr->fast + randint(5), 10); dam = 0; break; } @@ -7603,7 +7603,7 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad case GF_OLD_SLOW: { if (fuzzy) msg_print("You are hit by something slow!"); - (void)set_slow(p_ptr->slow + rand_int(4) + 4); + set_slow(p_ptr->slow + rand_int(4) + 4); break; } @@ -7645,11 +7645,11 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad cold_dam(dam, killer); if (!p_ptr->resist_shard) { - (void)set_cut(p_ptr->cut + damroll(5, 8)); + set_cut(p_ptr->cut + damroll(5, 8)); } if (!p_ptr->resist_sound) { - (void)set_stun(p_ptr->stun + randint(15)); + set_stun(p_ptr->stun + randint(15)); } if ((!(p_ptr->resist_cold || p_ptr->oppose_cold)) || (randint(12) == 1)) @@ -8601,12 +8601,12 @@ bool_ potion_smash_effect(int who, int y, int x, int o_sval) ; } - (void) project(who, radius, y, x, dam, dt, + project(who, radius, y, x, dam, dt, (PROJECT_JUMP | PROJECT_ITEM | PROJECT_KILL)); // Silence warning. We may want to introuce an actual implementation // and I want to preserve the original "ident" values if we do so. - (void) ident; + ident; /* XXX those potions that explode need to become "known" */ return angry; diff --git a/src/spells1.hpp b/src/spells1.hpp index 9760c5e9..ec8f2cc9 100644 --- a/src/spells1.hpp +++ b/src/spells1.hpp @@ -14,7 +14,7 @@ void teleport_away(int m_idx, int dis); void teleport_player(int dis); void teleport_player_to(int ny, int nx); void teleport_monster_to(int m_idx, int ny, int nx); -void teleport_player_level(void); +void teleport_player_level(); void recall_player(int d, int f); void take_hit(int damage, cptr kb_str); void take_sanity_hit(int damage, cptr hit_from); @@ -28,8 +28,8 @@ bool_ apply_disenchant(int mode); bool_ project_m(int who, int r, int y, int x, int dam, int typ); bool_ project(int who, int rad, int y, int x, int dam, int typ, int flg); bool_ potion_smash_effect(int who, int y, int x, int o_sval); -void do_poly_self(void); -void corrupt_player(void); +void do_poly_self(); +void corrupt_player(); std::string name_spell(random_spell const *); void generate_spell(int plev); s16b do_poly_monster(int y, int x); diff --git a/src/spells2.cc b/src/spells2.cc index e0f0512e..c0d435ea 100644 --- a/src/spells2.cc +++ b/src/spells2.cc @@ -205,7 +205,7 @@ bool_ hp_player(int num) /* * Leave a "glyph of warding" which prevents monster movement */ -void warding_glyph(void) +void warding_glyph() { /* XXX XXX XXX */ if (!cave_clean_bold(p_ptr->py, p_ptr->px)) @@ -218,7 +218,7 @@ void warding_glyph(void) cave_set_feat(p_ptr->py, p_ptr->px, FEAT_GLYPH); } -void explosive_rune(void) +void explosive_rune() { /* XXX XXX XXX */ if (!cave_clean_bold(p_ptr->py, p_ptr->px)) @@ -476,7 +476,7 @@ void identify_hooks(int i, object_type *o_ptr, identify_mode mode) * Identify everything being carried. * Done by a potion of "self knowledge". */ -bool_ identify_pack(void) +bool_ identify_pack() { int i; @@ -518,7 +518,7 @@ static void make_item_fully_identified(object_type *o_ptr) * Identify everything being carried. * Done by a potion of "self knowledge". */ -void identify_pack_fully(void) +void identify_pack_fully() { int i; @@ -641,7 +641,7 @@ static int remove_curse_aux(int all) /* * Remove most curses */ -bool_ remove_curse(void) +bool_ remove_curse() { return (remove_curse_aux(FALSE) ? TRUE : FALSE); } @@ -649,7 +649,7 @@ bool_ remove_curse(void) /* * Remove all curses */ -bool_ remove_all_curse(void) +bool_ remove_all_curse() { return (remove_curse_aux(TRUE) ? TRUE : FALSE); } @@ -659,7 +659,7 @@ bool_ remove_all_curse(void) /* * Restores any drained experience */ -bool_ restore_level(void) +bool_ restore_level() { /* Restore experience */ if (p_ptr->exp < p_ptr->max_exp) @@ -682,7 +682,7 @@ bool_ restore_level(void) } -bool_ alchemy(void) /* Turns an object into gold, gain some of its value in a shop */ +bool_ alchemy() /* Turns an object into gold, gain some of its value in a shop */ { int item, amt = 1; int old_number; @@ -834,7 +834,7 @@ static cptr report_magic_durations[] = }; -void report_magics(void) +void report_magics() { int i = 0, j, k; @@ -981,7 +981,7 @@ void report_magics(void) /* * Forget everything */ -bool_ lose_all_info(void) +bool_ lose_all_info() { int i; @@ -1489,7 +1489,7 @@ bool_ detect_all(int rad) /* * Create stairs at the player location */ -void stair_creation(void) +void stair_creation() { /* XXX XXX XXX */ if (!cave_valid_bold(p_ptr->py, p_ptr->px)) @@ -2181,7 +2181,7 @@ static void note_found_object(object_type *o_ptr) * This routine does *not* automatically combine objects. * Returns TRUE if something was identified, else FALSE. */ -bool_ ident_spell(void) +bool_ ident_spell() { /* Get an item */ int item; @@ -2241,7 +2241,7 @@ bool_ ident_spell(void) /* * Identify all objects in the level */ -bool_ ident_all(void) +bool_ ident_all() { int i; @@ -2281,7 +2281,7 @@ static bool item_tester_hook_no_mental(object_type const *o_ptr) * Fully "identify" an object in the inventory -BEN- * This routine returns TRUE if an item was identified. */ -bool_ identify_fully(void) +bool_ identify_fully() { /* Get an item */ int item; @@ -3186,7 +3186,7 @@ void destroy_area(int y1, int x1, int r) if (!p_ptr->resist_blind && !p_ptr->resist_lite) { /* Become blind */ - (void)set_blind(p_ptr->blind + 10 + randint(10)); + set_blind(p_ptr->blind + 10 + randint(10)); } } @@ -3361,14 +3361,14 @@ void earthquake(int cy, int cx, int r) { msg_print("You are bashed by rubble!"); damage = damroll(10, 4); - (void)set_stun(p_ptr->stun + randint(50)); + set_stun(p_ptr->stun + randint(50)); break; } case 3: { msg_print("You are crushed between the floor and ceiling!"); damage = damroll(10, 4); - (void)set_stun(p_ptr->stun + randint(50)); + set_stun(p_ptr->stun + randint(50)); break; } } @@ -3625,7 +3625,7 @@ void earthquake(int cy, int cx, int r) * NORMAL monsters wake up 1/4 the time when illuminated * STUPID monsters wake up 1/10 the time when illuminated */ -static void cave_temp_room_lite(void) +static void cave_temp_room_lite() { int i; @@ -3719,7 +3719,7 @@ static void cave_temp_room_lite(void) * * Also, process all affected monsters */ -static void cave_temp_room_unlite(void) +static void cave_temp_room_unlite() { int i; @@ -3887,7 +3887,7 @@ bool_ lite_area(int dam, int rad) } /* Hook into the "project()" function */ - (void)project(0, rad, p_ptr->py, p_ptr->px, dam, GF_LITE_WEAK, flg); + project(0, rad, p_ptr->py, p_ptr->px, dam, GF_LITE_WEAK, flg); /* Lite up the room */ lite_room(p_ptr->py, p_ptr->px); @@ -3912,7 +3912,7 @@ bool_ unlite_area(int dam, int rad) } /* Hook into the "project()" function */ - (void)project(0, rad, p_ptr->py, p_ptr->px, dam, GF_DARK_WEAK, flg); + project(0, rad, p_ptr->py, p_ptr->px, dam, GF_DARK_WEAK, flg); /* Lite up the room */ unlite_room(p_ptr->py, p_ptr->px); @@ -4369,20 +4369,20 @@ bool_ wall_stone(int y, int x) } -bool_ destroy_doors_touch(void) +bool_ destroy_doors_touch() { int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE; return (project(0, 1, p_ptr->py, p_ptr->px, 0, GF_KILL_DOOR, flg)); } -bool_ sleep_monsters_touch(void) +bool_ sleep_monsters_touch() { int flg = PROJECT_KILL | PROJECT_HIDE; return (project(0, 1, p_ptr->py, p_ptr->px, p_ptr->lev, GF_OLD_SLEEP, flg)); } -void call_chaos(void) +void call_chaos() { int Chaos_type, dummy, dir; int plev = p_ptr->lev; @@ -4431,7 +4431,7 @@ void call_chaos(void) } -static void activate_hi_summon(void) +static void activate_hi_summon() { int i; @@ -4441,57 +4441,57 @@ static void activate_hi_summon(void) { case 1: case 2: - (void) summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_ANT); + summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_ANT); break; case 3: case 4: - (void) summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_SPIDER); + summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_SPIDER); break; case 5: case 6: - (void) summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_HOUND); + summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_HOUND); break; case 7: case 8: - (void) summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_HYDRA); + summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_HYDRA); break; case 9: case 10: - (void) summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_ANGEL); + summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_ANGEL); break; case 11: case 12: - (void) summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_UNDEAD); + summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_UNDEAD); break; case 13: case 14: - (void) summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_DRAGON); + summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_DRAGON); break; case 15: case 16: - (void) summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_DEMON); + summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_DEMON); break; case 17: - (void) summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_WRAITH); + summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_WRAITH); break; case 18: case 19: - (void) summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_UNIQUE); + summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_UNIQUE); break; case 20: case 21: - (void) summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_HI_UNDEAD); + summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_HI_UNDEAD); break; case 22: case 23: - (void) summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_HI_DRAGON); + summon_specific(p_ptr->py, p_ptr->px, dun_level, SUMMON_HI_DRAGON); break; case 24: case 25: - (void) summon_specific(p_ptr->py, p_ptr->px, 100, SUMMON_HI_DEMON); + summon_specific(p_ptr->py, p_ptr->px, 100, SUMMON_HI_DEMON); break; default: - (void) summon_specific(p_ptr->py, p_ptr->px, (((dun_level * 3) / 2) + 5), 0); + summon_specific(p_ptr->py, p_ptr->px, (((dun_level * 3) / 2) + 5), 0); } } } @@ -4502,7 +4502,7 @@ static void activate_hi_summon(void) * rr9: Stop the nasty things when a Cyberdemon is summoned * or the player gets paralyzed. */ -void activate_ty_curse(void) +void activate_ty_curse() { int i = 0; bool_ stop_ty = FALSE; @@ -4524,7 +4524,7 @@ void activate_ty_curse(void) activate_hi_summon(); if (randint(6) != 1) break; case 7: case 8: case 9: case 18: - (void) summon_specific(p_ptr->py, p_ptr->px, dun_level, 0); + summon_specific(p_ptr->py, p_ptr->px, dun_level, 0); if (randint(6) != 1) break; case 10: case 11: case 12: msg_print("You feel your life draining away..."); @@ -4546,7 +4546,7 @@ case 13: case 14: case 15: case 19: case 20: } if (randint(6) != 1) break; case 21: case 22: case 23: - (void)do_dec_stat((randint(6)) - 1, STAT_DEC_NORMAL); + do_dec_stat((randint(6)) - 1, STAT_DEC_NORMAL); if (randint(6) != 1) break; case 24: msg_print("Huh? Who am I? What am I doing here?"); @@ -4567,7 +4567,7 @@ case 21: case 22: case 23: { do { - (void)do_dec_stat(i, STAT_DEC_NORMAL); + do_dec_stat(i, STAT_DEC_NORMAL); } while (randint(2) == 1); @@ -4581,7 +4581,7 @@ case 21: case 22: case 23: /* * Activate the ultra evil Dark God curse */ -void activate_dg_curse(void) +void activate_dg_curse() { int i = 0; bool_ stop_dg = FALSE; @@ -4648,7 +4648,7 @@ void activate_dg_curse(void) case 21: case 22: case 23: - (void)do_dec_stat((randint(6)) - 1, STAT_DEC_PERMANENT); + do_dec_stat((randint(6)) - 1, STAT_DEC_PERMANENT); if (randint(7) != 1) break; case 24: msg_print("Huh? Who am I? What am I doing here?"); @@ -4679,7 +4679,7 @@ case 27: case 28: case 29: { do { - (void)do_dec_stat(i, STAT_DEC_NORMAL); + do_dec_stat(i, STAT_DEC_NORMAL); } while (randint(2) == 1); @@ -4691,14 +4691,14 @@ case 27: case 28: case 29: } -void summon_cyber(void) +void summon_cyber() { int i; int max_cyber = (dun_level / 50) + randint(6); for (i = 0; i < max_cyber; i++) { - (void)summon_specific(p_ptr->py, p_ptr->px, 100, SUMMON_HI_DEMON); + summon_specific(p_ptr->py, p_ptr->px, 100, SUMMON_HI_DEMON); } } @@ -4709,7 +4709,7 @@ static void summon_dragon_riders() for (i = 0; i < max_dr; i++) { - (void)summon_specific(p_ptr->py, p_ptr->px, 100, SUMMON_THUNDERLORD); + summon_specific(p_ptr->py, p_ptr->px, 100, SUMMON_THUNDERLORD); } } @@ -4797,7 +4797,7 @@ bool_ charm_animal(int dir, int plev) return (project_hook(GF_CONTROL_ANIMAL, dir, plev, flg)); } -void change_wild_mode(void) +void change_wild_mode() { if (p_ptr->immovable && !p_ptr->wild_mode) { @@ -4819,7 +4819,7 @@ void change_wild_mode(void) } -void alter_reality(void) +void alter_reality() { msg_print("The world changes!"); diff --git a/src/spells2.hpp b/src/spells2.hpp index 45b3cd7e..0eeb3f5b 100644 --- a/src/spells2.hpp +++ b/src/spells2.hpp @@ -12,18 +12,18 @@ void grow_grass(int rad); void grow_trees(int rad); bool_ hp_player(int num); bool_ heal_insanity(int val); -void warding_glyph(void); -void explosive_rune(void); +void warding_glyph(); +void explosive_rune(); bool_ do_dec_stat(int stat, int mode); bool_ do_res_stat(int stat, bool_ full); bool_ do_inc_stat(int stat); void identify_hooks(int i, object_type *o_ptr, identify_mode type); -bool_ identify_pack(void); -void identify_pack_fully(void); -bool_ remove_curse(void); -bool_ remove_all_curse(void); -bool_ restore_level(void); -bool_ lose_all_info(void); +bool_ identify_pack(); +void identify_pack_fully(); +bool_ remove_curse(); +bool_ remove_all_curse(); +bool_ restore_level(); +bool_ lose_all_info(); bool_ detect_traps(int rad); bool_ detect_doors(int rad); bool_ detect_stairs(int rad); @@ -34,19 +34,19 @@ bool_ detect_monsters_normal(int rad); bool_ detect_monsters_invis(int rad); void detect_monsters_orcs(int rad); bool_ detect_all(int rad); -void stair_creation(void); +void stair_creation(); bool_ wall_stone(int y, int x); bool_ enchant(object_type *o_ptr, int n, int eflag); bool_ enchant_spell(int num_hit, int num_dam, int num_ac, int num_pval); -bool_ ident_spell(void); -bool_ ident_all(void); -bool_ identify_fully(void); +bool_ ident_spell(); +bool_ ident_all(); +bool_ identify_fully(); bool_ recharge(int num); void aggravate_monsters(int who); bool_ genocide_aux(bool_ player_cast, char typ); bool_ genocide(bool_ player_cast); bool_ mass_genocide(bool_ player_cast); -void change_wild_mode(void); +void change_wild_mode(); bool_ banish_evil(int dist); bool_ dispel_evil(int dam); bool_ dispel_good(int dam); @@ -64,7 +64,7 @@ bool_ fire_wall(int typ, int dir, int dam, int time); bool_ fire_ball(int typ, int dir, int dam, int rad); bool_ fire_bolt(int typ, int dir, int dam); bool_ fire_beam(int typ, int dir, int dam); -void call_chaos(void); +void call_chaos(); bool_ fire_bolt_or_beam(int prob, int typ, int dir, int dam); bool_ lite_line(int dir); bool_ drain_life(int dir, int dam); @@ -76,14 +76,14 @@ bool_ confuse_monster(int dir, int plev); bool_ fear_monster(int dir, int plev); bool_ poly_monster(int dir); bool_ teleport_monster(int dir); -bool_ trap_creation(void); -bool_ destroy_doors_touch(void); -bool_ destroy_traps_touch(void); -bool_ sleep_monsters_touch(void); -bool_ alchemy(void); -void activate_ty_curse(void); -void activate_dg_curse(void); -void summon_cyber(void); +bool_ trap_creation(); +bool_ destroy_doors_touch(); +bool_ destroy_traps_touch(); +bool_ sleep_monsters_touch(); +bool_ alchemy(); +void activate_ty_curse(); +void activate_dg_curse(); +void summon_cyber(); bool_ confuse_monsters(int dam); bool_ charm_monsters(int dam); bool_ charm_animals(int dam); @@ -94,8 +94,8 @@ bool_ charm_monster(int dir, int plev); bool_ control_one_undead(int dir, int plev); bool_ charm_animal(int dir, int plev); bool_ mindblast_monsters(int dam); -void alter_reality(void); -void report_magics(void); +void alter_reality(); +void report_magics(); void teleport_swap(int dir); void swap_position(int lty, int ltx); object_filter_t const &item_tester_hook_recharge(); diff --git a/src/squeltch.cc b/src/squeltch.cc index 9c0de4be..61ccb1f3 100644 --- a/src/squeltch.cc +++ b/src/squeltch.cc @@ -58,7 +58,7 @@ using squelch::StatusCondition; static squelch::Automatizer *automatizer = nullptr; -void squeltch_grid(void) +void squeltch_grid() { auto const &k_info = game->edit_data.k_info; @@ -87,7 +87,7 @@ void squeltch_grid(void) } } -void squeltch_inventory(void) +void squeltch_inventory() { if (!automatizer_enabled) { diff --git a/src/squeltch.hpp b/src/squeltch.hpp index d0ec8b8c..c4525e7d 100644 --- a/src/squeltch.hpp +++ b/src/squeltch.hpp @@ -4,9 +4,9 @@ #include "object_type_fwd.hpp" #include -void squeltch_inventory(void); -void squeltch_grid(void); -void do_cmd_automatizer(void); +void squeltch_inventory(); +void squeltch_grid(); +void do_cmd_automatizer(); void automatizer_add_rule(object_type *o_ptr); extern bool_ automatizer_create; void automatizer_init(); diff --git a/src/store.cc b/src/store.cc index 9d4e7f81..fea51410 100644 --- a/src/store.cc +++ b/src/store.cc @@ -96,7 +96,7 @@ static cptr comment_4b[MAX_COMMENT_4B] = /* * Successful haggle. */ -static void say_comment_1(void) +static void say_comment_1() { char rumour[80]; @@ -114,7 +114,7 @@ static void say_comment_1(void) /* * Kick 'da bum out. -RAK- */ -static void say_comment_4(void) +static void say_comment_4() { msg_print(comment_4a[rand_int(MAX_COMMENT_4A)]); msg_print(comment_4b[rand_int(MAX_COMMENT_4B)]); @@ -1103,7 +1103,7 @@ static bool_ black_market_crap(object_type *o_ptr) * Attempt to delete (some of) a random item from the store * Hack -- we attempt to "maintain" piles of items when possible. */ -static void store_delete(void) +static void store_delete() { /* Pick a random slot */ int const what = rand_int(st_ptr->stock.size()); @@ -1187,7 +1187,7 @@ static bool_ kind_is_storeok(int k_idx) * * Should we check for "permission" to have the given item? */ -static void store_create(void) +static void store_create() { auto const &st_info = game->edit_data.st_info; auto const &k_info = game->edit_data.k_info; @@ -1392,7 +1392,7 @@ static void store_create(void) } /* Attempt to carry the (known) item */ - (void)store_carry(q_ptr); + store_carry(q_ptr); /* Definitely done */ break; @@ -1497,7 +1497,7 @@ static void display_entry(int pos) * Displays a store's inventory -RAK- * All prices are listed as "per individual object". -BEN- */ -static void display_inventory(void) +static void display_inventory() { int k; @@ -1535,7 +1535,7 @@ static void display_inventory(void) /* * Displays players gold -RAK- */ -void store_prt_gold(void) +void store_prt_gold() { char out_val[64]; @@ -1549,7 +1549,7 @@ void store_prt_gold(void) /* * Displays store (after clearing screen) -RAK- */ -void display_store(void) +void display_store() { auto const &st_info = game->edit_data.st_info; @@ -1829,7 +1829,7 @@ static bool_ sell_haggle(object_type *o_ptr, s32b *price) /* * Will the owner retire? */ -static bool retire_owner_p(void) +static bool retire_owner_p() { auto const &st_info = game->edit_data.st_info; @@ -1876,7 +1876,7 @@ static void adjust_store_top_item_removed() /* * Stole an item from a store -DG- */ -void store_stole(void) +void store_stole() { if (cur_store_num == 7) { @@ -2076,7 +2076,7 @@ void store_stole(void) /* * Buy an item from a store -RAK- */ -void store_purchase(void) +void store_purchase() { auto const &st_info = game->edit_data.st_info; @@ -2387,7 +2387,7 @@ void store_purchase(void) /* * Sell an item to the store (or home) */ -void store_sell(void) +void store_sell() { auto const &st_info = game->edit_data.st_info; @@ -2688,7 +2688,7 @@ void store_sell(void) /* * Examine an item in a store -JDL- */ -void store_examine(void) +void store_examine() { auto const &st_info = game->edit_data.st_info; @@ -2804,7 +2804,7 @@ static store_action_type const *find_store_action(s16b command_cmd) * must disable some commands which are allowed in the dungeon * but not in the stores, to prevent chaos. */ -static bool_ store_process_command(void) +static bool_ store_process_command() { bool_ recreate = FALSE; @@ -3112,7 +3112,7 @@ static bool_ store_process_command(void) * into other commands, normally, we convert "p" (pray) and "m" * (cast magic) into "g" (get), and "s" (search) into "d" (drop). */ -void do_cmd_store(void) +void do_cmd_store() { auto const &ow_info = game->edit_data.ow_info; auto const &ba_info = game->edit_data.ba_info; @@ -3568,7 +3568,7 @@ void store_init(int town_num, int store_num) * into other commands, normally, we convert "p" (pray) and "m" * (cast magic) into "g" (get), and "s" (search) into "d" (drop). */ -void do_cmd_home_trump(void) +void do_cmd_home_trump() { auto const &ow_info = game->edit_data.ow_info; auto const &ba_info = game->edit_data.ba_info; diff --git a/src/util.cc b/src/util.cc index f049d79c..9190f4a1 100644 --- a/src/util.cc +++ b/src/util.cc @@ -125,7 +125,7 @@ errr path_parse(char *buf, int max, cptr file) if (!u) return (1); - (void)strcpy(buf, u); + strcpy(buf, u); #else /* Look up password data for user */ pw = getpwuid(getuid()); @@ -134,11 +134,11 @@ errr path_parse(char *buf, int max, cptr file) if (!pw) return (1); /* Make use of the info */ - (void)strcpy(buf, pw->pw_dir); + strcpy(buf, pw->pw_dir); #endif /* Append the rest of the filename, if any */ - if (s) (void)strcat(buf, s); + if (s) strcat(buf, s); /* Success */ return (0); @@ -344,7 +344,7 @@ errr fd_kill(cptr file) if (path_parse(buf, 1024, file)) return ( -1); /* Remove */ - (void)remove(buf); + remove(buf); /* XXX XXX XXX */ return (0); @@ -366,7 +366,7 @@ errr fd_move(cptr file, cptr what) if (path_parse(aux, 1024, what)) return ( -1); /* Rename */ - (void)rename(buf, aux); + rename(buf, aux); /* XXX XXX XXX */ return (0); @@ -514,7 +514,7 @@ errr fd_close(int fd) if (fd < 0) return ( -1); /* Close */ - (void)close(fd); + close(fd); /* XXX XXX XXX */ return (0); @@ -1213,7 +1213,7 @@ static bool_ parse_under = FALSE; * This is not only more efficient, but also necessary to make sure * that various "inkey()" codes are not "lost" along the way. */ -void flush(void) +void flush() { /* Do it later */ flush_later = TRUE; @@ -1235,7 +1235,7 @@ void flush_on_failure() /* * Flush the screen, make a noise */ -void bell(void) +void bell() { /* Mega-Hack -- Flush the output */ Term_fresh(); @@ -1269,7 +1269,7 @@ void bell(void) * macro trigger, 500 milliseconds must pass before the key sequence is * known not to be that macro trigger. XXX XXX XXX */ -static char inkey_aux(void) +static char inkey_aux() { int k = 0, n, p = 0, w = 0; @@ -1281,7 +1281,7 @@ static char inkey_aux(void) /* Wait for a keypress */ - (void)(Term_inkey(&ch, TRUE, TRUE)); + (Term_inkey(&ch, TRUE, TRUE)); /* End "macro action" */ @@ -1358,7 +1358,7 @@ static char inkey_aux(void) } /* Wait for (and remove) a pending key */ - (void)Term_inkey(&ch, TRUE, TRUE); + Term_inkey(&ch, TRUE, TRUE); /* Return the key */ return (ch); @@ -1503,13 +1503,13 @@ static char inkey_real(bool_ inkey_scan) /* Access cursor state */ - (void)Term_get_cursor(&v); + Term_get_cursor(&v); /* Show the cursor if waiting, except sometimes in "command" mode */ if (!inkey_scan && (!inkey_flag || options->hilite_player || character_icky)) { /* Show the cursor */ - (void)Term_set_cursor(1); + Term_set_cursor(1); } @@ -1669,7 +1669,7 @@ static char inkey_real(bool_ inkey_scan) return (ch); } -char inkey(void) { +char inkey() { return inkey_real(FALSE); } @@ -1904,7 +1904,7 @@ static int screen_depth = 0; * * This function must match exactly one call to "screen_load()". */ -void screen_save(void) +void screen_save() { /* Hack -- Flush messages */ msg_print(NULL); @@ -1922,7 +1922,7 @@ void screen_save(void) * * This function must match exactly one call to "screen_save()". */ -void screen_load(void) +void screen_load() { /* Hack -- Flush messages */ msg_print(NULL); @@ -1948,7 +1948,7 @@ void msg_format(cptr fmt, ...) va_start(vp, fmt); /* Format the args, save the length */ - (void)vstrnfmt(buf, 1024, fmt, vp); + vstrnfmt(buf, 1024, fmt, vp); /* End the Varargs Stuff */ va_end(vp); @@ -1967,7 +1967,7 @@ void cmsg_format(byte color, cptr fmt, ...) va_start(vp, fmt); /* Format the args, save the length */ - (void)vstrnfmt(buf, 1024, fmt, vp); + vstrnfmt(buf, 1024, fmt, vp); /* End the Varargs Stuff */ va_end(vp); @@ -2051,10 +2051,10 @@ void text_out_to_screen(byte a, cptr str) /* Obtain the size */ - (void)Term_get_size(&wid, &h); + Term_get_size(&wid, &h); /* Obtain the cursor */ - (void)Term_locate(&x, &y); + Term_locate(&x, &y); /* Wrapping boundary */ wrap = wid; @@ -2161,7 +2161,7 @@ void text_out_to_file(byte a, cptr str) cptr s = str; /* Unused parameter */ - (void)a; + a; /* Process the string */ while (*s) @@ -2909,7 +2909,7 @@ void request_command(int shopping) if (cmd == '\\') { /* Get a real command */ - (void)get_com("Command: ", &cmd_char); + get_com("Command: ", &cmd_char); cmd = cmd_char; @@ -3137,7 +3137,7 @@ bool_ repeat_pull(int *what) return (TRUE); } -void repeat_check(void) +void repeat_check() { int what; diff --git a/src/util.h b/src/util.h index e341a058..7be705a0 100644 --- a/src/util.h +++ b/src/util.h @@ -8,10 +8,10 @@ extern "C" { #endif errr path_build(char *buf, int max, cptr path, cptr file); -void bell(void); +void bell(); errr macro_add(cptr pat, cptr act); sint macro_find_exact(cptr pat); -char inkey(void); +char inkey(); void prt(cptr str, int row, int col); #ifdef __cplusplus diff --git a/src/util.hpp b/src/util.hpp index e57235a9..8b8b2e3c 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -27,19 +27,19 @@ errr fd_seek(int fd, huge n); errr fd_read(int fd, char *buf, huge n); errr fd_write(int fd, cptr buf, huge n); errr fd_close(int fd); -void flush(void); +void flush(); void flush_on_failure(); void move_cursor(int row, int col); void text_to_ascii(char *buf, cptr str); void ascii_to_text(char *buf, cptr str); -char inkey_scan(void); +char inkey_scan(); void display_message(int x, int y, int split, byte color, cptr t); void cmsg_print(byte color, cptr msg); void msg_print(cptr msg); void cmsg_format(byte color, cptr fmt, ...); void msg_format(cptr fmt, ...); -void screen_save(void); -void screen_load(void); +void screen_save(); +void screen_load(); void c_put_str(byte attr, cptr str, int row, int col); void c_put_str(byte attr, std::string const &str, int row, int col); void put_str(cptr str, int row, int col); @@ -75,7 +75,7 @@ timer_type *new_timer(void (*callback)(), s32b delay); int get_keymap_mode(); void repeat_push(int what); bool_ repeat_pull(int *what); -void repeat_check(void); +void repeat_check(); void get_count(int number, int max); bool in_bounds(int y, int x); bool in_bounds2(int y, int x); diff --git a/src/wild.cc b/src/wild.cc index fd9ed6fd..3d86c0b7 100644 --- a/src/wild.cc +++ b/src/wild.cc @@ -554,7 +554,7 @@ void wilderness_gen() for (i = 0; i < lim; i++) { /* Make a resident */ - (void)alloc_monster((generate_encounter == TRUE) ? 0 : 3, (generate_encounter == TRUE) ? FALSE : TRUE); + alloc_monster((generate_encounter == TRUE) ? 0 : 3, (generate_encounter == TRUE) ? FALSE : TRUE); } if (generate_encounter) ambush_flag = TRUE; diff --git a/src/wild.hpp b/src/wild.hpp index 54dd9526..d6a40e8d 100644 --- a/src/wild.hpp +++ b/src/wild.hpp @@ -1,6 +1,6 @@ #pragma once void wilderness_gen(); -void wilderness_gen_small(void); +void wilderness_gen_small(); void reveal_wilderness_around_player(int y, int x, int h, int w); void town_gen(int t_idx); diff --git a/src/wizard2.cc b/src/wizard2.cc index a291fd63..cf7c699d 100644 --- a/src/wizard2.cc +++ b/src/wizard2.cc @@ -116,7 +116,7 @@ static void teleport_player_town(int town) /* * Hack -- Rerate Hitpoints */ -void do_cmd_rerate(void) +void do_cmd_rerate() { auto &player_hp = game->player_hp; @@ -220,14 +220,14 @@ static void do_cmd_summon_horde() if (cave_naked_bold(wy, wx)) break; } - (void)alloc_horde(wy, wx); + alloc_horde(wy, wx); } /* * Hack -- Teleport to the target */ -static void do_cmd_wiz_bamf(void) +static void do_cmd_wiz_bamf() { /* Must have a target */ if (!target_who) return; @@ -240,7 +240,7 @@ static void do_cmd_wiz_bamf(void) /* * Aux function for "do_cmd_wiz_change()". -RAK- */ -static void do_cmd_wiz_change_aux(void) +static void do_cmd_wiz_change_aux() { int i; int tmp_int; @@ -343,7 +343,7 @@ static void do_cmd_wiz_change_aux(void) /* * Change various "permanent" player variables. */ -static void do_cmd_wiz_change(void) +static void do_cmd_wiz_change() { /* Interact */ do_cmd_wiz_change_aux(); @@ -534,7 +534,7 @@ static void wci_string(cptr string, int num) * * List up to 50 choices in three columns */ -static int wiz_create_itemtype(void) +static int wiz_create_itemtype() { auto const &k_info = game->edit_data.k_info; @@ -1036,7 +1036,7 @@ static void wiz_quantity_item(object_type *o_ptr) * - Change properties (via wiz_tweak_item) * - Change the number of items (via wiz_quantity_item) */ -static void do_cmd_wiz_play(void) +static void do_cmd_wiz_play() { /* Get an item */ int item; @@ -1167,7 +1167,7 @@ static void do_cmd_wiz_play(void) * Hack -- this routine always makes a "dungeon object", and applies * magic to it, and attempts to decline cursed items. */ -static void wiz_create_item(void) +static void wiz_create_item() { object_type forge; object_type *q_ptr; @@ -1213,7 +1213,7 @@ static void wiz_create_item(void) /* * As above, but takes the k_idx as a parameter instead of using menus. */ -static void wiz_create_item_2(void) +static void wiz_create_item_2() { auto const &k_info = game->edit_data.k_info; @@ -1250,23 +1250,23 @@ static void wiz_create_item_2(void) /* * Cure everything instantly */ -void do_cmd_wiz_cure_all(void) +void do_cmd_wiz_cure_all() { object_type *o_ptr; /* Remove curses */ - (void)remove_all_curse(); + remove_all_curse(); /* Restore stats */ - (void)res_stat(A_STR, TRUE); - (void)res_stat(A_INT, TRUE); - (void)res_stat(A_WIS, TRUE); - (void)res_stat(A_CON, TRUE); - (void)res_stat(A_DEX, TRUE); - (void)res_stat(A_CHR, TRUE); + res_stat(A_STR, TRUE); + res_stat(A_INT, TRUE); + res_stat(A_WIS, TRUE); + res_stat(A_CON, TRUE); + res_stat(A_DEX, TRUE); + res_stat(A_CHR, TRUE); /* Restore the level */ - (void)restore_level(); + restore_level(); /* Heal the player */ p_ptr->chp = p_ptr->mhp; @@ -1289,19 +1289,19 @@ void do_cmd_wiz_cure_all(void) p_ptr->csp_frac = 0; /* Cure stuff */ - (void)set_blind(0); - (void)set_confused(0); - (void)set_poisoned(0); - (void)set_afraid(0); - (void)set_paralyzed(0); - (void)set_image(0); - (void)set_stun(0); - (void)set_cut(0); - (void)set_slow(0); + set_blind(0); + set_confused(0); + set_poisoned(0); + set_afraid(0); + set_paralyzed(0); + set_image(0); + set_stun(0); + set_cut(0); + set_slow(0); p_ptr->black_breath = FALSE; /* No longer hungry */ - (void)set_food(PY_FOOD_MAX - 1); + set_food(PY_FOOD_MAX - 1); /* Redraw everything */ do_cmd_redraw(); @@ -1311,7 +1311,7 @@ void do_cmd_wiz_cure_all(void) /* * Go to any level */ -static void do_cmd_wiz_jump(void) +static void do_cmd_wiz_jump() { auto const &d_info = game->edit_data.d_info; @@ -1362,7 +1362,7 @@ static void do_cmd_wiz_jump(void) /* * Become aware of a lot of objects */ -static void do_cmd_wiz_learn(void) +static void do_cmd_wiz_learn() { auto const &k_info = game->edit_data.k_info; @@ -1397,7 +1397,7 @@ static void do_cmd_wiz_summon(int num) for (i = 0; i < num; i++) { - (void)summon_specific(p_ptr->py, p_ptr->px, dun_level, 0); + summon_specific(p_ptr->py, p_ptr->px, dun_level, 0); } } @@ -1490,7 +1490,7 @@ void do_cmd_wiz_named_friendly(std::size_t r_idx, bool_ slp) /* * Hack -- Delete all nearby monsters */ -static void do_cmd_wiz_zap(void) +static void do_cmd_wiz_zap() { int i; @@ -1630,7 +1630,7 @@ void do_cmd_debug() /* Identify */ case 'i': - (void)ident_spell(); + ident_spell(); break; /* Go up or down in the dungeon */ diff --git a/src/wizard2.hpp b/src/wizard2.hpp index b406c9ef..9bad7f92 100644 --- a/src/wizard2.hpp +++ b/src/wizard2.hpp @@ -4,7 +4,7 @@ #include -void do_cmd_rerate(void); -void do_cmd_wiz_cure_all(void); +void do_cmd_rerate(); +void do_cmd_wiz_cure_all(); void do_cmd_wiz_named_friendly(std::size_t r_idx, bool_ slp); void do_cmd_debug(); diff --git a/src/xtra1.cc b/src/xtra1.cc index 3ed902dd..9f12fa3a 100644 --- a/src/xtra1.cc +++ b/src/xtra1.cc @@ -189,7 +189,7 @@ static void prt_field(cptr info, int row, int col) /* * Prints players max/cur piety */ -static void prt_piety(void) +static void prt_piety() { char tmp[32]; @@ -208,7 +208,7 @@ static void prt_piety(void) /* * Prints the player's current sanity. */ -static void prt_sane(void) +static void prt_sane() { char tmp[32]; byte color; @@ -294,7 +294,7 @@ static void prt_stat(int stat) /* * Prints "title", including "wizard" or "winner" as needed. */ -static void prt_title(void) +static void prt_title() { cptr p = ""; @@ -336,7 +336,7 @@ static void prt_title(void) /* * Prints level */ -static void prt_level(void) +static void prt_level() { char tmp[32]; @@ -358,17 +358,17 @@ static void prt_level(void) /* * Display the experience */ -static void prt_exp(void) +static void prt_exp() { char out_val[32]; if (p_ptr->lev >= PY_MAX_LEVEL) { - (void)sprintf(out_val, "********"); + sprintf(out_val, "********"); } else { - (void)sprintf(out_val, "%8ld", (long)(player_exp[p_ptr->lev - 1] * p_ptr->expfact / 100L) - p_ptr->exp); + sprintf(out_val, "%8ld", (long)(player_exp[p_ptr->lev - 1] * p_ptr->expfact / 100L) - p_ptr->exp); } if (p_ptr->exp >= p_ptr->max_exp) @@ -387,7 +387,7 @@ static void prt_exp(void) /* * Prints current gold */ -static void prt_gold(void) +static void prt_gold() { char tmp[32]; @@ -401,7 +401,7 @@ static void prt_gold(void) /* * Prints current AC */ -static void prt_ac(void) +static void prt_ac() { char tmp[32]; @@ -414,7 +414,7 @@ static void prt_ac(void) /* * Prints Cur/Max hit points */ -static void prt_hp(void) +static void prt_hp() { char tmp[32]; @@ -470,7 +470,7 @@ static void prt_hp(void) /* * Prints Cur/Max monster hit points */ -static void prt_mh(void) +static void prt_mh() { char tmp[32]; @@ -509,7 +509,7 @@ static void prt_mh(void) /* * Prints players max/cur spell points */ -static void prt_sp(void) +static void prt_sp() { char tmp[32]; byte color; @@ -578,7 +578,7 @@ static void prt_depth(int row, int col) { if (dungeon_flags & DF_TOWER) { - (void)strnfmt(depths, 32, "%c%c%c -%d", + strnfmt(depths, 32, "%c%c%c -%d", d_ptr->short_name[0], d_ptr->short_name[1], d_ptr->short_name[2], @@ -586,7 +586,7 @@ static void prt_depth(int row, int col) } else { - (void)strnfmt(depths, 32, "%c%c%c %d", + strnfmt(depths, 32, "%c%c%c %d", d_ptr->short_name[0], d_ptr->short_name[1], d_ptr->short_name[2], @@ -693,11 +693,11 @@ static void prt_state(int row, int col) { if (command_rep > 999) { - (void)sprintf(text, "Rep. %3d00", command_rep / 100); + sprintf(text, "Rep. %3d00", command_rep / 100); } else { - (void)sprintf(text, "Repeat %3d", command_rep); + sprintf(text, "Repeat %3d", command_rep); } } @@ -745,7 +745,7 @@ static void prt_speed(int row, int col) /* * Prints status line */ -static void prt_status_line(void) +static void prt_status_line() { int wid, hgt; Term_get_size(&wid, &hgt); @@ -848,7 +848,7 @@ static void prt_status_line(void) -static void prt_cut(void) +static void prt_cut() { int c = p_ptr->cut; int hgt; @@ -892,7 +892,7 @@ static void prt_cut(void) -static void prt_stun(void) +static void prt_stun() { int s = p_ptr->stun; int hgt; @@ -934,7 +934,7 @@ static void prt_stun(void) * Auto-track current target monster when bored. Note that the * health-bar stops tracking any monster that "disappears". */ -static void health_redraw(void) +static void health_redraw() { int hgt; Term_get_size(nullptr, &hgt); @@ -1028,7 +1028,7 @@ static void health_redraw(void) /* * Display basic info (mostly left of map) */ -static void prt_frame(void) +static void prt_frame() { int i; @@ -1082,7 +1082,7 @@ static void prt_frame(void) /* * Hack -- display inventory in sub-windows */ -static void fix_inven(void) +static void fix_inven() { int j; @@ -1116,7 +1116,7 @@ static void fix_inven(void) /* * Hack -- display equipment in sub-windows */ -static void fix_equip(void) +static void fix_equip() { int j; @@ -1148,7 +1148,7 @@ static void fix_equip(void) /* * Hack -- display character in sub-windows */ -static void fix_player(void) +static void fix_player() { int j; @@ -1184,7 +1184,7 @@ static void fix_player(void) * * XXX XXX XXX Adjust for width and split messages */ -void fix_message(void) +void fix_message() { int j, i; int w, h; @@ -1237,7 +1237,7 @@ void fix_message(void) * * Note that the "player" symbol does NOT appear on the map. */ -static void fix_overhead(void) +static void fix_overhead() { int j; @@ -1272,7 +1272,7 @@ static void fix_overhead(void) /* * Hack -- display monster recall in sub-windows */ -static void fix_monster(void) +static void fix_monster() { int j; @@ -1308,7 +1308,7 @@ static void fix_monster(void) /* * Hack -- display object recall in sub-windows */ -static void fix_object(void) +static void fix_object() { int j; @@ -1343,7 +1343,7 @@ static void fix_object(void) /* Show the monster list in a window */ -static void fix_m_list(void) +static void fix_m_list() { auto const &r_info = game->edit_data.r_info; @@ -1427,7 +1427,7 @@ static void fix_m_list(void) { int w, h, num = 0; - (void)Term_get_size(&w, &h); + Term_get_size(&w, &h); c_prt(TERM_WHITE, format("You can see %d monster%s", c, (c > 1 ? "s:" : ":")), 0, 0); @@ -1534,7 +1534,7 @@ static void add_powers(std::vector const &powers) } /* Calc the player powers */ -static void calc_powers(void) +static void calc_powers() { int i, p = 0; bool_ old_powers[POWER_MAX]; @@ -1647,7 +1647,7 @@ static void calc_sanity() * * This function induces status messages. */ -static void calc_mana(void) +static void calc_mana() { auto const &r_info = game->edit_data.r_info; @@ -1827,7 +1827,7 @@ static void calc_mana(void) * Calculate the players (maximal) hit points * Adjust current hitpoints if necessary */ -void calc_hitpoints(void) +void calc_hitpoints() { auto const &player_hp = game->player_hp; auto const &r_info = game->edit_data.r_info; @@ -1951,7 +1951,7 @@ static void calc_torch_gods() * SWD: Experimental modification: multiple light sources have additive effect. * */ -static void calc_torch(void) +static void calc_torch() { int i; object_type *o_ptr; @@ -2034,7 +2034,7 @@ static void calc_torch(void) /* * Computes current weight limit. */ -int weight_limit(void) +int weight_limit() { int i; @@ -2746,7 +2746,7 @@ static void apply_lflags(LF const &lflags) /** * Are barehand fighter's hands empty? */ -static bool_ monk_empty_hands(void) +static bool_ monk_empty_hands() { int i; object_type *o_ptr; @@ -4040,7 +4040,7 @@ void calc_bonuses(bool_ silent) /* * Handle "p_ptr->notice" */ -void notice_stuff(void) +void notice_stuff() { /* Notice stuff */ if (!p_ptr->notice) return; @@ -4065,7 +4065,7 @@ void notice_stuff(void) /* * Handle "p_ptr->update" */ -void update_stuff(void) +void update_stuff() { /* Update stuff */ if (!p_ptr->update) return; @@ -4172,7 +4172,7 @@ void update_stuff(void) /* * Handle "p_ptr->redraw" */ -void redraw_stuff(void) +void redraw_stuff() { /* Redraw stuff */ if (!p_ptr->redraw) return; @@ -4213,7 +4213,7 @@ void redraw_stuff(void) /* * Handle "p_ptr->window" */ -void window_stuff(void) +void window_stuff() { int j; @@ -4298,7 +4298,7 @@ void window_stuff(void) /* * Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window" */ -void handle_stuff(void) +void handle_stuff() { /* Update stuff */ if (p_ptr->update) update_stuff(); @@ -4311,7 +4311,7 @@ void handle_stuff(void) } -bool_ monk_heavy_armor(void) +bool_ monk_heavy_armor() { u16b monk_arm_wgt = 0; diff --git a/src/xtra1.hpp b/src/xtra1.hpp index 7f685fdc..4fde1619 100644 --- a/src/xtra1.hpp +++ b/src/xtra1.hpp @@ -6,20 +6,20 @@ #include -void fix_message(void); +void fix_message(); void apply_flags(object_flag_set const &f, s16b pval, s16b tval, s16b to_h, s16b to_d, s16b to_a); int luck(int min, int max); -int weight_limit(void); +int weight_limit(); extern bool_ calc_powers_silent; void cnv_stat(int i, char *out_val); s16b modify_stat_value(int value, int amount); -void calc_hitpoints(void); -void notice_stuff(void); -void update_stuff(void); -void redraw_stuff(void); -void window_stuff(void); -void handle_stuff(void); -bool_ monk_heavy_armor(void); +void calc_hitpoints(); +void notice_stuff(); +void update_stuff(); +void redraw_stuff(); +void window_stuff(); +void handle_stuff(); +bool_ monk_heavy_armor(); void calc_bonuses(bool_ silent); void gain_fate(byte fate); std::string fate_desc(int fate); diff --git a/src/xtra2.cc b/src/xtra2.cc index bbc82c68..d8b87f51 100644 --- a/src/xtra2.cc +++ b/src/xtra2.cc @@ -70,7 +70,7 @@ using boost::algorithm::iequals; -static void corrupt_corrupted(void); +static void corrupt_corrupted(); /* * Set "p_ptr->parasite" and "p_ptr->parasite_r_idx" @@ -1373,25 +1373,25 @@ bool_ set_stun(int v) { if (!p_ptr->sustain_int) { - (void) do_dec_stat(A_INT, STAT_DEC_NORMAL); + do_dec_stat(A_INT, STAT_DEC_NORMAL); } if (!p_ptr->sustain_wis) { - (void) do_dec_stat(A_WIS, STAT_DEC_NORMAL); + do_dec_stat(A_WIS, STAT_DEC_NORMAL); } } else if (randint(2) == 1) { if (!p_ptr->sustain_int) { - (void) do_dec_stat(A_INT, STAT_DEC_NORMAL); + do_dec_stat(A_INT, STAT_DEC_NORMAL); } } else { if (!p_ptr->sustain_wis) { - (void) do_dec_stat(A_WIS, STAT_DEC_NORMAL); + do_dec_stat(A_WIS, STAT_DEC_NORMAL); } } } @@ -1865,7 +1865,7 @@ bool_ set_food(int v) /* * Advance experience levels and print experience */ -void check_experience(void) +void check_experience() { int gained = 0; bool_ level_corruption = FALSE; @@ -2588,7 +2588,7 @@ void monster_death(int m_idx) else if (strstr(r_ptr->name, "Unmaker")) { int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL; - (void)project(m_idx, 6, y, x, 100, GF_CHAOS, flg); + project(m_idx, 6, y, x, 100, GF_CHAOS, flg); } /* Pink horrors are replaced with 2 Blue horrors */ else if (strstr(r_ptr->name, "ink horror")) @@ -3255,7 +3255,7 @@ void get_screen_size(int *wid_p, int *hgt_p) * Calculates current boundaries * Called below. */ -static void panel_bounds(void) +static void panel_bounds() { int wid, hgt; @@ -3338,7 +3338,7 @@ bool_ change_panel(int dy, int dx) * * The map is reprinted if necessary, and "TRUE" is returned. */ -void verify_panel(void) +void verify_panel() { int y = p_ptr->py; int x = p_ptr->px; @@ -3473,7 +3473,7 @@ void verify_panel(void) /* * Map resizing whenever the main term changes size */ -void resize_map(void) +void resize_map() { /* Only if the dungeon exists */ if (!character_dungeon) return; @@ -3522,7 +3522,7 @@ void resize_map(void) /* * Redraw a term when it is resized */ -void resize_window(void) +void resize_window() { /* Only if the dungeon exists */ if (!character_dungeon) return; @@ -3656,7 +3656,7 @@ static bool target_able(int m_idx) * * We return TRUE if the target is "okay" and FALSE otherwise. */ -bool_ target_okay(void) +bool_ target_okay() { /* Accept stationary targets */ if (target_who < 0) return (TRUE); @@ -5130,7 +5130,7 @@ static void clean_wish_name(char *buf, char *name) /* * Allow the player to make a wish */ -void make_wish(void) +void make_wish() { auto const &re_info = game->edit_data.re_info; auto const &r_info = game->edit_data.r_info; @@ -5269,7 +5269,7 @@ void make_wish(void) * Corrupted have a 1/3 chance of losing a mutation each time this is called, * assuming they have any in the first place */ -static void corrupt_corrupted(void) +static void corrupt_corrupted() { if (magik(45)) { diff --git a/src/xtra2.hpp b/src/xtra2.hpp index b61114a4..9edcec1e 100644 --- a/src/xtra2.hpp +++ b/src/xtra2.hpp @@ -7,9 +7,9 @@ #include -void do_rebirth(void); +void do_rebirth(); void switch_subrace(std::size_t racem, bool_ copy_old); -void drop_from_wild(void); +void drop_from_wild(); bool_ set_roots(int v, s16b ac, s16b dam); bool_ set_project(int v, s16b gf, s16b dam, s16b rad, s16b flag); bool_ set_parasite(int v, int r); @@ -60,7 +60,7 @@ bool_ set_oppose_cc(int v); bool_ set_stun(int v); bool_ set_cut(int v); bool_ set_food(int v); -void check_experience(void); +void check_experience(); void check_experience_obj(object_type *o_ptr); void gain_exp(s32b amount); void lose_exp(s32b amount); @@ -68,8 +68,8 @@ int get_coin_type(std::shared_ptr r_ptr); void monster_death(int m_idx); bool_ mon_take_hit(int m_idx, int dam, bool_ *fear, cptr note); bool_ change_panel(int dy, int dx); -void verify_panel(void); -bool_ target_okay(void); +void verify_panel(); +bool_ target_okay(); bool_ target_set(int mode); bool_ get_aim_dir(int *dp); bool_ get_rep_dir(int *dp); @@ -77,13 +77,13 @@ bool_ set_shadow(int v); bool_ set_tim_esp(int v); bool_ tgp_pt(int *x, int * y); bool_ tgt_pt (int *x, int *y); -void do_poly_self(void); -bool_ curse_weapon(void); -bool_ curse_armor(void); -void make_wish(void); +void do_poly_self(); +bool_ curse_weapon(); +bool_ curse_armor(); +void make_wish(); void create_between_gate(int dist, int y, int x); extern "C" { - void resize_map(void); - void resize_window(void); + void resize_map(); + void resize_window(); } diff --git a/src/z-term.h b/src/z-term.h index fc9c0598..92f09577 100644 --- a/src/z-term.h +++ b/src/z-term.h @@ -150,7 +150,7 @@ struct term errr (*text_hook)(int x, int y, int n, byte a, cptr s); - void (*resize_hook)(void); + void (*resize_hook)(); }; @@ -225,7 +225,7 @@ errr Term_xtra(int n, int v); void Term_queue_char(int x, int y, byte a, char c); void Term_queue_chars(int x, int y, int n, byte a, cptr s); -errr Term_fresh(void); +errr Term_fresh(); errr Term_set_cursor(int v); errr Term_gotoxy(int x, int y); errr Term_draw(int x, int y, byte a, char c); @@ -234,8 +234,8 @@ errr Term_addstr(int n, byte a, cptr s); errr Term_putch(int x, int y, byte a, char c); errr Term_putstr(int x, int y, int n, byte a, cptr s); errr Term_erase(int x, int y, int n); -errr Term_clear(void); -errr Term_redraw(void); +errr Term_clear(); +errr Term_redraw(); errr Term_redraw_section(int x1, int y1, int x2, int y2); void Term_bell(); @@ -244,14 +244,14 @@ errr Term_get_size(int *w, int *h); errr Term_locate(int *x, int *y); errr Term_what(int x, int y, byte *a, char *c); -errr Term_flush(void); +errr Term_flush(); errr Term_keypress(int k); errr Term_key_push(int k); errr Term_inkey(char *ch, bool_ wait, bool_ take); -errr Term_save(void); -term_win* Term_save_to(void); -errr Term_load(void); +errr Term_save(); +term_win* Term_save_to(); +errr Term_load(); errr Term_load_from(term_win *save); errr Term_resize(int w, int h); -- cgit v1.2.3