Some more translation work in attack.cpp.
@@ -290,6 +290,7 @@ | ||
290 | 290 | void py_attack(int y, int x) |
291 | 291 | { |
292 | 292 | int num = 0, bonus, chance; |
293 | + _TCHAR langbuf[200]; | |
293 | 294 | |
294 | 295 | monster_type *m_ptr; |
295 | 296 | monster_race *r_ptr; |
@@ -339,7 +340,8 @@ | ||
339 | 340 | if (test_hit(chance, r_ptr->ac, m_ptr->ml)) |
340 | 341 | { |
341 | 342 | /* Default to punching for one damage */ |
342 | - const _TCHAR *hit_verb = __T("You punch %s."); | |
343 | + const _TCHAR *hit_verb = LS(__T("You punch %s."), | |
344 | + spaceme(langbuf,__T("%sを殴った。"))); /* Translation TBC */ | |
343 | 345 | int k = 1; |
344 | 346 | |
345 | 347 | /* Handle normal weapon */ |
@@ -348,7 +350,8 @@ | ||
348 | 350 | int weapon_brand_mult, ring_brand_mult[2]; |
349 | 351 | int use_mult = 1; |
350 | 352 | |
351 | - hit_verb = __T("You hit %s."); | |
353 | + hit_verb = LS(__T("You hit %s."), | |
354 | + spaceme(langbuf,__T("%sに当たった。"))); /* Translation TBC */ | |
352 | 355 | |
353 | 356 | /* Hack-- put rings first, because they can |
354 | 357 | * only be brands right now */ |
@@ -400,7 +403,9 @@ | ||
400 | 403 | |
401 | 404 | /* Complex message */ |
402 | 405 | if (p_ptr->wizard) |
403 | - msg_format(__T("You do %d (out of %d) damage."), k, m_ptr->hp); | |
406 | + msg_format(LS( __T("You do %d (out of %d) damage."), /* Translation TBC */ | |
407 | + spaceme(langbuf,__T("%2$dから%1$dダメージを与えた。"))), | |
408 | + k, m_ptr->hp); | |
404 | 409 | |
405 | 410 | /* Damage, check for fear and death */ |
406 | 411 | if (mon_take_hit(cave_m_idx[y][x], k, &fear, NULL)) break; |
@@ -413,7 +418,7 @@ | ||
413 | 418 | p_ptr->confusing = FALSE; |
414 | 419 | |
415 | 420 | /* Message */ |
416 | - msg_print(LS(__T("Your hands stop glowing."), | |
421 | + msg_print( LS(__T("Your hands stop glowing."), | |
417 | 422 | spaceme(langbuf, __T("手の輝きがなくなった。")))); /* Translation TBC */ |
418 | 423 | |
419 | 424 | /* Confuse the monster */ |
@@ -423,36 +428,38 @@ | ||
423 | 428 | { |
424 | 429 | l_ptr->flags[2] |= (RF2_NO_CONF); |
425 | 430 | } |
426 | - | |
427 | - msg_format(__T("%^s is unaffected."), m_name); | |
431 | + msg_format( LS(__T("%^s is unaffected."), /* Translation TBC */ | |
432 | + spaceme(langbuf,__T("%^sには効果がなかった。"))), m_name); | |
428 | 433 | } |
429 | 434 | else if (randint0(100) < r_ptr->level) |
430 | 435 | { |
431 | - msg_format(__T("%^s is unaffected."), m_name); | |
436 | + msg_format( LS(__T("%^s is unaffected."), /* Translation TBC */ | |
437 | + spaceme(langbuf,__T("%^sには効果がなかった。"))), m_name); | |
432 | 438 | } |
433 | 439 | else |
434 | 440 | { |
435 | - msg_format(__T("%^s appears confused."), m_name); | |
441 | + msg_format( LS(__T("%^s appears confused."), /* Translation TBC */ | |
442 | + spaceme(langbuf,__T("%^sが混乱しているようだ。"))), m_name); | |
436 | 443 | m_ptr->confused += 10 + (byte) randint0(p_ptr->lev) / 5; |
437 | 444 | } |
438 | 445 | } |
439 | 446 | } |
440 | - | |
441 | - /* Player misses */ | |
442 | - else | |
447 | + else /* Player misses */ | |
443 | 448 | { |
444 | 449 | /* Message */ |
445 | - message_format(MSG_MISS, m_ptr->r_idx, __T("You miss %s."), m_name); | |
450 | + message_format(MSG_MISS, m_ptr->r_idx, | |
451 | + LS(__T("You miss %s."), | |
452 | + spaceme(langbuf,__T("%sに当たらなかった。"))), m_name); /* Translation TBC */ | |
446 | 453 | } |
447 | 454 | } |
448 | - | |
449 | 455 | /* Hack -- delay fear messages */ |
450 | 456 | if (fear && m_ptr->ml) |
451 | 457 | { |
452 | 458 | /* Message */ |
453 | - message_format(MSG_FLEE, m_ptr->r_idx, __T("%^s flees in terror!"), m_name); | |
459 | + message_format(MSG_FLEE, m_ptr->r_idx, | |
460 | + LS(__T("%^s flees in terror!"), | |
461 | + spaceme(langbuf,__T("%^sが怖くなって逃げ出した。"))), m_name); /* Translation TBC */ | |
454 | 462 | } |
455 | - | |
456 | 463 | /* Mega-Hack -- apply earthquake brand */ |
457 | 464 | if (do_quake) earthquake(p_ptr->py, p_ptr->px, 10); |
458 | 465 | } |
@@ -539,7 +546,6 @@ | ||
539 | 546 | return; |
540 | 547 | } |
541 | 548 | } |
542 | - | |
543 | 549 | /* Sound */ |
544 | 550 | sound(MSG_SHOOT); |
545 | 551 |
@@ -597,14 +603,11 @@ | ||
597 | 603 | Term_fresh(); |
598 | 604 | if (p_ptr->redraw) redraw_stuff(); |
599 | 605 | } |
600 | - | |
601 | - /* Delay anyway for consistency */ | |
602 | - else | |
606 | + else /* Delay anyway for consistency */ | |
603 | 607 | { |
604 | 608 | /* Pause anyway, for consistancy */ |
605 | 609 | Term_xtra(TERM_XTRA_DELAY, msec); |
606 | 610 | } |
607 | - | |
608 | 611 | /* Handle monster */ |
609 | 612 | if (cave_m_idx[y][x] > 0) |
610 | 613 | { |
@@ -641,7 +644,6 @@ | ||
641 | 644 | /* Special note at death */ |
642 | 645 | note_dies = __T(" is destroyed."); |
643 | 646 | } |
644 | - | |
645 | 647 | /* Handle unseen monster */ |
646 | 648 | if (!visible) |
647 | 649 | { |
@@ -648,9 +650,7 @@ | ||
648 | 650 | /* Invisible monster */ |
649 | 651 | message_format(MSG_SHOOT_HIT, 0, __T("The %s finds a mark."), o_name); |
650 | 652 | } |
651 | - | |
652 | - /* Handle visible monster */ | |
653 | - else | |
653 | + else /* Handle visible monster */ | |
654 | 654 | { |
655 | 655 | _TCHAR m_name[80]; |
656 | 656 |
@@ -666,7 +666,6 @@ | ||
666 | 666 | /* Hack -- Track this monster */ |
667 | 667 | if (m_ptr->ml) health_track(cave_m_idx[y][x]); |
668 | 668 | } |
669 | - | |
670 | 669 | /* Apply damage: multiplier, slays, criticals, bonuses */ |
671 | 670 | tdam = damroll(o_ptr->dd, o_ptr->ds); |
672 | 671 | tdam += o_ptr->to_d + j_ptr->to_d; |
@@ -683,15 +682,12 @@ | ||
683 | 682 | msg_format(__T("You do %d (out of %d) damage."), |
684 | 683 | tdam, m_ptr->hp); |
685 | 684 | } |
686 | - | |
687 | 685 | /* Hit the monster, check for death */ |
688 | 686 | if (mon_take_hit(cave_m_idx[y][x], tdam, &fear, note_dies)) |
689 | 687 | { |
690 | 688 | /* Dead monster */ |
691 | 689 | } |
692 | - | |
693 | - /* No death */ | |
694 | - else | |
690 | + else /* No death */ | |
695 | 691 | { |
696 | 692 | /* Message */ |
697 | 693 | message_pain(cave_m_idx[y][x], tdam); |
@@ -710,12 +706,10 @@ | ||
710 | 706 | } |
711 | 707 | } |
712 | 708 | } |
713 | - | |
714 | 709 | /* Stop looking */ |
715 | 710 | break; |
716 | 711 | } |
717 | 712 | } |
718 | - | |
719 | 713 | /* Get local object */ |
720 | 714 | i_ptr = &object_type_body; |
721 | 715 |
@@ -732,14 +726,11 @@ | ||
732 | 726 | inven_item_describe(item); |
733 | 727 | inven_item_optimize(item); |
734 | 728 | } |
735 | - | |
736 | - /* Reduce and describe floor item */ | |
737 | - else | |
729 | + else /* Reduce and describe floor item */ | |
738 | 730 | { |
739 | 731 | floor_item_increase(0 - item, -1); |
740 | 732 | floor_item_optimize(0 - item); |
741 | 733 | } |
742 | - | |
743 | 734 | /* Chance of breakage (during attacks) */ |
744 | 735 | j = (hit_body ? breakage_chance(i_ptr) : 0); |
745 | 736 |
@@ -847,14 +838,11 @@ | ||
847 | 838 | inven_item_describe(item); |
848 | 839 | inven_item_optimize(item); |
849 | 840 | } |
850 | - | |
851 | - /* Reduce and describe floor item */ | |
852 | - else | |
841 | + else /* Reduce and describe floor item */ | |
853 | 842 | { |
854 | 843 | floor_item_increase(0 - item, -1); |
855 | 844 | floor_item_optimize(0 - item); |
856 | 845 | } |
857 | - | |
858 | 846 | /* Description */ |
859 | 847 | object_desc(o_name, _countof(o_name), i_ptr, FALSE, ODESC_FULL); |
860 | 848 |
@@ -930,9 +918,7 @@ | ||
930 | 918 | Term_fresh(); |
931 | 919 | if (p_ptr->redraw) redraw_stuff(); |
932 | 920 | } |
933 | - | |
934 | - /* Delay anyway for consistency */ | |
935 | - else | |
921 | + else /* Delay anyway for consistency */ | |
936 | 922 | { |
937 | 923 | /* Pause anyway, for consistancy */ |
938 | 924 | Term_xtra(TERM_XTRA_DELAY, msec); |