OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
[hengband/hengband.git] / src / cmd-item.c
index e64af19..def0cb5 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.");
 
@@ -328,7 +314,6 @@ void do_cmd_wield(void)
                /* Describe it */
                object_desc(o_name, &inventory[slot], (OD_OMIT_PREFIX | OD_NAME_ONLY));
 
-               /* Message */
 #ifdef JP
                msg_format("%s%sは呪われているようだ。",
                           describe_use(slot) , o_name );
@@ -402,7 +387,6 @@ void do_cmd_wield(void)
                autopick_alter_item(item, FALSE);
        }
 
-       /* Take a turn */
        p_ptr->energy_use = 100;
 
        /* Get local object */
@@ -492,11 +476,8 @@ void do_cmd_wield(void)
 
        /* Describe the result */
        object_desc(o_name, o_ptr, 0);
-
-       /* Message */
        msg_format(act, o_name, index_to_label(slot));
 
-
        /* Cursed! */
        if (object_is_cursed(o_ptr))
        {
@@ -526,7 +507,6 @@ void do_cmd_wield(void)
 
        p_ptr->redraw |= (PR_EQUIPPY);
 
-       /* Window stuff */
        p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
 
        calc_android_exp();
@@ -609,7 +589,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.");
 
@@ -633,10 +612,8 @@ void do_cmd_takeoff(void)
        {
                if ((o_ptr->curse_flags & TRC_PERMA_CURSE) || (p_ptr->pclass != CLASS_BERSERKER))
                {
-                       /* Oops */
                        msg_print(_("ふーむ、どうやら呪われているようだ。", "Hmmm, it seems to be cursed."));
 
-                       /* Nope */
                        return;
                }
 
@@ -655,7 +632,6 @@ void do_cmd_takeoff(void)
                        /* Recalculate the bonuses */
                        p_ptr->update |= (PU_BONUS);
 
-                       /* Window stuff */
                        p_ptr->window |= (PW_EQUIP);
 
                        msg_print(_("呪いを打ち破った。", "You break the curse."));
@@ -698,7 +674,6 @@ void do_cmd_drop(void)
        }
 
        item_tester_no_ryoute = TRUE;
-       /* Get an item */
        q = _("どのアイテムを落としますか? ", "Drop which item? ");
        s = _("落とせるアイテムを持っていない。", "You have nothing to drop.");
 
@@ -720,9 +695,7 @@ void do_cmd_drop(void)
        /* Hack -- Cannot remove cursed items */
        if ((item >= INVEN_RARM) && object_is_cursed(o_ptr))
        {
-               /* Oops */
                msg_print(_("ふーむ、どうやら呪われているようだ。", "Hmmm, it seems to be cursed."));
-               /* Nope */
                return;
        }
 
@@ -811,7 +784,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.");
 
@@ -892,13 +864,11 @@ void do_cmd_destroy(void)
        }
 
 
-       /* Describe the object */
        old_number = o_ptr->number;
        o_ptr->number = amt;
        object_desc(o_name, o_ptr, 0);
        o_ptr->number = old_number;
 
-       /* Take a turn */
        p_ptr->energy_use = 100;
 
        /* Artifacts cannot be destroyed */
@@ -906,15 +876,12 @@ void do_cmd_destroy(void)
        {
                p_ptr->energy_use = 0;
 
-               /* Message */
                msg_format(_("%sは破壊不可能だ。", "You cannot destroy %s."), o_name);
-               /* Done */
                return;
        }
 
        object_copy(q_ptr, o_ptr);
 
-       /* Message */
        msg_format(_("%sを壊した。", "You destroy %s."), o_name);
        sound(SOUND_DESTITEM);
 
@@ -1012,7 +979,6 @@ void do_cmd_observe(void)
 
        item_tester_no_ryoute = TRUE;
 
-       /* Get an item */
        q = _("どのアイテムを調べますか? ", "Examine which item? ");
        s = _("調べられるアイテムがない。", "You have nothing to examine.");
 
@@ -1041,8 +1007,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."));
@@ -1062,7 +1026,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.");
 
@@ -1087,7 +1050,6 @@ void do_cmd_uninscribe(void)
                return;
        }
 
