OSDN Git Service

#37324 (2.2.0.28) obj-desc.spo の出力内容に、にアイテム生成chance値を追加。 / Add chance values to info...
[hengband/hengband.git] / src / rooms.c
index e741c24..0009a2b 100644 (file)
@@ -1,6 +1,6 @@
-/*!
+/*!
  * @file rooms.c
- * @brief ¥À¥ó¥¸¥ç¥ó¥Õ¥í¥¢¤ÎÉô²°À¸À®½èÍý / make rooms. Used by generate.c when creating dungeons.
+ * @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
  *  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"
@@ -37,7 +43,7 @@
 
 
 /*!
- * ³ÆÉô²°¥¿¥¤¥×¤ÎÀ¸À®ÈæÄêµÁ
+ * 各部屋タイプの生成比定義
  *[from SAngband (originally from OAngband)]\n
  *\n
  * Table of values that control how many times each type of room will\n
@@ -76,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,
@@ -97,10 +103,10 @@ static byte room_build_order[ROOM_T_MAX] = {
 };
 
 /*!
- * @brief ¸°¤Î¤«¤«¤Ã¤¿¥É¥¢¤òÇÛÃÖ¤¹¤ë
- * @param y ÇÛÃÖ¤·¤¿¤¤¥Õ¥í¥¢¤ÎYºÂɸ
- * @param x ÇÛÃÖ¤·¤¿¤¤¥Õ¥í¥¢¤ÎXºÂɸ
- * @return ¤Ê¤·
+ * @brief 鍵のかかったドアを配置する
+ * @param y 配置したいフロアのY座標
+ * @param x 配置したいフロアのX座標
+ * @return なし
  */
 static void place_locked_door(int y, int x)
 {
@@ -117,11 +123,11 @@ 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 ¤Ê¤·
+ * @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)
 {
@@ -165,9 +171,9 @@ static void place_secret_door(int y, int x, int type)
 }
 
 /*!
- * @brief 1¥Þ¥¹¤À¤±¤ÎÉô²°¤òºîÀ®¤·¡¢¾å²¼º¸±¦¤¤¤º¤ì¤«°ì¤Ä¤Ë±£¤·¥É¥¢¤òÇÛÃÖ¤¹¤ë¡£
- * @param y0 ÇÛÃÖ¤·¤¿¤¤Ãæ¿´¤ÎYºÂɸ
- * @param x0 ÇÛÃÖ¤·¤¿¤¤Ãæ¿´¤ÎXºÂɸ
+ * @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.
@@ -209,13 +215,13 @@ static void build_small_room(int x0, int y0)
 
 /*!
  * @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 ¤Ê¤·
+ * @param x1 範囲の左端
+ * @param y1 範囲の上端
+ * @param x2 範囲の右端
+ * @param y2 範囲の下端
+ * @return なし
  */
 static void check_room_boundary(int x1, int y1, int x2, int y2)
 {
@@ -295,13 +301,13 @@ static void check_room_boundary(int x1, int y1, int x2, int y2)
 
 /*!
  * @brief
- * find_space()¤ÎͽÈ÷½èÍý¤È¤·¤ÆÉô²°¤ÎÀ¸À®¤¬²Äǽ¤«¤òȽÄꤹ¤ë /
+ * find_space()の予備処理として部屋の生成が可能かを判定する /
  * Helper function for find_space(). Is this a good location?
- * @param block_high ÈϰϤι⤵
- * @param block_wide ÈϰϤÎÉý
- * @param block_y ÈϰϤξåü
- * @param block_x ÈϰϤκ¸Ã¼
- * @return ¤Ê¤·
+ * @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)
 {
@@ -375,11 +381,12 @@ static bool find_space_aux(int blocks_high, int blocks_wide, int block_y, int bl
 
 
 /*!
- * @brief Éô²°À¸À®¤¬²Äǽ¤Ê¥¹¥Ú¡¼¥¹¤ò³ÎÊݤ¹¤ë / Find a good spot for the next room.  -LM-
- * @param y Éô²°¤ÎÀ¸À®¤¬²Äǽ¤ÊÃæ¿´YºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
- * @param x Éô²°¤ÎÀ¸À®¤¬²Äǽ¤ÊÃæ¿´XºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
- * @param height ³ÎÊݤ·¤¿¤¤Îΰè¤Î¹â¤µ
- * @param width ³ÎÊݤ·¤¿¤¤Îΰè¤ÎÉý
+ * @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
@@ -508,9 +515,9 @@ static bool find_space(int *y, int *x, int height, int width)
 }
 
 
-
-/*
- * Type 1 -- normal rectangular rooms
+/*!
+ * @brief タイプ1の部屋…通常可変長方形の部屋を生成する / Type 1 -- normal rectangular rooms
+ * @return なし
  */
 static bool build_type1(void)
 {
@@ -703,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)
 {
@@ -818,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)
 {
@@ -1077,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)
 {
@@ -1405,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
@@ -1429,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)
 {
@@ -1449,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)
 {
@@ -1471,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)
 {
@@ -1490,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)
 {
@@ -1507,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)
 {
@@ -1539,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)
 {
@@ -1557,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)
 {
@@ -1575,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)
 {
@@ -1587,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)
 {
@@ -1609,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)
 {
@@ -1631,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)
 {
@@ -1652,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)
 {
@@ -1673,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)
 {
@@ -1696,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)
 {
@@ -1720,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)
 {
@@ -1740,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)
 {
@@ -1760,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)
 {
@@ -1776,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)
 {
@@ -1796,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)
 {
@@ -1870,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)
 {
@@ -1894,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;
@@ -1907,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;
@@ -1955,19 +2010,20 @@ 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
-       {"¥¯¥í¡¼¥ó",     vault_aux_clone,    vault_prep_clone,   5, 3},
-       {"¥¼¥ê¡¼",       vault_aux_jelly,    NULL,               5, 6},
-       {"¥·¥ó¥Ü¥ë(Á±)", vault_aux_symbol_g, vault_prep_symbol, 25, 2},
-       {"¥·¥ó¥Ü¥ë(°­)", vault_aux_symbol_e, vault_prep_symbol, 25, 2},
-       {"¥ß¥ß¥Ã¥¯",     vault_aux_mimic,    NULL,              30, 4},
-       {"¶¸µ¤",         vault_aux_cthulhu,  NULL,              70, 2},
-       {"¸¤¾®²°",       vault_aux_kennel,   NULL,              45, 4},
-       {"ưʪ±à",       vault_aux_animal,   NULL,              35, 5},
-       {"¶µ²ñ",         vault_aux_chapel_g, NULL,              75, 4},
-       {"¥¢¥ó¥Ç¥Ã¥É",   vault_aux_undead,   NULL,              75, 5},
+       {"クローン",     vault_aux_clone,    vault_prep_clone,   5, 3},
+       {"ã\82¼ã\83ªã\83¼",       vault_aux_jelly,    NULL,               5, 6},
+       {"シンボル(善)", vault_aux_symbol_g, vault_prep_symbol, 25, 2},
+       {"シンボル(悪)", vault_aux_symbol_e, vault_prep_symbol, 25, 2},
+       {"ã\83\9fã\83\9fã\83\83ã\82¯",     vault_aux_mimic,    NULL,              30, 4},
+       {"狂気",         vault_aux_cthulhu,  NULL,              70, 2},
+       {"犬小屋",       vault_aux_kennel,   NULL,              45, 4},
+       {"動物園",       vault_aux_animal,   NULL,              35, 5},
+       {"教会",         vault_aux_chapel_g, NULL,              75, 4},
+       {"アンデッド",   vault_aux_undead,   NULL,              75, 5},
        {NULL,           NULL,               NULL,               0, 0},
 #else
        {"clone",        vault_aux_clone,    vault_prep_clone,   5, 3},
@@ -1984,19 +2040,20 @@ static vault_aux_type nest_types[] =
 #endif
 };
 
+/*!pit情報テーブル*/
 static vault_aux_type pit_types[] =
 {
 #ifdef JP
-       {"¥ª¡¼¥¯",       vault_aux_orc,      NULL,               5, 6},
-       {"¥È¥í¥ë",       vault_aux_troll,    NULL,              20, 6},
-       {"¥¸¥ã¥¤¥¢¥ó¥È", vault_aux_giant,    NULL,              50, 6},
-       {"¶¸µ¤",         vault_aux_cthulhu,  NULL,              80, 2},
-       {"¥·¥ó¥Ü¥ë(Á±)", vault_aux_symbol_g, vault_prep_symbol, 70, 1},
-       {"¥·¥ó¥Ü¥ë(°­)", vault_aux_symbol_e, vault_prep_symbol, 70, 1},
-       {"¶µ²ñ",         vault_aux_chapel_g, NULL,              65, 2},
-       {"¥É¥é¥´¥ó",     vault_aux_dragon,   vault_prep_dragon, 70, 6},
-       {"¥Ç¡¼¥â¥ó",     vault_aux_demon,    NULL,              80, 6},
-       {"¥À¡¼¥¯¥¨¥ë¥Õ", vault_aux_dark_elf, NULL,              45, 4},
+       {"ã\82ªã\83¼ã\82¯",       vault_aux_orc,      NULL,               5, 6},
+       {"トロル",       vault_aux_troll,    NULL,              20, 6},
+       {"ジャイアント", vault_aux_giant,    NULL,              50, 6},
+       {"狂気",         vault_aux_cthulhu,  NULL,              80, 2},
+       {"シンボル(善)", vault_aux_symbol_g, vault_prep_symbol, 70, 1},
+       {"シンボル(悪)", vault_aux_symbol_e, vault_prep_symbol, 70, 1},
+       {"教会",         vault_aux_chapel_g, NULL,              65, 2},
+       {"ドラゴン",     vault_aux_dragon,   vault_prep_dragon, 70, 6},
+       {"デーモン",     vault_aux_demon,    NULL,              80, 6},
+       {"ダークエルフ", vault_aux_dark_elf, NULL,              45, 4},
        {NULL,           NULL,               NULL,               0, 0},
 #else
        {"orc",          vault_aux_orc,      NULL,               5, 6},
@@ -2014,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
@@ -2026,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
@@ -2039,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,14 +2136,14 @@ static cptr pit_subtype_string(int type, bool nest)
                        switch (vault_aux_dragon_mask4)
                        {
 #ifdef JP
-                       case RF4_BR_ACID: strcpy(inner_buf, "(»À)");   break;
-                       case RF4_BR_ELEC: strcpy(inner_buf, "(°ðºÊ)"); break;
-                       case RF4_BR_FIRE: strcpy(inner_buf, "(²Ð±ê)"); break;
-                       case RF4_BR_COLD: strcpy(inner_buf, "(Î䵤)"); break;
-                       case RF4_BR_POIS: strcpy(inner_buf, "(ÆÇ)");   break;
+                       case RF4_BR_ACID: strcpy(inner_buf, "()");   break;
+                       case RF4_BR_ELEC: strcpy(inner_buf, "(稲妻)"); break;
+                       case RF4_BR_FIRE: strcpy(inner_buf, "(火炎)"); break;
+                       case RF4_BR_COLD: strcpy(inner_buf, "(冷気)"); break;
+                       case RF4_BR_POIS: strcpy(inner_buf, "()");   break;
                        case (RF4_BR_ACID | RF4_BR_ELEC | RF4_BR_FIRE | RF4_BR_COLD | RF4_BR_POIS):
-                               strcpy(inner_buf, "(Ëü¿§)"); break;
-                       default: strcpy(inner_buf, "(̤ÄêµÁ)"); break;
+                               strcpy(inner_buf, "(万色)"); break;
+                       default: strcpy(inner_buf, "(未定義)"); break;
 #else
                        case RF4_BR_ACID: strcpy(inner_buf, "(acid)");      break;
                        case RF4_BR_ELEC: strcpy(inner_buf, "(lightning)"); break;
@@ -2101,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;
@@ -2111,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)
 {
@@ -2145,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)
 {
@@ -2164,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
+#define NUM_NEST_MON_TYPE 64 /*!<nestの種別数 */
 
-/*
- * 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.
+
+/*!
+ * @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)
 {
@@ -2321,11 +2394,7 @@ static bool build_type5(void)
        if (cheat_room)
        {
                /* Room type */
-#ifdef JP
-               msg_format("¥â¥ó¥¹¥¿¡¼Éô²°(nest)(%s%s)", n_ptr->name, pit_subtype_string(cur_nest_type, TRUE));
-#else
-               msg_format("Monster nest (%s%s)", n_ptr->name, pit_subtype_string(cur_nest_type, TRUE));
-#endif
+               msg_format(_("モンスター部屋(nest)(%s%s)", "Monster nest (%s%s)"), n_ptr->name, pit_subtype_string(cur_nest_type, TRUE));
        }
 
        /* Place some monsters */
@@ -2368,41 +2437,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)
 {
@@ -2560,11 +2630,7 @@ static bool build_type6(void)
        if (cheat_room)
        {
                /* Room type */
-#ifdef JP
-               msg_format("¥â¥ó¥¹¥¿¡¼Éô²°(pit)(%s%s)", n_ptr->name, pit_subtype_string(cur_pit_type, FALSE));
-#else
-               msg_format("Monster pit (%s%s)", n_ptr->name, pit_subtype_string(cur_pit_type, FALSE));
-#endif
+               msg_format(_("モンスター部屋(pit)(%s%s)", "Monster pit (%s%s)"), n_ptr->name, pit_subtype_string(cur_pit_type, FALSE));
        }
 
        /* Select the entries */
@@ -2633,7 +2699,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;
@@ -2667,9 +2741,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)
@@ -2929,12 +3011,13 @@ 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)
 {
-       vault_type *v_ptr;
+       vault_type *v_ptr = NULL;
        int dummy;
        int x, y;
        int xval, yval;
@@ -2956,11 +3039,7 @@ static bool build_type7(void)
        {
                if (cheat_room)
                {
-#ifdef JP
-                       msg_print("·Ù¹ð¡ª¾®¤µ¤ÊÃϲ¼¼¼¤òÇÛÃ֤Ǥ­¤Þ¤»¤ó¡ª");
-#else
-                       msg_print("Warning! Could not place lesser vault!");
-#endif
+                       msg_print(_("警告!小さな地下室を配置できません!", "Warning! Could not place lesser vault!"));
                }
                return FALSE;
        }
@@ -3007,11 +3086,7 @@ static bool build_type7(void)
 #endif
 
        /* Message */
-#ifdef JP
-       if (cheat_room) msg_format("¾®¤µ¤ÊÃϲ¼¼¼(%s)", v_name + v_ptr->name);
-#else
-       if (cheat_room) msg_format("Lesser vault (%s)", v_name + v_ptr->name);
-#endif
+       if (cheat_room) msg_format(_("小さな地下室(%s)", "Lesser vault (%s)"), v_name + v_ptr->name);
 
        /* Hack -- Build the vault */
        build_vault(yval, xval, v_ptr->hgt, v_ptr->wid,
@@ -3020,9 +3095,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)
 {
@@ -3048,11 +3123,7 @@ static bool build_type8(void)
        {
                if (cheat_room)
                {
-#ifdef JP
-                       msg_print("·Ù¹ð¡ªµðÂç¤ÊÃϲ¼¼¼¤òÇÛÃ֤Ǥ­¤Þ¤»¤ó¡ª");
-#else
-                       msg_print("Warning! Could not place greater vault!");
-#endif
+                       msg_print(_("警告!巨大な地下室を配置できません!", "Warning! Could not place greater vault!"));
                }
                return FALSE;
        }
@@ -3105,11 +3176,7 @@ static bool build_type8(void)
 #endif
 
        /* Message */
-#ifdef JP
-       if (cheat_room) msg_format("µðÂç¤ÊÃϲ¼¼¼(%s)", v_name + v_ptr->name);
-#else
-       if (cheat_room) msg_format("Greater vault (%s)", v_name + v_ptr->name);
-#endif
+       if (cheat_room) msg_format(_("巨大な地下室(%s)", "Greater vault (%s)"), v_name + v_ptr->name);
 
        /* Hack -- Build the vault */
        build_vault(yval, xval, v_ptr->hgt, v_ptr->wid,
@@ -3763,8 +3830,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)
 {
@@ -4311,23 +4379,23 @@ static void build_bubble_vault(int x0, int y0, int xsize, int ysize)
        /* Top and bottom boundaries */
        for (i = 0; i < xsize; i++)
        {
-               int x = x0 - xhsize + i;
+               int side_x = x0 - xhsize + i;
 
-               place_outer_noperm_bold(y0 - yhsize + 0, x);
-               cave[y0 - yhsize + 0][x].info |= (CAVE_ROOM | CAVE_ICKY);
-               place_outer_noperm_bold(y0 - yhsize + ysize - 1, x);
-               cave[y0 - yhsize + ysize - 1][x].info |= (CAVE_ROOM | CAVE_ICKY);
+               place_outer_noperm_bold(y0 - yhsize + 0, side_x);
+               cave[y0 - yhsize + 0][side_x].info |= (CAVE_ROOM | CAVE_ICKY);
+               place_outer_noperm_bold(y0 - yhsize + ysize - 1, side_x);
+               cave[y0 - yhsize + ysize - 1][side_x].info |= (CAVE_ROOM | CAVE_ICKY);
        }
 
        /* Left and right boundaries */
        for (i = 1; i < ysize - 1; i++)
        {
-               int y = y0 - yhsize + i;
+               int side_y = y0 - yhsize + i;
 
-               place_outer_noperm_bold(y, x0 - xhsize + 0);
-               cave[y][x0 - xhsize + 0].info |= (CAVE_ROOM | CAVE_ICKY);
-               place_outer_noperm_bold(y, x0 - xhsize + xsize - 1);
-               cave[y][x0 - xhsize + xsize - 1].info |= (CAVE_ROOM | CAVE_ICKY);
+               place_outer_noperm_bold(side_y, x0 - xhsize + 0);
+               cave[side_y][x0 - xhsize + 0].info |= (CAVE_ROOM | CAVE_ICKY);
+               place_outer_noperm_bold(side_y, x0 - xhsize + xsize - 1);
+               cave[side_y][x0 - xhsize + xsize - 1].info |= (CAVE_ROOM | CAVE_ICKY);
        }
 
        /* Fill in middle with bubbles */
@@ -5404,8 +5472,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)
 {
@@ -5459,12 +5528,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)
 {
@@ -5504,12 +5575,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)
 {
@@ -5618,49 +5691,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)
 {
@@ -5879,11 +5953,7 @@ static bool build_type13(void)
        if (cheat_room)
        {
                /* Room type */
-#ifdef JP
-               msg_format("%s%s¤Î櫥ԥåÈ", n_ptr->name, pit_subtype_string(cur_pit_type, FALSE));
-#else
-               msg_format("Trapped monster pit (%s%s)", n_ptr->name, pit_subtype_string(cur_pit_type, FALSE));
-#endif
+               msg_format(_("%s%sの罠ピット", "Trapped monster pit (%s%s)"), n_ptr->name, pit_subtype_string(cur_pit_type, FALSE));
        }
 
        /* Select the entries */
@@ -5910,9 +5980,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)
@@ -5989,11 +6060,7 @@ static bool build_type14(void)
        /* Message */
        if (cheat_room)
        {
-#ifdef JP
-               msg_format("%s¤ÎÉô²°", f_name + f_info[trap].name);
-#else
-               msg_format("Room of %s", f_name + f_info[trap].name);
-#endif
+               msg_format(_("%sの部屋", "Room of %s"), f_name + f_info[trap].name);
        }
 
        return TRUE;
@@ -6011,7 +6078,7 @@ static bool vault_aux_lite(int r_idx)
        if (!vault_monster_okay(r_idx)) return FALSE;
 
        /* Require lite attack */
-       if (!(r_ptr->flags4 & RF4_BR_LITE) && !(r_ptr->flags5 & RF5_BA_LITE)) return FALSE;
+       if (!(r_ptr->flags4 & RF4_BR_LITE) && !(r_ptr->a_ability_flags1 & RF5_BA_LITE)) return FALSE;
 
        /* No wall passing monsters */
        if (r_ptr->flags2 & (RF2_PASS_WALL | RF2_KILL_WALL)) return FALSE;
@@ -6046,8 +6113,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)
 {
@@ -6282,11 +6350,7 @@ static bool build_type15(void)
        /* Message */
        if (cheat_room)
        {
-#ifdef JP
-               msg_print("¥¬¥é¥¹¤ÎÉô²°");
-#else
-               msg_print("Glass room");
-#endif
+               msg_print(_("ガラスの部屋", "Glass room"));
        }
 
        return TRUE;
@@ -6423,8 +6487,14 @@ static bool precalc_ugarcade(int town_hgt, int town_wid, int n)
        return i == n;
 }
 
-/*
- * Actually create buildings
+/*!
+ * @brief タイプ16の部屋…地下都市生成のサブルーチン / Actually create buildings
+ * @return なし
+ * @param ltcy 生成基準Y座標
+ * @param ltcx 生成基準X座標
+ * @param stotes[] 生成する店舗のリスト
+ * @param n 生成する店舗の数
+ * @note
  * Note: ltcy and ltcx indicate "left top corner".
  */
 static void build_stores(int ltcy, int ltcx, int stores[], int n)
@@ -6500,18 +6570,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)
 {
@@ -6575,11 +6646,7 @@ static bool build_type16(void)
        /* Build stores */
        build_stores(y1, x1, stores, n);
 
-#ifdef JP
-       if (cheat_room) msg_print("Ãϲ¼³¹");
-#else
-       if (cheat_room) msg_print("Underground Arcade");
-#endif
+       if (cheat_room) msg_print(_("地下街", "Underground Arcade"));
 
        /* Free buildings array */
        C_KILL(ugbldg, n, ugbldg_type);
@@ -6588,11 +6655,11 @@ static bool build_type16(void)
 }
 
 
