Hengband  2.1.4
マクロ定義 | 関数 | 変数
cave.c ファイル

ダンジョンの基礎部分実装(主にマスの実装) / low level dungeon routines -BEN- [詳解]

#include "angband.h"
cave.c の依存先関係図:

マクロ定義

#define COMPLEX_WALL_ILLUMINATION
 照明状態を壁により影響を受ける、より複雑な判定に切り替えるマクロ [詳解]
 
#define update_local_illumination_aux(Y, X)
 対象座標のマスの照明状態を更新する際の補助処理マクロ [詳解]
 
#define darkened_grid(C)
 モンスターにより照明が消されている地形か否かを判定する。 / Is this grid "darkened" by monster? [詳解]
 
#define cave_note_and_redraw_later(C, Y, X)
 
#define cave_redraw_later(C, Y, X)
 
#define cave_lite_hack(Y, X)
 
#define cave_view_hack(C, Y, X)
 

関数

int distance (int y1, int x1, int y2, int x2)
 2点間の距離をニュートン・ラプソン法で算出する / Distance between two points via Newton-Raphson technique [詳解]
 
bool is_trap (int feat)
 地形が罠持ちであるかの判定を行う。 / Return TRUE if the given feature is a trap [詳解]
 
bool is_known_trap (cave_type *c_ptr)
 マスに看破済みの罠があるかの判定を行う。 / Return TRUE if the given grid is a known trap [詳解]
 
bool is_closed_door (int feat)
 地形が閉じたドアであるかの判定を行う。 / Return TRUE if the given grid is a closed door [詳解]
 
bool is_hidden_door (cave_type *c_ptr)
 マスに隠されたドアがあるかの判定を行う。 / Return TRUE if the given grid is a hidden closed door [詳解]
 
bool los (int y1, int x1, int y2, int x2)
 LOS(Line Of Sight / 視線が通っているか)の判定を行う。 [詳解]
 
static bool check_local_illumination (int y, int x)
 指定された座標のマスが現在照らされているかを返す。 / Check for "local" illumination [詳解]
 
void update_local_illumination (int y, int x)
 指定された座標の照明状態を更新する / Update "local" illumination [詳解]
 
bool player_can_see_bold (int y, int x)
 指定された座標をプレイヤーが視覚に収められるかを返す。 / Can the player "see" the given grid in detail? [詳解]
 
bool no_lite (void)
 指定された座標をプレイヤー収められていない状態かどうか / Returns true if the player's grid is dark [詳解]
 
bool cave_valid_bold (int y, int x)
 指定された座標が地震や階段生成の対象となるマスかを返す。 / Determine if a given location may be "destroyed" [詳解]
 
static void image_monster (byte *ap, char *cp)
 モンスターの表示を幻覚状態に差し替える / Mega-Hack – Hallucinatory monster [詳解]
 
static void image_object (byte *ap, char *cp)
 オブジェクトの表示を幻覚状態に差し替える / Hallucinatory object [詳解]
 
static void image_random (byte *ap, char *cp)
 オブジェクト&モンスターの表示を幻覚状態に差し替える / Hack – Random hallucination [詳解]
 
void apply_default_feat_lighting (byte f_attr[F_LIT_MAX], byte f_char[F_LIT_MAX])
 調査中 [詳解]
 
void map_info (int y, int x, byte *ap, char *cp, byte *tap, char *tcp)
 Mコマンドによる縮小マップの表示を行う / Extract the attr/char to display at the given (legal) map location [詳解]
 
static int panel_col_of (int col)
 
void move_cursor_relative (int row, int col)
 
void print_rel (char c, byte a, int y, int x)
 
void note_spot (int y, int x)
 
void display_dungeon (void)
 
void lite_spot (int y, int x)
 
void prt_map (void)
 
void prt_path (int y, int x)
 
static void display_shortened_item_name (object_type *o_ptr, int y)
 
void display_map (int *cy, int *cx)
 
void do_cmd_view_map (void)
 
void forget_lite (void)
 
void update_lite (void)
 
static void mon_lite_hack (int y, int x)
 
