OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
[hengband/hengband.git] / src / object1.c
index b091758..fb3f6bc 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");
 }
 
@@ -510,17 +509,17 @@ cptr item_activation(object_type *o_ptr)
  * @param mode 表示オプション
  * @return 特筆すべき情報が一つでもあった場合TRUE、一つもなく表示がキャンセルされた場合FALSEを返す。
  */
-bool screen_object(object_type *o_ptr, u32b mode)
+bool screen_object(object_type *o_ptr, BIT_FLAGS mode)
 {
-       int                     i = 0, j, k;
+       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];
        int wid, hgt;
-       int rad;
+       POSITION rad;
        char desc[256];
 
        int trivial_info = 0;
@@ -627,12 +626,12 @@ bool screen_object(object_type *o_ptr, u32b mode)
                
        if (have_flag(flgs, TR_LITE_FUEL) && o_ptr->name2 != EGO_LITE_DARKNESS)
        {
-               if(rad > 0) sprintf(desc, _("それは燃料補給によって明かり(半径 %d)を授ける。", "It provides light (radius %d) when fueled."), rad);        
+               if(rad > 0) sprintf(desc, _("それは燃料補給によって明かり(半径 %d)を授ける。", "It provides light (radius %d) when fueled."), (int)rad);   
        }
        else
        {
-               if(rad > 0) sprintf(desc, _("それは永遠なる明かり(半径 %d)を授ける。", "It provides light (radius %d) forever."), rad);        
-               if(rad < 0) sprintf(desc, _("それは明かりの半径を狭める(半径に-%d)。", "It decreases radius of light source by %d."), -rad);
+               if(rad > 0) sprintf(desc, _("それは永遠なる明かり(半径 %d)を授ける。", "It provides light (radius %d) forever."), (int)rad);
+               if(rad < 0) sprintf(desc, _("それは明かりの半径を狭める(半径に-%d)。", "It decreases radius of light source by %d."), (int)-rad);
        }
        
        if(rad != 0) info[i++] = desc;
