/*
* Choose an item and get auto-picker entry from it.
*/
-static object_type *choose_object(cptr q, cptr s)
-{
- OBJECT_IDX item;
-
- if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR | USE_EQUIP))) return NULL;
-
- /* Get the item (in the pack) */
- if (item >= 0) return &inventory[item];
-
- /* Get the item (on the floor) */
- else return &o_list[0 - item];
-}
-
-
-/*
- * Choose an item and get auto-picker entry from it.
- */
static bool entry_from_choosed_object(autopick_type *entry)
{
object_type *o_ptr;
cptr q, s;
-#ifdef JP
- q = "どのアイテムを登録しますか? ";
- s = "アイテムを持っていない。";
-#else
- q = "Enter which item? ";
- s = "You have nothing to enter.";
-#endif
- o_ptr = choose_object(q, s);
+ q = _("どのアイテムを登録しますか? ", "Enter which item? ");
+ s = _("アイテムを持っていない。", "You have nothing to enter.");
+ o_ptr = choose_object(NULL, q, s, USE_INVEN | USE_FLOOR | USE_EQUIP);
if (!o_ptr) return FALSE;
autopick_entry_from_object(entry, o_ptr);
object_type *o_ptr;
cptr q, s;
-#ifdef JP
- q = "どのアイテムを検索しますか? ";
- s = "アイテムを持っていない。";
-#else
- q = "Enter which item? ";
- s = "You have nothing to enter.";
-#endif
- o_ptr = choose_object(q, s);
+ q = _("どのアイテムを検索しますか? ", "Enter which item? ");
+ s = _("アイテムを持っていない。", "You have nothing to enter.");
+ o_ptr = choose_object(NULL, q, s, USE_INVEN | USE_FLOOR | USE_EQUIP);
if (!o_ptr) return 0;
*o_handle = o_ptr;
if (com_id) quit = do_editor_command(tb, com_id);
} /* while (TRUE) */
-
- /* Restore the screen */
screen_load();
/* Get the filename of preference */