OSDN Git Service

[Refactor] #39970 Separated angband-version.h from core.h
authorHourier <hourier@users.sourceforge.jp>
Wed, 6 May 2020 12:42:23 +0000 (21:42 +0900)
committerHourier <hourier@users.sourceforge.jp>
Wed, 6 May 2020 12:55:40 +0000 (21:55 +0900)
19 files changed:
Hengband/Hengband/Hengband.vcxproj
Hengband/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/character-dump.c
src/cmd/cmd-dump.c
src/core.c
src/core.h
src/core/angband-version.h [new file with mode: 0644]
src/core/show-file.c
src/init.c
src/knowledge/knowledge-quests.c
src/load.c
src/main-win.c
src/main.c
src/report.c
src/save.c
src/scores.c
src/wizard1.c
src/wizard2.c

index d3bce6c..edfb056 100644 (file)
     <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\core\angband-version.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 05297ff..801008d 100644 (file)
     <ClInclude Include="..\..\src\core\stuff-handler.h">
       <Filter>core</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\core\angband-version.h">
+      <Filter>core</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
index 4969af6..c2d62a8 100644 (file)
@@ -81,6 +81,7 @@ hengband_SOURCES = \
        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 \
+       core/angband-version.h
        \
        dungeon.c dungeon.h \
        floor.c floor.h floor-events.c floor-events.h \
index 55555be..8eff3bd 100644 (file)
@@ -1,5 +1,5 @@
 #include "character-dump.h"
-#include "core.h"
+#include "core/angband-version.h"
 #include "world.h"
 #include "floor-town.h"
 #include "dungeon.h"
index c5fbe42..810414c 100644 (file)
@@ -34,7 +34,7 @@
 #include "cmd/cmd-dump.h"
 #include "cmd/dump-util.h"
 #include "gameterm.h"
-#include "core.h" // 暫定。後で消す.
+#include "core/angband-version.h"
 #include "io/dump-remover.h"
 #include "io/read-pref-file.h"
 #include "io/interpret-pref-file.h"
index 8de922c..df18f0f 100644 (file)
@@ -16,6 +16,7 @@
 #include "main/music-definitions-table.h"
 #include "main/sound-definitions-table.h"
 #include "core.h"
+#include "core/angband-version.h"
 #include "core/stuff-handler.h"
 #include "inet.h"
 #include "gameterm.h"
index 496eb83..7c5912b 100644 (file)
@@ -1,48 +1,5 @@
 #pragma once
 
-#define VERSION_NAME "Hengband" /*!< バリアント名称 / Name of the version/variant */
-
-/*!
- * @brief ゲームのバージョン番号定義 / "Program Version Number" of the game
- * @details
- * 本FAKE_VERSIONそのものは未使用である。Zangと整合性を合わせるための疑似的処理のためFAKE_VER_MAJORは実値-10が該当のバージョン番号となる。
- * <pre>
- * FAKE_VER_MAJOR=1,2 were reserved for ZAngband version 1.x.x/2.x.x .
- * Program Version of Hengband version is
- *   "(FAKE_VER_MAJOR-10).(FAKE_VER_MINOR).(FAKE_VER_PATCH)".
- * </pre>
- */
-#define FAKE_VERSION 0
-
-#define FAKE_VER_MAJOR 12 /*!< ゲームのバージョン番号定義(メジャー番号 + 10) */
-#define FAKE_VER_MINOR 2 /*!< ゲームのバージョン番号定義(マイナー番号) */
-#define FAKE_VER_PATCH 1 /*!< ゲームのバージョン番号定義(パッチ番号) */
-#define FAKE_VER_EXTRA 7 /*!< ゲームのバージョン番号定義(エクストラ番号) */
-
- /*!
-  * @brief バージョンが開発版が安定版かを返す
-  */
-#define        IS_STABLE_VERSION (FAKE_VER_MINOR % 2 == 0 && FAKE_VER_EXTRA == 0)
-
-  /*!
-   * @brief セーブファイル上のバージョン定義(メジャー番号) / "Savefile Version Number" for Hengband 1.1.1 and later
-   * @details
-   * 当面FAKE_VER_*を参照しておく。
-   * <pre>
-   * First three digits may be same as the Program Version.  But not
-   * always same.  It means that newer version may preserves lower
-   * compatibility with the older version.
-   * For example, newer Hengband 1.4.4 creates savefiles marked with
-   * Savefile Version 1.4.0.0 .  It means that Hengband 1.4.0 can load a
-   * savefile of Hengband 1.4.4 (lower compatibility!).
-   * Upper compatibility is always guaranteed.
-   * </pre>
-   */
-#define H_VER_MAJOR (FAKE_VER_MAJOR-10) /*!< セーブファイル上のバージョン定義(メジャー番号) */
-#define H_VER_MINOR FAKE_VER_MINOR /*!< セーブファイル上のバージョン定義(マイナー番号) */
-#define H_VER_PATCH FAKE_VER_PATCH /*!< セーブファイル上のバージョン定義(パッチ番号) */
-#define H_VER_EXTRA FAKE_VER_EXTRA /*!< セーブファイル上のバージョン定義(エクストラ番号) */
-
 /*
  * Special internal key
  */
