• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisioncfe654ae13c779d29f605de80a74edc57535614f (tree)
Time2019-06-01 18:19:06
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 職業ID定義を player-class.h へ移動.

Change Summary

Incremental Difference

--- a/src/artifact.c
+++ b/src/artifact.c
@@ -31,6 +31,7 @@
3131 #include "grid.h"
3232 #include "monster.h"
3333 #include "view-mainwindow.h"
34+#include "player-class.h"
3435
3536 /*
3637 * The artifact arrays
--- a/src/avatar.c
+++ b/src/avatar.c
@@ -17,6 +17,7 @@
1717 #include "avatar.h"
1818 #include "realm.h"
1919 #include "player-race.h"
20+#include "player-class.h"
2021
2122 /*!
2223 * 徳の名称 / The names of the virtues
--- a/src/bldg.c
+++ b/src/bldg.c
@@ -41,14 +41,15 @@
4141 #include "artifact.h"
4242 #include "cmd-spell.h"
4343 #include "rumor.h"
44-#include "player-status.h"
4544 #include "spells.h"
4645 #include "spells-status.h"
4746 #include "realm-hex.h"
4847 #include "dungeon-file.h"
4948
5049 #include "files.h"
50+#include "player-status.h"
5151 #include "player-effects.h"
52+#include "player-class.h"
5253 #include "scores.h"
5354 #include "shoot.h"
5455 #include "view-mainwindow.h"
--- a/src/chest.c
+++ b/src/chest.c
@@ -8,6 +8,7 @@
88 #include "trap.h"
99 #include "player-status.h"
1010 #include "player-effects.h"
11+#include "player-class.h"
1112 #include "grid.h"
1213 #include "realm-song.h"
1314
--- a/src/cmd-activate.c
+++ b/src/cmd-activate.c
@@ -32,6 +32,7 @@
3232 #include "targeting.h"
3333 #include "realm-song.h"
3434 #include "player-race.h"
35+#include "player-class.h"
3536 #include "view-mainwindow.h"
3637
3738 /*!
--- a/src/cmd-basic.c
+++ b/src/cmd-basic.c
@@ -40,6 +40,7 @@
4040 #include "feature.h"
4141 #include "player-move.h"
4242 #include "player-effects.h"
43+#include "player-class.h"
4344 #include "objectkind.h"
4445 #include "object-broken.h"
4546 #include "object-flavor.h"
--- a/src/cmd-eat.c
+++ b/src/cmd-eat.c
@@ -18,6 +18,7 @@
1818 #include "player-status.h"
1919 #include "player-effects.h"
2020 #include "player-race.h"
21+#include "player-class.h"
2122 #include "floor.h"
2223 #include "objectkind.h"
2324 #include "realm.h"
--- a/src/cmd-item.c
+++ b/src/cmd-item.c
@@ -37,6 +37,7 @@
3737 #include "avatar.h"
3838 #include "player-status.h"
3939 #include "player-effects.h"
40+#include "player-class.h"
4041 #include "monster.h"
4142 #include "view-mainwindow.h"
4243 #include "spells.h"
--- a/src/cmd-quaff.c
+++ b/src/cmd-quaff.c
@@ -27,6 +27,7 @@
2727 #include "floor.h"
2828 #include "objectkind.h"
2929 #include "view-mainwindow.h"
30+#include "player-class.h"
3031
3132 /*!
3233 * @brief 薬を飲むコマンドのサブルーチン /
--- a/src/cmd-read.c
+++ b/src/cmd-read.c
@@ -15,6 +15,7 @@
1515 #include "avatar.h"
1616 #include "player-status.h"
1717 #include "player-effects.h"
18+#include "player-class.h"
1819 #include "rumor.h"
1920 #include "realm-hex.h"
2021
--- a/src/cmd-usestaff.c
+++ b/src/cmd-usestaff.c
@@ -6,6 +6,7 @@
66 #include "avatar.h"
77 #include "player-status.h"
88 #include "player-effects.h"
9+#include "player-class.h"
910 #include "spells.h"
1011 #include "spells-status.h"
1112 #include "spells-floor.h"
--- a/src/cmd-zaprod.c
+++ b/src/cmd-zaprod.c
@@ -4,6 +4,7 @@
44 #include "avatar.h"
55 #include "player-status.h"
66 #include "player-effects.h"
7+#include "player-class.h"
78 #include "objectkind.h"
89 #include "object-hook.h"
910 #include "spells.h"
--- a/src/cmd-zapwand.c
+++ b/src/cmd-zapwand.c
@@ -6,6 +6,7 @@
66 #include "spells-status.h"
77 #include "player-status.h"
88 #include "player-effects.h"
9+#include "player-class.h"
910 #include "objectkind.h"
1011 #include "object-hook.h"
1112 #include "cmd-basic.h"
--- a/src/defines.h
+++ b/src/defines.h
@@ -181,38 +181,6 @@
181181 #define SEX_MALE 1
182182
183183
184-/*
185- * Player class constants (hard-coded by save-files, arrays, etc)
186- */
187-#define CLASS_WARRIOR 0
188-#define CLASS_MAGE 1
189-#define CLASS_PRIEST 2
190-#define CLASS_ROGUE 3
191-#define CLASS_RANGER 4
192-#define CLASS_PALADIN 5
193-#define CLASS_WARRIOR_MAGE 6
194-#define CLASS_CHAOS_WARRIOR 7
195-#define CLASS_MONK 8
196-#define CLASS_MINDCRAFTER 9
197-#define CLASS_HIGH_MAGE 10
198-#define CLASS_TOURIST 11
199-#define CLASS_IMITATOR 12
200-#define CLASS_BEASTMASTER 13
201-#define CLASS_SORCERER 14
202-#define CLASS_ARCHER 15
203-#define CLASS_MAGIC_EATER 16
204-#define CLASS_BARD 17
205-#define CLASS_RED_MAGE 18
206-#define CLASS_SAMURAI 19
207-#define CLASS_FORCETRAINER 20
208-#define CLASS_BLUE_MAGE 21
209-#define CLASS_CAVALRY 22
210-#define CLASS_BERSERKER 23
211-#define CLASS_SMITH 24
212-#define CLASS_MIRROR_MASTER 25
213-#define CLASS_NINJA 26
214-#define CLASS_SNIPER 27
215-
216184 #define SEIKAKU_FUTUU 0
217185 #define SEIKAKU_CHIKARA 1
218186 #define SEIKAKU_KIREMONO 2
--- a/src/floor-save.c
+++ b/src/floor-save.c
@@ -32,6 +32,7 @@
3232 #include "cmd-basic.h"
3333 #include "files.h"
3434 #include "player-effects.h"
35+#include "player-class.h"
3536 #include "world.h"
3637 #include "spells.h"
3738 #include "cmd-dump.h"
--- a/src/grid.c
+++ b/src/grid.c
@@ -36,6 +36,7 @@
3636 #include "monster-status.h"
3737 #include "player-status.h"
3838 #include "player-effects.h"
39+#include "player-class.h"
3940 #include "spells.h"
4041 #include "view-mainwindow.h"
4142 #include "realm-song.h"
--- a/src/melee1.c
+++ b/src/melee1.c
@@ -39,6 +39,7 @@
3939 #include "player-damage.h"
4040 #include "player-status.h"
4141 #include "player-race.h"
42+#include "player-class.h"
4243 #include "view-mainwindow.h"
4344 #include "world.h"
4445
--- a/src/monster1.c
+++ b/src/monster1.c
@@ -34,6 +34,7 @@
3434 #include "melee.h"
3535 #include "japanese.h"
3636 #include "view-mainwindow.h"
37+#include "player-class.h"
3738
3839
3940 /*
--- a/src/monster2.c
+++ b/src/monster2.c
@@ -28,6 +28,7 @@
2828 #include "player-move.h"
2929 #include "player-status.h"
3030 #include "player-race.h"
31+#include "player-class.h"
3132 #include "wild.h"
3233 #include "warning.h"
3334 #include "monster-spell.h"
--- a/src/mspells1.c
+++ b/src/mspells1.c
@@ -56,6 +56,7 @@
5656 #include "realm-song.h"
5757 #include "view-mainwindow.h"
5858 #include "player-race.h"
59+#include "player-class.h"
5960
6061
6162 /*!
--- a/src/mspells2.c
+++ b/src/mspells2.c
@@ -20,6 +20,7 @@
2020 #include "quest.h"
2121 #include "realm-hex.h"
2222 #include "player-move.h"
23+#include "player-class.h"
2324 #include "monster.h"
2425 #include "monster-status.h"
2526 #include "monster-spell.h"
--- a/src/mspells4.c
+++ b/src/mspells4.c
@@ -14,6 +14,7 @@
1414 #include "spells-summon.h"
1515 #include "artifact.h"
1616 #include "player-status.h"
17+#include "player-class.h"
1718 #include "realm-hex.h"
1819 #include "player-move.h"
1920 #include "monster-spell.h"
--- a/src/mutation.c
+++ b/src/mutation.c
@@ -23,6 +23,7 @@
2323 #include "avatar.h"
2424 #include "player-status.h"
2525 #include "player-effects.h"
26+#include "player-class.h"
2627 #include "spells-status.h"
2728 #include "object-hook.h"
2829 #include "spells.h"
--- a/src/object-flavor.c
+++ b/src/object-flavor.c
@@ -16,6 +16,7 @@
1616 #include "cmd-smith.h"
1717 #include "artifact.h"
1818 #include "player-status.h"
19+#include "player-class.h"
1920 #include "shoot.h"
2021 #include "objectkind.h"
2122 #include "object-hook.h"
--- a/src/object1.c
+++ b/src/object1.c
@@ -23,6 +23,7 @@
2323 #include "object-flavor.h"
2424 #include "object-hook.h"
2525 #include "player-move.h"
26+#include "player-class.h"
2627 #include "monster.h"
2728 #include "files.h"
2829 #include "term.h"
--- a/src/object2.c
+++ b/src/object2.c
@@ -36,6 +36,7 @@
3636 #include "player-status.h"
3737 #include "player-move.h"
3838 #include "player-effects.h"
39+#include "player-class.h"
3940 #include "monster.h"
4041 #include "monsterrace-hook.h"
4142 #include "object-ego.h"
--- a/src/patron.c
+++ b/src/patron.c
@@ -14,6 +14,7 @@
1414 #include "player-status.h"
1515 #include "player-effects.h"
1616 #include "player-race.h"
17+#include "player-class.h"
1718
1819 #include "spells.h"
1920 #include "spells-summon.h"
--- a/src/player-class.h
+++ b/src/player-class.h
@@ -22,10 +22,43 @@
2222 #define CH_HISSATSU 0x10000
2323 #define CH_HEX 0x20000
2424
25+
26+
27+ /*
28+ * Player class constants (hard-coded by save-files, arrays, etc)
29+ */
30+#define CLASS_WARRIOR 0
31+#define CLASS_MAGE 1
32+#define CLASS_PRIEST 2
33+#define CLASS_ROGUE 3
34+#define CLASS_RANGER 4
35+#define CLASS_PALADIN 5
36+#define CLASS_WARRIOR_MAGE 6
37+#define CLASS_CHAOS_WARRIOR 7
38+#define CLASS_MONK 8
39+#define CLASS_MINDCRAFTER 9
40+#define CLASS_HIGH_MAGE 10
41+#define CLASS_TOURIST 11
42+#define CLASS_IMITATOR 12
43+#define CLASS_BEASTMASTER 13
44+#define CLASS_SORCERER 14
45+#define CLASS_ARCHER 15
46+#define CLASS_MAGIC_EATER 16
47+#define CLASS_BARD 17
48+#define CLASS_RED_MAGE 18
49+#define CLASS_SAMURAI 19
50+#define CLASS_FORCETRAINER 20
51+#define CLASS_BLUE_MAGE 21
52+#define CLASS_CAVALRY 22
53+#define CLASS_BERSERKER 23
54+#define CLASS_SMITH 24
55+#define CLASS_MIRROR_MASTER 25
56+#define CLASS_NINJA 26
57+#define CLASS_SNIPER 27
58+
2559 #define IS_WIZARD_CLASS() \
2660 (p_ptr->pclass == CLASS_MAGE || p_ptr->pclass == CLASS_HIGH_MAGE || p_ptr->pclass == CLASS_SORCERER || p_ptr->pclass == CLASS_MAGIC_EATER || p_ptr->pclass == CLASS_BLUE_MAGE)
2761
28-
2962 /*
3063 * Information about the player's "magic"
3164 *
--- a/src/player-damage.c
+++ b/src/player-damage.c
@@ -9,6 +9,7 @@
99 #include "object-broken.h"
1010 #include "player-status.h"
1111 #include "player-effects.h"
12+#include "player-class.h"
1213 #include "monster-spell.h"
1314 #include "world.h"
1415 #include "view-mainwindow.h"
--- a/src/player-move.c
+++ b/src/player-move.c
@@ -155,6 +155,7 @@
155155 #include "player-move.h"
156156 #include "player-status.h"
157157 #include "player-effects.h"
158+#include "player-class.h"
158159 #include "spells-floor.h"
159160 #include "feature.h"
160161 #include "warning.h"
--- a/src/racial.c
+++ b/src/racial.c
@@ -35,6 +35,7 @@
3535 #include "realm-hex.h"
3636 #include "targeting.h"
3737 #include "view-mainwindow.h"
38+#include "player-class.h"
3839
3940 /*!
4041 * @brief 修行僧の構え設定処理
--- a/src/realm-crusade.c
+++ b/src/realm-crusade.c
@@ -7,6 +7,7 @@
77 #include "spells.h"
88 #include "spells-summon.h"
99 #include "spells-status.h"
10+#include "player-class.h"
1011 #include "player-effects.h"
1112 #include "targeting.h"
1213
--- a/src/realm-trump.c
+++ b/src/realm-trump.c
@@ -7,6 +7,7 @@
77 #include "spells-summon.h"
88 #include "spells-status.h"
99 #include "player-effects.h"
10+#include "player-class.h"
1011 #include "targeting.h"
1112
1213
--- a/src/selfinfo.c
+++ b/src/selfinfo.c
@@ -19,6 +19,7 @@
1919
2020 #include "player-status.h"
2121 #include "player-race.h"
22+#include "player-class.h"
2223 #include "avatar.h"
2324 #include "realm.h"
2425 #include "realm-hex.h"
--- a/src/shoot.c
+++ b/src/shoot.c
@@ -10,6 +10,7 @@
1010 #include "avatar.h"
1111 #include "player-status.h"
1212 #include "player-skill.h"
13+#include "player-class.h"
1314 #include "object-hook.h"
1415 #include "floor.h"
1516 #include "grid.h"
--- a/src/spells-diceroll.c
+++ b/src/spells-diceroll.c
@@ -4,6 +4,7 @@
44
55 #include "monster.h"
66 #include "monsterrace-hook.h"
7+#include "player-class.h"
78 #include "mutation.h"
89 #include "rooms.h"
910
--- a/src/spells-status.c
+++ b/src/spells-status.c
@@ -6,6 +6,7 @@
66 #include "floor.h"
77 #include "object-flavor.h"
88 #include "player-status.h"
9+#include "player-class.h"
910 #include "spells-status.h"
1011 #include "spells.h"
1112 #include "monster.h"
--- a/src/spells1.c
+++ b/src/spells1.c
@@ -24,6 +24,7 @@
2424 #include "player-damage.h"
2525 #include "player-effects.h"
2626 #include "player-race.h"
27+#include "player-class.h"
2728
2829 #include "monster.h"
2930 #include "monster-status.h"
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -43,6 +43,7 @@
4343 #include "player-status.h"
4444 #include "player-effects.h"
4545 #include "player-skill.h"
46+#include "player-class.h"
4647
4748 #include "dungeon.h"
4849 #include "floor-events.h"
--- a/src/store.c
+++ b/src/store.c
@@ -28,6 +28,7 @@
2828 #include "cmd-spell.h"
2929 #include "rumor.h"
3030 #include "player-status.h"
31+#include "player-class.h"
3132 #include "object-flavor.h"
3233 #include "object-hook.h"
3334 #include "floor-events.h"
--- a/src/trap.c
+++ b/src/trap.c
@@ -6,6 +6,7 @@
66 #include "player-damage.h"
77 #include "player-move.h"
88 #include "player-effects.h"
9+#include "player-class.h"
910 #include "spells-summon.h"
1011 #include "quest.h"
1112 #include "artifact.h"
--- a/src/util.c
+++ b/src/util.c
@@ -22,6 +22,7 @@
2222 #include "world.h"
2323 #include "cmd-dump.h"
2424 #include "japanese.h"
25+#include "player-class.h"
2526
2627 /*!
2728 * 10進数から16進数への変換テーブル /
--- a/src/warning.c
+++ b/src/warning.c
@@ -15,6 +15,7 @@
1515 #include "object-flavor.h"
1616 #include "dungeon.h"
1717 #include "player-race.h"
18+#include "player-class.h"
1819 #include "melee.h"
1920 #include "realm-song.h"
2021
--- a/src/wizard2.c
+++ b/src/wizard2.c
@@ -26,6 +26,7 @@
2626 #include "player-status.h"
2727 #include "player-effects.h"
2828 #include "player-skill.h"
29+#include "player-class.h"
2930
3031 #include "spells.h"
3132 #include "spells-object.h"
Show on old repository browser