Hengband  2.1.4
 全て データ構造 ファイル 関数 変数 型定義 マクロ定義 ページ
データ構造 | マクロ定義 | 型定義 | 関数 | 変数
wild.c

荒野マップの生成とルール管理 / Wilderness generation [詳細]

#include "angband.h"
wild.cのインクルード依存関係図

データ構造

struct  wilderness_grid
 

マクロ定義

#define MAX_FEAT_IN_TERRAIN   18
 

型定義

typedef struct wilderness_grid wilderness_grid
 
typedef wilderness_typewilderness_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

日付
2014/02/13
作者
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.
2013 Deskull rearranged comment for Doxygen.

マクロ定義

#define MAX_FEAT_IN_TERRAIN   18

型定義

関数

bool change_wild_mode ( void  )

荒野から広域マップへの切り替え処理 / Initialize arrays for wilderness terrains

戻り値
切り替えが行われた場合はTRUEを返す。

関数の呼び出しグラフ:

呼出しグラフ:

static void generate_area ( int  y,
int  x,
bool  border,
bool  corner 
)
static

荒野フロア生成のメインルーチン / 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.

関数の呼び出しグラフ:

呼出しグラフ:

static void generate_wilderness_area ( int  terrain,
u32b  seed,
bool  border,
bool  corner 
)
static

荒野フロア生成のサブルーチン

引数
terrain荒野地形ID
seed乱数の固定シード
border未使用
corner広域マップの角部分としての生成ならばTRUE
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void init_terrain_table ( int  terrain,
s16b  feat_global,
cptr  fmt,
  ... 
)
static

荒野の地勢設定を初期化する / 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 void perturb_point_end ( int  x1,
int  x2,
int  x3,
int  xmid,
int  ymid,
int  rough,
int  depth_max 
)
static

プラズマフラクタル的地形生成の再帰末端処理 / Helper for plasma generation.

引数
x1中間末端部1の重み
x2中間末端部2の重み
x3中間末端部3の重み
xmid最終末端部座標X
ymid最終末端部座標Y
roughランダム幅
depth_max深みの最大値
戻り値
なし

呼出しグラフ:

static void perturb_point_mid ( int  x1,
int  x2,
int  x3,
int  x4,
int  xmid,
int  ymid,
int  rough,
int  depth_max 
)
static

プラズマフラクタル的地形生成の再帰中間処理 / Helper for plasma generation.

引数
x1左上端の深み
x2右上端の深み
x3左下端の深み
x4右下端の深み
xmid中央座標X
ymid中央座標Y
roughランダム幅
depth_max深みの最大値
戻り値
なし

呼出しグラフ:

static void plasma_recursive ( int  x1,
int  y1,
int  x2,
int  y2,
int  depth_max,
int  rough 
)
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 incave_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 void set_floor_and_wall_aux ( s16b  feat_type[100],
feat_prob  prob[DUNGEON_FEAT_PROB_NUM] 
)
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-

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

変数

border_type border
static
s16b conv_terrain2feat[MAX_WILDERNESS]
static
s16b terrain_table[MAX_WILDERNESS][MAX_FEAT_IN_TERRAIN]
static
wilderness_grid w_letter[255]
static