-/*
- * Attempt to build a room of the given type at the given block
- *
- * Note that we restrict the number of "crowded" rooms to reduce
- * the chance of overflowing the monster list during level creation.
+/*!
+ * @brief 与えられた部屋型IDに応じて部屋の生成処理分岐を行い結果を返す / Attempt to build a room of the given type at the given block
+ * @param type 部屋型ID
+ * @note that we restrict the number of "crowded" rooms to reduce the chance of overflowing the monster list during level creation.
+ * @return 部屋の精製に成功した場合 TRUE を返す。
  */
 static bool room_build(int typ)
 {
@@ -6622,13 +6689,16 @@ static bool room_build(int typ)
        return FALSE;
 }
 
+/*!
+ * @brief 指定した部屋の生成確率を別の部屋に加算し、指定した部屋の生成率を0にする
+ * @param dst 確率を移す先の部屋種ID
+ * @param src 確率を与える元の部屋種ID
+ */
+#define MOVE_PLIST(dst, src) (prob_list[dst] += prob_list[src], prob_list[src] = 0) 
 
-#define MOVE_PLIST(dst, src) (prob_list[dst] += prob_list[src], prob_list[src] = 0)
-
-/*
- * [from SAngband (originally from OAngband)]
- * 
- * Generate rooms in dungeon.  Build bigger rooms at first.
+/*!
+ * @brief 部屋生成処理のメインルーチン(Sangbandを経由してOangbandからの実装を引用) / Generate rooms in dungeon.  Build bigger rooms at first. [from SAngband (originally from OAngband)]
+ * @return 部屋生成に成功した場合 TRUE を返す。
  */
 bool generate_rooms(void)
 {
@@ -6670,7 +6740,7 @@ bool generate_rooms(void)
         * XXX -- Various dungeon types and options.
         */
 
-       /* Ironman sees only Greater Vaults */
+       /*! @details ダンジョンにBEGINNER、CHAMELEON、SMALLESTいずれのフラグもなく、かつ「常に通常でない部屋を生成する」フラグがONならば、GRATER_VAULTのみを生成対象とする。 / Ironman sees only Greater Vaults */
        if (ironman_rooms && !((d_info[dungeon_type].flags1 & (DF1_BEGINNER | DF1_CHAMELEON | DF1_SMALLEST))))
        {
                for (i = 0; i < ROOM_T_MAX; i++)
@@ -6680,7 +6750,7 @@ bool generate_rooms(void)
                }
        }
 
