Hengband  2.2.1
データ構造 | マクロ定義 | 型定義 | 関数
grid.h ファイル

ダンジョンの生成処理の基幹部分ヘッダーファイル [詳解]

被依存関係図:

[ソースコード]

データ構造

struct  grid_type
 
struct  grid_template_type
 

マクロ定義

#define feat_locked_door_random(DOOR_TYPE)
 
#define feat_jammed_door_random(DOOR_TYPE)
 
#define set_cave_feat(FL, Y, X, F)   ((FL)->grid_array[(Y)][(X)].feat = (F))
 
#define add_cave_info(FL, Y, X, I)   ((FL)->grid_array[(Y)][(X)].info |= (I))
 
#define place_rubble(F, Y, X)   set_cave_feat(F,Y,X,feat_rubble)
 指定座標に瓦礫を配置する [詳解]
 
#define is_floor_bold(F, Y, X)   (F->grid_array[Y][X].info & CAVE_FLOOR)
 指定座標がFLOOR属性を持ったマスかどうかを返す [詳解]
 
#define is_extra_bold(F, Y, X)   (F->grid_array[Y][X].info & CAVE_EXTRA)
 
#define is_inner_bold(F, Y, X)   (F->grid_array[Y][X].info & CAVE_INNER)
 
#define is_outer_bold(F, Y, X)   (F->grid_array[Y][X].info & CAVE_OUTER)
 
#define is_solid_bold(F, Y, X)   (F->grid_array[Y][X].info & CAVE_SOLID)
 
#define is_floor_grid(C)   ((C)->info & CAVE_FLOOR)
 
#define is_extra_grid(C)   ((C)->info & CAVE_EXTRA)
 
#define is_inner_grid(C)   ((C)->info & CAVE_INNER)
 
#define is_outer_grid(C)   ((C)->info & CAVE_OUTER)
 
#define is_solid_grid(C)   ((C)->info & CAVE_SOLID)
 
#define place_floor_bold(F, Y, X)
 
#define place_floor_grid(C)
 
#define place_extra_bold(Y, X)
 
#define place_extra_grid(C)
 
#define place_extra_perm_bold(Y, X)
 
#define place_extra_perm_grid(C)
 
#define place_extra_noperm_bold(F, Y, X)
 
#define place_inner_bold(F, Y, X)
 
#define place_inner_grid(C)
 
#define place_inner_perm_bold(Y, X)
 
#define place_inner_perm_grid(C)
 
#define place_outer_bold(Y, X)
 
#define place_outer_grid(C)
 
#define place_outer_perm_bold(Y, X)
 
#define place_outer_perm_grid(C)
 
#define place_outer_noperm_bold(Y, X)
 
#define place_outer_noperm_grid(C)
 
#define place_solid_bold(Y, X)
 
#define place_solid_grid(C)
 
#define place_solid_perm_bold(Y, X)
 
#define place_solid_perm_grid(C)
 
#define place_solid_noperm_bold(Y, X)
 
#define place_solid_noperm_grid(C)
 
#define CAVE_MARK   0x0001
 現在プレイヤーの記憶に収まっている / memorized feature [詳解]
 
#define CAVE_GLOW   0x0002
 マス自体が光源を持っている / self-illuminating [詳解]
 
#define CAVE_ICKY   0x0004
 生成されたVaultの一部である / part of a vault [詳解]
 
#define CAVE_ROOM   0x0008
 生成された部屋の一部である / part of a room [詳解]
 
#define CAVE_LITE   0x0010
 現在光に照らされている / lite flag [詳解]
 
#define CAVE_VIEW   0x0020
 現在プレイヤーの視界に収まっている / view flag [詳解]
 
#define CAVE_TEMP   0x0040
 光源に関する処理のアルゴリズム用記録フラグ / temp flag [詳解]
 
#define CAVE_XTRA   0x0080
 視界に関する処理のアルゴリズム用記録フラグ(update_view()等参照) / misc flag [詳解]
 
#define CAVE_MNLT   0x0100
 モンスターの光源によって照らされている / Illuminated by monster [詳解]
 
#define CAVE_MNDK   0x8000
 モンスターの暗源によって暗闇になっている / Darken by monster [詳解]
 
#define CAVE_FLOOR   0x0200
 フロア属性のあるマス [詳解]
 
#define CAVE_EXTRA   0x0400
 
#define CAVE_INNER   0x0800
 
#define CAVE_OUTER   0x1000
 
#define CAVE_SOLID   0x2000
 
#define CAVE_VAULT   0x4000
 
#define CAVE_MASK   (CAVE_FLOOR | CAVE_EXTRA | CAVE_INNER | CAVE_OUTER | CAVE_SOLID | CAVE_VAULT)
 
#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()) */
 
#define CAVE_OBJECT   0x1000 /* Mirror, glyph, etc. */
 
#define CAVE_UNSAFE   0x2000 /* Might have trap */
 
#define CAVE_IN_DETECT   0x4000 /* trap detected area (inner circle only) */
 
#define CONVERT_TYPE_FLOOR   0
 
#define CONVERT_TYPE_WALL   1
 
#define CONVERT_TYPE_INNER   2
 
#define CONVERT_TYPE_OUTER   3
 
#define CONVERT_TYPE_SOLID   4
 
#define CONVERT_TYPE_STREAM1   5
 
#define CONVERT_TYPE_STREAM2   6
 
#define DOOR_DEFAULT   -1
 
#define DOOR_DOOR   0
 
#define DOOR_GLASS_DOOR   1
 
#define DOOR_CURTAIN   2
 
#define MAX_DOOR_TYPES   3
 
#define feat_uses_special(F)   (have_flag(f_info[(F)].flags, FF_SPECIAL))
 マス構造体のspecial要素を利用する地形かどうかを判定するマクロ / Is this feature has special meaning (except floor_id) with g_ptr->special? [詳解]
 
#define darkened_grid(C)
 モンスターにより照明が消されている地形か否かを判定する。 / Is this grid "darkened" by monster? [詳解]
 
#define get_feat_mimic(C)   (f_info[(C)->mimic ? (C)->mimic : (C)->feat].mimic)
 
#define cave_lite_hack(F, Y, X)
 
#define cave_note_and_redraw_later(C, Y, X)
 
#define cave_redraw_later(C, Y, X)
 
#define cave_view_hack(C, Y, X)
 

型定義

typedef struct player_type player_type
 
typedef struct grid_type grid_type
 

関数

bool new_player_spot (player_type *creature_ptr)
 新規フロアに入りたてのプレイヤーをランダムな場所に配置する / Returns random co-ordinates for player/monster/object [詳解]
 
void place_random_door (POSITION y, POSITION x, bool room)
 所定の位置にさまざまな状態や種類のドアを配置する / Place a random type of door at the given location [詳解]
 
void place_closed_door (POSITION y, POSITION x, int type)
 所定の位置に各種の閉じたドアを配置する / Place a random type of normal door at the given location. [詳解]
 
void try_door (POSITION y, POSITION x)
 ドアの設置を試みる / Places door at y, x position if at least 2 walls found [詳解]
 
void place_floor (POSITION x1, POSITION x2, POSITION y1, POSITION y2, bool light)
 長方形の空洞を生成する / Make an empty square floor, for the middle of rooms [詳解]
 
