#include "angband.h"
#include "init.h"
+#include "trap.h"
#ifndef MACINTOSH
#ifdef CHECK_MODIFICATION_TIME
* @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;
/* Error string */
oops = (((err > 0) && (err < PARSE_ERROR_MAX)) ? err_str[err] : "未知の");
- /* Oops */
msg_format("'%s.txt'ファイルの %d 行目にエラー。", filename, error_line);
msg_format("レコード %d は '%s' エラーがあります。", error_idx, oops);
msg_format("構文 '%s'。", buf);
/* Error string */
oops = (((err > 0) && (err < PARSE_ERROR_MAX)) ? err_str[err] : "unknown");
- /* Oops */
msg_format("Error %d at line %d of '%s.txt'.", err, error_line, filename);
msg_format("Record %d contains a '%s' error.", error_idx, oops);
msg_format("Parsing '%s'.", buf);
/* 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;
z = y + aux[x];
/* Load the entry */
- table[z].index = i;
+ table[z].index = (KIND_OBJECT_IDX)i;
table[z].level = (DEPTH)x;
table[z].prob1 = (PROB)p;
table[z].prob2 = (PROB)p;
p = (100 / r_ptr->rarity);
/* Load the entry */
- alloc_race_table[i].index = elements[i].index;
+ 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;
* @return なし
* @note
* <pre>
- * XXX XXX XXX This function is "messy" because various things
+ * This function is "messy" because various things
* may or may not be initialized, but the "plog()" and "quit()"
* functions are "supposed" to work under any conditions.
* </pre>
* @return なし
* @note
* <pre>
- * XXX XXX XXX This function is "messy" because various things
+ * This function is "messy" because various things
* may or may not be initialized, but the "plog()" and "quit()"
* functions are "supposed" to work under any conditions.
* Verify some files, display the "news.txt" file, create
{
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 */
/* Process that file */
process_pref_file(buf);
- /* Done */
note(_("[初期化終了]", "[Initialization complete]"));
}