summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/birth.c42
-rw-r--r--src/bldg.c48
-rw-r--r--src/cave.c28
-rw-r--r--src/cmd1.c100
-rw-r--r--src/cmd2.c124
-rw-r--r--src/cmd3.c44
-rw-r--r--src/cmd4.c28
-rw-r--r--src/cmd5.c28
-rw-r--r--src/cmd6.c54
-rw-r--r--src/cmd7.c94
-rw-r--r--src/cmovie.c2
-rw-r--r--src/dungeon.c30
-rw-r--r--src/externs.h1136
-rw-r--r--src/files.c44
-rw-r--r--src/gen_evol.c4
-rw-r--r--src/gen_maze.c2
-rw-r--r--src/generate.c126
-rw-r--r--src/gods.c4
-rw-r--r--src/h-type.h15
-rw-r--r--src/help.c2
-rw-r--r--src/init1.c74
-rw-r--r--src/init2.c22
-rw-r--r--src/levels.c12
-rw-r--r--src/loadsave.c44
-rw-r--r--src/lua/tolua.h4
-rw-r--r--src/lua_bind.c30
-rw-r--r--src/maid-x11.c8
-rw-r--r--src/main-crb.c22
-rw-r--r--src/main-gcu.c2
-rw-r--r--src/main-gtk.c42
-rw-r--r--src/main-gtk2.c42
-rw-r--r--src/main-sdl-iso.c26
-rw-r--r--src/main-sdl.c20
-rw-r--r--src/main-sla.c2
-rw-r--r--src/main-win.c50
-rw-r--r--src/main-x11.c18
-rw-r--r--src/main-xaw.c6
-rw-r--r--src/main-xxx.c2
-rw-r--r--src/main.c12
-rw-r--r--src/melee1.c28
-rw-r--r--src/melee2.c136
-rw-r--r--src/modules.c2
-rw-r--r--src/monster1.c42
-rw-r--r--src/monster2.c106
-rw-r--r--src/monster3.c28
-rw-r--r--src/object1.c116
-rw-r--r--src/object2.c66
-rw-r--r--src/plots.c14
-rw-r--r--src/plots.h54
-rw-r--r--src/powers.c10
-rw-r--r--src/q_betwen.c14
-rw-r--r--src/q_dragons.c8
-rw-r--r--src/q_eol.c14
-rw-r--r--src/q_evil.c8
-rw-r--r--src/q_haunted.c8
-rw-r--r--src/q_hobbit.c14
-rw-r--r--src/q_invas.c16
-rw-r--r--src/q_main.c18
-rw-r--r--src/q_narsil.c8
-rw-r--r--src/q_nazgul.c12
-rw-r--r--src/q_nirna.c10
-rw-r--r--src/q_one.c22
-rw-r--r--src/q_poison.c16
-rw-r--r--src/q_rand.c18
-rw-r--r--src/q_shroom.c14
-rw-r--r--src/q_spider.c8
-rw-r--r--src/q_thief.c12
-rw-r--r--src/q_thrain.c12
-rw-r--r--src/q_troll.c8
-rw-r--r--src/q_ultrae.c2
-rw-r--r--src/q_ultrag.c16
-rw-r--r--src/q_wight.c8
-rw-r--r--src/q_wolves.c8
-rw-r--r--src/randart.c16
-rw-r--r--src/script.c10
-rw-r--r--src/skills.c34
-rw-r--r--src/spells1.c116
-rw-r--r--src/spells2.c330
-rw-r--r--src/squeltch.c8
-rw-r--r--src/status.c12
-rw-r--r--src/store.c44
-rw-r--r--src/tables.c2
-rw-r--r--src/traps.c68
-rw-r--r--src/types.h242
-rw-r--r--src/util.c46
-rw-r--r--src/variable.c342
-rw-r--r--src/wild.c10
-rw-r--r--src/wizard1.c4
-rw-r--r--src/wizard2.c10
-rw-r--r--src/xtra1.c16
-rw-r--r--src/xtra2.c298
-rw-r--r--src/z-form.c4
-rw-r--r--src/z-rand.c2
-rw-r--r--src/z-rand.h2
-rw-r--r--src/z-term.c4
-rw-r--r--src/z-term.h34
-rw-r--r--src/z-util.c12
-rw-r--r--src/z-util.h10
98 files changed, 2471 insertions, 2474 deletions
diff --git a/src/birth.c b/src/birth.c
index 5fc6c4fd..5f4eac5a 100644
--- a/src/birth.c
+++ b/src/birth.c
@@ -200,7 +200,7 @@ static void save_prev_data(void)
/*
* Load the previous data
*/
-static void load_prev_data(bool save)
+static void load_prev_data(bool_ save)
{
int i;
@@ -822,8 +822,8 @@ static void player_wipe(void)
{
int i, j;
- bool *powers;
- bool *corruptions;
+ bool_ *powers;
+ bool_ *corruptions;
/* Wipe special levels */
@@ -844,7 +844,7 @@ static void player_wipe(void)
p_ptr->lives = 0;
/* Wipe the corruptions */
- (void)C_WIPE(p_ptr->corruptions, max_corruptions, bool);
+ (void)C_WIPE(p_ptr->corruptions, max_corruptions, bool_);
/* Wipe the history */
for (i = 0; i < 4; i++)
@@ -1241,7 +1241,7 @@ static void gen_random_quests(int n)
/* XXX XXX XXX Try until valid choice is found */
while (tries)
{
- bool ok;
+ bool_ ok;
tries--;
@@ -1625,9 +1625,9 @@ int dump_gods(int sel, int *choice, int max)
/* Ask questions */
-static bool do_quick_start = FALSE;
+static bool_ do_quick_start = FALSE;
-static bool player_birth_aux_ask()
+static bool_ player_birth_aux_ask()
{
int i, k, n, v, sel;
@@ -2531,7 +2531,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(void)
{
int i;
@@ -2709,15 +2709,15 @@ static bool player_birth_aux_point(void)
/*
* Use the autoroller or not to generate a char
*/
-static bool player_birth_aux_auto()
+static bool_ player_birth_aux_auto()
{
int i, j, m, v;
int mode = 0;
- bool flag = FALSE;
+ bool_ flag = FALSE;
- bool prev = FALSE;
+ bool_ prev = FALSE;
char c;
@@ -2881,7 +2881,7 @@ static bool player_birth_aux_auto()
/* Auto-roll */
while (autoroll)
{
- bool accept = TRUE;
+ bool_ accept = TRUE;
/* Get a new character */
get_stats();
@@ -3059,7 +3059,7 @@ static bool player_birth_aux_auto()
* from continuously rolling up characters, which can be VERY
* expensive CPU wise. And it cuts down on player stupidity.
*/
-static bool player_birth_aux()
+static bool_ player_birth_aux()
{
char c;
@@ -3234,7 +3234,7 @@ static bool player_birth_aux()
/*
* Helper function for validate_bg().
*/
-static void validate_bg_aux(int chart, bool chart_checked[], char *buf)
+static void validate_bg_aux(int chart, bool_ chart_checked[], char *buf)
{
char *s;
@@ -3242,10 +3242,10 @@ static void validate_bg_aux(int chart, bool chart_checked[], char *buf)
/* Assume the chart does not exist */
- bool chart_exists = FALSE;
+ bool_ chart_exists = FALSE;
/* Assume the chart is not complete */
- bool chart_complete = FALSE;
+ bool_ chart_complete = FALSE;
int bg_max = max_bg_idx;
@@ -3307,7 +3307,7 @@ static void validate_bg(void)
{
int i, race;
- bool chart_checked[512];
+ bool_ chart_checked[512];
char buf[1024];
@@ -3430,7 +3430,7 @@ void player_birth(void)
while (TRUE)
{
int j;
- bool ok = TRUE;
+ bool_ ok = TRUE;
lev = rand_range(d_ptr->mindepth, d_ptr->maxdepth - 1);
@@ -3499,7 +3499,7 @@ void player_birth(void)
char savefile_module[46][80];
char savefile_names[46][30];
char savefile_desc[46][80];
-bool savefile_alive[46];
+bool_ savefile_alive[46];
int savefile_idx[46];
/*
@@ -3733,9 +3733,9 @@ static void dump_savefiles(int sel, int max)
/* Asks for new game or load game */
-bool no_begin_screen = FALSE;
+bool_ no_begin_screen = FALSE;
-bool begin_screen()
+bool_ begin_screen()
{
int m, k, sel, max;
diff --git a/src/bldg.c b/src/bldg.c
index e5220031..53dc6765 100644
--- a/src/bldg.c
+++ b/src/bldg.c
@@ -16,7 +16,7 @@
#include "angband.h"
/* hack as in leave_store in store.c */
-static bool leave_bldg = FALSE;
+static bool_ leave_bldg = FALSE;
/* remember building location */
static int building_loc = 0;
@@ -25,7 +25,7 @@ static int building_loc = 0;
/*
* A helper function for is_state
*/
-bool is_state_aux(store_type *s_ptr, int state)
+bool_ is_state_aux(store_type *s_ptr, int state)
{
owner_type *ow_ptr = &ow_info[s_ptr->owner];
@@ -50,7 +50,7 @@ bool is_state_aux(store_type *s_ptr, int state)
/*
* Test if the state accords with the player
*/
-bool is_state(store_type *s_ptr, int state)
+bool_ is_state(store_type *s_ptr, int state)
{
if (state == STORE_NORMAL)
{
@@ -403,7 +403,7 @@ static void display_fruit(int row, int col, int fruit)
/*
* gamble_comm
*/
-static bool gamble_comm(int cmd)
+static bool_ gamble_comm(int cmd)
{
int roll1, roll2, roll3, choice, odds, win;
@@ -664,9 +664,9 @@ static bool gamble_comm(int cmd)
* ghost code does become a reality again. Does help to avoid filthy urchins.
* Resting at night is also a quick way to restock stores -KMW-
*/
-static bool inn_comm(int cmd)
+static bool_ inn_comm(int cmd)
{
- bool vampire;
+ bool_ vampire;
/* Extract race info */
@@ -694,7 +694,7 @@ static bool inn_comm(int cmd)
*/
case BACT_REST: /* Rest for the night */
{
- bool nighttime;
+ bool_ nighttime;
/* Extract the current time */
nighttime = ((bst(HOUR, turn) < 6) || (bst(HOUR, turn) >= 18));
@@ -807,7 +807,7 @@ static void get_questinfo(int questnum)
/*
* Request a quest from the Lord.
*/
-static bool castle_quest(int y, int x)
+static bool_ castle_quest(int y, int x)
{
int plot = 0;
@@ -1023,7 +1023,7 @@ static void list_weapon(object_type *o_ptr, int row, int col)
/*
* Select melee weapons
*/
-static bool item_tester_hook_melee_weapon(object_type *o_ptr)
+static bool_ item_tester_hook_melee_weapon(object_type *o_ptr)
{
return (wield_slot(o_ptr) == INVEN_WIELD);
}
@@ -1031,7 +1031,7 @@ static bool item_tester_hook_melee_weapon(object_type *o_ptr)
/*
* compare_weapons -KMW-
*/
-static bool compare_weapons(void)
+static bool_ compare_weapons(void)
{
int item, item2, i;
@@ -1121,8 +1121,8 @@ static bool compare_weapons(void)
* sharpen arrows, repair armor, repair weapon
* -KMW-
*/
-static bool fix_item(int istart, int iend, int ispecific, bool iac,
- int ireward, bool set_reward)
+static bool_ fix_item(int istart, int iend, int ispecific, bool_ iac,
+ int ireward, bool_ set_reward)
{
int i;
@@ -1134,7 +1134,7 @@ static bool fix_item(int istart, int iend, int ispecific, bool iac,
char out_val[80], tmp_str[80];
- bool repaired = FALSE;
+ bool_ repaired = FALSE;
clear_bldg(5, 18);
strnfmt(tmp_str, 80, " Based on your skill, we can improve up to +%d", maxenchant);
@@ -1216,7 +1216,7 @@ static bool fix_item(int istart, int iend, int ispecific, bool iac,
/*
* Research Item
*/
-static bool research_item(void)
+static bool_ research_item(void)
{
clear_bldg(5, 18);
return (identify_fully());
@@ -1278,7 +1278,7 @@ static void show_bounties(void)
/*
* Filter for corpses that currently have a bounty on them.
*/
-static bool item_tester_hook_bounty(object_type* o_ptr)
+static bool_ item_tester_hook_bounty(object_type* o_ptr)
{
int i;
@@ -1295,7 +1295,7 @@ static bool item_tester_hook_bounty(object_type* o_ptr)
}
/* Filter to match the quest monster's corpse. */
-static bool item_tester_hook_quest_monster(object_type* o_ptr)
+static bool_ item_tester_hook_quest_monster(object_type* o_ptr)
{
if ((o_ptr->tval == TV_CORPSE) &&
(o_ptr->pval2 == bounties[0][0])) return (TRUE);
@@ -1382,7 +1382,7 @@ static void sell_corpses(void)
/*
* Hook for bounty monster selection.
*/
-static bool mon_hook_bounty(int r_idx)
+static bool_ mon_hook_bounty(int r_idx)
{
monster_race* r_ptr = &r_info[r_idx];
@@ -1605,7 +1605,7 @@ void select_bounties(void)
/*
* Execute a building command
*/
-bool bldg_process_command(store_type *s_ptr, int i)
+bool_ bldg_process_command(store_type *s_ptr, int i)
{
store_action_type *ba_ptr = &ba_info[st_info[s_ptr->st_idx].actions[i]];
@@ -1613,11 +1613,11 @@ bool bldg_process_command(store_type *s_ptr, int i)
int bcost;
- bool paid = FALSE;
+ bool_ paid = FALSE;
- bool set_reward = FALSE;
+ bool_ set_reward = FALSE;
- bool recreate = FALSE;
+ bool_ recreate = FALSE;
if (is_state(s_ptr, STORE_LIKED))
@@ -1694,7 +1694,7 @@ bool bldg_process_command(store_type *s_ptr, int i)
case BACT_QUEST4:
{
int y = 1, x = 1;
- bool ok = FALSE;
+ bool_ ok = FALSE;
while ((x < cur_wid - 1) && !ok)
{
@@ -1911,7 +1911,7 @@ bool bldg_process_command(store_type *s_ptr, int i)
case BACT_DIVINATION:
{
int i, count = 0;
- bool something = FALSE;
+ bool_ something = FALSE;
while (count < 1000)
{
@@ -2093,7 +2093,7 @@ void do_cmd_bldg(void)
char command;
- bool validcmd;
+ bool_ validcmd;
store_type *s_ptr;
diff --git a/src/cave.c b/src/cave.c
index 74e40fe0..52e3bdc7 100644
--- a/src/cave.c
+++ b/src/cave.c
@@ -42,7 +42,7 @@ int distance(int y1, int x1, int y2, int x2)
* Returns TRUE if a grid is considered to be a wall for the purpose
* of magic mapping / clairvoyance
*/
-static bool is_wall(cave_type *c_ptr)
+static bool_ is_wall(cave_type *c_ptr)
{
byte feat;
@@ -106,7 +106,7 @@ static bool is_wall(cave_type *c_ptr)
*
* Use the "update_view()" function to determine player line-of-sight.
*/
-bool los(int y1, int x1, int y2, int x2)
+bool_ los(int y1, int x1, int y2, int x2)
{
/* Delta */
int dx, dy;
@@ -333,7 +333,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(void)
{
return (!player_can_see_bold(p_ptr->py, p_ptr->px));
}
@@ -345,7 +345,7 @@ bool no_lite(void)
*
* Used by destruction spells, and for placing stairs, etc.
*/
-bool cave_valid_bold(int y, int x)
+bool_ cave_valid_bold(int y, int x)
{
cave_type *c_ptr = &cave[y][x];
@@ -508,7 +508,7 @@ static void image_random(byte *ap, char *cp)
#else
-static bool feat_supports_lighting(byte feat)
+static bool_ feat_supports_lighting(byte feat)
{
if (f_info[feat].flags1 & FF1_SUPPORT_LIGHT) return TRUE;
else return FALSE;
@@ -615,7 +615,7 @@ static byte multi_hued_attr(monster_race *r_ptr)
/* Check breaths */
for (i = 0; i < 32; i++)
{
- bool stored = FALSE;
+ bool_ stored = FALSE;
/* Don't have that breath */
if (!(r_ptr->flags4 & (1L << i))) continue;
@@ -902,7 +902,7 @@ void map_info(int y, int x, byte *ap, char *cp)
* col col+1 col+2
* row base darker brighter
*/
- bool graf_new = ((graphics_mode == GRAPHICS_ISO) ||
+ bool_ graf_new = ((graphics_mode == GRAPHICS_ISO) ||
(graphics_mode == GRAPHICS_NEW));
/*
@@ -911,7 +911,7 @@ void map_info(int y, int x, byte *ap, char *cp)
* go for better graphics support... Anyway this means a port allows
* changing attr independently from its char -- pelpel
*/
- bool attr_mutable = (!use_graphics ||
+ bool_ attr_mutable = (!use_graphics ||
(graphics_mode == GRAPHICS_IBM));
@@ -1591,7 +1591,7 @@ void map_info_default(int y, int x, byte *ap, char *cp)
byte c;
- bool use_graphics_hack = use_graphics;
+ bool_ use_graphics_hack = use_graphics;
byte graphics_mode_hack = graphics_mode;
@@ -2544,8 +2544,8 @@ void display_map(int *cy, int *cx)
byte **mp;
- bool old_view_special_lite;
- bool old_view_granite_lite;
+ bool_ old_view_special_lite;
+ bool_ old_view_granite_lite;
int hgt, wid, yrat, xrat, yfactor, xfactor;
@@ -3362,7 +3362,7 @@ struct vinfo_hack
*
* We use "u" to point to an array of long integers.
*/
-static bool ang_sort_comp_hook_longs(vptr u, vptr v, int a, int b)
+static bool_ ang_sort_comp_hook_longs(vptr u, vptr v, int a, int b)
{
long *x = (long*)(u);
@@ -4197,7 +4197,7 @@ void update_mon_lite(void)
cave_type *c_ptr;
u16b info;
- bool invis;
+ bool_ invis;
s16b fast_lite_n = lite_n;
s16b fast_temp_n;
@@ -4959,7 +4959,7 @@ void mmove2(int *y, int *x, int y1, int x1, int y2, int x2)
*
* This is slightly (but significantly) different from "los(y1,x1,y2,x2)".
*/
-bool projectable(int y1, int x1, int y2, int x2)
+bool_ projectable(int y1, int x1, int y2, int x2)
{
int dist, y, x;
diff --git a/src/cmd1.c b/src/cmd1.c
index a4a1202a..85e76900 100644
--- a/src/cmd1.c
+++ b/src/cmd1.c
@@ -18,7 +18,7 @@
* Determine if the player "hits" a monster (normal combat).
* Note -- Always miss 5%, always hit 5%, otherwise random.
*/
-bool test_hit_fire(int chance, int ac, int vis)
+bool_ test_hit_fire(int chance, int ac, int vis)
{
int k;
@@ -49,7 +49,7 @@ bool test_hit_fire(int chance, int ac, int vis)
*
* Note -- Always miss 5%, always hit 5%, otherwise random.
*/
-bool test_hit_norm(int chance, int ac, int vis)
+bool_ test_hit_norm(int chance, int ac, int vis)
{
int k;
@@ -120,7 +120,7 @@ s16b critical_shot(int weight, int plus, int dam, int skill)
*
* Factor in weapon weight, total plusses, player level.
*/
-s16b critical_norm(int weight, int plus, int dam, int weapon_tval, bool *done_crit)
+s16b critical_norm(int weight, int plus, int dam, int weapon_tval, bool_ *done_crit)
{
int i, k, num = randint(5000);
@@ -635,7 +635,7 @@ void carry(int pickup)
*/
static void hit_trap(void)
{
- bool ident = FALSE;
+ bool_ ident = FALSE;
cave_type *c_ptr;
@@ -718,7 +718,7 @@ void touch_zap_player(monster_type *m_ptr)
* Carried monster can attack too.
* Based on monst_attack_monst.
*/
-static void carried_monster_attack(s16b m_idx, bool *fear, bool *mdeath,
+static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
int x, int y)
{
monster_type *t_ptr = &m_list[m_idx];
@@ -739,7 +739,7 @@ static void carried_monster_attack(s16b m_idx, bool *fear, bool *mdeath,
char temp[80];
- bool blinked = FALSE, touched = FALSE;
+ bool_ blinked = FALSE, touched = FALSE;
byte y_saver = t_ptr->fy;
@@ -779,8 +779,8 @@ static void carried_monster_attack(s16b m_idx, bool *fear, bool *mdeath,
/* Scan through all four blows */
for (ap_cnt = 0; ap_cnt < 4; ap_cnt++)
{
- bool visible = FALSE;
- bool obvious = FALSE;
+ bool_ visible = FALSE;
+ bool_ obvious = FALSE;
int power = 0;
int damage = 0;
@@ -1359,7 +1359,7 @@ static void carried_monster_attack(s16b m_idx, bool *fear, bool *mdeath,
* Carried monster can attack too.
* Based on monst_attack_monst.
*/
-static void incarnate_monster_attack(s16b m_idx, bool *fear, bool *mdeath,
+static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
int x, int y)
{
monster_type *t_ptr = &m_list[m_idx];
@@ -1378,7 +1378,7 @@ static void incarnate_monster_attack(s16b m_idx, bool *fear, bool *mdeath,
char temp[80];
- bool blinked = FALSE, touched = FALSE;
+ bool_ blinked = FALSE, touched = FALSE;
byte y_saver = t_ptr->fy;
@@ -1415,8 +1415,8 @@ static void incarnate_monster_attack(s16b m_idx, bool *fear, bool *mdeath,
for (ap_cnt = 0; ap_cnt < (p_ptr->num_blow > 4) ? 4 : p_ptr->num_blow;
ap_cnt++)
{
- bool visible = FALSE;
- bool obvious = FALSE;
+ bool_ visible = FALSE;
+ bool_ obvious = FALSE;
int power = 0;
int damage = 0;
@@ -1989,7 +1989,7 @@ static void incarnate_monster_attack(s16b m_idx, bool *fear, bool *mdeath,
static void flavored_attack(int percent, char *output)
{
int insanity = (p_ptr->msane - p_ptr->csane) * 100 / p_ptr->msane;
- bool insane = (rand_int(100) < insanity);
+ bool_ insane = (rand_int(100) < insanity);
if (percent < 5)
{
@@ -2118,8 +2118,8 @@ static void py_attack_hand(int *k, monster_type *m_ptr, s32b *special)
int resist_stun = 0, max = MAX_MA;
monster_race *r_ptr = race_inf(m_ptr);
char m_name[80];
- bool desc = FALSE;
- bool done_crit;
+ bool_ desc = FALSE;
+ bool_ done_crit;
int plev = p_ptr->lev;
if ((!p_ptr->body_monster) && (p_ptr->mimic_form == resolve_mimic_name("Bear")) &&
@@ -2272,8 +2272,8 @@ void do_nazgul(int *k, int *num, int num_blow, int weap, monster_race *r_ptr,
{
u32b f1, f2, f3, f4, f5, esp;
- bool mundane;
- bool allow_shatter = TRUE;
+ bool_ mundane;
+ bool_ allow_shatter = TRUE;
/* Extract mundane-ness of the current weapon */
object_flags(o_ptr, &f1, &f2, &f3, &f4, &f5, &esp);
@@ -2378,23 +2378,23 @@ void py_attack(int y, int x, int max_blow)
char m_name[80];
- bool fear = FALSE;
+ bool_ fear = FALSE;
- bool mdeath = FALSE;
+ bool_ mdeath = FALSE;
- bool backstab = FALSE;
+ bool_ backstab = FALSE;
- bool vorpal_cut = FALSE;
+ bool_ vorpal_cut = FALSE;
int chaos_effect = 0;
- bool stab_fleeing = FALSE;
+ bool_ stab_fleeing = FALSE;
- bool do_quake = FALSE;
+ bool_ do_quake = FALSE;
- bool done_crit = FALSE;
+ bool_ done_crit = FALSE;
- bool drain_msg = TRUE;
+ bool_ drain_msg = TRUE;
int drain_result = 0, drain_heal = 0;
@@ -2403,7 +2403,7 @@ void py_attack(int y, int x, int max_blow)
/* A massive hack -- life-draining weapons */
u32b f1, f2, f3, f4, f5, esp;
- bool no_extra = FALSE;
+ bool_ no_extra = FALSE;
int weap;
@@ -2959,14 +2959,14 @@ void py_attack(int y, int x, int max_blow)
-static bool pattern_tile(int y, int x)
+static bool_ pattern_tile(int y, int x)
{
return ((cave[y][x].feat <= FEAT_PATTERN_XTRA2) &&
(cave[y][x].feat >= FEAT_PATTERN_START));
}
-static bool pattern_seq(int c_y, int c_x, int n_y, int n_x)
+static bool_ pattern_seq(int c_y, int c_x, int n_y, int n_x)
{
if (!(pattern_tile(c_y, c_x)) && !(pattern_tile(n_y, n_x)))
return TRUE;
@@ -3080,11 +3080,11 @@ static bool pattern_seq(int c_y, int c_x, int n_y, int n_x)
-bool player_can_enter(byte feature)
+bool_ player_can_enter(byte feature)
{
- bool pass_wall;
+ bool_ pass_wall;
- bool only_wall = FALSE;
+ bool_ only_wall = FALSE;
/* Player can not walk through "walls" unless in Shadow Form */
@@ -3162,7 +3162,7 @@ bool player_can_enter(byte feature)
* any monster which might be in the destination grid. Previously,
* moving into walls was "free" and did NOT hit invisible monsters.
*/
-void move_player_aux(int dir, int do_pickup, int run, bool disarm)
+void move_player_aux(int dir, int do_pickup, int run, bool_ disarm)
{
int y, x, tmp;
@@ -3174,11 +3174,11 @@ void move_player_aux(int dir, int do_pickup, int run, bool disarm)
char m_name[80];
- bool stormbringer = FALSE;
+ bool_ stormbringer = FALSE;
- bool old_dtrap, new_dtrap;
+ bool_ old_dtrap, new_dtrap;
- bool oktomove = TRUE;
+ bool_ oktomove = TRUE;
/* Hack - random movement */
@@ -3729,7 +3729,7 @@ void move_player_aux(int dir, int do_pickup, int run, bool disarm)
}
}
-void move_player(int dir, int do_pickup, bool disarm)
+void move_player(int dir, int do_pickup, bool_ disarm)
{
move_player_aux(dir, do_pickup, 0, disarm);
}
@@ -3979,13 +3979,13 @@ static byte find_prevdir;
/*
* We are looking for open area
*/
-static bool find_openarea;
+static bool_ find_openarea;
/*
* We are looking for a break
*/
-static bool find_breakright;
-static bool find_breakleft;
+static bool_ find_breakright;
+static bool_ find_breakleft;
@@ -4097,7 +4097,7 @@ static void run_init(int dir)
*
* Return TRUE if the running should be stopped
*/
-static bool run_test(void)
+static bool_ run_test(void)
{
int prev_dir, new_dir, check_dir = 0;
@@ -4166,7 +4166,7 @@ static bool run_test(void)
/* Check memorized grids */
if (c_ptr->info & (CAVE_MARK))
{
- bool notice = TRUE;
+ bool_ notice = TRUE;
/*
* Examine the terrain -- conditional disturbance
@@ -4579,7 +4579,7 @@ void do_cmd_pet(void)
char power_desc[36][80];
- bool flag, redraw;
+ bool_ flag, redraw;
int ask;
@@ -4589,7 +4589,7 @@ void do_cmd_pet(void)
int pets = 0, pet_ctr = 0;
- bool all_pets = FALSE;
+ bool_ all_pets = FALSE;
monster_type *m_ptr;
@@ -4867,9 +4867,9 @@ void do_cmd_pet(void)
if ((!(r_ptr->flags7 & RF7_NO_DEATH)) && ((m_ptr->status == MSTATUS_PET) || (m_ptr->status == MSTATUS_FRIEND))) /* Get rid of it! */
{
- bool checked = FALSE;
+ bool_ checked = FALSE;
char command;
- bool delete_this = FALSE;
+ bool_ delete_this = FALSE;
if (all_pets)
{
@@ -4936,7 +4936,7 @@ void do_cmd_pet(void)
if ((!(r_ptr->flags7 & RF7_NO_DEATH)) && ((m_ptr->status == MSTATUS_COMPANION))) /* Get rid of it! */
{
- bool delete_this = FALSE;
+ bool_ delete_this = FALSE;
if (all_pets)
delete_this = TRUE;
@@ -5014,7 +5014,7 @@ void do_cmd_pet(void)
/*
* Incarnate into a body
*/
-bool do_cmd_integrate_body()
+bool_ do_cmd_integrate_body()
{
cptr q, s;
@@ -5063,7 +5063,7 @@ bool do_cmd_integrate_body()
/*
* Leave a body
*/
-bool do_cmd_leave_body(bool drop_body)
+bool_ do_cmd_leave_body(bool_ drop_body)
{
object_type *o_ptr, forge;
@@ -5127,7 +5127,7 @@ bool do_cmd_leave_body(bool drop_body)
}
-bool execute_inscription(byte i, byte y, byte x)
+bool_ execute_inscription(byte i, byte y, byte x)
{
cave_type *c_ptr = &cave[y][x];
@@ -5226,7 +5226,7 @@ bool execute_inscription(byte i, byte y, byte x)
this_o_idx = next_o_idx)
{
object_type * o_ptr;
- bool plural = FALSE;
+ bool_ plural = FALSE;
char o_name[80];
diff --git a/src/cmd2.c b/src/cmd2.c
index 7d2a33b9..bf7899aa 100644
--- a/src/cmd2.c
+++ b/src/cmd2.c
@@ -17,7 +17,7 @@ void do_cmd_immovable_special(void);
/*
* Try to bash an altar
*/
-static bool do_cmd_bash_altar(int y, int x)
+static bool_ do_cmd_bash_altar(int y, int x)
{
msg_print("Are you mad? You want to anger the gods?");
return (FALSE);
@@ -27,13 +27,13 @@ static bool do_cmd_bash_altar(int y, int x)
/*
* Try to bash a fountain
*/
-static bool do_cmd_bash_fountain(int y, int x)
+static bool_ do_cmd_bash_fountain(int y, int x)
{
int bash, temp;
cave_type *c_ptr;
- bool more = TRUE;
+ bool_ more = TRUE;
monster_race *r_ptr = &r_info[p_ptr->body_monster];
@@ -85,7 +85,7 @@ static bool do_cmd_bash_fountain(int y, int x)
*/
void do_cmd_go_up(void)
{
- bool go_up = FALSE, go_up_many = FALSE, prob_traveling = FALSE;
+ bool_ go_up = FALSE, go_up_many = FALSE, prob_traveling = FALSE;
cave_type *c_ptr;
@@ -249,7 +249,7 @@ void do_cmd_go_up(void)
/*
* Returns TRUE if we are in the Between...
*/
-static bool between_effect(void)
+static bool_ between_effect(void)
{
byte bx, by;
@@ -297,9 +297,9 @@ void do_cmd_go_down(void)
{
cave_type *c_ptr;
- bool go_down = FALSE, go_down_many = FALSE, prob_traveling = FALSE;
+ bool_ go_down = FALSE, go_down_many = FALSE, prob_traveling = FALSE;
- bool fall_trap = FALSE;
+ bool_ fall_trap = FALSE;
char i;
@@ -632,7 +632,7 @@ static void chest_death(int y, int x, s16b o_idx)
{
int number;
- bool small;
+ bool_ small;
object_type forge;
object_type *q_ptr;
@@ -710,7 +710,7 @@ static void chest_trap(int y, int x, s16b o_idx)
object_type *o_ptr = &o_list[o_idx];
- bool ident = FALSE;
+ bool_ ident = FALSE;
/* Ignore disarmed chests */
@@ -740,13 +740,13 @@ static void chest_trap(int y, int x, s16b o_idx)
*
* Returns TRUE if repeated commands may continue
*/
-static bool do_cmd_open_chest(int y, int x, s16b o_idx)
+static bool_ do_cmd_open_chest(int y, int x, s16b o_idx)
{
int i, j;
- bool flag = TRUE;
+ bool_ flag = TRUE;
- bool more = FALSE;
+ bool_ more = FALSE;
object_type *o_ptr = &o_list[o_idx];
@@ -825,7 +825,7 @@ static bool do_cmd_open_chest(int y, int x, s16b o_idx)
/*
* Return TRUE if the given grid is an open door
*/
-static bool is_open(cave_type *c_ptr)
+static bool_ is_open(cave_type *c_ptr)
{
return (c_ptr->feat == FEAT_OPEN);
}
@@ -834,7 +834,7 @@ static bool is_open(cave_type *c_ptr)
/*
* Return TRUE if the given grid is a closed door
*/
-static bool is_closed(cave_type *c_ptr)
+static bool_ is_closed(cave_type *c_ptr)
{
byte feat;
@@ -848,7 +848,7 @@ static bool is_closed(cave_type *c_ptr)
/*
* Return TRUE if the given grid has a trap
*/
-static bool is_trap(cave_type *c_ptr)
+static bool_ is_trap(cave_type *c_ptr)
{
return ((c_ptr->info & (CAVE_TRDT)) != 0);
}
@@ -858,8 +858,8 @@ static bool is_trap(cave_type *c_ptr)
* Return the number of doors/traps around (or under)
* the character using the filter function 'test'
*/
-static int count_feats(int *y, int *x, bool (*test) (cave_type *c_ptr),
- bool under)
+static int count_feats(int *y, int *x, bool_ (*test) (cave_type *c_ptr),
+ bool_ under)
{
int d;
@@ -908,7 +908,7 @@ static int count_feats(int *y, int *x, bool (*test) (cave_type *c_ptr),
* Return the number of chests around (or under) the character.
* If requested, count only trapped chests.
*/
-static int count_chests(int *y, int *x, bool trapped)
+static int count_chests(int *y, int *x, bool_ trapped)
{
int d, count, o_idx;
@@ -984,13 +984,13 @@ static int coords_to_dir(int y, int x)
*
* Returns TRUE if repeated commands may continue
*/
-static bool do_cmd_open_aux(int y, int x, int dir)
+static bool_ do_cmd_open_aux(int y, int x, int dir)
{
int i, j;
cave_type *c_ptr;
- bool more = FALSE;
+ bool_ more = FALSE;
monster_race *r_ptr = &r_info[p_ptr->body_monster];
@@ -1105,7 +1105,7 @@ void do_cmd_open(void)
cave_type *c_ptr;
- bool more = FALSE;
+ bool_ more = FALSE;
monster_race *r_ptr = &r_info[p_ptr->body_monster];
@@ -1225,11 +1225,11 @@ void do_cmd_open(void)
*
* Returns TRUE if repeated commands may continue
*/
-static bool do_cmd_close_aux(int y, int x, int dir)
+static bool_ do_cmd_close_aux(int y, int x, int dir)
{
cave_type *c_ptr;
- bool more = FALSE;
+ bool_ more = FALSE;
monster_race *r_ptr = &r_info[p_ptr->body_monster];
@@ -1284,7 +1284,7 @@ void do_cmd_close(void)
cave_type *c_ptr;
- bool more = FALSE;
+ bool_ more = FALSE;
/* Option: Pick a direction */
@@ -1371,7 +1371,7 @@ void do_cmd_close(void)
/*
* Determine if a given grid may be "tunneled"
*/
-static bool do_cmd_tunnel_test(int y, int x)
+static bool_ do_cmd_tunnel_test(int y, int x)
{
/* Must have knowledge(execpt on "forget" levels) */
if (!(cave[y][x].info & (CAVE_MARK)))
@@ -1418,7 +1418,7 @@ static bool do_cmd_tunnel_test(int y, int x)
* This will, however, produce grids which are NOT illuminated
* (or darkened) along with the rest of the room.
*/
-static bool twall(int y, int x, byte feat)
+static bool_ twall(int y, int x, byte feat)
{
cave_type *c_ptr = &cave[y][x];
@@ -1451,14 +1451,14 @@ static bool twall(int y, int x, byte feat)
*
* Returns TRUE if repeated commands may continue
*/
-bool do_cmd_tunnel_aux(int y, int x, int dir)
+bool_ do_cmd_tunnel_aux(int y, int x, int dir)
{
int skill_req = 0, skill_req_1pct = 0;
cave_type *c_ptr = &cave[y][x];
feature_type *f_ptr = &f_info[c_ptr->feat];
- bool more = FALSE;
+ bool_ more = FALSE;
/* Must be have something to dig with (except for sandwalls) */
@@ -1542,10 +1542,10 @@ bool do_cmd_tunnel_aux(int y, int x, int dir)
((c_ptr->feat >= FEAT_SANDWALL) &&
(c_ptr->feat <= FEAT_SANDWALL_K)))
{
- bool okay = FALSE;
- bool gold = FALSE;
- bool hard = FALSE;
- bool soft = FALSE;
+ bool_ okay = FALSE;
+ bool_ gold = FALSE;
+ bool_ hard = FALSE;
+ bool_ soft = FALSE;
/* Found gold */
if ((c_ptr->feat >= FEAT_MAGMA_H) &&
@@ -1743,7 +1743,7 @@ void do_cmd_tunnel(void)
cave_type *c_ptr;
- bool more = FALSE;
+ bool_ more = FALSE;
if (p_ptr->wild_mode) return;
@@ -1823,7 +1823,7 @@ void do_cmd_tunnel(void)
* do_cmd_open_test() and do_cmd_open_aux().
*/
-bool easy_open_door(int y, int x)
+bool_ easy_open_door(int y, int x)
{
int i, j;
@@ -1938,11 +1938,11 @@ bool easy_open_door(int y, int x)
*
* Returns TRUE if repeated commands may continue
*/
-static bool do_cmd_disarm_chest(int y, int x, s16b o_idx)
+static bool_ do_cmd_disarm_chest(int y, int x, s16b o_idx)
{
int i, j;
- bool more = FALSE;
+ bool_ more = FALSE;
object_type *o_ptr = &o_list[o_idx];
@@ -2016,7 +2016,7 @@ static bool do_cmd_disarm_chest(int y, int x, s16b o_idx)
*
* Returns TRUE if repeated commands may continue
*/
-bool do_cmd_disarm_aux(int y, int x, int dir, int do_pickup)
+bool_ do_cmd_disarm_aux(int y, int x, int dir, int do_pickup)
{
int i, j, power;
@@ -2024,7 +2024,7 @@ bool do_cmd_disarm_aux(int y, int x, int dir, int do_pickup)
cptr name;
- bool more = FALSE;
+ bool_ more = FALSE;
/* Take a turn */
@@ -2133,7 +2133,7 @@ void do_cmd_disarm(void)
cave_type *c_ptr;
- bool more = FALSE;
+ bool_ more = FALSE;
/* Option: Pick a direction */
@@ -2234,13 +2234,13 @@ void do_cmd_disarm(void)
*
* Returns TRUE if repeated commands may continue
*/
-static bool do_cmd_bash_aux(int y, int x, int dir)
+static bool_ do_cmd_bash_aux(int y, int x, int dir)
{
int bash, temp;
cave_type *c_ptr;
- bool more = FALSE;
+ bool_ more = FALSE;
monster_race *r_ptr = &r_info[p_ptr->body_monster];
@@ -2354,7 +2354,7 @@ void do_cmd_bash(void)
cave_type *c_ptr;
- bool more = FALSE;
+ bool_ more = FALSE;
monster_race *r_ptr = &r_info[p_ptr->body_monster];
@@ -2451,7 +2451,7 @@ void do_cmd_alter(void)
cave_type *c_ptr;
- bool more = FALSE;
+ bool_ more = FALSE;
/* Allow repeated command */
@@ -2527,7 +2527,7 @@ void do_cmd_alter(void)
*
* XXX XXX XXX Let user choose a pile of spikes, perhaps?
*/
-static bool get_spike(int *ip)
+static bool_ get_spike(int *ip)
{
int i;
@@ -2631,11 +2631,11 @@ void do_cmd_spike(void)
}
-static void do_cmd_walk_jump(int pickup, bool disarm)
+static void do_cmd_walk_jump(int pickup, bool_ disarm)
{
int dir;
- bool more = FALSE;
+ bool_ more = FALSE;
/* Allow repeated command */
@@ -2694,7 +2694,7 @@ static void do_cmd_walk_jump(int pickup, bool disarm)
/*
* Support code for the "Walk" and "Jump" commands
*/
-void do_cmd_walk(int pickup, bool disarm)
+void do_cmd_walk(int pickup, bool_ disarm)
{
/* Move (usually pickup) */
@@ -3063,7 +3063,7 @@ void do_cmd_fire(void)
object_type *j_ptr;
- bool hit_body = FALSE;
+ bool_ hit_body = FALSE;
byte missile_attr;
@@ -3299,7 +3299,7 @@ void do_cmd_fire(void)
/* Did we hit it (penalize range) */
if (test_hit_fire(chance - cur_dis, m_ptr->ac, m_ptr->ml))
{
- bool fear = FALSE;
+ bool_ fear = FALSE;
/* Assume a default death */
cptr note_dies = " dies.";
@@ -3520,9 +3520,9 @@ void do_cmd_throw(void)
object_type *o_ptr;
- bool hit_body = FALSE;
+ bool_ hit_body = FALSE;
- bool hit_wall = FALSE;
+ bool_ hit_wall = FALSE;
byte missile_attr;
@@ -3735,7 +3735,7 @@ void do_cmd_throw(void)
/* Did we hit it (penalize range) */
if (test_hit_fire(chance - cur_dis, m_ptr->ac, m_ptr->ml))
{
- bool fear = FALSE;
+ bool_ fear = FALSE;
/* Assume a default death */
cptr note_dies = " dies.";
@@ -3915,9 +3915,9 @@ void do_cmd_boomerang(void)
object_type *o_ptr;
- bool hit_body = FALSE;
+ bool_ hit_body = FALSE;
- bool hit_wall = FALSE;
+ bool_ hit_wall = FALSE;
byte missile_attr;
@@ -4065,7 +4065,7 @@ void do_cmd_boomerang(void)
/* Did we hit it (penalize range) */
if (test_hit_fire(chance - cur_dis, m_ptr->ac, m_ptr->ml))
{
- bool fear = FALSE;
+ bool_ fear = FALSE;
/* Assume a default death */
cptr note_dies = " dies.";
@@ -4236,7 +4236,7 @@ void do_cmd_unwalk()
cave_type *c_ptr;
- bool more = FALSE;
+ bool_ more = FALSE;
if (!get_rep_dir(&dir)) return;
@@ -4399,7 +4399,7 @@ void do_cmd_unwalk()
}
-static bool tport_vertically(bool how)
+static bool_ tport_vertically(bool_ how)
{
/* arena or quest -KMW- */
if ((p_ptr->inside_arena) || (p_ptr->inside_quest))
@@ -4458,9 +4458,9 @@ void do_cmd_immovable_special(void)
int lose_hp = 0;
- bool did_act = FALSE;
+ bool_ did_act = FALSE;
- bool did_load = FALSE;
+ bool_ did_load = FALSE;
if (foo > 1)
@@ -4618,7 +4618,7 @@ void do_cmd_immovable_special(void)
}
/* Can we sacrifice it ? */
-static bool item_tester_hook_sacrifiable(object_type *o_ptr)
+static bool_ item_tester_hook_sacrifiable(object_type *o_ptr)
{
GOD(GOD_MELKOR)
{
@@ -4744,7 +4744,7 @@ void do_cmd_sacrifice(void)
*
* Return a list of o_list[] indexes of items of the given monster
*/
-bool scan_monst(int *items, int *item_num, int m_idx)
+bool_ scan_monst(int *items, int *item_num, int m_idx)
{
int this_o_idx, next_o_idx;
@@ -4904,7 +4904,7 @@ void do_cmd_steal()
byte num = 0;
- bool done = FALSE;
+ bool_ done = FALSE;
int monst_list[23];
diff --git a/src/cmd3.c b/src/cmd3.c
index 9c2b7aad..ef2e9409 100644
--- a/src/cmd3.c
+++ b/src/cmd3.c
@@ -145,7 +145,7 @@ void do_cmd_equip(void)
/*
* The "wearable" tester
*/
-static bool item_tester_hook_wear(object_type *o_ptr)
+static bool_ item_tester_hook_wear(object_type *o_ptr)
{
u32b f1, f2, f3, f4, f5, esp;
int slot = wield_slot(o_ptr);
@@ -183,7 +183,7 @@ static bool item_tester_hook_wear(object_type *o_ptr)
}
-bool is_slot_ok(int slot)
+bool_ is_slot_ok(int slot)
{
if ((slot >= INVEN_WIELD) && (slot < INVEN_TOTAL))
{
@@ -617,7 +617,7 @@ void do_cmd_destroy(void)
int old_number;
- bool force = FALSE;
+ bool_ force = FALSE;
object_type *o_ptr;
@@ -929,7 +929,7 @@ void do_cmd_inscribe(void)
/*
* An "item_tester_hook" for refilling lanterns
*/
-static bool item_tester_refill_lantern(object_type *o_ptr)
+static bool_ item_tester_refill_lantern(object_type *o_ptr)
{
/* Flasks of oil are okay */
if (o_ptr->tval == TV_FLASK) return (TRUE);
@@ -1023,7 +1023,7 @@ static void do_cmd_refill_lamp(void)
/*
* An "item_tester_hook" for refilling torches
*/
-static bool item_tester_refill_torch(object_type *o_ptr)
+static bool_ item_tester_refill_torch(object_type *o_ptr)
{
/* Torches are okay */
if ((o_ptr->tval == TV_LITE) &&
@@ -1415,7 +1415,7 @@ static cptr ident_info[] =
* We use "u" to point to array of monster indexes,
* and "v" to select the type of sorting to perform on "u".
*/
-static bool ang_sort_comp_hook(vptr u, vptr v, int a, int b)
+static bool_ ang_sort_comp_hook(vptr u, vptr v, int a, int b)
{
u16b *who = (u16b*)(u);
@@ -1581,19 +1581,19 @@ void do_cmd_query_symbol(void)
char buf[128];
- bool all = FALSE;
+ bool_ all = FALSE;
- bool uniq = FALSE;
+ bool_ uniq = FALSE;
- bool norm = FALSE;
+ bool_ norm = FALSE;
- bool name = FALSE;
+ bool_ name = FALSE;
char temp[80] = "";
- bool recall = FALSE;
+ bool_ recall = FALSE;
u16b why = 0;
@@ -1826,7 +1826,7 @@ void do_cmd_query_symbol(void)
* research_mon
* -KMW-
*/
-bool research_mon()
+bool_ research_mon()
{
int i, n, r_idx;
@@ -1839,19 +1839,19 @@ bool research_mon()
byte oldwake;
- bool oldcheat;
+ bool_ oldcheat;
- bool all = FALSE;
+ bool_ all = FALSE;
- bool uniq = FALSE;
+ bool_ uniq = FALSE;
- bool norm = FALSE;
+ bool_ norm = FALSE;
- bool notpicked;
+ bool_ notpicked;
- bool recall = FALSE;
+ bool_ recall = FALSE;
u16b why = 0;
@@ -2046,7 +2046,7 @@ bool research_mon()
/*
* Try to "sense" the grid's mana
*/
-bool do_cmd_sense_grid_mana()
+bool_ do_cmd_sense_grid_mana()
{
int chance, i;
@@ -2301,9 +2301,9 @@ void cli_add(cptr active, cptr trigger, cptr descr)
/*
* Get a string using CLI completion.
*/
-bool get_string_cli(cptr prompt, char *buf, int len)
+bool_ get_string_cli(cptr prompt, char *buf, int len)
{
- bool res;
+ bool_ res;
/* Paranoia XXX XXX XXX */
@@ -2422,7 +2422,7 @@ void do_cmd_cli_help()
void do_cmd_html_dump()
{
char tmp_val[81];
- bool html = TRUE;
+ bool_ html = TRUE;
term_win *save;
/* Save the screen */
diff --git a/src/cmd4.c b/src/cmd4.c
index ec0b6540..87c07dae 100644
--- a/src/cmd4.c
+++ b/src/cmd4.c
@@ -728,7 +728,7 @@ static void do_cmd_options_autosave(cptr info)
}
/* Switch an option by only knowing its name */
-bool change_option(cptr name, bool value)
+bool_ change_option(cptr name, bool_ value)
{
int i;
@@ -737,7 +737,7 @@ bool change_option(cptr name, bool value)
{
if (!strcmp(option_info[i].o_text, name))
{
- bool old = (*option_info[i].o_var);
+ bool_ old = (*option_info[i].o_var);
(*option_info[i].o_var) = value;
@@ -752,7 +752,7 @@ bool change_option(cptr name, bool value)
/*
* Interact with some options
*/
-void do_cmd_options_aux(int page, cptr info, bool read_only)
+void do_cmd_options_aux(int page, cptr info, bool_ read_only)
{
char ch;
@@ -889,7 +889,7 @@ static void do_cmd_options_win(void)
char ch;
- bool go = TRUE;
+ bool_ go = TRUE;
u32b old_flag[8];
@@ -1542,7 +1542,7 @@ static errr macro_dump(cptr fname)
*
* Note that both "flush()" calls are extremely important.
*/
-static void do_cmd_macro_aux(char *buf, bool macro_screen)
+static void do_cmd_macro_aux(char *buf, bool_ macro_screen)
{
int i, n = 0;
@@ -3014,7 +3014,7 @@ void do_cmd_load_screen(void)
byte a = 0;
char c = ' ';
- bool okay = TRUE;
+ bool_ okay = TRUE;
FILE *fff;
@@ -3263,12 +3263,12 @@ void do_cmd_knowledge_artifacts(void)
char base_name[80];
- bool *okay, *okayk;
+ bool_ *okay, *okayk;
/* Allocate the "okay" array */
- C_MAKE(okay, max_a_idx, bool);
- C_MAKE(okayk, max_k_idx, bool);
+ C_MAKE(okay, max_a_idx, bool_);
+ C_MAKE(okayk, max_k_idx, bool_);
/* Temporary file */
if (path_temp(file_name, 1024)) return;
@@ -3500,8 +3500,8 @@ void do_cmd_knowledge_artifacts(void)
/* Remove the file */
fd_kill(file_name);
- C_FREE(okay, max_a_idx, bool);
- C_FREE(okayk, max_k_idx, bool);
+ C_FREE(okay, max_a_idx, bool_);
+ C_FREE(okayk, max_k_idx, bool_);
}
@@ -3635,7 +3635,7 @@ static void do_cmd_knowledge_uniques(void)
/* Only print Uniques */
if (r_ptr->flags1 & (RF1_UNIQUE))
{
- bool dead = (r_ptr->max_num == 0);
+ bool_ dead = (r_ptr->max_num == 0);
/* Only display "known" uniques */
if (dead || cheat_know || r_ptr->r_sights)
@@ -3898,7 +3898,7 @@ static void do_cmd_knowledge_kill_count(void)
if (r_ptr->flags1 & (RF1_UNIQUE))
{
- bool dead = (r_ptr->max_num == 0);
+ bool_ dead = (r_ptr->max_num == 0);
if (dead)
{
@@ -3939,7 +3939,7 @@ static void do_cmd_knowledge_kill_count(void)
if (r_ptr->flags1 & (RF1_UNIQUE))
{
- bool dead = (r_ptr->max_num == 0);
+ bool_ dead = (r_ptr->max_num == 0);
if (dead)
{
diff --git a/src/cmd5.c b/src/cmd5.c
index eef65a68..3f5d4e8c 100644
--- a/src/cmd5.c
+++ b/src/cmd5.c
@@ -21,7 +21,7 @@ extern lua_State *L;
/* Maximum number of tries for teleporting */
#define MAX_TRIES 300
-bool is_school_book(object_type *o_ptr)
+bool_ is_school_book(object_type *o_ptr)
{
if (o_ptr->tval == TV_BOOK)
{
@@ -42,7 +42,7 @@ bool is_school_book(object_type *o_ptr)
}
/* Does it contains a schooled spell ? */
-static bool hook_school_spellable(object_type *o_ptr)
+static bool_ hook_school_spellable(object_type *o_ptr)
{
if (is_school_book(o_ptr))
return TRUE;
@@ -60,7 +60,7 @@ static bool hook_school_spellable(object_type *o_ptr)
}
/* Is it a book */
-bool item_tester_hook_browsable(object_type *o_ptr)
+bool_ item_tester_hook_browsable(object_type *o_ptr)
{
if (hook_school_spellable(o_ptr)) return TRUE;
if (o_ptr->tval >= TV_BOOK) return TRUE;
@@ -70,7 +70,7 @@ bool item_tester_hook_browsable(object_type *o_ptr)
/*
* Are we using a mage staff
*/
-bool is_magestaff()
+bool_ is_magestaff()
{
int i;
@@ -155,7 +155,7 @@ void do_poly_wounds(void)
s16b change = damroll(p_ptr->lev, 5);
- bool Nasty_effect = (randint(5) == 1);
+ bool_ Nasty_effect = (randint(5) == 1);
if (!(wounds || hit_p || Nasty_effect)) return;
@@ -461,11 +461,11 @@ void brand_weapon(int brand_type)
/*
* Fetch an item (teleport it right underneath the caster)
*/
-void fetch(int dir, int wgt, bool require_los)
+void fetch(int dir, int wgt, bool_ require_los)
{
int ty, tx, i;
- bool flag;
+ bool_ flag;
cave_type *c_ptr;
@@ -788,7 +788,7 @@ void wild_magic(int spell)
* Hack -- Determine if the player is wearing an artefact ring
* specified by art_type, that should be an index into a_info
*/
-bool check_ring(int art_type)
+bool_ check_ring(int art_type)
{
int i;
@@ -816,7 +816,7 @@ bool check_ring(int art_type)
/*
* Return the symbiote's name or description.
*/
-cptr symbiote_name(bool capitalize)
+cptr symbiote_name(bool_ capitalize)
{
object_type *o_ptr = &p_ptr->inventory[INVEN_CARRY];
static char buf[80];
@@ -859,7 +859,7 @@ cptr symbiote_name(bool capitalize)
/*
* Use a power of the monster in symbiosis
*/
-int use_symbiotic_power(int r_idx, bool great, bool only_number, bool no_cost)
+int use_symbiotic_power(int r_idx, bool_ great, bool_ only_number, bool_ no_cost)
{
int power = -1;
@@ -867,7 +867,7 @@ int use_symbiotic_power(int r_idx, bool great, bool only_number, bool no_cost)
int powers[96];
- bool flag, redraw;
+ bool_ flag, redraw;
int ask, plev = p_ptr->lev;
@@ -2108,7 +2108,7 @@ int use_symbiotic_power(int r_idx, bool great, bool only_number, bool no_cost)
*/
static int hack_force_spell = -1;
static object_type *hack_force_spell_obj = NULL;
-bool get_item_hook_find_spell(int *item)
+bool_ get_item_hook_find_spell(int *item)
{
int i, spell;
char buf[80];
@@ -2179,7 +2179,7 @@ s32b get_school_spell(cptr do_what, cptr check_fct, s16b force_book)
int num = 0;
s32b where = 1;
int ask;
- bool flag, redraw;
+ bool_ flag, redraw;
char choice;
char out_val[160];
char buf2[40];
@@ -2517,7 +2517,7 @@ void browse_school_spell(int book, int pval, object_type *o_ptr)
}
/* Can it contains a schooled spell ? */
-static bool hook_school_can_spellable(object_type *o_ptr)
+static bool_ hook_school_can_spellable(object_type *o_ptr)
{
u32b f1, f2, f3, f4, f5, esp;
diff --git a/src/cmd6.c b/src/cmd6.c
index 72c57f77..4f6c96ab 100644
--- a/src/cmd6.c
+++ b/src/cmd6.c
@@ -16,14 +16,14 @@
/*
* Forward declare
*/
-static bool activate_spell(object_type * o_ptr, byte choice);
+static bool_ activate_spell(object_type * o_ptr, byte choice);
/*
* General function to find an item by its name
*/
cptr get_item_hook_find_obj_what;
-bool get_item_hook_find_obj(int *item)
+bool_ get_item_hook_find_obj(int *item)
{
int i;
char buf[80];
@@ -95,12 +95,12 @@ bool get_item_hook_find_obj(int *item)
* Determine the effects of eating a corpse. A corpse can be
* eaten whole or cut into pieces for later.
*/
-static void corpse_effect(object_type *o_ptr, bool cutting)
+static void corpse_effect(object_type *o_ptr, bool_ cutting)
{
monster_race *r_ptr = &r_info[o_ptr->pval2];
/* Assume no bad effects */
- bool harmful = FALSE;
+ bool_ harmful = FALSE;
byte method, effect, d_dice, d_side;
@@ -907,7 +907,7 @@ static void corpse_effect(object_type *o_ptr, bool cutting)
/*
* Hook to determine if an object is eatable
*/
-static bool item_tester_hook_eatable(object_type *o_ptr)
+static bool_ item_tester_hook_eatable(object_type *o_ptr)
{
/* Foods and, well, corpses are edible */
if ((o_ptr->tval == TV_FOOD) || (o_ptr->tval == TV_CORPSE)) return (TRUE);
@@ -931,7 +931,7 @@ void do_cmd_eat_food(void)
cptr q, s;
- bool destroy = TRUE;
+ bool_ destroy = TRUE;
/* Restrict choices to food */
@@ -1324,7 +1324,7 @@ void do_cmd_eat_food(void)
{
case SV_CORPSE_CORPSE:
{
- bool no_meat = FALSE;
+ bool_ no_meat = FALSE;
/* Not all is edible. Apologies if messy. */
@@ -1792,7 +1792,7 @@ void do_cmd_cure_meat(void)
/*
* Hook to determine if an object is quaffable
*/
-static bool item_tester_hook_quaffable(object_type *o_ptr)
+static bool_ item_tester_hook_quaffable(object_type *o_ptr)
{
if ((o_ptr->tval == TV_POTION) || (o_ptr->tval == TV_POTION2)) return (TRUE);
@@ -1801,7 +1801,7 @@ static bool item_tester_hook_quaffable(object_type *o_ptr)
}
-static bool quaff_potion(int tval, int sval, int pval, int pval2)
+static bool_ quaff_potion(int tval, int sval, int pval, int pval2)
{
int ident = FALSE;
@@ -2621,7 +2621,7 @@ void do_cmd_drink_fountain(void)
{
cave_type *c_ptr = &cave[p_ptr->py][p_ptr->px];
- bool ident;
+ bool_ ident;
int tval, sval, pval = 0;
@@ -2790,7 +2790,7 @@ void do_cmd_fill_bottle(void)
/*
* Curse the players armor
*/
-bool curse_armor(void)
+bool_ curse_armor(void)
{
object_type *o_ptr;
@@ -2855,7 +2855,7 @@ bool curse_armor(void)
/*
* Curse the players weapon
*/
-bool curse_weapon(void)
+bool_ curse_weapon(void)
{
object_type *o_ptr;
@@ -2922,7 +2922,7 @@ bool curse_weapon(void)
/*
* Hook to determine if an object is readable
*/
-static bool item_tester_hook_readable(object_type *o_ptr)
+static bool_ item_tester_hook_readable(object_type *o_ptr)
{
if ((o_ptr->tval == TV_SCROLL) || (o_ptr->tval == TV_PARCHMENT)) return (TRUE);
@@ -4124,7 +4124,7 @@ void do_cmd_aim_wand(void)
/*
* Hook to determine if an object is zapable
*/
-static bool item_tester_hook_zapable(object_type *o_ptr)
+static bool_ item_tester_hook_zapable(object_type *o_ptr)
{
if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_ROD_MAIN)) return (TRUE);
@@ -4136,7 +4136,7 @@ static bool item_tester_hook_zapable(object_type *o_ptr)
/*
* Hook to determine if an object is attachable
*/
-static bool item_tester_hook_attachable(object_type *o_ptr)
+static bool_ item_tester_hook_attachable(object_type *o_ptr)
{
if ((o_ptr->tval == TV_ROD_MAIN) &&
(o_ptr->pval == SV_ROD_NOTHING)) return (TRUE);
@@ -4242,7 +4242,7 @@ void do_cmd_zap_rod(void)
int cost;
- bool require_dir;
+ bool_ require_dir;
object_type *o_ptr;
@@ -4255,7 +4255,7 @@ void do_cmd_zap_rod(void)
cptr q, s;
/* Hack -- let perception get aborted */
- bool use_charge = TRUE;
+ bool_ use_charge = TRUE;
/* No magic */
@@ -4729,7 +4729,7 @@ void do_cmd_zap_rod(void)
/*
* Hook to determine if an object is activable
*/
-static bool item_tester_hook_activate(object_type *o_ptr)
+static bool_ item_tester_hook_activate(object_type *o_ptr)
{
u32b f1, f2, f3, f4, f5, esp;
@@ -4793,7 +4793,7 @@ int ring_of_power()
/* Rewrite this -- pelpel */
if (summon_specific_friendly(p_ptr->py, p_ptr->px, ((plev * 3) / 2),
(plev > 47 ? SUMMON_HI_UNDEAD_NO_UNIQUES : SUMMON_UNDEAD),
- (bool)(((plev > 24) && (randint(3) == 1)) ? TRUE : FALSE)))
+ (bool_)(((plev > 24) && (randint(3) == 1)) ? TRUE : FALSE)))
{
msg_print("Cold winds begin to blow around you, "
"carrying with them the stench of decay...");
@@ -4851,7 +4851,7 @@ int ring_of_power()
/*
* Enchant some bolts
*/
-bool brand_bolts(void)
+bool_ brand_bolts(void)
{
int i;
@@ -5159,13 +5159,13 @@ void do_cmd_activate(void)
-const char *activation_aux(object_type * o_ptr, bool doit, int item)
+const char *activation_aux(object_type * o_ptr, bool_ doit, int item)
{
int plev = get_skill(SKILL_DEVICE);
int i = 0, ii = 0, ij = 0, k, dir, dummy = 0;
int chance;
- bool is_junkart = (o_ptr->tval == TV_RANDART);
+ bool_ is_junkart = (o_ptr->tval == TV_RANDART);
int spell = 0;
@@ -5815,7 +5815,7 @@ const char *activation_aux(object_type * o_ptr, bool doit, int item)
else
{
if (summon_specific_friendly(p_ptr->py, p_ptr->px, ((plev * 3) / 2),
- SUMMON_THUNDERLORD, (bool)(plev == 50 ? TRUE : FALSE)))
+ SUMMON_THUNDERLORD, (bool_)(plev == 50 ? TRUE : FALSE)))
{
msg_print("A Thunderlord comes from thin air!");
msg_print("'I will help you in your difficult task.'");
@@ -6510,7 +6510,7 @@ const char *activation_aux(object_type * o_ptr, bool doit, int item)
else
{
if (summon_specific_friendly(p_ptr->py, p_ptr->px, ((plev * 3) / 2),
- SUMMON_ELEMENTAL, (bool)(plev == 50 ? TRUE : FALSE)))
+ SUMMON_ELEMENTAL, (bool_)(plev == 50 ? TRUE : FALSE)))
{
msg_print("An elemental materialises...");
msg_print("It seems obedient to you.");
@@ -6536,7 +6536,7 @@ const char *activation_aux(object_type * o_ptr, bool doit, int item)
else
{
if (summon_specific_friendly(p_ptr->py, p_ptr->px, ((plev * 3) / 2),
- SUMMON_DEMON, (bool)(plev == 50 ? TRUE : FALSE)))
+ SUMMON_DEMON, (bool_)(plev == 50 ? TRUE : FALSE)))
{
msg_print("The area fills with a stench of sulphur and brimstone.");
msg_print("'What is thy bidding... Master?'");
@@ -6564,7 +6564,7 @@ const char *activation_aux(object_type * o_ptr, bool doit, int item)
{
if (summon_specific_friendly(p_ptr->py, p_ptr->px, ((plev * 3) / 2),
(plev > 47 ? SUMMON_HI_UNDEAD_NO_UNIQUES : SUMMON_UNDEAD),
- (bool)(((plev > 24) && (randint(3) == 1)) ? TRUE : FALSE)))
+ (bool_)(((plev > 24) && (randint(3) == 1)) ? TRUE : FALSE)))
{
msg_print("Cold winds begin to blow around you, carrying with them the stench of decay...");
msg_print("Ancient, long-dead forms arise from the ground to serve you!");
@@ -7904,7 +7904,7 @@ const char *activation_aux(object_type * o_ptr, bool doit, int item)
}
-static bool activate_spell(object_type * o_ptr, byte choice)
+static bool_ activate_spell(object_type * o_ptr, byte choice)
{
int mana = 0, gf = 0, mod = 0;
diff --git a/src/cmd7.c b/src/cmd7.c
index 16b943ad..53ab47c7 100644
--- a/src/cmd7.c
+++ b/src/cmd7.c
@@ -124,7 +124,7 @@ void mimic_info(char *p, int power)
* when you run it. It's probably easy to fix but I haven't tried,
* sorry.
*/
-bool get_magic_power(int *sn, magic_power *powers, int max_powers,
+bool_ get_magic_power(int *sn, magic_power *powers, int max_powers,
void (*power_info)(char *p, int power), int plev, int cast_stat)
{
int i;
@@ -151,7 +151,7 @@ bool get_magic_power(int *sn, magic_power *powers, int max_powers,
magic_power spell;
- bool flag, redraw;
+ bool_ flag, redraw;
/* Assume cancelled */
@@ -727,7 +727,7 @@ void do_cmd_mindcraft(void)
/* Damage WIS (possibly permanently) */
if (rand_int(100) < 50)
{
- bool perm = (rand_int(100) < 25);
+ bool_ perm = (rand_int(100) < 25);
/* Message */
msg_print("You have damaged your mind!");
@@ -849,7 +849,7 @@ void do_cmd_mimic_lore()
p_ptr->update |= (PU_BONUS);
}
-static bool mimic_forbid_travel(char *fmt)
+static bool_ mimic_forbid_travel(char *fmt)
{
u32b value = p_ptr->mimic_extra >> 16;
u32b att = p_ptr->mimic_extra & 0xFFFF;
@@ -879,7 +879,7 @@ void do_cmd_mimic(void)
magic_power spell;
- static bool added_hooks = FALSE;
+ static bool_ added_hooks = FALSE;
if(!added_hooks)
{
add_hook(HOOK_FORBID_TRAVEL, mimic_forbid_travel, "mimic_forbid_travel");
@@ -1145,7 +1145,7 @@ void do_cmd_mimic(void)
/* Damage WIS (possibly permanently) */
if (rand_int(100) < 50)
{
- bool perm = (rand_int(100) < 25);
+ bool_ perm = (rand_int(100) < 25);
/* Message */
msg_print("You have damaged your mind!");
@@ -1225,7 +1225,7 @@ int activation_select;
/* Return true if the player is wielding the philosopher's stone
*/
-bool alchemist_has_stone(void)
+bool_ alchemist_has_stone(void)
{
if (p_ptr->inventory[INVEN_LITE].name1 == 209)
return TRUE;
@@ -1436,7 +1436,7 @@ int calc_rqty(int i, int pval, int oldpval)
int check_artifact_items(int pval, int oldpval, int mode)
{
int i, j, k, row = 1 , col = 15, rqty, orqty, trqty;
- bool good = TRUE;
+ bool_ good = TRUE;
int temporary = -1;
char ch;
@@ -1480,7 +1480,7 @@ int check_artifact_items(int pval, int oldpval, int mode)
*/
if ( a_select_flags[i].rtval == TV_CORPSE )
{
- bool itemgood = TRUE;
+ bool_ itemgood = TRUE;
/*Specified race not this one */
if ( o_ptr->pval2 != a_select_flags[i].rpval && a_select_flags[i].rpval)
@@ -1639,12 +1639,12 @@ int check_artifact_items(int pval, int oldpval, int mode)
/* Display a list of required essences,
* and/or use up the essences. */
-bool artifact_display_or_use(int pval, int oldpval, bool use)
+bool_ artifact_display_or_use(int pval, int oldpval, bool_ use)
{
int essence[MAX_BATERIE_SVAL];
int essenceh[MAX_BATERIE_SVAL];
int al_idx, i, j, k;
- bool enough;
+ bool_ enough;
/* Temporary Items require only one item, and no essences. */
for ( i = 0 ; a_select_flags[i].group ; i++)
@@ -1706,7 +1706,7 @@ bool artifact_display_or_use(int pval, int oldpval, bool use)
if (!enough || !use )
{
int row = 1 , col = 15;
- bool good = FALSE;
+ bool_ good = FALSE;
char ch;
/* display of list of required essences */
@@ -1884,7 +1884,7 @@ void select_an_activation(void)
/* Consume 'num' magic essences and return true.
* If there aren't enough essences, return false */
-bool magic_essence(int num)
+bool_ magic_essence(int num)
{
int i;
int j = 0;
@@ -1947,7 +1947,7 @@ void do_cmd_create_artifact(object_type *q_ptr)
char out_val[160];
char choice = 0;
- bool lockpval = FALSE;
+ bool_ lockpval = FALSE;
int pval;
int oldpval;
energy_use = 100;
@@ -2378,7 +2378,7 @@ void do_cmd_create_artifact(object_type *q_ptr)
* recipes as a createable item. Used to determine if we
* should extract from it.
*/
-bool alchemist_exists(int tval, int sval, int ego, int artifact)
+bool_ alchemist_exists(int tval, int sval, int ego, int artifact)
{
int al_idx;
@@ -2407,7 +2407,7 @@ bool alchemist_exists(int tval, int sval, int ego, int artifact)
/*
* Hook to determine if an object can have things extracted from it.
*/
-bool item_tester_hook_extractable(object_type *o_ptr)
+bool_ item_tester_hook_extractable(object_type *o_ptr)
{
/* No artifacts */
@@ -2427,7 +2427,7 @@ bool item_tester_hook_extractable(object_type *o_ptr)
/*
* Hook to determine if an object is empowerable (NOT rechargeable)
*/
-bool item_tester_hook_empower(object_type *o_ptr)
+bool_ item_tester_hook_empower(object_type *o_ptr)
{
int sval = -1;
int lev = get_skill(SKILL_ALCHEMY);
@@ -2601,7 +2601,7 @@ void do_cmd_toggle_artifact(object_type *o_ptr)
if (!(o_ptr->art_flags4 & TR4_ART_EXP))
{
- bool okay = TRUE;
+ bool_ okay = TRUE;
if ( !alchemist_has_stone())
{
@@ -2670,10 +2670,10 @@ void do_cmd_toggle_artifact(object_type *o_ptr)
* if tocreate=0, will return true if the player has enough
* in their p_ptr->inventory to empower that item.
*/
-bool alchemist_items_check(int tval, int sval, int ego, int tocreate, bool message)
+bool_ alchemist_items_check(int tval, int sval, int ego, int tocreate, bool_ message)
{
int al_idx, j;
- bool exists = FALSE;
+ bool_ exists = FALSE;
for ( al_idx = 0 ; al_idx < max_al_idx ; al_idx++ )
@@ -2890,7 +2890,7 @@ void alchemist_recipe_book(void)
int num, max_num, i, al_idx, bat, kidx;
int choice[61], choice2[61];
int mod40;
- bool essence[MAX_BATERIE_SVAL + 1];
+ bool_ essence[MAX_BATERIE_SVAL + 1];
char ch;
/* Save and clear the screen */
@@ -3171,13 +3171,13 @@ void alchemist_recipe_book(void)
* This function needs to be able to scroll a list, because
* there are SO MANY potions. :)
*/
-int alchemist_recipe_select(int *tval, int sval, int ego, bool recipe)
+int alchemist_recipe_select(int *tval, int sval, int ego, bool_ recipe)
{
int i, mod40 = 0, num, max_num = 0;
cptr tval_desc2 = "";
char ch;
- bool done = FALSE;
+ bool_ done = FALSE;
int choice[60];
int validc[60];
@@ -3604,7 +3604,7 @@ void do_cmd_alchemist(void)
int item, ext = 0;
int value, basechance;
int askill;
- bool repeat = 0;
+ bool_ repeat = 0;
char ch;
object_type *o_ptr, *q_ptr;
@@ -4027,11 +4027,11 @@ void do_cmd_alchemist(void)
else if (ext == 2)
{
int ego;
- bool discharge_stick = FALSE;
+ bool_ discharge_stick = FALSE;
/* s_ptr holds the empty items */
object_type *s_ptr = NULL;
- bool carry_s_ptr = FALSE;
+ bool_ carry_s_ptr = FALSE;
item_tester_hook = item_tester_hook_extractable;
@@ -4160,7 +4160,7 @@ void do_cmd_alchemist(void)
{
/* Otherwise we must create a local copy of the empty item */
int tval, sval;
- bool create_item = TRUE;
+ bool_ create_item = TRUE;
tval = o_ptr->tval;
if ( !ego && (tval == TV_POTION || tval == TV_POTION2))
@@ -4494,7 +4494,7 @@ static void print_spell_batch(int batch, int max)
/*
* List ten random spells and ask to pick one.
*/
-static random_spell* select_spell_from_batch(int batch, bool quick)
+static random_spell* select_spell_from_batch(int batch, bool_ quick)
{
char tmp[160];
@@ -4656,7 +4656,7 @@ static random_spell* select_spell_from_batch(int batch, bool quick)
/*
* Pick a random spell from a menu
*/
-random_spell* select_spell(bool quick)
+random_spell* select_spell(bool_ quick)
{
char tmp[160];
@@ -5052,7 +5052,7 @@ void do_cmd_possessor()
if (ext == 1)
{
- bool use_great = FALSE;
+ bool_ use_great = FALSE;
if (p_ptr->disembodied)
{
@@ -5106,7 +5106,7 @@ void do_cmd_possessor()
/*
* Hook to determine if an object is contertible in an arrow/bolt
*/
-static bool item_tester_hook_convertible(object_type *o_ptr)
+static bool_ item_tester_hook_convertible(object_type *o_ptr)
{
if ((o_ptr->tval == TV_JUNK) || (o_ptr->tval == TV_SKELETON)) return TRUE;
@@ -5708,7 +5708,7 @@ void do_cmd_necromancer(void)
/* Damage CON (possibly permanently) */
if (rand_int(100) < 50)
{
- bool perm = (rand_int(100) < 25);
+ bool_ perm = (rand_int(100) < 25);
/* Message */
msg_print("You have damaged your body!");
@@ -5731,7 +5731,7 @@ static s32b rune_combine = 0;
/*
* Hook to determine if an object is "runestone"
*/
-static bool item_tester_hook_runestone(object_type *o_ptr)
+static bool_ item_tester_hook_runestone(object_type *o_ptr)
{
if (o_ptr->tval != TV_RUNE2) return (FALSE);
@@ -5744,7 +5744,7 @@ static bool item_tester_hook_runestone(object_type *o_ptr)
}
-static bool item_tester_hook_runestone_full(object_type *o_ptr)
+static bool_ item_tester_hook_runestone_full(object_type *o_ptr)
{
if (o_ptr->tval != TV_RUNE2) return (FALSE);
@@ -5760,7 +5760,7 @@ static bool item_tester_hook_runestone_full(object_type *o_ptr)
/*
* Hook to determine if an object is "rune-able"
*/
-static bool item_tester_hook_runeable1(object_type *o_ptr)
+static bool_ item_tester_hook_runeable1(object_type *o_ptr)
{
if (o_ptr->tval != TV_RUNE1) return (FALSE);
@@ -5772,7 +5772,7 @@ static bool item_tester_hook_runeable1(object_type *o_ptr)
/*
* Hook to determine if an object is "rune-able"
*/
-static bool item_tester_hook_runeable2(object_type *o_ptr)
+static bool_ item_tester_hook_runeable2(object_type *o_ptr)
{
if (o_ptr->tval != TV_RUNE2) return (FALSE);
@@ -6062,13 +6062,13 @@ int rune_exec(rune_spell *spell, int cost)
/*
* Test if all runes needed at in the player p_ptr->inventory
*/
-bool test_runespell(rune_spell *spell)
+bool_ test_runespell(rune_spell *spell)
{
int i;
object_type *o_ptr;
- bool typeok = FALSE;
+ bool_ typeok = FALSE;
int rune2 = 0;
@@ -6100,7 +6100,7 @@ bool test_runespell(rune_spell *spell)
/*
* Ask for rune, rune2 and mana
*/
-bool get_runespell(rune_spell *spell)
+bool_ get_runespell(rune_spell *spell)
{
int item, power_rune = 0, rune2 = 0, plev = get_skill(SKILL_RUNECRAFT);
@@ -6112,7 +6112,7 @@ bool get_runespell(rune_spell *spell)
cptr q, s;
- bool OK = FALSE;
+ bool_ OK = FALSE;
rune_combine = 0;
@@ -6265,7 +6265,7 @@ static void print_runespell_batch(int batch, int max)
* List ten random spells and ask to pick one.
*/
-static rune_spell* select_runespell_from_batch(int batch, bool quick,
+static rune_spell* select_runespell_from_batch(int batch, bool_ quick,
int *s_idx)
{
char tmp[160];
@@ -6364,7 +6364,7 @@ static rune_spell* select_runespell_from_batch(int batch, bool quick,
* Pick a random spell from a menu
*/
-rune_spell* select_runespell(bool quick, int *s_idx)
+rune_spell* select_runespell(bool_ quick, int *s_idx)
{
char tmp[160];
@@ -6707,7 +6707,7 @@ void do_cmd_rune_carve()
if (o_ptr->k_idx)
{
- bool do_del = FALSE;
+ bool_ do_del = FALSE;
if ((o_ptr->tval == TV_RUNE1) && (o_ptr->sval == s_ptr.type)) do_del = TRUE;
if ((o_ptr->tval == TV_RUNE2) && (BIT(o_ptr->sval) & s_ptr.rune2)) do_del = TRUE;
@@ -6988,7 +6988,7 @@ void do_cmd_unbeliever()
/*
* Hook to determine if an object is totemable
*/
-static bool item_tester_hook_totemable(object_type *o_ptr)
+static bool_ item_tester_hook_totemable(object_type *o_ptr)
{
/* Only full corpse */
if ((o_ptr->tval == TV_CORPSE) &&
@@ -7013,7 +7013,7 @@ void do_cmd_summoner_extract()
int item, r, e;
- bool partial;
+ bool_ partial;
/* Not when confused */
@@ -7104,7 +7104,7 @@ void summon_true(int r_idx, int item)
{
int i, status, x = 1, y = 1, rx, ry = 0, chance;
- bool used;
+ bool_ used;
monster_race *r_ptr = &r_info[r_idx];
@@ -7833,7 +7833,7 @@ void do_cmd_symbiotic(void)
/* Damage CON (possibly permanently) */
if (rand_int(100) < 50)
{
- bool perm = (rand_int(100) < 25);
+ bool_ perm = (rand_int(100) < 25);
/* Message */
msg_print("You have damaged your body!");
diff --git a/src/cmovie.c b/src/cmovie.c
index d7a3fa17..c7ba63d6 100644
--- a/src/cmovie.c
+++ b/src/cmovie.c
@@ -167,7 +167,7 @@ s16b do_play_cmovie(cptr cmov_file)
}
else
{
- bool stop = FALSE;
+ bool_ stop = FALSE;
while (TRUE)
{
diff --git a/src/dungeon.c b/src/dungeon.c
index 716bc8ac..2c394102 100644
--- a/src/dungeon.c
+++ b/src/dungeon.c
@@ -28,7 +28,7 @@ extern lua_State* L;
*/
/* #define SAVE_HACK */
#ifdef SAVE_HACK
-bool save_hack = TRUE;
+bool_ save_hack = TRUE;
#endif
@@ -226,7 +226,7 @@ byte value_check_aux2_magic(object_type *o_ptr)
/*
* Can a player be resurrected?
*/
-static bool granted_resurrection(void)
+static bool_ granted_resurrection(void)
{
PRAY_GOD(GOD_ERU)
{
@@ -309,7 +309,7 @@ void sense_inventory(void)
{
int i, combat_lev, magic_lev;
- bool heavy_combat, heavy_magic;
+ bool_ heavy_combat, heavy_magic;
byte feel;
@@ -495,7 +495,7 @@ static void pattern_teleport(void)
/*
* Returns TRUE if we are on the Straight Road...
*/
-static bool pattern_effect(void)
+static bool_ pattern_effect(void)
{
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);
@@ -800,7 +800,7 @@ static void regen_monsters(void)
*
* Should belong to object1.c, renamed to object_decays() -- pelpel
*/
-bool decays(object_type *o_ptr)
+bool_ decays(object_type *o_ptr)
{
u32b f1, f2, f3, f4, f5, esp;
@@ -1029,7 +1029,7 @@ void apply_effect(int y, int x)
/* XXX XXX XXX */
-bool is_recall = FALSE;
+bool_ is_recall = FALSE;
/*
@@ -1045,7 +1045,7 @@ static void process_world(void)
int x, y, i, j;
int regen_amount;
- bool cave_no_regen = FALSE;
+ bool_ cave_no_regen = FALSE;
int upkeep_factor = 0;
dungeon_info_type *d_ptr = &d_info[dungeon_type];
@@ -1147,7 +1147,7 @@ static void process_world(void)
/* Hack -- Daybreak/Nighfall in town */
if ((turn % ((10L * DAY) / 2)) == 0)
{
- bool dawn;
+ bool_ dawn;
/* Check for dawn */
dawn = ((turn % (10L * DAY)) == 0);
@@ -1796,7 +1796,7 @@ static void process_world(void)
/* Dead player */
if (p_ptr->chp < 0)
{
- bool old_quick = quick_messages;
+ bool_ old_quick = quick_messages;
/* Sound */
sound(SOUND_DEATH);
@@ -2547,7 +2547,7 @@ static void process_world(void)
{
u32b f1, f2, f3, f4, f5;
- bool be_silent = FALSE;
+ bool_ be_silent = FALSE;
/* check all equipment for the Black Breath flag. */
for (i = INVEN_WIELD; i < INVEN_TOTAL; i++)
@@ -3177,7 +3177,7 @@ static void process_world(void)
/*
* Verify use of "wizard" mode
*/
-static bool enter_wizard_mode(void)
+static bool_ enter_wizard_mode(void)
{
/* Ask first time, but not while loading a dead char with the -w option */
if (!noscore && !(p_ptr->chp < 0))
@@ -3205,7 +3205,7 @@ static bool enter_wizard_mode(void)
/*
* Verify use of "debug" commands
*/
-static bool enter_debug_mode(void)
+static bool_ enter_debug_mode(void)
{
/* Ask first time */
if (!noscore && !wizard)
@@ -4381,7 +4381,7 @@ void process_player(void)
/* Complete resting */
else if (resting == -2)
{
- bool stop = TRUE;
+ bool_ stop = TRUE;
object_type *o_ptr;
monster_race *r_ptr;
@@ -5209,11 +5209,11 @@ static void load_all_pref_files(void)
* savefile, we will commit suicide, if necessary, to allow the
* player to start a new game.
*/
-void play_game(bool new_game)
+void play_game(bool_ new_game)
{
int i, tmp_dun;
- bool cheat_death = FALSE;
+ bool_ cheat_death = FALSE;
hack_corruption = FALSE;
diff --git a/src/externs.h b/src/externs.h
index 435bff3e..5155d3fe 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -108,19 +108,19 @@ extern u32b sf_when;
extern u16b sf_lives;
extern u16b sf_saves;
extern u32b vernum; /* Version flag */
-extern bool arg_fiddle;
-extern bool arg_wizard;
-extern bool arg_sound;
-extern bool arg_graphics;
-extern bool arg_force_original;
-extern bool arg_force_roguelike;
-extern bool arg_bigtile;
-extern bool character_generated;
-extern bool character_dungeon;
-extern bool character_loaded;
-extern bool character_saved;
-extern bool character_icky;
-extern bool character_xtra;
+extern bool_ arg_fiddle;
+extern bool_ arg_wizard;
+extern bool_ arg_sound;
+extern bool_ arg_graphics;
+extern bool_ arg_force_original;
+extern bool_ arg_force_roguelike;
+extern bool_ arg_bigtile;
+extern bool_ character_generated;
+extern bool_ character_dungeon;
+extern bool_ character_loaded;
+extern bool_ character_saved;
+extern bool_ character_icky;
+extern bool_ character_xtra;
extern u32b seed_flavor;
extern s16b command_cmd;
extern s16b command_arg;
@@ -131,13 +131,13 @@ extern s16b command_wrk;
extern s16b command_new;
extern s32b energy_use;
extern s16b choose_default;
-extern bool create_up_stair;
-extern bool create_down_stair;
-extern bool create_up_shaft;
-extern bool create_down_shaft;
-extern bool msg_flag;
-extern bool alive;
-extern bool death;
+extern bool_ create_up_stair;
+extern bool_ create_down_stair;
+extern bool_ create_up_shaft;
+extern bool_ create_down_shaft;
+extern bool_ msg_flag;
+extern bool_ alive;
+extern bool_ death;
extern s16b running;
extern s16b resting;
extern s16b cur_hgt;
@@ -149,26 +149,26 @@ extern s16b object_level;
extern s16b monster_level;
extern s32b turn;
extern s32b old_turn;
-extern bool wizard;
-extern bool use_sound;
-extern bool use_graphics;
-extern bool use_bigtile;
+extern bool_ wizard;
+extern bool_ use_sound;
+extern bool_ use_graphics;
+extern bool_ use_bigtile;
extern byte graphics_mode;
extern u16b total_winner;
extern u16b has_won;
extern u16b panic_save;
extern u16b noscore;
extern s16b signal_count;
-extern bool inkey_base;
-extern bool inkey_xtra;
-extern bool inkey_scan;
-extern bool inkey_flag;
+extern bool_ inkey_base;
+extern bool_ inkey_xtra;
+extern bool_ inkey_scan;
+extern bool_ inkey_flag;
extern s16b coin_type;
-extern bool opening_chest;
-extern bool shimmer_monsters;
-extern bool shimmer_objects;
-extern bool repair_monsters;
-extern bool repair_objects;
+extern bool_ opening_chest;
+extern bool_ shimmer_monsters;
+extern bool_ shimmer_objects;
+extern bool_ repair_monsters;
+extern bool_ repair_objects;
extern s16b inven_nxt;
extern s16b inven_cnt;
extern s16b equip_cnt;
@@ -181,110 +181,110 @@ extern s16b hack_m_idx_ii;
extern int total_friends;
extern s32b total_friend_levels;
extern int leaving_quest;
-extern bool multi_rew;
+extern bool_ multi_rew;
extern char summon_kin_type;
-extern bool hack_mind;
-extern bool hack_corruption;
-extern bool is_autosave;
+extern bool_ hack_mind;
+extern bool_ hack_corruption;
+extern bool_ is_autosave;
extern int artifact_bias;
extern FILE *text_out_file;
extern void (*text_out_hook)(byte a, cptr str);
extern int text_out_wrap;
extern int text_out_indent;
extern int highscore_fd;
-extern bool show_inven_graph;
-extern bool show_store_graph;
-extern bool show_equip_graph;
-extern bool rogue_like_commands;
-extern bool quick_messages;
-extern bool other_query_flag;
-extern bool carry_query_flag;
-extern bool always_pickup;
-extern bool prompt_pickup_heavy;
-extern bool always_repeat;
-extern bool use_old_target;
-extern bool depth_in_feet;
-extern bool hilite_player;
-extern bool ring_bell;
-extern bool find_ignore_stairs;
-extern bool find_ignore_doors;
-extern bool find_cut;
-extern bool find_examine;
-extern bool disturb_near;
-extern bool disturb_move;
-extern bool disturb_panel;
-extern bool disturb_detect;
-extern bool disturb_state;
-extern bool disturb_minor;
-extern bool disturb_other;
-extern bool avoid_abort;
-extern bool avoid_shimmer;
-extern bool avoid_other;
-extern bool flush_disturb;
-extern bool flush_failure;
-extern bool flush_command;
-extern bool fresh_before;
-extern bool fresh_after;
-extern bool fresh_message;
-extern bool alert_hitpoint;
-extern bool alert_failure;
-extern bool view_yellow_lite;
-extern bool view_bright_lite;
-extern bool view_granite_lite;
-extern bool view_special_lite;
-extern bool plain_descriptions;
-extern bool stupid_monsters;
-extern bool auto_destroy;
-extern bool wear_confirm;
-extern bool confirm_stairs;
-extern bool disturb_pets;
-extern bool view_perma_grids;
-extern bool view_torch_grids;
-extern bool monster_lite;
-extern bool flow_by_sound;
-extern bool track_follow;
-extern bool track_target;
-extern bool stack_allow_items;
-extern bool stack_allow_wands;
-extern bool stack_force_notes;
-extern bool stack_force_costs;
-extern bool view_reduce_lite;
-extern bool view_reduce_view;
-extern bool auto_haggle;
-extern bool auto_scum;
-extern bool expand_look;
-extern bool expand_list;
-extern bool dungeon_align;
-extern bool dungeon_stair;
-extern bool smart_learn;
-extern bool smart_cheat;
-extern bool show_labels;
-extern bool show_weights;
-extern bool show_choices;
-extern bool show_details;
-extern bool testing_stack;
-extern bool testing_carry;
-extern bool cheat_peek;
-extern bool cheat_hear;
-extern bool cheat_room;
-extern bool cheat_xtra;
-extern bool cheat_know;
-extern bool cheat_live;
-extern bool last_words; /* Zangband options */
-extern bool speak_unique;
-extern bool small_levels;
-extern bool empty_levels;
-extern bool always_small_level;
-extern bool player_symbols;
+extern bool_ show_inven_graph;
+extern bool_ show_store_graph;
+extern bool_ show_equip_graph;
+extern bool_ rogue_like_commands;
+extern bool_ quick_messages;
+extern bool_ other_query_flag;
+extern bool_ carry_query_flag;
+extern bool_ always_pickup;
+extern bool_ prompt_pickup_heavy;
+extern bool_ always_repeat;
+extern bool_ use_old_target;
+extern bool_ depth_in_feet;
+extern bool_ hilite_player;
+extern bool_ ring_bell;
+extern bool_ find_ignore_stairs;
+extern bool_ find_ignore_doors;
+extern bool_ find_cut;
+extern bool_ find_examine;
+extern bool_ disturb_near;
+extern bool_ disturb_move;
+extern bool_ disturb_panel;
+extern bool_ disturb_detect;
+extern bool_ disturb_state;
+extern bool_ disturb_minor;
+extern bool_ disturb_other;
+extern bool_ avoid_abort;
+extern bool_ avoid_shimmer;
+extern bool_ avoid_other;
+extern bool_ flush_disturb;
+extern bool_ flush_failure;
+extern bool_ flush_command;
+extern bool_ fresh_before;
+extern bool_ fresh_after;
+extern bool_ fresh_message;
+extern bool_ alert_hitpoint;
+extern bool_ alert_failure;
+extern bool_ view_yellow_lite;
+extern bool_ view_bright_lite;
+extern bool_ view_granite_lite;
+extern bool_ view_special_lite;
+extern bool_ plain_descriptions;
+extern bool_ stupid_monsters;
+extern bool_ auto_destroy;
+extern bool_ wear_confirm;
+extern bool_ confirm_stairs;
+extern bool_ disturb_pets;
+extern bool_ view_perma_grids;
+extern bool_ view_torch_grids;
+extern bool_ monster_lite;
+extern bool_ flow_by_sound;
+extern bool_ track_follow;
+extern bool_ track_target;
+extern bool_ stack_allow_items;
+extern bool_ stack_allow_wands;
+extern bool_ stack_force_notes;
+extern bool_ stack_force_costs;
+extern bool_ view_reduce_lite;
+extern bool_ view_reduce_view;
+extern bool_ auto_haggle;
+extern bool_ auto_scum;
+extern bool_ expand_look;
+extern bool_ expand_list;
+extern bool_ dungeon_align;
+extern bool_ dungeon_stair;
+extern bool_ smart_learn;
+extern bool_ smart_cheat;
+extern bool_ show_labels;
+extern bool_ show_weights;
+extern bool_ show_choices;
+extern bool_ show_details;
+extern bool_ testing_stack;
+extern bool_ testing_carry;
+extern bool_ cheat_peek;
+extern bool_ cheat_hear;
+extern bool_ cheat_room;
+extern bool_ cheat_xtra;
+extern bool_ cheat_know;
+extern bool_ cheat_live;
+extern bool_ last_words; /* Zangband options */
+extern bool_ speak_unique;
+extern bool_ small_levels;
+extern bool_ empty_levels;
+extern bool_ always_small_level;
+extern bool_ player_symbols;
extern byte hitpoint_warn;
extern byte delay_factor;
extern s16b autosave_freq;
-extern bool autosave_t;
-extern bool autosave_l;
+extern bool_ autosave_t;
+extern bool_ autosave_l;
extern s16b feeling;
extern s16b rating;
-extern bool good_item_flag;
-extern bool closing_flag;
+extern bool_ good_item_flag;
+extern bool_ closing_flag;
extern s16b max_panel_rows, max_panel_cols;
extern s16b panel_row_min, panel_row_max;
extern s16b panel_col_min, panel_col_max;
@@ -310,7 +310,7 @@ extern char player_base[32];
extern char died_from[80];
extern char history[4][60];
extern char savefile[1024];
-extern bool savefile_setuid;
+extern bool_ savefile_setuid;
extern s16b lite_n;
extern s16b lite_y[LITE_MAX];
extern s16b lite_x[LITE_MAX];
@@ -323,7 +323,7 @@ extern byte temp_x[TEMP_MAX];
extern s16b macro__num;
extern cptr *macro__pat;
extern cptr *macro__act;
-extern bool *macro__cmd;
+extern bool_ *macro__cmd;
extern char *macro__buf;
extern s16b quark__num;
extern cptr *quark__str;
@@ -353,7 +353,7 @@ extern u16b max_towns;
extern town_type *town_info;
extern s16b alloc_kind_size;
extern alloc_entry *alloc_kind_table;
-extern bool alloc_kind_table_valid;
+extern bool_ alloc_kind_table_valid;
extern s16b alloc_race_size;
extern alloc_entry *alloc_race_table;
extern byte misc_to_attr[256];
@@ -478,16 +478,16 @@ extern cptr ANGBAND_DIR_USER;
extern cptr ANGBAND_DIR_XTRA;
extern cptr ANGBAND_DIR_CMOV;
extern char pref_tmp_value[8];
-extern bool item_tester_full;
+extern bool_ item_tester_full;
extern byte item_tester_tval;
-extern bool (*item_tester_hook)(object_type *o_ptr);
-extern bool (*ang_sort_comp)(vptr u, vptr v, int a, int b);
+extern bool_ (*item_tester_hook)(object_type *o_ptr);
+extern bool_ (*ang_sort_comp)(vptr u, vptr v, int a, int b);
extern void (*ang_sort_swap)(vptr u, vptr v, int a, int b);
-extern bool (*get_mon_num_hook)(int r_idx);
-extern bool (*get_mon_num2_hook)(int r_idx);
-extern bool (*get_obj_num_hook)(int k_idx);
-extern bool monk_armour_aux;
-extern bool monk_notify_aux;
+extern bool_ (*get_mon_num_hook)(int r_idx);
+extern bool_ (*get_mon_num2_hook)(int r_idx);
+extern bool_ (*get_obj_num_hook)(int k_idx);
+extern bool_ monk_armour_aux;
+extern bool_ monk_notify_aux;
extern u16b max_wild_x;
extern u16b max_wild_y;
extern wilderness_map **wild_map;
@@ -517,10 +517,10 @@ extern u16b max_ow_idx;
extern u16b max_wf_idx;
extern s16b max_set_idx;
extern int init_flags;
-extern bool ambush_flag;
-extern bool fate_flag;
+extern bool_ ambush_flag;
+extern bool_ fate_flag;
extern u16b no_breeds;
-extern bool carried_monster_hit;
+extern bool_ carried_monster_hit;
extern random_artifact random_artifacts[MAX_RANDARTS];
extern s32b RANDART_WEAPON;
extern s32b RANDART_ARMOR;
@@ -536,31 +536,31 @@ extern byte dungeon_type;
extern s16b *max_dlv;
extern u32b total_bounties;
extern s16b doppleganger;
-extern bool generate_encounter;
-extern bool autoroll;
-extern bool point_based;
-extern bool maximize, preserve, special_lvls, ironman_rooms;
-extern bool inventory_no_move;
-extern bool take_notes, auto_notes;
-extern bool *m_allow_special;
-extern bool *k_allow_special;
-extern bool *a_allow_special;
-extern bool rand_birth;
-extern bool fast_autoroller;
-extern bool joke_monsters;
-extern bool munchkin_multipliers;
-extern bool center_player;
+extern bool_ generate_encounter;
+extern bool_ autoroll;
+extern bool_ point_based;
+extern bool_ maximize, preserve, special_lvls, ironman_rooms;
+extern bool_ inventory_no_move;
+extern bool_ take_notes, auto_notes;
+extern bool_ *m_allow_special;
+extern bool_ *k_allow_special;
+extern bool_ *a_allow_special;
+extern bool_ rand_birth;
+extern bool_ fast_autoroller;
+extern bool_ joke_monsters;
+extern bool_ munchkin_multipliers;
+extern bool_ center_player;
#ifdef SAFER_PANICS
-extern bool panicload;
+extern bool_ panicload;
#endif
extern s16b plots[MAX_PLOTS];
extern random_quest random_quests[MAX_RANDOM_QUEST];
-extern bool exp_need;
-extern bool autoload_old_colors;
-extern bool fate_option;
-extern bool *special_lvl[MAX_DUNGEON_DEPTH];
-extern bool generate_special_feeling;
-extern bool auto_more;
+extern bool_ exp_need;
+extern bool_ autoload_old_colors;
+extern bool_ fate_option;
+extern bool_ *special_lvl[MAX_DUNGEON_DEPTH];
+extern bool_ generate_special_feeling;
+extern bool_ auto_more;
extern u32b dungeon_flags1;
extern u32b dungeon_flags2;
extern birther previous_char;
@@ -571,7 +571,7 @@ extern s16b power_max;
extern s32b extra_savefile_parts;
extern s16b max_q_idx;
extern quest_type *quest;
-extern bool player_char_health;
+extern bool_ player_char_health;
extern s16b max_spells;
extern spell_type *school_spells;
extern s16b max_schools;
@@ -583,11 +583,11 @@ extern char gen_skill_basem[MAX_SKILLS];
extern u32b gen_skill_base[MAX_SKILLS];
extern char gen_skill_modm[MAX_SKILLS];
extern s16b gen_skill_mod[MAX_SKILLS];
-extern bool linear_stats;
+extern bool_ linear_stats;
extern int max_bact;
extern s16b max_corruptions;
-extern bool option_ingame_help;
-extern bool automatizer_enabled;
+extern bool_ option_ingame_help;
+extern bool_ automatizer_enabled;
extern s16b last_teleportation_y;
extern s16b last_teleportation_x;
extern cptr game_module;
@@ -603,7 +603,7 @@ extern const char *get_version_string();
/* plots.c */
extern FILE *hook_file;
-extern bool check_hook(int h_idx);
+extern bool_ check_hook(int h_idx);
extern void wipe_hooks(void);
extern void dump_hooks(int h_idx);
extern void init_hooks(void);
@@ -614,26 +614,26 @@ extern void del_hook_name(int h_idx, cptr name);
extern s32b get_next_arg(char *fmt);
extern int process_hooks_restart;
extern hook_return process_hooks_return[20];
-extern bool process_hooks_ret(int h_idx, char *ret, char *fmt, ...);
-extern bool process_hooks(int h_idx, char *fmt, ...);
+extern bool_ process_hooks_ret(int h_idx, char *ret, char *fmt, ...);
+extern bool_ process_hooks(int h_idx, char *fmt, ...);
/* help.c */
-extern void ingame_help(bool enable);
+extern void ingame_help(bool_ enable);
/* birth.c */
extern void print_desc_aux(cptr txt, int y, int x);
extern void save_savefile_names(void);
-extern bool no_begin_screen;
-extern bool begin_screen(void);
+extern bool_ no_begin_screen;
+extern bool_ begin_screen(void);
extern errr init_randart(void);
extern void get_height_weight(void);
extern void player_birth(void);
/* cave.c */
extern int distance(int y1, int x1, int y2, int x2);
-extern bool los(int y1, int x1, int y2, int x2);
-extern bool cave_valid_bold(int y, int x);
-extern bool no_lite(void);
+extern bool_ los(int y1, int x1, int y2, int x2);
+extern bool_ cave_valid_bold(int y, int x);
+extern bool_ no_lite(void);
#ifdef USE_TRANSPARENCY
#ifdef USE_EGO_GRAPHICS
extern void map_info(int y, int x, byte *ap, char *cp, byte *tap, char *tcp, byte *eap, char *ecp);
@@ -667,7 +667,7 @@ extern void place_floor(int y, int x);
extern void place_floor_convert_glass(int y, int x);
extern void place_filler(int y, int x);
extern void mmove2(int *y, int *x, int y1, int x1, int y2, int x2);
-extern bool projectable(int y1, int x1, int y2, int x2);
+extern bool_ projectable(int y1, int x1, int y2, int x2);
extern void scatter(int *yp, int *xp, int y, int x, int d, int m);
extern void health_track(int m_idx);
extern void monster_race_track(int r_idx, int ego);
@@ -689,23 +689,23 @@ extern void do_cmovie_insert(void);
/* cmd1.c */
extern void attack_special(monster_type *m_ptr, s32b special, int dam);
-extern bool test_hit_fire(int chance, int ac, int vis);
-extern bool test_hit_norm(int chance, int ac, int vis);
+extern bool_ test_hit_fire(int chance, int ac, int vis);
+extern bool_ test_hit_norm(int chance, int ac, int vis);
extern s16b critical_shot(int weight, int plus, int dam, int skill);
-extern s16b critical_norm(int weight, int plus, int dam, int weapon_tval, bool *done_crit);
+extern s16b critical_norm(int weight, int plus, int dam, int weapon_tval, bool_ *done_crit);
extern s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, s32b *special);
extern void search(void);
extern void carry(int pickup);
extern void py_attack(int y, int x, int max_blow);
-extern bool player_can_enter(byte feature);
-extern void move_player(int dir, int do_pickup, bool disarm);
-extern void move_player_aux(int dir, int do_pickup, int run, bool disarm);
+extern bool_ player_can_enter(byte feature);
+extern void move_player(int dir, int do_pickup, bool_ disarm);
+extern void move_player_aux(int dir, int do_pickup, int run, bool_ disarm);
extern void run_step(int dir);
extern void step_effects(int y, int x, int do_pickup);
extern void do_cmd_pet(void);
-extern bool do_cmd_integrate_body(void);
-extern bool do_cmd_leave_body(bool drop_body);
-extern bool execute_inscription(byte i, byte y, byte x);
+extern bool_ do_cmd_integrate_body(void);
+extern bool_ do_cmd_leave_body(bool_ drop_body);
+extern bool_ execute_inscription(byte i, byte y, byte x);
extern void do_cmd_engrave(void);
extern void do_spin(void);
@@ -720,14 +720,14 @@ extern void do_cmd_open(void);
extern void do_cmd_close(void);
extern void do_cmd_chat(void);
extern void do_cmd_give(void);
-extern bool do_cmd_tunnel_aux(int y, int x, int dir);
+extern bool_ do_cmd_tunnel_aux(int y, int x, int dir);
extern void do_cmd_tunnel(void);
extern void do_cmd_disarm(void);
extern void do_cmd_disarm(void);
extern void do_cmd_bash(void);
extern void do_cmd_alter(void);
extern void do_cmd_spike(void);
-extern void do_cmd_walk(int pickup, bool disarm);
+extern void do_cmd_walk(int pickup, bool_ disarm);
extern void do_cmd_stay(int pickup);
extern void do_cmd_run(void);
extern void do_cmd_rest(void);
@@ -737,7 +737,7 @@ extern void do_cmd_throw(void);
extern void do_cmd_boomerang(void);
extern void do_cmd_unwalk(void);
extern void do_cmd_immovable_special(void);
-extern void fetch(int dir, int wgt, bool require_los);
+extern void fetch(int dir, int wgt, bool_ require_los);
extern void do_cmd_sacrifice(void);
extern void do_cmd_create_artifact(object_type *q_ptr);
extern void do_cmd_steal(void);
@@ -762,14 +762,14 @@ extern void do_cmd_target(void);
extern void do_cmd_look(void);
extern void do_cmd_locate(void);
extern void do_cmd_query_symbol(void);
-extern bool do_cmd_sense_grid_mana(void);
-extern bool research_mon(void);
+extern bool_ do_cmd_sense_grid_mana(void);
+extern bool_ research_mon(void);
extern s32b portable_hole_weight(void);
extern void set_portable_hole_weight(void);
extern void do_cmd_portable_hole(void);
/* cmd4.c */
-extern bool change_option(cptr name, bool value);
+extern bool_ change_option(cptr name, bool_ value);
extern void macro_recorder_start(void);
extern void macro_recorder_add(char c);
extern void macro_recorder_stop(void);
@@ -794,11 +794,11 @@ extern void do_cmd_checkquest(void);
extern void do_cmd_change_tactic(int i);
extern void do_cmd_change_movement(int i);
extern void do_cmd_time(void);
-extern void do_cmd_options_aux(int page, cptr info, bool read_only);
+extern void do_cmd_options_aux(int page, cptr info, bool_ read_only);
/* cmd5.c */
-extern bool is_magestaff(void);
+extern bool_ is_magestaff(void);
extern void calc_magic_bonus(void);
extern void do_cmd_browse_aux(object_type *o_ptr);
extern void do_cmd_browse(void);
@@ -806,18 +806,18 @@ extern void do_cmd_cast(void);
extern void do_cmd_pray(void);
extern void do_cmd_rerate(void);
extern void corrupt_player(void);
-extern bool item_tester_hook_armour(object_type *o_ptr);
-extern void fetch(int dir, int wgt, bool require_los);
+extern bool_ item_tester_hook_armour(object_type *o_ptr);
+extern void fetch(int dir, int wgt, bool_ require_los);
extern void do_poly_self(void);
extern void brand_weapon(int brand_type);
-extern cptr symbiote_name(bool capitalize);
-extern int use_symbiotic_power(int r_idx, bool great, bool only_number, bool no_cost);
+extern cptr symbiote_name(bool_ capitalize);
+extern int use_symbiotic_power(int r_idx, bool_ great, bool_ only_number, bool_ no_cost);
extern s32b get_school_spell(cptr do_what, cptr check_fct, s16b force_book);
extern void do_cmd_copy_spell(void);
extern void cast_school_spell(void);
extern void browse_school_spell(int book, int pval, object_type *o_ptr);
extern int find_spell(char *name);
-extern bool is_school_book(object_type *o_ptr);
+extern bool_ is_school_book(object_type *o_ptr);
/* cmd6.c */
extern void set_stick_mode(object_type *o_ptr);
@@ -828,7 +828,7 @@ extern void do_cmd_read_scroll(void);
extern void do_cmd_aim_wand(void);
extern void do_cmd_use_staff(void);
extern void do_cmd_zap_rod(void);
-extern const char *activation_aux(object_type *o_ptr, bool desc, int item);
+extern const char *activation_aux(object_type *o_ptr, bool_ desc, int item);
extern void do_cmd_activate(void);
extern void do_cmd_rerate(void);
extern void do_cmd_cut_corpse(void);
@@ -843,20 +843,20 @@ extern void necro_info(char *p, int power);
extern void mindcraft_info(char *p, int power);
extern void symbiotic_info(char *p, int power);
extern void mimic_info(char *p, int power);
-extern random_spell* select_spell(bool quick);
+extern random_spell* select_spell(bool_ quick);
extern void cast_magic_spell(int spell, byte level);
extern void do_cmd_summoner(void);
extern void do_cmd_mindcraft(void);
extern void do_cmd_mimic(void);
extern void do_cmd_blade(void);
extern void use_ability_blade(void);
-extern bool alchemist_exists(int tval, int sval, int ego, int artifact);
+extern bool_ alchemist_exists(int tval, int sval, int ego, int artifact);
extern void rod_tip_extract(object_type *o_ptr);
extern void do_cmd_toggle_artifact(object_type *o_ptr);
-extern bool alchemist_items_check(int tval, int sval, int ego, int tocreate, bool message);
+extern bool_ alchemist_items_check(int tval, int sval, int ego, int tocreate, bool_ message);
extern void alchemist_display_recipe(int tval, int sval, int ego);
extern void alchemist_recipe_book(void);
-extern int alchemist_recipe_select(int *tval, int sval, int ego, bool recipe);
+extern int alchemist_recipe_select(int *tval, int sval, int ego, bool_ recipe);
extern int alchemist_learn_object(object_type *o_ptr);
extern void alchemist_gain_level(int lev);
extern void do_cmd_alchemist(void);
@@ -878,7 +878,7 @@ extern byte value_check_aux1(object_type *o_ptr);
extern byte value_check_aux1_magic(object_type *o_ptr);
extern byte value_check_aux2(object_type *o_ptr);
extern byte value_check_aux2_magic(object_type *o_ptr);
-extern void play_game(bool new_game);
+extern void play_game(bool_ new_game);
extern void sense_inventory();
/* files.c */
@@ -891,15 +891,15 @@ extern void safe_setuid_grab(void);
extern s16b tokenize(char *buf, s16b num, char **tokens, char delim1, char delim2);
extern void display_player(int mode);
extern cptr describe_player_location(void);
-extern errr file_character(cptr name, bool full);
+extern errr file_character(cptr name, bool_ full);
extern errr process_pref_file_aux(char *buf);
extern errr process_pref_file(cptr name);
extern void read_times(void);
-extern bool txt_to_html(cptr head, cptr food, cptr base, cptr ext, bool force, bool recur);
-extern bool show_file(cptr name, cptr what, int line, int mode);
+extern bool_ txt_to_html(cptr head, cptr food, cptr base, cptr ext, bool_ force, bool_ recur);
+extern bool_ show_file(cptr name, cptr what, int line, int mode);
extern void do_cmd_help(void);
extern void process_player_base(void);
-extern void process_player_name(bool sf);
+extern void process_player_name(bool_ sf);
extern void get_name(void);
extern void do_cmd_suicide(void);
extern void do_cmd_save_game(void);
@@ -919,19 +919,19 @@ extern void show_highclass(int building);
extern errr get_xtra_line(char * file_name, monster_type *m_ptr, char * output);
/* gen_maze.c */
-extern bool level_generate_maze(cptr name);
+extern bool_ level_generate_maze(cptr name);
/* gen_life.c */
-extern bool level_generate_life(cptr name);
-extern void evolve_level(bool noise);
+extern bool_ level_generate_life(cptr name);
+extern void evolve_level(bool_ noise);
/* generate.c */
-extern bool new_player_spot(int branch);
-extern void add_level_generator(cptr name, bool (*generator)(cptr), bool stairs, bool monsters, bool objects, bool miscs);
-extern bool level_generate_dungeon(cptr name);
-extern bool generate_fracave(int y0, int x0,int xsize,int ysize,int cutoff,bool light,bool room);
+extern bool_ new_player_spot(int branch);
+extern void add_level_generator(cptr name, bool_ (*generator)(cptr), bool_ stairs, bool_ monsters, bool_ objects, bool_ miscs);
+extern bool_ level_generate_dungeon(cptr name);
+extern bool_ generate_fracave(int y0, int x0,int xsize,int ysize,int cutoff,bool_ light,bool_ room);
extern void generate_hmap(int y0, int x0,int xsiz,int ysiz,int grd,int roug,int cutoff);
-extern bool room_alloc(int x,int y,bool crowded,int by0,int bx0,int *xx,int *yy);
+extern bool_ room_alloc(int x,int y,bool_ crowded,int by0,int bx0,int *xx,int *yy);
extern void generate_grid_mana(void);
extern byte calc_dungeon_type(void);
extern void generate_cave(void);
@@ -939,7 +939,7 @@ extern void build_rectangle(int y1, int x1, int y2, int x2, int feat, int info);
/* wild.c */
-extern int generate_area(int y, int x, bool border, bool corner, bool refresh);
+extern int generate_area(int y, int x, bool_ border, bool_ corner, bool_ refresh);
extern void wilderness_gen(int refresh);
extern void wilderness_gen_small(void);
extern void reveal_wilderness_around_player(int y, int x, int h, int w);
@@ -953,7 +953,7 @@ extern errr init_player_info_txt(FILE *fp, char *buf);
extern errr init_ab_info_txt(FILE *fp, char *buf);
extern errr init_s_info_txt(FILE *fp, char *buf);
extern errr init_set_info_txt(FILE *fp, char *buf);
-extern errr init_v_info_txt(FILE *fp, char *buf, bool start);
+extern errr init_v_info_txt(FILE *fp, char *buf, bool_ start);
extern errr init_f_info_txt(FILE *fp, char *buf);
extern errr init_k_info_txt(FILE *fp, char *buf);
extern errr init_a_info_txt(FILE *fp, char *buf);
@@ -969,8 +969,8 @@ extern errr init_ba_info_txt(FILE *fp, char *buf);
extern errr init_st_info_txt(FILE *fp, char *buf);
extern errr init_ow_info_txt(FILE *fp, char *buf);
extern errr init_wf_info_txt(FILE *fp, char *buf);
-extern bool process_dungeon_file_full;
-extern errr process_dungeon_file(cptr full_text, cptr name, int *yval, int *xval, int ymax, int xmax, bool init);
+extern bool_ process_dungeon_file_full;
+extern errr process_dungeon_file(cptr full_text, cptr name, int *yval, int *xval, int ymax, int xmax, bool_ init);
/* init2.c */
extern void init_corruptions(s16b new_size);
@@ -991,14 +991,14 @@ extern u32b fake_text_size;
/* loadsave.c */
extern void register_savefile(int num);
-extern bool file_exist(char *buf);
+extern bool_ file_exist(char *buf);
extern s16b rd_variable(void);
extern void wr_variable(s16b *var);
extern void wr_scripts(void);
-extern bool load_dungeon(char *ext);
+extern bool_ load_dungeon(char *ext);
extern void save_dungeon(void);
-extern bool save_player(void);
-extern bool load_player(void);
+extern bool_ save_player(void);
+extern bool_ load_player(void);
extern errr rd_savefile_new(void);
extern void load_number_key(char *key, u32b *val);
extern void save_number_key(char *key, u32b val);
@@ -1006,11 +1006,11 @@ extern void save_number_key(char *key, u32b val);
/* melee1.c */
/* melee2.c */
extern int monst_spell_monst_spell;
-extern bool mon_take_hit_mon(int s_idx, int m_idx, int dam, bool *fear, cptr note);
+extern bool_ mon_take_hit_mon(int s_idx, int m_idx, int dam, bool_ *fear, cptr note);
extern int check_hit2(int power, int level, int ac);
-extern bool carried_make_attack_normal(int r_idx);
-extern bool make_attack_normal(int m_idx, byte divis);
-extern bool make_attack_spell(int m_idx);
+extern bool_ carried_make_attack_normal(int r_idx);
+extern bool_ make_attack_normal(int m_idx, byte divis);
+extern bool_ make_attack_spell(int m_idx);
extern void process_monsters(void);
extern void curse_equipment(int chance, int heavy_chance);
extern void curse_equipment_dg(int chance, int heavy_chance);
@@ -1025,12 +1025,12 @@ extern void monster_set_level(int m_idx, int level);
extern s32b modify_aux(s32b a, s32b b, char mod);
extern void monster_msg(cptr fmt, ...);
extern void cmonster_msg(char a, cptr fmt, ...);
-extern bool mego_ok(int r_idx, int ego);
-extern void monster_check_experience(int m_idx, bool silent);
-extern void monster_gain_exp(int m_idx, u32b exp, bool silent);
+extern bool_ mego_ok(int r_idx, int ego);
+extern void monster_check_experience(int m_idx, bool_ silent);
+extern void monster_gain_exp(int m_idx, u32b exp, bool_ silent);
extern monster_race* race_info_idx(int r_idx, int ego);
extern int get_wilderness_flag(void);
-extern void sanity_blast(monster_type * m_ptr, bool necro);
+extern void sanity_blast(monster_type * m_ptr, bool_ necro);
extern void delete_monster_idx(int i);
extern void delete_monster(int y, int x);
extern void compact_monsters(int size);
@@ -1042,61 +1042,61 @@ extern void monster_desc(char *desc, monster_type *m_ptr, int mode);
extern void monster_race_desc(char *desc, int r_idx, int ego);
extern void lore_do_probe(int m_idx);
extern void lore_treasure(int m_idx, int num_item, int num_gold);
-extern void update_mon(int m_idx, bool full);
-extern void update_monsters(bool full);
+extern void update_mon(int m_idx, bool_ full);
+extern void update_monsters(bool_ full);
extern void monster_carry(monster_type *m_ptr, int m_idx, object_type *q_ptr);
-extern bool bypass_r_ptr_max_num ;
-extern bool place_monster_aux(int y, int x, int r_idx, bool slp, bool grp, int status);
-extern bool place_monster(int y, int x, bool slp, bool grp);
-extern bool alloc_horde(int y, int x);
-extern bool alloc_monster(int dis, bool slp);
-extern bool summon_specific_okay(int r_idx);
+extern bool_ bypass_r_ptr_max_num ;
+extern bool_ place_monster_aux(int y, int x, int r_idx, bool_ slp, bool_ grp, int status);
+extern bool_ place_monster(int y, int x, bool_ slp, bool_ grp);
+extern bool_ alloc_horde(int y, int x);
+extern bool_ alloc_monster(int dis, bool_ slp);
+extern bool_ summon_specific_okay(int r_idx);
extern int summon_specific_level;
-extern bool summon_specific(int y1, int x1, int lev, int type);
+extern bool_ summon_specific(int y1, int x1, int lev, int type);
extern void monster_swap(int y1, int x1, int y2, int x2);
-extern bool multiply_monster(int m_idx, bool charm, bool clone);
-extern bool hack_message_pain_may_silent;
+extern bool_ multiply_monster(int m_idx, bool_ charm, bool_ clone);
+extern bool_ hack_message_pain_may_silent;
extern void message_pain(int m_idx, int dam);
extern void update_smart_learn(int m_idx, int what);
-extern bool summon_specific_friendly(int y1, int x1, int lev, int type, bool Group_ok);
-extern bool place_monster_one_no_drop;
+extern bool_ summon_specific_friendly(int y1, int x1, int lev, int type, bool_ Group_ok);
+extern bool_ place_monster_one_no_drop;
extern monster_race *place_monster_one_race;
-extern s16b place_monster_one(int y, int x, int r_idx, int ego, bool slp, int status);
+extern s16b place_monster_one(int y, int x, int r_idx, int ego, bool_ slp, int status);
extern s16b player_place(int y, int x);
extern void monster_drop_carried_objects(monster_type *m_ptr);
-extern bool monster_dungeon(int r_idx);
-extern bool monster_quest(int r_idx);
-extern bool monster_ocean(int r_idx);
-extern bool monster_shore(int r_idx);
-extern bool monster_town(int r_idx);
-extern bool monster_wood(int r_idx);
-extern bool monster_volcano(int r_idx);
-extern bool monster_mountain(int r_idx);
-extern bool monster_grass(int r_idx);
-extern bool monster_deep_water(int r_idx);
-extern bool monster_shallow_water(int r_idx);
-extern bool monster_lava(int r_idx);
+extern bool_ monster_dungeon(int r_idx);
+extern bool_ monster_quest(int r_idx);
+extern bool_ monster_ocean(int r_idx);
+extern bool_ monster_shore(int r_idx);
+extern bool_ monster_town(int r_idx);
+extern bool_ monster_wood(int r_idx);
+extern bool_ monster_volcano(int r_idx);
+extern bool_ monster_mountain(int r_idx);
+extern bool_ monster_grass(int r_idx);
+extern bool_ monster_deep_water(int r_idx);
+extern bool_ monster_shallow_water(int r_idx);
+extern bool_ monster_lava(int r_idx);
extern void set_mon_num_hook(void);
extern void set_mon_num2_hook(int y, int x);
-extern bool monster_can_cross_terrain(byte feat, monster_race *r_ptr);
+extern bool_ monster_can_cross_terrain(byte feat, monster_race *r_ptr);
extern void corrupt_corrupted(void);
/* monster3.c */
extern void dump_companions(FILE *outfile);
extern void do_cmd_companion(void);
-extern bool do_control_reconnect(void);
-extern bool do_control_drop(void);
-extern bool do_control_magic(void);
-extern bool do_control_pickup(void);
-extern bool do_control_inven(void);
-extern bool do_control_walk(void);
-extern bool can_create_companion(void);
+extern bool_ do_control_reconnect(void);
+extern bool_ do_control_drop(void);
+extern bool_ do_control_magic(void);
+extern bool_ do_control_pickup(void);
+extern bool_ do_control_inven(void);
+extern bool_ do_control_walk(void);
+extern bool_ can_create_companion(void);
extern void ai_deincarnate(int m_idx);
-extern bool ai_possessor(int m_idx, int o_idx);
-extern bool ai_multiply(int m_idx);
-extern bool change_side(monster_type *m_ptr);
+extern bool_ ai_possessor(int m_idx, int o_idx);
+extern bool_ ai_multiply(int m_idx);
+extern bool_ change_side(monster_type *m_ptr);
extern int is_friend(monster_type *m_ptr);
-extern bool is_enemy(monster_type *m_ptr, monster_type *t_ptr);
+extern bool_ is_enemy(monster_type *m_ptr, monster_type *t_ptr);
/* object1.c */
/* object2.c */
@@ -1104,58 +1104,58 @@ extern byte get_item_letter_color(object_type *o_ptr);
extern void describe_device(object_type *o_ptr);
extern void object_pickup(int this_o_idx);
extern int get_slot(int slot);
-extern bool apply_flags_set(s16b a_idx, s16b set_idx, u32b *f1, u32b *f2, u32b *f3, u32b *f4, u32b *f5, u32b *esp);
-extern bool apply_set(s16b a_idx, s16b set_idx);
-extern bool takeoff_set(s16b a_idx, s16b set_idx);
-extern bool wield_set(s16b a_idx, s16b set_idx, bool silent);
+extern bool_ apply_flags_set(s16b a_idx, s16b set_idx, u32b *f1, u32b *f2, u32b *f3, u32b *f4, u32b *f5, u32b *esp);
+extern bool_ apply_set(s16b a_idx, s16b set_idx);
+extern bool_ takeoff_set(s16b a_idx, s16b set_idx);
+extern bool_ wield_set(s16b a_idx, s16b set_idx, bool_ silent);
extern object_type *get_object(int item);
extern s32b calc_total_weight(void);
-extern void add_random_ego_flag(object_type *o_ptr, int fego, bool *limit_blows);
-extern bool info_spell;
+extern void add_random_ego_flag(object_type *o_ptr, int fego, bool_ *limit_blows);
+extern bool_ info_spell;
extern char spell_txt[50];
-extern bool grab_tval_desc(int tval);
+extern bool_ grab_tval_desc(int tval);
extern void init_match_theme(obj_theme theme);
-extern bool kind_is_artifactable(int k_idx);
-extern bool kind_is_good(int k_idx);
+extern bool_ kind_is_artifactable(int k_idx);
+extern bool_ kind_is_good(int k_idx);
extern int kind_is_legal_special;
-extern bool kind_is_legal(int k_idx);
-extern bool verify(cptr prompt, int item);
+extern bool_ kind_is_legal(int k_idx);
+extern bool_ verify(cptr prompt, int item);
extern void flavor_init(void);
extern void reset_visuals(void);
extern int object_power(object_type *o_ptr);
-extern bool object_flags_no_set;
+extern bool_ object_flags_no_set;
extern void object_flags(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3, u32b *f4, u32b *f5, u32b *esp);
extern void object_flags_known(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3, u32b *f4, u32b *f5, u32b *esp);
extern void object_desc(char *buf, object_type *o_ptr, int pref, int mode);
extern void object_desc_store(char *buf, object_type *o_ptr, int pref, int mode);
-extern bool object_out_desc(object_type *o_ptr, FILE *fff, bool trim_down, bool wait_for_it);
+extern bool_ object_out_desc(object_type *o_ptr, FILE *fff, bool_ trim_down, bool_ wait_for_it);
extern char index_to_label(int i);
extern s16b label_to_inven(int c);
extern s16b label_to_equip(int c);
-extern s16b wield_slot_ideal(object_type *o_ptr, bool ideal);
+extern s16b wield_slot_ideal(object_type *o_ptr, bool_ ideal);
extern s16b wield_slot(object_type *o_ptr);
extern cptr mention_use(int i);
extern cptr describe_use(int i);
extern void inven_item_charges(int item);
extern void inven_item_describe(int item);
extern void inven_item_increase(int item, int num);
-extern bool inven_item_optimize(int item);
+extern bool_ inven_item_optimize(int item);
extern void floor_item_charges(int item);
extern void floor_item_describe(int item);
extern void floor_item_increase(int item, int num);
extern void floor_item_optimize(int item);
-extern bool inven_carry_okay(object_type *o_ptr);
-extern s16b inven_carry(object_type *o_ptr, bool final);
-extern s16b inven_takeoff(int item, int amt, bool force_drop);
-extern void inven_drop(int item, int amt, int dy, int dx, bool silent);
-extern bool item_tester_okay(object_type *o_ptr);
+extern bool_ inven_carry_okay(object_type *o_ptr);
+extern s16b inven_carry(object_type *o_ptr, bool_ final);
+extern s16b inven_takeoff(int item, int amt, bool_ force_drop);
+extern void inven_drop(int item, int amt, int dy, int dx, bool_ silent);
+extern bool_ item_tester_okay(object_type *o_ptr);
extern void display_inven(void);
extern void display_equip(void);
-extern void show_inven(bool mirror);
-extern void show_equip(bool mirror);
+extern void show_inven(bool_ mirror);
+extern void show_equip(bool_ mirror);
extern void toggle_inven_equip(void);
-extern bool (*get_item_extra_hook)(int *cp);
-extern bool get_item(int *cp, cptr pmt, cptr str, int mode);
+extern bool_ (*get_item_extra_hook)(int *cp);
+extern bool_ get_item(int *cp, cptr pmt, cptr str, int mode);
extern void excise_object_idx(int o_idx);
extern void delete_object_idx(int o_idx);
extern void delete_object(int y, int x);
@@ -1169,39 +1169,39 @@ extern void object_aware(object_type *o_ptr);
extern void object_tried(object_type *o_ptr);
extern s32b object_value(object_type *o_ptr);
extern s32b object_value_real(object_type *o_ptr);
-extern bool object_similar(object_type *o_ptr, object_type *j_ptr);
+extern bool_ object_similar(object_type *o_ptr, object_type *j_ptr);
extern void object_absorb(object_type *o_ptr, object_type *j_ptr);
extern s16b lookup_kind(int tval, int sval);
extern void object_wipe(object_type *o_ptr);
extern void object_prep(object_type *o_ptr, int k_idx);
extern void object_copy(object_type *o_ptr, object_type *j_ptr);
extern int hack_apply_magic_power;
-extern void apply_magic(object_type *o_ptr, int lev, bool okay, bool good, bool great);
-extern bool make_object(object_type *j_ptr, bool good, bool great, obj_theme theme);
-extern void place_object(int y, int x, bool good, bool great, int where);
-extern bool make_gold(object_type *j_ptr);
+extern void apply_magic(object_type *o_ptr, int lev, bool_ okay, bool_ good, bool_ great);
+extern bool_ make_object(object_type *j_ptr, bool_ good, bool_ great, obj_theme theme);
+extern void place_object(int y, int x, bool_ good, bool_ great, int where);
+extern bool_ make_gold(object_type *j_ptr);
extern void place_gold(int y, int x);
extern void process_objects(void);
extern s16b drop_near(object_type *o_ptr, int chance, int y, int x);
-extern void acquirement(int y1, int x1, int num, bool great, bool known);
+extern void acquirement(int y1, int x1, int num, bool_ great, bool_ known);
extern void pick_trap(int y, int x);
extern cptr item_activation(object_type *o_ptr,byte num);
extern void combine_pack(void);
extern void reorder_pack(void);
extern void display_koff(int k_idx);
extern void random_artifact_resistance (object_type * o_ptr);
-extern void random_resistance (object_type * o_ptr, bool is_scroll, int specific);
+extern void random_resistance (object_type * o_ptr, bool_ is_scroll, int specific);
extern s16b floor_carry(int y, int x, object_type *j_ptr);
extern void pack_decay(int item);
extern void floor_decay(int item);
-extern bool scan_floor(int *items, int *item_num, int y, int x, int mode);
+extern bool_ scan_floor(int *items, int *item_num, int y, int x, int mode);
extern void show_floor(int y, int x);
-extern bool get_item_floor(int *cp, cptr pmt, cptr str, int mode);
+extern bool_ get_item_floor(int *cp, cptr pmt, cptr str, int mode);
extern void py_pickup_floor(int pickup);
extern s16b m_bonus(int max, int level);
extern void object_gain_level(object_type *o_ptr);
-extern void gain_flag_group_flag(object_type *o_ptr, bool silent);
-extern void gain_flag_group(object_type *o_ptr, bool silent);
+extern void gain_flag_group_flag(object_type *o_ptr, bool_ silent);
+extern void gain_flag_group(object_type *o_ptr, bool_ silent);
extern void get_table_name(char * out_string);
extern s32b flag_cost(object_type * o_ptr, int plusses);
@@ -1209,19 +1209,19 @@ extern s32b flag_cost(object_type * o_ptr, int plusses);
extern void do_cmd_power(void);
/* traps.c */
-extern bool player_activate_trap_type(s16b y, s16b x, object_type *i_ptr, s16b item);
+extern bool_ player_activate_trap_type(s16b y, s16b x, object_type *i_ptr, s16b item);
extern void player_activate_door_trap(s16b y, s16b x);
extern void place_trap(int y, int x);
extern void place_trap_object(object_type *o_ptr);
extern void wiz_place_trap(int y, int x, int idx);
extern void do_cmd_set_trap(void);
-extern bool mon_hit_trap(int);
+extern bool_ mon_hit_trap(int);
/* spells1.c */
extern byte spell_color(int type);
extern s16b poly_r_idx(int r_idx);
extern void get_pos_player(int dis, int *ny, int *nx);
-extern bool teleport_player_bypass;
+extern bool_ teleport_player_bypass;
extern void teleport_to_player(int m_idx);
extern void teleport_player_directed(int rad, int dir);
extern void teleport_away(int m_idx, int dis);
@@ -1236,177 +1236,177 @@ extern void acid_dam(int dam, cptr kb_str);
extern void elec_dam(int dam, cptr kb_str);
extern void fire_dam(int dam, cptr kb_str);
extern void cold_dam(int dam, cptr kb_str);
-extern bool inc_stat(int stat);
-extern bool dec_stat(int stat, int amount, int mode);
-extern bool res_stat(int stat, bool full);
-extern bool apply_disenchant(int mode);
-extern bool project_m(int who, int r, int y, int x, int dam, int typ);
+extern bool_ inc_stat(int stat);
+extern bool_ dec_stat(int stat, int amount, int mode);
+extern bool_ res_stat(int stat, bool_ full);
+extern bool_ apply_disenchant(int mode);
+extern bool_ project_m(int who, int r, int y, int x, int dam, int typ);
extern sint project_path(u16b *gp, int range, int y1, int x1, int y2, int x2, int flg);
-extern bool project(int who, int rad, int y, int x, int dam, int typ, int flg);
-extern bool potion_smash_effect(int who, int y, int x, int o_sval);
+extern bool_ project(int who, int rad, int y, int x, int dam, int typ, int flg);
+extern bool_ potion_smash_effect(int who, int y, int x, int o_sval);
extern void do_poly_self(void);
extern void corrupt_player(void);
extern void generate_spell(int plev);
-extern bool unsafe;
+extern bool_ unsafe;
extern void describe_attack_fully(int type, char* r);
extern s16b do_poly_monster(int y, int x);
/* spells2.c */
-extern bool remove_curse_object(object_type *o_ptr, bool all);
+extern bool_ remove_curse_object(object_type *o_ptr, bool_ all);
extern void curse_artifact(object_type * o_ptr);
extern void grow_things(s16b type, int rad);
extern void grow_grass(int rad);
extern void grow_trees(int rad);
-extern bool hp_player(int num);
-extern bool heal_insanity(int val);
+extern bool_ hp_player(int num);
+extern bool_ heal_insanity(int val);
extern void warding_glyph(void);
extern void explosive_rune(void);
-extern bool do_dec_stat(int stat, int mode);
-extern bool do_res_stat(int stat, bool full);
-extern bool do_inc_stat(int stat);
+extern bool_ do_dec_stat(int stat, int mode);
+extern bool_ do_res_stat(int stat, bool_ full);
+extern bool_ do_inc_stat(int stat);
extern void identify_pack(void);
extern void identify_pack_fully(void);
-extern bool remove_curse(void);
-extern bool remove_all_curse(void);
-extern bool restore_level(void);
+extern bool_ remove_curse(void);
+extern bool_ remove_all_curse(void);
+extern bool_ restore_level(void);
extern void self_knowledge(FILE *fff);
-extern bool lose_all_info(void);
-extern bool detect_traps(int rad);
-extern bool detect_doors(int rad);
-extern bool detect_stairs(int rad);
-extern bool detect_treasure(int rad);
-extern bool hack_no_detect_message;
-extern bool detect_objects_gold(int rad);
-extern bool detect_objects_normal(int rad);
-extern bool detect_objects_magic(int rad);
-extern bool detect_monsters_normal(int rad);
-extern bool detect_monsters_invis(int rad);
-extern bool detect_monsters_evil(int rad);
-extern bool detect_monsters_good(int rad);
-extern bool detect_monsters_xxx(u32b match_flag, int rad);
-extern bool detect_monsters_string(cptr chars, int rad);
-extern bool detect_monsters_nonliving(int rad);
-extern bool detect_all(int rad);
+extern bool_ lose_all_info(void);
+extern bool_ detect_traps(int rad);
+extern bool_ detect_doors(int rad);
+extern bool_ detect_stairs(int rad);
+extern bool_ detect_treasure(int rad);
+extern bool_ hack_no_detect_message;
+extern bool_ detect_objects_gold(int rad);
+extern bool_ detect_objects_normal(int rad);
+extern bool_ detect_objects_magic(int rad);
+extern bool_ detect_monsters_normal(int rad);
+extern bool_ detect_monsters_invis(int rad);
+extern bool_ detect_monsters_evil(int rad);
+extern bool_ detect_monsters_good(int rad);
+extern bool_ detect_monsters_xxx(u32b match_flag, int rad);
+extern bool_ detect_monsters_string(cptr chars, int rad);
+extern bool_ detect_monsters_nonliving(int rad);
+extern bool_ detect_all(int rad);
extern void stair_creation(void);
-extern bool wall_stone(int y, int x);
-extern bool enchant(object_type *o_ptr, int n, int eflag);
-extern bool enchant_spell(int num_hit, int num_dam, int num_ac, int num_pval);
-extern bool ident_spell(void);
-extern bool ident_all(void);
-extern bool identify_fully(void);
-extern bool recharge(int num);
-extern bool speed_monsters(void);
-extern bool slow_monsters(void);
-extern bool sleep_monsters(void);
-extern bool conf_monsters(void);
+extern bool_ wall_stone(int y, int x);
+extern bool_ enchant(object_type *o_ptr, int n, int eflag);
+extern bool_ enchant_spell(int num_hit, int num_dam, int num_ac, int num_pval);
+extern bool_ ident_spell(void);
+extern bool_ ident_all(void);
+extern bool_ identify_fully(void);
+extern bool_ recharge(int num);
+extern bool_ speed_monsters(void);
+extern bool_ slow_monsters(void);
+extern bool_ sleep_monsters(void);
+extern bool_ conf_monsters(void);
extern void aggravate_monsters(int who);
-extern bool genocide_aux(bool player_cast, char typ);
-extern bool genocide(bool player_cast);
-extern bool mass_genocide(bool player_cast);
+extern bool_ genocide_aux(bool_ player_cast, char typ);
+extern bool_ genocide(bool_ player_cast);
+extern bool_ mass_genocide(bool_ player_cast);
extern void do_probe(int m_idx);
-extern bool probing(void);
+extern bool_ probing(void);
extern void change_wild_mode(void);
-extern bool banish_evil(int dist);
-extern bool dispel_evil(int dam);
-extern bool dispel_good(int dam);
-extern bool dispel_undead(int dam);
-extern bool dispel_monsters(int dam);
-extern bool dispel_living(int dam);
-extern bool dispel_demons(int dam);
-extern bool turn_undead(void);
+extern bool_ banish_evil(int dist);
+extern bool_ dispel_evil(int dam);
+extern bool_ dispel_good(int dam);
+extern bool_ dispel_undead(int dam);
+extern bool_ dispel_monsters(int dam);
+extern bool_ dispel_living(int dam);
+extern bool_ dispel_demons(int dam);
+extern bool_ turn_undead(void);
extern void wipe(int y1, int x1, int r);
-extern void destroy_area(int y1, int x1, int r, bool full, bool bypass);
+extern void destroy_area(int y1, int x1, int r, bool_ full, bool_ bypass);
extern void earthquake(int cy, int cx, int r);
extern void lite_room(int y1, int x1);
extern void unlite_room(int y1, int x1);
-extern bool lite_area(int dam, int rad);
-extern bool unlite_area(int dam, int rad);
-extern bool fire_ball_beam(int typ, int dir, int dam, int rad);
-extern bool fire_cloud(int typ, int dir, int dam, int rad, int time);
-extern bool fire_wave(int typ, int dir, int dam, int rad, int time, s32b eff);
-extern bool fire_wall(int typ, int dir, int dam, int time);
-extern bool fire_ball(int typ, int dir, int dam, int rad);
-extern bool fire_bolt(int typ, int dir, int dam);
-extern bool fire_beam(int typ, int dir, int dam);
-extern bool fire_druid_ball(int typ, int dir, int dam, int rad);
-extern bool fire_druid_bolt(int typ, int dir, int dam);
-extern bool fire_druid_beam(int typ, int dir, int dam);
+extern bool_ lite_area(int dam, int rad);
+extern bool_ unlite_area(int dam, int rad);
+extern bool_ fire_ball_beam(int typ, int dir, int dam, int rad);
+extern bool_ fire_cloud(int typ, int dir, int dam, int rad, int time);
+extern bool_ fire_wave(int typ, int dir, int dam, int rad, int time, s32b eff);
+extern bool_ fire_wall(int typ, int dir, int dam, int time);
+extern bool_ fire_ball(int typ, int dir, int dam, int rad);
+extern bool_ fire_bolt(int typ, int dir, int dam);
+extern bool_ fire_beam(int typ, int dir, int dam);
+extern bool_ fire_druid_ball(int typ, int dir, int dam, int rad);
+extern bool_ fire_druid_bolt(int typ, int dir, int dam);
+extern bool_ fire_druid_beam(int typ, int dir, int dam);
extern void call_chaos(void);
-extern bool fire_bolt_or_beam(int prob, int typ, int dir, int dam);
-extern bool lite_line(int dir);
-extern bool drain_life(int dir, int dam);
-extern bool death_ray(int dir, int plev);
-extern bool wall_to_mud(int dir);
-extern bool destroy_door(int dir);
-extern bool disarm_trap(int dir);
-extern bool wizard_lock(int dir);
-extern bool heal_monster(int dir);
-extern bool speed_monster(int dir);
-extern bool slow_monster(int dir);
-extern bool sleep_monster(int dir);
-extern bool stasis_monster(int dir);
-extern bool confuse_monster(int dir, int plev);
-extern bool stun_monster(int dir, int plev);
-extern bool fear_monster(int dir, int plev);
-extern bool scare_monsters(void);
-extern bool poly_monster(int dir);
-extern bool clone_monster(int dir);
-extern bool teleport_monster(int dir);
-extern bool door_creation(void);
-extern bool trap_creation(void);
-extern bool glyph_creation(void);
-extern bool destroy_doors_touch(void);
-extern bool destroy_traps_touch(void);
-extern bool sleep_monsters_touch(void);
-extern bool alchemy(void);
+extern bool_ fire_bolt_or_beam(int prob, int typ, int dir, int dam);
+extern bool_ lite_line(int dir);
+extern bool_ drain_life(int dir, int dam);
+extern bool_ death_ray(int dir, int plev);
+extern bool_ wall_to_mud(int dir);
+extern bool_ destroy_door(int dir);
+extern bool_ disarm_trap(int dir);
+extern bool_ wizard_lock(int dir);
+extern bool_ heal_monster(int dir);
+extern bool_ speed_monster(int dir);
+extern bool_ slow_monster(int dir);
+extern bool_ sleep_monster(int dir);
+extern bool_ stasis_monster(int dir);
+extern bool_ confuse_monster(int dir, int plev);
+extern bool_ stun_monster(int dir, int plev);
+extern bool_ fear_monster(int dir, int plev);
+extern bool_ scare_monsters(void);
+extern bool_ poly_monster(int dir);
+extern bool_ clone_monster(int dir);
+extern bool_ teleport_monster(int dir);
+extern bool_ door_creation(void);
+extern bool_ trap_creation(void);
+extern bool_ glyph_creation(void);
+extern bool_ destroy_doors_touch(void);
+extern bool_ destroy_traps_touch(void);
+extern bool_ sleep_monsters_touch(void);
+extern bool_ alchemy(void);
extern void activate_ty_curse(void);
extern void activate_dg_curse(void);
extern void activate_hi_summon(void);
extern void summon_cyber(void);
extern void wall_breaker(void);
extern void bless_weapon(void);
-extern bool confuse_monsters(int dam);
-extern bool charm_monsters(int dam);
-extern bool charm_animals(int dam);
-extern bool charm_demons(int dam);
-extern bool stun_monsters(int dam);
-extern bool stasis_monsters(int dam);
-extern bool banish_monsters(int dist);
-extern bool turn_monsters(int dam);
-extern bool turn_evil(int dam);
-extern bool deathray_monsters(void);
-extern bool charm_monster(int dir, int plev);
-extern bool star_charm_monster(int dir, int plev);
-extern bool control_one_undead(int dir, int plev);
-extern bool charm_animal(int dir, int plev);
-extern bool mindblast_monsters(int dam);
+extern bool_ confuse_monsters(int dam);
+extern bool_ charm_monsters(int dam);
+extern bool_ charm_animals(int dam);
+extern bool_ charm_demons(int dam);
+extern bool_ stun_monsters(int dam);
+extern bool_ stasis_monsters(int dam);
+extern bool_ banish_monsters(int dist);
+extern bool_ turn_monsters(int dam);
+extern bool_ turn_evil(int dam);
+extern bool_ deathray_monsters(void);
+extern bool_ charm_monster(int dir, int plev);
+extern bool_ star_charm_monster(int dir, int plev);
+extern bool_ control_one_undead(int dir, int plev);
+extern bool_ charm_animal(int dir, int plev);
+extern bool_ mindblast_monsters(int dam);
extern void alter_reality(void);
extern void report_magics(void);
extern void teleport_swap(int dir);
extern void swap_position(int lty, int ltx);
-extern bool item_tester_hook_recharge(object_type *o_ptr);
-extern bool fire_explosion(int y, int x, int typ, int rad, int dam);
-extern bool fire_godly_wrath(int y, int x, int typ, int dir, int dam);
-extern bool invoke(int dam, int typ);
-extern bool project_hack(int typ, int dam);
+extern bool_ item_tester_hook_recharge(object_type *o_ptr);
+extern bool_ fire_explosion(int y, int x, int typ, int rad, int dam);
+extern bool_ fire_godly_wrath(int y, int x, int typ, int dir, int dam);
+extern bool_ invoke(int dam, int typ);
+extern bool_ project_hack(int typ, int dam);
extern void project_meteor(int radius, int typ, int dam, u32b flg);
-extern bool item_tester_hook_artifactable(object_type *o_ptr);
-extern bool passwall(int dir, bool safe);
-extern bool project_hook(int typ, int dir, int dam, int flg);
-extern void random_misc (object_type * o_ptr, bool is_scroll);
-extern void random_plus(object_type * o_ptr, bool is_scroll);
-extern bool reset_recall(bool no_trepas_max_depth);
+extern bool_ item_tester_hook_artifactable(object_type *o_ptr);
+extern bool_ passwall(int dir, bool_ safe);
+extern bool_ project_hook(int typ, int dir, int dam, int flg);
+extern void random_misc (object_type * o_ptr, bool_ is_scroll);
+extern void random_plus(object_type * o_ptr, bool_ is_scroll);
+extern bool_ reset_recall(bool_ no_trepas_max_depth);
extern void remove_dg_curse(void);
/* randart.c */
extern int get_activation_power(void);
extern void build_prob(cptr learn);
-extern bool create_artifact(object_type *o_ptr, bool a_scroll, bool get_name);
-extern bool artifact_scroll(void);
+extern bool_ create_artifact(object_type *o_ptr, bool_ a_scroll, bool_ get_name);
+extern bool_ artifact_scroll(void);
/* store.c */
-extern bool is_blessed(object_type *o_ptr);
+extern bool_ is_blessed(object_type *o_ptr);
extern void do_cmd_store(void);
extern void store_shuffle(int which);
extern void store_maint(int town_num, int store_num);
@@ -1421,24 +1421,24 @@ extern void store_prt_gold(void);
extern void store_request_item(void);
/* bldg.c -KMW- */
-extern bool bldg_process_command(store_type *s_ptr, int i);
+extern bool_ bldg_process_command(store_type *s_ptr, int i);
extern void show_building(store_type *s_ptr);
-extern bool is_state(store_type *s_ptr, int state);
+extern bool_ is_state(store_type *s_ptr, int state);
extern void do_cmd_bldg(void);
-extern bool show_god_info(bool ext);
+extern bool_ show_god_info(bool_ ext);
extern void enter_quest(void);
extern void select_bounties(void);
/* util.c */
extern void scansubdir(cptr dir);
extern s32b rescale(s32b x, s32b max, s32b new_max);
-extern bool input_box(cptr text, int y, int x, char *buf, int max);
+extern bool_ input_box(cptr text, int y, int x, char *buf, int max);
extern void draw_box(int y, int x, int h, int w);
extern void display_list(int y, int x, int h, int w, cptr title, cptr *list, int max, int begin, int sel, byte sel_color);
extern s32b value_scale(int value, int vmax, int max, int min);
extern int ask_menu(cptr ask, char **items, int max);
extern cptr get_player_race_name(int pr, int ps);
-extern cptr get_month_name(int month, bool full, bool compact);
+extern cptr get_month_name(int month, bool_ full, bool_ compact);
extern cptr get_day(int day);
extern s32b bst(s32b what, s32b t);
extern errr path_parse(char *buf, int max, cptr file);
@@ -1494,17 +1494,17 @@ extern void text_out(cptr str);
extern void text_out_c(byte a, cptr str);
extern void clear_screen(void);
extern void clear_from(int row);
-extern bool askfor_aux_complete;
-extern bool askfor_aux(char *buf, int len);
-extern bool get_string(cptr prompt, char *buf, int len);
-extern bool get_check(cptr prompt);
-extern bool get_com(cptr prompt, char *command);
+extern bool_ askfor_aux_complete;
+extern bool_ askfor_aux(char *buf, int len);
+extern bool_ get_string(cptr prompt, char *buf, int len);
+extern bool_ get_check(cptr prompt);
+extern bool_ get_com(cptr prompt, char *command);
extern s32b get_quantity(cptr prompt, s32b max);
extern void pause_line(int row);
extern char request_command_ignore_keymaps[];
-extern bool request_command_inven_mode;
+extern bool_ request_command_inven_mode;
extern void request_command(int shopping);
-extern bool is_a_vowel(int ch);
+extern bool_ is_a_vowel(int ch);
extern int get_keymap_dir(char ch);
extern byte count_bits(u32b array);
extern void strlower(char *buf);
@@ -1517,7 +1517,7 @@ extern void del_timer(timer_type *t_ptr);
/* main.c */
#ifdef PRIVATE_USER_PATH
-extern bool private_check_user_directory(cptr dirpath);
+extern bool_ private_check_user_directory(cptr dirpath);
#endif
/* xtra1.c */
@@ -1525,7 +1525,7 @@ extern void fix_message(void);
extern void apply_flags(u32b f1, u32b f2, u32b f3, u32b f4, u32b f5, u32b esp, s16b pval, s16b tval, s16b to_h, s16b to_d, s16b to_a);
extern int luck(int min, int max);
extern int weight_limit(void);
-extern bool calc_powers_silent;
+extern bool_ calc_powers_silent;
extern void cnv_stat(int i, char *out_val);
extern s16b modify_stat_value(int value, int amount);
extern void calc_hitpoints(void);
@@ -1534,10 +1534,10 @@ extern void update_stuff(void);
extern void redraw_stuff(void);
extern void window_stuff(void);
extern void handle_stuff(void);
-extern bool monk_empty_hands(void);
-extern bool monk_heavy_armor(void);
-extern bool beastmaster_whip(void);
-extern void calc_bonuses(bool silent);
+extern bool_ monk_empty_hands(void);
+extern bool_ monk_heavy_armor(void);
+extern bool_ beastmaster_whip(void);
+extern void calc_bonuses(bool_ silent);
extern void calc_sanity(void);
extern void gain_fate(byte fate);
extern void fate_desc(char *desc, int fate);
@@ -1548,131 +1548,131 @@ extern int resolve_mimic_name(cptr name);
extern void do_rebirth(void);
extern cptr get_subrace_title(int racem);
extern void set_subrace_title(int racem, cptr name);
-extern void switch_subrace(int racem, bool copy_old);
+extern void switch_subrace(int racem, bool_ copy_old);
extern void switch_class(int sclass);
extern void switch_subclass(int sclass);
extern void drop_from_wild(void);
extern void clean_wish_name(char *buf, char *name);
-extern bool test_object_wish(char *name, object_type *o_ptr, object_type *forge, char *what);
-extern bool set_roots(int v, s16b ac, s16b dam);
-extern bool set_project(int v, s16b gf, s16b dam, s16b rad, s16b flag);
-extern bool set_rush(int v);
-extern bool set_parasite(int v, int r);
-extern bool set_disrupt_shield(int v);
-extern bool set_prob_travel(int v);
-extern bool set_absorb_soul(int v);
-extern bool set_tim_breath(int v, bool magical);
-extern bool set_tim_deadly(int v);
-extern bool set_tim_res_time(int v);
-extern bool set_tim_reflect(int v);
-extern bool set_tim_thunder(int v, int p1, int p2);
-extern bool set_meditation(int v);
-extern bool set_strike(int v);
-extern bool set_walk_water(int v);
-extern bool set_tim_regen(int v, int p);
-extern bool set_tim_ffall(int v);
-extern bool set_tim_fly(int v);
-extern bool set_poison(int v);
-extern bool set_tim_fire_aura(int v);
-extern bool set_holy(int v);
+extern bool_ test_object_wish(char *name, object_type *o_ptr, object_type *forge, char *what);
+extern bool_ set_roots(int v, s16b ac, s16b dam);
+extern bool_ set_project(int v, s16b gf, s16b dam, s16b rad, s16b flag);
+extern bool_ set_rush(int v);
+extern bool_ set_parasite(int v, int r);
+extern bool_ set_disrupt_shield(int v);
+extern bool_ set_prob_travel(int v);
+extern bool_ set_absorb_soul(int v);
+extern bool_ set_tim_breath(int v, bool_ magical);
+extern bool_ set_tim_deadly(int v);
+extern bool_ set_tim_res_time(int v);
+extern bool_ set_tim_reflect(int v);
+extern bool_ set_tim_thunder(int v, int p1, int p2);
+extern bool_ set_meditation(int v);
+extern bool_ set_strike(int v);
+extern bool_ set_walk_water(int v);
+extern bool_ set_tim_regen(int v, int p);
+extern bool_ set_tim_ffall(int v);
+extern bool_ set_tim_fly(int v);
+extern bool_ set_poison(int v);
+extern bool_ set_tim_fire_aura(int v);
+extern bool_ set_holy(int v);
extern void set_grace(s32b v);
-extern bool set_mimic(int v, int p, int level);
-extern bool set_no_breeders(int v);
-extern bool set_invis(int v,int p);
-extern bool set_lite(int v);
-extern bool set_blind(int v);
-extern bool set_confused(int v);
-extern bool set_poisoned(int v);
-extern bool set_afraid(int v);
-extern bool set_paralyzed(int v);
-extern bool set_image(int v);
-extern bool set_fast(int v, int p);
-extern bool set_light_speed(int v);
-extern bool set_slow(int v);
-extern bool set_shield(int v, int p, s16b o, s16b d1, s16b d2);
-extern bool set_blessed(int v);
-extern bool set_hero(int v);
-extern bool set_shero(int v);
-extern bool set_protevil(int v);
-extern bool set_protgood(int v);
-extern bool set_protundead(int v);
-extern bool set_invuln(int v);
-extern bool set_tim_invis(int v);
-extern bool set_tim_infra(int v);
-extern bool set_mental_barrier(int v);
-extern bool set_oppose_acid(int v);
-extern bool set_oppose_elec(int v);
-extern bool set_oppose_fire(int v);
-extern bool set_oppose_cold(int v);
-extern bool set_oppose_pois(int v);
-extern bool set_oppose_ld(int v);
-extern bool set_oppose_cc(int v);
-extern bool set_oppose_ss(int v);
-extern bool set_oppose_nex(int v);
-extern bool set_stun(int v);
-extern bool set_cut(int v);
-extern bool set_food(int v);
+extern bool_ set_mimic(int v, int p, int level);
+extern bool_ set_no_breeders(int v);
+extern bool_ set_invis(int v,int p);
+extern bool_ set_lite(int v);
+extern bool_ set_blind(int v);
+extern bool_ set_confused(int v);
+extern bool_ set_poisoned(int v);
+extern bool_ set_afraid(int v);
+extern bool_ set_paralyzed(int v);
+extern bool_ set_image(int v);
+extern bool_ set_fast(int v, int p);
+extern bool_ set_light_speed(int v);
+extern bool_ set_slow(int v);
+extern bool_ set_shield(int v, int p, s16b o, s16b d1, s16b d2);
+extern bool_ set_blessed(int v);
+extern bool_ set_hero(int v);
+extern bool_ set_shero(int v);
+extern bool_ set_protevil(int v);
+extern bool_ set_protgood(int v);
+extern bool_ set_protundead(int v);
+extern bool_ set_invuln(int v);
+extern bool_ set_tim_invis(int v);
+extern bool_ set_tim_infra(int v);
+extern bool_ set_mental_barrier(int v);
+extern bool_ set_oppose_acid(int v);
+extern bool_ set_oppose_elec(int v);
+extern bool_ set_oppose_fire(int v);
+extern bool_ set_oppose_cold(int v);
+extern bool_ set_oppose_pois(int v);
+extern bool_ set_oppose_ld(int v);
+extern bool_ set_oppose_cc(int v);
+extern bool_ set_oppose_ss(int v);
+extern bool_ set_oppose_nex(int v);
+extern bool_ set_stun(int v);
+extern bool_ set_cut(int v);
+extern bool_ set_food(int v);
extern void check_experience(void);
extern void check_experience_obj(object_type *o_ptr);
extern void gain_exp(s32b amount);
extern void lose_exp(s32b amount);
extern int get_coin_type(monster_race *r_ptr);
extern void monster_death(int m_idx);
-extern bool mon_take_hit(int m_idx, int dam, bool *fear, cptr note);
-extern bool change_panel(int dy, int dx);
+extern bool_ mon_take_hit(int m_idx, int dam, bool_ *fear, cptr note);
+extern bool_ change_panel(int dy, int dx);
extern void verify_panel(void);
extern void resize_map(void);
extern void resize_window(void);
extern cptr look_mon_desc(int m_idx);
extern void ang_sort_aux(vptr u, vptr v, int p, int q);
extern void ang_sort(vptr u, vptr v, int n);
-extern bool target_able(int m_idx);
-extern bool target_okay(void);
-extern bool target_set(int mode);
-extern bool get_aim_dir(int *dp);
-extern bool get_hack_dir(int *dp);
-extern bool get_rep_dir(int *dp);
+extern bool_ target_able(int m_idx);
+extern bool_ target_okay(void);
+extern bool_ target_set(int mode);
+extern bool_ get_aim_dir(int *dp);
+extern bool_ get_hack_dir(int *dp);
+extern bool_ get_rep_dir(int *dp);
extern int get_chaos_patron(void);
extern void gain_level_reward(int chosen_reward);
-extern bool set_shadow(int v);
-extern bool set_tim_esp(int v);
-extern bool tgp_pt(int *x, int * y);
-extern bool tgt_pt (int *x, int *y);
-extern bool gain_random_corruption(int choose_mut);
-extern bool got_corruptions(void);
-extern void dump_corruptions(FILE *OutFile, bool color);
+extern bool_ set_shadow(int v);
+extern bool_ set_tim_esp(int v);
+extern bool_ tgp_pt(int *x, int * y);
+extern bool_ tgt_pt (int *x, int *y);
+extern bool_ gain_random_corruption(int choose_mut);
+extern bool_ got_corruptions(void);
+extern void dump_corruptions(FILE *OutFile, bool_ color);
extern void do_poly_self(void);
extern void do_poly_wounds(void);
-extern bool curse_weapon(void);
-extern bool curse_armor(void);
-extern void random_resistance(object_type * q_ptr, bool is_scroll, int specific);
-extern bool lose_corruption(int choose_mut);
-extern bool lose_all_corruptions(void);
+extern bool_ curse_weapon(void);
+extern bool_ curse_armor(void);
+extern void random_resistance(object_type * q_ptr, bool_ is_scroll, int specific);
+extern bool_ lose_corruption(int choose_mut);
+extern bool_ lose_all_corruptions(void);
extern void great_side_effect(void);
extern void nasty_side_effect(void);
-extern void deadly_side_effect(bool god);
+extern void deadly_side_effect(bool_ god);
extern void godly_wrath_blast(void);
extern int interpret_grace(void);
extern int interpret_favor(void);
extern void make_wish(void);
-extern bool set_sliding(s16b v);
+extern bool_ set_sliding(s16b v);
extern void create_between_gate(int dist, int y, int x);
/* levels.c */
-extern bool get_dungeon_generator(char *buf);
-extern bool get_level_desc(char *buf);
+extern bool_ get_dungeon_generator(char *buf);
+extern bool_ get_level_desc(char *buf);
extern void get_level_flags(void);
-extern bool get_dungeon_name(char *buf);
-extern bool get_dungeon_special(char *buf);
-extern bool get_command(const char *file, char comm, char *param);
+extern bool_ get_dungeon_name(char *buf);
+extern bool_ get_dungeon_special(char *buf);
+extern bool_ get_command(const char *file, char comm, char *param);
extern int get_branch(void);
extern int get_fbranch(void);
extern int get_flevel(void);
-extern bool get_dungeon_save(char *buf);
+extern bool_ get_dungeon_save(char *buf);
/* wizard2.c */
extern void do_cmd_wiz_cure_all(void);
-extern void do_cmd_wiz_named_friendly(int r_idx, bool slp);
+extern void do_cmd_wiz_named_friendly(int r_idx, bool_ slp);
extern tval_desc2 tvals[];
/* notes.c */
@@ -1685,8 +1685,8 @@ extern void add_note_type(int note_number);
extern void squeltch_inventory(void);
extern void squeltch_grid(void);
extern void do_cmd_automatizer(void);
-extern void automatizer_add_rule(object_type *o_ptr, bool destroy);
-extern bool automatizer_create;
+extern void automatizer_add_rule(object_type *o_ptr, bool_ destroy);
+extern bool_ automatizer_create;
@@ -1742,27 +1742,27 @@ extern u32b _ftype;
#if !defined(WINDOWS) && !defined(MACINTOSH)
/* files.c */
-extern bool chg_to_txt(cptr base, cptr newname);
+extern bool_ chg_to_txt(cptr base, cptr newname);
#endif /* !WINDOWS && !MACINTOSH */
/* util.c */
extern void repeat_push(int what);
-extern bool repeat_pull(int *what);
+extern bool_ repeat_pull(int *what);
extern void repeat_check(void);
extern void get_count(int number, int max);
/* variable.c */
-extern bool easy_open;
-extern bool easy_tunnel;
-extern bool easy_disarm;
+extern bool_ easy_open;
+extern bool_ easy_tunnel;
+extern bool_ easy_disarm;
/* cmd2.c */
-extern bool easy_open_door(int y, int x);
+extern bool_ easy_open_door(int y, int x);
/* cmd2.c */
-extern bool do_cmd_disarm_aux(int y, int x, int dir, int do_pickup);
+extern bool_ do_cmd_disarm_aux(int y, int x, int dir, int do_pickup);
-extern bool easy_floor;
+extern bool_ easy_floor;
/* script.c */
@@ -1770,24 +1770,24 @@ extern void init_lua(void);
extern void init_lua_init(void);
extern int exec_lua(char *file);
extern cptr string_exec_lua(char *file);
-extern bool tome_dofile(char *file);
-extern bool tome_dofile_anywhere(cptr dir, char *file, bool test_exist);
+extern bool_ tome_dofile(char *file);
+extern bool_ tome_dofile_anywhere(cptr dir, char *file, bool_ test_exist);
extern void dump_lua_stack(int min, int max);
-extern bool call_lua(cptr function, cptr args, cptr ret, ...);
-extern bool get_lua_var(cptr name, char type, void *arg);
+extern bool_ call_lua(cptr function, cptr args, cptr ret, ...);
+extern bool_ get_lua_var(cptr name, char type, void *arg);
/* modules.c */
extern void module_reset_dir(cptr dir, cptr new_path);
extern cptr force_module;
-extern bool select_module(void);
+extern bool_ select_module(void);
/* lua_bind.c */
extern magic_power *grab_magic_power(magic_power *m_ptr, int num);
-extern bool get_magic_power(int *sn, magic_power *powers, int max_powers, void (*power_info)(char *p, int power), int plev, int cast_stat);
+extern bool_ get_magic_power(int *sn, magic_power *powers, int max_powers, void (*power_info)(char *p, int power), int plev, int cast_stat);
extern magic_power *new_magic_power(int num);
-extern bool get_magic_power_lua(int *sn, magic_power *powers, int max_powers, char *info_fct, int plev, int cast_stat);
-extern bool lua_spell_success(magic_power *spell, int stat, char *oups_fct);
+extern bool_ get_magic_power_lua(int *sn, magic_power *powers, int max_powers, char *info_fct, int plev, int cast_stat);
+extern bool_ lua_spell_success(magic_power *spell, int stat, char *oups_fct);
extern object_type *new_object(void);
extern void end_object(object_type *o_ptr);
@@ -1797,8 +1797,8 @@ extern char *lua_object_desc(object_type *o_ptr, int pref, int mode);
extern s16b add_new_power(cptr name, cptr desc, cptr gain, cptr lose, byte level, byte cost, byte stat, byte diff);
extern void find_position(int y, int x, int *yy, int *xx);
-extern bool summon_lua_okay(int r_idx);
-extern bool lua_summon_monster(int y, int x, int lev, bool ffriend, char *fct);
+extern bool_ summon_lua_okay(int r_idx);
+extern bool_ lua_summon_monster(int y, int x, int lev, bool_ ffriend, char *fct);
extern s16b add_new_quest(char *name);
extern void desc_quest(int q_idx, int d, char *desc);
@@ -1806,7 +1806,7 @@ extern void desc_quest(int q_idx, int d, char *desc);
extern s16b add_new_gods(char *name);
extern void desc_god(int g_idx, int d, char *desc);
-extern bool get_com_lua(cptr promtp, int *com);
+extern bool_ get_com_lua(cptr promtp, int *com);
extern s16b new_school(int i, cptr name, s16b skill);
extern s16b new_spell(int i, cptr name);
@@ -1820,9 +1820,9 @@ extern cave_type *lua_get_cave(int y, int x);
extern void set_target(int y, int x);
extern void get_target(int dir, int *y, int *x);
-extern void get_map_size(bool full_text, char *name, int *ysize, int *xsize);
-extern void load_map(bool full_text, char *name, int *y, int *x);
-extern bool alloc_room(int by0, int bx0, int ysize, int xsize, int *y1, int *x1, int *y2, int *x2);
+extern void get_map_size(bool_ full_text, char *name, int *ysize, int *xsize);
+extern void load_map(bool_ full_text, char *name, int *y, int *x);
+extern bool_ alloc_room(int by0, int bx0, int ysize, int xsize, int *y1, int *x1, int *y2, int *x2);
extern void lua_print_hook(cptr str);
@@ -1841,7 +1841,7 @@ extern void lua_close_temp_file(void);
extern void lua_end_temp_file(void);
extern cptr lua_get_temp_name(void);
-extern void add_scripted_generator(cptr name, bool stairs, bool monsters, bool objects, bool miscs);
+extern void add_scripted_generator(cptr name, bool_ stairs, bool_ monsters, bool_ objects, bool_ miscs);
/* skills.c */
extern void dump_skills(FILE *fff);
@@ -1855,8 +1855,8 @@ extern s16b melee_skills[MAX_MELEE];
extern char *melee_names[MAX_MELEE];
extern s16b get_melee_skills(void);
extern s16b get_melee_skill(void);
-extern bool forbid_gloves(void);
-extern bool forbid_non_blessed(void);
+extern bool_ forbid_gloves(void);
+extern bool_ forbid_non_blessed(void);
extern void compute_skills(s32b *v, s32b *m, int i);
extern void select_default_melee(void);
extern void do_get_new_skill(void);
@@ -1864,13 +1864,13 @@ extern void init_skill(s32b value, s32b mod, int i);
extern s16b find_ability(cptr name);
extern void dump_abilities(FILE *fff);
extern void do_cmd_ability(void);
-extern bool has_ability(int ab);
+extern bool_ has_ability(int ab);
extern void apply_level_abilities(int level);
-extern void recalc_skills(bool init);
+extern void recalc_skills(bool_ init);
/* gods.c */
extern void inc_piety(int god, s32b amt);
extern void abandon_god(int god);
extern int wisdom_scale(int max);
extern int find_god(cptr name);
-extern void follow_god(int god, bool silent);
+extern void follow_god(int god, bool_ silent);
diff --git a/src/files.c b/src/files.c
index 7323b426..1c4e816f 100644
--- a/src/files.c
+++ b/src/files.c
@@ -13,7 +13,7 @@
#include "angband.h"
-static bool setuid_grabbed = TRUE;
+static bool_ setuid_grabbed = TRUE;
/*
@@ -1005,7 +1005,7 @@ errr process_pref_file(cptr name)
errr err = 0;
- bool bypass = FALSE;
+ bool_ bypass = FALSE;
/* Build the filename -- Allow users to override system pref files */
path_build(buf, 1024, ANGBAND_DIR_USER, name);
@@ -1961,7 +1961,7 @@ static void display_player_ben_one(int mode)
int d[INVEN_TOTAL - INVEN_WIELD + 1];
- bool got;
+ bool_ got;
byte a;
@@ -2081,7 +2081,7 @@ static void display_player_ben_one(int mode)
for (n = 0; n < INVEN_TOTAL - INVEN_WIELD + 1; n++)
{
/* Change colour every two columns */
- bool is_green = (dispx & 0x02);
+ bool_ is_green = (dispx & 0x02);
a = (is_green ? TERM_GREEN : TERM_SLATE);
c = '.';
@@ -2424,7 +2424,7 @@ cptr describe_player_location()
*
* Figure out if a row on the grid is empty
*/
-static bool file_character_print_grid_check_row(const char *buf)
+static bool_ file_character_print_grid_check_row(const char *buf)
{
if (strstr(buf + 12, "+")) return TRUE;
if (strstr(buf + 12, "*")) return TRUE;
@@ -2445,7 +2445,7 @@ static bool file_character_print_grid_check_row(const char *buf)
*
* Prints the big ugly grid
*/
-static void file_character_print_grid(FILE *fff, bool show_gaps, bool show_legend)
+static void file_character_print_grid(FILE *fff, bool_ show_gaps, bool_ show_legend)
{
static cptr blank_line = " ";
static char buf[1024];
@@ -2487,7 +2487,7 @@ static void file_character_print_grid(FILE *fff, bool show_gaps, bool show_legen
*
* Outputs one item (for Inventory, Equipment, Home, and Mathom-house)
*/
-void file_character_print_item(FILE *fff, char label, object_type *obj, bool full)
+void file_character_print_item(FILE *fff, char label, object_type *obj, bool_ full)
{
static char o_name[80];
static cptr paren = ")";
@@ -2506,7 +2506,7 @@ void file_character_print_item(FILE *fff, char label, object_type *obj, bool ful
*
* Prints out one "store" (for Home and Mathom-house)
*/
-void file_character_print_store(FILE *fff, wilderness_type_info *place, int store, bool full)
+void file_character_print_store(FILE *fff, wilderness_type_info *place, int store, bool_ full)
{
int i;
town_type *town = &town_info[place->entrance];
@@ -2537,7 +2537,7 @@ void file_character_print_store(FILE *fff, wilderness_type_info *place, int stor
*
* Beware of the ugly pointer gymnastics.
*/
-bool file_character_check_stores(store_type ***store_list, int *store_list_count, wilderness_type_info *place, int store)
+bool_ file_character_check_stores(store_type ***store_list, int *store_list_count, wilderness_type_info *place, int store)
{
town_type *town = &town_info[place->entrance];
store_type *st_ptr = &town->store[store];
@@ -2577,7 +2577,7 @@ bool file_character_check_stores(store_type ***store_list, int *store_list_count
* XXX XXX XXX Allow the "full" flag to dump additional info,
* and trigger its usage from various places in the code.
*/
-errr file_character(cptr name, bool full)
+errr file_character(cptr name, bool_ full)
{
int i, j, x, y;
byte a;
@@ -2766,7 +2766,7 @@ errr file_character(cptr name, bool full)
if (r_ptr->flags1 & (RF1_UNIQUE))
{
- bool dead = (r_ptr->max_num == 0);
+ bool_ dead = (r_ptr->max_num == 0);
if (dead)
{
Total++;
@@ -2973,7 +2973,7 @@ struct hyperlink
typedef struct hyperlink hyperlink_type;
-bool show_file(cptr name, cptr what, int line, int mode)
+bool_ show_file(cptr name, cptr what, int line, int mode)
{
int i, k, x;
@@ -2992,7 +2992,7 @@ bool show_file(cptr name, cptr what, int line, int mode)
byte color = TERM_WHITE;
/* This screen has sub-screens */
- bool menu = FALSE;
+ bool_ menu = FALSE;
/* Current help file */
FILE *fff = NULL;
@@ -3596,7 +3596,7 @@ bool show_file(cptr name, cptr what, int line, int mode)
return (TRUE);
}
-bool txt_to_html(cptr head, cptr foot, cptr base, cptr ext, bool force, bool recur)
+bool_ txt_to_html(cptr head, cptr foot, cptr base, cptr ext, bool_ force, bool_ recur)
{
int i, x;
@@ -3737,7 +3737,7 @@ bool txt_to_html(cptr head, cptr foot, cptr base, cptr ext, bool force, bool rec
/* Display the file */
while (TRUE)
{
- bool do_color = FALSE;
+ bool_ do_color = FALSE;
/* Skip a line */
if (my_fgets(fff, h_ptr->rbuf, 1024)) break;
@@ -4136,7 +4136,7 @@ static int get_key(char c)
*/
typedef char chg_type[500][100];
-bool chg_to_txt(cptr base, cptr newname)
+bool_ chg_to_txt(cptr base, cptr newname)
{
int i, j, key = 0;
@@ -4279,7 +4279,7 @@ void process_player_base()
path_build(savefile, 1024, ANGBAND_DIR_SAVE, temp);
}
-void process_player_name(bool sf)
+void process_player_name(bool_ sf)
{
int i, k = 0;
char tmp[50];
@@ -4468,7 +4468,7 @@ void do_cmd_suicide(void)
* when the game is loaded again
* Alternatively forget_view() and update_view() can be used
*/
-void remove_cave_view(bool remove)
+void remove_cave_view(bool_ remove)
{
int i;
cave_type *c_ptr;
@@ -4636,7 +4636,7 @@ long total_points(void)
if (r_ptr->flags1 & (RF1_UNIQUE))
{
- bool dead = (r_ptr->max_num == 0);
+ bool_ dead = (r_ptr->max_num == 0);
if (dead)
{
@@ -4688,7 +4688,7 @@ static void center_string(char *buf, cptr str)
/*
* Redefinable "print_tombstone" action
*/
-bool (*tombstone_aux)(void) = NULL;
+bool_ (*tombstone_aux)(void) = NULL;
/*
@@ -4696,7 +4696,7 @@ bool (*tombstone_aux)(void) = NULL;
*/
static void print_tomb(void)
{
- bool done = FALSE;
+ bool_ done = FALSE;
/* Do we use a special tombstone ? */
if (tombstone_aux)
@@ -5096,7 +5096,7 @@ static int highscore_where(high_score *score)
static int highscore_add(high_score *score)
{
int i, slot;
- bool done = FALSE;
+ bool_ done = FALSE;
high_score the_score, tmpscore;
diff --git a/src/gen_evol.c b/src/gen_evol.c
index 8779f22f..85bad1a3 100644
--- a/src/gen_evol.c
+++ b/src/gen_evol.c
@@ -16,7 +16,7 @@
/*
* Generate a game of life level :) and make it evolve
*/
-void evolve_level(bool noise)
+void evolve_level(bool_ noise)
{
int i, j;
@@ -130,7 +130,7 @@ void evolve_level(bool noise)
}
-bool level_generate_life(cptr name)
+bool_ level_generate_life(cptr name)
{
int i, j;
diff --git a/src/gen_maze.c b/src/gen_maze.c
index 03941f01..c3333083 100644
--- a/src/gen_maze.c
+++ b/src/gen_maze.c
@@ -139,7 +139,7 @@ void dig(maze_row *maze, int y, int x, int d)
}
-bool level_generate_maze(cptr name)
+bool_ level_generate_maze(cptr name)
{
int i, j, d;
int y, dy = 0;
diff --git a/src/generate.c b/src/generate.c
index 98d3ff92..5d0f67c3 100644
--- a/src/generate.c
+++ b/src/generate.c
@@ -259,10 +259,10 @@ struct dun_data
int col_rooms;
/* Array of which blocks are used */
- bool room_map[MAX_ROOMS_ROW][MAX_ROOMS_COL];
+ bool_ room_map[MAX_ROOMS_ROW][MAX_ROOMS_COL];
/* Hack -- there is a pit/nest on this level */
- bool crowded;
+ bool_ crowded;
};
/*
@@ -273,12 +273,12 @@ typedef struct level_generator_type level_generator_type;
struct level_generator_type
{
cptr name;
- bool (*generator)(cptr);
+ bool_ (*generator)(cptr);
- bool default_stairs;
- bool default_monsters;
- bool default_objects;
- bool default_miscs;
+ bool_ default_stairs;
+ bool_ default_monsters;
+ bool_ default_objects;
+ bool_ default_miscs;
struct level_generator_type *next;
};
@@ -288,7 +288,7 @@ static level_generator_type *level_generators = NULL;
/*
* Add a new generator
*/
-void add_level_generator(cptr name, bool (*generator)(cptr name), bool stairs, bool monsters, bool objects, bool miscs)
+void add_level_generator(cptr name, bool_ (*generator)(cptr name), bool_ stairs, bool_ monsters, bool_ objects, bool_ miscs)
{
level_generator_type *g;
@@ -440,7 +440,7 @@ static void place_down_stairs(int y, int x)
* Helper function for place_new_way. Determine if y, x is one of
* floor features of the current dungeon
*/
-static bool is_safe_floor(int y, int x)
+static bool_ is_safe_floor(int y, int x)
{
dungeon_info_type *d_ptr = &d_info[dungeon_type];
byte feat = cave[y][x].feat;
@@ -464,7 +464,7 @@ void place_new_way(int *y, int *x)
int x0, x1, x2;
int y0, y1, y2;
cave_type *c_ptr;
- bool ok;
+ bool_ ok;
int i, way_n;
byte way_x[MAX_WID], way_y[MAX_WID];
@@ -709,7 +709,7 @@ void place_new_way(int *y, int *x)
/*
* Returns random co-ordinates for player/monster/object
*/
-bool new_player_spot(int branch)
+bool_ new_player_spot(int branch)
{
int y, x;
int max_attempts = 5000;
@@ -1133,7 +1133,7 @@ static void alloc_object(int set, int typ, int num)
/* Pick a "legal" spot */
while (dummy < SAFE_MAX_ATTEMPTS)
{
- bool room;
+ bool_ room;
dummy++;
@@ -1721,7 +1721,7 @@ static void destroy_level(void)
/*
* Function that sees if a square is a floor (Includes range checking)
*/
-static bool get_is_floor(int x, int y)
+static bool_ get_is_floor(int x, int y)
{
/* Out of bounds */
if (!in_bounds(y, x)) return (FALSE);
@@ -1739,7 +1739,7 @@ static bool get_is_floor(int x, int y)
static void check_room_boundary(int x1, int y1, int x2, int y2)
{
int count, x, y;
- bool old_is_floor, new_is_floor;
+ bool_ old_is_floor, new_is_floor;
/* Avoid doing this in irrelevant places -- pelpel */
if (!(dungeon_flags1 & DF1_CAVERN)) return;
@@ -1966,7 +1966,7 @@ static void vault_monsters(int y1, int x1, int num)
* cx, cy are the returned center of the allocated room in coordinates for
* cave.feat and cave.info etc.
*/
-bool room_alloc(int width, int height, bool crowded, int by0, int bx0, int *cx, int *cy)
+bool_ room_alloc(int width, int height, bool_ crowded, int by0, int bx0, int *cx, int *cy)
{
int temp, eby, ebx, by, bx;
@@ -2683,7 +2683,7 @@ static void build_type4(int by0, int bx0)
/*
* Helper function for "monster nest (jelly)"
*/
-static bool vault_aux_jelly(int r_idx)
+static bool_ vault_aux_jelly(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -2704,7 +2704,7 @@ static bool vault_aux_jelly(int r_idx)
/*
* Helper function for "monster nest (animal)"
*/
-static bool vault_aux_animal(int r_idx)
+static bool_ vault_aux_animal(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -2722,7 +2722,7 @@ static bool vault_aux_animal(int r_idx)
/*
* Helper function for "monster nest (undead)"
*/
-static bool vault_aux_undead(int r_idx)
+static bool_ vault_aux_undead(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -2740,7 +2740,7 @@ static bool vault_aux_undead(int r_idx)
/*
* Helper function for "monster nest (chapel)"
*/
-static bool vault_aux_chapel(int r_idx)
+static bool_ vault_aux_chapel(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -2762,7 +2762,7 @@ static bool vault_aux_chapel(int r_idx)
/*
* Helper function for "monster nest (kennel)"
*/
-static bool vault_aux_kennel(int r_idx)
+static bool_ vault_aux_kennel(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -2778,7 +2778,7 @@ static bool vault_aux_kennel(int r_idx)
/*
* Helper function for "monster nest (treasure)"
*/
-static bool vault_aux_treasure(int r_idx)
+static bool_ vault_aux_treasure(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -2801,7 +2801,7 @@ static bool vault_aux_treasure(int r_idx)
/*
* Helper function for "monster nest (clone)"
*/
-static bool vault_aux_clone(int r_idx)
+static bool_ vault_aux_clone(int r_idx)
{
return (r_idx == template_race);
}
@@ -2810,7 +2810,7 @@ static bool vault_aux_clone(int r_idx)
/*
* Helper function for "monster nest (symbol clone)"
*/
-static bool vault_aux_symbol(int r_idx)
+static bool_ vault_aux_symbol(int r_idx)
{
return ((r_info[r_idx].d_char == (r_info[template_race].d_char))
&& !(r_info[r_idx].flags1 & RF1_UNIQUE));
@@ -2820,7 +2820,7 @@ static bool vault_aux_symbol(int r_idx)
/*
* Helper function for "monster pit (orc)"
*/
-static bool vault_aux_orc(int r_idx)
+static bool_ vault_aux_orc(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -2839,7 +2839,7 @@ static bool vault_aux_orc(int r_idx)
/*
* Helper function for "monster pit (troll)"
*/
-static bool vault_aux_troll(int r_idx)
+static bool_ vault_aux_troll(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -2857,7 +2857,7 @@ static bool vault_aux_troll(int r_idx)
/*
* Helper function for "monster pit (giant)"
*/
-static bool vault_aux_giant(int r_idx)
+static bool_ vault_aux_giant(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -2881,7 +2881,7 @@ static u32b vault_aux_dragon_mask4;
/*
* Helper function for "monster pit (dragon)"
*/
-static bool vault_aux_dragon(int r_idx)
+static bool_ vault_aux_dragon(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -2902,7 +2902,7 @@ static bool vault_aux_dragon(int r_idx)
/*
* Helper function for "monster pit (demon)"
*/
-static bool vault_aux_demon(int r_idx)
+static bool_ vault_aux_demon(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -2946,8 +2946,8 @@ static void build_type5(int by0, int bx0)
int y, x, y1, x1, y2, x2, xval, yval;
int tmp, i;
cptr name;
- bool empty = FALSE;
- bool (*old_get_mon_num_hook)(int r_idx);
+ bool_ empty = FALSE;
+ bool_ (*old_get_mon_num_hook)(int r_idx);
s16b what[64];
/* Try to allocate space for room. If fails, exit */
@@ -3183,9 +3183,9 @@ static void build_type6(int by0, int bx0)
{
int tmp, what[16];
int i, j, y, x, y1, x1, y2, x2, xval, yval;
- bool empty = FALSE;
+ bool_ empty = FALSE;
cptr name;
- bool (*old_get_mon_num_hook)(int r_idx);
+ bool_ (*old_get_mon_num_hook)(int r_idx);
/* Try to allocate space for room. If fails, exit */
if (!room_alloc(25, 11, TRUE, by0, bx0, &xval, &yval)) return;
@@ -4228,7 +4228,7 @@ void generate_hmap(int y0, int x0, int xsiz, int ysiz, int grd,
/*
* Convert from height-map back to the normal Angband cave format
*/
-static bool hack_isnt_wall(int y, int x, int cutoff)
+static bool_ hack_isnt_wall(int y, int x, int cutoff)
{
/* Already done */
if (cave[y][x].info & CAVE_ICKY)
@@ -4299,8 +4299,8 @@ static void fill_hack(int y0, int x0, int y, int x, int xsize, int ysize,
}
-bool generate_fracave(int y0, int x0, int xsize, int ysize,
- int cutoff, bool light, bool room)
+bool_ generate_fracave(int y0, int x0, int xsize, int ysize,
+ int cutoff, bool_ light, bool_ room)
{
int x, y, i, amount, xhsize, yhsize;
cave_type *c_ptr;
@@ -4535,7 +4535,7 @@ bool generate_fracave(int y0, int x0, int xsize, int ysize,
static void build_cavern(void)
{
int grd, roug, cutoff, xsize, ysize, x0, y0;
- bool done, light, room;
+ bool_ done, light, room;
light = done = room = FALSE;
if (dun_level <= randint(25)) light = TRUE;
@@ -4576,7 +4576,7 @@ static void build_type10(int by0, int bx0)
{
int grd, roug, cutoff, xsize, ysize, y0, x0;
- bool done, light, room;
+ bool_ done, light, room;
/* Get size: note 'Evenness'*/
xsize = randint(22) * 2 + 6;
@@ -4885,7 +4885,7 @@ static void build_bubble_vault(int x0, int y0, int xsize, int ysize)
int i, j, k, x = 0, y = 0;
u16b min1, min2, temp;
- bool done;
+ bool_ done;
/* Offset from center to top left hand corner */
int xhsize = xsize / 2;
@@ -5143,7 +5143,7 @@ static void build_room_vault(int x0, int y0, int xsize, int ysize)
static void build_cave_vault(int x0, int y0, int xsiz, int ysiz)
{
int grd, roug, cutoff, xhsize, yhsize, xsize, ysize, x, y;
- bool done, light, room;
+ bool_ done, light, room;
/* Round to make sizes even */
xhsize = xsiz / 2;
@@ -5314,7 +5314,7 @@ static void build_maze_vault(int x0, int y0, int xsize, int ysize)
int y, x, dy, dx;
int y1, x1, y2, x2;
int i, m, n, num_vertices, *visited;
- bool light;
+ bool_ light;
cave_type *c_ptr;
@@ -6046,7 +6046,7 @@ static void build_type11(int by0, int bx0)
static void build_type12(int by0, int bx0)
{
int light, rad, x, y, x0, y0;
- bool emptyflag = TRUE;
+ bool_ emptyflag = TRUE;
int h1, h2, h3, h4;
/* Make a random metric */
@@ -6164,7 +6164,7 @@ static void build_type12(int by0, int bx0)
* FEAT_PERM_OUTER -- outer room walls (perma)
* FEAT_PERM_SOLID -- dungeon border (perma)
*/
-static void build_tunnel(int row1, int col1, int row2, int col2, bool water)
+static void build_tunnel(int row1, int col1, int row2, int col2, bool_ water)
{
int i, y, x;
int tmp_row, tmp_col;
@@ -6172,7 +6172,7 @@ static void build_tunnel(int row1, int col1, int row2, int col2, bool water)
int start_row, start_col;
int main_loop_count = 0;
- bool door_flag = FALSE;
+ bool_ door_flag = FALSE;
cave_type *c_ptr;
@@ -6463,7 +6463,7 @@ static int next_to_corr(int y1, int x1)
*
* Assumes "in_bounds(y,x)"
*/
-static bool possible_doorway(int y, int x)
+static bool_ possible_doorway(int y, int x)
{
/* Count the adjacent corridors */
if (next_to_corr(y, x) >= 2)
@@ -6493,7 +6493,7 @@ static bool possible_doorway(int y, int x)
*/
static void try_doors(int y, int x)
{
- bool dir_ok[4];
+ bool_ dir_ok[4];
int i, k, n;
int yy, xx;
@@ -6606,7 +6606,7 @@ static void try_doors(int y, int x)
* Note that we restrict the number of "crowded" rooms to reduce
* the chance of overflowing the monster list during level creation.
*/
-static bool room_build(int y, int x, int typ)
+static bool_ room_build(int y, int x, int typ)
{
/* Restrict level */
if ((dun_level < roomdep[typ]) && !ironman_rooms) return (FALSE);
@@ -6667,7 +6667,7 @@ static bool room_build(int y, int x, int typ)
/*
* Set level boundaries
*/
-void set_bounders(bool empty_level)
+void set_bounders(bool_ empty_level)
{
int y, x;
@@ -6717,21 +6717,21 @@ void set_bounders(bool empty_level)
}
/* Needed to refill empty levels */
-static void fill_level(bool use_floor, byte smooth);
+static void fill_level(bool_ use_floor, byte smooth);
/*
* Generate a normal dungeon level
*/
-bool level_generate_dungeon(cptr name)
+bool_ level_generate_dungeon(cptr name)
{
int i, k, y, x, y1, x1, branch = get_branch();
dungeon_info_type *d_ptr = &d_info[dungeon_type];
int max_vault_ok = 2;
- bool destroyed = FALSE;
- bool empty_level = FALSE;
- bool cavern = FALSE;
+ bool_ destroyed = FALSE;
+ bool_ empty_level = FALSE;
+ bool_ cavern = FALSE;
s16b town_level = 0;
/* Is it a town level ? */
@@ -7065,7 +7065,7 @@ bool level_generate_dungeon(cptr name)
if (dungeon_flags1 & DF1_WATER_RIVERS)
{
int max = 3 + rand_int(2);
- bool said = FALSE;
+ bool_ said = FALSE;
for (i = 0; i < max; i++)
{
@@ -7081,7 +7081,7 @@ bool level_generate_dungeon(cptr name)
if (dungeon_flags1 & DF1_LAVA_RIVERS)
{
int max = 2 + rand_int(2);
- bool said = FALSE;
+ bool_ said = FALSE;
for (i = 0; i < max; i++)
{
@@ -7388,7 +7388,7 @@ static void init_feat_info(void)
*/
#define MAX_SHIFTS 14
-static void fill_level(bool use_floor, byte smooth)
+static void fill_level(bool_ use_floor, byte smooth)
{
int y, x;
int step;
@@ -7477,7 +7477,7 @@ static void fill_level(bool use_floor, byte smooth)
/* Repeat subdivision until all the grids are filled in */
while ((step = step >> 1) > 0)
{
- bool y_even, x_even;
+ bool_ y_even, x_even;
s16b y_wrap, x_wrap;
s16b y_sel, x_sel;
u32b selector = 0;
@@ -7559,14 +7559,14 @@ static void fill_level(bool use_floor, byte smooth)
*
* Note that "dun_body" adds about 4000 bytes of memory to the stack.
*/
-static bool cave_gen(void)
+static bool_ cave_gen(void)
{
int i, k, y, x, y1, x1, branch;
dungeon_info_type *d_ptr = &d_info[dungeon_type];
int max_vault_ok = 2;
- bool empty_level = FALSE;
+ bool_ empty_level = FALSE;
s16b town_level = 0;
level_generator_type *generator;
@@ -8198,7 +8198,7 @@ static void arena_gen(void)
int y, x;
int qy = SCREEN_HGT;
int qx = SCREEN_WID;
- bool daytime;
+ bool_ daytime;
/* Day time */
if ((turn % (10L * DAY)) < ((10L * DAY) / 2))
@@ -8266,7 +8266,7 @@ static void quest_gen(void)
/* Mega-Hack */
#define REGEN_HACK 0x02
-bool build_special_level(void)
+bool_ build_special_level(void)
{
char buf[80];
int y, x, ystart = 2, xstart = 2;
@@ -8384,7 +8384,7 @@ static void finalise_special_level(void)
void generate_grid_mana()
{
int y, x, mana, mult;
- bool xtra_magic = FALSE;
+ bool_ xtra_magic = FALSE;
if (randint(XTRA_MAGIC) == 1)
{
@@ -8430,7 +8430,7 @@ void generate_cave(void)
dungeon_info_type *d_ptr = &d_info[dungeon_type];
int tester_1, tester_2;
int y, x, num, i;
- bool loaded = FALSE;
+ bool_ loaded = FALSE;
char buf[80];
s16b town_level = 0;
@@ -8528,7 +8528,7 @@ void generate_cave(void)
/* Generate */
for (num = 0; TRUE; num++)
{
- bool okay = TRUE;
+ bool_ okay = TRUE;
cptr why = NULL;
diff --git a/src/gods.c b/src/gods.c
index 8d0b1791..863582a2 100644
--- a/src/gods.c
+++ b/src/gods.c
@@ -46,7 +46,7 @@ void abandon_god(int god)
/*
* Get a religion
*/
-void follow_god(int god, bool silent)
+void follow_god(int god, bool_ silent)
{
/* Poor unbelievers, i'm so mean ... BOUHAHAHA */
if (get_skill(SKILL_ANTIMAGIC))
@@ -78,7 +78,7 @@ void follow_god(int god, bool silent)
/*
* Show religious info.
*/
-bool show_god_info(bool ext)
+bool_ show_god_info(bool_ ext)
{
int pgod = p_ptr->pgod;
int tmp;
diff --git a/src/h-type.h b/src/h-type.h
index eb865892..5dbb4975 100644
--- a/src/h-type.h
+++ b/src/h-type.h
@@ -78,13 +78,6 @@ typedef int errr;
#undef byte
#define byte byte_hack
-/*
- * Hack -- prevent problems with C++
- */
-#undef bool
-#define bool bool_hack
-
-
/* Note that "signed char" is not always "defined" */
/* So always use "s16b" to hold small signed values */
/* A signed byte of memory */
@@ -96,7 +89,7 @@ typedef unsigned char byte;
/* Note that a bool is smaller than a full "int" */
/* Simple True/False type */
-typedef char bool;
+typedef char bool_;
/* A signed, standard integer (at least 2 bytes) */
@@ -133,7 +126,7 @@ typedef real *real_ptr;
typedef errr *errr_ptr;
typedef char *char_ptr;
typedef byte *byte_ptr;
-typedef bool *bool_ptr;
+typedef bool_ *bool_ptr;
typedef sint *sint_ptr;
typedef uint *uint_ptr;
typedef long *long_ptr;
@@ -153,7 +146,7 @@ typedef void (*func_void)();
typedef errr (*func_errr)();
typedef char (*func_char)();
typedef byte (*func_byte)();
-typedef bool (*func_bool)();
+typedef bool_ (*func_bool)();
typedef sint (*func_sint)();
typedef uint (*func_uint)();
typedef real (*func_real)();
@@ -168,7 +161,7 @@ typedef cptr (*func_cptr)();
typedef errr (*func_gen)(vptr, vptr);
/* An equality testing function takes two things to compare (bool) */
-typedef bool (*func_eql)(vptr, vptr);
+typedef bool_ (*func_eql)(vptr, vptr);
/* A comparison function takes two things and to compare (-1,0,+1) */
typedef sint (*func_cmp)(vptr, vptr);
diff --git a/src/help.c b/src/help.c
index 73475387..d0bdbedf 100644
--- a/src/help.c
+++ b/src/help.c
@@ -19,5 +19,5 @@
/*
* Driver for the context-sensitive help system
*/
-void ingame_help(bool enable)
+void ingame_help(bool_ enable)
{}
diff --git a/src/init1.c b/src/init1.c
index ded9a281..d8fc7053 100644
--- a/src/init1.c
+++ b/src/init1.c
@@ -1531,7 +1531,7 @@ static void fp_stack_push(cptr name)
}
}
-static bool fp_stack_pop()
+static bool_ fp_stack_pop()
{
if (fp_stack_idx > 0)
{
@@ -1570,7 +1570,7 @@ static int my_fgets_dostack(char *buf, int len)
/*
* Grab one race flag from a textual string
*/
-static bool unknown_shut_up = FALSE;
+static bool_ unknown_shut_up = FALSE;
static errr grab_one_class_flag(u32b *choice, cptr what)
{
int i;
@@ -1782,7 +1782,7 @@ errr init_player_info_txt(FILE *fp, char *buf)
char *s, *t;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
player_race *rp_ptr = NULL;
@@ -3412,13 +3412,13 @@ errr init_player_info_txt(FILE *fp, char *buf)
/*
* Initialize the "v_info" array, by parsing an ascii "template" file
*/
-errr init_v_info_txt(FILE *fp, char *buf, bool start)
+errr init_v_info_txt(FILE *fp, char *buf, bool_ start)
{
int i;
char *s;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
vault_type *v_ptr = NULL;
@@ -3660,7 +3660,7 @@ errr init_f_info_txt(FILE *fp, char *buf)
char *s, *t;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
u32b default_desc = 0, default_tunnel = 0, default_block = 0;
/* Current entry */
@@ -3995,7 +3995,7 @@ errr init_f_info_txt(FILE *fp, char *buf)
/*
* Grab one flag in an object_kind from a textual string
*/
-static errr grab_one_kind_flag(object_kind *k_ptr, cptr what, bool obvious)
+static errr grab_one_kind_flag(object_kind *k_ptr, cptr what, bool_ obvious)
{
int i;
@@ -4107,7 +4107,7 @@ errr init_k_info_txt(FILE *fp, char *buf)
char *s, *t;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
object_kind *k_ptr = NULL;
@@ -4605,7 +4605,7 @@ errr init_al_info_txt(FILE *fp, char *buf)
struct artifact_select_flag *a_ptr = NULL;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Just before the first record */
error_idx = -1;
@@ -4906,7 +4906,7 @@ errr init_al_info_txt(FILE *fp, char *buf)
/*
* Grab one flag in an artifact_type from a textual string
*/
-static errr grab_one_artifact_flag(artifact_type *a_ptr, cptr what, bool obvious)
+static errr grab_one_artifact_flag(artifact_type *a_ptr, cptr what, bool_ obvious)
{
int i;
@@ -5021,7 +5021,7 @@ errr init_a_info_txt(FILE *fp, char *buf)
char *s, *t;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
artifact_type *a_ptr = NULL;
@@ -5361,7 +5361,7 @@ errr init_set_info_txt(FILE *fp, char *buf)
char *s, *t;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
set_type *set_ptr = NULL;
@@ -5598,7 +5598,7 @@ errr init_s_info_txt(FILE *fp, char *buf)
char *s;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
skill_type *s_ptr = NULL;
@@ -5977,7 +5977,7 @@ errr init_ab_info_txt(FILE *fp, char *buf)
char *s;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
ability_type *ab_ptr = NULL;
@@ -6312,7 +6312,7 @@ errr init_ab_info_txt(FILE *fp, char *buf)
/*
* Grab one flag in a ego-item_type from a textual string
*/
-static bool grab_one_ego_item_flag(ego_item_type *e_ptr, cptr what, int n, bool obvious)
+static bool_ grab_one_ego_item_flag(ego_item_type *e_ptr, cptr what, int n, bool_ obvious)
{
int i;
@@ -6424,7 +6424,7 @@ static bool grab_one_ego_item_flag(ego_item_type *e_ptr, cptr what, int n, bool
return (1);
}
-static bool grab_one_ego_item_flag_restrict(ego_item_type *e_ptr, cptr what, bool need)
+static bool_ grab_one_ego_item_flag_restrict(ego_item_type *e_ptr, cptr what, bool_ need)
{
int i;
@@ -6539,7 +6539,7 @@ errr init_e_info_txt(FILE *fp, char *buf)
char *s, *t;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
ego_item_type *e_ptr = NULL;
@@ -6934,7 +6934,7 @@ errr init_e_info_txt(FILE *fp, char *buf)
/*
* Grab one flag in a randart_part_type from a textual string
*/
-static bool grab_one_randart_item_flag(randart_part_type *ra_ptr, cptr what, char c)
+static bool_ grab_one_randart_item_flag(randart_part_type *ra_ptr, cptr what, char c)
{
int i;
u32b *f1, *f2, *f3, *f4, *f5, *esp;
@@ -7061,7 +7061,7 @@ errr init_ra_info_txt(FILE *fp, char *buf)
char *s, *t;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
randart_part_type *ra_ptr = NULL;
@@ -7468,7 +7468,7 @@ errr init_r_info_txt(FILE *fp, char *buf)
char *s, *t;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
monster_race *r_ptr = NULL;
@@ -7875,7 +7875,7 @@ errr init_r_info_txt(FILE *fp, char *buf)
/*
* Grab one (basic) flag in a monster_race from a textual string
*/
-static errr grab_one_basic_ego_flag(monster_ego *re_ptr, cptr what, bool add)
+static errr grab_one_basic_ego_flag(monster_ego *re_ptr, cptr what, bool_ add)
{
int i;
@@ -7968,7 +7968,7 @@ static errr grab_one_basic_ego_flag(monster_ego *re_ptr, cptr what, bool add)
/*
* Grab one (spell) flag in a monster_race from a textual string
*/
-static errr grab_one_spell_ego_flag(monster_ego *re_ptr, cptr what, bool add)
+static errr grab_one_spell_ego_flag(monster_ego *re_ptr, cptr what, bool_ add)
{
int i;
@@ -8021,7 +8021,7 @@ static errr grab_one_spell_ego_flag(monster_ego *re_ptr, cptr what, bool add)
/*
* Grab one (basic) flag in a monster_race from a textual string
*/
-static errr grab_one_ego_flag(monster_ego *re_ptr, cptr what, bool must)
+static errr grab_one_ego_flag(monster_ego *re_ptr, cptr what, bool_ must)
{
int i;
@@ -8111,7 +8111,7 @@ errr init_re_info_txt(FILE *fp, char *buf)
char *s, *t;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
monster_ego *re_ptr = NULL;
@@ -8652,7 +8652,7 @@ errr init_t_info_txt(FILE *fp, char *buf)
char *s, *t;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
trap_type *t_ptr = NULL;
@@ -9025,7 +9025,7 @@ errr init_d_info_txt(FILE *fp, char *buf)
char *s, *t;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
dungeon_info_type *d_ptr = NULL;
@@ -9670,7 +9670,7 @@ errr init_st_info_txt(FILE *fp, char *buf)
char *s, *t;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
store_info_type *st_ptr = NULL;
@@ -9959,7 +9959,7 @@ errr init_ba_info_txt(FILE *fp, char *buf)
char *s;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
store_action_type *ba_ptr = NULL;
@@ -10129,7 +10129,7 @@ errr init_ow_info_txt(FILE *fp, char *buf)
char *s, *t;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
owner_type *ow_ptr = NULL;
@@ -10376,7 +10376,7 @@ errr init_wf_info_txt(FILE *fp, char *buf)
char *s, *t;
/* Not ready yet */
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Current entry */
wilderness_type_info *wf_ptr = NULL;
@@ -10622,17 +10622,17 @@ struct dungeon_grid
int bx, by; /* For between gates */
int mimic; /* Mimiced features */
s32b mflag; /* monster's mflag */
- bool ok;
- bool defined;
+ bool_ ok;
+ bool_ defined;
};
-static bool meta_sleep = TRUE;
+static bool_ meta_sleep = TRUE;
static dungeon_grid letter[255];
/*
* Parse a sub-file of the "extra info"
*/
-bool process_dungeon_file_full = FALSE;
+bool_ process_dungeon_file_full = FALSE;
static errr process_dungeon_file_aux(char *buf, int *yval, int *xval, int xvalstart, int ymax, int xmax)
{
int i;
@@ -11549,7 +11549,7 @@ static cptr process_dungeon_file_expr(char **sp, char *fp)
/* Other */
else
{
- bool text_mode = FALSE;
+ bool_ text_mode = FALSE;
/* Accept all printables except spaces and brackets */
while (isprint(*s))
@@ -11710,7 +11710,7 @@ static cptr process_dungeon_file_expr(char **sp, char *fp)
}
-errr process_dungeon_file(cptr full_text, cptr name, int *yval, int *xval, int ymax, int xmax, bool init)
+errr process_dungeon_file(cptr full_text, cptr name, int *yval, int *xval, int ymax, int xmax, bool_ init)
{
FILE *fp = 0;
@@ -11720,7 +11720,7 @@ errr process_dungeon_file(cptr full_text, cptr name, int *yval, int *xval, int y
errr err = 0;
- bool bypass = FALSE;
+ bool_ bypass = FALSE;
/* Save the start since it ought to be modified */
int xmin = *xval;
diff --git a/src/init2.c b/src/init2.c
index 7dab2d46..5f1d96d9 100644
--- a/src/init2.c
+++ b/src/init2.c
@@ -2271,7 +2271,7 @@ static void init_basic()
/* Macro variables */
C_MAKE(macro__pat, MACRO_MAX, cptr);
C_MAKE(macro__act, MACRO_MAX, cptr);
- C_MAKE(macro__cmd, MACRO_MAX, bool);
+ C_MAKE(macro__cmd, MACRO_MAX, bool_);
/* Macro action buffer */
C_MAKE(macro__buf, 1024, char);
@@ -2289,7 +2289,7 @@ static void init_basic()
/*
* Pseudo, dummy quest initializer, to actualy disable them
*/
-static bool quest_disable_init_hook(int q_idx)
+static bool_ quest_disable_init_hook(int q_idx)
{
q_idx = q_idx;
return FALSE;
@@ -2464,19 +2464,19 @@ static errr init_wilderness(void)
void reinit_powers_type(s16b new_size)
{
power_type *new_powers_type;
- bool *new_powers;
+ bool_ *new_powers;
C_MAKE(new_powers_type, new_size, power_type);
- C_MAKE(new_powers, new_size, bool);
+ C_MAKE(new_powers, new_size, bool_);
/* Reallocate the extra memory */
if (powers_type && p_ptr->powers)
{
C_COPY(new_powers_type, powers_type, power_max, power_type);
- C_COPY(new_powers, p_ptr->powers, power_max, bool);
+ C_COPY(new_powers, p_ptr->powers, power_max, bool_);
C_FREE(powers_type, power_max, power_type);
- C_FREE(p_ptr->powers, power_max, bool);
+ C_FREE(p_ptr->powers, power_max, bool_);
}
powers_type = new_powers_type;
@@ -2540,7 +2540,7 @@ void init_schools(s16b new_size)
void init_corruptions(s16b new_size)
{
/* allocate the extra memory */
- C_MAKE(p_ptr->corruptions, new_size, bool);
+ C_MAKE(p_ptr->corruptions, new_size, bool_);
max_corruptions = new_size;
}
@@ -2554,9 +2554,9 @@ static errr init_other(void)
/*** Prepare the "dungeon" information ***/
/* Allocate and Wipe the special gene flags */
- C_MAKE(m_allow_special, max_r_idx, bool);
- C_MAKE(k_allow_special, max_k_idx, bool);
- C_MAKE(a_allow_special, max_a_idx, bool);
+ C_MAKE(m_allow_special, max_r_idx, bool_);
+ C_MAKE(k_allow_special, max_k_idx, bool_);
+ C_MAKE(a_allow_special, max_a_idx, bool_);
/*** Prepare "vinfo" array ***/
@@ -2580,7 +2580,7 @@ static errr init_other(void)
/* Allocate and Wipe the special levels */
for (i = 0; i < MAX_DUNGEON_DEPTH; i++)
{
- C_MAKE(special_lvl[i], max_d_idx, bool);
+ C_MAKE(special_lvl[i], max_d_idx, bool_);
}
/* Allocate and wipe each line of the cave */
diff --git a/src/levels.c b/src/levels.c
index 8ecc6786..46e5a6ba 100644
--- a/src/levels.c
+++ b/src/levels.c
@@ -17,7 +17,7 @@
* Return the parameter of the given command in the given file
*/
static int start_line = 0;
-bool get_command(const char *file, char comm, char *param)
+bool_ get_command(const char *file, char comm, char *param)
{
char buf[1024];
int i = -1;
@@ -130,7 +130,7 @@ int get_flevel()
/*
* Return the extension of the savefile for the level
*/
-bool get_dungeon_save(char *buf)
+bool_ get_dungeon_save(char *buf)
{
char file[20];
@@ -145,7 +145,7 @@ bool get_dungeon_save(char *buf)
/*
* Return the level generator
*/
-bool get_dungeon_generator(char *buf)
+bool_ get_dungeon_generator(char *buf)
{
char file[20];
@@ -160,7 +160,7 @@ bool get_dungeon_generator(char *buf)
/*
* Return the special level
*/
-bool get_dungeon_special(char *buf)
+bool_ get_dungeon_special(char *buf)
{
char file[20];
@@ -175,7 +175,7 @@ bool get_dungeon_special(char *buf)
/*
* Return the special level name
*/
-bool get_dungeon_name(char *buf)
+bool_ get_dungeon_name(char *buf)
{
char file[20];
@@ -227,7 +227,7 @@ void get_level_flags()
/*
* Return the special level desc
*/
-bool get_level_desc(char *buf)
+bool_ get_level_desc(char *buf)
{
char file[20];
diff --git a/src/loadsave.c b/src/loadsave.c
index 7031b0d7..f72c8c61 100644
--- a/src/loadsave.c
+++ b/src/loadsave.c
@@ -20,14 +20,14 @@ static void note(cptr);
static void do_fate(int, int);
static void do_item(object_type *, int);
static void do_options(int);
-static bool do_store(store_type *, int);
+static bool_ do_store(store_type *, int);
static void do_messages(int flag);
static void do_xtra(int, int);
-static bool do_savefile_aux(int);
+static bool_ do_savefile_aux(int);
static void junkinit(void);
static void morejunk(void);
-static bool do_inventory(int);
-static bool do_dungeon(int, bool);
+static bool_ do_inventory(int);
+static bool_ do_dungeon(int, bool_);
static void do_grid(int);
static void my_sentinel(char *, u16b, int);
@@ -38,7 +38,7 @@ static void skip_ver_byte(u32b, int);
errr rd_savefile(void);
#ifdef SAFER_PANICS
-bool panicload;
+bool_ panicload;
#endif
static FILE *fff; /* Local savefile ptr */
@@ -225,7 +225,7 @@ static void do_subrace(int flag)
* Misc. other data
*/
static char loaded_game_module[80];
-static bool do_extra(int flag)
+static bool_ do_extra(int flag)
{
int i, j;
byte tmp8u;
@@ -752,9 +752,9 @@ void save_dungeon(void)
/*
* Medium level player saver
*/
-static bool save_player_aux(char *name)
+static bool_ save_player_aux(char *name)
{
- bool ok = FALSE;
+ bool_ ok = FALSE;
int fd = -1;
int mode = 0644;
@@ -825,7 +825,7 @@ static bool save_player_aux(char *name)
/*
* Attempt to save the player in a savefile
*/
-bool save_player(void)
+bool_ save_player(void)
{
int result = FALSE;
char safe[1024];
@@ -931,10 +931,10 @@ bool save_player(void)
return (result);
}
-bool file_exist(char *buf)
+bool_ file_exist(char *buf)
{
int fd;
- bool result;
+ bool_ result;
/* Grab permission */
if (savefile_setuid) safe_setuid_grab();
@@ -971,7 +971,7 @@ bool file_exist(char *buf)
* 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(void)
{
int fd = -1;
@@ -1515,7 +1515,7 @@ static void note(cptr msg)
/*
* Determine if an item can be wielded/worn (e.g. helmet, sword, bow, arrow)
*/
-static bool wearable_p(object_type *o_ptr)
+static bool_ wearable_p(object_type *o_ptr)
{
/* Valid "tval" codes */
switch (o_ptr->tval)
@@ -1809,7 +1809,7 @@ static void do_item(object_type *o_ptr, int flag)
static void do_monster(monster_type *m_ptr, int flag)
{
int i;
- bool tmp;
+ bool_ tmp;
/* Read the monster race */
do_s16b(&m_ptr->r_idx, flag);
@@ -2002,7 +2002,7 @@ static void do_lore(int r_idx, int flag)
/*
* Read a store
*/
-static bool do_store(store_type *str, int flag)
+static bool_ do_store(store_type *str, int flag)
/* FIXME! Why does this return anything when
it always returns the same thing? */
{
@@ -2287,7 +2287,7 @@ static void do_spells(int i, int flag)
* FIXME! This function probably could be unified better
* Note that the inventory is "re-sorted" later by "dungeon()".
*/
-static bool do_inventory(int flag)
+static bool_ do_inventory(int flag)
{
if (flag == LS_LOAD)
{
@@ -2432,7 +2432,7 @@ static void do_messages(int flag) /* FIXME! We should be able to unify this be
* The monsters/objects must be loaded in the same order
* that they were stored, since the actual indexes matter.
*/
-static bool do_dungeon(int flag, bool no_companions)
+static bool_ do_dungeon(int flag, bool_ no_companions)
{
int i;
@@ -2721,7 +2721,7 @@ static bool do_dungeon(int flag, bool no_companions)
}
/* Returns TRUE if we successfully load the dungeon */
-bool load_dungeon(char *ext)
+bool_ load_dungeon(char *ext)
{
char tmp[16];
char name[1024];
@@ -2805,7 +2805,7 @@ void do_fate(int i, int flag)
/*
* Actually read the savefile
*/
-static bool do_savefile_aux(int flag)
+static bool_ do_savefile_aux(int flag)
{
int i, j;
@@ -2813,7 +2813,7 @@ static bool do_savefile_aux(int flag)
u16b tmp16u;
u32b tmp32u;
- bool *reals;
+ bool_ *reals;
u16b real_max = 0;
/* Mention the savefile version */
@@ -3187,7 +3187,7 @@ static bool do_savefile_aux(int flag)
}
/* Note that this forbids max_towns from shrinking, but that is fine */
- C_MAKE(reals, max_towns, bool);
+ C_MAKE(reals, max_towns, bool_);
/* Find the real towns */
if (flag == LS_SAVE)
@@ -3220,7 +3220,7 @@ static bool do_savefile_aux(int flag)
do_store(&town_info[z].store[j], flag);
}
- C_FREE(reals, max_towns, bool);
+ C_FREE(reals, max_towns, bool_);
if (flag == LS_SAVE) tmp32u = extra_savefile_parts;
do_u32b(&tmp32u, flag);
diff --git a/src/lua/tolua.h b/src/lua/tolua.h
index b4748f52..ab86976c 100644
--- a/src/lua/tolua.h
+++ b/src/lua/tolua.h
@@ -27,6 +27,10 @@ extern "C" {
#include "lua.h"
+/* Evil hack for C++ bool_ vs. C bool. */
+#ifndef __cplusplus
+typedef unsigned char bool;
+#endif
/*************************************** Exported functions */
diff --git a/src/lua_bind.c b/src/lua_bind.c
index 04ed8c97..121e65d0 100644
--- a/src/lua_bind.c
+++ b/src/lua_bind.c
@@ -40,13 +40,13 @@ static void magic_power_info_lua(char *p, int power)
strcpy(p, lua_tostring(L, -1));
lua_settop(L, oldtop);
}
-bool get_magic_power_lua(int *sn, magic_power *powers, int max_powers, char *info_fct, int plev, int cast_stat)
+bool_ get_magic_power_lua(int *sn, magic_power *powers, int max_powers, char *info_fct, int plev, int cast_stat)
{
magic_power_info_lua_fct = info_fct;
return (get_magic_power(sn, powers, max_powers, magic_power_info_lua, plev, cast_stat));
}
-bool lua_spell_success(magic_power *spell, int stat, char *oups_fct)
+bool_ lua_spell_success(magic_power *spell, int stat, char *oups_fct)
{
int chance;
int minfail = 0;
@@ -136,10 +136,10 @@ s16b add_new_power(cptr name, cptr desc, cptr gain, cptr lose, byte level, byte
}
static char *lua_item_tester_fct;
-static bool lua_item_tester(object_type* o_ptr)
+static bool_ lua_item_tester(object_type* o_ptr)
{
int oldtop = lua_gettop(L);
- bool ret;
+ bool_ ret;
lua_getglobal(L, lua_item_tester_fct);
tolua_pushusertype(L, o_ptr, tolua_tag(L, "object_type"));
@@ -186,10 +186,10 @@ void find_position(int y, int x, int *yy, int *xx)
}
static char *summon_lua_okay_fct;
-bool summon_lua_okay(int r_idx)
+bool_ summon_lua_okay(int r_idx)
{
int oldtop = lua_gettop(L);
- bool ret;
+ bool_ ret;
lua_getglobal(L, lua_item_tester_fct);
tolua_pushnumber(L, r_idx);
@@ -199,7 +199,7 @@ bool summon_lua_okay(int r_idx)
return (ret);
}
-bool lua_summon_monster(int y, int x, int lev, bool friend, char *fct)
+bool_ lua_summon_monster(int y, int x, int lev, bool_ friend, char *fct)
{
summon_lua_okay_fct = fct;
@@ -236,7 +236,7 @@ void desc_quest(int q_idx, int d, char *desc)
/*
* Misc
*/
-bool get_com_lua(cptr prompt, int *com)
+bool_ get_com_lua(cptr prompt, int *com)
{
char c;
@@ -396,7 +396,7 @@ void get_target(int dir, int *y, int *x)
}
/* Level gen */
-void get_map_size(bool full_text, char *name, int *ysize, int *xsize)
+void get_map_size(bool_ full_text, char *name, int *ysize, int *xsize)
{
*xsize = 0;
*ysize = 0;
@@ -410,7 +410,7 @@ void get_map_size(bool full_text, char *name, int *ysize, int *xsize)
}
-void load_map(bool full_text, char *name, int *y, int *x)
+void load_map(bool_ full_text, char *name, int *y, int *x)
{
/* Set the correct monster hook */
set_mon_num_hook();
@@ -429,7 +429,7 @@ void load_map(bool full_text, char *name, int *y, int *x)
/* Allow lua to use a temporary file */
static char lua_temp_name[1025];
-static bool lua_temp_file_alloc = FALSE;
+static bool_ lua_temp_file_alloc = FALSE;
void lua_make_temp_file()
{
if (lua_temp_file_alloc) return;
@@ -459,7 +459,7 @@ cptr lua_get_temp_name()
return lua_temp_name;
}
-bool alloc_room(int by0, int bx0, int ysize, int xsize, int *y1, int *x1, int *y2, int *x2)
+bool_ alloc_room(int by0, int bx0, int ysize, int xsize, int *y1, int *x1, int *y2, int *x2)
{
int xval, yval, x, y;
@@ -502,7 +502,7 @@ void lua_print_hook(cptr str)
/*
* Hook for bounty monster selection.
*/
-static bool lua_mon_hook_bounty(int r_idx)
+static bool_ lua_mon_hook_bounty(int r_idx)
{
monster_race* r_ptr = &r_info[r_idx];
@@ -614,7 +614,7 @@ void lua_display_list(int y, int x, int h, int w, cptr title, list_type* list, i
/*
* Level generators
*/
-bool level_generate_script(cptr name)
+bool_ level_generate_script(cptr name)
{
s32b ret = FALSE;
@@ -623,7 +623,7 @@ bool level_generate_script(cptr name)
return ret;
}
-void add_scripted_generator(cptr name, bool stairs, bool monsters, bool objects, bool miscs)
+void add_scripted_generator(cptr name, bool_ stairs, bool_ monsters, bool_ objects, bool_ miscs)
{
add_level_generator(name, level_generate_script, stairs, monsters, objects, miscs);
}
diff --git a/src/maid-x11.c b/src/maid-x11.c
index 767413a7..2cdb9da6 100644
--- a/src/maid-x11.c
+++ b/src/maid-x11.c
@@ -64,7 +64,7 @@
#ifdef SUPPORT_GAMMA
-static bool gamma_table_ready = FALSE;
+static bool_ gamma_table_ready = FALSE;
#endif /* SUPPORT_GAMMA */
@@ -383,7 +383,7 @@ static int redShift, greenShift, blueShift;
/*
* Use smooth rescaling?
*/
-static bool smoothRescaling = TRUE;
+static bool_ smoothRescaling = TRUE;
/*
@@ -401,7 +401,7 @@ static void GetScaledRow(XImage *Im, int x, int y, int iw, int ow,
int xi, si, sifrac, ci, cifrac, addWhole, addFrac;
unsigned long pix;
int prevRed, prevGreen, prevBlue, nextRed, nextGreen, nextBlue;
- bool getNextPix;
+ bool_ getNextPix;
if (iw == ow)
{
@@ -580,7 +580,7 @@ static void ScaleIcon(XImage *ImIn, XImage *ImOut,
unsigned long tempGreen [MAX_ICON_WIDTH];
unsigned long tempBlue [MAX_ICON_WIDTH];
- bool getNextRow;
+ bool_ getNextRow;
/* get divider value for the horizontal scaling: */
if (ix == ox)
diff --git a/src/main-crb.c b/src/main-crb.c
index c03c29f2..9cd5b96c 100644
--- a/src/main-crb.c
+++ b/src/main-crb.c
@@ -483,7 +483,7 @@
/*
* Check and create if needed the directory dirpath
*/
-bool private_check_user_directory(cptr dirpath)
+bool_ private_check_user_directory(cptr dirpath)
{
/* Is this used anywhere else in *bands? */
struct stat stat_buf;
@@ -525,7 +525,7 @@ bool private_check_user_directory(cptr dirpath)
* home directory or try to create it if it doesn't exist.
* Returns FALSE if all the attempts fail.
*/
-static bool check_create_user_dir(void)
+static bool_ check_create_user_dir(void)
{
char dirpath[1024];
char versionpath[1024];
@@ -776,7 +776,7 @@ struct term_data
/*
* Forward declare -- see below
*/
-static bool CheckEvents(bool wait);
+static bool_ CheckEvents(bool_ wait);
#ifndef MACH_O_CARBON
@@ -839,7 +839,7 @@ static term_data data[MAX_TERM_DATA];
/*
* Note when "open"/"new" become valid
*/
-static bool initialized = FALSE;
+static bool_ initialized = FALSE;
@@ -2920,7 +2920,7 @@ static errr Term_pict_mac(int x, int y, int n, const byte *ap, const char *cp)
/* Scan the input */
for (i = 0; i < n; i++)
{
- bool done = FALSE;
+ bool_ done = FALSE;
byte a = *ap++;
char c = *cp++;
@@ -2931,7 +2931,7 @@ static errr Term_pict_mac(int x, int y, int n, const byte *ap, const char *cp)
# ifdef USE_EGO_GRAPHICS
byte ea = *eap++;
char ec = *ecp++;
- bool has_overlay = (ea && ec);
+ bool_ has_overlay = (ea && ec);
# endif /* USE_EGO_GRAPHICS */
#endif
@@ -3379,7 +3379,7 @@ static void save_pref_short(const char *key, short value)
* Load preference value for key, returns TRUE if it succeeds with
* vptr updated appropriately, FALSE otherwise.
*/
-static bool query_load_pref_short(const char *key, short *vptr)
+static bool_ query_load_pref_short(const char *key, short *vptr)
{
CFStringRef cf_key;
CFNumberRef cf_value;
@@ -3499,7 +3499,7 @@ static void cf_save_prefs()
*/
static void cf_load_prefs()
{
- bool ok;
+ bool_ ok;
short pref_major, pref_minor, pref_patch, pref_extra;
int i;
@@ -3751,7 +3751,7 @@ static void save_pref_file(void)
* is 'SAVE'.
* Originally written by Peter Ammon
*/
-static bool select_savefile(bool all)
+static bool_ select_savefile(bool_ all)
{
OSErr err;
FSSpec theFolderSpec;
@@ -3905,7 +3905,7 @@ static void do_menu_file_new(void)
/*
* Handle menu: "File" + "Open" / "Import"
*/
-static void do_menu_file_open(bool all)
+static void do_menu_file_open(bool_ all)
{
/* Let the player to choose savefile */
if (!select_savefile(all)) return;
@@ -5526,7 +5526,7 @@ static void quit_calmly(void)
* undesirable monopoly of CPU. The side-effect is that you cannot do
* while (CheckEvents(TRUE)); without discretion.
*/
-static bool CheckEvents(bool wait)
+static bool_ CheckEvents(bool_ wait)
{
EventRecord event;
diff --git a/src/main-gcu.c b/src/main-gcu.c
index 9583eebc..78768286 100644
--- a/src/main-gcu.c
+++ b/src/main-gcu.c
@@ -987,7 +987,7 @@ errr init_gcu(int argc, char **argv)
int num_term = MAX_TERM_DATA, next_win = 0;
- bool use_big_screen = FALSE;
+ bool_ use_big_screen = FALSE;
/* Parse args */
diff --git a/src/main-gtk.c b/src/main-gtk.c
index 8a15e237..367959cb 100644
--- a/src/main-gtk.c
+++ b/src/main-gtk.c
@@ -172,7 +172,7 @@ struct term_data
GdkFont *font;
GdkGC *gc;
- bool shown;
+ bool_ shown;
byte last_attr;
int font_wid;
@@ -267,7 +267,7 @@ static guint32 angband_colours[16];
/*
* Set to TRUE when a game is in progress
*/
-static bool game_in_progress = FALSE;
+static bool_ game_in_progress = FALSE;
/*
@@ -277,7 +277,7 @@ static bool game_in_progress = FALSE;
* with the MIT Shm extention which is usually active if you run
* Angband locally, because it reduces amount of memory-to-memory copy.
*/
-static bool use_backing_store = TRUE;
+static bool_ use_backing_store = TRUE;
@@ -345,7 +345,7 @@ static void cleanup_angband(void)
* Because of the way it is implemented in X11 ports,
* we can set this to TRUE even if we are using the 8x8 tileset.
*/
-static bool use_transparency = TRUE;
+static bool_ use_transparency = TRUE;
#endif /* ANG291_COMPAT */
@@ -389,7 +389,7 @@ static vptr hook_ralloc(huge size)
/*
* When set to TRUE, indicates that we can use gamma_table
*/
-static bool gamma_table_ready = FALSE;
+static bool_ gamma_table_ready = FALSE;
# ifdef INTERACTIVE_GAMMA
@@ -578,8 +578,8 @@ static int graf_mode_request = GRAF_MODE_NONE;
/*
* Use smooth rescaling?
*/
-static bool smooth_rescaling = TRUE;
-static bool smooth_rescaling_request = TRUE;
+static bool_ smooth_rescaling = TRUE;
+static bool_ smooth_rescaling_request = TRUE;
/*
* Dithering
@@ -589,7 +589,7 @@ static GdkRgbDither dith_mode = GDK_RGB_DITHER_NORMAL;
/*
* Need to reload and resize tiles when fonts are changed.
*/
-static bool resize_request = FALSE;
+static bool_ resize_request = FALSE;
/*
* Numbers of columns and rows in current tileset
@@ -890,7 +890,7 @@ static void get_scaled_row(
guint32 pix;
rgb_type prev;
rgb_type next;
- bool get_next_pix;
+ bool_ get_next_pix;
/* Unscaled */
if (iw == ow)
@@ -1098,7 +1098,7 @@ static void scale_icon(
rgb_type next[MAX_ICON_WIDTH];
rgb_type temp[MAX_ICON_WIDTH];
- bool get_next_row;
+ bool_ get_next_row;
/* get divider value for the horizontal scaling: */
if (ix == ox)
@@ -1532,7 +1532,7 @@ static GdkRGBImage *resize_tiles(
* CAVEAT: treatment of backslash is not compatible with the standard
* C usage XXX XXX XXX XXX
*/
-static bool read_str(char *buf, u32b len, FILE *f)
+static bool_ read_str(char *buf, u32b len, FILE *f)
{
int c;
@@ -1614,7 +1614,7 @@ static GdkRGBImage *load_xpm(cptr filename)
GdkRGBImage *img = NULL;
int width, height, colours, chars;
int i, j, k;
- bool ret;
+ bool_ ret;
pal_type *pal = NULL;
pal_type *head[HASH_SIZE];
u32b buflen = 0;
@@ -2212,14 +2212,14 @@ static void graf_nuke()
*
* XXX XXX XXX Windows using the same font should share resized tiles
*/
-static bool graf_init(
+static bool_ graf_init(
cptr filename,
int tile_wid,
int tile_hgt)
{
term_data *td;
- bool result;
+ bool_ result;
GdkRGBImage *raw_tiles, *scaled_tiles;
@@ -2838,7 +2838,7 @@ static errr Term_pict_gtk(
byte ea;
char ec;
int e_x = 0, e_y = 0;
- bool has_overlay;
+ bool_ has_overlay;
# endif /* USE_EGO_GRAPHICS */
@@ -3042,7 +3042,7 @@ static errr Term_pict_gtk(
* Process an event, if there's none block when wait is set true,
* return immediately otherwise.
*/
-static void CheckEvent(bool wait)
+static void CheckEvent(bool_ wait)
{
/* Process an event */
(void)gtk_main_iteration_do(wait);
@@ -4567,7 +4567,7 @@ static GtkWidget *get_widget_from_path(cptr path)
/*
* Enable/disable a menu item
*/
-void enable_menu_item(cptr path, bool enabled)
+void enable_menu_item(cptr path, bool_ enabled)
{
GtkWidget *widget;
@@ -4589,7 +4589,7 @@ void enable_menu_item(cptr path, bool enabled)
/*
* Check/uncheck a menu item. The item should be of the GtkCheckMenuItem type
*/
-void check_menu_item(cptr path, bool checked)
+void check_menu_item(cptr path, bool_ checked)
{
GtkWidget *widget;
@@ -4621,9 +4621,9 @@ static void file_menu_update_handler(
gpointer user_data)
{
#ifndef SAVEFILE_SCREEN
- bool game_start_ok;
+ bool_ game_start_ok;
#endif /* !SAVEFILE_SCREEN */
- bool save_ok, quit_ok;
+ bool_ save_ok, quit_ok;
#ifndef SAVEFILE_SCREEN
@@ -4897,7 +4897,7 @@ static void init_gtk_window(term_data *td, int i)
GtkWidget *menu_bar = NULL, *box;
cptr font;
- bool main_window = (i == 0) ? TRUE : FALSE;
+ bool_ main_window = (i == 0) ? TRUE : FALSE;
/* Create window */
diff --git a/src/main-gtk2.c b/src/main-gtk2.c
index ada45aa9..33ccd62c 100644
--- a/src/main-gtk2.c
+++ b/src/main-gtk2.c
@@ -172,7 +172,7 @@ struct term_data
GdkFont *font;
GdkGC *gc;
- bool shown;
+ bool_ shown;
byte last_attr;
int font_wid;
@@ -267,7 +267,7 @@ static guint32 angband_colours[16];
/*
* Set to TRUE when a game is in progress
*/
-static bool game_in_progress = FALSE;
+static bool_ game_in_progress = FALSE;
/*
@@ -277,7 +277,7 @@ static bool game_in_progress = FALSE;
* with the MIT Shm extention which is usually active if you run
* Angband locally, because it reduces amount of memory-to-memory copy.
*/
-static bool use_backing_store = TRUE;
+static bool_ use_backing_store = TRUE;
@@ -345,7 +345,7 @@ static void cleanup_angband(void)
* Because of the way it is implemented in X11 ports,
* we can set this to TRUE even if we are using the 8x8 tileset.
*/
-static bool use_transparency = TRUE;
+static bool_ use_transparency = TRUE;
#endif /* ANG291_COMPAT */
@@ -389,7 +389,7 @@ static vptr hook_ralloc(huge size)
/*
* When set to TRUE, indicates that we can use gamma_table
*/
-static bool gamma_table_ready = FALSE;
+static bool_ gamma_table_ready = FALSE;
# ifdef INTERACTIVE_GAMMA
@@ -578,8 +578,8 @@ static int graf_mode_request = GRAF_MODE_NONE;
/*
* Use smooth rescaling?
*/
-static bool smooth_rescaling = TRUE;
-static bool smooth_rescaling_request = TRUE;
+static bool_ smooth_rescaling = TRUE;
+static bool_ smooth_rescaling_request = TRUE;
/*
* Dithering
@@ -589,7 +589,7 @@ static GdkRgbDither dith_mode = GDK_RGB_DITHER_NORMAL;
/*
* Need to reload and resize tiles when fonts are changed.
*/
-static bool resize_request = FALSE;
+static bool_ resize_request = FALSE;
/*
* Numbers of columns and rows in current tileset
@@ -890,7 +890,7 @@ static void get_scaled_row(
guint32 pix;
rgb_type prev;
rgb_type next;
- bool get_next_pix;
+ bool_ get_next_pix;
/* Unscaled */
if (iw == ow)
@@ -1098,7 +1098,7 @@ static void scale_icon(
rgb_type next[MAX_ICON_WIDTH];
rgb_type temp[MAX_ICON_WIDTH];
- bool get_next_row;
+ bool_ get_next_row;
/* get divider value for the horizontal scaling: */
if (ix == ox)
@@ -1532,7 +1532,7 @@ static GdkRGBImage *resize_tiles(
* CAVEAT: treatment of backslash is not compatible with the standard
* C usage XXX XXX XXX XXX
*/
-static bool read_str(char *buf, u32b len, FILE *f)
+static bool_ read_str(char *buf, u32b len, FILE *f)
{
int c;
@@ -1614,7 +1614,7 @@ static GdkRGBImage *load_xpm(cptr filename)
GdkRGBImage *img = NULL;
int width, height, colours, chars;
int i, j, k;
- bool ret;
+ bool_ ret;
pal_type *pal = NULL;
pal_type *head[HASH_SIZE];
u32b buflen = 0;
@@ -2212,14 +2212,14 @@ static void graf_nuke()
*
* XXX XXX XXX Windows using the same font should share resized tiles
*/
-static bool graf_init(
+static bool_ graf_init(
cptr filename,
int tile_wid,
int tile_hgt)
{
term_data *td;
- bool result;
+ bool_ result;
GdkRGBImage *raw_tiles, *scaled_tiles;
@@ -2838,7 +2838,7 @@ static errr Term_pict_gtk(
byte ea;
char ec;
int e_x = 0, e_y = 0;
- bool has_overlay;
+ bool_ has_overlay;
# endif /* USE_EGO_GRAPHICS */
@@ -3042,7 +3042,7 @@ static errr Term_pict_gtk(
* Process an event, if there's none block when wait is set true,
* return immediately otherwise.
*/
-static void CheckEvent(bool wait)
+static void CheckEvent(bool_ wait)
{
/* Process an event */
(void)gtk_main_iteration_do(wait);
@@ -4728,7 +4728,7 @@ static GtkWidget *get_widget_from_path(cptr path)
/*
* Enable/disable a menu item
*/
-void enable_menu_item(cptr path, bool enabled)
+void enable_menu_item(cptr path, bool_ enabled)
{
GtkWidget *widget;
@@ -4750,7 +4750,7 @@ void enable_menu_item(cptr path, bool enabled)
/*
* Check/uncheck a menu item. The item should be of the GtkCheckMenuItem type
*/
-void check_menu_item(cptr path, bool checked)
+void check_menu_item(cptr path, bool_ checked)
{
GtkWidget *widget;
@@ -4782,9 +4782,9 @@ static void file_menu_update_handler(
gpointer user_data)
{
#ifndef SAVEFILE_SCREEN
- bool game_start_ok;
+ bool_ game_start_ok;
#endif /* !SAVEFILE_SCREEN */
- bool save_ok, quit_ok;
+ bool_ save_ok, quit_ok;
#ifndef SAVEFILE_SCREEN
@@ -5058,7 +5058,7 @@ static void init_gtk_window(term_data *td, int i)
GtkWidget *menu_bar = NULL, *box;
cptr font;
- bool main_window = (i == 0) ? TRUE : FALSE;
+ bool_ main_window = (i == 0) ? TRUE : FALSE;
/* Create window */
diff --git a/src/main-sdl-iso.c b/src/main-sdl-iso.c
index 0935d24f..1c727fba 100644
--- a/src/main-sdl-iso.c
+++ b/src/main-sdl-iso.c
@@ -49,13 +49,13 @@
/*
* Text place marker function protype (Hj. Malthaner)
*/
-static void set_spots(int x, int y, int n, bool v);
+static void set_spots(int x, int y, int n, bool_ v);
/**
* we need to track spots with text to avoid overdrawing text with images
* @author Hj. Malthaner (hansjoerg.malthaner@gmx.de)
*/
-bool spots[80][24];
+bool_ spots[80][24];
/**
* mouse coordinates for Simugraph engine
@@ -142,12 +142,12 @@ static int border_color = 0;
/* some miscellaneous settings which have not been dealt
with yet */
-static bool arg_old_graphics = FALSE;
-static bool arg_double_width = FALSE;
+static bool_ arg_old_graphics = FALSE;
+static bool_ arg_double_width = FALSE;
/* not dealt with yet (although full screen toggle
is available using Alt-Enter) */
-static bool arg_full_screen = FALSE;
+static bool_ arg_full_screen = FALSE;
/*************************************************
@@ -224,7 +224,7 @@ struct _term_data
uint pos_x, pos_y; /* upper left corner of rendering box */
uint size_w, size_h; /* width, height of rendering box */
- bool has_border; /* whether this sub-window has a border or not */
+ bool_ has_border; /* whether this sub-window has a border or not */
uint border_thick; /* thickness of border to draw around window */
#ifdef USE_GRAPHICS
#ifdef USE_TRANSPARENCY
@@ -711,7 +711,7 @@ static unsigned char ** halloc(int w, int h)
* spot array access procedure. Mark text output spots
* @author Hj. Malthaner (hansjoerg.malthaner@gmx.de)
*/
-static void set_spots(const int x, const int y, const int n, const bool v)
+static void set_spots(const int x, const int y, const int n, const bool_ v)
{
int i;
@@ -1475,7 +1475,7 @@ static errr term_data_init(term_data *td, int i)
/*
* Check and create if needed the directory dirpath -- copied from main.c
*/
-bool private_check_user_directory(cptr dirpath)
+bool_ private_check_user_directory(cptr dirpath)
{
/* Is this used anywhere else in *bands? */
struct stat stat_buf;
@@ -1517,7 +1517,7 @@ bool private_check_user_directory(cptr dirpath)
* home directory or try to create it if it doesn't exist.
* Returns FALSE if all the attempts fail.
*/
-static bool check_create_user_dir(void)
+static bool_ check_create_user_dir(void)
{
char dirpath[1024];
char versionpath[1024];
@@ -1571,15 +1571,15 @@ int main(int argc, char *argv[])
{
int i;
- bool done = FALSE;
+ bool_ done = FALSE;
- bool new_game = FALSE;
+ bool_ new_game = FALSE;
int show_score = 0;
cptr mstr = NULL;
- bool args = TRUE;
+ bool_ args = TRUE;
float gamma;
char filename[PATH_MAX + 1];
@@ -1687,7 +1687,7 @@ int main(int argc, char *argv[])
* used to store pref files, chardumps etc.
*/
{
- bool ret;
+ bool_ ret;
/* Create a directory for the user's files */
ret = check_create_user_dir();
diff --git a/src/main-sdl.c b/src/main-sdl.c
index 42c76958..4e9adb4f 100644
--- a/src/main-sdl.c
+++ b/src/main-sdl.c
@@ -49,13 +49,13 @@
/*
* Text place marker function protype (Hj. Malthaner)
*/
-static void set_spots(int x, int y, int n, bool v);
+static void set_spots(int x, int y, int n, bool_ v);
/**
* we need to track spots with text to avoid overdrawing text with images
* @author Hj. Malthaner (hansjoerg.malthaner@gmx.de)
*/
-bool spots[80][24];
+bool_ spots[80][24];
/**
* mouse coordinates for Simugraph engine
@@ -155,15 +155,15 @@ border */
/* some miscellaneous settings which have not been dealt
with yet */
-static bool arg_double_width = FALSE;
+static bool_ arg_double_width = FALSE;
/* flag signifying whether the game is in full screen */
-static bool arg_full_screen = FALSE;
+static bool_ arg_full_screen = FALSE;
/* a flag to show whether window properties have been
set or not... if so, the properties can be dumped
upon quit*/
-static bool window_properties_set = FALSE;
+static bool_ window_properties_set = FALSE;
/*************************************************
GLOBAL SDL-ToME VARIABLES
@@ -181,7 +181,7 @@ redrawn -- like when doing a Term_redraw() or when
redoing the entire screen -- all of the changes
can be stored up before doing an update. This
should cut down on screen flicker */
-static bool suspendUpdate = FALSE;
+static bool_ suspendUpdate = FALSE;
/* some helper surfaces that are used for rendering
characters */
@@ -810,7 +810,7 @@ static unsigned char ** halloc(int w, int h)
* spot array access procedure. Mark text output spots
* @author Hj. Malthaner (hansjoerg.malthaner@gmx.de)
*/
-static void set_spots(const int x, const int y, const int n, const bool v)
+static void set_spots(const int x, const int y, const int n, const bool_ v)
{
int i;
@@ -1355,7 +1355,7 @@ rectangle and then updates it to include only the rectangles that intersect
with the test rectangle. If there is an intersection, the function returns
TRUE and base now contains the intersecting rectangle. If there is no
intersection, then the function returns FALSE */
-bool intersectRects(SDL_Rect *base, SDL_Rect *test)
+bool_ intersectRects(SDL_Rect *base, SDL_Rect *test)
{
if (INTERSECT((*base),(*test)))
{
@@ -1431,7 +1431,7 @@ drawn, but occluding terminals will then re-blit to re-cover the area. */
void drawTermStuff(term_data *td, SDL_Rect *rect)
{
int n = 0, i;
- bool block = FALSE, cover = FALSE;
+ bool_ block = FALSE, cover = FALSE;
SDL_Rect spot, isect_term, isect_scr;
/* first of all, if updating is suspended, do nothing! */
@@ -2127,7 +2127,7 @@ void manipulationMode(void)
{
term_data *td;
SDL_Event event;
- bool done = FALSE, moveMode = TRUE;
+ bool_ done = FALSE, moveMode = TRUE;
int mouse_x, mouse_y;
int value = 0, delta_x = 0, delta_y = 0;
int current_term;
diff --git a/src/main-sla.c b/src/main-sla.c
index c38f019c..3c02d61f 100644
--- a/src/main-sla.c
+++ b/src/main-sla.c
@@ -27,7 +27,7 @@ static int slang_on = FALSE;
/*
* Can we use "color"?
*/
-static bool can_use_color = FALSE;
+static bool_ can_use_color = FALSE;
/*
diff --git a/src/main-win.c b/src/main-win.c
index 1958f85b..dde154b5 100644
--- a/src/main-win.c
+++ b/src/main-win.c
@@ -367,13 +367,13 @@ struct _term_data
uint size_ow2;
uint size_oh2;
- bool size_hack;
+ bool_ size_hack;
- bool xtra_hack;
+ bool_ xtra_hack;
- bool visible;
+ bool_ visible;
- bool bizarre;
+ bool_ bizarre;
cptr font_want;
@@ -407,22 +407,22 @@ static term_data *my_td;
/*
* game in progress
*/
-bool game_in_progress = FALSE;
+bool_ game_in_progress = FALSE;
/*
* note when "open"/"new" become valid
*/
-bool initialized = FALSE;
+bool_ initialized = FALSE;
/*
* screen paletted, i.e. 256 colors
*/
-bool paletted = FALSE;
+bool_ paletted = FALSE;
/*
* 16 colors screen, don't use RGB()
*/
-bool colors16 = FALSE;
+bool_ colors16 = FALSE;
/*
* Saved instance handle
@@ -460,7 +460,7 @@ static HWND hwndSaver;
/*
* Flag set once "graphics" has been initialized
*/
-static bool can_use_graphics = FALSE;
+static bool_ can_use_graphics = FALSE;
/*
* The global bitmap
@@ -484,7 +484,7 @@ static DIBINIT infMask;
/*
* Flag set once "sound" has been initialized
*/
-static bool can_use_sound = FALSE;
+static bool_ can_use_sound = FALSE;
/*
* An array of sound file names
@@ -557,8 +557,8 @@ static BYTE win_pal[256] =
/*
* Hack -- define which keys are "special"
*/
-static bool special_key[256];
-static bool ignore_key[256];
+static bool_ special_key[256];
+static bool_ ignore_key[256];
#if 1
/*
@@ -735,7 +735,7 @@ static char *analyze_font(char *path, int *wp, int *hp)
/*
* Check for existance of a file
*/
-static bool check_file(cptr s)
+static bool_ check_file(cptr s)
{
char path[1024];
@@ -784,7 +784,7 @@ static bool check_file(cptr s)
/*
* Check for existance of a directory
*/
-static bool check_dir(cptr s)
+static bool_ check_dir(cptr s)
{
int i;
@@ -1236,7 +1236,7 @@ static int new_palette(void)
/*
* Initialize graphics
*/
-static bool init_graphics()
+static bool_ init_graphics()
{
/* Initialize once */
/*if (can_use_graphics != arg_graphics) */
@@ -1323,7 +1323,7 @@ static bool init_graphics()
/*
* Initialize sound
*/
-static bool init_sound()
+static bool_ init_sound()
{
/* Initialize once */
if (!can_use_sound)
@@ -1401,7 +1401,7 @@ static errr term_force_font(term_data *td, cptr path)
/* Forget old font */
if (td->font_file)
{
- bool used = FALSE;
+ bool_ used = FALSE;
/* Scan windows */
for (i = 0; i < MAX_TERM_DATA; i++)
@@ -1599,7 +1599,7 @@ static errr Term_user_win(int n)
/*
* When set to TRUE, indicates that we can use gamma_table
*/
-static bool gamma_table_ready = FALSE;
+static bool_ gamma_table_ready = FALSE;
#endif /* SUPPORT_GAMMA */
@@ -1630,7 +1630,7 @@ static errr Term_xtra_win_react(void)
byte rv, gv, bv;
- bool change = FALSE;
+ bool_ change = FALSE;
#ifdef SUPPORT_GAMMA
@@ -3590,9 +3590,9 @@ LRESULT FAR PASCAL AngbandWndProc(HWND hWnd, UINT uMsg,
/* Unused */
/* BYTE KeyState = 0x00; */
- bool mc = FALSE;
- bool ms = FALSE;
- bool ma = FALSE;
+ bool_ mc = FALSE;
+ bool_ ms = FALSE;
+ bool_ ma = FALSE;
/* Extract the modifiers */
if (GetKeyState(VK_CONTROL) & 0x8000) mc = TRUE;
@@ -3902,9 +3902,9 @@ LRESULT FAR PASCAL AngbandListProc(HWND hWnd, UINT uMsg,
/* Unused */
/* BYTE KeyState = 0x00; */
- bool mc = FALSE;
- bool ms = FALSE;
- bool ma = FALSE;
+ bool_ mc = FALSE;
+ bool_ ms = FALSE;
+ bool_ ma = FALSE;
/* Extract the modifiers */
if (GetKeyState(VK_CONTROL) & 0x8000) mc = TRUE;
diff --git a/src/main-x11.c b/src/main-x11.c
index 966c004a..c6bf55e7 100644
--- a/src/main-x11.c
+++ b/src/main-x11.c
@@ -1590,8 +1590,8 @@ struct co_ord
typedef struct x11_selection_type x11_selection_type;
struct x11_selection_type
{
- bool select; /* The selection is currently in use. */
- bool drawn; /* The selection is currently displayed. */
+ bool_ select; /* The selection is currently in use. */
+ bool_ drawn; /* The selection is currently displayed. */
term *t; /* The window where the selection is found. */
co_ord init; /* The starting co-ordinates. */
co_ord cur; /* The end co-ordinates (the current ones if still copying). */
@@ -1775,8 +1775,8 @@ static void mark_selection(void)
{
co_ord min, max;
term *old = Term;
- bool draw = s_ptr->select;
- bool clear = s_ptr->drawn;
+ bool_ draw = s_ptr->select;
+ bool_ clear = s_ptr->drawn;
/* Open the correct term if necessary. */
if (s_ptr->t != old) Term_activate(s_ptr->t);
@@ -2090,7 +2090,7 @@ static void paste_x11_accept(const XSelectionEvent *ptr)
* Handle various events conditional on presses of a mouse button.
*/
static void handle_button(Time time, int x, int y, int button,
- bool press)
+ bool_ press)
{
/* The co-ordinates are only used in Angband format. */
pixel_to_square(&x, &y, x, y);
@@ -2104,7 +2104,7 @@ static void handle_button(Time time, int x, int y, int button,
/*
* Process events
*/
-static errr CheckEvent(bool wait)
+static errr CheckEvent(bool_ wait)
{
term_data *old_td = (term_data*)(Term->data);
@@ -2166,7 +2166,7 @@ static errr CheckEvent(bool wait)
case ButtonPress:
case ButtonRelease:
{
- bool press = (xev->type == ButtonPress);
+ bool_ press = (xev->type == ButtonPress);
/* Where is the mouse */
int x = xev->xbutton.x;
@@ -2594,7 +2594,7 @@ static errr Term_pict_x11(int x, int y, int n, const byte *ap, const char *cp)
byte ea;
char ec;
int x3, y3;
- bool has_overlay;
+ bool_ has_overlay;
# endif /* USE_EGO_GRAPHICS */
int k, l;
@@ -3064,7 +3064,7 @@ errr init_x11(int argc, char *argv[])
int pict_wid = 0;
int pict_hgt = 0;
- bool force_old_graphics = FALSE;
+ bool_ force_old_graphics = FALSE;
#ifdef USE_TRANSPARENCY
diff --git a/src/main-xaw.c b/src/main-xaw.c
index 5d5333e9..bc9f6d3c 100644
--- a/src/main-xaw.c
+++ b/src/main-xaw.c
@@ -478,7 +478,7 @@ static void AngbandOutputPict(AngbandWidget widget, int x, int y, int n,
char ec;
int x3, y3;
- bool has_overlay;
+ bool_ has_overlay;
# endif /* USE_EGO_GRAPHICS */
int k, l;
@@ -1394,7 +1394,7 @@ static void handle_event(Widget widget, XtPointer client_data, XEvent *event,
/*
* Process an event (or just check for one)
*/
-errr CheckEvent(bool wait)
+errr CheckEvent(bool_ wait)
{
XEvent event;
@@ -1789,7 +1789,7 @@ errr init_xaw(int argc, char *argv[])
int pict_wid = 0;
int pict_hgt = 0;
- bool force_old_graphics = FALSE;
+ bool_ force_old_graphics = FALSE;
#ifdef USE_TRANSPARENCY
diff --git a/src/main-xxx.c b/src/main-xxx.c
index 43e88e95..c80f01f0 100644
--- a/src/main-xxx.c
+++ b/src/main-xxx.c
@@ -721,7 +721,7 @@ errr init_xxx(void)
* to request the start of a new game or the loading of an old
* game, both of which should launch the "play_game()" function.
*/
-static bool CheckEvents(bool wait)
+static bool_ CheckEvents(bool_ wait)
{
/* XXX XXX XXX */
diff --git a/src/main.c b/src/main.c
index 7bb1f0f1..af5d2fc4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -52,7 +52,7 @@ static void quit_hook(cptr s)
/*
* Check and create if needed the directory dirpath
*/
-bool private_check_user_directory(cptr dirpath)
+bool_ private_check_user_directory(cptr dirpath)
{
/* Is this used anywhere else in *bands? */
struct stat stat_buf;
@@ -94,7 +94,7 @@ bool private_check_user_directory(cptr dirpath)
* home directory or try to create it if it doesn't exist.
* Returns FALSE if all the attempts fail.
*/
-static bool check_create_user_dir(void)
+static bool_ check_create_user_dir(void)
{
char dirpath[1024];
char versionpath[1024];
@@ -271,15 +271,15 @@ int main(int argc, char *argv[])
{
int i;
- bool done = FALSE;
+ bool_ done = FALSE;
- bool new_game = FALSE;
+ bool_ new_game = FALSE;
int show_score = 0;
cptr mstr = NULL;
- bool args = TRUE;
+ bool_ args = TRUE;
#ifdef CHECK_MEMORY_LEAKS
GC_find_leak = 1;
@@ -379,7 +379,7 @@ int main(int argc, char *argv[])
* used to store pref files, chardumps etc.
*/
{
- bool ret;
+ bool_ ret;
/* Create a directory for the user's files */
ret = check_create_user_dir();
diff --git a/src/melee1.c b/src/melee1.c
index df7739b5..ae0a75a1 100644
--- a/src/melee1.c
+++ b/src/melee1.c
@@ -118,7 +118,7 @@ static cptr desc_moan[] =
/*
* Attack the player via physical attacks.
*/
-bool carried_make_attack_normal(int r_idx)
+bool_ carried_make_attack_normal(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -130,9 +130,9 @@ bool carried_make_attack_normal(int r_idx)
char ddesc[80] = "your symbiote";
cptr sym_name = symbiote_name(TRUE);
- bool blinked;
- bool touched = FALSE, alive = TRUE;
- bool explode = FALSE;
+ bool_ blinked;
+ bool_ touched = FALSE, alive = TRUE;
+ bool_ explode = FALSE;
/* Not allowed to attack */
if (r_ptr->flags1 & (RF1_NEVER_BLOW)) return (FALSE);
@@ -149,8 +149,8 @@ bool carried_make_attack_normal(int r_idx)
/* Scan through all four blows */
for (ap_cnt = 0; ap_cnt < 4; ap_cnt++)
{
- bool visible = FALSE;
- bool obvious = FALSE;
+ bool_ visible = FALSE;
+ bool_ obvious = FALSE;
int power = 0;
int damage = 0;
@@ -1073,7 +1073,7 @@ bool carried_make_attack_normal(int r_idx)
if (randint(100) < 11)
{
/* 1% chance for perm. damage */
- bool perm = (randint(10) == 1);
+ bool_ perm = (randint(10) == 1);
if (dec_stat(A_CON, randint(10), perm)) obvious = TRUE;
}
@@ -1354,7 +1354,7 @@ void black_breath_attack(int chance)
/*
* Attack the player via physical attacks.
*/
-bool make_attack_normal(int m_idx, byte divis)
+bool_ make_attack_normal(int m_idx, byte divis)
{
monster_type *m_ptr = &m_list[m_idx];
@@ -1375,9 +1375,9 @@ bool make_attack_normal(int m_idx, byte divis)
char ddesc[80];
- bool blinked;
- bool touched = FALSE, fear = FALSE, alive = TRUE;
- bool explode = FALSE;
+ bool_ blinked;
+ bool_ touched = FALSE, fear = FALSE, alive = TRUE;
+ bool_ explode = FALSE;
/* Not allowed to attack */
if (r_ptr->flags1 & (RF1_NEVER_BLOW)) return (FALSE);
@@ -1412,8 +1412,8 @@ bool make_attack_normal(int m_idx, byte divis)
/* Scan through all four blows */
for (ap_cnt = 0; ap_cnt < 4; ap_cnt++)
{
- bool visible = FALSE;
- bool obvious = FALSE;
+ bool_ visible = FALSE;
+ bool_ obvious = FALSE;
int power = 0;
int damage = 0;
@@ -2699,7 +2699,7 @@ bool make_attack_normal(int m_idx, byte divis)
if (randint(100) < 11)
{
/* 1% chance for perm. damage */
- bool perm = (randint(10) == 1);
+ bool_ perm = (randint(10) == 1);
if (dec_stat(A_CON, randint(10), perm)) obvious = TRUE;
}
diff --git a/src/melee2.c b/src/melee2.c
index 51e92675..a6bc8543 100644
--- a/src/melee2.c
+++ b/src/melee2.c
@@ -26,7 +26,7 @@
* Based on mon_take_hit... all monster attacks on
* other monsters should use
*/
-bool mon_take_hit_mon(int s_idx, int m_idx, int dam, bool *fear, cptr note)
+bool_ mon_take_hit_mon(int s_idx, int m_idx, int dam, bool_ *fear, cptr note)
{
monster_type *m_ptr = &m_list[m_idx], *s_ptr = &m_list[s_idx];
@@ -258,7 +258,7 @@ bool mon_take_hit_mon(int s_idx, int m_idx, int dam, bool *fear, cptr note)
/*
* Internal probability routine
*/
-static bool int_outof(monster_race *r_ptr, int prob)
+static bool_ int_outof(monster_race *r_ptr, int prob)
{
/* Non-Smart monsters are half as "smart" */
if (!(r_ptr->flags2 & (RF2_SMART))) prob = prob / 2;
@@ -552,7 +552,7 @@ static void remove_bad_spells(int m_idx, u32b *f4p, u32b *f5p, u32b *f6p)
* Determine if there is a space near the player in which
* a summoned creature can appear
*/
-static bool summon_possible(int y1, int x1)
+static bool_ summon_possible(int y1, int x1)
{
int y, x;
@@ -594,7 +594,7 @@ static bool summon_possible(int y1, int x1)
* This is exactly like "projectable", but it will return FALSE if a monster
* is in the way.
*/
-static bool clean_shot(int y1, int x1, int y2, int x2)
+static bool_ clean_shot(int y1, int x1, int y2, int x2)
{
int dist, y, x;
@@ -642,7 +642,7 @@ static void bolt(int m_idx, int typ, int dam_hp)
/*
* Return TRUE if a spell is good for hurting the player (directly).
*/
-static bool spell_attack(byte spell)
+static bool_ spell_attack(byte spell)
{
/* All RF4 spells hurt (except for shriek, multiply, summon animal) */
if (spell >= 96 + 3 && spell <= 96 + 31) return (TRUE);
@@ -664,7 +664,7 @@ static bool spell_attack(byte spell)
/*
* Return TRUE if a spell is good for escaping.
*/
-static bool spell_escape(byte spell)
+static bool_ spell_escape(byte spell)
{
/* Blink or Teleport */
if (spell == 160 + 4 || spell == 160 + 5) return (TRUE);
@@ -679,7 +679,7 @@ static bool spell_escape(byte spell)
/*
* Return TRUE if a spell is good for annoying the player.
*/
-static bool spell_annoy(byte spell)
+static bool_ spell_annoy(byte spell)
{
/* Shriek */
if (spell == 96 + 0) return (TRUE);
@@ -703,7 +703,7 @@ static bool spell_annoy(byte spell)
/*
* Return TRUE if a spell summons help.
*/
-static bool spell_summon(byte spell)
+static bool_ spell_summon(byte spell)
{
/* RF4_S_ANIMAL, RF6_S_ANIMALS */
if (spell == 96 + 2 || spell == 160 + 3) return (TRUE);
@@ -718,7 +718,7 @@ static bool spell_summon(byte spell)
/*
* Return TRUE if a spell is good in a tactical situation.
*/
-static bool spell_tactic(byte spell)
+static bool_ spell_tactic(byte spell)
{
/* Blink */
if (spell == 160 + 4) return (TRUE);
@@ -731,7 +731,7 @@ static bool spell_tactic(byte spell)
/*
* Return TRUE if a spell hastes.
*/
-static bool spell_haste(byte spell)
+static bool_ spell_haste(byte spell)
{
/* Haste self */
if (spell == 160 + 0) return (TRUE);
@@ -744,7 +744,7 @@ static bool spell_haste(byte spell)
/*
* Return TRUE if a spell is good for healing.
*/
-static bool spell_heal(byte spell)
+static bool_ spell_heal(byte spell)
{
/* Heal */
if (spell == 160 + 2) return (TRUE);
@@ -993,7 +993,7 @@ void cmonster_msg(char a, cptr fmt, ...)
* at another monster.
*/
int monst_spell_monst_spell = -1;
-static bool monst_spell_monst(int m_idx)
+static bool_ monst_spell_monst(int m_idx)
{
int y = 0, x = 0;
int i = 1, k, t_idx;
@@ -1008,21 +1008,21 @@ static bool monst_spell_monst(int m_idx)
monster_type *t_ptr; /* Putative target */
monster_race *tr_ptr;
u32b f4, f5, f6; /* racial spell flags */
- bool direct = TRUE;
- bool wake_up = FALSE;
+ bool_ direct = TRUE;
+ bool_ wake_up = FALSE;
/* Extract the blind-ness */
- bool blind = (p_ptr->blind ? TRUE : FALSE);
+ bool_ blind = (p_ptr->blind ? TRUE : FALSE);
/* Extract the "see-able-ness" */
- bool seen = (!blind && m_ptr->ml);
+ bool_ seen = (!blind && m_ptr->ml);
- bool see_m;
- bool see_t;
- bool see_either;
- bool see_both;
+ bool_ see_m;
+ bool_ see_t;
+ bool_ see_either;
+ bool_ see_both;
- bool friendly = FALSE;
+ bool_ friendly = FALSE;
if (is_friend(m_ptr) > 0) friendly = TRUE;
@@ -1733,7 +1733,7 @@ static bool monst_spell_monst(int m_idx)
}
else
{
- bool fear;
+ bool_ fear;
monster_msg("%^s is blasted by psionic energy.", t_name);
t_ptr->confused += rand_int(4) + 4;
@@ -1776,7 +1776,7 @@ static bool monst_spell_monst(int m_idx)
}
else
{
- bool fear;
+ bool_ fear;
if (see_t)
{
monster_msg("%^s is blasted by psionic energy.", t_name);
@@ -1804,7 +1804,7 @@ static bool monst_spell_monst(int m_idx)
}
else
{
- bool fear;
+ bool_ fear;
mon_take_hit_mon(m_idx, t_idx, damroll(3, 8), &fear, " is destroyed.");
}
wake_up = TRUE;
@@ -1824,7 +1824,7 @@ static bool monst_spell_monst(int m_idx)
}
else
{
- bool fear;
+ bool_ fear;
mon_take_hit_mon(m_idx, t_idx, damroll(8, 8), &fear, " is destroyed.");
}
wake_up = TRUE;
@@ -1844,7 +1844,7 @@ static bool monst_spell_monst(int m_idx)
}
else
{
- bool fear;
+ bool_ fear;
mon_take_hit_mon(m_idx, t_idx, damroll(10, 15), &fear, " is destroyed.");
}
wake_up = TRUE;
@@ -1864,7 +1864,7 @@ static bool monst_spell_monst(int m_idx)
}
else
{
- bool fear;
+ bool_ fear;
mon_take_hit_mon(m_idx, t_idx, damroll(15, 15), &fear, " is destroyed.");
}
wake_up = TRUE;
@@ -2292,7 +2292,7 @@ static bool monst_spell_monst(int m_idx)
if (!direct) break;
else
{
- bool resists_tele = FALSE;
+ bool_ resists_tele = FALSE;
if (disturb_other) disturb(1, 0);
monster_msg("%^s teleports %s away.", m_name, t_name);
@@ -2764,7 +2764,7 @@ static bool monst_spell_monst(int m_idx)
void curse_equipment(int chance, int heavy_chance)
{
- bool changed = FALSE;
+ bool_ changed = FALSE;
u32b o1, o2, o3, o4, esp, o5;
object_type * o_ptr =
&p_ptr->inventory[rand_range(INVEN_WIELD, INVEN_TOTAL - 1)];
@@ -2820,7 +2820,7 @@ void curse_equipment(int chance, int heavy_chance)
void curse_equipment_dg(int chance, int heavy_chance)
{
- bool changed = FALSE;
+ bool_ changed = FALSE;
u32b o1, o2, o3, o4, esp, o5;
object_type * o_ptr =
&p_ptr->inventory[rand_range(INVEN_WIELD, INVEN_TOTAL - 1)];
@@ -2931,7 +2931,7 @@ void curse_equipment_dg(int chance, int heavy_chance)
* Note the special "MFLAG_NICE" flag, which prevents a monster from using
* any spell attacks until the player has had a single chance to move.
*/
-bool make_attack_spell(int m_idx)
+bool_ make_attack_spell(int m_idx)
{
int k, chance, thrown_spell, rlev, failrate;
byte spell[96], num = 0;
@@ -2939,23 +2939,23 @@ bool make_attack_spell(int m_idx)
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = race_inf(m_ptr);
char m_name[80];
- bool no_inate = FALSE;
+ bool_ no_inate = FALSE;
int x, y;
/* Summon count */
int count = 0;
/* Extract the blind-ness */
- bool blind = (p_ptr->blind ? TRUE : FALSE);
+ bool_ blind = (p_ptr->blind ? TRUE : FALSE);
/* Extract the "see-able-ness" */
- bool seen = (!blind && m_ptr->ml);
+ bool_ seen = (!blind && m_ptr->ml);
/* Assume "normal" target */
- bool normal = TRUE;
+ bool_ normal = TRUE;
/* Assume "projectable" */
- bool direct = TRUE;
+ bool_ direct = TRUE;
/* Target location */
if (m_ptr->target > -1)
@@ -4759,7 +4759,7 @@ static int mon_will_run(int m_idx)
* but instead of heading directly for it, the monster should "swerve"
* around the player so that he has a smaller chance of getting hit.
*/
-static bool get_fear_moves_aux(int m_idx, int *yp, int *xp)
+static bool_ get_fear_moves_aux(int m_idx, int *yp, int *xp)
{
int y, x, y1, x1, fy, fx, gy = 0, gx = 0;
int when = 0, score = -1;
@@ -4851,7 +4851,7 @@ static bool get_fear_moves_aux(int m_idx, int *yp, int *xp)
*
* Return TRUE if a safe location is available.
*/
-static bool find_safety(int m_idx, int *yp, int *xp)
+static bool_ find_safety(int m_idx, int *yp, int *xp)
{
monster_type *m_ptr = &m_list[m_idx];
@@ -4930,7 +4930,7 @@ static bool find_safety(int m_idx, int *yp, int *xp)
*
* Return TRUE if a good location is available.
*/
-static bool find_hiding(int m_idx, int *yp, int *xp)
+static bool_ find_hiding(int m_idx, int *yp, int *xp)
{
monster_type *m_ptr = &m_list[m_idx];
@@ -5078,7 +5078,7 @@ static void get_target_monster(int m_idx)
/*
* Choose "logical" directions for monster movement
*/
-static bool get_moves(int m_idx, int *mm)
+static bool_ get_moves(int m_idx, int *mm)
{
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = race_inf(m_ptr);
@@ -5089,7 +5089,7 @@ static bool get_moves(int m_idx, int *mm)
int y2 = p_ptr->py;
int x2 = p_ptr->px;
- bool done = FALSE;
+ bool_ done = FALSE;
/* Oups get nearer */
if ((is_friend(m_ptr) > 0) && (m_ptr->cdis > p_ptr->pet_follow_distance))
@@ -5474,7 +5474,7 @@ int check_hit2(int power, int level, int ac)
/* Monster attacks monster */
-static bool monst_attack_monst(int m_idx, int t_idx)
+static bool_ monst_attack_monst(int m_idx, int t_idx)
{
monster_type *m_ptr = &m_list[m_idx], *t_ptr = &m_list[t_idx];
monster_race *r_ptr = race_inf(m_ptr);
@@ -5483,9 +5483,9 @@ static bool monst_attack_monst(int m_idx, int t_idx)
int ac, rlev, pt;
char m_name[80], t_name[80];
char ddesc[80], temp[80];
- bool blinked = FALSE, touched = FALSE;
- bool explode = FALSE;
- bool fear = FALSE;
+ bool_ blinked = FALSE, touched = FALSE;
+ bool_ explode = FALSE;
+ bool_ fear = FALSE;
byte y_saver = t_ptr->fy;
byte x_saver = t_ptr->fx;
@@ -5520,8 +5520,8 @@ static bool monst_attack_monst(int m_idx, int t_idx)
/* Scan through all four blows */
for (ap_cnt = 0; ap_cnt < 4; ap_cnt++)
{
- bool visible = FALSE;
- bool obvious = FALSE;
+ bool_ visible = FALSE;
+ bool_ obvious = FALSE;
int power = 0;
int damage = 0;
@@ -6134,7 +6134,7 @@ static bool monst_attack_monst(int m_idx, int t_idx)
static u32b noise = 0L;
/* Determine whether the player is invisible to a monster */
-static bool player_invis(monster_type * m_ptr)
+static bool_ player_invis(monster_type * m_ptr)
{
s16b inv, mlv;
monster_race *r_ptr = race_inf(m_ptr);
@@ -6198,7 +6198,7 @@ static bool player_invis(monster_type * m_ptr)
*
* A "direction" of "5" means "pick a random direction".
*/
-static void process_monster(int m_idx, bool is_frien)
+static void process_monster(int m_idx, bool_ is_frien)
{
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = race_inf(m_ptr);
@@ -6210,21 +6210,21 @@ static void process_monster(int m_idx, bool is_frien)
monster_type *y_ptr;
- bool do_turn;
- bool do_move;
- bool do_view;
-
- bool did_open_door;
- bool did_bash_door;
- bool did_take_item;
- bool did_kill_item;
- bool did_move_body;
- bool did_kill_body;
- bool did_pass_wall;
- bool did_kill_wall;
- bool gets_angry = FALSE;
- bool inv;
- bool xxx = FALSE;
+ bool_ do_turn;
+ bool_ do_move;
+ bool_ do_view;
+
+ bool_ did_open_door;
+ bool_ did_bash_door;
+ bool_ did_take_item;
+ bool_ did_kill_item;
+ bool_ did_move_body;
+ bool_ did_kill_body;
+ bool_ did_pass_wall;
+ bool_ did_kill_wall;
+ bool_ gets_angry = FALSE;
+ bool_ inv;
+ bool_ xxx = FALSE;
inv = player_invis(m_ptr);
@@ -6821,7 +6821,7 @@ static void process_monster(int m_idx, bool is_frien)
(c_ptr->feat <= FEAT_DOOR_TAIL)) ||
(c_ptr->feat == FEAT_SECRET))
{
- bool may_bash = TRUE;
+ bool_ may_bash = TRUE;
/* Take a turn */
do_turn = TRUE;
@@ -6980,7 +6980,7 @@ static void process_monster(int m_idx, bool is_frien)
{
if (inscription_info[c_ptr->inscription].when & INSCRIP_EXEC_MONST_WALK)
{
- bool t;
+ bool_ t;
t = execute_inscription(c_ptr->inscription, ny, nx);
if (!t && do_move)
{
@@ -7483,8 +7483,8 @@ void process_monsters(void)
int i, e;
int fx, fy;
- bool test;
- bool is_frien = FALSE;
+ bool_ test;
+ bool_ is_frien = FALSE;
monster_type *m_ptr;
monster_race *r_ptr;
diff --git a/src/modules.c b/src/modules.c
index ceb3e81d..89bd2081 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -170,7 +170,7 @@ static void activate_module()
cptr force_module = NULL;
/* Display possible modules and select one */
-bool select_module()
+bool_ select_module()
{
s32b k, sel, max;
diff --git a/src/monster1.c b/src/monster1.c
index cb8be90b..de18e3c8 100644
--- a/src/monster1.c
+++ b/src/monster1.c
@@ -35,7 +35,7 @@ static cptr wd_his[3] = { "its", "his", "her" };
* Determine if the "armor" is known
* The higher the level, the fewer kills needed.
*/
-static bool know_armour(int r_idx)
+static bool_ know_armour(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -62,7 +62,7 @@ static bool know_armour(int r_idx)
* the higher the level of the monster, the fewer the attacks you need,
* the more damage an attack does, the more attacks you need
*/
-static bool know_damage(int r_idx, int i)
+static bool_ know_damage(int r_idx, int i)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -105,8 +105,8 @@ static void roff_aux(int r_idx, int ego, int remem)
{
monster_race *r_ptr;
- bool old = FALSE;
- bool sin = FALSE;
+ bool_ old = FALSE;
+ bool_ sin = FALSE;
int m, n, r;
@@ -114,8 +114,8 @@ static void roff_aux(int r_idx, int ego, int remem)
int msex = 0;
- bool breath = FALSE;
- bool magic = FALSE;
+ bool_ breath = FALSE;
+ bool_ magic = FALSE;
u32b flags1;
u32b flags2;
@@ -254,7 +254,7 @@ static void roff_aux(int r_idx, int ego, int remem)
else if (flags1 & (RF1_UNIQUE))
{
/* Hack -- Determine if the unique is "dead" */
- bool dead = (r_ptr->max_num == 0) ? TRUE : FALSE;
+ bool_ dead = (r_ptr->max_num == 0) ? TRUE : FALSE;
/* We've been killed... */
if (r_ptr->r_deaths)
@@ -1644,7 +1644,7 @@ void display_roff(int r_idx, int ego)
}
-bool monster_quest(int r_idx)
+bool_ monster_quest(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -1661,7 +1661,7 @@ bool monster_quest(int r_idx)
}
-bool monster_dungeon(int r_idx)
+bool_ monster_dungeon(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -1672,7 +1672,7 @@ bool monster_dungeon(int r_idx)
}
-bool monster_ocean(int r_idx)
+bool_ monster_ocean(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -1683,7 +1683,7 @@ bool monster_ocean(int r_idx)
}
-bool monster_shore(int r_idx)
+bool_ monster_shore(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -1694,7 +1694,7 @@ bool monster_shore(int r_idx)
}
-bool monster_waste(int r_idx)
+bool_ monster_waste(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -1705,7 +1705,7 @@ bool monster_waste(int r_idx)
}
-bool monster_town(int r_idx)
+bool_ monster_town(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -1716,7 +1716,7 @@ bool monster_town(int r_idx)
}
-bool monster_wood(int r_idx)
+bool_ monster_wood(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -1727,7 +1727,7 @@ bool monster_wood(int r_idx)
}
-bool monster_volcano(int r_idx)
+bool_ monster_volcano(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -1738,7 +1738,7 @@ bool monster_volcano(int r_idx)
}
-bool monster_mountain(int r_idx)
+bool_ monster_mountain(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -1749,7 +1749,7 @@ bool monster_mountain(int r_idx)
}
-bool monster_grass(int r_idx)
+bool_ monster_grass(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -1760,7 +1760,7 @@ bool monster_grass(int r_idx)
}
-bool monster_deep_water(int r_idx)
+bool_ monster_deep_water(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -1773,7 +1773,7 @@ bool monster_deep_water(int r_idx)
}
-bool monster_shallow_water(int r_idx)
+bool_ monster_shallow_water(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -1786,7 +1786,7 @@ bool monster_shallow_water(int r_idx)
}
-bool monster_lava(int r_idx)
+bool_ monster_lava(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -1847,7 +1847,7 @@ void set_mon_num_hook(void)
/*
* Check if monster can cross terrain
*/
-bool monster_can_cross_terrain(byte feat, monster_race *r_ptr)
+bool_ monster_can_cross_terrain(byte feat, monster_race *r_ptr)
{
/* Deep water */
if (feat == FEAT_DEEP_WATER)
diff --git a/src/monster2.c b/src/monster2.c
index ea75600e..0f9d1dc6 100644
--- a/src/monster2.c
+++ b/src/monster2.c
@@ -17,7 +17,7 @@
#define MAX_COMMENT 5
/* Monster gain a few levels ? */
-void monster_check_experience(int m_idx, bool silent)
+void monster_check_experience(int m_idx, bool_ silent)
{
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
@@ -69,7 +69,7 @@ void monster_check_experience(int m_idx, bool silent)
}
/* Monster gain some xp */
-void monster_gain_exp(int m_idx, u32b exp, bool silent)
+void monster_gain_exp(int m_idx, u32b exp, bool_ silent)
{
monster_type *m_ptr = &m_list[m_idx];
@@ -124,11 +124,11 @@ s32b modify_aux(s32b a, s32b b, char mod)
}
/* Is this ego ok for this monster ? */
-bool mego_ok(int r_idx, int ego)
+bool_ mego_ok(int r_idx, int ego)
{
monster_ego *re_ptr = &re_info[ego];
monster_race *r_ptr = &r_info[r_idx];
- bool ok = FALSE;
+ bool_ ok = FALSE;
int i;
/* needed flags */
@@ -410,7 +410,7 @@ void delete_monster_idx(int i)
s16b this_o_idx, next_o_idx = 0;
- bool had_lite = FALSE;
+ bool_ had_lite = FALSE;
;
@@ -863,7 +863,7 @@ errr get_mon_num_prep(void)
* Some dungeon types restrict the possible monsters.
* Return TRUE is the monster is OK and FALSE otherwise
*/
-bool apply_rule(monster_race *r_ptr, byte rule)
+bool_ apply_rule(monster_race *r_ptr, byte rule)
{
dungeon_info_type *d_ptr = &d_info[dungeon_type];
@@ -953,7 +953,7 @@ bool apply_rule(monster_race *r_ptr, byte rule)
return FALSE;
}
-bool restrict_monster_to_dungeon(int r_idx)
+bool_ restrict_monster_to_dungeon(int r_idx)
{
dungeon_info_type *d_ptr = &d_info[dungeon_type];
monster_race *r_ptr = &r_info[r_idx];
@@ -962,7 +962,7 @@ bool restrict_monster_to_dungeon(int r_idx)
byte rule = d_ptr->rule_percents[rand_int(100)];
/* Apply the rule */
- bool rule_ret = apply_rule(r_ptr, rule);
+ bool_ rule_ret = apply_rule(r_ptr, rule);
/* Should the rule be right or not ? */
if ((d_ptr->rules[rule].mode == DUNGEON_MODE_NAND) || (d_ptr->rules[rule].mode == DUNGEON_MODE_NOR)) rule_ret = !rule_ret;
@@ -975,7 +975,7 @@ bool restrict_monster_to_dungeon(int r_idx)
}
/* Ugly hack, let summon unappropriate monsters */
-bool summon_hack = FALSE;
+bool_ summon_hack = FALSE;
/*
* Choose a monster race that seems "appropriate" to the given level
@@ -1228,7 +1228,7 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode)
monster_race *r_ptr = race_inf(m_ptr);
cptr b_name = (r_name + r_ptr->name);
char silly_name[80], name[100];
- bool seen, pron;
+ bool_ seen, pron;
int insanity = (p_ptr->msane - p_ptr->csane) * 100 / p_ptr->msane;
if (m_ptr->ego)
@@ -1526,9 +1526,9 @@ void lore_treasure(int m_idx, int num_item, int num_gold)
-void sanity_blast(monster_type * m_ptr, bool necro)
+void sanity_blast(monster_type * m_ptr, bool_ necro)
{
- bool happened = FALSE;
+ bool_ happened = FALSE;
int power = 100;
if (!necro)
@@ -1722,7 +1722,7 @@ void sanity_blast(monster_type * m_ptr, bool necro)
* as "detected last turn", and "detected this turn", and "currently
* in line of sight", all of which are used for visibility testing.
*/
-void update_mon(int m_idx, bool full)
+void update_mon(int m_idx, bool_ full)
{
monster_type *m_ptr = &m_list[m_idx];
@@ -1732,22 +1732,22 @@ void update_mon(int m_idx, bool full)
int fy = m_ptr->fy;
int fx = m_ptr->fx;
- bool old_ml = m_ptr->ml;
+ bool_ old_ml = m_ptr->ml;
/* Seen at all */
- bool flag = FALSE;
+ bool_ flag = FALSE;
/* Seen by vision */
- bool easy = FALSE;
+ bool_ easy = FALSE;
/* Seen by telepathy */
- bool hard = FALSE;
+ bool_ hard = FALSE;
/* Various extra flags */
- bool do_empty_mind = FALSE;
- bool do_weird_mind = FALSE;
- bool do_invisible = FALSE;
- bool do_cold_blood = FALSE;
+ bool_ do_empty_mind = FALSE;
+ bool_ do_weird_mind = FALSE;
+ bool_ do_invisible = FALSE;
+ bool_ do_cold_blood = FALSE;
/* Calculate distance */
@@ -1810,7 +1810,7 @@ void update_mon(int m_idx, bool full)
if (p_ptr->telepathy)
{
/* Assume we cant see */
- bool can_esp = FALSE;
+ bool_ can_esp = FALSE;
/* Different ESP */
if ((p_ptr->telepathy & ESP_ORC) && (r_ptr->flags3 & RF3_ORC)) can_esp = TRUE;
@@ -1989,7 +1989,7 @@ void update_mon(int m_idx, bool full)
/*
* This function simply updates all the (non-dead) monsters (see above).
*/
-void update_monsters(bool full)
+void update_monsters(bool_ full)
{
int i;
@@ -2075,7 +2075,7 @@ static int possible_randart[] =
};
-bool kind_is_randart(int k_idx)
+bool_ kind_is_randart(int k_idx)
{
int max;
object_kind *k_ptr = &k_info[k_idx];
@@ -2108,15 +2108,15 @@ bool kind_is_randart(int k_idx)
* This is the only function which may place a monster in the dungeon,
* except for the savefile loading code.
*/
-bool bypass_r_ptr_max_num = FALSE;
+bool_ bypass_r_ptr_max_num = FALSE;
int place_monster_result = 0;
-bool place_monster_one_no_drop = FALSE;
+bool_ place_monster_one_no_drop = FALSE;
monster_race *place_monster_one_race = NULL;
-s16b place_monster_one(int y, int x, int r_idx, int ego, bool slp, int status)
+s16b place_monster_one(int y, int x, int r_idx, int ego, bool_ slp, int status)
{
int i, base;
char dummy[5];
- bool add_level = FALSE;
+ bool_ add_level = FALSE;
int min_level = 0, max_level = 0;
cave_type *c_ptr;
@@ -2411,12 +2411,12 @@ s16b place_monster_one(int y, int x, int r_idx, int ego, bool slp, int status)
/* Only if not fated to die */
if ((dungeon_type != DUNGEON_DEATH) && (!place_monster_one_no_drop))
{
- bool good = (r_ptr->flags1 & (RF1_DROP_GOOD)) ? TRUE : FALSE;
- bool great = (r_ptr->flags1 & (RF1_DROP_GREAT)) ? TRUE : FALSE;
+ bool_ good = (r_ptr->flags1 & (RF1_DROP_GOOD)) ? TRUE : FALSE;
+ bool_ great = (r_ptr->flags1 & (RF1_DROP_GREAT)) ? TRUE : FALSE;
- bool do_gold = (!(r_ptr->flags1 & (RF1_ONLY_ITEM)));
- bool do_item = (!(r_ptr->flags1 & (RF1_ONLY_GOLD)));
- bool do_mimic = (r_ptr->flags9 & (RF9_MIMIC));
+ bool_ do_gold = (!(r_ptr->flags1 & (RF1_ONLY_ITEM)));
+ bool_ do_item = (!(r_ptr->flags1 & (RF1_ONLY_GOLD)));
+ bool_ do_mimic = (r_ptr->flags9 & (RF9_MIMIC));
int j;
int force_coin = get_coin_type(r_ptr);
@@ -2675,7 +2675,7 @@ s16b place_monster_one(int y, int x, int r_idx, int ego, bool slp, int status)
/*
* Attempt to place a "group" of monsters around the given location
*/
-static bool place_monster_group(int y, int x, int r_idx, bool slp, int status)
+static bool_ place_monster_group(int y, int x, int r_idx, bool_ slp, int status)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -2770,7 +2770,7 @@ static int place_monster_idx = 0;
/*
* Hack -- help pick an escort type
*/
-static bool place_monster_okay(int r_idx)
+static bool_ place_monster_okay(int r_idx)
{
monster_race *r_ptr = &r_info[place_monster_idx];
@@ -2814,11 +2814,11 @@ static bool place_monster_okay(int r_idx)
* Note the use of the new "monster allocation table" code to restrict
* the "get_mon_num()" function to "legal" escort types.
*/
-bool place_monster_aux(int y, int x, int r_idx, bool slp, bool grp, int status)
+bool_ place_monster_aux(int y, int x, int r_idx, bool_ slp, bool_ grp, int status)
{
int i;
monster_race *r_ptr = &r_info[r_idx];
- bool (*old_get_mon_num_hook)(int r_idx);
+ bool_ (*old_get_mon_num_hook)(int r_idx);
/* Place one monster, or fail */
@@ -2908,7 +2908,7 @@ bool place_monster_aux(int y, int x, int r_idx, bool slp, bool grp, int status)
*
* Attempt to find a monster appropriate to the "monster_level"
*/
-bool place_monster(int y, int x, bool slp, bool grp)
+bool_ place_monster(int y, int x, bool_ slp, bool_ grp)
{
int r_idx;
@@ -2940,7 +2940,7 @@ bool place_monster(int y, int x, bool slp, bool grp)
#ifdef MONSTER_HORDES
-bool alloc_horde(int y, int x)
+bool_ alloc_horde(int y, int x)
{
int r_idx = 0;
monster_race * r_ptr = NULL;
@@ -3008,7 +3008,7 @@ bool alloc_horde(int y, int x)
*
* Use "monster_level" for the monster level
*/
-bool alloc_monster(int dis, bool slp)
+bool_ alloc_monster(int dis, bool_ slp)
{
int y, x;
int attempts_left = 10000;
@@ -3074,11 +3074,11 @@ static int summon_specific_type = 0;
/*
* Hack -- help decide if a monster race is "okay" to summon
*/
-bool summon_specific_okay(int r_idx)
+bool_ summon_specific_okay(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Hack - Only summon dungeon monsters */
if (!monster_dungeon(r_idx)) return (FALSE);
@@ -3390,11 +3390,11 @@ bool summon_specific_okay(int r_idx)
* Note that this function may not succeed, though this is very rare.
*/
int summon_specific_level = 0;
-bool summon_specific(int y1, int x1, int lev, int type)
+bool_ summon_specific(int y1, int x1, int lev, int type)
{
int i, x, y, r_idx;
- bool Group_ok = TRUE;
- bool (*old_get_mon_num_hook)(int r_idx);
+ bool_ Group_ok = TRUE;
+ bool_ (*old_get_mon_num_hook)(int r_idx);
/* Look for a location */
for (i = 0; i < 20; ++i)
@@ -3479,10 +3479,10 @@ bool summon_specific(int y1, int x1, int lev, int type)
-bool summon_specific_friendly(int y1, int x1, int lev, int type, bool Group_ok)
+bool_ summon_specific_friendly(int y1, int x1, int lev, int type, bool_ Group_ok)
{
int i, x, y, r_idx;
- bool (*old_get_mon_num_hook)(int r_idx);
+ bool_ (*old_get_mon_num_hook)(int r_idx);
/* Look for a location */
for (i = 0; i < 20; ++i)
@@ -3662,11 +3662,11 @@ void monster_swap(int y1, int x1, int y2, int x2)
/*
* Hack -- help decide if a monster race is "okay" to summon
*/
-static bool mutate_monster_okay(int r_idx)
+static bool_ mutate_monster_okay(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- bool okay = FALSE;
+ bool_ okay = FALSE;
/* Hack - Only summon dungeon monsters */
if (!monster_dungeon(r_idx)) return (FALSE);
@@ -3683,14 +3683,14 @@ static bool mutate_monster_okay(int r_idx)
*
* Note that "reproduction" REQUIRES empty space.
*/
-bool multiply_monster(int m_idx, bool charm, bool clone)
+bool_ multiply_monster(int m_idx, bool_ charm, bool_ clone)
{
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = race_inf(m_ptr);
int i, y, x, new_race;
- bool result = FALSE;
+ bool_ result = FALSE;
if (no_breeds)
{
@@ -3715,7 +3715,7 @@ bool multiply_monster(int m_idx, bool charm, bool clone)
/* It can mutate into a nastier monster */
if ((rand_int(100) < 3) && (!clone))
{
- bool (*old_get_mon_num_hook)(int r_idx);
+ bool_ (*old_get_mon_num_hook)(int r_idx);
/* Backup the old hook */
old_get_mon_num_hook = get_mon_num_hook;
@@ -3760,7 +3760,7 @@ bool multiply_monster(int m_idx, bool charm, bool clone)
*
* Technically should attempt to treat "Beholder"'s as jelly's
*/
-bool hack_message_pain_may_silent = FALSE;
+bool_ hack_message_pain_may_silent = FALSE;
void message_pain_hook(cptr fmt, ...)
{
va_list vp;
diff --git a/src/monster3.c b/src/monster3.c
index f381c94c..a2b5fb38 100644
--- a/src/monster3.c
+++ b/src/monster3.c
@@ -41,7 +41,7 @@ int is_friend(monster_type *m_ptr)
}
/* Should they attack each others */
-bool is_enemy(monster_type *m_ptr, monster_type *t_ptr)
+bool_ is_enemy(monster_type *m_ptr, monster_type *t_ptr)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx], *rt_ptr = &r_info[t_ptr->r_idx];
int s1 = is_friend(m_ptr), s2 = is_friend(t_ptr);
@@ -57,7 +57,7 @@ bool is_enemy(monster_type *m_ptr, monster_type *t_ptr)
return (FALSE);
}
-bool change_side(monster_type *m_ptr)
+bool_ change_side(monster_type *m_ptr)
{
monster_race *r_ptr = race_inf(m_ptr);
@@ -89,12 +89,12 @@ bool change_side(monster_type *m_ptr)
}
/* Multiply !! */
-bool ai_multiply(int m_idx)
+bool_ ai_multiply(int m_idx)
{
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
int k, y, x, oy = m_ptr->fy, ox = m_ptr->fx;
- bool is_frien = (is_friend(m_ptr) > 0);
+ bool_ is_frien = (is_friend(m_ptr) > 0);
/* Count the adjacent monsters */
for (k = 0, y = oy - 1; y <= oy + 1; y++)
@@ -134,7 +134,7 @@ bool ai_multiply(int m_idx)
}
/* Possessor incarnates */
-bool ai_possessor(int m_idx, int o_idx)
+bool_ ai_possessor(int m_idx, int o_idx)
{
object_type *o_ptr = &o_list[o_idx];
monster_type *m_ptr = &m_list[m_idx];
@@ -288,7 +288,7 @@ void ai_deincarnate(int m_idx)
}
/* Returns if a new companion is allowed */
-bool can_create_companion(void)
+bool_ can_create_companion(void)
{
int i, mcnt = 0;
@@ -309,7 +309,7 @@ bool can_create_companion(void)
/* Player controlled monsters */
-bool do_control_walk(void)
+bool_ do_control_walk(void)
{
/* Get a "repeated" direction */
if (p_ptr->control)
@@ -330,7 +330,7 @@ bool do_control_walk(void)
return FALSE;
}
-bool do_control_inven(void)
+bool_ do_control_inven(void)
{
int monst_list[23];
@@ -343,12 +343,12 @@ bool do_control_inven(void)
return TRUE;
}
-bool do_control_pickup(void)
+bool_ do_control_pickup(void)
{
int this_o_idx, next_o_idx = 0;
monster_type *m_ptr = &m_list[p_ptr->control];
cave_type *c_ptr;
- bool done = FALSE;
+ bool_ done = FALSE;
if (!p_ptr->control) return FALSE;
@@ -390,7 +390,7 @@ bool do_control_pickup(void)
return TRUE;
}
-bool do_control_drop(void)
+bool_ do_control_drop(void)
{
monster_type *m_ptr = &m_list[p_ptr->control];
@@ -399,12 +399,12 @@ bool do_control_drop(void)
return TRUE;
}
-bool do_control_magic(void)
+bool_ do_control_magic(void)
{
int power = -1;
int num = 0, i;
int powers[96];
- bool flag, redraw;
+ bool_ flag, redraw;
int ask;
char choice;
char out_val[160];
@@ -608,7 +608,7 @@ bool do_control_magic(void)
}
/* Finds the controlled monster and "reconnect" to it */
-bool do_control_reconnect()
+bool_ do_control_reconnect()
{
int i;
diff --git a/src/object1.c b/src/object1.c
index 19aebd8d..27c87d7f 100644
--- a/src/object1.c
+++ b/src/object1.c
@@ -276,7 +276,7 @@ static byte scroll_col[MAX_TITLES];
* Certain items have a flavor
* This function is used only by "flavor_init()"
*/
-static bool object_flavor(int k_idx)
+static bool_ object_flavor(int k_idx)
{
object_kind *k_ptr = &k_info[k_idx];
@@ -374,7 +374,7 @@ void get_table_name(char *out_string)
*
* XXX XXX XXX Add "EASY_KNOW" flag to "k_info.txt" file
*/
-static bool object_easy_know(int i)
+static bool_ object_easy_know(int i)
{
object_kind *k_ptr = &k_info[i];
@@ -577,7 +577,7 @@ void flavor_init(void)
{
char buf[80];
- bool okay;
+ bool_ okay;
/* Start a new title */
buf[0] = '\0';
@@ -829,7 +829,7 @@ void reset_visuals(void)
/*
* Obtain the "flags" for an item
*/
-bool object_flags_no_set = FALSE;
+bool_ object_flags_no_set = FALSE;
void object_flags(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3, u32b *f4, u32b *f5, u32b *esp)
{
object_kind *k_ptr = &k_info[o_ptr->k_idx];
@@ -1024,7 +1024,7 @@ int object_power(object_type *o_ptr)
*/
void object_flags_known(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3, u32b *f4, u32b *f5, u32b *esp)
{
- bool spoil = FALSE;
+ bool_ spoil = FALSE;
object_kind *k_ptr = &k_info[o_ptr->k_idx];
@@ -1393,17 +1393,17 @@ static char *object_desc_int(char *result, s32b num)
*/
void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
{
- bool hack_name = FALSE;
+ bool_ hack_name = FALSE;
cptr basenm, modstr;
int indexx;
- bool aware = FALSE;
- bool known = FALSE;
+ bool_ aware = FALSE;
+ bool_ known = FALSE;
- bool append_name = FALSE;
+ bool_ append_name = FALSE;
- bool show_weapon = FALSE;
- bool show_armour = FALSE;
+ bool_ show_weapon = FALSE;
+ bool_ show_armour = FALSE;
cptr s, u;
char *t;
@@ -2613,10 +2613,10 @@ copyback:
void object_desc_store(char *buf, object_type *o_ptr, int pref, int mode)
{
/* Save the "aware" flag */
- bool hack_aware = k_info[o_ptr->k_idx].aware;
+ bool_ hack_aware = k_info[o_ptr->k_idx].aware;
/* Save the "known" flag */
- bool hack_known = (o_ptr->ident & (IDENT_KNOWN)) ? TRUE : FALSE;
+ bool_ hack_known = (o_ptr->ident & (IDENT_KNOWN)) ? TRUE : FALSE;
/* Set the "known" flag */
@@ -2713,7 +2713,7 @@ cptr item_activation(object_type *o_ptr, byte num)
}
/* Grab the tval desc */
-bool grab_tval_desc(int tval)
+bool_ grab_tval_desc(int tval)
{
int tv = 0;
@@ -2736,7 +2736,7 @@ if ((first)) { (first) = FALSE; text_out((txt)); } else text_out(", ");
/*
* Display the damage done with a multiplier
*/
-void output_dam(object_type *o_ptr, int mult, int mult2, cptr against, cptr against2, bool *first)
+void output_dam(object_type *o_ptr, int mult, int mult2, cptr against, cptr against2, bool_ *first)
{
int dam;
@@ -2781,8 +2781,8 @@ void display_weapon_damage(object_type *o_ptr)
{
object_type forge, *old_ptr = &forge;
u32b f1, f2, f3, f4, f5, esp;
- bool first = TRUE;
- bool full = o_ptr->ident & (IDENT_MENTAL);
+ bool_ first = TRUE;
+ bool_ full = o_ptr->ident & (IDENT_MENTAL);
/* Extract the flags */
object_flags(o_ptr, &f1, &f2, &f3, &f4, &f5, &esp);
@@ -2826,7 +2826,7 @@ void display_weapon_damage(object_type *o_ptr)
/*
* Display the ammo damage done with a multiplier
*/
-void output_ammo_dam(object_type *o_ptr, int mult, int mult2, cptr against, cptr against2, bool *first)
+void output_ammo_dam(object_type *o_ptr, int mult, int mult2, cptr against, cptr against2, bool_ *first)
{
int dam;
object_type *b_ptr = &p_ptr->inventory[INVEN_BOW];
@@ -2880,9 +2880,9 @@ void output_ammo_dam(object_type *o_ptr, int mult, int mult2, cptr against, cptr
void display_ammo_damage(object_type *o_ptr)
{
u32b f1, f2, f3, f4, f5, esp;
- bool first = TRUE;
+ bool_ first = TRUE;
int i;
- bool full = o_ptr->ident & (IDENT_MENTAL);
+ bool_ full = o_ptr->ident & (IDENT_MENTAL);
/* Extract the flags */
object_flags(o_ptr, &f1, &f2, &f3, &f4, &f5, &esp);
@@ -2988,7 +2988,7 @@ static cptr object_out_desc_where_found(s16b level, s16b dungeon)
/*
* Describe an item
*/
-bool object_out_desc(object_type *o_ptr, FILE *fff, bool trim_down, bool wait_for_it)
+bool_ object_out_desc(object_type *o_ptr, FILE *fff, bool_ trim_down, bool_ wait_for_it)
{
u32b f1, f2, f3, f4, f5, esp;
@@ -2998,7 +2998,7 @@ bool object_out_desc(object_type *o_ptr, FILE *fff, bool trim_down, bool wait_fo
byte vc[64];
int vn;
- bool first = TRUE;
+ bool_ first = TRUE;
/* Extract the flags */
if ((!(o_ptr->ident & (IDENT_MENTAL))) && (!fff))
@@ -4106,7 +4106,7 @@ int get_slot(int slot)
* Determine which equipment slot (if any) an item likes, ignoring the player's
* current body and stuff if ideal == TRUE
*/
-s16b wield_slot_ideal(object_type *o_ptr, bool ideal)
+s16b wield_slot_ideal(object_type *o_ptr, bool_ ideal)
{
/* Try for a script first */
if (process_hooks_ret(HOOK_WIELD_SLOT, "d", "(O,d)", o_ptr, ideal))
@@ -4470,7 +4470,7 @@ cptr describe_use(int i)
/*
* Check an item against the item tester info
*/
-bool item_tester_okay(object_type *o_ptr)
+bool_ item_tester_okay(object_type *o_ptr)
{
/* Hack -- allow listing empty slots */
if (item_tester_full) return (TRUE);
@@ -4500,8 +4500,8 @@ bool item_tester_okay(object_type *o_ptr)
-void show_equip_aux(bool mirror, bool everything);
-void show_inven_aux(bool mirror, bool everything);
+void show_equip_aux(bool_ mirror, bool_ everything);
+void show_inven_aux(bool_ mirror, bool_ everything);
/*
* Choice window "shadow" of the "show_inven()" function
@@ -4545,7 +4545,7 @@ byte get_item_letter_color(object_type *o_ptr)
*
* Hack -- do not display "trailing" empty slots
*/
-void show_inven_aux(bool mirror, bool everything)
+void show_inven_aux(bool_ mirror, bool_ everything)
{
int i, j, k, l, z = 0;
int row, col, len, lim;
@@ -4706,12 +4706,12 @@ void show_inven_aux(bool mirror, bool everything)
}
-void show_inven(bool mirror)
+void show_inven(bool_ mirror)
{
show_inven_aux(mirror, FALSE);
}
-void show_equip(bool mirror)
+void show_equip(bool_ mirror)
{
show_equip_aux(mirror, FALSE);
}
@@ -4719,7 +4719,7 @@ void show_equip(bool mirror)
/*
* Display the equipment.
*/
-void show_equip_aux(bool mirror, bool everything)
+void show_equip_aux(bool_ mirror, bool_ everything)
{
int i, j, k, l;
int row, col, len, lim, idx;
@@ -4995,7 +4995,7 @@ void toggle_inven_equip(void)
*
* The item can be negative to mean "item on floor".
*/
-bool verify(cptr prompt, int item)
+bool_ verify(cptr prompt, int item)
{
char o_name[80];
@@ -5031,7 +5031,7 @@ bool verify(cptr prompt, int item)
*
* The item can be negative to mean "item on floor".
*/
-static bool get_item_allow(int item)
+static bool_ get_item_allow(int item)
{
cptr s;
@@ -5078,7 +5078,7 @@ static bool get_item_allow(int item)
/*
* Auxiliary function for "get_item()" -- test an index
*/
-static bool get_item_okay(int i)
+static bool_ get_item_okay(int i)
{
/* Illegal items */
if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
@@ -5163,7 +5163,7 @@ static int get_tag(int *cp, char tag)
* mode & 0x02 -- Marked items only
* mode & 0x04 -- Stop after first
*/
-bool scan_floor(int *items, int *item_num, int y, int x, int mode)
+bool_ scan_floor(int *items, int *item_num, int y, int x, int mode)
{
int this_o_idx, next_o_idx;
@@ -5314,28 +5314,28 @@ void show_floor(int y, int x)
* This version of get_item() is called by get_item() when
* the easy_floor is on.
*/
-bool (*get_item_extra_hook)(int *cp);
-bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
+bool_ (*get_item_extra_hook)(int *cp);
+bool_ get_item_floor(int *cp, cptr pmt, cptr str, int mode)
{
char n1 = 0, n2 = 0, which = ' ';
int j, k, i1, i2, e1, e2;
- bool done, item;
+ bool_ done, item;
- bool oops = FALSE;
+ bool_ oops = FALSE;
- bool equip = FALSE;
- bool inven = FALSE;
- bool floor = FALSE;
- bool extra = FALSE;
- bool automat = FALSE;
+ bool_ equip = FALSE;
+ bool_ inven = FALSE;
+ bool_ floor = FALSE;
+ bool_ extra = FALSE;
+ bool_ automat = FALSE;
- bool allow_equip = FALSE;
- bool allow_inven = FALSE;
- bool allow_floor = FALSE;
+ bool_ allow_equip = FALSE;
+ bool_ allow_inven = FALSE;
+ bool_ allow_floor = FALSE;
- bool toggle = FALSE;
+ bool_ toggle = FALSE;
char tmp_val[160];
char out_val[160];
@@ -6117,7 +6117,7 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
* We always erase the prompt when we are done, leaving a blank line,
* or a warning message, if appropriate, if no items are available.
*/
-bool get_item(int *cp, cptr pmt, cptr str, int mode)
+bool_ get_item(int *cp, cptr pmt, cptr str, int mode)
{
automatizer_create = FALSE;
command_see = TRUE; /* Start out displaying all alternatives. */
@@ -6128,7 +6128,7 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
/*
* Hook to determine if an object is getable
*/
-static bool item_tester_hook_getable(object_type *o_ptr)
+static bool_ item_tester_hook_getable(object_type *o_ptr)
{
if (!inven_carry_okay(o_ptr)) return (FALSE);
@@ -6259,7 +6259,7 @@ void pickup_ammo()
*
* This is called by py_pickup() when easy_floor is TRUE.
*/
-bool can_carry_heavy(object_type *o_ptr)
+bool_ can_carry_heavy(object_type *o_ptr)
{
/* Query if object is heavy */
if (prompt_pickup_heavy)
@@ -6370,9 +6370,9 @@ void py_pickup_floor(int pickup)
int floor_num = 0, floor_o_idx = 0;
- bool do_pickup = TRUE;
+ bool_ do_pickup = TRUE;
- bool do_ask = TRUE;
+ bool_ do_ask = TRUE;
/* Hack -- ignore monster traps */
if (cave[p_ptr->py][p_ptr->px].feat == FEAT_MON_TRAP) return;
@@ -6555,7 +6555,7 @@ void py_pickup_floor(int pickup)
}
/* Add a flags group */
-void gain_flag_group(object_type *o_ptr, bool silent)
+void gain_flag_group(object_type *o_ptr, bool_ silent)
{
int grp = 0;
int tries = 1000;
@@ -6650,7 +6650,7 @@ u32b get_flag(object_type *o_ptr, int grp, int k)
}
/* Add a flags from a flag group */
-void gain_flag_group_flag(object_type *o_ptr, bool silent)
+void gain_flag_group_flag(object_type *o_ptr, bool_ silent)
{
int grp = 0, k = 0;
u32b f = 0;
@@ -6757,7 +6757,7 @@ void object_gain_level(object_type *o_ptr)
/*
* Item sets fcts
*/
-bool wield_set(s16b a_idx, s16b set_idx, bool silent)
+bool_ wield_set(s16b a_idx, s16b set_idx, bool_ silent)
{
set_type *s_ptr = &set_info[set_idx];
int i;
@@ -6776,7 +6776,7 @@ bool wield_set(s16b a_idx, s16b set_idx, bool silent)
return (FALSE);
}
-bool takeoff_set(s16b a_idx, s16b set_idx)
+bool_ takeoff_set(s16b a_idx, s16b set_idx)
{
set_type *s_ptr = &set_info[set_idx];
int i;
@@ -6797,7 +6797,7 @@ bool takeoff_set(s16b a_idx, s16b set_idx)
return (FALSE);
}
-bool apply_set(s16b a_idx, s16b set_idx)
+bool_ apply_set(s16b a_idx, s16b set_idx)
{
set_type *s_ptr = &set_info[set_idx];
int i, j;
@@ -6823,7 +6823,7 @@ bool apply_set(s16b a_idx, s16b set_idx)
return (FALSE);
}
-bool apply_flags_set(s16b a_idx, s16b set_idx,
+bool_ apply_flags_set(s16b a_idx, s16b set_idx,
u32b *f1, u32b *f2, u32b *f3, u32b *f4, u32b *f5, u32b *esp)
{
set_type *s_ptr = &set_info[set_idx];
diff --git a/src/object2.c b/src/object2.c
index 2775e56b..f2619787 100644
--- a/src/object2.c
+++ b/src/object2.c
@@ -1503,7 +1503,7 @@ s32b object_value(object_type *o_ptr)
*
* Chests, and activatable items, never stack (for various reasons).
*/
-bool object_similar(object_type *o_ptr, object_type *j_ptr)
+bool_ object_similar(object_type *o_ptr, object_type *j_ptr)
{
int total = o_ptr->number + j_ptr->number;
u32b f1, f2, f3, f4, f5, esp, f11, f12, f13, f14, esp1, f15;
@@ -2059,7 +2059,7 @@ static void finalize_randart(object_type* o_ptr, int lev)
int r;
int i = 0;
int foo = lev + randnor(0, 5);
- bool flag = TRUE;
+ bool_ flag = TRUE;
/* Paranoia */
if (o_ptr->tval != TV_RANDART) return;
@@ -2131,7 +2131,7 @@ static void object_mention(object_type *o_ptr)
void random_artifact_resistance(object_type * o_ptr)
{
- bool give_resistance = FALSE, give_power = FALSE;
+ bool_ give_resistance = FALSE, give_power = FALSE;
switch (o_ptr->name1)
{
@@ -2220,7 +2220,7 @@ void random_artifact_resistance(object_type * o_ptr)
*
* Note -- see "make_artifact()" and "apply_magic()"
*/
-static bool make_artifact_special(object_type *o_ptr)
+static bool_ make_artifact_special(object_type *o_ptr)
{
int i;
int k_idx = 0;
@@ -2304,7 +2304,7 @@ static bool make_artifact_special(object_type *o_ptr)
*
* Note -- see "make_artifact_special()" and "apply_magic()"
*/
-static bool make_artifact(object_type *o_ptr)
+static bool_ make_artifact(object_type *o_ptr)
{
int i;
u32b f1, f2, f3, f4, f5, esp;
@@ -2379,11 +2379,11 @@ static bool make_artifact(object_type *o_ptr)
*
* This routine should only be called by "apply_magic()"
*/
-static bool make_ego_item(object_type *o_ptr, bool good)
+static bool_ make_ego_item(object_type *o_ptr, bool_ good)
{
int i = 0, j;
int *ok_ego, ok_num = 0;
- bool ret = FALSE;
+ bool_ ret = FALSE;
object_kind *k_ptr = &k_info[o_ptr->k_idx];
if (artifact_p(o_ptr) || o_ptr->name2) return (FALSE);
@@ -2394,7 +2394,7 @@ static bool make_ego_item(object_type *o_ptr, bool good)
for (i = 0; i < max_e_idx; i++)
{
ego_item_type *e_ptr = &e_info[i];
- bool ok = FALSE;
+ bool_ ok = FALSE;
/* Skip "empty" items */
if (!e_ptr->name) continue;
@@ -3312,7 +3312,7 @@ static void a_m_aux_4(object_type *o_ptr, int level, int power)
/* Hack -- choose a monster */
monster_race* r_ptr;
int r_idx, count = 0;
- bool OK = FALSE;
+ bool_ OK = FALSE;
while ((!OK) && (count < 1000))
{
@@ -3498,7 +3498,7 @@ void trap_hack(object_type *o_ptr)
}
/* Add a random glag to the ego item */
-void add_random_ego_flag(object_type *o_ptr, int fego, bool *limit_blows)
+void add_random_ego_flag(object_type *o_ptr, int fego, bool_ *limit_blows)
{
if (fego & ETR4_SUSTAIN)
{
@@ -3934,7 +3934,7 @@ void add_random_ego_flag(object_type *o_ptr, int fego, bool *limit_blows)
* true, then the item gets 3 extra "attempts" to become an artifact.
*/
int hack_apply_magic_power = 0;
-void apply_magic(object_type *o_ptr, int lev, bool okay, bool good, bool great)
+void apply_magic(object_type *o_ptr, int lev, bool_ okay, bool_ good, bool_ great)
{
int i, rolls, f1, f2, power;
object_kind *k_ptr = &k_info[o_ptr->k_idx];
@@ -4198,7 +4198,7 @@ void apply_magic(object_type *o_ptr, int lev, bool okay, bool good, bool great)
{
ego_item_type *e_ptr;
int j;
- bool limit_blows = FALSE;
+ bool_ limit_blows = FALSE;
u32b f1, f2, f3, f4, f5, esp;
s16b e_idx;
@@ -4351,7 +4351,7 @@ void init_match_theme(obj_theme theme)
/*
* Ditto XXX XXX XXX
*/
-static bool theme_changed(obj_theme theme)
+static bool_ theme_changed(obj_theme theme)
{
/* Any of the themes has been changed */
if (theme.treasure != match_theme.treasure) return (TRUE);
@@ -4367,7 +4367,7 @@ static bool theme_changed(obj_theme theme)
/*
* Maga-Hack -- match certain types of object only.
*/
-bool kind_is_theme(int k_idx)
+bool_ kind_is_theme(int k_idx)
{
object_kind *k_ptr = &k_info[k_idx];
@@ -4561,7 +4561,7 @@ bool kind_is_theme(int k_idx)
* Determine if an object must not be generated.
*/
int kind_is_legal_special = -1;
-bool kind_is_legal(int k_idx)
+bool_ kind_is_legal(int k_idx)
{
object_kind *k_ptr = &k_info[k_idx];
@@ -4608,7 +4608,7 @@ bool kind_is_legal(int k_idx)
/*
* Hack -- determine if a template is "good"
*/
-bool kind_is_good(int k_idx)
+bool_ kind_is_good(int k_idx)
{
object_kind *k_ptr = &k_info[k_idx];
@@ -4705,7 +4705,7 @@ bool kind_is_good(int k_idx)
/*
* Determine if template is suitable for building a randart -- dsb
*/
-bool kind_is_artifactable(int k_idx)
+bool_ kind_is_artifactable(int k_idx)
{
int i, j;
object_kind *k_ptr = &k_info[k_idx];
@@ -4748,7 +4748,7 @@ bool kind_is_artifactable(int k_idx)
* through the forge--object_prep()--apply_magic() sequence and
* get_obj_num() should never be called for that purpose XXX XXX XXX
*/
-bool make_object(object_type *j_ptr, bool good, bool great, obj_theme theme)
+bool_ make_object(object_type *j_ptr, bool_ good, bool_ great, obj_theme theme)
{
int invprob, base;
@@ -4865,7 +4865,7 @@ bool make_object(object_type *j_ptr, bool good, bool great, obj_theme theme)
*
* This routine requires a clean floor grid destination.
*/
-void place_object(int y, int x, bool good, bool great, int where)
+void place_object(int y, int x, bool_ good, bool_ great, int where)
{
s16b o_idx;
@@ -4977,7 +4977,7 @@ void place_object(int y, int x, bool good, bool great, int where)
*
* The location must be a legal, clean, floor grid.
*/
-bool make_gold(object_type *j_ptr)
+bool_ make_gold(object_type *j_ptr)
{
int i;
@@ -5114,10 +5114,10 @@ s16b drop_near(object_type *j_ptr, int chance, int y, int x)
char o_name[80];
- bool flag = FALSE;
- bool done = FALSE;
+ bool_ flag = FALSE;
+ bool_ done = FALSE;
- bool plural = FALSE;
+ bool_ plural = FALSE;
/* Extract plural */
@@ -5158,7 +5158,7 @@ s16b drop_near(object_type *j_ptr, int chance, int y, int x)
/* Scan local grids */
for (dx = -3; dx <= 3; dx++)
{
- bool comb = FALSE;
+ bool_ comb = FALSE;
/* Calculate actual distance */
d = (dy * dy) + (dx * dx);
@@ -5406,7 +5406,7 @@ s16b drop_near(object_type *j_ptr, int chance, int y, int x)
/*
* Scatter some "great" objects near the player
*/
-void acquirement(int y1, int x1, int num, bool great, bool known)
+void acquirement(int y1, int x1, int num, bool_ great, bool_ known)
{
object_type *i_ptr;
object_type object_type_body;
@@ -5545,7 +5545,7 @@ void inven_item_increase(int item, int num)
/*
* Erase an inventory slot if it has no more items
*/
-bool inven_item_optimize(int item)
+bool_ inven_item_optimize(int item)
{
object_type *o_ptr = &p_ptr->inventory[item];
@@ -5701,7 +5701,7 @@ void floor_item_optimize(int item)
/*
* Check if we have space for an item in the pack without overflow
*/
-bool inven_carry_okay(object_type *o_ptr)
+bool_ inven_carry_okay(object_type *o_ptr)
{
int j;
@@ -5747,7 +5747,7 @@ bool inven_carry_okay(object_type *o_ptr)
* The "final" flag tells this function to bypass the "combine"
* and "reorder" code until later.
*/
-s16b inven_carry(object_type *o_ptr, bool final)
+s16b inven_carry(object_type *o_ptr, bool_ final)
{
int i, j, k;
int n = -1;
@@ -5905,7 +5905,7 @@ s16b inven_carry(object_type *o_ptr, bool final)
*
* Return the inventory slot into which the item is placed.
*/
-s16b inven_takeoff(int item, int amt, bool force_drop)
+s16b inven_takeoff(int item, int amt, bool_ force_drop)
{
int slot;
@@ -6014,7 +6014,7 @@ s16b inven_takeoff(int item, int amt, bool force_drop)
*
* The object will be dropped "near" the current location
*/
-void inven_drop(int item, int amt, int dy, int dx, bool silent)
+void inven_drop(int item, int amt, int dy, int dx, bool_ silent)
{
object_type forge;
object_type *q_ptr;
@@ -6098,7 +6098,7 @@ void combine_pack(void)
int i, j, k;
object_type *o_ptr;
object_type *j_ptr;
- bool flag = FALSE;
+ bool_ flag = FALSE;
/* Combine the pack (backwards) */
@@ -6169,7 +6169,7 @@ void reorder_pack(void)
object_type *q_ptr;
object_type *j_ptr;
object_type *o_ptr;
- bool flag = FALSE;
+ bool_ flag = FALSE;
/* Re-order the pack (forwards) */
@@ -6495,7 +6495,7 @@ void floor_decay(int item)
byte y = o_ptr->iy;
/* Maybe the player sees it */
- bool visible = player_can_see_bold(o_ptr->iy, o_ptr->ix);
+ bool_ visible = player_can_see_bold(o_ptr->iy, o_ptr->ix);
char desc[80];
if (visible)
diff --git a/src/plots.c b/src/plots.c
index 4acc4af3..f48d5658 100644
--- a/src/plots.c
+++ b/src/plots.c
@@ -70,7 +70,7 @@ void dump_hooks(int h_idx)
}
/* Check a hook */
-bool check_hook(int h_idx)
+bool_ check_hook(int h_idx)
{
hooks_chain *c = hooks_heads[h_idx];
@@ -229,7 +229,7 @@ char* get_next_arg_str(char *fmt)
/* Actually process the hooks */
int process_hooks_restart = FALSE;
hook_return process_hooks_return[20];
-static bool vprocess_hooks_return (int h_idx, char *ret, char *fmt, va_list *ap)
+static bool_ vprocess_hooks_return (int h_idx, char *ret, char *fmt, va_list *ap)
{
hooks_chain *c = hooks_heads[h_idx];
va_list real_ap;
@@ -392,10 +392,10 @@ static bool vprocess_hooks_return (int h_idx, char *ret, char *fmt, va_list *ap)
return FALSE;
}
-bool process_hooks_ret(int h_idx, char *ret, char *fmt, ...)
+bool_ process_hooks_ret(int h_idx, char *ret, char *fmt, ...)
{
va_list ap;
- bool r;
+ bool_ r;
va_start(ap, fmt);
r = vprocess_hooks_return (h_idx, ret, fmt, &ap);
@@ -403,10 +403,10 @@ bool process_hooks_ret(int h_idx, char *ret, char *fmt, ...)
return (r);
}
-bool process_hooks(int h_idx, char *fmt, ...)
+bool_ process_hooks(int h_idx, char *fmt, ...)
{
va_list ap;
- bool ret;
+ bool_ ret;
va_start(ap, fmt);
ret = vprocess_hooks_return (h_idx, "", fmt, &ap);
@@ -427,7 +427,7 @@ static void quest_describe(int q_idx)
}
/* Catch-all quest hook */
-bool quest_null_hook(int q)
+bool_ quest_null_hook(int q)
{
/* Do nothing */
return (FALSE);
diff --git a/src/plots.h b/src/plots.h
index 7f89c4ce..d21241c2 100644
--- a/src/plots.h
+++ b/src/plots.h
@@ -2,46 +2,46 @@
/* Purpose: extern plots declarations */
-extern bool quest_null_hook(int q);
+extern bool_ quest_null_hook(int q);
/******* Random Quests ********/
-extern bool is_randhero(int level);
-extern bool quest_random_init_hook(int q_idx);
+extern bool_ is_randhero(int level);
+extern bool_ quest_random_init_hook(int q_idx);
/******* Plot main ********/
-extern bool quest_necro_init_hook(int q_idx);
-extern bool quest_one_init_hook(int q_idx);
-extern bool quest_sauron_init_hook(int q_idx);
-extern bool quest_morgoth_init_hook(int q_idx);
-extern bool quest_ultra_good_init_hook(int q_idx);
-extern bool quest_ultra_evil_init_hook(int q_idx);
+extern bool_ quest_necro_init_hook(int q_idx);
+extern bool_ quest_one_init_hook(int q_idx);
+extern bool_ quest_sauron_init_hook(int q_idx);
+extern bool_ quest_morgoth_init_hook(int q_idx);
+extern bool_ quest_ultra_good_init_hook(int q_idx);
+extern bool_ quest_ultra_evil_init_hook(int q_idx);
/******* Plot Bree *********/
-extern bool quest_thieves_init_hook(int q_idx);
-extern bool quest_hobbit_init_hook(int q_idx);
-extern bool quest_troll_init_hook(int q_idx);
-extern bool quest_wight_init_hook(int q_idx);
-extern bool quest_nazgul_init_hook(int q_idx);
-extern bool quest_shroom_init_hook(int q_idx);
+extern bool_ quest_thieves_init_hook(int q_idx);
+extern bool_ quest_hobbit_init_hook(int q_idx);
+extern bool_ quest_troll_init_hook(int q_idx);
+extern bool_ quest_wight_init_hook(int q_idx);
+extern bool_ quest_nazgul_init_hook(int q_idx);
+extern bool_ quest_shroom_init_hook(int q_idx);
/******* Plot Lorien *********/
-extern bool quest_wolves_init_hook(int q_idx);
-extern bool quest_spider_init_hook(int q_idx);
-extern bool quest_poison_init_hook(int q_idx);
+extern bool_ quest_wolves_init_hook(int q_idx);
+extern bool_ quest_spider_init_hook(int q_idx);
+extern bool_ quest_poison_init_hook(int q_idx);
/******* Plot Gondolin *********/
-extern bool quest_dragons_init_hook(int q_idx);
-extern bool quest_eol_init_hook(int q_idx);
-extern bool quest_nirnaeth_init_hook(int q_idx);
-extern bool quest_invasion_init_hook(int q_idx);
+extern bool_ quest_dragons_init_hook(int q_idx);
+extern bool_ quest_eol_init_hook(int q_idx);
+extern bool_ quest_nirnaeth_init_hook(int q_idx);
+extern bool_ quest_invasion_init_hook(int q_idx);
/******* Plot Minas Anor *********/
-extern bool quest_haunted_init_hook(int q_idx);
-extern bool quest_between_init_hook(int q_idx);
+extern bool_ quest_haunted_init_hook(int q_idx);
+extern bool_ quest_between_init_hook(int q_idx);
/******* Plot Khazad-dum *********/
-extern bool quest_evil_init_hook(int q_idx);
+extern bool_ quest_evil_init_hook(int q_idx);
/******* Plot Other *********/
-extern bool quest_narsil_init_hook(int q_idx);
-extern bool quest_thrain_init_hook(int q_idx);
+extern bool_ quest_narsil_init_hook(int q_idx);
+extern bool_ quest_thrain_init_hook(int q_idx);
diff --git a/src/powers.c b/src/powers.c
index d9a41561..f51b09b3 100644
--- a/src/powers.c
+++ b/src/powers.c
@@ -15,9 +15,9 @@
/*
* Note: return value indicates the amount of mana to use
*/
-bool power_chance(power_type *x_ptr)
+bool_ power_chance(power_type *x_ptr)
{
- bool use_hp = FALSE;
+ bool_ use_hp = FALSE;
int diff = x_ptr->diff;
/* Always true ? */
@@ -1261,7 +1261,7 @@ static void power_activate(int power)
/*
* Print a batch of power.
*/
-static void print_power_batch(int *p, int start, int max, bool mode)
+static void print_power_batch(int *p, int start, int max, bool_ mode)
{
char buff[80];
power_type* spell;
@@ -1295,7 +1295,7 @@ static power_type* select_power(int *x_idx)
char which;
int max = 0, i, start = 0;
power_type* ret;
- bool mode = FALSE;
+ bool_ mode = FALSE;
int *p;
C_MAKE(p, power_max, int);
@@ -1384,7 +1384,7 @@ void do_cmd_power()
{
int x_idx;
power_type *x_ptr;
- bool push = TRUE;
+ bool_ push = TRUE;
/* Get the skill, if available */
if (repeat_pull(&x_idx))
diff --git a/src/q_betwen.c b/src/q_betwen.c
index f156b843..da9b0db4 100644
--- a/src/q_betwen.c
+++ b/src/q_betwen.c
@@ -1,7 +1,7 @@
#undef cquest
#define cquest (quest[QUEST_BETWEEN])
-bool quest_between_move_hook(char *fmt)
+bool_ quest_between_move_hook(char *fmt)
{
s32b y;
s32b x;
@@ -49,7 +49,7 @@ bool quest_between_move_hook(char *fmt)
return FALSE;
}
-bool quest_between_gen_hook(char *fmt)
+bool_ quest_between_gen_hook(char *fmt)
{
int x, y;
int xstart = 2;
@@ -85,7 +85,7 @@ bool quest_between_gen_hook(char *fmt)
return TRUE;
}
-bool quest_between_finish_hook(char *fmt)
+bool_ quest_between_finish_hook(char *fmt)
{
s32b q_idx;
object_type forge, *q_ptr;
@@ -123,7 +123,7 @@ bool quest_between_finish_hook(char *fmt)
return TRUE;
}
-bool quest_between_death_hook(char *fmt)
+bool_ quest_between_death_hook(char *fmt)
{
int i, mcnt = 0;
@@ -152,7 +152,7 @@ bool quest_between_death_hook(char *fmt)
return FALSE;
}
-bool quest_between_dump_hook(char *fmt)
+bool_ quest_between_dump_hook(char *fmt)
{
if (cquest.status >= QUEST_STATUS_COMPLETED)
{
@@ -161,7 +161,7 @@ bool quest_between_dump_hook(char *fmt)
}
return (FALSE);
}
-bool quest_between_forbid_hook(char *fmt)
+bool_ quest_between_forbid_hook(char *fmt)
{
s32b q_idx;
q_idx = get_next_arg(fmt);
@@ -175,7 +175,7 @@ bool quest_between_forbid_hook(char *fmt)
}
return (FALSE);
}
-bool quest_between_init_hook(int q)
+bool_ quest_between_init_hook(int q)
{
if ((cquest.status >= QUEST_STATUS_TAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
diff --git a/src/q_dragons.c b/src/q_dragons.c
index e06dfbe7..222e4742 100644
--- a/src/q_dragons.c
+++ b/src/q_dragons.c
@@ -1,7 +1,7 @@
#undef cquest
#define cquest (quest[QUEST_DRAGONS])
-bool quest_dragons_gen_hook(char *fmt)
+bool_ quest_dragons_gen_hook(char *fmt)
{
int x, y, i;
int xstart = 2;
@@ -89,7 +89,7 @@ bool quest_dragons_gen_hook(char *fmt)
return TRUE;
}
-bool quest_dragons_death_hook(char *fmt)
+bool_ quest_dragons_death_hook(char *fmt)
{
int i, mcnt = 0;
@@ -121,7 +121,7 @@ bool quest_dragons_death_hook(char *fmt)
return FALSE;
}
-bool quest_dragons_finish_hook(char *fmt)
+bool_ quest_dragons_finish_hook(char *fmt)
{
s32b q_idx;
@@ -138,7 +138,7 @@ bool quest_dragons_finish_hook(char *fmt)
return TRUE;
}
-bool quest_dragons_init_hook(int q_idx)
+bool_ quest_dragons_init_hook(int q_idx)
{
if ((cquest.status >= QUEST_STATUS_UNTAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
diff --git a/src/q_eol.c b/src/q_eol.c
index 4b66e8ad..5b1cf78e 100644
--- a/src/q_eol.c
+++ b/src/q_eol.c
@@ -1,10 +1,10 @@
#undef cquest
#define cquest (quest[QUEST_EOL])
-bool quest_eol_gen_hook(char *fmt)
+bool_ quest_eol_gen_hook(char *fmt)
{
int x, y;
- bool done = FALSE;
+ bool_ done = FALSE;
int xsize = 50, ysize = 30, y0, x0;
int m_idx = 0;
@@ -81,7 +81,7 @@ bool quest_eol_gen_hook(char *fmt)
return TRUE;
}
-bool quest_eol_finish_hook(char *fmt)
+bool_ quest_eol_finish_hook(char *fmt)
{
object_type forge, *q_ptr;
s32b q_idx;
@@ -113,7 +113,7 @@ bool quest_eol_finish_hook(char *fmt)
return TRUE;
}
-bool quest_eol_fail_hook(char *fmt)
+bool_ quest_eol_fail_hook(char *fmt)
{
s32b q_idx;
@@ -131,7 +131,7 @@ bool quest_eol_fail_hook(char *fmt)
return TRUE;
}
-bool quest_eol_death_hook(char *fmt)
+bool_ quest_eol_death_hook(char *fmt)
{
s32b r_idx, m_idx;
@@ -151,7 +151,7 @@ bool quest_eol_death_hook(char *fmt)
return FALSE;
}
-bool quest_eol_stair_hook(char *fmt)
+bool_ quest_eol_stair_hook(char *fmt)
{
monster_race *r_ptr = &r_info[test_monster_name("Eol, the Dark Elf")];
cptr down;
@@ -181,7 +181,7 @@ bool quest_eol_stair_hook(char *fmt)
return FALSE;
}
-bool quest_eol_init_hook(int q)
+bool_ quest_eol_init_hook(int q)
{
if ((cquest.status >= QUEST_STATUS_TAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
diff --git a/src/q_evil.c b/src/q_evil.c
index 1e5a19bb..33a01d29 100644
--- a/src/q_evil.c
+++ b/src/q_evil.c
@@ -1,7 +1,7 @@
#undef cquest
#define cquest (quest[QUEST_EVIL])
-bool quest_evil_gen_hook(char *fmt)
+bool_ quest_evil_gen_hook(char *fmt)
{
int x, y, i;
int xstart = 2;
@@ -54,7 +54,7 @@ bool quest_evil_gen_hook(char *fmt)
return TRUE;
}
-bool quest_evil_death_hook(char *fmt)
+bool_ quest_evil_death_hook(char *fmt)
{
int i, mcnt = 0;
@@ -88,7 +88,7 @@ bool quest_evil_death_hook(char *fmt)
return FALSE;
}
-bool quest_evil_finish_hook(char *fmt)
+bool_ quest_evil_finish_hook(char *fmt)
{
s32b q_idx;
@@ -105,7 +105,7 @@ bool quest_evil_finish_hook(char *fmt)
return TRUE;
}
-bool quest_evil_init_hook(int q_idx)
+bool_ quest_evil_init_hook(int q_idx)
{
if ((cquest.status >= QUEST_STATUS_UNTAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
diff --git a/src/q_haunted.c b/src/q_haunted.c
index 9cd76d81..d89698fe 100644
--- a/src/q_haunted.c
+++ b/src/q_haunted.c
@@ -1,7 +1,7 @@
#undef cquest
#define cquest (quest[QUEST_HAUNTED])
-bool quest_haunted_gen_hook(char *fmt)
+bool_ quest_haunted_gen_hook(char *fmt)
{
int x, y, i, m_idx;
int xstart = 2;
@@ -86,7 +86,7 @@ bool quest_haunted_gen_hook(char *fmt)
return TRUE;
}
-bool quest_haunted_death_hook(char *fmt)
+bool_ quest_haunted_death_hook(char *fmt)
{
int i, mcnt = 0;
@@ -118,7 +118,7 @@ bool quest_haunted_death_hook(char *fmt)
return FALSE;
}
-bool quest_haunted_finish_hook(char *fmt)
+bool_ quest_haunted_finish_hook(char *fmt)
{
s32b q_idx;
@@ -135,7 +135,7 @@ bool quest_haunted_finish_hook(char *fmt)
return TRUE;
}
-bool quest_haunted_init_hook(int q_idx)
+bool_ quest_haunted_init_hook(int q_idx)
{
if ((cquest.status >= QUEST_STATUS_UNTAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
diff --git a/src/q_hobbit.c b/src/q_hobbit.c
index ae5412e4..4ac1f35f 100644
--- a/src/q_hobbit.c
+++ b/src/q_hobbit.c
@@ -1,7 +1,7 @@
#undef cquest
#define cquest (quest[QUEST_HOBBIT])
-bool quest_hobbit_town_gen_hook(char *fmt)
+bool_ quest_hobbit_town_gen_hook(char *fmt)
{
int x = 1, y = 1, tries = 10000;
s32b small;
@@ -33,7 +33,7 @@ bool quest_hobbit_town_gen_hook(char *fmt)
return FALSE;
}
-bool quest_hobbit_gen_hook(char *fmt)
+bool_ quest_hobbit_gen_hook(char *fmt)
{
int x = 1, y = 1, tries = 10000;
@@ -60,7 +60,7 @@ bool quest_hobbit_gen_hook(char *fmt)
return FALSE;
}
-bool quest_hobbit_give_hook(char *fmt)
+bool_ quest_hobbit_give_hook(char *fmt)
{
object_type *o_ptr;
monster_type *m_ptr;
@@ -90,7 +90,7 @@ bool quest_hobbit_give_hook(char *fmt)
return TRUE;
}
-bool quest_hobbit_speak_hook(char *fmt)
+bool_ quest_hobbit_speak_hook(char *fmt)
{
s32b m_idx = get_next_arg(fmt);
@@ -106,7 +106,7 @@ bool quest_hobbit_speak_hook(char *fmt)
}
return (TRUE);
}
-bool quest_hobbit_chat_hook(char *fmt)
+bool_ quest_hobbit_chat_hook(char *fmt)
{
monster_type *m_ptr;
s32b m_idx;
@@ -158,7 +158,7 @@ bool quest_hobbit_chat_hook(char *fmt)
return TRUE;
}
-bool quest_hobbit_dump_hook(char *fmt)
+bool_ quest_hobbit_dump_hook(char *fmt)
{
if (cquest.status >= QUEST_STATUS_COMPLETED)
{
@@ -166,7 +166,7 @@ bool quest_hobbit_dump_hook(char *fmt)
}
return (FALSE);
}
-bool quest_hobbit_init_hook(int q_idx)
+bool_ quest_hobbit_init_hook(int q_idx)
{
/* Get a level to place the hobbit */
if (!cquest.data[0])
diff --git a/src/q_invas.c b/src/q_invas.c
index 5365c72b..634bfe97 100644
--- a/src/q_invas.c
+++ b/src/q_invas.c
@@ -1,7 +1,7 @@
#undef cquest
#define cquest (quest[QUEST_INVASION])
-bool quest_invasion_gen_hook(char *fmt)
+bool_ quest_invasion_gen_hook(char *fmt)
{
int x, y;
int xstart = 2;
@@ -45,7 +45,7 @@ bool quest_invasion_gen_hook(char *fmt)
return TRUE;
}
-bool quest_invasion_ai_hook(char *fmt)
+bool_ quest_invasion_ai_hook(char *fmt)
{
monster_type *m_ptr;
s32b m_idx;
@@ -84,9 +84,9 @@ bool quest_invasion_ai_hook(char *fmt)
return (FALSE);
}
-bool quest_invasion_turn_hook(char *fmt)
+bool_ quest_invasion_turn_hook(char *fmt)
{
- bool old_quick_messages = quick_messages;
+ bool_ old_quick_messages = quick_messages;
if (cquest.status != QUEST_STATUS_UNTAKEN) return (FALSE);
if (p_ptr->lev < 45) return (FALSE);
@@ -113,7 +113,7 @@ bool quest_invasion_turn_hook(char *fmt)
process_hooks_restart = TRUE;
return (FALSE);
}
-bool quest_invasion_dump_hook(char *fmt)
+bool_ quest_invasion_dump_hook(char *fmt)
{
if (cquest.status == QUEST_STATUS_FAILED)
{
@@ -125,7 +125,7 @@ bool quest_invasion_dump_hook(char *fmt)
}
return (FALSE);
}
-bool quest_invasion_death_hook(char *fmt)
+bool_ quest_invasion_death_hook(char *fmt)
{
s32b r_idx, m_idx;
@@ -145,7 +145,7 @@ bool quest_invasion_death_hook(char *fmt)
return FALSE;
}
-bool quest_invasion_stair_hook(char *fmt)
+bool_ quest_invasion_stair_hook(char *fmt)
{
cptr down;
@@ -188,7 +188,7 @@ bool quest_invasion_stair_hook(char *fmt)
return TRUE;
}
-bool quest_invasion_init_hook(int q_idx)
+bool_ quest_invasion_init_hook(int q_idx)
{
add_hook(HOOK_END_TURN, quest_invasion_turn_hook, "invasion_turn");
add_hook(HOOK_CHAR_DUMP, quest_invasion_dump_hook, "invasion_dump");
diff --git a/src/q_main.c b/src/q_main.c
index 15d15ef3..a13b0790 100644
--- a/src/q_main.c
+++ b/src/q_main.c
@@ -1,4 +1,4 @@
-bool quest_main_monsters_hook(char *fmt)
+bool_ quest_main_monsters_hook(char *fmt)
{
s32b r_idx;
r_idx = get_next_arg(fmt);
@@ -17,7 +17,7 @@ bool quest_main_monsters_hook(char *fmt)
}
return FALSE;
}
-bool quest_morgoth_hook(char *fmt)
+bool_ quest_morgoth_hook(char *fmt)
{
/* Using test_monster_name() here would be a lot less ugly, but would take much more time */
monster_race *r_ptr = &r_info[862];
@@ -67,7 +67,7 @@ bool quest_morgoth_hook(char *fmt)
}
return (FALSE);
}
-bool quest_morgoth_dump_hook(char *fmt)
+bool_ quest_morgoth_dump_hook(char *fmt)
{
if (quest[QUEST_MORGOTH].status >= QUEST_STATUS_COMPLETED)
{
@@ -78,7 +78,7 @@ bool quest_morgoth_dump_hook(char *fmt)
}
return (FALSE);
}
-bool quest_morgoth_init_hook(int q_idx)
+bool_ quest_morgoth_init_hook(int q_idx)
{
if ((quest[QUEST_MORGOTH].status >= QUEST_STATUS_TAKEN) && (quest[QUEST_MORGOTH].status < QUEST_STATUS_FINISHED))
{
@@ -89,7 +89,7 @@ bool quest_morgoth_init_hook(int q_idx)
return (FALSE);
}
-bool quest_sauron_hook(char *fmt)
+bool_ quest_sauron_hook(char *fmt)
{
/* Using test_monster_name() here would be a lot less ugly, but would take much more time */
monster_race *r_ptr = &r_info[860];
@@ -113,7 +113,7 @@ bool quest_sauron_hook(char *fmt)
return (FALSE);
}
-bool quest_sauron_resurect_hook(char *fmt)
+bool_ quest_sauron_resurect_hook(char *fmt)
{
s32b m_idx = get_next_arg(fmt);
monster_type *m_ptr = &m_list[m_idx];
@@ -132,7 +132,7 @@ bool quest_sauron_resurect_hook(char *fmt)
return FALSE;
}
-bool quest_sauron_init_hook(int q_idx)
+bool_ quest_sauron_init_hook(int q_idx)
{
if ((quest[QUEST_SAURON].status >= QUEST_STATUS_TAKEN) && (quest[QUEST_SAURON].status < QUEST_STATUS_FINISHED))
{
@@ -143,7 +143,7 @@ bool quest_sauron_init_hook(int q_idx)
return (FALSE);
}
-bool quest_necro_hook(char *fmt)
+bool_ quest_necro_hook(char *fmt)
{
/* Using test_monster_name() here would be a lot less ugly, but would take much more time */
monster_race *r_ptr = &r_info[819];
@@ -165,7 +165,7 @@ bool quest_necro_hook(char *fmt)
}
return (FALSE);
}
-bool quest_necro_init_hook(int q_idx)
+bool_ quest_necro_init_hook(int q_idx)
{
if ((quest[QUEST_NECRO].status >= QUEST_STATUS_TAKEN) && (quest[QUEST_NECRO].status < QUEST_STATUS_FINISHED))
{
diff --git a/src/q_narsil.c b/src/q_narsil.c
index a15d46c6..e96814dd 100644
--- a/src/q_narsil.c
+++ b/src/q_narsil.c
@@ -1,7 +1,7 @@
#undef cquest
#define cquest (quest[QUEST_NARSIL])
-bool quest_narsil_move_hook(char *fmt)
+bool_ quest_narsil_move_hook(char *fmt)
{
s32b y, x;
cave_type *c_ptr;
@@ -56,7 +56,7 @@ bool quest_narsil_move_hook(char *fmt)
return TRUE;
}
-bool quest_narsil_dump_hook(char *fmt)
+bool_ quest_narsil_dump_hook(char *fmt)
{
if (cquest.status >= QUEST_STATUS_COMPLETED)
{
@@ -64,7 +64,7 @@ bool quest_narsil_dump_hook(char *fmt)
}
return (FALSE);
}
-bool quest_narsil_identify_hook(char *fmt)
+bool_ quest_narsil_identify_hook(char *fmt)
{
if (cquest.status == QUEST_STATUS_UNTAKEN)
{
@@ -106,7 +106,7 @@ bool quest_narsil_identify_hook(char *fmt)
return (FALSE);
}
-bool quest_narsil_init_hook(int q_idx)
+bool_ quest_narsil_init_hook(int q_idx)
{
if ((cquest.status >= QUEST_STATUS_TAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
diff --git a/src/q_nazgul.c b/src/q_nazgul.c
index 2f9b4bf8..66d3dc98 100644
--- a/src/q_nazgul.c
+++ b/src/q_nazgul.c
@@ -1,7 +1,7 @@
#undef cquest
#define cquest (quest[QUEST_NAZGUL])
-bool quest_nazgul_gen_hook(char *fmt)
+bool_ quest_nazgul_gen_hook(char *fmt)
{
int m_idx, x = 1, y = 1, tries = 10000;
s32b small;
@@ -33,7 +33,7 @@ bool quest_nazgul_gen_hook(char *fmt)
return FALSE;
}
-bool quest_nazgul_finish_hook(char *fmt)
+bool_ quest_nazgul_finish_hook(char *fmt)
{
object_type forge, *q_ptr;
s32b q_idx;
@@ -63,7 +63,7 @@ bool quest_nazgul_finish_hook(char *fmt)
return TRUE;
}
-bool quest_nazgul_dump_hook(char *fmt)
+bool_ quest_nazgul_dump_hook(char *fmt)
{
if (cquest.status >= QUEST_STATUS_COMPLETED)
{
@@ -71,7 +71,7 @@ bool quest_nazgul_dump_hook(char *fmt)
}
return (FALSE);
}
-bool quest_nazgul_forbid_hook(char *fmt)
+bool_ quest_nazgul_forbid_hook(char *fmt)
{
s32b q_idx;
q_idx = get_next_arg(fmt);
@@ -85,7 +85,7 @@ bool quest_nazgul_forbid_hook(char *fmt)
}
return (FALSE);
}
-bool quest_nazgul_death_hook(char *fmt)
+bool_ quest_nazgul_death_hook(char *fmt)
{
s32b r_idx, m_idx;
@@ -102,7 +102,7 @@ bool quest_nazgul_death_hook(char *fmt)
return (FALSE);
}
-bool quest_nazgul_init_hook(int q_idx)
+bool_ quest_nazgul_init_hook(int q_idx)
{
if ((cquest.status >= QUEST_STATUS_TAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
diff --git a/src/q_nirna.c b/src/q_nirna.c
index ab0d29ce..1fbd05db 100644
--- a/src/q_nirna.c
+++ b/src/q_nirna.c
@@ -1,7 +1,7 @@
#undef cquest
#define cquest (quest[QUEST_NIRNAETH])
-bool quest_nirnaeth_gen_hook(char *fmt)
+bool_ quest_nirnaeth_gen_hook(char *fmt)
{
int x, y;
int xstart = 2;
@@ -41,7 +41,7 @@ bool quest_nirnaeth_gen_hook(char *fmt)
return TRUE;
}
-bool quest_nirnaeth_finish_hook(char *fmt)
+bool_ quest_nirnaeth_finish_hook(char *fmt)
{
s32b q_idx;
@@ -78,7 +78,7 @@ bool quest_nirnaeth_finish_hook(char *fmt)
return TRUE;
}
-bool quest_nirnaeth_death_hook(char *fmt)
+bool_ quest_nirnaeth_death_hook(char *fmt)
{
if (p_ptr->inside_quest != QUEST_NIRNAETH) return FALSE;
@@ -86,7 +86,7 @@ bool quest_nirnaeth_death_hook(char *fmt)
return FALSE;
}
-bool quest_nirnaeth_stair_hook(char *fmt)
+bool_ quest_nirnaeth_stair_hook(char *fmt)
{
if (p_ptr->inside_quest != QUEST_NIRNAETH) return FALSE;
@@ -98,7 +98,7 @@ bool quest_nirnaeth_stair_hook(char *fmt)
process_hooks_restart = TRUE;
return (FALSE);
}
-bool quest_nirnaeth_init_hook(int q_idx)
+bool_ quest_nirnaeth_init_hook(int q_idx)
{
if ((cquest.status >= QUEST_STATUS_TAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
diff --git a/src/q_one.c b/src/q_one.c
index a52b37b8..37a753ee 100644
--- a/src/q_one.c
+++ b/src/q_one.c
@@ -1,7 +1,7 @@
#undef cquest
#define cquest (quest[QUEST_ONE])
-bool quest_one_move_hook(char *fmt)
+bool_ quest_one_move_hook(char *fmt)
{
s32b y, x;
cave_type *c_ptr;
@@ -66,7 +66,7 @@ bool quest_one_move_hook(char *fmt)
return FALSE;
}
-bool quest_one_drop_hook(char *fmt)
+bool_ quest_one_drop_hook(char *fmt)
{
s32b o_idx;
object_type *o_ptr;
@@ -97,7 +97,7 @@ bool quest_one_drop_hook(char *fmt)
return TRUE;
}
-bool quest_one_wield_hook(char *fmt)
+bool_ quest_one_wield_hook(char *fmt)
{
s32b o_idx;
object_type *o_ptr;
@@ -154,7 +154,7 @@ bool quest_one_wield_hook(char *fmt)
return FALSE;
}
-bool quest_one_hp_hook(char *fmt)
+bool_ quest_one_hp_hook(char *fmt)
{
if (cquest.status == QUEST_STATUS_FAILED_DONE)
{
@@ -171,7 +171,7 @@ bool quest_one_hp_hook(char *fmt)
}
return (FALSE);
}
-bool quest_one_die_hook(char *fmt)
+bool_ quest_one_die_hook(char *fmt)
{
if (cquest.status == QUEST_STATUS_FAILED_DONE)
{
@@ -190,7 +190,7 @@ bool quest_one_die_hook(char *fmt)
}
return (FALSE);
}
-bool quest_one_identify_hook(char *fmt)
+bool_ quest_one_identify_hook(char *fmt)
{
s32b item;
@@ -222,10 +222,10 @@ bool quest_one_identify_hook(char *fmt)
return (FALSE);
}
-bool quest_one_death_hook(char *fmt)
+bool_ quest_one_death_hook(char *fmt)
{
s32b r_idx, m_idx;
- bool ok = FALSE;
+ bool_ ok = FALSE;
monster_race *r_ptr;
m_idx = get_next_arg(fmt);
@@ -304,7 +304,7 @@ bool quest_one_death_hook(char *fmt)
return (FALSE);
}
-bool quest_one_dump_hook(char *fmt)
+bool_ quest_one_dump_hook(char *fmt)
{
if (cquest.status == QUEST_STATUS_FINISHED)
{
@@ -316,7 +316,7 @@ bool quest_one_dump_hook(char *fmt)
}
return (FALSE);
}
-bool quest_one_gen_hook(char *fmt)
+bool_ quest_one_gen_hook(char *fmt)
{
s32b x, y, tries = 10000;
@@ -346,7 +346,7 @@ bool quest_one_gen_hook(char *fmt)
return (FALSE);
}
-bool quest_one_init_hook(int q_idx)
+bool_ quest_one_init_hook(int q_idx)
{
if ((cquest.status >= QUEST_STATUS_TAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
diff --git a/src/q_poison.c b/src/q_poison.c
index 49d3119c..e6fed3a1 100644
--- a/src/q_poison.c
+++ b/src/q_poison.c
@@ -9,7 +9,7 @@ static int wild_locs[4][2] =
{ 34, 48, },
};
-static bool create_molds_hook(int r_idx)
+static bool_ create_molds_hook(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -21,10 +21,10 @@ static bool create_molds_hook(int r_idx)
else return FALSE;
}
-bool quest_poison_gen_hook(char *fmt)
+bool_ quest_poison_gen_hook(char *fmt)
{
int cy = 1, cx = 1, x, y, tries = 10000, r_idx;
- bool (*old_get_mon_num_hook)(int r_idx);
+ bool_ (*old_get_mon_num_hook)(int r_idx);
if (cquest.status != QUEST_STATUS_TAKEN) return FALSE;
if (p_ptr->wilderness_y != wild_locs[cquest.data[0]][0]) return FALSE;
@@ -98,7 +98,7 @@ bool quest_poison_gen_hook(char *fmt)
return FALSE;
}
-bool quest_poison_finish_hook(char *fmt)
+bool_ quest_poison_finish_hook(char *fmt)
{
object_type forge, *q_ptr;
s32b q_idx;
@@ -129,7 +129,7 @@ bool quest_poison_finish_hook(char *fmt)
return TRUE;
}
-bool quest_poison_dump_hook(char *fmt)
+bool_ quest_poison_dump_hook(char *fmt)
{
if (cquest.status >= QUEST_STATUS_COMPLETED)
{
@@ -137,7 +137,7 @@ bool quest_poison_dump_hook(char *fmt)
}
return (FALSE);
}
-bool quest_poison_quest_hook(char *fmt)
+bool_ quest_poison_quest_hook(char *fmt)
{
object_type forge, *q_ptr;
s32b q_idx;
@@ -160,7 +160,7 @@ bool quest_poison_quest_hook(char *fmt)
return FALSE;
}
-bool quest_poison_drop_hook(char *fmt)
+bool_ quest_poison_drop_hook(char *fmt)
{
s32b mcnt = 0, i, x, y, o_idx;
object_type *o_ptr;
@@ -213,7 +213,7 @@ bool quest_poison_drop_hook(char *fmt)
}
return FALSE;
}
-bool quest_poison_init_hook(int q_idx)
+bool_ quest_poison_init_hook(int q_idx)
{
/* Get a place to place the poison */
if (!cquest.data[1])
diff --git a/src/q_rand.c b/src/q_rand.c
index c952b861..2c0898c4 100644
--- a/src/q_rand.c
+++ b/src/q_rand.c
@@ -1,9 +1,9 @@
static int randquest_hero[] = { 20, 13, 15, 16, 9, 17, 18, 8, -1 };
-bool is_randhero(int level)
+bool_ is_randhero(int level)
{
int i;
- bool result = FALSE;
+ bool_ result = FALSE;
for (i = 0; randquest_hero[i] != -1; i++)
{
@@ -213,7 +213,7 @@ void hero_death(s32b m_idx, s32b r_idx)
}
}
-bool quest_random_death_hook(char *fmt)
+bool_ quest_random_death_hook(char *fmt)
{
int r_idx;
s32b m_idx;
@@ -242,13 +242,13 @@ bool quest_random_death_hook(char *fmt)
return (FALSE);
}
-bool quest_random_turn_hook(char *fmt)
+bool_ quest_random_turn_hook(char *fmt)
{
quest[QUEST_RANDOM].data[0] = 0;
quest[QUEST_RANDOM].data[1] = 0;
return (FALSE);
}
-bool quest_random_feeling_hook(char *fmt)
+bool_ quest_random_feeling_hook(char *fmt)
{
if (!(dungeon_flags1 & DF1_PRINCIPAL)) return (FALSE);
if ((dun_level < 1) || (dun_level >= MAX_RANDOM_QUEST)) return (FALSE);
@@ -266,7 +266,7 @@ bool quest_random_feeling_hook(char *fmt)
cmsg_format(TERM_YELLOW, "You hear someone shouting: 'Leave me alone, stupid %s'", r_info[random_quests[dun_level].r_idx].name + r_name);
return (FALSE);
}
-bool quest_random_gen_hero_hook(char *fmt)
+bool_ quest_random_gen_hero_hook(char *fmt)
{
int i;
@@ -296,7 +296,7 @@ bool quest_random_gen_hero_hook(char *fmt)
return (FALSE);
}
-bool quest_random_gen_hook(char *fmt)
+bool_ quest_random_gen_hook(char *fmt)
{
s32b x, y, bx0, by0;
int xstart;
@@ -385,7 +385,7 @@ bool quest_random_gen_hook(char *fmt)
return (TRUE);
}
-bool quest_random_dump_hook(char *fmt)
+bool_ quest_random_dump_hook(char *fmt)
{
static char *number[] =
{ "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten" };
@@ -429,7 +429,7 @@ bool quest_random_dump_hook(char *fmt)
return (FALSE);
}
-bool quest_random_init_hook(int q_idx)
+bool_ quest_random_init_hook(int q_idx)
{
add_hook(HOOK_MONSTER_DEATH, quest_random_death_hook, "rand_death");
add_hook(HOOK_NEW_LEVEL, quest_random_turn_hook, "rand_new_lvl");
diff --git a/src/q_shroom.c b/src/q_shroom.c
index cb3f57d7..6a93f13d 100644
--- a/src/q_shroom.c
+++ b/src/q_shroom.c
@@ -1,9 +1,9 @@
#undef cquest
#define cquest (quest[QUEST_SHROOM])
-bool quest_shroom_speak_hook(char *fmt);
+bool_ quest_shroom_speak_hook(char *fmt);
-bool quest_shroom_town_gen_hook(char *fmt)
+bool_ quest_shroom_town_gen_hook(char *fmt)
{
int m_idx, x = 1, y = 1, tries = 10000;
s32b small;
@@ -81,7 +81,7 @@ bool quest_shroom_town_gen_hook(char *fmt)
return FALSE;
}
-bool quest_shroom_death_hook(char *fmt)
+bool_ quest_shroom_death_hook(char *fmt)
{
s32b r_idx, m_idx;
@@ -99,7 +99,7 @@ bool quest_shroom_death_hook(char *fmt)
return FALSE;
}
-bool quest_shroom_give_hook(char *fmt)
+bool_ quest_shroom_give_hook(char *fmt)
{
object_type *o_ptr;
monster_type *m_ptr;
@@ -184,7 +184,7 @@ bool quest_shroom_give_hook(char *fmt)
return TRUE;
}
-bool quest_shroom_speak_hook(char *fmt)
+bool_ quest_shroom_speak_hook(char *fmt)
{
s32b m_idx = get_next_arg(fmt);
@@ -221,7 +221,7 @@ bool quest_shroom_speak_hook(char *fmt)
}
return (TRUE);
}
-bool quest_shroom_chat_hook(char *fmt)
+bool_ quest_shroom_chat_hook(char *fmt)
{
monster_type *m_ptr;
s32b m_idx;
@@ -266,7 +266,7 @@ bool quest_shroom_chat_hook(char *fmt)
return TRUE;
}
-bool quest_shroom_init_hook(int q_idx)
+bool_ quest_shroom_init_hook(int q_idx)
{
/* Get a number of 'shrooms */
if (!cquest.data[1])
diff --git a/src/q_spider.c b/src/q_spider.c
index 8d88524a..da8b7af6 100644
--- a/src/q_spider.c
+++ b/src/q_spider.c
@@ -1,7 +1,7 @@
#undef cquest
#define cquest (quest[QUEST_SPIDER])
-bool quest_spider_gen_hook(char *fmt)
+bool_ quest_spider_gen_hook(char *fmt)
{
int x, y;
int xstart = 2;
@@ -32,7 +32,7 @@ bool quest_spider_gen_hook(char *fmt)
return TRUE;
}
-bool quest_spider_death_hook(char *fmt)
+bool_ quest_spider_death_hook(char *fmt)
{
int i, mcnt = 0;
@@ -68,7 +68,7 @@ bool quest_spider_death_hook(char *fmt)
return (FALSE);
}
-bool quest_spider_finish_hook(char *fmt)
+bool_ quest_spider_finish_hook(char *fmt)
{
object_type forge, *q_ptr;
s32b q_idx;
@@ -98,7 +98,7 @@ bool quest_spider_finish_hook(char *fmt)
return TRUE;
}
-bool quest_spider_init_hook(int q_idx)
+bool_ quest_spider_init_hook(int q_idx)
{
if ((cquest.status >= QUEST_STATUS_TAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
diff --git a/src/q_thief.c b/src/q_thief.c
index 96d95658..f91b4ec5 100644
--- a/src/q_thief.c
+++ b/src/q_thief.c
@@ -1,12 +1,12 @@
#undef cquest
#define cquest (quest[QUEST_THIEVES])
-bool quest_thieves_gen_hook(char *fmt)
+bool_ quest_thieves_gen_hook(char *fmt)
{
int x, y;
int xstart = 2;
int ystart = 2;
- bool again = TRUE;
+ bool_ again = TRUE;
if (p_ptr->inside_quest != QUEST_THIEVES) return FALSE;
@@ -61,7 +61,7 @@ bool quest_thieves_gen_hook(char *fmt)
return TRUE;
}
-bool quest_thieves_hook(char *fmt)
+bool_ quest_thieves_hook(char *fmt)
{
int i, mcnt = 0;
@@ -113,7 +113,7 @@ bool quest_thieves_hook(char *fmt)
}
return FALSE;
}
-bool quest_thieves_finish_hook(char *fmt)
+bool_ quest_thieves_finish_hook(char *fmt)
{
s32b q_idx;
@@ -146,7 +146,7 @@ bool quest_thieves_finish_hook(char *fmt)
return TRUE;
}
-bool quest_thieves_feeling_hook(char *fmt)
+bool_ quest_thieves_feeling_hook(char *fmt)
{
if (p_ptr->inside_quest != QUEST_THIEVES) return FALSE;
@@ -159,7 +159,7 @@ bool quest_thieves_feeling_hook(char *fmt)
return TRUE;
}
-bool quest_thieves_init_hook(int q_idx)
+bool_ quest_thieves_init_hook(int q_idx)
{
if ((cquest.status >= QUEST_STATUS_UNTAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
diff --git a/src/q_thrain.c b/src/q_thrain.c
index 265ef3e2..0caffe8a 100644
--- a/src/q_thrain.c
+++ b/src/q_thrain.c
@@ -1,7 +1,7 @@
#undef cquest
#define cquest (quest[QUEST_THRAIN])
-bool quest_thrain_death_hook(char *fmt)
+bool_ quest_thrain_death_hook(char *fmt)
{
s32b r_idx, m_idx;
int r, x, y;
@@ -88,7 +88,7 @@ bool quest_thrain_death_hook(char *fmt)
return (FALSE);
}
-bool quest_thrain_gen_hook(char *fmt)
+bool_ quest_thrain_gen_hook(char *fmt)
{
s32b x, y, bx0, by0;
int xstart;
@@ -166,7 +166,7 @@ bool quest_thrain_gen_hook(char *fmt)
return (TRUE);
}
-bool quest_thrain_feeling_hook(char *fmt)
+bool_ quest_thrain_feeling_hook(char *fmt)
{
if (dungeon_type != DUNGEON_DOL_GULDUR) return (FALSE);
if (cquest.data[0] != dun_level) return (FALSE);
@@ -178,7 +178,7 @@ bool quest_thrain_feeling_hook(char *fmt)
return (FALSE);
}
-bool quest_thrain_move_hook(char *fmt)
+bool_ quest_thrain_move_hook(char *fmt)
{
s32b y;
s32b x;
@@ -209,13 +209,13 @@ bool quest_thrain_move_hook(char *fmt)
return (FALSE);
}
-bool quest_thrain_turn_hook(char *fmt)
+bool_ quest_thrain_turn_hook(char *fmt)
{
cquest.data[1] = 0;
cquest.data[2] = 0;
return (FALSE);
}
-bool quest_thrain_init_hook(int q)
+bool_ quest_thrain_init_hook(int q)
{
if (!cquest.data[0])
{
diff --git a/src/q_troll.c b/src/q_troll.c
index d1347ed6..4a193079 100644
--- a/src/q_troll.c
+++ b/src/q_troll.c
@@ -1,7 +1,7 @@
#undef cquest
#define cquest (quest[QUEST_TROLL])
-bool quest_troll_gen_hook(char *fmt)
+bool_ quest_troll_gen_hook(char *fmt)
{
int x, y;
int xstart = 2;
@@ -95,7 +95,7 @@ bool quest_troll_gen_hook(char *fmt)
cquest.data[0] = FALSE;
return TRUE;
}
-bool quest_troll_finish_hook(char *fmt)
+bool_ quest_troll_finish_hook(char *fmt)
{
s32b q_idx;
@@ -115,7 +115,7 @@ bool quest_troll_finish_hook(char *fmt)
return TRUE;
}
-bool quest_troll_death_hook(char *fmt)
+bool_ quest_troll_death_hook(char *fmt)
{
int x, y, xstart = 2, ystart = 2;
s32b r_idx, m_idx;
@@ -170,7 +170,7 @@ bool quest_troll_death_hook(char *fmt)
return FALSE;
}
-bool quest_troll_init_hook(int q_idx)
+bool_ quest_troll_init_hook(int q_idx)
{
if ((cquest.status >= QUEST_STATUS_TAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
diff --git a/src/q_ultrae.c b/src/q_ultrae.c
index d34d8b8f..78471df5 100644
--- a/src/q_ultrae.c
+++ b/src/q_ultrae.c
@@ -5,7 +5,7 @@
#undef cquest
#define cquest (quest[QUEST_ULTRA_EVIL])
-bool quest_ultra_evil_init_hook(int q)
+bool_ quest_ultra_evil_init_hook(int q)
{
return (FALSE);
}
diff --git a/src/q_ultrag.c b/src/q_ultrag.c
index 37d14b0d..12df5efb 100644
--- a/src/q_ultrag.c
+++ b/src/q_ultrag.c
@@ -5,7 +5,7 @@
#undef cquest
#define cquest (quest[QUEST_ULTRA_GOOD])
-bool quest_ultra_good_move_hook(char *fmt)
+bool_ quest_ultra_good_move_hook(char *fmt)
{
s32b y, x;
cave_type *c_ptr;
@@ -16,7 +16,7 @@ bool quest_ultra_good_move_hook(char *fmt)
if (cquest.status == QUEST_STATUS_UNTAKEN)
{
- bool old_quick_messages = quick_messages;
+ bool_ old_quick_messages = quick_messages;
if (quest[QUEST_MORGOTH].status < QUEST_STATUS_FINISHED) return (FALSE);
@@ -77,7 +77,7 @@ bool quest_ultra_good_move_hook(char *fmt)
return FALSE;
}
-bool quest_ultra_good_stair_hook(char *fmt)
+bool_ quest_ultra_good_stair_hook(char *fmt)
{
cptr dir;
@@ -103,7 +103,7 @@ bool quest_ultra_good_stair_hook(char *fmt)
if ((!strcmp(dir, "down")) && (dun_level == 149))
{
int i;
- bool ultimate = FALSE;
+ bool_ ultimate = FALSE;
/* Now look for an ULTIMATE artifact, that is, one imbued with the flame */
for (i = INVEN_WIELD; i < INVEN_TOTAL; i++)
@@ -140,7 +140,7 @@ bool quest_ultra_good_stair_hook(char *fmt)
return FALSE;
}
-bool quest_ultra_good_recall_hook(char *fmt)
+bool_ quest_ultra_good_recall_hook(char *fmt)
{
if ((dungeon_type != DUNGEON_VOID) && (dungeon_type != DUNGEON_NETHER_REALM))
return FALSE;
@@ -149,7 +149,7 @@ bool quest_ultra_good_recall_hook(char *fmt)
return TRUE;
}
-bool quest_ultra_good_death_hook(char *fmt)
+bool_ quest_ultra_good_death_hook(char *fmt)
{
s32b m_idx = get_next_arg(fmt);
@@ -235,7 +235,7 @@ bool quest_ultra_good_death_hook(char *fmt)
}
return (FALSE);
}
-bool quest_ultra_good_dump_hook(char *fmt)
+bool_ quest_ultra_good_dump_hook(char *fmt)
{
if (quest[QUEST_ULTRA_GOOD].status >= QUEST_STATUS_TAKEN)
{
@@ -259,7 +259,7 @@ bool quest_ultra_good_dump_hook(char *fmt)
}
-bool quest_ultra_good_init_hook(int q)
+bool_ quest_ultra_good_init_hook(int q)
{
if ((cquest.status >= QUEST_STATUS_TAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
diff --git a/src/q_wight.c b/src/q_wight.c
index bf5b4868..c7e3d667 100644
--- a/src/q_wight.c
+++ b/src/q_wight.c
@@ -1,7 +1,7 @@
#undef cquest
#define cquest (quest[QUEST_WIGHT])
-bool quest_wight_gen_hook(char *fmt)
+bool_ quest_wight_gen_hook(char *fmt)
{
int x, y;
int xstart = 2;
@@ -103,7 +103,7 @@ bool quest_wight_gen_hook(char *fmt)
return TRUE;
}
-bool quest_wight_death_hook(char *fmt)
+bool_ quest_wight_death_hook(char *fmt)
{
s32b r_idx, m_idx;
@@ -127,7 +127,7 @@ bool quest_wight_death_hook(char *fmt)
return (FALSE);
}
-bool quest_wight_finish_hook(char *fmt)
+bool_ quest_wight_finish_hook(char *fmt)
{
s32b q_idx;
q_idx = get_next_arg(fmt);
@@ -146,7 +146,7 @@ bool quest_wight_finish_hook(char *fmt)
return TRUE;
}
-bool quest_wight_init_hook(int q_idx)
+bool_ quest_wight_init_hook(int q_idx)
{
if ((cquest.status >= QUEST_STATUS_TAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
diff --git a/src/q_wolves.c b/src/q_wolves.c
index 39ef5794..a4537f0e 100644
--- a/src/q_wolves.c
+++ b/src/q_wolves.c
@@ -1,7 +1,7 @@
#undef cquest
#define cquest (quest[QUEST_WOLVES])
-bool quest_wolves_gen_hook(char *fmt)
+bool_ quest_wolves_gen_hook(char *fmt)
{
int x, y, i;
int xstart = 2;
@@ -69,7 +69,7 @@ bool quest_wolves_gen_hook(char *fmt)
return TRUE;
}
-bool quest_wolves_death_hook(char *fmt)
+bool_ quest_wolves_death_hook(char *fmt)
{
int i, mcnt = 0;
@@ -101,7 +101,7 @@ bool quest_wolves_death_hook(char *fmt)
return FALSE;
}
-bool quest_wolves_finish_hook(char *fmt)
+bool_ quest_wolves_finish_hook(char *fmt)
{
s32b q_idx;
@@ -118,7 +118,7 @@ bool quest_wolves_finish_hook(char *fmt)
return TRUE;
}
-bool quest_wolves_init_hook(int q_idx)
+bool_ quest_wolves_init_hook(int q_idx)
{
if ((cquest.status >= QUEST_STATUS_UNTAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
diff --git a/src/randart.c b/src/randart.c
index b44fdd6c..70d350ad 100644
--- a/src/randart.c
+++ b/src/randart.c
@@ -21,11 +21,11 @@
/*
* Attempt to add a power to a randart
*/
-static bool grab_one_power(int *ra_idx, object_type *o_ptr, bool good, s16b *max_times)
+static bool_ grab_one_power(int *ra_idx, object_type *o_ptr, bool_ good, s16b *max_times)
{
int i = 0, j;
int *ok_ra, ok_num = 0;
- bool ret = FALSE;
+ bool_ ret = FALSE;
u32b f1, f2, f3, f4, f5, esp;
C_MAKE(ok_ra, max_ra_idx, int);
@@ -34,7 +34,7 @@ static bool grab_one_power(int *ra_idx, object_type *o_ptr, bool good, s16b *max
for (i = 0; i < max_ra_idx; i++)
{
randart_part_type *ra_ptr = &ra_info[i];
- bool ok = FALSE;
+ bool_ ok = FALSE;
/* Must have the correct fields */
for (j = 0; j < 20; j++)
@@ -255,16 +255,16 @@ void get_random_name(char * return_name)
}
-bool create_artifact(object_type *o_ptr, bool a_scroll, bool get_name)
+bool_ create_artifact(object_type *o_ptr, bool_ a_scroll, bool_ get_name)
{
char new_name[80];
int powers = 0, i;
s32b total_flags, total_power = 0;
- bool a_cursed = FALSE;
+ bool_ a_cursed = FALSE;
u32b f1, f2, f3, f4, f5, esp;
s16b *max_times;
s16b pval = 0;
- bool limit_blows = FALSE;
+ bool_ limit_blows = FALSE;
strcpy(new_name, "");
@@ -401,10 +401,10 @@ bool create_artifact(object_type *o_ptr, bool a_scroll, bool get_name)
}
-bool artifact_scroll(void)
+bool_ artifact_scroll(void)
{
int item;
- bool okay = FALSE;
+ bool_ okay = FALSE;
object_type *o_ptr;
char o_name[80];
diff --git a/src/script.c b/src/script.c
index be4c8fb9..89c9ff3b 100644
--- a/src/script.c
+++ b/src/script.c
@@ -187,7 +187,7 @@ static const struct luaL_reg bitlib[] =
/*
* Initialize lua scripting
*/
-static bool init_lua_done = FALSE;
+static bool_ init_lua_done = FALSE;
void init_lua()
{
/* Hack -- Do not initialize more than once */
@@ -249,7 +249,7 @@ void init_lua_init()
init_corruptions(max);
}
-bool tome_dofile(char *file)
+bool_ tome_dofile(char *file)
{
char buf[1024];
int oldtop = lua_gettop(L);
@@ -279,7 +279,7 @@ bool tome_dofile(char *file)
return (TRUE);
}
-bool tome_dofile_anywhere(cptr dir, char *file, bool test_exist)
+bool_ tome_dofile_anywhere(cptr dir, char *file, bool_ test_exist)
{
char buf[1024];
int oldtop = lua_gettop(L);
@@ -356,7 +356,7 @@ void dump_lua_stack(int min, int max)
cmsg_print(TERM_YELLOW, "END lua_stack");
}
-bool call_lua(cptr function, cptr args, cptr ret, ...)
+bool_ call_lua(cptr function, cptr args, cptr ret, ...)
{
int i = 0, nb = 0, nbr = 0;
int oldtop = lua_gettop(L), size;
@@ -472,7 +472,7 @@ bool call_lua(cptr function, cptr args, cptr ret, ...)
return TRUE;
}
-bool get_lua_var(cptr name, char type, void *arg)
+bool_ get_lua_var(cptr name, char type, void *arg)
{
int oldtop = lua_gettop(L), size;
diff --git a/src/skills.c b/src/skills.c
index 8eb9a9c7..36b4f585 100644
--- a/src/skills.c
+++ b/src/skills.c
@@ -156,7 +156,7 @@ int get_idx(int i)
return (0);
}
-static bool is_known(int s_idx)
+static bool_ is_known(int s_idx)
{
int i;
@@ -181,7 +181,7 @@ static bool is_known(int s_idx)
*
*/
void init_table_aux(int table[MAX_SKILLS][2], int *idx, int father, int lev,
- bool full)
+ bool_ full)
{
int j, i;
@@ -200,14 +200,14 @@ void init_table_aux(int table[MAX_SKILLS][2], int *idx, int father, int lev,
}
-void init_table(int table[MAX_SKILLS][2], int *max, bool full)
+void init_table(int table[MAX_SKILLS][2], int *max, bool_ full)
{
*max = 0;
init_table_aux(table, max, -1, 0, full);
}
-bool has_child(int sel)
+bool_ has_child(int sel)
{
int i;
@@ -337,7 +337,7 @@ void print_skills(int table[MAX_SKILLS][2], int max, int sel, int start)
/*
* Checks various stuff to do when skills change, like new spells, ...
*/
-void recalc_skills(bool init)
+void recalc_skills(bool_ init)
{
static int thaum_level = 0;
@@ -613,7 +613,7 @@ char *melee_names[MAX_MELEE] =
"Barehanded combat",
"Bearform combat",
};
-static bool melee_bool[MAX_MELEE];
+static bool_ melee_bool[MAX_MELEE];
static int melee_num[MAX_MELEE];
s16b get_melee_skill()
@@ -743,7 +743,7 @@ void select_default_melee()
/*
* Print a batch of skills.
*/
-static void print_skill_batch(int *p, cptr *p_desc, int start, int max, bool mode)
+static void print_skill_batch(int *p, cptr *p_desc, int start, int max, bool_ mode)
{
char buff[80];
int i = start, j = 0;
@@ -771,7 +771,7 @@ int do_cmd_activate_skill_aux()
char which;
int max = 0, i, start = 0;
int ret;
- bool mode = FALSE;
+ bool_ mode = FALSE;
int *p;
cptr *p_desc;
@@ -792,7 +792,7 @@ int do_cmd_activate_skill_aux()
if (s_info[i].action_mkey && s_info[i].value && ((!s_info[i].hidden) || (i == SKILL_LEARN)))
{
int j;
- bool next = FALSE;
+ bool_ next = FALSE;
/* Already got it ? */
for (j = 0; j < max; j++)
@@ -815,7 +815,7 @@ int do_cmd_activate_skill_aux()
if (ab_info[i].action_mkey && ab_info[i].acquired)
{
int j;
- bool next = FALSE;
+ bool_ next = FALSE;
/* Already got it ? */
for (j = 0; j < max; j++)
@@ -924,7 +924,7 @@ int do_cmd_activate_skill_aux()
void do_cmd_activate_skill()
{
int x_idx;
- bool push = TRUE;
+ bool_ push = TRUE;
/* Get the skill, if available */
if (repeat_pull(&x_idx))
@@ -1053,7 +1053,7 @@ void do_cmd_activate_skill()
/* Which magic forbids non FA gloves */
-bool forbid_gloves()
+bool_ forbid_gloves()
{
if (get_skill(SKILL_SORCERY)) return (TRUE);
if (get_skill(SKILL_MANA)) return (TRUE);
@@ -1066,7 +1066,7 @@ bool forbid_gloves()
}
/* Which gods forbid edged weapons */
-bool forbid_non_blessed()
+bool_ forbid_non_blessed()
{
GOD(GOD_ERU) return (TRUE);
return (FALSE);
@@ -1151,7 +1151,7 @@ void do_get_new_skill()
char *items[LOST_SWORD_NSKILLS];
int skl[LOST_SWORD_NSKILLS];
s32b val[LOST_SWORD_NSKILLS], mod[LOST_SWORD_NSKILLS];
- bool used[MAX_SKILLS];
+ bool_ used[MAX_SKILLS];
int available_skills[MAX_SKILLS];
int max = 0, max_a = 0, res, i;
@@ -1237,7 +1237,7 @@ void do_get_new_skill()
if (res > -1)
{
skill_type *s_ptr;
- bool oppose = FALSE;
+ bool_ oppose = FALSE;
int oppose_skill = -1;
/* Check we don't oppose an existing skill */
@@ -1326,13 +1326,13 @@ s16b find_ability(cptr name)
/*
* Do the player have the ability
*/
-bool has_ability(int ab)
+bool_ has_ability(int ab)
{
return ab_info[ab].acquired;
}
/* Do we meet the requirements */
-bool can_learn_ability(int ab)
+bool_ can_learn_ability(int ab)
{
ability_type *ab_ptr = &ab_info[ab];
int i;
diff --git a/src/spells1.c b/src/spells1.c
index 387bf379..b1e3500d 100644
--- a/src/spells1.c
+++ b/src/spells1.c
@@ -78,9 +78,9 @@ void teleport_player_directed(int rad, int dir)
int min = rad / 4;
int dis = rad;
int i, d;
- bool look = TRUE;
- bool y_major = FALSE;
- bool x_major = FALSE;
+ bool_ look = TRUE;
+ bool_ y_major = FALSE;
+ bool_ x_major = FALSE;
int y_neg = 1;
int x_neg = 1;
cave_type *c_ptr;
@@ -193,7 +193,7 @@ void teleport_away(int m_idx, int dis)
int ny = 0, nx = 0, oy, ox, d, i, min;
int tries = 0;
- bool look = TRUE;
+ bool_ look = TRUE;
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = race_inf(m_ptr);
@@ -306,7 +306,7 @@ void teleport_to_player(int m_idx)
int ny = 0, nx = 0, oy, ox, d, i, min;
int dis = 2;
- bool look = TRUE;
+ bool_ look = TRUE;
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = race_inf(m_ptr);
@@ -419,7 +419,7 @@ void teleport_to_player(int m_idx)
* Try very hard to move the player at least a quarter that distance.
*/
/* It'd be better if this was made an argument ... */
-bool teleport_player_bypass = FALSE;
+bool_ teleport_player_bypass = FALSE;
void teleport_player(int dis)
{
@@ -428,7 +428,7 @@ void teleport_player(int dis)
int xx = -1, yy = -1;
- bool look = TRUE;
+ bool_ look = TRUE;
if (p_ptr->resist_continuum && (!teleport_player_bypass))
{
@@ -589,7 +589,7 @@ void get_pos_player(int dis, int *ny, int *nx)
int d, i, min, x = 0, y = 0;
int tries = 0;
- bool look = TRUE;
+ bool_ look = TRUE;
if (dis > 200) dis = 200; /* To be on the safe side... */
@@ -1270,8 +1270,8 @@ void take_hit(int damage, cptr hit_from)
object_type *o_ptr = &p_ptr->inventory[INVEN_CARRY];
int old_chp = p_ptr->chp;
- bool pen_invuln = FALSE;
- bool monster_take = FALSE;
+ bool_ pen_invuln = FALSE;
+ bool_ monster_take = FALSE;
char death_message[80];
@@ -1592,7 +1592,7 @@ void take_sanity_hit(int damage, cptr hit_from)
* Does a given class of objects (usually) hate acid?
* Note that acid can either melt or corrode something.
*/
-static bool hates_acid(object_type *o_ptr)
+static bool_ hates_acid(object_type *o_ptr)
{
/* Analyze the type */
switch (o_ptr->tval)
@@ -1647,7 +1647,7 @@ static bool hates_acid(object_type *o_ptr)
/*
* Does a given object (usually) hate electricity?
*/
-static bool hates_elec(object_type *o_ptr)
+static bool_ hates_elec(object_type *o_ptr)
{
switch (o_ptr->tval)
{
@@ -1668,7 +1668,7 @@ static bool hates_elec(object_type *o_ptr)
* Hafted/Polearm weapons have wooden shafts.
* Arrows/Bows are mostly wooden.
*/
-static bool hates_fire(object_type *o_ptr)
+static bool_ hates_fire(object_type *o_ptr)
{
/* Analyze the type */
switch (o_ptr->tval)
@@ -1722,7 +1722,7 @@ static bool hates_fire(object_type *o_ptr)
/*
* Does a given object (usually) hate cold?
*/
-static bool hates_cold(object_type *o_ptr)
+static bool_ hates_cold(object_type *o_ptr)
{
switch (o_ptr->tval)
{
@@ -2101,7 +2101,7 @@ void cold_dam(int dam, cptr kb_str)
* Note that this function (used by stat potions) now restores
* the stat BEFORE increasing it.
*/
-bool inc_stat(int stat)
+bool_ inc_stat(int stat)
{
int value, gain;
@@ -2174,7 +2174,7 @@ bool inc_stat(int stat)
* if your stat is already drained, the "max" value will not drop all
* the way down to the "cur" value.
*/
-bool dec_stat(int stat, int amount, int mode)
+bool_ dec_stat(int stat, int amount, int mode)
{
int cur, max, loss = 0, same, res = FALSE;
@@ -2310,7 +2310,7 @@ bool dec_stat(int stat, int amount, int mode)
/*
* Restore a stat. Return TRUE only if this actually makes a difference.
*/
-bool res_stat(int stat, bool full)
+bool_ res_stat(int stat, bool_ full)
{
/* Fully restore */
if (full)
@@ -2371,7 +2371,7 @@ bool res_stat(int stat, bool full)
*
* Return "TRUE" if the player notices anything
*/
-bool apply_disenchant(int mode)
+bool_ apply_disenchant(int mode)
{
int t = mode;
object_type *o_ptr;
@@ -2981,15 +2981,15 @@ static int project_m_y;
*
* XXX XXX XXX Perhaps we should affect doors?
*/
-static bool project_f(int who, int r, int y, int x, int dam, int typ)
+static bool_ project_f(int who, int r, int y, int x, int dam, int typ)
{
cave_type *c_ptr = &cave[y][x];
- bool obvious = FALSE;
+ bool_ obvious = FALSE;
- bool flag = FALSE;
+ bool_ flag = FALSE;
- bool seen;
+ bool_ seen;
/* XXX XXX XXX */
@@ -3883,20 +3883,20 @@ static int raise_ego[MAX_RAISE] =
*
* We return "TRUE" if the effect of the projection is "obvious".
*/
-static bool project_o(int who, int r, int y, int x, int dam, int typ)
+static bool_ project_o(int who, int r, int y, int x, int dam, int typ)
{
cave_type *c_ptr = &cave[y][x];
s16b this_o_idx, next_o_idx = 0;
- bool obvious = FALSE;
+ bool_ obvious = FALSE;
u32b f1, f2, f3, f4, f5, esp;
char o_name[80];
int o_sval = 0;
- bool is_potion = FALSE;
+ bool_ is_potion = FALSE;
int xx, yy;
@@ -3912,10 +3912,10 @@ static bool project_o(int who, int r, int y, int x, int dam, int typ)
{
object_type * o_ptr;
- bool is_art = FALSE;
- bool ignore = FALSE;
- bool plural = FALSE;
- bool do_kill = FALSE;
+ bool_ is_art = FALSE;
+ bool_ ignore = FALSE;
+ bool_ plural = FALSE;
+ bool_ do_kill = FALSE;
cptr note_kill = NULL;
@@ -4269,7 +4269,7 @@ static bool project_o(int who, int r, int y, int x, int dam, int typ)
}
/* Can the monster be hurt ? */
-bool hurt_monster(monster_type *m_ptr)
+bool_ hurt_monster(monster_type *m_ptr)
{
if (m_ptr->status == MSTATUS_COMPANION) return FALSE;
else return TRUE;
@@ -4328,7 +4328,7 @@ bool hurt_monster(monster_type *m_ptr)
*
* We attempt to return "TRUE" if the player saw anything "useful" happen.
*/
-bool project_m(int who, int r, int y, int x, int dam, int typ)
+bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
int tmp;
@@ -4343,13 +4343,13 @@ bool project_m(int who, int r, int y, int x, int dam, int typ)
cptr name = (r_name + r_ptr->name);
/* Is the monster "seen"? */
- bool seen;
+ bool_ seen;
/* Were the effects "obvious" (if seen)? */
- bool obvious = FALSE;
+ bool_ obvious = FALSE;
/* Were the effects "irrelevant"? */
- bool skipped = FALSE;
+ bool_ skipped = FALSE;
/* Move setting */
@@ -4437,7 +4437,7 @@ bool project_m(int who, int r, int y, int x, int dam, int typ)
if (!who && (is_friend(m_ptr) >= 0))
{
- bool get_angry = FALSE;
+ bool_ get_angry = FALSE;
/* Grrr? */
switch (typ)
{
@@ -5176,7 +5176,7 @@ bool project_m(int who, int r, int y, int x, int dam, int typ)
/* Gravity -- breathers resist */
case GF_GRAVITY:
{
- bool resist_tele = FALSE;
+ bool_ resist_tele = FALSE;
if (seen) obvious = TRUE;
@@ -5661,7 +5661,7 @@ bool project_m(int who, int r, int y, int x, int dam, int typ)
/* Clone monsters (Ignore "dam") */
case GF_OLD_CLONE:
{
- bool is_frien = FALSE;
+ bool_ is_frien = FALSE;
if (seen) obvious = TRUE;
if ((is_friend(m_ptr) > 0) && (randint(3) != 1))
@@ -6314,7 +6314,7 @@ bool project_m(int who, int r, int y, int x, int dam, int typ)
/* Only affect undead */
if (r_ptr->flags3 & (RF3_UNDEAD))
{
- bool resists_tele = FALSE;
+ bool_ resists_tele = FALSE;
if (r_ptr->flags3 & (RF3_RES_TELE))
{
@@ -6360,7 +6360,7 @@ bool project_m(int who, int r, int y, int x, int dam, int typ)
/* Only affect evil */
if (r_ptr->flags3 & (RF3_EVIL))
{
- bool resists_tele = FALSE;
+ bool_ resists_tele = FALSE;
if (r_ptr->flags3 & (RF3_RES_TELE))
{
@@ -6402,7 +6402,7 @@ bool project_m(int who, int r, int y, int x, int dam, int typ)
/* Teleport monster (Use "dam" as "power") */
case GF_AWAY_ALL:
{
- bool resists_tele = FALSE;
+ bool_ resists_tele = FALSE;
if (dungeon_flags2 & DF2_NO_TELEPORT) break; /* No teleport on special levels */
if (r_ptr->flags3 & (RF3_RES_TELE))
@@ -7040,7 +7040,7 @@ bool project_m(int who, int r, int y, int x, int dam, int typ)
/* If another monster did the damage, hurt the monster by hand */
if (who > 0)
{
- bool fear = FALSE;
+ bool_ fear = FALSE;
/* Dead monster */
if (mon_take_hit_mon(who, c_ptr->m_idx, dam, &fear, note_dies))
@@ -7062,7 +7062,7 @@ bool project_m(int who, int r, int y, int x, int dam, int typ)
/* If the player did it, give him experience, check fear */
else if (hurt_monster(m_ptr))
{
- bool fear = FALSE;
+ bool_ fear = FALSE;
/* Hurt the monster, check for fear and death */
if (mon_take_hit(c_ptr->m_idx, dam, &fear, note_dies))
@@ -7124,7 +7124,7 @@ bool project_m(int who, int r, int y, int x, int dam, int typ)
/* Is the spell unsafe for the player ? */
-bool unsafe = FALSE;
+bool_ unsafe = FALSE;
/*
@@ -7146,18 +7146,18 @@ bool unsafe = FALSE;
* We return "TRUE" if any "obvious" effects were observed. XXX XXX Actually,
* we just assume that the effects were obvious, for historical reasons.
*/
-static bool project_p(int who, int r, int y, int x, int dam, int typ, int a_rad)
+static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad)
{
int k = 0, do_move = 0, a = 0, b = 0, x1 = 0, y1 = 0;
/* Hack -- assume obvious */
- bool obvious = TRUE;
+ bool_ obvious = TRUE;
/* Player blind-ness */
- bool blind = (p_ptr->blind ? TRUE : FALSE);
+ bool_ blind = (p_ptr->blind ? TRUE : FALSE);
/* Player needs a "description" (he is blind) */
- bool fuzzy = FALSE;
+ bool_ fuzzy = FALSE;
/* Source monster */
monster_type *m_ptr = NULL;
@@ -8279,7 +8279,7 @@ static bool project_p(int who, int r, int y, int x, int dam, int typ, int a_rad)
* in the blast radius, in case the "illumination" of the grid was changed,
* and "update_view()" and "update_monsters()" need to be called.
*/
-bool project(int who, int rad, int y, int x, int dam, int typ, int flg)
+bool_ project(int who, int rad, int y, int x, int dam, int typ, int flg)
{
int i, t, dist;
@@ -8293,16 +8293,16 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg)
int msec = delay_factor * delay_factor * delay_factor;
/* Assume the player sees nothing */
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Assume the player has seen nothing */
- bool visual = FALSE;
+ bool_ visual = FALSE;
/* Assume the player has seen no blast grids */
- bool drawn = FALSE;
+ bool_ drawn = FALSE;
/* Is the player blind? */
- bool blind = (p_ptr->blind ? TRUE : FALSE);
+ bool_ blind = (p_ptr->blind ? TRUE : FALSE);
/* Number of grids in the "path" */
int path_n = 0;
@@ -8817,13 +8817,13 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg)
* the potion was in her inventory);
* o_ptr --- pointer to the potion object.
*/
-bool potion_smash_effect(int who, int y, int x, int o_sval)
+bool_ potion_smash_effect(int who, int y, int x, int o_sval)
{
int radius = 2;
int dt = 0;
int dam = 0;
- bool ident = FALSE;
- bool angry = FALSE;
+ bool_ ident = FALSE;
+ bool_ angry = FALSE;
switch (o_sval)
{
@@ -9168,9 +9168,9 @@ void generate_spell(int plev)
{
random_spell* rspell;
int dice, sides, chance, mana, power;
- bool destruc_gen = FALSE;
- bool simple_gen = TRUE;
- bool ball_desc = FALSE;
+ bool_ destruc_gen = FALSE;
+ bool_ simple_gen = TRUE;
+ bool_ ball_desc = FALSE;
if (spell_num == MAX_SPELLS) return;
diff --git a/src/spells2.c b/src/spells2.c
index 4455112e..80d55c44 100644
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -91,9 +91,9 @@ void grow_grass(int rad)
/*
* Increase players hit points, notice effects
*/
-bool hp_player(int num)
+bool_ hp_player(int num)
{
- bool dead = p_ptr->chp < 0;
+ bool_ dead = p_ptr->chp < 0;
/* Healing needed */
if (p_ptr->chp < p_ptr->mhp)
@@ -225,9 +225,9 @@ static cptr desc_stat_neg[] =
/*
* Lose a "point"
*/
-bool do_dec_stat(int stat, int mode)
+bool_ do_dec_stat(int stat, int mode)
{
- bool sust = FALSE;
+ bool_ sust = FALSE;
/* Access the "sustain" */
switch (stat)
@@ -281,7 +281,7 @@ bool do_dec_stat(int stat, int mode)
/*
* Restore lost "points" in a stat
*/
-bool do_res_stat(int stat, bool full)
+bool_ do_res_stat(int stat, bool_ full)
{
/* Keep a copy of the current stat, so we can evaluate it if necessary */
int cur_stat = p_ptr->stat_cur[stat];
@@ -311,9 +311,9 @@ bool do_res_stat(int stat, bool full)
/*
* Gain a "point" in a stat
*/
-bool do_inc_stat(int stat)
+bool_ do_inc_stat(int stat)
{
- bool res;
+ bool_ res;
/* Restore strength */
res = res_stat(stat, TRUE);
@@ -427,7 +427,7 @@ static int enchant_table[16] =
1000
};
-bool remove_curse_object(object_type *o_ptr, bool all)
+bool_ remove_curse_object(object_type *o_ptr, bool_ all)
{
u32b f1, f2, f3, f4, f5, esp;
@@ -519,7 +519,7 @@ static int remove_curse_aux(int all)
/*
* Remove most curses
*/
-bool remove_curse(void)
+bool_ remove_curse(void)
{
return (remove_curse_aux(FALSE) ? TRUE : FALSE);
}
@@ -527,7 +527,7 @@ bool remove_curse(void)
/*
* Remove all curses
*/
-bool remove_all_curse(void)
+bool_ remove_all_curse(void)
{
return (remove_curse_aux(TRUE) ? TRUE : FALSE);
}
@@ -537,7 +537,7 @@ bool remove_all_curse(void)
/*
* Restores any drained experience
*/
-bool restore_level(void)
+bool_ restore_level(void)
{
/* Restore experience */
if (p_ptr->exp < p_ptr->max_exp)
@@ -560,12 +560,12 @@ bool restore_level(void)
}
-bool alchemy(void) /* Turns an object into gold, gain some of its value in a shop */
+bool_ alchemy(void) /* Turns an object into gold, gain some of its value in a shop */
{
int item, amt = 1;
int old_number;
long price;
- bool force = FALSE;
+ bool_ force = FALSE;
object_type *o_ptr;
char o_name[80];
char out_val[160];
@@ -1900,7 +1900,7 @@ void report_magics(void)
/*
* Forget everything
*/
-bool lose_all_info(void)
+bool_ lose_all_info(void)
{
int i;
@@ -1950,10 +1950,10 @@ bool lose_all_info(void)
/*
* Detect all traps on current panel
*/
-bool detect_traps(int rad)
+bool_ detect_traps(int rad)
{
int x, y;
- bool detect = FALSE;
+ bool_ detect = FALSE;
cave_type *c_ptr;
@@ -2018,11 +2018,11 @@ bool detect_traps(int rad)
/*
* Detect all doors on current panel
*/
-bool detect_doors(int rad)
+bool_ detect_doors(int rad)
{
int y, x;
- bool detect = FALSE;
+ bool_ detect = FALSE;
cave_type *c_ptr;
@@ -2083,11 +2083,11 @@ bool detect_doors(int rad)
/*
* Detect all stairs on current panel
*/
-bool detect_stairs(int rad)
+bool_ detect_stairs(int rad)
{
int y, x;
- bool detect = FALSE;
+ bool_ detect = FALSE;
cave_type *c_ptr;
@@ -2137,11 +2137,11 @@ bool detect_stairs(int rad)
/*
* Detect any treasure on the current panel
*/
-bool detect_treasure(int rad)
+bool_ detect_treasure(int rad)
{
int y, x;
- bool detect = FALSE;
+ bool_ detect = FALSE;
cave_type *c_ptr;
@@ -2204,12 +2204,12 @@ bool detect_treasure(int rad)
/*
* Detect all "gold" objects on the current panel
*/
-bool hack_no_detect_message = FALSE;
-bool detect_objects_gold(int rad)
+bool_ hack_no_detect_message = FALSE;
+bool_ detect_objects_gold(int rad)
{
int i, y, x;
- bool detect = FALSE;
+ bool_ detect = FALSE;
/* Scan objects */
@@ -2278,11 +2278,11 @@ bool detect_objects_gold(int rad)
/*
* Detect all "normal" objects on the current panel
*/
-bool detect_objects_normal(int rad)
+bool_ detect_objects_normal(int rad)
{
int i, y, x;
- bool detect = FALSE;
+ bool_ detect = FALSE;
/* Scan objects */
@@ -2357,11 +2357,11 @@ bool detect_objects_normal(int rad)
*
* It can probably be argued that this function is now too powerful.
*/
-bool detect_objects_magic(int rad)
+bool_ detect_objects_magic(int rad)
{
int i, y, x, tv;
- bool detect = FALSE;
+ bool_ detect = FALSE;
/* Scan all objects */
@@ -2434,11 +2434,11 @@ bool detect_objects_magic(int rad)
/*
* Detect all "normal" monsters on the current panel
*/
-bool detect_monsters_normal(int rad)
+bool_ detect_monsters_normal(int rad)
{
int i, y, x;
- bool flag = FALSE;
+ bool_ flag = FALSE;
/* Scan monsters */
@@ -2493,10 +2493,10 @@ bool detect_monsters_normal(int rad)
/*
* Detect all "invisible" monsters on current panel
*/
-bool detect_monsters_invis(int rad)
+bool_ detect_monsters_invis(int rad)
{
int i, y, x;
- bool flag = FALSE;
+ bool_ flag = FALSE;
/* Scan monsters */
for (i = 1; i < m_max; i++)
@@ -2560,10 +2560,10 @@ bool detect_monsters_invis(int rad)
/*
* Detect all "evil" monsters on current panel
*/
-bool detect_monsters_evil(int rad)
+bool_ detect_monsters_evil(int rad)
{
int i, y, x;
- bool flag = FALSE;
+ bool_ flag = FALSE;
/* Scan monsters */
@@ -2629,10 +2629,10 @@ bool detect_monsters_evil(int rad)
/*
* Detect all (string) monsters on current panel
*/
-bool detect_monsters_string(cptr chars, int rad)
+bool_ detect_monsters_string(cptr chars, int rad)
{
int i, y, x;
- bool flag = FALSE;
+ bool_ flag = FALSE;
/* Scan monsters */
@@ -2694,10 +2694,10 @@ bool detect_monsters_string(cptr chars, int rad)
/*
* A "generic" detect monsters routine, tagged to flags3
*/
-bool detect_monsters_xxx(u32b match_flag, int rad)
+bool_ detect_monsters_xxx(u32b match_flag, int rad)
{
int i, y, x;
- bool flag = FALSE;
+ bool_ flag = FALSE;
cptr desc_monsters = "weird monsters";
@@ -2773,7 +2773,7 @@ bool detect_monsters_xxx(u32b match_flag, int rad)
}
/* Detect good monsters */
-bool detect_monsters_good(int rad)
+bool_ detect_monsters_good(int rad)
{
return (detect_monsters_xxx(RF3_GOOD, rad));
}
@@ -2782,9 +2782,9 @@ bool detect_monsters_good(int rad)
/*
* Detect everything
*/
-bool detect_all(int rad)
+bool_ detect_all(int rad)
{
- bool detect = FALSE;
+ bool_ detect = FALSE;
/* Detect everything */
if (detect_traps(rad)) detect = TRUE;
@@ -2861,7 +2861,7 @@ void stair_creation(void)
/*
* Hook to specify "weapon"
*/
-static bool item_tester_hook_weapon(object_type *o_ptr)
+static bool_ item_tester_hook_weapon(object_type *o_ptr)
{
switch (o_ptr->tval)
{
@@ -2897,7 +2897,7 @@ static bool item_tester_hook_weapon(object_type *o_ptr)
/*
* Hook to specify "armour"
*/
-bool item_tester_hook_armour(object_type *o_ptr)
+bool_ item_tester_hook_armour(object_type *o_ptr)
{
switch (o_ptr->tval)
{
@@ -2933,7 +2933,7 @@ bool item_tester_hook_armour(object_type *o_ptr)
/*
* Check if an object is weapon or armour (but not arrow, bolt, or shot)
*/
-bool item_tester_hook_weapon_armour(object_type *o_ptr)
+bool_ item_tester_hook_weapon_armour(object_type *o_ptr)
{
return (item_tester_hook_weapon(o_ptr) ||
item_tester_hook_armour(o_ptr));
@@ -2942,7 +2942,7 @@ bool item_tester_hook_weapon_armour(object_type *o_ptr)
/*
* Check if an object is artifactable
*/
-bool item_tester_hook_artifactable(object_type *o_ptr)
+bool_ item_tester_hook_artifactable(object_type *o_ptr)
{
return ((item_tester_hook_weapon(o_ptr) ||
item_tester_hook_armour(o_ptr) ||
@@ -2968,11 +2968,11 @@ bool item_tester_hook_artifactable(object_type *o_ptr)
* Note that this function can now be used on "piles" of items, and
* the larger the pile, the lower the chance of success.
*/
-bool enchant(object_type *o_ptr, int n, int eflag)
+bool_ enchant(object_type *o_ptr, int n, int eflag)
{
int i, chance, prob;
- bool res = FALSE;
- bool a = (artifact_p(o_ptr) || o_ptr->art_name);
+ bool_ res = FALSE;
+ bool_ a = (artifact_p(o_ptr) || o_ptr->art_name);
u32b f1, f2, f3, f4, f5, esp;
@@ -3145,10 +3145,10 @@ bool enchant(object_type *o_ptr, int n, int eflag)
* Note that "num_ac" requires armour, else weapon
* Returns TRUE if attempted, FALSE if cancelled
*/
-bool enchant_spell(int num_hit, int num_dam, int num_ac, int num_pval)
+bool_ enchant_spell(int num_hit, int num_dam, int num_ac, int num_pval)
{
int item;
- bool okay = FALSE;
+ bool_ okay = FALSE;
object_type *o_ptr;
char o_name[80];
cptr q, s;
@@ -3227,7 +3227,7 @@ void curse_artifact(object_type * o_ptr)
* Should be merged with randart code.
* looks like BASIC coder's work...
*/
-void random_plus(object_type * o_ptr, bool is_scroll)
+void random_plus(object_type * o_ptr, bool_ is_scroll)
{
int this_type = (o_ptr->tval < TV_BOOTS ? 23 : 19);
@@ -3449,7 +3449,7 @@ void random_plus(object_type * o_ptr, bool is_scroll)
}
-void random_resistance (object_type * o_ptr, bool is_scroll, int specific)
+void random_resistance (object_type * o_ptr, bool_ is_scroll, int specific)
{
/* To avoid a number of possible bugs */
if (!specific)
@@ -3753,7 +3753,7 @@ void random_resistance (object_type * o_ptr, bool is_scroll, int specific)
}
}
-void random_misc(object_type * o_ptr, bool is_scroll)
+void random_misc(object_type * o_ptr, bool_ is_scroll)
{
if (artifact_bias == BIAS_RANGER)
@@ -3964,7 +3964,7 @@ void random_misc(object_type * o_ptr, bool is_scroll)
}
-void random_slay (object_type * o_ptr, bool is_scroll)
+void random_slay (object_type * o_ptr, bool_ is_scroll)
{
if (artifact_bias == BIAS_CHAOS && !(o_ptr->tval == TV_BOW))
{
@@ -4250,7 +4250,7 @@ void random_slay (object_type * o_ptr, bool is_scroll)
/*
* Determines if an item is not identified
*/
-static bool item_tester_hook_unknown(object_type *o_ptr)
+static bool_ item_tester_hook_unknown(object_type *o_ptr)
{
return (object_known_p(o_ptr) ? FALSE : TRUE);
}
@@ -4261,7 +4261,7 @@ static bool item_tester_hook_unknown(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(void)
{
int item;
@@ -4344,7 +4344,7 @@ bool ident_spell(void)
/*
* Identify all objects in the level
*/
-bool ident_all(void)
+bool_ ident_all(void)
{
int i;
@@ -4383,7 +4383,7 @@ bool ident_all(void)
/*
* Determine if an object is not fully identified
*/
-static bool item_tester_hook_no_mental(object_type *o_ptr)
+static bool_ item_tester_hook_no_mental(object_type *o_ptr)
{
return ((o_ptr->ident & (IDENT_MENTAL)) ? FALSE : TRUE);
}
@@ -4392,7 +4392,7 @@ static bool item_tester_hook_no_mental(object_type *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(void)
{
int item;
object_type *o_ptr;
@@ -4478,7 +4478,7 @@ bool identify_fully(void)
/*
* Hook for "get_item()". Determine if something is rechargable.
*/
-bool item_tester_hook_recharge(object_type *o_ptr)
+bool_ item_tester_hook_recharge(object_type *o_ptr)
{
u32b f1, f2, f3, f4, f5, esp;
@@ -4522,12 +4522,12 @@ bool item_tester_hook_recharge(object_type *o_ptr)
*
* XXX XXX XXX Beware of "sliding index errors".
*/
-bool recharge(int power)
+bool_ recharge(int power)
{
int recharge_strength, recharge_amount;
int item, lev;
- bool fail = FALSE;
+ bool_ fail = FALSE;
byte fail_type = 1;
@@ -4823,11 +4823,11 @@ bool recharge(int power)
*
* Note that affected monsters are NOT auto-tracked by this usage.
*/
-bool project_hack(int typ, int dam)
+bool_ project_hack(int typ, int dam)
{
int i, x, y;
int flg = PROJECT_JUMP | PROJECT_KILL | PROJECT_HIDE;
- bool obvious = FALSE;
+ bool_ obvious = FALSE;
/* Affect all (nearby) monsters */
@@ -4891,7 +4891,7 @@ void project_meteor(int radius, int typ, int dam, u32b flg)
/*
* Speed monsters
*/
-bool speed_monsters(void)
+bool_ speed_monsters(void)
{
return (project_hack(GF_OLD_SPEED, p_ptr->lev));
}
@@ -4899,7 +4899,7 @@ bool speed_monsters(void)
/*
* Slow monsters
*/
-bool slow_monsters(void)
+bool_ slow_monsters(void)
{
return (project_hack(GF_OLD_SLOW, p_ptr->lev));
}
@@ -4907,7 +4907,7 @@ bool slow_monsters(void)
/*
* Paralyzation monsters
*/
-bool conf_monsters(void)
+bool_ conf_monsters(void)
{
return (project_hack(GF_OLD_CONF, p_ptr->lev));
}
@@ -4915,7 +4915,7 @@ bool conf_monsters(void)
/*
* Sleep monsters
*/
-bool sleep_monsters(void)
+bool_ sleep_monsters(void)
{
return (project_hack(GF_OLD_SLEEP, p_ptr->lev));
}
@@ -4923,7 +4923,7 @@ bool sleep_monsters(void)
/*
* Scare monsters
*/
-bool scare_monsters(void)
+bool_ scare_monsters(void)
{
return (project_hack(GF_FEAR, p_ptr->lev));
}
@@ -4932,7 +4932,7 @@ bool scare_monsters(void)
/*
* Banish evil monsters
*/
-bool banish_evil(int dist)
+bool_ banish_evil(int dist)
{
return (project_hack(GF_AWAY_EVIL, dist));
}
@@ -4941,7 +4941,7 @@ bool banish_evil(int dist)
/*
* Turn undead
*/
-bool turn_undead(void)
+bool_ turn_undead(void)
{
return (project_hack(GF_TURN_UNDEAD, p_ptr->lev));
}
@@ -4950,7 +4950,7 @@ bool turn_undead(void)
/*
* Dispel undead monsters
*/
-bool dispel_undead(int dam)
+bool_ dispel_undead(int dam)
{
return (project_hack(GF_DISP_UNDEAD, dam));
}
@@ -4958,7 +4958,7 @@ bool dispel_undead(int dam)
/*
* Dispel evil monsters
*/
-bool dispel_evil(int dam)
+bool_ dispel_evil(int dam)
{
return (project_hack(GF_DISP_EVIL, dam));
}
@@ -4966,7 +4966,7 @@ bool dispel_evil(int dam)
/*
* Dispel good monsters
*/
-bool dispel_good(int dam)
+bool_ dispel_good(int dam)
{
return (project_hack(GF_DISP_GOOD, dam));
}
@@ -4974,7 +4974,7 @@ bool dispel_good(int dam)
/*
* Dispel all monsters
*/
-bool dispel_monsters(int dam)
+bool_ dispel_monsters(int dam)
{
return (project_hack(GF_DISP_ALL, dam));
}
@@ -4982,7 +4982,7 @@ bool dispel_monsters(int dam)
/*
* Dispel 'living' monsters
*/
-bool dispel_living(int dam)
+bool_ dispel_living(int dam)
{
return (project_hack(GF_DISP_LIVING, dam));
}
@@ -4990,7 +4990,7 @@ bool dispel_living(int dam)
/*
* Dispel demons
*/
-bool dispel_demons(int dam)
+bool_ dispel_demons(int dam)
{
return (project_hack(GF_DISP_DEMON, dam));
}
@@ -5002,8 +5002,8 @@ bool dispel_demons(int dam)
void aggravate_monsters(int who)
{
int i;
- bool sleep = FALSE;
- bool speed = FALSE;
+ bool_ sleep = FALSE;
+ bool_ speed = FALSE;
/* Aggravate everyone nearby */
@@ -5060,7 +5060,7 @@ void aggravate_monsters(int who)
/*
* Generic genocide race selection
*/
-bool get_genocide_race(cptr msg, char *typ)
+bool_ get_genocide_race(cptr msg, char *typ)
{
int i, j;
cave_type *c_ptr;
@@ -5086,11 +5086,11 @@ bool get_genocide_race(cptr msg, char *typ)
/*
* Inflict dam damage of type typee to all monster of the given race
*/
-bool invoke(int dam, int typee)
+bool_ invoke(int dam, int typee)
{
int i;
char typ;
- bool result = FALSE;
+ bool_ result = FALSE;
int msec = delay_factor * delay_factor * delay_factor;
if (dungeon_flags2 & DF2_NO_GENO) return (FALSE);
@@ -5151,10 +5151,10 @@ bool invoke(int dam, int typee)
/*
* Delete all non-unique/non-quest monsters of a given "type" from the level
*/
-bool genocide_aux(bool player_cast, char typ)
+bool_ genocide_aux(bool_ player_cast, char typ)
{
int i;
- bool result = FALSE;
+ bool_ result = FALSE;
int msec = delay_factor * delay_factor * delay_factor;
int dam = 0;
@@ -5244,7 +5244,7 @@ bool genocide_aux(bool player_cast, char typ)
return (result);
}
-bool genocide(bool player_cast)
+bool_ genocide(bool_ player_cast)
{
char typ;
@@ -5267,10 +5267,10 @@ bool genocide(bool player_cast)
/*
* Delete all nearby (non-unique) monsters
*/
-bool mass_genocide(bool player_cast)
+bool_ mass_genocide(bool_ player_cast)
{
int i;
- bool result = FALSE;
+ bool_ result = FALSE;
int msec = delay_factor * delay_factor * delay_factor;
int dam = 0;
@@ -5410,11 +5410,11 @@ void do_probe(int m_idx)
/*
* Probe nearby monsters
*/
-bool probing(void)
+bool_ probing(void)
{
int i;
- bool probe = FALSE;
+ bool_ probe = FALSE;
/* Probe all (nearby) monsters */
@@ -5462,7 +5462,7 @@ void wipe(int y1, int x1, int r)
cave_type *c_ptr;
- bool flag = FALSE;
+ bool_ flag = FALSE;
if (dungeon_flags2 & DF2_NO_GENO)
{
@@ -5544,13 +5544,13 @@ void wipe(int y1, int x1, int r)
* Later we may use one function for both "destruction" and
* "earthquake" by using the "full" to select "destruction".
*/
-void destroy_area(int y1, int x1, int r, bool full, bool bypass)
+void destroy_area(int y1, int x1, int r, bool_ full, bool_ bypass)
{
int y, x, k, t;
cave_type *c_ptr;
- bool flag = FALSE;
+ bool_ flag = FALSE;
/* XXX XXX */
@@ -5704,9 +5704,9 @@ void earthquake(int cy, int cx, int r)
int i, t, y, x, yy, xx, dy, dx, oy, ox;
int damage = 0;
int sn = 0, sy = 0, sx = 0;
- bool hurt = FALSE;
+ bool_ hurt = FALSE;
cave_type *c_ptr;
- bool map[32][32];
+ bool_ map[32][32];
if (p_ptr->inside_quest)
{
@@ -6022,7 +6022,7 @@ void earthquake(int cy, int cx, int r)
/* Destroy location (if valid) */
if (cave_valid_bold(yy, xx))
{
- bool floor = cave_floor_bold(yy, xx);
+ bool_ floor = cave_floor_bold(yy, xx);
/* Delete objects */
delete_object(yy, xx);
@@ -6350,7 +6350,7 @@ void unlite_room(int y1, int x1)
* Hack -- call light around the player
* Affect all monsters in the projection radius
*/
-bool lite_area(int dam, int rad)
+bool_ lite_area(int dam, int rad)
{
int flg = PROJECT_GRID | PROJECT_KILL;
@@ -6375,7 +6375,7 @@ bool lite_area(int dam, int rad)
* Hack -- call darkness around the player
* Affect all monsters in the projection radius
*/
-bool unlite_area(int dam, int rad)
+bool_ unlite_area(int dam, int rad)
{
int flg = PROJECT_GRID | PROJECT_KILL;
@@ -6402,7 +6402,7 @@ bool unlite_area(int dam, int rad)
* Allow "target" mode to pass over monsters
* Affect grids, objects, and monsters
*/
-bool fire_ball(int typ, int dir, int dam, int rad)
+bool_ fire_ball(int typ, int dir, int dam, int rad)
{
int tx, ty;
@@ -6430,7 +6430,7 @@ bool fire_ball(int typ, int dir, int dam, int rad)
* Allow "target" mode to pass over monsters
* Affect grids, objects, and monsters
*/
-bool fire_cloud(int typ, int dir, int dam, int rad, int time)
+bool_ fire_cloud(int typ, int dir, int dam, int rad, int time)
{
int tx, ty;
@@ -6459,7 +6459,7 @@ bool fire_cloud(int typ, int dir, int dam, int rad, int time)
* Allow "target" mode to pass over monsters
* Affect grids, objects, and monsters
*/
-bool fire_wave(int typ, int dir, int dam, int rad, int time, s32b eff)
+bool_ fire_wave(int typ, int dir, int dam, int rad, int time, s32b eff)
{
project_time_effect = eff;
return (fire_cloud(typ, dir, dam, rad, time));
@@ -6470,7 +6470,7 @@ bool fire_wave(int typ, int dir, int dam, int rad, int time, s32b eff)
* Pass through monsters, as a "beam"
* Affect monsters (not grids or objects)
*/
-bool fire_wall(int typ, int dir, int dam, int time)
+bool_ fire_wall(int typ, int dir, int dam, int time)
{
int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_STAY | PROJECT_GRID;
project_time = time;
@@ -6483,7 +6483,7 @@ bool fire_wall(int typ, int dir, int dam, int time)
* Allow "target" mode to pass over monsters
* Affect grids, objects, and monsters
*/
-bool fire_druid_ball(int typ, int dir, int dam, int rad)
+bool_ fire_druid_ball(int typ, int dir, int dam, int rad)
{
int tx, ty;
@@ -6512,7 +6512,7 @@ bool fire_druid_ball(int typ, int dir, int dam, int rad)
* Allow "target" mode to pass over monsters
* Affect grids, objects, and monsters
*/
-bool fire_ball_beam(int typ, int dir, int dam, int rad)
+bool_ fire_ball_beam(int typ, int dir, int dam, int rad)
{
int tx, ty;
@@ -6749,7 +6749,7 @@ void swap_position(int lty, int ltx)
/*
* Hack -- apply a "projection()" in a direction (or at the target)
*/
-bool project_hook(int typ, int dir, int dam, int flg)
+bool_ project_hook(int typ, int dir, int dam, int flg)
{
int tx, ty;
@@ -6777,7 +6777,7 @@ bool project_hook(int typ, int dir, int dam, int flg)
* Stop if we hit a monster, as a "bolt"
* Affect monsters (not grids or objects)
*/
-bool fire_bolt(int typ, int dir, int dam)
+bool_ fire_bolt(int typ, int dir, int dam)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(typ, dir, dam, flg));
@@ -6788,7 +6788,7 @@ bool fire_bolt(int typ, int dir, int dam)
* Stop if we hit a monster, as a "bolt"
* Affect monsters (not grids or objects)
*/
-bool fire_druid_bolt(int typ, int dir, int dam)
+bool_ fire_druid_bolt(int typ, int dir, int dam)
{
int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_MANA_PATH;
return (project_hook(typ, dir, dam, flg));
@@ -6800,7 +6800,7 @@ bool fire_druid_bolt(int typ, int dir, int dam)
* Pass through monsters, as a "beam"
* Affect monsters (not grids or objects)
*/
-bool fire_druid_beam(int typ, int dir, int dam)
+bool_ fire_druid_beam(int typ, int dir, int dam)
{
int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_MANA_PATH;
return (project_hook(typ, dir, dam, flg));
@@ -6811,7 +6811,7 @@ bool fire_druid_beam(int typ, int dir, int dam)
* Pass through monsters, as a "beam"
* Affect monsters (not grids or objects)
*/
-bool fire_beam(int typ, int dir, int dam)
+bool_ fire_beam(int typ, int dir, int dam)
{
int flg = PROJECT_BEAM | PROJECT_KILL;
return (project_hook(typ, dir, dam, flg));
@@ -6821,7 +6821,7 @@ bool fire_beam(int typ, int dir, int dam)
/*
* Cast a bolt spell, or rarely, a beam spell
*/
-bool fire_bolt_or_beam(int prob, int typ, int dir, int dam)
+bool_ fire_bolt_or_beam(int prob, int typ, int dir, int dam)
{
if (rand_int(100) < prob)
{
@@ -6833,14 +6833,14 @@ bool fire_bolt_or_beam(int prob, int typ, int dir, int dam)
}
}
-bool fire_godly_wrath(int y, int x, int typ, int rad, int dam)
+bool_ fire_godly_wrath(int y, int x, int typ, int rad, int dam)
{
int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
return (project(0, rad, y, x, dam, typ, flg));
}
-bool fire_explosion(int y, int x, int typ, int rad, int dam)
+bool_ fire_explosion(int y, int x, int typ, int rad, int dam)
{
int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
@@ -6850,126 +6850,126 @@ bool fire_explosion(int y, int x, int typ, int rad, int dam)
/*
* Some of the old functions
*/
-bool lite_line(int dir)
+bool_ lite_line(int dir)
{
int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
return (project_hook(GF_LITE_WEAK, dir, damroll(6, 8), flg));
}
-bool drain_life(int dir, int dam)
+bool_ drain_life(int dir, int dam)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_DRAIN, dir, dam, flg));
}
-bool wall_to_mud(int dir)
+bool_ wall_to_mud(int dir)
{
int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
return (project_hook(GF_KILL_WALL, dir, 20 + randint(30), flg));
}
-bool wizard_lock(int dir)
+bool_ wizard_lock(int dir)
{
int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
return (project_hook(GF_JAM_DOOR, dir, 20 + randint(30), flg));
}
-bool destroy_door(int dir)
+bool_ destroy_door(int dir)
{
int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
return (project_hook(GF_KILL_DOOR, dir, 0, flg));
}
-bool disarm_trap(int dir)
+bool_ disarm_trap(int dir)
{
int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
return (project_hook(GF_KILL_TRAP, dir, 0, flg));
}
-bool heal_monster(int dir)
+bool_ heal_monster(int dir)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_HEAL, dir, damroll(4, 6), flg));
}
-bool speed_monster(int dir)
+bool_ speed_monster(int dir)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_SPEED, dir, p_ptr->lev, flg));
}
-bool slow_monster(int dir)
+bool_ slow_monster(int dir)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_SLOW, dir, p_ptr->lev, flg));
}
-bool sleep_monster(int dir)
+bool_ sleep_monster(int dir)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_SLEEP, dir, p_ptr->lev, flg));
}
-bool stasis_monster(int dir)
+bool_ stasis_monster(int dir)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_STASIS, dir, p_ptr->lev, flg));
}
-bool confuse_monster(int dir, int plev)
+bool_ confuse_monster(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_CONF, dir, plev, flg));
}
-bool stun_monster(int dir, int plev)
+bool_ stun_monster(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_STUN, dir, plev, flg));
}
-bool poly_monster(int dir)
+bool_ poly_monster(int dir)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_POLY, dir, p_ptr->lev, flg));
}
-bool clone_monster(int dir)
+bool_ clone_monster(int dir)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_CLONE, dir, 0, flg));
}
-bool fear_monster(int dir, int plev)
+bool_ fear_monster(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_TURN_ALL, dir, plev, flg));
}
-bool death_ray(int dir, int plev)
+bool_ death_ray(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_DEATH_RAY, dir, plev, flg));
}
-bool teleport_monster(int dir)
+bool_ teleport_monster(int dir)
{
int flg = PROJECT_BEAM | PROJECT_KILL;
@@ -6986,34 +6986,34 @@ bool teleport_monster(int dir)
/*
* Hooks -- affect adjacent grids (radius 1 ball attack)
*/
-bool door_creation(void)
+bool_ door_creation(void)
{
int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return (project(0, 1, p_ptr->py, p_ptr->px, 0, GF_MAKE_DOOR, flg));
}
-bool trap_creation(void)
+bool_ trap_creation(void)
{
int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return (project(0, 1, p_ptr->py, p_ptr->px, 0, GF_MAKE_TRAP, flg));
}
-bool glyph_creation(void)
+bool_ glyph_creation(void)
{
int flg = PROJECT_GRID | PROJECT_ITEM;
return (project(0, 1, p_ptr->py, p_ptr->px, 0, GF_MAKE_GLYPH, flg));
}
-bool wall_stone(int y, int x)
+bool_ wall_stone(int y, int x)
{
cave_type *c_ptr = &cave[y][x];
int flg = PROJECT_GRID | PROJECT_ITEM;
int featflags = f_info[c_ptr->feat].flags1;
- bool dummy = (project(0, 1, y, x, 0, GF_STONE_WALL, flg));
+ bool_ dummy = (project(0, 1, y, x, 0, GF_STONE_WALL, flg));
if (!(featflags & FF1_PERMANENT) && !(featflags & FF1_WALL))
cave_set_feat(y, x, FEAT_FLOOR);
@@ -7034,19 +7034,19 @@ bool wall_stone(int y, int x)
}
-bool destroy_doors_touch(void)
+bool_ destroy_doors_touch(void)
{
int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return (project(0, 1, p_ptr->py, p_ptr->px, 0, GF_KILL_DOOR, flg));
}
-bool destroy_traps_touch(void)
+bool_ destroy_traps_touch(void)
{
int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return (project(0, 1, p_ptr->py, p_ptr->px, 0, GF_KILL_TRAP, flg));
}
-bool sleep_monsters_touch(void)
+bool_ sleep_monsters_touch(void)
{
int flg = PROJECT_KILL | PROJECT_HIDE;
return (project(0, 1, p_ptr->py, p_ptr->px, p_ptr->lev, GF_OLD_SLEEP, flg));
@@ -7057,7 +7057,7 @@ void call_chaos(void)
{
int Chaos_type, dummy, dir;
int plev = p_ptr->lev;
- bool line_chaos = FALSE;
+ bool_ line_chaos = FALSE;
int hurt_types[30] =
{
@@ -7110,7 +7110,7 @@ void call_chaos(void)
void activate_ty_curse(void)
{
int i = 0;
- bool stop_ty = FALSE;
+ bool_ stop_ty = FALSE;
do
{
@@ -7189,7 +7189,7 @@ case 21: case 22: case 23:
void activate_dg_curse(void)
{
int i = 0;
- bool stop_dg = FALSE;
+ bool_ stop_dg = FALSE;
do
{
@@ -7507,7 +7507,7 @@ void bless_weapon(void)
}
else
{
- bool dis_happened = FALSE;
+ bool_ dis_happened = FALSE;
msg_print("The artifact resists your blessing!");
@@ -7558,10 +7558,10 @@ void bless_weapon(void)
/*
* Detect all "nonliving", "undead" or "demonic" monsters on current panel
*/
-bool detect_monsters_nonliving(int rad)
+bool_ detect_monsters_nonliving(int rad)
{
int i, y, x;
- bool flag = FALSE;
+ bool_ flag = FALSE;
/* Scan monsters */
for (i = 1; i < m_max; i++)
@@ -7623,7 +7623,7 @@ bool detect_monsters_nonliving(int rad)
/*
* Confuse monsters
*/
-bool confuse_monsters(int dam)
+bool_ confuse_monsters(int dam)
{
return (project_hack(GF_OLD_CONF, dam));
}
@@ -7632,7 +7632,7 @@ bool confuse_monsters(int dam)
/*
* Charm monsters
*/
-bool charm_monsters(int dam)
+bool_ charm_monsters(int dam)
{
return (project_hack(GF_CHARM, dam));
}
@@ -7641,7 +7641,7 @@ bool charm_monsters(int dam)
/*
* Charm animals
*/
-bool charm_animals(int dam)
+bool_ charm_animals(int dam)
{
return (project_hack(GF_CONTROL_ANIMAL, dam));
}
@@ -7649,7 +7649,7 @@ bool charm_animals(int dam)
/*
* Charm demons
*/
-bool charm_demons(int dam)
+bool_ charm_demons(int dam)
{
return (project_hack(GF_CONTROL_DEMON, dam));
}
@@ -7658,7 +7658,7 @@ bool charm_demons(int dam)
/*
* Stun monsters
*/
-bool stun_monsters(int dam)
+bool_ stun_monsters(int dam)
{
return (project_hack(GF_STUN, dam));
}
@@ -7667,7 +7667,7 @@ bool stun_monsters(int dam)
/*
* Stasis monsters
*/
-bool stasis_monsters(int dam)
+bool_ stasis_monsters(int dam)
{
return (project_hack(GF_STASIS, dam));
}
@@ -7676,7 +7676,7 @@ bool stasis_monsters(int dam)
/*
* Mindblast monsters
*/
-bool mindblast_monsters(int dam)
+bool_ mindblast_monsters(int dam)
{
return (project_hack(GF_PSI, dam));
}
@@ -7685,7 +7685,7 @@ bool mindblast_monsters(int dam)
/*
* Banish all monsters
*/
-bool banish_monsters(int dist)
+bool_ banish_monsters(int dist)
{
return (project_hack(GF_AWAY_ALL, dist));
}
@@ -7694,7 +7694,7 @@ bool banish_monsters(int dist)
/*
* Turn evil
*/
-bool turn_evil(int dam)
+bool_ turn_evil(int dam)
{
return (project_hack(GF_TURN_EVIL, dam));
}
@@ -7703,7 +7703,7 @@ bool turn_evil(int dam)
/*
* Turn everyone
*/
-bool turn_monsters(int dam)
+bool_ turn_monsters(int dam)
{
return (project_hack(GF_TURN_ALL, dam));
}
@@ -7712,33 +7712,33 @@ bool turn_monsters(int dam)
/*
* Death-ray all monsters (note: OBSCENELY powerful)
*/
-bool deathray_monsters(void)
+bool_ deathray_monsters(void)
{
return (project_hack(GF_DEATH_RAY, p_ptr->lev));
}
-bool charm_monster(int dir, int plev)
+bool_ charm_monster(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_CHARM, dir, plev, flg));
}
-bool star_charm_monster(int dir, int plev)
+bool_ star_charm_monster(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_STAR_CHARM, dir, plev, flg));
}
-bool control_one_undead(int dir, int plev)
+bool_ control_one_undead(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_CONTROL_UNDEAD, dir, plev, flg));
}
-bool charm_animal(int dir, int plev)
+bool_ charm_animal(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_CONTROL_ANIMAL, dir, plev, flg));
@@ -7789,7 +7789,7 @@ void alter_reality(void)
}
/* Heal insanity. */
-bool heal_insanity(int val)
+bool_ heal_insanity(int val)
{
if (p_ptr->csane < p_ptr->msane)
{
@@ -7831,11 +7831,11 @@ bool heal_insanity(int val)
* Send the player shooting through walls in the given direction until
* they reach a non-wall space, or a monster, or a permanent wall.
*/
-bool passwall(int dir, bool safe)
+bool_ passwall(int dir, bool_ safe)
{
int x = p_ptr->px, y = p_ptr->py, ox = p_ptr->px, oy = p_ptr->py, lx = p_ptr->px, ly = p_ptr->py;
cave_type *c_ptr;
- bool ok = FALSE;
+ bool_ ok = FALSE;
if (p_ptr->wild_mode) return FALSE;
if (p_ptr->inside_quest) return FALSE;
@@ -7925,7 +7925,7 @@ bool passwall(int dir, bool safe)
/*
* Print a batch of dungeons.
*/
-static void print_dungeon_batch(int *p, int start, int max, bool mode)
+static void print_dungeon_batch(int *p, int start, int max, bool_ mode)
{
char buf[80];
int i, j;
@@ -7963,7 +7963,7 @@ int reset_recall_aux()
int *p;
int max = 0, i, start = 0;
int ret;
- bool mode = FALSE;
+ bool_ mode = FALSE;
C_MAKE(p, max_d_idx, int);
@@ -8087,7 +8087,7 @@ int reset_recall_aux()
return ret;
}
-bool reset_recall(bool no_trepas_max_depth)
+bool_ reset_recall(bool_ no_trepas_max_depth)
{
int dun, depth, max;
diff --git a/src/squeltch.c b/src/squeltch.c
index 72a84f45..603eaa0e 100644
--- a/src/squeltch.c
+++ b/src/squeltch.c
@@ -73,7 +73,7 @@ void squeltch_inventory(void)
int oldtop;
int i;
int num_iter = 0;
- bool found = TRUE;
+ bool_ found = TRUE;
if (!automatizer_enabled) return;
@@ -507,11 +507,11 @@ void do_cmd_automatizer()
}
/* Add a new rule in an easy way */
-bool automatizer_create = FALSE;
-void automatizer_add_rule(object_type *o_ptr, bool destroy)
+bool_ automatizer_create = FALSE;
+void automatizer_add_rule(object_type *o_ptr, bool_ destroy)
{
char ch;
- bool do_status = FALSE;
+ bool_ do_status = FALSE;
cptr type = "destroy";
if (!destroy)
diff --git a/src/status.c b/src/status.c
index 37b683c5..967a8323 100644
--- a/src/status.c
+++ b/src/status.c
@@ -95,7 +95,7 @@ void status_move(void)
Term_fresh();
while (1)
{
- bool loop_exit = FALSE;
+ bool_ loop_exit = FALSE;
char c;
c = inkey();
switch (c)
@@ -146,7 +146,7 @@ void status_sight(void)
Term_fresh();
while (1)
{
- bool loop_exit = FALSE;
+ bool_ loop_exit = FALSE;
char c;
c = inkey();
switch (c)
@@ -198,7 +198,7 @@ void status_item(void)
Term_fresh();
while (1)
{
- bool loop_exit = FALSE;
+ bool_ loop_exit = FALSE;
char c;
c = inkey();
switch (c)
@@ -257,7 +257,7 @@ void status_combat(void)
Term_fresh();
while (1)
{
- bool loop_exit = FALSE;
+ bool_ loop_exit = FALSE;
char c;
c = inkey();
switch (c)
@@ -304,7 +304,7 @@ void status_curses(void)
Term_fresh();
while (1)
{
- bool loop_exit = FALSE;
+ bool_ loop_exit = FALSE;
char c;
c = inkey();
@@ -355,7 +355,7 @@ void status_res(void)
Term_fresh();
while (1)
{
- bool loop_exit = FALSE;
+ bool_ loop_exit = FALSE;
char c;
c = inkey();
diff --git a/src/store.c b/src/store.c
index 0f4fc491..9e9a77a6 100644
--- a/src/store.c
+++ b/src/store.c
@@ -362,7 +362,7 @@ static owner_type *ot_ptr = NULL;
* to adjust (by 200) to extract a usable multiplier. Note that the
* "greed" value is always something (?).
*/
-static s32b price_item(object_type *o_ptr, int greed, bool flip)
+static s32b price_item(object_type *o_ptr, int greed, bool_ flip)
{
int factor;
int adjust;
@@ -592,7 +592,7 @@ static void mass_produce(object_type *o_ptr)
*
* See "object_similar()" for the same function for the "player"
*/
-static bool store_object_similar(object_type *o_ptr, object_type *j_ptr)
+static bool_ store_object_similar(object_type *o_ptr, object_type *j_ptr)
{
/* Hack -- Identical items cannot be stacked */
if (o_ptr == j_ptr) return (0);
@@ -683,7 +683,7 @@ static void store_object_absorb(object_type *o_ptr, object_type *j_ptr)
* Note that the shop, just like a player, will not accept things
* it cannot hold. Before, one could "nuke" potions this way.
*/
-static bool store_check_num(object_type *o_ptr)
+static bool_ store_check_num(object_type *o_ptr)
{
int i;
object_type *j_ptr;
@@ -725,7 +725,7 @@ static bool store_check_num(object_type *o_ptr)
}
-bool is_blessed(object_type *o_ptr)
+bool_ is_blessed(object_type *o_ptr)
{
u32b f1, f2, f3, f4, f5, esp;
object_flags_known(o_ptr, &f1, &f2, &f3, &f4, &f5, &esp);
@@ -740,7 +740,7 @@ bool is_blessed(object_type *o_ptr)
*
* Note that a shop-keeper must refuse to buy "worthless" items
*/
-static bool store_will_buy(object_type *o_ptr)
+static bool_ store_will_buy(object_type *o_ptr)
{
/* Hack -- The Home is simple */
if (cur_store_num == 7) return (TRUE);
@@ -1021,7 +1021,7 @@ static void store_item_optimize(int item)
* Crap is defined as any item that is "available" elsewhere
* Based on a suggestion by "Lee Vogt" <lvogt@cig.mcel.mot.com>
*/
-static bool black_market_crap(object_type *o_ptr)
+static bool_ black_market_crap(object_type *o_ptr)
{
int i, j;
@@ -1111,7 +1111,7 @@ static int store_tval = 0, store_level = 0;
/*
* Hack -- determine if a template is "good"
*/
-static bool kind_is_storeok(int k_idx)
+static bool_ kind_is_storeok(int k_idx)
{
object_kind *k_ptr = &k_info[k_idx];
@@ -1145,7 +1145,7 @@ static void store_create(void)
object_type forge;
object_type *q_ptr = NULL;
- bool obj_all_done = FALSE;
+ bool_ obj_all_done = FALSE;
/* Paranoia -- no room left */
@@ -1331,7 +1331,7 @@ static void store_create(void)
/*
* Eliminate need to bargain if player has haggled well in the past
*/
-static bool noneedtobargain(s32b minprice)
+static bool_ noneedtobargain(s32b minprice)
{
s32b good = st_ptr->good_buy;
s32b bad = st_ptr->bad_buy;
@@ -1782,7 +1782,7 @@ static int haggle_insults(void)
/*
* Mega-Hack -- Enable "increments"
*/
-static bool allow_inc = FALSE;
+static bool_ allow_inc = FALSE;
/*
* Mega-Hack -- Last "increment" during haggling
@@ -1911,7 +1911,7 @@ static int get_haggle(cptr pmt, s32b *poffer, s32b price, int final)
*
* Return TRUE if offer is NOT okay
*/
-static bool receive_offer(cptr pmt, s32b *poffer,
+static bool_ receive_offer(cptr pmt, s32b *poffer,
s32b last_offer, int factor,
s32b price, int final)
{
@@ -1941,7 +1941,7 @@ static bool receive_offer(cptr pmt, s32b *poffer,
*
* Return TRUE if purchase is NOT successful
*/
-static bool purchase_haggle(object_type *o_ptr, s32b *price)
+static bool_ purchase_haggle(object_type *o_ptr, s32b *price)
{
s32b cur_ask, final_ask;
s32b last_offer, offer;
@@ -1950,7 +1950,7 @@ static bool purchase_haggle(object_type *o_ptr, s32b *price)
int flag, loop_flag, noneed;
int annoyed = 0, final = FALSE;
- bool cancel = FALSE;
+ bool_ cancel = FALSE;
cptr pmt = "Asking";
@@ -2121,7 +2121,7 @@ static bool purchase_haggle(object_type *o_ptr, s32b *price)
*
* Return TRUE if purchase is NOT successful
*/
-static bool sell_haggle(object_type *o_ptr, s32b *price)
+static bool_ sell_haggle(object_type *o_ptr, s32b *price)
{
s32b purse, cur_ask, final_ask;
s32b last_offer = 0, offer = 0;
@@ -2131,7 +2131,7 @@ static bool sell_haggle(object_type *o_ptr, s32b *price)
int flag, loop_flag, noneed;
int annoyed = 0, final = FALSE;
- bool cancel = FALSE;
+ bool_ cancel = FALSE;
cptr pmt = "Offer";
@@ -2315,7 +2315,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(void)
{
store_info_type *sti_ptr = &st_info[town_info[p_ptr->town_num].store[cur_store_num].st_idx];
@@ -2943,7 +2943,7 @@ void store_sell(void)
u32b f1, f2, f3, f4, f5, esp;
- bool museum = (st_info[st_ptr->st_idx].flags1 & SF1_MUSEUM) ? TRUE : FALSE;
+ bool_ museum = (st_info[st_ptr->st_idx].flags1 & SF1_MUSEUM) ? TRUE : FALSE;
/* Prepare a prompt */
if (cur_store_num == 7) q = "Drop which item? ";
@@ -3337,7 +3337,7 @@ void store_examine(void)
/*
* Hack -- set this to leave the store
*/
-static bool leave_store = FALSE;
+static bool_ leave_store = FALSE;
/*
@@ -3348,12 +3348,12 @@ static bool leave_store = FALSE;
* 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(void)
{
- bool validcmd = FALSE;
+ bool_ validcmd = FALSE;
int i;
store_action_type *ba_ptr;
- bool recreate = FALSE;
+ bool_ recreate = FALSE;
/* Handle repeating the last command */
repeat_check();
@@ -3689,7 +3689,7 @@ void do_cmd_store(void)
int maintain_num;
int tmp_chr;
int i;
- bool recreate = FALSE;
+ bool_ recreate = FALSE;
cave_type *c_ptr;
diff --git a/src/tables.c b/src/tables.c
index c4bb1930..f5aac276 100644
--- a/src/tables.c
+++ b/src/tables.c
@@ -4589,7 +4589,7 @@ tval_desc tval_descs[] =
/*
* List of the between exits
* s16b corresp; Corresponding between gate
- * bool dungeon; Do we exit in a dungeon or in the wild ?
+ * bool_ dungeon; Do we exit in a dungeon or in the wild ?
*
* s16b wild_x, wild_y; Wilderness spot to land onto
* s16b p_ptr->px, p_ptr->py; Location of the map
diff --git a/src/traps.c b/src/traps.c
index bbc5b5c3..fab204c8 100644
--- a/src/traps.c
+++ b/src/traps.c
@@ -13,7 +13,7 @@
#include "angband.h"
-bool do_player_trap_call_out(void)
+bool_ do_player_trap_call_out(void)
{
s16b i, sn, cx, cy;
s16b h_index = 0;
@@ -21,7 +21,7 @@ bool do_player_trap_call_out(void)
monster_type *m_ptr;
monster_race *r_ptr;
char m_name[80];
- bool ident = FALSE;
+ bool_ ident = FALSE;
for (i = 1; i < m_max; i++)
{
@@ -73,9 +73,9 @@ bool do_player_trap_call_out(void)
return (ident);
}
-static bool do_trap_teleport_away(object_type *i_ptr, s16b y, s16b x)
+static bool_ do_trap_teleport_away(object_type *i_ptr, s16b y, s16b x)
{
- bool ident = FALSE;
+ bool_ ident = FALSE;
char o_name[80];
s16b o_idx = 0;
@@ -135,14 +135,14 @@ static bool do_trap_teleport_away(object_type *i_ptr, s16b y, s16b x)
/*
* this handles a trap that places walls around the player
*/
-static bool player_handle_trap_of_walls(void)
+static bool_ player_handle_trap_of_walls(void)
{
- bool ident;
+ bool_ ident;
s16b dx, dy, cx, cy;
s16b sx = 0, sy = 0, sn, i;
cave_type *cv_ptr;
- bool map[5][5] =
+ bool_ map[5][5] =
{
{FALSE, FALSE, FALSE, FALSE, FALSE},
{FALSE, FALSE, FALSE, FALSE, FALSE},
@@ -321,7 +321,7 @@ static bool player_handle_trap_of_walls(void)
/* Destroy location (if valid) */
if ((cx < cur_wid) && (cy < cur_hgt) && cave_valid_bold(cy, cx))
{
- bool floor = (f_info[cave[cy][cx].feat].flags1 & FF1_FLOOR);
+ bool_ floor = (f_info[cave[cy][cx].feat].flags1 & FF1_FLOOR);
/* Delete any object that is still there */
delete_object(cy, cx);
@@ -375,7 +375,7 @@ static bool player_handle_trap_of_walls(void)
*
* return value = ident (always TRUE)
*/
-static bool player_handle_missile_trap(s16b num, s16b tval, s16b sval, s16b dd, s16b ds,
+static bool_ player_handle_missile_trap(s16b num, s16b tval, s16b sval, s16b dd, s16b ds,
s16b pdam, cptr name)
{
object_type *o_ptr, forge;
@@ -414,10 +414,10 @@ static bool player_handle_missile_trap(s16b num, s16b tval, s16b sval, s16b dd,
/*
* this function handles a "breath" type trap - acid bolt, lightning balls etc.
*/
-static bool player_handle_breath_trap(s16b rad, s16b type, u16b trap)
+static bool_ player_handle_breath_trap(s16b rad, s16b type, u16b trap)
{
trap_type *t_ptr = &t_info[trap];
- bool ident;
+ bool_ ident;
s16b my_dd, my_ds, dam;
my_dd = t_ptr->dd;
@@ -451,11 +451,11 @@ static void trap_hit(s16b trap)
/*
* this function activates one trap type, and returns
- * a bool indicating if this trap is now identified
+ * a bool_ indicating if this trap is now identified
*/
-bool player_activate_trap_type(s16b y, s16b x, object_type *i_ptr, s16b item)
+bool_ player_activate_trap_type(s16b y, s16b x, object_type *i_ptr, s16b item)
{
- bool ident = FALSE;
+ bool_ ident = FALSE;
s16b trap;
s16b k, l;
@@ -1121,7 +1121,7 @@ bool player_activate_trap_type(s16b y, s16b x, object_type *i_ptr, s16b item)
s16b tmps, tmpx;
s16b tmpspecial, tmpspecial2;
u32b tmpf;
- bool seen = FALSE;
+ bool_ seen = FALSE;
s16b index_x[20], index_y[20]; /* 20 stairs per level is enough? */
cave_type *cv_ptr;
@@ -1299,7 +1299,7 @@ bool player_activate_trap_type(s16b y, s16b x, object_type *i_ptr, s16b item)
case TRAP_OF_SCATTER_ITEMS:
{
s16b i, j;
- bool message = FALSE;
+ bool_ message = FALSE;
for (i = 0; i < INVEN_PACK; i++)
{
@@ -1559,7 +1559,7 @@ bool player_activate_trap_type(s16b y, s16b x, object_type *i_ptr, s16b item)
case TRAP_OF_DROP_ITEMS:
{
s16b i;
- bool message = FALSE;
+ bool_ message = FALSE;
for (i = 0; i < INVEN_PACK; i++)
{
@@ -1594,7 +1594,7 @@ bool player_activate_trap_type(s16b y, s16b x, object_type *i_ptr, s16b item)
case TRAP_OF_DROP_ALL_ITEMS:
{
s16b i;
- bool message = FALSE;
+ bool_ message = FALSE;
for (i = 0; i < INVEN_PACK; i++)
{
@@ -1629,7 +1629,7 @@ bool player_activate_trap_type(s16b y, s16b x, object_type *i_ptr, s16b item)
case TRAP_OF_DROP_EVERYTHING:
{
s16b i;
- bool message = FALSE;
+ bool_ message = FALSE;
for (i = 0; i < INVEN_TOTAL; i++)
{
@@ -1966,7 +1966,7 @@ bool player_activate_trap_type(s16b y, s16b x, object_type *i_ptr, s16b item)
void player_activate_door_trap(s16b y, s16b x)
{
cave_type *c_ptr;
- bool ident = FALSE;
+ bool_ ident = FALSE;
c_ptr = &cave[y][x];
@@ -2123,7 +2123,7 @@ void wiz_place_trap(int y, int x, int idx)
/*
* Hook to determine if an object is a device
*/
-static bool item_tester_hook_device(object_type *o_ptr)
+static bool_ item_tester_hook_device(object_type *o_ptr)
{
if (((o_ptr->tval == TV_ROD_MAIN) && (o_ptr->pval != 0)) ||
(o_ptr->tval == TV_STAFF) ||
@@ -2136,7 +2136,7 @@ static bool item_tester_hook_device(object_type *o_ptr)
/*
* Hook to determine if an object is a potion
*/
-static bool item_tester_hook_potion(object_type *o_ptr)
+static bool_ item_tester_hook_potion(object_type *o_ptr)
{
if ((o_ptr->tval == TV_POTION) ||
(o_ptr->tval == TV_POTION2)) return (TRUE);
@@ -2302,7 +2302,7 @@ void do_cmd_set_trap(void)
*
* Return TRUE if the monster died
*/
-bool mon_hit_trap_aux_rod(int m_idx, object_type *o_ptr)
+bool_ mon_hit_trap_aux_rod(int m_idx, object_type *o_ptr)
{
int dam = 0, typ = 0;
int rad = 0;
@@ -2413,7 +2413,7 @@ bool mon_hit_trap_aux_rod(int m_idx, object_type *o_ptr)
*
* Return TRUE if the monster died
*/
-bool mon_hit_trap_aux_staff(int m_idx, object_type *o_ptr)
+bool_ mon_hit_trap_aux_staff(int m_idx, object_type *o_ptr)
{
return (FALSE);
}
@@ -2423,7 +2423,7 @@ bool mon_hit_trap_aux_staff(int m_idx, object_type *o_ptr)
*
* Return TRUE if the monster died
*/
-bool mon_hit_trap_aux_scroll(int m_idx, int sval)
+bool_ mon_hit_trap_aux_scroll(int m_idx, int sval)
{
monster_type *m_ptr = &m_list[m_idx];
int dam = 0, typ = 0;
@@ -2550,7 +2550,7 @@ bool mon_hit_trap_aux_scroll(int m_idx, int sval)
*
* Return TRUE if the monster died
*/
-bool mon_hit_trap_aux_wand(int m_idx, object_type *o_ptr)
+bool_ mon_hit_trap_aux_wand(int m_idx, object_type *o_ptr)
{
return (FALSE);
}
@@ -2560,7 +2560,7 @@ bool mon_hit_trap_aux_wand(int m_idx, object_type *o_ptr)
*
* Return TRUE if the monster died
*/
-bool mon_hit_trap_aux_potion(int m_idx, object_type *o_ptr)
+bool_ mon_hit_trap_aux_potion(int m_idx, object_type *o_ptr)
{
monster_type *m_ptr = &m_list[m_idx];
int dam = 0, typ = 0;
@@ -2715,7 +2715,7 @@ bool mon_hit_trap_aux_potion(int m_idx, object_type *o_ptr)
* Monster hitting a monster trap -MWK-
* Returns True if the monster died, false otherwise
*/
-bool mon_hit_trap(int m_idx)
+bool_ mon_hit_trap(int m_idx)
{
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
@@ -2734,11 +2734,11 @@ bool mon_hit_trap(int m_idx)
char m_name[80];
- bool notice = FALSE;
- bool disarm = FALSE;
- bool remove = FALSE;
- bool dead = FALSE;
- bool fear = FALSE;
+ bool_ notice = FALSE;
+ bool_ disarm = FALSE;
+ bool_ remove = FALSE;
+ bool_ dead = FALSE;
+ bool_ fear = FALSE;
s32b special = 0;
int dam, chance, shots;
@@ -2762,7 +2762,7 @@ bool mon_hit_trap(int m_idx)
/* Some traps are specialized to some creatures */
if (f2 & TRAP2_ONLY_MASK)
{
- bool affect = FALSE;
+ bool_ affect = FALSE;
if ((f2 & TRAP2_ONLY_DRAGON) && (r_ptr->flags3 & RF3_DRAGON)) affect = TRUE;
if ((f2 & TRAP2_ONLY_DEMON) && (r_ptr->flags3 & RF3_DEMON)) affect = TRUE;
if ((f2 & TRAP2_ONLY_UNDEAD) && (r_ptr->flags3 & RF3_UNDEAD)) affect = TRUE;
diff --git a/src/types.h b/src/types.h
index d895b1a7..dd9c1987 100644
--- a/src/types.h
+++ b/src/types.h
@@ -216,21 +216,21 @@ struct object_kind
byte flavor; /* Special object flavor (or zero) */
- bool easy_know; /* This object is always known (if aware) */
+ bool_ easy_know; /* This object is always known (if aware) */
- bool aware; /* The player is "aware" of the item's effects */
+ bool_ aware; /* The player is "aware" of the item's effects */
- bool tried; /* The player has "tried" one of the items */
+ bool_ tried; /* The player has "tried" one of the items */
- bool know; /* extractable flag for the alchemist */
+ bool_ know; /* extractable flag for the alchemist */
u32b esp; /* ESP flags */
u32b oesp; /* Obvious ESP flags */
byte btval; /* Become Object type */
byte bsval; /* Become Object sub type */
- bool artifact; /* Is it a normal artifact(already generated) */
+ bool_ artifact; /* Is it a normal artifact(already generated) */
s16b power; /* Power granted(if any) */
};
@@ -309,7 +309,7 @@ struct ego_item_type
u32b name; /* Name (offset) */
u32b text; /* Text (offset) */
- bool before; /* Before or after the object name ? */
+ bool_ before; /* Before or after the object name ? */
byte tval[10];
byte min_sval[10];
@@ -540,7 +540,7 @@ struct monster_race
u32b r_flags8; /* Observed racial flags */
u32b r_flags9; /* Observed racial flags */
- bool on_saved; /* Is the (unique) on a saved level ? */
+ bool_ on_saved; /* Is the (unique) on a saved level ? */
byte total_visible; /* Amount of this race that are visible */
@@ -553,7 +553,7 @@ typedef struct monster_ego monster_ego;
struct monster_ego
{
u32b name; /* Name (offset) */
- bool before; /* Display ego before or after */
+ bool_ before; /* Display ego before or after */
monster_blow blow[4]; /* Up to four blows per round */
byte blowm[4][2];
@@ -665,7 +665,7 @@ struct trap_type
byte minlevel; /* what is the minimum level on which the traps should be */
byte color; /* what is the color on screen */
u32b flags; /* where can these traps go - and perhaps other flags */
- bool ident; /* do we know the name */
+ bool_ ident; /* do we know the name */
s16b known; /* how well is this trap known */
s16b name; /* normal name like weakness */
s16b dd, ds; /* base damage */
@@ -910,7 +910,7 @@ struct monster_type
s32b mflag; /* Extra monster flags */
- bool ml; /* Monster is "visible" */
+ bool_ ml; /* Monster is "visible" */
s16b hold_o_idx; /* Object being held (if any) */
@@ -974,7 +974,7 @@ typedef struct option_type option_type;
struct option_type
{
- bool *o_var;
+ bool_ *o_var;
byte o_norm;
@@ -1194,7 +1194,7 @@ struct player_race_mod
{
s32b title; /* Type of race mod */
s32b desc; /* Desc */
- bool place; /* TRUE = race race modifier, FALSE = Race modifier race */
+ bool_ place; /* TRUE = race race modifier, FALSE = Race modifier race */
s16b r_adj[6]; /* (+) Racial stat bonuses */
@@ -1411,7 +1411,7 @@ struct meta_class_type
typedef struct help_info help_info;
struct help_info
{
- bool enabled; /* ingame help enabled */
+ bool_ enabled; /* ingame help enabled */
u32b help1; /* help flags 1 */
};
@@ -1481,12 +1481,12 @@ struct player_type
s16b arena_number; /* monster number in arena -KMW- */
s16b inside_arena; /* Is character inside arena? */
s16b inside_quest; /* Inside quest level */
- bool exit_bldg; /* Goal obtained in arena? -KMW- */
+ bool_ exit_bldg; /* Goal obtained in arena? -KMW- */
s32b wilderness_x; /* Coordinates in the wilderness */
s32b wilderness_y;
- bool wild_mode; /* TRUE = Small map, FLASE = Big map */
- bool old_wild_mode; /* TRUE = Small map, FLASE = Big map */
+ bool_ wild_mode; /* TRUE = Small map, FLASE = Big map */
+ bool_ old_wild_mode; /* TRUE = Small map, FLASE = Big map */
s16b mhp; /* Max hit pts */
s16b chp; /* Cur hit pts */
@@ -1503,7 +1503,7 @@ struct player_type
s32b grace; /* Your God's appreciation factor. */
byte pgod; /* Your God. */
- bool praying; /* Praying to your god. */
+ bool_ praying; /* Praying to your god. */
s16b melkor_sacrifice; /* How much hp has been sacrified for damage */
s16b max_plv; /* Max Player Level */
@@ -1620,11 +1620,11 @@ struct player_type
s16b xtra_spells; /* Number of xtra spell learned(via potion) */
- bool old_cumber_armor;
- bool old_cumber_glove;
- bool old_heavy_wield;
- bool old_heavy_shoot;
- bool old_icky_wield;
+ bool_ old_cumber_armor;
+ bool_ old_cumber_glove;
+ bool_ old_heavy_wield;
+ bool_ old_heavy_shoot;
+ bool_ old_icky_wield;
s16b old_lite; /* Old radius of lite (if any) */
s16b old_view; /* Old radius of view (if any) */
@@ -1632,12 +1632,12 @@ struct player_type
s16b old_food_aux; /* Old value of food */
- bool cumber_armor; /* Mana draining armor */
- bool cumber_glove; /* Mana draining gloves */
- bool heavy_wield; /* Heavy weapon */
- bool heavy_shoot; /* Heavy shooter */
- bool icky_wield; /* Icky weapon */
- bool immovable; /* Immovable character */
+ bool_ cumber_armor; /* Mana draining armor */
+ bool_ cumber_glove; /* Mana draining gloves */
+ bool_ heavy_wield; /* Heavy weapon */
+ bool_ heavy_shoot; /* Heavy shooter */
+ bool_ icky_wield; /* Icky weapon */
+ bool_ immovable; /* Immovable character */
s16b cur_lite; /* Radius of lite (if any) */
@@ -1655,72 +1655,72 @@ struct player_type
s16b stat_cnt[6]; /* Counter for temporary drains */
s16b stat_los[6]; /* Amount of temporary drains */
- bool immune_acid; /* Immunity to acid */
- bool immune_elec; /* Immunity to lightning */
- bool immune_fire; /* Immunity to fire */
- bool immune_cold; /* Immunity to cold */
- bool immune_neth; /* Immunity to nether */
-
- bool resist_acid; /* Resist acid */
- bool resist_elec; /* Resist lightning */
- bool resist_fire; /* Resist fire */
- bool resist_cold; /* Resist cold */
- bool resist_pois; /* Resist poison */
-
- bool resist_conf; /* Resist confusion */
- bool resist_sound; /* Resist sound */
- bool resist_lite; /* Resist light */
- bool resist_dark; /* Resist darkness */
- bool resist_chaos; /* Resist chaos */
- bool resist_disen; /* Resist disenchant */
- bool resist_shard; /* Resist shards */
- bool resist_nexus; /* Resist nexus */
- bool resist_blind; /* Resist blindness */
- bool resist_neth; /* Resist nether */
- bool resist_fear; /* Resist fear */
- bool resist_continuum; /* Resist space-time continuum disruption */
-
- bool sensible_fire; /* Fire does more damage on the player */
- bool sensible_lite; /* Lite does more damage on the player and blinds her/him */
-
- bool reflect; /* Reflect 'bolt' attacks */
- bool sh_fire; /* Fiery 'immolation' effect */
- bool sh_elec; /* Electric 'immolation' effect */
- bool wraith_form; /* wraithform */
-
- bool anti_magic; /* Anti-magic */
- bool anti_tele; /* Prevent teleportation */
-
- bool sustain_str; /* Keep strength */
- bool sustain_int; /* Keep intelligence */
- bool sustain_wis; /* Keep wisdom */
- bool sustain_dex; /* Keep dexterity */
- bool sustain_con; /* Keep constitution */
- bool sustain_chr; /* Keep charisma */
-
- bool aggravate; /* Aggravate monsters */
- bool teleport; /* Random teleporting */
-
- bool exp_drain; /* Experience draining */
+ bool_ immune_acid; /* Immunity to acid */
+ bool_ immune_elec; /* Immunity to lightning */
+ bool_ immune_fire; /* Immunity to fire */
+ bool_ immune_cold; /* Immunity to cold */
+ bool_ immune_neth; /* Immunity to nether */
+
+ bool_ resist_acid; /* Resist acid */
+ bool_ resist_elec; /* Resist lightning */
+ bool_ resist_fire; /* Resist fire */
+ bool_ resist_cold; /* Resist cold */
+ bool_ resist_pois; /* Resist poison */
+
+ bool_ resist_conf; /* Resist confusion */
+ bool_ resist_sound; /* Resist sound */
+ bool_ resist_lite; /* Resist light */
+ bool_ resist_dark; /* Resist darkness */
+ bool_ resist_chaos; /* Resist chaos */
+ bool_ resist_disen; /* Resist disenchant */
+ bool_ resist_shard; /* Resist shards */
+ bool_ resist_nexus; /* Resist nexus */
+ bool_ resist_blind; /* Resist blindness */
+ bool_ resist_neth; /* Resist nether */
+ bool_ resist_fear; /* Resist fear */
+ bool_ resist_continuum; /* Resist space-time continuum disruption */
+
+ bool_ sensible_fire; /* Fire does more damage on the player */
+ bool_ sensible_lite; /* Lite does more damage on the player and blinds her/him */
+
+ bool_ reflect; /* Reflect 'bolt' attacks */
+ bool_ sh_fire; /* Fiery 'immolation' effect */
+ bool_ sh_elec; /* Electric 'immolation' effect */
+ bool_ wraith_form; /* wraithform */
+
+ bool_ anti_magic; /* Anti-magic */
+ bool_ anti_tele; /* Prevent teleportation */
+
+ bool_ sustain_str; /* Keep strength */
+ bool_ sustain_int; /* Keep intelligence */
+ bool_ sustain_wis; /* Keep wisdom */
+ bool_ sustain_dex; /* Keep dexterity */
+ bool_ sustain_con; /* Keep constitution */
+ bool_ sustain_chr; /* Keep charisma */
+
+ bool_ aggravate; /* Aggravate monsters */
+ bool_ teleport; /* Random teleporting */
+
+ bool_ exp_drain; /* Experience draining */
byte drain_mana; /* mana draining */
byte drain_life; /* hp draining */
- bool magical_breath; /* Magical breathing -- can breath anywhere */
- bool water_breath; /* Water breathing -- can breath underwater */
- bool climb; /* Can climb mountains */
- bool fly; /* Can fly over some features */
- bool ffall; /* No damage falling */
- bool lite; /* Permanent light */
- bool free_act; /* Never paralyzed */
- bool see_inv; /* Can see invisible */
- bool regenerate; /* Regenerate hit pts */
- bool hold_life; /* Resist life draining */
+ bool_ magical_breath; /* Magical breathing -- can breath anywhere */
+ bool_ water_breath; /* Water breathing -- can breath underwater */
+ bool_ climb; /* Can climb mountains */
+ bool_ fly; /* Can fly over some features */
+ bool_ ffall; /* No damage falling */
+ bool_ lite; /* Permanent light */
+ bool_ free_act; /* Never paralyzed */
+ bool_ see_inv; /* Can see invisible */
+ bool_ regenerate; /* Regenerate hit pts */
+ bool_ hold_life; /* Resist life draining */
u32b telepathy; /* Telepathy */
- bool slow_digest; /* Slower digestion */
- bool bless_blade; /* Blessed blade */
+ bool_ slow_digest; /* Slower digestion */
+ bool_ bless_blade; /* Blessed blade */
byte xtra_might; /* Extra might bow */
- bool impact; /* Earthquake blows */
- bool auto_id; /* Auto id items */
+ bool_ impact; /* Earthquake blows */
+ bool_ auto_id; /* Auto id items */
s16b invis; /* Invisibility */
@@ -1805,11 +1805,11 @@ struct player_type
s16b companion_killed; /* Number of companion death */
- bool no_mortal; /* Fated to never die by the hand of a mortal being */
+ bool_ no_mortal; /* Fated to never die by the hand of a mortal being */
- bool black_breath; /* The Tolkien's Black Breath */
+ bool_ black_breath; /* The Tolkien's Black Breath */
- bool precognition; /* Like the cheat mode */
+ bool_ precognition; /* Like the cheat mode */
/*** Extra flags -- used for lua and easying stuff ***/
u32b xtra_f1;
@@ -1820,7 +1820,7 @@ struct player_type
u32b xtra_esp;
/* Corruptions */
- bool *corruptions;
+ bool_ *corruptions;
/*** Pet commands ***/
byte pet_follow_distance; /* Length of the imaginary "leash" for pets */
@@ -1832,17 +1832,17 @@ struct player_type
/*** Body changing variables ***/
u16b body_monster; /* In which body is the player */
- bool disembodied; /* Is the player in a body ? */
+ bool_ disembodied; /* Is the player in a body ? */
byte body_parts[INVEN_TOTAL - INVEN_WIELD]; /* Which body parts does he have ? */
s16b extra_body_parts[BODY_MAX]; /* Various body modifiers */
/* Astral */
- bool astral; /* We started at the bottom ? */
+ bool_ astral; /* We started at the bottom ? */
/* Powers */
- bool *powers; /* Actual powers */
- bool powers_mod[POWER_MAX_INIT]; /* Intrinsinc powers */
+ bool_ *powers; /* Actual powers */
+ bool_ powers_mod[POWER_MAX_INIT]; /* Intrinsinc powers */
/* Skills */
s16b skill_points;
@@ -1855,8 +1855,8 @@ struct player_type
/*** Temporary fields ***/
- bool did_nothing; /* True if the last action wasnt a real action */
- bool leaving; /* True if player is leaving */
+ bool_ did_nothing; /* True if the last action wasnt a real action */
+ bool_ leaving; /* True if player is leaving */
};
@@ -1938,7 +1938,7 @@ struct wilderness_map
u32b seed; /* Seed for the RNG */
u16b entrance; /* Entrance for dungeons */
- bool known; /* Is it seen by the player ? */
+ bool_ known; /* Is it seen by the player ? */
};
/*
@@ -1955,9 +1955,9 @@ struct town_type
byte flags; /* Town flags */
/* Left this for the sake of compatibility */
- bool stocked; /* Is the town actualy stocked ? */
+ bool_ stocked; /* Is the town actualy stocked ? */
- bool destroyed; /* Is the town destroyed? */
+ bool_ destroyed; /* Is the town destroyed? */
};
@@ -1985,7 +1985,7 @@ struct artifact_select_flag {
byte level; /* Player skill level to start at */
int desc; /* Display this description to select flag */
u32b xp; /* xp cost for this flag */
- bool pval; /* indicates this flag benifits from pval */
+ bool_ pval; /* indicates this flag benifits from pval */
int item_desc; /* Description of required item */
int item_descp; /* Description of required item */
byte rtval; /* Required items' tval */
@@ -2072,7 +2072,7 @@ struct random_spell
byte dam_sides;
byte dam_dice;
byte level; /* Level needed */
- bool untried; /* Is the spell was tried? */
+ bool_ untried; /* Is the spell was tried? */
};
/* A structure to describe the fate of the player */
@@ -2090,8 +2090,8 @@ struct fate
s16b r_idx; /* Monster to find */
s16b count; /* Number of things */
s16b time; /* Turn before */
- bool know; /* Has it been predicted? */
- bool icky; /* Hackish runtime-only flag */
+ bool_ know; /* Has it been predicted? */
+ bool_ icky; /* Hackish runtime-only flag */
};
/* A structure for movements */
@@ -2155,7 +2155,7 @@ struct dungeon_info_type
s16b mindepth; /* Minimal depth */
s16b maxdepth; /* Maximal depth */
- bool principal; /* If it's a part of the main dungeon */
+ bool_ principal; /* If it's a part of the main dungeon */
byte next; /* The next part of the main dungeon */
byte min_plev; /* Minimal plev needed to enter -- it's an anti-cheating mesure */
@@ -2194,7 +2194,7 @@ struct inscription_info_type
{
char text[40]; /* The inscription itself */
byte when; /* When it is executed */
- bool know; /* Is the inscription know ? */
+ bool_ know; /* Is the inscription know ? */
byte mana; /* Grid mana needed */
};
@@ -2241,7 +2241,7 @@ struct power_type
};
/* Hooks */
-typedef bool (*hook_type)(char *fmt);
+typedef bool_ (*hook_type)(char *fmt);
/*
* Structure for the "quests"
@@ -2250,9 +2250,9 @@ typedef struct quest_type quest_type;
struct quest_type
{
- bool silent;
+ bool_ silent;
- bool dynamic_desc; /* Do we need to ask a function to get the description ? */
+ bool_ dynamic_desc; /* Do we need to ask a function to get the description ? */
char name[40]; /* Quest name */
@@ -2266,7 +2266,7 @@ struct quest_type
byte type; /* Lua or C ? */
- bool (*init)(int q); /* Function that takes care of generating hardcoded quests */
+ bool_ (*init)(int q); /* Function that takes care of generating hardcoded quests */
s32b data[4]; /* Various datas used by the quests */
};
@@ -2275,7 +2275,7 @@ struct random_quest
{
byte type; /* Type/number of monsters to kill(0 = no quest) */
s16b r_idx; /* Monsters to crush */
- bool done; /* Done ? */
+ bool_ done; /* Done ? */
};
/* Monster powers for player uses */
@@ -2285,7 +2285,7 @@ struct monster_power
u32b power; /* Power RF?_xxx */
cptr name; /* Name of it */
int mana; /* Mana needed */
- bool great; /* Need the use of great spells */
+ bool_ great; /* Need the use of great spells */
};
/* Tval descs */
@@ -2303,7 +2303,7 @@ typedef struct between_exit between_exit;
struct between_exit
{
s16b corresp; /* Corresponding between gate */
- bool dungeon; /* Do we exit in a dungeon or in the wild ? */
+ bool_ dungeon; /* Do we exit in a dungeon or in the wild ? */
s16b wild_x, wild_y; /* Wilderness spot to land onto */
s16b px, py; /* Location of the map */
@@ -2346,7 +2346,7 @@ struct birther
char history[4][60];
- bool quick_ok;
+ bool_ quick_ok;
};
typedef struct hooks_chain hooks_chain;
@@ -2399,7 +2399,7 @@ struct set_type
byte num_use; /* Number actually wore */
struct /* the various items */
{
- bool present; /* Is it actually wore ? */
+ bool_ present; /* Is it actually wore ? */
s16b a_idx; /* What artifact ? */
s16b pval[6]; /* Pval for each combination */
u32b flags1[6]; /* Flags */
@@ -2444,9 +2444,9 @@ struct skill_type
s16b action[MAX_SKILLS]; /* List of actions against other skills */
s16b father; /* Father in the skill tree */
- bool dev; /* Is the branch developped ? */
+ bool_ dev; /* Is the branch developped ? */
s16b order; /* Order in the tree */
- bool hidden; /* Innactive */
+ bool_ hidden; /* Innactive */
byte random_gain_chance; /* random gain chance, still needs the flag */
@@ -2493,7 +2493,7 @@ struct timer_type
{
timer_type *next; /* The next timer in the list */
- bool enabled; /* Is it currently counting? */
+ bool_ enabled; /* Is it currently counting? */
s32b delay; /* Delay between activations */
s32b countdown; /* The current number of turns passed, when it reaches delay it fires */
@@ -2524,7 +2524,7 @@ struct ability_type
s16b cost; /* Skill points cost */
- bool acquired; /* Do the player actualylg ot it ? */
+ bool_ acquired; /* Do the player actualylg ot it ? */
/* Prereqs */
s16b skills[10]; /* List of prereq skills(10 max) */
diff --git a/src/util.c b/src/util.c
index ea54ea30..ef4907be 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1115,7 +1115,7 @@ static void trigger_text_to_ascii(char **bufptr, cptr *strptr)
{
char *s = *bufptr;
cptr str = *strptr;
- bool mod_status[MAX_MACRO_MOD];
+ bool_ mod_status[MAX_MACRO_MOD];
int i, len = 0;
int shiftstatus = 0;
@@ -1335,7 +1335,7 @@ void text_to_ascii(char *buf, cptr str)
}
-bool trigger_ascii_to_text(char **bufptr, cptr *strptr)
+bool_ trigger_ascii_to_text(char **bufptr, cptr *strptr)
{
char *s = *bufptr;
cptr str = *strptr;
@@ -1502,7 +1502,7 @@ void ascii_to_text(char *buf, cptr str)
/*
* Determine if any macros have ever started with a given character.
*/
-static bool macro__use[256];
+static bool_ macro__use[256];
/*
@@ -1701,7 +1701,7 @@ errr macro_init(void)
/*
* Local "need flush" variable
*/
-static bool flush_later = FALSE;
+static bool_ flush_later = FALSE;
/*
@@ -1709,14 +1709,14 @@ static bool flush_later = FALSE;
*
* Do not match any macros until "ascii 30" is found.
*/
-static bool parse_macro = FALSE;
+static bool_ parse_macro = FALSE;
/*
* Local variable -- we are inside a "macro trigger"
*
* Strip all keypresses until a low ascii value is found.
*/
-static bool parse_under = FALSE;
+static bool_ parse_under = FALSE;
/*
@@ -1997,7 +1997,7 @@ char inkey(void)
char ch = 0;
- bool done = FALSE;
+ bool_ done = FALSE;
term *old = Term;
@@ -3230,7 +3230,7 @@ static char complete_buf[100];
static int complete_command(char *buf, int clen, int mlen)
{
int i, j = 1, max = clen;
- bool gotone = FALSE;
+ bool_ gotone = FALSE;
/* Forget the characters after the end of the string. */
complete_buf[clen] = '\0';
@@ -3279,8 +3279,8 @@ static int complete_command(char *buf, int clen, int mlen)
* ESCAPE clears the buffer and the window and returns FALSE.
* RETURN accepts the current buffer contents and returns TRUE.
*/
-bool askfor_aux_complete = FALSE;
-bool askfor_aux(char *buf, int len)
+bool_ askfor_aux_complete = FALSE;
+bool_ askfor_aux(char *buf, int len)
{
int y, x;
@@ -3290,7 +3290,7 @@ bool askfor_aux(char *buf, int len)
int wid, hgt;
- bool done = FALSE;
+ bool_ done = FALSE;
/* Locate the cursor */
@@ -3406,9 +3406,9 @@ bool askfor_aux(char *buf, int len)
*
* We clear the input, and return FALSE, on "ESCAPE".
*/
-bool get_string(cptr prompt, char *buf, int len)
+bool_ get_string(cptr prompt, char *buf, int len)
{
- bool res;
+ bool_ res;
/* Paranoia XXX XXX XXX */
msg_print(NULL);
@@ -3434,7 +3434,7 @@ bool get_string(cptr prompt, char *buf, int len)
*
* Note that "[y/n]" is appended to the prompt.
*/
-bool get_check(cptr prompt)
+bool_ get_check(cptr prompt)
{
int i;
@@ -3477,7 +3477,7 @@ bool get_check(cptr prompt)
*
* Returns TRUE unless the character is "Escape"
*/
-bool get_com(cptr prompt, char *command)
+bool_ get_com(cptr prompt, char *command)
{
/* Paranoia XXX XXX XXX */
msg_print(NULL);
@@ -3615,7 +3615,7 @@ char request_command_ignore_keymaps[MAX_IGNORE_KEYMAPS];
* Mega-Hack -- flag set by do_cmd_{inven,equip}() to allow keymaps in
* auto-command mode.
*/
-bool request_command_inven_mode = FALSE;
+bool_ request_command_inven_mode = FALSE;
/*
@@ -3796,7 +3796,7 @@ void request_command(int shopping)
if ((cmd == ' ') || (cmd == '\n') || (cmd == '\r'))
{
/* Get a real command */
- bool temp = get_com("Command: ", &cmd_char);
+ bool_ temp = get_com("Command: ", &cmd_char);
cmd = cmd_char;
if (!temp)
@@ -3932,7 +3932,7 @@ void request_command(int shopping)
/*
* Check a char for "vowel-hood"
*/
-bool is_a_vowel(int ch)
+bool_ is_a_vowel(int ch)
{
switch (ch)
{
@@ -4039,7 +4039,7 @@ void repeat_push(int what)
}
-bool repeat_pull(int *what)
+bool_ repeat_pull(int *what)
{
/* All out of keys */
if (repeat__idx == repeat__cnt) return (FALSE);
@@ -4100,7 +4100,7 @@ u32b get_number(u32b def, u32b max, int y, int x, char *cmd)
u32b res = def;
/* Player has not typed anything yet */
- bool no_keys = TRUE;
+ bool_ no_keys = TRUE;
/* Begin the input with default */
prt(format("%lu", def), y, x);
@@ -4309,7 +4309,7 @@ s32b bst(s32b what, s32b t)
}
}
-cptr get_month_name(int day, bool full, bool compact)
+cptr get_month_name(int day, bool_ full, bool_ compact)
{
int i = 8;
static char buf[40];
@@ -4563,7 +4563,7 @@ int ask_menu(cptr ask, char **items, int max)
/*
* Determine if string "t" is a prefix of string "s"
*/
-bool prefix(cptr s, cptr t)
+bool_ prefix(cptr s, cptr t)
{
/* Paranoia */
if (!s || !t)
@@ -4648,7 +4648,7 @@ void display_list(int y, int x, int h, int w, cptr title, cptr *list, int max, i
/*
* Creates an input box
*/
-bool input_box(cptr text, int y, int x, char *buf, int max)
+bool_ input_box(cptr text, int y, int x, char *buf, int max)
{
int smax = strlen(text);
diff --git a/src/variable.c b/src/variable.c
index 3e73781a..66c59989 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -60,25 +60,25 @@ u16b sf_saves; /* Number of "saves" during this life */
/*
* Run-time arguments
*/
-bool arg_fiddle; /* Command arg -- Request fiddle mode */
-bool arg_wizard; /* Command arg -- Request wizard mode */
-bool arg_sound; /* Command arg -- Request special sounds */
-bool arg_graphics; /* Command arg -- Request graphics mode */
-bool arg_force_original; /* Command arg -- Request original keyset */
-bool arg_force_roguelike; /* Command arg -- Request roguelike keyset */
-bool arg_bigtile = FALSE; /* Command arg -- Request big tile mode */
+bool_ arg_fiddle; /* Command arg -- Request fiddle mode */
+bool_ arg_wizard; /* Command arg -- Request wizard mode */
+bool_ arg_sound; /* Command arg -- Request special sounds */
+bool_ arg_graphics; /* Command arg -- Request graphics mode */
+bool_ arg_force_original; /* Command arg -- Request original keyset */
+bool_ arg_force_roguelike; /* Command arg -- Request roguelike keyset */
+bool_ arg_bigtile = FALSE; /* Command arg -- Request big tile mode */
/*
* Various things
*/
-bool character_generated; /* The character exists */
-bool character_dungeon; /* The character has a dungeon */
-bool character_loaded; /* The character was loaded from a savefile */
-bool character_saved; /* The character was just saved to a savefile */
+bool_ character_generated; /* The character exists */
+bool_ character_dungeon; /* The character has a dungeon */
+bool_ character_loaded; /* The character was loaded from a savefile */
+bool_ character_saved; /* The character was just saved to a savefile */
-bool character_icky; /* The game is in an icky full screen mode */
-bool character_xtra; /* The game is in an icky startup mode */
+bool_ character_icky; /* The game is in an icky full screen mode */
+bool_ character_xtra; /* The game is in an icky startup mode */
u32b seed_flavor; /* Hack -- consistent object colors */
@@ -95,17 +95,17 @@ s16b command_new; /* Command chaining from inven/equip view */
s32b energy_use; /* Energy use this turn */
-bool create_up_stair; /* Auto-create "up stairs" */
-bool create_down_stair; /* Auto-create "down stairs" */
+bool_ create_up_stair; /* Auto-create "up stairs" */
+bool_ create_down_stair; /* Auto-create "down stairs" */
-bool create_up_shaft; /* Auto-create "up shaft" */
-bool create_down_shaft; /* Auto-create "down shaft" */
+bool_ create_up_shaft; /* Auto-create "up shaft" */
+bool_ create_down_shaft; /* Auto-create "down shaft" */
-bool msg_flag; /* Used in msg_print() for "buffering" */
+bool_ msg_flag; /* Used in msg_print() for "buffering" */
-bool alive; /* True if game is running */
+bool_ alive; /* True if game is running */
-bool death; /* True if player has died */
+bool_ death; /* True if player has died */
s16b running; /* Current counter for running, if any */
s16b resting; /* Current counter for resting, if any */
@@ -121,11 +121,11 @@ s16b monster_level; /* Current monster creation level */
s32b turn; /* Current game turn */
s32b old_turn; /* Turn when level began (feelings) */
-bool wizard; /* Is the player currently in Wizard mode? */
+bool_ wizard; /* Is the player currently in Wizard mode? */
-bool use_sound; /* The "sound" mode is enabled */
-bool use_graphics; /* The "graphics" mode is enabled */
-bool use_bigtile = FALSE;
+bool_ use_sound; /* The "sound" mode is enabled */
+bool_ use_graphics; /* The "graphics" mode is enabled */
+bool_ use_bigtile = FALSE;
byte graphics_mode; /* Current graphics mode */
u16b total_winner; /* Semi-Hack -- Game has been won */
@@ -136,26 +136,26 @@ u16b noscore; /* Track various "cheating" conditions */
s16b signal_count; /* Hack -- Count interupts */
-bool inkey_base; /* See the "inkey()" function */
-bool inkey_xtra; /* See the "inkey()" function */
-bool inkey_scan; /* See the "inkey()" function */
-bool inkey_flag; /* See the "inkey()" function */
+bool_ inkey_base; /* See the "inkey()" function */
+bool_ inkey_xtra; /* See the "inkey()" function */
+bool_ inkey_scan; /* See the "inkey()" function */
+bool_ inkey_flag; /* See the "inkey()" function */
s16b coin_type; /* Hack -- force coin type */
-bool opening_chest; /* Hack -- prevent chest generation */
+bool_ opening_chest; /* Hack -- prevent chest generation */
-bool shimmer_monsters; /* Hack -- optimize multi-hued monsters */
-bool shimmer_objects; /* Hack -- optimize multi-hued objects */
+bool_ shimmer_monsters; /* Hack -- optimize multi-hued monsters */
+bool_ shimmer_objects; /* Hack -- optimize multi-hued objects */
-bool repair_monsters; /* Hack -- optimize detect monsters */
-bool repair_objects; /* Hack -- optimize detect objects */
+bool_ repair_monsters; /* Hack -- optimize detect monsters */
+bool_ repair_objects; /* Hack -- optimize detect objects */
s16b inven_nxt; /* Hack -- unused */
-bool hack_mind;
-bool hack_corruption;
+bool_ hack_mind;
+bool_ hack_corruption;
int artifact_bias;
-bool is_autosave = FALSE;
+bool_ is_autosave = FALSE;
s16b inven_cnt; /* Number of items in inventory */
s16b equip_cnt; /* Number of items in equipment */
@@ -168,7 +168,7 @@ s16b m_cnt = 0; /* Number of live monsters */
s16b hack_m_idx = 0; /* Hack -- see "process_monsters()" */
s16b hack_m_idx_ii = 0;
-bool multi_rew = FALSE;
+bool_ multi_rew = FALSE;
char summon_kin_type; /* Hack, by Julian Lighton: summon 'relatives' */
int total_friends = 0;
@@ -217,132 +217,132 @@ int highscore_fd = -1;
/* Option Set 1 -- User Interface */
-bool rogue_like_commands; /* Rogue-like commands */
-bool quick_messages; /* Activate quick messages */
-bool other_query_flag; /* Prompt for various information */
-bool carry_query_flag; /* Prompt before picking things up */
-bool use_old_target; /* Use old target by default */
-bool always_pickup; /* Pick things up by default */
-bool prompt_pickup_heavy; /* Don't pick up the corpses */
-bool always_repeat; /* Repeat obvious commands */
-bool depth_in_feet; /* Show dungeon level in feet */
+bool_ rogue_like_commands; /* Rogue-like commands */
+bool_ quick_messages; /* Activate quick messages */
+bool_ other_query_flag; /* Prompt for various information */
+bool_ carry_query_flag; /* Prompt before picking things up */
+bool_ use_old_target; /* Use old target by default */
+bool_ always_pickup; /* Pick things up by default */
+bool_ prompt_pickup_heavy; /* Don't pick up the corpses */
+bool_ always_repeat; /* Repeat obvious commands */
+bool_ depth_in_feet; /* Show dungeon level in feet */
-bool stack_force_notes; /* Merge inscriptions when stacking */
-bool stack_force_costs; /* Merge discounts when stacking */
+bool_ stack_force_notes; /* Merge inscriptions when stacking */
+bool_ stack_force_costs; /* Merge discounts when stacking */
-bool show_labels; /* Show labels in object listings */
-bool show_weights; /* Show weights in object listings */
-bool show_choices; /* Show choices in certain sub-windows */
-bool show_details; /* Show details in certain sub-windows */
+bool_ show_labels; /* Show labels in object listings */
+bool_ show_weights; /* Show weights in object listings */
+bool_ show_choices; /* Show choices in certain sub-windows */
+bool_ show_details; /* Show details in certain sub-windows */
-bool ring_bell; /* Ring the bell (on errors, etc) */
+bool_ ring_bell; /* Ring the bell (on errors, etc) */
-bool show_inven_graph; /* Show graphics in inventory */
-bool show_equip_graph; /* Show graphics in equip list */
-bool show_store_graph; /* Show graphics in store */
+bool_ show_inven_graph; /* Show graphics in inventory */
+bool_ show_equip_graph; /* Show graphics in equip list */
+bool_ show_store_graph; /* Show graphics in store */
/* Option Set 2 -- Disturbance */
-bool find_ignore_stairs; /* Run past stairs */
-bool find_ignore_doors; /* Run through open doors */
-bool find_cut; /* Run past known corners */
-bool find_examine; /* Run into potential corners */
-
-bool disturb_move; /* Disturb whenever any monster moves */
-bool disturb_near; /* Disturb whenever viewable monster moves */
-bool disturb_panel; /* Disturb whenever map panel changes */
-bool disturb_detect; /* Disturb whenever leaving trap-detected area */
-bool disturb_state; /* Disturn whenever player state changes */
-bool disturb_minor; /* Disturb whenever boring things happen */
-bool disturb_other; /* Disturb whenever various things happen */
-
-bool alert_hitpoint; /* Alert user to critical hitpoints */
-bool alert_failure; /* Alert user to various failures */
-bool last_words; /* Get last words upon dying */
-bool speak_unique; /* Speaking uniques + shopkeepers */
-bool small_levels; /* Allow unusually small dungeon levels */
-bool empty_levels; /* Allow empty 'arena' levels */
-bool always_small_level; /* Small levels */
-bool player_symbols; /* Use varying symbols for the player char */
-bool plain_descriptions; /* Plain object descriptions */
-bool stupid_monsters; /* Monsters use old AI */
-bool auto_destroy; /* Known worthless items are destroyed without confirmation */
-bool confirm_stairs; /* Prompt before staircases... */
-bool wear_confirm; /* Confirm before putting on known cursed items */
-bool disturb_pets; /* Pets moving nearby disturb us */
+bool_ find_ignore_stairs; /* Run past stairs */
+bool_ find_ignore_doors; /* Run through open doors */
+bool_ find_cut; /* Run past known corners */
+bool_ find_examine; /* Run into potential corners */
+
+bool_ disturb_move; /* Disturb whenever any monster moves */
+bool_ disturb_near; /* Disturb whenever viewable monster moves */
+bool_ disturb_panel; /* Disturb whenever map panel changes */
+bool_ disturb_detect; /* Disturb whenever leaving trap-detected area */
+bool_ disturb_state; /* Disturn whenever player state changes */
+bool_ disturb_minor; /* Disturb whenever boring things happen */
+bool_ disturb_other; /* Disturb whenever various things happen */
+
+bool_ alert_hitpoint; /* Alert user to critical hitpoints */
+bool_ alert_failure; /* Alert user to various failures */
+bool_ last_words; /* Get last words upon dying */
+bool_ speak_unique; /* Speaking uniques + shopkeepers */
+bool_ small_levels; /* Allow unusually small dungeon levels */
+bool_ empty_levels; /* Allow empty 'arena' levels */
+bool_ always_small_level; /* Small levels */
+bool_ player_symbols; /* Use varying symbols for the player char */
+bool_ plain_descriptions; /* Plain object descriptions */
+bool_ stupid_monsters; /* Monsters use old AI */
+bool_ auto_destroy; /* Known worthless items are destroyed without confirmation */
+bool_ confirm_stairs; /* Prompt before staircases... */
+bool_ wear_confirm; /* Confirm before putting on known cursed items */
+bool_ disturb_pets; /* Pets moving nearby disturb us */
/* Option Set 3 -- Game-Play */
-bool auto_haggle; /* Auto-haggle in stores */
+bool_ auto_haggle; /* Auto-haggle in stores */
-bool auto_scum; /* Auto-scum for good levels */
+bool_ auto_scum; /* Auto-scum for good levels */
-bool stack_allow_items; /* Allow weapons and armor to stack */
-bool stack_allow_wands; /* Allow wands/staffs/rods to stack */
+bool_ stack_allow_items; /* Allow weapons and armor to stack */
+bool_ stack_allow_wands; /* Allow wands/staffs/rods to stack */
-bool expand_look; /* Expand the power of the look command */
-bool expand_list; /* Expand the power of the list commands */
+bool_ expand_look; /* Expand the power of the look command */
+bool_ expand_list; /* Expand the power of the list commands */
-bool view_perma_grids; /* Map remembers all perma-lit grids */
-bool view_torch_grids; /* Map remembers all torch-lit grids */
+bool_ view_perma_grids; /* Map remembers all perma-lit grids */
+bool_ view_torch_grids; /* Map remembers all torch-lit grids */
-bool monster_lite; /* Allow some monsters to carry light */
+bool_ monster_lite; /* Allow some monsters to carry light */
-bool dungeon_align; /* Generate dungeons with aligned rooms */
-bool dungeon_stair; /* Generate dungeons with connected stairs */
+bool_ dungeon_align; /* Generate dungeons with aligned rooms */
+bool_ dungeon_stair; /* Generate dungeons with connected stairs */
-bool flow_by_sound; /* Monsters track new player location */
+bool_ flow_by_sound; /* Monsters track new player location */
-bool track_follow; /* Monsters follow the player */
-bool track_target; /* Monsters target the player */
+bool_ track_follow; /* Monsters follow the player */
+bool_ track_target; /* Monsters target the player */
-bool smart_learn; /* Monsters learn from their mistakes */
-bool smart_cheat; /* Monsters exploit player weaknesses */
+bool_ smart_learn; /* Monsters learn from their mistakes */
+bool_ smart_cheat; /* Monsters exploit player weaknesses */
/* Option Set 4 -- Efficiency */
-bool view_reduce_lite; /* Reduce lite-radius when running */
-bool view_reduce_view; /* Reduce view-radius in town */
+bool_ view_reduce_lite; /* Reduce lite-radius when running */
+bool_ view_reduce_view; /* Reduce view-radius in town */
-bool avoid_abort; /* Avoid checking for user abort */
-bool avoid_shimmer; /* Avoid processing extra shimmering */
-bool avoid_other; /* Avoid processing special colors */
+bool_ avoid_abort; /* Avoid checking for user abort */
+bool_ avoid_shimmer; /* Avoid processing extra shimmering */
+bool_ avoid_other; /* Avoid processing special colors */
-bool flush_failure; /* Flush input on any failure */
-bool flush_disturb; /* Flush input on disturbance */
-bool flush_command; /* Flush input before every command */
+bool_ flush_failure; /* Flush input on any failure */
+bool_ flush_disturb; /* Flush input on disturbance */
+bool_ flush_command; /* Flush input before every command */
-bool fresh_before; /* Flush output before normal commands */
-bool fresh_after; /* Flush output after normal commands */
-bool fresh_message; /* Flush output after all messages */
+bool_ fresh_before; /* Flush output before normal commands */
+bool_ fresh_after; /* Flush output after normal commands */
+bool_ fresh_message; /* Flush output after all messages */
-bool hilite_player; /* Hilite the player with the cursor */
+bool_ hilite_player; /* Hilite the player with the cursor */
-bool view_yellow_lite; /* Use special colors for torch-lit grids */
-bool view_bright_lite; /* Use special colors for 'viewable' grids */
+bool_ view_yellow_lite; /* Use special colors for torch-lit grids */
+bool_ view_bright_lite; /* Use special colors for 'viewable' grids */
-bool view_granite_lite; /* Use special colors for wall grids (slow) */
-bool view_special_lite; /* Use special colors for floor grids (slow) */
+bool_ view_granite_lite; /* Use special colors for wall grids (slow) */
+bool_ view_special_lite; /* Use special colors for floor grids (slow) */
/* Option set 5 -- Testing */
-bool testing_stack; /* Test the stacking code */
+bool_ testing_stack; /* Test the stacking code */
-bool testing_carry; /* Test the carrying code */
+bool_ testing_carry; /* Test the carrying code */
/* Cheating options */
-bool cheat_peek; /* Peek into object creation */
-bool cheat_hear; /* Peek into monster creation */
-bool cheat_room; /* Peek into dungeon creation */
-bool cheat_xtra; /* Peek into something else */
-bool cheat_know; /* Know complete monster info */
-bool cheat_live; /* Allow player to avoid death */
+bool_ cheat_peek; /* Peek into object creation */
+bool_ cheat_hear; /* Peek into monster creation */
+bool_ cheat_room; /* Peek into dungeon creation */
+bool_ cheat_xtra; /* Peek into something else */
+bool_ cheat_know; /* Know complete monster info */
+bool_ cheat_live; /* Allow player to avoid death */
/* Special options */
@@ -351,8 +351,8 @@ byte hitpoint_warn; /* Hitpoint warning (0 to 9) */
byte delay_factor; /* Delay factor (0 to 9) */
-bool autosave_l; /* Autosave before entering new levels */
-bool autosave_t; /* Timed autosave */
+bool_ autosave_l; /* Autosave before entering new levels */
+bool_ autosave_t; /* Timed autosave */
s16b autosave_freq; /* Autosave frequency */
@@ -363,9 +363,9 @@ s16b autosave_freq; /* Autosave frequency */
s16b feeling; /* Most recent feeling */
s16b rating; /* Level's current rating */
-bool good_item_flag; /* True if "Artifact" on this level */
+bool_ good_item_flag; /* True if "Artifact" on this level */
-bool closing_flag; /* Dungeon is closing */
+bool_ closing_flag; /* Dungeon is closing */
/*
* Dungeon size info
@@ -441,7 +441,7 @@ char history[4][60];
* Buffer to hold the current savefile name
*/
char savefile[1024];
-bool savefile_setuid = TRUE;
+bool_ savefile_setuid = TRUE;
/*
@@ -484,7 +484,7 @@ cptr *macro__act;
/*
* Array of macro types [MACRO_MAX]
*/
-bool *macro__cmd;
+bool_ *macro__cmd;
/*
* Current macro action [1024]
@@ -741,7 +741,7 @@ alloc_entry *alloc_kind_table;
* The flag to tell if alloc_kind_table contains valid entries
* for normal (i.e. kind_is_legal) object allocation
*/
-bool alloc_kind_table_valid = FALSE;
+bool_ alloc_kind_table_valid = FALSE;
/*
@@ -1134,7 +1134,7 @@ char pref_tmp_value[8];
* Total Hack -- allow all items to be listed (even empty ones)
* This is only used by "do_cmd_inven_e()" and is cleared there.
*/
-bool item_tester_full;
+bool_ item_tester_full;
/*
@@ -1148,14 +1148,14 @@ byte item_tester_tval;
* Here is a "hook" used during calls to "get_item()" and
* "show_inven()" and "show_equip()", and the choice window routines.
*/
-bool (*item_tester_hook)(object_type*);
+bool_ (*item_tester_hook)(object_type*);
/*
* Current "comp" function for ang_sort()
*/
-bool (*ang_sort_comp)(vptr u, vptr v, int a, int b);
+bool_ (*ang_sort_comp)(vptr u, vptr v, int a, int b);
/*
@@ -1168,23 +1168,23 @@ void (*ang_sort_swap)(vptr u, vptr v, int a, int b);
/*
* Hack -- function hooks to restrict "get_mon_num_prep()" function
*/
-bool (*get_mon_num_hook)(int r_idx);
-bool (*get_mon_num2_hook)(int r_idx);
+bool_ (*get_mon_num_hook)(int r_idx);
+bool_ (*get_mon_num2_hook)(int r_idx);
/*
* Hack -- function hook to restrict "get_obj_num_prep()" function
*/
-bool (*get_obj_num_hook)(int k_idx);
+bool_ (*get_obj_num_hook)(int k_idx);
/* Hack, monk armour */
-bool monk_armour_aux;
-bool monk_notify_aux;
+bool_ monk_armour_aux;
+bool_ monk_notify_aux;
-bool easy_open = TRUE;
-bool easy_disarm = TRUE;
-bool easy_tunnel = FALSE;
+bool_ easy_open = TRUE;
+bool_ easy_disarm = TRUE;
+bool_ easy_tunnel = FALSE;
/*
@@ -1314,16 +1314,16 @@ u16b max_wf_idx;
int init_flags;
/* True if on an ambush */
-bool ambush_flag;
+bool_ ambush_flag;
/* True if on fated level */
-bool fate_flag;
+bool_ fate_flag;
/* No breeders */
u16b no_breeds;
/* Carried monsters can't take the damage if this is them which attack the player */
-bool carried_monster_hit = FALSE;
+bool_ carried_monster_hit = FALSE;
/*
* Random artifacts.
@@ -1343,7 +1343,7 @@ s16b bounties[MAX_BOUNTIES][2];
/*
* Spell description
*/
-bool info_spell = FALSE;
+bool_ info_spell = FALSE;
char spell_txt[50];
/*
@@ -1391,59 +1391,59 @@ u32b total_bounties;
s16b doppleganger;
/* To allow wilderness encounters */
-bool generate_encounter;
+bool_ generate_encounter;
/* Permanent dungeons ? */
-bool permanent_levels;
+bool_ permanent_levels;
/* Autoroler */
-bool autoroll;
+bool_ autoroll;
/* Point based */
-bool point_based;
+bool_ point_based;
/* Maximize, preserve, special levels, ironman_rooms */
-bool maximize, preserve, special_lvls, ironman_rooms;
+bool_ maximize, preserve, special_lvls, ironman_rooms;
/* In inventory option window, just erase the letters,
* rather that displaying the list without the invalid
* selections */
-bool inventory_no_move;
+bool_ inventory_no_move;
/* Notes patch */
-bool take_notes, auto_notes;
+bool_ take_notes, auto_notes;
/*
* Such an ugly hack ...
*/
-bool *m_allow_special;
-bool *k_allow_special;
-bool *a_allow_special;
+bool_ *m_allow_special;
+bool_ *k_allow_special;
+bool_ *a_allow_special;
/*
* Gives a random object to newly created characters
*/
-bool rand_birth;
+bool_ rand_birth;
/*
* Fast autoroller
*/
-bool fast_autoroller;
+bool_ fast_autoroller;
/*
* Which monsters are allowed ?
*/
-bool joke_monsters;
+bool_ joke_monsters;
/*
* How will mana staf & weapons of life act
*/
-bool munchkin_multipliers = TRUE;
+bool_ munchkin_multipliers = TRUE;
/*
* Center view
*/
-bool center_player = FALSE;
+bool_ center_player = FALSE;
/*
* Plots
@@ -1458,28 +1458,28 @@ random_quest random_quests[MAX_RANDOM_QUEST];
/*
* Show exp left
*/
-bool exp_need;
+bool_ exp_need;
/*
* Auto load old colors;
*/
-bool autoload_old_colors;
+bool_ autoload_old_colors;
/*
* Fated ?
*/
-bool fate_option;
+bool_ fate_option;
/*
* Special levels
*/
-bool *special_lvl[MAX_DUNGEON_DEPTH];
-bool generate_special_feeling = FALSE;
+bool_ *special_lvl[MAX_DUNGEON_DEPTH];
+bool_ generate_special_feeling = FALSE;
/*
* Auto more
*/
-bool auto_more;
+bool_ auto_more;
/*
* Dungeon flags
@@ -1518,7 +1518,7 @@ quest_type *quest;
/*
* Display the player as a special symbol when in bad health ?
*/
-bool player_char_health;
+bool_ player_char_health;
/*
@@ -1547,7 +1547,7 @@ s16b gen_skill_mod[MAX_SKILLS];
/*
* Display stats as linear
*/
-bool linear_stats;
+bool_ linear_stats;
/*
* Table of "cli" macros.
@@ -1568,12 +1568,12 @@ s16b max_corruptions = 0;
/*
* Ingame contextual help
*/
-bool option_ingame_help = TRUE;
+bool_ option_ingame_help = TRUE;
/*
* Automatizer enabled status
*/
-bool automatizer_enabled = FALSE;
+bool_ automatizer_enabled = FALSE;
/*
* Location of the last teleportation thath affected the level
@@ -1612,7 +1612,7 @@ timer_type *gl_timers = NULL;
const char *get_version_string()
{
static char version_str[80];
- static bool initialized = 0;
+ static bool_ initialized = 0;
if (!initialized) {
sprintf(version_str, "%s %ld.%ld.%ld%s",
game_module,
diff --git a/src/wild.c b/src/wild.c
index 07b5d239..07b96f9f 100644
--- a/src/wild.c
+++ b/src/wild.c
@@ -133,7 +133,7 @@ static void plasma_recursive(int x1, int y1, int x2, int y2,
*
* Return the number of floor grids
*/
-int generate_area(int y, int x, bool border, bool corner, bool refresh)
+int generate_area(int y, int x, bool_ border, bool_ corner, bool_ refresh)
{
int road, entrance;
int x1, y1;
@@ -344,7 +344,7 @@ static border_type border;
void wilderness_gen(int refresh)
{
int i, y, x, hack_floor;
- bool daytime;
+ bool_ daytime;
int xstart = 0;
int ystart = 0;
cave_type *c_ptr;
@@ -931,7 +931,7 @@ static void town_borders(int t_idx, int qy, int qx)
}
}
-static bool create_townpeople_hook(int r_idx)
+static bool_ create_townpeople_hook(int r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
@@ -950,7 +950,7 @@ static bool create_townpeople_hook(int r_idx)
static void town_gen_hack(int t_idx, int qy, int qx)
{
int y, x, floor, num = 0;
- bool (*old_get_mon_num_hook)(int r_idx);
+ bool_ (*old_get_mon_num_hook)(int r_idx);
int *rooms;
@@ -1041,7 +1041,7 @@ static void town_gen_hack(int t_idx, int qy, int qx)
static void town_gen_circle(int t_idx, int qy, int qx)
{
int y, x, cy, cx, rad, floor, num = 0;
- bool (*old_get_mon_num_hook)(int r_idx);
+ bool_ (*old_get_mon_num_hook)(int r_idx);
int *rooms;
diff --git a/src/wizard1.c b/src/wizard1.c
index 44b154a3..7daef324 100644
--- a/src/wizard1.c
+++ b/src/wizard1.c
@@ -1175,7 +1175,7 @@ static void spoiler_print_art(obj_desc_list *art_ptr, int name1, int set, object
/*
* Hack -- Create a "forged" artifact
*/
-static bool make_fake_artifact(object_type *o_ptr, int name1)
+static bool_ make_fake_artifact(object_type *o_ptr, int name1)
{
int i;
int cur;
@@ -1466,7 +1466,7 @@ static void spoil_mon_info(cptr fname)
{
char buf[1024];
int msex, vn, i, j, k, n;
- bool breath, magic, sin;
+ bool_ breath, magic, sin;
cptr p, q;
cptr vp[64];
u32b flags1, flags2, flags3, flags4, flags5, flags6, flags9;
diff --git a/src/wizard2.c b/src/wizard2.c
index 83bcfc05..d7bde6eb 100644
--- a/src/wizard2.c
+++ b/src/wizard2.c
@@ -808,7 +808,7 @@ static void wiz_reroll_item(object_type *o_ptr)
char ch;
- bool changed = FALSE;
+ bool_ changed = FALSE;
/* Hack -- leave artifacts alone */
@@ -921,7 +921,7 @@ static void wiz_statistics(object_type *o_ptr)
char ch;
char *quality;
- bool good, great;
+ bool_ good, great;
object_type forge;
object_type *q_ptr;
@@ -1152,7 +1152,7 @@ static void do_cmd_wiz_play(void)
char ch;
- bool changed;
+ bool_ changed;
cptr q, s;
@@ -1532,7 +1532,7 @@ static void do_cmd_wiz_summon(int num)
*
* XXX XXX XXX This function is rather dangerous
*/
-static void do_cmd_wiz_named(int r_idx, bool slp)
+static void do_cmd_wiz_named(int r_idx, bool_ slp)
{
int i, x, y;
@@ -1566,7 +1566,7 @@ static void do_cmd_wiz_named(int r_idx, bool slp)
*
* XXX XXX XXX This function is rather dangerous
*/
-void do_cmd_wiz_named_friendly(int r_idx, bool slp)
+void do_cmd_wiz_named_friendly(int r_idx, bool_ slp)
{
int i, x, y;
diff --git a/src/xtra1.c b/src/xtra1.c
index 8bc698b3..e881aa9f 100644
--- a/src/xtra1.c
+++ b/src/xtra1.c
@@ -1520,13 +1520,13 @@ static void calc_spells(void)
}
/* Ugly hack */
-bool calc_powers_silent = FALSE;
+bool_ calc_powers_silent = FALSE;
/* Calc the player powers */
static void calc_powers(void)
{
int i, p = 0;
- bool *old_powers;
+ bool_ *old_powers;
/* Hack -- wait for creation */
if (!character_generated) return;
@@ -1534,7 +1534,7 @@ static void calc_powers(void)
/* Hack -- handle "xtra" mode */
if (character_xtra) return;
- C_MAKE(old_powers, power_max, bool);
+ C_MAKE(old_powers, power_max, bool_);
/* Save old powers */
for (i = 0; i < power_max; i++) old_powers[i] = p_ptr->powers[i];
@@ -1602,7 +1602,7 @@ static void calc_powers(void)
}
calc_powers_silent = FALSE;
- C_FREE(old_powers, power_max, bool);
+ C_FREE(old_powers, power_max, bool_);
}
@@ -2647,7 +2647,7 @@ void apply_flags(u32b f1, u32b f2, u32b f3, u32b f4, u32b f5, u32b esp, s16b pva
* This function induces various "status" messages, unless silent is
* TRUE.
*/
-void calc_bonuses(bool silent)
+void calc_bonuses(bool_ silent)
{
int i, j, hold;
int old_invis;
@@ -4429,7 +4429,7 @@ void handle_stuff(void)
}
-bool monk_empty_hands(void)
+bool_ monk_empty_hands(void)
{
int i;
object_type *o_ptr;
@@ -4449,7 +4449,7 @@ bool monk_empty_hands(void)
return TRUE;
}
-bool monk_heavy_armor(void)
+bool_ monk_heavy_armor(void)
{
u16b monk_arm_wgt = 0;
@@ -4749,7 +4749,7 @@ void dump_fates(FILE *outfile)
{
int i;
char buf[120];
- bool pending = FALSE;
+ bool_ pending = FALSE;
if (!outfile) return;
diff --git a/src/xtra2.c b/src/xtra2.c
index a3d599b3..f425acf8 100644
--- a/src/xtra2.c
+++ b/src/xtra2.c
@@ -16,7 +16,7 @@
/*
* Invoke The Rush
*/
-bool set_rush(int v)
+bool_ set_rush(int v)
{
int j;
@@ -55,9 +55,9 @@ bool set_rush(int v)
* Set "p_ptr->parasite" and "p_ptr->parasite_r_idx"
* notice observable changes
*/
-bool set_parasite(int v, int r)
+bool_ set_parasite(int v, int r)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -127,9 +127,9 @@ bool set_parasite(int v, int r)
* Set "p_ptr->tim_project" and others
* notice observable changes
*/
-bool set_project(int v, s16b gf, s16b dam, s16b rad, s16b flag)
+bool_ set_project(int v, s16b gf, s16b dam, s16b rad, s16b flag)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -180,9 +180,9 @@ bool set_project(int v, s16b gf, s16b dam, s16b rad, s16b flag)
* Set "p_ptr->tim_roots" and others
* notice observable changes
*/
-bool set_roots(int v, s16b ac, s16b dam)
+bool_ set_roots(int v, s16b ac, s16b dam)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -231,9 +231,9 @@ bool set_roots(int v, s16b ac, s16b dam)
* Set "p_ptr->tim_(magic|water)_breath" and others
* notice observable changes
*/
-bool set_tim_breath(int v, bool magical)
+bool_ set_tim_breath(int v, bool_ magical)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -305,9 +305,9 @@ bool set_tim_breath(int v, bool magical)
* Set "p_ptr->absorb_soul"
* notice observable changes
*/
-bool set_absorb_soul(int v)
+bool_ set_absorb_soul(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -354,9 +354,9 @@ bool set_absorb_soul(int v)
* Set "p_ptr->disrupt_shield"
* notice observable changes
*/
-bool set_disrupt_shield(int v)
+bool_ set_disrupt_shield(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -403,9 +403,9 @@ bool set_disrupt_shield(int v)
* Set "p_ptr->prob_travel"
* notice observable changes
*/
-bool set_prob_travel(int v)
+bool_ set_prob_travel(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -452,9 +452,9 @@ bool set_prob_travel(int v)
* Set "p_ptr->tim_invis", and "p_ptr->tim_inv_pow",
* notice observable changes
*/
-bool set_invis(int v, int p)
+bool_ set_invis(int v, int p)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -503,9 +503,9 @@ bool set_invis(int v, int p)
* Set "p_ptr->tim_poison",
* notice observable changes
*/
-bool set_poison(int v)
+bool_ set_poison(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -551,9 +551,9 @@ bool set_poison(int v)
/*
* Set "no_breeds"
*/
-bool set_no_breeders(int v)
+bool_ set_no_breeders(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -599,9 +599,9 @@ bool set_no_breeders(int v)
/*
* Set "p_ptr->tim_deadly"
*/
-bool set_tim_deadly(int v)
+bool_ set_tim_deadly(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -647,9 +647,9 @@ bool set_tim_deadly(int v)
/*
* Set "p_ptr->tim_ffall"
*/
-bool set_tim_ffall(int v)
+bool_ set_tim_ffall(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -695,9 +695,9 @@ bool set_tim_ffall(int v)
/*
* Set "p_ptr->tim_fly"
*/
-bool set_tim_fly(int v)
+bool_ set_tim_fly(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -743,9 +743,9 @@ bool set_tim_fly(int v)
/*
* Set "p_ptr->meditation"
*/
-bool set_meditation(int v)
+bool_ set_meditation(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -792,9 +792,9 @@ bool set_meditation(int v)
/*
* Set "p_ptr->tim_reflect"
*/
-bool set_tim_reflect(int v)
+bool_ set_tim_reflect(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -840,9 +840,9 @@ bool set_tim_reflect(int v)
/*
* Set "p_ptr->tim_res_time"
*/
-bool set_tim_res_time(int v)
+bool_ set_tim_res_time(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -888,9 +888,9 @@ bool set_tim_res_time(int v)
/*
* Set "p_ptr->tim_fire_aura"
*/
-bool set_tim_fire_aura(int v)
+bool_ set_tim_fire_aura(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -936,9 +936,9 @@ bool set_tim_fire_aura(int v)
/*
* Set "p_ptr->strike"
*/
-bool set_strike(int v)
+bool_ set_strike(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -984,9 +984,9 @@ bool set_strike(int v)
/*
* Set "p_ptr->oppose_ld"
*/
-bool set_oppose_ld(int v)
+bool_ set_oppose_ld(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1032,9 +1032,9 @@ bool set_oppose_ld(int v)
/*
* Set "p_ptr->oppose_cc"
*/
-bool set_oppose_cc(int v)
+bool_ set_oppose_cc(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1080,9 +1080,9 @@ bool set_oppose_cc(int v)
/*
* Set "p_ptr->oppose_ss"
*/
-bool set_oppose_ss(int v)
+bool_ set_oppose_ss(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1128,9 +1128,9 @@ bool set_oppose_ss(int v)
/*
* Set "p_ptr->oppose_nex"
*/
-bool set_oppose_nex(int v)
+bool_ set_oppose_nex(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1177,9 +1177,9 @@ bool set_oppose_nex(int v)
* Set "p_ptr->tim_mimic", and "p_ptr->mimic_form",
* notice observable changes
*/
-bool set_mimic(int v, int p, int level)
+bool_ set_mimic(int v, int p, int level)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1240,9 +1240,9 @@ bool set_mimic(int v, int p, int level)
* Note that blindness is currently the only thing which can affect
* "player_can_see_bold()".
*/
-bool set_blind(int v)
+bool_ set_blind(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1303,9 +1303,9 @@ bool set_blind(int v)
* Note that blindness is currently the only thing which can affect
* "player_can_see_bold()".
*/
-bool set_lite(int v)
+bool_ set_lite(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1358,9 +1358,9 @@ bool set_lite(int v)
/*
* Set "p_ptr->confused", notice observable changes
*/
-bool set_confused(int v)
+bool_ set_confused(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1408,9 +1408,9 @@ bool set_confused(int v)
/*
* Set "p_ptr->poisoned", notice observable changes
*/
-bool set_poisoned(int v)
+bool_ set_poisoned(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1458,9 +1458,9 @@ bool set_poisoned(int v)
/*
* Set "p_ptr->afraid", notice observable changes
*/
-bool set_afraid(int v)
+bool_ set_afraid(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1508,9 +1508,9 @@ bool set_afraid(int v)
/*
* Set "p_ptr->paralyzed", notice observable changes
*/
-bool set_paralyzed(int v)
+bool_ set_paralyzed(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1560,9 +1560,9 @@ bool set_paralyzed(int v)
*
* Note that we must redraw the map when hallucination changes.
*/
-bool set_image(int v)
+bool_ set_image(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1615,9 +1615,9 @@ bool set_image(int v)
/*
* Set "p_ptr->lightspeed", notice observable changes
*/
-bool set_light_speed(int v)
+bool_ set_light_speed(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1661,9 +1661,9 @@ bool set_light_speed(int v)
return (TRUE);
}
-bool set_fast(int v, int p)
+bool_ set_fast(int v, int p)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1713,9 +1713,9 @@ bool set_fast(int v, int p)
/*
* Set "p_ptr->slow", notice observable changes
*/
-bool set_slow(int v)
+bool_ set_slow(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1763,9 +1763,9 @@ bool set_slow(int v)
/*
* Set "p_ptr->shield", notice observable changes
*/
-bool set_shield(int v, int p, s16b o, s16b d1, s16b d2)
+bool_ set_shield(int v, int p, s16b o, s16b d1, s16b d2)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1819,9 +1819,9 @@ bool set_shield(int v, int p, s16b o, s16b d1, s16b d2)
/*
* Set "p_ptr->blessed", notice observable changes
*/
-bool set_blessed(int v)
+bool_ set_blessed(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1869,9 +1869,9 @@ bool set_blessed(int v)
/*
* Set "p_ptr->hero", notice observable changes
*/
-bool set_hero(int v)
+bool_ set_hero(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1921,9 +1921,9 @@ bool set_hero(int v)
/*
* Set "p_ptr->holy", notice observable changes
*/
-bool set_holy(int v)
+bool_ set_holy(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -1970,9 +1970,9 @@ bool set_holy(int v)
/*
* Set "p_ptr->walk_water", notice observable changes
*/
-bool set_walk_water(int v)
+bool_ set_walk_water(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2019,9 +2019,9 @@ bool set_walk_water(int v)
/*
* Set "p_ptr->shero", notice observable changes
*/
-bool set_shero(int v)
+bool_ set_shero(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2090,9 +2090,9 @@ bool set_shero(int v)
/*
* Set "p_ptr->protevil", notice observable changes
*/
-bool set_protevil(int v)
+bool_ set_protevil(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2136,9 +2136,9 @@ bool set_protevil(int v)
/*
* Set "p_ptr->protgood", notice observable changes
*/
-bool set_protgood(int v)
+bool_ set_protgood(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2182,9 +2182,9 @@ bool set_protgood(int v)
/*
* Set "p_ptr->protundead", notice observable changes
*/
-bool set_protundead(int v)
+bool_ set_protundead(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2228,9 +2228,9 @@ bool set_protundead(int v)
/*
* Set "p_ptr->set_shadow", notice observable changes
*/
-bool set_shadow(int v)
+bool_ set_shadow(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2306,9 +2306,9 @@ bool set_shadow(int v)
/*
* Set "p_ptr->invuln", notice observable changes
*/
-bool set_invuln(int v)
+bool_ set_invuln(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2383,9 +2383,9 @@ bool set_invuln(int v)
/*
* Set "p_ptr->tim_esp", notice observable changes
*/
-bool set_tim_esp(int v)
+bool_ set_tim_esp(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2435,9 +2435,9 @@ bool set_tim_esp(int v)
/*
* Set "p_ptr->tim_thunder", notice observable changes
*/
-bool set_tim_thunder(int v, int p1, int p2)
+bool_ set_tim_thunder(int v, int p1, int p2)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2490,9 +2490,9 @@ bool set_tim_thunder(int v, int p1, int p2)
/*
* Set "p_ptr->tim_invis", notice observable changes
*/
-bool set_tim_invis(int v)
+bool_ set_tim_invis(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2543,9 +2543,9 @@ bool set_tim_invis(int v)
/*
* Set "p_ptr->tim_infra", notice observable changes
*/
-bool set_tim_infra(int v)
+bool_ set_tim_infra(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2596,9 +2596,9 @@ bool set_tim_infra(int v)
/*
* Set "p_ptr->tim_mental_barrier", notice observable changes
*/
-bool set_mental_barrier(int v)
+bool_ set_mental_barrier(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2642,9 +2642,9 @@ bool set_mental_barrier(int v)
/*
* Set "p_ptr->oppose_acid", notice observable changes
*/
-bool set_oppose_acid(int v)
+bool_ set_oppose_acid(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2689,9 +2689,9 @@ bool set_oppose_acid(int v)
/*
* Set "p_ptr->oppose_elec", notice observable changes
*/
-bool set_oppose_elec(int v)
+bool_ set_oppose_elec(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2736,9 +2736,9 @@ bool set_oppose_elec(int v)
/*
* Set "p_ptr->oppose_fire", notice observable changes
*/
-bool set_oppose_fire(int v)
+bool_ set_oppose_fire(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2783,9 +2783,9 @@ bool set_oppose_fire(int v)
/*
* Set "p_ptr->oppose_cold", notice observable changes
*/
-bool set_oppose_cold(int v)
+bool_ set_oppose_cold(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2830,9 +2830,9 @@ bool set_oppose_cold(int v)
/*
* Set "p_ptr->oppose_pois", notice observable changes
*/
-bool set_oppose_pois(int v)
+bool_ set_oppose_pois(int v)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2877,9 +2877,9 @@ bool set_oppose_pois(int v)
/*
* Set "p_ptr->tim_regen", notice observable changes
*/
-bool set_tim_regen(int v, int p)
+bool_ set_tim_regen(int v, int p)
{
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2928,10 +2928,10 @@ bool set_tim_regen(int v, int p)
*
* Note the special code to only notice "range" changes.
*/
-bool set_stun(int v)
+bool_ set_stun(int v)
{
int old_aux, new_aux;
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
@@ -3089,11 +3089,11 @@ bool set_stun(int v)
*
* Note the special code to only notice "range" changes.
*/
-bool set_cut(int v)
+bool_ set_cut(int v)
{
int old_aux, new_aux;
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -3328,11 +3328,11 @@ void drop_from_wild()
* game turns, or 500/(100/5) = 25 player turns (if nothing else is
* affecting the player speed).
*/
-bool set_food(int v)
+bool_ set_food(int v)
{
int old_aux, new_aux;
- bool notice = FALSE;
+ bool_ notice = FALSE;
/* Hack -- Force good values */
v = (v > 20000) ? 20000 : (v < 0) ? 0 : v;
@@ -3512,8 +3512,8 @@ bool set_food(int v)
void check_experience(void)
{
int i, gained = 0;
- bool level_reward = FALSE;
- bool level_corruption = FALSE;
+ bool_ level_reward = FALSE;
+ bool_ level_corruption = FALSE;
/* Note current level */
@@ -3915,11 +3915,11 @@ void monster_death(int m_idx)
monster_race *r_ptr = race_inf(m_ptr);
- bool visible = (m_ptr->ml || (r_ptr->flags1 & (RF1_UNIQUE)));
+ bool_ visible = (m_ptr->ml || (r_ptr->flags1 & (RF1_UNIQUE)));
- bool cloned = FALSE;
- bool create_stairs = FALSE;
+ bool_ cloned = FALSE;
+ bool_ create_stairs = FALSE;
int force_coin = get_coin_type(r_ptr);
object_type forge;
@@ -4518,7 +4518,7 @@ void monster_death(int m_idx)
* monster worth more than subsequent monsters. This would also need
* to induce changes in the monster recall code.
*/
-bool mon_take_hit(int m_idx, int dam, bool *fear, cptr note)
+bool_ mon_take_hit(int m_idx, int dam, bool_ *fear, cptr note)
{
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = race_inf(m_ptr);
@@ -4896,7 +4896,7 @@ static void panel_bounds(void)
*
* Also used in do_cmd_locate()
*/
-bool change_panel(int dy, int dx)
+bool_ change_panel(int dy, int dx)
{
int y, x;
int wid, hgt;
@@ -5168,7 +5168,7 @@ cptr look_mon_desc(int m_idx)
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = race_inf(m_ptr);
- bool living = TRUE;
+ bool_ living = TRUE;
int perc;
@@ -5292,7 +5292,7 @@ void ang_sort(vptr u, vptr v, int n)
* Future versions may restrict the ability to target "trappers"
* and "mimics", but the semantics is a little bit weird.
*/
-bool target_able(int m_idx)
+bool_ target_able(int m_idx)
{
monster_type *m_ptr = &m_list[m_idx];
@@ -5329,7 +5329,7 @@ bool target_able(int m_idx)
*
* We return TRUE if the target is "okay" and FALSE otherwise.
*/
-bool target_okay(void)
+bool_ target_okay(void)
{
/* Accept stationary targets */
if (target_who < 0) return (TRUE);
@@ -5363,7 +5363,7 @@ bool target_okay(void)
* We use "u" and "v" to point to arrays of "x" and "y" positions,
* and sort the arrays by double-distance to the player.
*/
-static bool ang_sort_comp_distance(vptr u, vptr v, int a, int b)
+static bool_ ang_sort_comp_distance(vptr u, vptr v, int a, int b)
{
byte *x = (byte*)(u);
byte *y = (byte*)(v);
@@ -5479,7 +5479,7 @@ static s16b target_pick(int y1, int x1, int dy, int dx)
/*
* Hack -- determine if a given location is "interesting"
*/
-static bool target_set_accept(int y, int x)
+static bool_ target_set_accept(int y, int x)
{
cave_type *c_ptr;
@@ -5586,7 +5586,7 @@ static void target_set_prepare(int mode)
}
-bool target_object(int y, int x, int mode, cptr info, bool *boring,
+bool_ target_object(int y, int x, int mode, cptr info, bool_ *boring,
object_type *o_ptr, char *out_val, cptr *s1, cptr *s2, cptr *s3,
int *query)
{
@@ -5650,7 +5650,7 @@ static int target_set_aux(int y, int x, int mode, cptr info)
cptr s1, s2, s3;
- bool boring;
+ bool_ boring;
int feat;
@@ -5727,7 +5727,7 @@ static int target_set_aux(int y, int x, int mode, cptr info)
/* Visible */
if (m_ptr->ml)
{
- bool recall = FALSE;
+ bool_ recall = FALSE;
char m_name[80];
@@ -6088,15 +6088,15 @@ static int target_set_aux(int y, int x, int mode, cptr info)
* This command will cancel any old target, even if used from
* inside the "look" command.
*/
-bool target_set(int mode)
+bool_ target_set(int mode)
{
int i, d, m;
int y = p_ptr->py;
int x = p_ptr->px;
- bool done = FALSE;
+ bool_ done = FALSE;
- bool flag = TRUE;
+ bool_ flag = TRUE;
char query;
@@ -6478,7 +6478,7 @@ bool target_set(int mode)
*
* Note that confusion over-rides any (explicit?) user choice.
*/
-bool get_aim_dir(int *dp)
+bool_ get_aim_dir(int *dp)
{
int dir;
@@ -6608,7 +6608,7 @@ bool get_aim_dir(int *dp)
* This function tracks and uses the "global direction", and uses
* that as the "desired direction", to which "confusion" is applied.
*/
-bool get_rep_dir(int *dp)
+bool_ get_rep_dir(int *dp)
{
int dir;
@@ -7111,12 +7111,12 @@ void gain_level_reward(int chosen_reward)
/*
* old -- from PsiAngband.
*/
-bool tgt_pt(int *x, int *y)
+bool_ tgt_pt(int *x, int *y)
{
char ch = 0;
int d, cu, cv;
int screen_wid, screen_hgt;
- bool success = FALSE;
+ bool_ success = FALSE;
*x = p_ptr->px;
*y = p_ptr->py;
@@ -7169,25 +7169,25 @@ bool tgt_pt(int *x, int *y)
}
-bool gain_random_corruption(int choose_mut)
+bool_ gain_random_corruption(int choose_mut)
{
exec_lua("gain_corruption()");
return (FALSE);
}
-bool lose_corruption(int choose_mut)
+bool_ lose_corruption(int choose_mut)
{
exec_lua("lose_corruption()");
return (FALSE);
}
-bool lose_all_corruptions(void)
+bool_ lose_all_corruptions(void)
{
exec_lua("lose_all_corruptions()");
return (FALSE);
}
-bool get_hack_dir(int *dp)
+bool_ get_hack_dir(int *dp)
{
int dir;
cptr p;
@@ -7286,7 +7286,7 @@ bool get_hack_dir(int *dp)
/*
* Do we have at least one corruption?
*/
-bool got_corruptions()
+bool_ got_corruptions()
{
int i, max;
@@ -7305,7 +7305,7 @@ bool got_corruptions()
/*
* Dump the corruption list
*/
-void dump_corruptions(FILE *fff, bool color)
+void dump_corruptions(FILE *fff, bool_ color)
{
int i, max;
@@ -7341,7 +7341,7 @@ void set_grace(s32b v)
handle_stuff();
}
-bool test_object_wish(char *name, object_type *o_ptr, object_type *forge, char *what)
+bool_ test_object_wish(char *name, object_type *o_ptr, object_type *forge, char *what)
{
int i, j, jb, save_aware;
char buf[200];
@@ -7378,7 +7378,7 @@ bool test_object_wish(char *name, object_type *o_ptr, object_type *forge, char *
for (j = max_e_idx - 1; j >= 0; j--)
{
ego_item_type *e_ptr = &e_info[j];
- bool ok = FALSE;
+ bool_ ok = FALSE;
if (j && !e_ptr->name) continue;
@@ -7406,7 +7406,7 @@ bool test_object_wish(char *name, object_type *o_ptr, object_type *forge, char *
for (jb = max_e_idx - 1; jb >= 0; jb--)
{
ego_item_type *eb_ptr = &e_info[jb];
- bool ok = FALSE;
+ bool_ ok = FALSE;
if (jb && !eb_ptr->name) continue;
@@ -7654,7 +7654,7 @@ void switch_subclass(int sclass)
/*
* Change to an other subrace
*/
-void switch_subrace(int racem, bool copy_old)
+void switch_subrace(int racem, bool_ copy_old)
{
if ((racem < 0) && (racem >= max_rmp_idx)) return;
diff --git a/src/z-form.c b/src/z-form.c
index 1ad92156..b3d5d005 100644
--- a/src/z-form.c
+++ b/src/z-form.c
@@ -229,10 +229,10 @@ uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp)
cptr s;
/* The argument is "long" */
- bool do_long;
+ bool_ do_long;
/* The argument needs "processing" */
- bool do_xtra;
+ bool_ do_xtra;
/* Bytes used in buffer */
uint n;
diff --git a/src/z-rand.c b/src/z-rand.c
index 2f24b9b0..ca5b49ae 100644
--- a/src/z-rand.c
+++ b/src/z-rand.c
@@ -47,7 +47,7 @@
/*
* Use the "simple" LCRNG
*/
-bool Rand_quick = TRUE;
+bool_ Rand_quick = TRUE;
/*
diff --git a/src/z-rand.h b/src/z-rand.h
index 6ff2dc64..39cc958c 100644
--- a/src/z-rand.h
+++ b/src/z-rand.h
@@ -71,7 +71,7 @@ extern "C" {
/**** Available Variables ****/
-extern bool Rand_quick;
+extern bool_ Rand_quick;
extern u32b Rand_value;
extern u16b Rand_place;
extern u32b Rand_state[RAND_DEG];
diff --git a/src/z-term.c b/src/z-term.c
index 1570b9b2..25a25f01 100644
--- a/src/z-term.c
+++ b/src/z-term.c
@@ -2483,7 +2483,7 @@ errr Term_key_push(int k)
*
* Remove the keypress if "take" is true.
*/
-errr Term_inkey(char *ch, bool wait, bool take)
+errr Term_inkey(char *ch, bool_ wait, bool_ take)
{
/* Assume no key */
(*ch) = '\0';
@@ -2636,7 +2636,7 @@ errr Term_load(void)
/*
* Same as previous but allow to save more than one
*/
-errr Term_load_from(term_win *save, bool final)
+errr Term_load_from(term_win *save, bool_ final)
{
int y;
diff --git a/src/z-term.h b/src/z-term.h
index dae2e1bd..bcf1373b 100644
--- a/src/z-term.h
+++ b/src/z-term.h
@@ -39,7 +39,7 @@ typedef struct term_win term_win;
struct term_win
{
- bool cu, cv;
+ bool_ cu, cv;
byte cx, cy;
byte **a;
@@ -177,22 +177,22 @@ struct term
vptr data;
- bool user_flag;
+ bool_ user_flag;
- bool data_flag;
+ bool_ data_flag;
- bool active_flag;
- bool mapped_flag;
- bool total_erase;
- bool fixed_shape;
- bool icky_corner;
- bool soft_cursor;
- bool always_pict;
- bool higher_pict;
- bool always_text;
- bool unused_flag;
- bool never_bored;
- bool never_frosh;
+ bool_ active_flag;
+ bool_ mapped_flag;
+ bool_ total_erase;
+ bool_ fixed_shape;
+ bool_ icky_corner;
+ bool_ soft_cursor;
+ bool_ always_pict;
+ bool_ higher_pict;
+ bool_ always_text;
+ bool_ unused_flag;
+ bool_ never_bored;
+ bool_ never_frosh;
byte attr_blank;
char char_blank;
@@ -346,12 +346,12 @@ extern errr Term_what(int x, int y, byte *a, char *c);
extern errr Term_flush(void);
extern errr Term_keypress(int k);
extern errr Term_key_push(int k);
-extern errr Term_inkey(char *ch, bool wait, bool take);
+extern errr Term_inkey(char *ch, bool_ wait, bool_ take);
extern errr Term_save(void);
extern term_win* Term_save_to(void);
extern errr Term_load(void);
-extern errr Term_load_from(term_win *save, bool final);
+extern errr Term_load_from(term_win *save, bool_ final);
extern errr Term_exchange(void);
diff --git a/src/z-util.c b/src/z-util.c
index f0842b07..76120833 100644
--- a/src/z-util.c
+++ b/src/z-util.c
@@ -30,12 +30,12 @@ vptr vptr_tmp = NULL;
/*
* Constant bool meaning true
*/
-bool bool_true = 1;
+bool_ bool_true = 1;
/*
* Constant bool meaning false
*/
-bool bool_false = 0;
+bool_ bool_false = 0;
/*
@@ -105,7 +105,7 @@ errr func_failure(void)
/*
* A routine that always returns "true"
*/
-bool func_true(void)
+bool_ func_true(void)
{
return (1);
}
@@ -114,7 +114,7 @@ bool func_true(void)
/*
* A routine that always returns "false"
*/
-bool func_false(void)
+bool_ func_false(void)
{
return (0);
}
@@ -125,7 +125,7 @@ bool func_false(void)
/*
* Determine if string "t" is equal to string "t"
*/
-bool streq(cptr a, cptr b)
+bool_ streq(cptr a, cptr b)
{
return (!strcmp(a, b));
}
@@ -134,7 +134,7 @@ bool streq(cptr a, cptr b)
/*
* Determine if string "t" is a suffix of string "s"
*/
-bool suffix(cptr s, cptr t)
+bool_ suffix(cptr s, cptr t)
{
int tlen = strlen(t);
int slen = strlen(s);
diff --git a/src/z-util.h b/src/z-util.h
index 3fff283d..11dbdb4e 100644
--- a/src/z-util.h
+++ b/src/z-util.h
@@ -63,14 +63,14 @@ extern errr func_problem(void);
extern errr func_failure(void);
/* Functions that return bools */
-extern bool func_true(void);
-extern bool func_false(void);
+extern bool_ func_true(void);
+extern bool_ func_false(void);
/* Test equality, prefix, suffix */
-extern bool streq(cptr s, cptr t);
-extern bool prefix(cptr s, cptr t);
-extern bool suffix(cptr s, cptr t);
+extern bool_ streq(cptr s, cptr t);
+extern bool_ prefix(cptr s, cptr t);
+extern bool_ suffix(cptr s, cptr t);
/* Print an error message */