#include "angband.h"
#include "init.h"
+#include "trap.h"
#ifndef MACINTOSH
#ifdef CHECK_MODIFICATION_TIME
#endif /* CHECK_MODIFICATION_TIME */
#endif
-
-
+static void put_title(void);
/*!
* @brief 各データファイルを読み取るためのパスを取得する
* @param len データの長さ
* @return エラーコード
*/
-static void init_header(header *head, int num, int len)
+static void init_header(header *head, IDX num, int len)
{
/* Save the "version" */
head->v_major = FAKE_VER_MAJOR;
head->v_extra = 0;
/* Save the "record" information */
- head->info_num = num;
+ head->info_num = (IDX)num;
head->info_len = len;
/* Save the size of "*_head" and "*_info" */
{
int fd;
- int mode = 0644;
+ BIT_FLAGS mode = 0644;
errr err = 1;
/* Scan the choices */
for (k = 0; k < STORE_CHOICES; k++)
{
- int k_idx;
+ KIND_OBJECT_IDX k_idx;
/* Extract the tval/sval codes */
int tv = store_table[j][k][0];
/*** Prepare the quests ***/
/* Allocate the quests */
- C_MAKE(quest, max_quests, quest_type);
+ C_MAKE(quest, max_q_idx, quest_type);
/* Set all quest to "untaken" */
- for (i = 0; i < max_quests; i++)
+ for (i = 0; i < max_q_idx; i++)
{
quest[i].status = QUEST_STATUS_UNTAKEN;
}
*/
s16b f_tag_to_index_in_init(cptr str)
{
- s16b feat = f_tag_to_index(str);
+ FEAT_IDX feat = f_tag_to_index(str);
if (feat < 0) feat_tag_is_not_found = TRUE;
*/
static errr init_feat_variables(void)
{
- int i;
+ FEAT_IDX i;
/* Nothing */
feat_none = f_tag_to_index_in_init("NONE");
}
/* Allocate and Wipe the max dungeon level */
- C_MAKE(max_dlv, max_d_idx, s16b);
+ C_MAKE(max_dlv, max_d_idx, DEPTH);
/* Allocate and wipe each line of the cave */
for (i = 0; i < MAX_HGT; i++)
quark_init();
/* Message variables */
- C_MAKE(message__ptr, MESSAGE_MAX, u16b);
+ C_MAKE(message__ptr, MESSAGE_MAX, u32b);
C_MAKE(message__buf, MESSAGE_BUF, char);
/* Hack -- No messages yet */
z = y + aux[x];
/* Load the entry */
- table[z].index = i;
- table[z].level = x;
- table[z].prob1 = p;
- table[z].prob2 = p;
- table[z].prob3 = p;
+ table[z].index = (KIND_OBJECT_IDX)i;
+ table[z].level = (DEPTH)x;
+ table[z].prob1 = (PROB)p;
+ table[z].prob2 = (PROB)p;
+ table[z].prob3 = (PROB)p;
/* Another entry complete for this locale */
aux[x]++;
p = (100 / r_ptr->rarity);
/* Load the entry */
- alloc_race_table[i].index = elements[i].index;
- alloc_race_table[i].level = x;
- alloc_race_table[i].prob1 = p;
- alloc_race_table[i].prob2 = p;
- alloc_race_table[i].prob3 = p;
+ alloc_race_table[i].index = (KIND_OBJECT_IDX)elements[i].index;
+ alloc_race_table[i].level = (DEPTH)x;
+ alloc_race_table[i].prob1 = (PROB)p;
+ alloc_race_table[i].prob2 = (PROB)p;
+ alloc_race_table[i].prob3 = (PROB)p;
}
}
{
int fd = -1;
- int mode = 0664;
+ BIT_FLAGS mode = 0664;
FILE *fp;
{
char why[1024];
- /* Message */
sprintf(why, _("'%s'ファイルにアクセスできません!", "Cannot access the '%s' file!"), buf);
/* Crash and burn */
{
char why[1024];
- /* Message */
sprintf(why, _("'%s'ファイルを作成できません!", "Cannot create the '%s' file!"), buf);
/* Crash and burn */
/* Close it */
(void)fd_close(fd);
+ put_title();
/*** Initialize some arrays ***/
}
/*!
+ * @brief タイトル記述
+ * @return なし
+ */
+static void put_title(void)
+{
+ char title[120];
+ int col;
+#if H_VER_EXTRA > 0
+ sprintf(title, _("変愚蛮怒 %d.%d.%d.%d(%s)", "Hengband %d.%d.%d.%d(%s)"), H_VER_MAJOR, H_VER_MINOR, H_VER_PATCH, H_VER_EXTRA,
+#else
+ sprintf(title, _("変愚蛮怒 %d.%d.%d(%s)", "Hengband %d.%d.%d(%s)"), H_VER_MAJOR, H_VER_MINOR, H_VER_PATCH,
+#endif
+ IS_STABLE_VERSION ? _("安定版", "Stable") : _("開発版", "Developing"));
+ col = (80 - strlen(title)) / 2;
+ col = col < 0 ? 0 : col;
+ prt(title, VER_INFO_ROW, col);
+}
+
+/*!
* @brief サムチェック情報を出力 / Get check sum in string form
* @return サムチェック情報の文字列
*/