void place_room (POSITION x1, POSITION x2, POSITION y1, POSITION y2, bool light)
 長方形の部屋を生成する / Make an empty square room, only floor and wall grids [詳解]
 
void vault_objects (POSITION y, POSITION x, int num)
 特殊な部屋向けに各種アイテムを配置する / Create up to "num" objects near the given coordinates [詳解]
 
void vault_trap_aux (POSITION y, POSITION x, POSITION yd, POSITION xd)
 特殊な部屋向けに各種アイテムを配置する(vault_trapのサブセット) / Place a trap with a given displacement of point [詳解]
 
void vault_traps (POSITION y, POSITION x, POSITION yd, POSITION xd, int num)
 特殊な部屋向けに各種アイテムを配置する(メインルーチン) / Place some traps with a given displacement of given location [詳解]
 
bool get_is_floor (POSITION x, POSITION y)
 指定のマスが床系地形であるかを返す / Function that sees if a square is a floor. [詳解]
 
void set_floor (POSITION x, POSITION y)
 指定のマスを床地形に変える / Set a square to be floor. [詳解]
 
void place_bound_perm_wall (grid_type *g_ptr)
 マスにフロア端用の永久壁を配置する / Set boundary mimic and add "solid" perma-wall [詳解]
 
bool is_known_trap (grid_type *g_ptr)
 マスに看破済みの罠があるかの判定を行う。 / Return TRUE if the given grid is a known trap [詳解]
 
bool is_hidden_door (grid_type *g_ptr)
 マスに隠されたドアがあるかの判定を行う。 / Return TRUE if the given grid is a hidden closed door [詳解]
 
bool is_mirror_grid (grid_type *g_ptr)
 
bool is_glyph_grid (grid_type *g_ptr)
 
bool is_explosive_rune_grid (grid_type *g_ptr)
 
bool player_can_enter (FEAT_IDX feature, BIT_FLAGS16 mode)
 プレイヤーが地形踏破可能かを返す [詳解]
 
POSITION distance (POSITION y1, POSITION x1, POSITION y2, POSITION x2)
 2点間の距離をニュートン・ラプソン法で算出する / Distance between two points via Newton-Raphson technique [詳解]
 
void update_local_illumination (player_type *creature_ptr, POSITION y, POSITION x)
 指定された座標の照明状態を更新する / Update "local" illumination [詳解]
 
bool player_can_see_bold (POSITION y, POSITION x)
 指定された座標をプレイヤーが視覚に収められるかを返す。 / Can the player "see" the given grid in detail? [詳解]
 
bool no_lite (void)
 指定された座標をプレイヤー収められていない状態かどうか / Returns true if the player's grid is dark [詳解]
 
void map_info (POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp, TERM_COLOR *tap, SYMBOL_CODE *tcp)
 Mコマンドによる縮小マップの表示を行う / Extract the attr/char to display at the given (legal) map location [詳解]
 
void print_rel (SYMBOL_CODE c, TERM_COLOR a, TERM_LEN y, TERM_LEN x)
 
void note_spot (POSITION y, POSITION x)
 
void lite_spot (POSITION y, POSITION x)
 
void delayed_visual_update (void)
 
void update_flow (void)
 
void cave_set_feat (POSITION y, POSITION x, FEAT_IDX feat)
 
FEAT_IDX conv_dungeon_feat (FEAT_IDX newfeat)
 
FEAT_IDX feat_state (FEAT_IDX feat, int action)
 
void cave_alter_feat (POSITION y, POSITION x, int action)
 
void remove_mirror (POSITION y, POSITION x)
 
bool is_open (FEAT_IDX feat)
 地形は開くものであって、かつ開かれているかを返す / Attempt to open the given chest at the given location [詳解]
 
bool check_local_illumination (POSITION y, POSITION x)
 指定された座標のマスが現在照らされているかを返す。 / Check for "local" illumination [詳解]
 
bool cave_monster_teleportable_bold (MONSTER_IDX m_idx, POSITION y, POSITION x, BIT_FLAGS mode)
 指定されたマスがモンスターのテレポート可能先かどうかを判定する。 [詳解]
 
bool cave_player_teleportable_bold (POSITION y, POSITION x, BIT_FLAGS mode)
 指定されたマスにプレイヤーがテレポート可能かどうかを判定する。 [詳解]
 

詳解

ダンジョンの生成処理の基幹部分ヘッダーファイル

日付
2014/08/15

Purpose: header file for grid.c, used only in dungeon generation files (generate.c, rooms.c)

著者
Copyright (c) 1989 James E. Wilson, Robert A. Koeneke 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.

マクロ定義詳解

◆ add_cave_info

#define add_cave_info (   FL,
  Y,
  X,
 
)    ((FL)->grid_array[(Y)][(X)].info |= (I))

◆ CAVE_EXTRA

#define CAVE_EXTRA   0x0400

◆ CAVE_FLOOR

#define CAVE_FLOOR   0x0200

フロア属性のあるマス

◆ CAVE_GLOW

#define CAVE_GLOW   0x0002

マス自体が光源を持っている / self-illuminating

◆ CAVE_ICKY

#define CAVE_ICKY   0x0004

生成されたVaultの一部である / part of a vault

◆ CAVE_IN_DETECT

#define CAVE_IN_DETECT   0x4000 /* trap detected area (inner circle only) */

◆ CAVE_INNER

#define CAVE_INNER   0x0800

◆ CAVE_KNOWN

#define CAVE_KNOWN   0x0200 /* Directly viewed or map detected flag */

◆ CAVE_LITE

#define CAVE_LITE   0x0010

現在光に照らされている / lite flag

◆ cave_lite_hack

#define cave_lite_hack (   F,
  Y,
 
)
値:
{\
if (!((F)->grid_array[Y][X].info & (CAVE_LITE))) \
{ \
(F)->grid_array[Y][X].info |= (CAVE_LITE); \
(F)->lite_y[p_ptr->current_floor_ptr->lite_n] = (Y); \
(F)->lite_x[p_ptr->current_floor_ptr->lite_n++] = (X); \
} \
}
POSITION_IDX lite_n
Array of grids lit by player lite (see "p_ptr->current_floor_ptr->grid_array.c")
Definition: floor.h:109
floor_type * current_floor_ptr
Definition: player-status.h:92
#define CAVE_LITE
現在光に照らされている / lite flag
Definition: grid.h:328
player_type * p_ptr
Definition: player-status.c:1288

◆ CAVE_MARK

#define CAVE_MARK   0x0001

現在プレイヤーの記憶に収まっている / memorized feature

◆ CAVE_MASK

#define CAVE_MASK   (CAVE_FLOOR | CAVE_EXTRA | CAVE_INNER | CAVE_OUTER | CAVE_SOLID | CAVE_VAULT)

◆ CAVE_MNDK

#define CAVE_MNDK   0x8000

モンスターの暗源によって暗闇になっている / Darken by monster

◆ CAVE_MNLT

#define CAVE_MNLT   0x0100

モンスターの光源によって照らされている / Illuminated by monster

◆ CAVE_NOTE

#define CAVE_NOTE   0x0400 /* Flag for delayed visual update (needs note_spot()) */

◆ cave_note_and_redraw_later

