OSDN Git Service

[Refactor] #37353 コメント整理。 / Refactor comments.
[hengband/hengband.git] / src / cmd-item.c
index ce67a20..dab81e0 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,14 +102,8 @@ 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();
 
        /* Hack -- show empty slots */
@@ -146,8 +132,6 @@ void do_cmd_equip(void)
 
        /* Get a new command */
        command_new = inkey();
-
-       /* Restore the screen */
        screen_load();
 
 
@@ -156,7 +140,6 @@ void do_cmd_equip(void)
        {
                int wid, hgt;
 
-               /* Get size */
                Term_get_size(&wid, &hgt);
 
                /* Reset stuff */
@@ -401,8 +384,6 @@ void do_cmd_wield(void)
        }
 
        p_ptr->energy_use = 100;
-
-       /* Get local object */
        q_ptr = &forge;
 
        /* Obtain local object */
@@ -489,10 +470,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))
        {
@@ -828,7 +807,7 @@ void do_cmd_destroy(void)
                /* HACK : Add the line to message buffer */
                message_add(out_val);
                p_ptr->window |= (PW_MESSAGE);
-               window_stuff();
+               handle_stuff();
 
                /* Get an acceptable answer */
                while (TRUE)
@@ -879,7 +858,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);
@@ -1023,8 +1001,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."));
@@ -1209,7 +1185,6 @@ static void do_cmd_refill_lamp(void)
                o_ptr = &o_list[0 - item];
        }
 
-
        /* Take a partial turn */
        p_ptr->energy_use = 50;
 
@@ -1218,10 +1193,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;
@@ -1290,17 +1263,11 @@ static void do_cmd_refill_torch(void)
 
        cptr q, s;
 
-
        /* Restrict the choices */
        item_tester_hook = item_tester_refill_torch;
 
-#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;
 
@@ -1328,7 +1295,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;
@@ -1445,10 +1411,8 @@ void do_cmd_target(void)
  */
 void do_cmd_look(void)
 {
-       /*TEST*/
        p_ptr->window |= PW_MONSTER_LIST;
-       window_stuff();
-       /*TEST*/
+       handle_stuff();
 
        /* Look around */
        if (target_set(TARGET_LOOK))
@@ -1473,7 +1437,6 @@ void do_cmd_locate(void)
 
        int wid, hgt;
 
-       /* Get size */
        get_screen_size(&wid, &hgt);
 
 
@@ -1549,12 +1512,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();
 }
 
@@ -1712,8 +1672,6 @@ void do_cmd_query_symbol(void)
        {
                if (sym == ident_info[i][0]) break;
        }
-
-       /* Describe */
        if (sym == KTRL('A'))
        {
                all = TRUE;
@@ -1820,11 +1778,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();
 
@@ -1879,8 +1835,6 @@ void do_cmd_query_symbol(void)
 
                /* Hack -- Auto-recall */
                monster_race_track(r_idx);
-
-               /* Hack -- Handle stuff */
                handle_stuff();
 
                /* Interact */
@@ -1889,7 +1843,6 @@ void do_cmd_query_symbol(void)
                        /* Recall */
                        if (recall)
                        {
-                               /* Save the screen */
                                screen_save();
 
                                /* Recall on screen */
@@ -1969,7 +1922,6 @@ void do_cmd_use(void)
        }
 
        item_tester_no_ryoute = TRUE;
-       /* Prepare the hook */
        item_tester_hook = item_tester_hook_use;
 
        q = _("どれを使いますか?", "Use which item? ");