OSDN Git Service

[Refactor] #39076 冗長なコメントを削除 (/* Cancel the command */)
[hengband/hengband.git] / src / cmd-item.c
index 5b74cfd..65f9139 100644 (file)
@@ -48,6 +48,7 @@
 #include "snipe.h"
 #include "player-race.h"
 #include "view-mainwindow.h"
+#include "player-inventory.h"
 
 /*!
  * @brief 持ち物一覧を表示するコマンドのメインルーチン / Display p_ptr->inventory_list
@@ -291,14 +292,11 @@ void do_cmd_wield(void)
        if (object_is_cursed(&p_ptr->inventory_list[slot]))
        {
                object_desc(o_name, &p_ptr->inventory_list[slot], (OD_OMIT_PREFIX | OD_NAME_ONLY));
-
 #ifdef JP
                msg_format("%s%sは呪われているようだ。", describe_use(slot) , o_name );
 #else
                msg_format("The %s you are %s appears to be cursed.", o_name, describe_use(slot));
 #endif
-
-               /* Cancel the command */
                return;
        }
 
@@ -1440,7 +1438,6 @@ void do_cmd_query_symbol(void)
        /* Scan the monster memory */
        while (1)
        {
-               /* Extract a race */
                r_idx = who[i];
 
                /* Hack -- Auto-recall */
@@ -1450,7 +1447,6 @@ void do_cmd_query_symbol(void)
                /* Interact */
                while (1)
                {
-                       /* Recall */
                        if (recall)
                        {
                                screen_save();
@@ -1546,73 +1542,45 @@ void do_cmd_use(void)
 
        switch (o_ptr->tval)
        {
-               /* Spike a door */
                case TV_SPIKE:
-               {
                        do_cmd_spike();
                        break;
-               }
 
-               /* Eat some food */
                case TV_FOOD:
-               {
-                       do_cmd_eat_food_aux(item);
+                       exe_eat_food(item);
                        break;
-               }
 
-               /* Aim a wand */
                case TV_WAND:
-               {
-                       do_cmd_aim_wand_aux(item);
+                       exe_aim_wand(item);
                        break;
-               }
 
-               /* Use a staff */
                case TV_STAFF:
-               {
-                       do_cmd_use_staff_aux(item);
+                       exe_use_staff(item);
                        break;
-               }
 
-               /* Zap a rod */
                case TV_ROD:
-               {
-                       do_cmd_zap_rod_aux(item);
+                       exe_zap_rod(item);
                        break;
-               }
 
-               /* Quaff a potion */
                case TV_POTION:
-               {
-                       do_cmd_quaff_potion_aux(item);
+                       exe_quaff_potion(item);
                        break;
-               }
 
-               /* Read a scroll */
                case TV_SCROLL:
-               {
                        if (cmd_limit_blind(p_ptr)) return;
                        if (cmd_limit_confused(p_ptr)) return;
-
-                       do_cmd_read_scroll_aux(item, TRUE);
+                       exe_read(item, TRUE);
                        break;
-               }
 
-               /* Fire ammo */
                case TV_SHOT:
                case TV_ARROW:
                case TV_BOLT:
-               {
                        exe_fire(item, &p_ptr->inventory_list[INVEN_BOW], SP_NONE);
                        break;
-               }
 
-               /* Activate an artifact */
                default:
-               {
-                       exe_activate(item);
+                       exe_activate(p_ptr, item);
                        break;
-               }
        }
 }