-       /* Forbidden vaults */
+       /*! @details ダンジョンにNO_VAULTフラグがあるならば、LESSER_VAULT / GREATER_VAULT/ RANDOM_VAULTを除外 / Forbidden vaults */
        else if (d_info[dungeon_type].flags1 & DF1_NO_VAULT)
        {
                prob_list[ROOM_T_LESSER_VAULT] = 0;
@@ -6688,8 +6758,7 @@ bool generate_rooms(void)
                prob_list[ROOM_T_RANDOM_VAULT] = 0;
        }
 
-
-       /* NO_CAVE dungeon (Castle)*/
+       /*! @details ダンジョンにNO_CAVEフラグがある場合、FRACAVEの生成枠がNORMALに与えられる。CRIPT、OVALの生成枠がINNER_Fに与えられる。/ NO_CAVE dungeon (Castle)*/
        if (d_info[dungeon_type].flags1 & DF1_NO_CAVE)
        {
                MOVE_PLIST(ROOM_T_NORMAL, ROOM_T_FRACAVE);
@@ -6697,24 +6766,25 @@ bool generate_rooms(void)
                MOVE_PLIST(ROOM_T_INNER_FEAT, ROOM_T_OVAL);
        }
 
-       /* CAVE dungeon (Orc cave etc.) */
+       /*! @details ダンジョンにCAVEフラグがある場合、NORMALの生成枠がFRACAVEに与えられる。/ CAVE dungeon (Orc cave etc.) */
        else if (d_info[dungeon_type].flags1 & DF1_CAVE)
        {
                MOVE_PLIST(ROOM_T_FRACAVE, ROOM_T_NORMAL);
        }
 
