OSDN Git Service

[Refactor] #40233 Moved comment_7* from store.c to store-owner-comments.c/h
authorHourier <hourier@users.sourceforge.jp>
Sun, 22 Mar 2020 11:34:55 +0000 (20:34 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sun, 22 Mar 2020 11:34:55 +0000 (20:34 +0900)
src/market/store-owner-comments.c
src/market/store-owner-comments.h
src/store.c

index d6dd9a6..17687de 100644 (file)
@@ -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
+};
index 4a646ad..0b615f7 100644 (file)
@@ -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];
index 5cbf90c..a0cf9c9 100644 (file)
@@ -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