#define cave_note_and_redraw_later (   C,
  Y,
 
)
値:
{\
(C)->info |= CAVE_NOTE; \
cave_redraw_later((C), (Y), (X)); \
}
#define CAVE_NOTE
Definition: grid.h:346

◆ CAVE_OBJECT

#define CAVE_OBJECT   0x1000 /* Mirror, glyph, etc. */

◆ CAVE_OUTER

#define CAVE_OUTER   0x1000

◆ CAVE_REDRAW

#define CAVE_REDRAW   0x0800 /* Flag for delayed visual update (needs lite_spot()) */

◆ cave_redraw_later

#define cave_redraw_later (   C,
  Y,
 
)
値:
{\
if (!((C)->info & CAVE_REDRAW)) \
{ \
(C)->info |= CAVE_REDRAW; \
p_ptr->current_floor_ptr->redraw_y[p_ptr->current_floor_ptr->redraw_n] = (Y); \
p_ptr->current_floor_ptr->redraw_x[p_ptr->current_floor_ptr->redraw_n++] = (X); \
} \
}
floor_type * current_floor_ptr
Definition: player-status.h:92
#define CAVE_REDRAW
Definition: grid.h:347
POSITION_IDX redraw_n
Array of grids for delayed visual updating (see "p_ptr->current_floor_ptr->grid_array....
Definition: floor.h:121
player_type * p_ptr
Definition: player-status.c:1288

◆ CAVE_ROOM

#define CAVE_ROOM   0x0008

生成された部屋の一部である / part of a room

◆ CAVE_SOLID

#define CAVE_SOLID   0x2000

◆ CAVE_TEMP

#define CAVE_TEMP   0x0040

光源に関する処理のアルゴリズム用記録フラグ / temp flag

◆ CAVE_UNSAFE

#define CAVE_UNSAFE   0x2000 /* Might have trap */

◆ CAVE_VAULT

#define CAVE_VAULT   0x4000

◆ CAVE_VIEW

#define CAVE_VIEW   0x0020

現在プレイヤーの視界に収まっている / view flag

◆ cave_view_hack

#define cave_view_hack (   C,
  Y,
 
)
値:
{\
if (!((C)->info & (CAVE_VIEW))){\
(C)->info |= (CAVE_VIEW); \
p_ptr->current_floor_ptr->view_y[p_ptr->current_floor_ptr->view_n] = (Y); \
p_ptr->current_floor_ptr->view_x[p_ptr->current_floor_ptr->view_n] = (X); \
p_ptr->current_floor_ptr->view_n++;}\
}
#define CAVE_VIEW
現在プレイヤーの視界に収まっている / view flag
Definition: grid.h:329
floor_type * current_floor_ptr
Definition: player-status.h:92
player_type * p_ptr
Definition: player-status.c:1288
POSITION_IDX view_n
Array of grids viewable to the player (see "grid_array")
Definition: floor.h:117

◆ CAVE_XTRA

#define CAVE_XTRA   0x0080

視界に関する処理のアルゴリズム用記録フラグ(update_view()等参照) / misc flag

◆ CONVERT_TYPE_FLOOR

#define CONVERT_TYPE_FLOOR   0

◆ CONVERT_TYPE_INNER

#define CONVERT_TYPE_INNER   2

◆ CONVERT_TYPE_OUTER

#define CONVERT_TYPE_OUTER   3

◆ CONVERT_TYPE_SOLID

#define CONVERT_TYPE_SOLID   4

◆ CONVERT_TYPE_STREAM1

#define CONVERT_TYPE_STREAM1   5

◆ CONVERT_TYPE_STREAM2

#define CONVERT_TYPE_STREAM2   6

◆ CONVERT_TYPE_WALL

#define CONVERT_TYPE_WALL   1

◆ darkened_grid

#define darkened_grid (   C)
値:
((((C)->info & (CAVE_VIEW | CAVE_LITE | CAVE_MNLT | CAVE_MNDK)) == (CAVE_VIEW | CAVE_MNDK)) && \
#define CAVE_MNLT
モンスターの光源によって照らされている / Illuminated by monster
Definition: grid.h:332
#define CAVE_VIEW
現在プレイヤーの視界に収まっている / view flag
Definition: grid.h:329
#define CAVE_MNDK
モンスターの暗源によって暗闇になっている / Darken by monster
Definition: grid.h:333
bool see_nocto
Definition: player-status.h:664
#define CAVE_LITE
現在光に照らされている / lite flag
Definition: grid.h:328
player_type * p_ptr
Definition: player-status.c:1288

モンスターにより照明が消されている地形か否かを判定する。 / Is this grid "darkened" by monster?

◆ DOOR_CURTAIN

#define DOOR_CURTAIN   2

◆ DOOR_DEFAULT

#define DOOR_DEFAULT   -1

◆ DOOR_DOOR

#define DOOR_DOOR   0

◆ DOOR_GLASS_DOOR

#define DOOR_GLASS_DOOR   1

◆ feat_jammed_door_random

#define feat_jammed_door_random (   DOOR_TYPE)
値:
(feat_door[(DOOR_TYPE)].num_jammed ? \
feat_door[(DOOR_TYPE)].jammed[randint0(feat_door[(DOOR_TYPE)].num_jammed)] : feat_none)
#define randint0(M)
Definition: z-rand.h:39
FEAT_IDX jammed[MAX_LJ_DOORS]
Definition: rooms.h:85
door_type feat_door[MAX_DOOR_TYPES]
Definition: rooms.h:89
FEAT_IDX feat_none
Definition: feature.c:14

◆ feat_locked_door_random

#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 randint0(M)
Definition: z-rand.h:39
door_type feat_door[MAX_DOOR_TYPES]
Definition: rooms.h:89
FEAT_IDX feat_none
Definition: feature.c:14
FEAT_IDX locked[MAX_LJ_DOORS]
Definition: rooms.h:83

◆ feat_uses_special

#define feat_uses_special (   F)    (have_flag(f_info[(F)].flags, FF_SPECIAL))

マス構造体のspecial要素を利用する地形かどうかを判定するマクロ / Is this feature has special meaning (except floor_id) with g_ptr->special?

◆ get_feat_mimic

#define get_feat_mimic (   C)    (f_info[(C)->mimic ? (C)->mimic : (C)->feat].mimic)

◆ is_extra_bold

#define is_extra_bold (   F,
  Y,
 
)    (F->grid_array[Y][X].info & CAVE_EXTRA)

◆ is_extra_grid

#define is_extra_grid (   C)    ((C)->info & CAVE_EXTRA)

◆ is_floor_bold

#define is_floor_bold (   F,
  Y,
 
)    (F->grid_array[Y][X].info & CAVE_FLOOR)

指定座標がFLOOR属性を持ったマスかどうかを返す

引数
Y指定Y座標
X指定X座標
戻り値
FLOOR属性を持っているならばTRUE

◆ is_floor_grid

#define is_floor_grid (   C)    ((C)->info & CAVE_FLOOR)

◆ is_inner_bold

#define is_inner_bold (   F,
  Y,
 
)    (F->grid_array[Y][X].info & CAVE_INNER)

◆ is_inner_grid

#define is_inner_grid (   C)    ((C)->info & CAVE_INNER)

◆ is_outer_bold

#define is_outer_bold (   F,
  Y,
 
)    (F->grid_array[Y][X].info & CAVE_OUTER)

