OSDN Git Service

[Refactor] #39970 Separated stuf--handler.c/h from core.c/h
authorHourier <hourier@users.sourceforge.jp>
Wed, 6 May 2020 11:52:21 +0000 (20:52 +0900)
committerHourier <hourier@users.sourceforge.jp>
Wed, 6 May 2020 11:52:21 +0000 (20:52 +0900)
44 files changed:
Hengband/Hengband/Hengband.vcxproj
Hengband/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/cmd/cmd-basic.c
src/cmd/cmd-draw.c
src/cmd/cmd-hissatsu.c
src/cmd/cmd-item.c
src/cmd/cmd-mane.c
src/cmd/cmd-pet.c
src/cmd/cmd-save.c
src/cmd/cmd-spell.c
src/combat/melee.c
src/combat/shoot.c
src/core.c
src/core.h
src/core/stuff-handler.c [new file with mode: 0644]
src/core/stuff-handler.h [new file with mode: 0644]
src/effect/effect-monster.c
src/knowledge/knowledge-items.c
src/knowledge/knowledge-monsters.c
src/main-win.c
src/market/building.c
src/market/store.c
src/mind.c
src/monster-status.c
src/mspells3.c
src/mutation.c
src/player-damage.c
src/player-effects.c
src/player-inventory.c
src/player-move.c
src/player-status.c
src/racial.c
src/realm/realm-hissatsu.c
src/report.c
src/snipe.c
src/spell/process-effect.c
src/spells-status.c
src/spells2.c
src/spells3.c
src/targeting.c
src/util.c
src/view/display-main-window.c
src/wizard2.c

index 53b1e67..d3bce6c 100644 (file)
     <ClCompile Include="..\..\src\cmd\cmd-knowledge.c" />\r
     <ClCompile Include="..\..\src\cmd\cmd-process-screen.c" />\r
     <ClCompile Include="..\..\src\cmd\dump-util.c" />\r
+    <ClCompile Include="..\..\src\core\stuff-handler.c" />\r
     <ClCompile Include="..\..\src\effect\effect-feature.c" />\r
     <ClCompile Include="..\..\src\effect\effect-item.c" />\r
     <ClCompile Include="..\..\src\effect\effect-monster-charm.c" />\r
     <ClInclude Include="..\..\src\cmd\cmd-knowledge.h" />\r
     <ClInclude Include="..\..\src\cmd\cmd-process-screen.h" />\r
     <ClInclude Include="..\..\src\cmd\dump-util.h" />\r
+    <ClInclude Include="..\..\src\core\stuff-handler.h" />\r
     <ClInclude Include="..\..\src\effect\effect-characteristics.h" />\r
     <ClInclude Include="..\..\src\effect\effect-feature.h" />\r
     <ClInclude Include="..\..\src\effect\effect-item.h" />\r
index 8381d9c..05297ff 100644 (file)
     <ClCompile Include="..\..\src\spell\process-effect.c">
       <Filter>spell</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\core\stuff-handler.c">
+      <Filter>core</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\src\gamevalue.h" />
     <ClInclude Include="..\..\src\effect\effect-characteristics.h">
       <Filter>effect</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\core\stuff-handler.h">
+      <Filter>core</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
index 10e05bb..4969af6 100644 (file)
@@ -80,6 +80,7 @@ hengband_SOURCES = \
        io/uid-checker.c io/uid-checker.h \
        character-dump.c character-dump.h core.c core.h files.c files.h \
        core/show-file.c core/show-file.h \
+       core/stuff-handler.c core/stuff-handler.h \
        \
        dungeon.c dungeon.h \
        floor.c floor.h floor-events.c floor-events.h \
index 48a2884..d9c25bc 100644 (file)
@@ -14,6 +14,7 @@
 #include "main/music-definitions-table.h"
 #include "main/sound-definitions-table.h"
 #include "core.h"
+#include "core/stuff-handler.h"
 #include "gameterm.h"
 
 #include "io/write-diary.h"
index 952012f..c2ea067 100644 (file)
@@ -1,5 +1,5 @@
 #include "angband.h"
-#include "core.h" // 暫定。後で消す.
+#include "core/stuff-handler.h"
 #include "cmd/cmd-draw.h"
 #include "files.h"
 #include "gameterm.h"
index 130850f..5a6f0f7 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "main/sound-definitions-table.h"
 
index c56a95c..baee162 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "main/sound-definitions-table.h"
 #include "gameterm.h"
