+}\r
+\r
+\r
+/*!\r
+* @brief \83^\83C\83v11\82Ì\95\94\89®\81c\89~\8c`\95\94\89®\82Ì\90¶\90¬ / Type 11 -- Build an vertical oval room.\r
+* @return \82È\82µ\r
+* @details\r
+* For every grid in the possible square, check the distance.\n\r
+* If it's less than the radius, make it a room square.\n\r
+*\n\r
+* When done fill from the inside to find the walls,\n\r
+*/\r
+bool build_type11(void)\r
+{\r
+ POSITION rad, x, y, x0, y0;\r
+ int light = FALSE;\r
+\r
+ /* Occasional light */\r
+ if ((randint1(dun_level) <= 15) && !(d_info[dungeon_type].flags1 & DF1_DARKNESS)) light = TRUE;\r
+\r
+ rad = randint0(9);\r
+\r
+ /* Find and reserve some space in the dungeon. Get center of room. */\r
+ if (!find_space(&y0, &x0, rad * 2 + 1, rad * 2 + 1)) return FALSE;\r
+\r
+ /* Make circular floor */\r
+ for (x = x0 - rad; x <= x0 + rad; x++)\r
+ {\r
+ for (y = y0 - rad; y <= y0 + rad; y++)\r
+ {\r
+ if (distance(y0, x0, y, x) <= rad - 1)\r
+ {\r
+ /* inside- so is floor */\r
+ place_floor_bold(y, x);\r
+ }\r
+ else if (distance(y0, x0, y, x) <= rad + 1)\r
+ {\r
+ /* make granite outside so arena works */\r
+ place_extra_bold(y, x);\r
+ }\r
+ }\r
+ }\r
+\r
+ /* Find visible outer walls and set to be FEAT_OUTER */\r
+ add_outer_wall(x0, y0, light, x0 - rad, y0 - rad, x0 + rad, y0 + rad);\r
+\r
+ return TRUE;\r
+}\r
+\r
+\r
+/*!\r
+* @brief \83^\83C\83v12\82Ì\95\94\89®\81c\83h\81[\83\80\8c^\95\94\89®\82Ì\90¶\90¬ / Type 12 -- Build crypt room.\r
+* @return \82È\82µ\r
+* @details\r
+* For every grid in the possible square, check the (fake) distance.\n\r
+* If it's less than the radius, make it a room square.\n\r
+*\n\r
+* When done fill from the inside to find the walls,\n\r
+*/\r
+bool build_type12(void)\r
+{\r
+ POSITION rad, x, y, x0, y0;\r
+ int light = FALSE;\r
+ bool emptyflag = TRUE;\r
+\r
+ /* Make a random metric */\r
+ int h1, h2, h3, h4;\r
+ h1 = randint1(32) - 16;\r
+ h2 = randint1(16);\r
+ h3 = randint1(32);\r
+ h4 = randint1(32) - 16;\r
+\r
+ /* Occasional light */\r
+ if ((randint1(dun_level) <= 5) && !(d_info[dungeon_type].flags1 & DF1_DARKNESS)) light = TRUE;\r
+\r
+ rad = randint1(9);\r
+\r
+ /* Find and reserve some space in the dungeon. Get center of room. */\r
+ if (!find_space(&y0, &x0, rad * 2 + 3, rad * 2 + 3)) return FALSE;\r
+\r
+ /* Make floor */\r
+ for (x = x0 - rad; x <= x0 + rad; x++)\r
+ {\r
+ for (y = y0 - rad; y <= y0 + rad; y++)\r
+ {\r
+ /* clear room flag */\r
+ cave[y][x].info &= ~(CAVE_ROOM);\r
+\r
+ if (dist2(y0, x0, y, x, h1, h2, h3, h4) <= rad - 1)\r
+ {\r
+ /* inside - so is floor */\r
+ place_floor_bold(y, x);\r
+ }\r
+ else if (distance(y0, x0, y, x) < 3)\r
+ {\r
+ place_floor_bold(y, x);\r
+ }\r
+ else\r
+ {\r
+ /* make granite outside so arena works */\r
+ place_extra_bold(y, x);\r
+ }\r
+\r
+ /* proper boundary for arena */\r
+ if (((y + rad) == y0) || ((y - rad) == y0) ||\r
+ ((x + rad) == x0) || ((x - rad) == x0))\r
+ {\r
+ place_extra_bold(y, x);\r
+ }\r
+ }\r
+ }\r
+\r
+ /* Find visible outer walls and set to be FEAT_OUTER */\r
+ add_outer_wall(x0, y0, light, x0 - rad - 1, y0 - rad - 1,\r
+ x0 + rad + 1, y0 + rad + 1);\r
+\r
+ /* Check to see if there is room for an inner vault */\r
+ for (x = x0 - 2; x <= x0 + 2; x++)\r
+ {\r
+ for (y = y0 - 2; y <= y0 + 2; y++)\r
+ {\r
+ if (!is_floor_bold(y, x))\r
+ {\r
+ /* Wall in the way */\r
+ emptyflag = FALSE;\r
+ }\r
+ }\r
+ }\r
+\r
+ if (emptyflag && one_in_(2))\r
+ {\r
+ /* Build the vault */\r
+ build_small_room(x0, y0);\r
+\r
+ /* Place a treasure in the vault */\r
+ place_object(y0, x0, 0L);\r
+\r
+ /* Let's guard the treasure well */\r
+ vault_monsters(y0, x0, randint0(2) + 3);\r
+\r
+ /* Traps naturally */\r
+ vault_traps(y0, x0, 4, 4, randint0(3) + 2);\r
+ }\r
+\r
+ return TRUE;\r
+}\r
+\r