OSDN Git Service

[Refactor] #37353 Visual Studio 2017 の C4701警告潰し。/ Fix warning C4701 in Visual Studio...
[hengband/hengband.git] / src / cmd-item.c
index e707215..da56f8b 100644 (file)
@@ -21,6 +21,7 @@
 #include "cmd-zaprod.h"
 #include "cmd-zapwand.h"
 
+#include "player-item.h"
 #include "object-hook.h"
 
 
@@ -36,14 +37,8 @@ void do_cmd_inven(void)
        /* Note that we are in "inventory" mode */
        command_wrk = FALSE;
 
-#ifdef ALLOW_EASY_FLOOR
-
        /* Note that we are in "inventory" mode */
        if (easy_floor) command_wrk = (USE_INVEN);
-
-#endif /* ALLOW_EASY_FLOOR */
-
-       /* Save screen */
        screen_save();
 
        /* Hack -- show empty slots */
@@ -71,8 +66,6 @@ void do_cmd_inven(void)
 
        /* Get a new command */
        command_new = inkey();
-
-       /* Load screen */
        screen_load();
 
 
@@ -81,7 +74,6 @@ void do_cmd_inven(void)
        {
                int wid, hgt;
 
-               /* Get size */
                Term_get_size(&wid, &hgt);
 
                /* Reset stuff */
@@ -110,13 +102,9 @@ void do_cmd_equip(void)
        /* Note that we are in "equipment" mode */
        command_wrk = TRUE;
 
-#ifdef ALLOW_EASY_FLOOR
-
        /* Note that we are in "equipment" mode */
        if (easy_floor) command_wrk = (USE_EQUIP);
 
-#endif /* ALLOW_EASY_FLOOR  */
-
        /* Save the screen */
        screen_save();
 
@@ -156,7 +144,6 @@ void do_cmd_equip(void)
        {
                int wid, hgt;
 
-               /* Get size */
                Term_get_size(&wid, &hgt);
 
                /* Reset stuff */
@@ -206,7 +193,6 @@ void do_cmd_wield(void)
        /* Restrict the choices */
        item_tester_hook = item_tester_hook_wear;
 
-       /* Get an item */
        q = _("どれを装備しますか? ", "Wear/Wield which item? ");
        s = _("装備可能なアイテムがない。", "You have nothing you can wear or wield.");
 
@@ -402,8 +388,6 @@ void do_cmd_wield(void)
        }
 
        p_ptr->energy_use = 100;
-
-       /* Get local object */
        q_ptr = &forge;
 
        /* Obtain local object */
@@ -490,10 +474,8 @@ void do_cmd_wield(void)
 
        /* Describe the result */
        object_desc(o_name, o_ptr, 0);
-
        msg_format(act, o_name, index_to_label(slot));
 
-
        /* Cursed! */
        if (object_is_cursed(o_ptr))
        {
@@ -605,7 +587,6 @@ void do_cmd_takeoff(void)
 
        item_tester_no_ryoute = TRUE;
 
-       /* Get an item */
        q = _("どれを装備からはずしますか? ", "Take off which item? ");
        s = _("はずせる装備がない。", "You are not wearing anything to take off.");
 
@@ -631,7 +612,6 @@ void do_cmd_takeoff(void)
                {
                        msg_print(_("ふーむ、どうやら呪われているようだ。", "Hmmm, it seems to be cursed."));
 
-                       /* Nope */
                        return;
                }
 
@@ -692,7 +672,6 @@ void do_cmd_drop(void)
        }
 
        item_tester_no_ryoute = TRUE;
-       /* Get an item */
        q = _("どのアイテムを落としますか? ", "Drop which item? ");
        s = _("落とせるアイテムを持っていない。", "You have nothing to drop.");
 
@@ -715,7 +694,6 @@ void do_cmd_drop(void)
        if ((item >= INVEN_RARM) && object_is_cursed(o_ptr))
        {
                msg_print(_("ふーむ、どうやら呪われているようだ。", "Hmmm, it seems to be cursed."));
-               /* Nope */
                return;
        }
 
@@ -804,7 +782,6 @@ void do_cmd_destroy(void)
        /* Hack -- force destruction */
        if (command_arg > 0) force = TRUE;
 
-       /* Get an item */
        q = _("どのアイテムを壊しますか? ", "Destroy which item? ");
        s = _("壊せるアイテムを持っていない。", "You have nothing to destroy.");
 
@@ -885,7 +862,6 @@ void do_cmd_destroy(void)
        }
 
 
-       /* Describe the object */
        old_number = o_ptr->number;
        o_ptr->number = amt;
        object_desc(o_name, o_ptr, 0);
@@ -1001,7 +977,6 @@ void do_cmd_observe(void)
 
        item_tester_no_ryoute = TRUE;
 
-       /* Get an item */
        q = _("どのアイテムを調べますか? ", "Examine which item? ");
        s = _("調べられるアイテムがない。", "You have nothing to examine.");
 
