OSDN Git Service

[Refactor] #40571 Moved panel_bounds_center() from targeting.c/h to cursor.c/h
authorHourier <hourier@users.sourceforge.jp>
Sat, 25 Jul 2020 02:50:21 +0000 (11:50 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sat, 25 Jul 2020 02:50:21 +0000 (11:50 +0900)
src/io/cursor.c
src/io/cursor.h
src/target/targeting.c
src/target/targeting.h

index 8e991ce..ac61cf9 100644 (file)
@@ -13,7 +13,6 @@
 #include "io/screen-util.h"
 #include "system/floor-type-definition.h"
 #include "target/target-preparation.h"
-#include "target/targeting.h"
 #include "term/term-color-types.h"
 #include "view/display-map.h"
 #include "window/main-window-util.h"
@@ -132,3 +131,18 @@ bool change_panel(player_type *player_ptr, POSITION dy, POSITION dx)
     handle_stuff(player_ptr);
     return TRUE;
 }
+
+/*!
+ * @brief コンソール上におけるマップ表示の左上位置を返す /
+ * Calculates current boundaries Called below and from "do_cmd_locate()".
+ * @return なし
+ */
+void panel_bounds_center(void)
+{
+    TERM_LEN wid, hgt;
+    get_screen_size(&wid, &hgt);
+    panel_row_max = panel_row_min + hgt - 1;
+    panel_row_prt = panel_row_min - 1;
+    panel_col_max = panel_col_min + wid - 1;
+    panel_col_prt = panel_col_min - 13;
+}
index 6b03e32..471f48c 100644 (file)
@@ -5,3 +5,4 @@
 void move_cursor_relative(int row, int col);
 void print_path(player_type *player_ptr, POSITION y, POSITION x);
 bool change_panel(player_type *player_ptr, POSITION dy, POSITION dx);
+void panel_bounds_center(void);
index 11df759..04f5aa8 100644 (file)
 #include "world/world.h"
 
 /*!
- * @brief コンソール上におけるマップ表示の左上位置を返す /
- * Calculates current boundaries Called below and from "do_cmd_locate()".
- * @return なし
- */
-void panel_bounds_center(void)
-{
-    TERM_LEN wid, hgt;
-    get_screen_size(&wid, &hgt);
-    panel_row_max = panel_row_min + hgt - 1;
-    panel_row_prt = panel_row_min - 1;
-    panel_col_max = panel_col_min + wid - 1;
-    panel_col_prt = panel_col_min - 13;
-}
-
-/*!
  * @brief マップ描画のフォーカスを当てるべき座標を更新する
  * @param creature_ptr プレーヤーへの参照ポインタ
  * @details
index f8d43c9..859b1d4 100644 (file)
@@ -9,7 +9,6 @@ extern POSITION target_row;
 typedef enum target_type target_type;
 bool target_set(player_type *creature_ptr, target_type mode);
 
-void panel_bounds_center(void);
 void verify_panel(player_type *creature_ptr);
 bool target_okay(player_type *creature_ptr);
 bool get_aim_dir(player_type *creature_ptr, DIRECTION *dp);