Hengband  2.2.1
関数 | 変数
floor.c ファイル
#include "angband.h"
#include "floor.h"
#include "floor-save.h"
#include "grid.h"
#include "dungeon.h"
#include "rooms.h"
#include "quest.h"
#include "object-hook.h"
floor.c の依存先関係図:

関数

void place_locked_door (floor_type *floor_ptr, POSITION y, POSITION x)
 鍵のかかったドアを配置する [詳解]
 
void place_secret_door (floor_type *floor_ptr, POSITION y, POSITION x, int type)
 隠しドアを配置する [詳解]
 
void update_smell (floor_type *floor_ptr, player_type *subject_ptr)
 
void forget_flow (floor_type *floor_ptr)
 
void add_door (floor_type *floor_ptr, POSITION x, POSITION y)
 
void place_random_stairs (floor_type *floor_ptr, POSITION y, POSITION x)
 所定の位置に上り階段か下り階段を配置する / Place an up/down staircase at given location [詳解]
 
bool los (floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
 LOS(Line Of Sight / 視線が通っているか)の判定を行う。 [詳解]
 
bool projectable (floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
 
void vault_monsters (floor_type *floor_ptr, POSITION y1, POSITION x1, int num)
 特殊な部屋地形向けにモンスターを配置する / Hack – Place some sleeping monsters near the given location [詳解]
 
bool cave_valid_bold (floor_type *floor_ptr, POSITION y, POSITION x)
 指定された座標が地震や階段生成の対象となるマスかを返す。 / Determine if a given location may be "destroyed" [詳解]
 

変数

floor_type floor_info
 
saved_floor_type saved_floors [MAX_SAVED_FLOORS]
 
static int scent_when = 0
 

関数詳解

◆ add_door()

void add_door ( floor_type floor_ptr,
POSITION  x,
POSITION  y 
)
呼び出し関係図:

◆ cave_valid_bold()

bool cave_valid_bold ( floor_type floor_ptr,
POSITION  y,
POSITION  x 
)

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

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

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

呼び出し関係図:

◆ forget_flow()

void forget_flow ( floor_type floor_ptr)

◆ los()

bool los ( floor_type floor_ptr,
POSITION  y1,
POSITION  x1,
POSITION  y2,
POSITION  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.

◆ place_locked_door()

void place_locked_door ( floor_type floor_ptr,
POSITION  y,
POSITION  x 
)

鍵のかかったドアを配置する

引数
y配置したいフロアのY座標
x配置したいフロアのX座標
戻り値
なし
呼び出し関係図:

◆ place_random_stairs()

void place_random_stairs ( floor_type floor_ptr,
POSITION  y,
POSITION  x 
)

所定の位置に上り階段か下り階段を配置する / Place an up/down staircase at given location

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

◆ place_secret_door()

void place_secret_door ( floor_type floor_ptr,
POSITION  y,
POSITION  x,
int  type 
)

隠しドアを配置する

引数
y配置したいフロアのY座標
x配置したいフロアのX座標
typeDOOR_DEFAULT / DOOR_DOOR / DOOR_GLASS_DOOR / DOOR_CURTAIN のいずれか
戻り値
なし
呼び出し関係図:

◆ projectable()

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

◆ update_smell()

void update_smell ( floor_type floor_ptr,
player_type subject_ptr 
)
呼び出し関係図:

◆ vault_monsters()

void vault_monsters ( floor_type floor_ptr,
POSITION  y1,
POSITION  x1,
int  num 
)

特殊な部屋地形向けにモンスターを配置する / Hack – Place some sleeping monsters near the given location

引数
y1モンスターを配置したいマスの中心Y座標
x1モンスターを配置したいマスの中心X座標
num配置したいモンスターの数
戻り値
なし

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

呼び出し関係図:

変数詳解

◆ floor_info

floor_type floor_info

◆ saved_floors

◆ scent_when

int scent_when = 0
static