/* Handle "quit and save" */
if (!p_ptr->playing && !p_ptr->is_dead) break;
- /* Erase the old p_ptr->current_floor_ptr->grid_array */
wipe_o_list(p_ptr->current_floor_ptr);
if (!p_ptr->is_dead) wipe_m_list();
return parse_line_feature(buf);
}
- /* Process "D:<dungeon>" -- info for the p_ptr->current_floor_ptr->grid_array grids */
+ /* Process "D:<dungeon>" -- info for the floor grids */
else if (buf[0] == 'D')
{
object_type object_type_body;
}
/*!
- * @brief フロアに存在する全マスの記憶状態を初期化する / Wipe all unnecessary flags after p_ptr->current_floor_ptr->grid_array generation
+ * @brief フロアに存在する全マスの記憶状態を初期化する / Wipe all unnecessary flags after grid_array generation
* @return なし
*/
void wipe_generate_random_floor_flags(floor_type *floor_ptr)
}
/*!
- * @brief フロアの全情報を初期化する / Clear and empty the p_ptr->current_floor_ptr->grid_array
+ * @brief フロアの全情報を初期化する / Clear and empty floor.
* @return なし
*/
void clear_cave(floor_type *floor_ptr)
* @return なし
* @details
* If the floor is an old saved floor, it will be\n
- * restored from the temporal file. If the floor is new one, new p_ptr->current_floor_ptr->grid_array\n
+ * restored from the temporal file. If the floor is new one, new floor\n
* will be generated.\n
*/
void change_floor(player_type *creature_ptr)
#define MON_LITE_MAX 1536
/*!
- * @brief 視界処理配列サイズ / Maximum size of the "view" array (see "p_ptr->current_floor_ptr->grid_array.c")
+ * @brief 視界処理配列サイズ / Maximum size of the "view" array
* @details Note that the "view radius" will NEVER exceed 20, and even if the "view"
* was octagonal, we would never require more than 1520 entries in the array.
*/
#define VIEW_MAX 1536
/*!
- * @brief 再描画処理用配列サイズ / Maximum size of the "redraw" array (see "p_ptr->current_floor_ptr->grid_array.c")
+ * @brief 再描画処理用配列サイズ / Maximum size of the "redraw" array
* @details We must be large for proper functioning of delayed redrawing.
* We must also be as large as two times of the largest view area.
* Note that maximum view grids are 1149 entries.
extern bool no_lite(void);
/*!
- * @brief 視界及び光源の過渡処理配列サイズ / Maximum size of the "temp" array (see "p_ptr->current_floor_ptr->grid_array.c")
+ * @brief 視界及び光源の過渡処理配列サイズ / Maximum size of the "temp" array
* @details We must be as large as "VIEW_MAX" and "LITE_MAX" for proper functioning
* of "update_view()" and "update_lite()". We must also be as large as the
* largest illuminatable room, but no room is larger than 800 grids. We
/*
* A single "grid" in a Cave
*
- * Note that several aspects of the code restrict the actual p_ptr->current_floor_ptr->grid_array
+ * Note that several aspects of the code restrict the actual grid
* to a max size of 256 by 256. In partcular, locations are often
* saved as bytes, limiting each coordinate to the 0-255 range.
*
struct grid_type
{
- BIT_FLAGS info; /* Hack -- p_ptr->current_floor_ptr->grid_array flags */
+ BIT_FLAGS info; /* Hack -- grid flags */
FEAT_IDX feat; /* Hack -- feature type */
OBJECT_IDX o_idx; /* Object in this grid */
MONSTER_IDX m_idx; /* Monster in this grid */
- /*! 地形の特別な情報を保存する / Special p_ptr->current_floor_ptr->grid_array info
+ /*! 地形の特別な情報を保存する / Special grid info
* 具体的な使用一覧はクエスト行き階段の移行先クエストID、
* 各ダンジョン入口の移行先ダンジョンID、
*
u16b occurrence;
} grid_template_type;
-/* This should not be used */
-/*#define set_cave_info(Y,X,I) (p_ptr->current_floor_ptr->grid_array[(Y)][(X)].info = (I)) */
-
#define feat_locked_door_random(DOOR_TYPE) \
(feat_door[(DOOR_TYPE)].num_locked ? \
feat_door[(DOOR_TYPE)].locked[randint0(feat_door[(DOOR_TYPE)].num_locked)] : feat_none)
#define CAVE_MNLT 0x0100 /*!< モンスターの光源によって照らされている / Illuminated by monster */
#define CAVE_MNDK 0x8000 /*!< モンスターの暗源によって暗闇になっている / Darken by monster */
- /* Used only while p_ptr->current_floor_ptr->grid_array generation */
+ /* Used only while floor generation */
#define CAVE_FLOOR 0x0200 /*!< フロア属性のあるマス */
#define CAVE_EXTRA 0x0400
#define CAVE_INNER 0x0800
#define CAVE_VAULT 0x4000
#define CAVE_MASK (CAVE_FLOOR | CAVE_EXTRA | CAVE_INNER | CAVE_OUTER | CAVE_SOLID | CAVE_VAULT)
-/* Used only after p_ptr->current_floor_ptr->grid_array generation */
+/* Used only after floor generation */
#define CAVE_KNOWN 0x0200 /* Directly viewed or map detected flag */
#define CAVE_NOTE 0x0400 /* Flag for delayed visual update (needs note_spot()) */
#define CAVE_REDRAW 0x0800 /* Flag for delayed visual update (needs lite_spot()) */
/* Allocate and Wipe the max dungeon level */
C_MAKE(max_dlv, current_world_ptr->max_d_idx, DEPTH);
- /* 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 p_ptr->current_floor_ptr->grid_array */
C_MAKE(p_ptr->current_floor_ptr->grid_array[i], MAX_WID, grid_type);
}
/* Apply the RLE info */
for (i = count; i > 0; i--)
{
- /* Access the p_ptr->current_floor_ptr->grid_array */
g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
/* Extract "info" */
/* Apply the RLE info */
for (i = count; i > 0; i--)
{
- /* Access the p_ptr->current_floor_ptr->grid_array */
g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
/* Extract "feat" */
/* Apply the RLE info */
for (i = count; i > 0; i--)
{
- /* Access the p_ptr->current_floor_ptr->grid_array */
g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
/* Extract "mimic" */
/* Apply the RLE info */
for (i = count; i > 0; i--)
{
- /* Access the p_ptr->current_floor_ptr->grid_array */
g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
/* Extract "feat" */
}
}
- /* Convert p_ptr->current_floor_ptr->grid_array data */
if (z_older_than(11, 0, 99))
{
for (y = 0; y < ymax; y++) for (x = 0; x < xmax; x++)
{
for (y = 0; y < ymax; y++) for (x = 0; x < xmax; x++)
{
- /* Access the p_ptr->current_floor_ptr->grid_array */
g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
/* Very old */
{
for (y = 0; y < ymax; y++) for (x = 0; x < xmax; x++)
{
- /* Access the p_ptr->current_floor_ptr->grid_array */
g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
/* Old CAVE_IN_MIRROR flag */
{
for (y = 0; y < ymax; y++) for (x = 0; x < xmax; x++)
{
- /* Access the p_ptr->current_floor_ptr->grid_array */
g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
if ((g_ptr->special == OLD_QUEST_WATER_CAVE) && !p_ptr->current_floor_ptr->dun_level)
/* Apply the RLE info */
for (i = count; i > 0; i--)
{
- /* Access the p_ptr->current_floor_ptr->grid_array */
grid_type *g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
-
- /* Extract p_ptr->current_floor_ptr->grid_array data */
g_ptr->info = templates[id].info;
g_ptr->feat = templates[id].feat;
g_ptr->mimic = templates[id].mimic;
{
for (y = 0; y < ymax; y++) for (x = 0; x < xmax; x++)
{
- /* Access the p_ptr->current_floor_ptr->grid_array */
grid_type *g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
if ((g_ptr->special == OLD_QUEST_WATER_CAVE) && !p_ptr->current_floor_ptr->dun_level)
/* Ignore locations off of edge */
if (!in_bounds2(p_ptr->current_floor_ptr, y, x)) continue;
- /* Don't move toward player */
- /* if (p_ptr->current_floor_ptr->grid_array[y][x].dist < 3) continue; */ /* Hmm.. Need it? */
-
/* Calculate distance of this grid from our destination */
dis = distance(y, x, y1, x1);
/* Cave grid */
g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
- /* Update the p_ptr->current_floor_ptr->grid_array */
g_ptr->m_idx = i2;
/* Repair objects being carried by monster */
* @param mode オプションフラグ
* @return 対象のマスに落ちているアイテム数
* @details
- * Return a list of o_list[] indexes of items at the given p_ptr->current_floor_ptr->grid_array
+ * Return a list of o_list[] indexes of items at the given floor
* location. Valid flags are:
*
* mode & 0x01 -- Item tester
* Town logic flow for generation of new town\n
* Originally from Vanilla 3.0.3\n
*\n
-* We start with a fully wiped p_ptr->current_floor_ptr->grid_array of normal floors.\n
+* We start with a fully wiped grids of normal floors.\n
*\n
* Note that town_gen_hack() plays games with the R.N.G.\n
*\n
#include "dungeon.h"
/*!
-* @brief タイプ9の部屋…フラクタルカーブによる洞窟生成 / Type 9 -- Driver routine to create fractal p_ptr->current_floor_ptr->grid_array system
+* @brief タイプ9の部屋…フラクタルカーブによる洞窟生成 / Type 9 -- Driver routine to create fractal grid
* @return なし
*/
bool build_type9(floor_type *floor_ptr)
}
-/* Create a random vault out of a fractal p_ptr->current_floor_ptr->grid_array */
+/* Create a random vault out of a fractal grid */
static void build_cave_vault(floor_type *floor_ptr, POSITION x0, POSITION y0, POSITION xsiz, POSITION ysiz)
{
int grd, roug, cutoff;
*
* How fractal caves are made:
*
-* When the map is complete, a cut-off value is used to create a p_ptr->current_floor_ptr->grid_array.
+* When the map is complete, a cut-off value is used to create a floor.
* Heights below this value are "floor", and heights above are "wall".
* This also can be used to create lakes, by adding more height levels
* representing shallow and deep water/ lava etc.
* The grd variable affects the width of passages.
* The roug variable affects the roughness of those passages
*
-* The tricky part is making sure the created p_ptr->current_floor_ptr->grid_array is connected. This
+* The tricky part is making sure the created floor is connected. This
* is done by 'filling' from the inside and only keeping the 'filled'
* floor. Walls bounding the 'filled' floor are also kept. Everything
* else is converted to the normal _extra_.
/*
- * Note that this uses the p_ptr->current_floor_ptr->grid_array.feat array in a very hackish way
+ * Note that this uses the floor array in a very hackish way
* the values are first set to zero, and then each array location
* is used as a "heightmap"
* The heightmap then needs to be converted back into the "feat" format.
* grd=level at which fractal turns on. smaller gives more mazelike caves
* roug=roughness level. 16=normal. higher values make things more convoluted
* small values are good for smooth walls.
- * size=length of the side of the square p_ptr->current_floor_ptr->grid_array system.
+ * size=length of the side of the square grid system.
*/
void generate_hmap(floor_type *floor_ptr, POSITION y0, POSITION x0, POSITION xsiz, POSITION ysiz, int grd, int roug, int cutoff)
{
/*
- * makes a lake/collapsed p_ptr->current_floor_ptr->grid_array system in the center of the dungeon
+ * makes a lake/collapsed floor in the center of the dungeon
*/
void build_lake(floor_type *floor_ptr, int type)
{
#define ROOM_T_PIT 5 /*!<部屋型ID:モンスターPIT / Monster pit (33x11) */
#define ROOM_T_LESSER_VAULT 6 /*!<部屋型ID:小型VAULT / Lesser vault (33x22) */
#define ROOM_T_GREATER_VAULT 7 /*!<部屋型ID:大型VAULT / Greater vault (66x44) */
-#define ROOM_T_FRACAVE 8 /*!<部屋型ID:フラクタル地形 / Fractal p_ptr->current_floor_ptr->grid_array (42x24) */
+#define ROOM_T_FRACAVE 8 /*!<部屋型ID:フラクタル地形 / Fractal room (42x24) */
#define ROOM_T_RANDOM_VAULT 9 /*!<部屋型ID:ランダムVAULT / Random vault (44x22) */
#define ROOM_T_OVAL 10 /*!<部屋型ID:円形部屋 / Circular rooms (22x22) */
#define ROOM_T_CRYPT 11 /*!<部屋型ID:聖堂 / Crypts (22x22) */
- /*** "Run-Length-Encoding" of p_ptr->current_floor_ptr->grid_array ***/
+ /*** "Run-Length-Encoding" of floor ***/
/* Note that this will induce two wasted bytes */
count = 0;
prev_u16b = 0;
- /* Dump the p_ptr->current_floor_ptr->grid_array */
for (y = 0; y < p_ptr->current_floor_ptr->height; y++)
{
for (x = 0; x < p_ptr->current_floor_ptr->width; x++)
/*!
- * @brief フロア保存時のp_ptr->current_floor_ptr->grid_array情報テンプレートをソートするための比較処理
- * @param u p_ptr->current_floor_ptr->grid_arrayテンプレートの参照ポインタ
+ * @brief フロア保存時のgrid情報テンプレートをソートするための比較処理
+ * @param u gridテンプレートの参照ポインタ
* @param v 未使用
* @param a スワップするモンスター種族のID1
* @param b スワップするモンスター種族のID2
/*!
- * @brief フロア保存時のp_ptr->current_floor_ptr->grid_array情報テンプレートをソートするためのスワップ処理 / Sorting hook -- Swap function
- * @param u p_ptr->current_floor_ptr->grid_arrayテンプレートの参照ポインタ
+ * @brief フロア保存時のgrid情報テンプレートをソートするためのスワップ処理 / Sorting hook -- Swap function
+ * @param u gridテンプレートの参照ポインタ
* @param v 未使用
* @param a スワップするモンスター種族のID1
* @param b スワップするモンスター種族のID2
if (!cave_monster_teleportable_bold(m_idx, ny, nx, mode)) continue;
- /* No teleporting into vaults and such */
- /* if (p_ptr->current_floor_ptr->grid_array[ny][nx].info & (CAVE_ICKY)) continue; */
-
/* This grid looks good */
look = FALSE;
* not any. If there were, they would have to set "shimmer_objects"\n
* when they were created, and then new "shimmer" code in "dungeon.c"\n
* would have to be created handle the "shimmer" effect, and the code\n
- * in "p_ptr->current_floor_ptr->grid_array.c" would have to be updated to create the shimmer effect.\n
+ * in floor would have to be updated to create the shimmer effect.\n
*\n
* Note the effects of hallucination. Objects always appear as random\n
* "objects", monsters as random "monsters", and normal grids occasionally\n
*/
void map_info(POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp, TERM_COLOR *tap, SYMBOL_CODE *tcp)
{
- /* Get the p_ptr->current_floor_ptr->grid_array */
grid_type *g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
OBJECT_IDX this_o_idx, next_o_idx = 0;