From: Hourier Date: Sun, 22 Mar 2020 11:34:55 +0000 (+0900) Subject: [Refactor] #40233 Moved comment_7* from store.c to store-owner-comments.c/h X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a1f4e0ec56f88584a88382f9b29f21b2a89660df;p=hengband%2Fhengband.git [Refactor] #40233 Moved comment_7* from store.c to store-owner-comments.c/h --- diff --git a/src/market/store-owner-comments.c b/src/market/store-owner-comments.c index d6dd9a6d0..17687de12 100644 --- a/src/market/store-owner-comments.c +++ b/src/market/store-owner-comments.c @@ -21,7 +21,6 @@ concptr comment_1[MAX_COMMENT_1] = "Done!", "Taken!" #endif - }; #ifdef JP @@ -45,7 +44,6 @@ concptr comment_2a[MAX_COMMENT_2A] = "You try my patience. %s is final.", "My patience grows thin. %s is final." #endif - }; concptr comment_2b[MAX_COMMENT_2B] = @@ -137,7 +135,6 @@ concptr comment_3b[MAX_COMMENT_3B] = "%s gold pieces and be thankful for it!", "%s gold pieces and not a copper more!" #endif - }; #ifdef JP @@ -171,7 +168,6 @@ concptr comment_4a[MAX_COMMENT_4A] = "That does it! You shall waste my time no more!", "This is getting nowhere! I'm going to Londis!" #endif - }; #ifdef JP @@ -260,3 +256,65 @@ concptr comment_6[MAX_COMMENT_6] = "Sorry, what was that again?" #endif }; + +concptr comment_7a[MAX_COMMENT_7A] = +{ +#ifdef JP + "うわああぁぁ!", + "なんてこった!", + "誰かがむせび泣く声が聞こえる...。", + "店主が悔しげにわめいている!" +#else + "Arrgghh!", + "You bastard!", + "You hear someone sobbing...", + "The shopkeeper howls in agony!" +#endif + +}; + +concptr comment_7b[MAX_COMMENT_7B] = +{ +#ifdef JP + "くそう!", + "この悪魔め!", + "店主が恨めしそうに見ている。", + "店主が睨んでいる。" +#else + "Damn!", + "You fiend!", + "The shopkeeper curses at you.", + "The shopkeeper glares at you." +#endif + +}; + +concptr comment_7c[MAX_COMMENT_7C] = +{ +#ifdef JP + "すばらしい!", + "君が天使に見えるよ!", + "店主がクスクス笑っている。", + "店主が大声で笑っている。" +#else + "Cool!", + "You've made my day!", + "The shopkeeper giggles.", + "The shopkeeper laughs loudly." +#endif +}; + +concptr comment_7d[MAX_COMMENT_7D] = +{ +#ifdef JP + "やっほぅ!", + "こんなおいしい思いをしたら、真面目に働けなくなるなぁ。", + "店主は嬉しくて跳ね回っている。", + "店主は満面に笑みをたたえている。" +#else + "Yipee!", + "I think I'll retire!", + "The shopkeeper jumps for joy.", + "The shopkeeper smiles gleefully." +#endif +}; diff --git a/src/market/store-owner-comments.h b/src/market/store-owner-comments.h index 4a646adaf..0b615f745 100644 --- a/src/market/store-owner-comments.h +++ b/src/market/store-owner-comments.h @@ -9,6 +9,10 @@ #define MAX_COMMENT_4B 4 #define MAX_COMMENT_5 8 #define MAX_COMMENT_6 4 +#define MAX_COMMENT_7A 4 +#define MAX_COMMENT_7B 4 +#define MAX_COMMENT_7C 4 +#define MAX_COMMENT_7D 4 extern concptr comment_1[MAX_COMMENT_1]; extern concptr comment_1_B[MAX_COMMENT_1]; @@ -25,3 +29,7 @@ extern concptr comment_4b_B[MAX_COMMENT_4B]; extern concptr comment_5[MAX_COMMENT_5]; extern concptr comment_5_B[MAX_COMMENT_5]; extern concptr comment_6[MAX_COMMENT_6]; +extern concptr comment_7a[MAX_COMMENT_7A]; +extern concptr comment_7b[MAX_COMMENT_7B]; +extern concptr comment_7c[MAX_COMMENT_7C]; +extern concptr comment_7d[MAX_COMMENT_7D]; diff --git a/src/store.c b/src/store.c index 5cbf90c31..a0cf9c999 100644 --- a/src/store.c +++ b/src/store.c @@ -92,11 +92,7 @@ static void say_comment_1(player_type *player_ptr) if (one_in_(RUMOR_CHANCE)) { -#ifdef JP - msg_print("店主は耳うちした:"); -#else - msg_print("The shopkeeper whispers something into your ear:"); -#endif + msg_print(_("店主は耳うちした:", "The shopkeeper whispers something into your ear:")); display_rumor(player_ptr, TRUE); } } @@ -111,8 +107,7 @@ static void say_comment_1(player_type *player_ptr) */ static void say_comment_2(PRICE value, int annoyed) { - /* Prepare a string to insert */ - char tmp_val[80]; + char tmp_val[80]; sprintf(tmp_val, "%ld", (long)value); if (annoyed > 0) @@ -155,7 +150,6 @@ static void say_comment_3(PRICE value, int annoyed) else { #ifdef JP - /* ブラックマーケットの時は別のメッセージを出す */ if (cur_store_num == STORE_BLACK) { msg_format(comment_3b_B[randint0(MAX_COMMENT_3B)], tmp_val); @@ -232,79 +226,6 @@ static void say_comment_6(void) msg_print(comment_6[randint0(MAX_COMMENT_6)]); } -#define MAX_COMMENT_7A 4 - -static concptr comment_7a[MAX_COMMENT_7A] = -{ -#ifdef JP - "うわああぁぁ!", - "なんてこった!", - "誰かがむせび泣く声が聞こえる...。", - "店主が悔しげにわめいている!" -#else - "Arrgghh!", - "You bastard!", - "You hear someone sobbing...", - "The shopkeeper howls in agony!" -#endif - -}; - -#define MAX_COMMENT_7B 4 - -static concptr comment_7b[MAX_COMMENT_7B] = -{ -#ifdef JP - "くそう!", - "この悪魔め!", - "店主が恨めしそうに見ている。", - "店主が睨んでいる。" -#else - "Damn!", - "You fiend!", - "The shopkeeper curses at you.", - "The shopkeeper glares at you." -#endif - -}; - -#define MAX_COMMENT_7C 4 - -static concptr comment_7c[MAX_COMMENT_7C] = -{ -#ifdef JP - "すばらしい!", - "君が天使に見えるよ!", - "店主がクスクス笑っている。", - "店主が大声で笑っている。" -#else - "Cool!", - "You've made my day!", - "The shopkeeper giggles.", - "The shopkeeper laughs loudly." -#endif - -}; - -#define MAX_COMMENT_7D 4 - -static concptr comment_7d[MAX_COMMENT_7D] = -{ -#ifdef JP - "やっほぅ!", - "こんなおいしい思いをしたら、真面目に働けなくなるなぁ。", - "店主は嬉しくて跳ね回っている。", - "店主は満面に笑みをたたえている。" -#else - "Yipee!", - "I think I'll retire!", - "The shopkeeper jumps for joy.", - "The shopkeeper smiles gleefully." -#endif - -}; - - /*! * @brief 店主が交渉を終えた際の反応を返す処理 / * Let a shop-keeper React to a purchase