OSDN Git Service

[Refactor] #define ALLOW_EASY_OPEN による分岐処理削除。 / Delete #define branch by ALLOW_EASY_OPEN.
authorDeskull <deskull@users.sourceforge.jp>
Sat, 24 Nov 2018 01:20:11 +0000 (10:20 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sat, 24 Nov 2018 01:20:11 +0000 (10:20 +0900)
src/cmd1.c
src/cmd2.c
src/externs.h
src/gameoption.c
src/gameoption.h
src/z-config.h

index 15a12ec..e1b5b23 100644 (file)
@@ -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);
index 29993d2..03a6fdb 100644 (file)
@@ -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
index f7a27be..c1b0ee5 100644 (file)
@@ -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 */
index 36af2e4..32e950e 100644 (file)
@@ -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,
index 1468731..3b9ad4f 100644 (file)
@@ -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 */\r
 extern bool confirm_quest;     /* Prompt before exiting a quest level */\r
 extern bool target_pet;        /* Allow targetting pets */\r
-\r
-#ifdef ALLOW_EASY_OPEN\r
 extern bool easy_open; /* Automatically open doors */\r
-#endif\r
 \r
 #ifdef ALLOW_EASY_DISARM\r
 extern bool easy_disarm;       /* Automatically disarm traps */\r
index d5d8cfe..0e0765d 100644 (file)
 /* Zangband options: */
 
 /*
- * OPTION: Make opening and closing things easy -- TNB
- */
-#define ALLOW_EASY_OPEN
-
-/*
  * OPTION: Make disarming traps easy -- TNB
  */
 #define ALLOW_EASY_DISARM