From: deskull Date: Sun, 5 Jan 2020 15:49:09 +0000 (+0900) Subject: [Refactor] #38997 prt_path() に floor_type * 引数を追加 / Added floor_type * argument to... X-Git-Tag: vmacos3.0.0-alpha52~2165 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f1bb0c1e470fd6d9bd55b1bf5c12dc28dd92dfdb;p=hengbandforosx%2Fhengbandosx.git [Refactor] #38997 prt_path() に floor_type * 引数を追加 / Added floor_type * argument to prt_path(). --- diff --git a/src/targeting.c b/src/targeting.c index ba8a56684..7a7ac8cc2 100644 --- a/src/targeting.c +++ b/src/targeting.c @@ -1096,7 +1096,7 @@ bool target_set(BIT_FLAGS mode) /* Set forcus */ change_panel_xy(y, x); - if (!(mode & TARGET_LOOK)) prt_path(y, x); + if (!(mode & TARGET_LOOK)) prt_path(p_ptr->current_floor_ptr, y, x); /* Access */ g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x]; @@ -1333,7 +1333,7 @@ bool target_set(BIT_FLAGS mode) { bool move_fast = FALSE; - if (!(mode & TARGET_LOOK)) prt_path(y, x); + if (!(mode & TARGET_LOOK)) prt_path(p_ptr->current_floor_ptr, y, x); /* Access */ g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x]; diff --git a/src/view-mainwindow.c b/src/view-mainwindow.c index 16fe2a308..c04584110 100644 --- a/src/view-mainwindow.c +++ b/src/view-mainwindow.c @@ -3775,7 +3775,7 @@ void move_cursor_relative(int row, int col) /* * print project path */ -void prt_path(POSITION y, POSITION x) +void prt_path(floor_type *floor_ptr, POSITION y, POSITION x) { int i; int path_n; @@ -3787,7 +3787,7 @@ void prt_path(POSITION y, POSITION x) return; /* Get projection path */ - path_n = project_path(p_ptr->current_floor_ptr, path_g, (project_length ? project_length : MAX_RANGE), p_ptr->y, p_ptr->x, y, x, PROJECT_PATH | PROJECT_THRU); + path_n = project_path(floor_ptr, path_g, (project_length ? project_length : MAX_RANGE), p_ptr->y, p_ptr->x, y, x, PROJECT_PATH | PROJECT_THRU); p_ptr->redraw |= (PR_MAP); handle_stuff(); @@ -3797,7 +3797,7 @@ void prt_path(POSITION y, POSITION x) { POSITION ny = GRID_Y(path_g[i]); POSITION nx = GRID_X(path_g[i]); - grid_type *g_ptr = &p_ptr->current_floor_ptr->grid_array[ny][nx]; + grid_type *g_ptr = &floor_ptr->grid_array[ny][nx]; if (panel_contains(ny, nx)) { @@ -3807,7 +3807,7 @@ void prt_path(POSITION y, POSITION x) TERM_COLOR ta = default_color; char tc = '*'; - if (g_ptr->m_idx && p_ptr->current_floor_ptr->m_list[g_ptr->m_idx].ml) + if (g_ptr->m_idx && floor_ptr->m_list[g_ptr->m_idx].ml) { /* Determine what is there */ map_info(ny, nx, &a, &c, &ta, &tc); diff --git a/src/view-mainwindow.h b/src/view-mainwindow.h index 017203fde..6b6d610e5 100644 --- a/src/view-mainwindow.h +++ b/src/view-mainwindow.h @@ -14,7 +14,7 @@ extern void prt_time(void); extern concptr map_name(void); extern void print_monster_list(floor_type *floor_ptr, TERM_LEN x, TERM_LEN y, TERM_LEN max_lines); extern void move_cursor_relative(int row, int col); -extern void prt_path(POSITION y, POSITION x); +extern void prt_path(floor_type *floor_ptr, POSITION y, POSITION x); extern void monster_race_track(MONRACE_IDX r_idx); extern void object_kind_track(KIND_OBJECT_IDX k_idx); extern void resize_map(void);