• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisiona685ddaef4024f8b830396eb2a77515c2ee3e9fe (tree)
Time2019-05-02 11:11:21
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 birther 構造体と関連変数を birth.h へ移動.

Change Summary

Incremental Difference

--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,7 +23,7 @@ hengband_SOURCES = \
2323 \
2424 dungeon.c dungeon.h \
2525 floor.c floor.h floor-events.c floor-events.h floor-generate.c floor-generate.h \
26- floor-save.h floor-save.c \
26+ floor-save.h floor-save.c floor-town.h floor-town.c \
2727 floor-streams.c floor-streams.h \
2828 \
2929 feature.c feature.h \
--- a/src/birth.c
+++ b/src/birth.c
@@ -39,6 +39,12 @@
3939 #include "monsterrace.h"
4040 #include "autopick.h"
4141
42+ /*
43+ * The last character rolled,
44+ * holded for quick start
45+ */
46+birther previous_char;
47+
4248 /*!
4349 * オートローラーの内容を描画する間隔 /
4450 * How often the autoroller will update the display and pause
--- a/src/birth.h
+++ b/src/birth.h
@@ -1,5 +1,41 @@
11 #pragma once
22
3+/*
4+ * A structure to hold "rolled" information
5+ */
6+typedef struct birther birther;
7+
8+struct birther
9+{
10+ SEX_IDX psex; /* Sex index */
11+ RACE_IDX prace; /* Race index */
12+ CLASS_IDX pclass; /* Class index */
13+ CHARACTER_IDX pseikaku; /* Seikaku index */
14+ REALM_IDX realm1; /* First magic realm */
15+ REALM_IDX realm2; /* Second magic realm */
16+
17+ s16b age;
18+ s16b ht;
19+ s16b wt;
20+ s16b sc;
21+
22+ PRICE au; /*!< 初期の所持金 */
23+
24+ BASE_STATUS stat_max[6]; /* Current "maximal" stat values */
25+ BASE_STATUS stat_max_max[6]; /* Maximal "maximal" stat values */
26+ HIT_POINT player_hp[PY_MAX_LEVEL];
27+
28+ PATRON_IDX chaos_patron;
29+
30+ s16b vir_types[8];
31+
32+ char history[4][60];
33+
34+ bool quick_ok;
35+};
36+
37+extern birther previous_char;
38+
339 /* birth.c */
440 extern void add_history_from_pref_line(concptr t);
541 extern void player_birth(void);
@@ -7,3 +43,4 @@ extern void get_max_stats(void);
743 extern void get_height_weight(void);
844 extern void player_outfit(void);
945 extern void dump_yourself(FILE *fff);
46+
--- a/src/externs.h
+++ b/src/externs.h
@@ -224,7 +224,6 @@ extern player_type *p_ptr;
224224 extern const player_sex *sp_ptr;
225225 extern const player_race *rp_ptr;
226226 extern const player_seikaku *ap_ptr;
227-extern birther previous_char;
228227 extern char *f_name;
229228 extern char *f_tag;
230229
--- a/src/load.c
+++ b/src/load.c
@@ -69,6 +69,7 @@
6969 #include "files.h"
7070 #include "player-skill.h"
7171 #include "player-class.h"
72+#include "birth.h"
7273 #include "world.h"
7374 #include "objectkind.h"
7475 #include "object-ego.h"
--- a/src/save.c
+++ b/src/save.c
@@ -27,6 +27,7 @@
2727 #include "world.h"
2828 #include "objectkind.h"
2929 #include "monsterrace.h"
30+#include "birth.h"
3031
3132
3233 /*
--- a/src/types.h
+++ b/src/types.h
@@ -224,42 +224,6 @@ struct player_seikaku
224224 };
225225
226226
227-
228-/*
229- * A structure to hold "rolled" information
230- */
231-typedef struct birther birther;
232-
233-struct birther
234-{
235- SEX_IDX psex; /* Sex index */
236- RACE_IDX prace; /* Race index */
237- CLASS_IDX pclass; /* Class index */
238- CHARACTER_IDX pseikaku; /* Seikaku index */
239- REALM_IDX realm1; /* First magic realm */
240- REALM_IDX realm2; /* Second magic realm */
241-
242- s16b age;
243- s16b ht;
244- s16b wt;
245- s16b sc;
246-
247- PRICE au; /*!< 初期の所持金 */
248-
249- BASE_STATUS stat_max[6]; /* Current "maximal" stat values */
250- BASE_STATUS stat_max_max[6]; /* Maximal "maximal" stat values */
251- HIT_POINT player_hp[PY_MAX_LEVEL];
252-
253- PATRON_IDX chaos_patron;
254-
255- s16b vir_types[8];
256-
257- char history[4][60];
258-
259- bool quick_ok;
260-};
261-
262-
263227 /* For Monk martial arts */
264228
265229 typedef struct martial_arts martial_arts;
--- a/src/variable.c
+++ b/src/variable.c
@@ -478,12 +478,6 @@ const player_race *rp_ptr;
478478 const player_seikaku *ap_ptr;
479479
480480
481-/*
482- * The last character rolled,
483- * holded for quick start
484- */
485-birther previous_char;
486-
487481 concptr ANGBAND_SYS = "xxx"; //!< Hack -- The special Angband "System Suffix" This variable is used to choose an appropriate "pref-xxx" file
488482
489483
Show on old repository browser