• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision7cee82e1a94daae572dfa11c635e18f9004e0f61 (tree)
Time2019-05-21 00:00:03
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 ウィンドウ表示変数と関連マクロを view-mainwindow.c/h へ移動.

Change Summary

Incremental Difference

--- a/src/defines.h
+++ b/src/defines.h
@@ -2416,15 +2416,6 @@
24162416 ((int)((G) % 256U))
24172417
24182418 /*
2419- * Determines if a map location is currently "on screen" -RAK-
2420- * Note that "panel_contains(Y,X)" always implies "in_bounds2(Y,X)".
2421- */
2422-#define panel_contains(Y,X) \
2423- (((Y) >= panel_row_min) && ((Y) <= panel_row_max) && \
2424- ((X) >= panel_col_min) && ((X) <= panel_col_max))
2425-
2426-
2427-/*
24282419 * Hack -- Prepare to use the "Secure" routines
24292420 */
24302421 #if defined(SET_UID) && defined(SECURE)
--- a/src/externs.h
+++ b/src/externs.h
@@ -56,9 +56,6 @@ extern bool reset_concent;
5656 * Software options (set via the '=' command). See "tables.c"
5757 */
5858
59-extern POSITION panel_row_min, panel_row_max;
60-extern POSITION panel_col_min, panel_col_max;
61-extern POSITION panel_col_prt, panel_row_prt;
6259 extern int player_uid;
6360 extern int player_euid;
6461 extern int player_egid;
--- a/src/floor-generate.c
+++ b/src/floor-generate.c
@@ -123,6 +123,8 @@
123123 #include "feature.h"
124124 #include "spells.h"
125125
126+#include "view-mainwindow.h"
127+
126128 int dun_tun_rnd;
127129 int dun_tun_chg;
128130 int dun_tun_con;
--- a/src/floor-save.c
+++ b/src/floor-save.c
@@ -36,6 +36,10 @@
3636 #include "spells.h"
3737 #include "cmd-dump.h"
3838 #include "save.h"
39+
40+#include "view-mainwindow.h"
41+
42+
3943 static FLOOR_IDX new_floor_id; /*!<次のフロアのID / floor_id of the destination */
4044 static u32b change_floor_mode; /*!<フロア移行処理に関するフラグ / Mode flags for changing floor */
4145 static u32b latest_visit_mark; /*!<フロアを渡った回数?(確認中) / Max number of visit_mark */
--- a/src/variable.c
+++ b/src/variable.c
@@ -17,16 +17,6 @@
1717 bool repair_monsters; /* Hack -- optimize detect monsters */
1818 bool repair_objects; /* Hack -- optimize detect objects */
1919
20-
21-/*
22- * Dungeon size info
23- */
24-
25-POSITION panel_row_min, panel_row_max;
26-POSITION panel_col_min, panel_col_max;
27-POSITION panel_col_prt, panel_row_prt;
28-
29-
3020 /*
3121 * User info
3222 */
--- a/src/view-mainwindow.c
+++ b/src/view-mainwindow.c
@@ -46,6 +46,15 @@ static byte display_autopick; /*!< 自動拾い状態の設定フラグ */
4646 static int match_autopick;
4747 static object_type *autopick_obj; /*!< 各種自動拾い処理時に使うオブジェクトポインタ */
4848
49+/*
50+ * Dungeon size info
51+ */
52+
53+POSITION panel_row_min, panel_row_max;
54+POSITION panel_col_min, panel_col_max;
55+POSITION panel_col_prt, panel_row_prt;
56+
57+
4958 /*
5059 * Some screen locations for various display routines
5160 * Currently, row 8 and 15 are the only "blank" rows.
--- a/src/view-mainwindow.h
+++ b/src/view-mainwindow.h
@@ -23,3 +23,15 @@ extern bool change_panel(POSITION dy, POSITION dx);
2323 extern void window_stuff(void);
2424 extern void redraw_stuff(void);
2525
26+extern POSITION panel_row_min, panel_row_max;
27+extern POSITION panel_col_min, panel_col_max;
28+extern POSITION panel_col_prt, panel_row_prt;
29+
30+/*
31+ * Determines if a map location is currently "on screen" -RAK-
32+ * Note that "panel_contains(Y,X)" always implies "in_bounds2(Y,X)".
33+ */
34+#define panel_contains(Y,X) \
35+ (((Y) >= panel_row_min) && ((Y) <= panel_row_max) && \
36+ ((X) >= panel_col_min) && ((X) <= panel_col_max))
37+
--- a/src/wild.c
+++ b/src/wild.c
@@ -30,6 +30,8 @@
3030 #include "feature.h"
3131 #include "floor-town.h"
3232
33+#include "view-mainwindow.h"
34+
3335 /*
3436 * Wilderness
3537 */
Show on old repository browser