OSDN Git Service

#37353 (2.2.0.89) グローバル変数artifact_biasをobject_typeに組み込む。 / Global artifact_bias...
[hengband/hengband.git] / src / spells1.c
index 083cb0d..ecb26b2 100644 (file)
@@ -628,7 +628,7 @@ static POSITION monster_target_y; /*!< モンスターの攻撃目標Y座標 */
  * XXX XXX XXX Perhaps we should affect doors?
  * </pre>
  */
-static bool project_f(int who, int r, int y, int x, int dam, int typ)
+static bool project_f(int who, int r, int y, int x, HIT_POINT dam, int typ)
 {
        cave_type       *c_ptr = &cave[y][x];
        feature_type    *f_ptr = &f_info[c_ptr->feat];
@@ -1207,11 +1207,11 @@ static bool project_o(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
        bool obvious = FALSE;
        bool known = player_has_los_bold(y, x);
 
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
 
        char o_name[MAX_NLEN];
 
-       int k_idx = 0;
+       KIND_OBJECT_IDX k_idx = 0;
        bool is_potion = FALSE;
 
 
@@ -6288,27 +6288,27 @@ static bool project_p(int who, cptr who_name, int r, POSITION y, POSITION x, HIT
 /*
  * Find the distance from (x, y) to a line.
  */
-int dist_to_line(int y, int x, int y1, int x1, int y2, int x2)
+POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
 {
        /* Vector from (x, y) to (x1, y1) */
-       int py = y1 - y;
-       int px = x1 - x;
+       POSITION py = y1 - y;
+       POSITION px = x1 - x;
 
        /* Normal vector */
-       int ny = x2 - x1;
-       int nx = y1 - y2;
+       POSITION ny = x2 - x1;
+       POSITION nx = y1 - y2;
 
-   /* Length of N */
-       int pd = distance(y1, x1, y, x);
-       int nd = distance(y1, x1, y2, x2);
+       /* Length of N */
+       POSITION pd = distance(y1, x1, y, x);
+       POSITION nd = distance(y1, x1, y2, x2);
 
        if (pd > nd) return distance(y, x, y2, x2);
 
        /* Component of P on N */
        nd = ((nd) ? ((py * ny + px * nx) / nd) : 0);
 
-   /* Absolute value */
-   return((nd >= 0) ? nd : 0 - nd);
+       /* Absolute value */
+       return((nd >= 0) ? nd : 0 - nd);
 }
 
 
@@ -6544,7 +6544,7 @@ bool in_disintegration_range(POSITION y1, POSITION x1, POSITION y2, POSITION x2)
 /*
  * breath shape
  */
-void breath_shape(u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, int *pgm_rad, int rad, int y1, int x1, int y2, int x2, int typ)
+void breath_shape(u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, POSITION *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int typ)
 {
        POSITION by = y1;
        POSITION bx = x1;
@@ -6773,7 +6773,7 @@ void breath_shape(u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *g
  * and "update_view()" and "update_monsters()" need to be called.
  * </pre>
  */
-bool project(int who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, int typ, int flg, int monspell)
+bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, int typ, int flg, int monspell)
 {
        int i, t, dist;
 
@@ -7846,7 +7846,7 @@ bool project(int who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, int t
  * @param dam ダメージ量
  * @return 効果があったらTRUEを返す
  */
-bool binding_field( int dam )
+bool binding_field( HIT_POINT dam )
 {
        int mirror_x[10],mirror_y[10]; /* 鏡はもっと少ない */
        int mirror_num=0;              /* 鏡の数 */
@@ -7995,7 +7995,7 @@ bool binding_field( int dam )
  * @param dam ダメージ量
  * @return 効果があったらTRUEを返す
  */
-void seal_of_mirror( int dam )
+void seal_of_mirror( HIT_POINT dam )
 {
        int x,y;