OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
authorDeskull <desull@users.sourceforge.jp>
Sun, 24 Sep 2017 02:39:13 +0000 (11:39 +0900)
committerDeskull <desull@users.sourceforge.jp>
Sun, 24 Sep 2017 02:39:13 +0000 (11:39 +0900)
13 files changed:
src/cave.c
src/cmd2.c
src/do-spell.c
src/effects.c
src/externs.h
src/floors.c
src/melee1.c
src/mind.c
src/monster2.c
src/object2.c
src/spells1.c
src/types.h
src/xtra2.c

index 1aa5d1e..825a523 100644 (file)
@@ -4932,7 +4932,7 @@ bool projectable(int y1, int x1, int y2, int x2)
  *
  * Currently the "m" parameter is unused.
  */
-void scatter(int *yp, int *xp, int y, int x, int d, int m)
+void scatter(POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, int m)
 {
        int nx, ny;
 
index 41b46a0..45b5d4f 100644 (file)
@@ -946,9 +946,10 @@ static int count_dt(POSITION *y, POSITION *x, bool (*test)(int feat), bool under
  * @details
  * If requested, count only trapped chests.
  */
-static int count_chests(int *y, int *x, bool trapped)
+static int count_chests(POSITION *y, POSITION *x, bool trapped)
 {
-       int d, count, o_idx;
+       int d, count;
+       IDX o_idx;
 
        object_type *o_ptr;
 
index 3df0761..9e665f6 100644 (file)
@@ -8884,8 +8884,8 @@ static cptr do_hex_spell(int spell, int mode)
 
        bool add = TRUE;
 
-       int plev = p_ptr->lev;
-       int power;
+       PLAYER_LEVEL plev = p_ptr->lev;
+       HIT_POINT power;
 
        switch (spell)
        {
index b860796..8081970 100644 (file)
@@ -4395,7 +4395,7 @@ void do_poly_self(void)
  * setting the player to "dead".
  */
 
-int take_hit(int damage_type, int damage, cptr hit_from, int monspell)
+int take_hit(int damage_type, HIT_POINT damage, cptr hit_from, int monspell)
 {
        int old_chp = p_ptr->chp;
 
index bc843d9..a141e34 100644 (file)
@@ -1092,7 +1092,7 @@ extern bool save_floor(saved_floor_type *sf_ptr, u32b mode);
 /* spells1.c */
 extern bool in_disintegration_range(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 extern void breath_shape(u16b *path_g, int dist, int *pgrids, byte *gx, byte *gy, byte *gm, int *pgm_rad, int rad, int y1, int x1, int y2, int x2, int typ);
-extern int take_hit(int damage_type, int damage, cptr kb_str, int monspell);
+extern int take_hit(int damage_type, HIT_POINT damage, cptr kb_str, int monspell);
 extern u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, int typ);
 extern sint project_path(u16b *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int flg);
 extern int dist_to_line(int y, int x, int y1, int x1, int y2, int x2);
index 08553c7..fa90359 100644 (file)
@@ -540,7 +540,8 @@ static void place_pet(void)
                }
                else
                {
-                       int j, d;
+                       int j;
+                       POSITION d;
 
                        for (d = 1; d < 6; d++)
                        {
index 0eb3dd5..11b033a 100644 (file)
@@ -169,7 +169,7 @@ bool make_attack_normal(IDX m_idx)
        bool touched = FALSE, fear = FALSE, alive = TRUE;
        bool explode = FALSE;
        bool do_silly_attack = (one_in_(2) && p_ptr->image);
-       int get_damage = 0;
+       HIT_POINT get_damage = 0;
        int abbreviate = 0;
 
        /* Not allowed to attack */
@@ -209,8 +209,8 @@ bool make_attack_normal(IDX m_idx)
        {
                bool obvious = FALSE;
 
-               int power = 0;
-               int damage = 0;
+               HIT_POINT power = 0;
+               HIT_POINT damage = 0;
 
                cptr act = NULL;
 
index 18c559c..0e5a5ad 100644 (file)
@@ -1401,7 +1401,7 @@ static int number_of_mirrors( void )
 static bool cast_mirror_spell(int spell)
 {
        int             dir;
-       int             plev = p_ptr->lev;
+       PLAYER_LEVEL plev = p_ptr->lev;
        int             tmp;
        TIME_EFFECT t;
        int             x, y;
@@ -1470,7 +1470,7 @@ static bool cast_mirror_spell(int spell)
                for (x = 0; x < cur_wid; x++) {
                        for (y = 0; y < cur_hgt; y++) {
                                if (is_mirror_grid(&cave[y][x])) {
-                                       project(0, 2, y, x, plev, GF_OLD_SLEEP, (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
+                                       project(0, 2, y, x, (HIT_POINT)plev, GF_OLD_SLEEP, (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
                                }
                        }
                }
index c842661..c237664 100644 (file)
@@ -3524,8 +3524,8 @@ static bool place_monster_group(int who, int y, int x, int r_idx, u32b mode)
 
        int hack_n = 0;
 
-       byte hack_y[GROUP_MAX];
-       byte hack_x[GROUP_MAX];
+       POSITION hack_y[GROUP_MAX];
+       POSITION hack_x[GROUP_MAX];
 
 
        /* Pick a group size */
@@ -3567,8 +3567,8 @@ static bool place_monster_group(int who, int y, int x, int r_idx, u32b mode)
        for (n = 0; (n < hack_n) && (hack_n < total); n++)
        {
                /* Grab the location */
-               int hx = hack_x[n];
-               int hy = hack_y[n];
+               POSITION hx = hack_x[n];
+               POSITION hy = hack_y[n];
 
                /* Check each direction, up to total */
                for (i = 0; (i < 8) && (hack_n < total); i++)
index 415352b..1ce96b9 100644 (file)
@@ -4163,7 +4163,7 @@ static void a_m_aux_4(object_type *o_ptr, int level, int power)
 
                case TV_STATUE:
                {
-                       int i = 1;
+                       PARAMETER_VALUE i = 1;
 
                        monster_race *r_ptr;
 
@@ -8444,7 +8444,8 @@ static void add_essence(int mode)
                {
                        char tmp_val[160];
                        int val;
-                       int get_to_h, get_to_d;
+                       HIT_PROB get_to_h;
+                       HIT_POINT get_to_d;
 
                        strcpy(tmp_val, "1");
                        if (!get_string(format(_("いくつ付加しますか? (1-%d):", "Enchant how many? (1-%d):"), p_ptr->lev/7+3), tmp_val, 2)) return;
index 79e382e..1ce9d15 100644 (file)
@@ -5173,7 +5173,7 @@ static bool project_m(int who, int r, int y, int x, HIT_POINT dam, int typ, int
  * We return "TRUE" if any "obvious" effects were observed.  XXX XXX Actually,
  * we just assume that the effects were obvious, for historical reasons.
  */
-static bool project_p(int who, cptr who_name, int r, POSITION y, POSITION x, int dam, int typ, int flg, int monspell)
+static bool project_p(int who, cptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, int typ, int flg, int monspell)
 {
        int k = 0;
        int rlev = 0;
index a8cc7ef..a1c5bd8 100644 (file)
@@ -967,7 +967,7 @@ struct player_type
        CHARACTER_IDX realm2;        /* Second magic realm */
        CHARACTER_IDX oops;                     /* Unused */
 
-       byte hitdie;            /* Hit dice (sides) */
+       DICE_SID hitdie;                /* Hit dice (sides) */
        u16b expfact;       /* Experience factor
                             * Note: was byte, causing overflow for Amberite
                             * characters (such as Amberite Paladins)
index 325133a..d6f4c8c 100644 (file)
@@ -459,7 +459,7 @@ static int count_all_hostile_monsters(void)
  */
 void check_quest_completion(monster_type *m_ptr)
 {
-       int y, x;
+       POSITION y, x;
 
        int quest_num;
 
@@ -989,7 +989,7 @@ void monster_death(int m_idx, bool drop_item)
                {
                        if (!one_in_(7))
                        {
-                               int wy = y, wx = x;
+                               POSITION wy = y, wx = x;
                                int attempts = 100;
                                bool pet = is_pet(m_ptr);