OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
[hengband/hengband.git] / src / object1.c
index f03f4e4..2e52f97 100644 (file)
@@ -1319,10 +1319,10 @@ char index_to_label(int i)
  */
 INVENTORY_IDX label_to_inven(int c)
 {
-       int i;
+       INVENTORY_IDX i;
 
        /* Convert */
-       i = (islower(c) ? A2I(c) : -1);
+       i = (INVENTORY_IDX)(islower(c) ? A2I(c) : -1);
 
        /* Verify the index */
        if ((i < 0) || (i > INVEN_PACK)) return (-1);
@@ -1357,10 +1357,10 @@ static bool is_ring_slot(int i)
  */
 INVENTORY_IDX label_to_equip(int c)
 {
-       int i;
+       INVENTORY_IDX i;
 
        /* Convert */
-       i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
+       i = (INVENTORY_IDX)(islower(c) ? A2I(c) : -1) + INVEN_RARM;
 
        /* Verify the index */
        if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
@@ -1856,7 +1856,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(int *cp, char tag, int mode)
+static bool get_tag(COMMAND_CODE *cp, char tag, int mode)
 {
        int i, start, end;
        cptr s;
@@ -1981,7 +1981,7 @@ static bool get_tag(int *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(int *cp, char tag, int floor_list[], int floor_num)
+static bool get_tag_floor(COMMAND_CODE *cp, char tag, int floor_list[], int floor_num)
 {
        int i;
        cptr s;
@@ -2718,13 +2718,16 @@ 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(int *cp, cptr pmt, cptr str, int mode)
+bool get_item(COMMAND_CODE *cp, cptr pmt, cptr str, int mode)
 {
-       s16b this_o_idx, next_o_idx = 0;
+       OBJECT_IDX this_o_idx, next_o_idx = 0;
 
        char which = ' ';
 
-       int j, k, i1, i2, e1, e2;
+       int j;
+       COMMAND_CODE k;
+       COMMAND_CODE i1, i2;
+       COMMAND_CODE e1, e2;
 
        bool done, item;
 
@@ -3759,11 +3762,13 @@ int show_floor(int target_item, int y, int x, int *min_width)
  * @param mode オプションフラグ
  * @return プレイヤーによりアイテムが選択されたならTRUEを返す。/
  */
-bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
+bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int mode)
 {
        char n1 = ' ', n2 = ' ', which = ' ';
 
-       int j, k, i1, i2, e1, e2;
+       int j, i1, i2;
+       COMMAND_CODE e1, e2;
+       COMMAND_CODE k;
 
        bool done, item;
 
@@ -4027,7 +4032,7 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
        /* Repeat until done */
        while (!done)
        {
-               int get_item_label = 0;
+               COMMAND_CODE get_item_label = 0;
 
                /* Show choices */
                int ni = 0;