OSDN Git Service

[Refactor] #40275 Separated building-util.c/h from bldg.c/h
authorHourier <hourier@users.sourceforge.jp>
Tue, 21 Apr 2020 10:04:39 +0000 (19:04 +0900)
committerHourier <hourier@users.sourceforge.jp>
Tue, 21 Apr 2020 10:04:39 +0000 (19:04 +0900)
Hengband_vcs2017/Hengband/Hengband.vcxproj
Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/bldg.c
src/bldg.h
src/market/building-util.c [new file with mode: 0644]
src/market/building-util.h [new file with mode: 0644]
src/spells3.c

index f10fde7..7e26020 100644 (file)
     <ClCompile Include="..\..\src\io\write-diary.c" />\r
     <ClCompile Include="..\..\src\market\articles-on-sale.c" />\r
     <ClCompile Include="..\..\src\market\black-market.c" />\r
+    <ClCompile Include="..\..\src\market\building-util.c" />\r
     <ClCompile Include="..\..\src\market\gold-magnification-table.c" />\r
     <ClCompile Include="..\..\src\market\poker.c" />\r
     <ClCompile Include="..\..\src\market\say-comments.c" />\r
     <ClInclude Include="..\..\src\io\write-diary.h" />\r
     <ClInclude Include="..\..\src\market\articles-on-sale.h" />\r
     <ClInclude Include="..\..\src\market\black-market.h" />\r
+    <ClInclude Include="..\..\src\market\building-util.h" />\r
     <ClInclude Include="..\..\src\market\gold-magnification-table.h" />\r
     <ClInclude Include="..\..\src\market\poker.h" />\r
     <ClInclude Include="..\..\src\market\say-comments.h" />\r
index 5afd048..1b21fb1 100644 (file)
     <ClCompile Include="..\..\src\cmd\cmd-inventory.c">
       <Filter>cmd</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\market\building-util.c">
+      <Filter>market</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\src\gamevalue.h" />
     <ClInclude Include="..\..\src\cmd\cmd-inventory.h">
       <Filter>cmd</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\market\building-util.h">
+      <Filter>market</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
index 8b25979..e09326d 100644 (file)
@@ -11,6 +11,7 @@ hengband_SOURCES = \
        \
        avatar.h avatar.c birth.c birth.h \
        \
+       market/building-util.c market/building-util.h \
        market/poker.c market/poker.h market/store-owners.c market/store-owners.h \
        market/store-owner-comments.c market/store-owner-comments.h \
        market/articles-on-sale.c market/articles-on-sale.h \
index 26a600f..09d1f7c 100644 (file)
@@ -63,6 +63,7 @@
 #include "autopick.h"
 
 #include "market/poker.h"
+#include "market/building-util.h"
 
 /*
  * todo MAX_BLDGが定義されていない旨のエラーが出る……がコンパイルには成功する
@@ -204,22 +205,6 @@ static bool is_member(player_type *player_ptr, building_type *bldg)
 
 
 /*!
- * @brief コンソールに表示された施設に関する情報を消去する / Clear the building information
- * @details 消去は行毎にヌル文字列で行われる。
- * @param min_row 開始行番号
- * @param max_row 末尾行番号
- * @return なし
- */
-void clear_bldg(int min_row, int max_row)
-{
-       for (int i = min_row; i <= max_row; i++)
-       {
-               prt("", i, 0);
-       }
-}
-
-
-/*!
  * @brief 所持金を表示する。
  * @param player_ptr プレーヤーへの参照ポインタ
  * @return なし
index b91f47f..6db9f64 100644 (file)
@@ -118,6 +118,5 @@ extern const arena_type arena_info[MAX_ARENA_MONS + 2];
 extern void update_gambling_monsters(player_type *player_ptr);
 extern void do_cmd_bldg(player_type *player_ptr);
 
-extern void clear_bldg(int min_row, int max_row);
 extern void determine_daily_bounty(player_type *player_ptr, bool conv_old);
 extern void determine_bounty_uniques(player_type *player_ptr);
diff --git a/src/market/building-util.c b/src/market/building-util.c
new file mode 100644 (file)
index 0000000..eef057a
--- /dev/null
@@ -0,0 +1,17 @@
+#include "angband.h"
+#include "market/building-util.h"
+
+/*!
+ * @brief コンソールに表示された施設に関する情報を消去する / Clear the building information
+ * @details 消去は行毎にヌル文字列で行われる。
+ * @param min_row 開始行番号
+ * @param max_row 末尾行番号
+ * @return なし
+ */
+void clear_bldg(int min_row, int max_row)
+{
+       for (int i = min_row; i <= max_row; i++)
+       {
+               prt("", i, 0);
+       }
+}
diff --git a/src/market/building-util.h b/src/market/building-util.h
new file mode 100644 (file)
index 0000000..4c823bb
--- /dev/null
@@ -0,0 +1,3 @@
+#pragma once
+
+void clear_bldg(int min_row, int max_row);
index 9c42fa0..85951bd 100644 (file)
@@ -39,6 +39,7 @@
 #include "spells.h"
 #include "spells-floor.h"
 #include "grid.h"
+#include "market/building-util.h"
 #include "monster-process.h"
 #include "monster-status.h"
 #include "monster-spell.h"