OSDN Git Service

広域マップで画面をスクロールすると右端の境界の外までスクロールできてしまうバグ修正。
[hengbandforosx/hengbandosx.git] / src / object1.c
index aae98f9..407f7d3 100644 (file)
@@ -146,53 +146,55 @@ void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
 
        if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
        {
-               if (o_ptr->xtra3 < TR_FLAG_MAX+1)
+               int add = o_ptr->xtra3 - 1;
+
+               if (add < TR_FLAG_MAX)
                {
-                       add_flag(flgs, o_ptr->xtra3 - 1);
+                       add_flag(flgs, add);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_ACID)
+               else if (add == ESSENCE_TMP_RES_ACID)
                {
                        add_flag(flgs, TR_RES_ACID);
                        add_flag(flgs, TR_ACTIVATE);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_ELEC)
+               else if (add == ESSENCE_TMP_RES_ELEC)
                {
                        add_flag(flgs, TR_RES_ELEC);
                        add_flag(flgs, TR_ACTIVATE);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_FIRE)
+               else if (add == ESSENCE_TMP_RES_FIRE)
                {
                        add_flag(flgs, TR_RES_FIRE);
                        add_flag(flgs, TR_ACTIVATE);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_COLD)
+               else if (add == ESSENCE_TMP_RES_COLD)
                {
                        add_flag(flgs, TR_RES_COLD);
                        add_flag(flgs, TR_ACTIVATE);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_SH_FIRE)
+               else if (add == ESSENCE_SH_FIRE)
                {
                        add_flag(flgs, TR_RES_FIRE);
                        add_flag(flgs, TR_SH_FIRE);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_SH_ELEC)
+               else if (add == ESSENCE_SH_ELEC)
                {
                        add_flag(flgs, TR_RES_ELEC);
                        add_flag(flgs, TR_SH_ELEC);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_SH_COLD)
+               else if (add == ESSENCE_SH_COLD)
                {
                        add_flag(flgs, TR_RES_COLD);
                        add_flag(flgs, TR_SH_COLD);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_RESISTANCE)
+               else if (add == ESSENCE_RESISTANCE)
                {
                        add_flag(flgs, TR_RES_ACID);
                        add_flag(flgs, TR_RES_ELEC);
                        add_flag(flgs, TR_RES_FIRE);
                        add_flag(flgs, TR_RES_COLD);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_EARTHQUAKE)
+               else if (add == TR_IMPACT)
                {
                        add_flag(flgs, TR_ACTIVATE);
                }
@@ -277,42 +279,44 @@ void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
 
        if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
        {
-               if (o_ptr->xtra3 < 1+MAX_TR_FLAG_ESSENCE)
+               int add = o_ptr->xtra3 - 1;
+
+               if (add < TR_FLAG_MAX)
                {
-                       add_flag(flgs, o_ptr->xtra3 - 1);
+                       add_flag(flgs, add);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_ACID)
+               else if (add == ESSENCE_TMP_RES_ACID)
                {
                        add_flag(flgs, TR_RES_ACID);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_ELEC)
+               else if (add == ESSENCE_TMP_RES_ELEC)
                {
                        add_flag(flgs, TR_RES_ELEC);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_FIRE)
+               else if (add == ESSENCE_TMP_RES_FIRE)
                {
                        add_flag(flgs, TR_RES_FIRE);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_COLD)
+               else if (add == ESSENCE_TMP_RES_COLD)
                {
                        add_flag(flgs, TR_RES_COLD);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_SH_FIRE)
+               else if (add == ESSENCE_SH_FIRE)
                {
                        add_flag(flgs, TR_RES_FIRE);
                        add_flag(flgs, TR_SH_FIRE);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_SH_ELEC)
+               else if (add == ESSENCE_SH_ELEC)
                {
                        add_flag(flgs, TR_RES_ELEC);
                        add_flag(flgs, TR_SH_ELEC);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_SH_COLD)
+               else if (add == ESSENCE_SH_COLD)
                {
                        add_flag(flgs, TR_RES_COLD);
                        add_flag(flgs, TR_SH_COLD);
                }
-               else if (o_ptr->xtra3 == 1+ESSENCE_RESISTANCE)
+               else if (add == ESSENCE_RESISTANCE)
                {
                        add_flag(flgs, TR_RES_ACID);
                        add_flag(flgs, TR_RES_ELEC);
@@ -1873,49 +1877,50 @@ return "
 
        }
 
-       if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_ACID))
+       if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
        {
+               switch (o_ptr->xtra3 - 1)
+               {
+               case ESSENCE_TMP_RES_ACID:
 #ifdef JP
-return "»À¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                       return "»À¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
-                               return "resist acid every 50+d50 turns";
+                       return "resist acid every 50+d50 turns";
 #endif
-       }
+                       break;
 
-       if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_ELEC))
-       {
+               case ESSENCE_TMP_RES_ELEC:
 #ifdef JP
-return "ÅÅ·â¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                       return "ÅÅ·â¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
-                               return "resist elec every 50+d50 turns";
+                       return "resist elec every 50+d50 turns";
 #endif
-       }
+                       break;
 
