void carry(player_type *creature_ptr, bool pickup)
{
/* Recenter the map around the player */
- verify_panel();
+ verify_panel(creature_ptr);
creature_ptr->update |= (PU_MONSTERS);
creature_ptr->redraw |= (PR_MAP);
lite_spot(ny, nx);
/* Check for new panel (redraw map) */
- verify_panel();
+ verify_panel(creature_ptr);
if (mpe_mode & MPE_FORGET_FLOW)
{
creature_ptr->running = 0;
/* Check for new panel if appropriate */
- if (center_player && !center_running) verify_panel();
+ if (center_player && !center_running) verify_panel(creature_ptr);
/* Calculate torch radius */
creature_ptr->update |= (PU_TORCH);
travel.run = 0;
/* Check for new panel if appropriate */
- if (center_player && !center_running) verify_panel();
+ if (center_player && !center_running) verify_panel(creature_ptr);
/* Calculate torch radius */
creature_ptr->update |= (PU_TORCH);
/*!
* @brief マップ描画のフォーカスを当てるべき座標を更新する
+ * @param creature_ptr プレーヤーへの参照ポインタ
* @details
* Given an row (y) and col (x), this routine detects when a move
* off the screen has occurred and figures new borders. -RAK-
* The map is reprinted if necessary, and "TRUE" is returned.
* @return 実際に再描画が必要だった場合TRUEを返す
*/
-void verify_panel(void)
+void verify_panel(player_type *creature_ptr)
{
- POSITION y = p_ptr->y;
- POSITION x = p_ptr->x;
+ POSITION y = creature_ptr->y;
+ POSITION x = creature_ptr->x;
TERM_LEN wid, hgt;
int prow_min;
get_screen_size(&wid, &hgt);
- max_prow_min = p_ptr->current_floor_ptr->height - hgt;
- max_pcol_min = p_ptr->current_floor_ptr->width - wid;
+ max_prow_min = creature_ptr->current_floor_ptr->height - hgt;
+ max_pcol_min = creature_ptr->current_floor_ptr->width - wid;
/* Bounds checking */
if (max_prow_min < 0) max_prow_min = 0;
if (max_pcol_min < 0) max_pcol_min = 0;
/* Center on player */
- if (center_player && (center_running || !p_ptr->running))
+ if (center_player && (center_running || !creature_ptr->running))
{
/* Center vertically */
prow_min = y - hgt / 2;
panel_col_min = pcol_min;
/* Hack -- optional disturb on "panel change" */
- if (disturb_panel && !center_player) disturb(p_ptr, FALSE, FALSE);
+ if (disturb_panel && !center_player) disturb(creature_ptr, FALSE, FALSE);
panel_bounds_center();
- p_ptr->update |= (PU_MONSTERS);
- p_ptr->redraw |= (PR_MAP);
- p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+ creature_ptr->update |= (PU_MONSTERS);
+ creature_ptr->redraw |= (PR_MAP);
+ creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
}
case 'p':
{
/* Recenter the map around the player */
- verify_panel();
+ verify_panel(creature_ptr);
creature_ptr->update |= (PU_MONSTERS);
creature_ptr->redraw |= (PR_MAP);
creature_ptr->window |= (PW_OVERHEAD);
case 'p':
{
/* Recenter the map around the player */
- verify_panel();
+ verify_panel(creature_ptr);
creature_ptr->update |= (PU_MONSTERS);
creature_ptr->redraw |= (PR_MAP);
creature_ptr->window |= (PW_OVERHEAD);
prt("", 0, 0);
/* Recenter the map around the player */
- verify_panel();
+ verify_panel(creature_ptr);
creature_ptr->update |= (PU_MONSTERS);
creature_ptr->redraw |= (PR_MAP);
creature_ptr->window |= (PW_OVERHEAD);
n = 0;
y = creature_ptr->y;
x = creature_ptr->x;
- verify_panel(); /* Move cursor to player */
+ verify_panel(creature_ptr); /* Move cursor to player */
creature_ptr->update |= (PU_MONSTERS);
prt("", 0, 0);
/* Recenter the map around the player */
- verify_panel();
+ verify_panel(creature_ptr);
creature_ptr->update |= (PU_MONSTERS);