index 5ca49ad..4052927 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "main/sound-definitions-table.h"
 
index 9f961fa..9fb51e4 100644 (file)
@@ -1,5 +1,5 @@
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 
 #include "io/write-diary.h"
index 71fa70b..745671f 100644 (file)
@@ -3,7 +3,7 @@
 #include "cmd/cmd-save.h"
 #include "cmd/cmd-dump.h"
 #include "player-move.h"
-#include "core.h" // 暫定。後で消す.
+#include "core/stuff-handler.h"
 #include "save.h"
 #include "world.h"
 #include "monster-status.h" // 違和感。要調査.
index 78ab309..9e3f150 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "main/sound-definitions-table.h"
 #include "cmd/cmd-spell.h"
index 93cb283..fa60d5d 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "main/sound-definitions-table.h"
 
index f4bf005..9d82110 100644 (file)
@@ -1,5 +1,5 @@
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "main/sound-definitions-table.h"
 #include "gameterm.h"
index c38ed07..8de922c 100644 (file)
@@ -16,6 +16,7 @@
 #include "main/music-definitions-table.h"
 #include "main/sound-definitions-table.h"
 #include "core.h"
+#include "core/stuff-handler.h"
 #include "inet.h"
 #include "gameterm.h"
 #include "chuukei.h"
@@ -4737,19 +4738,6 @@ void close_game(player_type *player_ptr)
 }
 
 