◆ is_outer_grid

#define is_outer_grid (   C)    ((C)->info & CAVE_OUTER)

◆ is_solid_bold

#define is_solid_bold (   F,
  Y,
 
)    (F->grid_array[Y][X].info & CAVE_SOLID)

◆ is_solid_grid

#define is_solid_grid (   C)    ((C)->info & CAVE_SOLID)

◆ MAX_DOOR_TYPES

#define MAX_DOOR_TYPES   3

◆ place_extra_bold

#define place_extra_bold (   Y,
 
)
値:
{ \
set_cave_feat(p_ptr->current_floor_ptr, Y,X,feat_wall_type[randint0(100)]); \
p_ptr->current_floor_ptr->grid_array[Y][X].info &= ~(CAVE_MASK); \
add_cave_info(p_ptr->current_floor_ptr, Y,X,CAVE_EXTRA); \
delete_monster(Y, X); \
}
#define randint0(M)
Definition: z-rand.h:39
#define CAVE_EXTRA
Definition: grid.h:337
floor_type * current_floor_ptr
Definition: player-status.h:92
#define CAVE_MASK
Definition: grid.h:342
FEAT_IDX feat_wall_type[100]
Definition: feature.c:94
player_type * p_ptr
Definition: player-status.c:1288

◆ place_extra_grid

#define place_extra_grid (   C)
値:
{ \
(C)->feat = feat_wall_type[randint0(100)]; \
(C)->info &= ~(CAVE_MASK); \
(C)->info |= CAVE_EXTRA; \
if ((C)->m_idx) delete_monster_idx((C)->m_idx); \
}
#define randint0(M)
Definition: z-rand.h:39
#define CAVE_EXTRA
Definition: grid.h:337
void delete_monster_idx(MONSTER_IDX i)
モンスター配列からモンスターを消去する / Delete a monster by index.
Definition: monster2.c:114
#define CAVE_MASK
Definition: grid.h:342
FEAT_IDX feat_wall_type[100]
Definition: feature.c:94

◆ place_extra_noperm_bold

#define place_extra_noperm_bold (   F,
  Y,
 
)
値:
{ \
feature_type *_f_ptr; \
set_cave_feat((F), Y,X,feat_wall_type[randint0(100)]); \
_f_ptr = &f_info[(F)->grid_array[Y][X].feat]; \
if (permanent_wall(_f_ptr)) (F)->grid_array[Y][X].feat = feat_state((F)->grid_array[Y][X].feat, FF_UNPERM); \
(F)->grid_array[Y][X].info &= ~(CAVE_MASK); \
add_cave_info((F), Y, X, CAVE_EXTRA); \
delete_monster(Y, X); \
}
#define FF_UNPERM
破壊不能な地形である(K:フラグ向け?)
Definition: feature.h:122
#define randint0(M)
Definition: z-rand.h:39
#define CAVE_EXTRA
Definition: grid.h:337
FEAT_IDX feat_state(FEAT_IDX feat, int action)
Definition: grid.c:1609
feature_type * f_info
Definition: feature.c:9
#define CAVE_MASK
Definition: grid.h:342
FEAT_IDX feat_wall_type[100]
Definition: feature.c:94
#define permanent_wall(F)
Definition: floor.h:351

◆ place_extra_perm_bold

#define place_extra_perm_bold (   Y,
 
)
値:
{ \
set_cave_feat(floor_ptr, Y,X,feat_permanent); \
p_ptr->current_floor_ptr->grid_array[Y][X].info &= ~(CAVE_MASK); \
add_cave_info(p_ptr->current_floor_ptr, Y,X,CAVE_EXTRA); \
delete_monster(Y, X); \
}
#define CAVE_EXTRA
Definition: grid.h:337
floor_type * current_floor_ptr
Definition: player-status.h:92
#define CAVE_MASK
Definition: grid.h:342
player_type * p_ptr
Definition: player-status.c:1288
FEAT_IDX feat_permanent
Definition: feature.c:43

◆ place_extra_perm_grid

#define place_extra_perm_grid (   C)
値:
{ \
(C)->feat = feat_permanent; \
(C)->info &= ~(CAVE_MASK); \
(C)->info |= CAVE_EXTRA; \
if ((C)->m_idx) delete_monster_idx((C)->m_idx); \
}
#define CAVE_EXTRA
Definition: grid.h:337
void delete_monster_idx(MONSTER_IDX i)
モンスター配列からモンスターを消去する / Delete a monster by index.
Definition: monster2.c:114
#define CAVE_MASK
Definition: grid.h:342
FEAT_IDX feat_permanent
Definition: feature.c:43

◆ place_floor_bold

#define place_floor_bold (   F,
  Y,
 
)
値:
{ \
set_cave_feat((F), Y,X,feat_ground_type[randint0(100)]); \
(F)->grid_array[Y][X].info &= ~(CAVE_MASK); \
add_cave_info((F), Y,X,CAVE_FLOOR); \
delete_monster(Y, X); \
}
#define randint0(M)
Definition: z-rand.h:39
FEAT_IDX feat_ground_type[100]
Definition: feature.c:94
#define CAVE_MASK
Definition: grid.h:342
#define CAVE_FLOOR
フロア属性のあるマス
Definition: grid.h:336

◆ place_floor_grid

#define place_floor_grid (   C)
値:
{ \
(C)->feat = feat_ground_type[randint0(100)]; \
(C)->info &= ~(CAVE_MASK); \
(C)->info |= CAVE_FLOOR; \
if ((C)->m_idx) delete_monster_idx((C)->m_idx); \
}
#define randint0(M)
Definition: z-rand.h:39
void delete_monster_idx(MONSTER_IDX i)
モンスター配列からモンスターを消去する / Delete a monster by index.
Definition: monster2.c:114
FEAT_IDX feat_ground_type[100]
Definition: feature.c:94
#define CAVE_MASK
Definition: grid.h:342
#define CAVE_FLOOR
フロア属性のあるマス
Definition: grid.h:336

◆ place_inner_bold

#define place_inner_bold (   F,
  Y,
 
)
値:
{ \
set_cave_feat((F), Y, X, feat_wall_inner); \
(F)->grid_array[Y][X].info &= ~(CAVE_MASK); \
add_cave_info((F), Y, X, CAVE_INNER); \
delete_monster(Y, X); \
}
#define CAVE_MASK
Definition: grid.h:342
FEAT_IDX feat_wall_inner
Definition: feature.c:92
#define CAVE_INNER
Definition: grid.h:338

◆ place_inner_grid

#define place_inner_grid (   C)
値:
{ \
(C)->feat = feat_wall_inner; \
(C)->info &= ~(CAVE_MASK); \
(C)->info |= CAVE_INNER; \
if ((C)->m_idx) delete_monster_idx((C)->m_idx); \
}
void delete_monster_idx(MONSTER_IDX i)
モンスター配列からモンスターを消去する / Delete a monster by index.
Definition: monster2.c:114
#define CAVE_MASK
Definition: grid.h:342
FEAT_IDX feat_wall_inner
Definition: feature.c:92
#define CAVE_INNER
Definition: grid.h:338

◆ place_inner_perm_bold

