OSDN Git Service

[Refactor] #38997 in_bound() に floor_type * 引数を追加. / Add floor_type * argument to...
[hengbandforosx/hengbandosx.git] / src / spells1.c
index 5e78ba3..9b29aa5 100644 (file)
@@ -575,7 +575,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                g_ptr->info |= (CAVE_GLOW);
                                note_spot(y, x);
                                lite_spot(y, x);
-                               update_local_illumination(y, x);
+                               update_local_illumination(p_ptr, y, x);
 
                                /* Observe */
                                if (player_can_see_bold(y, x)) obvious = TRUE;
@@ -638,7 +638,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
                                lite_spot(y, x);
 
-                               update_local_illumination(y, x);
+                               update_local_illumination(p_ptr, y, x);
 
                                if (player_can_see_bold(y, x)) obvious = TRUE;
 
@@ -1221,7 +1221,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
        /* Get the monster possessive ("his"/"her"/"its") */
        monster_desc(m_poss, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE);
 
-       if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) disturb(TRUE, TRUE);
+       if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) disturb(p_ptr, TRUE, TRUE);
 
        if (r_ptr->flagsr & RFR_RES_ALL &&
                typ != GF_OLD_CLONE && typ != GF_STAR_HEAL && typ != GF_OLD_HEAL
@@ -3366,7 +3366,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                        case GF_ATTACK:
                        {
                                /* Return this monster's death */
-                               return py_attack(y, x, dam);
+                               return py_attack(p_ptr, y, x, dam);
                        }
 
                        /* Sleep (Use "dam" as "power") */
@@ -4071,7 +4071,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
 
                project(0, 0, t_y, t_x, dam, typ, (PROJECT_STOP|PROJECT_KILL|PROJECT_REFLECTABLE), monspell);
 
-               disturb(TRUE, TRUE);
+               disturb(p_ptr, TRUE, TRUE);
                return TRUE;
        }
 
@@ -4191,7 +4191,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                        if (one_in_(4)) /* 4 */
                                                do_poly_self(p_ptr);
                                        else
-                                               status_shuffle();
+                                               status_shuffle(p_ptr);
                                }
 
                                if (one_in_(6))
@@ -5071,7 +5071,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
        }
 
 
-       disturb(TRUE, TRUE);
+       disturb(p_ptr, TRUE, TRUE);
 
 
        if ((p_ptr->special_defense & NINJA_KAWARIMI) && dam && who && (who != p_ptr->riding))
@@ -5139,7 +5139,7 @@ bool in_disintegration_range(POSITION y1, POSITION x1, POSITION y2, POSITION x2)
        if ((ax < 2) && (ay < 2)) return (TRUE);
 
        /* Paranoia -- require "safe" origin */
-       /* if (!in_bounds(y1, x1)) return (FALSE); */
+       /* if (!in_bounds(current_floor_ptr, y1, x1)) return (FALSE); */
 
        /* Directly South/North */
        if (!dx)
@@ -5362,7 +5362,7 @@ void breath_shape(u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *g
                                for (x = bx - cdis; x <= bx + cdis; x++)
                                {
                                        /* Ignore "illegal" locations */
-                                       if (!in_bounds(y, x)) continue;
+                                       if (!in_bounds(current_floor_ptr, y, x)) continue;
 
                                        /* Enforce a circular "ripple" */
                                        if (distance(y1, x1, y, x) != bdis) continue;