荒野マップの生成とルール管理 / Wilderness generation [詳細]
#include "angband.h"
データ構造 | |
struct | wilderness_grid |
マクロ定義 | |
#define | MAX_FEAT_IN_TERRAIN 18 |
型定義 | |
typedef struct wilderness_grid | wilderness_grid |
typedef wilderness_type * | wilderness_type_ptr |
関数 | |
static void | set_floor_and_wall_aux (s16b feat_type[100], feat_prob prob[DUNGEON_FEAT_PROB_NUM]) |
地形生成確率を決める要素100の配列を確率テーブルから作成する [詳細] | |
void | set_floor_and_wall (byte type) |
ダンジョンの地形を指定確率に応じて各マスへランダムに敷き詰める / Fill the arrays of floors and walls in the good proportions [詳細] | |
static void | perturb_point_mid (int x1, int x2, int x3, int x4, int xmid, int ymid, int rough, int depth_max) |
プラズマフラクタル的地形生成の再帰中間処理 / Helper for plasma generation. [詳細] | |
static void | perturb_point_end (int x1, int x2, int x3, int xmid, int ymid, int rough, int depth_max) |
プラズマフラクタル的地形生成の再帰末端処理 / Helper for plasma generation. [詳細] | |
static void | plasma_recursive (int x1, int y1, int x2, int y2, int depth_max, int rough) |
プラズマフラクタル的地形生成の開始処理 / Helper for plasma generation. [詳細] | |
static void | generate_wilderness_area (int terrain, u32b seed, bool border, bool corner) |
荒野フロア生成のサブルーチン [詳細] | |
static void | generate_area (int y, int x, bool border, bool corner) |
荒野フロア生成のメインルーチン / Load a town or generate a terrain level using "plasma" fractals. [詳細] | |
void | wilderness_gen (void) |
広域マップの生成 / Build the wilderness area outside of the town. [詳細] | |
void | wilderness_gen_small () |
広域マップの生成(簡易処理版) / Build the wilderness area. [詳細] | |
errr | parse_line_wilderness (char *buf, int ymin, int xmin, int ymax, int xmax, int *y, int *x) |
w_info.txtのデータ解析 / Parse a sub-file of the "extra info" [詳細] | |
void | seed_wilderness (void) |
ゲーム開始時に各荒野フロアの乱数シードを指定する / Generate the random seeds for the wilderness [詳細] | |
errr | init_wilderness (void) |
ゲーム開始時の荒野初期化メインルーチン / Initialize wilderness array [詳細] | |
static void | init_terrain_table (int terrain, s16b feat_global, cptr fmt,...) |
荒野の地勢設定を初期化する / Initialize wilderness array [詳細] | |
void | init_wilderness_terrains (void) |
荒野の地勢設定全体を初期化するメインルーチン / Initialize arrays for wilderness terrains [詳細] | |
bool | change_wild_mode (void) |
荒野から広域マップへの切り替え処理 / Initialize arrays for wilderness terrains [詳細] | |
変数 | |
static s16b | terrain_table [MAX_WILDERNESS][MAX_FEAT_IN_TERRAIN] |
static border_type | border |
static s16b | conv_terrain2feat [MAX_WILDERNESS] |
static wilderness_grid | w_letter [255] |
荒野マップの生成とルール管理 / Wilderness generation
#define MAX_FEAT_IN_TERRAIN 18 |
typedef struct wilderness_grid wilderness_grid |
typedef wilderness_type* wilderness_type_ptr |
bool change_wild_mode | ( | void | ) |
荒野から広域マップへの切り替え処理 / Initialize arrays for wilderness terrains
荒野フロア生成のメインルーチン / Load a town or generate a terrain level using "plasma" fractals.
y | 広域マップY座標 |
x | 広域マップY座標 |
border | 広域マップの辺部分としての生成ならばTRUE |
corner | 広域マップの角部分としての生成ならばTRUE |
x and y are the coordinates of the area in the wilderness. Border and corner are optimization flags to speed up the generation of the fractal terrain. If border is set then only the border of the terrain should be generated (for initializing the border structure). If corner is set then only the corners of the area are needed.
荒野フロア生成のサブルーチン
terrain | 荒野地形ID |
seed | 乱数の固定シード |
border | 未使用 |
corner | 広域マップの角部分としての生成ならばTRUE |
荒野の地勢設定を初期化する / Initialize wilderness array
terrain | 初期化したい地勢ID |
feat_global | 基本的な地形ID |
fmt | 地勢内の地形数を参照するための独自フォーマット |
errr init_wilderness | ( | void | ) |
ゲーム開始時の荒野初期化メインルーチン / Initialize wilderness array
void init_wilderness_terrains | ( | void | ) |
荒野の地勢設定全体を初期化するメインルーチン / Initialize arrays for wilderness terrains
errr parse_line_wilderness | ( | char * | buf, |
int | ymin, | ||
int | xmin, | ||
int | ymax, | ||
int | xmax, | ||
int * | y, | ||
int * | x | ||
) |
w_info.txtのデータ解析 / Parse a sub-file of the "extra info"
buf | 読み取ったデータ行のバッファ |
ymin | 未使用 |
xmin | 広域地形マップを読み込みたいx座標の開始位置 |
ymax | 未使用 |
xmax | 広域地形マップを読み込みたいx座標の終了位置 |
y | 広域マップの高さを返す参照ポインタ |
x | 広域マップの幅を返す参照ポインタ |
|
static |
プラズマフラクタル的地形生成の再帰末端処理 / Helper for plasma generation.
x1 | 中間末端部1の重み |
x2 | 中間末端部2の重み |
x3 | 中間末端部3の重み |
xmid | 最終末端部座標X |
ymid | 最終末端部座標Y |
rough | ランダム幅 |
depth_max | 深みの最大値 |
|
static |
プラズマフラクタル的地形生成の再帰中間処理 / Helper for plasma generation.
x1 | 左上端の深み |
x2 | 右上端の深み |
x3 | 左下端の深み |
x4 | 右下端の深み |
xmid | 中央座標X |
ymid | 中央座標Y |
rough | ランダム幅 |
depth_max | 深みの最大値 |
|
static |
プラズマフラクタル的地形生成の開始処理 / Helper for plasma generation.
x1 | 処理範囲の左上X座標 |
y1 | 処理範囲の左上Y座標 |
x2 | 処理範囲の右下X座標 |
y2 | 処理範囲の右下Y座標 |
depth_max | 深みの最大値 |
rough | ランダム幅 |
A generic function to generate the plasma fractal.
Note that it uses cave_feat'' as temporary storage.
The values in
cave_feat'' after this function
are NOT actual features; They are raw heights which
need to be converted to features.
void seed_wilderness | ( | void | ) |
ゲーム開始時に各荒野フロアの乱数シードを指定する / Generate the random seeds for the wilderness
void set_floor_and_wall | ( | byte | type | ) |
ダンジョンの地形を指定確率に応じて各マスへランダムに敷き詰める / Fill the arrays of floors and walls in the good proportions
type | ダンジョンID |
|
static |
地形生成確率を決める要素100の配列を確率テーブルから作成する
feat_type | 非一様確率を再現するための要素数100の配列 |
prob | 元の確率テーブル |
void wilderness_gen | ( | void | ) |
広域マップの生成 / Build the wilderness area outside of the town.
void wilderness_gen_small | ( | void | ) |
広域マップの生成(簡易処理版) / Build the wilderness area.
-DG-
|
static |
|
static |
|
static |
|
static |