-       /* No caves when a (random) cavern exists: they look bad */
+       /*! @details ダンジョンの基本地形が最初から渓谷かアリーナ型の場合 FRACAVE は生成から除外。 /  No caves when a (random) cavern exists: they look bad */
        else if (dun->cavern || dun->empty_level)
        {
                prob_list[ROOM_T_FRACAVE] = 0;
        }
 
-       /* Forbidden glass rooms */
+       /*! @details ダンジョンに最初からGLASS_ROOMフラグがある場合、GLASS を生成から除外。/ Forbidden glass rooms */
        if (!(d_info[dungeon_type].flags1 & DF1_GLASS_ROOM))
        {
                prob_list[ROOM_T_GLASS] = 0;
        }
 
+       /*! @details ARCADEは同フラグがダンジョンにないと生成されない。 / Forbidden glass rooms */
        if (!(d_info[dungeon_type].flags1 & DF1_ARCADE))
        {
                prob_list[ROOM_T_ARCADE] = 0;
@@ -6831,15 +6901,11 @@ bool generate_rooms(void)
                if (!remain) break;
        }
 
-       if (rooms_built < 2) return FALSE;
+       if (rooms_built < 2) return FALSE; /*! @details 部屋生成数が2未満の場合生成失敗を返す */
 
        if (cheat_room)
        {
-#ifdef JP
-               msg_format("Éô²°¿ô: %d", rooms_built);
-#else
-               msg_format("Number of Rooms: %d", rooms_built);
-#endif
+               msg_format(_("部屋数: %d", "Number of Rooms: %d"), rooms_built);
        }
 
        return TRUE;