OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement.
authorDeskull <deskull@users.sourceforge.jp>
Tue, 4 Dec 2018 10:20:36 +0000 (19:20 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Tue, 4 Dec 2018 10:20:36 +0000 (19:20 +0900)
src/melee1.c
src/object2.c
src/types.h

index c5693da..b612a67 100644 (file)
@@ -416,7 +416,6 @@ static void natural_attack(s16b m_idx, int attack, bool *fear, bool *mdeath)
        else
        {
                sound(SOUND_MISS);
-
                msg_format(_("ミス! %sにかわされた。", "You miss %s."), m_name);
        }
 }
index ddc469c..0264df0 100644 (file)
@@ -64,9 +64,7 @@ void excise_object_idx(OBJECT_IDX o_idx)
        object_type *j_ptr;
 
        OBJECT_IDX this_o_idx, next_o_idx = 0;
-
-       s16b prev_o_idx = 0;
-
+       OBJECT_IDX prev_o_idx = 0;
 
        /* Object */
        j_ptr = &o_list[o_idx];
@@ -262,16 +260,15 @@ void delete_object(POSITION y, POSITION x)
  * @param i2 整理したい配列の終点
  * @return なし
  */
-static void compact_objects_aux(IDX i1, IDX i2)
+static void compact_objects_aux(OBJECT_IDX i1, OBJECT_IDX i2)
 {
-       IDX i;
+       OBJECT_IDX i;
        cave_type *c_ptr;
        object_type *o_ptr;
 
        /* Do nothing */
        if (i1 == i2) return;
 
-
        /* Repair objects */
        for (i = 1; i < o_max; i++)
        {
@@ -289,11 +286,9 @@ static void compact_objects_aux(IDX i1, IDX i2)
                }
        }
 
-
        /* Acquire object */
        o_ptr = &o_list[i1];
 
-
        /* Monster */
        if (o_ptr->held_m_idx)
        {
@@ -330,7 +325,6 @@ static void compact_objects_aux(IDX i1, IDX i2)
                }
        }
 
-
        /* Structure copy */
        o_list[i2] = o_list[i1];
 
@@ -363,14 +357,11 @@ void compact_objects(int size)
        int cur_lev, cur_dis, chance;
        object_type *o_ptr;
 
-
        /* Compact */
        if (size)
        {
                msg_print(_("アイテム情報を圧縮しています...", "Compacting objects..."));
-
                p_ptr->redraw |= (PR_MAP);
-
                p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
        }
 
index 7eec923..3b99c84 100644 (file)
@@ -537,8 +537,8 @@ struct object_type
 
        WEIGHT weight;          /* Item weight */
 
-       IDX name1;                      /* Artifact type, if any */
-       IDX name2;                      /* Ego-Item type, if any */
+       ARTIFACT_IDX name1;             /* Artifact type, if any */
+       EGO_IDX name2;                  /* Ego-Item type, if any */
 
        XTRA8 xtra1;                    /* Extra info type (now unused) */
        XTRA8 xtra2;                    /* Extra info activation index */
@@ -558,7 +558,6 @@ struct object_type
        TIME_EFFECT timeout;    /* Timeout Counter */
 
        byte ident;                     /* Special flags  */
-
        byte marked;            /* Object is marked */
 
        u16b inscription;       /* Inscription index */
@@ -569,8 +568,8 @@ struct object_type
        BIT_FLAGS art_flags[TR_FLAG_SIZE];        /* Extra Flags for ego and artifacts */
        BIT_FLAGS curse_flags;        /* Flags for curse */
 
-       IDX next_o_idx; /* Next object in stack (if any) */
-       IDX held_m_idx; /* Monster holding us (if any) */
+       OBJECT_IDX next_o_idx;  /* Next object in stack (if any) */
+       MONSTER_IDX held_m_idx; /* Monster holding us (if any) */
 
        ARTIFACT_BIAS_IDX artifact_bias; /*!< ランダムアーティファクト生成時のバイアスID */
 };
@@ -579,9 +578,7 @@ struct object_type
 
 /*
  * Monster information, for a specific monster.
- *
  * Note: fy, fx constrain dungeon size to 256x256
- *
  * The "hold_o_idx" field points to the first object of a stack
  * of objects (if any) being carried by the monster (see above).
  */