|
#define | set_cave_feat(Y, X, F) (cave[(Y)][(X)].feat = (F)) |
|
#define | add_cave_info(Y, X, I) (cave[(Y)][(X)].info |= (I)) |
|
#define | place_rubble(Y, X) set_cave_feat(Y,X,feat_rubble) |
| 指定座標が瓦礫かどうかを返す [詳解]
|
|
#define | place_up_stairs(Y, X) set_cave_feat(Y,X,feat_up_stair) |
| 指定座標が上り階段かどうかを返す [詳解]
|
|
#define | place_down_stairs(Y, X) set_cave_feat(Y,X,feat_down_stair) |
| 指定座標が下り階段かどうかを返す [詳解]
|
|
#define | is_floor_bold(Y, X) (cave[Y][X].info & CAVE_FLOOR) |
| 指定座標がFLOOR属性を持ったマスかどうかを返す [詳解]
|
|
#define | is_extra_bold(Y, X) (cave[Y][X].info & CAVE_EXTRA) |
|
#define | is_inner_bold(Y, X) (cave[Y][X].info & CAVE_INNER) |
|
#define | is_outer_bold(Y, X) (cave[Y][X].info & CAVE_OUTER) |
|
#define | is_solid_bold(Y, X) (cave[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(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(Y, X) |
|
#define | place_inner_bold(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) |
|
|
bool | new_player_spot (void) |
| 新規フロアに入りたてのプレイヤーをランダムな場所に配置する / Returns random co-ordinates for player/monster/object [詳解]
|
|
void | place_random_stairs (int y, int x) |
| 所定の位置に上り階段か下り階段を配置する / Place an up/down staircase at given location [詳解]
|
|
void | place_random_door (int y, int x, bool room) |
| 所定の位置にさまざまな状態や種類のドアを配置する / Place a random type of door at the given location [詳解]
|
|
void | place_closed_door (int y, int x, int type) |
| 所定の位置に各種の閉じたドアを配置する / Place a random type of normal door at the given location. [詳解]
|
|
void | place_floor (int x1, int x2, int y1, int y2, bool light) |
| 長方形の空洞を生成する / Make an empty square floor, for the middle of rooms [詳解]
|
|
void | place_room (int x1, int x2, int y1, int y2, bool light) |
| 長方形の部屋を生成する / Make an empty square room, only floor and wall grids [詳解]
|
|
void | vault_monsters (int y1, int x1, int num) |
| 特殊な部屋地形向けにモンスターを配置する / Hack – Place some sleeping monsters near the given location [詳解]
|
|
void | vault_objects (int y, int x, int num) |
| 特殊な部屋向けに各種アイテムを配置する / Create up to "num" objects near the given coordinates [詳解]
|
|
void | vault_trap_aux (int y, int x, int yd, int xd) |
| 特殊な部屋向けに各種アイテムを配置する(vault_trapのサブセット) / Place a trap with a given displacement of point [詳解]
|
|
void | vault_traps (int y, int x, int yd, int xd, int num) |
| 特殊な部屋向けに各種アイテムを配置する(メインルーチン) / Place some traps with a given displacement of given location [詳解]
|
|
void | correct_dir (int *rdir, int *cdir, int y1, int x1, int y2, int x2) |
| build_tunnel用に通路を掘るための方向を位置関係通りに決める / Always picks a correct direction [詳解]
|
|
void | rand_dir (int *rdir, int *cdir) |
| build_tunnel用に通路を掘るための方向をランダムに決める / Pick a random direction [詳解]
|
|
bool | get_is_floor (int x, int y) |
| 指定のマスが床系地形であるかを返す / Function that sees if a square is a floor. [詳解]
|
|
void | set_floor (int x, int y) |
| 指定のマスを床地形に変える / Set a square to be floor. [詳解]
|
|
bool | build_tunnel (int row1, int col1, int row2, int col2) |
| 部屋間のトンネルを生成する / Constructs a tunnel between two points [詳解]
|
|
bool | build_tunnel2 (int x1, int y1, int x2, int y2, int type, int cutoff) |
| 特定の壁(永久壁など)を避けながら部屋間の通路を作成する / This routine maps a path from (x1, y1) to (x2, y2) avoiding SOLID walls. [詳解]
|
|
ダンジョンの生成処理の基幹部分ヘッダーファイル
- 日付
- 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.
bool build_tunnel |
( |
int |
row1, |
|
|
int |
col1, |
|
|
int |
row2, |
|
|
int |
col2 |
|
) |
| |
部屋間のトンネルを生成する / Constructs a tunnel between two points
- 引数
-
row1 | 始点Y座標 |
col1 | 始点X座標 |
row2 | 終点Y座標 |
col2 | 終点X座標 |
- 戻り値
- 生成に成功したらTRUEを返す
This function must be called BEFORE any streamers are created,
since we use the special "granite wall" sub-types to keep track
of legal places for corridors to pierce rooms.
We use "door_flag" to prevent excessive construction of doors
along overlapping corridors.
We queue the tunnel grids to prevent door creation along a corridor
which intersects itself.
We queue the wall piercing grids to prevent a corridor from leaving
a room and then coming back in through the same entrance.
We "pierce" grids which are "outer" walls of rooms, and when we
do so, we change all adjacent "outer" walls of rooms into "solid"
walls so that no two corridors may use adjacent grids for exits.
The "solid" wall check prevents corridors from "chopping" the
corners of rooms off, as well as "silly" door placement, and
"excessively wide" room entrances.
Kind of walls:
extra – walls
inner – inner room walls
outer – outer room walls
solid – solid room walls