OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
[hengband/hengband.git] / src / store.c
index dc25e55..98aa6e4 100644 (file)
@@ -343,7 +343,7 @@ static void say_comment_1(void)
  * @param annoyed 店主のいらつき度
  * @return なし
  */
-static void say_comment_2(s32b value, int annoyed)
+static void say_comment_2(PRICE value, int annoyed)
 {
        char    tmp_val[80];
 
@@ -384,7 +384,7 @@ static void say_comment_2(s32b value, int annoyed)
  * @param annoyed 店主のいらつき度
  * @return なし
  */
-static void say_comment_3(s32b value, int annoyed)
+static void say_comment_3(PRICE value, int annoyed)
 {
        char    tmp_val[80];
 
@@ -559,65 +559,42 @@ static cptr comment_7d[MAX_COMMENT_7D] =
  * @details 
  * We paid "price", it was worth "value", and we thought it was worth "guess"
  */
-static void purchase_analyze(s32b price, s32b value, s32b guess)
+static void purchase_analyze(PRICE price, PRICE value, PRICE guess)
 {
        /* Item was worthless, but we bought it */
        if ((value <= 0) && (price > value))
        {
-               /* Comment */
                msg_print(comment_7a[randint0(MAX_COMMENT_7A)]);
-
                chg_virtue(V_HONOUR, -1);
                chg_virtue(V_JUSTICE, -1);
-
-               /* Sound */
                sound(SOUND_STORE1);
        }
 
        /* Item was cheaper than we thought, and we paid more than necessary */
        else if ((value < guess) && (price > value))
        {
-               /* Comment */
                msg_print(comment_7b[randint0(MAX_COMMENT_7B)]);
-
                chg_virtue(V_JUSTICE, -1);
-               if (one_in_(4))
-                       chg_virtue(V_HONOUR, -1);
-
-               /* Sound */
+               if (one_in_(4)) chg_virtue(V_HONOUR, -1);
                sound(SOUND_STORE2);
        }
 
        /* Item was a good bargain, and we got away with it */
        else if ((value > guess) && (value < (4 * guess)) && (price < value))
        {
-               /* Comment */
                msg_print(comment_7c[randint0(MAX_COMMENT_7C)]);
-
-               if (one_in_(4))
-                       chg_virtue(V_HONOUR, -1);
-               else if (one_in_(4))
-                       chg_virtue(V_HONOUR, 1);
-
-               /* Sound */
+               if (one_in_(4)) chg_virtue(V_HONOUR, -1);
+               else if (one_in_(4)) chg_virtue(V_HONOUR, 1);
                sound(SOUND_STORE3);
        }
 
        /* Item was a great bargain, and we got away with it */
        else if ((value > guess) && (price < value))
        {
-               /* Comment */
                msg_print(comment_7d[randint0(MAX_COMMENT_7D)]);
-
-               if (one_in_(2))
-                       chg_virtue(V_HONOUR, -1);
-               if (one_in_(4))
-                       chg_virtue(V_HONOUR, 1);
-
-               if (10 * price < value)
-                       chg_virtue(V_SACRIFICE, 1);
-
-               /* Sound */
+               if (one_in_(2)) chg_virtue(V_HONOUR, -1);
+               if (one_in_(4)) chg_virtue(V_HONOUR, 1);
+               if (10 * price < value) chg_virtue(V_SACRIFICE, 1);
                sound(SOUND_STORE4);
        }
 }
@@ -1319,7 +1296,7 @@ static int store_check_num(object_type *o_ptr)
  */
 static bool is_blessed(object_type *o_ptr)
 {
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
        object_flags(o_ptr, flgs);
        if (have_flag(flgs, TR_BLESSED)) return (TRUE);
        else return (FALSE);
@@ -1541,7 +1518,7 @@ static bool store_will_buy(object_type *o_ptr)
                }
        }
 
-       /* XXX XXX XXX Ignore "worthless" items */
+       /* Ignore "worthless" items */
        if (object_value(o_ptr) <= 0) return (FALSE);
 
        /* Assume okay */
@@ -1579,7 +1556,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--)
                {
-                       /* Get the item */
                        o_ptr = &st_ptr->stock[i];
 
                        /* Skip empty items */
@@ -1590,7 +1566,6 @@ bool combine_and_reorder_home(int store_num)
                        {
                                int max_num;
 
-                               /* Get the item */
                                j_ptr = &st_ptr->stock[j];
 
                                /* Skip empty items */
@@ -1650,7 +1625,6 @@ bool combine_and_reorder_home(int store_num)
                                        /* Take note */
                                        combined = TRUE;
 
-                                       /* Done */
                                        break;
                                }
                        }
