OSDN Git Service

[Refactor] #37353 birther 構造体と関連変数を birth.h へ移動.
authordeskull <deskull@users.sourceforge.jp>
Thu, 2 May 2019 02:11:21 +0000 (11:11 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Thu, 2 May 2019 02:11:21 +0000 (11:11 +0900)
src/Makefile.am
src/birth.c
src/birth.h
src/externs.h
src/load.c
src/save.c
src/types.h
src/variable.c

index bbb1470..c0ac55d 100644 (file)
@@ -23,7 +23,7 @@ hengband_SOURCES = \
        \
        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-save.h floor-save.c floor-town.h floor-town.c \
        floor-streams.c floor-streams.h \
        \
        feature.c feature.h \
index ad2c1c0..3897699 100644 (file)
 #include "monsterrace.h"
 #include "autopick.h"
 
+ /*
+  * The last character rolled,
+  * holded for quick start
+  */
+birther previous_char;
+
 /*!
  * オートローラーの内容を描画する間隔 / 
  * How often the autoroller will update the display and pause
index 8bd9862..0faf9ac 100644 (file)
@@ -1,5 +1,41 @@
 #pragma once
 
+/*
+ * A structure to hold "rolled" information
+ */
+typedef struct birther birther;
+
+struct birther
+{
+       SEX_IDX psex;           /* Sex index */
+       RACE_IDX prace;         /* Race index */
+       CLASS_IDX pclass;       /* Class index */
+       CHARACTER_IDX pseikaku; /* Seikaku index */
+       REALM_IDX realm1;       /* First magic realm */
+       REALM_IDX realm2;       /* Second magic realm */
+
+       s16b age;
+       s16b ht;
+       s16b wt;
+       s16b sc;
+
+       PRICE au; /*!< 初期の所持金 */
+
+       BASE_STATUS stat_max[6];        /* Current "maximal" stat values */
+       BASE_STATUS stat_max_max[6];    /* Maximal "maximal" stat values */
+       HIT_POINT player_hp[PY_MAX_LEVEL];
+
+       PATRON_IDX chaos_patron;
+
+       s16b vir_types[8];
+
+       char history[4][60];
+
+       bool quick_ok;
+};
+
+extern birther previous_char;
+
 /* birth.c */
 extern void add_history_from_pref_line(concptr t);
 extern void player_birth(void);
@@ -7,3 +43,4 @@ extern void get_max_stats(void);
 extern void get_height_weight(void);
 extern void player_outfit(void);
 extern void dump_yourself(FILE *fff);
+
index 214a85c..d746684 100644 (file)
@@ -224,7 +224,6 @@ extern player_type *p_ptr;
 extern const player_sex *sp_ptr;
 extern const player_race *rp_ptr;
 extern const player_seikaku *ap_ptr;
-extern birther previous_char;
 extern char *f_name;
 extern char *f_tag;
 
index 0c16f32..6437a05 100644 (file)
@@ -69,6 +69,7 @@
 #include "files.h"
 #include "player-skill.h"
 #include "player-class.h"
+#include "birth.h"
 #include "world.h"
 #include "objectkind.h"
 #include "object-ego.h"
index 2c703d9..8b084e8 100644 (file)
@@ -27,6 +27,7 @@
 #include "world.h"
 #include "objectkind.h"
 #include "monsterrace.h"
+#include "birth.h"
 
 
 /*
index 5dccb16..e00a631 100644 (file)
@@ -224,42 +224,6 @@ struct player_seikaku
 };
 
 
-
-/*
- * A structure to hold "rolled" information
- */
-typedef struct birther birther;
-
-struct birther
-{
-       SEX_IDX psex;           /* Sex index */
-       RACE_IDX prace;         /* Race index */
-       CLASS_IDX pclass;       /* Class index */
-       CHARACTER_IDX pseikaku; /* Seikaku index */
-       REALM_IDX realm1;       /* First magic realm */
-       REALM_IDX realm2;       /* Second magic realm */
-
-       s16b age;
-       s16b ht;
-       s16b wt;
-       s16b sc;
-
-       PRICE au; /*!< 初期の所持金 */
-
-       BASE_STATUS stat_max[6];        /* Current "maximal" stat values */
-       BASE_STATUS stat_max_max[6];    /* Maximal "maximal" stat values */
-       HIT_POINT player_hp[PY_MAX_LEVEL];
-
-       PATRON_IDX chaos_patron;
-
-       s16b vir_types[8];
-
-       char history[4][60];
-
-       bool quick_ok;
-};
-
-
 /* For Monk martial arts */
 
 typedef struct martial_arts martial_arts;
index d271f22..66531ec 100644 (file)
@@ -478,12 +478,6 @@ const player_race *rp_ptr;
 const player_seikaku *ap_ptr;
 
 
-/*
- * The last character rolled,
- * holded for quick start
- */
-birther previous_char;
-
 concptr ANGBAND_SYS = "xxx"; //!< Hack -- The special Angband "System Suffix" This variable is used to choose an appropriate "pref-xxx" file