• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisiona1f4e0ec56f88584a88382f9b29f21b2a89660df (tree)
Zeit2020-03-22 20:34:55
AutorHourier <hourier@user...>
CommiterHourier

Log Message

[Refactor] #40233 Moved comment_7* from store.c to store-owner-comments.c/h

Ändern Zusammenfassung

Diff

--- a/src/market/store-owner-comments.c
+++ b/src/market/store-owner-comments.c
@@ -21,7 +21,6 @@ concptr comment_1[MAX_COMMENT_1] =
2121 "Done!",
2222 "Taken!"
2323 #endif
24-
2524 };
2625
2726 #ifdef JP
@@ -45,7 +44,6 @@ concptr comment_2a[MAX_COMMENT_2A] =
4544 "You try my patience. %s is final.",
4645 "My patience grows thin. %s is final."
4746 #endif
48-
4947 };
5048
5149 concptr comment_2b[MAX_COMMENT_2B] =
@@ -137,7 +135,6 @@ concptr comment_3b[MAX_COMMENT_3B] =
137135 "%s gold pieces and be thankful for it!",
138136 "%s gold pieces and not a copper more!"
139137 #endif
140-
141138 };
142139
143140 #ifdef JP
@@ -171,7 +168,6 @@ concptr comment_4a[MAX_COMMENT_4A] =
171168 "That does it! You shall waste my time no more!",
172169 "This is getting nowhere! I'm going to Londis!"
173170 #endif
174-
175171 };
176172
177173 #ifdef JP
@@ -260,3 +256,65 @@ concptr comment_6[MAX_COMMENT_6] =
260256 "Sorry, what was that again?"
261257 #endif
262258 };
259+
260+concptr comment_7a[MAX_COMMENT_7A] =
261+{
262+#ifdef JP
263+ "うわああぁぁ!",
264+ "なんてこった!",
265+ "誰かがむせび泣く声が聞こえる...。",
266+ "店主が悔しげにわめいている!"
267+#else
268+ "Arrgghh!",
269+ "You bastard!",
270+ "You hear someone sobbing...",
271+ "The shopkeeper howls in agony!"
272+#endif
273+
274+};
275+
276+concptr comment_7b[MAX_COMMENT_7B] =
277+{
278+#ifdef JP
279+ "くそう!",
280+ "この悪魔め!",
281+ "店主が恨めしそうに見ている。",
282+ "店主が睨んでいる。"
283+#else
284+ "Damn!",
285+ "You fiend!",
286+ "The shopkeeper curses at you.",
287+ "The shopkeeper glares at you."
288+#endif
289+
290+};
291+
292+concptr comment_7c[MAX_COMMENT_7C] =
293+{
294+#ifdef JP
295+ "すばらしい!",
296+ "君が天使に見えるよ!",
297+ "店主がクスクス笑っている。",
298+ "店主が大声で笑っている。"
299+#else
300+ "Cool!",
301+ "You've made my day!",
302+ "The shopkeeper giggles.",
303+ "The shopkeeper laughs loudly."
304+#endif
305+};
306+
307+concptr comment_7d[MAX_COMMENT_7D] =
308+{
309+#ifdef JP
310+ "やっほぅ!",
311+ "こんなおいしい思いをしたら、真面目に働けなくなるなぁ。",
312+ "店主は嬉しくて跳ね回っている。",
313+ "店主は満面に笑みをたたえている。"
314+#else
315+ "Yipee!",
316+ "I think I'll retire!",
317+ "The shopkeeper jumps for joy.",
318+ "The shopkeeper smiles gleefully."
319+#endif
320+};
--- a/src/market/store-owner-comments.h
+++ b/src/market/store-owner-comments.h
@@ -9,6 +9,10 @@
99 #define MAX_COMMENT_4B 4
1010 #define MAX_COMMENT_5 8
1111 #define MAX_COMMENT_6 4
12+#define MAX_COMMENT_7A 4
13+#define MAX_COMMENT_7B 4
14+#define MAX_COMMENT_7C 4
15+#define MAX_COMMENT_7D 4
1216
1317 extern concptr comment_1[MAX_COMMENT_1];
1418 extern concptr comment_1_B[MAX_COMMENT_1];
@@ -25,3 +29,7 @@ extern concptr comment_4b_B[MAX_COMMENT_4B];
2529 extern concptr comment_5[MAX_COMMENT_5];
2630 extern concptr comment_5_B[MAX_COMMENT_5];
2731 extern concptr comment_6[MAX_COMMENT_6];
32+extern concptr comment_7a[MAX_COMMENT_7A];
33+extern concptr comment_7b[MAX_COMMENT_7B];
34+extern concptr comment_7c[MAX_COMMENT_7C];
35+extern concptr comment_7d[MAX_COMMENT_7D];
--- a/src/store.c
+++ b/src/store.c
@@ -92,11 +92,7 @@ static void say_comment_1(player_type *player_ptr)
9292
9393 if (one_in_(RUMOR_CHANCE))
9494 {
95-#ifdef JP
96- msg_print("店主は耳うちした:");
97-#else
98- msg_print("The shopkeeper whispers something into your ear:");
99-#endif
95+ msg_print(_("店主は耳うちした:", "The shopkeeper whispers something into your ear:"));
10096 display_rumor(player_ptr, TRUE);
10197 }
10298 }
@@ -111,8 +107,7 @@ static void say_comment_1(player_type *player_ptr)
111107 */
112108 static void say_comment_2(PRICE value, int annoyed)
113109 {
114- /* Prepare a string to insert */
115- char tmp_val[80];
110+ char tmp_val[80];
116111 sprintf(tmp_val, "%ld", (long)value);
117112
118113 if (annoyed > 0)
@@ -155,7 +150,6 @@ static void say_comment_3(PRICE value, int annoyed)
155150 else
156151 {
157152 #ifdef JP
158- /* ブラックマーケットの時は別のメッセージを出す */
159153 if (cur_store_num == STORE_BLACK)
160154 {
161155 msg_format(comment_3b_B[randint0(MAX_COMMENT_3B)], tmp_val);
@@ -232,79 +226,6 @@ static void say_comment_6(void)
232226 msg_print(comment_6[randint0(MAX_COMMENT_6)]);
233227 }
234228
235-#define MAX_COMMENT_7A 4
236-
237-static concptr comment_7a[MAX_COMMENT_7A] =
238-{
239-#ifdef JP
240- "うわああぁぁ!",
241- "なんてこった!",
242- "誰かがむせび泣く声が聞こえる...。",
243- "店主が悔しげにわめいている!"
244-#else
245- "Arrgghh!",
246- "You bastard!",
247- "You hear someone sobbing...",
248- "The shopkeeper howls in agony!"
249-#endif
250-
251-};
252-
253-#define MAX_COMMENT_7B 4
254-
255-static concptr comment_7b[MAX_COMMENT_7B] =
256-{
257-#ifdef JP
258- "くそう!",
259- "この悪魔め!",
260- "店主が恨めしそうに見ている。",
261- "店主が睨んでいる。"
262-#else
263- "Damn!",
264- "You fiend!",
265- "The shopkeeper curses at you.",
266- "The shopkeeper glares at you."
267-#endif
268-
269-};
270-
271-#define MAX_COMMENT_7C 4
272-
273-static concptr comment_7c[MAX_COMMENT_7C] =
274-{
275-#ifdef JP
276- "すばらしい!",
277- "君が天使に見えるよ!",
278- "店主がクスクス笑っている。",
279- "店主が大声で笑っている。"
280-#else
281- "Cool!",
282- "You've made my day!",
283- "The shopkeeper giggles.",
284- "The shopkeeper laughs loudly."
285-#endif
286-
287-};
288-
289-#define MAX_COMMENT_7D 4
290-
291-static concptr comment_7d[MAX_COMMENT_7D] =
292-{
293-#ifdef JP
294- "やっほぅ!",
295- "こんなおいしい思いをしたら、真面目に働けなくなるなぁ。",
296- "店主は嬉しくて跳ね回っている。",
297- "店主は満面に笑みをたたえている。"
298-#else
299- "Yipee!",
300- "I think I'll retire!",
301- "The shopkeeper jumps for joy.",
302- "The shopkeeper smiles gleefully."
303-#endif
304-
305-};
306-
307-
308229 /*!
309230 * @brief 店主が交渉を終えた際の反応を返す処理 /
310231 * Let a shop-keeper React to a purchase
Show on old repository browser