Hengband
2.2.1
|
グリッドの実装 / low level dungeon routines -BEN- [詳解]
#include "angband.h"
#include "util.h"
#include "term.h"
#include "floor.h"
#include "world.h"
#include "object-flavor.h"
#include "object-hook.h"
#include "dungeon.h"
#include "floor-generate.h"
#include "grid.h"
#include "trap.h"
#include "rooms.h"
#include "monster.h"
#include "quest.h"
#include "feature.h"
#include "monster-status.h"
#include "player-status.h"
#include "player-effects.h"
#include "player-class.h"
#include "spells.h"
#include "view-mainwindow.h"
#include "realm-song.h"
マクロ定義 | |
#define | MONSTER_FLOW_DEPTH 32 |
敵のプレイヤーに対する移動道のりの最大値(この値以上は処理を打ち切る) / OPTION: Maximum flow depth when using "MONSTER_FLOW" [詳解] | |
#define | FAF_DESTROY 0x01 |
#define | FAF_NO_DROP 0x02 |
#define | FAF_CRASH_GLASS 0x04 |
#define | COMPLEX_WALL_ILLUMINATION |
照明状態を壁により影響を受ける、より複雑な判定に切り替えるマクロ [詳解] | |
#define | update_local_illumination_aux(C, Y, X) |
対象座標のマスの照明状態を更新する際の補助処理マクロ [詳解] | |
関数 | |
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. [詳解] | |
static int | next_to_corr (POSITION y1, POSITION x1) |
隣接4マスに存在する通路の数を返す / Count the number of "corridor" grids adjacent to the given grid. [詳解] | |
static bool | possible_doorway (POSITION y, POSITION x) |
ドアを設置可能な地形かを返す / Determine if the given location is "between" two walls, and "next to" two corridor spaces. [詳解] | |
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 | check_local_illumination (POSITION y, POSITION x) |
指定された座標のマスが現在照らされているかを返す。 / Check for "local" illumination [詳解] | |
void | update_local_illumination (player_type *creature_ptr, POSITION y, POSITION x) |
指定された座標の照明状態を更新する / Update "local" illumination [詳解] | |
bool | no_lite (void) |
指定された座標をプレイヤー収められていない状態かどうか / Returns true if the player's grid is dark [詳解] | |
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_mirror_grid (grid_type *g_ptr) |
bool | is_glyph_grid (grid_type *g_ptr) |
bool | is_explosive_rune_grid (grid_type *g_ptr) |
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) |
指定されたマスにプレイヤーがテレポート可能かどうかを判定する。 [詳解] | |
bool | is_open (FEAT_IDX feat) |
地形は開くものであって、かつ開かれているかを返す / Attempt to open the given chest at the given location [詳解] | |
bool | player_can_enter (FEAT_IDX feature, BIT_FLAGS16 mode) |
プレイヤーが地形踏破可能かを返す [詳解] | |
変数 | |
static const byte | feature_action_flags [FF_FLAG_MAX] |
地形状態フラグテーブル / The table of features' actions [詳解] | |
static POSITION | flow_x = 0 |
static POSITION | flow_y = 0 |
グリッドの実装 / low level dungeon routines -BEN-
#define COMPLEX_WALL_ILLUMINATION |
照明状態を壁により影響を受ける、より複雑な判定に切り替えるマクロ
#define FAF_CRASH_GLASS 0x04 |
#define FAF_DESTROY 0x01 |
#define FAF_NO_DROP 0x02 |
#define MONSTER_FLOW_DEPTH 32 |
敵のプレイヤーに対する移動道のりの最大値(この値以上は処理を打ち切る) / OPTION: Maximum flow depth when using "MONSTER_FLOW"
#define update_local_illumination_aux | ( | C, | |
Y, | |||
X | |||
) |
対象座標のマスの照明状態を更新する際の補助処理マクロ
bool cave_monster_teleportable_bold | ( | MONSTER_IDX | m_idx, |
POSITION | y, | ||
POSITION | x, | ||
BIT_FLAGS | mode | ||
) |
指定されたマスがモンスターのテレポート可能先かどうかを判定する。
m_idx | モンスターID |
y | 移動先Y座標 |
x | 移動先X座標 |
mode | オプション |
指定されたマスにプレイヤーがテレポート可能かどうかを判定する。
y | 移動先Y座標 |
x | 移動先X座標 |
mode | オプション |
指定された座標のマスが現在照らされているかを返す。 / Check for "local" illumination
y | y座標 |
x | x座標 |
void delayed_visual_update | ( | void | ) |
指定のマスが床系地形であるかを返す / Function that sees if a square is a floor.
(Includes range checking.)
x | チェックするマスのX座標 |
y | チェックするマスのY座標 |
マスに隠されたドアがあるかの判定を行う。 / Return TRUE if the given grid is a hidden closed door
g_ptr | マス構造体の参照ポインタ |
マスに看破済みの罠があるかの判定を行う。 / Return TRUE if the given grid is a known trap
g_ptr | マス構造体の参照ポインタ |
地形は開くものであって、かつ開かれているかを返す / Attempt to open the given chest at the given location
feat | 地形ID |
bool new_player_spot | ( | player_type * | creature_ptr | ) |
新規フロアに入りたてのプレイヤーをランダムな場所に配置する / Returns random co-ordinates for player/monster/object
creature_ptr | 配置したいクリーチャーの参照ポインタ |
隣接4マスに存在する通路の数を返す / Count the number of "corridor" grids adjacent to the given grid.
y1 | 基準となるマスのY座標 |
x1 | 基準となるマスのX座標 |
XXX XXX This routine currently only counts actual "empty floor"
grids which are not in rooms. We might want to also count stairs,
open doors, closed doors, etc.
bool no_lite | ( | void | ) |
指定された座標をプレイヤー収められていない状態かどうか / Returns true if the player's grid is dark
player_can_see_bold()関数の返り値の否定を返している。
void place_bound_perm_wall | ( | grid_type * | g_ptr | ) |
マスにフロア端用の永久壁を配置する / Set boundary mimic and add "solid" perma-wall
g_ptr | 永久壁を配置したいマス構造体の参照ポインタ |
所定の位置に各種の閉じたドアを配置する / Place a random type of normal door at the given location.
y | ドアの配置を試みたいマスのY座標 |
x | ドアの配置を試みたいマスのX座標 |
type | ドアの地形ID |
長方形の空洞を生成する / Make an empty square floor, for the middle of rooms
x1 | 長方形の左端X座標(-1) |
x2 | 長方形の右端X座標(+1) |
y1 | 長方形の上端Y座標(-1) |
y2 | 長方形の下端Y座標(+1) |
light | 照明の有無 |
所定の位置にさまざまな状態や種類のドアを配置する / Place a random type of door at the given location
y | ドアの配置を試みたいマスのY座標 |
x | ドアの配置を試みたいマスのX座標 |
room | 部屋に接している場合向けのドア生成か否か |
長方形の部屋を生成する / Make an empty square room, only floor and wall grids
x1 | 長方形の左端X座標(-1) |
x2 | 長方形の右端X座標(+1) |
y1 | 長方形の上端Y座標(-1) |
y2 | 長方形の下端Y座標(+1) |
light | 照明の有無 |
bool player_can_enter | ( | FEAT_IDX | feature, |
BIT_FLAGS16 | mode | ||
) |
プレイヤーが地形踏破可能かを返す
feature | 判定したい地形ID |
mode | 移動に関するオプションフラグ |
ドアを設置可能な地形かを返す / Determine if the given location is "between" two walls, and "next to" two corridor spaces.
y | 判定を行いたいマスのY座標 |
x | 判定を行いたいマスのX座標 |
Assumes "in_bounds(p_ptr->current_floor_ptr, y, x)"
void print_rel | ( | SYMBOL_CODE | c, |
TERM_COLOR | a, | ||
TERM_LEN | y, | ||
TERM_LEN | x | ||
) |
指定のマスを床地形に変える / Set a square to be floor.
(Includes range checking.)
x | 地形を変えたいマスのX座標 |
y | 地形を変えたいマスのY座標 |
ドアの設置を試みる / Places door at y, x position if at least 2 walls found
y | 設置を行いたいマスのY座標 |
x | 設置を行いたいマスのX座標 |
void update_flow | ( | void | ) |
void update_local_illumination | ( | player_type * | creature_ptr, |
POSITION | y, | ||
POSITION | x | ||
) |
指定された座標の照明状態を更新する / Update "local" illumination
creature_ptr | 視界元のクリーチャー |
y | 視界先y座標 |
x | 視界先x座標 |
特殊な部屋向けに各種アイテムを配置する / 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のサブセット) / Place a trap with a given displacement of point
y | トラップを配置したいマスの中心Y座標 |
x | トラップを配置したいマスの中心X座標 |
yd | Y方向の配置分散マス数 |
xd | X方向の配置分散マス数 |
Only really called by some of the "vault" routines.
特殊な部屋向けに各種アイテムを配置する(メインルーチン) / Place some traps with a given displacement of given location
y | トラップを配置したいマスの中心Y座標 |
x | トラップを配置したいマスの中心X座標 |
yd | Y方向の配置分散マス数 |
xd | X方向の配置分散マス数 |
num | 配置したいトラップの数 |
Only really called by some of the "vault" routines.
|
static |
地形状態フラグテーブル / The table of features' actions
|
static |
|
static |