From d0adb882c81dd7772906729b3c86bda58eef774e Mon Sep 17 00:00:00 2001 From: Deskull Date: Sat, 24 Nov 2018 10:20:11 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#define=20ALLOW=5FEASY=5FOPEN=20?= =?utf8?q?=E3=81=AB=E3=82=88=E3=82=8B=E5=88=86=E5=B2=90=E5=87=A6=E7=90=86?= =?utf8?q?=E5=89=8A=E9=99=A4=E3=80=82=20/=20Delete=20#define=20branch=20by?= =?utf8?q?=20ALLOW=5FEASY=5FOPEN.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/cmd1.c | 2 -- src/cmd2.c | 18 ++---------------- src/externs.h | 3 --- src/gameoption.c | 7 ------- src/gameoption.h | 3 --- src/z-config.h | 5 ----- 6 files changed, 2 insertions(+), 36 deletions(-) diff --git a/src/cmd1.c b/src/cmd1.c index 15a12ec48..e1b5b23be 100644 --- a/src/cmd1.c +++ b/src/cmd1.c @@ -1456,10 +1456,8 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap) /* Wall (or secret door) */ else { -#ifdef ALLOW_EASY_OPEN /* Closed doors */ if (easy_open && is_closed_door(feat) && easy_open_door(y, x)) return; -#endif /* ALLOW_EASY_OPEN */ #ifdef JP msg_format("%sが行く手をはばんでいる。", name); diff --git a/src/cmd2.c b/src/cmd2.c index 29993d253..03a6fdb99 100644 --- a/src/cmd2.c +++ b/src/cmd2.c @@ -504,7 +504,7 @@ static bool do_cmd_open_chest(POSITION y, POSITION x, OBJECT_IDX o_idx) } -#if defined(ALLOW_EASY_OPEN) || defined(ALLOW_EASY_DISARM) /* TNB */ +#if defined(ALLOW_EASY_DISARM) /* TNB */ /*! * @brief 地形は開くものであって、かつ開かれているかを返す / @@ -648,7 +648,7 @@ static DIRECTION coords_to_dir(POSITION y, POSITION x) return d[dx + 1][dy + 1]; } -#endif /* defined(ALLOW_EASY_OPEN) || defined(ALLOW_EASY_DISARM) -- TNB */ +#endif /* defined(ALLOW_EASY_DISARM) -- TNB */ /*! @@ -761,8 +761,6 @@ void do_cmd_open(void) set_action(ACTION_NONE); } -#ifdef ALLOW_EASY_OPEN /* TNB */ - /* Option: Pick a direction */ if (easy_open) { @@ -783,8 +781,6 @@ void do_cmd_open(void) } } -#endif /* ALLOW_EASY_OPEN -- TNB */ - /* Allow repeated command */ if (command_arg) { @@ -929,8 +925,6 @@ void do_cmd_close(void) set_action(ACTION_NONE); } -#ifdef ALLOW_EASY_OPEN /* TNB */ - /* Option: Pick a direction */ if (easy_open) { @@ -941,8 +935,6 @@ void do_cmd_close(void) } } -#endif /* ALLOW_EASY_OPEN -- TNB */ - /* Allow repeated command */ if (command_arg) { @@ -1250,9 +1242,6 @@ void do_cmd_tunnel(void) if (!more) disturb(0, 0); } - -#ifdef ALLOW_EASY_OPEN /* TNB */ - /*! * @brief 移動処理による簡易な「開く」処理 / * easy_open_door -- @@ -1345,9 +1334,6 @@ bool easy_open_door(POSITION y, POSITION x) return (TRUE); } -#endif /* ALLOW_EASY_OPEN -- TNB */ - - /*! * @brief 箱のトラップを解除するコマンドのメインルーチン / * Perform the basic "disarm" command diff --git a/src/externs.h b/src/externs.h index f7a27be41..c1b0ee5b7 100644 --- a/src/externs.h +++ b/src/externs.h @@ -1448,7 +1448,6 @@ extern void repeat_push(COMMAND_CODE what); extern bool repeat_pull(COMMAND_CODE *what); extern void repeat_check(void); -#ifdef ALLOW_EASY_OPEN /* TNB */ /* variable.c */ extern bool easy_open; @@ -1456,8 +1455,6 @@ extern bool easy_open; /* cmd2.c */ extern bool easy_open_door(POSITION y, POSITION x); -#endif /* ALLOW_EASY_OPEN -- TNB */ - #ifdef ALLOW_EASY_DISARM /* TNB */ /* variable.c */ diff --git a/src/gameoption.c b/src/gameoption.c index 36af2e4d8..32e950e6a 100644 --- a/src/gameoption.c +++ b/src/gameoption.c @@ -21,10 +21,7 @@ bool confirm_destroy; /* Prompt for destruction of known worthless items */ bool confirm_wear; /* Confirm to wear/wield known cursed items */ bool confirm_quest; /* Prompt before exiting a quest level */ bool target_pet; /* Allow targetting pets */ - -#ifdef ALLOW_EASY_OPEN bool easy_open; /* Automatically open doors */ -#endif #ifdef ALLOW_EASY_DISARM bool easy_disarm; /* Automatically disarm traps */ @@ -247,15 +244,11 @@ const option_type option_info[] = { &target_pet, FALSE, OPT_PAGE_INPUT, 2, 5, "target_pet", _("ペットをターゲットにする", "Allow targetting pets") }, - #ifdef ALLOW_EASY_OPEN { &easy_open, TRUE, OPT_PAGE_INPUT, 5, 7, "easy_open", _("自動的にドアを開ける", "Automatically open doors") }, - #endif /* ALLOW_EASY_OPEN */ - #ifdef ALLOW_EASY_DISARM { &easy_disarm, TRUE, OPT_PAGE_INPUT, 5, 8, "easy_disarm", _("自動的に罠を解除する", "Automatically disarm traps") }, - #endif /* ALLOW_EASY_DISARM */ #ifdef ALLOW_EASY_FLOOR /* TNB */ { &easy_floor, FALSE, OPT_PAGE_INPUT, 5, 9, diff --git a/src/gameoption.h b/src/gameoption.h index 14687316b..3b9ad4f25 100644 --- a/src/gameoption.h +++ b/src/gameoption.h @@ -13,10 +13,7 @@ extern bool confirm_destroy; /* Prompt for destruction of known worthless items extern bool confirm_wear; /* Confirm to wear/wield known cursed items */ extern bool confirm_quest; /* Prompt before exiting a quest level */ extern bool target_pet; /* Allow targetting pets */ - -#ifdef ALLOW_EASY_OPEN extern bool easy_open; /* Automatically open doors */ -#endif #ifdef ALLOW_EASY_DISARM extern bool easy_disarm; /* Automatically disarm traps */ diff --git a/src/z-config.h b/src/z-config.h index d5d8cfe86..0e0765d5c 100644 --- a/src/z-config.h +++ b/src/z-config.h @@ -524,11 +524,6 @@ /* Zangband options: */ /* - * OPTION: Make opening and closing things easy -- TNB - */ -#define ALLOW_EASY_OPEN - -/* * OPTION: Make disarming traps easy -- TNB */ #define ALLOW_EASY_DISARM -- 2.11.0