summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2011-02-19 19:16:00 +0100
committerBardur Arantsson <bardur@scientician.net>2011-02-19 19:44:00 +0100
commiteaee803a78f92d313d16a6f054c447754a052137 (patch)
tree69e47ebca152f0b8deac3f1d13072019122e0525 /src
parent56d359f285b8c73a9fb752f6fb4cd00ecaecba6e (diff)
ALLOW_{EASY_OPEN,EASY_DISARM,REPEAT} code is no longer conditional.
Diffstat (limited to 'src')
-rw-r--r--src/cmd1.c8
-rw-r--r--src/cmd2.c24
-rw-r--r--src/cmd7.c7
-rw-r--r--src/config.h15
-rw-r--r--src/dungeon.c4
-rw-r--r--src/externs.h16
-rw-r--r--src/object1.c5
-rw-r--r--src/store.c12
-rw-r--r--src/tables.c4
-rw-r--r--src/util.c10
-rw-r--r--src/variable.c6
-rw-r--r--src/xtra2.c14
12 files changed, 1 insertions, 124 deletions
diff --git a/src/cmd1.c b/src/cmd1.c
index 4be7814b..a4a1202a 100644
--- a/src/cmd1.c
+++ b/src/cmd1.c
@@ -3393,8 +3393,6 @@ void move_player_aux(int dir, int do_pickup, int run, bool disarm)
oktomove = FALSE;
}
-#ifdef ALLOW_EASY_DISARM /* TNB */
-
/* Disarm a visible trap */
else if (easy_disarm && disarm && (c_ptr->info & (CAVE_TRDT)))
{
@@ -3410,8 +3408,6 @@ void move_player_aux(int dir, int do_pickup, int run, bool disarm)
oktomove = FALSE;
}
-#endif /* ALLOW_EASY_DISARM -- TNB */
-
/* Player can't enter ? soo bad for him/her ... */
else if (!player_can_enter(c_ptr->feat))
{
@@ -3486,15 +3482,11 @@ void move_player_aux(int dir, int do_pickup, int run, bool disarm)
/* Closed doors */
else if ((c_ptr->feat >= FEAT_DOOR_HEAD) && (c_ptr->feat <= FEAT_DOOR_TAIL))
{
-#ifdef ALLOW_EASY_OPEN
-
if (easy_open)
{
if (easy_open_door(y, x)) return;
}
else
-#endif /* ALLOW_EASY_OPEN */
-
{
msg_print("There is a closed door blocking your way.");
diff --git a/src/cmd2.c b/src/cmd2.c
index eeed812c..7d2a33b9 100644
--- a/src/cmd2.c
+++ b/src/cmd2.c
@@ -817,8 +817,6 @@ static bool do_cmd_open_chest(int y, int x, s16b o_idx)
}
-#if defined(ALLOW_EASY_OPEN) || defined(ALLOW_EASY_DISARM)
-
/*
* Original code by TNB, improvement for Angband 2.9.3 by rr9
* Slightly modified for ToME because of its trap implementation
@@ -976,8 +974,6 @@ static int coords_to_dir(int y, int x)
return d[dx + 1][dy + 1];
}
-#endif /* defined(ALLOW_EASY_OPEN) || defined(ALLOW_EASY_DISARM) -- TNB */
-
/*
* Perform the basic "open" command on doors
@@ -1121,8 +1117,6 @@ void do_cmd_open(void)
return;
}
-#ifdef ALLOW_EASY_OPEN /* TNB */
-
/* Option: Pick a direction */
if (easy_open)
{
@@ -1151,8 +1145,6 @@ void do_cmd_open(void)
}
}
-#endif /* ALLOW_EASY_OPEN -- TNB */
-
/* Allow repeated command */
if (command_arg)
{
@@ -1295,8 +1287,6 @@ void do_cmd_close(void)
bool more = FALSE;
-#ifdef ALLOW_EASY_OPEN /* TNB */
-
/* Option: Pick a direction */
if (easy_open)
{
@@ -1322,8 +1312,6 @@ void do_cmd_close(void)
}
}
-#endif /* ALLOW_EASY_OPEN -- TNB */
-
/* Allow repeated command */
if (command_arg)
{
@@ -1824,8 +1812,6 @@ void do_cmd_tunnel(void)
}
-#ifdef ALLOW_EASY_OPEN /* TNB */
-
/*
* easy_open_door --
*
@@ -1942,8 +1928,6 @@ bool easy_open_door(int y, int x)
return (TRUE);
}
-#endif /* ALLOW_EASY_OPEN -- TNB */
-
/*
* Perform the basic "disarm" command
@@ -2032,11 +2016,7 @@ static bool do_cmd_disarm_chest(int y, int x, s16b o_idx)
*
* Returns TRUE if repeated commands may continue
*/
-#ifdef ALLOW_EASY_DISARM /* TNB */
bool do_cmd_disarm_aux(int y, int x, int dir, int do_pickup)
-#else /* ALLOW_EASY_DISARM -- TNB */
-static bool do_cmd_disarm_aux(int y, int x, int dir, int do_pickup)
-#endif /* ALLOW_EASY_DISARM -- TNB */
{
int i, j, power;
@@ -2156,8 +2136,6 @@ void do_cmd_disarm(void)
bool more = FALSE;
-#ifdef ALLOW_EASY_DISARM /* TNB */
-
/* Option: Pick a direction */
if (easy_disarm)
{
@@ -2177,8 +2155,6 @@ void do_cmd_disarm(void)
}
}
-#endif /* ALLOW_EASY_DISARM -- TNB */
-
/* Allow repeated command */
if (command_arg)
{
diff --git a/src/cmd7.c b/src/cmd7.c
index a18616b2..16b943ad 100644
--- a/src/cmd7.c
+++ b/src/cmd7.c
@@ -157,8 +157,6 @@ bool get_magic_power(int *sn, magic_power *powers, int max_powers,
/* Assume cancelled */
*sn = ( -1);
-#ifdef ALLOW_REPEAT /* TNB */
-
/* Get the spell, if available */
if (repeat_pull(sn))
{
@@ -170,8 +168,6 @@ bool get_magic_power(int *sn, magic_power *powers, int max_powers,
}
}
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Nothing chosen yet */
flag = FALSE;
@@ -325,12 +321,9 @@ bool get_magic_power(int *sn, magic_power *powers, int max_powers,
/* Save the choice */
(*sn) = i;
-#ifdef ALLOW_REPEAT /* TNB */
repeat_push(*sn);
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Success */
return (TRUE);
}
diff --git a/src/config.h b/src/config.h
index 143740ef..b1ba2c9d 100644
--- a/src/config.h
+++ b/src/config.h
@@ -391,21 +391,6 @@
/* # define TRACK_FRIENDS */
/*
- * OPTION: Repeat last command -- TNB
- */
-#define ALLOW_REPEAT
-
-/*
- * OPTION: Make opening and closing things easy -- TNB
- */
-#define ALLOW_EASY_OPEN
-
-/*
- * OPTION: Make disarming traps easy -- TNB
- */
-#define ALLOW_EASY_DISARM
-
-/*
* Using the fast autoroller can be considered as cheating
*/
#define USE_FAST_AUTOROLLER
diff --git a/src/dungeon.c b/src/dungeon.c
index 53371beb..b94ae68e 100644
--- a/src/dungeon.c
+++ b/src/dungeon.c
@@ -3287,13 +3287,9 @@ static void process_command(void)
{
char error_m[80];
-#ifdef ALLOW_REPEAT /* TNB */
-
/* Handle repeating the last command */
repeat_check();
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Process the appropriate hooks */
if (process_hooks(HOOK_KEYPRESS, "(d)", command_cmd)) return;
diff --git a/src/externs.h b/src/externs.h
index 81fa57da..10e7ffae 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -1748,37 +1748,23 @@ extern u32b _ftype;
extern bool chg_to_txt(cptr base, cptr newname);
#endif /* !WINDOWS && !MACINTOSH */
-#ifdef ALLOW_REPEAT /* TNB */
-
/* util.c */
extern void repeat_push(int what);
extern bool repeat_pull(int *what);
extern void repeat_check(void);
extern void get_count(int number, int max);
-#endif /* ALLOW_REPEAT -- TNB */
-
-#ifdef ALLOW_EASY_OPEN /* TNB */
-
/* variable.c */
extern bool easy_open;
extern bool easy_tunnel;
+extern bool easy_disarm;
/* cmd2.c */
extern bool easy_open_door(int y, int x);
-#endif /* ALLOW_EASY_OPEN -- TNB */
-
-#ifdef ALLOW_EASY_DISARM /* TNB */
-
-/* variable.c */
-extern bool easy_disarm;
-
/* cmd2.c */
extern bool do_cmd_disarm_aux(int y, int x, int dir, int do_pickup);
-#endif /* ALLOW_EASY_DISARM -- TNB */
-
extern bool easy_floor;
diff --git a/src/object1.c b/src/object1.c
index acdc9a77..19aebd8d 100644
--- a/src/object1.c
+++ b/src/object1.c
@@ -5343,7 +5343,6 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
int floor_num, floor_list[23], floor_top = 0;
k = 0;
-#ifdef ALLOW_REPEAT
/* Get the item index */
if (repeat_pull(cp))
@@ -5387,7 +5386,6 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
}
}
-#endif /* ALLOW_REPEAT */
/* Extract args */
if (mode & (USE_EQUIP)) equip = TRUE;
@@ -6061,12 +6059,9 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
/* Warning if needed */
if (oops && str) msg_print(str);
-#ifdef ALLOW_REPEAT
if (item) repeat_push(*cp);
-#endif /* ALLOW_REPEAT */
-
/* Result */
return (item);
}
diff --git a/src/store.c b/src/store.c
index c35a33a2..0f4fc491 100644
--- a/src/store.c
+++ b/src/store.c
@@ -1664,8 +1664,6 @@ static int get_stock(int *com_val, cptr pmt, int i, int j)
char out_val[160];
-#ifdef ALLOW_REPEAT /* TNB */
-
/* Get the item index */
if (repeat_pull(com_val))
{
@@ -1678,8 +1676,6 @@ static int get_stock(int *com_val, cptr pmt, int i, int j)
}
}
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Paranoia XXX XXX XXX */
msg_print(NULL);
@@ -1719,12 +1715,8 @@ static int get_stock(int *com_val, cptr pmt, int i, int j)
/* Cancel */
if (command == ESCAPE) return (FALSE);
-#ifdef ALLOW_REPEAT /* TNB */
-
repeat_push(*com_val);
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Success */
return (TRUE);
}
@@ -3363,13 +3355,9 @@ static bool store_process_command(void)
store_action_type *ba_ptr;
bool recreate = FALSE;
-#ifdef ALLOW_REPEAT /* TNB */
-
/* Handle repeating the last command */
repeat_check();
-#endif /* ALLOW_REPEAT -- TNB */
-
for (i = 0; i < 6; i++)
{
ba_ptr = &ba_info[st_info[st_ptr->st_idx].actions[i]];
diff --git a/src/tables.c b/src/tables.c
index 718fe139..c4bb1930 100644
--- a/src/tables.c
+++ b/src/tables.c
@@ -1466,15 +1466,11 @@ option_type option_info[] =
{ &disturb_pets, FALSE, 2, 17,
"disturb_pets", "Disturb when visible pets move" },
-#ifdef ALLOW_EASY_OPEN
{ &easy_open, TRUE, 2, 18,
"easy_open", "Automatically open doors" },
-#endif /* ALLOW_EASY_OPEN */
-#ifdef ALLOW_EASY_DISARM
{ &easy_disarm, TRUE, 2, 19,
"easy_disarm", "Automatically disarm traps" },
-#endif /* ALLOW_EASY_DISARM */
{ &easy_tunnel, FALSE, 2, 20,
"easy_tunnel", "Automatically tunnel walls" },
diff --git a/src/util.c b/src/util.c
index c715ffc4..ea54ea30 100644
--- a/src/util.c
+++ b/src/util.c
@@ -3530,8 +3530,6 @@ s32b get_quantity(cptr prompt, s32b max)
return (amt);
}
-#ifdef ALLOW_REPEAT /* TNB */
-
/* Get the item index */
if ((max != 1) && repeat_pull(&aamt))
{
@@ -3547,8 +3545,6 @@ s32b get_quantity(cptr prompt, s32b max)
return (amt);
}
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Build a prompt if needed */
if (!prompt)
{
@@ -3581,12 +3577,9 @@ s32b get_quantity(cptr prompt, s32b max)
/* Enforce the minimum */
if (amt < 0) amt = 0;
-#ifdef ALLOW_REPEAT /* TNB */
if (amt) repeat_push(amt);
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Return the result */
return (amt);
}
@@ -4021,8 +4014,6 @@ int get_keymap_dir(char ch)
}
-#ifdef ALLOW_REPEAT /* TNB */
-
#define REPEAT_MAX 20
/* Number of chars saved */
@@ -4098,7 +4089,6 @@ void repeat_check(void)
}
}
-#endif /* ALLOW_REPEAT -- TNB */
/*
* Read a number at a specific location on the screen
diff --git a/src/variable.c b/src/variable.c
index 6bc4b04e..3e73781a 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -1182,14 +1182,8 @@ bool (*get_obj_num_hook)(int k_idx);
bool monk_armour_aux;
bool monk_notify_aux;
-#ifdef ALLOW_EASY_OPEN /* TNB */
bool easy_open = TRUE;
-#endif /* ALLOW_EASY_OPEN -- TNB */
-
-#ifdef ALLOW_EASY_DISARM /* TNB */
bool easy_disarm = TRUE;
-#endif /* ALLOW_EASY_DISARM -- TNB */
-
bool easy_tunnel = FALSE;
diff --git a/src/xtra2.c b/src/xtra2.c
index 90e71ce0..a3d599b3 100644
--- a/src/xtra2.c
+++ b/src/xtra2.c
@@ -6486,8 +6486,6 @@ bool get_aim_dir(int *dp)
cptr p;
-#ifdef ALLOW_REPEAT /* TNB */
-
if (repeat_pull(dp))
{
/* Confusion? */
@@ -6499,8 +6497,6 @@ bool get_aim_dir(int *dp)
}
}
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Initialize */
(*dp) = 0;
@@ -6587,12 +6583,9 @@ bool get_aim_dir(int *dp)
/* Save direction */
(*dp) = dir;
-#ifdef ALLOW_REPEAT /* TNB */
repeat_push(dir);
-#endif /* ALLOW_REPEAT -- TNB */
-
/* A "valid" direction was entered */
return (TRUE);
}
@@ -6619,15 +6612,11 @@ bool get_rep_dir(int *dp)
{
int dir;
-#ifdef ALLOW_REPEAT /* TNB */
-
if (repeat_pull(dp))
{
return (TRUE);
}
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Initialize */
(*dp) = 0;
@@ -6679,12 +6668,9 @@ bool get_rep_dir(int *dp)
/* Save direction */
(*dp) = dir;
-#ifdef ALLOW_REPEAT /* TNB */
repeat_push(dir);
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Success */
return (TRUE);
}