OSDN Git Service

Add Doxygen comment to wizard1.c.
[hengband/hengband.git] / src / rooms.c
index a6f6b04..24ecb45 100644 (file)
@@ -1,14 +1,39 @@
-/*
- * File: rooms.c
- * Purpose: make rooms. Used by generate.c when creating dungeons.
- */
-
-/*
- * Copyright (c) 1997 Ben Harrison, 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.  Other copyrights may also apply.
+/*!
+ * @file rooms.c
+ * @brief ¥À¥ó¥¸¥ç¥ó¥Õ¥í¥¢¤ÎÉô²°À¸À®½èÍý / make rooms. Used by generate.c when creating dungeons.
+ * @date 2014/01/06
+ * @author
+ * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
+ * This software may be copied and distributed for educational, research,\n
+ * and not for profit purposes provided that this copyright and statement\n
+ * are included in all such copies.  Other copyrights may also apply.\n
+ * 2014 Deskull rearranged comment for Doxygen. \n
+ * @details
+ * Room building routines.\n
+ *\n
+ * Room types:\n
+ *   1 -- normal\n
+ *   2 -- overlapping\n
+ *   3 -- cross shaped\n
+ *   4 -- large room with features\n
+ *   5 -- monster nests\n
+ *   6 -- monster pits\n
+ *   7 -- simple vaults\n
+ *   8 -- greater vaults\n
+ *   9 -- fractal caves\n
+ *  10 -- random vaults\n
+ *  11 -- circular rooms\n
+ *  12 -- crypts\n
+ *  13 -- trapped monster pits\n
+ *  14 -- trapped room\n
+ *  15 -- glass room\n
+ *  16 -- underground arcade\n
+ *\n
+ * Some functions are used to determine if the given monster\n
+ * is appropriate for inclusion in a monster nest or monster pit or\n
+ * the given type.\n
+ *\n
+ * None of the pits/nests are allowed to include "unique" monsters.\n
  */
 
 #include "angband.h"
 #include "rooms.h"
 
 
-/*
- * [from SAngband (originally from OAngband)]
- *
- * Table of values that control how many times each type of room will
- * appear.  Each type of room has its own row, and each column
- * corresponds to dungeon levels 0, 10, 20, and so on.  The final
- * value is the minimum depth the room can appear at.  -LM-
- *
- * Level 101 and below use the values for level 100.
- *
- * Rooms with lots of monsters or loot may not be generated if the
- * object or monster lists are already nearly full.  Rooms will not
- * appear above their minimum depth.  Tiny levels will not have space
- * for all the rooms you ask for.
+/*!
+ * ³ÆÉô²°¥¿¥¤¥×¤ÎÀ¸À®ÈæÄêµÁ
+ *[from SAngband (originally from OAngband)]\n
+ *\n
+ * Table of values that control how many times each type of room will\n
+ * appear.  Each type of room has its own row, and each column\n
+ * corresponds to dungeon levels 0, 10, 20, and so on.  The final\n
+ * value is the minimum depth the room can appear at.  -LM-\n
+ *\n
+ * Level 101 and below use the values for level 100.\n
+ *\n
+ * Rooms with lots of monsters or loot may not be generated if the\n
+ * object or monster lists are already nearly full.  Rooms will not\n
+ * appear above their minimum depth.  Tiny levels will not have space\n
+ * for all the rooms you ask for.\n
  */
 static room_info_type room_info_normal[ROOM_T_MAX] =
 {
@@ -56,7 +82,7 @@ static room_info_type room_info_normal[ROOM_T_MAX] =
 };
 
 
-/* Build rooms in descending order of difficulty. */
+/*! Éô²°¤ÎÀ¸À®½èÍý½ç / Build rooms in descending order of difficulty. */
 static byte room_build_order[ROOM_T_MAX] = {
        ROOM_T_GREATER_VAULT,
        ROOM_T_ARCADE,
@@ -76,7 +102,12 @@ static byte room_build_order[ROOM_T_MAX] = {
        ROOM_T_NORMAL,
 };
 
-
+/*!
+ * @brief ¸°¤Î¤«¤«¤Ã¤¿¥É¥¢¤òÇÛÃÖ¤¹¤ë
+ * @param y ÇÛÃÖ¤·¤¿¤¤¥Õ¥í¥¢¤ÎYºÂɸ
+ * @param x ÇÛÃÖ¤·¤¿¤¤¥Õ¥í¥¢¤ÎXºÂɸ
+ * @return ¤Ê¤·
+ */
 static void place_locked_door(int y, int x)
 {
        if (d_info[dungeon_type].flags1 & DF1_NO_DOORS)
@@ -91,6 +122,13 @@ static void place_locked_door(int y, int x)
        }
 }
 
+/*!
+ * @brief ±£¤·¥É¥¢¤òÇÛÃÖ¤¹¤ë
+ * @param y ÇÛÃÖ¤·¤¿¤¤¥Õ¥í¥¢¤ÎYºÂɸ
+ * @param x ÇÛÃÖ¤·¤¿¤¤¥Õ¥í¥¢¤ÎXºÂɸ
+ * @param type #DOOR_DEFAULT / #DOOR_DOOR / #DOOR_GLASS_DOOR / #DOOR_CURTAIN ¤Î¤¤¤º¤ì¤«
+ * @return ¤Ê¤·
+ */
 static void place_secret_door(int y, int x, int type)
 {
        if (d_info[dungeon_type].flags1 & DF1_NO_DOORS)
@@ -132,7 +170,11 @@ static void place_secret_door(int y, int x, int type)
        }
 }
 
