OSDN Git Service

まだ、bigtile_attr()を使ったコード整理すらしていない部分があったので、
[hengband/hengband.git] / src / object1.c
index 2ab40a4..2aebce0 100644 (file)
@@ -4238,13 +4238,13 @@ cptr describe_use(int i)
        switch (i)
        {
 #ifdef JP
-case INVEN_RARM: p = p_ptr->ryoute ? " Î¾¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
+case INVEN_RARM: p = p_ptr->ryoute ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
 #else
                case INVEN_RARM: p = "attacking monsters with"; break;
 #endif
 
 #ifdef JP
-case INVEN_LARM:   p = (left_hander ? " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
+case INVEN_LARM:   p = (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
 #else
                case INVEN_LARM:   p = "wearing on your arm"; break;
 #endif
@@ -4654,7 +4654,7 @@ static bool get_tag(int *cp, char tag, int mode)
                if (!item_tester_okay(o_ptr)) continue;
 
                /* Find a '@' */
-               s = strchr(quark_str(o_ptr->inscription), '@');
+               s = my_strchr(quark_str(o_ptr->inscription), '@');
 
                /* Process all tags */
                while (s)
@@ -4670,7 +4670,7 @@ static bool get_tag(int *cp, char tag, int mode)
                        }
 
                        /* Find another '@' */
-                       s = strchr(s + 1, '@');
+                       s = my_strchr(s + 1, '@');
                }
        }
 
@@ -4699,7 +4699,7 @@ static bool get_tag(int *cp, char tag, int mode)
                if (!item_tester_okay(o_ptr)) continue;
 
                /* Find a '@' */
-               s = strchr(quark_str(o_ptr->inscription), '@');
+               s = my_strchr(quark_str(o_ptr->inscription), '@');
 
                /* Process all tags */
                while (s)
@@ -4715,7 +4715,7 @@ static bool get_tag(int *cp, char tag, int mode)
                        }
 
                        /* Find another '@' */
-                       s = strchr(s + 1, '@');
+                       s = my_strchr(s + 1, '@');
                }
        }
 
@@ -4750,7 +4750,7 @@ static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
                if (!o_ptr->inscription) continue;
 
                /* Find a '@' */
-               s = strchr(quark_str(o_ptr->inscription), '@');
+               s = my_strchr(quark_str(o_ptr->inscription), '@');
 
                /* Process all tags */
                while (s)
@@ -4766,7 +4766,7 @@ static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
                        }
 
                        /* Find another '@' */
-                       s = strchr(s + 1, '@');
+                       s = my_strchr(s + 1, '@');
                }
        }
 
@@ -4789,7 +4789,7 @@ static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
                if (!o_ptr->inscription) continue;
 
                /* Find a '@' */
-               s = strchr(quark_str(o_ptr->inscription), '@');
+               s = my_strchr(quark_str(o_ptr->inscription), '@');
 
                /* Process all tags */
                while (s)
@@ -4805,7 +4805,7 @@ static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
                        }
 
                        /* Find another '@' */
-                       s = strchr(s + 1, '@');
+                       s = my_strchr(s + 1, '@');
                }
        }
 
@@ -5015,13 +5015,9 @@ int show_inven(int target_item)
                        if (a & 0x80) a |= 0x40;
 #endif
 
-                       Term_draw(cur_col, j + 1, a, c);
-                       if (use_bigtile)
-                       {
-                               cur_col++;
-                               if (a & 0x80)
-                                       Term_draw(cur_col, j + 1, 255, -1);
-                       }
+                       Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
+                       if (use_bigtile) cur_col++;
+
                        cur_col += 2;
                }
 
@@ -5202,13 +5198,9 @@ int show_equip(int target_item)
                        if (a & 0x80) a |= 0x40;
 #endif
 
-                       Term_draw(cur_col, j + 1, a, c);
-                       if (use_bigtile)
-                       {
-                               cur_col++;
-                               if (a & 0x80)
-                                       Term_draw(cur_col, j + 1, 255, -1);
-                       }
+                       Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
+                       if (use_bigtile) cur_col++;
+
                        cur_col += 2;
                }
 
@@ -5355,6 +5347,8 @@ static bool get_item_allow(int item)
 
        object_type *o_ptr;
 
