Hengband
2.2.1
|
#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"
関数 | |
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 |
void add_door | ( | floor_type * | floor_ptr, |
POSITION | x, | ||
POSITION | y | ||
) |
bool cave_valid_bold | ( | floor_type * | floor_ptr, |
POSITION | y, | ||
POSITION | x | ||
) |
指定された座標が地震や階段生成の対象となるマスかを返す。 / Determine if a given location may be "destroyed"
y | y座標 |
x | x座標 |
条件は永久地形でなく、なおかつ該当のマスにアーティファクトが存在しないか、である。英語の旧コメントに反して*破壊*の抑止判定には現在使われていない。
void forget_flow | ( | floor_type * | floor_ptr | ) |
LOS(Line Of Sight / 視線が通っているか)の判定を行う。
y1 | 始点のy座標 |
x1 | 始点のx座標 |
y2 | 終点のy座標 |
x2 | 終点のx座標 |
A simple, fast, integer-based line-of-sight algorithm. By Joseph Hall,
4116 Brewster Drive, Raleigh NC 27606. Email to jnh@e. cemw l.ncs u.ed 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.
void place_locked_door | ( | floor_type * | floor_ptr, |
POSITION | y, | ||
POSITION | x | ||
) |
鍵のかかったドアを配置する
y | 配置したいフロアのY座標 |
x | 配置したいフロアのX座標 |
void place_random_stairs | ( | floor_type * | floor_ptr, |
POSITION | y, | ||
POSITION | x | ||
) |
所定の位置に上り階段か下り階段を配置する / Place an up/down staircase at given location
y | 配置を試みたいマスのY座標 |
x | 配置を試みたいマスのX座標 |
void place_secret_door | ( | floor_type * | floor_ptr, |
POSITION | y, | ||
POSITION | x, | ||
int | type | ||
) |
隠しドアを配置する
y | 配置したいフロアのY座標 |
x | 配置したいフロアのX座標 |
type | DOOR_DEFAULT / DOOR_DOOR / DOOR_GLASS_DOOR / DOOR_CURTAIN のいずれか |
void update_smell | ( | floor_type * | floor_ptr, |
player_type * | subject_ptr | ||
) |
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_type floor_info |
saved_floor_type saved_floors[MAX_SAVED_FLOORS] |
|
static |