-/*
+/*!
+ * @brief 1¥Þ¥¹¤À¤±¤ÎÉô²°¤òºîÀ®¤·¡¢¾å²¼º¸±¦¤¤¤º¤ì¤«°ì¤Ä¤Ë±£¤·¥É¥¢¤òÇÛÃÖ¤¹¤ë¡£
+ * @param y0 ÇÛÃÖ¤·¤¿¤¤Ãæ¿´¤ÎYºÂɸ
+ * @param x0 ÇÛÃÖ¤·¤¿¤¤Ãæ¿´¤ÎXºÂɸ
+ * @details
  * This funtion makes a very small room centred at (x0, y0)
  * This is used in crypts, and random elemental vaults.
  *
@@ -171,10 +213,15 @@ static void build_small_room(int x0, int y0)
        place_floor_bold(y0, x0);
 }
 
-
-/*
- * This function tunnels around a room if
- * it will cut off part of a cave system.
+/*!
+ * @brief
+ * »ØÄêÈϰϤËÄÌÏ©¤¬Ä̤äƤ¤¤ë¤³¤È¤ò³Îǧ¤·¤¿¾å¤Ç¾²¤ÇËä¤á¤ë
+ * This function tunnels around a room if it will cut off part of a cave system.
+ * @param x1 ÈϰϤκ¸Ã¼
+ * @param y1 ÈϰϤξåü
+ * @param x2 ÈϰϤα¦Ã¼
+ * @param y2 ÈϰϤβ¼Ã¼
+ * @return ¤Ê¤·
  */
 static void check_room_boundary(int x1, int y1, int x2, int y2)
 {
@@ -252,10 +299,15 @@ static void check_room_boundary(int x1, int y1, int x2, int y2)
 }
 
 