diff --git a/src/core/angband-version.h b/src/core/angband-version.h
new file mode 100644 (file)
index 0000000..b7af397
--- /dev/null
@@ -0,0 +1,44 @@
+#pragma once
+
+#define VERSION_NAME "Hengband" /*!< バリアント名称 / Name of the version/variant */
+
+/*!
+ * @brief ゲームのバージョン番号定義 / "Program Version Number" of the game
+ * @details
+ * 本FAKE_VERSIONそのものは未使用である。Zangと整合性を合わせるための疑似的処理のためFAKE_VER_MAJORは実値-10が該当のバージョン番号となる。
+ * <pre>
+ * FAKE_VER_MAJOR=1,2 were reserved for ZAngband version 1.x.x/2.x.x .
+ * Program Version of Hengband version is
+ *   "(FAKE_VER_MAJOR-10).(FAKE_VER_MINOR).(FAKE_VER_PATCH)".
+ * </pre>
+ */
+#define FAKE_VERSION 0
+
+#define FAKE_VER_MAJOR 12 /*!< ゲームのバージョン番号定義(メジャー番号 + 10) */
+#define FAKE_VER_MINOR 2 /*!< ゲームのバージョン番号定義(マイナー番号) */
+#define FAKE_VER_PATCH 1 /*!< ゲームのバージョン番号定義(パッチ番号) */
+#define FAKE_VER_EXTRA 7 /*!< ゲームのバージョン番号定義(エクストラ番号) */
+
+/*!
+  * @brief バージョンが開発版が安定版かを返す
+  */
+#define IS_STABLE_VERSION (FAKE_VER_MINOR % 2 == 0 && FAKE_VER_EXTRA == 0)
+
+/*!
+   * @brief セーブファイル上のバージョン定義(メジャー番号) / "Savefile Version Number" for Hengband 1.1.1 and later
+   * @details
+   * 当面FAKE_VER_*を参照しておく。
+   * <pre>
+   * First three digits may be same as the Program Version.  But not
+   * always same.  It means that newer version may preserves lower
+   * compatibility with the older version.
+   * For example, newer Hengband 1.4.4 creates savefiles marked with
+   * Savefile Version 1.4.0.0 .  It means that Hengband 1.4.0 can load a
+   * savefile of Hengband 1.4.4 (lower compatibility!).
+   * Upper compatibility is always guaranteed.
+   * </pre>
+   */
+#define H_VER_MAJOR (FAKE_VER_MAJOR - 10) /*!< セーブファイル上のバージョン定義(メジャー番号) */
+#define H_VER_MINOR FAKE_VER_MINOR /*!< セーブファイル上のバージョン定義(マイナー番号) */
+#define H_VER_PATCH FAKE_VER_PATCH /*!< セーブファイル上のバージョン定義(パッチ番号) */
+#define H_VER_EXTRA FAKE_VER_EXTRA /*!< セーブファイル上のバージョン定義(エクストラ番号) */
index 29b18b3..3055710 100644 (file)
@@ -1,6 +1,6 @@
 #include "core/show-file.h"
 #include "files.h"
