OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement.
[hengband/hengband.git] / src / store.c
index c22aaeb..516386a 100644 (file)
@@ -2245,8 +2245,8 @@ static void display_entry(int pos)
        cur_col = 3;
        if (show_item_graph)
        {
-               byte a = object_attr(o_ptr);
-               char c = object_char(o_ptr);
+               TERM_COLOR a = object_attr(o_ptr);
+               SYMBOL_CODE c = object_char(o_ptr);
 
                Term_queue_bigchar(cur_col, i + 6, a, c, 0, 0);
                if (use_bigtile) cur_col++;
@@ -2459,30 +2459,15 @@ static void display_store(void)
        if (cur_store_num == STORE_HOME)
        {
                /* Put the owner name */
-#ifdef JP
-               put_str("我が家", 3, 31);
-#else
-               put_str("Your Home", 3, 30);
-#endif
-
+               put_str(_("我が家", "Your Home"), 3, 31);
 
                /* Label the item descriptions */
-#ifdef JP
-               put_str("アイテムの一覧", 5, 4);
-#else
-               put_str("Item Description", 5, 3);
-#endif
-
+               put_str(_("アイテムの一覧", "Item Description"), 5, 4);
 
                /* If showing weights, show label */
                if (show_weights)
                {
-#ifdef JP
-                       put_str("重さ", 5, 72);
-#else
-                       put_str("Weight", 5, 70);
-#endif
-
+                       put_str(_("  重さ", "Weight"), 5, 70);
                }
        }
 
@@ -2490,30 +2475,15 @@ static void display_store(void)
        else if (cur_store_num == STORE_MUSEUM)
        {
                /* Put the owner name */
-#ifdef JP
-               put_str("博物館", 3, 31);
-#else
-               put_str("Museum", 3, 30);
-#endif
-
+               put_str(_("博物館", "Museum"), 3, 31);
 
                /* Label the item descriptions */
-#ifdef JP
-               put_str("アイテムの一覧", 5, 4);
-#else
-               put_str("Item Description", 5, 3);
-#endif
-
+               put_str(_("アイテムの一覧", "Item Description"), 5, 4);
 
                /* If showing weights, show label */
                if (show_weights)
                {
-#ifdef JP
-                       put_str("重さ", 5, 72);
-#else
-                       put_str("Weight", 5, 70);
-#endif
-
+                       put_str(_("  重さ", "Weight"), 5, 70);
                }
        }
 
@@ -2533,31 +2503,17 @@ static void display_store(void)
                prt(buf, 3, 50);
 
                /* Label the item descriptions */
-#ifdef JP
-               put_str("商品の一覧", 5, 7);
-#else
-               put_str("Item Description", 5, 3);
-#endif
+               put_str(_("商品の一覧", "Item Description"), 5, 5);
 
 
                /* If showing weights, show label */
                if (show_weights)
                {
-#ifdef JP
-                       put_str("重さ", 5, 62);
-#else
-                       put_str("Weight", 5, 60);
-#endif
-
+                       put_str(_("  重さ", "Weight"), 5, 60);
                }
 
                /* Label the asking price (in stores) */
-#ifdef JP
-               put_str("価格", 5, 73);
-#else
-               put_str("Price", 5, 72);
-#endif
-
+               put_str(_(" 価格", "Price"), 5, 72);
        }
 
        /* Display the current gold */
@@ -2580,9 +2536,9 @@ static void display_store(void)
  */
 static int get_stock(COMMAND_CODE *com_val, cptr pmt, int i, int j)
 {
-       char    command;
-       char    out_val[160];
-       char    lo, hi;
+       char command;
+       char out_val[160];
+       char lo, hi;
 
        /* Get the item index */
        if (repeat_pull(com_val))
@@ -2598,7 +2554,6 @@ static int get_stock(COMMAND_CODE *com_val, cptr pmt, int i, int j)
        /* Paranoia */
        msg_print(NULL);
 
-
        /* Assume failure */
        *com_val = (-1);
 
@@ -2644,7 +2599,6 @@ static int get_stock(COMMAND_CODE *com_val, cptr pmt, int i, int j)
        /* Clear the prompt */
        prt("", 0, 0);
 
-       /* Cancel */
        if (command == ESCAPE) return (FALSE);
 
        repeat_push(*com_val);
@@ -3128,10 +3082,8 @@ static bool purchase_haggle(object_type *o_ptr, s32b *price)
                }
        }
 
-       /* Cancel */
        if (cancel) return (TRUE);
 
-       /* Update bargaining info */
        updatebargain(*price, final_ask, o_ptr->number);
 
        /* Do not cancel */
@@ -3369,10 +3321,8 @@ static bool sell_haggle(object_type *o_ptr, s32b *price)
                }
        }
 
-       /* Cancel */
        if (cancel) return (TRUE);
 
-       /* Update bargaining info */
        updatebargain(*price, final_ask, o_ptr->number);
 
        /* Do not cancel */
@@ -3831,13 +3781,7 @@ static void store_sell(void)
        /* Hack -- Cannot remove cursed items */
        if ((item >= INVEN_RARM) && object_is_cursed(o_ptr))
        {
-#ifdef JP
-               msg_print("ふーむ、どうやらそれは呪われているようだね。");
-#else
-               msg_print("Hmmm, it seems to be cursed.");
-#endif
-
-
+               msg_print(_("ふーむ、どうやらそれは呪われているようだね。", "Hmmm, it seems to be cursed."));
                return;
        }
 
@@ -3937,7 +3881,6 @@ static void store_sell(void)
                        /* Get the "apparent" value */
                        dummy = object_value(q_ptr) * q_ptr->number;
 
-                       /* Identify it */
                        identify_item(o_ptr);
                        q_ptr = &forge;
 
@@ -4025,7 +3968,6 @@ static void store_sell(void)
 
                if (!get_check(format(_("本当に%sを寄贈しますか?", "Really give %s to the Museum? "), o2_name))) return;
 
-               /* Identify it */
                identify_item(q_ptr);
                q_ptr->ident |= IDENT_MENTAL;
 
@@ -4606,9 +4548,9 @@ void do_cmd_store(void)
        int i;
        cave_type *c_ptr;
        bool need_redraw_store_inv; /* To redraw missiles damage and prices in store */
-       int w, h;
+       TERM_LEN w, h;
 
-       /* Get term size */
+       if(p_ptr->wild_mode) return;
        Term_get_size(&w, &h);
 
        /* Calculate stocks per 1 page */
@@ -4701,7 +4643,6 @@ void do_cmd_store(void)
                /* Clear */
                clear_from(20 + xtra_stock);
 
-
                /* Basic commands */
                prt(_(" ESC) 建物から出る", " ESC) Exit from Building."), 21 + xtra_stock, 0);
 
@@ -4737,7 +4678,6 @@ void do_cmd_store(void)
                }
 
                /* 基本的なコマンドの追加表示 */
-
                prt(_("i/e) 持ち物/装備の一覧", "i/e) Inventry/Equipment list"), 21 + xtra_stock, 56);
 
                if (rogue_like_commands)
@@ -4752,7 +4692,6 @@ void do_cmd_store(void)
                /* Prompt */
                prt(_("コマンド:", "You may: "), 20 + xtra_stock, 0);
 
-               /* Get a command */
                request_command(TRUE);
 
                /* Process the command */
@@ -5040,8 +4979,7 @@ void store_maint(int town_num, int store_num)
  */
 void store_init(int town_num, int store_num)
 {
-       int             k;
-
+       int k;
        cur_store_num = store_num;
 
        /* Activate that store */