#define place_inner_perm_bold (   Y,
 
)
値:
{ \
set_cave_feat(p_ptr->current_floor_ptr, Y,X,feat_permanent); \
p_ptr->current_floor_ptr->grid_array[Y][X].info &= ~(CAVE_MASK); \
add_cave_info(p_ptr->current_floor_ptr, Y,X,CAVE_INNER); \
delete_monster(Y, X); \
}
floor_type * current_floor_ptr
Definition: player-status.h:92
#define CAVE_MASK
Definition: grid.h:342
#define CAVE_INNER
Definition: grid.h:338
player_type * p_ptr
Definition: player-status.c:1288
FEAT_IDX feat_permanent
Definition: feature.c:43

◆ place_inner_perm_grid

#define place_inner_perm_grid (   C)
値:
{ \
(C)->feat = feat_permanent; \
(C)->info &= ~(CAVE_MASK); \
(C)->info |= CAVE_INNER; \
if ((C)->m_idx) delete_monster_idx((C)->m_idx); \
}
void delete_monster_idx(MONSTER_IDX i)
モンスター配列からモンスターを消去する / Delete a monster by index.
Definition: monster2.c:114
#define CAVE_MASK
Definition: grid.h:342
#define CAVE_INNER
Definition: grid.h:338
FEAT_IDX feat_permanent
Definition: feature.c:43

◆ place_outer_bold

#define place_outer_bold (   Y,
 
)
値:
{ \
set_cave_feat(p_ptr->current_floor_ptr, Y,X,feat_wall_outer); \
p_ptr->current_floor_ptr->grid_array[Y][X].info &= ~(CAVE_MASK); \
add_cave_info(p_ptr->current_floor_ptr, Y,X,CAVE_OUTER); \
delete_monster(Y, X); \
}
#define CAVE_OUTER
Definition: grid.h:339
FEAT_IDX feat_wall_outer
Definition: feature.c:91
floor_type * current_floor_ptr
Definition: player-status.h:92
#define CAVE_MASK
Definition: grid.h:342
player_type * p_ptr
Definition: player-status.c:1288

◆ place_outer_grid

#define place_outer_grid (   C)
値:
{ \
(C)->feat = feat_wall_outer; \
(C)->info &= ~(CAVE_MASK); \
(C)->info |= CAVE_OUTER; \
if ((C)->m_idx) delete_monster_idx((C)->m_idx); \
}
#define CAVE_OUTER
Definition: grid.h:339
void delete_monster_idx(MONSTER_IDX i)
モンスター配列からモンスターを消去する / Delete a monster by index.
Definition: monster2.c:114
FEAT_IDX feat_wall_outer
Definition: feature.c:91
#define CAVE_MASK
Definition: grid.h:342

◆ place_outer_noperm_bold

#define place_outer_noperm_bold (   Y,
 
)
値:
{ \
feature_type *_f_ptr = &f_info[feat_wall_outer]; \
p_ptr->current_floor_ptr->grid_array[Y][X].info &= ~(CAVE_MASK); \
add_cave_info(p_ptr->current_floor_ptr, Y,X,(CAVE_OUTER | CAVE_VAULT)); \
delete_monster(Y, X); \
}
#define FF_UNPERM
破壊不能な地形である(K:フラグ向け?)
Definition: feature.h:122
#define set_cave_feat(FL, Y, X, F)
Definition: grid.h:94
FEAT_IDX feat_state(FEAT_IDX feat, int action)
Definition: grid.c:1609
#define CAVE_OUTER
Definition: grid.h:339
feature_type * f_info
Definition: feature.c:9
FEAT_IDX feat_wall_outer
Definition: feature.c:91
floor_type * current_floor_ptr
Definition: player-status.h:92
#define CAVE_VAULT
Definition: grid.h:341
#define CAVE_MASK
Definition: grid.h:342
#define permanent_wall(F)
Definition: floor.h:351
signed short s16b
Definition: h-type.h:98
player_type * p_ptr
Definition: player-status.c:1288

◆ place_outer_noperm_grid

#define place_outer_noperm_grid (   C)
値:
{ \
feature_type *_f_ptr = &f_info[feat_wall_outer]; \
if (permanent_wall(_f_ptr)) (C)->feat = (s16b)feat_state(feat_wall_outer, FF_UNPERM); \
else (C)->feat = feat_wall_outer; \
(C)->info &= ~(CAVE_MASK); \
(C)->info |= (CAVE_OUTER | CAVE_VAULT); \
if ((C)->m_idx) delete_monster_idx((C)->m_idx); \
}
#define FF_UNPERM
破壊不能な地形である(K:フラグ向け?)
Definition: feature.h:122
FEAT_IDX feat_state(FEAT_IDX feat, int action)
Definition: grid.c:1609
#define CAVE_OUTER
Definition: grid.h:339
feature_type * f_info
Definition: feature.c:9
void delete_monster_idx(MONSTER_IDX i)
モンスター配列からモンスターを消去する / Delete a monster by index.
Definition: monster2.c:114
FEAT_IDX feat_wall_outer
Definition: feature.c:91
#define CAVE_VAULT
Definition: grid.h:341
#define CAVE_MASK
Definition: grid.h:342
#define permanent_wall(F)
Definition: floor.h:351
signed short s16b
Definition: h-type.h:98

◆ place_outer_perm_bold

#define place_outer_perm_bold (   Y,
 
)
値:
{ \
set_cave_feat(floor_ptr, Y,X,feat_permanent); \
p_ptr->current_floor_ptr->grid_array[Y][X].info &= ~(CAVE_MASK); \
add_cave_info(p_ptr->current_floor_ptr, Y,X,CAVE_OUTER); \
delete_monster(Y, X); \
}
#define CAVE_OUTER
Definition: grid.h:339
floor_type * current_floor_ptr
Definition: player-status.h:92
#define CAVE_MASK
Definition: grid.h:342
player_type * p_ptr
Definition: player-status.c:1288
FEAT_IDX feat_permanent
Definition: feature.c:43

◆ place_outer_perm_grid

#define place_outer_perm_grid (   C)
値:
{ \
(C)->feat = feat_permanent; \
(C)->info &= ~(CAVE_MASK); \
(C)->info |= CAVE_OUTER; \
if ((C)->m_idx) delete_monster_idx((C)->m_idx); \
}
#define CAVE_OUTER
Definition: grid.h:339
void delete_monster_idx(MONSTER_IDX i)
モンスター配列からモンスターを消去する / Delete a monster by index.
Definition: monster2.c:114
#define CAVE_MASK
Definition: grid.h:342
FEAT_IDX feat_permanent
Definition: feature.c:43

◆ place_rubble

#define place_rubble (   F,
  Y,
 
)    set_cave_feat(F,Y,X,feat_rubble)

指定座標に瓦礫を配置する

引数
Y指定Y座標
X指定X座標

◆ place_solid_bold

#define place_solid_bold (   Y,
 
)
値:
{ \
set_cave_feat(p_ptr->current_floor_ptr, Y,X,feat_wall_solid); \
p_ptr->current_floor_ptr->grid_array[Y][X].info &= ~(CAVE_MASK); \
add_cave_info(p_ptr->current_floor_ptr, Y,X,CAVE_SOLID); \
delete_monster(Y, X); \
}
FEAT_IDX feat_wall_solid
Definition: feature.c:93
floor_type * current_floor_ptr
Definition: player-status.h:92
#define CAVE_MASK
Definition: grid.h:342
player_type * p_ptr
Definition: player-status.c:1288
#define CAVE_SOLID
Definition: grid.h:340