@@ -1030,8 +1005,6 @@ void do_cmd_observe(void)
 
        /* Description */
        object_desc(o_name, o_ptr, 0);
-
-       /* Describe */
        msg_format(_("%sを調べている...", "Examining %s..."), o_name);
        /* Describe it fully */
        if (!screen_object(o_ptr, SCROBJ_FORCE_DETAIL)) msg_print(_("特に変わったところはないようだ。", "You see nothing special."));
@@ -1051,7 +1024,6 @@ void do_cmd_uninscribe(void)
        cptr q, s;
 
        item_tester_no_ryoute = TRUE;
-       /* Get an item */
        q = _("どのアイテムの銘を消しますか? ", "Un-inscribe which item? ");
        s = _("銘を消せるアイテムがない。", "You have nothing to un-inscribe.");
 
@@ -1106,7 +1078,6 @@ void do_cmd_inscribe(void)
        cptr q, s;
 
        item_tester_no_ryoute = TRUE;
-       /* Get an item */
        q = _("どのアイテムに銘を刻みますか? ", "Inscribe which item? ");
        s = _("銘を刻めるアイテムがない。", "You have nothing to inscribe.");
 
@@ -1196,7 +1167,6 @@ static void do_cmd_refill_lamp(void)
        /* Restrict the choices */
        item_tester_hook = item_tester_refill_lantern;
 
-       /* Get an item */
 #ifdef JP
        q = "どの油つぼから注ぎますか? ";
        s = "油つぼがない。";
@@ -1219,7 +1189,6 @@ static void do_cmd_refill_lamp(void)
                o_ptr = &o_list[0 - item];
        }
 
-
        /* Take a partial turn */
        p_ptr->energy_use = 50;
 
@@ -1228,10 +1197,8 @@ static void do_cmd_refill_lamp(void)
 
        /* Refuel */
        j_ptr->xtra4 += o_ptr->xtra4;
-
        msg_print(_("ランプに油を注いだ。", "You fuel your lamp."));
 
-       /* Comment */
        if ((o_ptr->name2 == EGO_LITE_DARKNESS) && (j_ptr->xtra4 > 0))
        {
                j_ptr->xtra4 = 0;
@@ -1300,18 +1267,11 @@ static void do_cmd_refill_torch(void)
 
        cptr q, s;
 
-
        /* Restrict the choices */
        item_tester_hook = item_tester_refill_torch;
 
-       /* Get an item */
-#ifdef JP
-       q = "どの松明で明かりを強めますか? ";
-       s = "他に松明がない。";
-#else
-       q = "Refuel with which torch? ";
-       s = "You have no extra torches.";
-#endif
+       q = _("どの松明で明かりを強めますか? ", "Refuel with which torch? ");
+       s = _("他に松明がない。", "You have no extra torches.");
 
        if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
 
@@ -1339,7 +1299,6 @@ static void do_cmd_refill_torch(void)
 
        msg_print(_("松明を結合した。", "You combine the torches."));
 
-       /* Comment */
        if ((o_ptr->name2 == EGO_LITE_DARKNESS) && (j_ptr->xtra4 > 0))
        {
                j_ptr->xtra4 = 0;
@@ -1484,7 +1443,6 @@ void do_cmd_locate(void)
 
        int wid, hgt;
 
-       /* Get size */
        get_screen_size(&wid, &hgt);
 
 
@@ -1560,12 +1518,9 @@ void do_cmd_locate(void)
 
        p_ptr->update |= (PU_MONSTERS);
 
-       /* Redraw map */
        p_ptr->redraw |= (PR_MAP);
 
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-
-       /* Handle stuff */
        handle_stuff();
 }
 
@@ -1723,8 +1678,6 @@ void do_cmd_query_symbol(void)
        {
                if (sym == ident_info[i][0]) break;
        }
-
-       /* Describe */
        if (sym == KTRL('A'))
        {
                all = TRUE;
@@ -1831,11 +1784,9 @@ void do_cmd_query_symbol(void)
                return;
        }
 
-
        /* Prompt */
        put_str(_("思い出を見ますか? (k:殺害順/y/n): ", "Recall details? (k/y/n): "), 0, _(36, 40));
 
-
        /* Query */
        query = inkey();
 
@@ -1890,8 +1841,6 @@ void do_cmd_query_symbol(void)
 
                /* Hack -- Auto-recall */
                monster_race_track(r_idx);
-
-               /* Hack -- Handle stuff */
                handle_stuff();
 
                /* Interact */
@@ -1980,10 +1929,8 @@ void do_cmd_use(void)
        }
 
        item_tester_no_ryoute = TRUE;
-       /* Prepare the hook */
        item_tester_hook = item_tester_hook_use;
 
-       /* Get an item */
        q = _("どれを使いますか?", "Use which item? ");
        s = _("使えるものがありません。", "You have nothing to use.");