OSDN Git Service

[Refactor] #37353 generate.h を floor-generate.hへ統合。
authordeskull <deskull@users.sourceforge.jp>
Sat, 20 Apr 2019 07:24:26 +0000 (16:24 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Sat, 20 Apr 2019 07:24:26 +0000 (16:24 +0900)
16 files changed:
Hengband_vcs2017/Hengband/Hengband.vcxproj
Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
src/floor-generate.c
src/floor-generate.h
src/floor-save.c
src/floor-streams.c
src/generate.h [deleted file]
src/grid.c
src/load.c
src/rooms-city.c
src/rooms-fractal.c
src/rooms-pitnest.c
src/rooms-special.c
src/rooms-trap.c
src/rooms-vault.c
src/rooms.c

index 9715e9b..cdbb2f4 100644 (file)
     <ClInclude Include="..\..\src\floor.h" />\r
     <ClInclude Include="..\..\src\gameoption.h" />\r
     <ClInclude Include="..\..\src\gamevalue.h" />\r
-    <ClInclude Include="..\..\src\generate.h" />\r
     <ClInclude Include="..\..\src\geometry.h" />\r
     <ClInclude Include="..\..\src\grid.h" />\r
     <ClInclude Include="..\..\src\h-basic.h" />\r
index 895ed52..a6c0a50 100644 (file)
     <ClInclude Include="..\..\src\externs.h" />
     <ClInclude Include="..\..\src\gameoption.h" />
     <ClInclude Include="..\..\src\gamevalue.h" />
-    <ClInclude Include="..\..\src\generate.h" />
     <ClInclude Include="..\..\src\h-basic.h" />
     <ClInclude Include="..\..\src\h-config.h" />
     <ClInclude Include="..\..\src\h-define.h" />
index 77fc9e6..6f52025 100644 (file)
@@ -97,7 +97,7 @@
  */
 
 #include "angband.h"
-#include "generate.h"
+#include "floor-generate.h"
 #include "grid.h"
 #include "rooms.h"
 #include "floor.h"
index 02a20cf..940494e 100644 (file)
@@ -1,3 +1,110 @@
 #pragma once
+
+/*!
+ * @file generate.h
+ * @brief \83_\83\93\83W\83\87\83\93\90\90¬\8f\88\97\9d\82Ì\83w\83b\83_\81[\83t\83@\83C\83\8b
+ * @date 2014/08/08
+ * @author
+ * \95s\96¾(\95Ï\8bð\94Ø\93{\83X\83^\83b\83t\81H)
+ */
+
+#define ALLOW_CAVERNS_AND_LAKES
+
+#define SAFE_MAX_ATTEMPTS 5000 /*!< \90\90¬\8f\88\97\9d\8aî\96{\8e\8e\8ds\89ñ\90\94 */
+
+
+
+extern int dun_tun_rnd; /*!< \83_\83\93\83W\83\87\83\93\82Ì\92Ê\98H\95û\8cü\82ð\91~\82«\89ñ\82·\95p\93x(\88ê\89ñ\82Ì\8e\8e\8ds\82²\82Æ\82É%\82Å\94»\92è\82µ\82Ä\82¢\82é) */
+extern int dun_tun_chg; /*!< \83_\83\93\83W\83\87\83\93\82Ì\92Ê\98H\82ð\83N\83\89\83\93\83N\82³\82¹\82é\95p\93x(\88ê\89ñ\82Ì\8e\8e\8ds\82²\82Æ\82É%\82Å\94»\92è\82µ\82Ä\82¢\82é) */
+extern int dun_tun_con; /*!< \83_\83\93\83W\83\87\83\93\82Ì\92Ê\98H\82ð\8cp\91±\82µ\82Ä\88ø\82«\89\84\82Î\82·\95p\93x(\88ê\89ñ\82Ì\8e\8e\8ds\82²\82Æ\82É%\82Å\94»\92è\82µ\82Ä\82¢\82é) */
+extern int dun_tun_pen; /*!< \83_\83\93\83W\83\87\83\93\82Ì\95\94\89®\93ü\8cû\82É\83h\83A\82ð\90Ý\92u\82·\82é\95p\93x(\88ê\89ñ\82Ì\8e\8e\8ds\82²\82Æ\82É%\82Å\94»\92è\82µ\82Ä\82¢\82é) */
+extern int dun_tun_jct; /*!< \83_\83\93\83W\83\87\83\93\82Ì\92Ê\98H\8cð\8d·\92n\93_\95t\8bß\82É\83h\83A\82ð\90Ý\92u\82·\82é\95p\93x(\88ê\89ñ\82Ì\8e\8e\8ds\82²\82Æ\82É%\82Å\94»\92è\82µ\82Ä\82¢\82é) */
+
+/*
+ * Hack -- Dungeon allocation "places"
+ */
+#define ALLOC_SET_CORR         1       /* Hallway */
+#define ALLOC_SET_ROOM         2       /* Room */
+#define ALLOC_SET_BOTH         3       /* Anywhere */
+
+ /*
+  * Hack -- Dungeon allocation "types"
+  */
+#define ALLOC_TYP_RUBBLE       1       /* Rubble */
+#define ALLOC_TYP_TRAP         3       /* Trap */
+#define ALLOC_TYP_GOLD         4       /* Gold */
+#define ALLOC_TYP_OBJECT       5       /* Object */
+#define ALLOC_TYP_INVIS                6       /* Invisible wall */
+
+
+
+  /*
+   * The "size" of a "generation block" in grids
+   */
+#define BLOCK_HGT      11
+#define BLOCK_WID      11
+
+   /*
+       * Maximum numbers of rooms along each axis (currently 6x6)
+       */
+#define MAX_ROOMS_ROW  (MAX_HGT / BLOCK_HGT)
+#define MAX_ROOMS_COL  (MAX_WID / BLOCK_WID)
+
+
+       /*
+        * Bounds on some arrays used in the "dun_data" structure.
+        * These bounds are checked, though usually this is a formality.
+        */
+#define CENT_MAX       100
+#define DOOR_MAX       200
+#define WALL_MAX       500
+#define TUNN_MAX       900
+
+
+        /*
+         * Structure to hold all "dungeon generation" data
+         */
+
+typedef struct dun_data dun_data;
+
+struct dun_data
+{
+       /* Array of centers of rooms */
+       int cent_n;
+       coord cent[CENT_MAX];
+
+       /* Array of possible door locations */
+       int door_n;
+       coord door[DOOR_MAX];
+
+       /* Array of wall piercing locations */
+       int wall_n;
+       coord wall[WALL_MAX];
+
+       /* Array of tunnel grids */
+       int tunn_n;
+       coord tunn[TUNN_MAX];
+
+       /* Number of blocks along each axis */
+       int row_rooms;
+       int col_rooms;
+
+       /* Array of which blocks are used */
+       bool room_map[MAX_ROOMS_ROW][MAX_ROOMS_COL];
+
+       /* Various type of dungeon floors */
+       bool destroyed;
+       bool empty_level;
+       bool cavern;
+       int laketype;
+};
+
+extern dun_data *dun;
+
+extern bool place_quest_monsters(void);
+extern void wipe_generate_random_floor_flags(void);
+extern void clear_cave(void);
+extern void generate_random_floor(void);
+
 extern bool build_tunnel(POSITION row1, POSITION col1, POSITION row2, POSITION col2);
 extern bool build_tunnel2(POSITION x1, POSITION y1, POSITION x2, POSITION y2, int type, int cutoff);
index ba63dc2..4dea410 100644 (file)
@@ -13,7 +13,7 @@
 #include "angband.h"
 #include "floor.h"
 #include "floor-events.h"
-#include "generate.h"
+#include "floor-generate.h"
 #include "grid.h"
 #include "monster.h"
 #include "quest.h"
index 483d16a..0bc5fe9 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #include "angband.h"
-#include "generate.h"
+#include "floor-generate.h"
 #include "floor.h"
 #include "floor-streams.h"
 #include "grid.h"
diff --git a/src/generate.h b/src/generate.h
deleted file mode 100644 (file)
index 22c3dbb..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*!
- * @file generate.h
- * @brief ダンジョン生成処理のヘッダーファイル
- * @date 2014/08/08
- * @author
- * 不明(変愚蛮怒スタッフ?)
- */
-
-#define ALLOW_CAVERNS_AND_LAKES
-
-#define SAFE_MAX_ATTEMPTS 5000 /*!< 生成処理基本試行回数 */
-
-
-
-extern int dun_tun_rnd; /*!< ダンジョンの通路方向を掻き回す頻度(一回の試行ごとに%で判定している) */
-extern int dun_tun_chg; /*!< ダンジョンの通路をクランクさせる頻度(一回の試行ごとに%で判定している) */
-extern int dun_tun_con; /*!< ダンジョンの通路を継続して引き延ばす頻度(一回の試行ごとに%で判定している) */
-extern int dun_tun_pen; /*!< ダンジョンの部屋入口にドアを設置する頻度(一回の試行ごとに%で判定している) */
-extern int dun_tun_jct; /*!< ダンジョンの通路交差地点付近にドアを設置する頻度(一回の試行ごとに%で判定している) */
-
-/*
- * Hack -- Dungeon allocation "places"
- */
-#define ALLOC_SET_CORR         1       /* Hallway */
-#define ALLOC_SET_ROOM         2       /* Room */
-#define ALLOC_SET_BOTH         3       /* Anywhere */
-
-/*
- * Hack -- Dungeon allocation "types"
- */
-#define ALLOC_TYP_RUBBLE       1       /* Rubble */
-#define ALLOC_TYP_TRAP         3       /* Trap */
-#define ALLOC_TYP_GOLD         4       /* Gold */
-#define ALLOC_TYP_OBJECT       5       /* Object */
-#define ALLOC_TYP_INVIS                6       /* Invisible wall */
-
-
-
-/*
- * The "size" of a "generation block" in grids
- */
-#define BLOCK_HGT      11
-#define BLOCK_WID      11
-
-/*
- * Maximum numbers of rooms along each axis (currently 6x6)
- */
-#define MAX_ROOMS_ROW  (MAX_HGT / BLOCK_HGT)
-#define MAX_ROOMS_COL  (MAX_WID / BLOCK_WID)
-
-
-/*
- * Bounds on some arrays used in the "dun_data" structure.
- * These bounds are checked, though usually this is a formality.
- */
-#define CENT_MAX       100
-#define DOOR_MAX       200
-#define WALL_MAX       500
-#define TUNN_MAX       900
-
-
-/*
- * Structure to hold all "dungeon generation" data
- */
-
-typedef struct dun_data dun_data;
-
-struct dun_data
-{
-       /* Array of centers of rooms */
-       int cent_n;
-       coord cent[CENT_MAX];
-
-       /* Array of possible door locations */
-       int door_n;
-       coord door[DOOR_MAX];
-
-       /* Array of wall piercing locations */
-       int wall_n;
-       coord wall[WALL_MAX];
-
-       /* Array of tunnel grids */
-       int tunn_n;
-       coord tunn[TUNN_MAX];
-
-       /* Number of blocks along each axis */
-       int row_rooms;
-       int col_rooms;
-
-       /* Array of which blocks are used */
-       bool room_map[MAX_ROOMS_ROW][MAX_ROOMS_COL];
-
-       /* Various type of dungeon floors */
-       bool destroyed;
-       bool empty_level;
-       bool cavern;
-       int laketype;
-};
-
-extern dun_data *dun;
-
-extern bool place_quest_monsters(void);
-extern void wipe_generate_random_floor_flags(void);
-extern void clear_cave(void);
-extern void generate_random_floor(void);
index 8bb2f82..028a459 100644 (file)
@@ -22,7 +22,7 @@
 #include "world.h"
 #include "object-flavor.h"
 #include "object-hook.h"
-#include "generate.h"
+#include "floor-generate.h"
 #include "grid.h"
 #include "trap.h"
 #include "rooms.h"
index a294ecc..bcf31af 100644 (file)
@@ -41,7 +41,7 @@
  */
 
 #include "angband.h"
-#include "generate.h"
+#include "floor-generate.h"
 #include "trap.h"
 #include "mutation.h"
 #include "monster.h"
index 091d795..f4e1f50 100644 (file)
@@ -1,6 +1,6 @@
 #include "angband.h"
 #include "grid.h"
-#include "generate.h"
+#include "floor-generate.h"
 #include "rooms.h"
 #include "rooms-city.h"
 #include "store.h"
index 118b44e..7abfa5d 100644 (file)
@@ -1,6 +1,6 @@
 #include "angband.h"
 #include "grid.h"
-#include "generate.h"
+#include "floor-generate.h"
 #include "rooms.h"
 #include "rooms-normal.h"
 #include "floor.h"
index 771141b..3a5834e 100644 (file)
@@ -1,6 +1,6 @@
 #include "angband.h"
 #include "grid.h"
-#include "generate.h"
+#include "floor-generate.h"
 #include "rooms.h"
 #include "rooms-pitnest.h"
 #include "monster.h"
index e62fd52..7125e63 100644 (file)
@@ -1,6 +1,6 @@
 #include "angband.h"
 #include "grid.h"
-#include "generate.h"
+#include "floor-generate.h"
 #include "rooms.h"
 #include "monster.h"
 #include "monsterrace-hook.h"
index 182a8e0..cb59f8f 100644 (file)
@@ -1,6 +1,6 @@
 #include "angband.h"
 #include "grid.h"
-#include "generate.h"
+#include "floor-generate.h"
 #include "rooms.h"
 #include "floor.h"
 
index db5357b..2d5e710 100644 (file)
@@ -1,5 +1,5 @@
 #include "angband.h"
-#include "generate.h"
+#include "floor-generate.h"
 #include "grid.h"
 #include "rooms.h"
 #include "store.h"
index 47e17cd..74f4c17 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "angband.h"
 #include "floor.h"
-#include "generate.h"
+#include "floor-generate.h"
 #include "grid.h"
 #include "rooms.h"