OSDN Git Service

空腹充足の巻物の記述を削除.
[hengband/hengband.git] / src / object1.c
index 14ed834..d976967 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "angband.h"
 
-#ifdef MACINTOSH
+#if defined(MACINTOSH) || defined(MACH_O_CARBON)
 #ifdef verify
 #undef verify
 #endif
@@ -2525,11 +2525,18 @@ info[i++] = "
                        info[i++] = "It provides no light.";
 #endif
 
-                       if (o_ptr->sval == SV_LITE_FEANOR ||
-                           o_ptr->sval == SV_LITE_LANTERN)
+                       if (o_ptr->sval == SV_LITE_FEANOR)
+                       {
+#ifdef JP
+                               info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-3)¡£";
+#else
+                               info[i++] = "It decreases radius of light source by 3.";
+#endif
+                       }
+                       else if (o_ptr->sval == SV_LITE_LANTERN)
                        {
 #ifdef JP
-                               info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
+                               info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
 #else
                                info[i++] = "It decreases radius of light source by 2.";
 #endif
@@ -2537,7 +2544,7 @@ info[i++] = "
                        else
                        {
 #ifdef JP
-                               info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
+                               info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
 #else
                                info[i++] = "It decreases radius of light source by 1.";
 #endif
@@ -3883,8 +3890,8 @@ info[i++] = "
                monster_race *r_ptr = &r_info[o_ptr->pval];
                int namelen = strlen(r_name + r_ptr->name);
                prt(format("%s: '", r_name + r_ptr->name), 1, 15);
-               c_prt(r_ptr->d_attr, format("%c", r_ptr->d_char), 1, 18+namelen);
-               prt("'", 1, 19+namelen);
+               Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
+               prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
        }
        else
 #ifdef JP
@@ -4305,7 +4312,13 @@ bool item_tester_okay(object_type *o_ptr)
        if (!o_ptr->k_idx) return (FALSE);
 
        /* Hack -- ignore "gold" */
-       if (o_ptr->tval == TV_GOLD) return (FALSE);
+       if (o_ptr->tval == TV_GOLD)
+       {
+               /* See xtra2.c */
+               extern bool show_gold_on_floor;
+
+               if (!show_gold_on_floor) return (FALSE);
+       }
 
        /* Check the tval */
        if (item_tester_tval)
@@ -5436,13 +5449,18 @@ bool get_item(int *cp, cptr pmt, cptr str, int 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 (*cp == INVEN_FORCE)
+               if (select_the_force && (*cp == INVEN_FORCE))
                {
                        item_tester_tval = 0;
                        item_tester_hook = NULL;
@@ -5451,7 +5469,7 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
                }
 
                /* Floor item? */
-               else if (*cp < 0)
+               else if (floor && (*cp < 0))
                {
                        object_type *o_ptr;
 
@@ -5477,29 +5495,28 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
                        }
                }
 
-               /* Verify the item */
-               else if (get_item_okay(*cp))
+               else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
+                        (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
                {
-                       /* Forget the item_tester_tval restriction */
-                       item_tester_tval = 0;
+                       /* Verify the item */
+                       if (get_item_okay(*cp))
+                       {
+                               /* Forget the item_tester_tval restriction */
+                               item_tester_tval = 0;
 
-                       /* Forget the item_tester_hook restriction */
-                       item_tester_hook = NULL;
+                               /* Forget the item_tester_hook restriction */
+                               item_tester_hook = NULL;
 
-                       command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+                               command_cmd = 0; /* Hack -- command_cmd is no longer effective */
 
-                       /* Success */
-                       return (TRUE);
+                               /* Success */
+                               return (TRUE);
+                       }
                }
        }
 
 #endif /* ALLOW_REPEAT */
 
-       /* Extract args */
-       if (mode & (USE_EQUIP)) equip = TRUE;
-       if (mode & (USE_INVEN)) inven = TRUE;
-       if (mode & (USE_FLOOR)) floor = TRUE;
-
 
        /* Paranoia XXX XXX XXX */
        msg_print(NULL);
@@ -6318,6 +6335,8 @@ int show_floor(int target_item, int y, int x, int *min_width)
        int wid, hgt;
        char floor_label[52 + 1];
 
+       bool dont_need_to_show_weights = TRUE;
+
        /* Get size */
        Term_get_size(&wid, &hgt);
 
@@ -6351,6 +6370,8 @@ int show_floor(int target_item, int y, int x, int *min_width)
                /* Be sure to account for the weight */
                if (show_weights) l += 9;
 
+               if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
+
                /* Maintain the maximum length */
                if (l > len) len = l;
 
@@ -6358,6 +6379,8 @@ int show_floor(int target_item, int y, int x, int *min_width)
                k++;
        }
 
+       if (show_weights && dont_need_to_show_weights) len -= 9;
+
        /* Save width */
        *min_width = len;
 
@@ -6404,7 +6427,7 @@ int show_floor(int target_item, int y, int x, int *min_width)
                c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
 
                /* Display the weight if needed */
-               if (show_weights)
+               if (show_weights && (o_ptr->tval != TV_GOLD))
                {
                        int wgt = o_ptr->weight * o_ptr->number;
 #ifdef JP
@@ -6437,9 +6460,10 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
 
        bool oops = FALSE;
 
-       bool equip = FALSE;
-       bool inven = FALSE;
-       bool floor = FALSE;
+       /* Extract args */
+       bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
+       bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
+       bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
 
        bool allow_equip = FALSE;
        bool allow_inven = FALSE;
@@ -6465,7 +6489,7 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
        if (repeat_pull(cp))
        {
                /* the_force */
-               if (*cp == INVEN_FORCE)
+               if (select_the_force && (*cp == INVEN_FORCE))
                {
                        item_tester_tval = 0;
                        item_tester_hook = NULL;
@@ -6474,7 +6498,7 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
                }
 
                /* Floor item? */
-               else if (*cp < 0)
+               else if (floor && (*cp < 0))
                {
                        object_type *o_ptr;
 
@@ -6500,29 +6524,28 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
                        }
                }
 
-               /* Verify the item */
-               else if (get_item_okay(*cp))
+               else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
+                        (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
                {
-                       /* Forget the item_tester_tval restriction */
-                       item_tester_tval = 0;
+                       /* Verify the item */
+                       if (get_item_okay(*cp))
+                       {
+                               /* Forget the item_tester_tval restriction */
+                               item_tester_tval = 0;
 
-                       /* Forget the item_tester_hook restriction */
-                       item_tester_hook = NULL;
+                               /* Forget the item_tester_hook restriction */
+                               item_tester_hook = NULL;
 
-                       command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+                               command_cmd = 0; /* Hack -- command_cmd is no longer effective */
 
-                       /* Success */
-                       return (TRUE);
+                               /* Success */
+                               return (TRUE);
+                       }
                }
        }
 
 #endif /* ALLOW_REPEAT */
 
-       /* Extract args */
-       if (mode & (USE_EQUIP)) equip = TRUE;
-       if (mode & (USE_INVEN)) inven = TRUE;
-       if (mode & (USE_FLOOR)) floor = TRUE;
-
 
        /* Paranoia XXX XXX XXX */
        msg_print(NULL);