OSDN Git Service

[Refactor] #37353 後で同名の構造体を作り、feat_*と命名を一致させるため floor_type を feat_ground_type に改名...
[hengband/hengband.git] / src / wild.c
index 4c3b884..08dacb9 100644 (file)
@@ -12,6 +12,9 @@
 
 #include "angband.h"
 #include "world.h"
+#include "monster.h"
+#include "realm-hex.h"
+#include "player-status.h"
 
 /*!
  * @brief 地形生成確率を決める要素100の配列を確率テーブルから作成する
@@ -53,7 +56,7 @@ void set_floor_and_wall(DUNGEON_IDX type)
        cur_type = type;
        d_ptr = &d_info[type];
 
-       set_floor_and_wall_aux(floor_type, d_ptr->floor);
+       set_floor_and_wall_aux(feat_ground_type, d_ptr->floor);
        set_floor_and_wall_aux(fill_type, d_ptr->fill);
 
        feat_wall_outer = d_ptr->outer_wall;
@@ -153,7 +156,7 @@ static void perturb_point_end(FEAT_IDX x1, FEAT_IDX x2, FEAT_IDX x3, POSITION xm
  * need to be converted to features.
  * </pre>
  */
-static void plasma_recursive(POSITION x1, POSITION y1, POSITION x2, POSITION y2, POSITION depth_max, POSITION rough)
+static void plasma_recursive(POSITION x1, POSITION y1, POSITION x2, POSITION y2, FEAT_IDX depth_max, FEAT_IDX rough)
 {
        /* Find middle */
        POSITION xmid = (x2 - x1) / 2 + x1;
@@ -205,7 +208,7 @@ static void generate_wilderness_area(int terrain, u32b seed, bool border, bool c
 {
        POSITION x1, y1;
        int table_size = sizeof(terrain_table[0]) / sizeof(s16b);
-       int roughness = 1; /* The roughness of the level. */
+       FEAT_IDX roughness = 1; /* The roughness of the level. */
        u32b state_backup[4];
 
        /* Unused */
@@ -298,8 +301,8 @@ static void generate_wilderness_area(int terrain, u32b seed, bool border, bool c
 /*!
  * @brief 荒野フロア生成のメインルーチン /
  * Load a town or generate a terrain level using "plasma" fractals.
- * @param y 広域マップY座標
- * @param x 広域マップY座標
+ * @param y 広域Y座標
+ * @param x 広域X座標
  * @param border 広域マップの辺部分としての生成ならばTRUE
  * @param corner 広域マップの角部分としての生成ならばTRUE
  * @return なし
@@ -1148,7 +1151,7 @@ bool change_wild_mode(void)
 #else
                msg_print("You cannot enter global map, since there is some monsters nearby!");
 #endif
-               p_ptr->energy_use = 0;
+               free_turn(p_ptr);
                return FALSE;
        }
 
@@ -1162,7 +1165,7 @@ bool change_wild_mode(void)
 
                if (!get_check_strict(msg, CHECK_OKAY_CANCEL))
                {
-                       p_ptr->energy_use = 0;
+                       free_turn(p_ptr);
                        return FALSE;
                }
        }