#include "view-mainwindow.h"
+#define MAX_FEAT_IN_TERRAIN 18
+
/*
* Wilderness
*/
bool generate_encounter;
-
/*!
* @brief 地形生成確率を決める要素100の配列を確率テーブルから作成する
* @param feat_type 非一様確率を再現するための要素数100の配列
}
}
+
/*!
* @brief ダンジョンの地形を指定確率に応じて各マスへランダムに敷き詰める
* / Fill the arrays of floors and walls in the good proportions
}
-#define MAX_FEAT_IN_TERRAIN 18
-
/*
* The default table in terrain level generation.
*/
}
-
/*!
* @brief 荒野フロア生成のメインルーチン /
* Load a town or generate a terrain level using "plasma" fractals.
*/
static border_type border;
-
/*!
* @brief 広域マップの生成 /
* Build the wilderness area outside of the town.
static wilderness_grid w_letter[255];
-
/*!
* @brief w_info.txtのデータ解析 /
* Parse a sub-file of the "extra info"
* @param x 広域マップの幅を返す参照ポインタ
* @return なし
*/
-errr parse_line_wilderness(char *buf, int ymin, int xmin, int ymax, int xmax, int *y, int *x)
+errr parse_line_wilderness(player_type *creature_ptr, char *buf, int ymin, int xmin, int ymax, int xmax, int *y, int *x)
{
int i, num;
char *zz[33];
/* Process "W:P:<x>:<y> - starting position in the wilderness */
case 'P':
{
- if ((p_ptr->wilderness_x == 0) &&
- (p_ptr->wilderness_y == 0))
+ if ((creature_ptr->wilderness_x == 0) &&
+ (creature_ptr->wilderness_y == 0))
{
if (tokenize(buf+4, 2, zz, 0) == 2)
{
- p_ptr->wilderness_y = atoi(zz[0]);
- p_ptr->wilderness_x = atoi(zz[1]);
+ creature_ptr->wilderness_y = atoi(zz[0]);
+ creature_ptr->wilderness_x = atoi(zz[1]);
- if ((p_ptr->wilderness_x < 1) ||
- (p_ptr->wilderness_x > current_world_ptr->max_wild_x) ||
- (p_ptr->wilderness_y < 1) ||
- (p_ptr->wilderness_y > current_world_ptr->max_wild_y))
+ if ((creature_ptr->wilderness_x < 1) ||
+ (creature_ptr->wilderness_x > current_world_ptr->max_wild_x) ||
+ (creature_ptr->wilderness_y < 1) ||
+ (creature_ptr->wilderness_y > current_world_ptr->max_wild_y))
{
return (PARSE_ERROR_OUT_OF_BOUNDS);
}
}
-
/*!
* @brief ゲーム開始時に各荒野フロアの乱数シードを指定する /
* Generate the random seeds for the wilderness
*/
typedef wilderness_type *wilderness_type_ptr;
-
/*!
* @brief ゲーム開始時の荒野初期化メインルーチン /
* Initialize wilderness array
return 0;
}
+
/*!
* @brief 荒野の地勢設定を初期化する /
* Initialize wilderness array
feat_mountain, MAX_FEAT_IN_TERRAIN - 8);
}
+
/*!
* @brief 荒野から広域マップへの切り替え処理 /
* Initialize arrays for wilderness terrains
extern errr init_wilderness(void);
extern void init_wilderness_terrains(void);
extern void seed_wilderness(void);
-extern errr parse_line_wilderness(char *buf, int ymin, int xmin, int ymax, int xmax, int *y, int *x);
+extern errr parse_line_wilderness(player_type *creature_ptr, char *buf, int ymin, int xmin, int ymax, int xmax, int *y, int *x);
extern bool change_wild_mode(player_type *creature_ptr, bool encount);
/* Border */