OSDN Git Service

[Refactor] #40460 Resolved prototype declerations
authorHourier <hourier@users.sourceforge.jp>
Fri, 5 Jun 2020 16:59:04 +0000 (01:59 +0900)
committerHourier <hourier@users.sourceforge.jp>
Fri, 5 Jun 2020 16:59:04 +0000 (01:59 +0900)
src/dungeon/dungeon-file.c
src/dungeon/dungeon-file.h
src/main/init.c
src/main/init.h

index d1448e8..ece448a 100644 (file)
 #include "world/world-object.h"
 #include "world/world.h"
 
-dungeon_grid letter[255];
+typedef struct dungeon_grid {
+    FEAT_IDX feature; /* Terrain feature */
+    MONSTER_IDX monster; /* Monster */
+    OBJECT_IDX object; /* Object */
+    EGO_IDX ego; /* Ego-Item */
+    ARTIFACT_IDX artifact; /* Artifact */
+    IDX trap; /* Trap */
+    BIT_FLAGS cave_info; /* Flags for CAVE_MARK, CAVE_GLOW, CAVE_ICKY, CAVE_ROOM */
+    s16b special; /* Reserved for special terrain info */
+    int random; /* Number of the random effect */
+} dungeon_grid;
+
+static dungeon_grid letter[255];
 
 /*!
  * @brief データの可変文字列情報をテキストとして保管する /
index 0b02fbd..7a43598 100644 (file)
@@ -3,21 +3,6 @@
 #include "system/angband.h"
 #include "main/init.h" // 相互参照、後で何とかする.
 
-typedef struct dungeon_grid dungeon_grid;
-
-struct dungeon_grid
-{
-       FEAT_IDX feature;               /* Terrain feature */
-       MONSTER_IDX     monster;                /* Monster */
-       OBJECT_IDX object;                      /* Object */
-       EGO_IDX ego;                    /* Ego-Item */
-       ARTIFACT_IDX artifact;          /* Artifact */
-       IDX trap;                       /* Trap */
-       BIT_FLAGS cave_info;            /* Flags for CAVE_MARK, CAVE_GLOW, CAVE_ICKY, CAVE_ROOM */
-       s16b special; /* Reserved for special terrain info */
-       int random;                     /* Number of the random effect */
-};
-
 /* Random dungeon grid effects */
 #define RANDOM_NONE         0x00000000
 #define RANDOM_FEATURE      0x00000001
@@ -27,13 +12,7 @@ struct dungeon_grid
 #define RANDOM_ARTIFACT     0x00000010
 #define RANDOM_TRAP         0x00000020
 
-/*
- * Parse errors
- */
 #define PARSE_ERROR_GENERIC                  1
-#define PARSE_ERROR_ABSOLETE_FILE            2
-#define PARSE_ERROR_MISSING_RECORD_HEADER    3
-#define PARSE_ERROR_NON_SEQUENTIAL_RECORDS   4
 #define PARSE_ERROR_INVALID_FLAG             5
 #define PARSE_ERROR_UNDEFINED_DIRECTIVE      6
 #define PARSE_ERROR_OUT_OF_MEMORY            7
@@ -42,10 +21,20 @@ struct dungeon_grid
 #define PARSE_ERROR_UNDEFINED_TERRAIN_TAG   10
 #define PARSE_ERROR_MAX                     11
 
-extern dungeon_grid letter[255];
 extern concptr err_str[PARSE_ERROR_MAX];
 
-errr process_dungeon_file(player_type *player_ptr, concptr name, int ymin, int xmin, int ymax, int xmax);
 errr init_v_info(void);
 errr init_buildings(void);
 errr init_info_txt(FILE *fp, char *buf, header *head, parse_info_txt_func parse_info_txt_line);
+errr parse_v_info(char *buf, header *head);
+errr parse_s_info(char *buf, header *head);
+errr parse_m_info(char *buf, header *head);
+errr parse_f_info(char *buf, header *head);
+s16b f_tag_to_index(concptr str);
+void retouch_f_info(header *head);
+errr parse_k_info(char *buf, header *head);
+errr parse_a_info(char *buf, header *head);
+errr parse_e_info(char *buf, header *head);
+errr parse_r_info(char *buf, header *head);
+errr parse_d_info(char *buf, header *head);
+errr process_dungeon_file(player_type *player_ptr, concptr name, int ymin, int xmin, int ymax, int xmax);
index 55bb234..c29d41b 100644 (file)
@@ -235,15 +235,15 @@ concptr err_str[PARSE_ERROR_MAX] =
 /*
  * File headers
  */
-header v_head; /*!< Vault情報のヘッダ構造体 */
+static header v_head; /*!< Vault情報のヘッダ構造体 */
 header f_head; /*!< 地形情報のヘッダ構造体 */
-header k_head; /*!< ペースアイテム情報のヘッダ構造体 */
-header a_head; /*!< 固定アーティファクト情報のヘッダ構造体 */
-header e_head; /*!< アイテムエゴ情報のヘッダ構造体 */
-header r_head; /*!< モンスター種族情報のヘッダ構造体 */
-header d_head; /*!< ダンジョン情報のヘッダ構造体 */
-header s_head; /*!< プレイヤー職業技能情報のヘッダ構造体 */
-header m_head; /*!< プレイヤー職業魔法情報のヘッダ構造体 */
+static header k_head; /*!< ペースアイテム情報のヘッダ構造体 */
+static header a_head; /*!< 固定アーティファクト情報のヘッダ構造体 */
+static header e_head; /*!< アイテムエゴ情報のヘッダ構造体 */
+static header r_head; /*!< モンスター種族情報のヘッダ構造体 */
+static header d_head; /*!< ダンジョン情報のヘッダ構造体 */
+static header s_head; /*!< プレイヤー職業技能情報のヘッダ構造体 */
+static header m_head; /*!< プレイヤー職業魔法情報のヘッダ構造体 */
 
 /*!
  * @brief テキストファイルとrawファイルの更新時刻を比較する
index 3d59500..ab31804 100644 (file)
@@ -89,42 +89,14 @@ struct header
        void(*retouch)(header *head);
 };
 
-extern errr parse_v_info(char *buf, header *head);
-extern errr parse_f_info(char *buf, header *head);
-extern void retouch_f_info(header *head);
-extern errr parse_k_info(char *buf, header *head);
-extern errr parse_a_info(char *buf, header *head);
-extern errr parse_e_info(char *buf, header *head);
-extern errr parse_r_info(char *buf, header *head);
-extern errr parse_d_info(char *buf, header *head);
-extern errr parse_s_info(char *buf, header *head);
-extern errr parse_m_info(char *buf, header *head);
-
-/*
- * Error tracking
- */
 extern int error_idx;
 extern int error_line;
 
-/*
- * File headers
- */
-extern header z_head;
-extern header v_head;
 extern header f_head;
-extern header k_head;
-extern header a_head;
-extern header e_head;
-extern header r_head;
-extern header p_head;
-extern header h_head;
-extern header b_head;
-extern header g_head;
 
 #endif /* INCLUDED_INIT_H */
 
-extern s16b f_tag_to_index(concptr str);
-extern s16b f_tag_to_index_in_init(concptr str);
-extern void init_angband(player_type *player_ptr, void(*process_autopick_file_command)(char*));
-extern concptr get_check_sum(void);
-extern void init_file_paths(char *path);
+s16b f_tag_to_index_in_init(concptr str);
+void init_angband(player_type *player_ptr, void(*process_autopick_file_command)(char*));
+concptr get_check_sum(void);
+void init_file_paths(char *path);