OSDN Git Service

[Refactor] #38824 get_item() を choose_object() に置換中。 / Replacing get_item() to choose...
[hengband/hengband.git] / src / object1.c
index b4160d0..844849b 100644 (file)
@@ -29,9 +29,9 @@
  * flag.  This is useful for switching "graphics" on/off.\n
  *\n
  * The features, objects, and monsters, should all be encoded in the\n
- * relevant "font.pref" and/or "graf.prf" files.  XXX XXX XXX\n
+ * relevant "font.pref" and/or "graf.prf" files.  \n
  *\n
- * The "prefs" parameter is no longer meaningful.  XXX XXX XXX\n
+ * The "prefs" parameter is no longer meaningful.  \n
  */
 void reset_visuals(void)
 {
@@ -107,7 +107,7 @@ void reset_visuals(void)
  * @param flgs フラグ情報を受け取る配列
  * @return なし
  */
-void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
+void object_flags(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE])
 {
        object_kind *k_ptr = &k_info[o_ptr->k_idx];
        int i;
@@ -216,7 +216,7 @@ void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
  * @param flgs フラグ情報を受け取る配列
  * @return なし
  */
-void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
+void object_flags_known(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE])
 {
        bool spoil = FALSE;
        int i;
@@ -344,7 +344,7 @@ void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
 static cptr item_activation_dragon_breath(object_type *o_ptr)
 {
        static char desc[256];
-       u32b flgs[TR_FLAG_SIZE]; /* for resistance flags */
+       BIT_FLAGS flgs[TR_FLAG_SIZE]; /* for resistance flags */
        int i, n = 0;
 
        object_flags(o_ptr, flgs);
@@ -473,7 +473,7 @@ static cptr item_activation_aux(object_type *o_ptr)
  */
 cptr item_activation(object_type *o_ptr)
 {
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
 
        /* Extract the flags */
        object_flags(o_ptr, flgs);
@@ -498,7 +498,6 @@ cptr item_activation(object_type *o_ptr)
                return _("モンスターを捕える、又は解放する。", "captures or releases a monster.");
        }
 
-       /* Oops */
        return _("何も起きない", "Nothing");
 }
 
@@ -514,11 +513,11 @@ bool screen_object(object_type *o_ptr, BIT_FLAGS mode)
 {
        int i = 0, j, k;
 
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
 
        char temp[70 * 20];
        cptr            info[128];
-       char o_name[MAX_NLEN];
+       GAME_TEXT o_name[MAX_NLEN];
        int wid, hgt;
        POSITION rad;
        char desc[256];
@@ -1234,11 +1233,8 @@ bool screen_object(object_type *o_ptr, BIT_FLAGS mode)
 
        /* No relevant informations */
        if (i <= trivial_info) return (FALSE);
-
-       /* Save the screen */
        screen_save();
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Display Item name */
@@ -1285,8 +1281,6 @@ bool screen_object(object_type *o_ptr, BIT_FLAGS mode)
        prt(_("[何かキーを押すとゲームに戻ります]", "[Press any key to continue]"), k, 15);
 
        inkey();
-
-       /* Restore the screen */
        screen_load();
 
        /* Gave knowledge */
@@ -1489,24 +1483,9 @@ cptr mention_use(int i)
                case INVEN_LARM:  p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
 #endif
 
-#ifdef JP
-               case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "運搬中" : "射撃用"; break;
-#else
-               case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
-#endif
-
-#ifdef JP
-               case INVEN_RIGHT: p = (left_hander ? "左手指" : "右手指"); break;
-#else
-               case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
-#endif
-
-#ifdef JP
-               case INVEN_LEFT:  p = (left_hander ? "右手指" : "左手指"); break;
-#else
-               case INVEN_LEFT:  p = (left_hander ? "On right hand" : "On left hand"); break;
-#endif
-
+               case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? _("運搬中", "Just holding") : _("射撃用", "Shooting"); break;
+               case INVEN_RIGHT: p = (left_hander ? _("左手指", "On left hand") : _("右手指", "On right hand")); break;
+               case INVEN_LEFT:  p = (left_hander ? _("右手指", "On right hand") : _("左手指", "On left hand")); break;
                case INVEN_NECK:  p = _("  首", "Around neck"); break;
                case INVEN_LITE:  p = _(" 光源", "Light source"); break;
                case INVEN_BODY:  p = _("  体", "On body"); break;
@@ -1548,24 +1527,9 @@ cptr describe_use(int i)
                case INVEN_LARM:  p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
 #endif
 
-#ifdef JP
-               case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "持つだけで精一杯の" : "射撃用に装備している"; break;
-#else
-               case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
-#endif
-
-#ifdef JP
-               case INVEN_RIGHT: p = (left_hander ? "左手の指にはめている" : "右手の指にはめている"); break;
-#else
-               case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
-#endif
-
-#ifdef JP
-               case INVEN_LEFT:  p = (left_hander ? "右手の指にはめている" : "左手の指にはめている"); break;
-#else
-               case INVEN_LEFT:  p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
-#endif
-
+               case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? _("持つだけで精一杯の", "just holding") : _("射撃用に装備している", "shooting missiles with"); break;
+               case INVEN_RIGHT: p = (left_hander ? _("左手の指にはめている", "wearing on your left hand") : _("右手の指にはめている", "wearing on your right hand")); break;
+               case INVEN_LEFT:  p = (left_hander ? _("右手の指にはめている", "wearing on your right hand") : _("左手の指にはめている", "wearing on your left hand")); break;
                case INVEN_NECK:  p = _("首にかけている", "wearing around your neck"); break;
                case INVEN_LITE:  p = _("光源にしている", "using to light the way"); break;
                case INVEN_BODY:  p = _("体に着ている", "wearing on your body"); break;
@@ -1613,7 +1577,7 @@ bool check_book_realm(const OBJECT_TYPE_VALUE book_tval, const OBJECT_SUBTYPE_VA
 bool item_tester_okay(object_type *o_ptr)
 {
        /* Hack -- allow listing empty slots */
-       if (item_tester_full) return (TRUE);
+       // if (item_tester_full) return (TRUE); // TODO:DELETE
 
        /* Require an item */
        if (!o_ptr->k_idx) return (FALSE);
@@ -1656,14 +1620,13 @@ bool item_tester_okay(object_type *o_ptr)
  */
 void display_inven(void)
 {
-       register        int i, n, z = 0;
-       object_type     *o_ptr;
-       byte            attr = TERM_WHITE;
-       char            tmp_val[80];
-       char            o_name[MAX_NLEN];
-       int             wid, hgt;
+       register int i, n, z = 0;
+       object_type *o_ptr;
+       TERM_COLOR attr = TERM_WHITE;
+       char tmp_val[80];
+       GAME_TEXT o_name[MAX_NLEN];
+       TERM_LEN wid, hgt;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Find the "final" slot */
@@ -1726,7 +1689,7 @@ void display_inven(void)
                {
                        int wgt = o_ptr->weight * o_ptr->number;
 #ifdef JP
-                       sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
+                       sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt), lbtokg2(wgt));
 #else
                        sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
 #endif
@@ -1752,17 +1715,15 @@ void display_inven(void)
  */
 void display_equip(void)
 {
-       register        int i, n;
-       object_type     *o_ptr;
-       byte            attr = TERM_WHITE;
-       char            tmp_val[80];
-       char            o_name[MAX_NLEN];
-       int             wid, hgt;
+       register int i, n;
+       object_type *o_ptr;
+       TERM_COLOR attr = TERM_WHITE;
+       char tmp_val[80];
+       GAME_TEXT o_name[MAX_NLEN];
+       TERM_LEN wid, hgt;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
-       /* Display the equipment */
        for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
        {
                /* Examine the item */
@@ -1893,7 +1854,7 @@ static bool get_tag(COMMAND_CODE *cp, char tag, BIT_FLAGS mode)
                if (!o_ptr->inscription) continue;
 
                /* Skip non-choice */
-               if (!item_tester_okay(o_ptr)) continue;
+               if (!item_tester_okay(o_ptr) && !(mode & USE_FULL)) continue;
 
                /* Find a '@' */
                s = my_strchr(quark_str(o_ptr->inscription), '@');
@@ -1938,7 +1899,7 @@ static bool get_tag(COMMAND_CODE *cp, char tag, BIT_FLAGS mode)
                if (!o_ptr->inscription) continue;
 
                /* Skip non-choice */
-               if (!item_tester_okay(o_ptr)) continue;
+               if (!item_tester_okay(o_ptr) && !(mode & USE_FULL)) continue;
 
                /* Find a '@' */
                s = my_strchr(quark_str(o_ptr->inscription), '@');
@@ -2142,25 +2103,24 @@ static void prepare_label_string_floor(char *label, FLOOR_IDX floor_list[], ITEM
  * @details
  * Hack -- do not display "trailing" empty slots
  */
-COMMAND_CODE show_inven(int target_item)
+COMMAND_CODE show_inven(int target_item, BIT_FLAGS mode)
 {
        COMMAND_CODE i;
        int j, k, l, z = 0;
        int             col, cur_col, len;
        object_type     *o_ptr;
-       char            o_name[MAX_NLEN];
+       GAME_TEXT o_name[MAX_NLEN];
        char            tmp_val[80];
-       COMMAND_CODE out_index[23];
-       byte            out_color[23];
+       COMMAND_CODE    out_index[23];
+       TERM_COLOR      out_color[23];
        char            out_desc[23][MAX_NLEN];
        COMMAND_CODE target_item_label = 0;
        TERM_LEN wid, hgt;
-       char            inven_label[52 + 1];
+       char inven_label[52 + 1];
 
        /* Starting column */
        col = command_gap;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Default "max-length" */
@@ -2187,9 +2147,8 @@ COMMAND_CODE show_inven(int target_item)
                o_ptr = &inventory[i];
 
                /* Is this item acceptable? */
-               if (!item_tester_okay(o_ptr)) continue;
+               if (!item_tester_okay(o_ptr) && !(mode & USE_FULL)) continue;
 
-               /* Describe the object */
                object_desc(o_name, o_ptr, 0);
 
                /* Save the object index, color, and description */
@@ -2233,7 +2192,6 @@ COMMAND_CODE show_inven(int target_item)
                /* Get the index */
                i = out_index[j];
 
-               /* Get the item */
                o_ptr = &inventory[i];
 
                /* Clear the line */
@@ -2309,16 +2267,16 @@ COMMAND_CODE show_inven(int target_item)
  * @param target_item アイテムの選択処理を行うか否か。
  * @return 選択したアイテムのタグ
  */
-COMMAND_CODE show_equip(int target_item)
+COMMAND_CODE show_equip(int target_item, BIT_FLAGS mode)
 {
        COMMAND_CODE i;
        int j, k, l;
        int             col, cur_col, len;
        object_type     *o_ptr;
        char            tmp_val[80];
-       char            o_name[MAX_NLEN];
-       COMMAND_CODE out_index[23];
-       byte            out_color[23];
+       GAME_TEXT o_name[MAX_NLEN];
+       COMMAND_CODE    out_index[23];
+       TERM_COLOR      out_color[23];
        char            out_desc[23][MAX_NLEN];
        COMMAND_CODE target_item_label = 0;
        TERM_LEN wid, hgt;
@@ -2327,7 +2285,6 @@ COMMAND_CODE show_equip(int target_item)
        /* Starting column */
        col = command_gap;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Maximal length */
@@ -2340,20 +2297,16 @@ COMMAND_CODE show_equip(int target_item)
                o_ptr = &inventory[i];
 
                /* Is this item acceptable? */
-               if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
+               if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr) || (mode & USE_FULL)) &&
                    (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
-                    item_tester_no_ryoute)) continue;
+                               (mode & IGNORE_BOTHHAND_SLOT))) continue;
 
                /* Description */
                object_desc(o_name, o_ptr, 0);
 
                if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
                {
-#ifdef JP
-                       (void)strcpy(out_desc[k],"(武器を両手持ち)");
-#else
-                       (void)strcpy(out_desc[k],"(wielding with two-hands)");
-#endif
+                       (void)strcpy(out_desc[k],_("(武器を両手持ち)", "(wielding with two-hands)"));
                        out_color[k] = TERM_WHITE;
                }
                else
@@ -2412,7 +2365,6 @@ COMMAND_CODE show_equip(int target_item)
                /* Get the index */
                i = out_index[j];
 
-               /* Get the item */
                o_ptr = &inventory[i];
 
                /* Clear the line */
@@ -2518,7 +2470,6 @@ void toggle_inven_equip(void)
                        window_flag[j] &= ~(PW_INVEN);
                        window_flag[j] |= (PW_EQUIP);
 
-                       /* Window stuff */
                        p_ptr->window |= (PW_EQUIP);
                }
 
@@ -2529,7 +2480,6 @@ void toggle_inven_equip(void)
                        window_flag[j] &= ~(PW_EQUIP);
                        window_flag[j] |= (PW_INVEN);
 
-                       /* Window stuff */
                        p_ptr->window |= (PW_INVEN);
                }
        }
@@ -2545,7 +2495,7 @@ void toggle_inven_equip(void)
  */
 static bool verify(cptr prompt, INVENTORY_IDX item)
 {
-       char        o_name[MAX_NLEN];
+       GAME_TEXT o_name[MAX_NLEN];
        char        out_val[MAX_NLEN+20];
        object_type *o_ptr;
 
@@ -2561,8 +2511,6 @@ static bool verify(cptr prompt, INVENTORY_IDX item)
        {
                o_ptr = &o_list[0 - item];
        }
-
-       /* Describe */
        object_desc(o_name, o_ptr, 0);
 
        /* Prompt */
@@ -2583,9 +2531,7 @@ static bool verify(cptr prompt, INVENTORY_IDX item)
 static bool get_item_allow(INVENTORY_IDX item)
 {
        cptr s;
-
        object_type *o_ptr;
-
        if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
 
        /* Inventory */
@@ -2749,38 +2695,25 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        char tmp_val[160];
        char out_val[160];
 
-       /* See cmd5.c */
-       extern bool select_the_force;
-
        int menu_line = (use_menu ? 1 : 0);
        int max_inven = 0;
        int max_equip = 0;
 
-#ifdef ALLOW_REPEAT
-
        static char prev_tag = '\0';
        char cur_tag = '\0';
 
-#endif /* ALLOW_REPEAT */
-
-#ifdef ALLOW_EASY_FLOOR /* TNB */
-
        if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
 
-#endif /* ALLOW_EASY_FLOOR -- TNB */
-
        /* Extract args */
        if (mode & USE_EQUIP) equip = TRUE;
        if (mode & USE_INVEN) inven = TRUE;
        if (mode & USE_FLOOR) floor = TRUE;
 
-#ifdef ALLOW_REPEAT
-
        /* Get the item index */
        if (repeat_pull(cp))
        {
                /* the_force */
-               if (select_the_force && (*cp == INVEN_FORCE))
+               if (mode & USE_FORCE && (*cp == INVEN_FORCE))
                {
                        item_tester_tval = 0;
                        item_tester_hook = NULL;
@@ -2795,12 +2728,10 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
 
                        /* Special index */
                        k = 0 - (*cp);
-
-                       /* Acquire object */
                        o_ptr = &o_list[k];
 
                        /* Validate the item */
-                       if (item_tester_okay(o_ptr))
+                       if (item_tester_okay(o_ptr) || (mode & USE_FULL))
                        {
                                /* Forget restrictions */
                                item_tester_tval = 0;
@@ -2852,13 +2783,9 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                }
        }
 
-#endif /* ALLOW_REPEAT */
-
-
-       /* Paranoia XXX XXX XXX */
+       /* Paranoia */
        msg_print(NULL);
 
-
        /* Not done */
        done = FALSE;
 
@@ -2875,7 +2802,7 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        else if (use_menu)
        {
                for (j = 0; j < INVEN_PACK; j++)
-                       if (item_tester_okay(&inventory[j])) max_inven++;
+                       if (item_tester_okay(&inventory[j]) || (mode & USE_FULL)) max_inven++;
        }
 
        /* Restrict inventory indexes */
@@ -2892,15 +2819,15 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        else if (use_menu)
        {
                for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
-                       if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
-               if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
+                       if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j]) || (mode & USE_FULL)) max_equip++;
+               if (p_ptr->ryoute && !(mode & IGNORE_BOTHHAND_SLOT)) max_equip++;
        }
 
        /* Restrict equipment indexes */
        while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
        while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
 
-       if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
+       if (equip && p_ptr->ryoute && !(mode & IGNORE_BOTHHAND_SLOT))
        {
                if (p_ptr->migite)
                {
@@ -2917,15 +2844,13 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                for (this_o_idx = cave[p_ptr->y][p_ptr->x].o_idx; this_o_idx; this_o_idx = next_o_idx)
                {
                        object_type *o_ptr;
-
-                       /* Acquire object */
                        o_ptr = &o_list[this_o_idx];
 
                        /* Acquire next object */
                        next_o_idx = o_ptr->next_o_idx;
 
                        /* Accept the item on the floor if legal */
-                       if (item_tester_okay(o_ptr) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
+                       if ((item_tester_okay(o_ptr) || (mode & USE_FULL)) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
                }
        }
 
@@ -2934,14 +2859,10 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        {
                /* Cancel p_ptr->command_see */
                command_see = FALSE;
-
-               /* Oops */
                oops = TRUE;
-
-               /* Done */
                done = TRUE;
 
-               if (select_the_force) {
+               if (mode & USE_FORCE) {
                    *cp = INVEN_FORCE;
                    item = TRUE;
                }
@@ -2984,7 +2905,6 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        /* Hack -- start out in "display" mode */
        if (command_see)
        {
-               /* Save screen */
                screen_save();
        }
 
@@ -3012,8 +2932,7 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                }
 
                /* Toggle if needed */
-               if ((command_wrk && ni && !ne) ||
-                   (!command_wrk && !ni && ne))
+               if ((command_wrk && ni && !ne) || (!command_wrk && !ni && ne))
                {
                        /* Toggle */
                        toggle_inven_equip();
@@ -3022,25 +2941,21 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                        toggle = !toggle;
                }
 
-               /* Update */
                p_ptr->window |= (PW_INVEN | PW_EQUIP);
-
-               /* Redraw windows */
-               window_stuff();
-
+               handle_stuff();
 
                /* Inventory screen */
                if (!command_wrk)
                {
                        /* Redraw if needed */
-                       if (command_see) get_item_label = show_inven(menu_line);
+                       if (command_see) get_item_label = show_inven(menu_line, mode);
                }
 
                /* Equipment screen */
                else
                {
                        /* Redraw if needed */
-                       if (command_see) get_item_label = show_equip(menu_line);
+                       if (command_see) get_item_label = show_equip(menu_line, mode);
                }
 
                /* Viewing inventory */
@@ -3064,11 +2979,7 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                        if (!command_see && !use_menu) strcat(out_val, _(" '*'一覧,", " * to see,"));
 
                        /* Append */
-#ifdef JP
-                       if (equip) strcat(out_val, format(" %s 装備品,", use_menu ? "'4'or'6'" : "'/'"));
-#else
-                       if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
-#endif
+                       if (equip) strcat(out_val, format(_(" %s 装備品,", " %s for Equip,"), use_menu ? _("'4'or'6'", "4 or 6") : _("'/'", "/")));
                }
 
                /* Viewing equipment */
@@ -3092,16 +3003,12 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                        if (!command_see && !use_menu) strcat(out_val, _(" '*'一覧,", " * to see,"));
 
                        /* Append */
-#ifdef JP
-                       if (inven) strcat(out_val, format(" %s 持ち物,", use_menu ? "'4'or'6'" : "'/'"));
-#else
-                       if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
-#endif
+                       if (inven) strcat(out_val, format(_(" %s 持ち物,", " %s for Inven,"), use_menu ? _("'4'or'6'", "4 or 6") : _("'/'", "'/'")));
                }
 
                /* Indicate legality of the "floor" item */
                if (allow_floor) strcat(out_val, _(" '-'床上,", " - for floor,"));
-               if (select_the_force) strcat(out_val, _(" 'w'練気術,", " w for the Force,"));
+               if (mode & USE_FORCE) strcat(out_val, _(" 'w'練気術,", " w for the Force,"));
 
                /* Finish the prompt */
                strcat(out_val, " ESC");
@@ -3162,10 +3069,7 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                /* Hack -- Fix screen */
                                if (command_see)
                                {
-                                       /* Load screen */
                                        screen_load();
-
-                                       /* Save screen */
                                        screen_save();
                                }
 
@@ -3214,7 +3118,7 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                        }
                        case 'w':
                        {
-                               if (select_the_force) {
+                               if (mode & USE_FORCE) {
                                        *cp = INVEN_FORCE;
                                        item = TRUE;
                                        done = TRUE;
@@ -3244,15 +3148,12 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                {
                                        /* Flip flag */
                                        command_see = FALSE;
-
-                                       /* Load screen */
                                        screen_load();
                                }
 
                                /* Show the list */
                                else
                                {
-                                       /* Save screen */
                                        screen_save();
 
                                        /* Flip flag */
@@ -3273,10 +3174,7 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                /* Hack -- Fix screen */
                                if (command_see)
                                {
-                                       /* Load screen */
                                        screen_load();
-
-                                       /* Save screen */
                                        screen_save();
                                }
 
@@ -3296,15 +3194,13 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                        for (this_o_idx = cave[p_ptr->y][p_ptr->x].o_idx; this_o_idx; this_o_idx = next_o_idx)
                                        {
                                                object_type *o_ptr;
-
-                                               /* Acquire object */
                                                o_ptr = &o_list[this_o_idx];
 
                                                /* Acquire next object */
                                                next_o_idx = o_ptr->next_o_idx;
 
                                                /* Validate the item */
-                                               if (!item_tester_okay(o_ptr)) continue;
+                                               if (!item_tester_okay(o_ptr) && !(mode & USE_FULL)) continue;
 
                                                /* Special index */
                                                k = 0 - this_o_idx;
@@ -3326,7 +3222,6 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                        if (done) break;
                                }
 
-                               /* Oops */
                                bell();
                                break;
                        }
@@ -3368,9 +3263,7 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                (*cp) = k;
                                item = TRUE;
                                done = TRUE;
-#ifdef ALLOW_REPEAT
                                cur_tag = which;
-#endif /* ALLOW_REPEAT */
                                break;
                        }
 
@@ -3414,7 +3307,7 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
 
                        case 'w':
                        {
-                               if (select_the_force) {
+                               if (mode & USE_FORCE) {
                                        *cp = INVEN_FORCE;
                                        item = TRUE;
                                        done = TRUE;
@@ -3453,9 +3346,7 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                        (*cp) = k;
                                        item = TRUE;
                                        done = TRUE;
-#ifdef ALLOW_REPEAT
                                        cur_tag = which;
-#endif /* ALLOW_REPEAT */
                                        break;
                                }
 
@@ -3514,7 +3405,6 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        /* Fix the screen if necessary */
        if (command_see)
        {
-               /* Load screen */
                screen_load();
 
                /* Hack -- Cancel "display" */
@@ -3525,8 +3415,6 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        /* Forget the item_tester_tval restriction */
        item_tester_tval = 0;
 
-       item_tester_no_ryoute = FALSE;
-
        /* Forget the item_tester_hook restriction */
        item_tester_hook = NULL;
 
@@ -3535,12 +3423,8 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        /* Toggle again if needed */
        if (toggle) toggle_inven_equip();
 
-       /* Update */
        p_ptr->window |= (PW_INVEN | PW_EQUIP);
-
-       /* Window stuff */
-       window_stuff();
-
+       handle_stuff();
 
        /* Clear the prompt line */
        prt("", 0, 0);
@@ -3550,20 +3434,31 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
 
        if (item)
        {
-#ifdef ALLOW_REPEAT
                repeat_push(*cp);
                if (command_cmd) prev_tag = cur_tag;
-#endif /* ALLOW_REPEAT */
-
                command_cmd = 0; /* Hack -- command_cmd is no longer effective */
        }
-
-       /* Result */
        return (item);
 }
 
+/*
+ * Choose an item and get auto-picker entry from it.
+ */
+object_type *choose_object(OBJECT_IDX *idx, cptr q, cptr s, BIT_FLAGS option)
+{
+       OBJECT_IDX item;
+       if (!get_item(&item, q, s, option)) return NULL;
+       if (idx) *idx = item;
+
+       if (item == INVEN_FORCE) return NULL;
+
+       /* Get the item (in the pack) */
+       else if (item >= 0) return &inventory[item];
+
+       /* Get the item (on the floor) */
+       else return &o_list[0 - item];
+}
 
-#ifdef ALLOW_EASY_FLOOR
 
 /*!
  * @brief 床下に落ちているオブジェクトの数を返す / scan_floor
@@ -3593,8 +3488,6 @@ ITEM_NUMBER scan_floor(OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode
        for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
        {
                object_type *o_ptr;
-
-               /* Acquire object */
                o_ptr = &o_list[this_o_idx];
 
                /* Acquire next object */
@@ -3616,8 +3509,6 @@ ITEM_NUMBER scan_floor(OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode
                /* Only one */
                if (mode & 0x04) break;
        }
-
-       /* Result */
        return num;
 }
 
@@ -3639,11 +3530,11 @@ COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_LEN *min_w
 
        object_type *o_ptr;
 
-       char o_name[MAX_NLEN];
+       GAME_TEXT o_name[MAX_NLEN];
        char tmp_val[80];
 
        COMMAND_CODE out_index[23];
-       byte out_color[23];
+       TERM_COLOR out_color[23];
        char out_desc[23][MAX_NLEN];
        COMMAND_CODE target_item_label = 0;
 
@@ -3654,13 +3545,11 @@ COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_LEN *min_w
 
        bool dont_need_to_show_weights = TRUE;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Default length */
        len = MAX((*min_width), 20);
 
-
        /* Scan for objects in the grid, using item_tester_okay() */
        floor_num = scan_floor(floor_list, y, x, 0x03);
 
@@ -3669,7 +3558,6 @@ COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_LEN *min_w
        {
                o_ptr = &o_list[floor_list[i]];
 
-               /* Describe the object */
                object_desc(o_name, o_ptr, 0);
 
                /* Save the index */
@@ -3712,7 +3600,6 @@ COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_LEN *min_w
                /* Get the index */
                m = floor_list[out_index[j]];
 
-               /* Get the item */
                o_ptr = &o_list[m];
 
                /* Clear the line */
@@ -3785,6 +3672,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
        bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
        bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
+       bool force = (mode & USE_FORCE) ? TRUE : FALSE;
 
        bool allow_equip = FALSE;
        bool allow_inven = FALSE;
@@ -3800,14 +3688,10 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        int floor_top = 0;
        TERM_LEN min_width = 0;
 
-       extern bool select_the_force;
-
        int menu_line = (use_menu ? 1 : 0);
        int max_inven = 0;
        int max_equip = 0;
 
-#ifdef ALLOW_REPEAT
-
        static char prev_tag = '\0';
        char cur_tag = '\0';
 
@@ -3815,7 +3699,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        if (repeat_pull(cp))
        {
                /* the_force */
-               if (select_the_force && (*cp == INVEN_FORCE))
+               if (force && (*cp == INVEN_FORCE))
                {
                        item_tester_tval = 0;
                        item_tester_hook = NULL;
@@ -3850,7 +3734,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                        }
 
                        /* Validate the item */
-                       else if (item_tester_okay(&o_list[0 - (*cp)]))
+                       else if (item_tester_okay(&o_list[0 - (*cp)]) || (mode & USE_FULL))
                        {
                                /* Forget restrictions */
                                item_tester_tval = 0;
@@ -3902,10 +3786,8 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                }
        }
 
-#endif /* ALLOW_REPEAT */
-
 
-       /* Paranoia XXX XXX XXX */
+       /* Paranoia */
        msg_print(NULL);
 
 
@@ -3925,7 +3807,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        else if (use_menu)
        {
                for (j = 0; j < INVEN_PACK; j++)
-                       if (item_tester_okay(&inventory[j])) max_inven++;
+                       if (item_tester_okay(&inventory[j]) || (mode & USE_FULL)) max_inven++;
        }
 
        /* Restrict inventory indexes */
@@ -3942,15 +3824,15 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        else if (use_menu)
        {
                for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
-                       if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
-               if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
+                       if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j]) || (mode & USE_FULL)) max_equip++;
+               if (p_ptr->ryoute && !(mode & IGNORE_BOTHHAND_SLOT)) max_equip++;
        }
 
        /* Restrict equipment indexes */
        while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
        while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
 
-       if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
+       if (equip && p_ptr->ryoute && !(mode & IGNORE_BOTHHAND_SLOT))
        {
                if (p_ptr->migite)
                {
@@ -3984,14 +3866,10 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        {
                /* Cancel p_ptr->command_see */
                command_see = FALSE;
-
-               /* Oops */
                oops = TRUE;
-
-               /* Done */
                done = TRUE;
 
-               if (select_the_force) {
+               if (force) {
                    *cp = INVEN_FORCE;
                    item = TRUE;
                }
@@ -4034,7 +3912,6 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        /* Hack -- start out in "display" mode */
        if (command_see)
        {
-               /* Save screen */
                screen_save();
        }
 
@@ -4071,11 +3948,8 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                        toggle = !toggle;
                }
 
-               /* Update */
                p_ptr->window |= (PW_INVEN | PW_EQUIP);
-
-               /* Redraw windows */
-               window_stuff();
+               handle_stuff();
 
                /* Inventory screen */
                if (command_wrk == (USE_INVEN))
@@ -4085,7 +3959,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                        n2 = I2A(i2);
 
                        /* Redraw if needed */
-                       if (command_see) get_item_label = show_inven(menu_line);
+                       if (command_see) get_item_label = show_inven(menu_line, mode);
                }
 
                /* Equipment screen */
@@ -4096,7 +3970,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                        n2 = I2A(e2 - INVEN_RARM);
 
                        /* Redraw if needed */
-                       if (command_see) get_item_label = show_equip(menu_line);
+                       if (command_see) get_item_label = show_equip(menu_line, mode);
                }
 
                /* Floor screen */
@@ -4135,41 +4009,23 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                        /* Append */
                        if (allow_equip)
                        {
-#ifdef JP
-                               if (!use_menu)
-                                       strcat(out_val, " '/' 装備品,");
-                               else if (allow_floor)
-                                       strcat(out_val, " '6' 装備品,");
-                               else
-                                       strcat(out_val, " '4'or'6' 装備品,");
-#else
                                if (!use_menu)
-                                       strcat(out_val, " / for Equip,");
+                                       strcat(out_val, _(" '/' 装備品,", " / for Equip,"));
                                else if (allow_floor)
-                                       strcat(out_val, " 6 for Equip,");
+                                       strcat(out_val, _(" '6' 装備品,", " 6 for Equip,"));
                                else
-                                       strcat(out_val, " 4 or 6 for Equip,");
-#endif
+                                       strcat(out_val, _(" '4'or'6' 装備品,", " 4 or 6 for Equip,"));
                        }
 
                        /* Append */
                        if (allow_floor)
                        {
-#ifdef JP
-                               if (!use_menu)
-                                       strcat(out_val, " '-'床上,");
-                               else if (allow_equip)
-                                       strcat(out_val, " '4' 床上,");
-                               else
-                                       strcat(out_val, " '4'or'6' 床上,");
-#else
                                if (!use_menu)
-                                       strcat(out_val, " - for floor,");
+                                       strcat(out_val, _(" '-'床上,", " - for floor,"));
                                else if (allow_equip)
-                                       strcat(out_val, " 4 for floor,");
+                                       strcat(out_val, _(" '4' 床上,", " 4 for floor,"));
                                else
-                                       strcat(out_val, " 4 or 6 for floor,");
-#endif
+                                       strcat(out_val, _(" '4'or'6' 床上,", " 4 or 6 for floor,"));
                        }
                }
 
@@ -4195,41 +4051,23 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                        /* Append */
                        if (allow_inven)
                        {
-#ifdef JP
-                               if (!use_menu)
-                                       strcat(out_val, " '/' 持ち物,");
-                               else if (allow_floor)
-                                       strcat(out_val, " '4' 持ち物,");
-                               else
-                                       strcat(out_val, " '4'or'6' 持ち物,");
-#else
                                if (!use_menu)
-                                       strcat(out_val, " / for Inven,");
+                                       strcat(out_val, _(" '/' 持ち物,", " / for Inven,"));
                                else if (allow_floor)
-                                       strcat(out_val, " 4 for Inven,");
+                                       strcat(out_val, _(" '4' 持ち物,", " 4 for Inven,"));
                                else
-                                       strcat(out_val, " 4 or 6 for Inven,");
-#endif
+                                       strcat(out_val, _(" '4'or'6' 持ち物,", " 4 or 6 for Inven,"));
                        }
 
                        /* Append */
                        if (allow_floor)
                        {
-#ifdef JP
-                               if (!use_menu)
-                                       strcat(out_val, " '-'床上,");
-                               else if (allow_inven)
-                                       strcat(out_val, " '6' 床上,");
-                               else
-                                       strcat(out_val, " '4'or'6' 床上,");
-#else
                                if (!use_menu)
-                                       strcat(out_val, " - for floor,");
+                                       strcat(out_val, _(" '-'床上,", " - for floor,"));
                                else if (allow_inven)
-                                       strcat(out_val, " 6 for floor,");
+                                       strcat(out_val, _(" '6' 床上,", " 6 for floor,"));
                                else
-                                       strcat(out_val, " 4 or 6 for floor,");
-#endif
+                                       strcat(out_val, _(" '4'or'6' 床上,", " 4 or 6 for floor,"));
                        }
                }
 
@@ -4284,7 +4122,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                }
 
                /* Append */
-               if (select_the_force) strcat(out_val, _(" 'w'練気術,", " w for the Force,"));
+               if (force) strcat(out_val, _(" 'w'練気術,", " w for the Force,"));
 
                /* Finish the prompt */
                strcat(out_val, " ESC");
@@ -4375,10 +4213,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                /* Hack -- Fix screen */
                                if (command_see)
                                {
-                                       /* Load screen */
                                        screen_load();
-
-                                       /* Save screen */
                                        screen_save();
                                }
 
@@ -4436,10 +4271,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                /* Hack -- Fix screen */
                                if (command_see)
                                {
-                                       /* Load screen */
                                        screen_load();
-
-                                       /* Save screen */
                                        screen_save();
                                }
 
@@ -4489,7 +4321,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                        }
                        case 'w':
                        {
-                               if (select_the_force) {
+                               if (force) {
                                        *cp = INVEN_FORCE;
                                        item = TRUE;
                                        done = TRUE;
@@ -4519,15 +4351,12 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                {
                                        /* Flip flag */
                                        command_see = FALSE;
-
-                                       /* Load screen */
                                        screen_load();
                                }
 
                                /* Show the list */
                                else
                                {
-                                       /* Save screen */
                                        screen_save();
 
                                        /* Flip flag */
@@ -4541,7 +4370,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                        case '+':
                        {
                                int i;
-                               IDX o_idx;
+                               OBJECT_IDX o_idx;
                                cave_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
 
                                if (command_wrk != (USE_FLOOR)) break;
@@ -4569,10 +4398,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                /* Hack -- Fix screen */
                                if (command_see)
                                {
-                                       /* Load screen */
                                        screen_load();
-
-                                       /* Save screen */
                                        screen_save();
                                }
 
@@ -4619,10 +4445,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                /* Hack -- Fix screen */
                                if (command_see)
                                {
-                                       /* Load screen */
                                        screen_load();
-
-                                       /* Save screen */
                                        screen_save();
                                }
 
@@ -4671,10 +4494,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                /* Hack -- Fix screen */
                                if (command_see)
                                {
-                                       /* Load screen */
                                        screen_load();
-
-                                       /* Save screen */
                                        screen_save();
                                }
 
@@ -4737,9 +4557,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                (*cp) = k;
                                item = TRUE;
                                done = TRUE;
-#ifdef ALLOW_REPEAT
                                cur_tag = which;
-#endif /* ALLOW_REPEAT */
                                break;
                        }
 
@@ -4806,7 +4624,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
 
                        case 'w':
                        {
-                               if (select_the_force) {
+                               if (force) {
                                        *cp = INVEN_FORCE;
                                        item = TRUE;
                                        done = TRUE;
@@ -4848,9 +4666,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                                (*cp) = k;
                                                item = TRUE;
                                                done = TRUE;
-#ifdef ALLOW_REPEAT
                                                cur_tag = which;
-#endif /* ALLOW_REPEAT */
                                                break;
                                        }
                                }
@@ -4866,9 +4682,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                                                (*cp) = k;
                                                item = TRUE;
                                                done = TRUE;
-#ifdef ALLOW_REPEAT
                                                cur_tag = which;
-#endif /* ALLOW_REPEAT */
                                                break;
                                        }
                                }
@@ -4943,7 +4757,6 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        /* Fix the screen if necessary */
        if (command_see)
        {
-               /* Load screen */
                screen_load();
 
                /* Hack -- Cancel "display" */
@@ -4962,12 +4775,8 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        /* Toggle again if needed */
        if (toggle) toggle_inven_equip();
 
-       /* Update */
        p_ptr->window |= (PW_INVEN | PW_EQUIP);
-
-       /* Window stuff */
-       window_stuff();
-
+       handle_stuff();
 
        /* Clear the prompt line */
        prt("", 0, 0);
@@ -4977,15 +4786,10 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
 
        if (item)
        {
-#ifdef ALLOW_REPEAT
                repeat_push(*cp);
                if (command_cmd) prev_tag = cur_tag;
-#endif /* ALLOW_REPEAT */
-
                command_cmd = 0; /* Hack -- command_cmd is no longer effective */
        }
-
-       /* Result */
        return (item);
 }
 
@@ -4996,9 +4800,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
 static bool py_pickup_floor_aux(void)
 {
        OBJECT_IDX this_o_idx;
-
        cptr q, s;
-
        OBJECT_IDX item;
 
        /* Restrict the choices */
@@ -5034,7 +4836,7 @@ void py_pickup_floor(bool pickup)
 {
        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
-       char o_name[MAX_NLEN];
+       GAME_TEXT o_name[MAX_NLEN];
        object_type *o_ptr;
 
        int floor_num = 0;
@@ -5048,19 +4850,17 @@ void py_pickup_floor(bool pickup)
                /* Access the object */
                o_ptr = &o_list[this_o_idx];
 
-               /* Describe the object */
                object_desc(o_name, o_ptr, 0);
 
                /* Access the next object */
                next_o_idx = o_ptr->next_o_idx;
 
                /* Hack -- disturb */
-               disturb(0, 0);
+               disturb(FALSE, FALSE);
 
                /* Pick up gold */
                if (o_ptr->tval == TV_GOLD)
                {
-                       /* Message */
 #ifdef JP
                        msg_format(" $%ld の価値がある%sを見つけた。",
                                (long)o_ptr->pval, o_name);
@@ -5075,7 +4875,6 @@ void py_pickup_floor(bool pickup)
                        /* Redraw gold */
                        p_ptr->redraw |= (PR_GOLD);
 
-                       /* Window stuff */
                        p_ptr->window |= (PW_PLAYER);
 
                        /* Delete the gold */
@@ -5129,21 +4928,17 @@ void py_pickup_floor(bool pickup)
 
 #endif /* ALLOW_EASY_SENSE */
 
-                       /* Describe the object */
                        object_desc(o_name, o_ptr, 0);
 
-                       /* Message */
                        msg_format(_("%sがある。", "You see %s."), o_name);
                }
 
                /* Multiple objects */
                else
                {
-                       /* Message */
                        msg_format(_("%d 個のアイテムの山がある。", "You see a pile of %d items."), floor_num);
                }
 
-               /* Done */
                return;
        }
 
@@ -5167,22 +4962,18 @@ void py_pickup_floor(bool pickup)
 
 #endif /* ALLOW_EASY_SENSE */
 
-                       /* Describe the object */
                        object_desc(o_name, o_ptr, 0);
 
-                       /* Message */
                        msg_format(_("ザックには%sを入れる隙間がない。", "You have no room for %s."), o_name);
                }
 
                /* Multiple objects */
                else
                {
-                       /* Message */
                        msg_print(_("ザックには床にあるどのアイテムも入らない。", "You have no room for any of the objects on the floor."));
 
                }
 
-               /* Done */
                return;
        }
 
@@ -5208,7 +4999,6 @@ void py_pickup_floor(bool pickup)
 
 #endif /* ALLOW_EASY_SENSE */
 
-                       /* Describe the object */
                        object_desc(o_name, o_ptr, 0);
 
                        /* Build a prompt */
@@ -5217,7 +5007,6 @@ void py_pickup_floor(bool pickup)
                        /* Ask the user to confirm */
                        if (!get_check(out_val))
                        {
-                               /* Done */
                                return;
                        }
                }
@@ -5249,5 +5038,3 @@ void py_pickup_floor(bool pickup)
                }
        }
 }
-
-#endif /* ALLOW_EASY_FLOOR */