Hengband
2.2.1
|
部屋生成処理の定義ヘッダー / Header file for rooms.c, used only in generate.c [詳解]
#include "floor.h"
データ構造 | |
struct | room_info_type |
struct | door_type |
マクロ定義 | |
#define | ALLOW_CAVERNS_AND_LAKES |
#define | DUN_ROOMS_MAX 40 |
部屋生成処理の最大試行数 / Number of rooms to attempt (was 50) [詳解] | |
#define | LAKE_T_LAVA 1 |
池型地形ID: 溶岩 [詳解] | |
#define | LAKE_T_WATER 2 |
池型地形ID: 池 [詳解] | |
#define | LAKE_T_CAVE 3 |
池型地形ID: 空洞 [詳解] | |
#define | LAKE_T_EARTH_VAULT 4 |
池型地形ID: 地属性VAULT [詳解] | |
#define | LAKE_T_AIR_VAULT 5 |
池型地形ID: 風属性VAULT [詳解] | |
#define | LAKE_T_WATER_VAULT 6 |
池型地形ID: 水属性VAULT [詳解] | |
#define | LAKE_T_FIRE_VAULT 7 |
池型地形ID: 火属性VAULT [詳解] | |
#define | ROOM_T_NORMAL 0 |
部屋型ID:基本長方形 / Simple (33x11) [詳解] | |
#define | ROOM_T_OVERLAP 1 |
部屋型ID:長方形二つ重ね / Overlapping (33x11) [詳解] | |
#define | ROOM_T_CROSS 2 |
部屋型ID:十字 / Crossed (33x11) [詳解] | |
#define | ROOM_T_INNER_FEAT 3 |
部屋型ID:二重壁 / Large (33x11) [詳解] | |
#define | ROOM_T_NEST 4 |
部屋型ID:モンスターNEST / Monster nest (33x11) [詳解] | |
#define | ROOM_T_PIT 5 |
部屋型ID:モンスターPIT / Monster pit (33x11) [詳解] | |
#define | ROOM_T_LESSER_VAULT 6 |
部屋型ID:小型VAULT / Lesser vault (33x22) [詳解] | |
#define | ROOM_T_GREATER_VAULT 7 |
部屋型ID:大型VAULT / Greater vault (66x44) [詳解] | |
#define | ROOM_T_FRACAVE 8 |
部屋型ID:フラクタル地形 / Fractal p_ptr->current_floor_ptr->grid_array (42x24) [詳解] | |
#define | ROOM_T_RANDOM_VAULT 9 |
部屋型ID:ランダムVAULT / Random vault (44x22) [詳解] | |
#define | ROOM_T_OVAL 10 |
部屋型ID:円形部屋 / Circular rooms (22x22) [詳解] | |
#define | ROOM_T_CRYPT 11 |
部屋型ID:聖堂 / Crypts (22x22) [詳解] | |
#define | ROOM_T_TRAP_PIT 12 |
部屋型ID:トラップつきモンスターPIT / Trapped monster pit [詳解] | |
#define | ROOM_T_TRAP 13 |
部屋型ID:トラップ部屋 / Piranha/Armageddon trap room [詳解] | |
#define | ROOM_T_GLASS 14 |
部屋型ID:ガラス部屋 / Glass room [詳解] | |
#define | ROOM_T_ARCADE 15 |
部屋型ID:商店 / Arcade [詳解] | |
#define | ROOM_T_FIXED 16 |
部屋型ID:固定部屋 / Fixed room [詳解] | |
#define | ROOM_T_MAX 17 |
部屋型ID最大数 [詳解] | |
#define | MAX_LJ_DOORS 8 |
型定義 | |
typedef struct room_info_type | room_info_type |
関数 | |
void | build_lake (floor_type *floor_ptr, int type) |
void | build_cavern (floor_type *floor_ptr) |
bool | generate_rooms (floor_type *floor_ptr) |
部屋生成処理のメインルーチン(Sangbandを経由してOangbandからの実装を引用) / Generate rooms in dungeon. [詳解] | |
void | build_maze_vault (POSITION x0, POSITION y0, POSITION xsize, POSITION ysize, bool is_vault) |
bool | find_space (POSITION *y, POSITION *x, POSITION height, POSITION width) |
部屋生成が可能なスペースを確保する / Find a good spot for the next room. [詳解] | |
void | build_small_room (floor_type *floor_ptr, POSITION x0, POSITION y0) |
1マスだけの部屋を作成し、上下左右いずれか一つに隠しドアを配置する。 [詳解] | |
void | add_outer_wall (POSITION x, POSITION y, int light, POSITION x1, POSITION y1, POSITION x2, POSITION y2) |
POSITION | dist2 (POSITION x1, POSITION y1, POSITION x2, POSITION y2, POSITION h1, POSITION h2, POSITION h3, POSITION h4) |
void | generate_room_floor (POSITION y1, POSITION x1, POSITION y2, POSITION x2, int light) |
void | generate_fill_perm_bold (POSITION y1, POSITION x1, POSITION y2, POSITION x2) |
void | generate_hmap (floor_type *floor_ptr, POSITION y0, POSITION x0, POSITION xsiz, POSITION ysiz, int grd, int roug, int cutoff) |
bool | generate_fracave (floor_type *floor_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int cutoff, bool light, bool room) |
void | fill_treasure (floor_type *floor_ptr, POSITION x1, POSITION x2, POSITION y1, POSITION y2, int difficulty) |
bool | generate_lake (floor_type *floor_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int c1, int c2, int c3, int type) |
void | build_recursive_room (floor_type *floor_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, int power) |
void | build_room (floor_type *floor_ptr, POSITION x1, POSITION x2, POSITION y1, POSITION y2) |
void | r_visit (floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int node, DIRECTION dir, int *visited) |
変数 | |
door_type | feat_door [MAX_DOOR_TYPES] |
部屋生成処理の定義ヘッダー / Header file for rooms.c, used only in generate.c
#define ALLOW_CAVERNS_AND_LAKES |
#define DUN_ROOMS_MAX 40 |
部屋生成処理の最大試行数 / Number of rooms to attempt (was 50)
#define LAKE_T_AIR_VAULT 5 |
池型地形ID: 風属性VAULT
#define LAKE_T_CAVE 3 |
池型地形ID: 空洞
#define LAKE_T_EARTH_VAULT 4 |
池型地形ID: 地属性VAULT
#define LAKE_T_FIRE_VAULT 7 |
池型地形ID: 火属性VAULT
#define LAKE_T_LAVA 1 |
池型地形ID: 溶岩
#define LAKE_T_WATER 2 |
池型地形ID: 池
#define LAKE_T_WATER_VAULT 6 |
池型地形ID: 水属性VAULT
#define MAX_LJ_DOORS 8 |
#define ROOM_T_ARCADE 15 |
部屋型ID:商店 / Arcade
#define ROOM_T_CROSS 2 |
部屋型ID:十字 / Crossed (33x11)
#define ROOM_T_CRYPT 11 |
部屋型ID:聖堂 / Crypts (22x22)
#define ROOM_T_FIXED 16 |
部屋型ID:固定部屋 / Fixed room
#define ROOM_T_FRACAVE 8 |
部屋型ID:フラクタル地形 / Fractal p_ptr->current_floor_ptr->grid_array (42x24)
#define ROOM_T_GLASS 14 |
部屋型ID:ガラス部屋 / Glass room
#define ROOM_T_GREATER_VAULT 7 |
部屋型ID:大型VAULT / Greater vault (66x44)
#define ROOM_T_INNER_FEAT 3 |
部屋型ID:二重壁 / Large (33x11)
#define ROOM_T_LESSER_VAULT 6 |
部屋型ID:小型VAULT / Lesser vault (33x22)
#define ROOM_T_MAX 17 |
部屋型ID最大数
#define ROOM_T_NEST 4 |
部屋型ID:モンスターNEST / Monster nest (33x11)
#define ROOM_T_NORMAL 0 |
部屋型ID:基本長方形 / Simple (33x11)
#define ROOM_T_OVAL 10 |
部屋型ID:円形部屋 / Circular rooms (22x22)
#define ROOM_T_OVERLAP 1 |
部屋型ID:長方形二つ重ね / Overlapping (33x11)
#define ROOM_T_PIT 5 |
部屋型ID:モンスターPIT / Monster pit (33x11)
#define ROOM_T_RANDOM_VAULT 9 |
部屋型ID:ランダムVAULT / Random vault (44x22)
#define ROOM_T_TRAP 13 |
部屋型ID:トラップ部屋 / Piranha/Armageddon trap room
#define ROOM_T_TRAP_PIT 12 |
部屋型ID:トラップつきモンスターPIT / Trapped monster pit
typedef struct room_info_type room_info_type |
void add_outer_wall | ( | POSITION | x, |
POSITION | y, | ||
int | light, | ||
POSITION | x1, | ||
POSITION | y1, | ||
POSITION | x2, | ||
POSITION | y2 | ||
) |
void build_cavern | ( | floor_type * | floor_ptr | ) |
void build_lake | ( | floor_type * | floor_ptr, |
int | type | ||
) |
void build_recursive_room | ( | floor_type * | floor_ptr, |
POSITION | x1, | ||
POSITION | y1, | ||
POSITION | x2, | ||
POSITION | y2, | ||
int | power | ||
) |
void build_room | ( | floor_type * | floor_ptr, |
POSITION | x1, | ||
POSITION | x2, | ||
POSITION | y1, | ||
POSITION | y2 | ||
) |
void build_small_room | ( | floor_type * | floor_ptr, |
POSITION | x0, | ||
POSITION | y0 | ||
) |
1マスだけの部屋を作成し、上下左右いずれか一つに隠しドアを配置する。
floor_ptr | 配置するフロアの参照ポインタ |
y0 | 配置したい中心のY座標 |
x0 | 配置したい中心のX座標 |
This funtion makes a very small room centred at (x0, y0) This is used in crypts, and random elemental vaults.
Note - this should be used only on allocated regions within another room.
POSITION dist2 | ( | POSITION | x1, |
POSITION | y1, | ||
POSITION | x2, | ||
POSITION | y2, | ||
POSITION | h1, | ||
POSITION | h2, | ||
POSITION | h3, | ||
POSITION | h4 | ||
) |
void fill_treasure | ( | floor_type * | floor_ptr, |
POSITION | x1, | ||
POSITION | x2, | ||
POSITION | y1, | ||
POSITION | y2, | ||
int | difficulty | ||
) |
部屋生成が可能なスペースを確保する / Find a good spot for the next room.
-LM-
y | 部屋の生成が可能な中心Y座標を返す参照ポインタ |
x | 部屋の生成が可能な中心X座標を返す参照ポインタ |
height | 確保したい領域の高さ |
width | 確保したい領域の幅 |
Find and allocate a free space in the dungeon large enough to hold
the room calling this function.
We allocate space in 11x11 blocks, but want to make sure that rooms
align neatly on the standard screen. Therefore, we make them use
blocks in few 11x33 rectangles as possible.
Be careful to include the edges of the room in height and width!
Return TRUE and values for the center of the room if all went well.
Otherwise, return FALSE.
bool generate_fracave | ( | floor_type * | floor_ptr, |
POSITION | y0, | ||
POSITION | x0, | ||
POSITION | xsize, | ||
POSITION | ysize, | ||
int | cutoff, | ||
bool | light, | ||
bool | room | ||
) |
void generate_hmap | ( | floor_type * | floor_ptr, |
POSITION | y0, | ||
POSITION | x0, | ||
POSITION | xsiz, | ||
POSITION | ysiz, | ||
int | grd, | ||
int | roug, | ||
int | cutoff | ||
) |
bool generate_lake | ( | floor_type * | floor_ptr, |
POSITION | y0, | ||
POSITION | x0, | ||
POSITION | xsize, | ||
POSITION | ysize, | ||
int | c1, | ||
int | c2, | ||
int | c3, | ||
int | type | ||
) |
bool generate_rooms | ( | floor_type * | floor_ptr | ) |
部屋生成処理のメインルーチン(Sangbandを経由してOangbandからの実装を引用) / Generate rooms in dungeon.
Build bigger rooms at first. [from SAngband (originally from OAngband)]
ダンジョンにBEGINNER、CHAMELEON、SMALLESTいずれのフラグもなく、 かつ「常に通常でない部屋を生成する」フラグがONならば、 GRATER_VAULTのみを生成対象とする。 / Ironman sees only Greater Vaults
ダンジョンにNO_VAULTフラグがあるならば、LESSER_VAULT / GREATER_VAULT/ RANDOM_VAULTを除外 / Forbidden vaults
ダンジョンにBEGINNERフラグがあるならば、FIXED_ROOMを除外 / Forbidden vaults
ダンジョンにNO_CAVEフラグがある場合、FRACAVEの生成枠がNORMALに与えられる。CRIPT、OVALの生成枠がINNER_Fに与えられる。/ NO_CAVE dungeon (Castle)
ダンジョンにCAVEフラグがある場合、NORMALの生成枠がFRACAVEに与えられる。/ CAVE dungeon (Orc floor_ptr->grid_array etc.)
ダンジョンの基本地形が最初から渓谷かアリーナ型の場合 FRACAVE は生成から除外。 / No caves when a (random) cavern exists: they look bad
ダンジョンに最初からGLASS_ROOMフラグがある場合、GLASS を生成から除外。/ Forbidden glass rooms
ARCADEは同フラグがダンジョンにないと生成されない。 / Forbidden glass rooms
部屋生成数が2未満の場合生成失敗を返す
void r_visit | ( | floor_type * | floor_ptr, |
POSITION | y1, | ||
POSITION | x1, | ||
POSITION | y2, | ||
POSITION | x2, | ||
int | node, | ||
DIRECTION | dir, | ||
int * | visited | ||
) |
door_type feat_door[MAX_DOOR_TYPES] |