OSDN Git Service

[Refactor] #37287 #37353 型の置換。 / Type replacement.
authorDeskull <deskull@users.sourceforge.jp>
Wed, 7 Nov 2018 16:16:09 +0000 (01:16 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Wed, 7 Nov 2018 16:16:09 +0000 (01:16 +0900)
src/bldg.c
src/cmd1.c
src/racial.c

index 5eeb2fd..557fe07 100644 (file)
@@ -2823,7 +2823,7 @@ static void list_weapon(object_type *o_ptr, TERM_POSITION row, TERM_POSITION col
  * @param bcost 基本鑑定費用
  * @return 最終的にかかった費用
  */
-static int compare_weapons(int bcost)
+static PRICE compare_weapons(PRICE bcost)
 {
        int i, n;
        OBJECT_IDX item, item2;
@@ -2831,12 +2831,12 @@ static int compare_weapons(int bcost)
        object_type orig_weapon;
        object_type *i_ptr;
        cptr q, s;
-       int row = 2;
-       int wid = 38, mgn = 2;
+       TERM_POSITION row = 2;
+       TERM_POSITION wid = 38, mgn = 2;
        bool old_character_xtra = character_xtra;
        char ch;
-       int total = 0;
-       int cost = 0; /* First time no price */
+       PRICE total = 0;
+       PRICE cost = 0; /* First time no price */
 
        /* Save the screen */
        screen_save();
@@ -3374,10 +3374,9 @@ static int repair_broken_weapon_aux(int bcost)
  * @param bcost 基本鑑定費用
  * @return 実際にかかった費用
  */
-static int repair_broken_weapon(int bcost)
+static int repair_broken_weapon(PRICE bcost)
 {
-       int cost;
-
+       PRICE cost;
        screen_save();
        cost = repair_broken_weapon_aux(bcost);
        screen_load();
@@ -3391,9 +3390,9 @@ static int repair_broken_weapon(int bcost)
  * @param to_hit 命中をアップさせる量
  * @param to_dam ダメージをアップさせる量
  * @param to_ac ACをアップさせる量
- * @return 実際にかかった費用
+ * @return 実際に行ったらTRUE
  */
-static bool enchant_item(int cost, int to_hit, int to_dam, int to_ac)
+static bool enchant_item(PRICE cost, int to_hit, int to_dam, int to_ac)
 {
        int         i;
        OBJECT_IDX  item;
index ed83c7b..df65047 100644 (file)
@@ -2207,9 +2207,9 @@ void run_step(DIRECTION dir)
  * @brief トラベル機能の判定処理 /
  * Test for traveling
  * @param prev_dir 前回移動を行った元の方角ID
- * @return なし
+ * @return 次の方向
  */
-static int travel_test(int prev_dir)
+static DIRECTION travel_test(DIRECTION prev_dir)
 {
        int new_dir = 0;
        int i, max;
index 5290493..4298161 100644 (file)
@@ -593,8 +593,8 @@ typedef struct power_desc_type power_desc_type;
  */
 struct power_desc_type
 {
-       char name[80];
-       PLAYER_LEVEL level;
+       char name[80];      //!<レイシャル名
+       PLAYER_LEVEL level;     //!<体得レベル
        int cost;
        int stat;
        int fail;
@@ -607,10 +607,10 @@ struct power_desc_type
  * @param pd_ptr 発動したいレイシャル・パワー情報の構造体参照ポインタ
  * @return 成功率(%)を返す
  */
-static int racial_chance(power_desc_type *pd_ptr)
+static PERCENTAGE racial_chance(power_desc_type *pd_ptr)
 {
        PLAYER_LEVEL min_level  = pd_ptr->level;
-       int  difficulty = pd_ptr->fail;
+       int difficulty = pd_ptr->fail;
 
        int i;
        int val;