@@ -1663,7 +1637,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++)
        {
-               /* Get the item */
                o_ptr = &st_ptr->stock[i];
 
                /* Skip empty slots */
@@ -1683,8 +1656,6 @@ bool combine_and_reorder_home(int store_num)
 
                /* Take note */
                flag = TRUE;
-
-               /* Get local object */
                j_ptr = &forge;
 
                /* Save a copy of the moving item */
@@ -1940,7 +1911,6 @@ static void store_item_increase(INVENTORY_IDX item, int num)
        int             cnt;
        object_type *o_ptr;
 
-       /* Get the item */
        o_ptr = &st_ptr->stock[item];
 
        /* Verify the number */
@@ -1965,7 +1935,6 @@ static void store_item_optimize(INVENTORY_IDX item)
        int             j;
        object_type *o_ptr;
 
-       /* Get the item */
        o_ptr = &st_ptr->stock[item];
 
        /* Must exist */
@@ -2123,8 +2092,6 @@ static void store_create(void)
                        level = rand_range(1, STORE_OBJ_LEVEL);
                }
 
-
-               /* Get local object */
                q_ptr = &forge;
 
                /* Create a new object of the chosen kind */
@@ -2192,7 +2159,7 @@ static void store_create(void)
  * @param minprice アイテムの最低販売価格
  * @return 割引を禁止するならTRUEを返す。
  */
