*/
#include "angband.h"
+#include "util.h"
+#include "files.h"
+#include "core.h"
+#include "term.h"
+#include "artifact.h"
+#include "bldg.h"
#include "init.h"
#include "quest.h"
#include "trap.h"
#include "wild.h"
#include "dungeon-file.h"
#include "files.h"
+#include "feature.h"
+#include "floor.h"
+#include "floor-town.h"
+#include "dungeon.h"
+#include "rooms-vault.h"
+#include "player-skill.h"
+#include "player-class.h"
+#include "objectkind.h"
+#include "object-ego.h"
+#include "rooms-vault.h"
+#include "world.h"
#ifndef MACINTOSH
#ifdef CHECK_MODIFICATION_TIME
char buf[1024];
struct stat txt_stat, raw_stat;
-
- /* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_EDIT, template_file);
/* Access stats on text file */
#ifdef ALLOW_TEMPLATES
/*** Load the binary image file ***/
-
- /* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_DATA, format(_("%s_j.raw", "%s.raw"), filename));
/*** Load the ascii template file ***/
- /* Build the filename */
-
path_build(buf, sizeof(buf), ANGBAND_DIR_EDIT, format("%s.txt", filename));
-
- /* Open the file */
fp = my_fopen(buf, "r");
/* Parse it */
/* File type is "DATA" */
FILE_TYPE(FILE_TYPE_DATA);
-
- /* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_DATA, format(_("%s_j.raw", "%s.raw"), filename));
/*** Load the binary image file ***/
-
- /* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_DATA, format(_("%s_j.raw", "%s.raw"), filename));
/* Attempt to open the "raw" file */
static errr init_d_info(void)
{
/* Init the header */
- init_header(&d_head, max_d_idx, sizeof(dungeon_type));
+ init_header(&d_head, current_world_ptr->max_d_idx, sizeof(dungeon_type));
#ifdef ALLOW_TEMPLATES
{
int i, n;
+ p_ptr->current_floor_ptr = &floor_info; // TODO:本当はこんなところで初期化したくない
+
/*** Prepare the "dungeon" information ***/
/* Allocate and Wipe the object list */
- C_MAKE(current_floor_ptr->o_list, current_floor_ptr->max_o_idx, object_type);
+ C_MAKE(p_ptr->current_floor_ptr->o_list, current_world_ptr->max_o_idx, object_type);
/* Allocate and Wipe the monster list */
- C_MAKE(current_floor_ptr->m_list, current_floor_ptr->max_m_idx, monster_type);
+ C_MAKE(p_ptr->current_floor_ptr->m_list, current_world_ptr->max_m_idx, monster_type);
/* Allocate and Wipe the monster process list */
for (i = 0; i < MAX_MTIMED; i++)
{
- C_MAKE(current_floor_ptr->mproc_list[i], current_floor_ptr->max_m_idx, s16b);
+ C_MAKE(p_ptr->current_floor_ptr->mproc_list[i], current_world_ptr->max_m_idx, s16b);
}
/* Allocate and Wipe the max dungeon level */
- C_MAKE(max_dlv, max_d_idx, DEPTH);
+ C_MAKE(max_dlv, current_world_ptr->max_d_idx, DEPTH);
- /* Allocate and wipe each line of the current_floor_ptr->grid_array */
+ /* Allocate and wipe each line of the p_ptr->current_floor_ptr->grid_array */
for (i = 0; i < MAX_HGT; i++)
{
- /* Allocate one row of the current_floor_ptr->grid_array */
- C_MAKE(current_floor_ptr->grid_array[i], MAX_WID, grid_type);
+ /* Allocate one row of the p_ptr->current_floor_ptr->grid_array */
+ C_MAKE(p_ptr->current_floor_ptr->grid_array[i], MAX_WID, grid_type);
}
/* Hack -- No messages yet */
message__tail = MESSAGE_BUF;
-
- /*** Prepare the Player inventory ***/
-
- /* Allocate it */
- C_MAKE(inventory, INVEN_TOTAL, object_type);
-
-
/*** Prepare the options ***/
/* Scan the options */
/* Set */
option_flag[os] |= (1L << ob);
}
-
- /* Clear */
else
{
- /* Clear */
option_flag[os] &= ~(1L << ob);
}
}
/*** Verify the "news" file ***/
-
- /* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, _("news_j.txt", "news.txt"));
/* Attempt to open the file */
/*** Display the "news" file ***/
Term_clear();
-
- /* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, _("news_j.txt", "news.txt"));
/* Open the News file */
/*** Verify (or create) the "high score" file ***/
-
- /* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
/* Attempt to open the high score file */
if (init_d_info()) quit(_("ダンジョン初期化不能", "Cannot initialize dungeon"));
{
int i;
- for (i = 1; i < max_d_idx; i++)
+ for (i = 1; i < current_world_ptr->max_d_idx; i++)
if (d_info[i].final_guardian)
r_info[d_info[i].final_guardian].flags7 |= RF7_GUARDIAN;
}