-       /* Message */
        msg_print(_("銘を消した。", "Inscription removed."));
 
        /* Remove the incription */
@@ -1096,7 +1058,6 @@ void do_cmd_uninscribe(void)
        /* Combine the pack */
        p_ptr->notice |= (PN_COMBINE);
 
-       /* Window stuff */
        p_ptr->window |= (PW_INVEN | PW_EQUIP);
 
        /* .や$の関係で, 再計算が必要なはず -- henkma */
@@ -1119,7 +1080,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.");
 
@@ -1140,7 +1100,6 @@ void do_cmd_inscribe(void)
        /* Describe the activity */
        object_desc(o_name, o_ptr, OD_OMIT_INSCRIPTION);
 
-       /* Message */
        msg_format(_("%sに銘を刻む。", "Inscribing %s."), o_name);
        msg_print(NULL);
 
@@ -1163,7 +1122,6 @@ void do_cmd_inscribe(void)
                /* Combine the pack */
                p_ptr->notice |= (PN_COMBINE);
 
-               /* Window stuff */
                p_ptr->window |= (PW_INVEN | PW_EQUIP);
 
                /* .や$の関係で, 再計算が必要なはず -- henkma */
@@ -1211,7 +1169,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 = "油つぼがない。";
@@ -1234,7 +1191,6 @@ static void do_cmd_refill_lamp(void)
                o_ptr = &o_list[0 - item];
        }
 
-
        /* Take a partial turn */
        p_ptr->energy_use = 50;
 
@@ -1243,11 +1199,8 @@ static void do_cmd_refill_lamp(void)
 
        /* Refuel */
        j_ptr->xtra4 += o_ptr->xtra4;
-
-       /* Message */
        msg_print(_("ランプに油を注いだ。", "You fuel your lamp."));
 
-       /* Comment */
        if ((o_ptr->name2 == EGO_LITE_DARKNESS) && (j_ptr->xtra4 > 0))
        {
                j_ptr->xtra4 = 0;
@@ -1316,18 +1269,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;
 
@@ -1353,10 +1299,8 @@ static void do_cmd_refill_torch(void)
        /* Refuel */
        j_ptr->xtra4 += o_ptr->xtra4 + 5;
 
-       /* Message */
        msg_print(_("松明を結合した。", "You combine the torches."));
 
-       /* Comment */
        if ((o_ptr->name2 == EGO_LITE_DARKNESS) && (j_ptr->xtra4 > 0))
        {
                j_ptr->xtra4 = 0;
@@ -1501,7 +1445,6 @@ void do_cmd_locate(void)
 
        int wid, hgt;
 
-       /* Get size */
        get_screen_size(&wid, &hgt);
 
 
@@ -1575,13 +1518,10 @@ void do_cmd_locate(void)
        /* Recenter the map around the player */
        verify_panel();
 
-       /* Update stuff */
        p_ptr->update |= (PU_MONSTERS);
 
-       /* Redraw map */
        p_ptr->redraw |= (PR_MAP);
 
-       /* Window stuff */
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 
        /* Handle stuff */
@@ -1711,7 +1651,7 @@ void ang_sort_swap_hook(vptr u, vptr v, int a, int b)
  *
  * The responses may be sorted in several ways, see below.
  *
- * Note that the player ghosts are ignored. XXX XXX XXX
+ * Note that the player ghosts are ignored. 
  * </pre>
  */
 void do_cmd_query_symbol(void)
@@ -1742,8 +1682,6 @@ void do_cmd_query_symbol(void)
        {
                if (sym == ident_info[i][0]) break;
        }
-
-       /* Describe */
        if (sym == KTRL('A'))
        {
                all = TRUE;
@@ -1850,11 +1788,9 @@ void do_cmd_query_symbol(void)
                return;
        }
 
-
-       /* Prompt XXX XXX XXX */
+       /* Prompt */
        put_str(_("思い出を見ますか? (k:殺害順/y/n): ", "Recall details? (k/y/n): "), 0, _(36, 40));
 
-
        /* Query */
        query = inkey();
 
@@ -1999,10 +1935,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.");