ダンジョンフロアの部屋生成処理 / make rooms. [詳細]
データ構造 | |
struct | vault_aux_type |
pit/nest型情報の構造体定義 [詳細] | |
struct | nest_mon_info_type |
デバッグ時にnestのモンスター情報を確認するための構造体 / A struct for nest monster information with cheat_hear [詳細] | |
struct | fill_data_type |
struct | ugbldg_type |
マクロ定義 | |
#define | vault_monster_okay(I) |
vaultに配置可能なモンスターの条件を指定するマクロ / Monster validation macro [詳細] | |
#define | NEST_TYPE_CLONE 0 |
nestのID定義 / Nest types code [詳細] | |
#define | NEST_TYPE_JELLY 1 |
#define | NEST_TYPE_SYMBOL_GOOD 2 |
#define | NEST_TYPE_SYMBOL_EVIL 3 |
#define | NEST_TYPE_MIMIC 4 |
#define | NEST_TYPE_LOVECRAFTIAN 5 |
#define | NEST_TYPE_KENNEL 6 |
#define | NEST_TYPE_ANIMAL 7 |
#define | NEST_TYPE_CHAPEL 8 |
#define | NEST_TYPE_UNDEAD 9 |
#define | PIT_TYPE_ORC 0 |
pitのID定義 / Pit types code [詳細] | |
#define | PIT_TYPE_TROLL 1 |
#define | PIT_TYPE_GIANT 2 |
#define | PIT_TYPE_LOVECRAFTIAN 3 |
#define | PIT_TYPE_SYMBOL_GOOD 4 |
#define | PIT_TYPE_SYMBOL_EVIL 5 |
#define | PIT_TYPE_CHAPEL 6 |
#define | PIT_TYPE_DRAGON 7 |
#define | PIT_TYPE_DEMON 8 |
#define | PIT_TYPE_DARK_ELF 9 |
#define | NUM_NEST_MON_TYPE 64 |
nestの種別数 [詳細] | |
#define | BUBBLENUM 10 /* number of bubbles */ |
#define | MIN_TOWN_WID ((MAX_WID / 3) / 2) |
#define | MIN_TOWN_HGT ((MAX_HGT / 3) / 2) |
#define | MAX_TOWN_WID ((MAX_WID / 3) * 2 / 3) |
#define | MAX_TOWN_HGT ((MAX_HGT / 3) * 2 / 3) |
#define | MOVE_PLIST(dst, src) (prob_list[dst] += prob_list[src], prob_list[src] = 0) |
指定した部屋の生成確率を別の部屋に加算し、指定した部屋の生成率を0にする [詳細] | |
型定義 | |
typedef struct vault_aux_type | vault_aux_type |
pit/nest型情報のtypedef [詳細] | |
typedef struct fill_data_type | fill_data_type |
関数 | |
static void | place_locked_door (int y, int x) |
鍵のかかったドアを配置する [詳細] | |
static void | place_secret_door (int y, int x, int type) |
隠しドアを配置する [詳細] | |
static void | build_small_room (int x0, int y0) |
1マスだけの部屋を作成し、上下左右いずれか一つに隠しドアを配置する。 [詳細] | |
static void | check_room_boundary (int x1, int y1, int x2, int y2) |
指定範囲に通路が通っていることを確認した上で床で埋める This function tunnels around a room if it will cut off part of a cave system. [詳細] | |
static bool | find_space_aux (int blocks_high, int blocks_wide, int block_y, int block_x) |
find_space()の予備処理として部屋の生成が可能かを判定する / Helper function for find_space(). [詳細] | |
static bool | find_space (int *y, int *x, int height, int width) |
部屋生成が可能なスペースを確保する / Find a good spot for the next room. [詳細] | |
static bool | build_type1 (void) |
タイプ1の部屋…通常可変長方形の部屋を生成する / Type 1 – normal rectangular rooms [詳細] | |
static bool | build_type2 (void) |
タイプ2の部屋…二重長方形の部屋を生成する / Type 2 – Overlapping rectangular rooms [詳細] | |
static bool | build_type3 (void) |
タイプ2の部屋…十字型の部屋を生成する / Type 3 – Cross shaped rooms [詳細] | |
static bool | build_type4 (void) |
タイプ4の部屋…固定サイズの二重構造部屋を生成する / Type 4 – Large room with inner features [詳細] | |
static bool | vault_aux_simple (int r_idx) |
モンスターがVault生成の最低必要条件を満たしているかを返す / Helper monster selection function [詳細] | |
static bool | vault_aux_jelly (int r_idx) |
モンスターがゼリーnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (jelly)" [詳細] | |
static bool | vault_aux_animal (int r_idx) |
モンスターが動物nestの生成必要条件を満たしているかを返す / Helper function for "monster nest (animal)" [詳細] | |
static bool | vault_aux_undead (int r_idx) |
モンスターがアンデッドnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (undead)" [詳細] | |
static bool | vault_aux_chapel_g (int r_idx) |
モンスターが聖堂nestの生成必要条件を満たしているかを返す / Helper function for "monster nest (chapel)" [詳細] | |
static bool | vault_aux_kennel (int r_idx) |
モンスターが犬小屋nestの生成必要条件を満たしているかを返す / Helper function for "monster nest (kennel)" [詳細] | |
static bool | vault_aux_mimic (int r_idx) |
モンスターがミミックnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (mimic)" [詳細] | |
static bool | vault_aux_clone (int r_idx) |
モンスターが単一クローンnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (clone)" [詳細] | |
static bool | vault_aux_symbol_e (int r_idx) |
モンスターが邪悪属性シンボルクローンnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (symbol clone)" [詳細] | |
static bool | vault_aux_symbol_g (int r_idx) |
モンスターが善良属性シンボルクローンnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (symbol clone)" [詳細] | |
static bool | vault_aux_orc (int r_idx) |
モンスターがオークpitの生成必要条件を満たしているかを返す / Helper function for "monster pit (orc)" [詳細] | |
static bool | vault_aux_troll (int r_idx) |
モンスターがトロルpitの生成必要条件を満たしているかを返す / Helper function for "monster pit (troll)" [詳細] | |
static bool | vault_aux_giant (int r_idx) |
モンスターが巨人pitの生成必要条件を満たしているかを返す / Helper function for "monster pit (giant)" [詳細] | |
static bool | vault_aux_dragon (int r_idx) |
モンスターがドラゴンpitの生成必要条件を満たしているかを返す / Helper function for "monster pit (dragon)" [詳細] | |
static bool | vault_aux_demon (int r_idx) |
モンスターが悪魔pitの生成必要条件を満たしているかを返す / Helper function for "monster pit (demon)" [詳細] | |
static bool | vault_aux_cthulhu (int r_idx) |
モンスターが狂気pitの生成必要条件を満たしているかを返す / Helper function for "monster pit (lovecraftian)" [詳細] | |
static void | vault_prep_clone (void) |
pit/nestの基準となる単種モンスターを決める / [詳細] | |
static void | vault_prep_symbol (void) |
pit/nestの基準となるモンスターシンボルを決める / [詳細] | |
static void | vault_prep_dragon (void) |
pit/nestの基準となるドラゴンの種類を決める / [詳細] | |
static bool | vault_aux_dark_elf (int r_idx) |
モンスターがダークエルフpitの生成必要条件を満たしているかを返す / Helper function for "monster pit (dark elf)" [詳細] | |
static int | pick_vault_type (vault_aux_type *l_ptr, s16b allow_flag_mask) |
ダンジョン毎に指定されたピット配列を基準にランダムなpit/nestタイプを決める [詳細] | |
static cptr | pit_subtype_string (int type, bool nest) |
デバッグ時に生成されたpit/nestの型を出力する処理 [詳細] | |
static bool | ang_sort_comp_nest_mon_info (vptr u, vptr v, int a, int b) |
static void | ang_sort_swap_nest_mon_info (vptr u, vptr v, int a, int b) |
nestのモンスターリストをスワップするための関数 / Swap function for sorting nest monster information [詳細] | |
static bool | build_type5 (void) |
タイプ5の部屋…nestを生成する / Type 5 – Monster nests [詳細] | |
static bool | build_type6 (void) |
タイプ6の部屋…pitを生成する / Type 6 – Monster pits [詳細] | |
static void | coord_trans (int *x, int *y, int xoffset, int yoffset, int transno) |
Vault地形を回転、上下左右反転するための座標変換を返す / coordinate translation code. [詳細] | |
static void | build_vault (int yval, int xval, int ymax, int xmax, cptr data, int xoffset, int yoffset, int transno) |
Vaultをフロアに配置する / Hack – fill in "vault" rooms. [詳細] | |
static bool | build_type7 (void) |
タイプ7の部屋…v_info.txtより小型vaultを生成する / Type 7 – simple vaults (see "v_info.txt") [詳細] | |
static bool | build_type8 (void) |
タイプ8の部屋…v_info.txtより大型vaultを生成する / Type 8 – greater vaults (see "v_info.txt") [詳細] | |
static void | store_height (int x, int y, int val) |
static void | generate_hmap (int y0, int x0, int xsiz, int ysiz, int grd, int roug, int cutoff) |
static bool | hack_isnt_wall (int y, int x, int c1, int c2, int c3, int feat1, int feat2, int feat3, int info1, int info2, int info3) |
static void | cave_fill (byte y, byte x) |
static bool | generate_fracave (int y0, int x0, int xsize, int ysize, int cutoff, bool light, bool room) |
static bool | build_type9 (void) |
タイプ9の部屋…フラクタルカーブによる洞窟生成 / Type 9 – Driver routine to create fractal cave system [詳細] | |
void | build_cavern (void) |
static bool | generate_lake (int y0, int x0, int xsize, int ysize, int c1, int c2, int c3, int type) |
void | build_lake (int type) |
static void | add_door (int x, int y) |
static void | fill_treasure (int x1, int x2, int y1, int y2, int difficulty) |
static void | build_bubble_vault (int x0, int y0, int xsize, int ysize) |
static void | build_room (int x1, int x2, int y1, int y2) |
static void | build_room_vault (int x0, int y0, int xsize, int ysize) |
static void | build_cave_vault (int x0, int y0, int xsiz, int ysiz) |
static void | r_visit (int y1, int x1, int y2, int x2, int node, int dir, int *visited) |
void | build_maze_vault (int x0, int y0, int xsize, int ysize, bool is_vault) |
static void | build_mini_c_vault (int x0, int y0, int xsize, int ysize) |
static void | build_recursive_room (int x1, int y1, int x2, int y2, int power) |
static void | build_castle_vault (int x0, int y0, int xsize, int ysize) |
static void | add_outer_wall (int x, int y, int light, int x1, int y1, int x2, int y2) |
static int | dist2 (int x1, int y1, int x2, int y2, int h1, int h2, int h3, int h4) |
static void | build_target_vault (int x0, int y0, int xsize, int ysize) |
static void | build_elemental_vault (int x0, int y0, int xsiz, int ysiz) |
static bool | build_type10 (void) |
タイプ10の部屋…ランダム生成vault / Type 10 – Random vaults [詳細] | |
static bool | build_type11 (void) |
タイプ11の部屋…円形部屋の生成 / Type 11 – Build an vertical oval room. [詳細] | |
static bool | build_type12 (void) |
タイプ12の部屋…ドーム型部屋の生成 / Type 12 – Build crypt room. [詳細] | |
static bool | vault_aux_trapped_pit (int r_idx) |
static bool | build_type13 (void) |
タイプ13の部屋…トラップpitの生成 / Type 13 – Trapped monster pits [詳細] | |
static bool | build_type14 (void) |
タイプ14の部屋…特殊トラップ部屋の生成 / Type 14 – trapped rooms [詳細] | |
static bool | vault_aux_lite (int r_idx) |
static bool | vault_aux_shards (int r_idx) |
static bool | kind_is_potion (int k_idx) |
static bool | build_type15 (void) |
タイプ15の部屋…ガラス部屋の生成 / Type 15 – glass rooms [詳細] | |
void | generate_room_floor (int y1, int x1, int y2, int x2, int light) |
void | generate_fill_perm_bold (int y1, int x1, int y2, int x2) |
static bool | precalc_ugarcade (int town_hgt, int town_wid, int n) |
static void | build_stores (int ltcy, int ltcx, int stores[], int n) |
タイプ16の部屋…地下都市生成のサブルーチン / Actually create buildings [詳細] | |
static bool | build_type16 (void) |
タイプ16の部屋…地下都市の生成 / Type 16 – Underground Arcade [詳細] | |
static bool | room_build (int typ) |
与えられた部屋型IDに応じて部屋の生成処理分岐を行い結果を返す / Attempt to build a room of the given type at the given block [詳細] | |
bool | generate_rooms (void) |
部屋生成処理のメインルーチン(Sangbandを経由してOangbandからの実装を引用) / Generate rooms in dungeon. [詳細] | |
変数 | |
static room_info_type | room_info_normal [ROOM_T_MAX] |
各部屋タイプの生成比定義 [from SAngband (originally from OAngband)] Table of values that control how many times each type of room will appear. [詳細] | |
static byte | room_build_order [ROOM_T_MAX] |
部屋の生成処理順 / Build rooms in descending order of difficulty. [詳細] | |
static int | vault_aux_race |
通常pit生成時のモンスターの構成条件ID / Race index for "monster pit (clone)" [詳細] | |
static char | vault_aux_char |
単一シンボルpit生成時の指定シンボル / Race index for "monster pit (symbol clone)" [詳細] | |
static u32b | vault_aux_dragon_mask4 |
ブレス属性に基づくドラゴンpit生成時条件マスク / Breath mask for "monster pit (dragon)" [詳細] | |
static vault_aux_type | nest_types [] |
nest情報テーブル [詳細] | |
static vault_aux_type | pit_types [] |
pit情報テーブル [詳細] | |
static fill_data_type | fill_data |
ugbldg_type * | ugbldg |
ダンジョンフロアの部屋生成処理 / make rooms.
Used by generate.c when creating dungeons.
Room building routines.
Room types:
1 – normal
2 – overlapping
3 – cross shaped
4 – large room with features
5 – monster nests
6 – monster pits
7 – simple vaults
8 – greater vaults
9 – fractal caves
10 – random vaults
11 – circular rooms
12 – crypts
13 – trapped monster pits
14 – trapped room
15 – glass room
16 – underground arcade
Some functions are used to determine if the given monster
is appropriate for inclusion in a monster nest or monster pit or
the given type.
None of the pits/nests are allowed to include "unique" monsters.
#define BUBBLENUM 10 /* number of bubbles */ |
#define MAX_TOWN_HGT ((MAX_HGT / 3) * 2 / 3) |
#define MAX_TOWN_WID ((MAX_WID / 3) * 2 / 3) |
#define MIN_TOWN_HGT ((MAX_HGT / 3) / 2) |
#define MIN_TOWN_WID ((MAX_WID / 3) / 2) |
#define MOVE_PLIST | ( | dst, | |
src | |||
) | (prob_list[dst] += prob_list[src], prob_list[src] = 0) |
指定した部屋の生成確率を別の部屋に加算し、指定した部屋の生成率を0にする
dst | 確率を移す先の部屋種ID |
src | 確率を与える元の部屋種ID |
#define NEST_TYPE_ANIMAL 7 |
#define NEST_TYPE_CHAPEL 8 |
#define NEST_TYPE_CLONE 0 |
nestのID定義 / Nest types code
#define NEST_TYPE_JELLY 1 |
#define NEST_TYPE_KENNEL 6 |
#define NEST_TYPE_LOVECRAFTIAN 5 |
#define NEST_TYPE_MIMIC 4 |
#define NEST_TYPE_SYMBOL_EVIL 3 |
#define NEST_TYPE_SYMBOL_GOOD 2 |
#define NEST_TYPE_UNDEAD 9 |
#define NUM_NEST_MON_TYPE 64 |
nestの種別数
#define PIT_TYPE_CHAPEL 6 |
#define PIT_TYPE_DARK_ELF 9 |
#define PIT_TYPE_DEMON 8 |
#define PIT_TYPE_DRAGON 7 |
#define PIT_TYPE_GIANT 2 |
#define PIT_TYPE_LOVECRAFTIAN 3 |
#define PIT_TYPE_ORC 0 |
pitのID定義 / Pit types code
#define PIT_TYPE_SYMBOL_EVIL 5 |
#define PIT_TYPE_SYMBOL_GOOD 4 |
#define PIT_TYPE_TROLL 1 |
#define vault_monster_okay | ( | I | ) |
vaultに配置可能なモンスターの条件を指定するマクロ / Monster validation macro
Line 1 – forbid town monsters Line 2 – forbid uniques Line 3 – forbid aquatic monsters
typedef struct fill_data_type fill_data_type |
typedef struct vault_aux_type vault_aux_type |
pit/nest型情報のtypedef
|
static |
|
static |
nestのモンスターリストをスワップするための関数 / Swap function for sorting nest monster information
u | スワップ処理対象配列ポインタ |
v | 未使用 |
a | スワップ対象参照ID1 |
b | スワップ対象参照ID2 |
|
static |
|
static |
|
static |
void build_cavern | ( | void | ) |
|
static |
void build_lake | ( | int | type | ) |
void build_maze_vault | ( | int | x0, |
int | y0, | ||
int | xsize, | ||
int | ysize, | ||
bool | is_vault | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
1マスだけの部屋を作成し、上下左右いずれか一つに隠しドアを配置する。
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.
|
static |
タイプ16の部屋…地下都市生成のサブルーチン / Actually create buildings
ltcy | 生成基準Y座標 |
ltcx | 生成基準X座標 |
stotes[] | 生成する店舗のリスト |
n | 生成する店舗の数 |
|
static |
|
static |
タイプ1の部屋…通常可変長方形の部屋を生成する / Type 1 – normal rectangular rooms
|
static |
タイプ10の部屋…ランダム生成vault / Type 10 – Random vaults
|
static |
タイプ11の部屋…円形部屋の生成 / Type 11 – Build an vertical oval room.
For every grid in the possible square, check the distance.
If it's less than the radius, make it a room square.
When done fill from the inside to find the walls,
|
static |
タイプ12の部屋…ドーム型部屋の生成 / Type 12 – Build crypt room.
For every grid in the possible square, check the (fake) distance.
If it's less than the radius, make it a room square.
When done fill from the inside to find the walls,
|
static |
タイプ13の部屋…トラップpitの生成 / Type 13 – Trapped monster pits
A trapped monster pit is a "big" room with a straight corridor in
which wall opening traps are placed, and with two "inner" rooms
containing a "collection" of monsters of a given type organized in
the room.
The trapped monster pit appears as shown below, where the actual
monsters in each location depend on the type of the pit
XXXXXXXXXXXXXXXXXXXXXXXXX
X X
XXXXXXXXXXXXXXXXXXXXXXX X
XXXXX001123454321100XXX X
XXX0012234567654322100X X
XXXXXXXXXXXXXXXXXXXXXXX X
X ^ X
X XXXXXXXXXXXXXXXXXXXXXXX
X X0012234567654322100XXX
X XXX001123454321100XXXXX
X XXXXXXXXXXXXXXXXXXXXXXX
X X
XXXXXXXXXXXXXXXXXXXXXXXXX
Note that the monsters in the pit are now chosen by using "get_mon_num()"
to request 16 "appropriate" monsters, sorting them by level, and using
the "even" entries in this sorted list for the contents of the pit.
Hack – all of the "dragons" in a "dragon" pit must be the same "color",
which is handled by requiring a specific "breath" attack for all of the
dragons. This may include "multi-hued" breath. Note that "wyrms" may
be present in many of the dragon pits, if they have the proper breath.
Note the use of the "get_mon_num_prep()" function, and the special
"get_mon_num_hook()" restriction function, to prepare the "monster\n
allocation table" in such a way as to optimize the selection of
"appropriate" non-unique monsters for the pit.
Note that the "get_mon_num()" function may (rarely) fail, in which case
the pit will be empty.
Note that "monster pits" will never contain "unique" monsters.
|
static |
タイプ14の部屋…特殊トラップ部屋の生成 / Type 14 – trapped rooms
A special trap is placed at center of the room
|
static |
タイプ15の部屋…ガラス部屋の生成 / Type 15 – glass rooms
|
static |
タイプ16の部屋…地下都市の生成 / Type 16 – Underground Arcade
Town logic flow for generation of new town
Originally from Vanilla 3.0.3
We start with a fully wiped cave of normal floors.
Note that town_gen_hack() plays games with the R.N.G.
This function does NOT do anything about the owners of the stores,
nor the contents thereof. It only handles the physical layout.
|
static |
タイプ2の部屋…二重長方形の部屋を生成する / Type 2 – Overlapping rectangular rooms
|
static |
タイプ2の部屋…十字型の部屋を生成する / Type 3 – Cross shaped rooms
Builds a room at a row, column coordinate
Room "a" runs north/south, and Room "b" runs east/east
So the "central pillar" runs from x1a, y1b to x2a, y2b.
Note that currently, the "center" is always 3x3, but I think that
the code below will work (with "bounds checking") for 5x5, or even
for unsymetric values like 4x3 or 5x3 or 3x4 or 3x5, or even larger.
|
static |
タイプ4の部屋…固定サイズの二重構造部屋を生成する / Type 4 – Large room with inner features
Possible sub-types:
1 - Just an inner room with one door
2 - An inner room within an inner room
3 - An inner room with pillar(s)
4 - Inner room has a maze
5 - A set of four inner rooms
|
static |
タイプ5の部屋…nestを生成する / Type 5 – Monster nests
A monster nest is a "big" room, with an "inner" room, containing
a "collection" of monsters of a given type strewn about the room.
The monsters are chosen from a set of 64 randomly selected monster
races, to allow the nest creation to fail instead of having "holes".
Note the use of the "get_mon_num_prep()" function, and the special
"get_mon_num_hook()" restriction function, to prepare the "monster\n
allocation table" in such a way as to optimize the selection of
"appropriate" non-unique monsters for the nest.
Note that the "get_mon_num()" function may (rarely) fail, in which
case the nest will be empty.
Note that "monster nests" will never contain "unique" monsters.
|
static |
タイプ6の部屋…pitを生成する / Type 6 – Monster pits
A monster pit is a "big" room, with an "inner" room, containing
a "collection" of monsters of a given type organized in the room.
The inside room in a monster pit appears as shown below, where the
actual monsters in each location depend on the type of the pit
XXXXXXXXXXXXXXXXXXXXX
X0000000000000000000X
X0112233455543322110X
X0112233467643322110X
X0112233455543322110X
X0000000000000000000X
XXXXXXXXXXXXXXXXXXXXX
Note that the monsters in the pit are now chosen by using "get_mon_num()"
to request 16 "appropriate" monsters, sorting them by level, and using
the "even" entries in this sorted list for the contents of the pit.
Hack – all of the "dragons" in a "dragon" pit must be the same "color",
which is handled by requiring a specific "breath" attack for all of the
dragons. This may include "multi-hued" breath. Note that "wyrms" may
be present in many of the dragon pits, if they have the proper breath.
Note the use of the "get_mon_num_prep()" function, and the special
"get_mon_num_hook()" restriction function, to prepare the "monster\n
allocation table" in such a way as to optimize the selection of
"appropriate" non-unique monsters for the pit.
Note that the "get_mon_num()" function may (rarely) fail, in which case
the pit will be empty.
Note that "monster pits" will never contain "unique" monsters.
|
static |
タイプ7の部屋…v_info.txtより小型vaultを生成する / Type 7 – simple vaults (see "v_info.txt")
|
static |
タイプ8の部屋…v_info.txtより大型vaultを生成する / Type 8 – greater vaults (see "v_info.txt")
|
static |
タイプ9の部屋…フラクタルカーブによる洞窟生成 / Type 9 – Driver routine to create fractal cave system
|
static |
Vaultをフロアに配置する / Hack – fill in "vault" rooms.
yval | 生成基準Y座標 |
xval | 生成基準X座標 |
ymax | VaultのYサイズ |
xmax | VaultのXサイズ |
data | Vaultのデータ文字列 |
xoffset | 変換基準X座標 |
yoffset | 変換基準Y座標 |
transno | 変換ID |
|
static |
指定範囲に通路が通っていることを確認した上で床で埋める This function tunnels around a room if it will cut off part of a cave system.
x1 | 範囲の左端 |
y1 | 範囲の上端 |
x2 | 範囲の右端 |
y2 | 範囲の下端 |
|
static |
Vault地形を回転、上下左右反転するための座標変換を返す / coordinate translation code.
x | 変換したい点のX座標参照ポインタ |
y | 変換したい点のY座標参照ポインタ |
xoffset | Vault生成時の基準X座標 |
yoffset | Vault生成時の基準Y座標 |
transno | 処理ID |
|
static |
|
static |
|
static |
部屋生成が可能なスペースを確保する / 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.
|
static |
find_space()の予備処理として部屋の生成が可能かを判定する / Helper function for find_space().
Is this a good location?
blocks_high | 範囲の高さ |
blocks_wide | 範囲の幅 |
block_y | 範囲の上端 |
block_x | 範囲の左端 |
void generate_fill_perm_bold | ( | int | y1, |
int | x1, | ||
int | y2, | ||
int | x2 | ||
) |
|
static |
|
static |
|
static |
void generate_room_floor | ( | int | y1, |
int | x1, | ||
int | y2, | ||
int | x2, | ||
int | light | ||
) |
bool generate_rooms | ( | void | ) |
部屋生成処理のメインルーチン(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
ダンジョンにNO_CAVEフラグがある場合、FRACAVEの生成枠がNORMALに与えられる。CRIPT、OVALの生成枠がINNER_Fに与えられる。/ NO_CAVE dungeon (Castle)
ダンジョンにCAVEフラグがある場合、NORMALの生成枠がFRACAVEに与えられる。/ CAVE dungeon (Orc cave etc.)
ダンジョンの基本地形が最初から渓谷かアリーナ型の場合 FRACAVE は生成から除外。 / No caves when a (random) cavern exists: they look bad
ダンジョンに最初からGLASS_ROOMフラグがある場合、GLASS を生成から除外。/ Forbidden glass rooms
ARCADEは同フラグがダンジョンにないと生成されない。 / Forbidden glass rooms
部屋生成数が2未満の場合生成失敗を返す
|
static |
|
static |
|
static |
ダンジョン毎に指定されたピット配列を基準にランダムなpit/nestタイプを決める
l_ptr | 選択されたpit/nest情報を返す参照ポインタ |
allow_flag_mask | 生成が許されるpit/nestのビット配列 |
デバッグ時に生成されたpit/nestの型を出力する処理
type | pit/nestの型ID |
nest | TRUEならばnest、FALSEならばpit |
Hack – Get the string describing subtype of pit/nest Determined in prepare function (some pit/nest only)
|
static |
鍵のかかったドアを配置する
y | 配置したいフロアのY座標 |
x | 配置したいフロアのX座標 |
|
static |
隠しドアを配置する
y | 配置したいフロアのY座標 |
x | 配置したいフロアのX座標 |
type | DOOR_DEFAULT / DOOR_DOOR / DOOR_GLASS_DOOR / DOOR_CURTAIN のいずれか |
|
static |
|
static |
|
static |
与えられた部屋型IDに応じて部屋の生成処理分岐を行い結果を返す / Attempt to build a room of the given type at the given block
type | 部屋型ID |
|
static |
|
static |
モンスターが動物nestの生成必要条件を満たしているかを返す / Helper function for "monster nest (animal)"
r_idx | 確認したいモンスター種族ID |
|
static |
モンスターが聖堂nestの生成必要条件を満たしているかを返す / Helper function for "monster nest (chapel)"
r_idx | 確認したいモンスター種族ID |
|
static |
モンスターが単一クローンnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (clone)"
r_idx | 確認したいモンスター種族ID |
|
static |
モンスターが狂気pitの生成必要条件を満たしているかを返す / Helper function for "monster pit (lovecraftian)"
r_idx | 確認したいモンスター種族ID |
|
static |
モンスターがダークエルフpitの生成必要条件を満たしているかを返す / Helper function for "monster pit (dark elf)"
r_idx | 確認したいモンスター種族ID |
|
static |
モンスターが悪魔pitの生成必要条件を満たしているかを返す / Helper function for "monster pit (demon)"
r_idx | 確認したいモンスター種族ID |
|
static |
モンスターがドラゴンpitの生成必要条件を満たしているかを返す / Helper function for "monster pit (dragon)"
r_idx | 確認したいモンスター種族ID |
|
static |
モンスターが巨人pitの生成必要条件を満たしているかを返す / Helper function for "monster pit (giant)"
r_idx | 確認したいモンスター種族ID |
|
static |
モンスターがゼリーnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (jelly)"
r_idx | 確認したいモンスター種族ID |
|
static |
モンスターが犬小屋nestの生成必要条件を満たしているかを返す / Helper function for "monster nest (kennel)"
r_idx | 確認したいモンスター種族ID |
|
static |
|
static |
モンスターがミミックnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (mimic)"
r_idx | 確認したいモンスター種族ID |
|
static |
モンスターがオークpitの生成必要条件を満たしているかを返す / Helper function for "monster pit (orc)"
r_idx | 確認したいモンスター種族ID |
|
static |
|
static |
モンスターがVault生成の最低必要条件を満たしているかを返す / Helper monster selection function
r_idx | 確認したいモンスター種族ID |
|
static |
モンスターが邪悪属性シンボルクローンnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (symbol clone)"
r_idx | 確認したいモンスター種族ID |
|
static |
モンスターが善良属性シンボルクローンnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (symbol clone)"
r_idx | 確認したいモンスター種族ID |
|
static |
|
static |
モンスターがトロルpitの生成必要条件を満たしているかを返す / Helper function for "monster pit (troll)"
r_idx | 確認したいモンスター種族ID |
|
static |
モンスターがアンデッドnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (undead)"
r_idx | 確認したいモンスター種族ID |
|
static |
pit/nestの基準となる単種モンスターを決める /
|
static |
pit/nestの基準となるドラゴンの種類を決める /
|
static |
pit/nestの基準となるモンスターシンボルを決める /
|
static |
|
static |
nest情報テーブル
|
static |
pit情報テーブル
|
static |
部屋の生成処理順 / Build rooms in descending order of difficulty.
|
static |
各部屋タイプの生成比定義 [from SAngband (originally from OAngband)]
Table of values that control how many times each type of room will
appear.
Each type of room has its own row, and each column
corresponds to dungeon levels 0, 10, 20, and so on. The final
value is the minimum depth the room can appear at. -LM-
Level 101 and below use the values for level 100.
Rooms with lots of monsters or loot may not be generated if the
object or monster lists are already nearly full. Rooms will not
appear above their minimum depth. Tiny levels will not have space
for all the rooms you ask for.
ugbldg_type* ugbldg |
|
static |
単一シンボルpit生成時の指定シンボル / Race index for "monster pit (symbol clone)"
|
static |
ブレス属性に基づくドラゴンpit生成時条件マスク / Breath mask for "monster pit (dragon)"
|
static |
通常pit生成時のモンスターの構成条件ID / Race index for "monster pit (clone)"