-/*
- *  Helper function for find_space().
- *
- *  Is this a good location?
+/*!
+ * @brief
+ * find_space()¤ÎͽÈ÷½èÍý¤È¤·¤ÆÉô²°¤ÎÀ¸À®¤¬²Äǽ¤«¤òȽÄꤹ¤ë /
+ * Helper function for find_space(). Is this a good location?
+ * @param blocks_high ÈϰϤι⤵
+ * @param blocks_wide ÈϰϤÎÉý
+ * @param block_y ÈϰϤξåü
+ * @param block_x ÈϰϤκ¸Ã¼
+ * @return ¤Ê¤·
  */
 static bool find_space_aux(int blocks_high, int blocks_wide, int block_y, int block_x)
 {
@@ -328,20 +380,25 @@ static bool find_space_aux(int blocks_high, int blocks_wide, int block_y, int bl
 }
 
 
-/*
- * Find a good spot for the next room.  -LM-
- *
- * Find and allocate a free space in the dungeon large enough to hold
- * the room calling this function.
- *
- * We allocate space in 11x11 blocks, but want to make sure that rooms
- * align neatly on the standard screen.  Therefore, we make them use
- * blocks in few 11x33 rectangles as possible.
- *
- * Be careful to include the edges of the room in height and width!
- *
- * Return TRUE and values for the center of the room if all went well.
- * Otherwise, return FALSE.
+/*!
+ * @brief Éô²°À¸À®¤¬²Äǽ¤Ê¥¹¥Ú¡¼¥¹¤ò³ÎÊݤ¹¤ë / Find a good spot for the next room.  -LM-
+ * @param y Éô²°¤ÎÀ¸À®¤¬²Äǽ¤ÊÃæ¿´YºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
+ * @param x Éô²°¤ÎÀ¸À®¤¬²Äǽ¤ÊÃæ¿´XºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
+ * @param height ³ÎÊݤ·¤¿¤¤Îΰè¤Î¹â¤µ
+ * @param width ³ÎÊݤ·¤¿¤¤Îΰè¤ÎÉý
+ * @return ½êÄê¤ÎÈϰϤ¬³ÎÊݤǤ­¤¿¾ì¹çTRUE¤òÊÖ¤¹
+ * @details
+ * Find and allocate a free space in the dungeon large enough to hold\n
+ * the room calling this function.\n
+ *\n
+ * We allocate space in 11x11 blocks, but want to make sure that rooms\n
+ * align neatly on the standard screen.  Therefore, we make them use\n
+ * blocks in few 11x33 rectangles as possible.\n
+ *\n
+ * Be careful to include the edges of the room in height and width!\n
+ *\n
+ * Return TRUE and values for the center of the room if all went well.\n
+ * Otherwise, return FALSE.\n
  */
 static bool find_space(int *y, int *x, int height, int width)
 {
@@ -458,32 +515,9 @@ static bool find_space(int *y, int *x, int height, int width)
 }
 
 
-
-/*
- * Room building routines.
- *
- * Room types:
- *   1 -- normal
- *   2 -- overlapping
- *   3 -- cross shaped
- *   4 -- large room with features
- *   5 -- monster nests
- *   6 -- monster pits
- *   7 -- simple vaults
- *   8 -- greater vaults
- *   9 -- fractal caves
- *  10 -- random vaults
- *  11 -- circular rooms
- *  12 -- crypts
- *  13 -- trapped monster pits
- *  14 -- trapped room
- *  15 -- glass room
- *  16 -- underground arcade
- */
-
-
-/*
- * Type 1 -- normal rectangular rooms
+/*!
+ * @brief ¥¿¥¤¥×1¤ÎÉô²°¡ÄÄ̾ï²ÄÊÑĹÊý·Á¤ÎÉô²°¤òÀ¸À®¤¹¤ë / Type 1 -- normal rectangular rooms
+ * @return ¤Ê¤·
  */
 static bool build_type1(void)
 {
@@ -676,9 +710,9 @@ static bool build_type1(void)
        return TRUE;
 }
 
-
-/*
- * Type 2 -- Overlapping rectangular rooms
+/*!
+ * @brief ¥¿¥¤¥×2¤ÎÉô²°¡ÄÆó½ÅĹÊý·Á¤ÎÉô²°¤òÀ¸À®¤¹¤ë / Type 2 -- Overlapping rectangular rooms
+ * @return ¤Ê¤·
  */
 static bool build_type2(void)
 {
@@ -791,17 +825,18 @@ static bool build_type2(void)
 
 
 
-/*
- * Type 3 -- Cross shaped rooms
- *
- * Builds a room at a row, column coordinate
- *
- * Room "a" runs north/south, and Room "b" runs east/east
- * So the "central pillar" runs from x1a, y1b to x2a, y2b.
- *
- * Note that currently, the "center" is always 3x3, but I think that
- * the code below will work (with "bounds checking") for 5x5, or even
- * for unsymetric values like 4x3 or 5x3 or 3x4 or 3x5, or even larger.
+/*!
+ * @brief ¥¿¥¤¥×2¤ÎÉô²°¡Ä½½»ú·¿¤ÎÉô²°¤òÀ¸À®¤¹¤ë / Type 3 -- Cross shaped rooms
+ * @return ¤Ê¤·
+ * @details
+ * Builds a room at a row, column coordinate\n
+ *\n
+ * Room "a" runs north/south, and Room "b" runs east/east\n
+ * So the "central pillar" runs from x1a, y1b to x2a, y2b.\n
+ *\n
+ * Note that currently, the "center" is always 3x3, but I think that\n
+ * the code below will work (with "bounds checking") for 5x5, or even\n
+ * for unsymetric values like 4x3 or 5x3 or 3x4 or 3x5, or even larger.\n
  */
 static bool build_type3(void)
 {
@@ -1050,15 +1085,16 @@ static bool build_type3(void)
 }
 
 
-/*
- * Type 4 -- Large room with inner features
- *
- * Possible sub-types:
- *     1 - Just an inner room with one door
- *     2 - An inner room within an inner room
- *     3 - An inner room with pillar(s)
- *     4 - Inner room has a maze
- *     5 - A set of four inner rooms
+/*!
+ * @brief ¥¿¥¤¥×4¤ÎÉô²°¡Ä¸ÇÄꥵ¥¤¥º¤ÎÆó½Å¹½Â¤Éô²°¤òÀ¸À®¤¹¤ë / Type 4 -- Large room with inner features
+ * @return ¤Ê¤·
+ * @details
+ * Possible sub-types:\n
+ *     1 - Just an inner room with one door\n
+ *     2 - An inner room within an inner room\n
+ *     3 - An inner room with pillar(s)\n
+ *     4 - Inner room has a maze\n
+ *     5 - A set of four inner rooms\n
  */
 static bool build_type4(void)
 {
@@ -1378,17 +1414,9 @@ static bool build_type4(void)
 }
 
 
-/*
- * The following functions are used to determine if the given monster
- * is appropriate for inclusion in a monster nest or monster pit or
- * the given type.
- *
- * None of the pits/nests are allowed to include "unique" monsters.
- */
 
-
-/*
- * Monster validation macro
+/*!
+ * vault¤ËÇÛÃÖ²Äǽ¤Ê¥â¥ó¥¹¥¿¡¼¤Î¾ò·ï¤ò»ØÄꤹ¤ë¥Þ¥¯¥í / Monster validation macro
  *
  * Line 1 -- forbid town monsters
  * Line 2 -- forbid uniques
@@ -1402,18 +1430,21 @@ static bool build_type4(void)
         !(r_info[I].flags7 & RF7_AQUATIC))
 
 
-/* Race index for "monster pit (clone)" */
+/*! Ä̾ïpitÀ¸À®»þ¤Î¥â¥ó¥¹¥¿¡¼¤Î¹½À®¾ò·ïID / Race index for "monster pit (clone)" */
 static int vault_aux_race;
 
-/* Race index for "monster pit (symbol clone)" */
+/*! Ã±°ì¥·¥ó¥Ü¥ëpitÀ¸À®»þ¤Î»ØÄꥷ¥ó¥Ü¥ë / Race index for "monster pit (symbol clone)" */
 static char vault_aux_char;
 
-/* Breath mask for "monster pit (dragon)" */
+/*! ¥Ö¥ì¥¹Â°À­¤Ë´ð¤Å¤¯¥É¥é¥´¥ópitÀ¸À®»þ¾ò·ï¥Þ¥¹¥¯ / Breath mask for "monster pit (dragon)" */
 static u32b vault_aux_dragon_mask4;
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬VaultÀ¸À®¤ÎºÇÄãɬÍ×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper monster selection function
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return VaultÀ¸À®¤ÎºÇÄãɬÍ×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_simple(int r_idx)
 {
@@ -1422,8 +1453,11 @@ static bool vault_aux_simple(int r_idx)
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥¼¥ê¡¼nest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster nest (jelly)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_jelly(int r_idx)
 {
@@ -1444,9 +1478,11 @@ static bool vault_aux_jelly(int r_idx)
        return (TRUE);
 }
 
-
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬Æ°Êªnest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster nest (animal)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_animal(int r_idx)
 {
@@ -1463,8 +1499,11 @@ static bool vault_aux_animal(int r_idx)
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥¢¥ó¥Ç¥Ã¥Énest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster nest (undead)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_undead(int r_idx)
 {
@@ -1480,9 +1519,11 @@ static bool vault_aux_undead(int r_idx)
        return (TRUE);
 }
 
-
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬À»Æ²nest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster nest (chapel)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_chapel_g(int r_idx)
 {
@@ -1512,9 +1553,11 @@ static bool vault_aux_chapel_g(int r_idx)
        return FALSE;
 }
 
-
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¸¤¾®²°nest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster nest (kennel)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_kennel(int r_idx)
 {
@@ -1530,9 +1573,11 @@ static bool vault_aux_kennel(int r_idx)
        return (TRUE);
 }
 
-
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥ß¥ß¥Ã¥¯nest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster nest (mimic)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_mimic(int r_idx)
 {
@@ -1548,8 +1593,11 @@ static bool vault_aux_mimic(int r_idx)
        return (TRUE);
 }
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬Ã±°ì¥¯¥í¡¼¥ónest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster nest (clone)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_clone(int r_idx)
 {
@@ -1560,8 +1608,11 @@ static bool vault_aux_clone(int r_idx)
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¼Ù°­Â°À­¥·¥ó¥Ü¥ë¥¯¥í¡¼¥ónest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster nest (symbol clone)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_symbol_e(int r_idx)
 {
@@ -1582,8 +1633,11 @@ static bool vault_aux_symbol_e(int r_idx)
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬Á±ÎÉ°À­¥·¥ó¥Ü¥ë¥¯¥í¡¼¥ónest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster nest (symbol clone)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_symbol_g(int r_idx)
 {
@@ -1604,8 +1658,11 @@ static bool vault_aux_symbol_g(int r_idx)
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥ª¡¼¥¯pit¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster pit (orc)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_orc(int r_idx)
 {
@@ -1625,8 +1682,11 @@ static bool vault_aux_orc(int r_idx)
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥È¥í¥ëpit¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster pit (troll)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_troll(int r_idx)
 {
@@ -1646,8 +1706,11 @@ static bool vault_aux_troll(int r_idx)
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬µð¿Ípit¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster pit (giant)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_giant(int r_idx)
 {
@@ -1669,8 +1732,11 @@ static bool vault_aux_giant(int r_idx)
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥É¥é¥´¥ópit¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster pit (dragon)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_dragon(int r_idx)
 {
@@ -1693,8 +1759,11 @@ static bool vault_aux_dragon(int r_idx)
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬°­Ëâpit¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster pit (demon)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_demon(int r_idx)
 {
@@ -1713,8 +1782,11 @@ static bool vault_aux_demon(int r_idx)
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¶¸µ¤pit¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster pit (lovecraftian)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_cthulhu(int r_idx)
 {
@@ -1733,8 +1805,9 @@ static bool vault_aux_cthulhu(int r_idx)
 }
 
 
-/*
- * Helper function for "monster pit (clone)"
+/*!
+ * @brief pit/nest¤Î´ð½à¤È¤Ê¤ëñ¼ï¥â¥ó¥¹¥¿¡¼¤ò·è¤á¤ë /
+ * @return ¤Ê¤·
  */
 static void vault_prep_clone(void)
 {
@@ -1749,8 +1822,9 @@ static void vault_prep_clone(void)
 }
 
 
-/*
- * Helper function for "monster pit (symbol clone)"
+/*!
+ * @brief pit/nest¤Î´ð½à¤È¤Ê¤ë¥â¥ó¥¹¥¿¡¼¥·¥ó¥Ü¥ë¤ò·è¤á¤ë /
+ * @return ¤Ê¤·
  */
 static void vault_prep_symbol(void)
 {
@@ -1769,9 +1843,9 @@ static void vault_prep_symbol(void)
        vault_aux_char = r_info[r_idx].d_char;
 }
 
-
-/*
- * Helper function for "monster pit (dragon)"
+/*!
+ * @brief pit/nest¤Î´ð½à¤È¤Ê¤ë¥É¥é¥´¥ó¤Î¼ïÎà¤ò·è¤á¤ë /
+ * @return ¤Ê¤·
  */
 static void vault_prep_dragon(void)
 {
@@ -1843,8 +1917,11 @@ static void vault_prep_dragon(void)
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥À¡¼¥¯¥¨¥ë¥Õpit¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
  * Helper function for "monster pit (dark elf)"
+ * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
+ * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
  */
 static bool vault_aux_dark_elf(int r_idx)
 {
@@ -1867,10 +1944,10 @@ static bool vault_aux_dark_elf(int r_idx)
        return FALSE;
 }
 
-
+/*! pit/nest·¿¾ðÊó¤Îtypedef */
 typedef struct vault_aux_type vault_aux_type;
 
-
+/*! pit/nest·¿¾ðÊó¤Î¹½Â¤ÂÎÄêµÁ */
 struct vault_aux_type
 {
        cptr name;
@@ -1880,7 +1957,12 @@ struct vault_aux_type
        int chance;
 };
 
-
+/*!
+ * @brief ¥À¥ó¥¸¥ç¥óËè¤Ë»ØÄꤵ¤ì¤¿¥Ô¥Ã¥ÈÇÛÎó¤ò´ð½à¤Ë¥é¥ó¥À¥à¤Êpit/nest¥¿¥¤¥×¤ò·è¤á¤ë
+ * @param l_ptr ÁªÂò¤µ¤ì¤¿pit/nest¾ðÊó¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
+ * @param allow_flag_mask À¸À®¤¬µö¤µ¤ì¤ëpit/nest¤Î¥Ó¥Ã¥ÈÇÛÎó
+ * @return ÁªÂò¤µ¤ì¤¿pit/nest¤ÎID¡¢ÁªÂò¼ºÇÔ¤·¤¿¾ì¹ç-1¤òÊÖ¤¹¡£
+ */
 static int pick_vault_type(vault_aux_type *l_ptr, s16b allow_flag_mask)
 {
        int tmp, total, count;
@@ -1928,6 +2010,7 @@ static int pick_vault_type(vault_aux_type *l_ptr, s16b allow_flag_mask)
        return n_ptr->name ? count : -1;
 }
 
+/*!nest¾ðÊó¥Æ¡¼¥Ö¥ë*/
 static vault_aux_type nest_types[] =
 {
 #ifdef JP
@@ -1957,6 +2040,7 @@ static vault_aux_type nest_types[] =
 #endif
 };
 
+/*!pit¾ðÊó¥Æ¡¼¥Ö¥ë*/
 static vault_aux_type pit_types[] =
 {
 #ifdef JP
@@ -1987,7 +2071,7 @@ static vault_aux_type pit_types[] =
 };
 
 
-/* Nest types code */
+/*! nest¤ÎIDÄêµÁ /  Nest types code */
 #define NEST_TYPE_CLONE        0
 #define NEST_TYPE_JELLY        1
 #define NEST_TYPE_SYMBOL_GOOD  2
@@ -1999,7 +2083,7 @@ static vault_aux_type pit_types[] =
 #define NEST_TYPE_CHAPEL       8
 #define NEST_TYPE_UNDEAD       9
 
-/* Pit types code */
+/*! pit¤ÎIDÄêµÁ / Pit types code */
 #define PIT_TYPE_ORC           0
 #define PIT_TYPE_TROLL         1
 #define PIT_TYPE_GIANT         2
@@ -2012,7 +2096,12 @@ static vault_aux_type pit_types[] =
 #define PIT_TYPE_DARK_ELF      9
 
 
-/*
+/*!
+ * @brief ¥Ç¥Ð¥Ã¥°»þ¤ËÀ¸À®¤µ¤ì¤¿pit/nest¤Î·¿¤ò½ÐÎϤ¹¤ë½èÍý
+ * @param type pit/nest¤Î·¿ID
+ * @param nest TRUE¤Ê¤é¤Ðnest¡¢FALSE¤Ê¤é¤Ðpit
+ * @return ¥Ç¥Ð¥Ã¥°É½¼¨Ê¸»úÎó¤Î»²¾È¥Ý¥¤¥ó¥¿
+ * @details
  * Hack -- Get the string describing subtype of pit/nest
  * Determined in prepare function (some pit/nest only)
  */
@@ -2074,7 +2163,7 @@ static cptr pit_subtype_string(int type, bool nest)
 }
 
 
-/* A struct for nest monster information with cheat_hear */
+/*! ¥Ç¥Ð¥Ã¥°»þ¤Ënest¤Î¥â¥ó¥¹¥¿¡¼¾ðÊó¤ò³Îǧ¤¹¤ë¤¿¤á¤Î¹½Â¤ÂΠ/ A struct for nest monster information with cheat_hear */
 typedef struct
 {
        s16b r_idx;
@@ -2084,7 +2173,12 @@ nest_mon_info_type;
 
 
 /*
- * Comp function for sorting nest monster information
+ *! @brief nest¤Î¥â¥ó¥¹¥¿¡¼¥ê¥¹¥È¤ò¥½¡¼¥È¤¹¤ë¤¿¤á¤Î´Ø¿ô /
+ *  Comp function for sorting nest monster information
+ *  @param u ¥½¡¼¥È½èÍýÂоÝÇÛÎó¥Ý¥¤¥ó¥¿
+ *  @param v Ì¤»ÈÍÑ
+ *  @param a Èæ³ÓÂоݻ²¾ÈID1
+ *  @param b Èæ³ÓÂоݻ²¾ÈID2
  */
 static bool ang_sort_comp_nest_mon_info(vptr u, vptr v, int a, int b)
 {
@@ -2118,9 +2212,13 @@ static bool ang_sort_comp_nest_mon_info(vptr u, vptr v, int a, int b)
        return w1 <= w2;
 }
 
-
-/*
+/*!
+ * @brief nest¤Î¥â¥ó¥¹¥¿¡¼¥ê¥¹¥È¤ò¥¹¥ï¥Ã¥×¤¹¤ë¤¿¤á¤Î´Ø¿ô /
  * Swap function for sorting nest monster information
+ * @param u ¥¹¥ï¥Ã¥×½èÍýÂоÝÇÛÎó¥Ý¥¤¥ó¥¿
+ * @param v Ì¤»ÈÍÑ
+ * @param a ¥¹¥ï¥Ã¥×Âоݻ²¾ÈID1
+ * @param b ¥¹¥ï¥Ã¥×Âоݻ²¾ÈID2
  */
 static void ang_sort_swap_nest_mon_info(vptr u, vptr v, int a, int b)
 {
@@ -2137,26 +2235,28 @@ static void ang_sort_swap_nest_mon_info(vptr u, vptr v, int a, int b)
 }
 
 
-#define NUM_NEST_MON_TYPE 64
-
-/*
- * Type 5 -- Monster nests
- *
- * A monster nest is a "big" room, with an "inner" room, containing
- * a "collection" of monsters of a given type strewn about the room.
- *
- * The monsters are chosen from a set of 64 randomly selected monster
- * races, to allow the nest creation to fail instead of having "holes".
- *
- * Note the use of the "get_mon_num_prep()" function, and the special
- * "get_mon_num_hook()" restriction function, to prepare the "monster
- * allocation table" in such a way as to optimize the selection of
- * "appropriate" non-unique monsters for the nest.
- *
- * Note that the "get_mon_num()" function may (rarely) fail, in which
- * case the nest will be empty.
- *
- * Note that "monster nests" will never contain "unique" monsters.
+#define NUM_NEST_MON_TYPE 64 /*!<nest¤Î¼ïÊÌ¿ô */
+
+
+/*!
+ * @brief ¥¿¥¤¥×5¤ÎÉô²°¡Änest¤òÀ¸À®¤¹¤ë / Type 5 -- Monster nests
+ * @return ¤Ê¤·
+ * @details
+ * A monster nest is a "big" room, with an "inner" room, containing\n
+ * a "collection" of monsters of a given type strewn about the room.\n
+ *\n
+ * The monsters are chosen from a set of 64 randomly selected monster\n
+ * races, to allow the nest creation to fail instead of having "holes".\n
+ *\n
+ * Note the use of the "get_mon_num_prep()" function, and the special\n
+ * "get_mon_num_hook()" restriction function, to prepare the "monster\n
+ * allocation table" in such a way as to optimize the selection of\n
+ * "appropriate" non-unique monsters for the nest.\n
+ *\n
+ * Note that the "get_mon_num()" function may (rarely) fail, in which\n
+ * case the nest will be empty.\n
+ *\n
+ * Note that "monster nests" will never contain "unique" monsters.\n
  */
 static bool build_type5(void)
 {
@@ -2341,41 +2441,42 @@ static bool build_type5(void)
 }
 
 
-/*
- * Type 6 -- Monster pits
- *
- * A monster pit is a "big" room, with an "inner" room, containing
- * a "collection" of monsters of a given type organized in the room.
- *
- * The inside room in a monster pit appears as shown below, where the
- * actual monsters in each location depend on the type of the pit
- *
- *   #####################
- *   #0000000000000000000#
- *   #0112233455543322110#
- *   #0112233467643322110#
- *   #0112233455543322110#
- *   #0000000000000000000#
- *   #####################
- *
- * Note that the monsters in the pit are now chosen by using "get_mon_num()"
- * to request 16 "appropriate" monsters, sorting them by level, and using
- * the "even" entries in this sorted list for the contents of the pit.
- *
- * Hack -- all of the "dragons" in a "dragon" pit must be the same "color",
- * which is handled by requiring a specific "breath" attack for all of the
- * dragons.  This may include "multi-hued" breath.  Note that "wyrms" may
- * be present in many of the dragon pits, if they have the proper breath.
- *
- * Note the use of the "get_mon_num_prep()" function, and the special
- * "get_mon_num_hook()" restriction function, to prepare the "monster
- * allocation table" in such a way as to optimize the selection of
- * "appropriate" non-unique monsters for the pit.
- *
- * Note that the "get_mon_num()" function may (rarely) fail, in which case
- * the pit will be empty.
- *
- * Note that "monster pits" will never contain "unique" monsters.
+/*!
+ * @brief ¥¿¥¤¥×6¤ÎÉô²°¡Äpit¤òÀ¸À®¤¹¤ë / Type 6 -- Monster pits
+ * @return ¤Ê¤·
+ * @details
+ * A monster pit is a "big" room, with an "inner" room, containing\n
+ * a "collection" of monsters of a given type organized in the room.\n
+ *\n
+ * The inside room in a monster pit appears as shown below, where the\n
+ * actual monsters in each location depend on the type of the pit\n
+ *\n
+ *   XXXXXXXXXXXXXXXXXXXXX\n
+ *   X0000000000000000000X\n
+ *   X0112233455543322110X\n
+ *   X0112233467643322110X\n
+ *   X0112233455543322110X\n
+ *   X0000000000000000000X\n
+ *   XXXXXXXXXXXXXXXXXXXXX\n
+ *\n
+ * Note that the monsters in the pit are now chosen by using "get_mon_num()"\n
+ * to request 16 "appropriate" monsters, sorting them by level, and using\n
+ * the "even" entries in this sorted list for the contents of the pit.\n
+ *\n
+ * Hack -- all of the "dragons" in a "dragon" pit must be the same "color",\n
+ * which is handled by requiring a specific "breath" attack for all of the\n
+ * dragons.  This may include "multi-hued" breath.  Note that "wyrms" may\n
+ * be present in many of the dragon pits, if they have the proper breath.\n
+ *\n
+ * Note the use of the "get_mon_num_prep()" function, and the special\n
+ * "get_mon_num_hook()" restriction function, to prepare the "monster\n
+ * allocation table" in such a way as to optimize the selection of\n
+ * "appropriate" non-unique monsters for the pit.\n
+ *\n
+ * Note that the "get_mon_num()" function may (rarely) fail, in which case\n
+ * the pit will be empty.\n
+ *\n
+ * Note that "monster pits" will never contain "unique" monsters.\n
  */
 static bool build_type6(void)
 {
@@ -2606,7 +2707,15 @@ static bool build_type6(void)
 }
 
 
-/* coordinate translation code */
+/*!
+ * @brief VaultÃÏ·Á¤ò²óž¡¢¾å²¼º¸±¦È¿Å¾¤¹¤ë¤¿¤á¤ÎºÂɸÊÑ´¹¤òÊÖ¤¹ / coordinate translation code
+ * @param x ÊÑ´¹¤·¤¿¤¤ÅÀ¤ÎXºÂɸ»²¾È¥Ý¥¤¥ó¥¿
+ * @param y ÊÑ´¹¤·¤¿¤¤ÅÀ¤ÎYºÂɸ»²¾È¥Ý¥¤¥ó¥¿
+ * @param xoffset VaultÀ¸À®»þ¤Î´ð½àXºÂɸ
+ * @param yoffset VaultÀ¸À®»þ¤Î´ð½àYºÂɸ
+ * @param transno ½èÍýID
+ * @return ¤Ê¤·
+ */
 static void coord_trans(int *x, int *y, int xoffset, int yoffset, int transno)
 {
        int i;
@@ -2640,9 +2749,17 @@ static void coord_trans(int *x, int *y, int xoffset, int yoffset, int transno)
        *y += yoffset;
 }
 
-
-/*
- * Hack -- fill in "vault" rooms
+/*!
+ * @brief Vault¤ò¥Õ¥í¥¢¤ËÇÛÃÖ¤¹¤ë / Hack -- fill in "vault" rooms
+ * @param yval À¸À®´ð½àYºÂɸ
+ * @param xval À¸À®´ð½àXºÂɸ
+ * @param ymax Vault¤ÎY¥µ¥¤¥º
+ * @param xmax Vault¤ÎX¥µ¥¤¥º
+ * @param data Vault¤Î¥Ç¡¼¥¿Ê¸»úÎó
+ * @param xoffset ÊÑ´¹´ð½àXºÂɸ
+ * @param yoffset ÊÑ´¹´ð½àYºÂɸ
+ * @param transno ÊÑ´¹ID
+ * @return ¤Ê¤·
  */
 static void build_vault(int yval, int xval, int ymax, int xmax, cptr data,
                int xoffset, int yoffset, int transno)
@@ -2902,8 +3019,9 @@ static void build_vault(int yval, int xval, int ymax, int xmax, cptr data,
 }
 
 
-/*
- * Type 7 -- simple vaults (see "v_info.txt")
+/*!
+ * @brief ¥¿¥¤¥×7¤ÎÉô²°¡Äv_info.txt¤è¤ê¾®·¿vault¤òÀ¸À®¤¹¤ë / Type 7 -- simple vaults (see "v_info.txt")
+ * @return ¤Ê¤·
  */
 static bool build_type7(void)
 {
@@ -2993,9 +3111,9 @@ static bool build_type7(void)
        return TRUE;
 }
 
-
-/*
- * Type 8 -- greater vaults (see "v_info.txt")
+/*!
+ * @brief ¥¿¥¤¥×8¤ÎÉô²°¡Äv_info.txt¤è¤êÂç·¿vault¤òÀ¸À®¤¹¤ë / Type 8 -- greater vaults (see "v_info.txt")
+ * @return ¤Ê¤·
  */
 static bool build_type8(void)
 {
@@ -3736,8 +3854,9 @@ static bool generate_fracave(int y0, int x0, int xsize, int ysize, int cutoff, b
 }
 
 
-/*
- * Driver routine to create fractal cave system
+/*!
+ * @brief ¥¿¥¤¥×9¤ÎÉô²°¡Ä¥Õ¥é¥¯¥¿¥ë¥«¡¼¥Ö¤Ë¤è¤ëƶ·¢À¸À® / Type 9 -- Driver routine to create fractal cave system
+ * @return ¤Ê¤·
  */
 static bool build_type9(void)
 {
@@ -5377,8 +5496,9 @@ static void build_elemental_vault(int x0, int y0, int xsiz, int ysiz)
 #endif /* ALLOW_CAVERNS_AND_LAKES */
 
 
-/*
- * Random vaults
+/*!
+ * @brief ¥¿¥¤¥×10¤ÎÉô²°¡Ä¥é¥ó¥À¥àÀ¸À®vault / Type 10 -- Random vaults
+ * @return ¤Ê¤·
  */
 static bool build_type10(void)
 {
@@ -5432,12 +5552,14 @@ static bool build_type10(void)
 }
 
 
-/*
- * Build an vertical oval room.
- * For every grid in the possible square, check the distance.
- * If it's less than the radius, make it a room square.
- *
- * When done fill from the inside to find the walls,
+/*!
+ * @brief ¥¿¥¤¥×11¤ÎÉô²°¡Ä±ß·ÁÉô²°¤ÎÀ¸À® / Type 11 -- Build an vertical oval room.
+ * @return ¤Ê¤·
+ * @details
+ * For every grid in the possible square, check the distance.\n
+ * If it's less than the radius, make it a room square.\n
+ *\n
+ * When done fill from the inside to find the walls,\n
  */
 static bool build_type11(void)
 {
@@ -5477,12 +5599,14 @@ static bool build_type11(void)
 }
 
 
-/*
- * Build crypt room.
- * For every grid in the possible square, check the (fake) distance.
- * If it's less than the radius, make it a room square.
- *
- * When done fill from the inside to find the walls,
+/*!
+ * @brief ¥¿¥¤¥×12¤ÎÉô²°¡Ä¥É¡¼¥à·¿Éô²°¤ÎÀ¸À® / Type 12 -- Build crypt room.
+ * @return ¤Ê¤·
+ * @details
+ * For every grid in the possible square, check the (fake) distance.\n
+ * If it's less than the radius, make it a room square.\n
+ *\n
+ * When done fill from the inside to find the walls,\n
  */
 static bool build_type12(void)
 {
@@ -5591,49 +5715,50 @@ static bool vault_aux_trapped_pit(int r_idx)
 }
 
 
-/*
- * Type 13 -- Trapped monster pits
- *
- * A trapped monster pit is a "big" room with a straight corridor in
- * which wall opening traps are placed, and with two "inner" rooms
- * containing a "collection" of monsters of a given type organized in
- * the room.
- *
- * The trapped monster pit appears as shown below, where the actual
- * monsters in each location depend on the type of the pit
- *
- *  #########################
- *  #                       #
- *  ####################### #
- *  #####001123454321100### #
- *  ###0012234567654322100# #
- *  ####################### #
- *  #           ^           #
- *  # #######################
- *  # #0012234567654322100###
- *  # ###001123454321100#####
- *  # #######################
- *  #                       #
- *  #########################
- *
- * Note that the monsters in the pit are now chosen by using "get_mon_num()"
- * to request 16 "appropriate" monsters, sorting them by level, and using
- * the "even" entries in this sorted list for the contents of the pit.
- *
- * Hack -- all of the "dragons" in a "dragon" pit must be the same "color",
- * which is handled by requiring a specific "breath" attack for all of the
- * dragons.  This may include "multi-hued" breath.  Note that "wyrms" may
- * be present in many of the dragon pits, if they have the proper breath.
- *
- * Note the use of the "get_mon_num_prep()" function, and the special
- * "get_mon_num_hook()" restriction function, to prepare the "monster
- * allocation table" in such a way as to optimize the selection of
- * "appropriate" non-unique monsters for the pit.
- *
- * Note that the "get_mon_num()" function may (rarely) fail, in which case
- * the pit will be empty.
- *
- * Note that "monster pits" will never contain "unique" monsters.
+/*!
+ * @brief ¥¿¥¤¥×13¤ÎÉô²°¡Ä¥È¥é¥Ã¥×pit¤ÎÀ¸À® / Type 13 -- Trapped monster pits
+ * @return ¤Ê¤·
+ * @details
+ * A trapped monster pit is a "big" room with a straight corridor in\n
+ * which wall opening traps are placed, and with two "inner" rooms\n
+ * containing a "collection" of monsters of a given type organized in\n
+ * the room.\n
+ *\n
+ * The trapped monster pit appears as shown below, where the actual\n
+ * monsters in each location depend on the type of the pit\n
+ *\n
+ *  XXXXXXXXXXXXXXXXXXXXXXXXX\n
+ *  X                       X\n
+ *  XXXXXXXXXXXXXXXXXXXXXXX X\n
+ *  XXXXX001123454321100XXX X\n
+ *  XXX0012234567654322100X X\n
+ *  XXXXXXXXXXXXXXXXXXXXXXX X\n
+ *  X           ^           X\n
+ *  X XXXXXXXXXXXXXXXXXXXXXXX\n
+ *  X X0012234567654322100XXX\n
+ *  X XXX001123454321100XXXXX\n
+ *  X XXXXXXXXXXXXXXXXXXXXXXX\n
+ *  X                       X\n
+ *  XXXXXXXXXXXXXXXXXXXXXXXXX\n
+ *\n
+ * Note that the monsters in the pit are now chosen by using "get_mon_num()"\n
+ * to request 16 "appropriate" monsters, sorting them by level, and using\n
+ * the "even" entries in this sorted list for the contents of the pit.\n
+ *\n
+ * Hack -- all of the "dragons" in a "dragon" pit must be the same "color",\n
+ * which is handled by requiring a specific "breath" attack for all of the\n
+ * dragons.  This may include "multi-hued" breath.  Note that "wyrms" may\n
+ * be present in many of the dragon pits, if they have the proper breath.\n
+ *\n
+ * Note the use of the "get_mon_num_prep()" function, and the special\n
+ * "get_mon_num_hook()" restriction function, to prepare the "monster\n
+ * allocation table" in such a way as to optimize the selection of\n
+ * "appropriate" non-unique monsters for the pit.\n
+ *\n
+ * Note that the "get_mon_num()" function may (rarely) fail, in which case\n
+ * the pit will be empty.\n
+ *\n
+ * Note that "monster pits" will never contain "unique" monsters.\n
  */
 static bool build_type13(void)
 {
@@ -5883,9 +6008,10 @@ static bool build_type13(void)
 }
 
 
-/*
- * Type 14 -- trapped rooms
- *
+/*!
+ * @brief ¥¿¥¤¥×14¤ÎÉô²°¡ÄÆüì¥È¥é¥Ã¥×Éô²°¤ÎÀ¸À® / Type 14 -- trapped rooms
+ * @return ¤Ê¤·
+ * @details
  * A special trap is placed at center of the room
  */
 static bool build_type14(void)
@@ -6019,8 +6145,9 @@ static bool kind_is_potion(int k_idx)
        return k_info[k_idx].tval == TV_POTION;
 }
 
-/*
- * Type 15 -- glass rooms
+/*!
+ * @brief ¥¿¥¤¥×15¤ÎÉô²°¡Ä¥¬¥é¥¹Éô²°¤ÎÀ¸À® / Type 15 -- glass rooms
+ * @return ¤Ê¤·
  */
 static bool build_type15(void)
 {
@@ -6295,7 +6422,7 @@ void generate_fill_perm_bold(int y1, int x1, int y2, int x2)
                for (x = x1; x <= x2; x++)
                {
                        /* Point to grid */
-                       place_extra_perm_bold(y, x);
+                       place_inner_perm_bold(y, x);
                }
        }
 }
@@ -6473,18 +6600,19 @@ static void build_stores(int ltcy, int ltcx, int stores[], int n)
 }
 
 
-/*
- * Type 16 -- Underground Arcade
- *
- * Town logic flow for generation of new town
- * Originally from Vanilla 3.0.3
- *
- * We start with a fully wiped cave of normal floors.
- *
- * Note that town_gen_hack() plays games with the R.N.G.
- *
- * This function does NOT do anything about the owners of the stores,
- * nor the contents thereof.  It only handles the physical layout.
+/*!
+ * @brief ¥¿¥¤¥×16¤ÎÉô²°¡ÄÃϲ¼ÅÔ»Ô¤ÎÀ¸À® / Type 16 -- Underground Arcade
+ * @return ¤Ê¤·
+ * @details
+ * Town logic flow for generation of new town\n
+ * Originally from Vanilla 3.0.3\n
+ *\n
+ * We start with a fully wiped cave of normal floors.\n
+ *\n
+ * Note that town_gen_hack() plays games with the R.N.G.\n
+ *\n
+ * This function does NOT do anything about the owners of the stores,\n
+ * nor the contents thereof.  It only handles the physical layout.\n
  */
 static bool build_type16(void)
 {
@@ -6543,7 +6671,7 @@ static bool build_type16(void)
        /* Generate new room */
        generate_room_floor(
                y1 + town_hgt / 3, x1 + town_wid / 3,
-               y1 + town_hgt * 2 / 3, x < x1 + town_wid * 2 / 3, FALSE);
+               y1 + town_hgt * 2 / 3, x1 + town_wid * 2 / 3, FALSE);
 
        /* Build stores */
        build_stores(y1, x1, stores, n);
@@ -6804,7 +6932,7 @@ bool generate_rooms(void)
                if (!remain) break;
        }
 
-       if (rooms_built < 1) return FALSE;
+       if (rooms_built < 2) return FALSE;
 
        if (cheat_room)
        {