-       if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_FIRE))
-       {
+               case ESSENCE_TMP_RES_FIRE:
 #ifdef JP
-return "²Ð¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                       return "²Ð¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
-                               return "resist fire every 50+d50 turns";
+                       return "resist fire every 50+d50 turns";
 #endif
-       }
+                       break;
 
-       if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_COLD))
-       {
+               case ESSENCE_TMP_RES_COLD:
 #ifdef JP
-return "Î䵤¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                       return "Î䵤¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
-                               return "resist cold every 50+d50 turns";
+                       return "resist cold every 50+d50 turns";
 #endif
-       }
+                       break;
 
-       if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == 1+ESSENCE_EARTHQUAKE))
-       {
+               case TR_IMPACT:
 #ifdef JP
-return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
+                       return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
 #else
-               return "earthquake every 100+d100 turns";
+                       return "earthquake every 100+d100 turns";
 #endif
+                       break;
+               }
        }
 
        if (o_ptr->name2 == EGO_TRUMP)
@@ -2387,8 +2392,8 @@ bool identify_fully_aux(object_type *o_ptr)
                char temp[70 * 20];
 
                roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
-                           (k_text + k_info[lookup_kind(o_ptr->tval, o_ptr->sval)].text),
-                           77 - 15, temp);
+                           (k_text + k_info[lookup_kind(o_ptr->tval, o_ptr->sval)].text),
+                           77 - 15, temp);
                for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
                { info[i] = &temp[j]; i++;}
        }
@@ -2448,13 +2453,13 @@ info[i++] = "
 #ifdef JP
 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
 #else
-               info[i++] = "It strikes yourself sometimes.";
+               info[i++] = "It causes you to strike yourself sometimes.";
 #endif
 
 #ifdef JP
 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
 #else
-               info[i++] = "It will always penetrates invulnerability barrier.";
+               info[i++] = "It always penetrates invulnerability barriers.";
 #endif
        }
 
@@ -2468,12 +2473,12 @@ info[i++] = "
 
        }
 
-       if (o_ptr->name2 == EGO_RING_WIZARD)
+       if (have_flag(flgs, TR_EASY_SPELL))
        {
 #ifdef JP
 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
 #else
-               info[i++] = "It affects your ability to use magic devices.";
+               info[i++] = "It affects your ability to cast spells.";
 #endif
        }
 
@@ -2482,7 +2487,7 @@ info[i++] = "
 #ifdef JP
 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
 #else
-               info[i++] = "It prevents you from using magic items.";
+               info[i++] = "It interferes with casting spells.";
 #endif
        }
 