@@ -1238,7 +1237,6 @@ bool screen_object(object_type *o_ptr, u32b mode)
        /* Save the screen */
        screen_save();
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Display Item name */
@@ -1658,12 +1656,11 @@ void display_inven(void)
 {
        register        int i, n, z = 0;
        object_type     *o_ptr;
-       byte            attr = TERM_WHITE;
+       TERM_COLOR      attr = TERM_WHITE;
        char            tmp_val[80];
        char            o_name[MAX_NLEN];
        int             wid, hgt;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Find the "final" slot */
@@ -1754,12 +1751,11 @@ void display_equip(void)
 {
        register        int i, n;
        object_type     *o_ptr;
-       byte            attr = TERM_WHITE;
+       TERM_COLOR      attr = TERM_WHITE;
        char            tmp_val[80];
        char            o_name[MAX_NLEN];
        int             wid, hgt;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Display the equipment */
@@ -1856,7 +1852,7 @@ void display_equip(void)
  * Also, the tag "@xn" will work as well, where "n" is a any tag-char,\n
  * and "x" is the "current" command_cmd code.\n
  */
-static bool get_tag(COMMAND_CODE *cp, char tag, int mode)
+static bool get_tag(COMMAND_CODE *cp, char tag, BIT_FLAGS mode)
 {
        COMMAND_CODE i;
        COMMAND_CODE start, end;
@@ -1982,7 +1978,7 @@ static bool get_tag(COMMAND_CODE *cp, char tag, int mode)
  * Also, the tag "@xn" will work as well, where "n" is a any tag-char,\n
  * and "x" is the "current" command_cmd code.\n
  */
-static bool get_tag_floor(COMMAND_CODE *cp, char tag, int floor_list[], int floor_num)
+static bool get_tag_floor(COMMAND_CODE *cp, char tag, FLOOR_IDX floor_list[], ITEM_NUMBER floor_num)
 {
        COMMAND_CODE i;
        cptr s;
@@ -2069,7 +2065,7 @@ static bool get_tag_floor(COMMAND_CODE *cp, char tag, int floor_list[], int floo
  * @param mode 所持品リストか装備品リストかの切り替え
  * @return なし
  */
-static void prepare_label_string(char *label, int mode)
+static void prepare_label_string(char *label, BIT_FLAGS mode)
 {
        cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
        int  offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
@@ -2107,7 +2103,7 @@ static void prepare_label_string(char *label, int mode)
  */
 /*
  */
-static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
+static void prepare_label_string_floor(char *label, FLOOR_IDX floor_list[], ITEM_NUMBER floor_num)
 {
        cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
        int  i;
@@ -2144,22 +2140,22 @@ static void prepare_label_string_floor(char *label, int floor_list[], int floor_
  */
 COMMAND_CODE show_inven(int target_item)
 {
-       int             i, j, k, l, z = 0;
+       COMMAND_CODE i;
+       int j, k, l, z = 0;
        int             col, cur_col, len;
        object_type     *o_ptr;
        char            o_name[MAX_NLEN];
        char            tmp_val[80];
-       int             out_index[23];
-       byte            out_color[23];
+       COMMAND_CODE    out_index[23];
+       TERM_COLOR      out_color[23];
        char            out_desc[23][MAX_NLEN];
-       int             target_item_label = 0;
-       int             wid, hgt;
+       COMMAND_CODE target_item_label = 0;
+       TERM_LEN wid, hgt;
        char            inven_label[52 + 1];
 
        /* Starting column */
        col = command_gap;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Default "max-length" */
@@ -2232,7 +2228,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 */
@@ -2310,22 +2305,22 @@ COMMAND_CODE show_inven(int target_item)
  */
 COMMAND_CODE show_equip(int target_item)
 {
-       int             i, j, k, l;
+       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];
-       int             out_index[23];
-       byte            out_color[23];
+       COMMAND_CODE    out_index[23];
+       TERM_COLOR      out_color[23];
        char            out_desc[23][MAX_NLEN];
-       int             target_item_label = 0;
-       int             wid, hgt;
+       COMMAND_CODE target_item_label = 0;
+       TERM_LEN wid, hgt;
        char            equip_label[52 + 1];
 
        /* Starting column */
        col = command_gap;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Maximal length */
@@ -2347,11 +2342,7 @@ COMMAND_CODE show_equip(int target_item)
 
                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
@@ -2410,7 +2401,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 */
@@ -2516,7 +2506,6 @@ void toggle_inven_equip(void)
                        window_flag[j] &= ~(PW_INVEN);
                        window_flag[j] |= (PW_EQUIP);
 
-                       /* Window stuff */
                        p_ptr->window |= (PW_EQUIP);
                }
 
@@ -2527,7 +2516,6 @@ void toggle_inven_equip(void)
                        window_flag[j] &= ~(PW_EQUIP);
                        window_flag[j] |= (PW_INVEN);
 
-                       /* Window stuff */
                        p_ptr->window |= (PW_INVEN);
                }
        }
@@ -2541,7 +2529,7 @@ void toggle_inven_equip(void)
  * @return 確認がYesならTRUEを返す。
  * @details The item can be negative to mean "item on floor".
  */
-static bool verify(cptr prompt, int item)
+static bool verify(cptr prompt, INVENTORY_IDX item)
 {
        char        o_name[MAX_NLEN];
        char        out_val[MAX_NLEN+20];
@@ -2578,7 +2566,7 @@ static bool verify(cptr prompt, int item)
  * @details The item can be negative to mean "item on floor".
  * Hack -- allow user to "prevent" certain choices
  */
-static bool get_item_allow(int item)
+static bool get_item_allow(INVENTORY_IDX item)
 {
        cptr s;
 
@@ -2651,7 +2639,9 @@ static bool get_item_okay(OBJECT_IDX i)
  */
 bool can_get_item(void)
 {
-       int j, floor_list[23], floor_num = 0;
+       int j;
+       OBJECT_IDX floor_list[23];
+       ITEM_NUMBER floor_num = 0;
 
        for (j = 0; j < INVEN_TOTAL; j++)
                if (item_tester_okay(&inventory[j]))
@@ -2719,7 +2709,7 @@ bool can_get_item(void)
  * We always erase the prompt when we are done, leaving a blank line,\n
  * or a warning message, if appropriate, if no items are available.\n
  */
-bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, int mode)
+bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
 {
        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
@@ -2752,26 +2742,16 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, int mode)
        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))
        {
@@ -2848,10 +2828,8 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, int mode)
                }
        }
 
-#endif /* ALLOW_REPEAT */
-
 
-       /* Paranoia XXX XXX XXX */
+       /* Paranoia */
        msg_print(NULL);
 
 
@@ -2931,10 +2909,8 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, int mode)
                /* Cancel p_ptr->command_see */
                command_see = FALSE;
 
-               /* Oops */
                oops = TRUE;
 
-               /* Done */
                done = TRUE;
 
                if (select_the_force) {
@@ -3322,7 +3298,6 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, int mode)
                                        if (done) break;
                                }
 
-                               /* Oops */
                                bell();
                                break;
                        }
@@ -3364,9 +3339,7 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, int mode)
                                (*cp) = k;
                                item = TRUE;
                                done = TRUE;
