X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Futil.c;h=446b7e04bff3b5871e68a9566f02f0c3c8cc45d7;hb=c9ae69fc940e86829baed7a9bcb5a54f03f1fb2e;hp=8935a342ba69ab0b3cadf35c9a5a9ee5d19e2c61;hpb=cbcba614f669fb39052f3ab8b2c4689199d3891e;p=hengband%2Fhengband.git diff --git a/src/util.c b/src/util.c index 8935a342b..446b7e04b 100644 --- a/src/util.c +++ b/src/util.c @@ -1,4 +1,4 @@ -/* File: util.c */ +/* File: util.c */ /* * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke @@ -72,13 +72,7 @@ int usleep(huge usecs) /* Paranoia -- No excessive sleeping */ -#ifdef JP - if (usecs > 4000000L) core("ÉÔÅö¤Ê usleep() ¸Æ¤Ó½Ð¤·"); -#else - if (usecs > 4000000L) core("Illegal usleep() call"); -#endif - - + if (usecs > 4000000L) core(_("不当な usleep() 呼び出し", "Illegal usleep() call")); /* Wait for it */ Timer.tv_sec = (usecs / 1000000L); @@ -293,7 +287,7 @@ static errr path_temp(char *buf, int max) if (!s) return (-1); /* Format to length */ -#ifndef WIN32 +#if !defined(WIN32) || (defined(_MSC_VER) && (_MSC_VER >= 1900)) (void)strnfmt(buf, max, "%s", s); #else (void)strnfmt(buf, max, ".%s", s); @@ -452,6 +446,10 @@ errr my_fgets(FILE *fff, char *buf, huge n) /* Read a line */ if (fgets(tmp, 1024, fff)) { +#ifdef JP + guess_convert_to_system_encoding(tmp, sizeof(tmp)); +#endif + /* Convert weirdness */ for (s = tmp; *s; s++) { @@ -497,7 +495,7 @@ errr my_fgets(FILE *fff, char *buf, huge n) buf[i++] = *s; } - /* Ⱦ³Ñ¤«¤Ê¤ËÂбþ */ + /* 半角かなに対応 */ else if (iskana(*s)) { buf[i++] = *s; @@ -505,7 +503,7 @@ errr my_fgets(FILE *fff, char *buf, huge n) } #endif /* Handle printables */ - else if (isprint(*s)) + else if (isprint((unsigned char)*s)) { /* Copy */ buf[i++] = *s; @@ -851,7 +849,7 @@ errr fd_chop(int fd, huge n) /* Verify the fd */ if (fd < 0) return (-1); -#if defined(SUNOS) || defined(ULTRIX) || defined(NeXT) +#if defined(ULTRIX) || defined(NeXT) /* Truncate */ ftruncate(fd, n); #endif @@ -1708,6 +1706,109 @@ void sound(int val) Term_xtra(TERM_XTRA_SOUND, val); } +/* + * Hack -- Play a music + */ +errr play_music(int type, int val) +{ + /* No sound */ + if (!use_music) return 1; + + /* Make a sound (if allowed) */ + return Term_xtra(type, val); +} + +/* + * Hack -- Select floor music. + */ +void select_floor_music() +{ + int i; + /* No sound */ + if (!use_music) return; + + if(ambush_flag) + { + play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_AMBUSH); + return; + } + + if(p_ptr->wild_mode) + { + play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_WILD); + return; + } + + if(p_ptr->inside_arena) + { + play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_ARENA); + return; + } + + if(p_ptr->inside_battle) + { + play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_BATTLE); + return; + } + + if(p_ptr->inside_quest) + { + if(play_music(TERM_XTRA_MUSIC_QUEST, p_ptr->inside_quest)) + { + play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_QUEST); + } + return; + } + + for(i = 0; i < max_quests; i++) + { // TODO マクロで類似条件を統合すること + if(quest[i].status == QUEST_STATUS_TAKEN && + (quest[i].type == QUEST_TYPE_KILL_LEVEL || quest[i].type == QUEST_TYPE_RANDOM) && + quest[i].level == dun_level && dungeon_type == quest[i].dungeon) + { + if(play_music(TERM_XTRA_MUSIC_QUEST, i)) + { + play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_QUEST); + } + return; + } + } + + if(dungeon_type) + { + if(p_ptr->feeling == 2) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DUN_FEEL2); + else if(p_ptr->feeling >= 3 && p_ptr->feeling <= 5) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DUN_FEEL1); + else + { + if(play_music(TERM_XTRA_MUSIC_DUNGEON, dungeon_type)) + { + if(dun_level < 40) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DUN_LOW); + else if(dun_level < 80) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DUN_MED); + else play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DUN_HIGH); + } + } + return; + } + + if(p_ptr->town_num) + { + if(play_music(TERM_XTRA_MUSIC_TOWN, p_ptr->town_num)) + { + play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_TOWN); + } + return; + } + + if(!dun_level) + { + if(p_ptr->lev >= 45) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_FIELD3); + else if(p_ptr->lev >= 25) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_FIELD2); + else play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_FIELD1); + return; + } + +} + /* @@ -1737,7 +1838,7 @@ static char inkey_aux(void) char *buf = inkey_macro_trigger_string; - /* Hack : ¥­¡¼ÆþÎÏÂÔ¤Á¤Ç»ß¤Þ¤Ã¤Æ¤¤¤ë¤Î¤Ç¡¢Î®¤ì¤¿¹Ô¤Îµ­²±¤ÏÉÔÍס£ */ + /* Hack : キー入力待ちで止まっているので、流れた行の記憶は不要。 */ num_more = 0; if (parse_macro) @@ -2400,7 +2501,7 @@ void message_add(cptr str) t++; n++; } - if (n == 81) n = 79; /* ºÇ¸å¤Îʸ»ú¤¬´Á»úȾʬ */ + if (n == 81) n = 79; /* 最後の文字が漢字半分 */ #else for (n = 80; n > 60; n--) if (str[n] == ' ') break; @@ -2486,7 +2587,7 @@ void message_add(cptr str) } else { - num_more++;/*ή¤ì¤¿¹Ô¤Î¿ô¤ò¿ô¤¨¤Æ¤ª¤¯ */ + num_more++;/*流れた行の数を数えておく */ now_message++; } @@ -2672,25 +2773,20 @@ static void msg_flush(int x) if (!p_ptr->playing || !nagasu) { /* Pause for response */ -#ifdef JP - Term_putstr(x, 0, -1, a, "-³¤¯-"); -#else - Term_putstr(x, 0, -1, a, "-more-"); -#endif - + Term_putstr(x, 0, -1, a, _("-続く-", "-more-")); /* Get an acceptable keypress */ while (1) { int cmd = inkey(); if (cmd == ESCAPE) { - num_more = -9999; /*auto_more¤Î¤È¤­¡¢Á´¤Æή¤¹¡£ */ + num_more = -9999; /*auto_moreのとき、全て流す。 */ break; } else if (cmd == ' ') { - num_more = 0; /*£±²èÌ̤À¤±Î®¤¹¡£ */ + num_more = 0; /*1画面だけ流す。 */ break; } else if ((cmd == '\n') || (cmd == '\r')) { - num_more--; /*£±¹Ô¤À¤±Î®¤¹¡£ */ + num_more--; /*1行だけ流す。 */ break; } if (quick_messages) break; @@ -3050,7 +3146,7 @@ void c_roff(byte a, cptr str) /* Clean up the char */ #ifdef JP - ch = ((isprint(*s) || k_flag) ? *s : ' '); + ch = ((k_flag || isprint(*s)) ? *s : ' '); #else ch = (isprint(*s) ? *s : ' '); #endif @@ -3073,7 +3169,7 @@ void c_roff(byte a, cptr str) if (x < w) #ifdef JP { - /* ¸½ºß¤¬È¾³Ñʸ»ú¤Î¾ì¹ç */ + /* 現在が半角文字の場合 */ if( !k_flag ) #endif { @@ -3097,11 +3193,11 @@ void c_roff(byte a, cptr str) #ifdef JP else { - /* ¸½ºß¤¬Á´³Ñʸ»ú¤Î¤È¤­ */ - /* ʸƬ¤¬¡Ö¡£¡×¡Ö¡¢¡×Åù¤Ë¤Ê¤ë¤È¤­¤Ï¡¢¤½¤Î£±¤ÄÁ°¤Î¸ì¤Ç²þ¹Ô */ - if (strncmp(s, "¡£", 2) == 0 || strncmp(s, "¡¢", 2) == 0 -#if 0 /* °ìÈÌŪ¤Ë¤Ï¡Ö¥£¡×¡Ö¡¼¡×¤Ï¶Ø§¤ÎÂоݳ° */ - || strncmp(s, "¥£", 2) == 0 || strncmp(s, "¡¼", 2) == 0 + /* 現在が全角文字のとき */ + /* 文頭が「。」「、」等になるときは、その1つ前の語で改行 */ + if (strncmp(s, "。", 2) == 0 || strncmp(s, "、", 2) == 0 +#if 0 /* 一般的には「ィ」「ー」は禁則の対象外 */ + || strncmp(s, "ィ", 2) == 0 || strncmp(s, "ー", 2) == 0 #endif ){ Term_what(x , y, &av[x ], &cv[x ]); @@ -3705,12 +3801,7 @@ s16b get_quantity(cptr prompt, int max) if (!prompt) { /* Build a prompt */ -#ifdef JP - sprintf(tmp, "¤¤¤¯¤Ä¤Ç¤¹¤« (1-%d): ", max); -#else - sprintf(tmp, "Quantity (1-%d): ", max); -#endif - + sprintf(tmp, _("いくつですか (1-%d): ", "Quantity (1-%d): "), max); /* Use that prompt */ prompt = tmp; @@ -3769,11 +3860,7 @@ s16b get_quantity(cptr prompt, int max) void pause_line(int row) { prt("", row, 0); -#ifdef JP - put_str("[ ²¿¤«¥­¡¼¤ò²¡¤·¤Æ²¼¤µ¤¤ ]", row, 26); -#else - put_str("[Press any key to continue]", row, 23); -#endif + put_str(_("[ 何かキーを押して下さい ]", "[Press any key to continue]"), row, _(26, 23)); (void)inkey(); prt("", row, 0); @@ -3798,23 +3885,23 @@ typedef struct menu_naiyou menu_info[10][10] = { { - {"ËâË¡/ÆüìǽÎÏ", 1, FALSE}, - {"¹ÔÆ°", 2, FALSE}, - {"Æ»¶ñ(»ÈÍÑ)", 3, FALSE}, - {"Æ»¶ñ(¤½¤Î¾)", 4, FALSE}, - {"ÁõÈ÷", 5, FALSE}, - {"Èâ/È¢", 6, FALSE}, - {"¾ðÊó", 7, FALSE}, - {"ÀßÄê", 8, FALSE}, - {"¤½¤Î¾", 9, FALSE}, + {"魔法/特殊能力", 1, FALSE}, + {"行動", 2, FALSE}, + {"道具(使用)", 3, FALSE}, + {"道具(その他)", 4, FALSE}, + {"装備", 5, FALSE}, + {"扉/ç®±", 6, FALSE}, + {"情報", 7, FALSE}, + {"設定", 8, FALSE}, + {"その他", 9, FALSE}, {"", 0, FALSE}, }, { - {"»È¤¦(m)", 'm', TRUE}, - {"Ä´¤Ù¤ë(b/P)", 'b', TRUE}, - {"³Ð¤¨¤ë(G)", 'G', TRUE}, - {"ÆüìǽÎϤò»È¤¦(U/O)", 'U', TRUE}, + {"使う(m)", 'm', TRUE}, + {"調べる(b/P)", 'b', TRUE}, + {"覚える(G)", 'G', TRUE}, + {"特殊能力を使う(U/O)", 'U', TRUE}, {"", 0, FALSE}, {"", 0, FALSE}, {"", 0, FALSE}, @@ -3824,49 +3911,49 @@ menu_naiyou menu_info[10][10] = }, { - {"µÙ©¤¹¤ë(R)", 'R', TRUE}, - {"¥È¥é¥Ã¥×²ò½ü(D)", 'D', TRUE}, - {"õ¤¹(s)", 's', TRUE}, - {"¼þ¤ê¤òÄ´¤Ù¤ë(l/x)", 'l', TRUE}, - {"¥¿¡¼¥²¥Ã¥È»ØÄê(*)", '*', TRUE}, - {"·ê¤ò·¡¤ë(T/^t)", 'T', TRUE}, - {"³¬Ãʤò¾å¤ë(<)", '<', TRUE}, - {"³¬Ãʤò²¼¤ê¤ë(>)", '>', TRUE}, - {"¥Ú¥Ã¥È¤ËÌ¿Î᤹¤ë(p)", 'p', TRUE}, - {"õº÷¥â¡¼¥É¤ÎON/OFF(S/#)", 'S', TRUE} + {"休息する(R)", 'R', TRUE}, + {"トラップ解除(D)", 'D', TRUE}, + {"探す(s)", 's', TRUE}, + {"周りを調べる(l/x)", 'l', TRUE}, + {"ターゲット指定(*)", '*', TRUE}, + {"穴を掘る(T/^t)", 'T', TRUE}, + {"階段を上る(<)", '<', TRUE}, + {"階段を下りる(>)", '>', TRUE}, + {"ペットに命令する(p)", 'p', TRUE}, + {"探索モードのON/OFF(S/#)", 'S', TRUE} }, { - {"Æɤà(r)", 'r', TRUE}, - {"°û¤à(q)", 'q', TRUE}, - {"¾ó¤ò»È¤¦(u/Z)", 'u', TRUE}, - {"ËâË¡ËÀ¤ÇÁÀ¤¦(a/z)", 'a', TRUE}, - {"¥í¥Ã¥É¤ò¿¶¤ë(z/a)", 'z', TRUE}, - {"»ÏÆ°¤¹¤ë(A)", 'A', TRUE}, - {"¿©¤Ù¤ë(E)", 'E', TRUE}, - {"Èô¤ÓÆ»¶ñ¤Ç·â¤Ä(f/t)", 'f', TRUE}, - {"Åꤲ¤ë(v)", 'v', TRUE}, + {"読む(r)", 'r', TRUE}, + {"飲む(q)", 'q', TRUE}, + {"杖を使う(u/Z)", 'u', TRUE}, + {"魔法棒で狙う(a/z)", 'a', TRUE}, + {"ロッドを振る(z/a)", 'z', TRUE}, + {"始動する(A)", 'A', TRUE}, + {"食べる(E)", 'E', TRUE}, + {"飛び道具で撃つ(f/t)", 'f', TRUE}, + {"投げる(v)", 'v', TRUE}, {"", 0, FALSE} }, { - {"½¦¤¦(g)", 'g', TRUE}, - {"Íî¤È¤¹(d)", 'd', TRUE}, - {"²õ¤¹(k/^d)", 'k', TRUE}, - {"Ìäò¹ï¤à({)", '{', TRUE}, - {"Ìäò¾Ã¤¹(})", '}', TRUE}, - {"Ä´ºº(I)", 'I', TRUE}, - {"¥¢¥¤¥Æ¥à°ìÍ÷(i)", 'i', TRUE}, + {"拾う(g)", 'g', TRUE}, + {"落とす(d)", 'd', TRUE}, + {"壊す(k/^d)", 'k', TRUE}, + {"銘を刻む({)", '{', TRUE}, + {"銘を消す(})", '}', TRUE}, + {"調査(I)", 'I', TRUE}, + {"アイテム一覧(i)", 'i', TRUE}, {"", 0, FALSE}, {"", 0, FALSE}, {"", 0, FALSE} }, { - {"ÁõÈ÷¤¹¤ë(w)", 'w', TRUE}, - {"ÁõÈ÷¤ò³°¤¹(t/T)", 't', TRUE}, - {"dzÎÁ¤òÊäµë(F)", 'F', TRUE}, - {"ÁõÈ÷°ìÍ÷(e)", 'e', TRUE}, + {"装備する(w)", 'w', TRUE}, + {"装備を外す(t/T)", 't', TRUE}, + {"燃料を補給(F)", 'F', TRUE}, + {"装備一覧(e)", 'e', TRUE}, {"", 0, FALSE}, {"", 0, FALSE}, {"", 0, FALSE}, @@ -3876,10 +3963,10 @@ menu_naiyou menu_info[10][10] = }, { - {"³«¤±¤ë(o)", 'o', TRUE}, - {"ÊĤ¸¤ë(c)", 'c', TRUE}, - {"ÂÎÅö¤¿¤ê¤¹¤ë(B/f)", 'B', TRUE}, - {"¤¯¤µ¤Ó¤òÂǤÄ(j/S)", 'j', TRUE}, + {"開ける(o)", 'o', TRUE}, + {"閉じる(c)", 'c', TRUE}, + {"体当たりする(B/f)", 'B', TRUE}, + {"くさびを打つ(j/S)", 'j', TRUE}, {"", 0, FALSE}, {"", 0, FALSE}, {"", 0, FALSE}, @@ -3889,41 +3976,41 @@ menu_naiyou menu_info[10][10] = }, { - {"¥À¥ó¥¸¥ç¥ó¤ÎÁ´ÂοÞ(M)", 'M', TRUE}, - {"°ÌÃÖ¤ò³Îǧ(L/W)", 'L', TRUE}, - {"³¬¤ÎÊ·°Ïµ¤(^f)", KTRL('F'), TRUE}, - {"¥¹¥Æ¡¼¥¿¥¹(C)", 'C', TRUE}, - {"ʸ»ú¤ÎÀâÌÀ(/)", '/', TRUE}, - {"¥á¥Ã¥»¡¼¥¸ÍúÎò(^p)", KTRL('P'), TRUE}, - {"¸½ºß¤Î»þ¹ï(^t/')", KTRL('T'), TRUE}, - {"¸½ºß¤ÎÃμ±(~)", '~', TRUE}, - {"¥×¥ì¥¤µ­Ï¿(|)", '|', TRUE}, + {"ダンジョンの全体図(M)", 'M', TRUE}, + {"位置を確認(L/W)", 'L', TRUE}, + {"階の雰囲気(^f)", KTRL('F'), TRUE}, + {"ステータス(C)", 'C', TRUE}, + {"文字の説明(/)", '/', TRUE}, + {"メッセージ履歴(^p)", KTRL('P'), TRUE}, + {"現在の時刻(^t/')", KTRL('T'), TRUE}, + {"現在の知識(~)", '~', TRUE}, + {"プレイ記録(|)", '|', TRUE}, {"", 0, FALSE} }, { - {"¥ª¥×¥·¥ç¥ó(=)", '=', TRUE}, - {"¥Þ¥¯¥í(@)", '@', TRUE}, - {"²èÌÌɽ¼¨(%)", '%', TRUE}, - {"¥«¥é¡¼(&)", '&', TRUE}, - {"ÀßÄêÊѹ¹¥³¥Þ¥ó¥É(\")", '\"', TRUE}, - {"¼«Æ°½¦¤¤¤ò¥í¡¼¥É($)", '$', TRUE}, - {"¥·¥¹¥Æ¥à(!)", '!', TRUE}, + {"オプション(=)", '=', TRUE}, + {"マクロ(@)", '@', TRUE}, + {"画面表示(%)", '%', TRUE}, + {"カラー(&)", '&', TRUE}, + {"設定変更コマンド(\")", '\"', TRUE}, + {"自動拾いをロード($)", '$', TRUE}, + {"システム(!)", '!', TRUE}, {"", 0, FALSE}, {"", 0, FALSE}, {"", 0, FALSE} }, { - {"¥»¡¼¥Ö&ÃæÃÇ(^x)", KTRL('X'), TRUE}, - {"¥»¡¼¥Ö(^s)", KTRL('S'), TRUE}, - {"¥Ø¥ë¥×(?)", '?', TRUE}, - {"ºÆÉÁ²è(^r)", KTRL('R'), TRUE}, - {"¥á¥â(:)", ':', TRUE}, - {"µ­Ç°»£±Æ())", ')', TRUE}, - {"µ­Ç°»£±Æ¤Îɽ¼¨(()", '(', TRUE}, - {"¥Ð¡¼¥¸¥ç¥ó¾ðÊó(V)", 'V', TRUE}, - {"°úÂह¤ë(Q)", 'Q', TRUE}, + {"セーブ&中断(^x)", KTRL('X'), TRUE}, + {"セーブ(^s)", KTRL('S'), TRUE}, + {"ヘルプ(?)", '?', TRUE}, + {"再描画(^r)", KTRL('R'), TRUE}, + {"メモ(:)", ':', TRUE}, + {"記念撮影())", ')', TRUE}, + {"記念撮影の表示(()", '(', TRUE}, + {"バージョン情報(V)", 'V', TRUE}, + {"引退する(Q)", 'Q', TRUE}, {"", 0, FALSE} }, }; @@ -4077,17 +4164,17 @@ typedef struct #ifdef JP special_menu_naiyou special_menu_info[] = { - {"ĶǽÎÏ/ÆüìǽÎÏ", 0, 0, MENU_CLASS, CLASS_MINDCRAFTER}, - {"¤â¤Î¤Þ¤Í/ÆüìǽÎÏ", 0, 0, MENU_CLASS, CLASS_IMITATOR}, - {"²Î/ÆüìǽÎÏ", 0, 0, MENU_CLASS, CLASS_BARD}, - {"ɬ»¦µ»/ÆüìǽÎÏ", 0, 0, MENU_CLASS, CLASS_SAMURAI}, - {"Îýµ¤½Ñ/ËâË¡/ÆüìǽÎÏ", 0, 0, MENU_CLASS, CLASS_FORCETRAINER}, - {"µ»/ÆüìǽÎÏ", 0, 0, MENU_CLASS, CLASS_BERSERKER}, - {"µ»½Ñ/ÆüìǽÎÏ", 0, 0, MENU_CLASS, CLASS_SMITH}, - {"¶ÀËâË¡/ÆüìǽÎÏ", 0, 0, MENU_CLASS, CLASS_MIRROR_MASTER}, - {"Ǧ½Ñ/ÆüìǽÎÏ", 0, 0, MENU_CLASS, CLASS_NINJA}, - {"¹­°è¥Þ¥Ã¥×(<)", 2, 6, MENU_WILD, FALSE}, - {"Ä̾ï¥Þ¥Ã¥×(>)", 2, 7, MENU_WILD, TRUE}, + {"超能力/特殊能力", 0, 0, MENU_CLASS, CLASS_MINDCRAFTER}, + {"ものまね/特殊能力", 0, 0, MENU_CLASS, CLASS_IMITATOR}, + {"歌/特殊能力", 0, 0, MENU_CLASS, CLASS_BARD}, + {"必殺技/特殊能力", 0, 0, MENU_CLASS, CLASS_SAMURAI}, + {"練気術/魔法/特殊能力", 0, 0, MENU_CLASS, CLASS_FORCETRAINER}, + {"技/特殊能力", 0, 0, MENU_CLASS, CLASS_BERSERKER}, + {"技術/特殊能力", 0, 0, MENU_CLASS, CLASS_SMITH}, + {"鏡魔法/特殊能力", 0, 0, MENU_CLASS, CLASS_MIRROR_MASTER}, + {"忍術/特殊能力", 0, 0, MENU_CLASS, CLASS_NINJA}, + {"広域マップ(<)", 2, 6, MENU_WILD, FALSE}, + {"通常マップ(>)", 2, 7, MENU_WILD, TRUE}, {"", 0, 0, 0, 0}, }; #else @@ -4116,7 +4203,7 @@ static char inkey_from_menu(void) int menu = 0; bool kisuu; - if (py - panel_row_min > 10) basey = 2; + if (p_ptr->y - panel_row_min > 10) basey = 2; else basey = 13; basex = 15; @@ -4167,14 +4254,10 @@ static char inkey_from_menu(void) } max_num = i; kisuu = max_num % 2; -#ifdef JP - put_str("¡Õ",basey + 1 + num / 2, basex + 2 + (num % 2) * 24); -#else - put_str("> ",basey + 1 + num / 2, basex + 2 + (num % 2) * 24); -#endif + put_str(_("》", "> "),basey + 1 + num / 2, basex + 2 + (num % 2) * 24); /* Place the cursor on the player */ - move_cursor_relative(py, px); + move_cursor_relative(p_ptr->y, p_ptr->x); /* Get a command */ sub_cmd = inkey(); @@ -4355,12 +4438,7 @@ void request_command(int shopping) command_arg = 0; /* Begin the input */ -#ifdef JP - prt("²ó¿ô: ", 0, 0); -#else - prt("Count: ", 0, 0); -#endif - + prt(_("回数: ", "Count: "), 0, 0); /* Get a command count */ while (1) @@ -4375,12 +4453,7 @@ void request_command(int shopping) command_arg = command_arg / 10; /* Show current count */ -#ifdef JP - prt(format("²ó¿ô: %d", command_arg), 0, 0); -#else - prt(format("Count: %d", command_arg), 0, 0); -#endif - + prt(format(_("回数: %d", "Count: %d"), command_arg), 0, 0); } /* Actual numeric data */ @@ -4404,12 +4477,7 @@ void request_command(int shopping) } /* Show current count */ -#ifdef JP - prt(format("²ó¿ô: %d", command_arg), 0, 0); -#else - prt(format("Count: %d", command_arg), 0, 0); -#endif - + prt(format(_("回数: %d", "Count: %d"), command_arg), 0, 0); } /* Exit on "unusable" input */ @@ -4426,12 +4494,7 @@ void request_command(int shopping) command_arg = 99; /* Show current count */ -#ifdef JP - prt(format("²ó¿ô: %d", command_arg), 0, 0); -#else - prt(format("Count: %d", command_arg), 0, 0); -#endif - + prt(format(_("回数: %d", "Count: %d"), command_arg), 0, 0); } /* Hack -- Handle "old_arg" */ @@ -4441,24 +4504,14 @@ void request_command(int shopping) command_arg = old_arg; /* Show current count */ -#ifdef JP -prt(format("²ó¿ô: %d", command_arg), 0, 0); -#else - prt(format("Count: %d", command_arg), 0, 0); -#endif - + prt(format(_("回数: %d", "Count: %d"), command_arg), 0, 0); } /* Hack -- white-space means "enter command now" */ if ((cmd == ' ') || (cmd == '\n') || (cmd == '\r')) { /* Get a real command */ -#ifdef JP - if (!get_com("¥³¥Þ¥ó¥É: ", (char *)&cmd, FALSE)) -#else - if (!get_com("Command: ", (char *)&cmd, FALSE)) -#endif - + if (!get_com(_("コマンド: ", "Command: "), (char *)&cmd, FALSE)) { /* Clear count */ command_arg = 0; @@ -4474,12 +4527,7 @@ prt(format(" if (cmd == '\\') { /* Get a real command */ -#ifdef JP - (void)get_com("¥³¥Þ¥ó¥É: ", (char *)&cmd, FALSE); -#else - (void)get_com("Command: ", (char *)&cmd, FALSE); -#endif - + (void)get_com(_("コマンド: ", "Command: "), (char *)&cmd, FALSE); /* Hack -- bypass keymaps */ if (!inkey_next) inkey_next = ""; @@ -4490,12 +4538,7 @@ prt(format(" if (cmd == '^') { /* Get a new command and controlify it */ -#ifdef JP - if (get_com("CTRL: ", (char *)&cmd, FALSE)) cmd = KTRL(cmd); -#else - if (get_com("Control: ", (char *)&cmd, FALSE)) cmd = KTRL(cmd); -#endif - + if (get_com(_("CTRL: ", "Control: "), (char *)&cmd, FALSE)) cmd = KTRL(cmd); } @@ -4603,12 +4646,7 @@ prt(format(" { /* Hack -- Verify command */ -#ifdef JP - if (!get_check("ËÜÅö¤Ç¤¹¤«? ")) -#else - if (!get_check("Are you sure? ")) -#endif - + if (!get_check(_("本当ですか? ", "Are you sure? "))) { /* Hack -- Use space */ command_cmd = ' '; @@ -5142,10 +5180,10 @@ void roff_to_buf(cptr str, int maxlen, char *tbuf, size_t bufsize) ch[1] = str[read_pt+1]; ch_len = 2; - if (strcmp(ch, "¡£") == 0 || - strcmp(ch, "¡¢") == 0 || - strcmp(ch, "¥£") == 0 || - strcmp(ch, "¡¼") == 0) + if (strcmp(ch, "。") == 0 || + strcmp(ch, "、") == 0 || + strcmp(ch, "ィ") == 0 || + strcmp(ch, "ー") == 0) kinsoku = TRUE; } else if (!isprint(ch[0]))