static void mon_dark_hack (int y, int x)
 
void update_mon_lite (void)
 
void clear_mon_lite (void)
 
void forget_view (void)
 
static bool update_view_aux (int y, int x, int y1, int x1, int y2, int x2)
 
void update_view (void)
 
void delayed_visual_update (void)
 
void forget_flow (void)
 
void update_flow (void)
 
void update_smell (void)
 
void map_area (int range)
 
void wiz_lite (bool ninja)
 
void wiz_dark (void)
 
void cave_set_feat (int y, int x, int feat)
 
int conv_dungeon_feat (int newfeat)
 
int feat_state (int feat, int action)
 
void cave_alter_feat (int y, int x, int action)
 
void remove_mirror (int y, int x)
 
bool is_mirror_grid (cave_type *c_ptr)
 
bool is_glyph_grid (cave_type *c_ptr)
 
bool is_explosive_rune_grid (cave_type *c_ptr)
 
void mmove2 (int *y, int *x, int y1, int x1, int y2, int x2)
 
bool projectable (int y1, int x1, int y2, int x2)
 
void scatter (int *yp, int *xp, int y, int x, int d, int m)
 
void health_track (int m_idx)
 
void monster_race_track (int r_idx)
 
void object_kind_track (int k_idx)
 
void disturb (int stop_search, int stop_travel)
 
void glow_deep_lava_and_bldg (void)
 

変数

static byte display_autopick
 自動拾い状態の設定フラグ [詳解]
 
static int match_autopick
 
static object_typeautopick_obj
 各種自動拾い処理時に使うオブジェクトポインタ [詳解]
 
static int feat_priority
 マップ縮小表示時に表示すべき地形の優先度を保管する [詳解]
 
static char image_monster_hack []
 一般的にモンスターシンボルとして扱われる記号を定義する(幻覚処理向け) / Hack – Legal monster codes [詳解]
 
static char image_object_hack [] = "?/|\\\"!$()_-=[]{},~"
 一般的にオブジェクトシンボルとして扱われる記号を定義する(幻覚処理向け) / Hack – Legal object codes [詳解]
 
static byte lighting_colours [16][2]
 照明の表現を行うための色合いの関係を{暗闇時, 照明時} で定義する / This array lists the effects of "brightness" on various "base" colours. [詳解]
 
static cptr simplify_list [][2]
 
static bool mon_invis
 
static s16b mon_fy
 
static s16b mon_fx
 
static u16b flow_x = 0
 
static u16b flow_y = 0
 
static int scent_when = 0
 

詳解

ダンジョンの基礎部分実装(主にマスの実装) / low level dungeon routines -BEN-

日付
2013/12/30
著者
Copyright (c) 1997 Ben Harrison, 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. Other copyrights may also apply.

Support for Adam Bolt's tileset, lighting and transparency effects
by Robert Ruehlmann (rr9@a.nosp@m.ngba.nosp@m.nd.or.nosp@m.g)

2013 Deskull Doxygen向けのコメント整理

マクロ定義詳解

◆ cave_lite_hack

#define cave_lite_hack (   Y,
 
)
値:
{\
if (!(cave[Y][X].info & (CAVE_LITE))) \
{ \
cave[Y][X].info |= (CAVE_LITE); \
lite_y[lite_n] = (Y); \
lite_x[lite_n++] = (X); \
} \
}
cave_type * cave[MAX_HGT]
Definition: variable.c:689
s16b lite_n
Definition: variable.c:421
#define CAVE_LITE
Definition: defines.h:2570

◆ 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: defines.h:2588

◆ cave_redraw_later

#define cave_redraw_later (   C,
  Y,
 
)
値:
{\
if (!((C)->info & CAVE_REDRAW)) \
{ \
(C)->info |= CAVE_REDRAW; \
redraw_y[redraw_n] = (Y); \
redraw_x[redraw_n++] = (X); \
} \
}
#define CAVE_REDRAW
Definition: defines.h:2589
s16b redraw_n
Definition: variable.c:449

◆ cave_view_hack

