OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
[hengband/hengband.git] / src / xtra2.c
index f17b5ea..2b99d52 100644 (file)
@@ -230,7 +230,7 @@ msg_format("レベル %d にようこそ。", p_ptr->lev);
  * Used to allocate proper treasure when "Creeping coins" die
  * XXX XXX XXX Note the use of actual "monster names"
  */
-static int get_coin_type(IDX r_idx)
+static int get_coin_type(MONRACE_IDX r_idx)
 {
        /* Analyze monsters */
        switch (r_idx)
@@ -254,7 +254,7 @@ static int get_coin_type(IDX r_idx)
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトがクロークならばTRUEを返す
  */
-static bool kind_is_cloak(int k_idx)
+static bool kind_is_cloak(KIND_OBJECT_IDX k_idx)
 {
        object_kind *k_ptr = &k_info[k_idx];
 
@@ -275,7 +275,7 @@ static bool kind_is_cloak(int k_idx)
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトが竿状武器ならばTRUEを返す
  */
-static bool kind_is_polearm(int k_idx)
+static bool kind_is_polearm(KIND_OBJECT_IDX k_idx)
 {
        object_kind *k_ptr = &k_info[k_idx];
 
@@ -296,7 +296,7 @@ static bool kind_is_polearm(int k_idx)
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトが剣ならばTRUEを返す
  */
-static bool kind_is_sword(int k_idx)
+static bool kind_is_sword(KIND_OBJECT_IDX k_idx)
 {
        object_kind *k_ptr = &k_info[k_idx];
 
@@ -317,7 +317,7 @@ static bool kind_is_sword(int k_idx)
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトが魔法書ならばTRUEを返す
  */
-static bool kind_is_book(int k_idx)
+static bool kind_is_book(KIND_OBJECT_IDX k_idx)
 {
        object_kind *k_ptr = &k_info[k_idx];
 
@@ -338,7 +338,7 @@ static bool kind_is_book(int k_idx)
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトがベースアイテム時点でGOODなアイテムならばTRUEを返す
  */
-static bool kind_is_good_book(int k_idx)
+static bool kind_is_good_book(KIND_OBJECT_IDX k_idx)
 {
        object_kind *k_ptr = &k_info[k_idx];
 
@@ -359,7 +359,7 @@ static bool kind_is_good_book(int k_idx)
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトが鎧ならばTRUEを返す
  */
-static bool kind_is_armor(int k_idx)
+static bool kind_is_armor(KIND_OBJECT_IDX k_idx)
 {
        object_kind *k_ptr = &k_info[k_idx];
 
@@ -380,7 +380,7 @@ static bool kind_is_armor(int k_idx)
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトが打撃武器ならばTRUEを返す
  */
-static bool kind_is_hafted(int k_idx)
+static bool kind_is_hafted(KIND_OBJECT_IDX k_idx)
 {
        object_kind *k_ptr = &k_info[k_idx];
 
@@ -439,7 +439,7 @@ static int count_all_hostile_monsters(void)
        {
                for (y = 0; y < cur_hgt; ++ y)
                {
-                       IDX m_idx = cave[y][x].m_idx;
+                       MONSTER_IDX m_idx = cave[y][x].m_idx;
 
                        if (m_idx > 0 && is_hostile(&m_list[m_idx]))
                        {
@@ -737,7 +737,7 @@ cptr extract_note_dies(monster_race *r_ptr)
  * it drops all of its objects, which may disappear in crowded rooms.
  * </pre>
  */
-void monster_death(IDX m_idx, bool drop_item)
+void monster_death(MONSTER_IDX m_idx, bool drop_item)
 {
        int i, j, y, x;
 
@@ -1478,7 +1478,7 @@ HIT_POINT mon_damage_mod(monster_type *m_ptr, HIT_POINT dam, bool is_psy_spear)
  * experience point of a monster later.
  * </pre>
  */
-static void get_exp_from_mon(int dam, monster_type *m_ptr)
+static void get_exp_from_mon(HIT_POINT dam, monster_type *m_ptr)
 {
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
@@ -1577,7 +1577,7 @@ static void get_exp_from_mon(int dam, monster_type *m_ptr)
  * to induce changes in the monster recall code.
  * </pre>
  */
-bool mon_take_hit(IDX m_idx, int dam, bool *fear, cptr note)
+bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
 {
        monster_type    *m_ptr = &m_list[m_idx];
        monster_race    *r_ptr = &r_info[m_ptr->r_idx];
@@ -2530,7 +2530,7 @@ void ang_sort(vptr u, vptr v, int n)
  * Future versions may restrict the ability to target "trappers"
  * and "mimics", but the semantics is a little bit weird.
  */
-bool target_able(IDX m_idx)
+bool target_able(MONSTER_IDX m_idx)
 {
        monster_type *m_ptr = &m_list[m_idx];
 
@@ -4091,12 +4091,10 @@ bool target_set(int mode)
  *
  * Note that confusion over-rides any (explicit?) user choice.
  */
-bool get_aim_dir(int *dp)
+bool get_aim_dir(DIRECTION *dp)
 {
-       int             dir;
-
+       DIRECTION dir;
        char    command;
-
        cptr    p;
 
        /* Initialize */
@@ -5786,7 +5784,7 @@ void display_rumor(bool ex)
                        }
                        else if  (strcmp(zz[0], "MONSTER") == 0)
                        {
-                               IDX r_idx;
+                               MONRACE_IDX r_idx;
                                monster_race *r_ptr;
 
                                while(1)