-/*!
- * @brief 全更新処理をチェックして処理していく
- * Handle "player_ptr->update" and "player_ptr->redraw" and "player_ptr->window"
- * @return なし
- */
-void handle_stuff(player_type *player_ptr)
-{
-       if (player_ptr->update) update_creature(player_ptr);
-       if (player_ptr->redraw) redraw_stuff(player_ptr);
-       if (player_ptr->window) window_stuff(player_ptr);
-}
-
-
 void update_output(player_type *player_ptr)
 {
        if (player_ptr->redraw) redraw_stuff(player_ptr);
index 70a8dc7..496eb83 100644 (file)
@@ -76,5 +76,4 @@ extern s32b turn_real(player_type *player_ptr, s32b hoge);
 extern void prevent_turn_overflow(player_type *player_ptr);
 extern void close_game(player_type *player_ptr);
 
-extern void handle_stuff(player_type *player_ptr);
 extern void update_output(player_type *player_ptr);
diff --git a/src/core/stuff-handler.c b/src/core/stuff-handler.c
new file mode 100644 (file)
index 0000000..cae7ee7
--- /dev/null
@@ -0,0 +1,18 @@
+#include "angband.h"
+#include "core/stuff-handler.h"
+#include "view/display-main-window.h"
+
+/*!
+ * @brief 全更新処理をチェックして処理していく
+ * Handle "player_ptr->update" and "player_ptr->redraw" and "player_ptr->window"
+ * @return なし
+ */
+void handle_stuff(player_type* player_ptr)
+{
+    if (player_ptr->update)
+        update_creature(player_ptr);
+    if (player_ptr->redraw)
+        redraw_stuff(player_ptr);
+    if (player_ptr->window)
+        window_stuff(player_ptr);
+}
diff --git a/src/core/stuff-handler.h b/src/core/stuff-handler.h
new file mode 100644 (file)
index 0000000..00c4c5c
--- /dev/null
@@ -0,0 +1,3 @@
+#pragma once
+
+void handle_stuff(player_type* player_ptr);
index 01f242a..bbbf41d 100644 (file)
@@ -10,7 +10,7 @@
 #include "io/write-diary.h"
 #include "main/sound-definitions-table.h"
 #include "player-move.h"
-#include "core.h" // 暫定、後で消す.
+#include "core/stuff-handler.h"
 #include "effect/effect-monster-util.h"
 #include "effect/effect-monster-switcher.h"
 #include "monster-status.h"
index d86a01d..15a593b 100644 (file)
@@ -16,7 +16,7 @@
 #include "cmd/object-group-table.h"
 #include "world.h"
 #include "gameterm.h"
-#include "core.h" // 暫定、後で消す.
+#include "core/stuff-handler.h"
 #include "view/display-main-window.h" // 暫定、後で消す.
 
 /*
index c8396ad..a369760 100644 (file)
@@ -16,7 +16,7 @@
 #include "gameterm.h"
 #include "english.h"
 
-#include "core.h" // 暫定、後で消す.
+#include "core/stuff-handler.h"
 #include "view/display-main-window.h" // 暫定、後で消す.
 
  /*
index 0cbaa0d..85cfde2 100644 (file)
 #include "quest.h"
 #include "files.h"
 #include "core.h"
+#include "core/stuff-handler.h"
 #include "world.h"
 #include "gameterm.h"
 
index 55ffb1d..4f3b0f9 100644 (file)
@@ -18,6 +18,7 @@
 #include "gameterm.h"
 
 #include "core.h"
+#include "core/stuff-handler.h"
 #include "core/show-file.h"
 #include "cmd/cmd-dump.h"
 #include "cmd/cmd-inn.h"
index 733af48..d586d01 100644 (file)
@@ -17,7 +17,7 @@
 #include "market/gold-magnification-table.h"
 #include "market/store-util.h"
 #include "market/black-market.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "main/music-definitions-table.h"
 #include "main/sound-definitions-table.h"
index cd5ce16..8189a6d 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "main/sound-definitions-table.h"
 
index 9114109..b4d8f3d 100644 (file)
@@ -1,5 +1,5 @@
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "main/sound-definitions-table.h"
 
index 4eedab3..c0fe5c0 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "main/sound-definitions-table.h"
 
index 25d07b6..7f698d5 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "core/show-file.h"
 #include "util.h"
 
index 71cdc56..18e1192 100644 (file)
@@ -1,5 +1,5 @@
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "main/music-definitions-table.h"
 #include "main/sound-definitions-table.h"
index d7e6cfc..a5933e2 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "angband.h"
 #include "gameterm.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 
 #include "creature.h"
index cda220b..e0bb8f2 100644 (file)
@@ -1,5 +1,5 @@
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "player-inventory.h"
 
index fe3fa7b..3ee5be0 100644 (file)
 
 #include "angband.h"
 #include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "main/sound-definitions-table.h"
 
index d6dbbcc..40d7e1b 100644 (file)
@@ -1,5 +1,5 @@
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "main/sound-definitions-table.h"
 
index 32002f6..6e8043d 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 
 #include "cmd-basic.h"
index 0e64017..99e3517 100644 (file)
@@ -1,5 +1,5 @@
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 
 #include "cmd-spell.h"
index 76f0c5a..67942fd 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "angband.h"
 #include "core.h"
+#include "core/stuff-handler.h"
 #include "inet.h"
 #include "dungeon.h"
 
index 8e9e797..972d459 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "main/sound-definitions-table.h"
 #include "gameterm.h"
index 83166ec..63f7055 100644 (file)
@@ -2,7 +2,7 @@
 #include "effect/spells-effect-util.h"
 #include "spell/process-effect.h"
 #include "cmd-pet.h" // 暫定、後で消すかも.
-#include "core.h" // 暫定、後で消す.
+#include "core/stuff-handler.h"
 #include "effect/effect-feature.h"
 #include "effect/effect-item.h"
 #include "effect/effect-monster.h"
index 6b671f1..524c7f4 100644 (file)
@@ -1,5 +1,5 @@
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 
 #include "cmd-magiceat.h"
index 06f1e36..e7bacd3 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "angband.h"
 #include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 #include "main/sound-definitions-table.h"
 
index 6f04fa9..80e1efa 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "angband.h"
 #include "market/building.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "gameterm.h"
 #include "util.h"
 #include "main/sound-definitions-table.h"
index 8f00ab4..ce44e15 100644 (file)
@@ -13,6 +13,7 @@
 #include "angband.h"
 #include "util.h"
 #include "core.h"
+#include "core/stuff-handler.h"
 #include "gameterm.h"
 #include "targeting.h"
 
index 5e18c02..f7753a2 100644 (file)
@@ -14,6 +14,7 @@
 #include "main/music-definitions-table.h"
 #include "io/signal-handlers.h"
 #include "core.h"
+#include "core/stuff-handler.h"
 #include "gameterm.h"
 #include "util.h"
 #include "files.h"
index d88bc3c..24ae009 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "market/building.h"
 #include "core.h"
+#include "core/stuff-handler.h"
 #include "files.h"
 #include "world.h"
 #include "quest.h"
index 8e75c53..745d5fc 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "angband.h"
 #include "core.h"
+#include "core/stuff-handler.h"
 #include "gameterm.h"
 
 #include "dungeon.h"