OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
authorDeskull <deskull@users.sourceforge.jp>
Wed, 28 Nov 2018 12:22:39 +0000 (21:22 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Wed, 28 Nov 2018 12:22:39 +0000 (21:22 +0900)
src/melee1.c
src/object1.c
src/object2.c
src/spells3.c
src/store.c

index eefc835..64a4b2a 100644 (file)
@@ -2290,7 +2290,6 @@ bool make_attack_normal(MONSTER_IDX m_idx)
                                                /* Pick an item from the pack */
                                                i = (INVENTORY_IDX)randint0(INVEN_PACK);
 
                                                /* Pick an item from the pack */
                                                i = (INVENTORY_IDX)randint0(INVEN_PACK);
 
-                                               /* Get the item */
                                                o_ptr = &inventory[i];
 
                                                /* Skip non-objects */
                                                o_ptr = &inventory[i];
 
                                                /* Skip non-objects */
@@ -2303,16 +2302,11 @@ bool make_attack_normal(MONSTER_IDX m_idx)
                                                object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
 
 #ifdef JP
                                                object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
 
 #ifdef JP
-                                               msg_format("%s(%c)を%s食べられてしまった!",
-                                                         o_name, index_to_label(i),
-                                                         ((o_ptr->number > 1) ? "一つ" : ""));
+                                               msg_format("%s(%c)を%s食べられてしまった!", o_name, index_to_label(i), ((o_ptr->number > 1) ? "一つ" : ""));
 #else
 #else
-                                               msg_format("%sour %s (%c) was eaten!",
-                                                          ((o_ptr->number > 1) ? "One of y" : "Y"),
-                                                          o_name, index_to_label(i));
+                                               msg_format("%sour %s (%c) was eaten!", ((o_ptr->number > 1) ? "One of y" : "Y"), o_name, index_to_label(i));
 #endif
 
 #endif
 
-
                                                /* Steal the items */
                                                inven_item_increase(i, -1);
                                                inven_item_optimize(i);
                                                /* Steal the items */
                                                inven_item_increase(i, -1);
                                                inven_item_optimize(i);
index d697108..fb3f6bc 100644 (file)
@@ -2228,7 +2228,6 @@ COMMAND_CODE show_inven(int target_item)
                /* Get the index */
                i = out_index[j];
 
                /* Get the index */
                i = out_index[j];
 
-               /* Get the item */
                o_ptr = &inventory[i];
 
                /* Clear the line */
                o_ptr = &inventory[i];
 
                /* Clear the line */
@@ -2402,7 +2401,6 @@ COMMAND_CODE show_equip(int target_item)
                /* Get the index */
                i = out_index[j];
 
                /* Get the index */
                i = out_index[j];
 
-               /* Get the item */
                o_ptr = &inventory[i];
 
                /* Clear the line */
                o_ptr = &inventory[i];
 
                /* Clear the line */
@@ -3669,7 +3667,6 @@ COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_LEN *min_w
                /* Get the index */
                m = floor_list[out_index[j]];
 
                /* Get the index */
                m = floor_list[out_index[j]];
 
-               /* Get the item */
                o_ptr = &o_list[m];
 
                /* Clear the line */
                o_ptr = &o_list[m];
 
                /* Clear the line */
index a478c29..fb8e315 100644 (file)
@@ -6355,7 +6355,6 @@ void combine_pack(void)
                /* Combine the pack (backwards) */
                for (i = INVEN_PACK; i > 0; i--)
                {
                /* Combine the pack (backwards) */
                for (i = INVEN_PACK; i > 0; i--)
                {
-                       /* Get the item */
                        o_ptr = &inventory[i];
 
                        /* Skip empty items */
                        o_ptr = &inventory[i];
 
                        /* Skip empty items */
@@ -6366,7 +6365,6 @@ void combine_pack(void)
                        {
                                int max_num;
 
                        {
                                int max_num;
 
-                               /* Get the item */
                                j_ptr = &inventory[j];
 
                                /* Skip empty items */
                                j_ptr = &inventory[j];
 
                                /* Skip empty items */
@@ -6466,7 +6464,6 @@ void reorder_pack(void)
                /* Mega-Hack -- allow "proper" over-flow */
                if ((i == INVEN_PACK) && (inven_cnt == INVEN_PACK)) break;
 
                /* Mega-Hack -- allow "proper" over-flow */
                if ((i == INVEN_PACK) && (inven_cnt == INVEN_PACK)) break;
 
-               /* Get the item */
                o_ptr = &inventory[i];
 
                /* Skip empty slots */
                o_ptr = &inventory[i];
 
                /* Skip empty slots */
index 6c01044..6ab3bd7 100644 (file)
@@ -973,7 +973,6 @@ bool apply_disenchant(BIT_FLAGS mode)
                case 8: t = INVEN_FEET; break;
        }
 
                case 8: t = INVEN_FEET; break;
        }
 
-       /* Get the item */
        o_ptr = &inventory[t];
 
        /* No item, nothing happens */
        o_ptr = &inventory[t];
 
        /* No item, nothing happens */
index cf1fe1a..c5e93a4 100644 (file)
@@ -1575,7 +1575,6 @@ bool combine_and_reorder_home(int store_num)
                /* Combine the items in the home (backwards) */
                for (i = st_ptr->stock_num - 1; i > 0; i--)
                {
                /* Combine the items in the home (backwards) */
                for (i = st_ptr->stock_num - 1; i > 0; i--)
                {
-                       /* Get the item */
                        o_ptr = &st_ptr->stock[i];
 
                        /* Skip empty items */
                        o_ptr = &st_ptr->stock[i];
 
                        /* Skip empty items */
@@ -1586,7 +1585,6 @@ bool combine_and_reorder_home(int store_num)
                        {
                                int max_num;
 
                        {
                                int max_num;
 
-                               /* Get the item */
                                j_ptr = &st_ptr->stock[j];
 
                                /* Skip empty items */
                                j_ptr = &st_ptr->stock[j];
 
                                /* Skip empty items */
@@ -1658,7 +1656,6 @@ bool combine_and_reorder_home(int store_num)
        /* Re-order the items in the home (forwards) */
        for (i = 0; i < st_ptr->stock_num; i++)
        {
        /* Re-order the items in the home (forwards) */
        for (i = 0; i < st_ptr->stock_num; i++)
        {
-               /* Get the item */
                o_ptr = &st_ptr->stock[i];
 
                /* Skip empty slots */
                o_ptr = &st_ptr->stock[i];
 
                /* Skip empty slots */
@@ -1935,7 +1932,6 @@ static void store_item_increase(INVENTORY_IDX item, int num)
        int             cnt;
        object_type *o_ptr;
 
        int             cnt;
        object_type *o_ptr;
 
-       /* Get the item */
        o_ptr = &st_ptr->stock[item];
 
        /* Verify the number */
        o_ptr = &st_ptr->stock[item];
 
        /* Verify the number */
@@ -1960,7 +1956,6 @@ static void store_item_optimize(INVENTORY_IDX item)
        int             j;
        object_type *o_ptr;
 
        int             j;
        object_type *o_ptr;
 
-       /* Get the item */
        o_ptr = &st_ptr->stock[item];
 
        /* Must exist */
        o_ptr = &st_ptr->stock[item];
 
        /* Must exist */
@@ -2259,10 +2254,8 @@ static void display_entry(int pos)
        char            o_name[MAX_NLEN];
        char            out_val[160];
 
        char            o_name[MAX_NLEN];
        char            out_val[160];
 
-
        int maxwid = 75;
 
        int maxwid = 75;
 
-       /* Get the item */
        o_ptr = &st_ptr->stock[pos];
 
        /* Get the "offset" */
        o_ptr = &st_ptr->stock[pos];
 
        /* Get the "offset" */
@@ -5298,7 +5291,6 @@ void store_shuffle(int which)
        {
                object_type *o_ptr;
 
        {
                object_type *o_ptr;
 
-               /* Get the item */
                o_ptr = &st_ptr->stock[i];
 
                if (!object_is_artifact(o_ptr))
                o_ptr = &st_ptr->stock[i];
 
                if (!object_is_artifact(o_ptr))
@@ -5310,11 +5302,7 @@ void store_shuffle(int which)
                        o_ptr->ident &= ~(IDENT_FIXED);
 
                        /* Mega-Hack -- Note that the item is "on sale" */
                        o_ptr->ident &= ~(IDENT_FIXED);
 
                        /* Mega-Hack -- Note that the item is "on sale" */
-#ifdef JP
-                       o_ptr->inscription = quark_add("売出中");
-#else
-                       o_ptr->inscription = quark_add("on sale");
-#endif
+                       o_ptr->inscription = quark_add(_("売出中", "on sale"));
                }
        }
 }
                }
        }
 }