• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisiona608330a405946b1c54d563db30411a3658ef0b8 (tree)
Time2019-05-20 23:53:56
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 handle_stuff() と update_output() を core.c/h へ移動.

Change Summary

Incremental Difference

--- a/src/cmd-hissatsu.c
+++ b/src/cmd-hissatsu.c
@@ -11,6 +11,7 @@
1111 */
1212
1313 #include "angband.h"
14+#include "core.h"
1415 #include "util.h"
1516
1617 #include "monsterrace-hook.h"
--- a/src/cmd-item.c
+++ b/src/cmd-item.c
@@ -12,6 +12,7 @@
1212
1313
1414 #include "angband.h"
15+#include "core.h"
1516 #include "util.h"
1617 #include "autopick.h"
1718 #include "term.h"
--- a/src/cmd-mane.c
+++ b/src/cmd-mane.c
@@ -11,6 +11,7 @@
1111 */
1212
1313 #include "angband.h"
14+#include "core.h"
1415 #include "util.h"
1516
1617 #include "floor.h"
--- a/src/cmd-pet.c
+++ b/src/cmd-pet.c
@@ -1,4 +1,5 @@
11 #include "angband.h"
2+#include "core.h"
23 #include "util.h"
34
45 #include "cmd-dump.h"
--- a/src/cmd-spell.c
+++ b/src/cmd-spell.c
@@ -7,6 +7,7 @@
77 */
88
99 #include "angband.h"
10+#include "core.h"
1011 #include "util.h"
1112
1213 #include "cmd-dump.h"
--- a/src/core.c
+++ b/src/core.c
@@ -5895,3 +5895,23 @@ void close_game(void)
58955895 /* Allow suspending now */
58965896 signals_handle_tstp();
58975897 }
5898+
5899+
5900+/*!
5901+ * @brief 全更新処理をチェックして処理していく
5902+ * Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window"
5903+ * @return なし
5904+ */
5905+void handle_stuff(void)
5906+{
5907+ if (p_ptr->update) update_creature(p_ptr);
5908+ if (p_ptr->redraw) redraw_stuff();
5909+ if (p_ptr->window) window_stuff();
5910+}
5911+
5912+void update_output(void)
5913+{
5914+ if (p_ptr->redraw) redraw_stuff();
5915+ if (p_ptr->window) window_stuff();
5916+}
5917+
--- a/src/core.h
+++ b/src/core.h
@@ -26,3 +26,6 @@ extern void update_playtime(void);
2626 extern s32b turn_real(s32b hoge);
2727 extern void prevent_turn_overflow(void);
2828 extern void close_game(void);
29+
30+extern void handle_stuff(void);
31+extern void update_output(void);
--- a/src/externs.h
+++ b/src/externs.h
@@ -79,10 +79,6 @@ extern bool new_mane;
7979 extern DEPTH *max_dlv;
8080 extern bool use_menu;
8181
82-/* xtra1.c */
83-extern void handle_stuff(void);
84-extern void update_output(void);
85-
8682 #ifdef MACINTOSH
8783 /* main-mac.c */
8884 /* extern void main(void); */
--- a/src/melee1.c
+++ b/src/melee1.c
@@ -12,6 +12,7 @@
1212 */
1313
1414 #include "angband.h"
15+#include "core.h"
1516 #include "util.h"
1617
1718 #include "artifact.h"
--- a/src/mind.c
+++ b/src/mind.c
@@ -15,6 +15,7 @@
1515 */
1616
1717 #include "angband.h"
18+#include "core.h"
1819 #include "util.h"
1920
2021 #include "mind.h"
--- a/src/monster-status.c
+++ b/src/monster-status.c
@@ -1,4 +1,5 @@
11 #include "angband.h"
2+#include "core.h"
23 #include "util.h"
34
45 #include "creature.h"
--- a/src/mspells3.c
+++ b/src/mspells3.c
@@ -11,6 +11,7 @@
1111 */
1212
1313 #include "angband.h"
14+#include "core.h"
1415 #include "util.h"
1516
1617 #include "floor.h"
--- a/src/mutation.c
+++ b/src/mutation.c
@@ -12,6 +12,7 @@
1212 */
1313
1414 #include "angband.h"
15+#include "core.h"
1516 #include "util.h"
1617
1718 #include "cmd-dump.h"
--- a/src/object1.c
+++ b/src/object1.c
@@ -12,6 +12,7 @@
1212 */
1313
1414 #include "angband.h"
15+#include "core.h"
1516 #include "util.h"
1617
1718 #include "artifact.h"
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -13,6 +13,7 @@
1313 */
1414
1515 #include "angband.h"
16+#include "core.h"
1617 #include "util.h"
1718
1819 #include "creature.h"
--- a/src/player-move.c
+++ b/src/player-move.c
@@ -140,6 +140,7 @@
140140 */
141141
142142 #include "angband.h"
143+#include "core.h"
143144 #include "util.h"
144145
145146 #include "autopick.h"
--- a/src/player-status.c
+++ b/src/player-status.c
@@ -1,4 +1,5 @@
11 #include "angband.h"
2+#include "core.h"
23 #include "util.h"
34
45 #include "quest.h"
--- a/src/racial.c
+++ b/src/racial.c
@@ -11,6 +11,7 @@
1111 */
1212
1313 #include "angband.h"
14+#include "core.h"
1415 #include "util.h"
1516
1617 #include "cmd-basic.h"
--- a/src/realm-hissatsu.c
+++ b/src/realm-hissatsu.c
@@ -1,4 +1,5 @@
11 #include "angband.h"
2+#include "core.h"
23 #include "util.h"
34
45 #include "cmd-spell.h"
--- a/src/shoot.c
+++ b/src/shoot.c
@@ -1,4 +1,5 @@
11 #include "angband.h"
2+#include "core.h"
23 #include "util.h"
34
45 #include "monster.h"
--- a/src/snipe.c
+++ b/src/snipe.c
@@ -7,6 +7,7 @@
77 */
88
99 #include "angband.h"
10+#include "core.h"
1011 #include "util.h"
1112
1213 #include "player-status.h"
--- a/src/spells-status.c
+++ b/src/spells-status.c
@@ -1,4 +1,5 @@
11 #include "angband.h"
2+#include "core.h"
23 #include "util.h"
34
45 #include "avatar.h"
--- a/src/spells1.c
+++ b/src/spells1.c
@@ -12,6 +12,7 @@
1212 */
1313
1414 #include "angband.h"
15+#include "core.h"
1516 #include "util.h"
1617
1718 #include "cmd-pet.h"
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -12,6 +12,7 @@
1212 */
1313
1414 #include "angband.h"
15+#include "core.h"
1516 #include "util.h"
1617
1718 #include "creature.h"
--- a/src/spells3.c
+++ b/src/spells3.c
@@ -13,6 +13,7 @@
1313
1414 #include "angband.h"
1515 #include "bldg.h"
16+#include "core.h"
1617 #include "util.h"
1718
1819 #include "creature.h"
--- a/src/store.c
+++ b/src/store.c
@@ -11,6 +11,7 @@
1111 */
1212
1313 #include "angband.h"
14+#include "core.h"
1415 #include "util.h"
1516 #include "term.h"
1617
--- a/src/view-mainwindow.c
+++ b/src/view-mainwindow.c
@@ -2063,7 +2063,7 @@ bool is_heavy_shoot(object_type *o_ptr)
20632063 * @return なし
20642064 * @details 更新処理の対象はゲーム中の全描画処理
20652065 */
2066-static void redraw_stuff(void)
2066+void redraw_stuff(void)
20672067 {
20682068 if (!p_ptr->redraw) return;
20692069
@@ -2248,7 +2248,7 @@ static void redraw_stuff(void)
22482248 * @return なし
22492249 * @details 更新処理の対象はサブウィンドウ全般
22502250 */
2251-static void window_stuff(void)
2251+void window_stuff(void)
22522252 {
22532253 int j;
22542254 BIT_FLAGS mask = 0L;
@@ -2340,25 +2340,6 @@ static void window_stuff(void)
23402340 }
23412341 }
23422342
2343-
2344-/*!
2345- * @brief 全更新処理をチェックして処理していく
2346- * Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window"
2347- * @return なし
2348- */
2349-void handle_stuff(void)
2350-{
2351- if (p_ptr->update) update_creature(p_ptr);
2352- if (p_ptr->redraw) redraw_stuff();
2353- if (p_ptr->window) window_stuff();
2354-}
2355-
2356-void update_output(void)
2357-{
2358- if (p_ptr->redraw) redraw_stuff();
2359- if (p_ptr->window) window_stuff();
2360-}
2361-
23622343 /*!
23632344 * @brief コンソールのリサイズに合わせてマップを再描画する /
23642345 * Map resizing whenever the main term changes size
--- a/src/view-mainwindow.h
+++ b/src/view-mainwindow.h
@@ -20,3 +20,6 @@ extern void resize_map(void);
2020 extern void redraw_window(void);
2121 extern bool change_panel(POSITION dy, POSITION dx);
2222
23+extern void window_stuff(void);
24+extern void redraw_stuff(void);
25+
--- a/src/wizard2.c
+++ b/src/wizard2.c
@@ -11,6 +11,8 @@
1111 */
1212
1313 #include "angband.h"
14+#include "core.h"
15+
1416 #include "dungeon.h"
1517 #include "cmd-dump.h"
1618 #include "util.h"
Show on old repository browser