OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
authorDeskull <desull@users.sourceforge.jp>
Thu, 2 Nov 2017 15:15:44 +0000 (00:15 +0900)
committerDeskull <desull@users.sourceforge.jp>
Thu, 2 Nov 2017 15:15:44 +0000 (00:15 +0900)
src/cmd5.c
src/h-type.h
src/init1.c
src/object1.c
src/save.c
src/types.h

index 456d73f..e9b8e39 100644 (file)
@@ -64,7 +64,7 @@ bool select_the_force = FALSE;
  * The "known" should be TRUE for cast/pray, FALSE for study
  * </pre>
  */
-static int get_spell(COMMAND_CODE *sn, cptr prompt, OBJECT_SUBTYPE_VALUE sval, bool learned, REALM_IDX use_realm)
+static int get_spell(SPELL_IDX *sn, cptr prompt, OBJECT_SUBTYPE_VALUE sval, bool learned, REALM_IDX use_realm)
 {
        int         i;
        SPELL_IDX   spell = -1;
index 75c8bc4..b66e5ee 100644 (file)
@@ -142,6 +142,7 @@ typedef byte CHARACTER_IDX;         /*!< ゲーム中のキャラクター特性各種I
 typedef byte DISCOUNT_RATE;            /*!< ゲーム中の値引き率の型を定義 */
 typedef byte SPEED;                            /*!< ゲーム中の加速値の型定義 */
 typedef s16b ENERGY;                   /*!< ゲーム中の行動エネルギーの型定義 */
+typedef s16b SLEEP_DEGREE;             /*!< モンスターの睡眠度の型定義 */
 
 typedef s16b PLAYER_LEVEL;             /*!< ゲーム中のプレイヤーレベルの型を定義 */
 typedef int DIRECTION;                 /*!< ゲーム中の方角の型定義 */
index 6b43b9a..b6df92e 100644 (file)
@@ -2980,9 +2980,9 @@ errr parse_r_info(char *buf, header *head)
                r_ptr->speed = (SPEED)spd;
                r_ptr->hdice = (DICE_NUMBER)MAX(hp1, 1);
                r_ptr->hside = (DICE_SID)MAX(hp2, 1);
-               r_ptr->aaf = aaf;
+               r_ptr->aaf = (POSITION)aaf;
                r_ptr->ac = (ARMOUR_CLASS)ac;
-               r_ptr->sleep = slp;
+               r_ptr->sleep = (SLEEP_DEGREE)slp;
        }
 
        /* Process 'W' for "More Info" (one line only) */
index 7391450..eecf2a4 100644 (file)
@@ -3632,7 +3632,7 @@ int scan_floor(int *items, POSITION y, POSITION x, int mode)
 COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_POSITION *min_width)
 {
        COMMAND_CODE i;
-       int j, k, l;
+       int j, k, l, m;
        int col, len;
 
        object_type *o_ptr;
@@ -3708,10 +3708,10 @@ COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_POSITION *
        for (j = 0; j < k; j++)
        {
                /* Get the index */
-               i = floor_list[out_index[j]];
+               m = floor_list[out_index[j]];
 
                /* Get the item */
-               o_ptr = &o_list[i];
+               o_ptr = &o_list[m];
 
                /* Clear the line */
                prt("", j + 1, col ? col - 2 : col);
@@ -3721,7 +3721,7 @@ COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_POSITION *
                        if (j == (target_item-1))
                        {
                                strcpy(tmp_val, _("》", "> "));
-                               target_item_label = i;
+                               target_item_label = m;
                        }
                        else strcpy(tmp_val, "   ");
                }
index 6c08f41..a80ee73 100644 (file)
@@ -769,7 +769,7 @@ static void wr_extra(void)
        wr_s16b(p_ptr->magicdef);
        wr_s16b(p_ptr->tim_res_nether);
        wr_s16b(p_ptr->tim_res_time);
-       wr_byte(p_ptr->mimic_form);
+       wr_byte((byte)p_ptr->mimic_form);
        wr_s16b(p_ptr->tim_mimic);
        wr_s16b(p_ptr->tim_sh_fire);
        wr_s16b(p_ptr->tim_sh_holy);
@@ -1272,6 +1272,8 @@ static bool wr_savefile_new(void)
        u16b            tmp16u;
        u32b            tmp32u;
 
+       MONRACE_IDX r_idx;
+       KIND_OBJECT_IDX k_idx;
 
        /* Compact the objects */
        compact_objects(0);
@@ -1279,7 +1281,7 @@ static bool wr_savefile_new(void)
        compact_monsters(0);
 
        /* Guess at the current time */
-       now = time((time_t *)0);
+       now = (u32b)time((time_t *)0);
 
 
        /* Note the operating system */
@@ -1370,17 +1372,15 @@ static bool wr_savefile_new(void)
                wr_string(message_str((s16b)i));
        }
 
-
        /* Dump the monster lore */
        tmp16u = max_r_idx;
        wr_u16b(tmp16u);
-       for (i = 0; i < tmp16u; i++) wr_lore(i);
-
+       for (r_idx = 0; r_idx < tmp16u; r_idx++) wr_lore(r_idx);
 
        /* Dump the object memory */
        tmp16u = max_k_idx;
        wr_u16b(tmp16u);
-       for (i = 0; i < tmp16u; i++) wr_xtra(i);
+       for (k_idx = 0; k_idx < tmp16u; k_idx++) wr_xtra(k_idx);
 
        /* Dump the towns */
        tmp16u = max_towns;
index 1aa4b0d..c85764e 100644 (file)
@@ -301,8 +301,8 @@ struct monster_race
 
        ARMOUR_CLASS ac;                /*!< アーマークラス / Armour Class */
 
-       s16b sleep;                             /*!< 睡眠値 / Inactive counter (base) */
-       byte aaf;                               /*!< 感知範囲(1-100スクエア) / Area affect radius (1-100) */
+       SLEEP_DEGREE sleep;                             /*!< 睡眠値 / Inactive counter (base) */
+       POSITION aaf;                           /*!< 感知範囲(1-100スクエア) / Area affect radius (1-100) */
        SPEED speed;                            /*!< 加速(110で+0) / Speed (normally 110) */
 
        EXP mexp;                               /*!< 殺害時基本経験値 / Exp value for kill */