From a711990a5a58a14847a0aba7ba99cadb61ea8352 Mon Sep 17 00:00:00 2001 From: Deskull Date: Fri, 23 Nov 2018 19:16:16 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=E3=80=80=E3=83=A1=E3=83=83?= =?utf8?q?=E3=82=BB=E3=83=BC=E3=82=B8=E6=95=B4=E7=90=86=E3=80=82=20Refacto?= =?utf8?q?r=20messages.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/autopick.c | 3 --- src/bldg.c | 4 ---- src/cmd-activate.c | 1 - src/cmd-eat.c | 1 - src/cmd-item.c | 10 ---------- src/cmd-quaff.c | 1 - src/cmd-read.c | 1 - src/cmd-usestaff.c | 1 - src/cmd-zaprod.c | 1 - src/cmd-zapwand.c | 5 +---- src/cmd2.c | 2 -- src/cmd5.c | 3 --- src/floor-save.c | 11 +++++------ src/hissatsu.c | 1 - src/object2.c | 3 --- src/racial.c | 3 --- src/spells2.c | 1 - src/spells3.c | 12 ------------ src/store.c | 1 - src/wizard2.c | 1 - 20 files changed, 6 insertions(+), 60 deletions(-) diff --git a/src/autopick.c b/src/autopick.c index 52ced4d58..e879031bc 100644 --- a/src/autopick.c +++ b/src/autopick.c @@ -3266,7 +3266,6 @@ static bool entry_from_choosed_object(autopick_type *entry) object_type *o_ptr; cptr q, s; - /* Get an item */ #ifdef JP q = "どのアイテムを登録しますか? "; s = "アイテムを持っていない。"; @@ -3291,7 +3290,6 @@ static byte get_object_for_search(object_type **o_handle, cptr *search_strp) object_type *o_ptr; cptr q, s; - /* Get an item */ #ifdef JP q = "どのアイテムを検索しますか? "; s = "アイテムを持っていない。"; @@ -3448,7 +3446,6 @@ static byte get_string_for_search(object_type **o_handle, cptr *search_strp) return (back ? -1 : 1); case KTRL('i'): - /* Get an item */ return get_object_for_search(o_handle, search_strp); case KTRL('l'): diff --git a/src/bldg.c b/src/bldg.c index 14d3eeb07..cd2d3b36b 100644 --- a/src/bldg.c +++ b/src/bldg.c @@ -3130,7 +3130,6 @@ static PRICE repair_broken_weapon_aux(PRICE bcost) prt(_("修復には材料となるもう1つの武器が必要です。", "Hand one material weapon to repair a broken weapon."), row, 2); prt(_("材料に使用した武器はなくなります!", "The material weapon will disappear after repairing!!"), row+1, 2); - /* Get an item */ q = _("どの折れた武器を修復しますか?", "Repair which broken weapon? "); s = _("修復できる折れた武器がありません。", "You have no broken weapon to repair."); @@ -3160,7 +3159,6 @@ static PRICE repair_broken_weapon_aux(PRICE bcost) object_desc(basenm, o_ptr, OD_NAME_ONLY); prt(format(_("修復する武器 : %s", "Repairing: %s"), basenm), row+3, 2); - /* Get an item */ q = _("材料となる武器は?", "Which weapon for material? "); s = _("材料となる武器がありません。", "You have no material to repair."); @@ -3405,7 +3403,6 @@ static bool enchant_item(PRICE cost, HIT_PROB to_hit, HIT_POINT to_dam, ARMOUR_C item_tester_no_ryoute = TRUE; - /* Get an item */ q = _("どのアイテムを改良しますか?", "Improve which item? "); s = _("改良できるものがありません。", "You have nothing to improve."); @@ -3524,7 +3521,6 @@ static void building_recharge(void) /* Only accept legal items */ item_tester_hook = item_tester_hook_recharge; - /* Get an item */ q = _("どのアイテムに魔力を充填しますか? ", "Recharge which item? "); s = _("魔力を充填すべきアイテムがない。", "You have nothing to recharge."); if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return; diff --git a/src/cmd-activate.c b/src/cmd-activate.c index d1046bf1b..17106292a 100644 --- a/src/cmd-activate.c +++ b/src/cmd-activate.c @@ -375,7 +375,6 @@ void do_cmd_activate(void) /* Prepare the hook */ item_tester_hook = item_tester_hook_activate; - /* Get an item */ q = _("どのアイテムを始動させますか? ", "Activate which item? "); s = _("始動できるアイテムを装備していない。", "You have nothing to activate."); diff --git a/src/cmd-eat.c b/src/cmd-eat.c index c29c320e4..d469cdc1e 100644 --- a/src/cmd-eat.c +++ b/src/cmd-eat.c @@ -513,7 +513,6 @@ void do_cmd_eat_food(void) /* Restrict choices to food */ item_tester_hook = item_tester_hook_eatable; - /* Get an item */ q = _("どれを食べますか? ", "Eat which item? "); s = _("食べ物がない。", "You have nothing to eat."); diff --git a/src/cmd-item.c b/src/cmd-item.c index e707215e6..f762723fb 100644 --- a/src/cmd-item.c +++ b/src/cmd-item.c @@ -206,7 +206,6 @@ void do_cmd_wield(void) /* Restrict the choices */ item_tester_hook = item_tester_hook_wear; - /* Get an item */ q = _("どれを装備しますか? ", "Wear/Wield which item? "); s = _("装備可能なアイテムがない。", "You have nothing you can wear or wield."); @@ -605,7 +604,6 @@ void do_cmd_takeoff(void) item_tester_no_ryoute = TRUE; - /* Get an item */ q = _("どれを装備からはずしますか? ", "Take off which item? "); s = _("はずせる装備がない。", "You are not wearing anything to take off."); @@ -692,7 +690,6 @@ void do_cmd_drop(void) } item_tester_no_ryoute = TRUE; - /* Get an item */ q = _("どのアイテムを落としますか? ", "Drop which item? "); s = _("落とせるアイテムを持っていない。", "You have nothing to drop."); @@ -804,7 +801,6 @@ void do_cmd_destroy(void) /* Hack -- force destruction */ if (command_arg > 0) force = TRUE; - /* Get an item */ q = _("どのアイテムを壊しますか? ", "Destroy which item? "); s = _("壊せるアイテムを持っていない。", "You have nothing to destroy."); @@ -1001,7 +997,6 @@ void do_cmd_observe(void) item_tester_no_ryoute = TRUE; - /* Get an item */ q = _("どのアイテムを調べますか? ", "Examine which item? "); s = _("調べられるアイテムがない。", "You have nothing to examine."); @@ -1051,7 +1046,6 @@ void do_cmd_uninscribe(void) cptr q, s; item_tester_no_ryoute = TRUE; - /* Get an item */ q = _("どのアイテムの銘を消しますか? ", "Un-inscribe which item? "); s = _("銘を消せるアイテムがない。", "You have nothing to un-inscribe."); @@ -1106,7 +1100,6 @@ void do_cmd_inscribe(void) cptr q, s; item_tester_no_ryoute = TRUE; - /* Get an item */ q = _("どのアイテムに銘を刻みますか? ", "Inscribe which item? "); s = _("銘を刻めるアイテムがない。", "You have nothing to inscribe."); @@ -1196,7 +1189,6 @@ static void do_cmd_refill_lamp(void) /* Restrict the choices */ item_tester_hook = item_tester_refill_lantern; - /* Get an item */ #ifdef JP q = "どの油つぼから注ぎますか? "; s = "油つぼがない。"; @@ -1304,7 +1296,6 @@ static void do_cmd_refill_torch(void) /* Restrict the choices */ item_tester_hook = item_tester_refill_torch; - /* Get an item */ #ifdef JP q = "どの松明で明かりを強めますか? "; s = "他に松明がない。"; @@ -1983,7 +1974,6 @@ void do_cmd_use(void) /* Prepare the hook */ item_tester_hook = item_tester_hook_use; - /* Get an item */ q = _("どれを使いますか?", "Use which item? "); s = _("使えるものがありません。", "You have nothing to use."); diff --git a/src/cmd-quaff.c b/src/cmd-quaff.c index 9d9b4d72f..b25e23e2a 100644 --- a/src/cmd-quaff.c +++ b/src/cmd-quaff.c @@ -628,7 +628,6 @@ void do_cmd_quaff_potion(void) /* Restrict choices to potions */ item_tester_hook = item_tester_hook_quaff; - /* Get an item */ q = _("どの薬を飲みますか? ", "Quaff which potion? "); s = _("飲める薬がない。", "You have no potions to quaff."); diff --git a/src/cmd-read.c b/src/cmd-read.c index e08593bde..33bc61fee 100644 --- a/src/cmd-read.c +++ b/src/cmd-read.c @@ -641,7 +641,6 @@ void do_cmd_read_scroll(void) /* Restrict choices to scrolls */ item_tester_hook = item_tester_hook_readable; - /* Get an item */ q = _("どの巻物を読みますか? ", "Read which scroll? "); s = _("読める巻物がない。", "You have no scrolls to read."); diff --git a/src/cmd-usestaff.c b/src/cmd-usestaff.c index de2a1c529..8d1e8d8e8 100644 --- a/src/cmd-usestaff.c +++ b/src/cmd-usestaff.c @@ -483,7 +483,6 @@ void do_cmd_use_staff(void) /* Restrict choices to wands */ item_tester_tval = TV_STAFF; - /* Get an item */ q = _("どの杖を使いますか? ", "Use which staff? "); s = _("使える杖がない。", "You have no staff to use."); diff --git a/src/cmd-zaprod.c b/src/cmd-zaprod.c index e6120de5e..45352cd8e 100644 --- a/src/cmd-zaprod.c +++ b/src/cmd-zaprod.c @@ -405,7 +405,6 @@ void do_cmd_zap_rod(void) /* Restrict choices to rods */ item_tester_tval = TV_ROD; - /* Get an item */ q = _("どのロッドを振りますか? ", "Zap which rod? "); s = _("使えるロッドがない。", "You have no rod to zap."); diff --git a/src/cmd-zapwand.c b/src/cmd-zapwand.c index 3e7e3a00d..fe78d3233 100644 --- a/src/cmd-zapwand.c +++ b/src/cmd-zapwand.c @@ -452,7 +452,7 @@ void do_cmd_aim_wand_aux(INVENTORY_IDX item) void do_cmd_aim_wand(void) { OBJECT_IDX item; - cptr q, s; + cptr q, s; /* Restrict choices to wands */ item_tester_tval = TV_WAND; @@ -462,12 +462,9 @@ void do_cmd_aim_wand(void) set_action(ACTION_NONE); } - /* Get an item */ q = _("どの魔法棒で狙いますか? ", "Aim which wand? "); s = _("使える魔法棒がない。", "You have no wand to aim."); - if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return; - /* Aim the wand */ do_cmd_aim_wand_aux(item); } diff --git a/src/cmd2.c b/src/cmd2.c index 44c5bb0e8..39fd57932 100644 --- a/src/cmd2.c +++ b/src/cmd2.c @@ -3379,7 +3379,6 @@ void do_cmd_fire(void) /* Require proper missile */ item_tester_tval = p_ptr->tval_ammo; - /* Get an item */ q = _("どれを撃ちますか? ", "Fire which item? "); s = _("発射されるアイテムがありません。", "You have nothing to fire."); if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) @@ -3482,7 +3481,6 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken) } else { - /* Get an item */ q = _("どのアイテムを投げますか? ", "Throw which item? "); s = _("投げるアイテムがない。", "You have nothing to throw."); if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR | USE_EQUIP))) diff --git a/src/cmd5.c b/src/cmd5.c index 7b0a4ab2c..421f69981 100644 --- a/src/cmd5.c +++ b/src/cmd5.c @@ -495,7 +495,6 @@ void do_cmd_browse(void) if (p_ptr->realm2 == REALM_NONE) item_tester_tval = mp_ptr->spell_book; else item_tester_hook = item_tester_learn_spell; - /* Get an item */ q = _("どの本を読みますか? ", "Browse which book? "); s = _("読める本がない。", "You have no books that you can read."); @@ -708,7 +707,6 @@ void do_cmd_study(void) if (p_ptr->realm2 == REALM_NONE) item_tester_tval = mp_ptr->spell_book; else item_tester_hook = item_tester_learn_spell; - /* Get an item */ q = _("どの本から学びますか? ", "Study which book? "); s = _("読める本がない。", "You have no books that you can read."); @@ -985,7 +983,6 @@ void do_cmd_cast(void) /* Restrict choices to spell books */ item_tester_tval = mp_ptr->spell_book; - /* Get an item */ q = _("どの呪文書を使いますか? ", "Use which book? "); s = _("呪文書がない!", "You have no spell books!"); diff --git a/src/floor-save.c b/src/floor-save.c index 952fe4c5e..b34ec3800 100644 --- a/src/floor-save.c +++ b/src/floor-save.c @@ -471,7 +471,6 @@ static void preserve_pet(void) msg_format(_("%sは消え去った!", "%^s disappears!"), m_name); } - delete_monster_idx(i); } } @@ -675,8 +674,8 @@ static void get_out_monster(void) { int tries = 0; POSITION dis = 1; - int oy = p_ptr->y; - int ox = p_ptr->x; + POSITION oy = p_ptr->y; + POSITION ox = p_ptr->x; MONSTER_IDX m_idx = cave[oy][ox].m_idx; /* Nothing to do if no monster */ @@ -688,8 +687,8 @@ static void get_out_monster(void) monster_type *m_ptr; /* Pick a (possibly illegal) location */ - int ny = rand_spread(oy, dis); - int nx = rand_spread(ox, dis); + POSITION ny = rand_spread(oy, dis); + POSITION nx = rand_spread(ox, dis); tries++; @@ -850,7 +849,7 @@ void leave_floor(void) cave_type *c_ptr = NULL; feature_type *f_ptr; saved_floor_type *sf_ptr; - int quest_r_idx = 0; + MONRACE_IDX quest_r_idx = 0; DUNGEON_IDX i; /* Preserve pets and prepare to take these to next floor */ diff --git a/src/hissatsu.c b/src/hissatsu.c index b3a2477bf..6e04464f1 100644 --- a/src/hissatsu.c +++ b/src/hissatsu.c @@ -437,7 +437,6 @@ void do_cmd_gain_hissatsu(void) item_tester_tval = TV_HISSATSU_BOOK; - /* Get an item */ q = _("どの書から学びますか? ", "Study which book? "); s = _("読める書がない。", "You have no books that you can read."); diff --git a/src/object2.c b/src/object2.c index 00ad13f8a..d486eb35c 100644 --- a/src/object2.c +++ b/src/object2.c @@ -7625,7 +7625,6 @@ static void drain_essence(void) item_tester_hook = object_is_weapon_armour_ammo; item_tester_no_ryoute = TRUE; - /* Get an item */ q = _("どのアイテムから抽出しますか?", "Extract from which item? "); s = _("抽出できるアイテムがありません。", "You have nothing you can extract from."); @@ -8244,7 +8243,6 @@ static void add_essence(ESSENCE_IDX mode) item_tester_hook = object_is_weapon_armour_ammo; item_tester_no_ryoute = TRUE; - /* Get an item */ q = _("どのアイテムを改良しますか?", "Improve which item? "); s = _("改良できるアイテムがありません。", "You have nothing to improve."); @@ -8482,7 +8480,6 @@ static void erase_essence(void) item_tester_hook = object_is_smith; - /* Get an item */ q = _("どのアイテムのエッセンスを消去しますか?", "Remove from which item? "); s = _("エッセンスを付加したアイテムがありません。", "You have nothing to remove essence."); diff --git a/src/racial.c b/src/racial.c index fa0f70635..d47433c2a 100644 --- a/src/racial.c +++ b/src/racial.c @@ -136,7 +136,6 @@ static bool do_cmd_archer(void) item_tester_hook = item_tester_hook_convertible; - /* Get an item */ q = _("どのアイテムから作りますか? ", "Convert which item? "); s = _("材料を持っていない。", "You have no item to convert."); if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return FALSE; @@ -195,7 +194,6 @@ static bool do_cmd_archer(void) item_tester_hook = item_tester_hook_convertible; - /* Get an item */ q = _("どのアイテムから作りますか? ", "Convert which item? "); s = _("材料を持っていない。", "You have no item to convert."); if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return FALSE; @@ -264,7 +262,6 @@ bool gain_magic(void) /* Only accept legal items */ item_tester_hook = item_tester_hook_recharge; - /* Get an item */ q = _("どのアイテムの魔力を取り込みますか? ", "Gain power of which item? "); s = _("魔力を取り込めるアイテムがない。", "You have nothing to gain power."); diff --git a/src/spells2.c b/src/spells2.c index 904d20112..261ce696a 100644 --- a/src/spells2.c +++ b/src/spells2.c @@ -5168,7 +5168,6 @@ bool psychometry(void) bool okay = FALSE; item_tester_no_ryoute = TRUE; - /* Get an item */ q = _("どのアイテムを調べますか?", "Meditate on which item? "); s = _("調べるアイテムがありません。", "You have nothing appropriate."); diff --git a/src/spells3.c b/src/spells3.c index 716cd2c2a..89adb98c4 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -1214,7 +1214,6 @@ void brand_weapon(int brand_type) item_tester_hook = object_allow_enchant_melee_weapon; item_tester_no_ryoute = TRUE; - /* Get an item */ q = _("どの武器を強化しますか? ", "Enchant which weapon? "); s = _("強化できる武器がない。", "You have nothing to enchant."); @@ -1951,7 +1950,6 @@ bool alchemy(void) /* Hack -- force destruction */ if (command_arg > 0) force = TRUE; - /* Get an item */ q = _("どのアイテムを金に変えますか?", "Turn which item to gold? "); s = _("金に変えられる物がありません。", "You have nothing to turn to gold."); @@ -2216,7 +2214,6 @@ bool enchant_spell(HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac) /* Enchant armor if requested */ if (num_ac) item_tester_hook = object_is_armour; - /* Get an item */ q = _("どのアイテムを強化しますか? ", "Enchant which item? "); s = _("強化できるアイテムがない。", "You have nothing to enchant."); @@ -2292,7 +2289,6 @@ bool artifact_scroll(void) /* Enchant weapon/armour */ item_tester_hook = item_tester_hook_nameless_weapon_armour; - /* Get an item */ q = _("どのアイテムを強化しますか? ", "Enchant which item? "); s = _("強化できるアイテムがない。", "You have nothing to enchant."); @@ -2502,7 +2498,6 @@ bool ident_spell(bool only_equip) q = _("すべて鑑定済みです。 ", "All items are identified. "); } - /* Get an item */ s = _("鑑定するべきアイテムがない。", "You have nothing to identify."); if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return (FALSE); @@ -2568,7 +2563,6 @@ bool mundane_spell(bool only_equip) if (only_equip) item_tester_hook = object_is_weapon_armour_ammo; item_tester_no_ryoute = TRUE; - /* Get an item */ q = _("どれを使いますか?", "Use which item? "); s = _("使えるものがありません。", "You have nothing you can use."); @@ -2648,7 +2642,6 @@ bool identify_fully(bool only_equip) q = _("すべて*鑑定*済みです。 ", "All items are *identified*. "); } - /* Get an item */ s = _("*鑑定*するべきアイテムがない。", "You have nothing to *identify*."); if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return (FALSE); @@ -2742,7 +2735,6 @@ bool recharge(int power) /* Only accept legal items */ item_tester_hook = item_tester_hook_recharge; - /* Get an item */ q = _("どのアイテムに魔力を充填しますか? ", "Recharge which item? "); s = _("魔力を充填すべきアイテムがない。", "You have nothing to recharge."); @@ -3028,7 +3020,6 @@ bool bless_weapon(void) /* Bless only weapons */ item_tester_hook = object_is_weapon; - /* Get an item */ q = _("どのアイテムを祝福しますか?", "Bless which weapon? "); s = _("祝福できる武器がありません。", "You have weapon to bless."); @@ -3209,7 +3200,6 @@ bool pulish_shield(void) /* Assume enchant weapon */ item_tester_tval = TV_SHIELD; - /* Get an item */ q = _("どの盾を磨きますか?", "Pulish which weapon? "); s = _("磨く盾がありません。", "You have weapon to pulish."); @@ -4695,7 +4685,6 @@ bool rustproof(void) /* Select a piece of armour */ item_tester_hook = object_is_armour; - /* Get an item */ q = _("どの防具に錆止めをしますか?", "Rustproof which piece of armour? "); s = _("錆止めできるものがありません。", "You have nothing to rustproof."); @@ -5204,7 +5193,6 @@ bool eat_magic(int power) item_tester_hook = item_tester_hook_recharge; - /* Get an item */ q = _("どのアイテムから魔力を吸収しますか?", "Drain which item? "); s = _("魔力を吸収できるアイテムがありません。", "You have nothing to drain."); diff --git a/src/store.c b/src/store.c index c3bfc15db..31fa96e24 100644 --- a/src/store.c +++ b/src/store.c @@ -3920,7 +3920,6 @@ static void store_sell(void) /* Only allow items the store will buy */ item_tester_hook = store_will_buy; - /* Get an item */ /* 我が家でおかしなメッセージが出るオリジナルのバグを修正 */ if (cur_store_num == STORE_HOME) { diff --git a/src/wizard2.c b/src/wizard2.c index 33d3c253b..84a565f7b 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -1284,7 +1284,6 @@ static void do_cmd_wiz_play(void) cptr q, s; item_tester_no_ryoute = TRUE; - /* Get an item */ q = "Play with which object? "; s = "You have nothing to play with."; if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return; -- 2.11.0