• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision5a84cc1c7c81b6cf5bdecf739df984aec9a21b94 (tree)
Time2019-05-02 23:18:37
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 kamae 構造体と関連変数を player-effects.c/h へ移動.

Change Summary

Incremental Difference

--- a/src/externs.h
+++ b/src/externs.h
@@ -83,8 +83,6 @@ extern const concptr stat_names_reduced[6];
8383 extern const concptr window_flag_desc[32];
8484
8585 extern const concptr game_inscriptions[];
86-extern const kamae kamae_shurui[MAX_KAMAE];
87-extern const kamae kata_shurui[MAX_KATA];
8886
8987 extern const concptr ident_info[];
9088 extern const byte feature_action_flags[FF_FLAG_MAX];
--- a/src/files.c
+++ b/src/files.c
@@ -29,6 +29,7 @@
2929 #include "player-skill.h"
3030 #include "player-personality.h"
3131 #include "player-sex.h"
32+#include "player-effects.h"
3233 #include "sort.h"
3334 #include "mutation.h"
3435 #include "quest.h"
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -45,6 +45,44 @@
4545 #include "objectkind.h"
4646 #include "autopick.h"
4747
48+
49+ /*!
50+ * @brief 修行僧の構え能力テーブル
51+ */
52+const kamae kamae_shurui[MAX_KAMAE] =
53+{
54+#ifdef JP
55+ {"玄武", 25, ""},
56+ {"白虎", 30, ""},
57+ {"青竜", 35, ""},
58+ {"朱雀", 40, ""},
59+#else
60+ {"Genbu", 25, "(Black Tortoise) "},
61+ {"Byakko", 30, "(White Tiger) "},
62+ {"Seiryuu", 35, "(Blue Dragon) "},
63+ {"Suzaku", 40, "(Red Phoenix) "},
64+#endif
65+};
66+
67+/*!
68+ * @brief 剣術家の構え能力テーブル
69+ */
70+const kamae kata_shurui[MAX_KATA] =
71+{
72+#ifdef JP
73+ {"居合", 25, ""},
74+ {"風塵", 30, ""},
75+ {"降鬼", 35, ""},
76+ {"無想", 40, ""},
77+#else
78+ {"Iai", 25, ""},
79+ {"Huujin", 30, ""},
80+ {"Kouki", 35, ""},
81+ {"Musou", 40, ""},
82+#endif
83+};
84+
85+
4886 /*!
4987 * @brief プレイヤーの継続行動を設定する。
5088 * @param typ 継続行動のID\n
--- a/src/player-effects.h
+++ b/src/player-effects.h
@@ -1,5 +1,14 @@
11 #pragma once
22
3+typedef struct kamae kamae;
4+
5+struct kamae
6+{
7+ concptr desc; /* A verbose kamae description */
8+ PLAYER_LEVEL min_level; /* Minimum level to use */
9+ concptr info;
10+};
11+
312 /* effects.c */
413 extern void set_action(ACTION_IDX typ);
514 extern void reset_tim_flags(void);
@@ -72,3 +81,6 @@ extern bool set_tim_esp(TIME_EFFECT v, bool do_dec);
7281 extern bool set_superstealth(bool set);
7382 extern void do_poly_wounds(void);
7483 extern void change_race(CHARACTER_IDX new_race, concptr effect_msg);
84+
85+extern const kamae kamae_shurui[MAX_KAMAE];
86+extern const kamae kata_shurui[MAX_KATA];
--- a/src/tables.c
+++ b/src/tables.c
@@ -2290,43 +2290,6 @@ const concptr game_inscriptions[] =
22902290 };
22912291
22922292 /*!
2293- * @brief 修行僧の構え能力テーブル
2294- */
2295-const kamae kamae_shurui[MAX_KAMAE] =
2296-{
2297-#ifdef JP
2298- {"玄武", 25, ""},
2299- {"白虎", 30, ""},
2300- {"青竜", 35, ""},
2301- {"朱雀", 40, ""},
2302-#else
2303- {"Genbu", 25, "(Black Tortoise) "},
2304- {"Byakko", 30, "(White Tiger) "},
2305- {"Seiryuu", 35, "(Blue Dragon) "},
2306- {"Suzaku", 40, "(Red Phoenix) "},
2307-#endif
2308-};
2309-
2310-/*!
2311- * @brief 剣術家の構え能力テーブル
2312- */
2313-const kamae kata_shurui[MAX_KATA] =
2314-{
2315-#ifdef JP
2316- {"居合", 25, ""},
2317- {"風塵", 30, ""},
2318- {"降鬼", 35, ""},
2319- {"無想", 40, ""},
2320-#else
2321- {"Iai", 25, ""},
2322- {"Huujin", 30, ""},
2323- {"Kouki", 35, ""},
2324- {"Musou", 40, ""},
2325-#endif
2326-};
2327-
2328-
2329-/*!
23302293 * @brief シンボル解説テーブル /
23312294 * The table of "symbol info" -- each entry is a string of the form "X:desc" where "X" is the trigger, and "desc" is the "info".
23322295 */
--- a/src/types.h
+++ b/src/types.h
@@ -66,20 +66,8 @@ struct magic_type
6666 EXP sexp; /* Encoded experience bonus */
6767 };
6868
69-
70-typedef struct kamae kamae;
71-
72-struct kamae
73-{
74- concptr desc; /* A verbose kamae description */
75- PLAYER_LEVEL min_level; /* Minimum level to use */
76- concptr info;
77-};
78-
79-
8069 typedef bool (*monsterrace_hook_type)(MONRACE_IDX r_idx);
8170
82-
8371 /*
8472 * This seems like a pretty standard "typedef"
8573 */
--- a/src/view-mainwindow.c
+++ b/src/view-mainwindow.c
@@ -22,6 +22,7 @@
2222 #include "player-status.h"
2323 #include "player-class.h"
2424 #include "player-race.h"
25+#include "player-effects.h"
2526 #include "monster.h"
2627 #include "view-mainwindow.h"
2728
Show on old repository browser