-#ifdef ALLOW_REPEAT
                                cur_tag = which;
-#endif /* ALLOW_REPEAT */
                                break;
                        }
 
@@ -3449,15 +3422,13 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, int mode)
                                        (*cp) = k;
                                        item = TRUE;
                                        done = TRUE;
-#ifdef ALLOW_REPEAT
                                        cur_tag = which;
-#endif /* ALLOW_REPEAT */
                                        break;
                                }
 
                                /* Extract "query" setting */
                                ver = isupper(which);
-                               which = tolower(which);
+                               which = (char)tolower(which);
 
                                /* Convert letter to inventory index */
                                if (!command_wrk)
@@ -3534,7 +3505,6 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, int mode)
        /* Update */
        p_ptr->window |= (PW_INVEN | PW_EQUIP);
 
-       /* Window stuff */
        window_stuff();
 
 
@@ -3546,21 +3516,13 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, int 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);
 }
 
-
-#ifdef ALLOW_EASY_FLOOR
-
 /*!
  * @brief 床下に落ちているオブジェクトの数を返す / scan_floor
  * @param items オブジェクトのIDリストを返すための配列参照ポインタ
@@ -3576,11 +3538,11 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, int mode)
  *             mode & 0x02 -- Marked items only
  *             mode & 0x04 -- Stop after first
  */
-int scan_floor(int *items, int y, int x, int mode)
+ITEM_NUMBER scan_floor(OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode)
 {
-       int this_o_idx, next_o_idx;
+       OBJECT_IDX this_o_idx, next_o_idx;
 
-       int num = 0;
+       ITEM_NUMBER num = 0;
 
        /* Sanity */
        if (!in_bounds(y, x)) return 0;
@@ -3612,8 +3574,6 @@ int scan_floor(int *items, int y, int x, int mode)
                /* Only one */
                if (mode & 0x04) break;
        }
-
-       /* Result */
        return num;
 }
 
@@ -3624,32 +3584,32 @@ int scan_floor(int *items, int y, int x, int mode)
  * @param y 走査するフロアのY座標
  * @param x 走査するフロアのX座標
  * @param min_width 表示の長さ
- * @return 選択したアイテムのID
+ * @return 選択したアイテムの添え字
  * @details
  */
-int show_floor(int target_item, int y, int x, int *min_width)
+COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_LEN *min_width)
 {
-       int i, j, k, l;
+       COMMAND_CODE i, m;
+       int j, k, l;
        int col, len;
 
        object_type *o_ptr;
 
        char o_name[MAX_NLEN];
-
        char tmp_val[80];
 
-       int out_index[23];
-       byte out_color[23];
+       COMMAND_CODE out_index[23];
+       TERM_COLOR out_color[23];
        char out_desc[23][MAX_NLEN];
-       int target_item_label = 0;
+       COMMAND_CODE target_item_label = 0;
 
-       int floor_list[23], floor_num;
-       int wid, hgt;
+       OBJECT_IDX floor_list[23];
+       ITEM_NUMBER floor_num;
+       TERM_LEN wid, hgt;
        char floor_label[52 + 1];
 
        bool dont_need_to_show_weights = TRUE;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Default length */
@@ -3705,10 +3665,9 @@ int show_floor(int target_item, int y, int x, int *min_width)
        for (j = 0; j < k; j++)
        {
                /* Get the index */
-               i = floor_list[out_index[j]];
+               m = floor_list[out_index[j]];
 
-               /* Get the item */
-               o_ptr = &o_list[i];
+               o_ptr = &o_list[m];
 
                /* Clear the line */
                prt("", j + 1, col ? col - 2 : col);
@@ -3718,7 +3677,7 @@ int show_floor(int target_item, int y, int x, int *min_width)
                        if (j == (target_item-1))
                        {
                                strcpy(tmp_val, _("》", "> "));
-                               target_item_label = i;
+                               target_item_label = m;
                        }
                        else strcpy(tmp_val, "   ");
                }
@@ -3763,7 +3722,7 @@ int show_floor(int target_item, int y, int x, int *min_width)
  * @param mode オプションフラグ
  * @return プレイヤーによりアイテムが選択されたならTRUEを返す。/
  */
-bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int mode)
+bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
 {
        char n1 = ' ', n2 = ' ', which = ' ';
 
@@ -3790,8 +3749,10 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int mode)
        char tmp_val[160];
        char out_val[160];
 
