case ACT_MAP_LIGHT:
{
msg_print(_("眩しく輝いた...", "It shines brightly..."));
- map_area(DETECT_RAD_MAP);
+ map_area(user_ptr, DETECT_RAD_MAP);
lite_area(damroll(2, 15), 3);
break;
}
case SV_SCROLL_MAPPING:
{
- map_area(DETECT_RAD_MAP);
+ map_area(creature_ptr, DETECT_RAD_MAP);
ident = TRUE;
break;
}
case SV_STAFF_MAPPING:
{
- map_area(powerful ? DETECT_RAD_MAP * 3 / 2 : DETECT_RAD_MAP);
+ map_area(creature_ptr, powerful ? DETECT_RAD_MAP * 3 / 2 : DETECT_RAD_MAP);
ident = TRUE;
break;
}
case SV_ROD_MAPPING:
{
- map_area(powerful ? DETECT_RAD_MAP * 3 / 2 : DETECT_RAD_MAP);
+ map_area(creature_ptr, powerful ? DETECT_RAD_MAP * 3 / 2 : DETECT_RAD_MAP);
ident = TRUE;
break;
}
wiz_lite(caster_ptr, FALSE);
}
else if (plev > 19)
- map_area(DETECT_RAD_MAP);
+ map_area(caster_ptr, DETECT_RAD_MAP);
if (plev < 30)
{
if (plev + tmp > 4)detect_monsters_normal(DETECT_RAD_DEFAULT);
if (plev + tmp > 18)detect_monsters_invis(DETECT_RAD_DEFAULT);
if (plev + tmp > 28)set_tim_esp(caster_ptr, (TIME_EFFECT)plev, FALSE);
- if (plev + tmp > 38)map_area(DETECT_RAD_MAP);
+ if (plev + tmp > 38)map_area(caster_ptr, DETECT_RAD_MAP);
if (tmp == 0 && plev < 5) {
msg_print(_("鏡がなくて集中できなかった!", "You need a mirror to concentrate!"));
}
if (cast)
{
- map_area(rad);
+ map_area(caster_ptr, rad);
}
}
break;
if (cast)
{
- map_area(rad);
+ map_area(caster_ptr, rad);
}
}
break;
if (cast)
{
- map_area(rad1);
+ map_area(caster_ptr, rad1);
detect_traps(rad2, TRUE);
detect_doors(rad2);
detect_stairs(rad2);
if (count >= 19) wiz_lite(p_ptr, FALSE);
if (count >= 11)
{
- map_area(rad);
+ map_area(caster_ptr, rad);
if (plev > 39 && count < 19)
SINGING_COUNT(caster_ptr) = count + 1;
}
if (cast)
{
- map_area(rad);
+ map_area(caster_ptr, rad);
}
}
break;
/*
* Hack -- map the current panel (plus some) ala "magic mapping"
*/
-void map_area(POSITION range)
+void map_area(player_type *caster_ptr, POSITION range)
{
int i;
POSITION x, y;
FEAT_IDX feat;
feature_type *f_ptr;
- if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
+ if (d_info[caster_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
/* Scan that area */
- for (y = 1; y < p_ptr->current_floor_ptr->height - 1; y++)
+ for (y = 1; y < caster_ptr->current_floor_ptr->height - 1; y++)
{
- for (x = 1; x < p_ptr->current_floor_ptr->width - 1; x++)
+ for (x = 1; x < caster_ptr->current_floor_ptr->width - 1; x++)
{
- if (distance(p_ptr->y, p_ptr->x, y, x) > range) continue;
+ if (distance(caster_ptr->y, caster_ptr->x, y, x) > range) continue;
- g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
+ g_ptr = &caster_ptr->current_floor_ptr->grid_array[y][x];
/* Memorize terrain of the grid */
g_ptr->info |= (CAVE_KNOWN);
/* Memorize known walls */
for (i = 0; i < 8; i++)
{
- g_ptr = &p_ptr->current_floor_ptr->grid_array[y + ddy_ddd[i]][x + ddx_ddd[i]];
+ g_ptr = &caster_ptr->current_floor_ptr->grid_array[y + ddy_ddd[i]][x + ddx_ddd[i]];
/* Feature code (applying "mimic" field) */
feat = get_feat_mimic(g_ptr);
}
}
- p_ptr->redraw |= (PR_MAP);
- p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+ caster_ptr->redraw |= (PR_MAP);
+ caster_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
}
extern bool explosive_rune(floor_type *floor_ptr, POSITION y, POSITION x);
extern bool place_mirror(player_type *caster_ptr);
extern void stair_creation(player_type *caster_ptr);
-extern void map_area(POSITION range);
+extern void map_area(player_type *caster_ptr, POSITION range);
extern bool destroy_area(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION r, bool in_generate);
extern bool earthquake(player_type *caster_ptr, POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
/* Magic Mapping */
case 'm':
- map_area(DETECT_RAD_ALL * 3);
+ map_area(creature_ptr, DETECT_RAD_ALL * 3);
break;
/* Mutation */