#define cave_view_hack (   C,
  Y,
 
)
値:
{\
if (!((C)->info & (CAVE_VIEW))){\
(C)->info |= (CAVE_VIEW); \
view_y[view_n] = (Y); \
view_x[view_n] = (X); \
view_n++;}\
}
s16b view_n
Definition: variable.c:435
#define CAVE_VIEW
Definition: defines.h:2571

◆ COMPLEX_WALL_ILLUMINATION

#define COMPLEX_WALL_ILLUMINATION

照明状態を壁により影響を受ける、より複雑な判定に切り替えるマクロ

◆ darkened_grid

#define darkened_grid (   C)
値:
((((C)->info & (CAVE_VIEW | CAVE_LITE | CAVE_MNLT | CAVE_MNDK)) == (CAVE_VIEW | CAVE_MNDK)) && \
#define CAVE_LITE
Definition: defines.h:2570
player_type * p_ptr
Definition: variable.c:800
#define CAVE_MNDK
Definition: defines.h:2575
bool see_nocto
Definition: types.h:1303
#define CAVE_VIEW
Definition: defines.h:2571
#define CAVE_MNLT
Definition: defines.h:2574

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

◆ update_local_illumination_aux

#define update_local_illumination_aux (   Y,
 
)
値:
{ \
if (player_has_los_bold((Y), (X))) \
{ \
/* Update the monster */ \
if (cave[(Y)][(X)].m_idx) update_mon(cave[(Y)][(X)].m_idx, FALSE); \
\
/* Notice and redraw */ \
note_spot((Y), (X)); \
lite_spot((Y), (X)); \
} \
}
cave_type * cave[MAX_HGT]
Definition: variable.c:689
#define FALSE
コンパイル環境に定義がない場合のFALSE定義
Definition: h-define.h:69
void update_mon(int m_idx, bool full)
モンスターの各情報を更新する / This function updates the monster record of the given monster
Definition: monster2.c:2345
#define player_has_los_bold(Y, X)
Definition: defines.h:4383

対象座標のマスの照明状態を更新する際の補助処理マクロ

関数詳解

◆ apply_default_feat_lighting()

void apply_default_feat_lighting ( byte  f_attr[F_LIT_MAX],
byte  f_char[F_LIT_MAX] 
)

調査中

todo:
コメントを付加すること

◆ cave_alter_feat()

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

◆ cave_set_feat()

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

◆ cave_valid_bold()

bool cave_valid_bold ( int  y,
int  x 
)

指定された座標が地震や階段生成の対象となるマスかを返す。 / Determine if a given location may be "destroyed"

引数
yy座標
xx座標
戻り値
各種の変更が可能ならTRUEを返す。

条件は永久地形でなく、なおかつ該当のマスにアーティファクトが存在しないか、である。英語の旧コメントに反して*破壊*の抑止判定には現在使われていない。

呼び出し関係図:

◆ check_local_illumination()

static bool check_local_illumination ( int  y,
int  x 
)
static

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

引数
yy座標
xx座標
戻り値
指定された座標に照明がかかっているならTRUEを返す。。
被呼び出し関係図:

◆ clear_mon_lite()

void clear_mon_lite ( void  )

◆ conv_dungeon_feat()

int conv_dungeon_feat ( int  newfeat)

◆ delayed_visual_update()

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

◆ display_dungeon()

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

◆ display_map()

void display_map ( int *  cy,
int *  cx 
)
呼び出し関係図:

◆ display_shortened_item_name()

static void display_shortened_item_name ( object_type o_ptr,
int  y 
)
static
呼び出し関係図:
被呼び出し関係図:

◆ distance()

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

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

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

◆ disturb()

void disturb ( int  stop_search,
int  stop_travel 
)
呼び出し関係図:

◆ do_cmd_view_map()

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

◆ feat_state()

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

◆ forget_flow()

void forget_flow ( void  )

◆ forget_lite()

void forget_lite ( void  )

◆ forget_view()

void forget_view ( void  )

◆ glow_deep_lava_and_bldg()

void glow_deep_lava_and_bldg ( void  )

