OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement.
authorDeskull <deskull@users.sourceforge.jp>
Mon, 19 Nov 2018 13:58:08 +0000 (22:58 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Mon, 19 Nov 2018 13:58:08 +0000 (22:58 +0900)
src/externs.h
src/mspells1.c

index 5e43c5e..b1ae2d5 100644 (file)
@@ -717,8 +717,8 @@ extern bool set_monster_monfear(MONSTER_IDX m_idx, int v);
 extern bool set_monster_invulner(MONSTER_IDX m_idx, int v, bool energy_need);
 extern void process_monsters_mtimed(int mtimed_idx);
 extern void dispel_monster_status(MONSTER_IDX m_idx);
-extern u32b get_curse(int power, object_type *o_ptr);
-extern void curse_equipment(int chance, int heavy_chance);
+extern BIT_FLAGS get_curse(int power, object_type *o_ptr);
+extern void curse_equipment(PERCENTAGE chance, PERCENTAGE heavy_chance);
 extern void mon_take_hit_mon(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note, IDX who);
 extern bool process_the_world(int num, MONSTER_IDX who, bool vs_player);
 extern void monster_gain_exp(MONSTER_IDX m_idx, IDX s_idx);
@@ -1357,8 +1357,8 @@ extern void do_cmd_mind_browse(void);
 extern bool do_cmd_mane(bool baigaesi);
 
 /* mspells1.c */
-extern bool clean_shot(int y1, int x1, int y2, int x2, bool is_friend);
-extern bool summon_possible(int y1, int x1);
+extern bool clean_shot(POSITION y1, POSITION x1, POSITION y2, POSITION x2, bool is_friend);
+extern bool summon_possible(POSITION y1, POSITION x1);
 extern bool raise_possible(monster_type *m_ptr);
 extern bool dispel_check(MONSTER_IDX m_idx);
 extern bool spell_is_inate(SPELL_IDX spell);
index a2bd238..ae1fb48 100644 (file)
@@ -361,9 +361,9 @@ static void remove_bad_spells(MONSTER_IDX m_idx, u32b *f4p, u32b *f5p, u32b *f6p
  * @param x1 判定を行いたいマスのX座標
  * @return 召還に相応しいならばTRUEを返す
  */
-bool summon_possible(int y1, int x1)
+bool summon_possible(POSITION y1, POSITION x1)
 {
-       int y, x;
+       POSITION y, x;
 
        /* Start at the player's location, and check 2 grids in each dir */
        for (y = y1 - 2; y <= y1 + 2; y++)
@@ -452,11 +452,12 @@ bool raise_possible(monster_type *m_ptr)
  * no equally friendly monster is\n
  * between the attacker and target.\n
  */
-bool clean_shot(int y1, int x1, int y2, int x2, bool is_friend)
+bool clean_shot(POSITION y1, POSITION x1, POSITION y2, POSITION x2, bool is_friend)
 {
        /* Must be the same as projectable() */
 
-       int i, y, x;
+       int i;
+       POSITION y, x;
 
        int grid_n = 0;
        u16b grid_g[512];
@@ -619,14 +620,14 @@ void breath(POSITION y, POSITION x, MONSTER_IDX m_idx, EFFECT_ID typ, int dam_hp
 }
 
 /*!
- * @brief ã\83¢ã\83³ã\82¹ã\82¿ã\83¼ã\81®ã\83\9cã\83¼ã\83«å\9e\8bï¼\86ã\83\96ã\83¬ã\82¹å\9e\8bé­\94æ³\95å\87¦ç\90\86 /
+ * @brief ã\82¢ã\82¤ã\83\86ã\83 ã\81«ä»\98å\8a ã\81\95ã\82\8cã\82\8bå\8f¯è\83½æ\80§ã\81®ã\81\82ã\82\8bå\91ªã\81\84ã\82\92æ\8c\87å®\9aã\81\99ã\82\8bã\80\82
  * @param power 呪いの段階
  * @param o_ptr 呪いをかけられる装備オブジェクトの構造体参照ポインタ
  * @return 与える呪いのID
  */
-u32b get_curse(int power, object_type *o_ptr)
+BIT_FLAGS get_curse(int power, object_type *o_ptr)
 {
-       u32b new_curse;
+       BIT_FLAGS new_curse;
 
        while(1)
        {
@@ -651,12 +652,12 @@ u32b get_curse(int power, object_type *o_ptr)
 }
 
 /*!
- * @brief 装備への呪い付加判定と付加処理 /
+ * @brief 装備への呪い付加判定と付加処理
  * @param chance 呪いの基本確率
- * @param heavy_chance 重い呪いを選択肢に入れるか否か。
+ * @param heavy_chance さらに重い呪いとなる確率
  * @return なし
  */
-void curse_equipment(int chance, int heavy_chance)
+void curse_equipment(PERCENTAGE chance, PERCENTAGE heavy_chance)
 {
        bool        changed = FALSE;
        int         curse_power = 0;