@@ -2534,10 +2539,28 @@ info[i++] = "
                if (o_ptr->name2 == EGO_LITE_DARKNESS)
                {
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
+                       info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
+#else
+                       info[i++] = "It provides no light.";
+#endif
+
+                       if (o_ptr->sval == SV_LITE_FEANOR ||
+                           o_ptr->sval == SV_LITE_LANTERN)
+                       {
+#ifdef JP
+                               info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
 #else
-                       info[i++] = "It provides no light..";
+                               info[i++] = "It decreases radius of light source by 2.";
 #endif
+                       }
+                       else
+                       {
+#ifdef JP
+                               info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
+#else
+                               info[i++] = "It decreases radius of light source by 1.";
+#endif
+                       }
                }
                else if (artifact_p(o_ptr))
                {
@@ -3311,15 +3334,15 @@ info[i++] = "
        {
                if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë¡£";
+info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
 #else
-                       info[i++] = "It decreases radius of your light source.";
+                       info[i++] = "It decreases radius of your light source by 1.";
 #endif
                else
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
+info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
 #else
-                       info[i++] = "It provides permanent light.";
+                       info[i++] = "It provides permanent light. (radius +1)";
 #endif
 
        }
@@ -3344,7 +3367,7 @@ info[i++] = "
        if (have_flag(flgs, TR_ESP_ANIMAL))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
 #else
                info[i++] = "It senses natural creatures.";
 #endif
@@ -3353,7 +3376,7 @@ info[i++] = "
        if (have_flag(flgs, TR_ESP_UNDEAD))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
 #else
                info[i++] = "It senses undead.";
 #endif
@@ -3362,7 +3385,7 @@ info[i++] = "
        if (have_flag(flgs, TR_ESP_DEMON))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï°­Ëâ¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï°­Ëâ¤ò´¶ÃΤ¹¤ë¡£";
 #else
                info[i++] = "It senses demons.";
 #endif
@@ -3371,7 +3394,7 @@ info[i++] = "
        if (have_flag(flgs, TR_ESP_ORC))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
 #else
                info[i++] = "It senses orcs.";
 #endif
@@ -3380,7 +3403,7 @@ info[i++] = "
        if (have_flag(flgs, TR_ESP_TROLL))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
 #else
                info[i++] = "It senses trolls.";
 #endif
@@ -3389,7 +3412,7 @@ info[i++] = "
        if (have_flag(flgs, TR_ESP_GIANT))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ïµð¿Í¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
 #else
                info[i++] = "It senses giants.";
 #endif
@@ -3398,7 +3421,7 @@ info[i++] = "
        if (have_flag(flgs, TR_ESP_DRAGON))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
 #else
                info[i++] = "It senses dragons.";
 #endif
@@ -3407,7 +3430,7 @@ info[i++] = "
        if (have_flag(flgs, TR_ESP_HUMAN))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
 #else
                info[i++] = "It senses humans.";
 #endif
@@ -3416,7 +3439,7 @@ info[i++] = "
        if (have_flag(flgs, TR_ESP_EVIL))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï¼Ù°­¤ÊÀ¸¤­Êª¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¼Ù°­¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
 #else
                info[i++] = "It senses evil creatures.";
 #endif
@@ -3425,7 +3448,7 @@ info[i++] = "
        if (have_flag(flgs, TR_ESP_GOOD))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏÁ±ÎɤÊÀ¸¤­Êª¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
 #else
                info[i++] = "It senses good creatures.";
 #endif
@@ -3434,7 +3457,7 @@ info[i++] = "
        if (have_flag(flgs, TR_ESP_NONLIVING))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤθºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
 #else
                info[i++] = "It senses non-living creatures.";
 #endif
@@ -3443,7 +3466,7 @@ info[i++] = "
        if (have_flag(flgs, TR_ESP_UNIQUE))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
 #else
                info[i++] = "It senses unique monsters.";
 #endif
@@ -3694,7 +3717,7 @@ info[i++] = "
 #ifdef JP
 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
 #else
-               info[i++] = "It causes you miss blows.";
+               info[i++] = "It causes you to miss blows.";
 #endif
 
        }
@@ -3703,7 +3726,7 @@ info[i++] = "
 #ifdef JP
 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
 #else
-               info[i++] = "It helps your enemys' blows.";
+               info[i++] = "It helps your enemies' blows.";
 #endif
 
        }
