• R/O
  • SSH
  • HTTPS

jband: Commit


Commit MetaInfo

Revision124 (tree)
Time2009-06-25 23:55:55
Authorpaulblay

Log Message

Final lot of T stuff.

Change Summary

Incremental Difference

--- trunk/JBand/src/h-basic.h (revision 123)
+++ trunk/JBand/src/h-basic.h (revision 124)
@@ -1,4 +1,8 @@
11 /* テスト */
2+/*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page.
5+ */
26 /*
37 * File: h-basic.h
48 * Purpose:
@@ -270,7 +274,7 @@
270274 /*
271275 * Return "s" (or not) depending on whether n is singular.
272276 */
273-#define PLURAL(n) ((n) == 1 ? __T("") : L"s")
277+#define PLURAL(n) ((n) == 1 ? __T("") : __T("s"))
274278
275279 /*** Some hackish character manipulation ***/
276280
--- trunk/JBand/src/object/obj-info.cpp (revision 123)
+++ trunk/JBand/src/object/obj-info.cpp (revision 124)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page (none present).
5+ */
6+/*
37 * File: object/obj-info.c
48 * Purpose: Object description code.
59 *
--- trunk/JBand/src/object/obj-power.cpp (revision 123)
+++ trunk/JBand/src/object/obj-power.cpp (revision 124)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page.
5+ */
6+/*
37 * File: object/obj-power.c
48 * Purpose: calculation of object power
59 *
@@ -70,9 +74,9 @@
7074 #define INHIBIT_SHOTS 4
7175 #define IMMUNITY_POWER 25 /* for each immunity after the first */
7276 #define INHIBIT_IMMUNITIES 4
73-#define STR_POWER 6
74-#define INT_POWER 4
75-#define WIS_POWER 4
77+#define STR_POWER 6
78+#define INT_POWER 4
79+#define WIS_POWER 4
7680 #define DEX_POWER 6
7781 #define CON_POWER 8
7882 #define CHR_POWER 2
@@ -80,7 +84,7 @@
8084 #define SEARCH_POWER 2
8185 #define INFRA_POWER 2
8286 #define TUNN_POWER 2
83-#define RBASE_POWER 5
87+#define RBASE_POWER 5
8488 #define SUST_POWER 5
8589
8690 /*
@@ -125,10 +129,9 @@
125129 if (slay_cache[i].flags == s_index)
126130 {
127131 sv = slay_cache[i].value;
128- LOG_PRINT(L"Slay cache hit\n");
132+ LOG_PRINT(__T("Slay cache hit\n"));
129133 }
130134 }
131-
132135 /* If it's cached, return its value */
133136 if (sv) return sv;
134137
@@ -169,44 +172,42 @@
169172 if (verbose)
170173 {
171174 /* Write info about the slay combination and multiplier */
172- file_putf(log_file,L"Slay multiplier for:");
175+ file_putf(log_file,__T("Slay multiplier for:"));
173176
174- if (f[0] & TR0_SLAY_EVIL) file_putf(log_file,L"Evl ");
175- if (f[0] & TR0_KILL_DRAGON) file_putf(log_file,L"XDr ");
176- if (f[0] & TR0_KILL_DEMON) file_putf(log_file,L"XDm ");
177- if (f[0] & TR0_KILL_UNDEAD) file_putf(log_file,L"XUn ");
178- if (f[0] & TR0_SLAY_ANIMAL) file_putf(log_file,L"Ani ");
179- if (f[0] & TR0_SLAY_UNDEAD) file_putf(log_file,L"Und ");
180- if (f[0] & TR0_SLAY_DRAGON) file_putf(log_file,L"Drg ");
181- if (f[0] & TR0_SLAY_DEMON) file_putf(log_file,L"Dmn ");
182- if (f[0] & TR0_SLAY_TROLL) file_putf(log_file,L"Tro ");
183- if (f[0] & TR0_SLAY_ORC) file_putf(log_file,L"Orc ");
184- if (f[0] & TR0_SLAY_GIANT) file_putf(log_file,L"Gia ");
177+ if (f[0] & TR0_SLAY_EVIL) file_putf(log_file,__T("Evl "));
178+ if (f[0] & TR0_KILL_DRAGON) file_putf(log_file,__T("XDr "));
179+ if (f[0] & TR0_KILL_DEMON) file_putf(log_file,__T("XDm "));
180+ if (f[0] & TR0_KILL_UNDEAD) file_putf(log_file,__T("XUn "));
181+ if (f[0] & TR0_SLAY_ANIMAL) file_putf(log_file,__T("Ani "));
182+ if (f[0] & TR0_SLAY_UNDEAD) file_putf(log_file,__T("Und "));
183+ if (f[0] & TR0_SLAY_DRAGON) file_putf(log_file,__T("Drg "));
184+ if (f[0] & TR0_SLAY_DEMON) file_putf(log_file,__T("Dmn "));
185+ if (f[0] & TR0_SLAY_TROLL) file_putf(log_file,__T("Tro "));
186+ if (f[0] & TR0_SLAY_ORC) file_putf(log_file,__T("Orc "));
187+ if (f[0] & TR0_SLAY_GIANT) file_putf(log_file,__T("Gia "));
185188
186- if (f[0] & TR0_BRAND_ACID) file_putf(log_file,L"Acd ");
187- if (f[0] & TR0_BRAND_ELEC) file_putf(log_file,L"Elc ");
188- if (f[0] & TR0_BRAND_FIRE) file_putf(log_file,L"Fir ");
189- if (f[0] & TR0_BRAND_COLD) file_putf(log_file,L"Cld ");
190- if (f[0] & TR0_BRAND_POIS) file_putf(log_file,L"Poi ");
189+ if (f[0] & TR0_BRAND_ACID) file_putf(log_file,__T("Acd "));
190+ if (f[0] & TR0_BRAND_ELEC) file_putf(log_file,__T("Elc "));
191+ if (f[0] & TR0_BRAND_FIRE) file_putf(log_file,__T("Fir "));
192+ if (f[0] & TR0_BRAND_COLD) file_putf(log_file,__T("Cld "));
193+ if (f[0] & TR0_BRAND_POIS) file_putf(log_file,__T("Poi "));
191194
192- file_putf(log_file,L"sv is: %d\n", sv);
193- file_putf(log_file,L" and t_m_p is: %d \n", tot_mon_power);
195+ file_putf(log_file,__T("sv is: %d\n"), sv);
196+ file_putf(log_file,__T(" and t_m_p is: %d \n"), tot_mon_power);
194197
195- file_putf(log_file,L"times 1000 is: %d\n", (1000 * sv) / tot_mon_power);
198+ file_putf(log_file,__T("times 1000 is: %d\n"), (1000 * sv) / tot_mon_power);
196199 }
200+ /* Add to the cache */
197201
198- /* Add to the cache */
199- /* LOG_PRINT1(L"s_index is %d\n", s_index); */
200202 for (i = 0; slay_cache[i].flags; i++)
201203 {
202- /* LOG_PRINT2(L"i is %d and flag is %d\n", i, slay_cache[i].flags); */
204+
203205 if (slay_cache[i].flags == s_index)
204206 {
205207 slay_cache[i].value = sv;
206- LOG_PRINT(L"Added to slay cache\n");
208+ LOG_PRINT(__T("Added to slay cache\n"));
207209 }
208210 }
209-
210211 return sv;
211212 }
212213
@@ -223,7 +224,6 @@
223224 return mult;
224225 }
225226
226-
227227 /*
228228 * Evaluate the object's overall power level.
229229 */
@@ -262,7 +262,7 @@
262262 */
263263
264264 p += (o_ptr->to_d * DAMAGE_POWER / 2);
265- LOG_PRINT1(L"Adding power from to_dam, total is %d\n", p);
265+ LOG_PRINT1(__T("Adding power from to_dam, total is %d\n"), p);
266266
267267 /*
268268 * Add the average damage of fully enchanted (good) ammo for this
@@ -285,11 +285,11 @@
285285 p += (AVG_XBOW_AMMO_DAMAGE * DAMAGE_POWER / 2);
286286 }
287287
288- LOG_PRINT1(L"Adding power from ammo, total is %d\n", p);
288+ LOG_PRINT1(__T("Adding power from ammo, total is %d\n"), p);
289289
290290 mult = bow_multiplier(o_ptr->sval);
291291
292- LOG_PRINT1(L"Base multiplier for this weapon is %d\n", mult);
292+ LOG_PRINT1(__T("Base multiplier for this weapon is %d\n"), mult);
293293
294294 if (f[0] & TR0_MIGHT)
295295 {
@@ -297,43 +297,41 @@
297297 {
298298 p += INHIBIT_POWER; /* inhibit */
299299 mult = 1; /* don't overflow */
300- LOG_PRINT(L"INHIBITING - too much extra might\n");
300+ LOG_PRINT(__T("INHIBITING - too much extra might\n"));
301301 }
302302 else
303303 {
304304 mult += o_ptr->pval;
305305 }
306- LOG_PRINT1(L"Extra might multiple is %d\n", mult);
306+ LOG_PRINT1(__T("Extra might multiple is %d\n"), mult);
307307 }
308308 p *= mult;
309- LOG_PRINT2(L"Multiplying power by %d, total is %d\n", mult, p);
309+ LOG_PRINT2(__T("Multiplying power by %d, total is %d\n"), mult, p);
310310
311311 if (f[0] & TR0_SHOTS)
312312 {
313- LOG_PRINT1(L"Extra shots: %d\n", o_ptr->pval);
313+ LOG_PRINT1(__T("Extra shots: %d\n"), o_ptr->pval);
314314
315315 if (o_ptr->pval >= INHIBIT_SHOTS || o_ptr->pval < 0)
316316 {
317317 p += INHIBIT_POWER; /* inhibit */
318- LOG_PRINT(L"INHIBITING - too many extra shots\n");
318+ LOG_PRINT(__T("INHIBITING - too many extra shots\n"));
319319 }
320320 else if (o_ptr->pval > 0)
321321 {
322322 p = (p * (1 + o_ptr->pval));
323- LOG_PRINT2(L"Multiplying power by 1 + %d, total is %d\n", o_ptr->pval, p);
323+ LOG_PRINT2(__T("Multiplying power by 1 + %d, total is %d\n"), o_ptr->pval, p);
324324 }
325325 }
326-
327326 /* Apply the correct slay multiplier */
328327 p = (p * slay_power(o_ptr, verbose, log_file)) / tot_mon_power;
329- LOG_PRINT1(L"Adjusted for slay power, total is %d\n", p);
328+ LOG_PRINT1(__T("Adjusted for slay power, total is %d\n"), p);
330329
331330 if (o_ptr->weight < k_ptr->weight)
332331 {
333332 p++;
334- LOG_PRINT(L"Incrementing power by one for low weight\n");
333+ LOG_PRINT(__T("Incrementing power by one for low weight\n"));
335334 }
336-
337335 /*
338336 * Correction to match ratings to melee damage ratings.
339337 * We multiply all missile weapons by 1.5 in order to compare damage.
@@ -342,10 +340,10 @@
342340 * by 5 to get equal ratings. 1.25 / 5 = 0.25
343341 */
344342 p = sign(p) * (ABS(p) / BOW_RESCALER);
345- LOG_PRINT1(L"Rescaling bow power, total is %d\n", p);
343+ LOG_PRINT1(__T("Rescaling bow power, total is %d\n"), p);
346344
347345 p += sign(o_ptr->to_h) * (ABS(o_ptr->to_h) * TO_HIT_POWER / 2);
348- LOG_PRINT1(L"Adding power from to_hit, total is %d\n", p);
346+ LOG_PRINT1(__T("Adding power from to_hit, total is %d\n"), p);
349347
350348 break;
351349 }
@@ -358,22 +356,22 @@
358356 case TV_SWORD:
359357 {
360358 p += (o_ptr->dd * (o_ptr->ds + 1) * DAMAGE_POWER / 4);
361- LOG_PRINT1(L"Adding power for dam dice, total is %d\n", p);
359+ LOG_PRINT1(__T("Adding power for dam dice, total is %d\n"), p);
362360
363361 /* Apply the correct slay multiplier */
364362 p = (p * slay_power(o_ptr, verbose, log_file)) / tot_mon_power;
365- LOG_PRINT1(L"Adjusted for slay power, total is %d\n", p);
363+ LOG_PRINT1(__T("Adjusted for slay power, total is %d\n"), p);
366364
367365 p += (o_ptr->to_d * DAMAGE_POWER / 2);
368- LOG_PRINT1(L"Adding power for to_dam, total is %d\n", p);
366+ LOG_PRINT1(__T("Adding power for to_dam, total is %d\n"), p);
369367
370368 if (f[0] & TR0_BLOWS)
371369 {
372- LOG_PRINT1(L"Extra blows: %d\n", o_ptr->pval);
370+ LOG_PRINT1(__T("Extra blows: %d\n"), o_ptr->pval);
373371 if (o_ptr->pval >= INHIBIT_BLOWS || o_ptr->pval < 0)
374372 {
375373 p += INHIBIT_POWER; /* inhibit */
376- LOG_PRINT(L"INHIBITING, too many extra blows or a negative number\n");
374+ LOG_PRINT(__T("INHIBITING, too many extra blows or a negative number\n"));
377375 }
378376 else if (o_ptr->pval > 0)
379377 {
@@ -381,25 +379,23 @@
381379 / MAX_BLOWS);
382380 /* Add an extra amount per blow to account for damage rings */
383381 p += (MELEE_DAMAGE_BOOST * o_ptr->pval * DAMAGE_POWER / 2);
384- LOG_PRINT1(L"Adding power for blows, total is %d\n", p);
382+ LOG_PRINT1(__T("Adding power for blows, total is %d\n"), p);
385383 }
386384 }
387-
388385 if (o_ptr->tval == TV_SHOT) p = p * AVG_SLING_MULT / (2 * BOW_RESCALER);
389386 if (o_ptr->tval == TV_ARROW) p = p * AVG_BOW_MULT / (2 * BOW_RESCALER);
390387 if (o_ptr->tval == TV_BOLT) p = p * AVG_XBOW_MULT / (2 * BOW_RESCALER);
391- LOG_PRINT1(L"After multiplying ammo and rescaling, power is %d\n", p);
392-
388+ LOG_PRINT1(__T("After multiplying ammo and rescaling, power is %d\n"), p);
389+
393390 p += sign(o_ptr->to_h) * (ABS(o_ptr->to_h) * TO_HIT_POWER / 2);
394- LOG_PRINT1(L"Adding power for to hit, total is %d\n", p);
391+ LOG_PRINT1(__T("Adding power for to hit, total is %d\n"), p);
395392
396393 /* Remember, weight is in 0.1 lb. units. */
397394 if (o_ptr->weight < k_ptr->weight)
398395 {
399396 p += (k_ptr->weight - o_ptr->weight) / 20;
400- LOG_PRINT1(L"Adding power for low weight, total is %d\n", p);
397+ LOG_PRINT1(__T("Adding power for low weight, total is %d\n"), p);
401398 }
402-
403399 break;
404400 }
405401 case TV_BOOTS:
@@ -413,24 +409,24 @@
413409 case TV_DRAG_ARMOR:
414410 {
415411 p += sign(o_ptr->ac) * ((ABS(o_ptr->ac) * BASE_AC_POWER) / 2);
416- LOG_PRINT1(L"Adding power for base AC value, total is %d\n", p);
412+ LOG_PRINT1(__T("Adding power for base AC value, total is %d\n"), p);
417413
418414 p += sign(o_ptr->to_h) * (ABS(o_ptr->to_h) * TO_HIT_POWER);
419- LOG_PRINT1(L"Adding power for to_hit, total is %d\n", p);
415+ LOG_PRINT1(__T("Adding power for to_hit, total is %d\n"), p);
420416
421417 p += o_ptr->to_d * DAMAGE_POWER;
422- LOG_PRINT1(L"Adding power for to_dam, total is %d\n", p);
418+ LOG_PRINT1(__T("Adding power for to_dam, total is %d\n"), p);
423419
424420 /* Apply the correct brand multiplier */
425421 p += (((2 * (o_ptr->to_d + RING_BRAND_DMG)
426422 * slay_power(o_ptr, verbose, log_file))
427423 / tot_mon_power) - (2 * (o_ptr->to_d + RING_BRAND_DMG)));
428- LOG_PRINT1(L"Adjusted for brand power, total is %d\n", p);
424+ LOG_PRINT1(__T("Adjusted for brand power, total is %d\n"), p);
429425
430426 if (o_ptr->weight < k_ptr->weight)
431427 {
432428 p += (k_ptr->weight - o_ptr->weight) / 10;
433- LOG_PRINT1(L"Adding power for low weight, total is %d\n", p);
429+ LOG_PRINT1(__T("Adding power for low weight, total is %d\n"), p);
434430 }
435431 break;
436432 }
@@ -437,19 +433,19 @@
437433 case TV_LITE:
438434 {
439435 p += BASE_LITE_POWER;
440- LOG_PRINT(L"Artifact light source, adding base power\n");
436+ LOG_PRINT(__T("Artifact light source, adding base power\n"));
441437
442438 p += sign(o_ptr->to_h) * (ABS(o_ptr->to_h) * TO_HIT_POWER);
443- LOG_PRINT1(L"Adding power for to_hit, total is %d\n", p);
439+ LOG_PRINT1(__T("Adding power for to_hit, total is %d\n"), p);
444440
445441 p += o_ptr->to_d * DAMAGE_POWER;
446- LOG_PRINT1(L"Adding power for to_dam, total is %d\n", p);
442+ LOG_PRINT1(__T("Adding power for to_dam, total is %d\n"), p);
447443
448444 /* Apply the correct brand multiplier */
449445 p += (((2 * (o_ptr->to_d + RING_BRAND_DMG)
450446 * slay_power(o_ptr, verbose, log_file))
451447 / tot_mon_power) - (2 * (o_ptr->to_d + RING_BRAND_DMG)));
452- LOG_PRINT1(L"Adjusted for brand power, total is %d\n", p);
448+ LOG_PRINT1(__T("Adjusted for brand power, total is %d\n"), p);
453449
454450 break;
455451 }
@@ -457,19 +453,19 @@
457453 case TV_AMULET:
458454 {
459455 p += BASE_JEWELRY_POWER;
460- LOG_PRINT(L"Jewellery - adding base power\n");
456+ LOG_PRINT(__T("Jewellery - adding base power\n"));
461457
462458 p += sign(o_ptr->to_h) * (ABS(o_ptr->to_h) * TO_HIT_POWER);
463- LOG_PRINT1(L"Adding power for to_hit, total is %d\n", p);
459+ LOG_PRINT1(__T("Adding power for to_hit, total is %d\n"), p);
464460
465461 p += o_ptr->to_d * DAMAGE_POWER;
466- LOG_PRINT1(L"Adding power for to_dam, total is %d\n", p);
462+ LOG_PRINT1(__T("Adding power for to_dam, total is %d\n"), p);
467463
468464 /* Apply the correct brand multiplier */
469465 p += (((2 * (o_ptr->to_d + RING_BRAND_DMG)
470466 * slay_power(o_ptr, verbose, log_file))
471467 / tot_mon_power) - (2 * (o_ptr->to_d + RING_BRAND_DMG)));
472- LOG_PRINT1(L"Adjusted for brand power, total is %d\n", p);
468+ LOG_PRINT1(__T("Adjusted for brand power, total is %d\n"), p);
473469
474470 break;
475471 }
@@ -477,60 +473,59 @@
477473
478474 /* Other abilities are evaluated independent of the object type. */
479475 p += sign(o_ptr->to_a) * (ABS(o_ptr->to_a) * TO_AC_POWER / 2);
480- LOG_PRINT2(L"Adding power for to_ac of %d, total is %d\n", o_ptr->to_a, p);
476+ LOG_PRINT2(__T("Adding power for to_ac of %d, total is %d\n"), o_ptr->to_a, p);
481477
482478 if (o_ptr->to_a > HIGH_TO_AC)
483479 {
484480 p += ((o_ptr->to_a - (HIGH_TO_AC - 1)) * TO_AC_POWER / 2);
485- LOG_PRINT1(L"Adding power for high to_ac value, total is %d\n", p);
481+ LOG_PRINT1(__T("Adding power for high to_ac value, total is %d\n"), p);
486482 }
487483 if (o_ptr->to_a > VERYHIGH_TO_AC)
488484 {
489485 p += ((o_ptr->to_a - (VERYHIGH_TO_AC -1)) * TO_AC_POWER / 2);
490- LOG_PRINT1(L"Adding power for very high to_ac value, total is %d\n", p);
486+ LOG_PRINT1(__T("Adding power for very high to_ac value, total is %d\n"), p);
491487 }
492488 if (o_ptr->to_a >= INHIBIT_AC)
493489 {
494490 p += INHIBIT_POWER; /* inhibit */
495- LOG_PRINT(L"INHIBITING: AC bonus too high\n");
491+ LOG_PRINT(__T("INHIBITING: AC bonus too high\n"));
496492 }
497-
498493 if (o_ptr->pval > 0)
499494 {
500495 if (f[0] & TR0_STR)
501496 {
502497 p += STR_POWER * o_ptr->pval;
503- LOG_PRINT2(L"Adding power for STR bonus %d, total is %d\n", o_ptr->pval, p);
498+ LOG_PRINT2(__T("Adding power for STR bonus %d, total is %d\n"), o_ptr->pval, p);
504499 }
505500 if (f[0] & TR0_INT)
506501 {
507502 p += INT_POWER * o_ptr->pval;
508- LOG_PRINT2(L"Adding power for INT bonus %d, total is %d\n", o_ptr->pval, p);
503+ LOG_PRINT2(__T("Adding power for INT bonus %d, total is %d\n"), o_ptr->pval, p);
509504 }
510505 if (f[0] & TR0_WIS)
511506 {
512507 p += WIS_POWER * o_ptr->pval;
513- LOG_PRINT2(L"Adding power for WIS bonus %d, total is %d\n", o_ptr->pval, p);
508+ LOG_PRINT2(__T("Adding power for WIS bonus %d, total is %d\n"), o_ptr->pval, p);
514509 }
515510 if (f[0] & TR0_DEX)
516511 {
517512 p += DEX_POWER * o_ptr->pval;
518- LOG_PRINT2(L"Adding power for DEX bonus %d, total is %d\n", o_ptr->pval, p);
513+ LOG_PRINT2(__T("Adding power for DEX bonus %d, total is %d\n"), o_ptr->pval, p);
519514 }
520515 if (f[0] & TR0_CON)
521516 {
522517 p += CON_POWER * o_ptr->pval;
523- LOG_PRINT2(L"Adding power for CON bonus %d, total is %d\n", o_ptr->pval, p);
518+ LOG_PRINT2(__T("Adding power for CON bonus %d, total is %d\n"), o_ptr->pval, p);
524519 }
525520 if (f[0] & TR0_STEALTH)
526521 {
527522 p += STEALTH_POWER * o_ptr->pval;
528- LOG_PRINT2(L"Adding power for Stealth bonus %d, total is %d\n", o_ptr->pval, p);
523+ LOG_PRINT2(__T("Adding power for Stealth bonus %d, total is %d\n"), o_ptr->pval, p);
529524 }
530525 if (f[0] & TR0_SEARCH)
531526 {
532527 p += SEARCH_POWER * o_ptr->pval;
533- LOG_PRINT2(L"Adding power for searching bonus %d, total is %d\n", o_ptr->pval , p);
528+ LOG_PRINT2(__T("Adding power for searching bonus %d, total is %d\n"), o_ptr->pval , p);
534529 }
535530 /* Add extra power term if there are a lot of ability bonuses */
536531 if (o_ptr->pval > 0)
@@ -557,17 +552,16 @@
557552 {
558553 extra_stat_bonus += ( (f[0] & TR0_BLOWS) ? 3 * o_ptr->pval: 0);
559554 }
560-
561555 if (extra_stat_bonus > 24)
562556 {
563557 /* Inhibit */
564- LOG_PRINT1(L"Inhibiting! (Total ability bonus of %d is too high)\n", extra_stat_bonus);
558+ LOG_PRINT1(__T("Inhibiting! (Total ability bonus of %d is too high)\n"), extra_stat_bonus);
565559 p += INHIBIT_POWER;
566560 }
567561 else
568562 {
569563 p += ability_power[extra_stat_bonus];
570- LOG_PRINT2(L"Adding power for combination of %d, total is %d\n", ability_power[extra_stat_bonus], p);
564+ LOG_PRINT2(__T("Adding power for combination of %d, total is %d\n"), ability_power[extra_stat_bonus], p);
571565 }
572566 }
573567
@@ -580,146 +574,138 @@
580574 if (f[0] & TR0_DEX) p += 3 * o_ptr->pval;
581575 if (f[0] & TR0_CON) p += 4 * o_ptr->pval;
582576 if (f[0] & TR0_STEALTH) p += o_ptr->pval;
583- LOG_PRINT1(L"Subtracting power for negative ability values, total is %d\n", p);
577+ LOG_PRINT1(__T("Subtracting power for negative ability values, total is %d\n"), p);
584578 }
585579 if (f[0] & TR0_CHR)
586580 {
587581 p += CHR_POWER * o_ptr->pval;
588- LOG_PRINT2(L"Adding power for CHR bonus/penalty %d, total is %d\n", o_ptr->pval, p);
582+ LOG_PRINT2(__T("Adding power for CHR bonus/penalty %d, total is %d\n"), o_ptr->pval, p);
589583 }
590584 if (f[0] & TR0_INFRA)
591585 {
592586 p += INFRA_POWER * o_ptr->pval;
593- LOG_PRINT2(L"Adding power for infra bonus/penalty %d, total is %d\n", o_ptr->pval, p);
587+ LOG_PRINT2(__T("Adding power for infra bonus/penalty %d, total is %d\n"), o_ptr->pval, p);
594588 }
595589 if (f[0] & TR0_TUNNEL)
596590 {
597591 p += TUNN_POWER * o_ptr->pval;
598- LOG_PRINT2(L"Adding power for tunnelling bonus/penalty %d, total is %d\n", o_ptr->pval, p);
592+ LOG_PRINT2(__T("Adding power for tunnelling bonus/penalty %d, total is %d\n"), o_ptr->pval, p);
599593 }
600594 if (f[0] & TR0_SPEED)
601595 {
602596 p += sign(o_ptr->pval) * speed_power[ABS(o_ptr->pval)];
603- LOG_PRINT2(L"Adding power for speed bonus/penalty %d, total is %d\n", o_ptr->pval, p);
597+ LOG_PRINT2(__T("Adding power for speed bonus/penalty %d, total is %d\n"), o_ptr->pval, p);
604598 }
605-
606599 #define ADD_POWER(string, val, flag, flgnum, extra) \
607600 if (f[flgnum] & flag) { \
608601 p += (val); \
609602 extra; \
610- LOG_PRINT1(L"Adding power for " string L", total is %d\n", p); \
603+ LOG_PRINT1(__T("Adding power for ") string __T(", total is %d\n"), p); \
611604 }
605+ ADD_POWER(__T("sustain STR"), 9, TR1_SUST_STR, 1, sustains++);
606+ ADD_POWER(__T("sustain INT"), 4, TR1_SUST_INT, 1, sustains++);
607+ ADD_POWER(__T("sustain WIS"), 4, TR1_SUST_WIS, 1, sustains++);
608+ ADD_POWER(__T("sustain DEX"), 7, TR1_SUST_DEX, 1, sustains++);
609+ ADD_POWER(__T("sustain CON"), 8, TR1_SUST_CON, 1, sustains++);
610+ ADD_POWER(__T("sustain CHR"), 1, TR1_SUST_CHR, 1,);
612611
613- ADD_POWER(L"sustain STR", 9, TR1_SUST_STR, 1, sustains++);
614- ADD_POWER(L"sustain INT", 4, TR1_SUST_INT, 1, sustains++);
615- ADD_POWER(L"sustain WIS", 4, TR1_SUST_WIS, 1, sustains++);
616- ADD_POWER(L"sustain DEX", 7, TR1_SUST_DEX, 1, sustains++);
617- ADD_POWER(L"sustain CON", 8, TR1_SUST_CON, 1, sustains++);
618- ADD_POWER(L"sustain CHR", 1, TR1_SUST_CHR, 1,);
619-
620612 for (i = 2; i <= sustains; i++)
621613 {
622614 p += i;
623- LOG_PRINT1(L"Adding power for multiple sustains, total is %d\n", p);
615+ LOG_PRINT1(__T("Adding power for multiple sustains, total is %d\n"), p);
624616 if (i == 5)
625617 {
626618 p += SUST_POWER;
627- LOG_PRINT1(L"Adding power for full set of sustains, total is %d\n", p);
619+ LOG_PRINT1(__T("Adding power for full set of sustains, total is %d\n"), p);
628620 }
629621 }
630-
631- ADD_POWER(L"acid immunity", 38, TR1_IM_ACID, 1, immunities++);
632- ADD_POWER(L"elec immunity", 35, TR1_IM_ELEC, 1, immunities++);
633- ADD_POWER(L"fire immunity", 40, TR1_IM_FIRE, 1, immunities++);
634- ADD_POWER(L"cold immunity", 37, TR1_IM_COLD, 1, immunities++);
622+ ADD_POWER(__T("acid immunity"), 38, TR1_IM_ACID, 1, immunities++);
623+ ADD_POWER(__T("elec immunity"), 35, TR1_IM_ELEC, 1, immunities++);
624+ ADD_POWER(__T("fire immunity"), 40, TR1_IM_FIRE, 1, immunities++);
625+ ADD_POWER(__T("cold immunity"), 37, TR1_IM_COLD, 1, immunities++);
635626
636627 for (i = 2; i <= immunities; i++)
637628 {
638629 p += IMMUNITY_POWER;
639- LOG_PRINT1(L"Adding power for multiple immunities, total is %d\n", p);
630+ LOG_PRINT1(__T("Adding power for multiple immunities, total is %d\n"), p);
640631 if (i >= INHIBIT_IMMUNITIES)
641632 {
642633 p += INHIBIT_POWER; /* inhibit */
643- LOG_PRINT(L"INHIBITING: Too many immunities\n");
634+ LOG_PRINT(__T("INHIBITING: Too many immunities\n"));
644635 }
645636 }
637+ ADD_POWER(__T("free action"), 14, TR2_FREE_ACT, 2, misc++);
638+ ADD_POWER(__T("hold life"), 12, TR2_HOLD_LIFE, 2, misc++);
639+ ADD_POWER(__T("feather fall"), 1, TR2_FEATHER, 2,);
640+ ADD_POWER(__T("permanent light"), 2, TR2_LITE, 2, misc++);
641+ ADD_POWER(__T("see invisible"), 10, TR2_SEE_INVIS, 2, misc++);
642+ ADD_POWER(__T("telepathy"), 60, TR2_TELEPATHY, 2, misc++);
643+ ADD_POWER(__T("slow digestion"), 2, TR2_SLOW_DIGEST, 2, misc++);
644+ ADD_POWER(__T("resist acid"), 5, TR1_RES_ACID, 1, lowres++);
645+ ADD_POWER(__T("resist elec"), 6, TR1_RES_ELEC, 1, lowres++);
646+ ADD_POWER(__T("resist fire"), 6, TR1_RES_FIRE, 1, lowres++);
647+ ADD_POWER(__T("resist cold"), 6, TR1_RES_COLD, 1, lowres++);
648+ ADD_POWER(__T("resist poison"), 28, TR1_RES_POIS, 1, highres++);
649+ ADD_POWER(__T("resist fear"), 6, TR1_RES_FEAR, 1, highres++);
650+ ADD_POWER(__T("resist light"), 6, TR1_RES_LITE, 1, highres++);
651+ ADD_POWER(__T("resist dark"), 16, TR1_RES_DARK, 1, highres++);
652+ ADD_POWER(__T("resist blindness"), 16, TR1_RES_BLIND, 1, highres++);
653+ ADD_POWER(__T("resist confusion"), 24, TR1_RES_CONFU, 1, highres++);
654+ ADD_POWER(__T("resist sound"), 14, TR1_RES_SOUND, 1, highres++);
655+ ADD_POWER(__T("resist shards"), 8, TR1_RES_SHARD, 1, highres++);
656+ ADD_POWER(__T("resist nexus"), 15, TR1_RES_NEXUS, 1, highres++);
657+ ADD_POWER(__T("resist nether"), 20, TR1_RES_NETHR, 1, highres++);
658+ ADD_POWER(__T("resist chaos"), 20, TR1_RES_CHAOS, 1, highres++);
659+ ADD_POWER(__T("resist disenchantment"), 20, TR1_RES_DISEN, 1, highres++);
660+ ADD_POWER(__T("regeneration"), 9, TR2_REGEN, 2, misc++);
661+ ADD_POWER(__T("blessed"), 1, TR2_BLESSED, 2,);
662+ ADD_POWER(__T("no fuel"), 5, TR2_NO_FUEL, 2,);
646663
647- ADD_POWER(L"free action", 14, TR2_FREE_ACT, 2, misc++);
648- ADD_POWER(L"hold life", 12, TR2_HOLD_LIFE, 2, misc++);
649- ADD_POWER(L"feather fall", 1, TR2_FEATHER, 2,);
650- ADD_POWER(L"permanent light", 2, TR2_LITE, 2, misc++);
651- ADD_POWER(L"see invisible", 10, TR2_SEE_INVIS, 2, misc++);
652- ADD_POWER(L"telepathy", 60, TR2_TELEPATHY, 2, misc++);
653- ADD_POWER(L"slow digestion", 2, TR2_SLOW_DIGEST, 2, misc++);
654- ADD_POWER(L"resist acid", 5, TR1_RES_ACID, 1, lowres++);
655- ADD_POWER(L"resist elec", 6, TR1_RES_ELEC, 1, lowres++);
656- ADD_POWER(L"resist fire", 6, TR1_RES_FIRE, 1, lowres++);
657- ADD_POWER(L"resist cold", 6, TR1_RES_COLD, 1, lowres++);
658- ADD_POWER(L"resist poison", 28, TR1_RES_POIS, 1, highres++);
659- ADD_POWER(L"resist fear", 6, TR1_RES_FEAR, 1, highres++);
660- ADD_POWER(L"resist light", 6, TR1_RES_LITE, 1, highres++);
661- ADD_POWER(L"resist dark", 16, TR1_RES_DARK, 1, highres++);
662- ADD_POWER(L"resist blindness", 16, TR1_RES_BLIND, 1, highres++);
663- ADD_POWER(L"resist confusion", 24, TR1_RES_CONFU, 1, highres++);
664- ADD_POWER(L"resist sound", 14, TR1_RES_SOUND, 1, highres++);
665- ADD_POWER(L"resist shards", 8, TR1_RES_SHARD, 1, highres++);
666- ADD_POWER(L"resist nexus", 15, TR1_RES_NEXUS, 1, highres++);
667- ADD_POWER(L"resist nether", 20, TR1_RES_NETHR, 1, highres++);
668- ADD_POWER(L"resist chaos", 20, TR1_RES_CHAOS, 1, highres++);
669- ADD_POWER(L"resist disenchantment", 20, TR1_RES_DISEN, 1, highres++);
670- ADD_POWER(L"regeneration", 9, TR2_REGEN, 2, misc++);
671- ADD_POWER(L"blessed", 1, TR2_BLESSED, 2,);
672- ADD_POWER(L"no fuel", 5, TR2_NO_FUEL, 2,);
673-
674664 for (i = 2; i <= misc; i++)
675665 {
676666 p += i;
677- LOG_PRINT1(L"Adding power for multiple misc abilites, total is %d\n", p);
667+ LOG_PRINT1(__T("Adding power for multiple misc abilites, total is %d\n"), p);
678668 }
679-
680669 for (i = 2; i <= lowres; i++)
681670 {
682671 p += i;
683- LOG_PRINT1(L"Adding power for multiple low resists, total is %d\n", p);
672+ LOG_PRINT1(__T("Adding power for multiple low resists, total is %d\n"), p);
684673 if (i == 4)
685674 {
686675 p += RBASE_POWER;
687- LOG_PRINT1(L"Adding power for full rbase set, total is %d\n", p);
676+ LOG_PRINT1(__T("Adding power for full rbase set, total is %d\n"), p);
688677 }
689678 }
690-
691679 for (i = 2; i <= highres; i++)
692680 {
693681 p += (i * 2);
694- LOG_PRINT1(L"Adding power for multiple high resists, total is %d\n", p);
682+ LOG_PRINT1(__T("Adding power for multiple high resists, total is %d\n"), p);
695683 }
696-
697684 if (f[2] & TR2_TELEPORT)
698685 {
699686 p -= 80;
700- LOG_PRINT1(L"Subtracting power for teleportation, total is %d\n", p);
687+ LOG_PRINT1(__T("Subtracting power for teleportation, total is %d\n"), p);
701688 }
702689 if (f[2] & TR2_DRAIN_EXP)
703690 {
704691 p -= 30;
705- LOG_PRINT1(L"Subtracting power for drain experience, total is %d\n", p);
692+ LOG_PRINT1(__T("Subtracting power for drain experience, total is %d\n"), p);
706693 }
707694 if (f[2] & TR2_AGGRAVATE)
708695 {
709696 p -= 60;
710- LOG_PRINT1(L"Subtracting power for aggravation, total is %d\n", p);
697+ LOG_PRINT1(__T("Subtracting power for aggravation, total is %d\n"), p);
711698 }
712699 if (f[2] & TR2_LIGHT_CURSE)
713700 {
714701 p -= 6;
715- LOG_PRINT1(L"Subtracting power for light curse, total is %d\n", p);
702+ LOG_PRINT1(__T("Subtracting power for light curse, total is %d\n"), p);
716703 }
717704 if (f[2] & TR2_HEAVY_CURSE)
718705 {
719706 p -= 20;
720- LOG_PRINT1(L"Subtracting power for heavy curse, total is %d\n", p);
707+ LOG_PRINT1(__T("Subtracting power for heavy curse, total is %d\n"), p);
721708 }
722-
723709 /* if (f[2] & TR2_PERMA_CURSE) p -= 40; */
724710
725711 /* add power for effect */
@@ -726,22 +712,20 @@
726712 if (o_ptr->name1)
727713 {
728714 p += effect_power(a_info[o_ptr->name1].effect);
729- LOG_PRINT1(L"Adding power for artifact activation, total is %d\n", p);
715+ LOG_PRINT1(__T("Adding power for artifact activation, total is %d\n"), p);
730716 }
731717 else
732718 {
733719 p += effect_power(k_info[o_ptr->k_idx].effect);
734- LOG_PRINT1(L"Adding power for item activation, total is %d\n", p);
720+ LOG_PRINT1(__T("Adding power for item activation, total is %d\n"), p);
735721 }
736-
737722 /* add tiny amounts for ignore flags */
738723 if (f[2] & TR2_IGNORE_ACID) p++;
739724 if (f[2] & TR2_IGNORE_FIRE) p++;
740725 if (f[2] & TR2_IGNORE_COLD) p++;
741726 if (f[2] & TR2_IGNORE_ELEC) p++;
742-
743- LOG_PRINT1(L"After ignore flags, FINAL POWER IS %d\n", p);
744727
728+ LOG_PRINT1(__T("After ignore flags, FINAL POWER IS %d\n"), p);
729+
745730 return (p);
746731 }
747-
--- trunk/JBand/src/object/obj-make.cpp (revision 123)
+++ trunk/JBand/src/object/obj-make.cpp (revision 124)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page (none present).
5+ */
6+/*
37 * File: object/obj-make.c
48 * Purpose: Object generation functions.
59 *
--- trunk/JBand/src/object/obj-ui.cpp (revision 123)
+++ trunk/JBand/src/object/obj-ui.cpp (revision 124)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page.
5+ */
6+/*
37 * File: obj-ui.c
48 * Purpose: Mainly object descriptions and generic UI functions
59 *
@@ -117,7 +121,7 @@
117121 if (o_ptr->weight)
118122 {
119123 int wgt = o_ptr->weight * o_ptr->number;
120- strnfmt(tmp_val, _countof(tmp_val), L"%3d.%1d lb", wgt / 10, wgt % 10);
124+ strnfmt(tmp_val, _countof(tmp_val), __T("%3d.%1d lb"), wgt / 10, wgt % 10);
121125 Term_putstr(71, i, -1, TERM_WHITE, tmp_val);
122126 }
123127 }
@@ -181,7 +185,7 @@
181185 /* Display the slot description (if needed) */
182186 if (OPT(show_labels))
183187 {
184- Term_putstr(61, i - INVEN_WIELD, -1, TERM_WHITE, L"<--");
188+ Term_putstr(61, i - INVEN_WIELD, -1, TERM_WHITE, __T("<--"));
185189 Term_putstr(65, i - INVEN_WIELD, -1, TERM_WHITE, mention_use(i));
186190 }
187191 /* Display the weight (if needed) */
@@ -189,7 +193,7 @@
189193 {
190194 int wgt = o_ptr->weight * o_ptr->number;
191195 int col = (OPT(show_labels) ? 52 : 71);
192- strnfmt(tmp_val, _countof(tmp_val), L"%3d.%1d lb", wgt / 10, wgt % 10);
196+ strnfmt(tmp_val, _countof(tmp_val), __T("%3d.%1d lb"), wgt / 10, wgt % 10);
193197 Term_putstr(col, i - INVEN_WIELD, -1, TERM_WHITE, tmp_val);
194198 }
195199 }
@@ -292,7 +296,7 @@
292296 prt(__T(""), j + 1, col ? col - 2 : col);
293297
294298 /* Prepare an index --(-- */
295- strnfmt(tmp_val, _countof(tmp_val), L"%c)", index_to_label(i));
299+ strnfmt(tmp_val, _countof(tmp_val), __T("%c)"), index_to_label(i));
296300
297301 /* Clear the line with the (possibly indented) index */
298302 put_str(tmp_val, j + 1, col);
@@ -302,7 +306,7 @@
302306
303307 /* Display the weight if needed */
304308 wgt = o_ptr->weight * o_ptr->number;
305- strnfmt(tmp_val, _countof(tmp_val), L"%3d.%1d lb", wgt / 10, wgt % 10);
309+ strnfmt(tmp_val, _countof(tmp_val), __T("%3d.%1d lb"), wgt / 10, wgt % 10);
306310 put_str(tmp_val, j + 1, 71);
307311 }
308312 /* Make a "shadow" below the list (only if needed) */
@@ -395,7 +399,7 @@
395399 prt(__T(""), j + 1, col ? col - 2 : col);
396400
397401 /* Prepare an index --(-- */
398- strnfmt(tmp_val, _countof(tmp_val), L"%c)", index_to_label(i));
402+ strnfmt(tmp_val, _countof(tmp_val), __T("%c)"), index_to_label(i));
399403
400404 /* Clear the line with the (possibly indented) index */
401405 put_str(tmp_val, j+1, col);
@@ -404,7 +408,7 @@
404408 if (OPT(show_labels))
405409 {
406410 /* Mention the use */
407- strnfmt(tmp_val, _countof(tmp_val), L"%-14s: ", mention_use(i));
411+ strnfmt(tmp_val, _countof(tmp_val), __T("%-14s: "), mention_use(i));
408412 put_str(tmp_val, j+1, col + 3);
409413
410414 /* Display the entry itself */
@@ -418,7 +422,7 @@
418422 }
419423 /* Display the weight if needed */
420424 wgt = o_ptr->weight * o_ptr->number;
421- strnfmt(tmp_val, _countof(tmp_val), L"%3d.%d lb", wgt / 10, wgt % 10);
425+ strnfmt(tmp_val, _countof(tmp_val), __T("%3d.%d lb"), wgt / 10, wgt % 10);
422426 put_str(tmp_val, j+1, 71);
423427 }
424428 /* Make a "shadow" below the list (only if needed) */
@@ -511,7 +515,7 @@
511515 prt(__T(""), j + 1, col ? col - 2 : col);
512516
513517 /* Prepare an index --(-- */
514- strnfmt(tmp_val, sizeof(tmp_val), L"%c)", index_to_label(out_index[j]));
518+ strnfmt(tmp_val, sizeof(tmp_val), __T("%c)"), index_to_label(out_index[j]));
515519
516520 /* Clear the line with the (possibly indented) index */
517521 put_str(tmp_val, j + 1, col);
@@ -521,7 +525,7 @@
521525
522526 /* Display the weight if needed */
523527 wgt = o_ptr->weight * o_ptr->number;
524- strnfmt(tmp_val, sizeof(tmp_val), L"%3d.%1d lb", wgt / 10, wgt % 10);
528+ strnfmt(tmp_val, sizeof(tmp_val), __T("%3d.%1d lb"), wgt / 10, wgt % 10);
525529 put_str(tmp_val, j + 1, 71);
526530 }
527531 /* Make a "shadow" below the list (only if needed) */
@@ -554,7 +558,7 @@
554558 object_desc(o_name, sizeof(o_name), o_ptr, TRUE, ODESC_FULL);
555559
556560 /* Prompt */
557- strnfmt(out_val, sizeof(out_val), L"%s %s? ", prompt, o_name);
561+ strnfmt(out_val, sizeof(out_val), __T("%s %s? "), prompt, o_name);
558562
559563 /* Query */
560564 return (get_check(out_val));
@@ -585,11 +589,11 @@
585589 n = check_for_inscrip(o_ptr, verify_inscrip);
586590
587591 if (!is_harmless)
588- n += check_for_inscrip(o_ptr, L"!*");
592+ n += check_for_inscrip(o_ptr, __T("!*"));
589593
590594 while (n--)
591595 {
592- if (!verify_item(L"Really try", item))
596+ if (!verify_item(__T("Really try"), item))
593597 return (FALSE);
594598 }
595599 /* Allow it */
@@ -876,13 +880,13 @@
876880 if (show_list) show_inven();
877881
878882 /* Begin the prompt */
879- strnfmt(out_val, sizeof(out_val), L"Inven:");
883+ strnfmt(out_val, sizeof(out_val), __T("Inven:"));
880884
881885 /* List choices */
882886 if (i1 <= i2)
883887 {
884888 /* Build the prompt */
885- strnfmt(tmp_val, sizeof(tmp_val), L" %c-%c,",
889+ strnfmt(tmp_val, sizeof(tmp_val), __T(" %c-%c,"),
886890 index_to_label(i1), index_to_label(i2));
887891
888892 /* Append */
@@ -892,26 +896,26 @@
892896 /* Indicate ability to "view" */
893897 if (!show_list)
894898 {
895- _tcscat_s(out_val, _countof(out_val), L" * to see,");
896- button_add(L"[*]", '*');
899+ _tcscat_s(out_val, _countof(out_val), __T(" * to see,"));
900+ button_add(__T("[*]"), '*');
897901 }
898902 /* Indicate legality of "toggle" */
899903 if (use_equip)
900904 {
901- _tcscat_s(out_val, _countof(out_val), L" / for Equip,");
902- button_add(L"[/]", '/');
905+ _tcscat_s(out_val, _countof(out_val), __T(" / for Equip,"));
906+ button_add(__T("[/]"), '/');
903907 }
904908 /* Indicate legality of the "floor" */
905909 if (allow_floor)
906910 {
907- _tcscat_s(out_val, _countof(out_val), L" - for floor,");
908- button_add(L"[-]", '-');
911+ _tcscat_s(out_val, _countof(out_val), __T(" - for floor,"));
912+ button_add(__T("[-]"), '-');
909913 }
910914 /* Indicate that squelched items can be selected */
911915 if (can_squelch)
912916 {
913- _tcscat_s(out_val, _countof(out_val), L" ! for squelched,");
914- button_add(L"[!]", '!');
917+ _tcscat_s(out_val, _countof(out_val), __T(" ! for squelched,"));
918+ button_add(__T("[!]"), '!');
915919 }
916920 }
917921 /* Viewing equipment */
@@ -921,13 +925,13 @@
921925 if (show_list) show_equip();
922926
923927 /* Begin the prompt */
924- strnfmt(out_val, sizeof(out_val), L"Equip:");
928+ strnfmt(out_val, sizeof(out_val), __T("Equip:"));
925929
926930 /* List choices */
927931 if (e1 <= e2)
928932 {
929933 /* Build the prompt */
930- strnfmt(tmp_val, sizeof(tmp_val), L" %c-%c,",
934+ strnfmt(tmp_val, sizeof(tmp_val), __T(" %c-%c,"),
931935 index_to_label(e1), index_to_label(e2));
932936
933937 /* Append */
@@ -936,20 +940,20 @@
936940 /* Indicate ability to "view" */
937941 if (!show_list)
938942 {
939- _tcscat_s(out_val, _countof(out_val), L" * to see,");
940- button_add(L"[*]", '*');
943+ _tcscat_s(out_val, _countof(out_val), __T(" * to see,"));
944+ button_add(__T("[*]"), '*');
941945 }
942946 /* Indicate legality of "toggle" */
943947 if (use_inven)
944948 {
945- _tcscat_s(out_val, _countof(out_val), L" / for Inven,");
946- button_add(L"[/]", '/');
949+ _tcscat_s(out_val, _countof(out_val), __T(" / for Inven,"));
950+ button_add(__T("[/]"), '/');
947951 }
948952 /* Indicate legality of the "floor" */
949953 if (allow_floor)
950954 {
951- _tcscat_s(out_val, _countof(out_val), L" - for floor,");
952- button_add(L"[!]", '!');
955+ _tcscat_s(out_val, _countof(out_val), __T(" - for floor,"));
956+ button_add(__T("[!]"), '!');
953957 }
954958 }
955959 else /* Viewing floor */
@@ -958,13 +962,13 @@
958962 if (show_list) show_floor(floor_list, floor_num, FALSE);
959963
960964 /* Begin the prompt */
961- strnfmt(out_val, sizeof(out_val), L"Floor:");
965+ strnfmt(out_val, sizeof(out_val), __T("Floor:"));
962966
963967 /* List choices */
964968 if (f1 <= f2)
965969 {
966970 /* Build the prompt */
967- strnfmt(tmp_val, sizeof(tmp_val), L" %c-%c,", I2A(f1), I2A(f2));
971+ strnfmt(tmp_val, sizeof(tmp_val), __T(" %c-%c,"), I2A(f1), I2A(f2));
968972
969973 /* Append */
970974 _tcscat_s(out_val, _countof(out_val), tmp_val);
@@ -972,35 +976,35 @@
972976 /* Indicate ability to "view" */
973977 if (!show_list)
974978 {
975- _tcscat_s(out_val, _countof(out_val), L" * to see,");
976- button_add(L"[*]", '*');
979+ _tcscat_s(out_val, _countof(out_val), __T(" * to see,"));
980+ button_add(__T("[*]"), '*');
977981 }
978982 /* Append */
979983 if (use_inven)
980984 {
981- _tcscat_s(out_val, _countof(out_val), L" / for Inven,");
982- button_add(L"[/]", '/');
985+ _tcscat_s(out_val, _countof(out_val), __T(" / for Inven,"));
986+ button_add(__T("[/]"), '/');
983987 }
984988 /* Append */
985989 else if (use_equip)
986990 {
987- _tcscat_s(out_val, _countof(out_val), L" / for Equip,");
988- button_add(L"[/]", '/');
991+ _tcscat_s(out_val, _countof(out_val), __T(" / for Equip,"));
992+ button_add(__T("[/]"), '/');
989993 }
990994 /* Indicate that squelched items can be selected */
991995 if (can_squelch)
992996 {
993- _tcscat_s(out_val, _countof(out_val), L" ! for squelched,");
994- button_add(L"[!]", '!');
997+ _tcscat_s(out_val, _countof(out_val), __T(" ! for squelched,"));
998+ button_add(__T("[!]"), '!');
995999 }
9961000 }
9971001 redraw_stuff();
9981002
9991003 /* Finish the prompt */
1000- _tcscat_s(out_val, _countof(out_val), L" ESC");
1004+ _tcscat_s(out_val, _countof(out_val), __T(" ESC"));
10011005
10021006 /* Build the prompt */
1003- strnfmt(tmp_val, sizeof(tmp_val), L"(%s) %s", out_val, pmt);
1007+ strnfmt(tmp_val, sizeof(tmp_val), __T("(%s) %s"), out_val, pmt);
10041008
10051009 /* Show the prompt */
10061010 prt(tmp_val, 0, 0);
@@ -1031,9 +1035,7 @@
10311035 /* Load screen */
10321036 screen_load();
10331037 }
1034-
1035- /* Show the list */
1036- else
1038+ else /* Show the list */
10371039 {
10381040 /* Save screen */
10391041 screen_save();
@@ -1042,7 +1044,6 @@
10421044 show_list = TRUE;
10431045 }
10441046 }
1045-
10461047 break;
10471048 }
10481049 case '/':
@@ -1052,7 +1053,6 @@
10521053 {
10531054 p_ptr->command_wrk = USE_INVEN;
10541055 }
1055-
10561056 /* Toggle to equipment */
10571057 else if (use_equip && (p_ptr->command_wrk != USE_EQUIP))
10581058 {
@@ -1060,7 +1060,7 @@
10601060 }
10611061 else /* No toggle allowed */
10621062 {
1063- bell(L"Cannot switch item selector!");
1063+ bell(__T("Cannot switch item selector!"));
10641064 break;
10651065 }
10661066 /* Hack -- Fix screen */
@@ -1080,7 +1080,7 @@
10801080 /* Paranoia */
10811081 if (!allow_floor)
10821082 {
1083- bell(L"Cannot select floor!");
1083+ bell(__T("Cannot select floor!"));
10841084 break;
10851085 }
10861086 /* There is only one item */
@@ -1116,26 +1116,6 @@
11161116 screen_save();
11171117 }
11181118 p_ptr->command_wrk = (USE_FLOOR);
1119-#if 0
1120- /* Check each legal object */
1121- for (i = 0; i < floor_num; ++i)
1122- {
1123- /* Special index */
1124- k = 0 - floor_list[i];
1125-
1126- /* Skip non-okay objects */
1127- if (!get_item_okay(k)) continue;
1128-
1129- /* Allow player to "refuse" certain actions */
1130- if (!get_item_allow(k)) continue;
1131-
1132- /* Accept that choice */
1133- (*cp) = k;
1134- item = TRUE;
1135- done = TRUE;
1136- break;
1137- }
1138-#endif
11391119 break;
11401120 }
11411121 case '0':
@@ -1146,19 +1126,19 @@
11461126 /* Look up the tag */
11471127 if (!get_tag(&k, which.key))
11481128 {
1149- bell(L"Illegal object choice (tag)!");
1129+ bell(__T("Illegal object choice (tag)!"));
11501130 break;
11511131 }
11521132 /* Hack -- Validate the item */
11531133 if ((k < INVEN_WIELD) ? !allow_inven : !allow_equip)
11541134 {
1155- bell(L"Illegal object choice (tag)!");
1135+ bell(__T("Illegal object choice (tag)!"));
11561136 break;
11571137 }
11581138 /* Validate the item */
11591139 if (!get_item_okay(k))
11601140 {
1161- bell(L"Illegal object choice (tag)!");
1141+ bell(__T("Illegal object choice (tag)!"));
11621142 break;
11631143 }
11641144 /* Allow player to "refuse" certain actions */
@@ -1181,7 +1161,7 @@
11811161 {
11821162 if (i1 != i2)
11831163 {
1184- bell(L"Illegal object choice (default)!");
1164+ bell(__T("Illegal object choice (default)!"));
11851165 break;
11861166 }
11871167
@@ -1192,7 +1172,7 @@
11921172 {
11931173 if (e1 != e2)
11941174 {
1195- bell(L"Illegal object choice (default)!");
1175+ bell(__T("Illegal object choice (default)!"));
11961176 break;
11971177 }
11981178
@@ -1202,7 +1182,7 @@
12021182 {
12031183 if (f1 != f2)
12041184 {
1205- bell(L"Illegal object choice (default)!");
1185+ bell(__T("Illegal object choice (default)!"));
12061186 break;
12071187 }
12081188
@@ -1211,7 +1191,7 @@
12111191 /* Validate the item */
12121192 if (!get_item_okay(k))
12131193 {
1214- bell(L"Illegal object choice (default)!");
1194+ bell(__T("Illegal object choice (default)!"));
12151195 break;
12161196 }
12171197 /* Allow player to "refuse" certain actions */
@@ -1255,7 +1235,7 @@
12551235
12561236 if (k < 0)
12571237 {
1258- bell(L"Illegal object choice (inven)!");
1238+ bell(__T("Illegal object choice (inven)!"));
12591239 break;
12601240 }
12611241 }
@@ -1266,7 +1246,7 @@
12661246
12671247 if (k < 0)
12681248 {
1269- bell(L"Illegal object choice (equip)!");
1249+ bell(__T("Illegal object choice (equip)!"));
12701250 break;
12711251 }
12721252 }
@@ -1277,7 +1257,7 @@
12771257
12781258 if (k < 0 || k >= floor_num)
12791259 {
1280- bell(L"Illegal object choice (floor)!");
1260+ bell(__T("Illegal object choice (floor)!"));
12811261 break;
12821262 }
12831263 /* Special index */
@@ -1286,11 +1266,11 @@
12861266 /* Validate the item */
12871267 if (!get_item_okay(k))
12881268 {
1289- bell(L"Illegal object choice (normal)!");
1269+ bell(__T("Illegal object choice (normal)!"));
12901270 break;
12911271 }
12921272 /* Verify the item */
1293- if (verify && !verify_item(L"Try", k))
1273+ if (verify && !verify_item(__T("Try"), k))
12941274 {
12951275 done = TRUE;
12961276 break;
--- trunk/JBand/src/object/obj-util.cpp (revision 123)
+++ trunk/JBand/src/object/obj-util.cpp (revision 124)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page.
5+ */
6+/*
37 * File: obj-util.c
48 * Purpose: Object list maintenance and other object utilities
59 *
@@ -88,7 +92,7 @@
8892 if ((tval == TV_FOOD) && (k_info[i].sval < SV_FOOD_MIN_SHROOM))
8993 continue;
9094
91- if (!flavor_count) quit_fmt(L"Not enough flavors for tval %d.", tval);
95+ if (!flavor_count) quit_fmt(__T("Not enough flavors for tval %d."), tval);
9296
9397 /* Select a flavor */
9498 choice = randint0(flavor_count);
@@ -290,12 +294,12 @@
290294 if (use_graphics)
291295 {
292296 /* Process "graf.prf" */
293- process_pref_file(L"graf.prf");
297+ process_pref_file(__T("graf.prf"));
294298 }
295299 else /* Normal symbols */
296300 {
297301 /* Process "font.prf" */
298- process_pref_file(L"font.prf");
302+ process_pref_file(__T("font.prf"));
299303 }
300304 #ifdef ALLOW_BORG_GRAPHICS
301305 /* Initialize the translation table for the borg */
@@ -505,39 +509,39 @@
505509 case INVEN_WIELD:
506510 {
507511 if (adj_str_hold[p_ptr->state.stat_ind[A_STR]] < inventory[slot].weight / 10)
508- return L"Just lifting";
512+ return __T("Just lifting");
509513 else
510- return L"Wielding";
514+ return __T("Wielding");
511515 }
512516 case INVEN_BOW:
513517 {
514518 if (adj_str_hold[p_ptr->state.stat_ind[A_STR]] < inventory[slot].weight / 10)
515- return L"Just holding";
519+ return __T("Just holding");
516520 else
517- return L"Shooting";
521+ return __T("Shooting");
518522 }
519523 case INVEN_LEFT:
520- return L"On left hand";
524+ return __T("On left hand");
521525 case INVEN_RIGHT:
522- return L"On right hand";
526+ return __T("On right hand");
523527 case INVEN_NECK:
524- return L"Around neck";
528+ return __T("Around neck");
525529 case INVEN_LITE:
526- return L"Light source";
530+ return __T("Light source");
527531 case INVEN_BODY:
528- return L"On body";
532+ return __T("On body");
529533 case INVEN_OUTER:
530- return L"About body";
534+ return __T("About body");
531535 case INVEN_ARM:
532- return L"On arm";
536+ return __T("On arm");
533537 case INVEN_HEAD:
534- return L"On head";
538+ return __T("On head");
535539 case INVEN_HANDS:
536- return L"On hands";
540+ return __T("On hands");
537541 case INVEN_FEET:
538- return L"On feet";
542+ return __T("On feet");
539543 }
540- return L"In pack";
544+ return __T("In pack");
541545 }
542546
543547 /*
@@ -550,19 +554,32 @@
550554
551555 switch (i)
552556 {
553- case INVEN_WIELD: p = L"attacking monsters with"; break;
554- case INVEN_BOW: p = L"shooting missiles with"; break;
555- case INVEN_LEFT: p = L"wearing on your left hand"; break;
556- case INVEN_RIGHT: p = L"wearing on your right hand"; break;
557- case INVEN_NECK: p = L"wearing around your neck"; break;
558- case INVEN_LITE: p = L"using to light the way"; break;
559- case INVEN_BODY: p = L"wearing on your body"; break;
560- case INVEN_OUTER: p = L"wearing on your back"; break;
561- case INVEN_ARM: p = L"wearing on your arm"; break;
562- case INVEN_HEAD: p = L"wearing on your head"; break;
563- case INVEN_HANDS: p = L"wearing on your hands"; break;
564- case INVEN_FEET: p = L"wearing on your feet"; break;
565- default: p = L"carrying in your pack"; break;
557+ case INVEN_WIELD:
558+ p = __T("attacking monsters with"); break;
559+ case INVEN_BOW:
560+ p = __T("shooting missiles with"); break;
561+ case INVEN_LEFT:
562+ p = __T("wearing on your left hand"); break;
563+ case INVEN_RIGHT:
564+ p = __T("wearing on your right hand"); break;
565+ case INVEN_NECK:
566+ p = __T("wearing around your neck"); break;
567+ case INVEN_LITE:
568+ p = __T("using to light the way"); break;
569+ case INVEN_BODY:
570+ p = __T("wearing on your body"); break;
571+ case INVEN_OUTER:
572+ p = __T("wearing on your back"); break;
573+ case INVEN_ARM:
574+ p = __T("wearing on your arm"); break;
575+ case INVEN_HEAD:
576+ p = __T("wearing on your head"); break;
577+ case INVEN_HANDS:
578+ p = __T("wearing on your hands"); break;
579+ case INVEN_FEET:
580+ p = __T("wearing on your feet"); break;
581+ default:
582+ p = __T("carrying in your pack"); break;
566583 }
567584 /* Hack -- Heavy weapon */
568585 if (i == INVEN_WIELD)
@@ -571,7 +588,7 @@
571588 o_ptr = &inventory[i];
572589 if (adj_str_hold[p_ptr->state.stat_ind[A_STR]] < o_ptr->weight / 10)
573590 {
574- p = L"just lifting";
591+ p = __T("just lifting");
575592 }
576593 }
577594 /* Hack -- Heavy bow */
@@ -581,7 +598,7 @@
581598 o_ptr = &inventory[i];
582599 if (adj_str_hold[p_ptr->state.stat_ind[A_STR]] < o_ptr->weight / 10)
583600 {
584- p = L"just holding";
601+ p = __T("just holding");
585602 }
586603 }
587604 /* Return the result */
@@ -1285,7 +1302,7 @@
12851302
12861303 if (verbose)
12871304 {
1288- path_build(buf, _countof(buf), ANGBAND_DIR_USER, L"pricing.log");
1305+ path_build(buf, _countof(buf), ANGBAND_DIR_USER, __T("pricing.log"));
12891306 log_file = file_open(buf, pricing_mode, FTYPE_TEXT);
12901307 if (!log_file)
12911308 {
@@ -1294,7 +1311,7 @@
12941311 }
12951312 pricing_mode = MODE_APPEND;
12961313 }
1297- LOG_PRINT1(L"object is %s", k_name + k_ptr->name);
1314+ LOG_PRINT1(__T("object is %s"), k_name + k_ptr->name);
12981315 power = object_power(o_ptr, verbose, log_file);
12991316 value = sign(power) * ((a * power * power) + (b * power));
13001317
@@ -1305,8 +1322,8 @@
13051322 value = value / AMMO_RESCALER;
13061323 if (value < 1) value = 1;
13071324 }
1308- LOG_PRINT2(L"a is %d and b is %d\n", a, b);
1309- LOG_PRINT1(L"value is %d\n", value);
1325+ LOG_PRINT2(__T("a is %d and b is %d\n"), a, b);
1326+ LOG_PRINT1(__T("value is %d\n"), value);
13101327 total_value = value * qty;
13111328
13121329 if (verbose)
@@ -1321,7 +1338,6 @@
13211338
13221339 return (total_value);
13231340 }
1324-
13251341 /* Hack -- "worthless" items */
13261342 if (!k_ptr->cost) return (0L);
13271343
@@ -1440,7 +1456,6 @@
14401456 /* Never okay */
14411457 return (0);
14421458 }
1443-
14441459 /* Food and Potions and Scrolls */
14451460 case TV_FOOD:
14461461 case TV_POTION:
@@ -1449,7 +1464,6 @@
14491464 /* Assume okay */
14501465 break;
14511466 }
1452-
14531467 /* Staves and Wands */
14541468 case TV_STAFF:
14551469 case TV_WAND:
@@ -1457,7 +1471,6 @@
14571471 /* Assume okay */
14581472 break;
14591473 }
1460-
14611474 /* Rods */
14621475 case TV_ROD:
14631476 {
@@ -1464,7 +1477,6 @@
14641477 /* Assume okay */
14651478 break;
14661479 }
1467-
14681480 /* Weapons and Armor */
14691481 case TV_BOW:
14701482 case TV_DIGGING:
@@ -1483,7 +1495,6 @@
14831495 {
14841496 /* Fall through */
14851497 }
1486-
14871498 /* Rings, Amulets, Lites */
14881499 case TV_RING:
14891500 case TV_AMULET:
@@ -1494,7 +1505,6 @@
14941505
14951506 /* Fall through */
14961507 }
1497-
14981508 /* Missiles */
14991509 case TV_BOLT:
15001510 case TV_ARROW:
@@ -1533,7 +1543,6 @@
15331543 /* Probably okay */
15341544 break;
15351545 }
1536-
15371546 /* Various */
15381547 default:
15391548 {
@@ -1544,7 +1553,6 @@
15441553 break;
15451554 }
15461555 }
1547-
15481556 /* Hack -- Require compatible inscriptions */
15491557 if (o_ptr->note != j_ptr->note)
15501558 {
@@ -1551,7 +1559,6 @@
15511559 /* Never combine different inscriptions */
15521560 if (o_ptr->note && j_ptr->note) return (0);
15531561 }
1554-
15551562 /* Different flags */
15561563 if (o_ptr->flags[0] != j_ptr->flags[0] ||
15571564 o_ptr->flags[1] != j_ptr->flags[1] ||
@@ -1608,13 +1615,11 @@
16081615 o_ptr->pval = total * k_ptr->pval;
16091616 o_ptr->timeout += j_ptr->timeout;
16101617 }
1611-
16121618 /* Hack -- if wands or staves are stacking, combine the charges */
16131619 if ((o_ptr->tval == TV_WAND) || (o_ptr->tval == TV_STAFF))
16141620 {
16151621 o_ptr->pval += j_ptr->pval;
16161622 }
1617-
16181623 if ((o_ptr->origin != j_ptr->origin) ||
16191624 (o_ptr->origin_depth != j_ptr->origin_depth) ||
16201625 (o_ptr->origin_xtra != j_ptr->origin_xtra))
@@ -1633,19 +1638,15 @@
16331638 else if (s_uniq && !r_uniq) act = 1;
16341639 else act = 2;
16351640 }
1636-
16371641 switch (act)
16381642 {
1639- /* Overwrite with j_ptr */
1640- case 1:
1643+ case 1: /* Overwrite with j_ptr */
16411644 {
16421645 o_ptr->origin = j_ptr->origin;
16431646 o_ptr->origin_depth = j_ptr->origin_depth;
16441647 o_ptr->origin_xtra = j_ptr->origin_xtra;
16451648 }
1646-
1647- /* Set as "mixed" */
1648- case 2:
1649+ case 2: /* Set as "mixed" */
16491650 {
16501651 o_ptr->origin = ORIGIN_MIXED;
16511652 }
@@ -1764,7 +1765,6 @@
17641765 if (squelch_hide_item(o_ptr))
17651766 squelch_idx = this_o_idx;
17661767 }
1767-
17681768 return squelch_idx;
17691769 }
17701770
@@ -1796,11 +1796,9 @@
17961796 /* Result */
17971797 return (this_o_idx);
17981798 }
1799-
18001799 /* Count objects */
18011800 n++;
18021801 }
1803-
18041802 /* Option -- disallow stacking */
18051803 if (OPT(adult_no_stacking) && n) return (0);
18061804
@@ -1815,7 +1813,6 @@
18151813 else
18161814 return 0;
18171815 }
1818-
18191816 /* Make an object */
18201817 o_idx = o_pop();
18211818
@@ -1849,7 +1846,6 @@
18491846 /* Redraw */
18501847 lite_spot(y, x);
18511848 }
1852-
18531849 /* Result */
18541850 return (o_idx);
18551851 }
@@ -1902,7 +1898,6 @@
19021898 /* Failure */
19031899 return;
19041900 }
1905-
19061901 /* Score */
19071902 bs = -1;
19081903
@@ -1957,7 +1952,6 @@
19571952 else
19581953 n++;
19591954 }
1960-
19611955 /* Add new object */
19621956 if (!comb) k++;
19631957
@@ -1991,7 +1985,6 @@
19911985 flag = TRUE;
19921986 }
19931987 }
1994-
19951988 /* Handle lack of space */
19961989 if (!flag && !artifact_p(j_ptr))
19971990 {
@@ -2004,7 +1997,6 @@
20041997 /* Failure */
20051998 return;
20061999 }
2007-
20082000 /* Find a grid */
20092001 for (i = 0; !flag; i++)
20102002 {
@@ -2014,14 +2006,11 @@
20142006 ty = rand_spread(by, 1);
20152007 tx = rand_spread(bx, 1);
20162008 }
2017-
2018- /* Random locations */
2019- else
2009+ else /* Random locations */
20202010 {
20212011 ty = randint0(DUNGEON_HGT);
20222012 tx = randint0(DUNGEON_WID);
20232013 }
2024-
20252014 /* Require floor space */
20262015 if (cave_feat[ty][tx] != FEAT_FLOOR) continue;
20272016
@@ -2035,7 +2024,6 @@
20352024 /* Okay */
20362025 flag = TRUE;
20372026 }
2038-
20392027 /* Give it to the floor */
20402028 if (!floor_carry(by, bx, j_ptr))
20412029 {
@@ -2051,7 +2039,6 @@
20512039 /* Failure */
20522040 return;
20532041 }
2054-
20552042 /* Sound */
20562043 sound(MSG_DROP);
20572044
@@ -2105,7 +2092,7 @@
21052092
21062093 /* Print a message */
21072094 msg_format(__T("You have %d charge%s remaining."), o_ptr->pval,
2108- (o_ptr->pval != 1) ? L"s" : __T(""));
2095+ (o_ptr->pval != 1) ? __T("s") : __T(""));
21092096 }
21102097
21112098 /*
@@ -2202,7 +2189,6 @@
22022189 /* Hack -- slide object */
22032190 COPY(&inventory[i], &inventory[i+1], object_type);
22042191 }
2205-
22062192 /* Hack -- wipe hole */
22072193 (void)WIPE(&inventory[i], object_type);
22082194
@@ -2209,9 +2195,7 @@
22092195 /* Redraw stuff */
22102196 p_ptr->redraw |= (PR_INVEN);
22112197 }
2212-
2213- /* The item is being wielded */
2214- else
2198+ else /* The item is being wielded */
22152199 {
22162200 /* One less item */
22172201 p_ptr->equip_cnt--;
@@ -2248,7 +2232,7 @@
22482232
22492233 /* Print a message */
22502234 msg_format(__T("There are %d charge%s remaining."), o_ptr->pval,
2251- (o_ptr->pval != 1) ? L"s" : __T(""));
2235+ (o_ptr->pval != 1) ? __T("s") : __T(""));
22522236 }
22532237
22542238 /*
@@ -3005,44 +2989,44 @@
30052989 */
30062990 static const grouper tval_names[] =
30072991 {
3008- { TV_SKELETON, L"skeleton" },
3009- { TV_BOTTLE, L"bottle" },
3010- { TV_JUNK, L"junk" },
3011- { TV_SPIKE, L"spike" },
3012- { TV_CHEST, L"chest" },
3013- { TV_SHOT, L"shot" },
3014- { TV_ARROW, L"arrow" },
3015- { TV_BOLT, L"bolt" },
3016- { TV_BOW, L"bow" },
3017- { TV_DIGGING, L"digger" },
3018- { TV_HAFTED, L"hafted" },
3019- { TV_POLEARM, L"polearm" },
3020- { TV_SWORD, L"sword" },
3021- { TV_BOOTS, L"boots" },
3022- { TV_GLOVES, L"gloves" },
3023- { TV_HELM, L"helm" },
3024- { TV_CROWN, L"crown" },
3025- { TV_SHIELD, L"shield" },
3026- { TV_CLOAK, L"cloak" },
3027- { TV_SOFT_ARMOR, L"soft armor" },
3028- { TV_SOFT_ARMOR, L"soft armour" },
3029- { TV_HARD_ARMOR, L"hard armor" },
3030- { TV_HARD_ARMOR, L"hard armour" },
3031- { TV_DRAG_ARMOR, L"dragon armor" },
3032- { TV_DRAG_ARMOR, L"dragon armour" },
3033- { TV_LITE, L"light" },
3034- { TV_AMULET, L"amulet" },
3035- { TV_RING, L"ring" },
3036- { TV_STAFF, L"staff" },
3037- { TV_WAND, L"wand" },
3038- { TV_ROD, L"rod" },
3039- { TV_SCROLL, L"scroll" },
3040- { TV_POTION, L"potion" },
3041- { TV_FLASK, L"flask" },
3042- { TV_FOOD, L"food" },
3043- { TV_MAGIC_BOOK, L"magic book" },
3044- { TV_PRAYER_BOOK, L"prayer book" },
3045- { TV_GOLD, L"gold" },
2992+ { TV_SKELETON, __T("skeleton") },
2993+ { TV_BOTTLE, __T("bottle") },
2994+ { TV_JUNK, __T("junk") },
2995+ { TV_SPIKE, __T("spike") },
2996+ { TV_CHEST, __T("chest") },
2997+ { TV_SHOT, __T("shot") },
2998+ { TV_ARROW, __T("arrow") },
2999+ { TV_BOLT, __T("bolt") },
3000+ { TV_BOW, __T("bow") },
3001+ { TV_DIGGING, __T("digger") },
3002+ { TV_HAFTED, __T("hafted") },
3003+ { TV_POLEARM, __T("polearm") },
3004+ { TV_SWORD, __T("sword") },
3005+ { TV_BOOTS, __T("boots") },
3006+ { TV_GLOVES, __T("gloves") },
3007+ { TV_HELM, __T("helm") },
3008+ { TV_CROWN, __T("crown") },
3009+ { TV_SHIELD, __T("shield") },
3010+ { TV_CLOAK, __T("cloak") },
3011+ { TV_SOFT_ARMOR, __T("soft armor") },
3012+ { TV_SOFT_ARMOR, __T("soft armour") },
3013+ { TV_HARD_ARMOR, __T("hard armor") },
3014+ { TV_HARD_ARMOR, __T("hard armour") },
3015+ { TV_DRAG_ARMOR, __T("dragon armor") },
3016+ { TV_DRAG_ARMOR, __T("dragon armour") },
3017+ { TV_LITE, __T("light") },
3018+ { TV_AMULET, __T("amulet") },
3019+ { TV_RING, __T("ring") },
3020+ { TV_STAFF, __T("staff") },
3021+ { TV_WAND, __T("wand") },
3022+ { TV_ROD, __T("rod") },
3023+ { TV_SCROLL, __T("scroll") },
3024+ { TV_POTION, __T("potion") },
3025+ { TV_FLASK, __T("flask") },
3026+ { TV_FOOD, __T("food") },
3027+ { TV_MAGIC_BOOK, __T("magic book") },
3028+ { TV_PRAYER_BOOK, __T("prayer book") },
3029+ { TV_GOLD, __T("gold") },
30463030 };
30473031
30483032 /**
@@ -3146,7 +3130,7 @@
31463130 return tval_names[i].name;
31473131 }
31483132
3149- return L"unknown";
3133+ return __T("unknown");
31503134 }
31513135
31523136 /**
@@ -3293,7 +3277,7 @@
32933277 if (!counter)
32943278 {
32953279 /* Clear display and print note */
3296- c_prt(TERM_SLATE, L"You see no items.", 0, 0);
3280+ c_prt(TERM_SLATE, __T("You see no items."), 0, 0);
32973281 if (Term == angband_term[0])
32983282 Term_addstr(-1, TERM_WHITE, LS(__T(" (Press any key to continue.)"),
32993283 spaceme(langbuf,__T(" (何かキーを押してください)"))));
@@ -3304,7 +3288,7 @@
33043288 {
33053289 /* Reprint Message */
33063290 prt(format(__T("You can see %d item%s:"),
3307- counter, (counter > 1 ? L"s" : __T(""))), 0, 0);
3291+ counter, (counter > 1 ? __T("s") : __T(""))), 0, 0);
33083292 }
33093293 for (i = 0; i < counter; i++)
33103294 {
@@ -3322,9 +3306,9 @@
33223306
33233307 object_desc(o_name, _countof(o_name), o_ptr, FALSE, ODESC_FULL);
33243308 if (counts[i] > 1)
3325- strnfmt(o_desc, _countof(o_desc), L"%s (x%d)", o_name, counts[i]);
3309+ strnfmt(o_desc, _countof(o_desc), __T("%s (x%d)"), o_name, counts[i]);
33263310 else
3327- strnfmt(o_desc, _countof(o_desc), L"%s", o_name);
3311+ strnfmt(o_desc, _countof(o_desc), __T("%s"), o_name);
33283312
33293313 /* Reset position */
33303314 cur_x = x;
@@ -3341,7 +3325,7 @@
33413325
33423326 /* Reprint Message */
33433327 prt(format(__T("You can see %d item%s:"),
3344- counter, (counter > 1 ? L"s" : __T(""))), 0, 0);
3328+ counter, (counter > 1 ? __T("s") : __T(""))), 0, 0);
33453329
33463330 /* Reset */
33473331 line = 1;
@@ -3350,7 +3334,6 @@
33503334 {
33513335 continue;
33523336 }
3353-
33543337 /* Note that the number of items actually displayed */
33553338 disp_count++;
33563339
@@ -3379,11 +3362,10 @@
33793362 c_prt(attr, o_desc, line, cur_x);
33803363 line++;
33813364 }
3382-
33833365 if (disp_count != counter)
33843366 {
33853367 /* Print "and others" message if we've run out of space */
3386- strnfmt(buf, sizeof buf, L" ...and %d others.", counter - disp_count);
3368+ strnfmt(buf, sizeof buf, __T(" ...and %d others."), counter - disp_count);
33873369 c_prt(TERM_WHITE, buf, line, x);
33883370 }
33893371 else
@@ -3391,7 +3373,6 @@
33913373 /* Otherwise clear a line at the end, for main-term display */
33923374 prt(__T(""), line, x);
33933375 }
3394-
33953376 if (Term == angband_term[0])
33963377 Term_addstr(-1, TERM_WHITE, LS(__T(" (Press any key to continue.)"),
33973378 spaceme(langbuf,__T(" (何かキーを押してください)"))));
@@ -3629,6 +3610,5 @@
36293610 if (item_list[i] == item)
36303611 return TRUE;
36313612 }
3632-
36333613 return FALSE;
36343614 }
--- trunk/JBand/src/object/obj-desc.cpp (revision 123)
+++ trunk/JBand/src/object/obj-desc.cpp (revision 124)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page.
5+ */
6+/*
37 * File: object/obj-desc.c
48 * Purpose: Create object name descriptions
59 *
@@ -43,11 +47,11 @@
4347 {
4448 if (k_ptr->tval == TV_SCROLL)
4549 {
46- strnfmt(buf, max, L"\"%s\"", scroll_adj[k_ptr->sval]);
50+ strnfmt(buf, max, __T("\"%s\""), scroll_adj[k_ptr->sval]);
4751 }
4852 else if (k_ptr->tval == TV_FOOD && k_ptr->sval > SV_FOOD_MIN_SHROOM)
4953 {
50- strnfmt(buf, max, L"%s Mushroom", flavor_text + flavor_info[k_ptr->flavor].text);
54+ strnfmt(buf, max, __T("%s Mushroom"), flavor_text + flavor_info[k_ptr->flavor].text);
5155 }
5256 else
5357 {
@@ -55,15 +59,13 @@
5559 _tcscpy_s(buf, max, flavor_text + flavor_info[k_ptr->flavor].text);
5660 }
5761 }
58-
59- /* Use proper name (Healing, or whatever) */
60- else
62+ else /* Use proper name (Healing, or whatever) */
6163 {
6264 const _TCHAR *str = (k_name + k_ptr->name);
6365
6466 if (k_ptr->tval == TV_FOOD && k_ptr->sval > SV_FOOD_MIN_SHROOM)
6567 {
66- _tcscpy_s(buf, max, L"Mushroom of ");
68+ _tcscpy_s(buf, max, __T("Mushroom of "));
6769 max -= _tcslen(buf);
6870 t = buf + _tcslen(buf);
6971 }
@@ -71,7 +73,6 @@
7173 {
7274 t = buf;
7375 }
74-
7576 /* Skip past leading characters */
7677 while ((*str == ' ') || (*str == '&')) str++;
7778
@@ -92,7 +93,6 @@
9293 /* Process plural part */
9394 for (str++; *str != '|'; str++) ;
9495 }
95-
9696 /* English plural indicator can simply be skipped */
9797 else if (*str != '~')
9898 {
@@ -100,14 +100,11 @@
100100 max--;
101101 }
102102 }
103-
104103 /* Terminate the new name */
105104 *t = 0;
106105 }
107106 }
108107
109-
110-
111108 static const _TCHAR *obj_desc_get_modstr(const object_type *o_ptr)
112109 {
113110 object_kind *k_ptr = &k_info[o_ptr->k_idx];
@@ -130,7 +127,6 @@
130127 case TV_PRAYER_BOOK:
131128 return (k_name + k_ptr->name);
132129 }
133-
134130 return __T("");
135131 }
136132
@@ -140,12 +136,9 @@
140136
141137 bool show_flavor = k_ptr->flavor ? TRUE : FALSE;
142138
143-
144139 if (o_ptr->ident & IDENT_STORE) show_flavor = FALSE;
145140 if (aware && !OPT(show_flavors)) show_flavor = FALSE;
146141
147-
148-
149142 /* Known artifacts get special treatment */
150143 if (artifact_p(o_ptr) && aware)
151144 return (k_name + k_ptr->name);
@@ -180,47 +173,42 @@
180173 return (k_name + k_ptr->name);
181174
182175 case TV_AMULET:
183- return (show_flavor ? L"& # Amulet~" : L"& Amulet~");
176+ return (show_flavor ? __T("& # Amulet~") : __T("& Amulet~"));
184177
185178 case TV_RING:
186- return (show_flavor ? L"& # Ring~" : L"& Ring~");
179+ return (show_flavor ? __T("& # Ring~") : __T("& Ring~"));
187180
188181 case TV_STAFF:
189- return (show_flavor ? L"& # Sta|ff|ves|" : L"& Sta|ff|ves|");
182+ return (show_flavor ? __T("& # Sta|ff|ves|") : __T("& Sta|ff|ves|"));
190183
191184 case TV_WAND:
192- return (show_flavor ? L"& # Wand~" : L"& Wand~");
185+ return (show_flavor ? __T("& # Wand~") : __T("& Wand~"));
193186
194187 case TV_ROD:
195- return (show_flavor ? L"& # Rod~" : L"& Rod~");
188+ return (show_flavor ? __T("& # Rod~") : __T("& Rod~"));
196189
197190 case TV_POTION:
198- return (show_flavor ? L"& # Potion~" : L"& Potion~");
191+ return (show_flavor ? __T("& # Potion~") : __T("& Potion~"));
199192
200193 case TV_SCROLL:
201- return (show_flavor ? L"& Scroll~ titled \"#\"" : L"& Scroll~");
194+ return (show_flavor ? __T("& Scroll~ titled \"#\"") : __T("& Scroll~"));
202195
203196 case TV_MAGIC_BOOK:
204- return L"& Book~ of Magic Spells #";
197+ return __T("& Book~ of Magic Spells #");
205198
206199 case TV_PRAYER_BOOK:
207- return L"& Holy Book~ of Prayers #";
200+ return __T("& Holy Book~ of Prayers #");
208201
209202 case TV_FOOD:
210203 if (o_ptr->sval > SV_FOOD_MIN_SHROOM)
211- return (show_flavor ? L"& # Mushroom~" : L"& Mushroom~");
204+ return (show_flavor ? __T("& # Mushroom~") : __T("& Mushroom~"));
212205 else
213206 return (k_name + k_ptr->name);
214207 }
215208
216- return L"(nothing)";
209+ return __T("(nothing)");
217210 }
218211
219-
220-
221-
222-
223-
224212 /*
225213 * Copy 'src' into 'buf, replacing '#' with 'modstr' (if found), putting a plural
226214 * in the place indicated by '~' if required, or using alterate...
@@ -249,15 +237,15 @@
249237 {
250238 if (o_ptr->number <= 0)
251239 {
252- strnfcat(buf, max, &end, L"no more ");
240+ strnfcat(buf, max, &end, __T("no more "));
253241
254242 /* Pluralise for grammatical correctness */
255243 pluralise = TRUE;
256244 }
257245 else if (o_ptr->number > 1)
258- strnfcat(buf, max, &end, L"%d ", o_ptr->number);
246+ strnfcat(buf, max, &end, __T("%d "), o_ptr->number);
259247 else if (known && artifact_p(o_ptr))
260- strnfcat(buf, max, &end, L"The ");
248+ strnfcat(buf, max, &end, __T("The "));
261249
262250 else if (*basename == '&')
263251 {
@@ -277,13 +265,11 @@
277265 }
278266
279267 if (an)
280- strnfcat(buf, max, &end, L"an ");
268+ strnfcat(buf, max, &end, __T("an "));
281269 else
282- strnfcat(buf, max, &end, L"a ");
270+ strnfcat(buf, max, &end, __T("a "));
283271 }
284272 }
285-
286-
287273 /*
288274 * Names have the following elements:
289275 *
@@ -294,8 +280,6 @@
294280 * name.
295281 */
296282
297-
298-
299283 /* Copy the string */
300284 while (*basename)
301285 {
@@ -305,7 +289,6 @@
305289 basename++;
306290 continue;
307291 }
308-
309292 /* Pluralizer (regular English plurals) */
310293 else if (*basename == '~')
311294 {
@@ -316,14 +299,12 @@
316299 basename++;
317300 continue;
318301 }
319-
320302 /* e.g. cutlass-e-s, torch-e-s, box-e-s */
321303 if (prev == 's' || prev == 'h' || prev == 'x')
322- strnfcat(buf, max, &end, L"es");
304+ strnfcat(buf, max, &end, __T("es"));
323305 else
324- strnfcat(buf, max, &end, L"s");
306+ strnfcat(buf, max, &end, __T("s"));
325307 }
326-
327308 /* Special plurals */
328309 else if (*basename == '|')
329310 {
@@ -338,17 +319,15 @@
338319 plural++;
339320 endmark = _tcschr(plural, '|');
340321 }
341-
342322 if (!singular || !plural || !endmark) return end;
343323
344324 if (!pluralise)
345- strnfcat(buf, max, &end, L"%.*s", plural - singular - 1, singular);
325+ strnfcat(buf, max, &end, __T("%.*s"), plural - singular - 1, singular);
346326 else
347- strnfcat(buf, max, &end, L"%.*s", endmark - plural, plural);
327+ strnfcat(buf, max, &end, __T("%.*s"), endmark - plural, plural);
348328
349329 basename = endmark;
350330 }
351-
352331 /* Handle pluralisation in the modifier XXX */
353332 else if (*basename == '#')
354333 {
@@ -370,17 +349,15 @@
370349 plural++;
371350 endmark = _tcschr(plural, '|');
372351 }
373-
374352 if (!singular || !plural || !endmark) return end;
375353
376354 if (!pluralise)
377- strnfcat(buf, max, &end, L"%.*s", plural - singular - 1, singular);
355+ strnfcat(buf, max, &end, __T("%.*s"), plural - singular - 1, singular);
378356 else
379- strnfcat(buf, max, &end, L"%.*s", endmark - plural, plural);
357+ strnfcat(buf, max, &end, __T("%.*s"), endmark - plural, plural);
380358
381359 basename = endmark;
382360 }
383-
384361 else
385362 buf[end++] = *basename;
386363
@@ -387,13 +364,11 @@
387364 basename++;
388365 }
389366 }
390-
391367 else
392368 buf[end++] = *basename;
393369
394370 basename++;
395371 }
396-
397372 /* 0-terminate, just in case XXX */
398373 buf[end] = 0;
399374
@@ -401,13 +376,13 @@
401376 /** Append extra names of various kinds **/
402377
403378 if (known && o_ptr->name1)
404- strnfcat(buf, max, &end, L" %s", a_name + a_info[o_ptr->name1].name);
379+ strnfcat(buf, max, &end, __T(" %s"), a_name + a_info[o_ptr->name1].name);
405380
406381 else if (known && o_ptr->name2)
407- strnfcat(buf, max, &end, L" %s", e_name + e_info[o_ptr->name2].name);
382+ strnfcat(buf, max, &end, __T(" %s"), e_name + e_info[o_ptr->name2].name);
408383
409384 else if (aware && (k_ptr->flavor || k_ptr->tval == TV_SCROLL))
410- strnfcat(buf, max, &end, L" of %s", k_name + k_ptr->name);
385+ strnfcat(buf, max, &end, __T(" of %s"), k_name + k_ptr->name);
411386
412387 return end;
413388 }
@@ -437,7 +412,6 @@
437412 return TRUE;
438413 }
439414 }
440-
441415 return FALSE;
442416 }
443417
@@ -464,7 +438,6 @@
464438 break;
465439 }
466440 }
467-
468441 return FALSE;
469442 }
470443
@@ -477,17 +450,16 @@
477450
478451 /* May be "empty" */
479452 if (!o_ptr->pval)
480- strnfcat(buf, max, &end, L" (empty)");
453+ strnfcat(buf, max, &end, __T(" (empty)"));
481454
482455 /* May be "disarmed" */
483456 else if (o_ptr->pval < 0)
484457 {
485458 if (chest_traps[0 - o_ptr->pval])
486- strnfcat(buf, max, &end, L" (disarmed)");
459+ strnfcat(buf, max, &end, __T(" (disarmed)"));
487460 else
488- strnfcat(buf, max, &end, L" (unlocked)");
461+ strnfcat(buf, max, &end, __T(" (unlocked)"));
489462 }
490-
491463 /* Describe the traps, if any */
492464 else
493465 {
@@ -495,39 +467,38 @@
495467 switch (chest_traps[o_ptr->pval])
496468 {
497469 case 0:
498- strnfcat(buf, max, &end, L" (Locked)");
470+ strnfcat(buf, max, &end, __T(" (Locked)"));
499471 break;
500472
501473 case CHEST_LOSE_STR:
502- strnfcat(buf, max, &end, L" (Poison Needle)");
474+ strnfcat(buf, max, &end, __T(" (Poison Needle)"));
503475 break;
504476
505477 case CHEST_LOSE_CON:
506- strnfcat(buf, max, &end, L" (Poison Needle)");
478+ strnfcat(buf, max, &end, __T(" (Poison Needle)"));
507479 break;
508480
509481 case CHEST_POISON:
510- strnfcat(buf, max, &end, L" (Gas Trap)");
482+ strnfcat(buf, max, &end, __T(" (Gas Trap)"));
511483 break;
512484
513485 case CHEST_PARALYZE:
514- strnfcat(buf, max, &end, L" (Gas Trap)");
486+ strnfcat(buf, max, &end, __T(" (Gas Trap)"));
515487 break;
516488
517489 case CHEST_EXPLODE:
518- strnfcat(buf, max, &end, L" (Explosion Device)");
490+ strnfcat(buf, max, &end, __T(" (Explosion Device)"));
519491 break;
520492
521493 case CHEST_SUMMON:
522- strnfcat(buf, max, &end, L" (Summoning Runes)");
494+ strnfcat(buf, max, &end, __T(" (Summoning Runes)"));
523495 break;
524496
525497 default:
526- strnfcat(buf, max, &end, L" (Multiple Traps)");
498+ strnfcat(buf, max, &end, __T(" (Multiple Traps)"));
527499 break;
528500 }
529501 }
530-
531502 return end;
532503 }
533504
@@ -549,42 +520,36 @@
549520 case TV_SWORD:
550521 case TV_DIGGING:
551522 {
552- strnfcat(buf, max, &end, L" (%dd%d)", o_ptr->dd, o_ptr->ds);
523+ strnfcat(buf, max, &end, __T(" (%dd%d)"), o_ptr->dd, o_ptr->ds);
553524 break;
554525 }
555-
556526 /* Missile launchers */
557527 case TV_BOW:
558528 {
559- strnfcat(buf, max, &end, L" (x%d)", o_ptr->sval % 10);
529+ strnfcat(buf, max, &end, __T(" (x%d)"), o_ptr->sval % 10);
560530 break;
561531 }
562532 }
563-
564-
565533 /* Show weapon bonuses */
566534 if (known || o_ptr->ident & IDENT_ATTACK)
567535 {
568536 if (obj_desc_show_weapon(o_ptr) || o_ptr->to_d)
569- strnfcat(buf, max, &end, L" (%+d,%+d)", o_ptr->to_h, o_ptr->to_d);
537+ strnfcat(buf, max, &end, __T(" (%+d,%+d)"), o_ptr->to_h, o_ptr->to_d);
570538 else if (o_ptr->to_h)
571- strnfcat(buf, max, &end, L" (%+d)", o_ptr->to_h);
539+ strnfcat(buf, max, &end, __T(" (%+d)"), o_ptr->to_h);
572540 }
573-
574-
575541 /* Show armor bonuses */
576542 if (known || o_ptr->ident & IDENT_DEFENCE)
577543 {
578544 if (obj_desc_show_armor(o_ptr))
579- strnfcat(buf, max, &end, L" [%d,%+d]", o_ptr->ac, o_ptr->to_a);
545+ strnfcat(buf, max, &end, __T(" [%d,%+d]"), o_ptr->ac, o_ptr->to_a);
580546 else if (o_ptr->to_a)
581- strnfcat(buf, max, &end, L" [%+d]", o_ptr->to_a);
547+ strnfcat(buf, max, &end, __T(" [%+d]"), o_ptr->to_a);
582548 }
583549 else if (obj_desc_show_armor(o_ptr))
584550 {
585- strnfcat(buf, max, &end, L" [%d]", o_ptr->ac);
551+ strnfcat(buf, max, &end, __T(" [%d]"), o_ptr->ac);
586552 }
587-
588553 return end;
589554 }
590555
@@ -595,7 +560,7 @@
595560
596561 /* Fuelled light sources get number of remaining turns appended */
597562 if ((o_ptr->tval == TV_LITE) && !(f[2] & TR2_NO_FUEL))
598- strnfcat(buf, max, &end, L" (%d turns)", o_ptr->timeout);
563+ strnfcat(buf, max, &end, __T(" (%d turns)"), o_ptr->timeout);
599564
600565 return end;
601566 }
@@ -609,24 +574,24 @@
609574
610575 if (f[2] & TR2_HIDE_TYPE)
611576 {
612- strnfcat(buf, max, &end, L" (%+d)", o_ptr->pval);
577+ strnfcat(buf, max, &end, __T(" (%+d)"), o_ptr->pval);
613578 return end;
614579 }
615580
616- strnfcat(buf, max, &end, L" (%+d", o_ptr->pval);
581+ strnfcat(buf, max, &end, __T(" (%+d"), o_ptr->pval);
617582
618583 if (f[0] & TR0_STEALTH)
619- strnfcat(buf, max, &end, L" stealth");
584+ strnfcat(buf, max, &end, __T(" stealth"));
620585 else if (f[0] & TR0_SEARCH)
621- strnfcat(buf, max, &end, L" searching");
586+ strnfcat(buf, max, &end, __T(" searching"));
622587 else if (f[0] & TR0_INFRA)
623- strnfcat(buf, max, &end, L" infravision");
588+ strnfcat(buf, max, &end, __T(" infravision"));
624589 else if (f[0] & TR0_SPEED)
625- strnfcat(buf, max, &end, L" speed");
590+ strnfcat(buf, max, &end, __T(" speed"));
626591 else if (f[0] & TR0_BLOWS)
627- strnfcat(buf, max, &end, L" attack%s", PLURAL(o_ptr->pval));
592+ strnfcat(buf, max, &end, __T(" attack%s"), PLURAL(o_ptr->pval));
628593
629- strnfcat(buf, max, &end, L")");
594+ strnfcat(buf, max, &end, __T(")"));
630595
631596 return end;
632597 }
@@ -637,7 +602,7 @@
637602
638603 /* Wands and Staffs have charges */
639604 if (o_ptr->tval == TV_STAFF || o_ptr->tval == TV_WAND)
640- strnfcat(buf, max, &end, L" (%d charge%s)", o_ptr->pval, PLURAL(o_ptr->pval));
605+ strnfcat(buf, max, &end, __T(" (%d charge%s)"), o_ptr->pval, PLURAL(o_ptr->pval));
641606
642607 /* Charging things */
643608 else if (o_ptr->timeout > 0)
@@ -659,16 +624,14 @@
659624 if (power > o_ptr->number) power = o_ptr->number;
660625
661626 /* Display prettily */
662- strnfcat(buf, max, &end, L" (%d charging)", power);
627+ strnfcat(buf, max, &end, __T(" (%d charging)"), power);
663628 }
664-
665629 /* Artifacts, single rods */
666630 else if (!(o_ptr->tval == TV_LITE && !artifact_p(o_ptr)))
667631 {
668- strnfcat(buf, max, &end, L" (charging)");
632+ strnfcat(buf, max, &end, __T(" (charging)"));
669633 }
670634 }
671-
672635 return end;
673636 }
674637
@@ -686,17 +649,17 @@
686649 if (!object_known_p(o_ptr) && feel)
687650 u[n++] = inscrip_text[feel];
688651 else if ((o_ptr->ident & IDENT_EMPTY) && !object_known_p(o_ptr))
689- u[n++] = L"empty";
652+ u[n++] = __T("empty");
690653 else if (!object_aware_p(o_ptr) && object_tried_p(o_ptr))
691- u[n++] = L"tried";
654+ u[n++] = __T("tried");
692655
693656 /* Note curses */
694657 if (o_ptr->known_flags[2] & TR2_CURSE_MASK)
695- u[n++] = L"cursed";
658+ u[n++] = __T("cursed");
696659
697660 /* Note squelch */
698661 if (squelch_item_ok(o_ptr))
699- u[n++] = L"squelch";
662+ u[n++] = __T("squelch");
700663
701664 if (n)
702665 {
@@ -704,19 +667,16 @@
704667 for (i = 0; i < n; i++)
705668 {
706669 if (i == 0)
707- strnfcat(buf, max, &end, L" {");
708- strnfcat(buf, max, &end, L"%s", u[i]);
670+ strnfcat(buf, max, &end, __T(" {"));
671+ strnfcat(buf, max, &end, __T("%s"), u[i]);
709672 if (i < n-1)
710- strnfcat(buf, max, &end, L", ");
673+ strnfcat(buf, max, &end, __T(", "));
711674 }
712-
713- strnfcat(buf, max, &end, L"}");
675+ strnfcat(buf, max, &end, __T("}"));
714676 }
715-
716677 return end;
717678 }
718679
719-
720680 /**
721681 * Describes item `o_ptr` into buffer `buf` of size `max`.
722682 *
@@ -745,16 +705,14 @@
745705
746706 size_t end = 0;
747707
748-
749708 /*** Some things get really simple descriptions ***/
750709
751710 if (o_ptr->tval == TV_GOLD)
752- return strnfmt(buf, max, L"%d gold pieces worth of %s",
711+ return strnfmt(buf, max, __T("%d gold pieces worth of %s"),
753712 o_ptr->pval, k_name + k_ptr->name);
754713 else if (!o_ptr->tval)
755- return strnfmt(buf, max, L"(nothing)");
714+ return strnfmt(buf, max, __T("(nothing)"));
756715
757-
758716 /** Horrible, horrible squelch **/
759717
760718 /* Hack -- mark-to-squelch worthless items XXX */
@@ -767,11 +725,9 @@
767725 p_ptr->notice |= PN_SQUELCH;
768726 }
769727 }
770-
771728 /* We've seen it at least once now we're aware of it */
772729 if (known && o_ptr->name2) e_info[o_ptr->name2].everseen = TRUE;
773730
774-
775731 /** Construct the name **/
776732
777733 /* Copy the base name to the buffer */
@@ -786,7 +742,6 @@
786742
787743 end = obj_desc_combat(o_ptr, buf, max, end, spoil);
788744 }
789-
790745 if (mode & ODESC_EXTRA)
791746 {
792747 if (known)
@@ -798,6 +753,5 @@
798753 if (!(mode & ODESC_STORE))
799754 end = obj_desc_inscrip(o_ptr, buf, max, end);
800755 }
801-
802756 return end;
803757 }
--- trunk/JBand/src/object/randart.cpp (revision 123)
+++ trunk/JBand/src/object/randart.cpp (revision 124)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page.
5+ */
6+/*
37 * File: randart.c
48 * Purpose: Random artifact generation
59 *
@@ -308,20 +312,19 @@
308312 word[0] = _totupper(word[0]);
309313
310314 if (one_in_(3))
311- strnfmt(buf, _countof(buf), L"'%s'", word);
315+ strnfmt(buf, _countof(buf), __T("'%s'"), word);
312316 else
313- strnfmt(buf, _countof(buf), L"of %s", word);
317+ strnfmt(buf, _countof(buf), __T("of %s"), word);
314318
315319 names[i] = _tcsdup(buf);
316320 }
317-
318321 /* Special cases -- keep these three names separate. */
319322 string_free(names[ART_POWER - 1]);
320323 string_free(names[ART_GROND - 1]);
321324 string_free(names[ART_MORGOTH - 1]);
322- names[ART_POWER - 1] = _tcsdup(L"of Power (The One Ring)");
323- names[ART_GROND - 1] = _tcsdup(L"'Grond'");
324- names[ART_MORGOTH - 1] = _tcsdup(L"of Morgoth");
325+ names[ART_POWER - 1] = _tcsdup(__T("of Power (The One Ring)"));
326+ names[ART_GROND - 1] = _tcsdup(__T("'Grond'"));
327+ names[ART_MORGOTH - 1] = _tcsdup(__T("of Morgoth"));
325328
326329 /* Convert our names array into an a_name structure for later use. */
327330 name_size = 0;
@@ -342,7 +345,6 @@
342345 a_info[i].name = a_next - a_base;
343346 a_next += _tcslen(names[i-1]) + 1;
344347 }
345-
346348 /* Free the old names */
347349 FREE(a_name);
348350
@@ -350,7 +352,6 @@
350352 {
351353 string_free(names[i]);
352354 }
353-
354355 /* Free the "names" array */
355356 FREE(names);
356357
@@ -371,18 +372,16 @@
371372 {
372373 object_type obj;
373374
374- LOG_PRINT(L"********** ENTERING EVAL POWER ********\n");
375- LOG_PRINT1(L"Artifact index is %d\n", a_idx);
375+ LOG_PRINT(__T("********** ENTERING EVAL POWER ********\n"));
376+ LOG_PRINT1(__T("Artifact index is %d\n"), a_idx);
376377
377378 if(!make_fake_artifact(&obj, a_idx))
378379 {
379380 return 0;
380381 }
381-
382382 return object_power(&obj, verbose, log_file);
383383 }
384384
385-
386385 /*
387386 * Store the original artifact power ratings as a baseline
388387 */
@@ -450,17 +449,17 @@
450449 int tval;
451450 const _TCHAR *report;
452451 } item_choices[] = {
453- { 7, TV_BOW, L"a missile weapon"},
454- { 10, TV_DIGGING, L"a digger"},
455- { 20, TV_HAFTED, L"a blunt weapon"},
456- { 32, TV_SWORD, L"an edged weapon"},
457- { 42, TV_POLEARM, L"a polearm"},
458- { 64, TV_SOFT_ARMOR, L"body armour"},
459- { 71, TV_BOOTS, L"footwear"},
460- { 78, TV_GLOVES, L"gloves"},
461- { 87, TV_HELM, L"a hat"},
462- { 94, TV_SHIELD, L"a shield"},
463- {100, TV_CLOAK, L"a cloak"}
452+ { 7, TV_BOW, __T("a missile weapon")},
453+ { 10, TV_DIGGING, __T("a digger")},
454+ { 20, TV_HAFTED, __T("a blunt weapon")},
455+ { 32, TV_SWORD, __T("an edged weapon")},
456+ { 42, TV_POLEARM, __T("a polearm")},
457+ { 64, TV_SOFT_ARMOR, __T("body armour")},
458+ { 71, TV_BOOTS, __T("footwear")},
459+ { 78, TV_GLOVES, __T("gloves")},
460+ { 87, TV_HELM, __T("a hat")},
461+ { 94, TV_SHIELD, __T("a shield")},
462+ {100, TV_CLOAK, __T("a cloak")}
464463 };
465464
466465 /*
@@ -489,7 +488,7 @@
489488 k_idx = lookup_kind(a_ptr->tval, a_ptr->sval);
490489 k_ptr = &k_info[k_idx];
491490 target_level = base_item_level[a_idx];
492- LOG_PRINT1(L"Base item level is: %d\n", target_level);
491+ LOG_PRINT1(__T("Base item level is: %d\n"), target_level);
493492
494493 /*
495494 * If the artifact level is higher then we use that instead.
@@ -496,7 +495,7 @@
496495 */
497496
498497 if(a_ptr->level > target_level) target_level = a_ptr->level;
499- LOG_PRINT1(L"Target level is: %d\n", target_level);
498+ LOG_PRINT1(__T("Target level is: %d\n"), target_level);
500499
501500 /*
502501 * Pick a category (tval) of weapon randomly. Within each tval, roll
@@ -507,7 +506,7 @@
507506 */
508507 r = randint0(100);
509508 r2 = Rand_normal(target_level * 2, target_level);
510- LOG_PRINT2(L"r is: %d, r2 is: %d\n", r, r2);
509+ LOG_PRINT2(__T("r is: %d, r2 is: %d\n"), r, r2);
511510
512511 i = 0;
513512 while (r >= item_choices[i].threshold)
@@ -516,7 +515,7 @@
516515 }
517516
518517 tval = item_choices[i].tval;
519- LOG_PRINT1(L"Creating %s\n", item_choices[i].report);
518+ LOG_PRINT1(__T("Creating %s\n"), item_choices[i].report);
520519
521520 switch (tval)
522521 {
@@ -677,10 +676,10 @@
677676 break;
678677 }
679678 /* CC debug hacks */
680- LOG_PRINT2(L"tval is %d, sval is %d\n", tval, sval);
679+ LOG_PRINT2(__T("tval is %d, sval is %d\n"), tval, sval);
681680 k_idx = lookup_kind(tval, sval);
682681 k_ptr = &k_info[k_idx];
683- LOG_PRINT2(L"k_idx is %d, k_ptr->alloc_prob is %d\n", k_idx, k_ptr->alloc_prob);
682+ LOG_PRINT2(__T("k_idx is %d, k_ptr->alloc_prob is %d\n"), k_idx, k_ptr->alloc_prob);
684683 /* CC end - but need a flush here */
685684 a_ptr->tval = k_ptr->tval;
686685 a_ptr->sval = k_ptr->sval;
@@ -727,7 +726,7 @@
727726 randint0(mean_hit_startval) );
728727 a_ptr->to_d += (s16b)(mean_dam_startval / 2 +
729728 randint0(mean_dam_startval) );
730- LOG_PRINT2(L"Assigned basic stats, to_hit: %d, to_dam: %d\n", a_ptr->to_h, a_ptr->to_d);
729+ LOG_PRINT2(__T("Assigned basic stats, to_hit: %d, to_dam: %d\n"), a_ptr->to_h, a_ptr->to_d);
731730 break;
732731 case TV_BOOTS:
733732 case TV_GLOVES:
@@ -741,7 +740,7 @@
741740 /* CR: adjusted this to work with parsing logic */
742741 a_ptr->to_a += (s16b)(mean_ac_startval / 2 +
743742 randint0(mean_ac_startval) );
744- LOG_PRINT1(L"Assigned basic stats, AC bonus: %d\n", a_ptr->to_a);
743+ LOG_PRINT1(__T("Assigned basic stats, AC bonus: %d\n"), a_ptr->to_a);
745744 break;
746745 }
747746
@@ -749,7 +748,6 @@
749748 return k_idx;
750749 }
751750
752-
753751 /*
754752 * We've just added an ability which uses the pval bonus. Make sure it's
755753 * not zero. If it's currently negative, leave it negative (heh heh).
@@ -772,7 +770,7 @@
772770 if (INHIBIT_STRONG) a_ptr->pval = 3;
773771 }
774772 else a_ptr->pval = (s16b)randint1(4);
775- LOG_PRINT1(L"Assigned initial pval, value is: %d\n", a_ptr->pval);
773+ LOG_PRINT1(__T("Assigned initial pval, value is: %d\n"), a_ptr->pval);
776774 }
777775 else if (a_ptr->pval < 0)
778776 {
@@ -779,7 +777,7 @@
779777 if (one_in_(2))
780778 {
781779 a_ptr->pval--;
782- LOG_PRINT1(L"Decreasing pval by 1, new value is: %d\n", a_ptr->pval);
780+ LOG_PRINT1(__T("Decreasing pval by 1, new value is: %d\n"), a_ptr->pval);
783781 }
784782 }
785783 else if (one_in_(a_ptr->pval * factor))
@@ -789,7 +787,7 @@
789787 * also rarer if item has blows/might/shots already
790788 */
791789 a_ptr->pval++;
792- LOG_PRINT1(L"Increasing pval by 1, new value is: %d\n", a_ptr->pval);
790+ LOG_PRINT1(__T("Increasing pval by 1, new value is: %d\n"), a_ptr->pval);
793791 }
794792 }
795793
@@ -883,7 +881,7 @@
883881 s16b k_idx;
884882
885883
886- LOG_PRINT(L"\n****** BEGINNING GENERATION OF FREQUENCIES\n\n");
884+ LOG_PRINT(__T("\n****** BEGINNING GENERATION OF FREQUENCIES\n\n"));
887885
888886 /* Zero the frequencies */
889887
@@ -896,7 +894,7 @@
896894
897895 for(i = 0; i < z_info->a_max; i++)
898896 {
899- LOG_PRINT1(L"Current artifact index is %d\n", i);
897+ LOG_PRINT1(__T("Current artifact index is %d\n"), i);
900898
901899 a_ptr = &a_info[i];
902900
@@ -922,12 +920,12 @@
922920 /* Do we have 3 or more extra shots? (Unlikely) */
923921 if(a_ptr->pval > 2)
924922 {
925- LOG_PRINT(L"Adding 1 for supercharged shots (3 or more!)\n");
923+ LOG_PRINT(__T("Adding 1 for supercharged shots (3 or more!)\n"));
926924
927925 (artprobs[ART_IDX_BOW_SHOTS_SUPER])++;
928926 }
929927 else {
930- LOG_PRINT(L"Adding 1 for extra shots\n");
928+ LOG_PRINT(__T("Adding 1 for extra shots\n"));
931929
932930 (artprobs[ART_IDX_BOW_SHOTS])++;
933931 }
@@ -937,12 +935,12 @@
937935 /* Do we have 3 or more extra might? (Unlikely) */
938936 if(a_ptr->pval > 2)
939937 {
940- LOG_PRINT(L"Adding 1 for supercharged might (3 or more!)\n");
938+ LOG_PRINT(__T("Adding 1 for supercharged might (3 or more!)\n"));
941939
942940 (artprobs[ART_IDX_BOW_MIGHT_SUPER])++;
943941 }
944942 else {
945- LOG_PRINT(L"Adding 1 for extra might\n");
943+ LOG_PRINT(__T("Adding 1 for extra might\n"));
946944
947945 (artprobs[ART_IDX_BOW_MIGHT])++;
948946 }
@@ -965,8 +963,8 @@
965963 if (s_ptr->slay_flag & TR0_BRAND_MASK) temp2++;
966964 }
967965 }
968- LOG_PRINT1(L"Adding %d for slays\n", temp);
969- LOG_PRINT1(L"Adding %d for brands\n", temp2);
966+ LOG_PRINT1(__T("Adding %d for slays\n"), temp);
967+ LOG_PRINT1(__T("Adding %d for brands\n"), temp2);
970968
971969 /* Add these to the frequency count */
972970 artprobs[ART_IDX_BOW_BRAND] += temp2;
@@ -986,7 +984,7 @@
986984 mean_dam_increment;
987985 if (temp > 0)
988986 {
989- LOG_PRINT1(L"Adding %d instances of extra to-hit bonus for weapon\n", temp);
987+ LOG_PRINT1(__T("Adding %d instances of extra to-hit bonus for weapon\n"), temp);
990988
991989 (artprobs[ART_IDX_WEAPON_HIT]) += temp;
992990 }
@@ -997,7 +995,7 @@
997995 mean_dam_increment;
998996 if (temp > 0)
999997 {
1000- LOG_PRINT1(L"Subtracting %d instances of extra to-hit bonus for weapon\n", temp);
998+ LOG_PRINT1(__T("Subtracting %d instances of extra to-hit bonus for weapon\n"), temp);
1001999
10021000 (artprobs[ART_IDX_WEAPON_HIT]) -= temp;
10031001 }
@@ -1008,7 +1006,7 @@
10081006 mean_dam_increment;
10091007 if (temp > 0)
10101008 {
1011- LOG_PRINT1(L"Adding %d instances of extra to-dam bonus for weapon\n", temp);
1009+ LOG_PRINT1(__T("Adding %d instances of extra to-dam bonus for weapon\n"), temp);
10121010
10131011 (artprobs[ART_IDX_WEAPON_DAM]) += temp;
10141012 }
@@ -1019,7 +1017,7 @@
10191017 mean_dam_increment;
10201018 if (temp > 0)
10211019 {
1022- LOG_PRINT1(L"Subtracting %d instances of extra to-dam bonus for weapon\n", temp);
1020+ LOG_PRINT1(__T("Subtracting %d instances of extra to-dam bonus for weapon\n"), temp);
10231021
10241022 (artprobs[ART_IDX_WEAPON_DAM]) -= temp;
10251023 }
@@ -1028,7 +1026,7 @@
10281026 /* Aggravation */
10291027 if (a_ptr->flags[2] & TR2_AGGRAVATE)
10301028 {
1031- LOG_PRINT(L"Adding 1 for aggravation - weapon\n");
1029+ LOG_PRINT(__T("Adding 1 for aggravation - weapon\n"));
10321030 (artprobs[ART_IDX_WEAPON_AGGR])++;
10331031 }
10341032
@@ -1043,7 +1041,7 @@
10431041 temp = (a_ptr->to_d - k_ptr->to_d) / mean_dam_increment;
10441042 if (temp > 0)
10451043 {
1046- LOG_PRINT1(L"Adding %d instances of extra to-hit and to-dam bonus for non-weapon\n", temp);
1044+ LOG_PRINT1(__T("Adding %d instances of extra to-hit and to-dam bonus for non-weapon\n"), temp);
10471045
10481046 (artprobs[ART_IDX_NONWEAPON_HIT_DAM]) += temp;
10491047 }
@@ -1056,7 +1054,7 @@
10561054 temp = (a_ptr->to_d - k_ptr->to_d) / mean_dam_increment;
10571055 if (temp > 0)
10581056 {
1059- LOG_PRINT1(L"Adding %d instances of extra to-hit bonus for non-weapon\n", temp);
1057+ LOG_PRINT1(__T("Adding %d instances of extra to-hit bonus for non-weapon\n"), temp);
10601058
10611059 (artprobs[ART_IDX_NONWEAPON_HIT]) += temp;
10621060 }
@@ -1066,7 +1064,7 @@
10661064 temp = (a_ptr->to_d - k_ptr->to_d) / mean_dam_increment;
10671065 if (temp > 0)
10681066 {
1069- LOG_PRINT1(L"Adding %d instances of extra to-dam bonus for non-weapon\n", temp);
1067+ LOG_PRINT1(__T("Adding %d instances of extra to-dam bonus for non-weapon\n"), temp);
10701068
10711069 (artprobs[ART_IDX_NONWEAPON_DAM]) += temp;
10721070 }
@@ -1076,7 +1074,7 @@
10761074 /* Aggravation */
10771075 if (a_ptr->flags[2] & TR2_AGGRAVATE)
10781076 {
1079- LOG_PRINT(L"Adding 1 for aggravation - nonweapon\n");
1077+ LOG_PRINT(__T("Adding 1 for aggravation - nonweapon\n"));
10801078 (artprobs[ART_IDX_NONWEAPON_AGGR])++;
10811079 }
10821080
@@ -1098,8 +1096,8 @@
10981096 if (s_ptr->slay_flag & TR0_BRAND_MASK) temp2++;
10991097 }
11001098 }
1101- LOG_PRINT1(L"Adding %d for slays\n", temp);
1102- LOG_PRINT1(L"Adding %d for brands\n", temp2);
1099+ LOG_PRINT1(__T("Adding %d for slays\n"), temp);
1100+ LOG_PRINT1(__T("Adding %d for brands\n"), temp2);
11031101
11041102 /* Add these to the frequency count */
11051103 artprobs[ART_IDX_NONWEAPON_BRAND] += temp2;
@@ -1115,7 +1113,7 @@
11151113
11161114 if(a_ptr->flags[2] & TR2_BLESSED)
11171115 {
1118- LOG_PRINT(L"Adding 1 for blessed weapon\n");
1116+ LOG_PRINT(__T("Adding 1 for blessed weapon\n"));
11191117
11201118 (artprobs[ART_IDX_MELEE_BLESS])++;
11211119 }
@@ -1123,7 +1121,7 @@
11231121 /* See invisible? */
11241122 if(a_ptr->flags[2] & TR2_SEE_INVIS)
11251123 {
1126- LOG_PRINT(L"Adding 1 for see invisible (weapon case)\n");
1124+ LOG_PRINT(__T("Adding 1 for see invisible (weapon case)\n"));
11271125
11281126 (artprobs[ART_IDX_MELEE_SINV])++;
11291127 }
@@ -1134,11 +1132,11 @@
11341132 /* Do we have 3 or more extra blows? (Unlikely) */
11351133 if(a_ptr->pval > 2)
11361134 {
1137- LOG_PRINT(L"Adding 1 for supercharged blows (3 or more!)\n");
1135+ LOG_PRINT(__T("Adding 1 for supercharged blows (3 or more!)\n"));
11381136 (artprobs[ART_IDX_MELEE_BLOWS_SUPER])++;
11391137 }
11401138 else {
1141- LOG_PRINT(L"Adding 1 for extra blows\n");
1139+ LOG_PRINT(__T("Adding 1 for extra blows\n"));
11421140 (artprobs[ART_IDX_MELEE_BLOWS])++;
11431141 }
11441142 }
@@ -1149,7 +1147,7 @@
11491147 temp = (a_ptr->to_a - k_ptr->to_a) / mean_ac_increment;
11501148 if (temp > 0)
11511149 {
1152- LOG_PRINT1(L"Adding %d instances of extra AC bonus for weapon\n", temp);
1150+ LOG_PRINT1(__T("Adding %d instances of extra AC bonus for weapon\n"), temp);
11531151
11541152 (artprobs[ART_IDX_MELEE_AC]) += temp;
11551153 }
@@ -1161,13 +1159,13 @@
11611159 /* Difference of 3 or more? */
11621160 if ( (a_ptr->dd - k_ptr->dd) > 2)
11631161 {
1164- LOG_PRINT(L"Adding 1 for super-charged damage dice!\n");
1162+ LOG_PRINT(__T("Adding 1 for super-charged damage dice!\n"));
11651163
11661164 (artprobs[ART_IDX_MELEE_DICE_SUPER])++;
11671165 }
11681166 else
11691167 {
1170- LOG_PRINT(L"Adding 1 for extra damage dice.\n");
1168+ LOG_PRINT(__T("Adding 1 for extra damage dice.\n"));
11711169
11721170 (artprobs[ART_IDX_MELEE_DICE])++;
11731171 }
@@ -1176,7 +1174,7 @@
11761174 /* Check weight - is it different from normal? */
11771175 if (a_ptr->weight != k_ptr->weight)
11781176 {
1179- LOG_PRINT(L"Adding 1 for unusual weight.\n");
1177+ LOG_PRINT(__T("Adding 1 for unusual weight.\n"));
11801178
11811179 (artprobs[ART_IDX_MELEE_WEIGHT])++;
11821180 }
@@ -1184,7 +1182,7 @@
11841182 /* Check for tunnelling ability */
11851183 if (a_ptr->flags[0] & TR0_TUNNEL)
11861184 {
1187- LOG_PRINT(L"Adding 1 for tunnelling bonus.\n");
1185+ LOG_PRINT(__T("Adding 1 for tunnelling bonus.\n"));
11881186
11891187 (artprobs[ART_IDX_MELEE_TUNN])++;
11901188 }
@@ -1206,8 +1204,8 @@
12061204 if (s_ptr->slay_flag & TR0_BRAND_MASK) temp2++;
12071205 }
12081206 }
1209- LOG_PRINT1(L"Adding %d for slays\n", temp);
1210- LOG_PRINT1(L"Adding %d for brands\n", temp2);
1207+ LOG_PRINT1(__T("Adding %d for slays\n"), temp);
1208+ LOG_PRINT1(__T("Adding %d for brands\n"), temp2);
12111209
12121210 /* Add these to the frequency count */
12131211 artprobs[ART_IDX_MELEE_BRAND] += temp2;
@@ -1221,7 +1219,7 @@
12211219 /* Check for tunnelling ability */
12221220 if (a_ptr->flags[0] & TR0_TUNNEL)
12231221 {
1224- LOG_PRINT(L"Adding 1 for tunnelling bonus - general.\n");
1222+ LOG_PRINT(__T("Adding 1 for tunnelling bonus - general.\n"));
12251223
12261224 (artprobs[ART_IDX_GEN_TUNN])++;
12271225 }
@@ -1241,38 +1239,38 @@
12411239 {
12421240 if (a_ptr->tval == TV_BOOTS)
12431241 {
1244- LOG_PRINT1(L"Adding %d for AC bonus - boots\n", temp);
1242+ LOG_PRINT1(__T("Adding %d for AC bonus - boots\n"), temp);
12451243 (artprobs[ART_IDX_BOOT_AC]) += temp;
12461244 }
12471245 else if (a_ptr->tval == TV_GLOVES)
12481246 {
1249- LOG_PRINT1(L"Adding %d for AC bonus - gloves\n", temp);
1247+ LOG_PRINT1(__T("Adding %d for AC bonus - gloves\n"), temp);
12501248 (artprobs[ART_IDX_GLOVE_AC]) += temp;
12511249 }
12521250 else if (a_ptr->tval == TV_HELM || a_ptr->tval == TV_CROWN)
12531251 {
1254- LOG_PRINT1(L"Adding %d for AC bonus - headgear\n", temp);
1252+ LOG_PRINT1(__T("Adding %d for AC bonus - headgear\n"), temp);
12551253 (artprobs[ART_IDX_HELM_AC]) += temp;
12561254 }
12571255 else if (a_ptr->tval == TV_SHIELD)
12581256 {
1259- LOG_PRINT1(L"Adding %d for AC bonus - shield\n", temp);
1257+ LOG_PRINT1(__T("Adding %d for AC bonus - shield\n"), temp);
12601258 (artprobs[ART_IDX_SHIELD_AC]) += temp;
12611259 }
12621260 else if (a_ptr->tval == TV_CLOAK)
12631261 {
1264- LOG_PRINT1(L"Adding %d for AC bonus - cloak\n", temp);
1262+ LOG_PRINT1(__T("Adding %d for AC bonus - cloak\n"), temp);
12651263 (artprobs[ART_IDX_CLOAK_AC]) += temp;
12661264 }
12671265 else if (a_ptr->tval == TV_SOFT_ARMOR || a_ptr->tval == TV_HARD_ARMOR ||
12681266 a_ptr->tval == TV_DRAG_ARMOR)
12691267 {
1270- LOG_PRINT1(L"Adding %d for AC bonus - body armor\n", temp);
1268+ LOG_PRINT1(__T("Adding %d for AC bonus - body armor\n"), temp);
12711269 (artprobs[ART_IDX_ARMOR_AC]) += temp;
12721270 }
12731271 else
12741272 {
1275- LOG_PRINT1(L"Adding %d for AC bonus - general\n", temp);
1273+ LOG_PRINT1(__T("Adding %d for AC bonus - general\n"), temp);
12761274 (artprobs[ART_IDX_GEN_AC]) += temp;
12771275 }
12781276 }
@@ -1289,7 +1287,7 @@
12891287 /* ToDo: count higher and lower separately */
12901288 if (a_ptr->weight != k_ptr->weight)
12911289 {
1292- LOG_PRINT(L"Adding 1 for unusual weight.\n");
1290+ LOG_PRINT(__T("Adding 1 for unusual weight.\n"));
12931291
12941292 (artprobs[ART_IDX_ALLARMOR_WEIGHT])++;
12951293 }
@@ -1330,7 +1328,7 @@
13301328 /* Handle WIS and INT on helms and crowns */
13311329 if(a_ptr->flags[0] & TR0_WIS)
13321330 {
1333- LOG_PRINT(L"Adding 1 for WIS bonus on headgear.\n");
1331+ LOG_PRINT(__T("Adding 1 for WIS bonus on headgear.\n"));
13341332
13351333 (artprobs[ART_IDX_HELM_WIS])++;
13361334 /* Counted this one separately so subtract it here */
@@ -1338,7 +1336,7 @@
13381336 }
13391337 if(a_ptr->flags[0] & TR0_INT)
13401338 {
1341- LOG_PRINT(L"Adding 1 for INT bonus on headgear.\n");
1339+ LOG_PRINT(__T("Adding 1 for INT bonus on headgear.\n"));
13421340
13431341 (artprobs[ART_IDX_HELM_INT])++;
13441342 /* Counted this one separately so subtract it here */
@@ -1350,7 +1348,7 @@
13501348 a_ptr->tval == TV_DRAG_ARMOR) && a_ptr->flags[0] & TR0_CON)
13511349 {
13521350 /* Handle CON bonus on armor */
1353- LOG_PRINT(L"Adding 1 for CON bonus on body armor.\n");
1351+ LOG_PRINT(__T("Adding 1 for CON bonus on body armor.\n"));
13541352
13551353 (artprobs[ART_IDX_ARMOR_CON])++;
13561354 /* Counted this one separately so subtract it here */
@@ -1359,7 +1357,7 @@
13591357 else if ((a_ptr->tval == TV_GLOVES) && (a_ptr->flags[0] & TR0_DEX))
13601358 {
13611359 /* Handle DEX bonus on gloves */
1362- LOG_PRINT(L"Adding 1 for DEX bonus on gloves.\n");
1360+ LOG_PRINT(__T("Adding 1 for DEX bonus on gloves.\n"));
13631361
13641362 (artprobs[ART_IDX_GLOVE_DEX])++;
13651363 /* Counted this one separately so subtract it here */
@@ -1371,7 +1369,7 @@
13711369 if (temp > 0)
13721370 {
13731371 /* There are some bonuses that weren't handled above */
1374- LOG_PRINT1(L"Adding %d for stat bonuses - general.\n", temp);
1372+ LOG_PRINT1(__T("Adding %d for stat bonuses - general.\n"), temp);
13751373
13761374 (artprobs[ART_IDX_GEN_STAT]) += temp;
13771375
@@ -1391,7 +1389,7 @@
13911389 if (a_ptr->flags[1] & TR1_SUST_DEX) temp++;
13921390 if (a_ptr->flags[1] & TR1_SUST_CON) temp++;
13931391 if (a_ptr->flags[1] & TR1_SUST_CHR) temp++;
1394- LOG_PRINT1(L"Adding %d for stat sustains.\n", temp);
1392+ LOG_PRINT1(__T("Adding %d for stat sustains.\n"), temp);
13951393
13961394 (artprobs[ART_IDX_GEN_SUST]) += temp;
13971395 }
@@ -1401,13 +1399,13 @@
14011399 /* Handle stealth, including a couple of special cases */
14021400 if(a_ptr->tval == TV_BOOTS)
14031401 {
1404- LOG_PRINT(L"Adding 1 for stealth bonus on boots.\n");
1402+ LOG_PRINT(__T("Adding 1 for stealth bonus on boots.\n"));
14051403
14061404 (artprobs[ART_IDX_BOOT_STEALTH])++;
14071405 }
14081406 else if (a_ptr->tval == TV_CLOAK)
14091407 {
1410- LOG_PRINT(L"Adding 1 for stealth bonus on cloak.\n");
1408+ LOG_PRINT(__T("Adding 1 for stealth bonus on cloak.\n"));
14111409
14121410 (artprobs[ART_IDX_CLOAK_STEALTH])++;
14131411 }
@@ -1414,7 +1412,7 @@
14141412 else if (a_ptr->tval == TV_SOFT_ARMOR ||
14151413 a_ptr->tval == TV_HARD_ARMOR || a_ptr->tval == TV_DRAG_ARMOR)
14161414 {
1417- LOG_PRINT(L"Adding 1 for stealth bonus on armor.\n");
1415+ LOG_PRINT(__T("Adding 1 for stealth bonus on armor.\n"));
14181416
14191417 (artprobs[ART_IDX_ARMOR_STEALTH])++;
14201418 }
@@ -1421,7 +1419,7 @@
14211419 else
14221420 {
14231421 /* General case */
1424- LOG_PRINT(L"Adding 1 for stealth bonus - general.\n");
1422+ LOG_PRINT(__T("Adding 1 for stealth bonus - general.\n"));
14251423
14261424 (artprobs[ART_IDX_GEN_STEALTH])++;
14271425 }
@@ -1431,7 +1429,7 @@
14311429 if (a_ptr->flags[0] & TR0_SEARCH)
14321430 {
14331431 /* Handle searching bonus - fully generic this time */
1434- LOG_PRINT(L"Adding 1 for search bonus - general.\n");
1432+ LOG_PRINT(__T("Adding 1 for search bonus - general.\n"));
14351433
14361434 (artprobs[ART_IDX_GEN_SEARCH])++;
14371435 }
@@ -1439,7 +1437,7 @@
14391437 if (a_ptr->flags[0] & TR0_INFRA)
14401438 {
14411439 /* Handle infravision bonus - fully generic */
1442- LOG_PRINT(L"Adding 1 for infravision bonus - general.\n");
1440+ LOG_PRINT(__T("Adding 1 for infravision bonus - general.\n"));
14431441
14441442 (artprobs[ART_IDX_GEN_INFRA])++;
14451443 }
@@ -1460,7 +1458,7 @@
14601458 if (a_ptr->pval > 7)
14611459 {
14621460 /* Supercharge case */
1463- LOG_PRINT(L"Adding 1 for supercharged speed bonus!\n");
1461+ LOG_PRINT(__T("Adding 1 for supercharged speed bonus!\n"));
14641462
14651463 (artprobs[ART_IDX_GEN_SPEED_SUPER])++;
14661464 }
@@ -1467,13 +1465,13 @@
14671465 else if(a_ptr->tval == TV_BOOTS)
14681466 {
14691467 /* Handle boots separately */
1470- LOG_PRINT(L"Adding 1 for normal speed bonus on boots.\n");
1468+ LOG_PRINT(__T("Adding 1 for normal speed bonus on boots.\n"));
14711469
14721470 (artprobs[ART_IDX_BOOT_SPEED])++;
14731471 }
14741472 else
14751473 {
1476- LOG_PRINT(L"Adding 1 for normal speed bonus - general.\n");
1474+ LOG_PRINT(__T("Adding 1 for normal speed bonus - general.\n"));
14771475
14781476 (artprobs[ART_IDX_GEN_SPEED])++;
14791477 }
@@ -1489,7 +1487,7 @@
14891487 if (a_ptr->flags[1] & TR1_IM_ELEC) temp++;
14901488 if (a_ptr->flags[1] & TR1_IM_FIRE) temp++;
14911489 if (a_ptr->flags[1] & TR1_IM_COLD) temp++;
1492- LOG_PRINT1(L"Adding %d for immunities.\n", temp);
1490+ LOG_PRINT1(__T("Adding %d for immunities.\n"), temp);
14931491
14941492 (artprobs[ART_IDX_GEN_IMMUNE]) += temp;
14951493 }
@@ -1499,13 +1497,13 @@
14991497 /* Free action - handle gloves separately */
15001498 if(a_ptr->tval == TV_GLOVES)
15011499 {
1502- LOG_PRINT(L"Adding 1 for free action on gloves.\n");
1500+ LOG_PRINT(__T("Adding 1 for free action on gloves.\n"));
15031501
15041502 (artprobs[ART_IDX_GLOVE_FA])++;
15051503 }
15061504 else
15071505 {
1508- LOG_PRINT(L"Adding 1 for free action - general.\n");
1506+ LOG_PRINT(__T("Adding 1 for free action - general.\n"));
15091507
15101508 (artprobs[ART_IDX_GEN_FA])++;
15111509 }
@@ -1517,13 +1515,13 @@
15171515 if( (a_ptr->tval == TV_SOFT_ARMOR) || (a_ptr->tval == TV_HARD_ARMOR) ||
15181516 (a_ptr->tval == TV_DRAG_ARMOR))
15191517 {
1520- LOG_PRINT(L"Adding 1 for hold life on armor.\n");
1518+ LOG_PRINT(__T("Adding 1 for hold life on armor.\n"));
15211519
15221520 (artprobs[ART_IDX_ARMOR_HLIFE])++;
15231521 }
15241522 else
15251523 {
1526- LOG_PRINT(L"Adding 1 for hold life - general.\n");
1524+ LOG_PRINT(__T("Adding 1 for hold life - general.\n"));
15271525
15281526 (artprobs[ART_IDX_GEN_HLIFE])++;
15291527 }
@@ -1534,13 +1532,13 @@
15341532 /* Feather fall - handle boots separately */
15351533 if(a_ptr->tval == TV_BOOTS)
15361534 {
1537- LOG_PRINT(L"Adding 1 for feather fall on boots.\n");
1535+ LOG_PRINT(__T("Adding 1 for feather fall on boots.\n"));
15381536
15391537 (artprobs[ART_IDX_BOOT_FEATHER])++;
15401538 }
15411539 else
15421540 {
1543- LOG_PRINT(L"Adding 1 for feather fall - general.\n");
1541+ LOG_PRINT(__T("Adding 1 for feather fall - general.\n"));
15441542
15451543 (artprobs[ART_IDX_GEN_FEATHER])++;
15461544 }
@@ -1549,7 +1547,7 @@
15491547 if (a_ptr->flags[2] & TR2_LITE)
15501548 {
15511549 /* Handle permanent light */
1552- LOG_PRINT(L"Adding 1 for permanent light - general.\n");
1550+ LOG_PRINT(__T("Adding 1 for permanent light - general.\n"));
15531551
15541552 (artprobs[ART_IDX_GEN_LITE])++;
15551553 }
@@ -1565,13 +1563,13 @@
15651563 {
15661564 if (a_ptr->tval == TV_HELM || a_ptr->tval == TV_CROWN)
15671565 {
1568- LOG_PRINT(L"Adding 1 for see invisible - headgear.\n");
1566+ LOG_PRINT(__T("Adding 1 for see invisible - headgear.\n"));
15691567
15701568 (artprobs[ART_IDX_HELM_SINV])++;
15711569 }
15721570 else
15731571 {
1574- LOG_PRINT(L"Adding 1 for see invisible - general.\n");
1572+ LOG_PRINT(__T("Adding 1 for see invisible - general.\n"));
15751573
15761574 (artprobs[ART_IDX_GEN_SINV])++;
15771575 }
@@ -1583,13 +1581,13 @@
15831581 /* ESP case. Handle helms/crowns separately. */
15841582 if(a_ptr->tval == TV_HELM || a_ptr->tval == TV_CROWN)
15851583 {
1586- LOG_PRINT(L"Adding 1 for ESP on headgear.\n");
1584+ LOG_PRINT(__T("Adding 1 for ESP on headgear.\n"));
15871585
15881586 (artprobs[ART_IDX_HELM_ESP])++;
15891587 }
15901588 else
15911589 {
1592- LOG_PRINT(L"Adding 1 for ESP - general.\n");
1590+ LOG_PRINT(__T("Adding 1 for ESP - general.\n"));
15931591
15941592 (artprobs[ART_IDX_GEN_ESP])++;
15951593 }
@@ -1598,7 +1596,7 @@
15981596 if (a_ptr->flags[2] & TR2_SLOW_DIGEST)
15991597 {
16001598 /* Slow digestion case - generic. */
1601- LOG_PRINT(L"Adding 1 for slow digestion - general.\n");
1599+ LOG_PRINT(__T("Adding 1 for slow digestion - general.\n"));
16021600
16031601 (artprobs[ART_IDX_GEN_SDIG])++;
16041602 }
@@ -1606,7 +1604,7 @@
16061604 if (a_ptr->flags[2] & TR2_REGEN)
16071605 {
16081606 /* Regeneration case - generic. */
1609- LOG_PRINT(L"Adding 1 for regeneration - general.\n");
1607+ LOG_PRINT(__T("Adding 1 for regeneration - general.\n"));
16101608
16111609 (artprobs[ART_IDX_GEN_REGEN])++;
16121610 }
@@ -1624,7 +1622,7 @@
16241622 /* Shields treated separately */
16251623 if (a_ptr->tval == TV_SHIELD)
16261624 {
1627- LOG_PRINT1(L"Adding %d for low resists on shield.\n", temp);
1625+ LOG_PRINT1(__T("Adding %d for low resists on shield.\n"), temp);
16281626
16291627 (artprobs[ART_IDX_SHIELD_LRES]) += temp;
16301628 }
@@ -1635,7 +1633,7 @@
16351633 if (temp == 4)
16361634 {
16371635 /* Special case: armor has all four low resists */
1638- LOG_PRINT(L"Adding 1 for ALL LOW RESISTS on body armor.\n");
1636+ LOG_PRINT(__T("Adding 1 for ALL LOW RESISTS on body armor.\n"));
16391637
16401638 (artprobs[ART_IDX_ARMOR_ALLRES])++;
16411639 }
@@ -1642,7 +1640,7 @@
16421640 else
16431641 {
16441642 /* Just tally up the resists as usual */
1645- LOG_PRINT1(L"Adding %d for low resists on body armor.\n", temp);
1643+ LOG_PRINT1(__T("Adding %d for low resists on body armor.\n"), temp);
16461644
16471645 (artprobs[ART_IDX_ARMOR_LRES]) += temp;
16481646 }
@@ -1650,7 +1648,7 @@
16501648 else
16511649 {
16521650 /* General case */
1653- LOG_PRINT1(L"Adding %d for low resists - general.\n", temp);
1651+ LOG_PRINT1(__T("Adding %d for low resists - general.\n"), temp);
16541652
16551653 (artprobs[ART_IDX_GEN_LRES]) += temp;
16561654 }
@@ -1681,7 +1679,7 @@
16811679 if (a_ptr->flags[1] & TR1_RES_NETHR) temp++;
16821680 if (a_ptr->flags[1] & TR1_RES_CHAOS) temp++;
16831681 if (a_ptr->flags[1] & TR1_RES_DISEN) temp++;
1684- LOG_PRINT1(L"Adding %d for high resists on body armor.\n", temp);
1682+ LOG_PRINT1(__T("Adding %d for high resists on body armor.\n"), temp);
16851683
16861684 (artprobs[ART_IDX_ARMOR_HRES]) += temp;
16871685 }
@@ -1690,7 +1688,7 @@
16901688 if (a_ptr->flags[1] & TR1_RES_POIS)
16911689 {
16921690 /* Resist poison ability */
1693- LOG_PRINT(L"Adding 1 for resist poison - general.\n");
1691+ LOG_PRINT(__T("Adding 1 for resist poison - general.\n"));
16941692
16951693 (artprobs[ART_IDX_GEN_RPOIS])++;
16961694 }
@@ -1698,7 +1696,7 @@
16981696 if (a_ptr->flags[1] & TR1_RES_FEAR)
16991697 {
17001698 /* Resist fear ability */
1701- LOG_PRINT(L"Adding 1 for resist fear - general.\n");
1699+ LOG_PRINT(__T("Adding 1 for resist fear - general.\n"));
17021700
17031701 (artprobs[ART_IDX_GEN_RFEAR])++;
17041702 }
@@ -1706,7 +1704,7 @@
17061704 if (a_ptr->flags[1] & TR1_RES_LITE)
17071705 {
17081706 /* Resist light ability */
1709- LOG_PRINT(L"Adding 1 for resist light - general.\n");
1707+ LOG_PRINT(__T("Adding 1 for resist light - general.\n"));
17101708
17111709 (artprobs[ART_IDX_GEN_RLITE])++;
17121710 }
@@ -1714,7 +1712,7 @@
17141712 if (a_ptr->flags[1] & TR1_RES_DARK)
17151713 {
17161714 /* Resist dark ability */
1717- LOG_PRINT(L"Adding 1 for resist dark - general.\n");
1715+ LOG_PRINT(__T("Adding 1 for resist dark - general.\n"));
17181716
17191717 (artprobs[ART_IDX_GEN_RDARK])++;
17201718 }
@@ -1724,7 +1722,7 @@
17241722 /* Resist blind ability - helms/crowns are separate */
17251723 if(a_ptr->tval == TV_HELM || a_ptr->tval == TV_CROWN)
17261724 {
1727- LOG_PRINT(L"Adding 1 for resist blindness - headgear.\n");
1725+ LOG_PRINT(__T("Adding 1 for resist blindness - headgear.\n"));
17281726
17291727 (artprobs[ART_IDX_HELM_RBLIND])++;
17301728 }
@@ -1731,7 +1729,7 @@
17311729 else
17321730 {
17331731 /* General case */
1734- LOG_PRINT(L"Adding 1 for resist blindness - general.\n");
1732+ LOG_PRINT(__T("Adding 1 for resist blindness - general.\n"));
17351733
17361734 (artprobs[ART_IDX_GEN_RBLIND])++;
17371735 }
@@ -1740,7 +1738,7 @@
17401738 if (a_ptr->flags[1] & TR1_RES_CONFU)
17411739 {
17421740 /* Resist confusion ability */
1743- LOG_PRINT(L"Adding 1 for resist confusion - general.\n");
1741+ LOG_PRINT(__T("Adding 1 for resist confusion - general.\n"));
17441742
17451743 (artprobs[ART_IDX_GEN_RCONF])++;
17461744 }
@@ -1748,7 +1746,7 @@
17481746 if (a_ptr->flags[1] & TR1_RES_SOUND)
17491747 {
17501748 /* Resist sound ability */
1751- LOG_PRINT(L"Adding 1 for resist sound - general.\n");
1749+ LOG_PRINT(__T("Adding 1 for resist sound - general.\n"));
17521750
17531751 (artprobs[ART_IDX_GEN_RSOUND])++;
17541752 }
@@ -1756,7 +1754,7 @@
17561754 if (a_ptr->flags[1] & TR1_RES_SHARD)
17571755 {
17581756 /* Resist shards ability */
1759- LOG_PRINT(L"Adding 1 for resist shards - general.\n");
1757+ LOG_PRINT(__T("Adding 1 for resist shards - general.\n"));
17601758
17611759 (artprobs[ART_IDX_GEN_RSHARD])++;
17621760 }
@@ -1764,7 +1762,7 @@
17641762 if (a_ptr->flags[1] & TR1_RES_NEXUS)
17651763 {
17661764 /* Resist nexus ability */
1767- LOG_PRINT(L"Adding 1 for resist nexus - general.\n");
1765+ LOG_PRINT(__T("Adding 1 for resist nexus - general.\n"));
17681766
17691767 (artprobs[ART_IDX_GEN_RNEXUS])++;
17701768 }
@@ -1772,7 +1770,7 @@
17721770 if (a_ptr->flags[1] & TR1_RES_NETHR)
17731771 {
17741772 /* Resist nether ability */
1775- LOG_PRINT(L"Adding 1 for resist nether - general.\n");
1773+ LOG_PRINT(__T("Adding 1 for resist nether - general.\n"));
17761774
17771775 (artprobs[ART_IDX_GEN_RNETHER])++;
17781776 }
@@ -1780,7 +1778,7 @@
17801778 if (a_ptr->flags[1] & TR1_RES_CHAOS)
17811779 {
17821780 /* Resist chaos ability */
1783- LOG_PRINT(L"Adding 1 for resist chaos - general.\n");
1781+ LOG_PRINT(__T("Adding 1 for resist chaos - general.\n"));
17841782
17851783 (artprobs[ART_IDX_GEN_RCHAOS])++;
17861784 }
@@ -1788,7 +1786,7 @@
17881786 if (a_ptr->flags[1] & TR1_RES_DISEN)
17891787 {
17901788 /* Resist disenchantment ability */
1791- LOG_PRINT(L"Adding 1 for resist disenchantment - general.\n");
1789+ LOG_PRINT(__T("Adding 1 for resist disenchantment - general.\n"));
17921790
17931791 (artprobs[ART_IDX_GEN_RDISEN])++;
17941792 }
@@ -1801,7 +1799,7 @@
18011799 /* Print out some of the abilities, to make sure that everything's fine */
18021800 for(i=0; i<ART_IDX_TOTAL; i++)
18031801 {
1804- file_putf(log_file, L"Frequency of ability %d: %d\n", i, artprobs[i]);
1802+ file_putf(log_file, __T("Frequency of ability %d: %d\n"), i, artprobs[i]);
18051803 }
18061804 }
18071805
@@ -1831,7 +1829,6 @@
18311829 artprobs[art_idx_bow[i]] = (artprobs[art_idx_bow[i]] * art_total)
18321830 / art_bow_total;
18331831 }
1834-
18351832 /* All weapon abilities */
18361833 for (i = 0; i < ART_IDX_WEAPON_COUNT; i++)
18371834 {
@@ -1838,7 +1835,6 @@
18381835 artprobs[art_idx_weapon[i]] = (artprobs[art_idx_weapon[i]] *
18391836 art_total) / (art_bow_total + art_melee_total);
18401837 }
1841-
18421838 /* Corresponding non-weapon abilities */
18431839 temp = art_total - art_melee_total - art_bow_total;
18441840 for (i = 0; i < ART_IDX_NONWEAPON_COUNT; i++)
@@ -1846,7 +1842,6 @@
18461842 artprobs[art_idx_nonweapon[i]] = (artprobs[art_idx_nonweapon[i]] *
18471843 art_total) / temp;
18481844 }
1849-
18501845 /* All melee weapon abilities */
18511846 for (i = 0; i < ART_IDX_MELEE_COUNT; i++)
18521847 {
@@ -1853,7 +1848,6 @@
18531848 artprobs[art_idx_melee[i]] = (artprobs[art_idx_melee[i]] *
18541849 art_total) / art_melee_total;
18551850 }
1856-
18571851 /* All general armor abilities */
18581852 temp = art_armor_total + art_boot_total + art_shield_total +
18591853 art_headgear_total + art_cloak_total + art_glove_total;
@@ -1862,7 +1856,6 @@
18621856 artprobs[art_idx_allarmor[i]] = (artprobs[art_idx_allarmor[i]] *
18631857 art_total) / temp;
18641858 }
1865-
18661859 /* Boots */
18671860 for (i = 0; i < ART_IDX_BOOT_COUNT; i++)
18681861 {
@@ -1869,7 +1862,6 @@
18691862 artprobs[art_idx_boot[i]] = (artprobs[art_idx_boot[i]] *
18701863 art_total) / art_boot_total;
18711864 }
1872-
18731865 /* Gloves */
18741866 for (i = 0; i < ART_IDX_GLOVE_COUNT; i++)
18751867 {
@@ -1876,7 +1868,6 @@
18761868 artprobs[art_idx_glove[i]] = (artprobs[art_idx_glove[i]] *
18771869 art_total) / art_glove_total;
18781870 }
1879-
18801871 /* Headgear */
18811872 for (i = 0; i < ART_IDX_HELM_COUNT; i++)
18821873 {
@@ -1883,7 +1874,6 @@
18831874 artprobs[art_idx_headgear[i]] = (artprobs[art_idx_headgear[i]] *
18841875 art_total) / art_headgear_total;
18851876 }
1886-
18871877 /* Shields */
18881878 for (i = 0; i < ART_IDX_SHIELD_COUNT; i++)
18891879 {
@@ -1890,7 +1880,6 @@
18901880 artprobs[art_idx_shield[i]] = (artprobs[art_idx_shield[i]] *
18911881 art_total) / art_shield_total;
18921882 }
1893-
18941883 /* Cloaks */
18951884 for (i = 0; i < ART_IDX_CLOAK_COUNT; i++)
18961885 {
@@ -1897,7 +1886,6 @@
18971886 artprobs[art_idx_cloak[i]] = (artprobs[art_idx_cloak[i]] *
18981887 art_total) / art_cloak_total;
18991888 }
1900-
19011889 /* Body armor */
19021890 for (i = 0; i < ART_IDX_ARMOR_COUNT; i++)
19031891 {
@@ -1904,7 +1892,6 @@
19041892 artprobs[art_idx_armor[i]] = (artprobs[art_idx_armor[i]] *
19051893 art_total) / art_armor_total;
19061894 }
1907-
19081895 /*
19091896 * All others are general case and don't need to be rescaled,
19101897 * unless the algorithm is getting too clever about separating
@@ -1918,9 +1905,8 @@
19181905 /* Log the final frequencies to check that everything's correct */
19191906 for(i=0; i<ART_IDX_TOTAL; i++)
19201907 {
1921- LOG_PRINT2(L"Rescaled frequency of ability %d: %d\n", i, artprobs[i]);
1908+ LOG_PRINT2(__T("Rescaled frequency of ability %d: %d\n"), i, artprobs[i]);
19221909 }
1923-
19241910 }
19251911
19261912 static bool add_str(artifact_type *a_ptr)
@@ -1928,7 +1914,7 @@
19281914 if(a_ptr->flags[0] & TR0_STR) return FALSE;
19291915 a_ptr->flags[0] |= TR0_STR;
19301916 do_pval(a_ptr);
1931- LOG_PRINT1(L"Adding ability: STR (now %+d)\n", a_ptr->pval);
1917+ LOG_PRINT1(__T("Adding ability: STR (now %+d)\n"), a_ptr->pval);
19321918 return TRUE;
19331919 }
19341920
@@ -1937,7 +1923,7 @@
19371923 if(a_ptr->flags[0] & TR0_INT) return FALSE;
19381924 a_ptr->flags[0] |= TR0_INT;
19391925 do_pval(a_ptr);
1940- LOG_PRINT1(L"Adding ability: INT (now %+d)\n", a_ptr->pval);
1926+ LOG_PRINT1(__T("Adding ability: INT (now %+d)\n"), a_ptr->pval);
19411927 return TRUE;
19421928 }
19431929
@@ -1946,7 +1932,7 @@
19461932 if(a_ptr->flags[0] & TR0_WIS) return FALSE;
19471933 a_ptr->flags[0] |= TR0_WIS;
19481934 do_pval(a_ptr);
1949- LOG_PRINT1(L"Adding ability: WIS (now %+d)\n", a_ptr->pval);
1935+ LOG_PRINT1(__T("Adding ability: WIS (now %+d)\n"), a_ptr->pval);
19501936 return TRUE;
19511937 }
19521938
@@ -1955,7 +1941,7 @@
19551941 if(a_ptr->flags[0] & TR0_DEX) return FALSE;
19561942 a_ptr->flags[0] |= TR0_DEX;
19571943 do_pval(a_ptr);
1958- LOG_PRINT1(L"Adding ability: DEX (now %+d)\n", a_ptr->pval);
1944+ LOG_PRINT1(__T("Adding ability: DEX (now %+d)\n"), a_ptr->pval);
19591945 return TRUE;
19601946 }
19611947
@@ -1964,7 +1950,7 @@
19641950 if(a_ptr->flags[0] & TR0_CON) return FALSE;
19651951 a_ptr->flags[0] |= TR0_CON;
19661952 do_pval(a_ptr);
1967- LOG_PRINT1(L"Adding ability: CON (now %+d)\n", a_ptr->pval);
1953+ LOG_PRINT1(__T("Adding ability: CON (now %+d)\n"), a_ptr->pval);
19681954 return TRUE;
19691955 }
19701956
@@ -1973,7 +1959,7 @@
19731959 if(a_ptr->flags[0] & TR0_CHR) return FALSE;
19741960 a_ptr->flags[0] |= TR0_CHR;
19751961 do_pval(a_ptr);
1976- LOG_PRINT1(L"Adding ability: CHR (now %+d)\n", a_ptr->pval);
1962+ LOG_PRINT1(__T("Adding ability: CHR (now %+d)\n"), a_ptr->pval);
19771963 return TRUE;
19781964 }
19791965
@@ -2005,7 +1991,7 @@
20051991 {
20061992 if (a_ptr->flags[1] & TR1_SUST_STR) return FALSE;
20071993 a_ptr->flags[1] |= TR1_SUST_STR;
2008- LOG_PRINT(L"Adding ability: sustain STR\n");
1994+ LOG_PRINT(__T("Adding ability: sustain STR\n"));
20091995 return TRUE;
20101996 }
20111997
@@ -2013,7 +1999,7 @@
20131999 {
20142000 if (a_ptr->flags[1] & TR1_SUST_INT) return FALSE;
20152001 a_ptr->flags[1] |= TR1_SUST_INT;
2016- LOG_PRINT(L"Adding ability: sustain INT\n");
2002+ LOG_PRINT(__T("Adding ability: sustain INT\n"));
20172003 return TRUE;
20182004 }
20192005
@@ -2021,7 +2007,7 @@
20212007 {
20222008 if (a_ptr->flags[1] & TR1_SUST_WIS) return FALSE;
20232009 a_ptr->flags[1] |= TR1_SUST_WIS;
2024- LOG_PRINT(L"Adding ability: sustain WIS\n");
2010+ LOG_PRINT(__T("Adding ability: sustain WIS\n"));
20252011 return TRUE;
20262012 }
20272013
@@ -2029,7 +2015,7 @@
20292015 {
20302016 if (a_ptr->flags[1] & TR1_SUST_DEX) return FALSE;
20312017 a_ptr->flags[1] |= TR1_SUST_DEX;
2032- LOG_PRINT(L"Adding ability: sustain DEX\n");
2018+ LOG_PRINT(__T("Adding ability: sustain DEX\n"));
20332019 return TRUE;
20342020 }
20352021
@@ -2037,7 +2023,7 @@
20372023 {
20382024 if (a_ptr->flags[1] & TR1_SUST_CON) return FALSE;
20392025 a_ptr->flags[1] |= TR1_SUST_CON;
2040- LOG_PRINT(L"Adding ability: sustain CON\n");
2026+ LOG_PRINT(__T("Adding ability: sustain CON\n"));
20412027 return TRUE;
20422028 }
20432029
@@ -2045,7 +2031,7 @@
20452031 {
20462032 if (a_ptr->flags[1] & TR1_SUST_CHR) return FALSE;
20472033 a_ptr->flags[1] |= TR1_SUST_CHR;
2048- LOG_PRINT(L"Adding ability: sustain CHR\n");
2034+ LOG_PRINT(__T("Adding ability: sustain CHR\n"));
20492035 return TRUE;
20502036 }
20512037
@@ -2076,7 +2062,7 @@
20762062 {
20772063 a_ptr->flags[0] |= TR0_STEALTH;
20782064 do_pval(a_ptr);
2079- LOG_PRINT1(L"Adding ability: stealth (now %+d)\n", a_ptr->pval);
2065+ LOG_PRINT1(__T("Adding ability: stealth (now %+d)\n"), a_ptr->pval);
20802066 }
20812067
20822068 static void add_search(artifact_type *a_ptr)
@@ -2083,7 +2069,7 @@
20832069 {
20842070 a_ptr->flags[0] |= TR0_SEARCH;
20852071 do_pval(a_ptr);
2086- LOG_PRINT1(L"Adding ability: searching (now %+d)\n", a_ptr->pval);
2072+ LOG_PRINT1(__T("Adding ability: searching (now %+d)\n"), a_ptr->pval);
20872073 }
20882074
20892075 static void add_infravision(artifact_type *a_ptr)
@@ -2090,7 +2076,7 @@
20902076 {
20912077 a_ptr->flags[0] |= TR0_INFRA;
20922078 do_pval(a_ptr);
2093- LOG_PRINT1(L"Adding ability: infravision (now %+d)\n", a_ptr->pval);
2079+ LOG_PRINT1(__T("Adding ability: infravision (now %+d)\n"), a_ptr->pval);
20942080 }
20952081
20962082 static void add_tunnelling(artifact_type *a_ptr)
@@ -2097,7 +2083,7 @@
20972083 {
20982084 a_ptr->flags[0] |= TR0_TUNNEL;
20992085 do_pval(a_ptr);
2100- LOG_PRINT1(L"Adding ability: tunnelling (new bonus is %+d)\n", a_ptr->pval);
2086+ LOG_PRINT1(__T("Adding ability: tunnelling (new bonus is %+d)\n"), a_ptr->pval);
21012087 }
21022088
21032089 static void add_speed(artifact_type *a_ptr)
@@ -2106,12 +2092,12 @@
21062092 if (a_ptr->pval == 0)
21072093 {
21082094 a_ptr->pval = (s16b)randint1(4);
2109- LOG_PRINT1(L"Adding ability: speed (first time) (now %+d)\n", a_ptr->pval);
2095+ LOG_PRINT1(__T("Adding ability: speed (first time) (now %+d)\n"), a_ptr->pval);
21102096 }
21112097 else
21122098 {
21132099 do_pval(a_ptr);
2114- LOG_PRINT1(L"Adding ability: speed (now %+d)\n", a_ptr->pval);
2100+ LOG_PRINT1(__T("Adding ability: speed (now %+d)\n"), a_ptr->pval);
21152101 }
21162102 }
21172103
@@ -2119,7 +2105,7 @@
21192105 {
21202106 a_ptr->flags[0] |= TR0_SHOTS;
21212107 do_pval(a_ptr);
2122- LOG_PRINT1(L"Adding ability: extra shots (now %+d)\n", a_ptr->pval);
2108+ LOG_PRINT1(__T("Adding ability: extra shots (now %+d)\n"), a_ptr->pval);
21232109 }
21242110
21252111 static void add_blows(artifact_type *a_ptr)
@@ -2126,7 +2112,7 @@
21262112 {
21272113 a_ptr->flags[0] |= TR0_BLOWS;
21282114 do_pval(a_ptr);
2129- LOG_PRINT1(L"Adding ability: extra blows (%d additional blows)\n", a_ptr->pval);
2115+ LOG_PRINT1(__T("Adding ability: extra blows (%d additional blows)\n"), a_ptr->pval);
21302116 }
21312117
21322118 static void add_might(artifact_type *a_ptr)
@@ -2133,7 +2119,7 @@
21332119 {
21342120 a_ptr->flags[0] |= TR0_MIGHT;
21352121 do_pval(a_ptr);
2136- LOG_PRINT1(L"Adding ability: extra might (now %+d)\n", a_ptr->pval);
2122+ LOG_PRINT1(__T("Adding ability: extra might (now %+d)\n"), a_ptr->pval);
21372123 }
21382124
21392125 static bool add_resist_acid(artifact_type *a_ptr)
@@ -2140,7 +2126,7 @@
21402126 {
21412127 if (a_ptr->flags[1] & TR1_RES_ACID) return FALSE;
21422128 a_ptr->flags[1] |= TR1_RES_ACID;
2143- LOG_PRINT(L"Adding ability: resist acid\n");
2129+ LOG_PRINT(__T("Adding ability: resist acid\n"));
21442130 return TRUE;
21452131 }
21462132
@@ -2148,7 +2134,7 @@
21482134 {
21492135 if (a_ptr->flags[1] & TR1_RES_ELEC) return FALSE;
21502136 a_ptr->flags[1] |= TR1_RES_ELEC;
2151- LOG_PRINT(L"Adding ability: resist lightning\n");
2137+ LOG_PRINT(__T("Adding ability: resist lightning\n"));
21522138 return TRUE;
21532139 }
21542140
@@ -2156,7 +2142,7 @@
21562142 {
21572143 if (a_ptr->flags[1] & TR1_RES_FIRE) return FALSE;
21582144 a_ptr->flags[1] |= TR1_RES_FIRE;
2159- LOG_PRINT(L"Adding ability: resist fire\n");
2145+ LOG_PRINT(__T("Adding ability: resist fire\n"));
21602146 return TRUE;
21612147 }
21622148
@@ -2164,7 +2150,7 @@
21642150 {
21652151 if (a_ptr->flags[1] & TR1_RES_COLD) return FALSE;
21662152 a_ptr->flags[1] |= TR1_RES_COLD;
2167- LOG_PRINT(L"Adding ability: resist cold\n");
2153+ LOG_PRINT(__T("Adding ability: resist cold\n"));
21682154 return TRUE;
21692155 }
21702156
@@ -2192,7 +2178,7 @@
21922178 {
21932179 if (a_ptr->flags[1] & TR1_RES_POIS) return FALSE;
21942180 a_ptr->flags[1] |= TR1_RES_POIS;
2195- LOG_PRINT(L"Adding ability: resist poison\n");
2181+ LOG_PRINT(__T("Adding ability: resist poison\n"));
21962182 return TRUE;
21972183 }
21982184
@@ -2200,7 +2186,7 @@
22002186 {
22012187 if (a_ptr->flags[1] & TR1_RES_FEAR) return FALSE;
22022188 a_ptr->flags[1] |= TR1_RES_FEAR;
2203- LOG_PRINT(L"Adding ability: resist fear\n");
2189+ LOG_PRINT(__T("Adding ability: resist fear\n"));
22042190 return TRUE;
22052191 }
22062192
@@ -2208,7 +2194,7 @@
22082194 {
22092195 if (a_ptr->flags[1] & TR1_RES_LITE) return FALSE;
22102196 a_ptr->flags[1] |= TR1_RES_LITE;
2211- LOG_PRINT(L"Adding ability: resist light\n");
2197+ LOG_PRINT(__T("Adding ability: resist light\n"));
22122198 return TRUE;
22132199 }
22142200
@@ -2216,7 +2202,7 @@
22162202 {
22172203 if (a_ptr->flags[1] & TR1_RES_DARK) return FALSE;
22182204 a_ptr->flags[1] |= TR1_RES_DARK;
2219- LOG_PRINT(L"Adding ability: resist dark\n");
2205+ LOG_PRINT(__T("Adding ability: resist dark\n"));
22202206 return TRUE;
22212207 }
22222208
@@ -2224,7 +2210,7 @@
22242210 {
22252211 if (a_ptr->flags[1] & TR1_RES_BLIND) return FALSE;
22262212 a_ptr->flags[1] |= TR1_RES_BLIND;
2227- LOG_PRINT(L"Adding ability: resist blindness\n");
2213+ LOG_PRINT(__T("Adding ability: resist blindness\n"));
22282214 return TRUE;
22292215 }
22302216
@@ -2232,7 +2218,7 @@
22322218 {
22332219 if (a_ptr->flags[1] & TR1_RES_CONFU) return FALSE;
22342220 a_ptr->flags[1] |= TR1_RES_CONFU;
2235- LOG_PRINT(L"Adding ability: resist confusion\n");
2221+ LOG_PRINT(__T("Adding ability: resist confusion\n"));
22362222 return TRUE;
22372223 }
22382224
@@ -2240,7 +2226,7 @@
22402226 {
22412227 if (a_ptr->flags[1] & TR1_RES_SOUND) return FALSE;
22422228 a_ptr->flags[1] |= TR1_RES_SOUND;
2243- LOG_PRINT(L"Adding ability: resist sound\n");
2229+ LOG_PRINT(__T("Adding ability: resist sound\n"));
22442230 return TRUE;
22452231 }
22462232
@@ -2248,7 +2234,7 @@
22482234 {
22492235 if (a_ptr->flags[1] & TR1_RES_SHARD) return FALSE;
22502236 a_ptr->flags[1] |= TR1_RES_SHARD;
2251- LOG_PRINT(L"Adding ability: resist shards\n");
2237+ LOG_PRINT(__T("Adding ability: resist shards\n"));
22522238 return TRUE;
22532239 }
22542240
@@ -2256,7 +2242,7 @@
22562242 {
22572243 if (a_ptr->flags[1] & TR1_RES_NEXUS) return FALSE;
22582244 a_ptr->flags[1] |= TR1_RES_NEXUS;
2259- LOG_PRINT(L"Adding ability: resist nexus\n");
2245+ LOG_PRINT(__T("Adding ability: resist nexus\n"));
22602246 return TRUE;
22612247 }
22622248
@@ -2264,7 +2250,7 @@
22642250 {
22652251 if (a_ptr->flags[1] & TR1_RES_NETHR) return FALSE;
22662252 a_ptr->flags[1] |= TR1_RES_NETHR;
2267- LOG_PRINT(L"Adding ability: resist nether\n");
2253+ LOG_PRINT(__T("Adding ability: resist nether\n"));
22682254 return TRUE;
22692255 }
22702256
@@ -2272,7 +2258,7 @@
22722258 {
22732259 if (a_ptr->flags[1] & TR1_RES_CHAOS) return FALSE;
22742260 a_ptr->flags[1] |= TR1_RES_CHAOS;
2275- LOG_PRINT(L"Adding ability: resist chaos\n");
2261+ LOG_PRINT(__T("Adding ability: resist chaos\n"));
22762262 return TRUE;
22772263 }
22782264
@@ -2280,7 +2266,7 @@
22802266 {
22812267 if (a_ptr->flags[1] & TR1_RES_DISEN) return FALSE;
22822268 a_ptr->flags[1] |= TR1_RES_DISEN;
2283- LOG_PRINT(L"Adding ability: resist disenchantment\n");
2269+ LOG_PRINT(__T("Adding ability: resist disenchantment\n"));
22842270 return TRUE;
22852271 }
22862272
@@ -2334,49 +2320,49 @@
23342320 static void add_slow_digestion(artifact_type *a_ptr)
23352321 {
23362322 a_ptr->flags[2] |= TR2_SLOW_DIGEST;
2337- LOG_PRINT(L"Adding ability: slow digestion\n");
2323+ LOG_PRINT(__T("Adding ability: slow digestion\n"));
23382324 }
23392325
23402326 static void add_feather_falling(artifact_type *a_ptr)
23412327 {
23422328 a_ptr->flags[2] |= TR2_FEATHER;
2343- LOG_PRINT(L"Adding ability: feather fall\n");
2329+ LOG_PRINT(__T("Adding ability: feather fall\n"));
23442330 }
23452331
23462332 static void add_permanent_light(artifact_type *a_ptr)
23472333 {
23482334 a_ptr->flags[2] |= TR2_LITE;
2349- LOG_PRINT(L"Adding ability: permanent light\n");
2335+ LOG_PRINT(__T("Adding ability: permanent light\n"));
23502336 }
23512337
23522338 static void add_regeneration(artifact_type *a_ptr)
23532339 {
23542340 a_ptr->flags[2] |= TR2_REGEN;
2355- LOG_PRINT(L"Adding ability: regeneration\n");
2341+ LOG_PRINT(__T("Adding ability: regeneration\n"));
23562342 }
23572343
23582344 static void add_telepathy(artifact_type *a_ptr)
23592345 {
23602346 a_ptr->flags[2] |= TR2_TELEPATHY;
2361- LOG_PRINT(L"Adding ability: telepathy\n");
2347+ LOG_PRINT(__T("Adding ability: telepathy\n"));
23622348 }
23632349
23642350 static void add_see_invisible(artifact_type *a_ptr)
23652351 {
23662352 a_ptr->flags[2] |= TR2_SEE_INVIS;
2367- LOG_PRINT(L"Adding ability: see invisible\n");
2353+ LOG_PRINT(__T("Adding ability: see invisible\n"));
23682354 }
23692355
23702356 static void add_free_action(artifact_type *a_ptr)
23712357 {
23722358 a_ptr->flags[2] |= TR2_FREE_ACT;
2373- LOG_PRINT(L"Adding ability: free action\n");
2359+ LOG_PRINT(__T("Adding ability: free action\n"));
23742360 }
23752361
23762362 static void add_hold_life(artifact_type *a_ptr)
23772363 {
23782364 a_ptr->flags[2] |= TR2_HOLD_LIFE;
2379- LOG_PRINT(L"Adding ability: hold life\n");
2365+ LOG_PRINT(__T("Adding ability: hold life\n"));
23802366 }
23812367
23822368 static void add_slay(artifact_type *a_ptr, bool brand)
@@ -2401,7 +2387,7 @@
24012387 if (s_ptr->brand && !(a_ptr->flags[0] & s_ptr->slay_flag))
24022388 {
24032389 a_ptr->flags[0] |= s_ptr->slay_flag;
2404- LOG_PRINT1(L"Adding brand: %s\n", s_ptr->brand);
2390+ LOG_PRINT1(__T("Adding brand: %s\n"), s_ptr->brand);
24052391 return;
24062392 }
24072393 }
@@ -2408,7 +2394,7 @@
24082394 else if (!s_ptr->brand && !(a_ptr->flags[0] & s_ptr->slay_flag))
24092395 {
24102396 a_ptr->flags[0] |= s_ptr->slay_flag;
2411- LOG_PRINT1(L"Adding slay: %s\n", s_ptr->desc);
2397+ LOG_PRINT1(__T("Adding slay: %s\n"), s_ptr->desc);
24122398 return;
24132399 }
24142400 count++;
@@ -2418,7 +2404,7 @@
24182404 static void add_bless_weapon(artifact_type *a_ptr)
24192405 {
24202406 a_ptr->flags[2] |= TR2_BLESSED;
2421- LOG_PRINT(L"Adding ability: blessed weapon\n");
2407+ LOG_PRINT(__T("Adding ability: blessed weapon\n"));
24222408 }
24232409
24242410 static void add_damage_dice(artifact_type *a_ptr)
@@ -2427,7 +2413,7 @@
24272413 a_ptr->dd += (byte)randint1(2);
24282414 if (a_ptr->dd > 9)
24292415 a_ptr->dd = 9;
2430- LOG_PRINT1(L"Adding ability: extra damage dice (now %d dice)\n", a_ptr->dd);
2416+ LOG_PRINT1(__T("Adding ability: extra damage dice (now %d dice)\n"), a_ptr->dd);
24312417 }
24322418
24332419 static void add_to_hit(artifact_type *a_ptr, int fixed, int random)
@@ -2437,7 +2423,7 @@
24372423 {
24382424 if (!INHIBIT_STRONG)
24392425 {
2440- LOG_PRINT1(L"Failed to add to-hit, value of %d is too high\n", a_ptr->to_h);
2426+ LOG_PRINT1(__T("Failed to add to-hit, value of %d is too high\n"), a_ptr->to_h);
24412427 return;
24422428 }
24432429 }
@@ -2445,13 +2431,13 @@
24452431 {
24462432 if (!INHIBIT_WEAK)
24472433 {
2448- LOG_PRINT1(L"Failed to add to-hit, value of %d is too high\n", a_ptr->to_h);
2434+ LOG_PRINT1(__T("Failed to add to-hit, value of %d is too high\n"), a_ptr->to_h);
24492435 return;
24502436 }
24512437 }
24522438 a_ptr->to_h += (s16b)(fixed + randint0(random));
24532439 if (a_ptr->to_h > 0) a_ptr->flags[2] |= TR2_SHOW_MODS;
2454- LOG_PRINT1(L"Adding ability: extra to_h (now %+d)\n", a_ptr->to_h);
2440+ LOG_PRINT1(__T("Adding ability: extra to_h (now %+d)\n"), a_ptr->to_h);
24552441 }
24562442
24572443 static void add_to_dam(artifact_type *a_ptr, int fixed, int random)
@@ -2461,7 +2447,7 @@
24612447 {
24622448 if (!INHIBIT_STRONG)
24632449 {
2464- LOG_PRINT1(L"Failed to add to-dam, value of %d is too high\n", a_ptr->to_d);
2450+ LOG_PRINT1(__T("Failed to add to-dam, value of %d is too high\n"), a_ptr->to_d);
24652451 return;
24662452 }
24672453 }
@@ -2469,19 +2455,19 @@
24692455 {
24702456 if (!INHIBIT_WEAK)
24712457 {
2472- LOG_PRINT1(L"Failed to add to-dam, value of %d is too high\n", a_ptr->to_d);
2458+ LOG_PRINT1(__T("Failed to add to-dam, value of %d is too high\n"), a_ptr->to_d);
24732459 return;
24742460 }
24752461 }
24762462 a_ptr->to_d += (s16b)(fixed + randint0(random));
24772463 if (a_ptr->to_d > 0) a_ptr->flags[2] |= TR2_SHOW_MODS;
2478- LOG_PRINT1(L"Adding ability: extra to_dam (now %+d)\n", a_ptr->to_d);
2464+ LOG_PRINT1(__T("Adding ability: extra to_dam (now %+d)\n"), a_ptr->to_d);
24792465 }
24802466
24812467 static void add_aggravation(artifact_type *a_ptr)
24822468 {
24832469 a_ptr->flags[2] |= TR2_AGGRAVATE;
2484- LOG_PRINT(L"Adding aggravation\n");
2470+ LOG_PRINT(__T("Adding aggravation\n"));
24852471 }
24862472
24872473 static void add_to_AC(artifact_type *a_ptr, int fixed, int random)
@@ -2491,7 +2477,7 @@
24912477 {
24922478 if (!INHIBIT_STRONG)
24932479 {
2494- LOG_PRINT1(L"Failed to add to-AC, value of %d is too high\n", a_ptr->to_a);
2480+ LOG_PRINT1(__T("Failed to add to-AC, value of %d is too high\n"), a_ptr->to_a);
24952481 return;
24962482 }
24972483 }
@@ -2499,18 +2485,18 @@
24992485 {
25002486 if (!INHIBIT_WEAK)
25012487 {
2502- LOG_PRINT1(L"Failed to add to-AC, value of %d is too high\n", a_ptr->to_a);
2488+ LOG_PRINT1(__T("Failed to add to-AC, value of %d is too high\n"), a_ptr->to_a);
25032489 return;
25042490 }
25052491 }
25062492 a_ptr->to_a += (s16b)(fixed + randint0(random));
2507- LOG_PRINT1(L"Adding ability: AC bonus (new bonus is %+d)\n", a_ptr->to_a);
2493+ LOG_PRINT1(__T("Adding ability: AC bonus (new bonus is %+d)\n"), a_ptr->to_a);
25082494 }
25092495
25102496 static void add_weight_mod(artifact_type *a_ptr)
25112497 {
25122498 a_ptr->weight = (a_ptr->weight * 9) / 10;
2513- LOG_PRINT1(L"Adding ability: lower weight (new weight is %d)\n", a_ptr->weight);
2499+ LOG_PRINT1(__T("Adding ability: lower weight (new weight is %d)\n"), a_ptr->weight);
25142500 }
25152501
25162502 /*
@@ -2527,25 +2513,25 @@
25272513 case 0:
25282514 {
25292515 a_ptr->flags[1] |= TR1_IM_ACID;
2530- LOG_PRINT(L"Adding ability: immunity to acid\n");
2516+ LOG_PRINT(__T("Adding ability: immunity to acid\n"));
25312517 break;
25322518 }
25332519 case 1:
25342520 {
25352521 a_ptr->flags[1] |= TR1_IM_ELEC;
2536- LOG_PRINT(L"Adding ability: immunity to lightning\n");
2522+ LOG_PRINT(__T("Adding ability: immunity to lightning\n"));
25372523 break;
25382524 }
25392525 case 2:
25402526 {
25412527 a_ptr->flags[1] |= TR1_IM_FIRE;
2542- LOG_PRINT(L"Adding ability: immunity to fire\n");
2528+ LOG_PRINT(__T("Adding ability: immunity to fire\n"));
25432529 break;
25442530 }
25452531 case 3:
25462532 {
25472533 a_ptr->flags[1] |= TR1_IM_COLD;
2548- LOG_PRINT(L"Adding ability: immunity to cold\n");
2534+ LOG_PRINT(__T("Adding ability: immunity to cold\n"));
25492535 break;
25502536 }
25512537 }
@@ -2695,7 +2681,7 @@
26952681
26962682 /* Print out the frequency table, for verification */
26972683 for (i = 0; i < ART_IDX_TOTAL; i++)
2698- LOG_PRINT2(L"Cumulative frequency of ability %d is: %d\n", i, freq[i]);
2684+ LOG_PRINT2(__T("Cumulative frequency of ability %d is: %d\n"), i, freq[i]);
26992685 }
27002686
27012687 /*
@@ -2717,7 +2703,7 @@
27172703 while (r > freq_table[ability])
27182704 ability++;
27192705
2720- LOG_PRINT1(L"Ability chosen was number: %d\n", ability);
2706+ LOG_PRINT1(__T("Ability chosen was number: %d\n"), ability);
27212707 /*
27222708 * The ability variable is now the index of the first value in the table
27232709 * greater than or equal to r, which is what we want.
@@ -3007,13 +2993,13 @@
30072993 {
30082994 a_ptr->dd += 3 + (byte) randint0(4);
30092995 if (a_ptr->dd > 9) a_ptr->dd = 9;
3010- LOG_PRINT1(L"Supercharging damage dice! (Now %d dice)\n", a_ptr->dd);
2996+ LOG_PRINT1(__T("Supercharging damage dice! (Now %d dice)\n"), a_ptr->dd);
30112997 }
30122998 else if (randint0(z_info->a_max) < artprobs[ART_IDX_MELEE_BLOWS_SUPER])
30132999 {
30143000 a_ptr->flags[0] |= TR0_BLOWS;
30153001 a_ptr->pval = 3;
3016- LOG_PRINT(L"Supercharging melee blows! (+3 blows)\n");
3002+ LOG_PRINT(__T("Supercharging melee blows! (+3 blows)\n"));
30173003 }
30183004 }
30193005
@@ -3024,13 +3010,13 @@
30243010 {
30253011 a_ptr->flags[0] |= TR0_SHOTS;
30263012 a_ptr->pval = 3;
3027- LOG_PRINT(L"Supercharging shots for bow! (3 extra shots)\n");
3013+ LOG_PRINT(__T("Supercharging shots for bow! (3 extra shots)\n"));
30283014 }
30293015 else if (randint0(z_info->a_max) < artprobs[ART_IDX_BOW_MIGHT_SUPER])
30303016 {
30313017 a_ptr->flags[0] |= TR0_MIGHT;
30323018 a_ptr->pval = 3;
3033- LOG_PRINT(L"Supercharging might for bow! (3 extra might)\n");
3019+ LOG_PRINT(__T("Supercharging might for bow! (3 extra might)\n"));
30343020 }
30353021 }
30363022
@@ -3040,7 +3026,7 @@
30403026 a_ptr->flags[0] |= TR0_SPEED;
30413027 a_ptr->pval = 7 + (byte) randint0(6);
30423028 if (one_in_(4)) a_ptr->pval += (byte) randint1(4);
3043- LOG_PRINT1(L"Supercharging speed for this item! (New speed bonus is %d)\n", a_ptr->pval);
3029+ LOG_PRINT1(__T("Supercharging speed for this item! (New speed bonus is %d)\n"), a_ptr->pval);
30443030 }
30453031 /* Aggravation */
30463032 if (a_ptr->tval == TV_BOW || a_ptr->tval == TV_DIGGING ||
@@ -3051,7 +3037,7 @@
30513037 (target_power > AGGR_POWER))
30523038 {
30533039 a_ptr->flags[2] |= TR2_AGGRAVATE;
3054- LOG_PRINT(L"Adding aggravation\n");
3040+ LOG_PRINT(__T("Adding aggravation\n"));
30553041 }
30563042 }
30573043 else
@@ -3060,7 +3046,7 @@
30603046 (target_power > AGGR_POWER))
30613047 {
30623048 a_ptr->flags[2] |= TR2_AGGRAVATE;
3063- LOG_PRINT(L"Adding aggravation\n");
3049+ LOG_PRINT(__T("Adding aggravation\n"));
30643050 }
30653051 }
30663052 }
@@ -3131,14 +3117,13 @@
31313117 /* If it has a restricted ability then don't randomize it. */
31323118 if (power > INHIBIT_POWER)
31333119 {
3134- LOG_PRINT1(L"Skipping artifact number %d - too powerful to randomize!", a_idx);
3120+ LOG_PRINT1(__T("Skipping artifact number %d - too powerful to randomize!"), a_idx);
31353121 return;
31363122 }
3137-
31383123 if (power < 0) curse_me = TRUE;
31393124
3140- LOG_PRINT(L"+++++++++++++++++ CREATING NEW ARTIFACT ++++++++++++++++++\n");
3141- LOG_PRINT2(L"Artifact %d: power = %d\n", a_idx, power);
3125+ LOG_PRINT(__T("+++++++++++++++++ CREATING NEW ARTIFACT ++++++++++++++++++\n"));
3126+ LOG_PRINT2(__T("Artifact %d: power = %d\n"), a_idx, power);
31423127
31433128 /*
31443129 * Flip the sign on power if it's negative, since it's only used for base
@@ -3178,7 +3163,7 @@
31783163
31793164 if (power > 0 && power < 10 && count > MAX_TRIES / 2)
31803165 {
3181- LOG_PRINT(L"Cursing base item to help get a match.\n");
3166+ LOG_PRINT(__T("Cursing base item to help get a match.\n"));
31823167 do_curse(a_ptr);
31833168 }
31843169 ap2 = artifact_power(a_idx);
@@ -3190,11 +3175,11 @@
31903175 */
31913176
31923177 /* CC bugfix hacking */
3193- LOG_PRINT2(L"rarity old is %d, base is %d\n", rarity_old, base_rarity_old);
3178+ LOG_PRINT2(__T("rarity old is %d, base is %d\n"), rarity_old, base_rarity_old);
31943179 k_ptr = &k_info[k_idx];
31953180 smeg = 100 / k_ptr->alloc_prob;
31963181 if (smeg < 1) smeg = 1;
3197- LOG_PRINT1(L"k_ptr->alloc_prob is %d\n", k_ptr->alloc_prob);
3182+ LOG_PRINT1(__T("k_ptr->alloc_prob is %d\n"), k_ptr->alloc_prob);
31983183 /* end CC */
31993184 rarity_new = ( (s16b) rarity_old * (s16b) base_rarity_old ) /
32003185 smeg;
@@ -3222,7 +3207,6 @@
32223207 /* Artifacts ignore everything */
32233208 a_ptr->flags[2] = (TR2_IGNORE_MASK);
32243209 }
3225-
32263210 /* Got a base item. */
32273211
32283212 /* Generate the cumulative frequency table for this item type */
@@ -3238,9 +3222,8 @@
32383222 {
32393223 /* too powerful -- put it back */
32403224 *a_ptr = a_old;
3241- LOG_PRINT(L"--- Supercharge is too powerful! Rolling back.\n");
3225+ LOG_PRINT(__T("--- Supercharge is too powerful! Rolling back.\n"));
32423226 }
3243-
32443227 /* First draft: add two abilities, then curse it three times. */
32453228 if (curse_me)
32463229 {
@@ -3260,7 +3243,7 @@
32603243 /* Otherwise go back and try again */
32613244 else
32623245 {
3263- LOG_PRINT(L"Inhibited ability added - rolling back.\n");
3246+ LOG_PRINT(__T("Inhibited ability added - rolling back.\n"));
32643247 *a_ptr = a_old;
32653248 }
32663249 } while (!success);
@@ -3285,7 +3268,7 @@
32853268 {
32863269 /* too powerful -- put it back */
32873270 *a_ptr = a_old;
3288- LOG_PRINT(L"--- Too powerful! Rolling back.\n");
3271+ LOG_PRINT(__T("--- Too powerful! Rolling back.\n"));
32893272 continue;
32903273 }
32913274 else if (ap >= (power * 19) / 20) /* just right */
@@ -3296,11 +3279,10 @@
32963279 || a_ptr->tval == TV_BOW) && (a_ptr->to_d < 10))
32973280 {
32983281 a_ptr->to_d += (byte) randint0(6);
3299- LOG_PRINT1(L"Redeeming crappy weapon: +dam now %d\n", a_ptr->to_d);
3282+ LOG_PRINT1(__T("Redeeming crappy weapon: +dam now %d\n"), a_ptr->to_d);
33003283 }
33013284 break;
33023285 }
3303-
33043286 /* Stop if we're going negative, so we don't overload
33053287 the artifact with great powers to compensate. */
33063288 /* Removed CR 11/10/01 */
@@ -3311,7 +3293,6 @@
33113293 }
33123294 */
33133295 } /* end of power selection */
3314-
33153296 if (verbose && tries >= MAX_TRIES)
33163297 {
33173298 /*
@@ -3319,11 +3300,10 @@
33193300 * iterations. Show a warning message.
33203301 */
33213302 msg_format(__T("Warning! Couldn't get appropriate power level."));
3322- LOG_PRINT(L"Warning! Couldn't get appropriate power level.\n");
3303+ LOG_PRINT(__T("Warning! Couldn't get appropriate power level.\n"));
33233304 message_flush();
33243305 }
33253306 }
3326-
33273307 if (a_ptr->cost < 0) a_ptr->cost = 0;
33283308
33293309 /* Restore some flags */
@@ -3340,8 +3320,8 @@
33403320
33413321 /* Success */
33423322
3343- LOG_PRINT(L">>>>>>>>>>>>>>>>>>>>>>>>>> ARTIFACT COMPLETED <<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n");
3344- LOG_PRINT2(L"Number of tries for artifact %d was: %d\n", a_idx, tries);
3323+ LOG_PRINT(__T(">>>>>>>>>>>>>>>>>>>>>>>>>> ARTIFACT COMPLETED <<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n"));
3324+ LOG_PRINT2(__T("Number of tries for artifact %d was: %d\n"), a_idx, tries);
33453325 }
33463326
33473327 /*
@@ -3386,16 +3366,16 @@
33863366 }
33873367 }
33883368
3389- LOG_PRINT1(L"Deficit amount for swords is %d\n", swords);
3390- LOG_PRINT1(L"Deficit amount for polearms is %d\n", polearms);
3391- LOG_PRINT1(L"Deficit amount for blunts is %d\n", blunts);
3392- LOG_PRINT1(L"Deficit amount for bows is %d\n", bows);
3393- LOG_PRINT1(L"Deficit amount for bodies is %d\n", bodies);
3394- LOG_PRINT1(L"Deficit amount for shields is %d\n", shields);
3395- LOG_PRINT1(L"Deficit amount for cloaks is %d\n", cloaks);
3396- LOG_PRINT1(L"Deficit amount for hats is %d\n", hats);
3397- LOG_PRINT1(L"Deficit amount for gloves is %d\n", gloves);
3398- LOG_PRINT1(L"Deficit amount for boots is %d\n", boots);
3369+ LOG_PRINT1(__T("Deficit amount for swords is %d\n"), swords);
3370+ LOG_PRINT1(__T("Deficit amount for polearms is %d\n"), polearms);
3371+ LOG_PRINT1(__T("Deficit amount for blunts is %d\n"), blunts);
3372+ LOG_PRINT1(__T("Deficit amount for bows is %d\n"), bows);
3373+ LOG_PRINT1(__T("Deficit amount for bodies is %d\n"), bodies);
3374+ LOG_PRINT1(__T("Deficit amount for shields is %d\n"), shields);
3375+ LOG_PRINT1(__T("Deficit amount for cloaks is %d\n"), cloaks);
3376+ LOG_PRINT1(__T("Deficit amount for hats is %d\n"), hats);
3377+ LOG_PRINT1(__T("Deficit amount for gloves is %d\n"), gloves);
3378+ LOG_PRINT1(__T("Deficit amount for boots is %d\n"), boots);
33993379
34003380 if (swords > 0 || polearms > 0 || blunts > 0 || bows > 0 ||
34013381 bodies > 0 || shields > 0 || cloaks > 0 || hats > 0 ||
@@ -3404,20 +3384,20 @@
34043384 if (verbose)
34053385 {
34063386 _TCHAR types[256];
3407- strnfmt(types, _countof(types), L"%s%s%s%s%s%s%s%s%s%s",
3408- swords > 0 ? L" swords" : __T(""),
3409- polearms > 0 ? L" polearms" : __T(""),
3410- blunts > 0 ? L" blunts" : __T(""),
3411- bows > 0 ? L" bows" : __T(""),
3412- bodies > 0 ? L" body-armors" : __T(""),
3413- shields > 0 ? L" shields" : __T(""),
3414- cloaks > 0 ? L" cloaks" : __T(""),
3415- hats > 0 ? L" hats" : __T(""),
3416- gloves > 0 ? L" gloves" : __T(""),
3417- boots > 0 ? L" boots" : __T(""));
3387+ strnfmt(types, _countof(types), __T("%s%s%s%s%s%s%s%s%s%s"),
3388+ swords > 0 ? __T(" swords") : __T(""),
3389+ polearms > 0 ? __T(" polearms") : __T(""),
3390+ blunts > 0 ? __T(" blunts") : __T(""),
3391+ bows > 0 ? __T(" bows") : __T(""),
3392+ bodies > 0 ? __T(" body-armors") : __T(""),
3393+ shields > 0 ? __T(" shields") : __T(""),
3394+ cloaks > 0 ? __T(" cloaks") : __T(""),
3395+ hats > 0 ? __T(" hats") : __T(""),
3396+ gloves > 0 ? __T(" gloves") : __T(""),
3397+ boots > 0 ? __T(" boots") : __T(""));
34183398
34193399 msg_format(__T("Restarting generation process: not enough%s"), types);
3420- LOG_PRINT1(L"Restarting generation process: not enough%s", types);
3400+ LOG_PRINT1(__T("Restarting generation process: not enough%s"), types);
34213401 }
34223402 return FALSE;
34233403 }
@@ -3427,7 +3407,6 @@
34273407 }
34283408 }
34293409
3430-
34313410 static errr scramble(void)
34323411 {
34333412 /* If our artifact set fails to meet certain criteria, we start over. */
@@ -3446,7 +3425,6 @@
34463425 return (0);
34473426 }
34483427
3449-
34503428 static errr do_randart_aux(bool full)
34513429 {
34523430 errr result;
@@ -3459,12 +3437,10 @@
34593437 /* Randomize the artifacts */
34603438 if ((result = scramble()) != 0) return (result);
34613439 }
3462-
34633440 /* Success */
34643441 return (0);
34653442 }
34663443
3467-
34683444 /*
34693445 * Randomize the artifacts
34703446 *
@@ -3493,7 +3469,7 @@
34933469 {
34943470 _TCHAR buf[1024];
34953471 path_build(buf, _countof(buf), ANGBAND_DIR_USER,
3496- L"randart.log");
3472+ __T("randart.log"));
34973473 log_file = file_open(buf, MODE_WRITE, FTYPE_TEXT);
34983474 if (!log_file)
34993475 {
@@ -3501,7 +3477,6 @@
35013477 exit(1);
35023478 }
35033479 }
3504-
35053480 /* Store the original power ratings */
35063481 store_base_power();
35073482
@@ -3508,7 +3483,6 @@
35083483 /* Determine the generation probabilities */
35093484 parse_frequencies();
35103485 }
3511-
35123486 /* Generate the random artifact (names) */
35133487 err = do_randart_aux(full);
35143488
@@ -3529,7 +3503,6 @@
35293503 exit(1);
35303504 }
35313505 }
3532-
35333506 /* Free the "original powers" arrays */
35343507 FREE(base_power);
35353508 FREE(base_item_level);
@@ -3536,7 +3509,6 @@
35363509 FREE(base_item_prob);
35373510 FREE(base_art_rarity);
35383511 }
3539-
35403512 /* When done, resume use of the Angband "complex" RNG. */
35413513 Rand_quick = FALSE;
35423514
--- trunk/JBand/src/defines.h (revision 123)
+++ trunk/JBand/src/defines.h (revision 124)
@@ -1,4 +1,8 @@
11 /* テスト */
2+/*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page.
5+ */
26 /*
37 * File:
48 * Purpose:
@@ -14,10 +18,6 @@
1418 * and not for profit purposes provided that this copyright and statement
1519 * are included in all such copies. Other copyrights may also apply.
1620 */
17-/*
18- * Debug Status: Not checked.
19- * - Fixed __T on this page.
20- */
2121 #ifndef INCLUDED_DEFINES_H
2222 #define INCLUDED_DEFINES_H
2323 /*
--- trunk/JBand/src/cmd2.cpp (revision 123)
+++ trunk/JBand/src/cmd2.cpp (revision 124)
@@ -54,7 +54,7 @@
5454 p_ptr->energy_use = 100;
5555
5656 /* Success */
57- message(MSG_STAIRS_UP, 0, L"You enter a maze of up staircases.");
57+ message(MSG_STAIRS_UP, 0, __T("You enter a maze of up staircases."));
5858
5959 /* Create a way back */
6060 p_ptr->create_up_stair = FALSE;
@@ -255,7 +255,7 @@
255255 if (trap & (CHEST_LOSE_STR))
256256 {
257257 msg_print(__T("A small needle has pricked you!"));
258- take_hit(damroll(1, 4), L"a poison needle");
258+ take_hit(damroll(1, 4), __T("a poison needle"));
259259 (void)do_dec_stat(A_STR, FALSE);
260260 }
261261 /* Lose constitution */
@@ -262,7 +262,7 @@
262262 if (trap & (CHEST_LOSE_CON))
263263 {
264264 msg_print(__T("A small needle has pricked you!"));
265- take_hit(damroll(1, 4), L"a poison needle");
265+ take_hit(damroll(1, 4), __T("a poison needle"));
266266 (void)do_dec_stat(A_CON, FALSE);
267267 }
268268 /* Poison */
@@ -300,7 +300,7 @@
300300 msg_print(__T("There is a sudden explosion!"));
301301 msg_print(__T("Everything inside the chest is destroyed!"));
302302 o_ptr->pval = 0;
303- take_hit(damroll(5, 8), L"an exploding chest");
303+ take_hit(damroll(5, 8), __T("an exploding chest"));
304304 }
305305 }
306306
@@ -344,7 +344,7 @@
344344 /* Success -- May still have traps */
345345 if (randint0(100) < j)
346346 {
347- message(MSG_LOCKPICK, 0, L"You have picked the lock.");
347+ message(MSG_LOCKPICK, 0, __T("You have picked the lock."));
348348 gain_exp(1);
349349 flag = TRUE;
350350 }
@@ -353,7 +353,7 @@
353353 /* We may continue repeating */
354354 more = TRUE;
355355 if (OPT(flush_failure)) flush();
356- message(MSG_LOCKPICK_FAIL, 0, L"You failed to pick the lock.");
356+ message(MSG_LOCKPICK_FAIL, 0, __T("You failed to pick the lock."));
357357 }
358358 }
359359 /* Allowed to open */
@@ -421,7 +421,7 @@
421421 /* Success (get a lot of experience) */
422422 else if (randint0(100) < j)
423423 {
424- message(MSG_DISARM, 0, L"You have disarmed the chest.");
424+ message(MSG_DISARM, 0, __T("You have disarmed the chest."));
425425 gain_exp(o_ptr->pval);
426426 o_ptr->pval = (0 - o_ptr->pval);
427427 }
@@ -587,7 +587,7 @@
587587 (cave_feat[y][x] <= FEAT_DOOR_TAIL)))
588588 {
589589 /* Message */
590- message(MSG_NOTHING_TO_OPEN, 0, L"You see nothing there to open.");
590+ message(MSG_NOTHING_TO_OPEN, 0, __T("You see nothing there to open."));
591591
592592 /* Nope */
593593 return (FALSE);
@@ -644,7 +644,7 @@
644644 if (randint0(100) < j)
645645 {
646646 /* Message */
647- message(MSG_LOCKPICK, 0, L"You have picked the lock.");
647+ message(MSG_LOCKPICK, 0, __T("You have picked the lock."));
648648
649649 /* Open the door */
650650 cave_set_feat(y, x, FEAT_OPEN);
@@ -661,7 +661,7 @@
661661 if (OPT(flush_failure)) flush();
662662
663663 /* Message */
664- message(MSG_LOCKPICK_FAIL, 0, L"You failed to pick the lock.");
664+ message(MSG_LOCKPICK_FAIL, 0, __T("You failed to pick the lock."));
665665
666666 /* We may keep trying */
667667 more = TRUE;
@@ -1257,7 +1257,7 @@
12571257 if (randint0(100) < j)
12581258 {
12591259 /* Message */
1260- message_format(MSG_DISARM, 0, L"You have disarmed the %s.", name);
1260+ message_format(MSG_DISARM, 0, __T("You have disarmed the %s."), name);
12611261
12621262 /* Reward */
12631263 gain_exp(power);
@@ -1458,7 +1458,7 @@
14581458 cave_set_feat(y, x, FEAT_OPEN);
14591459 }
14601460 /* Message */
1461- message(MSG_OPENDOOR, 0, L"The door crashes open!");
1461+ message(MSG_OPENDOOR, 0, __T("The door crashes open!"));
14621462
14631463 /* Update the visuals */
14641464 p_ptr->update |= (PU_UPDATE_VIEW | PU_MONSTERS);
@@ -1818,7 +1818,7 @@
18181818
18191819 /* Message */
18201820 message_format(MSG_AFRAID, 0,
1821- L"You are too afraid to attack %s!", m_name);
1821+ __T("You are too afraid to attack %s!"), m_name);
18221822
18231823 /* Nope */
18241824 return (FALSE);
@@ -1836,7 +1836,7 @@
18361836 if (cave_feat[y][x] == FEAT_RUBBLE)
18371837 {
18381838 /* Message */
1839- message(MSG_HITWALL, 0, L"There is a pile of rubble in the way!");
1839+ message(MSG_HITWALL, 0, __T("There is a pile of rubble in the way!"));
18401840 }
18411841 /* Door */
18421842 else if (cave_feat[y][x] < FEAT_SECRET)
@@ -1845,12 +1845,12 @@
18451845 if (OPT(easy_alter)) return (TRUE);
18461846
18471847 /* Message */
1848- message(MSG_HITWALL, 0, L"There is a door in the way!");
1848+ message(MSG_HITWALL, 0, __T("There is a door in the way!"));
18491849 }
18501850 else /* Wall */
18511851 {
18521852 /* Message */
1853- message(MSG_HITWALL, 0, L"There is a wall in the way!");
1853+ message(MSG_HITWALL, 0, __T("There is a wall in the way!"));
18541854 }
18551855 /* Nope */
18561856 return (FALSE);
--- trunk/JBand/src/player/timed.cpp (revision 123)
+++ trunk/JBand/src/player/timed.cpp (revision 124)
@@ -1,4 +1,8 @@
11 /* テスト */
2+/*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page.
5+ */
26 /*
37 * File: player/timed.c
48 * Purpose: Timed effects handling
@@ -44,87 +48,87 @@
4448
4549 static timed_effect effects[] =
4650 {
47- { L"You feel yourself moving faster!", L"You feel yourself slow down.",
51+ { __T("You feel yourself moving faster!"), __T("You feel yourself slow down."),
4852 NULL, NULL,
4953 0, PU_BONUS, MSG_SPEED },
50- { L"You feel yourself moving slower!", L"You feel yourself speed up.",
54+ { __T("You feel yourself moving slower!"), __T("You feel yourself speed up."),
5155 NULL, NULL,
5256 0, PU_BONUS, MSG_SLOW },
53- { L"You are blind.", L"You blink and your eyes clear.",
57+ { __T("You are blind."), __T("You blink and your eyes clear."),
5458 NULL, NULL,
5559 PR_MAP, PU_FORGET_VIEW | PU_UPDATE_VIEW | PU_MONSTERS, MSG_BLIND },
56- { L"You are paralysed!", L"You can move again.",
57- L"You are more paralysed!", L"You are less paralysed.",
60+ { __T("You are paralysed!"), __T("You can move again."),
61+ __T("You are more paralysed!"), __T("You are less paralysed."),
5862 0, 0, MSG_PARALYZED },
59- { L"You are confused!", L"You are no longer confused.",
60- L"You are more confused!", L"You feel a little less confused.",
63+ { __T("You are confused!"), __T("You are no longer confused."),
64+ __T("You are more confused!"), __T("You feel a little less confused."),
6165 0, 0, MSG_CONFUSED },
62- { L"You are terrified!", L"You feel bolder now.",
63- L"You are more scared!", L"You feel a little less scared.",
66+ { __T("You are terrified!"), __T("You feel bolder now."),
67+ __T("You are more scared!"), __T("You feel a little less scared."),
6468 0, PU_BONUS, MSG_AFRAID },
65- { L"You feel drugged!", L"You can see clearly again.",
66- L"You feel more drugged!", L"You feel less drugged.",
69+ { __T("You feel drugged!"), __T("You can see clearly again."),
70+ __T("You feel more drugged!"), __T("You feel less drugged."),
6771 PR_MAP, 0, MSG_DRUGGED },
68- { L"You are poisoned!", L"You are no longer poisoned.",
69- L"You are more poisoned!", L"You are less poisoned.",
72+ { __T("You are poisoned!"), __T("You are no longer poisoned."),
73+ __T("You are more poisoned!"), __T("You are less poisoned."),
7074 0, 0, MSG_POISONED },
7175 { NULL, NULL, NULL, NULL, 0, 0, 0 }, /* TMD_CUT -- handled seperately */
7276 { NULL, NULL, NULL, NULL, 0, 0, 0 }, /* TMD_STUN -- handled seperately */
73- { L"You feel safe from evil!", L"You no longer feel safe from evil.",
74- L"You feel even safer from evil!", L"You feel less safe from evil.",
77+ { __T("You feel safe from evil!"), __T("You no longer feel safe from evil."),
78+ __T("You feel even safer from evil!"), __T("You feel less safe from evil."),
7579 0, 0, MSG_PROT_EVIL },
76- { L"You feel invulnerable!", L"You feel vulnerable once more.",
80+ { __T("You feel invulnerable!"), __T("You feel vulnerable once more."),
7781 NULL, NULL,
7882 0, PU_BONUS, MSG_INVULN },
79- { L"You feel like a hero!", L"You no longer feel heroic.",
80- L"You feel more like a hero!", L"You feel less heroic.",
83+ { __T("You feel like a hero!"), __T("You no longer feel heroic."),
84+ __T("You feel more like a hero!"), __T("You feel less heroic."),
8185 0, PU_BONUS, MSG_HERO },
82- { L"You feel like a killing machine!", L"You no longer feel berserk.",
83- L"You feel even more berserk!", L"You feel less berserk.",
86+ { __T("You feel like a killing machine!"), __T("You no longer feel berserk."),
87+ __T("You feel even more berserk!"), __T("You feel less berserk."),
8488 0, PU_BONUS, MSG_BERSERK },
85- { L"A mystic shield forms around your body!", L"Your mystic shield crumbles away.",
86- L"The mystic shield strengthens.", L"The mystic shield weakens.",
89+ { __T("A mystic shield forms around your body!"), __T("Your mystic shield crumbles away."),
90+ __T("The mystic shield strengthens."), __T("The mystic shield weakens."),
8791 0, PU_BONUS, MSG_SHIELD },
88- { L"You feel righteous!", L"The prayer has expired.",
89- L"You feel more righteous!", L"You feel less righteous.",
92+ { __T("You feel righteous!"), __T("The prayer has expired."),
93+ __T("You feel more righteous!"), __T("You feel less righteous."),
9094 0, PU_BONUS, MSG_BLESSED },
91- { L"Your eyes feel very sensitive!", L"Your no longer feel so sensitive.",
92- L"Your eyes feel more sensitive!", L"Your eyes feel less sensitive.",
95+ { __T("Your eyes feel very sensitive!"), __T("Your no longer feel so sensitive."),
96+ __T("Your eyes feel more sensitive!"), __T("Your eyes feel less sensitive."),
9397 0, (PU_BONUS | PU_MONSTERS), MSG_SEE_INVIS },
94- { L"Your eyes begin to tingle!", L"Your eyes stop tingling.",
95- L"Your eyes' tingling intensifies.", L"Your eyes tingle less.",
98+ { __T("Your eyes begin to tingle!"), __T("Your eyes stop tingling."),
99+ __T("Your eyes' tingling intensifies."), __T("Your eyes tingle less."),
96100 0, (PU_BONUS | PU_MONSTERS), MSG_INFRARED },
97- { L"You feel resistant to acid!", L"You are no longer resistant to acid.",
98- L"You feel more resistant to acid!", L"You feel less resistant to acid.",
101+ { __T("You feel resistant to acid!"), __T("You are no longer resistant to acid."),
102+ __T("You feel more resistant to acid!"), __T("You feel less resistant to acid."),
99103 PR_STATUS, 0, MSG_RES_ACID },
100- { L"You feel resistant to electricity!", L"You are no longer resistant to electricity.",
101- L"You feel more resistant to electricity!", L"You feel less resistant to electricity.",
104+ { __T("You feel resistant to electricity!"), __T("You are no longer resistant to electricity."),
105+ __T("You feel more resistant to electricity!"), __T("You feel less resistant to electricity."),
102106 PR_STATUS, 0, MSG_RES_ELEC },
103- { L"You feel resistant to fire!", L"You are no longer resistant to fire.",
104- L"You feel more resistant to fire!", L"You feel less resistant to fire.",
107+ { __T("You feel resistant to fire!"), __T("You are no longer resistant to fire."),
108+ __T("You feel more resistant to fire!"), __T("You feel less resistant to fire."),
105109 PR_STATUS, 0, MSG_RES_FIRE },
106- { L"You feel resistant to cold!", L"You are no longer resistant to cold.",
107- L"You feel more resistant to cold!", L"You feel less resistant to cold.",
110+ { __T("You feel resistant to cold!"), __T("You are no longer resistant to cold."),
111+ __T("You feel more resistant to cold!"), __T("You feel less resistant to cold."),
108112 PR_STATUS, 0, MSG_RES_COLD },
109- { L"You feel resistant to poison!", L"You are no longer resistant to poison.",
110- L"You feel more resistant to poison!", L"You feel less resistant to poison.",
113+ { __T("You feel resistant to poison!"), __T("You are no longer resistant to poison."),
114+ __T("You feel more resistant to poison!"), __T("You feel less resistant to poison."),
111115 0, 0, MSG_RES_POIS },
112- { L"You feel resistant to confusion!", L"You are no longer resistant to confusion.",
113- L"You feel more resistant to confusion!", L"You feel less resistant to confusion.",
116+ { __T("You feel resistant to confusion!"), __T("You are no longer resistant to confusion."),
117+ __T("You feel more resistant to confusion!"), __T("You feel less resistant to confusion."),
114118 PR_STATUS, PU_BONUS, 0 },
115- { L"You feel your memories fade.", L"Your memories come flooding back.",
119+ { __T("You feel your memories fade."), __T("Your memories come flooding back."),
116120 NULL, NULL,
117121 0, 0, MSG_GENERIC },
118- { L"Your mind expands.", L"Your horizons are once more limited.",
119- L"Your mind expands further.", NULL,
122+ { __T("Your mind expands."), __T("Your horizons are once more limited."),
123+ __T("Your mind expands further."), NULL,
120124 0, PU_BONUS, MSG_GENERIC },
121- { L"Your skin turns to stone.", L"A fleshy shade returns to your skin.",
125+ { __T("Your skin turns to stone."), __T("A fleshy shade returns to your skin."),
122126 NULL, NULL,
123127 0, PU_BONUS, MSG_GENERIC },
124- { L"You feel the need to run away, and fast!", L"The urge to run dissipates.",
128+ { __T("You feel the need to run away, and fast!"), __T("The urge to run dissipates."),
125129 NULL, NULL,
126130 0, PU_BONUS, MSG_AFRAID },
127- { L"You start sprinting.", L"You suddenly stop sprinting.",
131+ { __T("You start sprinting."), __T("You suddenly stop sprinting."),
128132 NULL, NULL,
129133 0, PU_BONUS, MSG_SPEED },
130134 };
@@ -163,7 +167,6 @@
163167 message(MSG_RECOVER, 0, effect->on_end);
164168 notify = TRUE;
165169 }
166-
167170 /* Turning on, always mention */
168171 else if (p_ptr->timed[idx] == 0)
169172 {
@@ -170,7 +173,6 @@
170173 message(effect->msg, 0, effect->on_begin);
171174 notify = TRUE;
172175 }
173-
174176 else if (notify)
175177 {
176178 /* Decrementing */
@@ -181,7 +183,6 @@
181183 else if (v > p_ptr->timed[idx] && effect->on_decrease)
182184 message(effect->msg, 0, effect->on_increase);
183185 }
184-
185186 /* Use the value */
186187 p_ptr->timed[idx] = v;
187188
@@ -189,7 +190,6 @@
189190 if (idx == TMD_SPRINT && v == 0)
190191 inc_timed(TMD_SLOW, 100, TRUE);
191192
192-
193193 /* Nothing to notice */
194194 if (!notify) return FALSE;
195195
@@ -243,8 +243,6 @@
243243 return set_timed(idx, 0, notify);
244244 }
245245
246-
247-
248246 /*
249247 * Set "p_ptr->timed[TMD_STUN]", notice observable changes
250248 *
@@ -264,49 +262,40 @@
264262 {
265263 old_aux = 3;
266264 }
267-
268265 /* Heavy stun */
269266 else if (p_ptr->timed[TMD_STUN] > 50)
270267 {
271268 old_aux = 2;
272269 }
273-
274270 /* Stun */
275271 else if (p_ptr->timed[TMD_STUN] > 0)
276272 {
277273 old_aux = 1;
278274 }
279-
280- /* None */
281- else
275+ else /* None */
282276 {
283277 old_aux = 0;
284278 }
285-
286279 /* Knocked out */
287280 if (v > 100)
288281 {
289282 new_aux = 3;
290283 }
291-
292284 /* Heavy stun */
293285 else if (v > 50)
294286 {
295287 new_aux = 2;
296288 }
297-
298289 /* Stun */
299290 else if (v > 0)
300291 {
301292 new_aux = 1;
302293 }
303-
304294 /* None */
305295 else
306296 {
307297 new_aux = 0;
308298 }
309-
310299 /* Increase cut */
311300 if (new_aux > old_aux)
312301 {
@@ -316,29 +305,25 @@
316305 /* Stun */
317306 case 1:
318307 {
319- message(MSG_STUN, 0, L"You have been stunned.");
308+ message(MSG_STUN, 0, __T("You have been stunned."));
320309 break;
321310 }
322-
323311 /* Heavy stun */
324312 case 2:
325313 {
326- message(MSG_STUN, 0, L"You have been heavily stunned.");
314+ message(MSG_STUN, 0, __T("You have been heavily stunned."));
327315 break;
328316 }
329-
330317 /* Knocked out */
331318 case 3:
332319 {
333- message(MSG_STUN, 0, L"You have been knocked out.");
320+ message(MSG_STUN, 0, __T("You have been knocked out."));
334321 break;
335322 }
336323 }
337-
338324 /* Notice */
339325 notice = TRUE;
340326 }
341-
342327 /* Decrease cut */
343328 else if (new_aux < old_aux)
344329 {
@@ -348,16 +333,14 @@
348333 /* None */
349334 case 0:
350335 {
351- message(MSG_RECOVER, 0, L"You are no longer stunned.");
336+ message(MSG_RECOVER, 0, __T("You are no longer stunned."));
352337 if (OPT(disturb_state)) disturb(0, 0);
353338 break;
354339 }
355340 }
356-
357341 /* Notice */
358342 notice = TRUE;
359343 }
360-
361344 /* Use the value */
362345 p_ptr->timed[TMD_STUN] = v;
363346
@@ -380,7 +363,6 @@
380363 return (TRUE);
381364 }
382365
383-
384366 /*
385367 * Set "p_ptr->timed[TMD_CUT]", notice observable changes
386368 *
@@ -400,97 +382,79 @@
400382 {
401383 old_aux = 7;
402384 }
403-
404385 /* Deep gash */
405386 else if (p_ptr->timed[TMD_CUT] > 200)
406387 {
407388 old_aux = 6;
408389 }
409-
410390 /* Severe cut */
411391 else if (p_ptr->timed[TMD_CUT] > 100)
412392 {
413393 old_aux = 5;
414394 }
415-
416395 /* Nasty cut */
417396 else if (p_ptr->timed[TMD_CUT] > 50)
418397 {
419398 old_aux = 4;
420399 }
421-
422400 /* Bad cut */
423401 else if (p_ptr->timed[TMD_CUT] > 25)
424402 {
425403 old_aux = 3;
426404 }
427-
428405 /* Light cut */
429406 else if (p_ptr->timed[TMD_CUT] > 10)
430407 {
431408 old_aux = 2;
432409 }
433-
434410 /* Graze */
435411 else if (p_ptr->timed[TMD_CUT] > 0)
436412 {
437413 old_aux = 1;
438414 }
439-
440- /* None */
441- else
415+ else /* None */
442416 {
443417 old_aux = 0;
444418 }
445-
446419 /* Mortal wound */
447420 if (v > 1000)
448421 {
449422 new_aux = 7;
450423 }
451-
452424 /* Deep gash */
453425 else if (v > 200)
454426 {
455427 new_aux = 6;
456428 }
457-
458429 /* Severe cut */
459430 else if (v > 100)
460431 {
461432 new_aux = 5;
462433 }
463-
464434 /* Nasty cut */
465435 else if (v > 50)
466436 {
467437 new_aux = 4;
468438 }
469-
470439 /* Bad cut */
471440 else if (v > 25)
472441 {
473442 new_aux = 3;
474443 }
475-
476444 /* Light cut */
477445 else if (v > 10)
478446 {
479447 new_aux = 2;
480448 }
481-
482449 /* Graze */
483450 else if (v > 0)
484451 {
485452 new_aux = 1;
486453 }
487-
488- /* None */
489- else
454+ else /* None */
490455 {
491456 new_aux = 0;
492457 }
493-
494458 /* Increase cut */
495459 if (new_aux > old_aux)
496460 {
@@ -500,57 +464,49 @@
500464 /* Graze */
501465 case 1:
502466 {
503- message(MSG_CUT, 0, L"You have been given a graze.");
467+ message(MSG_CUT, 0, __T("You have been given a graze."));
504468 break;
505469 }
506-
507470 /* Light cut */
508471 case 2:
509472 {
510- message(MSG_CUT, 0, L"You have been given a light cut.");
473+ message(MSG_CUT, 0, __T("You have been given a light cut."));
511474 break;
512475 }
513-
514476 /* Bad cut */
515477 case 3:
516478 {
517- message(MSG_CUT, 0, L"You have been given a bad cut.");
479+ message(MSG_CUT, 0, __T("You have been given a bad cut."));
518480 break;
519481 }
520-
521482 /* Nasty cut */
522483 case 4:
523484 {
524- message(MSG_CUT, 0, L"You have been given a nasty cut.");
485+ message(MSG_CUT, 0, __T("You have been given a nasty cut."));
525486 break;
526487 }
527-
528488 /* Severe cut */
529489 case 5:
530490 {
531- message(MSG_CUT, 0, L"You have been given a severe cut.");
491+ message(MSG_CUT, 0, __T("You have been given a severe cut."));
532492 break;
533493 }
534-
535494 /* Deep gash */
536495 case 6:
537496 {
538- message(MSG_CUT, 0, L"You have been given a deep gash.");
497+ message(MSG_CUT, 0, __T("You have been given a deep gash."));
539498 break;
540499 }
541-
542500 /* Mortal wound */
543501 case 7:
544502 {
545- message(MSG_CUT, 0, L"You have been given a mortal wound.");
503+ message(MSG_CUT, 0, __T("You have been given a mortal wound."));
546504 break;
547505 }
548506 }
549-
550507 /* Notice */
551508 notice = TRUE;
552509 }
553-
554510 /* Decrease cut */
555511 else if (new_aux < old_aux)
556512 {
@@ -560,16 +516,14 @@
560516 /* None */
561517 case 0:
562518 {
563- message(MSG_RECOVER, 0, L"You are no longer bleeding.");
519+ message(MSG_RECOVER, 0, __T("You are no longer bleeding."));
564520 if (OPT(disturb_state)) disturb(0, 0);
565521 break;
566522 }
567523 }
568-
569524 /* Notice */
570525 notice = TRUE;
571526 }
572-
573527 /* Use the value */
574528 p_ptr->timed[TMD_CUT] = v;
575529
@@ -592,7 +546,6 @@
592546 return (TRUE);
593547 }
594548
595-
596549 /*
597550 * Set "p_ptr->food", notice observable changes
598551 *
@@ -630,73 +583,60 @@
630583 {
631584 old_aux = 0;
632585 }
633-
634586 /* Weak */
635587 else if (p_ptr->food < PY_FOOD_WEAK)
636588 {
637589 old_aux = 1;
638590 }
639-
640591 /* Hungry */
641592 else if (p_ptr->food < PY_FOOD_ALERT)
642593 {
643594 old_aux = 2;
644595 }
645-
646596 /* Normal */
647597 else if (p_ptr->food < PY_FOOD_FULL)
648598 {
649599 old_aux = 3;
650600 }
651-
652601 /* Full */
653602 else if (p_ptr->food < PY_FOOD_MAX)
654603 {
655604 old_aux = 4;
656605 }
657-
658- /* Gorged */
659- else
606+ else /* Gorged */
660607 {
661608 old_aux = 5;
662609 }
663-
664610 /* Fainting / Starving */
665611 if (v < PY_FOOD_FAINT)
666612 {
667613 new_aux = 0;
668614 }
669-
670615 /* Weak */
671616 else if (v < PY_FOOD_WEAK)
672617 {
673618 new_aux = 1;
674619 }
675-
676620 /* Hungry */
677621 else if (v < PY_FOOD_ALERT)
678622 {
679623 new_aux = 2;
680624 }
681-
682625 /* Normal */
683626 else if (v < PY_FOOD_FULL)
684627 {
685628 new_aux = 3;
686629 }
687-
688630 /* Full */
689631 else if (v < PY_FOOD_MAX)
690632 {
691633 new_aux = 4;
692634 }
693-
694635 /* Gorged */
695636 else
696637 {
697638 new_aux = 5;
698639 }
699-
700640 /* Food increase */
701641 if (new_aux > old_aux)
702642 {
@@ -709,7 +649,6 @@
709649 msg_print(__T("You are still weak."));
710650 break;
711651 }
712-
713652 /* Hungry */
714653 case 2:
715654 {
@@ -716,7 +655,6 @@
716655 msg_print(__T("You are still hungry."));
717656 break;
718657 }
719-
720658 /* Normal */
721659 case 3:
722660 {
@@ -723,7 +661,6 @@
723661 msg_print(__T("You are no longer hungry."));
724662 break;
725663 }
726-
727664 /* Full */
728665 case 4:
729666 {
@@ -730,7 +667,6 @@
730667 msg_print(__T("You are full!"));
731668 break;
732669 }
733-
734670 /* Bloated */
735671 case 5:
736672 {
@@ -738,11 +674,9 @@
738674 break;
739675 }
740676 }
741-
742677 /* Change */
743678 notice = TRUE;
744679 }
745-
746680 /* Food decrease */
747681 else if (new_aux < old_aux)
748682 {
@@ -756,7 +690,6 @@
756690 msg_print(__T("You are getting faint from hunger!"));
757691 break;
758692 }
759-
760693 /* Weak */
761694 case 1:
762695 {
@@ -764,7 +697,6 @@
764697 msg_print(__T("You are getting weak from hunger!"));
765698 break;
766699 }
767-
768700 /* Hungry */
769701 case 2:
770702 {
@@ -772,7 +704,6 @@
772704 msg_print(__T("You are getting hungry."));
773705 break;
774706 }
775-
776707 /* Normal */
777708 case 3:
778709 {
@@ -780,7 +711,6 @@
780711 msg_print(__T("You are no longer full."));
781712 break;
782713 }
783-
784714 /* Full */
785715 case 4:
786716 {
@@ -789,7 +719,6 @@
789719 break;
790720 }
791721 }
792-
793722 /* Change */
794723 notice = TRUE;
795724 }
@@ -815,5 +744,3 @@
815744 /* Result */
816745 return (TRUE);
817746 }
818-
819-
--- trunk/JBand/src/player/p-util.cpp (revision 123)
+++ trunk/JBand/src/player/p-util.cpp (revision 124)
@@ -1,4 +1,8 @@
11 /* テスト */
2+/*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page.
5+ */
26 /*
37 * File: player/p-util.c
48 * Purpose:
--- trunk/JBand/src/monster/melee1.cpp (revision 123)
+++ trunk/JBand/src/monster/melee1.cpp (revision 124)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page.
5+ */
6+/*
37 * File: melee1.c
48 * Purpose: Monster attacking code
59 *
@@ -49,7 +53,6 @@
4953 {
5054 while (randint0(100) < 2) max++;
5155 }
52-
5356 /* Critical damage */
5457 if (dam > 45) return (6 + max);
5558 if (dam > 33) return (5 + max);
@@ -83,33 +86,31 @@
8386 */
8487 static const _TCHAR *desc_insult[MAX_DESC_INSULT] =
8588 {
86- L"insults you!",
87- L"insults your mother!",
88- L"gives you the finger!",
89- L"humiliates you!",
90- L"defiles you!",
91- L"dances around you!",
92- L"makes obscene gestures!",
93- L"moons you!!!"
89+ __T("insults you!"),
90+ __T("insults your mother!"),
91+ __T("gives you the finger!"),
92+ __T("humiliates you!"),
93+ __T("defiles you!"),
94+ __T("dances around you!"),
95+ __T("makes obscene gestures!"),
96+ __T("moons you!!!")
9497 };
9598
96-
9799 #define MAX_DESC_MOAN 8
98100
99-
100101 /*
101102 * Hack -- possible "insult" messages
102103 */
103104 static const _TCHAR *desc_moan[MAX_DESC_MOAN] =
104105 {
105- L"wants his mushrooms back.",
106- L"tells you to get off his land.",
107- L"looks for his dogs. ",
108- L"says 'Did you kill my Fang?' ",
109- L"asks 'Do you want to buy any mushrooms?' ",
110- L"seems sad about something.",
111- L"asks if you have seen his dogs.",
112- L"mumbles something about mushrooms."
106+ __T("wants his mushrooms back."),
107+ __T("tells you to get off his land."),
108+ __T("looks for his dogs. "),
109+ __T("says 'Did you kill my Fang?' "),
110+ __T("asks 'Do you want to buy any mushrooms?' "),
111+ __T("seems sad about something."),
112+ __T("asks if you have seen his dogs."),
113+ __T("mumbles something about mushrooms.")
113114 };
114115
115116 /*
@@ -145,7 +146,6 @@
145146 /* Not allowed to attack */
146147 if (r_ptr->flags[0] & (RF0_NEVER_BLOW)) return (FALSE);
147148
148-
149149 /* Total armor */
150150 ac = p_ptr->state.ac + p_ptr->state.to_a;
151151
@@ -152,7 +152,6 @@
152152 /* Extract the effective monster level */
153153 rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
154154
155-
156155 /* Get the monster name (or "it") */
157156 monster_desc(m_name, _countof(m_name), m_ptr, 0);
158157
@@ -180,20 +179,15 @@
180179 int d_dice = r_ptr->blow[ap_cnt].d_dice;
181180 int d_side = r_ptr->blow[ap_cnt].d_side;
182181
183-
184182 /* Hack -- no more attacks */
185183 if (!method) break;
186184
187-
188185 /* Handle "leaving" */
189186 if (p_ptr->leaving) break;
190187
191-
192188 /* Extract visibility (before blink) */
193189 if (m_ptr->ml) visible = TRUE;
194190
195-
196-
197191 /* Extract the attack "power" */
198192 switch (effect)
199193 {
@@ -227,7 +221,6 @@
227221 case RBE_EXP_80: power = 5; break;
228222 case RBE_HALLU: power = 10; break;
229223 }
230-
231224 /* Monster hits player */
232225 if (!effect || check_hit(power, rlev))
233226 {
@@ -234,7 +227,6 @@
234227 /* Always disturbing */
235228 disturb(1, 0);
236229
237-
238230 /* Hack -- Apply "protection from evil" */
239231 if ((p_ptr->timed[TMD_PROTEVIL] > 0) &&
240232 (r_ptr->flags[2] & (RF2_EVIL)) &&
@@ -253,7 +245,6 @@
253245 /* Hack -- Next attack */
254246 continue;
255247 }
256-
257248 /* Assume no cut or stun */
258249 do_cut = do_stun = 0;
259250
@@ -270,7 +261,6 @@
270261 sound_msg = MSG_MON_HIT;
271262 break;
272263 }
273-
274264 case RBM_TOUCH:
275265 {
276266 act = __T("touches you.");
@@ -277,7 +267,6 @@
277267 sound_msg = MSG_MON_TOUCH;
278268 break;
279269 }
280-
281270 case RBM_PUNCH:
282271 {
283272 act = __T("punches you.");
@@ -285,7 +274,6 @@
285274 sound_msg = MSG_MON_PUNCH;
286275 break;
287276 }
288-
289277 case RBM_KICK:
290278 {
291279 act = __T("kicks you.");
@@ -293,7 +281,6 @@
293281 sound_msg = MSG_MON_KICK;
294282 break;
295283 }
296-
297284 case RBM_CLAW:
298285 {
299286 act = __T("claws you.");
@@ -301,7 +288,6 @@
301288 sound_msg = MSG_MON_CLAW;
302289 break;
303290 }
304-
305291 case RBM_BITE:
306292 {
307293 act = __T("bites you.");
@@ -309,7 +295,6 @@
309295 sound_msg = MSG_MON_BITE;
310296 break;
311297 }
312-
313298 case RBM_STING:
314299 {
315300 act = __T("stings you.");
@@ -316,13 +301,11 @@
316301 sound_msg = MSG_MON_STING;
317302 break;
318303 }
319-
320304 case RBM_XXX1:
321305 {
322306 act = __T("XXX1's you.");
323307 break;
324308 }
325-
326309 case RBM_BUTT:
327310 {
328311 act = __T("butts you.");
@@ -330,7 +313,6 @@
330313 sound_msg = MSG_MON_BUTT;
331314 break;
332315 }
333-
334316 case RBM_CRUSH:
335317 {
336318 act = __T("crushes you.");
@@ -338,7 +320,6 @@
338320 sound_msg = MSG_MON_CRUSH;
339321 break;
340322 }
341-
342323 case RBM_ENGULF:
343324 {
344325 act = __T("engulfs you.");
@@ -345,13 +326,11 @@
345326 sound_msg = MSG_MON_ENGULF;
346327 break;
347328 }
348-
349329 case RBM_XXX2:
350330 {
351331 act = __T("XXX2's you.");
352332 break;
353333 }
354-
355334 case RBM_CRAWL:
356335 {
357336 act = __T("crawls on you.");
@@ -358,7 +337,6 @@
358337 sound_msg = MSG_MON_CRAWL;
359338 break;
360339 }
361-
362340 case RBM_DROOL:
363341 {
364342 act = __T("drools on you.");
@@ -365,7 +343,6 @@
365343 sound_msg = MSG_MON_DROOL;
366344 break;
367345 }
368-
369346 case RBM_SPIT:
370347 {
371348 act = __T("spits on you.");
@@ -372,13 +349,11 @@
372349 sound_msg = MSG_MON_SPIT;
373350 break;
374351 }
375-
376352 case RBM_XXX3:
377353 {
378354 act = __T("XXX3's on you.");
379355 break;
380356 }
381-
382357 case RBM_GAZE:
383358 {
384359 act = __T("gazes at you.");
@@ -385,7 +360,6 @@
385360 sound_msg = MSG_MON_GAZE;
386361 break;
387362 }
388-
389363 case RBM_WAIL:
390364 {
391365 act = __T("wails at you.");
@@ -392,7 +366,6 @@
392366 sound_msg = MSG_MON_WAIL;
393367 break;
394368 }
395-
396369 case RBM_SPORE:
397370 {
398371 act = __T("releases spores at you.");
@@ -399,13 +372,11 @@
399372 sound_msg = MSG_MON_SPORE;
400373 break;
401374 }
402-
403375 case RBM_XXX4:
404376 {
405377 act = __T("projects XXX4's at you.");
406378 break;
407379 }
408-
409380 case RBM_BEG:
410381 {
411382 act = __T("begs you for money.");
@@ -412,7 +383,6 @@
412383 sound_msg = MSG_MON_BEG;
413384 break;
414385 }
415-
416386 case RBM_INSULT:
417387 {
418388 act = desc_insult[randint0(MAX_DESC_INSULT)];
@@ -419,7 +389,6 @@
419389 sound_msg = MSG_MON_INSULT;
420390 break;
421391 }
422-
423392 case RBM_MOAN:
424393 {
425394 act = desc_moan[randint0(MAX_DESC_MOAN)];
@@ -433,9 +402,8 @@
433402 break;
434403 }
435404 }
436-
437405 /* Message */
438- if (act) message_format(sound_msg, 0, L"%^s %s", m_name, act);
406+ if (act) message_format(sound_msg, 0, __T("%^s %s"), m_name, act);
439407
440408
441409 /* Hack -- assume all attacks are obvious */
@@ -474,7 +442,6 @@
474442
475443 break;
476444 }
477-
478445 case RBE_POISON:
479446 {
480447 /* Take damage */
@@ -492,13 +459,11 @@
492459 {
493460 object_notice_flag(1, TR1_RES_POIS);
494461 }
495-
496462 /* Learn about the player */
497463 update_smart_learn(m_idx, DRS_RES_POIS);
498464
499465 break;
500466 }
501-
502467 case RBE_UN_BONUS:
503468 {
504469 /* Take damage */
@@ -514,13 +479,11 @@
514479 {
515480 object_notice_flag(1, TR1_RES_DISEN);
516481 }
517-
518482 /* Learn about the player */
519483 update_smart_learn(m_idx, DRS_RES_DISEN);
520484
521485 break;
522486 }
523-
524487 case RBE_UN_POWER:
525488 {
526489 int drained = 0;
@@ -553,7 +516,6 @@
553516 o_ptr->pval = 0;
554517 }
555518 }
556-
557519 if (drained)
558520 {
559521 int heal = rlev * drained;
@@ -582,10 +544,8 @@
582544 break;
583545 }
584546 }
585-
586547 break;
587548 }
588-
589549 case RBE_EAT_GOLD:
590550 {
591551 /* Take damage */
@@ -605,9 +565,7 @@
605565 /* Occasional blink anyway */
606566 if (randint0(3)) blinked = TRUE;
607567 }
608-
609- /* Eat gold */
610- else
568+ else /* Eat gold */
611569 {
612570 gold = (p_ptr->au / 10) + randint1(25);
613571 if (gold < 2) gold = 2;
@@ -635,10 +593,8 @@
635593 /* Blink away */
636594 blinked = TRUE;
637595 }
638-
639596 break;
640597 }
641-
642598 case RBE_EAT_ITEM:
643599 {
644600 /* Take damage */
@@ -661,7 +617,6 @@
661617 /* Done */
662618 break;
663619 }
664-
665620 /* Find an item */
666621 for (k = 0; k < 10; k++)
667622 {
@@ -685,7 +640,7 @@
685640
686641 /* Message */
687642 msg_format(__T("%sour %s (%c) was stolen!"),
688- ((o_ptr->number > 1) ? L"One of y" : L"Y"),
643+ ((o_ptr->number > 1) ? __T("One of y") : __T("Y")),
689644 o_name, index_to_label(i));
690645
691646 /* Get local object */
@@ -719,10 +674,8 @@
719674 /* Done */
720675 break;
721676 }
722-
723677 break;
724678 }
725-
726679 case RBE_EAT_FOOD:
727680 {
728681 /* Take damage */
@@ -748,7 +701,7 @@
748701
749702 /* Message */
750703 msg_format(__T("%sour %s (%c) was eaten!"),
751- ((o_ptr->number > 1) ? L"One of y" : L"Y"),
704+ ((o_ptr->number > 1) ? __T("One of y") : __T("Y")),
752705 o_name, index_to_label(i));
753706
754707 /* Steal the items */
@@ -761,10 +714,8 @@
761714 /* Done */
762715 break;
763716 }
764-
765717 break;
766718 }
767-
768719 case RBE_EAT_LITE:
769720 {
770721 u32b f[OBJ_FLAG_N];
@@ -793,10 +744,8 @@
793744 /* Redraw stuff */
794745 p_ptr->redraw |= (PR_EQUIP);
795746 }
796-
797747 break;
798748 }
799-
800749 case RBE_ACID:
801750 {
802751 /* Obvious */
@@ -813,7 +762,6 @@
813762
814763 break;
815764 }
816-
817765 case RBE_ELEC:
818766 {
819767 /* Obvious */
@@ -830,7 +778,6 @@
830778
831779 break;
832780 }
833-
834781 case RBE_FIRE:
835782 {
836783 /* Obvious */
@@ -847,7 +794,6 @@
847794
848795 break;
849796 }
850-
851797 case RBE_COLD:
852798 {
853799 /* Obvious */
@@ -864,7 +810,6 @@
864810
865811 break;
866812 }
867-
868813 case RBE_BLIND:
869814 {
870815 /* Take damage */
@@ -882,13 +827,11 @@
882827 {
883828 object_notice_flag(1, TR1_RES_BLIND);
884829 }
885-
886830 /* Learn about the player */
887831 update_smart_learn(m_idx, DRS_RES_BLIND);
888832
889833 break;
890834 }
891-
892835 case RBE_CONFUSE:
893836 {
894837 /* Take damage */
@@ -906,13 +849,11 @@
906849 {
907850 object_notice_flag(1, TR1_RES_CONFU);
908851 }
909-
910852 /* Learn about the player */
911853 update_smart_learn(m_idx, DRS_RES_CONFU);
912854
913855 break;
914856 }
915-
916857 case RBE_TERRIFY:
917858 {
918859 /* Take damage */
@@ -941,7 +882,6 @@
941882
942883 break;
943884 }
944-
945885 case RBE_PARALYZE:
946886 {
947887 /* Hack -- Prevent perma-paralysis via damage */
@@ -973,7 +913,6 @@
973913
974914 break;
975915 }
976-
977916 case RBE_LOSE_STR:
978917 {
979918 /* Take damage */
@@ -984,7 +923,6 @@
984923
985924 break;
986925 }
987-
988926 case RBE_LOSE_INT:
989927 {
990928 /* Take damage */
@@ -995,7 +933,6 @@
995933
996934 break;
997935 }
998-
999936 case RBE_LOSE_WIS:
1000937 {
1001938 /* Take damage */
@@ -1006,7 +943,6 @@
1006943
1007944 break;
1008945 }
1009-
1010946 case RBE_LOSE_DEX:
1011947 {
1012948 /* Take damage */
@@ -1017,7 +953,6 @@
1017953
1018954 break;
1019955 }
1020-
1021956 case RBE_LOSE_CON:
1022957 {
1023958 /* Take damage */
@@ -1028,7 +963,6 @@
1028963
1029964 break;
1030965 }
1031-
1032966 case RBE_LOSE_CHR:
1033967 {
1034968 /* Take damage */
@@ -1039,7 +973,6 @@
1039973
1040974 break;
1041975 }
1042-
1043976 case RBE_LOSE_ALL:
1044977 {
1045978 /* Take damage */
@@ -1055,7 +988,6 @@
1055988
1056989 break;
1057990 }
1058-
1059991 case RBE_SHATTER:
1060992 {
1061993 /* Obvious */
@@ -1082,7 +1014,6 @@
10821014 }
10831015 break;
10841016 }
1085-
10861017 case RBE_EXP_10:
10871018 {
10881019 /* Obvious */
@@ -1113,7 +1044,6 @@
11131044 }
11141045 break;
11151046 }
1116-
11171047 case RBE_EXP_20:
11181048 {
11191049 /* Obvious */
@@ -1145,7 +1075,6 @@
11451075 }
11461076 break;
11471077 }
1148-
11491078 case RBE_EXP_40:
11501079 {
11511080 /* Obvious */
@@ -1177,7 +1106,6 @@
11771106 }
11781107 break;
11791108 }
1180-
11811109 case RBE_EXP_80:
11821110 {
11831111 /* Obvious */
@@ -1209,7 +1137,6 @@
12091137 }
12101138 break;
12111139 }
1212-
12131140 case RBE_HALLU:
12141141 {
12151142 /* Take damage */
@@ -1234,8 +1161,6 @@
12341161 break;
12351162 }
12361163 }
1237-
1238-
12391164 /* Hack -- only one of cut or stun */
12401165 if (do_cut && do_stun)
12411166 {
@@ -1251,7 +1176,6 @@
12511176 do_stun = 0;
12521177 }
12531178 }
1254-
12551179 /* Handle cut */
12561180 if (do_cut)
12571181 {
@@ -1272,11 +1196,9 @@
12721196 case 6: k = 300; break;
12731197 default: k = 500; break;
12741198 }
1275-
12761199 /* Apply the cut */
12771200 if (k) (void)inc_timed(TMD_CUT, k, TRUE);
12781201 }
1279-
12801202 /* Handle stun */
12811203 if (do_stun)
12821204 {
@@ -1297,14 +1219,11 @@
12971219 case 6: k = 100; break;
12981220 default: k = 200; break;
12991221 }
1300-
13011222 /* Apply the stun */
13021223 if (k) (void)inc_timed(TMD_STUN, k, TRUE);
13031224 }
13041225 }
1305-
1306- /* Monster missed player */
1307- else
1226+ else /* Monster missed player */
13081227 {
13091228 /* Analyze failed attacks */
13101229 switch (method)
@@ -1331,12 +1250,9 @@
13311250 /* Message */
13321251 msg_format(__T("%^s misses you."), m_name);
13331252 }
1334-
13351253 break;
13361254 }
13371255 }
1338-
1339-
13401256 /* Analyze "visible" monsters only */
13411257 if (visible)
13421258 {
@@ -1350,11 +1266,9 @@
13501266 }
13511267 }
13521268 }
1353-
13541269 /* Skip the other blows if necessary */
13551270 if (do_break) break;
13561271 }
1357-
13581272 /* Blink away */
13591273 if (blinked)
13601274 {
@@ -1361,13 +1275,11 @@
13611275 msg_print(__T("There is a puff of smoke!"));
13621276 teleport_away(m_idx, MAX_SIGHT * 2 + 5);
13631277 }
1364-
13651278 /* Always notice cause of death */
13661279 if (p_ptr->is_dead && (l_ptr->deaths < MAX_SHORT))
13671280 {
13681281 l_ptr->deaths++;
13691282 }
1370-
13711283 /* Assume we attacked */
13721284 return (TRUE);
13731285 }
--- trunk/JBand/src/monster/monster1.cpp (revision 123)
+++ trunk/JBand/src/monster/monster1.cpp (revision 124)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page.
5+ */
6+/*
37 * File: monster1.c
48 * Purpose: Monster description code.
59 *
@@ -28,8 +32,8 @@
2832 /*
2933 * Pronoun arrays, by gender.
3034 */
31-static const _TCHAR *wd_he[3] = { L"it", L"he", L"she" };
32-static const _TCHAR *wd_his[3] = { L"its", L"his", L"her" };
35+static const _TCHAR *wd_he[3] = { __T("it"), __T("he"), __T("she") };
36+static const _TCHAR *wd_his[3] = { __T("its"), __T("his"), __T("her") };
3337
3438 /*
3539 * Pluralizer. Args(count, singular, plural)
@@ -40,12 +44,12 @@
4044 static void output_list(const _TCHAR *list[], int num, byte attr)
4145 {
4246 int i;
43- const _TCHAR *conjunction = L"and ";
47+ const _TCHAR *conjunction = __T("and ");
4448
4549 if (num < 0)
4650 {
4751 num = -num;
48- conjunction = L"or ";
52+ conjunction = __T("or ");
4953 }
5054
5155 for (i = 0; i < num; i++)
@@ -53,9 +57,9 @@
5357 if (i)
5458 {
5559 if (num > 2)
56- text_out(L", ");
60+ text_out(__T(", "));
5761 else
58- text_out(L" ");
62+ text_out(__T(" "));
5963
6064 if (i == num - 1)
6165 text_out(conjunction);
@@ -77,7 +81,7 @@
7781 output_list(list, n, attr);
7882
7983 /* Output end */
80- text_out(L". ");
84+ text_out(__T(". "));
8185 }
8286 }
8387
@@ -145,10 +149,9 @@
145149 static void describe_monster_desc(int r_idx)
146150 {
147151 const monster_race *r_ptr = &r_info[r_idx];
148- text_out(L"%s\n", r_text + r_ptr->text);
152+ text_out(__T("%s\n"), r_text + r_ptr->text);
149153 }
150154
151-
152155 static void describe_monster_spells(int r_idx, const monster_lore *l_ptr)
153156 {
154157 const monster_race *r_ptr = &r_info[r_idx];
@@ -166,45 +169,44 @@
166169
167170 /* Collect innate attacks */
168171 vn = 0;
169- if (l_ptr->spell_flags[0] & RSF0_SHRIEK) vp[vn++] = L"shriek for help";
170- if (l_ptr->spell_flags[0] & RSF0_XXX2) vp[vn++] = L"do something";
171- if (l_ptr->spell_flags[0] & RSF0_XXX3) vp[vn++] = L"do something";
172- if (l_ptr->spell_flags[0] & RSF0_XXX4) vp[vn++] = L"do something";
173- if (l_ptr->spell_flags[0] & RSF0_ARROW_1) vp[vn++] = L"fire an arrow";
174- if (l_ptr->spell_flags[0] & RSF0_ARROW_2) vp[vn++] = L"fire arrows";
175- if (l_ptr->spell_flags[0] & RSF0_ARROW_3) vp[vn++] = L"fire a missile";
176- if (l_ptr->spell_flags[0] & RSF0_ARROW_4) vp[vn++] = L"fire missiles";
177- if (l_ptr->spell_flags[0] & RSF0_BOULDER) vp[vn++] = L"throw boulders";
172+ if (l_ptr->spell_flags[0] & RSF0_SHRIEK) vp[vn++] = __T("shriek for help");
173+ if (l_ptr->spell_flags[0] & RSF0_XXX2) vp[vn++] = __T("do something");
174+ if (l_ptr->spell_flags[0] & RSF0_XXX3) vp[vn++] = __T("do something");
175+ if (l_ptr->spell_flags[0] & RSF0_XXX4) vp[vn++] = __T("do something");
176+ if (l_ptr->spell_flags[0] & RSF0_ARROW_1) vp[vn++] = __T("fire an arrow");
177+ if (l_ptr->spell_flags[0] & RSF0_ARROW_2) vp[vn++] = __T("fire arrows");
178+ if (l_ptr->spell_flags[0] & RSF0_ARROW_3) vp[vn++] = __T("fire a missile");
179+ if (l_ptr->spell_flags[0] & RSF0_ARROW_4) vp[vn++] = __T("fire missiles");
180+ if (l_ptr->spell_flags[0] & RSF0_BOULDER) vp[vn++] = __T("throw boulders");
178181
179182 /* Describe innate attacks */
180- output_desc_list(msex, L"may", vp, -vn, TERM_WHITE);
183+ output_desc_list(msex, __T("may"), vp, -vn, TERM_WHITE);
181184
182-
183185 /* Collect breaths */
184186 vn = 0;
185- if (l_ptr->spell_flags[0] & RSF0_BR_ACID) vp[vn++] = L"acid";
186- if (l_ptr->spell_flags[0] & RSF0_BR_ELEC) vp[vn++] = L"lightning";
187- if (l_ptr->spell_flags[0] & RSF0_BR_FIRE) vp[vn++] = L"fire";
188- if (l_ptr->spell_flags[0] & RSF0_BR_COLD) vp[vn++] = L"frost";
189- if (l_ptr->spell_flags[0] & RSF0_BR_POIS) vp[vn++] = L"poison";
190- if (l_ptr->spell_flags[0] & RSF0_BR_NETH) vp[vn++] = L"nether";
191- if (l_ptr->spell_flags[0] & RSF0_BR_LITE) vp[vn++] = L"light";
192- if (l_ptr->spell_flags[0] & RSF0_BR_DARK) vp[vn++] = L"darkness";
193- if (l_ptr->spell_flags[0] & RSF0_BR_CONF) vp[vn++] = L"confusion";
194- if (l_ptr->spell_flags[0] & RSF0_BR_SOUN) vp[vn++] = L"sound";
195- if (l_ptr->spell_flags[0] & RSF0_BR_CHAO) vp[vn++] = L"chaos";
196- if (l_ptr->spell_flags[0] & RSF0_BR_DISE) vp[vn++] = L"disenchantment";
197- if (l_ptr->spell_flags[0] & RSF0_BR_NEXU) vp[vn++] = L"nexus";
198- if (l_ptr->spell_flags[0] & RSF0_BR_TIME) vp[vn++] = L"time";
199- if (l_ptr->spell_flags[0] & RSF0_BR_INER) vp[vn++] = L"inertia";
200- if (l_ptr->spell_flags[0] & RSF0_BR_GRAV) vp[vn++] = L"gravity";
201- if (l_ptr->spell_flags[0] & RSF0_BR_SHAR) vp[vn++] = L"shards";
202- if (l_ptr->spell_flags[0] & RSF0_BR_PLAS) vp[vn++] = L"plasma";
203- if (l_ptr->spell_flags[0] & RSF0_BR_WALL) vp[vn++] = L"force";
204- if (l_ptr->spell_flags[0] & RSF0_BR_MANA) vp[vn++] = L"mana";
205- if (l_ptr->spell_flags[0] & RSF0_XXX5) vp[vn++] = L"something";
206- if (l_ptr->spell_flags[0] & RSF0_XXX6) vp[vn++] = L"something";
207- if (l_ptr->spell_flags[0] & RSF0_XXX7) vp[vn++] = L"something";
187+ if (l_ptr->spell_flags[0] & RSF0_BR_ACID) vp[vn++] = __T("acid");
188+ if (l_ptr->spell_flags[0] & RSF0_BR_ELEC) vp[vn++] = __T("lightning");
189+ if (l_ptr->spell_flags[0] & RSF0_BR_FIRE) vp[vn++] = __T("fire");
190+ if (l_ptr->spell_flags[0] & RSF0_BR_COLD) vp[vn++] = __T("frost");
191+ if (l_ptr->spell_flags[0] & RSF0_BR_POIS) vp[vn++] = __T("poison");
192+ if (l_ptr->spell_flags[0] & RSF0_BR_NETH) vp[vn++] = __T("nether");
193+ if (l_ptr->spell_flags[0] & RSF0_BR_LITE) vp[vn++] = __T("light");
194+ if (l_ptr->spell_flags[0] & RSF0_BR_DARK) vp[vn++] = __T("darkness");
195+ if (l_ptr->spell_flags[0] & RSF0_BR_CONF) vp[vn++] = __T("confusion");
196+ if (l_ptr->spell_flags[0] & RSF0_BR_SOUN) vp[vn++] = __T("sound");
197+ if (l_ptr->spell_flags[0] & RSF0_BR_CHAO) vp[vn++] = __T("chaos");
198+ if (l_ptr->spell_flags[0] & RSF0_BR_DISE) vp[vn++] = __T("disenchantment");
199+ if (l_ptr->spell_flags[0] & RSF0_BR_NEXU) vp[vn++] = __T("nexus");
200+ if (l_ptr->spell_flags[0] & RSF0_BR_TIME) vp[vn++] = __T("time");
201+ if (l_ptr->spell_flags[0] & RSF0_BR_INER) vp[vn++] = __T("inertia");
202+ if (l_ptr->spell_flags[0] & RSF0_BR_GRAV) vp[vn++] = __T("gravity");
203+ if (l_ptr->spell_flags[0] & RSF0_BR_SHAR) vp[vn++] = __T("shards");
204+ if (l_ptr->spell_flags[0] & RSF0_BR_PLAS) vp[vn++] = __T("plasma");
205+ if (l_ptr->spell_flags[0] & RSF0_BR_WALL) vp[vn++] = __T("force");
206+ if (l_ptr->spell_flags[0] & RSF0_BR_MANA) vp[vn++] = __T("mana");
207+ if (l_ptr->spell_flags[0] & RSF0_XXX5) vp[vn++] = __T("something");
208+ if (l_ptr->spell_flags[0] & RSF0_XXX6) vp[vn++] = __T("something");
209+ if (l_ptr->spell_flags[0] & RSF0_XXX7) vp[vn++] = __T("something");
208210
209211 /* Describe breaths */
210212 if (vn)
@@ -213,78 +215,76 @@
213215 breath = TRUE;
214216
215217 /* Display */
216- text_out(L"%^s may ", wd_he[msex]);
217- text_out_c(TERM_L_RED, L"breathe ");
218+ text_out(__T("%^s may "), wd_he[msex]);
219+ text_out_c(TERM_L_RED, __T("breathe "));
218220 output_list(vp, -vn, TERM_WHITE);
219221 }
220-
221-
222222 /* Collect spells */
223223 vn = 0;
224- if (l_ptr->spell_flags[1] & RSF1_BA_ACID) vp[vn++] = L"produce acid balls";
225- if (l_ptr->spell_flags[1] & RSF1_BA_ELEC) vp[vn++] = L"produce lightning balls";
226- if (l_ptr->spell_flags[1] & RSF1_BA_FIRE) vp[vn++] = L"produce fire balls";
227- if (l_ptr->spell_flags[1] & RSF1_BA_COLD) vp[vn++] = L"produce frost balls";
228- if (l_ptr->spell_flags[1] & RSF1_BA_POIS) vp[vn++] = L"produce poison balls";
229- if (l_ptr->spell_flags[1] & RSF1_BA_NETH) vp[vn++] = L"produce nether balls";
230- if (l_ptr->spell_flags[1] & RSF1_BA_WATE) vp[vn++] = L"produce water balls";
231- if (l_ptr->spell_flags[1] & RSF1_BA_MANA) vp[vn++] = L"invoke mana storms";
232- if (l_ptr->spell_flags[1] & RSF1_BA_DARK) vp[vn++] = L"invoke darkness storms";
233- if (l_ptr->spell_flags[1] & RSF1_DRAIN_MANA) vp[vn++] = L"drain mana";
234- if (l_ptr->spell_flags[1] & RSF1_MIND_BLAST) vp[vn++] = L"cause mind blasting";
235- if (l_ptr->spell_flags[1] & RSF1_BRAIN_SMASH) vp[vn++] = L"cause brain smashing";
236- if (l_ptr->spell_flags[1] & RSF1_CAUSE_1) vp[vn++] = L"cause light wounds";
237- if (l_ptr->spell_flags[1] & RSF1_CAUSE_2) vp[vn++] = L"cause serious wounds";
238- if (l_ptr->spell_flags[1] & RSF1_CAUSE_3) vp[vn++] = L"cause critical wounds";
239- if (l_ptr->spell_flags[1] & RSF1_CAUSE_4) vp[vn++] = L"cause mortal wounds";
240- if (l_ptr->spell_flags[1] & RSF1_BO_ACID) vp[vn++] = L"produce acid bolts";
241- if (l_ptr->spell_flags[1] & RSF1_BO_ELEC) vp[vn++] = L"produce lightning bolts";
242- if (l_ptr->spell_flags[1] & RSF1_BO_FIRE) vp[vn++] = L"produce fire bolts";
243- if (l_ptr->spell_flags[1] & RSF1_BO_COLD) vp[vn++] = L"produce frost bolts";
244- if (l_ptr->spell_flags[1] & RSF1_BO_POIS) vp[vn++] = L"produce poison bolts";
245- if (l_ptr->spell_flags[1] & RSF1_BO_NETH) vp[vn++] = L"produce nether bolts";
246- if (l_ptr->spell_flags[1] & RSF1_BO_WATE) vp[vn++] = L"produce water bolts";
247- if (l_ptr->spell_flags[1] & RSF1_BO_MANA) vp[vn++] = L"produce mana bolts";
248- if (l_ptr->spell_flags[1] & RSF1_BO_PLAS) vp[vn++] = L"produce plasma bolts";
249- if (l_ptr->spell_flags[1] & RSF1_BO_ICEE) vp[vn++] = L"produce ice bolts";
250- if (l_ptr->spell_flags[1] & RSF1_MISSILE) vp[vn++] = L"produce magic missiles";
251- if (l_ptr->spell_flags[1] & RSF1_SCARE) vp[vn++] = L"terrify";
252- if (l_ptr->spell_flags[1] & RSF1_BLIND) vp[vn++] = L"blind";
253- if (l_ptr->spell_flags[1] & RSF1_CONF) vp[vn++] = L"confuse";
254- if (l_ptr->spell_flags[1] & RSF1_SLOW) vp[vn++] = L"slow";
255- if (l_ptr->spell_flags[1] & RSF1_HOLD) vp[vn++] = L"paralyze";
256- if (l_ptr->spell_flags[2] & RSF2_HASTE) vp[vn++] = L"haste-self";
257- if (l_ptr->spell_flags[2] & RSF2_XXX1) vp[vn++] = L"do something";
258- if (l_ptr->spell_flags[2] & RSF2_HEAL) vp[vn++] = L"heal-self";
259- if (l_ptr->spell_flags[2] & RSF2_XXX2) vp[vn++] = L"do something";
260- if (l_ptr->spell_flags[2] & RSF2_BLINK) vp[vn++] = L"blink-self";
261- if (l_ptr->spell_flags[2] & RSF2_TPORT) vp[vn++] = L"teleport-self";
262- if (l_ptr->spell_flags[2] & RSF2_XXX3) vp[vn++] = L"do something";
263- if (l_ptr->spell_flags[2] & RSF2_XXX4) vp[vn++] = L"do something";
264- if (l_ptr->spell_flags[2] & RSF2_TELE_TO) vp[vn++] = L"teleport to";
265- if (l_ptr->spell_flags[2] & RSF2_TELE_AWAY) vp[vn++] = L"teleport away";
266- if (l_ptr->spell_flags[2] & RSF2_TELE_LEVEL) vp[vn++] = L"teleport level";
267- if (l_ptr->spell_flags[2] & RSF2_XXX5) vp[vn++] = L"do something";
268- if (l_ptr->spell_flags[2] & RSF2_DARKNESS) vp[vn++] = L"create darkness";
269- if (l_ptr->spell_flags[2] & RSF2_TRAPS) vp[vn++] = L"create traps";
270- if (l_ptr->spell_flags[2] & RSF2_FORGET) vp[vn++] = L"cause amnesia";
271- if (l_ptr->spell_flags[2] & RSF2_XXX6) vp[vn++] = L"do something";
272- if (l_ptr->spell_flags[2] & RSF2_S_KIN) vp[vn++] = L"summon similar monsters";
273- if (l_ptr->spell_flags[2] & RSF2_S_MONSTER) vp[vn++] = L"summon a monster";
274- if (l_ptr->spell_flags[2] & RSF2_S_MONSTERS) vp[vn++] = L"summon monsters";
275- if (l_ptr->spell_flags[2] & RSF2_S_ANIMAL) vp[vn++] = L"summon animals";
276- if (l_ptr->spell_flags[2] & RSF2_S_SPIDER) vp[vn++] = L"summon spiders";
277- if (l_ptr->spell_flags[2] & RSF2_S_HOUND) vp[vn++] = L"summon hounds";
278- if (l_ptr->spell_flags[2] & RSF2_S_HYDRA) vp[vn++] = L"summon hydras";
279- if (l_ptr->spell_flags[2] & RSF2_S_ANGEL) vp[vn++] = L"summon an angel";
280- if (l_ptr->spell_flags[2] & RSF2_S_DEMON) vp[vn++] = L"summon a demon";
281- if (l_ptr->spell_flags[2] & RSF2_S_UNDEAD) vp[vn++] = L"summon an undead";
282- if (l_ptr->spell_flags[2] & RSF2_S_DRAGON) vp[vn++] = L"summon a dragon";
283- if (l_ptr->spell_flags[2] & RSF2_S_HI_UNDEAD) vp[vn++] = L"summon greater undead";
284- if (l_ptr->spell_flags[2] & RSF2_S_HI_DRAGON) vp[vn++] = L"summon ancient dragons";
285- if (l_ptr->spell_flags[2] & RSF2_S_HI_DEMON) vp[vn++] = L"summon greater demons";
286- if (l_ptr->spell_flags[2] & RSF2_S_WRAITH) vp[vn++] = L"summon ringwraiths";
287- if (l_ptr->spell_flags[2] & RSF2_S_UNIQUE) vp[vn++] = L"summon uniques";
224+ if (l_ptr->spell_flags[1] & RSF1_BA_ACID) vp[vn++] = __T("produce acid balls");
225+ if (l_ptr->spell_flags[1] & RSF1_BA_ELEC) vp[vn++] = __T("produce lightning balls");
226+ if (l_ptr->spell_flags[1] & RSF1_BA_FIRE) vp[vn++] = __T("produce fire balls");
227+ if (l_ptr->spell_flags[1] & RSF1_BA_COLD) vp[vn++] = __T("produce frost balls");
228+ if (l_ptr->spell_flags[1] & RSF1_BA_POIS) vp[vn++] = __T("produce poison balls");
229+ if (l_ptr->spell_flags[1] & RSF1_BA_NETH) vp[vn++] = __T("produce nether balls");
230+ if (l_ptr->spell_flags[1] & RSF1_BA_WATE) vp[vn++] = __T("produce water balls");
231+ if (l_ptr->spell_flags[1] & RSF1_BA_MANA) vp[vn++] = __T("invoke mana storms");
232+ if (l_ptr->spell_flags[1] & RSF1_BA_DARK) vp[vn++] = __T("invoke darkness storms");
233+ if (l_ptr->spell_flags[1] & RSF1_DRAIN_MANA) vp[vn++] = __T("drain mana");
234+ if (l_ptr->spell_flags[1] & RSF1_MIND_BLAST) vp[vn++] = __T("cause mind blasting");
235+ if (l_ptr->spell_flags[1] & RSF1_BRAIN_SMASH) vp[vn++] = __T("cause brain smashing");
236+ if (l_ptr->spell_flags[1] & RSF1_CAUSE_1) vp[vn++] = __T("cause light wounds");
237+ if (l_ptr->spell_flags[1] & RSF1_CAUSE_2) vp[vn++] = __T("cause serious wounds");
238+ if (l_ptr->spell_flags[1] & RSF1_CAUSE_3) vp[vn++] = __T("cause critical wounds");
239+ if (l_ptr->spell_flags[1] & RSF1_CAUSE_4) vp[vn++] = __T("cause mortal wounds");
240+ if (l_ptr->spell_flags[1] & RSF1_BO_ACID) vp[vn++] = __T("produce acid bolts");
241+ if (l_ptr->spell_flags[1] & RSF1_BO_ELEC) vp[vn++] = __T("produce lightning bolts");
242+ if (l_ptr->spell_flags[1] & RSF1_BO_FIRE) vp[vn++] = __T("produce fire bolts");
243+ if (l_ptr->spell_flags[1] & RSF1_BO_COLD) vp[vn++] = __T("produce frost bolts");
244+ if (l_ptr->spell_flags[1] & RSF1_BO_POIS) vp[vn++] = __T("produce poison bolts");
245+ if (l_ptr->spell_flags[1] & RSF1_BO_NETH) vp[vn++] = __T("produce nether bolts");
246+ if (l_ptr->spell_flags[1] & RSF1_BO_WATE) vp[vn++] = __T("produce water bolts");
247+ if (l_ptr->spell_flags[1] & RSF1_BO_MANA) vp[vn++] = __T("produce mana bolts");
248+ if (l_ptr->spell_flags[1] & RSF1_BO_PLAS) vp[vn++] = __T("produce plasma bolts");
249+ if (l_ptr->spell_flags[1] & RSF1_BO_ICEE) vp[vn++] = __T("produce ice bolts");
250+ if (l_ptr->spell_flags[1] & RSF1_MISSILE) vp[vn++] = __T("produce magic missiles");
251+ if (l_ptr->spell_flags[1] & RSF1_SCARE) vp[vn++] = __T("terrify");
252+ if (l_ptr->spell_flags[1] & RSF1_BLIND) vp[vn++] = __T("blind");
253+ if (l_ptr->spell_flags[1] & RSF1_CONF) vp[vn++] = __T("confuse");
254+ if (l_ptr->spell_flags[1] & RSF1_SLOW) vp[vn++] = __T("slow");
255+ if (l_ptr->spell_flags[1] & RSF1_HOLD) vp[vn++] = __T("paralyze");
256+ if (l_ptr->spell_flags[2] & RSF2_HASTE) vp[vn++] = __T("haste-self");
257+ if (l_ptr->spell_flags[2] & RSF2_XXX1) vp[vn++] = __T("do something");
258+ if (l_ptr->spell_flags[2] & RSF2_HEAL) vp[vn++] = __T("heal-self");
259+ if (l_ptr->spell_flags[2] & RSF2_XXX2) vp[vn++] = __T("do something");
260+ if (l_ptr->spell_flags[2] & RSF2_BLINK) vp[vn++] = __T("blink-self");
261+ if (l_ptr->spell_flags[2] & RSF2_TPORT) vp[vn++] = __T("teleport-self");
262+ if (l_ptr->spell_flags[2] & RSF2_XXX3) vp[vn++] = __T("do something");
263+ if (l_ptr->spell_flags[2] & RSF2_XXX4) vp[vn++] = __T("do something");
264+ if (l_ptr->spell_flags[2] & RSF2_TELE_TO) vp[vn++] = __T("teleport to");
265+ if (l_ptr->spell_flags[2] & RSF2_TELE_AWAY) vp[vn++] = __T("teleport away");
266+ if (l_ptr->spell_flags[2] & RSF2_TELE_LEVEL) vp[vn++] = __T("teleport level");
267+ if (l_ptr->spell_flags[2] & RSF2_XXX5) vp[vn++] = __T("do something");
268+ if (l_ptr->spell_flags[2] & RSF2_DARKNESS) vp[vn++] = __T("create darkness");
269+ if (l_ptr->spell_flags[2] & RSF2_TRAPS) vp[vn++] = __T("create traps");
270+ if (l_ptr->spell_flags[2] & RSF2_FORGET) vp[vn++] = __T("cause amnesia");
271+ if (l_ptr->spell_flags[2] & RSF2_XXX6) vp[vn++] = __T("do something");
272+ if (l_ptr->spell_flags[2] & RSF2_S_KIN) vp[vn++] = __T("summon similar monsters");
273+ if (l_ptr->spell_flags[2] & RSF2_S_MONSTER) vp[vn++] = __T("summon a monster");
274+ if (l_ptr->spell_flags[2] & RSF2_S_MONSTERS) vp[vn++] = __T("summon monsters");
275+ if (l_ptr->spell_flags[2] & RSF2_S_ANIMAL) vp[vn++] = __T("summon animals");
276+ if (l_ptr->spell_flags[2] & RSF2_S_SPIDER) vp[vn++] = __T("summon spiders");
277+ if (l_ptr->spell_flags[2] & RSF2_S_HOUND) vp[vn++] = __T("summon hounds");
278+ if (l_ptr->spell_flags[2] & RSF2_S_HYDRA) vp[vn++] = __T("summon hydras");
279+ if (l_ptr->spell_flags[2] & RSF2_S_ANGEL) vp[vn++] = __T("summon an angel");
280+ if (l_ptr->spell_flags[2] & RSF2_S_DEMON) vp[vn++] = __T("summon a demon");
281+ if (l_ptr->spell_flags[2] & RSF2_S_UNDEAD) vp[vn++] = __T("summon an undead");
282+ if (l_ptr->spell_flags[2] & RSF2_S_DRAGON) vp[vn++] = __T("summon a dragon");
283+ if (l_ptr->spell_flags[2] & RSF2_S_HI_UNDEAD) vp[vn++] = __T("summon greater undead");
284+ if (l_ptr->spell_flags[2] & RSF2_S_HI_DRAGON) vp[vn++] = __T("summon ancient dragons");
285+ if (l_ptr->spell_flags[2] & RSF2_S_HI_DEMON) vp[vn++] = __T("summon greater demons");
286+ if (l_ptr->spell_flags[2] & RSF2_S_WRAITH) vp[vn++] = __T("summon ringwraiths");
287+ if (l_ptr->spell_flags[2] & RSF2_S_UNIQUE) vp[vn++] = __T("summon uniques");
288288
289289 /* Describe spells */
290290 if (vn)
@@ -294,19 +294,19 @@
294294
295295 /* Intro */
296296 if (breath)
297- text_out(L", and is also ");
297+ text_out(__T(", and is also "));
298298 else
299- text_out(L"%^s is ", wd_he[msex]);
299+ text_out(__T("%^s is "), wd_he[msex]);
300300
301301 /* Verb Phrase */
302- text_out_c(TERM_L_RED, L"magical");
303- text_out(L", casting spells");
302+ text_out_c(TERM_L_RED, __T("magical"));
303+ text_out(__T(", casting spells"));
304304
305305 /* Adverb */
306- if (l_ptr->flags[1] & RF1_SMART) text_out(L" intelligently");
306+ if (l_ptr->flags[1] & RF1_SMART) text_out(__T(" intelligently"));
307307
308308 /* List */
309- text_out(L" which ");
309+ text_out(__T(" which "));
310310 output_list(vp, -vn, TERM_WHITE);
311311 }
312312
@@ -323,10 +323,10 @@
323323 /* Describe the spell frequency */
324324 if (m > 100)
325325 {
326- text_out(L"; ");
327- text_out_c(TERM_L_GREEN, L"1");
328- text_out(L" time in ");
329- text_out_c(TERM_L_GREEN, L"%d", 100 / n);
326+ text_out(__T("; "));
327+ text_out_c(TERM_L_GREEN, __T("1"));
328+ text_out(__T(" time in "));
329+ text_out_c(TERM_L_GREEN, __T("%d"), 100 / n);
330330 }
331331
332332 /* Guess at the frequency */
@@ -333,14 +333,14 @@
333333 else if (m)
334334 {
335335 n = ((n + 9) / 10) * 10;
336- text_out(L"; about ");
337- text_out_c(TERM_L_GREEN, L"1");
338- text_out(L" time in ");
339- text_out_c(TERM_L_GREEN, L"%d", 100 / n);
336+ text_out(__T("; about "));
337+ text_out_c(TERM_L_GREEN, __T("1"));
338+ text_out(__T(" time in "));
339+ text_out_c(TERM_L_GREEN, __T("%d"), 100 / n);
340340 }
341341
342342 /* End this sentence */
343- text_out(L". ");
343+ text_out(__T(". "));
344344 }
345345 }
346346
@@ -363,20 +363,20 @@
363363 if (l_ptr->drop_gold || l_ptr->drop_item)
364364 {
365365 /* Intro */
366- text_out(L"%^s may carry", wd_he[msex]);
366+ text_out(__T("%^s may carry"), wd_he[msex]);
367367
368368 /* Count maximum drop */
369369 n = MAX(l_ptr->drop_gold, l_ptr->drop_item);
370370
371371 /* Count drops */
372- if (n == 1) text_out(L" a single ");
373- else if (n == 2) text_out(L" one or two ");
372+ if (n == 1) text_out(__T(" a single "));
373+ else if (n == 2) text_out(__T(" one or two "));
374374 else text_out(format(__T(" up to %d "), n));
375375
376376
377377 /* Quality */
378- if (l_ptr->flags[0] & RF0_DROP_GREAT) text_out(L"exceptional ");
379- else if (l_ptr->flags[0] & RF0_DROP_GOOD) text_out(L"good ");
378+ if (l_ptr->flags[0] & RF0_DROP_GREAT) text_out(__T("exceptional "));
379+ else if (l_ptr->flags[0] & RF0_DROP_GOOD) text_out(__T("good "));
380380
381381
382382 /* Objects */
@@ -383,10 +383,10 @@
383383 if (l_ptr->drop_item)
384384 {
385385 /* Dump "object(s)" */
386- text_out(L"object%s", PLURAL(n));
386+ text_out(__T("object%s"), PLURAL(n));
387387
388388 /* Add conjunction if also dropping gold */
389- if (l_ptr->drop_gold) text_out(L" or ");
389+ if (l_ptr->drop_gold) text_out(__T(" or "));
390390 }
391391
392392 /* Treasures */
@@ -393,11 +393,11 @@
393393 if (l_ptr->drop_gold)
394394 {
395395 /* Dump "treasure(s)" */
396- text_out(L"treasure%s", PLURAL(n));
396+ text_out(__T("treasure%s"), PLURAL(n));
397397 }
398398
399399 /* End this sentence */
400- text_out(L". ");
400+ text_out(__T(". "));
401401 }
402402 }
403403
@@ -551,7 +551,6 @@
551551 if (r_ptr->flags[0] & RF0_FEMALE) msex = 2;
552552 else if (r_ptr->flags[0] & RF0_MALE) msex = 1;
553553
554-
555554 /* Count the number of "known" attacks */
556555 for (n = 0, m = 0; m < MONSTER_BLOW_MAX; m++)
557556 {
@@ -561,7 +560,6 @@
561560 /* Count known attacks */
562561 if (l_ptr->blows[m]) n++;
563562 }
564-
565563 /* Examine (and count) the actual attacks */
566564 for (r = 0, m = 0; m < MONSTER_BLOW_MAX; m++)
567565 {
@@ -572,7 +570,6 @@
572570 /* Skip unknown and undefined attacks */
573571 if (!r_ptr->blow[m].method || !l_ptr->blows[m]) continue;
574572
575-
576573 /* Extract the attack info */
577574 method = r_ptr->blow[m].method;
578575 effect = r_ptr->blow[m].effect;
@@ -579,35 +576,34 @@
579576 d1 = r_ptr->blow[m].d_dice;
580577 d2 = r_ptr->blow[m].d_side;
581578
582-
583579 /* Get the method */
584580 switch (method)
585581 {
586- case RBM_HIT: p = L"hit"; break;
587- case RBM_TOUCH: p = L"touch"; break;
588- case RBM_PUNCH: p = L"punch"; break;
589- case RBM_KICK: p = L"kick"; break;
590- case RBM_CLAW: p = L"claw"; break;
591- case RBM_BITE: p = L"bite"; break;
592- case RBM_STING: p = L"sting"; break;
593- case RBM_BUTT: p = L"butt"; break;
594- case RBM_CRUSH: p = L"crush"; break;
595- case RBM_ENGULF: p = L"engulf"; break;
596- case RBM_CRAWL: p = L"crawl on you"; break;
597- case RBM_DROOL: p = L"drool on you"; break;
598- case RBM_SPIT: p = L"spit"; break;
599- case RBM_GAZE: p = L"gaze"; break;
600- case RBM_WAIL: p = L"wail"; break;
601- case RBM_SPORE: p = L"release spores"; break;
602- case RBM_BEG: p = L"beg"; break;
603- case RBM_INSULT: p = L"insult"; break;
604- case RBM_MOAN: p = L"moan"; break;
582+ case RBM_HIT: p = __T("hit"); break;
583+ case RBM_TOUCH: p = __T("touch"); break;
584+ case RBM_PUNCH: p = __T("punch"); break;
585+ case RBM_KICK: p = __T("kick"); break;
586+ case RBM_CLAW: p = __T("claw"); break;
587+ case RBM_BITE: p = __T("bite"); break;
588+ case RBM_STING: p = __T("sting"); break;
589+ case RBM_BUTT: p = __T("butt"); break;
590+ case RBM_CRUSH: p = __T("crush"); break;
591+ case RBM_ENGULF: p = __T("engulf"); break;
592+ case RBM_CRAWL: p = __T("crawl on you"); break;
593+ case RBM_DROOL: p = __T("drool on you"); break;
594+ case RBM_SPIT: p = __T("spit"); break;
595+ case RBM_GAZE: p = __T("gaze"); break;
596+ case RBM_WAIL: p = __T("wail"); break;
597+ case RBM_SPORE: p = __T("release spores"); break;
598+ case RBM_BEG: p = __T("beg"); break;
599+ case RBM_INSULT: p = __T("insult"); break;
600+ case RBM_MOAN: p = __T("moan"); break;
605601 case RBM_XXX1:
606602 case RBM_XXX2:
607603 case RBM_XXX3:
608604 case RBM_XXX4:
609605 case RBM_XXX5:
610- default: p = L"do something weird";
606+ default: p = __T("do something weird");
611607 }
612608
613609
@@ -647,11 +643,11 @@
647643
648644 /* Introduce the attack description */
649645 if (!r)
650- text_out(L"%^s can ", wd_he[msex]);
646+ text_out(__T("%^s can "), wd_he[msex]);
651647 else if (r < n - 1)
652- text_out(L", ");
648+ text_out(__T(", "));
653649 else
654- text_out(L", and ");
650+ text_out(__T(", and "));
655651
656652 /* Describe the method */
657653 text_out(p);
@@ -660,14 +656,14 @@
660656 if (q)
661657 {
662658 /* Describe the attack type */
663- text_out(L" to ");
664- text_out_c(color_special[effect], L"%s", q);
659+ text_out(__T(" to "));
660+ text_out_c(color_special[effect], __T("%s"), q);
665661
666662 /* Describe damage (if known) */
667663 if (d1 && d2 && know_damage(r_idx, l_ptr, m))
668664 {
669- text_out(L" with damage ");
670- text_out_c(TERM_L_GREEN, L"%dd%d", d1, d2);
665+ text_out(__T(" with damage "));
666+ text_out_c(TERM_L_GREEN, __T("%dd%d"), d1, d2);
671667 }
672668 }
673669
@@ -677,15 +673,15 @@
677673
678674 /* Finish sentence above */
679675 if (r)
680- text_out(L". ");
676+ text_out(__T(". "));
681677
682678 /* Notice lack of attacks */
683679 else if (l_ptr->flags[0] & RF0_NEVER_BLOW)
684- text_out(L"%^s has no physical attacks. ", wd_he[msex]);
680+ text_out(__T("%^s has no physical attacks. "), wd_he[msex]);
685681
686682 /* Or describe the lack of knowledge */
687683 else
688- text_out(L"Nothing is known about %s attack. ", wd_his[msex]);
684+ text_out(__T("Nothing is known about %s attack. "), wd_his[msex]);
689685 }
690686
691687
@@ -710,47 +706,47 @@
710706
711707 /* Collect special abilities. */
712708 vn = 0;
713- if (l_ptr->flags[1] & RF1_OPEN_DOOR) vp[vn++] = L"open doors";
714- if (l_ptr->flags[1] & RF1_BASH_DOOR) vp[vn++] = L"bash down doors";
715- if (l_ptr->flags[1] & RF1_PASS_WALL) vp[vn++] = L"pass through walls";
716- if (l_ptr->flags[1] & RF1_KILL_WALL) vp[vn++] = L"bore through walls";
717- if (l_ptr->flags[1] & RF1_MOVE_BODY) vp[vn++] = L"push past weaker monsters";
718- if (l_ptr->flags[1] & RF1_KILL_BODY) vp[vn++] = L"destroy weaker monsters";
719- if (l_ptr->flags[1] & RF1_TAKE_ITEM) vp[vn++] = L"pick up objects";
720- if (l_ptr->flags[1] & RF1_KILL_ITEM) vp[vn++] = L"destroy objects";
709+ if (l_ptr->flags[1] & RF1_OPEN_DOOR) vp[vn++] = __T("open doors");
710+ if (l_ptr->flags[1] & RF1_BASH_DOOR) vp[vn++] = __T("bash down doors");
711+ if (l_ptr->flags[1] & RF1_PASS_WALL) vp[vn++] = __T("pass through walls");
712+ if (l_ptr->flags[1] & RF1_KILL_WALL) vp[vn++] = __T("bore through walls");
713+ if (l_ptr->flags[1] & RF1_MOVE_BODY) vp[vn++] = __T("push past weaker monsters");
714+ if (l_ptr->flags[1] & RF1_KILL_BODY) vp[vn++] = __T("destroy weaker monsters");
715+ if (l_ptr->flags[1] & RF1_TAKE_ITEM) vp[vn++] = __T("pick up objects");
716+ if (l_ptr->flags[1] & RF1_KILL_ITEM) vp[vn++] = __T("destroy objects");
721717
722718 /* Describe special abilities. */
723- output_desc_list(msex, L"can", vp, vn, TERM_WHITE);
719+ output_desc_list(msex, __T("can"), vp, vn, TERM_WHITE);
724720
725721
726722 /* Describe detection traits */
727723 vn = 0;
728- if (l_ptr->flags[1] & RF1_INVISIBLE) vp[vn++] = L"invisible";
729- if (l_ptr->flags[1] & RF1_COLD_BLOOD) vp[vn++] = L"cold blooded";
730- if (l_ptr->flags[1] & RF1_EMPTY_MIND) vp[vn++] = L"not detected by telepathy";
731- if (l_ptr->flags[1] & RF1_WEIRD_MIND) vp[vn++] = L"rarely detected by telepathy";
724+ if (l_ptr->flags[1] & RF1_INVISIBLE) vp[vn++] = __T("invisible");
725+ if (l_ptr->flags[1] & RF1_COLD_BLOOD) vp[vn++] = __T("cold blooded");
726+ if (l_ptr->flags[1] & RF1_EMPTY_MIND) vp[vn++] = __T("not detected by telepathy");
727+ if (l_ptr->flags[1] & RF1_WEIRD_MIND) vp[vn++] = __T("rarely detected by telepathy");
732728
733- output_desc_list(msex, L"is", vp, vn, TERM_WHITE);
729+ output_desc_list(msex, __T("is"), vp, vn, TERM_WHITE);
734730
735731
736732 /* Describe special things */
737733 if (l_ptr->flags[1] & RF1_MULTIPLY)
738- text_out(L"%^s breeds explosively. ", wd_he[msex]);
734+ text_out(__T("%^s breeds explosively. "), wd_he[msex]);
739735 if (l_ptr->flags[1] & RF1_REGENERATE)
740- text_out(L"%^s regenerates quickly. ", wd_he[msex]);
736+ text_out(__T("%^s regenerates quickly. "), wd_he[msex]);
741737
742738
743739 /* Collect susceptibilities */
744740 vn = 0;
745- if (l_ptr->flags[2] & RF2_HURT_ROCK) vp[vn++] = L"rock remover";
746- if (l_ptr->flags[2] & RF2_HURT_LITE) vp[vn++] = L"bright light";
747- if (l_ptr->flags[2] & RF2_HURT_FIRE) vp[vn++] = L"fire";
748- if (l_ptr->flags[2] & RF2_HURT_COLD) vp[vn++] = L"cold";
741+ if (l_ptr->flags[2] & RF2_HURT_ROCK) vp[vn++] = __T("rock remover");
742+ if (l_ptr->flags[2] & RF2_HURT_LITE) vp[vn++] = __T("bright light");
743+ if (l_ptr->flags[2] & RF2_HURT_FIRE) vp[vn++] = __T("fire");
744+ if (l_ptr->flags[2] & RF2_HURT_COLD) vp[vn++] = __T("cold");
749745
750746 if (vn)
751747 {
752748 /* Output connecting text */
753- text_out(L"%^s is hurt by ", wd_he[msex]);
749+ text_out(__T("%^s is hurt by "), wd_he[msex]);
754750 output_list(vp, vn, TERM_YELLOW);
755751 prev = TRUE;
756752 }
@@ -757,24 +753,24 @@
757753
758754 /* Collect immunities and resistances */
759755 vn = 0;
760- if (l_ptr->flags[2] & RF2_IM_ACID) vp[vn++] = L"acid";
761- if (l_ptr->flags[2] & RF2_IM_ELEC) vp[vn++] = L"lightning";
762- if (l_ptr->flags[2] & RF2_IM_FIRE) vp[vn++] = L"fire";
763- if (l_ptr->flags[2] & RF2_IM_COLD) vp[vn++] = L"cold";
764- if (l_ptr->flags[2] & RF2_IM_POIS) vp[vn++] = L"poison";
765- if (l_ptr->flags[2] & RF2_IM_WATER) vp[vn++] = L"water";
766- if (l_ptr->flags[2] & RF2_RES_NETH) vp[vn++] = L"nether";
767- if (l_ptr->flags[2] & RF2_RES_PLAS) vp[vn++] = L"plasma";
768- if (l_ptr->flags[2] & RF2_RES_NEXUS) vp[vn++] = L"nexus";
769- if (l_ptr->flags[2] & RF2_RES_DISE) vp[vn++] = L"disenchantment";
756+ if (l_ptr->flags[2] & RF2_IM_ACID) vp[vn++] = __T("acid");
757+ if (l_ptr->flags[2] & RF2_IM_ELEC) vp[vn++] = __T("lightning");
758+ if (l_ptr->flags[2] & RF2_IM_FIRE) vp[vn++] = __T("fire");
759+ if (l_ptr->flags[2] & RF2_IM_COLD) vp[vn++] = __T("cold");
760+ if (l_ptr->flags[2] & RF2_IM_POIS) vp[vn++] = __T("poison");
761+ if (l_ptr->flags[2] & RF2_IM_WATER) vp[vn++] = __T("water");
762+ if (l_ptr->flags[2] & RF2_RES_NETH) vp[vn++] = __T("nether");
763+ if (l_ptr->flags[2] & RF2_RES_PLAS) vp[vn++] = __T("plasma");
764+ if (l_ptr->flags[2] & RF2_RES_NEXUS) vp[vn++] = __T("nexus");
765+ if (l_ptr->flags[2] & RF2_RES_DISE) vp[vn++] = __T("disenchantment");
770766
771767 if (vn)
772768 {
773769 /* Output connecting text */
774770 if (prev)
775- text_out(L", but resists ");
771+ text_out(__T(", but resists "));
776772 else
777- text_out(L"%^s resists ", wd_he[msex]);
773+ text_out(__T("%^s resists "), wd_he[msex]);
778774
779775 /* Write the text */
780776 output_list(vp, vn, TERM_ORANGE);
@@ -783,18 +779,18 @@
783779
784780 /* Collect non-effects */
785781 vn = 0;
786- if (l_ptr->flags[2] & RF2_NO_STUN) vp[vn++] = L"stunned";
787- if (l_ptr->flags[2] & RF2_NO_FEAR) vp[vn++] = L"frightened";
788- if (l_ptr->flags[2] & RF2_NO_CONF) vp[vn++] = L"confused";
789- if (l_ptr->flags[2] & RF2_NO_SLEEP) vp[vn++] = L"slept";
782+ if (l_ptr->flags[2] & RF2_NO_STUN) vp[vn++] = __T("stunned");
783+ if (l_ptr->flags[2] & RF2_NO_FEAR) vp[vn++] = __T("frightened");
784+ if (l_ptr->flags[2] & RF2_NO_CONF) vp[vn++] = __T("confused");
785+ if (l_ptr->flags[2] & RF2_NO_SLEEP) vp[vn++] = __T("slept");
790786
791787 if (vn)
792788 {
793789 /* Output connecting text */
794790 if (prev)
795- text_out(L", and cannot be ");
791+ text_out(__T(", and cannot be "));
796792 else
797- text_out(L"%^s cannot be ", wd_he[msex]);
793+ text_out(__T("%^s cannot be "), wd_he[msex]);
798794
799795 output_list(vp, -vn, TERM_ORANGE);
800796 prev = TRUE;
@@ -802,7 +798,7 @@
802798
803799
804800 /* Full stop. */
805- if (prev) text_out(L". ");
801+ if (prev) text_out(__T(". "));
806802
807803
808804 /* Do we know how aware it is? */
@@ -824,25 +820,24 @@
824820 else if (r_ptr->sleep > 0) act = __T("is vigilant for");
825821 else act = __T("is ever vigilant for");
826822
827- text_out(L"%^s %s intruders, which %s may notice from ", wd_he[msex], act, wd_he[msex]);
828- text_out_c(TERM_L_GREEN, L"%d", 10 * r_ptr->aaf);
829- text_out(L" feet. ");
823+ text_out(__T("%^s %s intruders, which %s may notice from "), wd_he[msex], act, wd_he[msex]);
824+ text_out_c(TERM_L_GREEN, __T("%d"), 10 * r_ptr->aaf);
825+ text_out(__T(" feet. "));
830826 }
831827
832828 /* Describe escorts */
833829 if ((l_ptr->flags[0] & (RF0_ESCORT | RF0_ESCORTS)))
834830 {
835- text_out(L"%^s usually appears with escorts. ", wd_he[msex]);
831+ text_out(__T("%^s usually appears with escorts. "), wd_he[msex]);
836832 }
837833
838834 /* Describe friends */
839835 else if ((l_ptr->flags[0] & (RF0_FRIEND | RF0_FRIENDS)))
840836 {
841- text_out(L"%^s usually appears in groups. ", wd_he[msex]);
837+ text_out(__T("%^s usually appears in groups. "), wd_he[msex]);
842838 }
843839 }
844840
845-
846841 /*
847842 * Describe how often the monster has killed/been killed.
848843 */
@@ -870,22 +865,22 @@
870865 if (l_ptr->deaths)
871866 {
872867 /* Killed ancestors */
873- text_out(L"%^s has slain %d of your ancestors", wd_he[msex], l_ptr->deaths);
868+ text_out(__T("%^s has slain %d of your ancestors"), wd_he[msex], l_ptr->deaths);
874869
875870
876871 /* But we've also killed it */
877872 if (dead)
878- text_out(L", but you have taken revenge! ");
873+ text_out(__T(", but you have taken revenge! "));
879874
880875 /* Unavenged (ever) */
881876 else
882- text_out(L", who remain%s unavenged. ", PLURAL(l_ptr->deaths));
877+ text_out(__T(", who remain%s unavenged. "), PLURAL(l_ptr->deaths));
883878 }
884879
885880 /* Dead unique who never hurt us */
886881 else if (dead)
887882 {
888- text_out(L"You have slain this foe. ");
883+ text_out(__T("You have slain this foe. "));
889884 }
890885 else
891886 {
@@ -898,13 +893,13 @@
898893 else if (l_ptr->deaths)
899894 {
900895 /* Dead ancestors */
901- text_out(L"%d of your ancestors %s been killed by this creature, ",
902- l_ptr->deaths, plural(l_ptr->deaths, L"has", L"have"));
896+ text_out(__T("%d of your ancestors %s been killed by this creature, "),
897+ l_ptr->deaths, plural(l_ptr->deaths, __T("has"), __T("have")));
903898
904899 /* Some kills this life */
905900 if (l_ptr->pkills)
906901 {
907- text_out(L"and you have exterminated at least %d of the creatures. ",
902+ text_out(__T("and you have exterminated at least %d of the creatures. "),
908903 l_ptr->pkills);
909904 }
910905
@@ -911,25 +906,21 @@
911906 /* Some kills past lives */
912907 else if (l_ptr->tkills)
913908 {
914- text_out(L"and %s have exterminated at least %d of the creatures. ",
915- L"your ancestors", l_ptr->tkills);
909+ text_out(__T("and %s have exterminated at least %d of the creatures. "),
910+ __T("your ancestors"), l_ptr->tkills);
916911 }
917-
918- /* No kills */
919- else
912+ else /* No kills */
920913 {
921- text_out_c(TERM_RED, L"and %s is not ever known to have been defeated. ",
914+ text_out_c(TERM_RED, __T("and %s is not ever known to have been defeated. "),
922915 wd_he[msex]);
923916 }
924917 }
925-
926- /* Normal monsters */
927- else
918+ else /* Normal monsters */
928919 {
929920 /* Killed some this life */
930921 if (l_ptr->pkills)
931922 {
932- text_out(L"You have killed at least %d of these creatures. ",
923+ text_out(__T("You have killed at least %d of these creatures. "),
933924 l_ptr->pkills);
934925 }
935926
@@ -936,7 +927,7 @@
936927 /* Killed some last life */
937928 else if (l_ptr->tkills)
938929 {
939- text_out(L"Your ancestors have killed at least %d of these creatures. ",
930+ text_out(__T("Your ancestors have killed at least %d of these creatures. "),
940931 l_ptr->tkills);
941932 }
942933
@@ -943,12 +934,12 @@
943934 /* Killed none */
944935 else
945936 {
946- text_out(L"No battles to the death are recalled. ");
937+ text_out(__T("No battles to the death are recalled. "));
947938 }
948939 }
949940
950941 /* Separate */
951- if (out) text_out(L"\n");
942+ if (out) text_out(__T("\n"));
952943 }
953944
954945
@@ -965,21 +956,20 @@
965956 if (r_ptr->flags[0] & RF0_FEMALE) msex = 2;
966957 else if (r_ptr->flags[0] & RF0_MALE) msex = 1;
967958
968-
969959 /* Describe monster "toughness" */
970960 if (know_armour(r_idx, l_ptr))
971961 {
972962 /* Armor */
973- text_out(L"%^s has an armor rating of ", wd_he[msex]);
974- text_out_c(TERM_L_GREEN, L"%d", r_ptr->ac);
975- text_out(L", and a");
963+ text_out(__T("%^s has an armor rating of "), wd_he[msex]);
964+ text_out_c(TERM_L_GREEN, __T("%d"), r_ptr->ac);
965+ text_out(__T(", and a"));
976966
977967 if (!(l_ptr->flags[0] & RF0_UNIQUE))
978- text_out(L"n average");
968+ text_out(__T("n average"));
979969
980- text_out(L" life rating of ");
981- text_out_c(TERM_L_GREEN, L"%d", r_ptr->avg_hp);
982- text_out(L". ");
970+ text_out(__T(" life rating of "));
971+ text_out_c(TERM_L_GREEN, __T("%d"), r_ptr->avg_hp);
972+ text_out(__T(". "));
983973 }
984974 }
985975
@@ -997,11 +987,11 @@
997987
998988 /* Introduction */
999989 if (l_ptr->flags[0] & RF0_UNIQUE)
1000- text_out(L"Killing");
990+ text_out(__T("Killing"));
1001991 else
1002- text_out(L"A kill of");
992+ text_out(__T("A kill of"));
1003993
1004- text_out(L" this creature");
994+ text_out(__T(" this creature"));
1005995
1006996 /* calculate the integer exp part */
1007997 i = (long)r_ptr->mexp * r_ptr->level / p_ptr->lev;
@@ -1012,22 +1002,22 @@
10121002 (long)1000 / p_ptr->lev + 5) / 10);
10131003
10141004 /* Calculate textual representation */
1015- strnfmt(buf, _countof(buf), L"%ld", (long)i);
1005+ strnfmt(buf, _countof(buf), __T("%ld"), (long)i);
10161006 if (j)
10171007 _tcscat_s(buf, _countof(buf), format(__T(".%02ld"), (long)j));
10181008
10191009 /* Mention the experience */
1020- text_out(L" is worth ");
1010+ text_out(__T(" is worth "));
10211011 text_out_c(TERM_ORANGE, buf);
1022- text_out(L" point%s", PLURAL((i == 1) && (j == 0)));
1012+ text_out(__T(" point%s"), PLURAL((i == 1) && (j == 0)));
10231013
10241014 /* Take account of annoying English */
1025- p = L"th";
1015+ p = __T("th");
10261016 i = p_ptr->lev % 10;
10271017 if ((p_ptr->lev / 10) == 1) /* nothing */;
1028- else if (i == 1) p = L"st";
1029- else if (i == 2) p = L"nd";
1030- else if (i == 3) p = L"rd";
1018+ else if (i == 1) p = __T("st");
1019+ else if (i == 2) p = __T("nd");
1020+ else if (i == 3) p = __T("rd");
10311021
10321022 /* Take account of "leading vowels" in numbers */
10331023 q = __T("");
@@ -1036,7 +1026,7 @@
10361026 q = __T("n");
10371027
10381028 /* Mention the dependance on the player's level */
1039- text_out(L" for a%s %lu%s level character. ", q, (long)i, p);
1029+ text_out(__T(" for a%s %lu%s level character. "), q, (long)i, p);
10401030 }
10411031
10421032
@@ -1047,24 +1037,24 @@
10471037 bool old = FALSE;
10481038
10491039
1050- text_out(L"This");
1040+ text_out(__T("This"));
10511041
1052- if (r_ptr->flags[2] & RF2_ANIMAL) text_out(L" natural");
1053- if (r_ptr->flags[2] & RF2_EVIL) text_out(L" evil");
1054- if (r_ptr->flags[2] & RF2_UNDEAD) text_out(L" undead");
1055- if (r_ptr->flags[2] & RF2_METAL) text_out(L" metal");
1042+ if (r_ptr->flags[2] & RF2_ANIMAL) text_out(__T(" natural"));
1043+ if (r_ptr->flags[2] & RF2_EVIL) text_out(__T(" evil"));
1044+ if (r_ptr->flags[2] & RF2_UNDEAD) text_out(__T(" undead"));
1045+ if (r_ptr->flags[2] & RF2_METAL) text_out(__T(" metal"));
10561046
1057- if (r_ptr->flags[2] & RF2_DRAGON) text_out(L" dragon");
1058- else if (r_ptr->flags[2] & RF2_DEMON) text_out(L" demon");
1059- else if (r_ptr->flags[2] & RF2_GIANT) text_out(L" giant");
1060- else if (r_ptr->flags[2] & RF2_TROLL) text_out(L" troll");
1061- else if (r_ptr->flags[2] & RF2_ORC) text_out(L" orc");
1062- else text_out(L" creature");
1047+ if (r_ptr->flags[2] & RF2_DRAGON) text_out(__T(" dragon"));
1048+ else if (r_ptr->flags[2] & RF2_DEMON) text_out(__T(" demon"));
1049+ else if (r_ptr->flags[2] & RF2_GIANT) text_out(__T(" giant"));
1050+ else if (r_ptr->flags[2] & RF2_TROLL) text_out(__T(" troll"));
1051+ else if (r_ptr->flags[2] & RF2_ORC) text_out(__T(" orc"));
1052+ else text_out(__T(" creature"));
10631053
10641054 /* Describe location */
10651055 if (r_ptr->level == 0)
10661056 {
1067- text_out(L" lives in the town");
1057+ text_out(__T(" lives in the town"));
10681058 old = TRUE;
10691059 }
10701060 else
@@ -1072,22 +1062,22 @@
10721062 byte colour = (r_ptr->level > p_ptr->max_depth) ? TERM_RED : TERM_L_GREEN;
10731063
10741064 if (l_ptr->flags[0] & RF0_FORCE_DEPTH)
1075- text_out(L" is found ");
1065+ text_out(__T(" is found "));
10761066 else
1077- text_out(L" is normally found ");
1067+ text_out(__T(" is normally found "));
10781068
1079- text_out(L"at depths of ");
1080- text_out_c(colour, L"%d", r_ptr->level * 50);
1081- text_out(L" feet (level ");
1082- text_out_c(colour, L"%d", r_ptr->level);
1083- text_out(L")");
1069+ text_out(__T("at depths of "));
1070+ text_out_c(colour, __T("%d"), r_ptr->level * 50);
1071+ text_out(__T(" feet (level "));
1072+ text_out_c(colour, __T("%d"), r_ptr->level);
1073+ text_out(__T(")"));
10841074
10851075 old = TRUE;
10861076 }
10871077
1088- if (old) text_out(L", and");
1078+ if (old) text_out(__T(", and"));
10891079
1090- text_out(L" moves");
1080+ text_out(__T(" moves"));
10911081
10921082 /* Random-ness */
10931083 if ((l_ptr->flags[0] & (RF0_RAND_50 | RF0_RAND_25)))
@@ -1094,44 +1084,44 @@
10941084 {
10951085 /* Adverb */
10961086 if ((l_ptr->flags[0] & RF0_RAND_50) && (l_ptr->flags[0] & RF0_RAND_25))
1097- text_out(L" extremely");
1087+ text_out(__T(" extremely"));
10981088 else if (l_ptr->flags[0] & RF0_RAND_50)
1099- text_out(L" somewhat");
1089+ text_out(__T(" somewhat"));
11001090 else if (l_ptr->flags[0] & RF0_RAND_25)
1101- text_out(L" a bit");
1091+ text_out(__T(" a bit"));
11021092
11031093 /* Adjective */
1104- text_out(L" erratically");
1094+ text_out(__T(" erratically"));
11051095
11061096 /* Hack -- Occasional conjunction */
1107- if (r_ptr->speed != 110) text_out(L", and");
1097+ if (r_ptr->speed != 110) text_out(__T(", and"));
11081098 }
11091099
11101100 /* Speed */
11111101 if (r_ptr->speed > 110)
11121102 {
1113- if (r_ptr->speed > 130) text_out_c(TERM_GREEN, L" incredibly");
1114- else if (r_ptr->speed > 120) text_out_c(TERM_GREEN, L" very");
1115- text_out_c(TERM_GREEN, L" quickly");
1103+ if (r_ptr->speed > 130) text_out_c(TERM_GREEN, __T(" incredibly"));
1104+ else if (r_ptr->speed > 120) text_out_c(TERM_GREEN, __T(" very"));
1105+ text_out_c(TERM_GREEN, __T(" quickly"));
11161106 }
11171107 else if (r_ptr->speed < 110)
11181108 {
1119- if (r_ptr->speed < 90) text_out_c(TERM_GREEN, L" incredibly");
1120- else if (r_ptr->speed < 100) text_out_c(TERM_GREEN, L" very");
1121- text_out_c(TERM_GREEN, L" slowly");
1109+ if (r_ptr->speed < 90) text_out_c(TERM_GREEN, __T(" incredibly"));
1110+ else if (r_ptr->speed < 100) text_out_c(TERM_GREEN, __T(" very"));
1111+ text_out_c(TERM_GREEN, __T(" slowly"));
11221112 }
11231113 else
11241114 {
1125- text_out(L" at ");
1126- text_out_c(TERM_GREEN, L"normal speed");
1115+ text_out(__T(" at "));
1116+ text_out_c(TERM_GREEN, __T("normal speed"));
11271117 }
11281118
11291119 /* The code above includes "attack speed" */
11301120 if (l_ptr->flags[0] & RF0_NEVER_MOVE)
1131- text_out(L", but does not deign to chase intruders");
1121+ text_out(__T(", but does not deign to chase intruders"));
11321122
11331123 /* End this sentence */
1134- text_out(L". ");
1124+ text_out(__T(". "));
11351125 }
11361126
11371127
@@ -1192,7 +1182,6 @@
11921182 race_flags_assign_spell(l_ptr->spell_flags, r_ptr->spell_flags);
11931183 }
11941184
1195-
11961185 /*
11971186 * Hack -- display monster information using "roff()"
11981187 *
@@ -1253,10 +1242,10 @@
12531242
12541243 /* Notice "Quest" monsters */
12551244 if (lore.flags[0] & RF0_QUESTOR)
1256- text_out(L"You feel an intense desire to kill this monster... ");
1245+ text_out(__T("You feel an intense desire to kill this monster... "));
12571246
12581247 /* All done */
1259- text_out(L"\n");
1248+ text_out(__T("\n"));
12601249 }
12611250
12621251
@@ -1289,7 +1278,7 @@
12891278 /* A title (use "The" for non-uniques) */
12901279 if (!(r_ptr->flags[0] & RF0_UNIQUE))
12911280 {
1292- Term_addstr(-1, TERM_WHITE, L"The ");
1281+ Term_addstr(-1, TERM_WHITE, __T("The "));
12931282 }
12941283
12951284 /* Dump the name */
@@ -1296,18 +1285,17 @@
12961285 Term_addstr(-1, TERM_WHITE, (r_name + r_ptr->name));
12971286
12981287 /* Append the "standard" attr/_TCHAR info */
1299- Term_addstr(-1, TERM_WHITE, L" ('");
1288+ Term_addstr(-1, TERM_WHITE, __T(" ('"));
13001289 Term_addch(a1, c1);
1301- Term_addstr(-1, TERM_WHITE, L"')");
1290+ Term_addstr(-1, TERM_WHITE, __T("')"));
13021291
13031292 /* Append the "optional" attr/_TCHAR info */
1304- Term_addstr(-1, TERM_WHITE, L"/('");
1293+ Term_addstr(-1, TERM_WHITE, __T("/('"));
13051294 Term_addch(a2, c2);
13061295 if (use_bigtile && (a2 & 0x80)) Term_addch(255, -1);
1307- Term_addstr(-1, TERM_WHITE, L"'):");
1296+ Term_addstr(-1, TERM_WHITE, __T("'):"));
13081297 }
13091298
1310-
13111299 /*
13121300 * Hack -- describe the given monster race at the top of the screen
13131301 */
@@ -1329,7 +1317,6 @@
13291317 roff_top(r_idx);
13301318 }
13311319
1332-
13331320 /*
13341321 * Hack -- describe the given monster race in the current "term" window
13351322 */
--- trunk/JBand/src/monster/melee2.cpp (revision 123)
+++ trunk/JBand/src/monster/melee2.cpp (revision 124)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page.
5+ */
6+/*
37 * File: melee2.c
48 * Purpose: Monster AI routines
59 *
@@ -61,9 +65,6 @@
6165 * Both of them have the same effect on the "choose spell" routine.
6266 */
6367
64-
65-
66-
6768 /*
6869 * Internal probability routine
6970 */
@@ -1853,7 +1854,7 @@
18531854 if (blind) msg_format(__T("%^s mumbles."), m_name);
18541855 else msg_format(__T("%^s magically summons %s %s."), m_name, m_poss,
18551856 ((r_ptr->flags[0]) & RF0_UNIQUE ?
1856- L"minions" : L"kin"));
1857+ __T("minions") : __T("kin")));
18571858
18581859 /* Hack -- Set the letter of the monsters to summon */
18591860 summon_kin_type = r_ptr->d_char;
@@ -3676,7 +3677,6 @@
36763677 }
36773678 }
36783679 }
3679-
36803680 /* Pick up the item */
36813681 else if (r_ptr->flags[1] & (RF1_TAKE_ITEM))
36823682 {
@@ -3714,7 +3714,7 @@
37143714 if (player_has_los_bold(ny, nx) && !squelch_hide_item(o_ptr))
37153715 {
37163716 /* Dump a message */
3717- message_format(MSG_DESTROY, 0, L"%^s crushes %s.", m_name, o_name);
3717+ message_format(MSG_DESTROY, 0, __T("%^s crushes %s."), m_name, o_name);
37183718 }
37193719
37203720 /* Delete the object */
Show on old repository browser