summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/birth.c3
-rw-r--r--src/bldg.c3
-rw-r--r--src/cave.c5
-rw-r--r--src/cmd1.c11
-rw-r--r--src/cmd2.c8
-rw-r--r--src/cmd4.c3
-rw-r--r--src/cmd5.c3
-rw-r--r--src/cmd6.c8
-rw-r--r--src/cmd7.c22
-rw-r--r--src/dungeon.c8
-rw-r--r--src/externs.h1
-rw-r--r--src/files.c20
-rw-r--r--src/generate.c16
-rw-r--r--src/gods.c3
-rw-r--r--src/init1.c3
-rw-r--r--src/init2.c10
-rw-r--r--src/loadsave.c15
-rw-r--r--src/main-x11.c6
-rw-r--r--src/melee1.c6
-rw-r--r--src/melee2.c2
-rw-r--r--src/monster1.c2
-rw-r--r--src/monster2.c6
-rw-r--r--src/notes.c3
-rw-r--r--src/object2.c4
-rw-r--r--src/q_one.c2
-rw-r--r--src/q_thrain.c3
-rw-r--r--src/spells1.c3
-rw-r--r--src/spells2.c4
-rw-r--r--src/traps.c2
-rw-r--r--src/util.c3
-rw-r--r--src/variable.c5
-rw-r--r--src/wizard2.c8
-rw-r--r--src/xtra1.c10
-rw-r--r--src/xtra2.c15
34 files changed, 25 insertions, 201 deletions
diff --git a/src/birth.c b/src/birth.c
index 1705309e..f073b2f6 100644
--- a/src/birth.c
+++ b/src/birth.c
@@ -1093,9 +1093,8 @@ static void player_outfit(void)
/*
* Get an adventurer guide describing a bit of the
- * wilderness(useless for vanilla town)
+ * wilderness.
*/
- if (!vanilla_town)
{
object_type forge;
object_type *q_ptr = &forge;
diff --git a/src/bldg.c b/src/bldg.c
index 53dc6765..242fe3c0 100644
--- a/src/bldg.c
+++ b/src/bldg.c
@@ -2097,8 +2097,6 @@ void do_cmd_bldg(void)
store_type *s_ptr;
- store_info_type *st_ptr;
-
store_action_type *ba_ptr;
@@ -2112,7 +2110,6 @@ void do_cmd_bldg(void)
building_loc = which;
s_ptr = &town_info[p_ptr->town_num].store[which];
- st_ptr = &st_info[which];
p_ptr->oldpy = p_ptr->py;
p_ptr->oldpx = p_ptr->px;
diff --git a/src/cave.c b/src/cave.c
index 52e3bdc7..81ee0a58 100644
--- a/src/cave.c
+++ b/src/cave.c
@@ -3543,14 +3543,11 @@ errr vinfo_init(void)
{
int e;
- vinfo_type *p;
-
-
/* Index */
e = queue_head;
/* Dequeue next grid */
- p = queue[queue_head++];
+ queue_head++;
/* Location of main grid */
y = vinfo[e].grid_y[0];
diff --git a/src/cmd1.c b/src/cmd1.c
index 85e76900..78dac79a 100644
--- a/src/cmd1.c
+++ b/src/cmd1.c
@@ -727,8 +727,6 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
monster_race *tr_ptr = race_inf(t_ptr);
- cave_type *c_ptr;
-
int ap_cnt;
int ac, rlev, pt;
@@ -752,8 +750,6 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
o_ptr = &p_ptr->inventory[INVEN_CARRY];
if (!o_ptr->k_idx) return;
- c_ptr = &cave[y][x];
-
r_ptr = &r_info[o_ptr->pval];
/* Not allowed to attack */
@@ -1368,8 +1364,6 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
monster_race *tr_ptr = race_inf(t_ptr);
- cave_type *c_ptr;
-
int ap_cnt;
int ac, rlev, pt;
@@ -1387,8 +1381,6 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
if (!p_ptr->body_monster) return;
- c_ptr = &cave[y][x];
-
r_ptr = race_info_idx(p_ptr->body_monster, 0);
/* Not allowed to attack */
@@ -2403,8 +2395,6 @@ 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;
-
int weap;
/* Disturb the player */
@@ -2875,7 +2865,6 @@ void py_attack(int y, int x, int max_blow)
msg_format("%^s disappears!", m_name);
teleport_away(c_ptr->m_idx, 50);
num = num_blow + 1; /* Can't hit it anymore! */
- no_extra = TRUE;
}
else if ((chaos_effect == 5) && cave_floor_bold(y, x) &&
diff --git a/src/cmd2.c b/src/cmd2.c
index bf7899aa..633ad660 100644
--- a/src/cmd2.c
+++ b/src/cmd2.c
@@ -31,8 +31,6 @@ static bool_ do_cmd_bash_fountain(int y, int x)
{
int bash, temp;
- cave_type *c_ptr;
-
bool_ more = TRUE;
monster_race *r_ptr = &r_info[p_ptr->body_monster];
@@ -48,9 +46,6 @@ static bool_ do_cmd_bash_fountain(int y, int x)
/* Take a turn */
energy_use = 100;
- /* Get grid */
- c_ptr = &cave[y][x];
-
/* Message */
msg_print("You smash into the fountain!");
@@ -3917,8 +3912,6 @@ void do_cmd_boomerang(void)
bool_ hit_body = FALSE;
- bool_ hit_wall = FALSE;
-
byte missile_attr;
char missile_char;
@@ -4016,7 +4009,6 @@ void do_cmd_boomerang(void)
/* Stopped by walls/doors */
if (!cave_floor_bold(ny, nx))
{
- hit_wall = TRUE;
break;
}
diff --git a/src/cmd4.c b/src/cmd4.c
index 87c07dae..ce5e6d58 100644
--- a/src/cmd4.c
+++ b/src/cmd4.c
@@ -3792,8 +3792,6 @@ static void do_cmd_knowledge_pets(void)
monster_type *m_ptr;
- monster_race *r_ptr;
-
int t_friends = 0;
int t_levels = 0;
@@ -3818,7 +3816,6 @@ static void do_cmd_knowledge_pets(void)
{
/* Access the monster */
m_ptr = &m_list[i];
- r_ptr = &r_info[m_ptr->r_idx];
/* Ignore "dead" monsters */
if (!m_ptr->r_idx) continue;
diff --git a/src/cmd5.c b/src/cmd5.c
index 3f5d4e8c..8495f562 100644
--- a/src/cmd5.c
+++ b/src/cmd5.c
@@ -465,8 +465,6 @@ void fetch(int dir, int wgt, bool_ require_los)
{
int ty, tx, i;
- bool_ flag;
-
cave_type *c_ptr;
object_type *o_ptr;
@@ -512,7 +510,6 @@ void fetch(int dir, int wgt, bool_ require_los)
/* Use a direction */
ty = p_ptr->py; /* Where to drop the item */
tx = p_ptr->px;
- flag = FALSE;
while (1)
{
diff --git a/src/cmd6.c b/src/cmd6.c
index 34218b5d..8098d650 100644
--- a/src/cmd6.c
+++ b/src/cmd6.c
@@ -4155,8 +4155,6 @@ void zap_combine_rod_tip(object_type *q_ptr, int tip_item)
object_type *o_ptr;
- object_kind *k_ptr;
-
cptr q, s;
u32b f1, f2, f3, f4, f5, esp;
@@ -4182,14 +4180,12 @@ void zap_combine_rod_tip(object_type *q_ptr, int tip_item)
if (item >= 0)
{
o_ptr = &p_ptr->inventory[item];
- k_ptr = &k_info[o_ptr->k_idx];
}
/* Get the item (on the floor) */
else
{
o_ptr = &o_list[0 - item];
- k_ptr = &k_info[o_ptr->k_idx];
}
/* Examine the rod */
@@ -4246,8 +4242,6 @@ void do_cmd_zap_rod(void)
object_type *o_ptr;
- object_kind *k_ptr;
-
object_kind *tip_ptr;
u32b f1, f2, f3, f4, f5, esp;
@@ -4282,14 +4276,12 @@ void do_cmd_zap_rod(void)
if (item >= 0)
{
o_ptr = &p_ptr->inventory[item];
- k_ptr = &k_info[o_ptr->k_idx];
}
/* Get the item (on the floor) */
else
{
o_ptr = &o_list[0 - item];
- k_ptr = &k_info[o_ptr->k_idx];
}
diff --git a/src/cmd7.c b/src/cmd7.c
index 53ab47c7..f1584f43 100644
--- a/src/cmd7.c
+++ b/src/cmd7.c
@@ -4892,18 +4892,6 @@ void brand_ammo(int brand_type, int bolts_only)
{
int a;
- int allowable;
-
-
- if (bolts_only)
- {
- allowable = TV_BOLT;
- }
- else
- {
- allowable = TV_BOLT | TV_ARROW | TV_SHOT;
- }
-
for (a = 0; a < INVEN_PACK; a++)
{
object_type *o_ptr = &p_ptr->inventory[a];
@@ -5349,7 +5337,6 @@ void do_cmd_archer(void)
*/
void do_cmd_set_piercing(void)
{
- int ext = 0;
char ch;
char com[80];
@@ -5366,7 +5353,6 @@ void do_cmd_set_piercing(void)
{
if (!get_com(com, &ch))
{
- ext = 0;
break;
}
if ((ch == 'Y') || (ch == 'y'))
@@ -7011,7 +6997,7 @@ void do_cmd_summoner_extract()
cptr q, s;
- int item, r, e;
+ int item, r;
bool_ partial;
@@ -7059,7 +7045,6 @@ void do_cmd_summoner_extract()
}
r = o_ptr->pval2;
- e = o_ptr->pval3;
if (item > 0)
{
@@ -7461,8 +7446,6 @@ void do_cmd_symbiotic(void)
int plev = get_skill(SKILL_SYMBIOTIC);
magic_power spell;
- monster_race *r_ptr;
-
/* Get the carried monster */
object_type *o_ptr = &p_ptr->inventory[INVEN_CARRY];
@@ -7686,8 +7669,6 @@ void do_cmd_symbiotic(void)
break;
}
- r_ptr = &r_info[o_ptr->pval];
-
percent1 = p_ptr->chp;
percent1 = (percent1 * 100) / p_ptr->mhp;
@@ -7739,7 +7720,6 @@ void do_cmd_symbiotic(void)
break;
}
- r_ptr = &r_info[o_ptr->pval];
hp = o_ptr->pval3 * (15 + get_skill_scale(SKILL_SYMBIOTIC, 35)) / 100;
o_ptr->pval2 += hp;
if (o_ptr->pval2 > o_ptr->pval3) o_ptr->pval2 = o_ptr->pval3;
diff --git a/src/dungeon.c b/src/dungeon.c
index 88bda7db..f5de2a61 100644
--- a/src/dungeon.c
+++ b/src/dungeon.c
@@ -1042,7 +1042,6 @@ static void process_world(void)
cave_type *c_ptr;
object_type *o_ptr;
- object_kind *k_ptr;
u32b f1 = 0 , f2 = 0 , f3 = 0, f4 = 0, f5 = 0, esp = 0;
@@ -2818,7 +2817,6 @@ static void process_world(void)
for (j = 0, i = 0; i < INVEN_TOTAL; i++)
{
o_ptr = &p_ptr->inventory[i];
- k_ptr = &k_info[o_ptr->k_idx];
/* Skip non-objects */
if (!o_ptr->k_idx) continue;
@@ -3498,10 +3496,6 @@ static void process_command(void)
{
do_cmd_go_up();
}
- else if (vanilla_town)
- {
- /* Do nothing */
- }
/* Don't let the player < when he'd just drop right back down */
else if (p_ptr->food < PY_FOOD_ALERT)
{
@@ -4368,11 +4362,9 @@ void process_player(void)
{
bool_ stop = TRUE;
object_type *o_ptr;
- monster_race *r_ptr;
/* Get the carried monster */
o_ptr = &p_ptr->inventory[INVEN_CARRY];
- r_ptr = &r_info[o_ptr->pval];
/* Stop resting */
if ((!p_ptr->drain_life) && (p_ptr->chp != p_ptr->mhp)) stop = FALSE;
diff --git a/src/externs.h b/src/externs.h
index 0e054481..6b22dc81 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -528,7 +528,6 @@ extern s16b spell_num;
extern rune_spell rune_spells[MAX_RUNES];
extern s16b rune_num;
extern fate fates[MAX_FATES];
-extern byte vanilla_town;
extern byte dungeon_type;
extern s16b *max_dlv;
extern u32b total_bounties;
diff --git a/src/files.c b/src/files.c
index 7c46d9c3..d1b3d4f9 100644
--- a/src/files.c
+++ b/src/files.c
@@ -3469,9 +3469,6 @@ bool_ txt_to_html(cptr head, cptr foot, cptr base, cptr ext, bool_ force, bool_
/* Number of "real" lines passed by */
int next = 0;
- /* Number of "real" lines in the file */
- int size = 0;
-
char buf_name[80];
/* Color of the next line */
@@ -3550,9 +3547,6 @@ bool_ txt_to_html(cptr head, cptr foot, cptr base, cptr ext, bool_ force, bool_
return (TRUE);
}
- /* Save the number of "real" lines */
- size = next;
-
/* Build the filename */
path_build(h_ptr->path, 1024, ANGBAND_DIR_HELP, head);
@@ -5034,7 +5028,7 @@ void show_highclass(int building)
{
register int i = 0, j, m = 0;
- int pcs, pr, ps, pc, clev, al;
+ int pr, pc, clev, al;
high_score the_score;
char buf[1024], out_val[256];
@@ -5099,9 +5093,7 @@ void show_highclass(int building)
if (highscore_seek(j)) break;
if (highscore_read(&the_score)) break;
pr = atoi(the_score.p_r);
- ps = atoi(the_score.p_s);
pc = atoi(the_score.p_c);
- pcs = atoi(the_score.p_cs);
clev = atoi(the_score.cur_lev);
al = atoi(the_score.arena_number);
if (((pc == (building - 10)) && (building != 1) && (building != 2)) ||
@@ -5155,7 +5147,7 @@ void show_highclass(int building)
void race_score(int race_num)
{
register int i = 0, j, m = 0;
- int pr, ps, pc, clev, pcs, al, lastlev;
+ int pr, clev, lastlev;
high_score the_score;
char buf[1024], out_val[256], tmp_str[80];
@@ -5193,11 +5185,7 @@ void race_score(int race_num)
if (highscore_seek(j)) break;
if (highscore_read(&the_score)) break;
pr = atoi(the_score.p_r);
- ps = atoi(the_score.p_s);
- pc = atoi(the_score.p_c);
- pcs = atoi(the_score.p_cs);
clev = atoi(the_score.cur_lev);
- al = atoi(the_score.arena_number);
if (pr == race_num)
{
sprintf(out_val, "%3d) %s the %s (Level %3d)",
@@ -5254,7 +5242,7 @@ static errr top_twenty(void)
{
int j;
- high_score the_score, *tmp;
+ high_score the_score;
time_t ct = time((time_t*)0);
@@ -5323,7 +5311,7 @@ static errr top_twenty(void)
/* Clear the record */
- tmp = WIPE(&the_score, high_score);
+ WIPE(&the_score, high_score);
/* Save the version */
sprintf(the_score.what, "%ld.%ld.%ld",
diff --git a/src/generate.c b/src/generate.c
index 69588dc8..3c0fd9fd 100644
--- a/src/generate.c
+++ b/src/generate.c
@@ -7284,8 +7284,8 @@ static void init_feat_info(void)
int i;
int cur_depth, max_depth;
int p1, p2;
- int floor_lim1, floor_lim2, floor_lim3;
- int fill_lim1, fill_lim2, fill_lim3;
+ int floor_lim1, floor_lim2;
+ int fill_lim1, fill_lim2;
/* Retrieve dungeon depth info (base 1, to avoid zero divide errors) */
@@ -7307,8 +7307,6 @@ static void init_feat_info(void)
p2 = d_ptr->floor_percent2[1];
floor_lim2 = floor_lim1 + p1 + (p2 - p1) * cur_depth / max_depth;
- floor_lim3 = 100;
-
/* Setup probability info -- Fillers */
p1 = d_ptr->fill_percent1[0];
p2 = d_ptr->fill_percent1[1];
@@ -7318,8 +7316,6 @@ static void init_feat_info(void)
p2 = d_ptr->fill_percent2[1];
fill_lim2 = fill_lim1 + p1 + (p2 - p1) * cur_depth / max_depth;
- fill_lim3 = 100;
-
/* Fill the arrays of floors and walls in the good proportions */
for (i = 0; i < 100; i++)
@@ -7567,7 +7563,6 @@ static bool_ cave_gen(void)
int max_vault_ok = 2;
bool_ empty_level = FALSE;
- s16b town_level = 0;
level_generator_type *generator;
@@ -7589,13 +7584,6 @@ static bool_ cave_gen(void)
cur_hgt /= 2;
}
- /* Is it a town level ? */
- for (i = 0; i < TOWN_DUNGEON; i++)
- {
- if (d_ptr->t_level[i] == dun_level) town_level = d_ptr->t_idx[i];
- }
-
-
/* Fill the arrays of floors and walls in the good proportions */
init_feat_info();
diff --git a/src/gods.c b/src/gods.c
index 863582a2..b8b8fd3a 100644
--- a/src/gods.c
+++ b/src/gods.c
@@ -81,7 +81,6 @@ void follow_god(int god, bool_ silent)
bool_ show_god_info(bool_ ext)
{
int pgod = p_ptr->pgod;
- int tmp;
deity_type *d_ptr;
@@ -107,7 +106,7 @@ bool_ show_god_info(bool_ ext)
text_out(d_ptr->desc[i]);
text_out("\n");
- tmp = inkey();
+ inkey();
Term_load();
character_icky = FALSE;
diff --git a/src/init1.c b/src/init1.c
index debf3188..61ef7c43 100644
--- a/src/init1.c
+++ b/src/init1.c
@@ -11681,8 +11681,7 @@ static cptr process_dungeon_file_expr(char **sp, char *fp)
/* Wilderness */
else if (streq(b + 1, "WILDERNESS"))
{
- if (vanilla_town) v = "NONE";
- else v = "NORMAL";
+ v = "NORMAL";
}
}
diff --git a/src/init2.c b/src/init2.c
index 6ab4ec54..1f326912 100644
--- a/src/init2.c
+++ b/src/init2.c
@@ -2553,15 +2553,13 @@ static errr init_alloc(void)
s16b aux[MAX_DEPTH_MONSTER];
- s16b *tmp;
-
/*** Analyze object allocation info ***/
/* Clear the "aux" array */
- tmp = C_WIPE(&aux, MAX_DEPTH_MONSTER, s16b);
+ C_WIPE(&aux, MAX_DEPTH_MONSTER, s16b);
/* Clear the "num" array */
- tmp = C_WIPE(&num, MAX_DEPTH_MONSTER, s16b);
+ C_WIPE(&num, MAX_DEPTH_MONSTER, s16b);
/* Size of "alloc_kind_table" */
alloc_kind_size = 0;
@@ -2647,10 +2645,10 @@ static errr init_alloc(void)
/*** Analyze monster allocation info ***/
/* Clear the "aux" array */
- tmp = C_WIPE(&aux, MAX_DEPTH_MONSTER, s16b);
+ C_WIPE(&aux, MAX_DEPTH_MONSTER, s16b);
/* Clear the "num" array */
- tmp = C_WIPE(&num, MAX_DEPTH_MONSTER, s16b);
+ C_WIPE(&num, MAX_DEPTH_MONSTER, s16b);
/* Size of "alloc_race_table" */
alloc_race_size = 0;
diff --git a/src/loadsave.c b/src/loadsave.c
index 1da65cd2..75252e1a 100644
--- a/src/loadsave.c
+++ b/src/loadsave.c
@@ -601,7 +601,7 @@ static bool_ do_extra(int flag)
do_byte(&p_ptr->allow_one_death, flag);
do_s16b(&p_ptr->xtra_spells, flag);
- do_byte(&vanilla_town, flag);
+ do_byte(&tmp8u, flag);
do_s16b(&no_breeds, flag);
do_s16b(&p_ptr->protgood, flag);
@@ -1086,8 +1086,6 @@ static void do_s16b(s16b *ip, int flag)
}
if (flag == LS_SAVE)
{
- s16b val;
- val = *ip;
do_u16b((u16b *)ip, flag);
return;
}
@@ -1488,12 +1486,6 @@ static void do_item(object_type *o_ptr, int flag)
/* Ego items */
if (o_ptr->name2)
{
- ego_item_type *e_ptr;
-
- /* Obtain the ego-item info */
- e_ptr = &e_info[o_ptr->name2];
-
-
o_ptr->dd = old_dd;
o_ptr->ds = old_ds;
}
@@ -2600,13 +2592,8 @@ static bool_ do_savefile_aux(int flag)
/* Read the available records */
for (i = 0; i < tmp16u; i++)
{
- monster_race *r_ptr;
-
/* Read the lore */
do_lore(i, flag);
-
- /* Access that monster */
- r_ptr = &r_info[i]; /* FIXME! Why the hell are we doing this? */
}
if ((flag == LS_LOAD) && (arg_fiddle)) note("Loaded Monster Memory");
diff --git a/src/main-x11.c b/src/main-x11.c
index c6bf55e7..c91c837b 100644
--- a/src/main-x11.c
+++ b/src/main-x11.c
@@ -2285,7 +2285,7 @@ static errr CheckEvent(bool_ wait)
/* Move and/or Resize */
case ConfigureNotify:
{
- int cols, rows, wid, hgt;
+ int cols, rows;
int ox = Infowin->ox;
int oy = Infowin->oy;
@@ -2317,10 +2317,6 @@ static errr CheckEvent(bool_ wait)
if (cols > 255) cols = 255;
if (rows > 255) rows = 255;
- /* Desired size of window */
- wid = cols * td->fnt->wid + (ox + ox);
- hgt = rows * td->fnt->hgt + (oy + oy);
-
/* Resize the Term (if needed) */
Term_resize(cols, rows);
break;
diff --git a/src/melee1.c b/src/melee1.c
index ae0a75a1..0160c43a 100644
--- a/src/melee1.c
+++ b/src/melee1.c
@@ -130,9 +130,7 @@ 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;
/* Not allowed to attack */
if (r_ptr->flags1 & (RF1_NEVER_BLOW)) return (FALSE);
@@ -143,9 +141,6 @@ bool_ carried_make_attack_normal(int r_idx)
/* Extract the effective monster level */
rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
- /* Assume no blink */
- blinked = FALSE;
-
/* Scan through all four blows */
for (ap_cnt = 0; ap_cnt < 4; ap_cnt++)
{
@@ -455,7 +450,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBM_EXPLODE:
{
act = "explodes.";
- explode = TRUE;
break;
}
diff --git a/src/melee2.c b/src/melee2.c
index a6bc8543..9cb5e2da 100644
--- a/src/melee2.c
+++ b/src/melee2.c
@@ -7490,7 +7490,6 @@ void process_monsters(void)
monster_race *r_ptr;
int old_monster_race_idx;
- int old_monster_ego_idx;
u32b old_r_flags1 = 0L;
u32b old_r_flags2 = 0L;
@@ -7513,7 +7512,6 @@ void process_monsters(void)
/* Memorize old race */
old_monster_race_idx = monster_race_idx;
- old_monster_ego_idx = monster_ego_idx;
/* Acquire knowledge */
if (monster_race_idx)
diff --git a/src/monster1.c b/src/monster1.c
index de18e3c8..196272ce 100644
--- a/src/monster1.c
+++ b/src/monster1.c
@@ -124,7 +124,6 @@ static void roff_aux(int r_idx, int ego, int remem)
u32b flags5;
u32b flags6;
u32b flags7;
- u32b flags8;
u32b flags9;
int vn = 0;
@@ -207,7 +206,6 @@ static void roff_aux(int r_idx, int ego, int remem)
flags5 = (r_ptr->flags5 & r_ptr->r_flags5);
flags6 = (r_ptr->flags6 & r_ptr->r_flags6);
flags7 = (r_ptr->flags7 & r_ptr->r_flags7);
- flags8 = (r_ptr->flags8 & r_ptr->r_flags8);
flags9 = (r_ptr->flags9 & r_ptr->r_flags9);
diff --git a/src/monster2.c b/src/monster2.c
index 841a6428..c633d5cf 100644
--- a/src/monster2.c
+++ b/src/monster2.c
@@ -2114,7 +2114,7 @@ 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)
{
- int i, base;
+ int i;
char dummy[5];
bool_ add_level = FALSE;
int min_level = 0, max_level = 0;
@@ -2591,10 +2591,6 @@ s16b place_monster_one(int y, int x, int r_idx, int ego, bool_ slp, int status)
if (i) m_ptr->mspeed += rand_spread(0, i);
}
- /* Need to match dungeon level ? */
- base = dun_level;
- if (dungeon_flags2 & DF2_ADJUST_LEVEL_PLAYER)
- base = p_ptr->lev * 2;
if (dungeon_flags2 & DF2_ADJUST_LEVEL_1_2)
{
diff --git a/src/notes.c b/src/notes.c
index 11b1ed4f..3504f61c 100644
--- a/src/notes.c
+++ b/src/notes.c
@@ -87,10 +87,9 @@ void add_note(char *note, char code)
char final_note[100];
char long_day[50];
char depths[32];
- char *tmp;
/* Get the first 60 chars - so do not have an overflow */
- tmp = C_WIPE(buf, 100, char);
+ C_WIPE(buf, 100, char);
strncpy(buf, note, 60);
/* Get date and time */
diff --git a/src/object2.c b/src/object2.c
index f2619787..625e1ecd 100644
--- a/src/object2.c
+++ b/src/object2.c
@@ -2244,7 +2244,7 @@ static bool_ make_artifact_special(object_type *o_ptr)
if (!(a_ptr->flags3 & TR3_INSTA_ART)) continue;
/* Cannot generate some artifacts because they can only exists in special dungeons/quests/... */
- if ((a_ptr->flags4 & TR4_SPECIAL_GENE) && (!a_allow_special[i]) && (!vanilla_town)) continue;
+ if ((a_ptr->flags4 & TR4_SPECIAL_GENE) && (!a_allow_special[i])) continue;
/* XXX XXX Enforce minimum "depth" (loosely) */
if (a_ptr->level > dun_level)
@@ -2331,7 +2331,7 @@ static bool_ make_artifact(object_type *o_ptr)
if (a_ptr->flags3 & TR3_INSTA_ART) continue;
/* Cannot generate some artifacts because they can only exists in special dungeons/quests/... */
- if ((a_ptr->flags4 & TR4_SPECIAL_GENE) && (!a_allow_special[i]) && (!vanilla_town)) continue;
+ if ((a_ptr->flags4 & TR4_SPECIAL_GENE) && (!a_allow_special[i])) continue;
/* Must have the correct fields */
if (a_ptr->tval != o_ptr->tval) continue;
diff --git a/src/q_one.c b/src/q_one.c
index 37a753ee..ec301c5d 100644
--- a/src/q_one.c
+++ b/src/q_one.c
@@ -226,11 +226,9 @@ bool_ quest_one_death_hook(char *fmt)
{
s32b r_idx, m_idx;
bool_ ok = FALSE;
- monster_race *r_ptr;
m_idx = get_next_arg(fmt);
r_idx = m_list[m_idx].r_idx;
- r_ptr = &r_info[r_idx];
if (a_info[ART_POWER].cur_num) return FALSE;
diff --git a/src/q_thrain.c b/src/q_thrain.c
index 0caffe8a..8b2df5a4 100644
--- a/src/q_thrain.c
+++ b/src/q_thrain.c
@@ -3,12 +3,11 @@
bool_ quest_thrain_death_hook(char *fmt)
{
- s32b r_idx, m_idx;
+ s32b m_idx;
int r, x, y;
monster_type *m_ptr;
m_idx = get_next_arg(fmt);
- r_idx = m_list[m_idx].r_idx;
if ((cquest.status >= QUEST_STATUS_FINISHED) || (dun_level !=cquest.data[0]) || (dungeon_type != DUNGEON_DOL_GULDUR)) return (FALSE);
m_ptr = &m_list[m_idx];
diff --git a/src/spells1.c b/src/spells1.c
index 9e9fcff0..b38fa854 100644
--- a/src/spells1.c
+++ b/src/spells1.c
@@ -3897,7 +3897,6 @@ static bool_ project_o(int who, int r, int y, int x, int dam, int typ)
int o_sval = 0;
bool_ is_potion = FALSE;
- int xx, yy;
/* XXX XXX XXX */
@@ -4157,8 +4156,6 @@ static bool_ project_o(int who, int r, int y, int x, int dam, int typ)
}
case GF_RAISE:
{
- xx = x;
- yy = y;
get_pos_player(7, &y, &x);
/* Only corpses can be raised */
diff --git a/src/spells2.c b/src/spells2.c
index 80d55c44..c365bb5b 100644
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -4537,7 +4537,6 @@ bool_ recharge(int power)
char o_name[80];
object_type *o_ptr;
- object_kind *k_ptr;
/* Only accept legal items */
item_tester_hook = item_tester_hook_recharge;
@@ -4564,7 +4563,6 @@ bool_ recharge(int power)
/* Extract the object "level" */
lev = k_info[o_ptr->k_idx].level;
- k_ptr = &k_info[o_ptr->k_idx];
/* Recharge a rod */
if (o_ptr->tval == TV_ROD_MAIN)
@@ -6647,7 +6645,6 @@ void swap_position(int lty, int ltx)
int tx = ltx, ty = lty;
cave_type * c_ptr;
monster_type * m_ptr;
- monster_race * r_ptr;
if (p_ptr->resist_continuum)
{
@@ -6696,7 +6693,6 @@ void swap_position(int lty, int ltx)
else
{
m_ptr = &m_list[c_ptr->m_idx];
- r_ptr = race_inf(m_ptr);
sound(SOUND_TELEPORT);
diff --git a/src/traps.c b/src/traps.c
index fab204c8..64a89374 100644
--- a/src/traps.c
+++ b/src/traps.c
@@ -19,14 +19,12 @@ bool_ do_player_trap_call_out(void)
s16b h_index = 0;
s16b h_level = 0;
monster_type *m_ptr;
- monster_race *r_ptr;
char m_name[80];
bool_ ident = FALSE;
for (i = 1; i < m_max; i++)
{
m_ptr = &m_list[i];
- r_ptr = race_inf(m_ptr);
/* Paranoia -- Skip dead monsters */
if (!m_ptr->r_idx) continue;
diff --git a/src/util.c b/src/util.c
index ef4907be..34084d71 100644
--- a/src/util.c
+++ b/src/util.c
@@ -3590,10 +3590,9 @@ s32b get_quantity(cptr prompt, s32b max)
*/
void pause_line(int row)
{
- int i;
prt("", row, 0);
put_str("[Press any key to continue]", row, 23);
- i = inkey();
+ inkey();
prt("", row, 0);
}
diff --git a/src/variable.c b/src/variable.c
index 26c377fa..5ae33337 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -1361,11 +1361,6 @@ s16b rune_num;
fate fates[MAX_FATES];
/*
- * Vanilla town.
- */
-byte vanilla_town = FALSE;
-
-/*
* Which dungeon ?
* 0 = Wilderness
* 1 = Mirkwood
diff --git a/src/wizard2.c b/src/wizard2.c
index 0d476474..824bc724 100644
--- a/src/wizard2.c
+++ b/src/wizard2.c
@@ -1107,13 +1107,9 @@ static void wiz_statistics(object_type *o_ptr)
*/
static void wiz_quantity_item(object_type *o_ptr)
{
- int tmp_int, tmp_qnt;
-
+ int tmp_int;
char tmp_val[100];
-
- tmp_qnt = o_ptr->number;
-
/* Default */
sprintf(tmp_val, "%d", o_ptr->number);
@@ -1369,7 +1365,6 @@ static void wiz_create_item_2(void)
void do_cmd_wiz_cure_all(void)
{
object_type *o_ptr;
- monster_race *r_ptr;
/* Remove curses */
(void)remove_all_curse();
@@ -1398,7 +1393,6 @@ void do_cmd_wiz_cure_all(void)
o_ptr = &p_ptr->inventory[INVEN_CARRY];
if (o_ptr->k_idx)
{
- r_ptr = &r_info[o_ptr->pval];
o_ptr->pval2 = o_ptr->pval3;
}
diff --git a/src/xtra1.c b/src/xtra1.c
index def39271..2109af4d 100644
--- a/src/xtra1.c
+++ b/src/xtra1.c
@@ -429,7 +429,6 @@ static void prt_mh(void)
byte color;
object_type *o_ptr;
- monster_race *r_ptr;
/* Get the carried monster */
o_ptr = &p_ptr->inventory[INVEN_CARRY];
@@ -440,8 +439,6 @@ static void prt_mh(void)
return;
}
- r_ptr = &r_info[o_ptr->pval];
-
put_str("MH ", ROW_MH, COL_MH);
sprintf(tmp, "%4d/%4d", o_ptr->pval2, (int)o_ptr->pval3);
@@ -2322,14 +2319,11 @@ int get_weaponmastery_skill()
int get_archery_skill()
{
int i, skill = 0;
- object_type *o_ptr;
i = INVEN_BOW - INVEN_WIELD;
/* All weapons must be of the same type */
while (p_ptr->body_parts[i] == INVEN_BOW)
{
- o_ptr = &p_ptr->inventory[INVEN_WIELD + i];
-
if (p_ptr->inventory[INVEN_WIELD + i].tval == TV_BOW)
{
switch (p_ptr->inventory[INVEN_WIELD + i].sval / 10)
@@ -2650,7 +2644,6 @@ void apply_flags(u32b f1, u32b f2, u32b f3, u32b f4, u32b f5, u32b esp, s16b pva
void calc_bonuses(bool_ silent)
{
int i, j, hold;
- int old_invis;
int old_speed;
u32b old_telepathy;
int old_see_inv;
@@ -2671,9 +2664,6 @@ void calc_bonuses(bool_ silent)
old_dis_ac = p_ptr->dis_ac;
old_dis_to_a = p_ptr->dis_to_a;
- /* Save the old invisibility */
- old_invis = p_ptr->invis;
-
/* Clear extra blows/shots */
extra_blows = extra_shots = 0;
diff --git a/src/xtra2.c b/src/xtra2.c
index 735c99fd..4c52ad4a 100644
--- a/src/xtra2.c
+++ b/src/xtra2.c
@@ -1959,14 +1959,11 @@ bool_ set_food(int v)
*/
void check_experience(void)
{
- int i, gained = 0;
+ int gained = 0;
bool_ level_reward = FALSE;
bool_ level_corruption = FALSE;
- /* Note current level */
- i = p_ptr->lev;
-
/* Hack -- lower limit */
if (p_ptr->exp < 0) p_ptr->exp = 0;
@@ -2099,11 +2096,6 @@ void check_experience(void)
*/
void check_experience_obj(object_type *o_ptr)
{
- int i;
-
- /* Note current level */
- i = o_ptr->elevel;
-
/* Hack -- lower limit */
if (o_ptr->exp < 0) o_ptr->exp = 0;
@@ -2366,7 +2358,6 @@ void monster_death(int m_idx)
bool_ visible = (m_ptr->ml || (r_ptr->flags1 & (RF1_UNIQUE)));
- bool_ cloned = FALSE;
bool_ create_stairs = FALSE;
int force_coin = get_coin_type(r_ptr);
@@ -2414,8 +2405,6 @@ void monster_death(int m_idx)
p_ptr->arena_number++;
}
- if (m_ptr->smart &(SM_CLONED)) cloned = TRUE;
-
/* If the doppleganger die, the variable must be set accordingly */
if (r_ptr->flags9 & RF9_DOPPLEGANGER) doppleganger = 0;
@@ -3086,12 +3075,10 @@ bool_ mon_take_hit(int m_idx, int dam, bool_ *fear, cptr note)
if (!note)
{
object_type *o_ptr;
- object_kind *k_ptr;
u32b f1, f2, f3, f4, f5, esp;
/* Access the weapon */
o_ptr = &p_ptr->inventory[INVEN_WIELD];
- k_ptr = &k_info[o_ptr->k_idx];
object_flags(o_ptr, &f1, &f2, &f3, &f4, &f5, &esp);
/* Can the weapon gain levels ? */