◆ health_track()

void health_track ( int  m_idx)

◆ image_monster()

static void image_monster ( byte ap,
char *  cp 
)
static

モンスターの表示を幻覚状態に差し替える / Mega-Hack – Hallucinatory monster

引数
ap本来の色
cp本来のシンボル
戻り値
なし
被呼び出し関係図:

◆ image_object()

static void image_object ( byte ap,
char *  cp 
)
static

オブジェクトの表示を幻覚状態に差し替える / Hallucinatory object

引数
ap本来の色
cp本来のシンボル
戻り値
なし
被呼び出し関係図:

◆ image_random()

static void image_random ( byte ap,
char *  cp 
)
static

オブジェクト&モンスターの表示を幻覚状態に差し替える / Hack – Random hallucination

引数
ap本来の色
cp本来のシンボル
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ is_closed_door()

bool is_closed_door ( int  feat)

地形が閉じたドアであるかの判定を行う。 / Return TRUE if the given grid is a closed door

引数
feat地形情報のID
戻り値
閉じたドアのある地形ならばTRUEを返す。

◆ is_explosive_rune_grid()

bool is_explosive_rune_grid ( cave_type c_ptr)

◆ is_glyph_grid()

bool is_glyph_grid ( cave_type c_ptr)

◆ is_hidden_door()

bool is_hidden_door ( cave_type c_ptr)

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

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

◆ is_known_trap()

bool is_known_trap ( cave_type c_ptr)

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

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

◆ is_mirror_grid()

bool is_mirror_grid ( cave_type c_ptr)

◆ is_trap()

bool is_trap ( int  feat)

地形が罠持ちであるかの判定を行う。 / Return TRUE if the given feature is a trap

引数
feat地形情報のID
戻り値
罠持ちの地形ならばTRUEを返す。

◆ lite_spot()

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

◆ los()

bool los ( int  y1,
int  x1,
int  y2,
int  x2 
)

LOS(Line Of Sight / 視線が通っているか)の判定を行う。

引数
y1始点のy座標
x1始点のx座標
y2終点のy座標
x2終点のx座標
戻り値
LOSが通っているならTRUEを返す。

A simple, fast, integer-based line-of-sight algorithm. By Joseph Hall,
4116 Brewster Drive, Raleigh NC 27606. Email to jnh@e.nosp@m.cemw.nosp@m.l.ncs.nosp@m.u.ed.nosp@m.u.

Returns TRUE if a line of sight can be traced from (x1,y1) to (x2,y2).

The LOS begins at the center of the tile (x1,y1) and ends at the center of
the tile (x2,y2). If los() is to return TRUE, all of the tiles this line
passes through must be floor tiles, except for (x1,y1) and (x2,y2).

We assume that the "mathematical corner" of a non-floor tile does not
block line of sight.

Because this function uses (short) ints for all calculations, overflow may
occur if dx and dy exceed 90.

Once all the degenerate cases are eliminated, the values "qx", "qy", and
"m" are multiplied by a scale factor "f1 = abs(dx * dy * 2)", so that
we can use integer arithmetic.

We travel from start to finish along the longer axis, starting at the border
between the first and second tiles, where the y offset = .5 * slope, taking
into account the scale factor. See below.

Also note that this function and the "move towards target" code do NOT
share the same properties. Thus, you can see someone, target them, and
then fire a bolt at them, but the bolt may hit a wall, not them. However
, by clever choice of target locations, you can sometimes throw a "curve".

Note that "line of sight" is not "reflexive" in all cases.

Use the "projectable()" routine to test "spell/missile line of sight".

Use the "update_view()" function to determine player line-of-sight.

◆ map_area()

void map_area ( int  range)
呼び出し関係図:

◆ map_info()

