-#include "angband.h"\r
-#include "grid.h"\r
-#include "generate.h"\r
-#include "rooms.h"\r
-#include "rooms-normal.h"\r
-\r
-/*!\r
-* @brief タイプ9の部屋…フラクタルカーブによる洞窟生成 / Type 9 -- Driver routine to create fractal cave system\r
-* @return なし\r
-*/\r
-bool build_type9(void)\r
-{\r
- int grd, roug, cutoff;\r
- POSITION xsize, ysize, y0, x0;\r
-\r
- bool done, light, room;\r
-\r
- /* get size: note 'Evenness'*/\r
- xsize = randint1(22) * 2 + 6;\r
- ysize = randint1(15) * 2 + 6;\r
-\r
- /* Find and reserve some space in the dungeon. Get center of room. */\r
- if (!find_space(&y0, &x0, ysize + 1, xsize + 1))\r
- {\r
- /* Limit to the minimum room size, and retry */\r
- xsize = 8;\r
- ysize = 8;\r
-\r
- /* Find and reserve some space in the dungeon. Get center of room. */\r
- if (!find_space(&y0, &x0, ysize + 1, xsize + 1))\r
- {\r
- /*\r
- * Still no space?!\r
- * Try normal room\r
- */\r
- return build_type1();\r
- }\r
- }\r
-\r
- light = done = FALSE;\r
- room = TRUE;\r
-\r
- if ((dun_level <= randint1(25)) && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS)) light = TRUE;\r
-\r
- while (!done)\r
- {\r
- /* Note: size must be even or there are rounding problems\r
- * This causes the tunnels not to connect properly to the room */\r
-\r
- /* testing values for these parameters feel free to adjust */\r
- grd = 1 << (randint0(4));\r
-\r
- /* want average of about 16 */\r
- roug = randint1(8) * randint1(4);\r
-\r
- /* about size/2 */\r
- cutoff = randint1(xsize / 4) + randint1(ysize / 4) +\r
- randint1(xsize / 4) + randint1(ysize / 4);\r
-\r
- /* make it */\r
- generate_hmap(y0, x0, xsize, ysize, grd, roug, cutoff);\r
-\r
- /* Convert to normal format + clean up */\r
- done = generate_fracave(y0, x0, xsize, ysize, cutoff, light, room);\r
- }\r
-\r
- return TRUE;\r
-}\r
+#include "angband.h"
+#include "grid.h"
+#include "generate.h"
+#include "rooms.h"
+#include "rooms-normal.h"
+
+/*!
+* @brief タイプ9の部屋…フラクタルカーブによる洞窟生成 / Type 9 -- Driver routine to create fractal cave system
+* @return なし
+*/
+bool build_type9(void)
+{
+ int grd, roug, cutoff;
+ POSITION xsize, ysize, y0, x0;
+
+ bool done, light, room;
+
+ /* get size: note 'Evenness'*/
+ xsize = randint1(22) * 2 + 6;
+ ysize = randint1(15) * 2 + 6;
+
+ /* Find and reserve some space in the dungeon. Get center of room. */
+ if (!find_space(&y0, &x0, ysize + 1, xsize + 1))
+ {
+ /* Limit to the minimum room size, and retry */
+ xsize = 8;
+ ysize = 8;
+
+ /* Find and reserve some space in the dungeon. Get center of room. */
+ if (!find_space(&y0, &x0, ysize + 1, xsize + 1))
+ {
+ /*
+ * Still no space?!
+ * Try normal room
+ */
+ return build_type1();
+ }
+ }
+
+ light = done = FALSE;
+ room = TRUE;
+
+ if ((dun_level <= randint1(25)) && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS)) light = TRUE;
+
+ while (!done)
+ {
+ /* Note: size must be even or there are rounding problems
+ * This causes the tunnels not to connect properly to the room */
+
+ /* testing values for these parameters feel free to adjust */
+ grd = 1 << (randint0(4));
+
+ /* want average of about 16 */
+ roug = randint1(8) * randint1(4);
+
+ /* about size/2 */
+ cutoff = randint1(xsize / 4) + randint1(ysize / 4) +
+ randint1(xsize / 4) + randint1(ysize / 4);
+
+ /* make it */
+ generate_hmap(y0, x0, xsize, ysize, grd, roug, cutoff);
+
+ /* Convert to normal format + clean up */
+ done = generate_fracave(y0, x0, xsize, ysize, cutoff, light, room);
+ }
+
+ return TRUE;
+}