OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
[hengband/hengband.git] / src / object1.c
index 8cd0a3f..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)
 {
@@ -498,7 +498,6 @@ cptr item_activation(object_type *o_ptr)
                return _("モンスターを捕える、又は解放する。", "captures or releases a monster.");
        }
 
-       /* Oops */
        return _("何も起きない", "Nothing");
 }
 
@@ -1238,7 +1237,6 @@ bool screen_object(object_type *o_ptr, BIT_FLAGS mode)
        /* Save the screen */
        screen_save();
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Display Item name */
@@ -1663,7 +1661,6 @@ void display_inven(void)
        char            o_name[MAX_NLEN];
        int             wid, hgt;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Find the "final" slot */
@@ -1759,7 +1756,6 @@ void display_equip(void)
        char            o_name[MAX_NLEN];
        int             wid, hgt;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Display the equipment */
@@ -2160,7 +2156,6 @@ COMMAND_CODE show_inven(int target_item)
        /* Starting column */
        col = command_gap;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Default "max-length" */
@@ -2233,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 */
@@ -2327,7 +2321,6 @@ COMMAND_CODE show_equip(int target_item)
        /* Starting column */
        col = command_gap;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Maximal length */
@@ -2408,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 */
@@ -2514,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);
                }
 
@@ -2525,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);
                }
        }
@@ -2752,26 +2742,16 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS 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, BIT_FLAGS 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, BIT_FLAGS 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, BIT_FLAGS mode)
                                        if (done) break;
                                }
 
-                               /* Oops */
                                bell();
                                break;
                        }
@@ -3364,9 +3339,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;
                        }
 
@@ -3449,9 +3422,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;
                                }
 
@@ -3534,7 +3505,6 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS 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, 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);
 }
 
-
-#ifdef ALLOW_EASY_FLOOR
-
 /*!
  * @brief 床下に落ちているオブジェクトの数を返す / scan_floor
  * @param items オブジェクトのIDリストを返すための配列参照ポインタ
@@ -3612,8 +3574,6 @@ ITEM_NUMBER scan_floor(OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode
                /* Only one */
                if (mode & 0x04) break;
        }
-
-       /* Result */
        return num;
 }
 
@@ -3650,7 +3610,6 @@ 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 */
@@ -3708,7 +3667,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 */
@@ -3802,8 +3760,6 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        int max_inven = 0;
        int max_equip = 0;
 
-#ifdef ALLOW_REPEAT
-
        static char prev_tag = '\0';
        char cur_tag = '\0';
 
@@ -3898,10 +3854,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);
 
 
@@ -3981,10 +3935,8 @@ 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) {
@@ -4733,9 +4685,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;
                        }
 
@@ -4844,9 +4794,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;
                                        }
                                }
@@ -4862,9 +4810,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;
                                        }
                                }
@@ -4961,7 +4907,6 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        /* Update */
        p_ptr->window |= (PW_INVEN | PW_EQUIP);
 
-       /* Window stuff */
        window_stuff();
 
 
@@ -4973,15 +4918,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);
 }
 
@@ -5051,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);
@@ -5071,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 */
@@ -5128,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;
        }
 
@@ -5166,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;
        }
 
@@ -5213,7 +5145,6 @@ void py_pickup_floor(bool pickup)
                        /* Ask the user to confirm */
                        if (!get_check(out_val))
                        {
-                               /* Done */
                                return;
                        }
                }
@@ -5245,5 +5176,3 @@ void py_pickup_floor(bool pickup)
                }
        }
 }
-
-#endif /* ALLOW_EASY_FLOOR */