-static bool noneedtobargain(s32b minprice)
+static bool noneedtobargain(PRICE minprice)
 {
        s32b good = st_ptr->good_buy;
        s32b bad = st_ptr->bad_buy;
@@ -2219,7 +2186,7 @@ static bool noneedtobargain(s32b minprice)
  * @param num 売買数 
  * @return なし
  */
-static void updatebargain(s32b price, s32b minprice, int num)
+static void updatebargain(PRICE price, PRICE minprice, int num)
 {
        /* Hack -- auto-haggle */
        if (!manual_haggle) return;
@@ -2264,10 +2231,8 @@ static void display_entry(int pos)
        char            o_name[MAX_NLEN];
        char            out_val[160];
 
-
        int maxwid = 75;
 
-       /* Get the item */
        o_ptr = &st_ptr->stock[pos];
 
        /* Get the "offset" */
@@ -2297,18 +2262,17 @@ static void display_entry(int pos)
                /* Leave room for weights, if necessary -DRS- */
                if (show_weights) maxwid -= 10;
 
-               /* Describe the object */
                object_desc(o_name, o_ptr, 0);
                o_name[maxwid] = '\0';
                c_put_str(tval_to_attr[o_ptr->tval], o_name, i+6, cur_col);
 
                /* Show weights */
-               if (show_weights)
+               if(show_weights)
                {
                        /* Only show the weight of an individual item */
                        int wgt = o_ptr->weight;
 #ifdef JP
-                       sprintf(out_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
+                       sprintf(out_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
                        put_str(out_val, i+6, 67);
 #else
                        (void)sprintf(out_val, "%3d.%d lb", wgt / 10, wgt % 10);
@@ -2622,8 +2586,6 @@ static int get_stock(COMMAND_CODE *com_val, cptr pmt, int i, int j)
        char    out_val[160];
        char    lo, hi;
 
-#ifdef ALLOW_REPEAT /* TNB */
-
        /* Get the item index */
        if (repeat_pull(com_val))
        {
@@ -2635,9 +2597,7 @@ static int get_stock(COMMAND_CODE *com_val, cptr pmt, int i, int j)
                }
        }
 
-#endif /* ALLOW_REPEAT -- TNB */
-
-       /* Paranoia XXX XXX XXX */
+       /* Paranoia */
        msg_print(NULL);
 
 
@@ -2680,7 +2640,6 @@ static int get_stock(COMMAND_CODE *com_val, cptr pmt, int i, int j)
                        break;
                }
 
-               /* Oops */
                bell();
        }
 
@@ -2690,12 +2649,8 @@ static int get_stock(COMMAND_CODE *com_val, cptr pmt, int i, int j)
        /* Cancel */
        if (command == ESCAPE) return (FALSE);
 
-#ifdef ALLOW_REPEAT /* TNB */
-
        repeat_push(*com_val);
 
-#endif /* ALLOW_REPEAT -- TNB */
-
        /* Success */
        return (TRUE);
 }
@@ -2784,7 +2739,7 @@ static s32b last_inc = 0L;
  * @param final 最終確定価格ならばTRUE
  * @return プレイヤーを締め出す場合TRUEを返す
  */
-static int get_haggle(cptr pmt, s32b *poffer, s32b price, int final)
+static int get_haggle(cptr pmt, s32b *poffer, PRICE price, int final)
 {
        s32b            i;
 
@@ -2838,7 +2793,7 @@ static int get_haggle(cptr pmt, s32b *poffer, s32b price, int final)
        }
 
 
-       /* Paranoia XXX XXX XXX */
+       /* Paranoia */
        msg_print(NULL);
 
 
@@ -2945,7 +2900,7 @@ static int get_haggle(cptr pmt, s32b *poffer, s32b price, int final)
  */
 static bool receive_offer(cptr pmt, s32b *poffer,
                          s32b last_offer, int factor,
-                         s32b price, int final)
+                         PRICE price, int final)
 {
        /* Haggle till done */
        while (TRUE)
@@ -3237,7 +3192,6 @@ static bool sell_haggle(object_type *o_ptr, s32b *price)
                /* No reason to haggle */
                if (final_ask >= purse)
                {
-                       /* Message */
 #ifdef JP
                        msg_print("即座にこの金額にまとまった。");
 #else
@@ -3253,7 +3207,6 @@ static bool sell_haggle(object_type *o_ptr, s32b *price)
                /* No need to haggle */
                else if (noneed)
                {
-                       /* Message */
 #ifdef JP
                        msg_print("結局この金額にまとまった。");
 #else
@@ -3294,7 +3247,7 @@ static bool sell_haggle(object_type *o_ptr, s32b *price)
        final_ask *= o_ptr->number;
 
 
-       /* XXX XXX XXX Display commands */
+       /* Display commands */
 
        /* Haggling parameters */
        min_per = ot_ptr->haggle_per;
@@ -3441,7 +3394,7 @@ static void store_purchase(void)
 
        ITEM_NUMBER amt;
 
-       s32b price, best;
+       PRICE price, best;
 
        object_type forge;
        object_type *j_ptr;
@@ -3526,8 +3479,6 @@ static void store_purchase(void)
 
        /* Assume the player wants just one of them */
        amt = 1;
-
-       /* Get local object */
        j_ptr = &forge;
 
        /* Get a copy of the object */
@@ -3578,8 +3529,6 @@ msg_format("一つにつき $%ldです。", (long)(best));
                /* Allow user abort */
                if (amt <= 0) return;
        }
-
-       /* Get local object */
        j_ptr = &forge;
 
        /* Get desired object */
@@ -3625,7 +3574,6 @@ msg_format("一つにつき $%ldです。", (long)(best));
                        /* Describe the object (fully) */
                        object_desc(o_name, j_ptr, 0);
 
-                       /* Message */
 #ifdef JP
                        msg_format("%s(%c)を購入する。", o_name, I2A(item));
 #else
@@ -3679,7 +3627,6 @@ msg_format("一つにつき $%ldです。", (long)(best));
                                /* Describe the transaction */
                                object_desc(o_name, j_ptr, 0);
 
-                               /* Message */
 #ifdef JP
 msg_format("%sを $%ldで購入しました。", o_name, (long)price);
 #else
@@ -3706,7 +3653,6 @@ msg_format("%sを $%ldで購入しました。", o_name, (long)price);
                                /* Describe the final result */
                                object_desc(o_name, &inventory[item_new], 0);
 
-                               /* Message */
 #ifdef JP
                                msg_format("%s(%c)を手に入れた。", o_name, index_to_label(item_new));
 #else
@@ -3722,8 +3668,6 @@ msg_format("%sを $%ldで購入しました。", o_name, (long)price);
                                {
                                        o_ptr->pval -= j_ptr->pval;
                                }
-
-                               /* Handle stuff */
                                handle_stuff();
 
                                /* Note how many slots the store used to have */
@@ -3740,7 +3684,6 @@ msg_format("%sを $%ldで購入しました。", o_name, (long)price);
                                        if (one_in_(STORE_SHUFFLE))
                                        {
                                                char buf[80];
-                                               /* Message */
 #ifdef JP
                                                msg_print("店主は引退した。");
 #else
@@ -3763,7 +3706,6 @@ msg_format("%sを $%ldで購入しました。", o_name, (long)price);
                                        /* Maintain */
                                        else
                                        {
-                                               /* Message */
 #ifdef JP
                                                msg_print("店主は新たな在庫を取り出した。");
 #else
@@ -3832,15 +3774,12 @@ msg_format("%sを $%ldで購入しました。", o_name, (long)price);
                /* Describe just the result */
                object_desc(o_name, &inventory[item_new], 0);
 
-               /* Message */
 #ifdef JP
                msg_format("%s(%c)を取った。",
 #else
                msg_format("You have %s (%c).",
 #endif
  o_name, index_to_label(item_new));
-
-               /* Handle stuff */
                handle_stuff();
 
                /* Take note if we take the last one */
@@ -3895,7 +3834,7 @@ static void store_sell(void)
        int item_pos;
        int amt;
 
-       s32b price, value, dummy;
+       PRICE price, value, dummy;
 
        object_type forge;
        object_type *q_ptr;
@@ -3934,7 +3873,6 @@ static void store_sell(void)
        /* Only allow items the store will buy */
        item_tester_hook = store_will_buy;
 
-       /* Get an item */
        /* 我が家でおかしなメッセージが出るオリジナルのバグを修正 */
        if (cur_store_num == STORE_HOME)
        {
@@ -3979,7 +3917,6 @@ static void store_sell(void)
        /* Hack -- Cannot remove cursed items */
        if ((item >= INVEN_RARM) && object_is_cursed(o_ptr))
        {
-               /* Oops */
 #ifdef JP
                msg_print("ふーむ、どうやらそれは呪われているようだね。");
 #else
@@ -3987,7 +3924,6 @@ static void store_sell(void)
 #endif
 
 
-               /* Nope */
                return;
        }
 
@@ -4004,8 +3940,6 @@ static void store_sell(void)
                /* Allow user abort */
                if (amt <= 0) return;
        }
-
-       /* Get local object */
        q_ptr = &forge;
 
        /* Get a copy of the object */
@@ -4107,8 +4041,6 @@ static void store_sell(void)
 
                        /* Identify it */
                        identify_item(o_ptr);
-
-                       /* Get local object */
                        q_ptr = &forge;
 
                        /* Get a copy of the object */
@@ -4168,8 +4100,6 @@ msg_format("%sを $%ldで売却しました。", o_name, (long)price);
                                autopick_alter_item(item, FALSE);
 
                        inven_item_optimize(item);
-
-                       /* Handle stuff */
                        handle_stuff();
 
                        /* The store gets that (known) item */
@@ -4218,8 +4148,6 @@ msg_format("%sを $%ldで売却しました。", o_name, (long)price);
 
                /* Distribute charges of wands/rods */
                distribute_charges(o_ptr, q_ptr, amt);
-
-               /* Describe */
 #ifdef JP
                msg_format("%sを置いた。(%c)", o_name, index_to_label(item));
 #else
@@ -4232,8 +4160,6 @@ msg_format("%sを $%ldで売却しました。", o_name, (long)price);
                inven_item_increase(item, -amt);
                inven_item_describe(item);
                inven_item_optimize(item);
-
-               /* Handle stuff */
                handle_stuff();
 
                /* Let the home carry it */
@@ -4251,8 +4177,6 @@ msg_format("%sを $%ldで売却しました。", o_name, (long)price);
        {
                /* Distribute charges of wands/rods */
                distribute_charges(o_ptr, q_ptr, amt);
-
-               /* Describe */
 #ifdef JP
                msg_format("%sを置いた。(%c)", o_name, index_to_label(item));
 #else
@@ -4265,8 +4189,6 @@ msg_format("%sを $%ldで売却しました。", o_name, (long)price);
                inven_item_increase(item, -amt);
                inven_item_describe(item);
                inven_item_optimize(item);
-
-               /* Handle stuff */
                handle_stuff();
 
                /* Let the home carry it */
@@ -4301,35 +4223,18 @@ static void store_examine(void)
        char        o_name[MAX_NLEN];
        char        out_val[160];
 
-
        /* Empty? */
        if (st_ptr->stock_num <= 0)
        {
                if (cur_store_num == STORE_HOME)
-#ifdef JP
-                       msg_print("我が家には何も置いてありません。");
-#else
-                       msg_print("Your home is empty.");
-#endif
-
+                       msg_print(_("我が家には何も置いてありません。", "Your home is empty."));
                else if (cur_store_num == STORE_MUSEUM)
-#ifdef JP
-                       msg_print("博物館には何も置いてありません。");
-#else
-                       msg_print("Museum is empty.");
-#endif
-
+                       msg_print(_("博物館には何も置いてありません。", "Museum is empty."));
                else
-#ifdef JP
-                       msg_print("現在商品の在庫を切らしています。");
-#else
-                       msg_print("I am currently out of stock.");
-#endif
-
+                       msg_print(_("現在商品の在庫を切らしています。", "I am currently out of stock."));
                return;
        }
 
-
        /* Find the number of objects on this and following pages */
        i = (st_ptr->stock_num - store_top);
 
@@ -4337,12 +4242,7 @@ static void store_examine(void)
        if (i > store_bottom) i = store_bottom;
 
        /* Prompt */
-#ifdef JP
-sprintf(out_val, "どれを調べますか?");
-#else
-       sprintf(out_val, "Which item do you want to examine? ");
-#endif
-
+       sprintf(out_val, _("どれを調べますか?", "Which item do you want to examine? "));
 
        /* Get the item number to be examined */
        if (!get_stock(&item, out_val, 0, i - 1)) return;
@@ -4357,34 +4257,15 @@ sprintf(out_val, "どれを調べますか?");
        if (!(o_ptr->ident & IDENT_MENTAL))
        {
                /* This can only happen in the home */
-#ifdef JP
-msg_print("このアイテムについて特に知っていることはない。");
-#else
-               msg_print("You have no special knowledge about that item.");
-#endif
-
+               msg_print(_("このアイテムについて特に知っていることはない。", "You have no special knowledge about that item."));
                return;
        }
 
-       /* Description */
        object_desc(o_name, o_ptr, 0);
+       msg_format(_("%sを調べている...", "Examining %s..."), o_name);
 
-       /* Describe */
-#ifdef JP
-msg_format("%sを調べている...", o_name);
-#else
-       msg_format("Examining %s...", o_name);
-#endif
-
-
-       /* Describe it fully */
        if (!screen_object(o_ptr, SCROBJ_FORCE_DETAIL))
-#ifdef JP
-msg_print("特に変わったところはないようだ。");
-#else
-               msg_print("You see nothing special.");
-#endif
-
+               msg_print(_("特に変わったところはないようだ。", "You see nothing special."));
 
        return;
 }
@@ -4397,21 +4278,16 @@ msg_print("特に変わったところはないようだ。");
  */
 static void museum_remove_object(void)
 {
-       int         i;
+       int i;
        COMMAND_CODE item;
        object_type *o_ptr;
-       char        o_name[MAX_NLEN];
-       char        out_val[160];
+       char o_name[MAX_NLEN];
+       char out_val[160];
 
        /* Empty? */
        if (st_ptr->stock_num <= 0)
        {
-#ifdef JP
-               msg_print("博物館には何も置いてありません。");
-#else
-               msg_print("Museum is empty.");
-#endif
-
+               msg_print(_("博物館には何も置いてありません。", "Museum is empty."));
                return;
        }
 
@@ -4422,11 +4298,7 @@ static void museum_remove_object(void)
        if (i > store_bottom) i = store_bottom;
 
        /* Prompt */
-#ifdef JP
-       sprintf(out_val, "どのアイテムの展示をやめさせますか?");
-#else
-       sprintf(out_val, "Which item do you want to order to remove? ");
-#endif
+       sprintf(out_val, _("どのアイテムの展示をやめさせますか?", "Which item do you want to order to remove? "));
 
        /* Get the item number to be removed */
        if (!get_stock(&item, out_val, 0, i - 1)) return;
@@ -4437,23 +4309,12 @@ static void museum_remove_object(void)
        /* Get the actual item */
        o_ptr = &st_ptr->stock[item];
 
-       /* Description */
        object_desc(o_name, o_ptr, 0);
 
-#ifdef JP
-       msg_print("展示をやめさせたアイテムは二度と見ることはできません!");
-       if (!get_check(format("本当に%sの展示をやめさせますか?", o_name))) return;
-#else
-       msg_print("You cannot see items which is removed from the Museum!");
-       if (!get_check(format("Really order to remove %s from the Museum? ", o_name))) return;
-#endif
+       msg_print(_("展示をやめさせたアイテムは二度と見ることはできません!", "You cannot see items which is removed from the Museum!"));
+       if (!get_check(format(_("本当に%sの展示をやめさせますか?", "Really order to remove %s from the Museum? "), o_name))) return;
 
-       /* Message */
-#ifdef JP
-       msg_format("%sの展示をやめさせた。", o_name);
-#else
-       msg_format("You ordered to remove %s.", o_name);
-#endif
+       msg_format(_("%sの展示をやめさせた。", "You ordered to remove %s."), o_name);
 
        /* Remove the items from the home */
        store_item_increase(item, -o_ptr->number);
@@ -4496,13 +4357,9 @@ static bool leave_store = FALSE;
  */
 static void store_process_command(void)
 {
-#ifdef ALLOW_REPEAT /* TNB */
-
        /* Handle repeating the last command */
        repeat_check();
 
-#endif /* ALLOW_REPEAT -- TNB */
-
        if (rogue_like_commands && command_cmd == 'l')
        {
                command_cmd = 'x';      /* hack! */
@@ -4523,11 +4380,7 @@ static void store_process_command(void)
                case '-':
                {
                        if (st_ptr->stock_num <= store_bottom) {
-#ifdef JP
-                               msg_print("これで全部です。");
-#else
-                               msg_print("Entire inventory is shown.");
-#endif
+                               msg_print(_("これで全部です。", "Entire inventory is shown."));
                        }
                        else{
                                store_top -= store_bottom;
@@ -4545,12 +4398,7 @@ static void store_process_command(void)
                {
                        if (st_ptr->stock_num <= store_bottom)
                        {
-#ifdef JP
-                               msg_print("これで全部です。");
-#else
-                               msg_print("Entire inventory is shown.");
-#endif
-
+                               msg_print(_("これで全部です。", "Entire inventory is shown."));
                        }
                        else
                        {
@@ -4578,7 +4426,6 @@ static void store_process_command(void)
                        break;
                }
 
-               /* Redraw */
                case KTRL('R'):
                {
                        do_cmd_redraw();
@@ -4667,8 +4514,6 @@ static void store_process_command(void)
                        break;
                }
 
-
-
                /*** Use various objects ***/
 
                /* Browse a book */
@@ -4860,13 +4705,8 @@ static void store_process_command(void)
                        }
                        else
                        {
-#ifdef JP
-                               msg_print("そのコマンドは店の中では使えません。");
-#else
-                               msg_print("That command does not work in stores.");
-#endif
+                               msg_print(_("そのコマンドは店の中では使えません。", "That command does not work in stores."));
                        }
-
                        break;
                }
        }
@@ -4909,12 +4749,7 @@ void do_cmd_store(void)
        /* Verify a store */
        if (!cave_have_flag_grid(c_ptr, FF_STORE))
        {
-#ifdef JP
-               msg_print("ここには店がありません。");
-#else
-               msg_print("You see no store here.");
-#endif
-
+               msg_print(_("ここには店がありません。", "You see no store here."));
                return;
        }
 
@@ -4930,12 +4765,7 @@ void do_cmd_store(void)
        if ((town[p_ptr->town_num].store[which].store_open >= turn) ||
            (ironman_shops))
        {
-#ifdef JP
-               msg_print("ドアに鍵がかかっている。");
-#else
-               msg_print("The doors are locked.");
-#endif
-
+               msg_print(_("ドアに鍵がかかっている。", "The doors are locked."));
                p_ptr->town_num = old_town_num;
                return;
        }
@@ -5060,7 +4890,7 @@ void do_cmd_store(void)
 #endif
                }
 
-               /* Shop commands XXX XXX XXX */
+               /* Shop commands */
                else
                {
 #ifdef JP
@@ -5100,12 +4930,7 @@ void do_cmd_store(void)
                }
 #endif
                /* Prompt */
-#ifdef JP
-               prt("コマンド:", 20 + xtra_stock, 0);
-#else
-               prt("You may: ", 20 + xtra_stock, 0);
-#endif
-
+               prt(_("コマンド:", "You may: "), 20 + xtra_stock, 0);
 
                /* Get a command */
                request_command(TRUE);
@@ -5124,11 +4949,9 @@ void do_cmd_store(void)
 
                /* Notice stuff */
                notice_stuff();
-
-               /* Handle stuff */
                handle_stuff();
 
-               /* XXX XXX XXX Pack Overflow */
+               /* Pack Overflow */
                if (inventory[INVEN_PACK].k_idx)
                {
                        INVENTORY_IDX item = INVEN_PACK;
@@ -5138,7 +4961,6 @@ void do_cmd_store(void)
                        /* Hack -- Flee from the store */
                        if (cur_store_num != STORE_HOME)
                        {
-                               /* Message */
 #ifdef JP
                                if (cur_store_num == STORE_MUSEUM)
                                        msg_print("ザックからアイテムがあふれそうなので、あわてて博物館から出た...");
@@ -5159,7 +4981,6 @@ void do_cmd_store(void)
                        /* Hack -- Flee from the home */
                        else if (!store_check_num(o_ptr))
                        {
-                               /* Message */
 #ifdef JP
                                msg_print("ザックからアイテムがあふれそうなので、あわてて家から出た...");
 #else
@@ -5189,8 +5010,6 @@ void do_cmd_store(void)
                                msg_print("Your pack overflows!");
 #endif
 
-
-                               /* Get local object */
                                q_ptr = &forge;
 
                                /* Grab a copy of the item */
@@ -5199,7 +5018,6 @@ void do_cmd_store(void)
                                /* Describe it */
                                object_desc(o_name, q_ptr, 0);
 
-                               /* Message */
 #ifdef JP
                                msg_format("%sが落ちた。(%c)", o_name, index_to_label(item));
 #else
@@ -5211,8 +5029,6 @@ void do_cmd_store(void)
                                inven_item_increase(item, -255);
                                inven_item_describe(item);
                                inven_item_optimize(item);
-
-                               /* Handle stuff */
                                handle_stuff();
 
                                /* Let the home carry it */
@@ -5239,7 +5055,7 @@ void do_cmd_store(void)
 
        p_ptr->town_num = old_town_num;
 
-       /* Free turn XXX XXX XXX */
+       /* Free turn */
        p_ptr->energy_use = 100;
 
 
@@ -5256,7 +5072,7 @@ void do_cmd_store(void)
        /* Allow expanding macros */
        get_com_no_macros = FALSE;
 
-       /* Flush messages XXX XXX XXX */
+       /* Flush messages */
        msg_print(NULL);
 
 
@@ -5271,10 +5087,8 @@ void do_cmd_store(void)
        /* Redraw entire screen */
        p_ptr->redraw |= (PR_BASIC | PR_EXTRA | PR_EQUIPPY);
 
-       /* Redraw map */
        p_ptr->redraw |= (PR_MAP);
 
-       /* Window stuff */
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 }
 
@@ -5332,7 +5146,6 @@ void store_shuffle(int which)
        {
                object_type *o_ptr;
 
-               /* Get the item */
                o_ptr = &st_ptr->stock[i];
 
                if (!object_is_artifact(o_ptr))
@@ -5344,11 +5157,7 @@ void store_shuffle(int which)
                        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"));
                }
        }
 }