OSDN Git Service

[Refactor] #40014 Reshaped monster-race.c/h
authorHourier <hourier@users.sourceforge.jp>
Sun, 7 Jun 2020 07:21:56 +0000 (16:21 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sun, 7 Jun 2020 07:21:56 +0000 (16:21 +0900)
src/monster-race/monster-race.c
src/monster-race/monster-race.h
src/monster/monster.h

index b388a1d..60425fc 100644 (file)
@@ -2,9 +2,9 @@
 #include "monster-race/monster-race.h"
 #include "util/util.h"
 
-extern monster_race *r_info;
-extern char *r_name;
-extern char *r_text;
+monster_race *r_info;
+char *r_name;
+char *r_text;
 
 /*
  * The size of "alloc_race_table" (at most max_r_idx)
index 9729862..3f4805b 100644 (file)
@@ -42,11 +42,7 @@ extern MONRACE_IDX max_r_idx;
  * fields have a special prefix to aid in searching for them.
  */
 
-
-typedef struct monster_race monster_race;
-
-struct monster_race
-{
+typedef struct monster_race {
        STR_OFFSET name;        /*!< 名前データのオフセット(日本語) /  Name offset(Japanese) */
 #ifdef JP
        STR_OFFSET E_name;              /*!< 名前データのオフセット(英語) /  Name offset(English) */
@@ -439,7 +435,7 @@ struct monster_race
        u32b r_flags6;                  /* Observed racial flags */
        /* u32b r_flags7; */    /* Observed racial flags */
        u32b r_flagsr;                  /* Observed racial resistance flags */
-};
+} monster_race;
 
 /*
  * Hack -- "torch" masks
@@ -464,9 +460,9 @@ struct monster_race
 /*
  * The monster race arrays
  */
-monster_race *r_info;
-char *r_name;
-char *r_text;
+extern monster_race *r_info;
+extern char *r_name;
+extern char *r_text;
 
 extern s16b alloc_race_size;
 extern alloc_entry *alloc_race_table;
index 35c3e00..0ba4594 100644 (file)
@@ -36,8 +36,7 @@ extern MONSTER_IDX hack_m_idx_ii;
  */
 
 typedef struct floor_type floor_type;
-typedef struct
-{
+typedef struct monster_type {
        MONRACE_IDX r_idx;              /* Monster race index 0 = dead. */
        MONRACE_IDX ap_r_idx;   /* Monster race appearance index */
        floor_type *current_floor_ptr;