◆ place_solid_grid

#define place_solid_grid (   C)
値:
{ \
(C)->feat = feat_wall_solid; \
(C)->info &= ~(CAVE_MASK); \
(C)->info |= CAVE_SOLID; \
if ((C)->m_idx) delete_monster_idx((C)->m_idx); \
}
FEAT_IDX feat_wall_solid
Definition: feature.c:93
void delete_monster_idx(MONSTER_IDX i)
モンスター配列からモンスターを消去する / Delete a monster by index.
Definition: monster2.c:114
#define CAVE_MASK
Definition: grid.h:342
#define CAVE_SOLID
Definition: grid.h:340

◆ place_solid_noperm_bold

#define place_solid_noperm_bold (   Y,
 
)
値:
{ \
feature_type *_f_ptr = &f_info[feat_wall_solid]; \
p_ptr->current_floor_ptr->grid_array[Y][X].info &= ~(CAVE_MASK); \
add_cave_info(p_ptr->current_floor_ptr, Y,X,CAVE_SOLID); \
delete_monster(Y, X); \
}
#define FF_UNPERM
破壊不能な地形である(K:フラグ向け?)
Definition: feature.h:122
#define set_cave_feat(FL, Y, X, F)
Definition: grid.h:94
FEAT_IDX feat_wall_solid
Definition: feature.c:93
BIT_FLAGS info
Definition: grid.h:50
FEAT_IDX feat_state(FEAT_IDX feat, int action)
Definition: grid.c:1609
feature_type * f_info
Definition: feature.c:9
floor_type * current_floor_ptr
Definition: player-status.h:92
#define CAVE_VAULT
Definition: grid.h:341
#define CAVE_MASK
Definition: grid.h:342
#define permanent_wall(F)
Definition: floor.h:351
player_type * p_ptr
Definition: player-status.c:1288
grid_type * grid_array[MAX_HGT]
Definition: floor.h:87
#define CAVE_SOLID
Definition: grid.h:340

◆ place_solid_noperm_grid

#define place_solid_noperm_grid (   C)
値:
{ \
feature_type *_f_ptr = &f_info[feat_wall_solid]; \
if (((C)->info & CAVE_VAULT) && permanent_wall(_f_ptr)) \
else (C)->feat = feat_wall_solid; \
(C)->info &= ~(CAVE_MASK); \
(C)->info |= CAVE_SOLID; \
if ((C)->m_idx) delete_monster_idx((C)->m_idx); \
}
#define FF_UNPERM
破壊不能な地形である(K:フラグ向け?)
Definition: feature.h:122
FEAT_IDX feat_wall_solid
Definition: feature.c:93
FEAT_IDX feat_state(FEAT_IDX feat, int action)
Definition: grid.c:1609
feature_type * f_info
Definition: feature.c:9
void delete_monster_idx(MONSTER_IDX i)
モンスター配列からモンスターを消去する / Delete a monster by index.
Definition: monster2.c:114
#define CAVE_VAULT
Definition: grid.h:341
#define CAVE_MASK
Definition: grid.h:342
#define permanent_wall(F)
Definition: floor.h:351
#define CAVE_SOLID
Definition: grid.h:340

◆ place_solid_perm_bold

#define place_solid_perm_bold (   Y,
 
)
値:
{ \
set_cave_feat(floor_ptr, Y,X,feat_permanent); \
p_ptr->current_floor_ptr->grid_array[Y][X].info &= ~(CAVE_MASK); \
add_cave_info(p_ptr->current_floor_ptr, Y,X,CAVE_SOLID); \
delete_monster(Y, X); \
}
floor_type * current_floor_ptr
Definition: player-status.h:92
#define CAVE_MASK
Definition: grid.h:342
player_type * p_ptr
Definition: player-status.c:1288
#define CAVE_SOLID
Definition: grid.h:340
FEAT_IDX feat_permanent
Definition: feature.c:43

◆ place_solid_perm_grid

#define place_solid_perm_grid (   C)
値:
{ \
(C)->feat = feat_permanent; \
(C)->info &= ~(CAVE_MASK); \
(C)->info |= CAVE_SOLID; \
if ((C)->m_idx) delete_monster_idx((C)->m_idx); \
}
void delete_monster_idx(MONSTER_IDX i)
モンスター配列からモンスターを消去する / Delete a monster by index.
Definition: monster2.c:114
#define CAVE_MASK
Definition: grid.h:342
#define CAVE_SOLID
Definition: grid.h:340
FEAT_IDX feat_permanent
Definition: feature.c:43

◆ set_cave_feat

#define set_cave_feat (   FL,
  Y,
  X,
 
)    ((FL)->grid_array[(Y)][(X)].feat = (F))

型定義詳解

◆ grid_type

typedef struct grid_type grid_type

◆ player_type

typedef struct player_type player_type

関数詳解

◆ cave_alter_feat()

void cave_alter_feat ( POSITION  y,
POSITION  x,
int  action 
)
呼び出し関係図:

◆ cave_monster_teleportable_bold()

bool cave_monster_teleportable_bold ( MONSTER_IDX  m_idx,
POSITION  y,
POSITION  x,
BIT_FLAGS  mode 
)

指定されたマスがモンスターのテレポート可能先かどうかを判定する。

引数
m_idxモンスターID
y移動先Y座標
x移動先X座標
modeオプション
戻り値
テレポート先として妥当ならばtrue
呼び出し関係図:

◆ cave_player_teleportable_bold()

bool cave_player_teleportable_bold ( POSITION  y,
POSITION  x,
BIT_FLAGS  mode 
)

指定されたマスにプレイヤーがテレポート可能かどうかを判定する。

引数
y移動先Y座標
x移動先X座標
modeオプション
戻り値
テレポート先として妥当ならばtrue
呼び出し関係図:

◆ cave_set_feat()

void cave_set_feat ( POSITION  y,
POSITION  x,
FEAT_IDX  feat 
)
呼び出し関係図:

◆ check_local_illumination()

bool check_local_illumination ( POSITION  y,
POSITION  x 
)

指定された座標のマスが現在照らされているかを返す。 / Check for "local" illumination

引数
yy座標
xx座標
戻り値
指定された座標に照明がかかっているならTRUEを返す。。

◆ conv_dungeon_feat()

FEAT_IDX conv_dungeon_feat ( FEAT_IDX  newfeat)

◆ delayed_visual_update()

void delayed_visual_update ( void  )
呼び出し関係図:

◆ distance()

POSITION distance ( POSITION  y1,
POSITION  x1,
POSITION  y2,
POSITION  x2 
)

2点間の距離をニュートン・ラプソン法で算出する / Distance between two points via Newton-Raphson technique

引数
y11点目のy座標
x11点目のx座標
y22点目のy座標
x22点目のx座標
戻り値
2点間の距離

◆ feat_state()

FEAT_IDX feat_state ( FEAT_IDX  feat,
int  action 
)
呼び出し関係図:

◆ get_is_floor()

bool get_is_floor ( POSITION  x,
POSITION  y 
)

指定のマスが床系地形であるかを返す / Function that sees if a square is a floor.