+       if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
+
        /* Inventory */
        if (item >= 0)
        {
@@ -5371,7 +5365,7 @@ static bool get_item_allow(int item)
        if (!o_ptr->inscription) return (TRUE);
 
        /* Find a '!' */
-       s = strchr(quark_str(o_ptr->inscription), '!');
+       s = my_strchr(quark_str(o_ptr->inscription), '!');
 
        /* Process preventions */
        while (s)
@@ -5389,7 +5383,7 @@ if (!verify("
                }
 
                /* Find another '!' */
-               s = strchr(s + 1, '!');
+               s = my_strchr(s + 1, '!');
        }
 
        /* Allow it */
@@ -5717,41 +5711,39 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
                int get_item_label = 0;
 
                /* Show choices */
-               if (show_choices)
+               int ni = 0;
+               int ne = 0;
+
+               /* Scan windows */
+               for (j = 0; j < 8; j++)
                {
-                       int ni = 0;
-                       int ne = 0;
+                       /* Unused */
+                       if (!angband_term[j]) continue;
 
-                       /* Scan windows */
-                       for (j = 0; j < 8; j++)
-                       {
-                               /* Unused */
-                               if (!angband_term[j]) continue;
+                       /* Count windows displaying inven */
+                       if (window_flag[j] & (PW_INVEN)) ni++;
 
-                               /* Count windows displaying inven */
-                               if (window_flag[j] & (PW_INVEN)) ni++;
+                       /* Count windows displaying equip */
+                       if (window_flag[j] & (PW_EQUIP)) ne++;
+               }
 
-                               /* Count windows displaying equip */
-                               if (window_flag[j] & (PW_EQUIP)) ne++;
-                       }
+               /* Toggle if needed */
+               if ((command_wrk && ni && !ne) ||
+                   (!command_wrk && !ni && ne))
+               {
+                       /* Toggle */
+                       toggle_inven_equip();
 
-                       /* Toggle if needed */
-                       if ((command_wrk && ni && !ne) ||
-                           (!command_wrk && !ni && ne))
-                       {
-                               /* Toggle */
-                               toggle_inven_equip();
+                       /* Track toggles */
+                       toggle = !toggle;
+               }
 
-                               /* Track toggles */
-                               toggle = !toggle;
-                       }
+               /* Update */
+               p_ptr->window |= (PW_INVEN | PW_EQUIP);
 
-                       /* Update */
-                       p_ptr->window |= (PW_INVEN | PW_EQUIP);
+               /* Redraw windows */
+               window_stuff();
 
-                       /* Redraw windows */
-                       window_stuff();
-               }
 
                /* Inventory screen */
                if (!command_wrk)
@@ -6300,18 +6292,15 @@ if (ver && !verify("
        item_tester_hook = NULL;
 
 
-       /* Clean up */
-       if (show_choices)
-       {
-               /* Toggle again if needed */
-               if (toggle) toggle_inven_equip();
+       /* Clean up  'show choices' */
+       /* Toggle again if needed */
+       if (toggle) toggle_inven_equip();
 
-               /* Update */
-               p_ptr->window |= (PW_INVEN | PW_EQUIP);
+       /* Update */
+       p_ptr->window |= (PW_INVEN | PW_EQUIP);
 
-               /* Window stuff */
-               window_stuff();
-       }
+       /* Window stuff */
+       window_stuff();
 
 
        /* Clear the prompt line */
@@ -6747,41 +6736,38 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
                int get_item_label = 0;
 
                /* Show choices */
-               if (show_choices)
-               {
-                       int ni = 0;
-                       int ne = 0;
+               int ni = 0;
+               int ne = 0;
 
-                       /* Scan windows */
-                       for (j = 0; j < 8; j++)
-                       {
-                               /* Unused */
-                               if (!angband_term[j]) continue;
+               /* Scan windows */
+               for (j = 0; j < 8; j++)
+               {
+                       /* Unused */
+                       if (!angband_term[j]) continue;
 
-                               /* Count windows displaying inven */
-                               if (window_flag[j] & (PW_INVEN)) ni++;
+                       /* Count windows displaying inven */
+                       if (window_flag[j] & (PW_INVEN)) ni++;
 
-                               /* Count windows displaying equip */
-                               if (window_flag[j] & (PW_EQUIP)) ne++;
-                       }
+                       /* Count windows displaying equip */
+                       if (window_flag[j] & (PW_EQUIP)) ne++;
+               }
 
-                       /* Toggle if needed */
-                       if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
-                               (command_wrk == (USE_INVEN) && !ni && ne))
-                       {
-                               /* Toggle */
-                               toggle_inven_equip();
+               /* Toggle if needed */
+               if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
+                   (command_wrk == (USE_INVEN) && !ni && ne))
+               {
+                       /* Toggle */
+                       toggle_inven_equip();
 
-                               /* Track toggles */
-                               toggle = !toggle;
-                       }
+                       /* Track toggles */
+                       toggle = !toggle;
+               }
 
-                       /* Update */
-                       p_ptr->window |= (PW_INVEN | PW_EQUIP);
+               /* Update */
+               p_ptr->window |= (PW_INVEN | PW_EQUIP);
 
-                       /* Redraw windows */
-                       window_stuff();
-               }
+               /* Redraw windows */
+               window_stuff();
 
                /* Inventory screen */
                if (command_wrk == (USE_INVEN))
@@ -7738,18 +7724,15 @@ if (ver && !verify("
        item_tester_hook = NULL;
 
 
-       /* Clean up */
-       if (show_choices)
-       {
-               /* Toggle again if needed */
-               if (toggle) toggle_inven_equip();
+       /* Clean up  'show choices' */
+       /* Toggle again if needed */
+       if (toggle) toggle_inven_equip();
 
-               /* Update */
-               p_ptr->window |= (PW_INVEN | PW_EQUIP);
+       /* Update */
+       p_ptr->window |= (PW_INVEN | PW_EQUIP);
 
-               /* Window stuff */
-               window_stuff();
-       }
+       /* Window stuff */
+       window_stuff();
 
 
        /* Clear the prompt line */