@@ -4534,7 +4557,7 @@ void display_equip(void)
 int show_inven(int target_item)
 {
        int             i, j, k, l, z = 0;
-       int             col, cur_col, len, lim;
+       int             col, cur_col, len;
        object_type     *o_ptr;
        char            o_name[MAX_NLEN];
        char            tmp_val[80];
@@ -4557,18 +4580,6 @@ int show_inven(int target_item)
        /* Default "max-length" */
        len = wid - col - 1;
 
-       /* Maximum space allowed for descriptions */
-       lim = wid - 4;
-
-       /* Require space for weight (if needed) */
-       if (show_weights) lim -= 9;
-
-       /* Require space for icon */
-       if (show_item_graph)
-       {
-               lim -= 2;
-               if (use_bigtile) lim--;
-       }
 
        /* Find the "final" slot */
        for (i = 0; i < INVEN_PACK; i++)
@@ -4589,13 +4600,14 @@ int show_inven(int target_item)
                strcpy(inven_spellbook_label, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
                for (i = 0; i < 52; i++)
                {
-                        char c;
-                        if (i < 26) c = (char)('a' + i);
-                        else c = (char)('A' + i - 26);
+                       char c;
+                       if (i < 26) c = (char)('a' + i);
+                       else c = (char)('A' + i - 26);
 
                        if (get_tag(&index, c))
                        {
-                               inven_spellbook_label[i] = ' ';
+                               if (inven_spellbook_label[i] == c)
+                                       inven_spellbook_label[i] = ' ';
                                inven_spellbook_label[index] = c;
                        }
                }
@@ -4612,9 +4624,6 @@ int show_inven(int target_item)
                /* Describe the object */
                object_desc(o_name, o_ptr, TRUE, 3);
 
-               /* Hack -- enforce max length */
-               o_name[lim] = '\0';
-
                /* Save the object index, color, and description */
                out_index[k] = i;
                out_color[k] = tval_to_attr[o_ptr->tval % 128];
@@ -4745,7 +4754,7 @@ int show_inven(int target_item)
 int show_equip(int target_item)
 {
        int             i, j, k, l;
-       int             col, cur_col, len, lim;
+       int             col, cur_col, len;
        object_type     *o_ptr;
        char            tmp_val[80];
        char            o_name[MAX_NLEN];
@@ -4765,26 +4774,6 @@ int show_equip(int target_item)
        /* Maximal length */
        len = wid - col - 1;
 
-       /* Maximum space allowed for descriptions */
-       lim = wid - 4;
-
-       /* Require space for labels (if needed) */
-#ifdef JP
-        if (show_labels) lim -= (7 + 2);
-#else
-       if (show_labels) lim -= (14 + 2);
-#endif
-
-
-       /* Require space for weight (if needed) */
-#ifdef JP
-        if (show_weights) lim -= 10;
-#else
-       if (show_weights) lim -= 9;
-#endif
-
-
-       if (show_item_graph) lim -= 2;
 
        /* Scan the equipment list */
        for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
@@ -4797,9 +4786,6 @@ int show_equip(int target_item)
                /* Description */
                object_desc(o_name, o_ptr, TRUE, 3);
 
-               /* Truncate the description */
-               o_name[lim] = 0;
-
                if ((i == INVEN_LARM) && p_ptr->ryoute)
                {
 #ifdef JP
@@ -4824,7 +4810,7 @@ int show_equip(int target_item)
 
                /* Extract the maximal length (see below) */
 #ifdef JP
-                l = strlen(out_desc[k]) + (2 + 1);
+               l = strlen(out_desc[k]) + (2 + 1);
 #else
                l = strlen(out_desc[k]) + (2 + 3);
 #endif
@@ -4832,7 +4818,7 @@ int show_equip(int target_item)
 
                /* Increase length for labels (if needed) */
 #ifdef JP
-                if (show_labels) l += (7 + 2);
+               if (show_labels) l += (7 + 2);
 #else
                if (show_labels) l += (14 + 2);
 #endif
@@ -4852,7 +4838,7 @@ int show_equip(int target_item)
 
        /* Hack -- Find a column to start in */
 #ifdef JP
-        col = (len > wid - 6) ? 0 : (wid - len - 1);
+       col = (len > wid - 6) ? 0 : (wid - len - 1);
 #else
        col = (len > wid - 4) ? 0 : (wid - len - 1);
 #endif
@@ -4944,7 +4930,7 @@ int show_equip(int target_item)
                {
                        int wgt = o_ptr->weight * o_ptr->number;
 #ifdef JP
-                        (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
+                       (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
 #else
                        (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
 #endif
@@ -5314,7 +5300,7 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
        /* Get the item index */
        if (repeat_pull(cp))
        {
-               if (*cp == 1111) { /* the_force */
+               if (*cp == 1111) { /* the_force */
                    item_tester_tval = 0;
                    item_tester_hook = NULL;
                    return (TRUE);
@@ -5480,10 +5466,10 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
        }
 
 
-        /*
-         * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
-         */
-        if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
+       /*
+        * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
+        */
+       if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
 
        /* Hack -- start out in "display" mode */
        if (command_see)
@@ -5578,7 +5564,7 @@ sprintf(tmp_val, "%c-%c,'(',')',",
                                sprintf(tmp_val, " %c-%c,'(',')',",
 #endif
 
-                                       index_to_label(i1), index_to_label(i2));
+                                       index_to_label(i1), index_to_label(i2));
 
                                /* Append */
                                strcat(out_val, tmp_val);
@@ -5626,7 +5612,7 @@ sprintf(tmp_val, "%c-%c,'(',')',",
                                sprintf(tmp_val, " %c-%c,'(',')',",
 #endif
 
-                                       index_to_label(e1), index_to_label(e2));
+                                       index_to_label(e1), index_to_label(e2));
 
                                /* Append */
                                strcat(out_val, tmp_val);
@@ -5767,7 +5753,7 @@ if (allow_floor) strcat(out_val, " '-'
                                done = TRUE;
                                break;
                        }
-                       case 'w':
+                       case 'w':
                        {
                                if (select_the_force) {
                                        *cp = 1111;
@@ -5969,7 +5955,7 @@ if (other_query_flag && !verify("
                                break;
                        }
 
-                       case 'w':
+                       case 'w':
                        {
                                if (select_the_force) {
                                        *cp = 1111;
@@ -5983,32 +5969,32 @@ if (other_query_flag && !verify("
                        {
                                int ver;
                                if(select_spellbook){
-                                    bool not_found = FALSE;
-                                    /* Look up the tag */
-                                    if (!get_tag(&k, which))
-                                    {
+                                   bool not_found = FALSE;
+                                   /* Look up the tag */
+                                   if (!get_tag(&k, which))
+                                   {
                                        not_found = TRUE;
-                                    }
+                                   }
 
-                                    /* Hack -- Validate the item */
-                                    if ((k < INVEN_RARM) ? !inven : !equip)
-                                    {
+                                   /* Hack -- Validate the item */
+                                   if ((k < INVEN_RARM) ? !inven : !equip)
+                                   {
                                        not_found = TRUE;
-                                    }
+                                   }
 
-                                    /* Validate the item */
-                                    if (!get_item_okay(k))
-                                    {
+                                   /* Validate the item */
+                                   if (!get_item_okay(k))
+                                   {
                                        not_found = TRUE;
-                                    }
-
-                                    if( !not_found ){
-                                        /* Accept that choice */
-                                        (*cp) = k;
-                                        item = TRUE;
-                                        done = TRUE;
-                                        break;
-                                    }
+                                   }
+
+                                   if( !not_found ){
+                                       /* Accept that choice */
+                                       (*cp) = k;
+                                       item = TRUE;
+                                       done = TRUE;
+                                       break;
+                                   }
                                }                               
 
                                /* Extract "query" setting */
@@ -6018,16 +6004,16 @@ if (other_query_flag && !verify("
                                /* Convert letter to inventory index */
                                if (!command_wrk)
                                {
-                                        if (which == '(') k = i1;
-                                        else if (which == ')') k = i2;
-                                        else k = label_to_inven(which);
+                                       if (which == '(') k = i1;
+                                       else if (which == ')') k = i2;
+                                       else k = label_to_inven(which);
                                }
 
                                /* Convert letter to equipment index */
                                else
                                {
-                                        if (which == '(') k = e1;
-                                        else if (which == ')') k = e2;
+                                       if (which == '(') k = e1;
+                                       else if (which == ')') k = e2;
                                        else k = label_to_equip(which);
                                }
 
@@ -6176,7 +6162,7 @@ int scan_floor(int *items, int y, int x, int mode)
 int show_floor(int target_item, int y, int x, int *min_width)
 {
        int i, j, k, l;
-       int col, len, lim;
+       int col, len;
 
        object_type *o_ptr;
 
@@ -6198,11 +6184,6 @@ int show_floor(int target_item, int y, int x, int *min_width)
        /* Default length */
        len = MAX((*min_width), 20);
 
-       /* Maximum space allowed for descriptions */
-       lim = wid - 4;
-
-       /* Require space for weight (if needed) */
-       if (show_weights) lim -= 9;
 
        /* Scan for objects in the grid, using item_tester_okay() */
        floor_num = scan_floor(floor_list, y, x, 0x01);
@@ -6215,9 +6196,6 @@ int show_floor(int target_item, int y, int x, int *min_width)
                /* Describe the object */
                object_desc(o_name, o_ptr, TRUE, 3);
 
-               /* Hack -- enforce max length */
-               o_name[lim] = '\0';
-
                /* Save the index */
                out_index[k] = i;
 
@@ -6343,7 +6321,7 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
        /* Get the item index */
        if (repeat_pull(cp))
        {
-               if (*cp == 1111) { /* the_force */
+               if (*cp == 1111) { /* the_force */
                    item_tester_tval = 0;
                    item_tester_hook = NULL;
                    return (TRUE);
@@ -6507,10 +6485,10 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
                }
        }
 
-        /*
-         * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
-         */
-        if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
+       /*
+        * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
+        */
+       if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
 
        /* Hack -- start out in "display" mode */
        if (command_see)
@@ -6616,7 +6594,7 @@ sprintf(tmp_val, "%c-%c,'(',')',",
                                sprintf(tmp_val, " %c-%c,'(',')',",
 #endif
 
-                                       index_to_label(i1), index_to_label(i2));
+                                       index_to_label(i1), index_to_label(i2));
 
                                /* Append */
                                strcat(out_val, tmp_val);
@@ -6699,7 +6677,7 @@ sprintf(tmp_val, "%c-%c,'(',')',",
                                sprintf(tmp_val, " %c-%c,'(',')',",
 #endif
 
-                                       index_to_label(e1), index_to_label(e2));
+                                       index_to_label(e1), index_to_label(e2));
 
                                /* Append */
                                strcat(out_val, tmp_val);
@@ -7050,7 +7028,7 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                                done = TRUE;
                                break;
                        }
-                       case 'w':
+                       case 'w':
                        {
                                if (select_the_force) {
                                        *cp = 1111;
@@ -7116,15 +7094,15 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
 
                                /* Remove the first object from the list. */
                                excise_object_idx(o_idx);
-       
+       
                                /* Find end of the list. */
                                i = c_ptr->o_idx;
                                while (o_list[i].next_o_idx)
                                        i = o_list[i].next_o_idx;
-       
+       
                                /* Add after the last object. */
                                o_list[i].next_o_idx = o_idx;
-       
+       
                                /* Re-scan floor list */ 
                                floor_num = scan_floor(floor_list, py, px, 0x01);
 
@@ -7346,7 +7324,7 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                        }
 #endif
 
-                       case 'w':
+                       case 'w':
                        {
                                if (select_the_force) {
                                        *cp = 1111;
@@ -7361,32 +7339,32 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                                int ver;
 
                                if(select_spellbook){
-                                    bool not_found = FALSE;
-                                    /* Look up the tag */
-                                    if (!get_tag(&k, which))
-                                    {
+                                   bool not_found = FALSE;
+                                   /* Look up the tag */
+                                   if (!get_tag(&k, which))
+                                   {
                                        not_found = TRUE;
-                                    }
+                                   }
 
-                                    /* Hack -- Validate the item */
-                                    if ((k < INVEN_RARM) ? !inven : !equip)
-                                    {
+                                   /* Hack -- Validate the item */
+                                   if ((k < INVEN_RARM) ? !inven : !equip)
+                                   {
                                        not_found = TRUE;
-                                    }
+                                   }
 
-                                    /* Validate the item */
-                                    if (!get_item_okay(k))
-                                    {
+                                   /* Validate the item */
+                                   if (!get_item_okay(k))
+                                   {
                                        not_found = TRUE;
-                                    }
-
-                                    if( !not_found ){
-                                        /* Accept that choice */
-                                        (*cp) = k;
-                                        item = TRUE;
-                                        done = TRUE;
-                                        break;
-                                    }
+                                   }
+
+                                   if( !not_found ){
+                                       /* Accept that choice */
+                                       (*cp) = k;
+                                       item = TRUE;
+                                       done = TRUE;
+                                       break;
+                                   }
                                }                               
 
                                /* Extract "query" setting */
@@ -7396,24 +7374,24 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                                /* Convert letter to inventory index */
                                if (command_wrk == (USE_INVEN))
                                {
-                                        if (which == '(') k = i1;
-                                        else if (which == ')') k = i2;
+                                       if (which == '(') k = i1;
+                                       else if (which == ')') k = i2;
                                        else k = label_to_inven(which);
                                }
 
                                /* Convert letter to equipment index */
                                else if (command_wrk == (USE_EQUIP))
                                {
-                                        if (which == '(') k = e1;
-                                        else if (which == ')') k = e2;
+                                       if (which == '(') k = e1;
+                                       else if (which == ')') k = e2;
                                        else k = label_to_equip(which);
                                }
 
                                /* Convert letter to floor index */
                                else if (command_wrk == USE_FLOOR)
                                {
-                                        if (which == '(') k = 0;
-                                        else if (which == ')') k = floor_num - 1;
+                                       if (which == '(') k = 0;
+                                       else if (which == ')') k = floor_num - 1;
                                        else k = islower(which) ? A2I(which) : -1;
                                        if (k < 0 || k >= floor_num || k >= 23)
                                        {
@@ -7589,8 +7567,8 @@ void py_pickup_floor(int pickup)
                {
                        /* Message */
 #ifdef JP
-                msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
-                           (long)o_ptr->pval, o_name);
+               msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
+                          (long)o_ptr->pval, o_name);
 #else
                        msg_format("You have found %ld gold pieces worth of %s.",
                                (long) o_ptr->pval, o_name);
@@ -7612,6 +7590,13 @@ void py_pickup_floor(int pickup)
                        /* Check the next object */
                        continue;
                }
+               else if (o_ptr->marked & OM_NOMSG)
+               {
+                       /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
+                        * ignored. Otherwise, they are included in the prompt. */
+                       o_ptr->marked &= ~(OM_NOMSG);
+                       continue;
+               }
 
                /* Count non-gold objects that can be picked up. */
                if (inven_carry_okay(o_ptr))
@@ -7659,7 +7644,7 @@ void py_pickup_floor(int pickup)
 
                        /* Message */
 #ifdef JP
-                                msg_format("%s¤¬¤¢¤ë¡£", o_name);
+                               msg_format("%s¤¬¤¢¤ë¡£", o_name);
 #else
                        msg_format("You see %s.", o_name);
 #endif
@@ -7707,7 +7692,7 @@ void py_pickup_floor(int pickup)
 
                        /* Message */
 #ifdef JP
-                                msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
+                               msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
 #else
                        msg_format("You have no room for %s.", o_name);
 #endif
@@ -7719,7 +7704,7 @@ void py_pickup_floor(int pickup)
                {
                        /* Message */
 #ifdef JP
-                        msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
+                       msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
 #else
                        msg_print("You have no room for any of the objects on the floor.");
 #endif