OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
authorDeskull <desull@users.sourceforge.jp>
Sun, 1 Oct 2017 11:33:58 +0000 (20:33 +0900)
committerDeskull <desull@users.sourceforge.jp>
Sun, 1 Oct 2017 11:33:58 +0000 (20:33 +0900)
src/bldg.c
src/cmd4.c
src/cmd5.c
src/cmd6.c
src/files.c
src/mspells1.c
src/mspells2.c

index b08a78a..9e2a873 100644 (file)
@@ -3294,7 +3294,7 @@ static int repair_broken_weapon_aux(int bcost)
        else /* TV_BROKEN_SWORD */
        {
                /* Repair to a sword or sometimes material's type weapon */
-               IDX tval = (one_in_(5) ? mo_ptr->tval : TV_SWORD);
+               OBJECT_TYPE_VALUE tval = (one_in_(5) ? mo_ptr->tval : TV_SWORD);
 
                while(1)
                {
index 9925ac1..c2ae792 100644 (file)
@@ -3477,7 +3477,7 @@ void do_cmd_visuals(void)
                case '5':
                {
                        static cptr choice_msg = _("アイテムの[色/文字]を変更します", "Change object attr/chars");
-                       static int k = 0;
+                       static IDX k = 0;
                        prt(format(_("コマンド: %s", "Command: %s"), choice_msg), 15, 0);
 
                        /* Hack -- query until done */
@@ -5619,7 +5619,7 @@ static void do_cmd_knowledge_uniques(void)
 {
        int i, k, n = 0;
        u16b why = 2;
-       s16b *who;
+       IDX *who;
 
        FILE *fff;
 
@@ -7452,7 +7452,7 @@ static void display_feature_list(int col, int row, int per_page, int *feat_idx,
 /*
  * Interact with feature visuals.
  */
-static void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, int direct_f_idx, int *lighting_level)
+static void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX direct_f_idx, int *lighting_level)
 {
        IDX i;
        int len, max;
@@ -7486,7 +7486,7 @@ static void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, int d
        browser_rows = hgt - 8;
 
        /* Allocate the "feat_idx" array */
-       C_MAKE(feat_idx, max_f_idx, int);
+       C_MAKE(feat_idx, max_f_idx, IDX);
 
        max = 0;
        grp_cnt = 0;
@@ -8342,7 +8342,8 @@ static void do_cmd_knowledge_quests(void)
        FILE *fff;
        char file_name[1024];
        IDX *quest_num;
-       int dummy, i;
+       int dummy;
+       IDX i;
 
        /* Open a new file */
        fff = my_fopen_temp(file_name, 1024);
index 0c31983..6b7f4ac 100644 (file)
@@ -1051,7 +1051,9 @@ static void wild_magic(int spell)
  */
 void do_cmd_cast(void)
 {
-       int     item, sval, spell, realm;
+       int     item;
+       OBJECT_SUBTYPE_VALUE sval;
+       int spell, realm;
        int     chance;
        int     increment = 0;
        int     use_realm;
index 4e81094..cd6f856 100644 (file)
@@ -2585,7 +2585,7 @@ static int wand_effect(OBJECT_SUBTYPE_VALUE sval, int dir, bool powerful, bool m
        if (sval == SV_WAND_WONDER)
        {
                int vir = virtue_number(V_CHANCE);
-               sval = randint0(SV_WAND_WONDER);
+               sval = (OBJECT_SUBTYPE_VALUE)randint0(SV_WAND_WONDER);
 
                if (vir)
                {
index d2e71b2..696facd 100644 (file)
@@ -4424,7 +4424,7 @@ static void dump_aux_class_special(FILE *fff)
  */
 static void dump_aux_quest(FILE *fff)
 {
-       int i;
+       IDX i;
        IDX *quest_num;
        int dummy;
 
index 02e8164..0e4d28d 100644 (file)
@@ -1441,9 +1441,11 @@ static bool adjacent_grid_check(monster_type *m_ptr, POSITION *yp, POSITION *xp,
  */
 bool make_attack_spell(IDX m_idx)
 {
-       int             k, thrown_spell = 0, rlev, failrate;
+       int k, thrown_spell = 0;
+       DEPTH rlev;
+       PERCENTAGE failrate;
        byte            spell[96], num = 0;
-       u32b            f4, f5, f6;
+       BIT_FLAGS f4, f5, f6;
        monster_type    *m_ptr = &m_list[m_idx];
        monster_race    *r_ptr = &r_info[m_ptr->r_idx];
        char            m_name[80];
index 93d3b23..dc1793d 100644 (file)
@@ -222,7 +222,7 @@ void get_project_point(int sy, int sx, int *ty, int *tx, int flg)
  * @param t_idx 目標のモンスターID
  * @return 魔力消去を使うべきならばTRUEを変えす。
  */
-static bool dispel_check_monster(int m_idx, int t_idx)
+static bool dispel_check_monster(IDX m_idx, IDX t_idx)
 {
        monster_type *t_ptr = &m_list[t_idx];