-#include "core.h" // 暫定。後で消す.
+#include "core/angband-version.h"
 #include "gameterm.h"
 
 /*!
index bc7bc7e..c3cf007 100644 (file)
@@ -35,6 +35,7 @@
 #include "io/uid-checker.h"
 #include "files.h"
 #include "core.h"
+#include "core/angband-version.h"
 #include "io/read-pref-file.h"
 #include "gameterm.h"
 
index 011cea6..1b2690e 100644 (file)
@@ -8,7 +8,7 @@
 #include "knowledge-quests.h"
 #include "cmd/dump-util.h"
 #include "quest.h"
-#include "core.h" // init_flagsのため。後で消すかも.
+#include "core.h" // 暫定、init_flagsのため。後で消すかも.
 #include "artifact.h"
 #include "object-flavor.h"
 #include "dungeon.h"
index c6ed36a..09d88cc 100644 (file)
@@ -42,7 +42,8 @@
 
 #include "angband.h"
 #include "util.h"
-#include "core.h"
+#include "core.h" // 暫定、init_flags の扱いを決めた上で消す.
+#include "core/angband-version.h"
 
 #include "load.h"
 #include "market/building.h"
index 85cfde2..e88d085 100644 (file)
 #include "quest.h"
 #include "files.h"
 #include "core.h"
+#include "core/angband-version.h"
 #include "core/stuff-handler.h"
 #include "world.h"
 #include "gameterm.h"
index ac0ab28..9a9f083 100644 (file)
@@ -19,6 +19,8 @@
 #include "gameterm.h"
 #include "player/process-name.h"
 #include "chuukei.h"
+#include "autopick/autopick-pref-processor.h"
+#include "core/angband-version.h"
 
 /*
  * Available graphic modes
@@ -607,7 +609,7 @@ int main(int argc, char *argv[])
        signals_init();
 
        /* Initialize */
-       init_angband(p_ptr);
+       init_angband(p_ptr, process_autopick_file_command);
 
        /* Wait for response */
        pause_line(23);
index 67942fd..1181a33 100644 (file)
@@ -6,7 +6,8 @@
  */
 
 #include "angband.h"
-#include "core.h"
+#include "core.h" // 暫定、turn_real() の移設後に消す.
+#include "core/angband-version.h"
 #include "core/stuff-handler.h"
 #include "inet.h"
 #include "dungeon.h"
index a5d91c6..1de03c1 100644 (file)
@@ -17,7 +17,7 @@
 #include "load.h"
 #include "report.h"
 
-#include "core.h"
+#include "core/angband-version.h"
 #include "artifact.h"
 #include "sort.h"
 #include "dungeon.h"
index 94e655e..70c8a15 100644 (file)
@@ -14,7 +14,8 @@
 #include "io/signal-handlers.h"
 #include "gameterm.h"
 #include "util.h"
-#include "core.h"
+#include "core.h" // 暫定、turn_real() の移設後に消す.
+#include "core/angband-version.h"
 
 #include "dungeon.h"
 #include "player/race-info-table.h"
index 7dfc58e..d926613 100644 (file)
@@ -14,7 +14,7 @@
 #include "util.h"
 #include "gameterm.h"
 
-#include "core.h"
+#include "core/angband-version.h"
 #include "artifact.h"
 #include "sort.h"
 #include "market/store.h"
index 745d5fc..e7e1f26 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include "angband.h"
-#include "core.h"
+#include "core/angband-version.h"
 #include "core/stuff-handler.h"
 #include "gameterm.h"