summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:57 +0100
committerBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:57 +0100
commit505f310399c9d113874250b697692112ca48411c (patch)
tree092cb3c608eae8cb9c7c02e62a743b9905261957 /src
parentde64b319f76c7cd4b7b2ef1e8cd4a58fc269c99f (diff)
Remove effectively unused variables
Diffstat (limited to 'src')
-rw-r--r--src/defines.h5
-rw-r--r--src/dungeon.cc1
-rw-r--r--src/externs.h18
-rw-r--r--src/loadsave.cc16
-rw-r--r--src/melee2.cc39
-rw-r--r--src/tables.cc3
-rw-r--r--src/util.cc3
-rw-r--r--src/variable.cc11
8 files changed, 8 insertions, 88 deletions
diff --git a/src/defines.h b/src/defines.h
index 32e26bc4..6267ae47 100644
--- a/src/defines.h
+++ b/src/defines.h
@@ -46,11 +46,6 @@
#define SAVEFILE_VERSION 105
/*
- * This value is not currently used
- */
-#define VERSION_EXTRA 0
-
-/*
* Maximum amount of Angband windows.
*/
#define ANGBAND_TERM_MAX 8
diff --git a/src/dungeon.cc b/src/dungeon.cc
index bc73e810..ce1e0c61 100644
--- a/src/dungeon.cc
+++ b/src/dungeon.cc
@@ -4652,7 +4652,6 @@ static void dungeon(void)
shimmer_monsters = TRUE;
shimmer_objects = TRUE;
repair_monsters = TRUE;
- repair_objects = TRUE;
/* Disturb */
diff --git a/src/externs.h b/src/externs.h
index f0673e53..bd4e0bb6 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -95,16 +95,12 @@ extern module_type modules[MAX_MODULES];
/* variable.c */
-extern cptr copyright[5];
extern byte version_major;
extern byte version_minor;
extern byte version_patch;
-extern byte version_extra;
extern byte sf_major;
extern byte sf_minor;
extern byte sf_patch;
-extern byte sf_extra;
-extern u32b sf_xtra;
extern u32b sf_when;
extern u16b sf_lives;
extern u16b sf_saves;
@@ -115,7 +111,6 @@ extern bool_ arg_force_roguelike;
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;
@@ -126,7 +121,6 @@ extern s16b command_dir;
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;
@@ -156,7 +150,6 @@ extern bool_ opening_chest;
extern bool_ shimmer_monsters;
extern bool_ shimmer_objects;
extern bool_ repair_monsters;
-extern bool_ repair_objects;
extern s16b inven_cnt;
extern s16b equip_cnt;
extern s16b o_max;
@@ -217,8 +210,6 @@ 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_ view_reduce_lite;
extern bool_ auto_scum;
extern bool_ expand_look;
@@ -227,10 +218,6 @@ 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;
@@ -243,7 +230,6 @@ extern bool_ last_words; /* Zangband options */
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;
@@ -252,7 +238,6 @@ extern bool_ autosave_l;
extern s16b feeling;
extern s16b rating;
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;
@@ -261,8 +246,6 @@ extern byte feat_wall_outer;
extern byte feat_wall_inner;
extern s16b floor_type[100];
extern s16b fill_type[100];
-extern s16b py;
-extern s16b px;
extern s16b target_who;
extern s16b target_col;
extern s16b target_row;
@@ -313,7 +296,6 @@ extern char misc_to_char[256];
extern byte tval_to_attr[128];
extern char tval_to_char[128];
extern char *keymap_act[KEYMAP_MODES][256];
-extern player_type p_body;
extern player_type *p_ptr;
extern player_sex *sp_ptr;
extern player_race *rp_ptr;
diff --git a/src/loadsave.cc b/src/loadsave.cc
index cb14f541..de217298 100644
--- a/src/loadsave.cc
+++ b/src/loadsave.cc
@@ -811,9 +811,6 @@ static bool_ save_player_aux(char *name)
/* Failure */
if (!ok) return (FALSE);
- /* Successful save */
- character_saved = TRUE;
-
/* Success */
return (TRUE);
}
@@ -949,13 +946,15 @@ bool_ load_player(void)
/* Process file */
if (!err)
{
+ byte tmp8u = 0;
+
/* Open the file XXX XXX XXX XXX Should use Angband file interface */
fff = my_fopen(savefile, "rb");
/* fff = fdopen(fd, "r"); */
/* Read the first four bytes */
do_u32b(&vernum, LS_LOAD);
- do_byte(&sf_extra, LS_LOAD);
+ do_byte(&tmp8u, LS_LOAD); // For comatibility with old savefiles
/* XXX XXX XXX XXX Should use Angband file interface */
my_fclose(fff);
@@ -973,7 +972,6 @@ bool_ load_player(void)
sf_major = VERSION_MAJOR;
sf_minor = VERSION_MINOR;
sf_patch = VERSION_PATCH;
- sf_extra = VERSION_EXTRA;
/* Clear screen */
Term_clear();
@@ -2521,7 +2519,6 @@ static bool_ do_savefile_aux(int flag)
if (flag == LS_SAVE)
{
sf_when = time((time_t *) 0); /* Note when file was saved */
- sf_xtra = 0L; /* What the hell is this? */
sf_saves++; /* Increment the saves ctr */
}
@@ -2544,8 +2541,11 @@ static bool_ do_savefile_aux(int flag)
do_byte(&tmp8u, flag); /* 'encryption' */
}
- /* Operating system info? Not really. This is just set to 0L */
- do_u32b(&sf_xtra, flag);
+ /* Kept only for compatibility; always set to 0 */
+ {
+ u32b tmp32u = 0;
+ do_u32b(&tmp32u, flag);
+ }
/* Time of last save */
do_u32b(&sf_when, flag);
diff --git a/src/melee2.cc b/src/melee2.cc
index 8479f68b..de16d2f8 100644
--- a/src/melee2.cc
+++ b/src/melee2.cc
@@ -2916,14 +2916,6 @@ void curse_equipment_dg(int chance, int heavy_chance)
* Perhaps smart monsters should decline to use "bolt" spells if
* there is a monster in the way, unless they wish to kill it.
*
- * Note that, to allow the use of the "track_target" option at some
- * later time, certain non-optimal things are done in the code below,
- * including explicit checks against the "direct" variable, which is
- * currently always true by the time it is checked, but which should
- * really be set according to an explicit "projectable()" test, and
- * the use of generic "x,y" locations instead of the player location,
- * with those values being initialized with the player location.
- *
* It will not be possible to "correctly" handle the case in which a
* monster attempts to attack a location which is thought to contain
* the player, but which in fact is nowhere near the player, since this
@@ -2937,12 +2929,6 @@ void curse_equipment_dg(int chance, int heavy_chance)
* could be left in a bizarre situation after the player ducked behind a
* pillar and then teleported away, for example.
*
- * Note that certain spell attacks do not use the "project()" function
- * but "simulate" it via the "direct" variable, which is always at least
- * as restrictive as the "project()" function. This is necessary to
- * prevent "blindness" attacks and such from bending around walls, etc,
- * and to allow the use of the "track_target" option in the future.
- *
* Note that this function attempts to optimize the use of spells for the
* cases in which the monster has no spells, or has spells but cannot use
* them, or has spells but they will have no "useful" effect. Note that
@@ -2974,9 +2960,6 @@ bool_ make_attack_spell(int m_idx)
/* Assume "normal" target */
bool_ normal = TRUE;
- /* Assume "projectable" */
- bool_ direct = TRUE;
-
/* Target location */
if (m_ptr->target > -1)
{
@@ -3014,9 +2997,6 @@ bool_ make_attack_spell(int m_idx)
/* Sometimes forbid inate attacks (breaths) */
if (rand_int(100) >= (chance * 2)) no_inate = TRUE;
- /* XXX XXX XXX Handle "track_target" option (?) */
-
-
/* Hack -- require projectable player */
if (normal)
{
@@ -3163,7 +3143,6 @@ bool_ make_attack_spell(int m_idx)
/* RF4_SHRIEK */
case 96 + 0:
{
- if (!direct) break;
disturb(1);
msg_format("%^s makes a high pitched shriek.", m_name);
aggravate_monsters(m_idx);
@@ -3638,7 +3617,6 @@ bool_ make_attack_spell(int m_idx)
/* RF5_DRAIN_MANA */
case 128 + 9:
{
- if (!direct) break;
if (p_ptr->csp)
{
int r1;
@@ -3696,7 +3674,6 @@ bool_ make_attack_spell(int m_idx)
/* RF5_MIND_BLAST */
case 128 + 10:
{
- if (!direct) break;
disturb(1);
if (!seen)
{
@@ -3733,7 +3710,6 @@ bool_ make_attack_spell(int m_idx)
/* RF5_BRAIN_SMASH */
case 128 + 11:
{
- if (!direct) break;
disturb(1);
if (!seen)
{
@@ -3782,7 +3758,6 @@ bool_ make_attack_spell(int m_idx)
/* RF5_CAUSE_1 */
case 128 + 12:
{
- if (!direct) break;
disturb(1);
if (blind) msg_format("%^s mumbles.", m_name);
else msg_format("%^s points at you and curses.", m_name);
@@ -3801,7 +3776,6 @@ bool_ make_attack_spell(int m_idx)
/* RF5_CAUSE_2 */
case 128 + 13:
{
- if (!direct) break;
disturb(1);
if (blind) msg_format("%^s mumbles.", m_name);
else msg_format("%^s points at you and curses horribly.", m_name);
@@ -3820,7 +3794,6 @@ bool_ make_attack_spell(int m_idx)
/* RF5_CAUSE_3 */
case 128 + 14:
{
- if (!direct) break;
disturb(1);
if (blind) msg_format("%^s mumbles loudly.", m_name);
else msg_format("%^s points at you, incanting terribly!", m_name);
@@ -3839,7 +3812,6 @@ bool_ make_attack_spell(int m_idx)
/* RF5_CAUSE_4 */
case 128 + 15:
{
- if (!direct) break;
disturb(1);
if (blind) msg_format("%^s screams the word 'DIE!'", m_name);
else msg_format("%^s points at you, screaming the word DIE!", m_name);
@@ -3981,7 +3953,6 @@ bool_ make_attack_spell(int m_idx)
/* RF5_SCARE */
case 128 + 27:
{
- if (!direct) break;
disturb(1);
if (blind) msg_format("%^s mumbles, and you hear scary noises.", m_name);
else msg_format("%^s casts a fearful illusion.", m_name);
@@ -4004,7 +3975,6 @@ bool_ make_attack_spell(int m_idx)
/* RF5_BLIND */
case 128 + 28:
{
- if (!direct) break;
disturb(1);
if (blind) msg_format("%^s mumbles.", m_name);
else msg_format("%^s casts a spell, burning your eyes!", m_name);
@@ -4027,7 +3997,6 @@ bool_ make_attack_spell(int m_idx)
/* RF5_CONF */
case 128 + 29:
{
- if (!direct) break;
disturb(1);
if (blind) msg_format("%^s mumbles, and you hear puzzling noises.", m_name);
else msg_format("%^s creates a mesmerizing illusion.", m_name);
@@ -4050,7 +4019,6 @@ bool_ make_attack_spell(int m_idx)
/* RF5_SLOW */
case 128 + 30:
{
- if (!direct) break;
disturb(1);
msg_format("%^s drains power from your muscles!", m_name);
if (p_ptr->free_act)
@@ -4072,7 +4040,6 @@ bool_ make_attack_spell(int m_idx)
/* RF5_HOLD */
case 128 + 31:
{
- if (!direct) break;
disturb(1);
if (blind) msg_format("%^s mumbles.", m_name);
else msg_format("%^s stares deep into your eyes!", m_name);
@@ -4244,7 +4211,6 @@ bool_ make_attack_spell(int m_idx)
/* RF6_TELE_TO */
case 160 + 6:
{
- if (!direct) break;
disturb(1);
msg_format("%^s commands you to return.", m_name);
teleport_player_to(m_ptr->fy, m_ptr->fx);
@@ -4254,7 +4220,6 @@ bool_ make_attack_spell(int m_idx)
/* RF6_TELE_AWAY */
case 160 + 7:
{
- if (!direct) break;
disturb(1);
msg_format("%^s teleports you away.", m_name);
teleport_player(100);
@@ -4264,7 +4229,6 @@ bool_ make_attack_spell(int m_idx)
/* RF6_TELE_LEVEL */
case 160 + 8:
{
- if (!direct) break;
disturb(1);
if (blind) msg_format("%^s mumbles strangely.", m_name);
else msg_format("%^s gestures at your feet.", m_name);
@@ -4287,7 +4251,6 @@ bool_ make_attack_spell(int m_idx)
/* RF6_DARKNESS */
case 160 + 9:
{
- if (!direct) break;
disturb(1);
if (blind) msg_format("%^s mumbles.", m_name);
else msg_format("%^s gestures in shadow.", m_name);
@@ -4298,7 +4261,6 @@ bool_ make_attack_spell(int m_idx)
/* RF6_TRAPS */
case 160 + 10:
{
- if (!direct) break;
disturb(1);
if (blind) msg_format("%^s mumbles, and then cackles evilly.", m_name);
else msg_format("%^s casts a spell and cackles evilly.", m_name);
@@ -4309,7 +4271,6 @@ bool_ make_attack_spell(int m_idx)
/* RF6_FORGET */
case 160 + 11:
{
- if (!direct) break;
disturb(1);
msg_format("%^s tries to blank your mind.", m_name);
diff --git a/src/tables.cc b/src/tables.cc
index 7e352504..425e400d 100644
--- a/src/tables.cc
+++ b/src/tables.cc
@@ -1483,9 +1483,6 @@ option_type option_info[] =
{ &flow_by_sound, FALSE, 3, 10,
"flow_by_sound", "Monsters chase current location (v.slow)" },
- { &player_symbols, FALSE, 3, 12,
- "player_symbols", "Use special symbols for the player char"},
-
{ &smart_learn, FALSE, 3, 14,
"smart_learn", "Monsters learn from their mistakes" },
diff --git a/src/util.cc b/src/util.cc
index d2388c4f..d8e5911d 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -1610,9 +1610,6 @@ static char inkey_real(bool_ inkey_scan)
/* Hack -- activate main screen */
Term_activate(angband_term[0]);
- /* Mega-Hack -- reset saved flag */
- character_saved = FALSE;
-
/* Only once */
done = TRUE;
}
diff --git a/src/variable.cc b/src/variable.cc
index b21e41b4..80b868e2 100644
--- a/src/variable.cc
+++ b/src/variable.cc
@@ -26,7 +26,6 @@ char *macro_trigger_keycode[2][MAX_MACRO_TRIG];
byte version_major;
byte version_minor;
byte version_patch;
-byte version_extra = VERSION_EXTRA;
/*
* Savefile version
@@ -34,13 +33,11 @@ byte version_extra = VERSION_EXTRA;
byte sf_major; /* Savefile's "version_major" */
byte sf_minor; /* Savefile's "version_minor" */
byte sf_patch; /* Savefile's "version_patch" */
-byte sf_extra; /* Savefile's "version_extra" */
u32b vernum;
/*
* Savefile information
*/
-u32b sf_xtra; /* Operating system info */
u32b sf_when; /* Time when savefile created */
u16b sf_lives; /* Number of past "lives" with this file */
u16b sf_saves; /* Number of "saves" during this life */
@@ -59,7 +56,6 @@ bool_ arg_force_roguelike; /* Command arg -- Request roguelike keyset */
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 */
@@ -121,7 +117,6 @@ 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_ hack_mind;
int artifact_bias;
@@ -205,7 +200,6 @@ bool_ last_words; /* Get last words upon dying */
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_ confirm_stairs; /* Prompt before staircases... */
bool_ wear_confirm; /* Confirm before putting on known cursed items */
bool_ disturb_pets; /* Pets moving nearby disturb us */
@@ -228,9 +222,6 @@ bool_ dungeon_stair; /* Generate dungeons with connected stairs */
bool_ flow_by_sound; /* Monsters track new player location */
-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 */
@@ -296,8 +287,6 @@ s16b rating; /* Level's current rating */
bool_ good_item_flag; /* True if "Artifact" on this level */
-bool_ closing_flag; /* Dungeon is closing */
-
/*
* Dungeon size info
*/