(Includes range checking.)

引数
xチェックするマスのX座標
yチェックするマスのY座標
戻り値
床系地形ならばTRUE

◆ is_explosive_rune_grid()

bool is_explosive_rune_grid ( grid_type g_ptr)

◆ is_glyph_grid()

bool is_glyph_grid ( grid_type g_ptr)

◆ is_hidden_door()

bool is_hidden_door ( grid_type g_ptr)

マスに隠されたドアがあるかの判定を行う。 / Return TRUE if the given grid is a hidden closed door

引数
g_ptrマス構造体の参照ポインタ
戻り値
隠されたドアがあるならTRUEを返す。
呼び出し関係図:

◆ is_known_trap()

bool is_known_trap ( grid_type g_ptr)

マスに看破済みの罠があるかの判定を行う。 / Return TRUE if the given grid is a known trap

引数
g_ptrマス構造体の参照ポインタ
戻り値
看破済みの罠があるならTRUEを返す。
呼び出し関係図:

◆ is_mirror_grid()

bool is_mirror_grid ( grid_type g_ptr)

◆ is_open()

bool is_open ( FEAT_IDX  feat)

地形は開くものであって、かつ開かれているかを返す / Attempt to open the given chest at the given location

引数
feat地形ID
戻り値
開いた地形である場合TRUEを返す / Return TRUE if the given feature is an open door
呼び出し関係図:

◆ lite_spot()

void lite_spot ( POSITION  y,
POSITION  x 
)
呼び出し関係図:

◆ map_info()

void map_info ( POSITION  y,
POSITION  x,
TERM_COLOR ap,
SYMBOL_CODE cp,
TERM_COLOR tap,
SYMBOL_CODE tcp 
)

Mコマンドによる縮小マップの表示を行う / Extract the attr/char to display at the given (legal) map location

Basically, we "paint" the chosen attr/char in several passes, starting
with any known "terrain features" (defaulting to darkness), then adding
any known "objects", and finally, adding any known "monsters". This
is not the fastest method but since most of the calls to this function
are made for grids with no monsters or objects, it is fast enough.

Note that this function, if used on the grid containing the "player",
will return the attr/char of the grid underneath the player, and not
the actual player attr/char itself, allowing a lot of optimization
in various "display" functions.

Note that the "zero" entry in the feature/object/monster arrays are
used to provide "special" attr/char codes, with "monster zero" being
used for the player attr/char, "object zero" being used for the "stack"
attr/char, and "feature zero" being used for the "nothing" attr/char,
though this function makes use of only "feature zero".

Note that monsters can have some "special" flags, including "ATTR_MULTI",
which means their color changes, and "ATTR_CLEAR", which means they take
the color of whatever is under them, and "CHAR_CLEAR", which means that
they take the symbol of whatever is under them. Technically, the flag
"CHAR_MULTI" is supposed to indicate that a monster looks strange when
examined, but this flag is currently ignored.

Currently, we do nothing with multi-hued objects, because there are
not any. If there were, they would have to set "shimmer_objects"
when they were created, and then new "shimmer" code in "dungeon.c"
would have to be created handle the "shimmer" effect, and the code
in "p_ptr->current_floor_ptr->grid_array.c" would have to be updated to create the shimmer effect.

Note the effects of hallucination. Objects always appear as random
"objects", monsters as random "monsters", and normal grids occasionally
appear as random "monsters" or "objects", but note that these random
"monsters" and "objects" are really just "colored ascii symbols".

Note that "floors" and "invisible traps" (and "zero" features) are
drawn as "floors" using a special check for optimization purposes,
and these are the only features which get drawn using the special
lighting effects activated by "view_special_lite".

Note the use of the "mimic" field in the "terrain feature" processing,
which allows any feature to "pretend" to be another feature. This is
used to "hide" secret doors, and to make all "doors" appear the same,
and all "walls" appear the same, and "hidden" treasure stay hidden.
It is possible to use this field to make a feature "look" like a floor,
but the "special lighting effects" for floors will not be used.

Note the use of the new "terrain feature" information. Note that the
assumption that all interesting "objects" and "terrain features" are
memorized allows extremely optimized processing below. Note the use
of separate flags on objects to mark them as memorized allows a grid
to have memorized "terrain" without granting knowledge of any object
which may appear in that grid.

Note the efficient code used to determine if a "floor" grid is
"memorized" or "viewable" by the player, where the test for the
grid being "viewable" is based on the facts that (1) the grid
must be "lit" (torch-lit or perma-lit), (2) the grid must be in
line of sight, and (3) the player must not be blind, and uses the
assumption that all torch-lit grids are in line of sight.

Note that floors (and invisible traps) are the only grids which are
not memorized when seen, so only these grids need to check to see if
the grid is "viewable" to the player (if it is not memorized). Since
most non-memorized grids are in fact walls, this induces massive
efficiency, at the cost of forcing the memorization of non-floor
grids when they are first seen. Note that "invisible traps" are
always treated exactly like "floors", which prevents "cheating".

Note the "special lighting effects" which can be activated for floor
grids using the "view_special_lite" option (for "white" floor grids),
causing certain grids to be displayed using special colors. If the
player is "blind", we will use "dark gray", else if the grid is lit
by the torch, and the "view_yellow_lite" option is set, we will use
"yellow", else if the grid is "dark", we will use "dark gray", else
if the grid is not "viewable", and the "view_bright_lite" option is
set, and the we will use "slate" (gray). We will use "white" for all
other cases, in particular, for illuminated viewable floor grids.

Note the "special lighting effects" which can be activated for wall
grids using the "view_granite_lite" option (for "white" wall grids),
causing certain grids to be displayed using special colors. If the
player is "blind", we will use "dark gray", else if the grid is lit
by the torch, and the "view_yellow_lite" option is set, we will use
"yellow", else if the "view_bright_lite" option is set, and the grid
is not "viewable", or is "dark", or is glowing, but not when viewed
from the player's current location, we will use "slate" (gray). We
will use "white" for all other cases, in particular, for correctly
illuminated viewable wall grids.

Note that, when "view_granite_lite" is set, we use an inline version
of the "player_can_see_bold()" function to check the "viewability" of
grids when the "view_bright_lite" option is set, and we do NOT use
any special colors for "dark" wall grids, since this would allow the
player to notice the walls of illuminated rooms from a hallway that
happened to run beside the room. The alternative, by the way, would
be to prevent the generation of hallways next to rooms, but this
would still allow problems when digging towards a room.

Note that bizarre things must be done when the "attr" and/or "char"
codes have the "high-bit" set, since these values are used to encode
various "special" pictures in some versions, and certain situations,
such as "multi-hued" or "clear" monsters, cause the attr/char codes
to be "scrambled" in various ways.

Note that eventually we may use the "&" symbol for embedded treasure,
and use the "*" symbol to indicate multiple objects, though this will
have to wait for Angband 2.8.0 or later. Note that currently, this
is not important, since only one object or terrain feature is allowed
in each grid. If needed, "k_info[0]" will hold the "stack" attr/char.

Note the assumption that doing "x_ptr = &x_info[x]" plus a few of
"x_ptr->xxx", is quicker than "x_info[x].xxx", if this is incorrect
then a whole lot of code should be changed... XXX XXX

