• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision17b6db6ef65d189bc7268f67dfebae805242fbca (tree)
Time2019-04-15 23:22:04
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 ダンジョンに関するマクロ定義を floor.h に移動。

Change Summary

Incremental Difference

--- a/src/birth.c
+++ b/src/birth.c
@@ -22,6 +22,7 @@
2222 #include "spells.h"
2323 #include "spells-status.h"
2424 #include "wild.h"
25+#include "floor.h"
2526
2627 /*!
2728 * オートローラーの内容を描画する間隔 /
--- a/src/bldg.c
+++ b/src/bldg.c
@@ -31,6 +31,7 @@
3131 #include "rumor.h"
3232 #include "player-status.h"
3333 #include "spells-status.h"
34+#include "realm-hex.h"
3435
3536 /*!
3637 * @brief 闘技場のモンスターID及び報酬アイテムテーブル
--- a/src/cmd4.c
+++ b/src/cmd4.c
@@ -52,6 +52,7 @@
5252 #include "object-hook.h"
5353 #include "monster.h"
5454 #include "monster-status.h"
55+#include "floor.h"
5556
5657
5758 /*
--- a/src/defines.h
+++ b/src/defines.h
@@ -4095,72 +4095,8 @@ extern int PlayerUID;
40954095 #define ESSENCE_SLAY_GLOVE (MIN_SPECIAL_ESSENCE + 11)
40964096
40974097
4098-#define DUNGEON_MODE_NONE 0
4099-#define DUNGEON_MODE_AND 1
4100-#define DUNGEON_MODE_NAND 2
4101-#define DUNGEON_MODE_OR 3
4102-#define DUNGEON_MODE_NOR 4
4103-
4104-/*** Dungeon type flags -- DG ***/
4105-#define DF1_WINNER 0x00000001L
4106-#define DF1_MAZE 0x00000002L
4107-#define DF1_SMALLEST 0x00000004L
4108-#define DF1_BEGINNER 0x00000008L
4109-#define DF1_BIG 0x00000010L
4110-#define DF1_NO_DOORS 0x00000020L
4111-#define DF1_WATER_RIVER 0x00000040L
4112-#define DF1_LAVA_RIVER 0x00000080L
4113-#define DF1_CURTAIN 0x00000100L
4114-#define DF1_GLASS_DOOR 0x00000200L
4115-#define DF1_CAVE 0x00000400L
4116-#define DF1_CAVERN 0x00000800L
4117-#define DF1_ARCADE 0x00001000L
4118-#define DF1_LAKE_ACID 0x00002000L
4119-#define DF1_LAKE_POISONOUS 0x00004000L
4120-#define DF1_XXX15 0x00008000L
4121-#define DF1_FORGET 0x00010000L
4122-#define DF1_LAKE_WATER 0x00020000L
4123-#define DF1_LAKE_LAVA 0x00040000L
4124-#define DF1_LAKE_RUBBLE 0x00080000L
4125-#define DF1_LAKE_TREE 0x00100000L
4126-#define DF1_NO_VAULT 0x00200000L
4127-#define DF1_ARENA 0x00400000L
4128-#define DF1_DESTROY 0x00800000L
4129-#define DF1_GLASS_ROOM 0x01000000L
4130-#define DF1_NO_CAVE 0x02000000L
4131-#define DF1_NO_MAGIC 0x04000000L
4132-#define DF1_NO_MELEE 0x08000000L
4133-#define DF1_CHAMELEON 0x10000000L
4134-#define DF1_DARKNESS 0x20000000L
4135-#define DF1_ACID_RIVER 0x40000000L
4136-#define DF1_POISONOUS_RIVER 0x80000000L
4137-
4138-#define DF1_LAKE_MASK (DF1_LAKE_WATER | DF1_LAKE_LAVA | DF1_LAKE_RUBBLE | DF1_LAKE_TREE | DF1_LAKE_POISONOUS | DF1_LAKE_ACID)
4139-
4140-#define DUNGEON_ANGBAND 1
4141-#define DUNGEON_GALGALS 2
4142-#define DUNGEON_ORC 3
4143-#define DUNGEON_MAZE 4
4144-#define DUNGEON_DRAGON 5
4145-#define DUNGEON_GRAVE 6
4146-#define DUNGEON_WOOD 7
4147-#define DUNGEON_VOLCANO 8
4148-#define DUNGEON_HELL 9
4149-#define DUNGEON_HEAVEN 10
4150-#define DUNGEON_OCEAN 11
4151-#define DUNGEON_CASTLE 12
4152-#define DUNGEON_CTH 13
4153-#define DUNGEON_MOUNTAIN 14
4154-#define DUNGEON_GOLD 15
4155-#define DUNGEON_NO_MAGIC 16
4156-#define DUNGEON_NO_MELEE 17
4157-#define DUNGEON_CHAMELEON 18
4158-#define DUNGEON_DARKNESS 19
4159-
4160-
41614098 #define DUNGEON_FEAT_PROB_NUM 3
41624099
4163-
41644100 /*
41654101 * Flags for save/load temporal saved floor file
41664102 */
@@ -4347,43 +4283,6 @@ extern int PlayerUID;
43474283 #define HEX_REVENGE_TURN(P_PTR) ((P_PTR)->magic_num2[2])
43484284 #define HEX_REVENGE_TYPE(P_PTR) ((P_PTR)->magic_num2[1])
43494285
4350-/* 1st book */
4351-#define HEX_BLESS 0
4352-#define HEX_CURE_LIGHT 1
4353-#define HEX_DEMON_AURA 2
4354-#define HEX_STINKING_MIST 3
4355-#define HEX_XTRA_MIGHT 4
4356-#define HEX_CURSE_WEAPON 5
4357-#define HEX_DETECT_EVIL 6
4358-#define HEX_PATIENCE 7
4359-/* 2nd book */
4360-#define HEX_ICE_ARMOR 8
4361-#define HEX_CURE_SERIOUS 9
4362-#define HEX_INHAIL 10
4363-#define HEX_VAMP_MIST 11
4364-#define HEX_RUNESWORD 12
4365-#define HEX_CONFUSION 13
4366-#define HEX_BUILDING 14
4367-#define HEX_ANTI_TELE 15
4368-/* 3rd book */
4369-#define HEX_SHOCK_CLOAK 16
4370-#define HEX_CURE_CRITICAL 17
4371-#define HEX_RECHARGE 18
4372-#define HEX_RAISE_DEAD 19
4373-#define HEX_CURSE_ARMOUR 20
4374-#define HEX_SHADOW_CLOAK 21
4375-#define HEX_PAIN_TO_MANA 22
4376-#define HEX_EYE_FOR_EYE 23
4377-/* 4th book */
4378-#define HEX_ANTI_MULTI 24
4379-#define HEX_RESTORE 25
4380-#define HEX_DRAIN_CURSE 26
4381-#define HEX_VAMP_BLADE 27
4382-#define HEX_STUN_MONSTERS 28
4383-#define HEX_SHADOW_MOVE 29
4384-#define HEX_ANTI_MAGIC 30
4385-#define HEX_REVENGE 31
4386-
43874286 /*
43884287 Language selection macro
43894288 */
--- a/src/files.c
+++ b/src/files.c
@@ -28,6 +28,7 @@
2828 #include "monster.h"
2929 #include "monster-status.h"
3030 #include "object-hook.h"
31+#include "realm-hex.h"
3132
3233
3334 /*
--- a/src/floor.h
+++ b/src/floor.h
@@ -1,4 +1,66 @@
11 
2+#define DUNGEON_MODE_NONE 0
3+#define DUNGEON_MODE_AND 1
4+#define DUNGEON_MODE_NAND 2
5+#define DUNGEON_MODE_OR 3
6+#define DUNGEON_MODE_NOR 4
7+
8+/*** Dungeon type flags -- DG ***/
9+#define DF1_WINNER 0x00000001L
10+#define DF1_MAZE 0x00000002L
11+#define DF1_SMALLEST 0x00000004L
12+#define DF1_BEGINNER 0x00000008L
13+#define DF1_BIG 0x00000010L
14+#define DF1_NO_DOORS 0x00000020L
15+#define DF1_WATER_RIVER 0x00000040L
16+#define DF1_LAVA_RIVER 0x00000080L
17+#define DF1_CURTAIN 0x00000100L
18+#define DF1_GLASS_DOOR 0x00000200L
19+#define DF1_CAVE 0x00000400L
20+#define DF1_CAVERN 0x00000800L
21+#define DF1_ARCADE 0x00001000L
22+#define DF1_LAKE_ACID 0x00002000L
23+#define DF1_LAKE_POISONOUS 0x00004000L
24+#define DF1_XXX15 0x00008000L
25+#define DF1_FORGET 0x00010000L
26+#define DF1_LAKE_WATER 0x00020000L
27+#define DF1_LAKE_LAVA 0x00040000L
28+#define DF1_LAKE_RUBBLE 0x00080000L
29+#define DF1_LAKE_TREE 0x00100000L
30+#define DF1_NO_VAULT 0x00200000L
31+#define DF1_ARENA 0x00400000L
32+#define DF1_DESTROY 0x00800000L
33+#define DF1_GLASS_ROOM 0x01000000L
34+#define DF1_NO_CAVE 0x02000000L
35+#define DF1_NO_MAGIC 0x04000000L
36+#define DF1_NO_MELEE 0x08000000L
37+#define DF1_CHAMELEON 0x10000000L
38+#define DF1_DARKNESS 0x20000000L
39+#define DF1_ACID_RIVER 0x40000000L
40+#define DF1_POISONOUS_RIVER 0x80000000L
41+
42+#define DF1_LAKE_MASK (DF1_LAKE_WATER | DF1_LAKE_LAVA | DF1_LAKE_RUBBLE | DF1_LAKE_TREE | DF1_LAKE_POISONOUS | DF1_LAKE_ACID)
43+
44+#define DUNGEON_ANGBAND 1
45+#define DUNGEON_GALGALS 2
46+#define DUNGEON_ORC 3
47+#define DUNGEON_MAZE 4
48+#define DUNGEON_DRAGON 5
49+#define DUNGEON_GRAVE 6
50+#define DUNGEON_WOOD 7
51+#define DUNGEON_VOLCANO 8
52+#define DUNGEON_HELL 9
53+#define DUNGEON_HEAVEN 10
54+#define DUNGEON_OCEAN 11
55+#define DUNGEON_CASTLE 12
56+#define DUNGEON_CTH 13
57+#define DUNGEON_MOUNTAIN 14
58+#define DUNGEON_GOLD 15
59+#define DUNGEON_NO_MAGIC 16
60+#define DUNGEON_NO_MELEE 17
61+#define DUNGEON_CHAMELEON 18
62+#define DUNGEON_DARKNESS 19
63+
264 /*
365 * Flags for change floor mode
466 */
--- a/src/load.c
+++ b/src/load.c
@@ -55,6 +55,7 @@
5555 #include "patron.h"
5656
5757 #include "floor-save.h"
58+#include "floor.h"
5859
5960
6061 /*
--- a/src/melee1.c
+++ b/src/melee1.c
@@ -26,6 +26,7 @@
2626 #include "object-hook.h"
2727 #include "grid.h"
2828 #include "player-move.h"
29+#include "floor.h"
2930
3031
3132
--- a/src/player-status.c
+++ b/src/player-status.c
@@ -11,6 +11,7 @@
1111 #include "monsterrace-hook.h"
1212 #include "mutation.h"
1313 #include "patron.h"
14+#include "realm-hex.h"
1415
1516 /* Hack, monk armour */
1617 static bool monk_armour_aux;
--- a/src/realm-hex.c
+++ b/src/realm-hex.c
@@ -23,6 +23,7 @@
2323 #include "object-curse.h"
2424 #include "spells-status.h"
2525 #include "player-status.h"
26+#include "realm-hex.h"
2627
2728 #define MAX_KEEP 4 /*!<呪術の最大詠唱数 */
2829
--- a/src/realm-hex.h
+++ b/src/realm-hex.h
@@ -2,6 +2,43 @@
22 * @file realm-hex.h
33 */
44
5+ /* 1st book */
6+#define HEX_BLESS 0
7+#define HEX_CURE_LIGHT 1
8+#define HEX_DEMON_AURA 2
9+#define HEX_STINKING_MIST 3
10+#define HEX_XTRA_MIGHT 4
11+#define HEX_CURSE_WEAPON 5
12+#define HEX_DETECT_EVIL 6
13+#define HEX_PATIENCE 7
14+/* 2nd book */
15+#define HEX_ICE_ARMOR 8
16+#define HEX_CURE_SERIOUS 9
17+#define HEX_INHAIL 10
18+#define HEX_VAMP_MIST 11
19+#define HEX_RUNESWORD 12
20+#define HEX_CONFUSION 13
21+#define HEX_BUILDING 14
22+#define HEX_ANTI_TELE 15
23+/* 3rd book */
24+#define HEX_SHOCK_CLOAK 16
25+#define HEX_CURE_CRITICAL 17
26+#define HEX_RECHARGE 18
27+#define HEX_RAISE_DEAD 19
28+#define HEX_CURSE_ARMOUR 20
29+#define HEX_SHADOW_CLOAK 21
30+#define HEX_PAIN_TO_MANA 22
31+#define HEX_EYE_FOR_EYE 23
32+/* 4th book */
33+#define HEX_ANTI_MULTI 24
34+#define HEX_RESTORE 25
35+#define HEX_DRAIN_CURSE 26
36+#define HEX_VAMP_BLADE 27
37+#define HEX_STUN_MONSTERS 28
38+#define HEX_SHADOW_MOVE 29
39+#define HEX_ANTI_MAGIC 30
40+#define HEX_REVENGE 31
41+
542 extern bool stop_hex_spell_all(void);
643 extern bool stop_hex_spell(void);
744 extern void check_hex(void);
@@ -12,3 +49,4 @@ extern bool teleport_barrier(MONSTER_IDX m_idx);
1249 extern bool magic_barrier(MONSTER_IDX m_idx);
1350 extern bool multiply_barrier(MONSTER_IDX m_idx);
1451 extern concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode);
52+
--- a/src/report.c
+++ b/src/report.c
@@ -7,6 +7,7 @@
77
88 #define _GNU_SOURCE /*!< 未使用*/
99 #include "angband.h"
10+#include "floor.h"
1011
1112 #ifdef WORLD_SCORE
1213
--- a/src/rooms-fractal.c
+++ b/src/rooms-fractal.c
@@ -3,6 +3,7 @@
33 #include "generate.h"
44 #include "rooms.h"
55 #include "rooms-normal.h"
6+#include "floor.h"
67
78 /*!
89 * @brief タイプ9の部屋…フラクタルカーブによる洞窟生成 / Type 9 -- Driver routine to create fractal current_floor_ptr->grid_array system
--- a/src/rooms-normal.c
+++ b/src/rooms-normal.c
@@ -2,6 +2,7 @@
22 #include "grid.h"
33 #include "trap.h"
44
5+#include "floor.h"
56 #include "rooms.h"
67
78
--- a/src/rooms-pitnest.c
+++ b/src/rooms-pitnest.c
@@ -6,6 +6,7 @@
66 #include "monster.h"
77 #include "monsterrace-hook.h"
88 #include "sort.h"
9+#include "floor.h"
910
1011
1112
--- a/src/rooms-special.c
+++ b/src/rooms-special.c
@@ -6,6 +6,7 @@
66 #include "monsterrace-hook.h"
77 #include "objectkind-hook.h"
88 #include "feature.h"
9+#include "floor.h"
910
1011
1112 /*!
--- a/src/rooms-trap.c
+++ b/src/rooms-trap.c
@@ -2,6 +2,7 @@
22 #include "grid.h"
33 #include "generate.h"
44 #include "rooms.h"
5+#include "floor.h"
56
67
78 /*!
--- a/src/selfinfo.c
+++ b/src/selfinfo.c
@@ -17,6 +17,7 @@
1717 #include "angband.h"
1818 #include "player-status.h"
1919 #include "avatar.h"
20+#include "realm-hex.h"
2021
2122 /*!
2223 * @brief 自己分析処理(Nethackからのアイデア) / self-knowledge... idea from nethack.
--- a/src/view-mainwindow.c
+++ b/src/view-mainwindow.c
@@ -17,6 +17,7 @@
1717 #include "avatar.h"
1818 #include "player-status.h"
1919 #include "monster.h"
20+#include "realm-hex.h"
2021
2122 /*
2223 * Some screen locations for various display routines
Show on old repository browser