void map_info ( int  y,
int  x,
byte ap,
char *  cp,
byte tap,
char *  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 "cave.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

呼び出し関係図:

◆ mmove2()

void mmove2 ( int *  y,
int *  x,
int  y1,
int  x1,
int  y2,
int  x2 
)

◆ mon_dark_hack()

static void mon_dark_hack ( int  y,
int  x 
)
static
被呼び出し関係図:

◆ mon_lite_hack()

static void mon_lite_hack ( int  y,
int  x 
)
static
被呼び出し関係図:

◆ monster_race_track()

void monster_race_track ( int  r_idx)

◆ move_cursor_relative()

void move_cursor_relative ( int  row,
int  col 
)
呼び出し関係図:

◆ 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 ( int  y,
int  x 
)
呼び出し関係図:

◆ object_kind_track()

void object_kind_track ( int  k_idx)

◆ panel_col_of()

static int panel_col_of ( int  col)
static
被呼び出し関係図:

◆ player_can_see_bold()

bool player_can_see_bold ( int  y,
int  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 ( char  c,
byte  a,
int  y,
int  x 
)
呼び出し関係図:

◆ projectable()

bool projectable ( int  y1,
int  x1,
int  y2,
int  x2 
)
呼び出し関係図:

◆ prt_map()

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

◆ prt_path()

void prt_path ( int  y,
int  x 
)
呼び出し関係図:

◆ remove_mirror()

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

◆ scatter()

void scatter ( int *  yp,
int *  xp,
int  y,
int  x,
int  d,
int  m 
)
呼び出し関係図:

◆ update_flow()

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

◆ update_lite()

void update_lite ( void  )

◆ update_local_illumination()

void update_local_illumination ( int  y,
int  x 
)

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

引数
yy座標
xx座標
戻り値
なし

◆ update_mon_lite()

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

◆ update_smell()

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

◆ update_view()

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

◆ update_view_aux()

static bool update_view_aux ( int  y,
int  x,
int  y1,
int  x1,
int  y2,
int  x2 
)
static
呼び出し関係図:
被呼び出し関係図:

◆ wiz_dark()

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

◆ wiz_lite()

void wiz_lite ( bool  ninja)
呼び出し関係図:

変数詳解

◆ autopick_obj

object_type* autopick_obj
static

各種自動拾い処理時に使うオブジェクトポインタ

◆ display_autopick

byte display_autopick
static

自動拾い状態の設定フラグ

◆ feat_priority

int feat_priority
static

マップ縮小表示時に表示すべき地形の優先度を保管する

◆ flow_x

u16b flow_x = 0
static

◆ flow_y

u16b flow_y = 0
static

◆ image_monster_hack

char image_monster_hack[]
static
初期値:
=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

一般的にモンスターシンボルとして扱われる記号を定義する(幻覚処理向け) / Hack – Legal monster codes

◆ image_object_hack

char image_object_hack[] = "?/|\\\"!$()_-=[]{},~"
static

一般的にオブジェクトシンボルとして扱われる記号を定義する(幻覚処理向け) / Hack – Legal object codes

◆ lighting_colours

byte lighting_colours[16][2]
static

照明の表現を行うための色合いの関係を{暗闇時, 照明時} で定義する / This array lists the effects of "brightness" on various "base" colours.



This is used to do dynamic lighting effects in ascii :-)
At the moment, only the various "floor" tiles are affected.

The layout of the array is [x][0] = light and [x][1] = dark.

◆ match_autopick

int match_autopick
static

◆ mon_fx

s16b mon_fx
static

◆ mon_fy

s16b mon_fy
static

◆ mon_invis

bool mon_invis
static

◆ scent_when

int scent_when = 0
static

◆ simplify_list

cptr simplify_list[][2]
static
初期値:
=
{
{"^Ring of ", "="},
{"^Amulet of ", "\""},
{"^Scroll of ", "?"},
{"^Scroll titled ", "?"},
{"^Wand of " , "-"},
{"^Rod of " , "-"},
{"^Staff of " , "_"},
{"^Potion of ", "!"},
{" Spellbook ",""},
{"^Book of ", ""},
{" Magic [", "["},
{" Book [", "["},
{" Arts [", "["},
{"^Set of ", ""},
{"^Pair of ", ""},
}
#define NULL
コンパイル環境に定義がない場合のNULL定義
Definition: h-define.h:19