-       int floor_num, floor_list[23], floor_top = 0;
-       int min_width = 0;
+       ITEM_NUMBER floor_num;
+       OBJECT_IDX floor_list[23];
+       int floor_top = 0;
+       TERM_LEN min_width = 0;
 
        extern bool select_the_force;
 
@@ -3799,8 +3760,6 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int mode)
        int max_inven = 0;
        int max_equip = 0;
 
-#ifdef ALLOW_REPEAT
-
        static char prev_tag = '\0';
        char cur_tag = '\0';
 
@@ -3895,10 +3854,8 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int mode)
                }
        }
 
-#endif /* ALLOW_REPEAT */
 
-
-       /* Paranoia XXX XXX XXX */
+       /* Paranoia */
        msg_print(NULL);
 
 
@@ -3978,10 +3935,8 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int mode)
                /* Cancel p_ptr->command_see */
                command_see = FALSE;
 
-               /* Oops */
                oops = TRUE;
 
-               /* Done */
                done = TRUE;
 
                if (select_the_force) {
@@ -4534,7 +4489,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int 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;
@@ -4730,9 +4685,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int mode)
                                (*cp) = k;
                                item = TRUE;
                                done = TRUE;
-#ifdef ALLOW_REPEAT
                                cur_tag = which;
-#endif /* ALLOW_REPEAT */
                                break;
                        }
 
@@ -4841,9 +4794,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int mode)
                                                (*cp) = k;
                                                item = TRUE;
                                                done = TRUE;
-#ifdef ALLOW_REPEAT
                                                cur_tag = which;
-#endif /* ALLOW_REPEAT */
                                                break;
                                        }
                                }
@@ -4859,9 +4810,7 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int mode)
                                                (*cp) = k;
                                                item = TRUE;
                                                done = TRUE;
-#ifdef ALLOW_REPEAT
                                                cur_tag = which;
-#endif /* ALLOW_REPEAT */
                                                break;
                                        }
                                }
@@ -4958,7 +4907,6 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int mode)
        /* Update */
        p_ptr->window |= (PW_INVEN | PW_EQUIP);
 
-       /* Window stuff */
        window_stuff();
 
 
@@ -4970,15 +4918,10 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int 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);
 }
 
@@ -4988,11 +4931,11 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int mode)
  */
 static bool py_pickup_floor_aux(void)
 {
-       s16b this_o_idx;
+       OBJECT_IDX this_o_idx;
 
        cptr q, s;
 
-       int item;
+       OBJECT_IDX item;
 
        /* Restrict the choices */
        item_tester_hook = inven_carry_okay;
@@ -5025,12 +4968,13 @@ static bool py_pickup_floor_aux(void)
  */
 void py_pickup_floor(bool pickup)
 {
-       s16b this_o_idx, next_o_idx = 0;
+       OBJECT_IDX this_o_idx, next_o_idx = 0;
 
        char o_name[MAX_NLEN];
        object_type *o_ptr;
 
-       int floor_num = 0, floor_o_idx = 0;
+       int floor_num = 0;
+       OBJECT_IDX floor_o_idx = 0;
 
        int can_pickup = 0;
 
@@ -5047,12 +4991,11 @@ void py_pickup_floor(bool pickup)
                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);
@@ -5067,7 +5010,6 @@ void py_pickup_floor(bool pickup)
                        /* Redraw gold */
                        p_ptr->redraw |= (PR_GOLD);
 
-                       /* Window stuff */
                        p_ptr->window |= (PW_PLAYER);
 
                        /* Delete the gold */
@@ -5124,18 +5066,15 @@ void py_pickup_floor(bool pickup)
                        /* 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;
        }
 
@@ -5162,19 +5101,16 @@ void py_pickup_floor(bool pickup)
                        /* 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;
        }
 
@@ -5209,7 +5145,6 @@ void py_pickup_floor(bool pickup)
                        /* Ask the user to confirm */
                        if (!get_check(out_val))
                        {
-                               /* Done */
                                return;
                        }
                }
@@ -5241,5 +5176,3 @@ void py_pickup_floor(bool pickup)
                }
        }
 }
-
-#endif /* ALLOW_EASY_FLOOR */