OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
authorDeskull <desull@users.sourceforge.jp>
Mon, 18 Sep 2017 16:22:20 +0000 (01:22 +0900)
committerDeskull <desull@users.sourceforge.jp>
Mon, 18 Sep 2017 16:22:20 +0000 (01:22 +0900)
src/artifact.c
src/cmd1.c
src/externs.h
src/melee1.c
src/mspells4.c
src/mutation.c
src/types.h

index efc85c2..3307894 100644 (file)
@@ -3421,7 +3421,7 @@ bool activate_random_artifact(object_type *o_ptr)
 
                case ACT_ULTIMATE_RESIST:
                {
-                       int v = randint1(25)+25;
+                       time_effect v = randint1(25)+25;
                        (void)set_afraid(0);
                        (void)set_hero(v, FALSE);
                        (void)hp_player(10);
index a78dce6..0ac188e 100644 (file)
@@ -2821,7 +2821,7 @@ bool player_can_enter(s16b feature, u16b mode)
  * @param mpe_mode 移動オプションフラグ
  * @return プレイヤーが死亡やフロア離脱を行わず、実際に移動が可能ならばTRUEを返す。
  */
-bool move_player_effect(int ny, int nx, u32b mpe_mode)
+bool move_player_effect(position ny, position nx, u32b mpe_mode)
 {
        cave_type *c_ptr = &cave[ny][nx];
        feature_type *f_ptr = &f_info[c_ptr->feat];
index 63687e7..88c3e6e 100644 (file)
@@ -707,7 +707,7 @@ extern void carry(bool pickup);
 extern bool py_attack(int y, int x, int mode);
 extern bool pattern_seq(int c_y, int c_x, int n_y, int n_x);
 extern bool player_can_enter(s16b feature, u16b mode);
-extern bool move_player_effect(int ny, int nx, u32b mpe_mode);
+extern bool move_player_effect(position ny, position nx, u32b mpe_mode);
 extern bool trap_can_be_ignored(int feat);
 extern void move_player(int dir, bool do_pickup, bool break_trap);
 extern void run_step(int dir);
@@ -920,7 +920,7 @@ extern bool load_floor(saved_floor_type *sf_ptr, u32b mode);
 
 /* melee1.c */
 /* melee2.c */
-extern bool make_attack_normal(int m_idx);
+extern bool make_attack_normal(idx m_idx);
 extern void process_monsters(void);
 extern int get_mproc_idx(int m_idx, int mproc_type);
 extern void mproc_init(void);
index 973f6e1..59934fc 100644 (file)
@@ -145,10 +145,9 @@ static cptr desc_moan[] =
  * @param m_idx 打撃を行うモンスターのID
  * @return 実際に攻撃処理を行った場合TRUEを返す
  */
-bool make_attack_normal(int m_idx)
+bool make_attack_normal(idx m_idx)
 {
        monster_type *m_ptr = &m_list[m_idx];
-
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
        int ap_cnt;
@@ -714,7 +713,7 @@ bool make_attack_normal(int m_idx)
                                                        obvious = TRUE;
 
                                                        /* Heal the monster */
-                                                       m_ptr->hp += heal;
+                                                       m_ptr->hp += (hit_point)heal;
 
                                                        /* Redraw (later) if needed */
                                                        if (p_ptr->health_who == m_idx) p_ptr->redraw |= (PR_HEALTH);
@@ -1693,7 +1692,7 @@ bool make_attack_normal(int m_idx)
                                {
                                        if (!(r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK))
                                        {
-                                               int dam = damroll(2, 6);
+                                               hit_point dam = damroll(2, 6);
 
                                                /* Modify the damage */
                                                dam = mon_damage_mod(m_ptr, dam, FALSE);
@@ -1725,7 +1724,7 @@ bool make_attack_normal(int m_idx)
                                {
                                        if (!(r_ptr->flagsr & RFR_EFF_IM_ELEC_MASK))
                                        {
-                                               int dam = damroll(2, 6);
+                                               hit_point dam = damroll(2, 6);
 
                                                /* Modify the damage */
                                                dam = mon_damage_mod(m_ptr, dam, FALSE);
@@ -1757,7 +1756,7 @@ bool make_attack_normal(int m_idx)
                                {
                                        if (!(r_ptr->flagsr & RFR_EFF_IM_COLD_MASK))
                                        {
-                                               int dam = damroll(2, 6);
+                                               hit_point dam = damroll(2, 6);
 
                                                /* Modify the damage */
                                                dam = mon_damage_mod(m_ptr, dam, FALSE);
@@ -1790,7 +1789,7 @@ bool make_attack_normal(int m_idx)
                                {
                                        if (!(r_ptr->flagsr & RFR_EFF_RES_SHAR_MASK))
                                        {
-                                               int dam = damroll(2, 6);
+                                               hit_point dam = damroll(2, 6);
 
                                                /* Modify the damage */
                                                dam = mon_damage_mod(m_ptr, dam, FALSE);
@@ -1828,7 +1827,7 @@ bool make_attack_normal(int m_idx)
                                        {
                                                if (!(r_ptr->flagsr & RFR_RES_ALL))
                                                {
-                                                       int dam = damroll(2, 6);
+                                                       hit_point dam = damroll(2, 6);
 
                                                        /* Modify the damage */
                                                        dam = mon_damage_mod(m_ptr, dam, FALSE);
@@ -1862,7 +1861,7 @@ bool make_attack_normal(int m_idx)
                                {
                                        if (!(r_ptr->flagsr & RFR_RES_ALL))
                                        {
-                                               int dam = damroll(2, 6);
+                                               hit_point dam = damroll(2, 6);
 
                                                /* Modify the damage */
                                                dam = mon_damage_mod(m_ptr, dam, FALSE);
@@ -1892,7 +1891,7 @@ bool make_attack_normal(int m_idx)
 
                                if (hex_spelling(HEX_SHADOW_CLOAK) && alive && !p_ptr->is_dead)
                                {
-                                       int dam = 1;
+                                       hit_point dam = 1;
                                        object_type *o_armed_ptr = &inventory[INVEN_RARM];
 
                                        if (!(r_ptr->flagsr & RFR_RES_ALL || r_ptr->flagsr & RFR_RES_DARK))
index aa52f7d..176f01a 100644 (file)
@@ -165,7 +165,7 @@ static void monspell_message_base(int m_idx, int t_idx, cptr msg1, cptr msg2, cp
 */
 void monspell_message(int m_idx, int t_idx, cptr msg1, cptr msg2, cptr msg3, int TARGET_TYPE)
 {
-       monspell_message_base(m_idx, t_idx, msg1, msg1, msg2, msg3, p_ptr->blind, TARGET_TYPE);
+       monspell_message_base(m_idx, t_idx, msg1, msg1, msg2, msg3, p_ptr->blind > 0, TARGET_TYPE);
 }
 
 /*!
@@ -178,7 +178,7 @@ void monspell_message(int m_idx, int t_idx, cptr msg1, cptr msg2, cptr msg3, int
 */
 void simple_monspell_message(int m_idx, int t_idx, cptr msg1, cptr msg2, int TARGET_TYPE)
 {
-       monspell_message_base(m_idx, t_idx, msg1, msg2, msg1, msg2, p_ptr->blind, TARGET_TYPE);
+       monspell_message_base(m_idx, t_idx, msg1, msg2, msg1, msg2, p_ptr->blind > 0, TARGET_TYPE);
 }
 
 /*!
@@ -1738,7 +1738,7 @@ void spell_RF6_HASTE(int m_idx, int t_idx, int TARGET_TYPE)
                _("%^sが自分の体に念を送った。", "%^s concentrates on %s body."),
                _("%^sが自分の体に念を送った。", "%^s concentrates on %s body."),
                _("%^sが自分の体に念を送った。", "%^s concentrates on %s body."),
-               p_ptr->blind, TARGET_TYPE);
+               p_ptr->blind > 0, TARGET_TYPE);
 
        /* Allow quick speed increases to base+10 */
        if (set_monster_fast(m_idx, MON_FAST(m_ptr) + 100))
@@ -1802,7 +1802,7 @@ void spell_RF6_HEAL(int m_idx, int t_idx, int TARGET_TYPE)
                _("%^sは自分の傷に念を集中した。", "%^s concentrates on %s wounds."),
                _("%^sが自分の傷に集中した。", "%^s concentrates on %s wounds."),
                _("%^sは自分の傷に念を集中した。", "%^s concentrates on %s wounds."),
-               p_ptr->blind, TARGET_TYPE);
+               p_ptr->blind > 0, TARGET_TYPE);
 
        /* Heal some */
        m_ptr->hp += (rlev * 6);
@@ -1954,8 +1954,9 @@ int spell_RF6_WORLD(int m_idx)
 */
 int spell_RF6_SPECIAL_BANORLUPART(int m_idx)
 {
-       monster_type    *m_ptr = &m_list[m_idx];
-       int dummy_hp, dummy_maxhp, k;
+       monster_type *m_ptr = &m_list[m_idx];
+       hit_point dummy_hp, dummy_maxhp;
+       int k;
        int dummy_y = m_ptr->fy;
        int dummy_x = m_ptr->fx;
        u32b mode = 0L;
index cad1f44..4fbddde 100644 (file)
@@ -2073,7 +2073,7 @@ int calc_mutant_regenerate_mod(void)
  * @brief 突然変異レイシャル上で口を使うよりを行った際に歌や呪術を停止する /
  * @return なし
  */
-void mutation_stop_mouth()
+static void mutation_stop_mouth(void)
 {
        if (music_singing_any()) stop_singing();
        if (hex_spelling_any()) stop_hex_spell_all();
@@ -2334,7 +2334,7 @@ bool mutation_power_aux(u32b power)
                case MUT1_RESIST:
                        {
                                int num = lvl / 10;
-                               int dur = randint1(20) + 20;
+                               time_effect dur = randint1(20) + 20;
 
                                if (randint0(5) < num)
                                {
index 875f139..75a6fc0 100644 (file)
@@ -568,7 +568,7 @@ struct object_type
 
        s16b next_o_idx;        /* Next object in stack (if any) */
 
-       s16b held_m_idx;        /* Monster holding us (if any) */
+       idx held_m_idx; /* Monster holding us (if any) */
 };