◆ new_player_spot()

bool new_player_spot ( player_type creature_ptr)

新規フロアに入りたてのプレイヤーをランダムな場所に配置する / Returns random co-ordinates for player/monster/object

引数
creature_ptr配置したいクリーチャーの参照ポインタ
戻り値
配置に成功したらTRUEを返す
呼び出し関係図:

◆ no_lite()

bool no_lite ( void  )

指定された座標をプレイヤー収められていない状態かどうか / Returns true if the player's grid is dark

戻り値
視覚に収められていないならTRUEを返す

player_can_see_bold()関数の返り値の否定を返している。

呼び出し関係図:

◆ note_spot()

void note_spot ( POSITION  y,
POSITION  x 
)
呼び出し関係図:

◆ place_bound_perm_wall()

void place_bound_perm_wall ( grid_type g_ptr)

マスにフロア端用の永久壁を配置する / Set boundary mimic and add "solid" perma-wall

引数
g_ptr永久壁を配置したいマス構造体の参照ポインタ
戻り値
なし
呼び出し関係図:

◆ place_closed_door()

void place_closed_door ( POSITION  y,
POSITION  x,
int  type 
)

所定の位置に各種の閉じたドアを配置する / Place a random type of normal door at the given location.

引数
yドアの配置を試みたいマスのY座標
xドアの配置を試みたいマスのX座標
typeドアの地形ID
戻り値
なし
呼び出し関係図:

◆ place_floor()

void place_floor ( POSITION  x1,
POSITION  x2,
POSITION  y1,
POSITION  y2,
bool  light 
)

長方形の空洞を生成する / Make an empty square floor, for the middle of rooms

引数
x1長方形の左端X座標(-1)
x2長方形の右端X座標(+1)
y1長方形の上端Y座標(-1)
y2長方形の下端Y座標(+1)
light照明の有無
戻り値
なし

◆ place_random_door()

void place_random_door ( POSITION  y,
POSITION  x,
bool  room 
)

所定の位置にさまざまな状態や種類のドアを配置する / Place a random type of door at the given location

引数
yドアの配置を試みたいマスのY座標
xドアの配置を試みたいマスのX座標
room部屋に接している場合向けのドア生成か否か
戻り値
なし
呼び出し関係図:

◆ place_room()

void place_room ( POSITION  x1,
POSITION  x2,
POSITION  y1,
POSITION  y2,
bool  light 
)

長方形の部屋を生成する / Make an empty square room, only floor and wall grids

引数
x1長方形の左端X座標(-1)
x2長方形の右端X座標(+1)
y1長方形の上端Y座標(-1)
y2長方形の下端Y座標(+1)
light照明の有無
戻り値
なし
呼び出し関係図:

◆ player_can_enter()

bool player_can_enter ( FEAT_IDX  feature,
BIT_FLAGS16  mode 
)

プレイヤーが地形踏破可能かを返す

引数
feature判定したい地形ID
mode移動に関するオプションフラグ
戻り値
移動可能ならばTRUEを返す
呼び出し関係図:

◆ player_can_see_bold()

bool player_can_see_bold ( POSITION  y,
POSITION  x 
)

指定された座標をプレイヤーが視覚に収められるかを返す。 / Can the player "see" the given grid in detail?

引数
yy座標
xx座標
戻り値
視覚に収められる状態ならTRUEを返す

He must have vision, illumination, and line of sight.

Note – "CAVE_LITE" is only set if the "torch" has "los()".
So, given "CAVE_LITE", we know that the grid is "fully visible".

Note that "CAVE_GLOW" makes little sense for a wall, since it would mean
that a wall is visible from any direction. That would be odd. Except
under wizard light, which might make sense. Thus, for walls, we require
not only that they be "CAVE_GLOW", but also, that they be adjacent to a
grid which is not only "CAVE_GLOW", but which is a non-wall, and which is
in line of sight of the player.

This extra check is expensive, but it provides a more "correct" semantics.

Note that we should not run this check on walls which are "outer walls" of
the dungeon, or we will induce a memory fault, but actually verifying all
of the locations would be extremely expensive.

Thus, to speed up the function, we assume that all "perma-walls" which are
"CAVE_GLOW" are "illuminated" from all sides. This is correct for all cases
except "vaults" and the "buildings" in town. But the town is a hack anyway,
and the player has more important things on his mind when he is attacking a
monster vault. It is annoying, but an extremely important optimization.

Note that "glowing walls" are only considered to be "illuminated" if the
grid which is next to the wall in the direction of the player is also a
"glowing" grid. This prevents the player from being able to "see" the
walls of illuminated rooms from a corridor outside the room.

呼び出し関係図:

◆ print_rel()

void print_rel ( SYMBOL_CODE  c,
TERM_COLOR  a,
TERM_LEN  y,
TERM_LEN  x 
)
呼び出し関係図:

◆ remove_mirror()

void remove_mirror ( POSITION  y,
POSITION  x 
)
呼び出し関係図:

◆ set_floor()

void set_floor ( POSITION  x,
POSITION  y 
)

指定のマスを床地形に変える / Set a square to be floor.

(Includes range checking.)

引数
x地形を変えたいマスのX座標
y地形を変えたいマスのY座標
戻り値
なし

◆ try_door()

void try_door ( POSITION  y,
POSITION  x 
)

ドアの設置を試みる / Places door at y, x position if at least 2 walls found

引数
y設置を行いたいマスのY座標
x設置を行いたいマスのX座標
戻り値
なし
呼び出し関係図:

◆ update_flow()

void update_flow ( void  )
呼び出し関係図:

◆ update_local_illumination()

void update_local_illumination ( player_type creature_ptr,
POSITION  y,
POSITION  x 
)

指定された座標の照明状態を更新する / Update "local" illumination

引数
creature_ptr視界元のクリーチャー
y視界先y座標
x視界先x座標
戻り値
なし

◆ vault_objects()

void vault_objects ( POSITION  y,
POSITION  x,
int  num 
)

特殊な部屋向けに各種アイテムを配置する / Create up to "num" objects near the given coordinates

引数
y配置したい中心マスのY座標
x配置したい中心マスのX座標
num配置したい数
戻り値
なし

Only really called by some of the "vault" routines.

呼び出し関係図:

◆ vault_trap_aux()

void vault_trap_aux ( POSITION  y,
POSITION  x,
POSITION  yd,
POSITION  xd 
)

特殊な部屋向けに各種アイテムを配置する(vault_trapのサブセット) / Place a trap with a given displacement of point

引数
yトラップを配置したいマスの中心Y座標
xトラップを配置したいマスの中心X座標
ydY方向の配置分散マス数
xdX方向の配置分散マス数
戻り値
なし

Only really called by some of the "vault" routines.

呼び出し関係図:

◆ vault_traps()

void vault_traps ( POSITION  y,
POSITION  x,
POSITION  yd,
POSITION  xd,
int  num 
)

特殊な部屋向けに各種アイテムを配置する(メインルーチン) / Place some traps with a given displacement of given location

引数
yトラップを配置したいマスの中心Y座標
xトラップを配置したいマスの中心X座標
ydY方向の配置分散マス数
xdX方向の配置分散マス数
num配置したいトラップの数
戻り値
なし

Only really called by some of the "vault" routines.

呼び出し関係図: