-/* File: init.h */
-
-/*
+/*!
+ * @file init.h
+ * @brief ゲームデータ初期化処理のヘッダファイル
+ * @date 2015/01/02
+ * @author
* Copyright (c) 2000 Robert Ruehlmann
- *
+ * @details
* This software may be copied and distributed for educational, research,
* and not for profit purposes provided that this copyright and statement
* are included in all such copies.
typedef errr (*parse_info_txt_func)(char *buf, header *head);
-/*
- * Template file header information (see "init.c"). 16 bytes.
- *
+/*!
+ * @struct header
+ * @brief 各初期データ用ヘッダ構造体 / Template file header information (see "init.c"). 16 bytes.
+ * @details
* Note that the sizes of many of the "arrays" are between 32768 and
* 65535, and so we must use "unsigned" values to hold the "sizes" of
* these arrays below. Normally, I try to avoid using unsigned values,
byte v_patch; /* Version -- patch */
byte v_extra; /* Version -- extra */
-
u16b info_num; /* Number of "info" records */
-
- u16b info_len; /* Size of each "info" record */
-
-
+ int info_len; /* Size of each "info" record */
u16b head_size; /* Size of the "header" in bytes */
- u32b info_size; /* Size of the "info" array in bytes */
-
- u32b name_size; /* Size of the "name" array in bytes */
-
- u32b text_size; /* Size of the "text" array in bytes */
+ STR_OFFSET info_size; /* Size of the "info" array in bytes */
+ STR_OFFSET name_size; /* Size of the "name" array in bytes */
+ STR_OFFSET text_size; /* Size of the "text" array in bytes */
+ STR_OFFSET tag_size; /* Size of the "tag" array in bytes */
void *info_ptr;
char *name_ptr;
char *text_ptr;
+ char *tag_ptr;
parse_info_txt_func parse_info_txt;
+
+ void (*retouch)(header *head);
};
extern errr init_info_txt(FILE *fp, char *buf, header *head,
- parse_info_txt_func parse_info_txt_line);
+ parse_info_txt_func parse_info_txt_line);
#ifdef ALLOW_TEMPLATES
extern errr parse_z_info(char *buf, 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);