}
forget_lite(p_ptr->current_floor_ptr);
- forget_view();
+ forget_view(p_ptr->current_floor_ptr);
/* Hack -- Increase "icky" depth */
current_world_ptr->character_icky++;
health_track(0);
forget_lite(p_ptr->current_floor_ptr);
- forget_view();
+ forget_view(p_ptr->current_floor_ptr);
clear_mon_lite(p_ptr->current_floor_ptr);
/* Handle "quit and save" */
(void)strcpy(p_ptr->died_from, _("強制終了", "Abortion"));
forget_lite(p_ptr->current_floor_ptr);
- forget_view();
+ forget_view(p_ptr->current_floor_ptr);
clear_mon_lite(p_ptr->current_floor_ptr);
/* Close stuff */
(void)strcpy(p_ptr->died_from, _("強制終了中", "Interrupting"));
forget_lite(p_ptr->current_floor_ptr);
- forget_view();
+ forget_view(p_ptr->current_floor_ptr);
clear_mon_lite(p_ptr->current_floor_ptr);
/* Stop playing */
forget_lite(p_ptr->current_floor_ptr);
- forget_view();
+ forget_view(p_ptr->current_floor_ptr);
clear_mon_lite(p_ptr->current_floor_ptr);
/* Clear the bottom line */
/*
* Clear the viewable space
*/
-void forget_view(void)
+void forget_view(floor_type *floor_ptr)
{
int i;
grid_type *g_ptr;
/* None to forget */
- if (!p_ptr->current_floor_ptr->view_n) return;
+ if (!floor_ptr->view_n) return;
/* Clear them all */
- for (i = 0; i < p_ptr->current_floor_ptr->view_n; i++)
+ for (i = 0; i < floor_ptr->view_n; i++)
{
- POSITION y = p_ptr->current_floor_ptr->view_y[i];
- POSITION x = p_ptr->current_floor_ptr->view_x[i];
- g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
+ POSITION y = floor_ptr->view_y[i];
+ POSITION x = floor_ptr->view_x[i];
+ g_ptr = &floor_ptr->grid_array[y][x];
/* Forget that the grid is viewable */
g_ptr->info &= ~(CAVE_VIEW);
}
/* None left */
- p_ptr->current_floor_ptr->view_n = 0;
+ floor_ptr->view_n = 0;
}
extern void glow_deep_lava_and_bldg(floor_type *floor_ptr);
extern void forget_lite(floor_type *floor_ptr);
extern void update_lite(player_type *subject_ptr, floor_type *floor_ptr);
-extern void forget_view(void);
+extern void forget_view(floor_type *floor_ptr);
extern void update_view(player_type *subject_ptr, floor_type *floor_ptr);
extern void update_mon_lite(player_type *subject_ptr, floor_type *floor_ptr);
extern void clear_mon_lite(floor_type *floor_ptr);
sf_ptr->last_visit = current_world_ptr->game_turn;
forget_lite(p_ptr->current_floor_ptr);
- forget_view();
+ forget_view(p_ptr->current_floor_ptr);
clear_mon_lite(p_ptr->current_floor_ptr);
/* Save current floor */
* Whenever the age count loops, most of the scent trail is erased and
* the age of the remainder is recalculated.
*/
-void update_smell(floor_type *floor_ptr)
+void update_smell(floor_type *floor_ptr, player_type *subject_ptr)
{
POSITION i, j;
POSITION y, x;
grid_type *g_ptr;
/* Translate table to map grids */
- y = i + p_ptr->y - 2;
- x = j + p_ptr->x - 2;
+ y = i + subject_ptr->y - 2;
+ x = j + subject_ptr->x - 2;
/* Check Bounds */
if (!in_bounds(floor_ptr, y, x)) continue;
if (!cave_have_flag_grid(g_ptr, FF_MOVE) && !is_closed_door(g_ptr->feat)) continue;
/* Grid must not be blocked by walls from the character */
- if (!player_has_los_bold(p_ptr, y, x)) continue;
+ if (!player_has_los_bold(subject_ptr, y, x)) continue;
/* Note grids that are too far away */
if (scent_adjust[i][j] == -1) continue;
msg_flag = FALSE;
forget_lite(p_ptr->current_floor_ptr);
- forget_view();
+ forget_view(p_ptr->current_floor_ptr);
clear_mon_lite(p_ptr->current_floor_ptr);
/* Save the game */
msg_flag = FALSE;
forget_lite(p_ptr->current_floor_ptr);
- forget_view();
+ forget_view(p_ptr->current_floor_ptr);
clear_mon_lite(p_ptr->current_floor_ptr);
/* Save the game */
if (creature_ptr->update & (PU_UN_VIEW))
{
creature_ptr->update &= ~(PU_UN_VIEW);
- forget_view();
+ forget_view(creature_ptr->current_floor_ptr);
}
if (creature_ptr->update & (PU_VIEW))
int i;
forget_lite(p_ptr->current_floor_ptr);
- forget_view();
+ forget_view(p_ptr->current_floor_ptr);
clear_mon_lite(p_ptr->current_floor_ptr);
/* Update lite/view */
}
forget_lite(p_ptr->current_floor_ptr);
- forget_view();
+ forget_view(p_ptr->current_floor_ptr);
/* Hack -- Character is in "icky" mode */
current_world_ptr->character_icky = TRUE;