OSDN Git Service

[Refactor] #37353 dungeon.c/h を追加。
authordeskull <deskull@users.sourceforge.jp>
Thu, 25 Apr 2019 15:06:48 +0000 (00:06 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Thu, 25 Apr 2019 15:06:48 +0000 (00:06 +0900)
50 files changed:
Hengband_vcs2017/Hengband/Hengband.vcxproj
Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/cmd-basic.c
src/cmd4.c
src/core.c
src/dungeon-file.c
src/dungeon.c [new file with mode: 0644]
src/dungeon.h [new file with mode: 0644]
src/externs.h
src/files.c
src/floor-events.c
src/floor-generate.c
src/floor-save.c
src/floor-streams.c
src/grid.c
src/init.c
src/load.c
src/melee1.c
src/monster-process.c
src/monster-status.c
src/monster1.c
src/monster2.c
src/monsterrace-hook.c
src/mspells1.c
src/mspells2.c
src/object2.c
src/player-move.c
src/player-status.c
src/realm-hissatsu.c
src/rooms-fractal.c
src/rooms-normal.c
src/rooms-pitnest.c
src/rooms-special.c
src/rooms-trap.c
src/rooms-vault.c
src/rooms.c
src/rumor.c
src/spells-floor.c
src/spells1.c
src/spells2.c
src/spells3.c
src/trap.c
src/types.h
src/variable.c
src/view-mainwindow.c
src/warning.c
src/wild.c
src/wizard2.c
src/xtra2.c

index d8c5198..0ec248c 100644 (file)
     <ClCompile Include="..\..\src\cmd-smith.c" />\r
     <ClCompile Include="..\..\src\core.c" />\r
     <ClCompile Include="..\..\src\dungeon-file.c" />\r
+    <ClCompile Include="..\..\src\dungeon.c" />\r
     <ClCompile Include="..\..\src\feature.c" />\r
     <ClCompile Include="..\..\src\floor-events.c" />\r
     <ClCompile Include="..\..\src\floor-generate.c" />\r
     <ClInclude Include="..\..\src\cmd-usestaff.h" />\r
     <ClInclude Include="..\..\src\defines.h" />\r
     <ClInclude Include="..\..\src\dungeon-file.h" />\r
+    <ClInclude Include="..\..\src\dungeon.h" />\r
     <ClInclude Include="..\..\src\externs.h" />\r
     <ClInclude Include="..\..\src\feature.h" />\r
     <ClInclude Include="..\..\src\files.h" />\r
index 0e585bf..2166f46 100644 (file)
       <Filter>floor</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\core.c" />
+    <ClCompile Include="..\..\src\dungeon.c">
+      <Filter>floor</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\src\angband.h" />
     <ClInclude Include="..\..\src\player-skill.h">
       <Filter>player</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\dungeon.h">
+      <Filter>floor</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="..\..\src\angband.rc" />
index 0e6fb55..65c32da 100644 (file)
@@ -21,6 +21,7 @@ hengband_SOURCES = \
        \
        core.c defines.h externs.h files.c files.h \
        \
+       dungeon.c dungeon.h \
        floor.c floor.h floor-events.c floor-events.h floor-generate.c floor-generate.h \
        floor-save.h floor-save.c \
        floor-streams.c floor-streams.h \
index bf5af2d..c427e73 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "chest.h"
 #include "trap.h"
+#include "dungeon.h"
 #include "floor.h"
 #include "melee.h"
 #include "object-hook.h"
index 3b59554..abaf2e2 100644 (file)
@@ -45,6 +45,7 @@
 #include "birth.h"
 #include "cmd-pet.h"
 #include "cmd-spell.h"
+#include "dungeon.h"
 #include "world.h"
 #include "player-effects.h"
 #include "player-status.h"
index f7414e3..79b6199 100644 (file)
@@ -30,6 +30,7 @@
 #include "cmd-pet.h"
 #include "cmd-basic.h"
 #include "snipe.h"
+#include "dungeon.h"
 #include "floor.h"
 #include "floor-events.h"
 #include "grid.h"
index f402359..6fc1d79 100644 (file)
@@ -9,6 +9,7 @@
 #include "monster.h"
 #include "files.h"
 #include "player-skill.h"
+#include "dungeon.h"
 #include "floor.h"
 #include "bldg.h"
 
diff --git a/src/dungeon.c b/src/dungeon.c
new file mode 100644 (file)
index 0000000..8b2e122
--- /dev/null
@@ -0,0 +1,10 @@
+#include "angband.h"
+#include "dungeon.h"
+
+/*
+ * The dungeon arrays
+ */
+dungeon_type *d_info;
+char *d_name;
+char *d_text;
+
diff --git a/src/dungeon.h b/src/dungeon.h
new file mode 100644 (file)
index 0000000..90a9d84
--- /dev/null
@@ -0,0 +1,59 @@
+#pragma once
+
+/* A structure for the != dungeon types */
+typedef struct dungeon_type dungeon_type;
+struct dungeon_type {
+
+       STR_OFFSET name; /* Name */
+       STR_OFFSET text; /* Description */
+
+       POSITION dy;
+       POSITION dx;
+
+       feat_prob floor[DUNGEON_FEAT_PROB_NUM]; /* Floor probability */
+       feat_prob fill[DUNGEON_FEAT_PROB_NUM];  /* Cave wall probability */
+       FEAT_IDX outer_wall;                        /* Outer wall tile */
+       FEAT_IDX inner_wall;                        /* Inner wall tile */
+       FEAT_IDX stream1;                           /* stream tile */
+       FEAT_IDX stream2;                           /* stream tile */
+
+       DEPTH mindepth;         /* Minimal depth */
+       DEPTH maxdepth;         /* Maximal depth */
+       PLAYER_LEVEL min_plev;         /* Minimal plev needed to enter -- it's an anti-cheating mesure */
+       BIT_FLAGS16 pit;
+       BIT_FLAGS16 nest;
+       BIT_FLAGS8 mode; /* Mode of combinaison of the monster flags */
+
+       int min_m_alloc_level;  /* Minimal number of monsters per level */
+       int max_m_alloc_chance; /* There is a 1/max_m_alloc_chance chance per round of creating a new monster */
+
+       BIT_FLAGS flags1;               /* Flags 1 */
+
+       BIT_FLAGS mflags1;              /* The monster flags that are allowed */
+       BIT_FLAGS mflags2;
+       BIT_FLAGS mflags3;
+       BIT_FLAGS mflags4;
+       BIT_FLAGS mflags7;
+       BIT_FLAGS mflags8;
+       BIT_FLAGS mflags9;
+       BIT_FLAGS mflagsr;
+
+       BIT_FLAGS m_a_ability_flags1;
+       BIT_FLAGS m_a_ability_flags2;
+       BIT_FLAGS m_a_ability_flags3;
+       BIT_FLAGS m_a_ability_flags4;
+
+       char r_char[5];         /* Monster race allowed */
+       KIND_OBJECT_IDX final_object;   /* The object you'll find at the bottom */
+       ARTIFACT_IDX final_artifact;    /* The artifact you'll find at the bottom */
+       MONRACE_IDX final_guardian;     /* The artifact's guardian. If an artifact is specified, then it's NEEDED */
+
+       PROB special_div;       /* % of monsters affected by the flags/races allowed, to add some variety */
+       int tunnel_percent;
+       int obj_great;
+       int obj_good;
+};
+
+extern dungeon_type *d_info;
+extern char *d_name;
+extern char *d_text;
\ No newline at end of file
index 719d442..2e36370 100644 (file)
@@ -262,9 +262,7 @@ extern char *e_text;
 extern monster_race *r_info;
 extern char *r_name;
 extern char *r_text;
-extern dungeon_type *d_info;
-extern char *d_name;
-extern char *d_text;
+
 extern concptr ANGBAND_SYS;
 extern concptr ANGBAND_KEYBOARD;
 extern concptr ANGBAND_GRAF;
index dd903aa..51a369b 100644 (file)
@@ -48,6 +48,7 @@
 #include "monster-spell.h"
 #include "player-skill.h"
 #include "floor.h"
+#include "dungeon.h"
 
 
 /*
index 395bf96..5e420b7 100644 (file)
@@ -1,6 +1,7 @@
 #include "angband.h"
 #include "util.h"
 
+#include "dungeon.h"
 #include "floor.h"
 #include "floor-events.h"
 #include "grid.h"
index a971c2d..9f970d8 100644 (file)
 
 #include "grid.h"
 #include "rooms.h"
+#include "dungeon.h"
 #include "floor.h"
 #include "floor-save.h"
 #include "floor-streams.h"
index b2dde05..6809d82 100644 (file)
@@ -14,6 +14,7 @@
 #include "util.h"
 
 #include "artifact.h"
+#include "dungeon.h"
 #include "floor.h"
 #include "floor-events.h"
 #include "floor-generate.h"
index 56cb268..1eb85b8 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "artifact.h"
 #include "floor-generate.h"
+#include "dungeon.h"
 #include "floor.h"
 #include "floor-streams.h"
 #include "grid.h"
index 9ca30ce..e619d70 100644 (file)
@@ -24,6 +24,7 @@
 #include "world.h"
 #include "object-flavor.h"
 #include "object-hook.h"
+#include "dungeon.h"
 #include "floor-generate.h"
 #include "grid.h"
 #include "trap.h"
index e3e805c..c8e428a 100644 (file)
@@ -47,6 +47,7 @@
 #include "files.h"
 #include "feature.h"
 #include "floor.h"
+#include "dungeon.h"
 
 #ifndef MACINTOSH
 #ifdef CHECK_MODIFICATION_TIME
index e3b8b7d..53cbec1 100644 (file)
@@ -44,6 +44,7 @@
 #include "util.h"
 #include "bldg.h"
 
+#include "dungeon.h"
 #include "feature.h"
 #include "floor-generate.h"
 #include "trap.h"
index f6df731..018b73c 100644 (file)
@@ -27,7 +27,9 @@
 #include "object-hook.h"
 #include "grid.h"
 #include "player-move.h"
+#include "dungeon.h"
 #include "floor.h"
+#include "dungeon.h"
 #include "spells.h"
 #include "files.h"
 #include "player-effects.h"
index 2f80d96..d97c795 100644 (file)
@@ -32,6 +32,7 @@
 #include "monster-spell.h"
 #include "monster-process.h"
 #include "monsterrace-hook.h"
+#include "dungeon.h"
 #include "floor.h"
 #include "files.h"
 
index d025eaa..4afe04f 100644 (file)
@@ -1,6 +1,7 @@
 #include "angband.h"
 #include "util.h"
 
+#include "dungeon.h"
 #include "floor.h"
 #include "grid.h"
 #include "monster.h"
index 7946b21..734e115 100644 (file)
@@ -27,6 +27,7 @@
 #include "avatar.h"
 #include "wild.h"
 #include "spells.h"
+#include "dungeon.h"
 
 
 /*
index 612cced..0bc5a70 100644 (file)
@@ -14,6 +14,7 @@
 #include "util.h"
 
 #include "cmd-pet.h"
+#include "dungeon.h"
 #include "floor.h"
 #include "object-flavor.h"
 #include "monsterrace-hook.h"
index 63857a6..708bffb 100644 (file)
@@ -5,6 +5,7 @@
 #include "monster.h"
 #include "monster-spell.h"
 #include "floor.h"
+#include "dungeon.h"
 
 /*! 通常pit生成時のモンスターの構成条件ID / Race index for "monster pit (clone)" */
 int vault_aux_race;
index cafd043..d7032cb 100644 (file)
@@ -42,6 +42,7 @@
 #include "util.h"
 
 #include "floor.h"
+#include "dungeon.h"
 #include "grid.h"
 #include "object-curse.h"
 #include "quest.h"
index 3502be0..eca46bf 100644 (file)
@@ -24,6 +24,7 @@
 #include "monster-status.h"
 #include "monster-spell.h"
 #include "spells.h"
+#include "dungeon.h"
 
 /*!
  * @brief モンスターが敵対モンスターにビームを当てること可能かを判定する /
index 721f042..47f7b29 100644 (file)
@@ -17,6 +17,7 @@
 #include "object.h"
 
 #include "spells.h"
+#include "dungeon.h"
 #include "floor.h"
 #include "grid.h"
 #include "object-boost.h"
index 72e14b4..4c9682a 100644 (file)
 #include "angband.h"
 #include "util.h"
 
+#include "dungeon.h"
 #include "floor.h"
 #include "melee.h"
 #include "grid.h"
index 4a8c55e..8e20919 100644 (file)
@@ -21,6 +21,7 @@
 #include "realm-hex.h"
 #include "cmd-pet.h"
 #include "cmd-spell.h"
+#include "dungeon.h"
 
 /*!
  * @var horror_desc
index 70bea47..351c709 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "cmd-spell.h"
 #include "cmd-basic.h"
+#include "dungeon.h"
 #include "floor.h"
 #include "melee.h"
 #include "monsterrace-hook.h"
index 7abfa5d..6cd9d08 100644 (file)
@@ -4,6 +4,7 @@
 #include "rooms.h"
 #include "rooms-normal.h"
 #include "floor.h"
+#include "dungeon.h"
 
 /*!
 * @brief タイプ9の部屋…フラクタルカーブによる洞窟生成 / Type 9 -- Driver routine to create fractal current_floor_ptr->grid_array system
index 64fb5f8..aebe57e 100644 (file)
@@ -3,6 +3,7 @@
 #include "trap.h"
 
 #include "floor.h"
+#include "dungeon.h"
 #include "rooms.h"
 
 
index b06a5c9..1e922f5 100644 (file)
@@ -10,6 +10,7 @@
 #include "sort.h"
 #include "floor.h"
 #include "feature.h"
+#include "dungeon.h"
 
 
 
index 1e7f0b6..f867c36 100644 (file)
@@ -9,6 +9,7 @@
 #include "objectkind-hook.h"
 #include "feature.h"
 #include "floor.h"
+#include "dungeon.h"
 
 
 /*!
index 3fcfd3b..1387e3c 100644 (file)
@@ -6,6 +6,7 @@
 #include "rooms.h"
 #include "floor.h"
 #include "feature.h"
+#include "dungeon.h"
 
 
 /*!
index df5d809..c8bb401 100644 (file)
@@ -9,6 +9,7 @@
 #include "monster.h"
 #include "feature.h"
 #include "floor.h"
+#include "dungeon.h"
 
 /*
 * This function creates a random vault that looks like a collection of bubbles.
index 060ffd5..a31fb66 100644 (file)
@@ -42,6 +42,7 @@
 #include "feature.h"
 #include "floor.h"
 #include "floor-generate.h"
+#include "dungeon.h"
 #include "grid.h"
 #include "rooms.h"
 
index 5f6824c..1f887e6 100644 (file)
@@ -4,6 +4,7 @@
 #include "files.h"
 #include "object-flavor.h"
 #include "artifact.h"
+#include "dungeon.h"
 
 /*
  * Display a rumor and apply its effects
index 4d635e2..4bc6bd9 100644 (file)
@@ -1,6 +1,7 @@
 #include "angband.h"
 #include "util.h"
 
+#include "dungeon.h"
 #include "floor.h"
 #include "spells-floor.h"
 #include "grid.h"
index da0020c..165902a 100644 (file)
@@ -47,6 +47,7 @@
 #include "grid.h"
 #include "feature.h"
 #include "view-mainwindow.h"
+#include "dungeon.h"
 
 
 static int rakubadam_m; /*!< 振り落とされた際のダメージ量 */
index e7830c3..f2af2d7 100644 (file)
@@ -39,6 +39,7 @@
 #include "player-effects.h"
 #include "player-skill.h"
 
+#include "dungeon.h"
 #include "floor-events.h"
 #include "feature.h"
 #include "view-mainwindow.h"
index d54c9fe..795dae9 100644 (file)
@@ -15,6 +15,7 @@
 #include "bldg.h"
 #include "util.h"
 
+#include "dungeon.h"
 #include "floor.h"
 #include "object-boost.h"
 #include "object-flavor.h"
index 6392bb1..2af2dbd 100644 (file)
@@ -16,6 +16,7 @@
 #include "floor-save.h"
 #include "init.h"
 #include "files.h"
+#include "dungeon.h"
 
 static s16b normal_traps[MAX_NORMAL_TRAPS];
 
index ac060fb..2b41d33 100644 (file)
@@ -1850,61 +1850,6 @@ typedef struct
 feat_prob;
 
 
-/* A structure for the != dungeon types */
-typedef struct dungeon_type dungeon_type;
-struct dungeon_type {
-
-       STR_OFFSET name; /* Name */
-       STR_OFFSET text; /* Description */
-
-       POSITION dy;
-       POSITION dx;
-
-       feat_prob floor[DUNGEON_FEAT_PROB_NUM]; /* Floor probability */
-       feat_prob fill[DUNGEON_FEAT_PROB_NUM];  /* Cave wall probability */
-       FEAT_IDX outer_wall;                        /* Outer wall tile */
-       FEAT_IDX inner_wall;                        /* Inner wall tile */
-       FEAT_IDX stream1;                           /* stream tile */
-       FEAT_IDX stream2;                           /* stream tile */
-
-       DEPTH mindepth;         /* Minimal depth */
-       DEPTH maxdepth;         /* Maximal depth */
-       PLAYER_LEVEL min_plev;         /* Minimal plev needed to enter -- it's an anti-cheating mesure */
-       BIT_FLAGS16 pit;
-       BIT_FLAGS16 nest;
-       BIT_FLAGS8 mode; /* Mode of combinaison of the monster flags */
-
-       int min_m_alloc_level;  /* Minimal number of monsters per level */
-       int max_m_alloc_chance; /* There is a 1/max_m_alloc_chance chance per round of creating a new monster */
-
-       BIT_FLAGS flags1;               /* Flags 1 */
-
-       BIT_FLAGS mflags1;              /* The monster flags that are allowed */
-       BIT_FLAGS mflags2;
-       BIT_FLAGS mflags3;
-       BIT_FLAGS mflags4;
-       BIT_FLAGS mflags7;
-       BIT_FLAGS mflags8;
-       BIT_FLAGS mflags9;
-       BIT_FLAGS mflagsr;
-
-       BIT_FLAGS m_a_ability_flags1;
-       BIT_FLAGS m_a_ability_flags2;
-       BIT_FLAGS m_a_ability_flags3;
-       BIT_FLAGS m_a_ability_flags4;
-
-       char r_char[5];         /* Monster race allowed */
-       KIND_OBJECT_IDX final_object;   /* The object you'll find at the bottom */
-       ARTIFACT_IDX final_artifact;    /* The artifact you'll find at the bottom */
-       MONRACE_IDX final_guardian;     /* The artifact's guardian. If an artifact is specified, then it's NEEDED */
-
-       PROB special_div;       /* % of monsters affected by the flags/races allowed, to add some variety */
-       int tunnel_percent;
-       int obj_great;
-       int obj_good;
-};
-
-
 /*!
  * @struct autopick_type
  * @brief 自動拾い/破壊設定データの構造体 / A structure type for entry of auto-picker/destroyer
index 05067bb..efecdd9 100644 (file)
@@ -579,15 +579,6 @@ monster_race *r_info;
 char *r_name;
 char *r_text;
 
-
-/*
- * The dungeon arrays
- */
-dungeon_type *d_info;
-char *d_name;
-char *d_text;
-
-
 concptr ANGBAND_SYS = "xxx"; //!< Hack -- The special Angband "System Suffix" This variable is used to choose an appropriate "pref-xxx" file
 
 
index 4363571..5e7c596 100644 (file)
@@ -28,6 +28,7 @@
 #include "object-flavor.h"
 
 #include "grid.h"
+#include "dungeon.h"
 #include "floor.h"
 #include "feature.h"
 
index f6cfa12..753578f 100644 (file)
@@ -13,6 +13,7 @@
 #include "monster-spell.h"
 #include "spells.h"
 #include "object-flavor.h"
+#include "dungeon.h"
 
 /*!
  * @brief 警告を放つアイテムを選択する /
index 91f4691..0d0ed6a 100644 (file)
@@ -13,6 +13,7 @@
 #include "angband.h"
 #include "util.h"
 
+#include "dungeon.h"
 #include "floor.h"
 #include "wild.h"
 #include "world.h"
index dbcb8a4..08fcadb 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include "angband.h"
+#include "dungeon.h"
 #include "util.h"
 #include "birth.h"
 #include "selfinfo.h"
index f6d6c79..ff18872 100644 (file)
@@ -33,6 +33,7 @@
 #include "view-mainwindow.h"
 #include "feature.h"
 #include "quest.h"
+#include "dungeon.h"
 
 /*!
  * @brief コンソール上におけるマップ表示の左上位置を返す /