OSDN Git Service

#37784 summon_specific()で特定種族を指定しない(type=0)時はPM_ALLOW_UNIQUEを指定しなくても、ユニークを候補に入れてしまう不具...
[hengband/hengband.git] / src / rooms.c
index 24ecb45..96b7c2c 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
@@ -43,7 +43,7 @@
 
 
 /*!
- * ³ÆÉô²°¥¿¥¤¥×¤ÎÀ¸À®ÈæÄêµÁ
+ * 各部屋タイプの生成比定義
  *[from SAngband (originally from OAngband)]\n
  *\n
  * Table of values that control how many times each type of room will\n
@@ -82,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,
@@ -103,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)
 {
@@ -123,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)
 {
@@ -171,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.
@@ -215,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)
 {
@@ -301,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 blocks_high ÈϰϤι⤵
- * @param blocks_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)
 {
@@ -381,12 +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 ³ÎÊݤ·¤¿¤¤Îΰè¤ÎÉý
- * @return ½êÄê¤ÎÈϰϤ¬³ÎÊݤǤ­¤¿¾ì¹çTRUE¤òÊÖ¤¹
+ * @brief 部屋生成が可能なスペースを確保する / Find a good spot for the next room.  -LM-
+ * @param y é\83¨å±\8bã\81®ç\94\9fæ\88\90ã\81\8cå\8f¯è\83½ã\81ªä¸­å¿\83Y座æ¨\99ã\82\92è¿\94ã\81\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param x é\83¨å±\8bã\81®ç\94\9fæ\88\90ã\81\8cå\8f¯è\83½ã\81ªä¸­å¿\83X座æ¨\99ã\82\92è¿\94ã\81\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @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
@@ -400,7 +400,7 @@ static bool find_space_aux(int blocks_high, int blocks_wide, int block_y, int bl
  * 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)
+static bool find_space(POSITION *y, POSITION *x, POSITION height, POSITION width)
 {
        int candidates, pick;
        int by, bx, by1, bx1, by2, bx2;
@@ -486,8 +486,8 @@ static bool find_space(int *y, int *x, int height, int width)
        /* Save the room location */
        if (dun->cent_n < CENT_MAX)
        {
-               dun->cent[dun->cent_n].y = *y;
-               dun->cent[dun->cent_n].x = *x;
+               dun->cent[dun->cent_n].y = (byte_hack)*y;
+               dun->cent[dun->cent_n].x = (byte_hack)*x;
                dun->cent_n++;
        }
 
@@ -516,13 +516,13 @@ static bool find_space(int *y, int *x, int height, int width)
 
 
 /*!
- * @brief ¥¿¥¤¥×1¤ÎÉô²°¡ÄÄ̾ï²ÄÊÑĹÊý·Á¤ÎÉô²°¤òÀ¸À®¤¹¤ë / Type 1 -- normal rectangular rooms
- * @return ¤Ê¤·
+ * @brief タイプ1の部屋…通常可変長方形の部屋を生成する / Type 1 -- normal rectangular rooms
+ * @return なし
  */
 static bool build_type1(void)
 {
-       int y, x, y2, x2, yval, xval;
-       int y1, x1, xsize, ysize;
+       POSITION y, x, y2, x2, yval, xval;
+       POSITION y1, x1, xsize, ysize;
 
        bool light;
 
@@ -711,14 +711,14 @@ static bool build_type1(void)
 }
 
 /*!
- * @brief ¥¿¥¤¥×2¤ÎÉô²°¡ÄÆó½ÅĹÊý·Á¤ÎÉô²°¤òÀ¸À®¤¹¤ë / Type 2 -- Overlapping rectangular rooms
- * @return ¤Ê¤·
+ * @brief タイプ2の部屋…二重長方形の部屋を生成する / Type 2 -- Overlapping rectangular rooms
+ * @return なし
  */
 static bool build_type2(void)
 {
-       int                     y, x, xval, yval;
-       int                     y1a, x1a, y2a, x2a;
-       int                     y1b, x1b, y2b, x2b;
+       POSITION        y, x, xval, yval;
+       POSITION        y1a, x1a, y2a, x2a;
+       POSITION        y1b, x1b, y2b, x2b;
        bool            light;
        cave_type   *c_ptr;
 
@@ -826,8 +826,8 @@ static bool build_type2(void)
 
 
 /*!
- * @brief ¥¿¥¤¥×2¤ÎÉô²°¡Ä½½»ú·¿¤ÎÉô²°¤òÀ¸À®¤¹¤ë / Type 3 -- Cross shaped rooms
- * @return ¤Ê¤·
+ * @brief タイプ2の部屋…十字型の部屋を生成する / Type 3 -- Cross shaped rooms
+ * @return なし
  * @details
  * Builds a room at a row, column coordinate\n
  *\n
@@ -840,10 +840,10 @@ static bool build_type2(void)
  */
 static bool build_type3(void)
 {
-       int                     y, x, dy, dx, wy, wx;
-       int                     y1a, x1a, y2a, x2a;
-       int                     y1b, x1b, y2b, x2b;
-       int                     yval, xval;
+       POSITION y, x, dy, dx, wy, wx;
+       POSITION y1a, x1a, y2a, x2a;
+       POSITION y1b, x1b, y2b, x2b;
+       POSITION yval, xval;
        bool            light;
        cave_type   *c_ptr;
 
@@ -1086,8 +1086,8 @@ static bool build_type3(void)
 
 
 /*!
- * @brief ¥¿¥¤¥×4¤ÎÉô²°¡Ä¸ÇÄꥵ¥¤¥º¤ÎÆó½Å¹½Â¤Éô²°¤òÀ¸À®¤¹¤ë / Type 4 -- Large room with inner features
- * @return ¤Ê¤·
+ * @brief タイプ4の部屋…固定サイズの二重構造部屋を生成する / Type 4 -- Large room with inner features
+ * @return なし
  * @details
  * Possible sub-types:\n
  *     1 - Just an inner room with one door\n
@@ -1098,8 +1098,8 @@ static bool build_type3(void)
  */
 static bool build_type4(void)
 {
-       int         y, x, y1, x1;
-       int         y2, x2, tmp, yval, xval;
+       POSITION y, x, y1, x1;
+       POSITION y2, x2, tmp, yval, xval;
        bool        light;
        cave_type   *c_ptr;
 
@@ -1416,7 +1416,7 @@ static bool build_type4(void)
 
 
 /*!
- * vault¤ËÇÛÃÖ²Äǽ¤Ê¥â¥ó¥¹¥¿¡¼¤Î¾ò·ï¤ò»ØÄꤹ¤ë¥Þ¥¯¥í / Monster validation macro
+ * vaultに配置可能なモンスターの条件を指定するマクロ / Monster validation macro
  *
  * Line 1 -- forbid town monsters
  * Line 2 -- forbid uniques
@@ -1430,23 +1430,23 @@ static bool build_type4(void)
         !(r_info[I].flags7 & RF7_AQUATIC))
 
 
-/*! Ä̾ïpitÀ¸À®»þ¤Î¥â¥ó¥¹¥¿¡¼¤Î¹½À®¾ò·ïID / Race index for "monster pit (clone)" */
+/*! 通常pit生成時のモンスターの構成条件ID / Race index for "monster pit (clone)" */
 static int vault_aux_race;
 
-/*! Ã±°ì¥·¥ó¥Ü¥ëpitÀ¸À®»þ¤Î»ØÄꥷ¥ó¥Ü¥ë / Race index for "monster pit (symbol clone)" */
+/*! 単一シンボルpit生成時の指定シンボル / Race index for "monster pit (symbol clone)" */
 static char vault_aux_char;
 
-/*! ¥Ö¥ì¥¹Â°À­¤Ë´ð¤Å¤¯¥É¥é¥´¥ópitÀ¸À®»þ¾ò·ï¥Þ¥¹¥¯ / Breath mask for "monster pit (dragon)" */
+/*! ã\83\96ã\83¬ã\82¹å±\9eæ\80§ã\81«å\9fºã\81¥ã\81\8fã\83\89ã\83©ã\82´ã\83³pitç\94\9fæ\88\90æ\99\82æ\9d¡ä»¶ã\83\9eã\82¹ã\82¯ / Breath mask for "monster pit (dragon)" */
 static u32b vault_aux_dragon_mask4;
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬VaultÀ¸À®¤ÎºÇÄãɬÍ×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターがVault生成の最低必要条件を満たしているかを返す /
  * Helper monster selection function
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return VaultÀ¸À®¤ÎºÇÄãɬÍ×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return Vault生成の最低必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_simple(int r_idx)
+static bool vault_aux_simple(MONRACE_IDX r_idx)
 {
        /* Okay */
        return (vault_monster_okay(r_idx));
@@ -1454,12 +1454,12 @@ static bool vault_aux_simple(int r_idx)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥¼¥ê¡¼nest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターがゼリーnestの生成必要条件を満たしているかを返す /
  * Helper function for "monster nest (jelly)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_jelly(int r_idx)
+static bool vault_aux_jelly(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -1479,12 +1479,12 @@ static bool vault_aux_jelly(int r_idx)
 }
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬Æ°Êªnest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターが動物nestの生成必要条件を満たしているかを返す /
  * Helper function for "monster nest (animal)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_animal(int r_idx)
+static bool vault_aux_animal(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -1500,12 +1500,12 @@ static bool vault_aux_animal(int r_idx)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥¢¥ó¥Ç¥Ã¥Énest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターがアンデッドnestの生成必要条件を満たしているかを返す /
  * Helper function for "monster nest (undead)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_undead(int r_idx)
+static bool vault_aux_undead(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -1520,12 +1520,12 @@ static bool vault_aux_undead(int r_idx)
 }
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬À»Æ²nest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターが聖堂nestの生成必要条件を満たしているかを返す /
  * Helper function for "monster nest (chapel)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_chapel_g(int r_idx)
+static bool vault_aux_chapel_g(MONRACE_IDX r_idx)
 {
        static int chapel_list[] = {
                MON_NOV_PRIEST, MON_NOV_PALADIN, MON_NOV_PRIEST_G, MON_NOV_PALADIN_G, 
@@ -1554,12 +1554,12 @@ static bool vault_aux_chapel_g(int r_idx)
 }
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬¸¤¾®²°nest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターが犬小屋nestの生成必要条件を満たしているかを返す /
  * Helper function for "monster nest (kennel)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_kennel(int r_idx)
+static bool vault_aux_kennel(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -1574,12 +1574,12 @@ static bool vault_aux_kennel(int r_idx)
 }
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥ß¥ß¥Ã¥¯nest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターがミミックnestの生成必要条件を満たしているかを返す /
  * Helper function for "monster nest (mimic)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_mimic(int r_idx)
+static bool vault_aux_mimic(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -1594,12 +1594,12 @@ static bool vault_aux_mimic(int r_idx)
 }
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬Ã±°ì¥¯¥í¡¼¥ónest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターが単一クローンnestの生成必要条件を満たしているかを返す /
  * Helper function for "monster nest (clone)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_clone(int r_idx)
+static bool vault_aux_clone(MONRACE_IDX r_idx)
 {
        /* Validate the monster */
        if (!vault_monster_okay(r_idx)) return (FALSE);
@@ -1609,12 +1609,12 @@ static bool vault_aux_clone(int r_idx)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬¼Ù°­Â°À­¥·¥ó¥Ü¥ë¥¯¥í¡¼¥ónest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターが邪悪属性シンボルクローンnestの生成必要条件を満たしているかを返す /
  * Helper function for "monster nest (symbol clone)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_symbol_e(int r_idx)
+static bool vault_aux_symbol_e(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -1634,12 +1634,12 @@ static bool vault_aux_symbol_e(int r_idx)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬Á±ÎÉ°À­¥·¥ó¥Ü¥ë¥¯¥í¡¼¥ónest¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターが善良属性シンボルクローンnestの生成必要条件を満たしているかを返す /
  * Helper function for "monster nest (symbol clone)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_symbol_g(int r_idx)
+static bool vault_aux_symbol_g(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -1659,12 +1659,12 @@ static bool vault_aux_symbol_g(int r_idx)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥ª¡¼¥¯pit¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターがオークpitの生成必要条件を満たしているかを返す /
  * Helper function for "monster pit (orc)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_orc(int r_idx)
+static bool vault_aux_orc(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -1683,12 +1683,12 @@ static bool vault_aux_orc(int r_idx)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥È¥í¥ëpit¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターがトロルpitの生成必要条件を満たしているかを返す /
  * Helper function for "monster pit (troll)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_troll(int r_idx)
+static bool vault_aux_troll(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -1707,12 +1707,12 @@ static bool vault_aux_troll(int r_idx)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬µð¿Ípit¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターが巨人pitの生成必要条件を満たしているかを返す /
  * Helper function for "monster pit (giant)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_giant(int r_idx)
+static bool vault_aux_giant(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -1733,12 +1733,12 @@ static bool vault_aux_giant(int r_idx)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥É¥é¥´¥ópit¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターがドラゴンpitの生成必要条件を満たしているかを返す /
  * Helper function for "monster pit (dragon)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_dragon(int r_idx)
+static bool vault_aux_dragon(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -1760,12 +1760,12 @@ static bool vault_aux_dragon(int r_idx)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬°­Ëâpit¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターが悪魔pitの生成必要条件を満たしているかを返す /
  * Helper function for "monster pit (demon)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_demon(int r_idx)
+static bool vault_aux_demon(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -1783,12 +1783,12 @@ static bool vault_aux_demon(int r_idx)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬¶¸µ¤pit¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターが狂気pitの生成必要条件を満たしているかを返す /
  * Helper function for "monster pit (lovecraftian)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_cthulhu(int r_idx)
+static bool vault_aux_cthulhu(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -1806,8 +1806,8 @@ static bool vault_aux_cthulhu(int r_idx)
 
 
 /*!
- * @brief pit/nest¤Î´ð½à¤È¤Ê¤ëñ¼ï¥â¥ó¥¹¥¿¡¼¤ò·è¤á¤ë /
- * @return ¤Ê¤·
+ * @brief pit/nestの基準となる単種モンスターを決める /
+ * @return なし
  */
 static void vault_prep_clone(void)
 {
@@ -1823,12 +1823,12 @@ static void vault_prep_clone(void)
 
 
 /*!
- * @brief pit/nest¤Î´ð½à¤È¤Ê¤ë¥â¥ó¥¹¥¿¡¼¥·¥ó¥Ü¥ë¤ò·è¤á¤ë /
- * @return ¤Ê¤·
+ * @brief pit/nestの基準となるモンスターシンボルを決める /
+ * @return なし
  */
 static void vault_prep_symbol(void)
 {
-       int r_idx;
+       MONRACE_IDX r_idx;
 
        /* Apply the monster restriction */
        get_mon_num_prep(vault_aux_simple, NULL);
@@ -1844,8 +1844,8 @@ static void vault_prep_symbol(void)
 }
 
 /*!
- * @brief pit/nest¤Î´ð½à¤È¤Ê¤ë¥É¥é¥´¥ó¤Î¼ïÎà¤ò·è¤á¤ë /
- * @return ¤Ê¤·
+ * @brief pit/nestの基準となるドラゴンの種類を決める /
+ * @return なし
  */
 static void vault_prep_dragon(void)
 {
@@ -1918,12 +1918,12 @@ static void vault_prep_dragon(void)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥À¡¼¥¯¥¨¥ë¥Õpit¤ÎÀ¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤«¤òÊÖ¤¹ /
+ * @brief モンスターがダークエルフpitの生成必要条件を満たしているかを返す /
  * Helper function for "monster pit (dark elf)"
- * @param r_idx ³Îǧ¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¼ï²ID
- * @return À¸À®É¬Í×¾ò·ï¤òËþ¤¿¤·¤Æ¤¤¤ë¤Ê¤éTRUE¤òÊÖ¤¹¡£
+ * @param r_idx 確認したいモンスター種族ID
+ * @return 生成必要条件を満たしているならTRUEを返す。
  */
-static bool vault_aux_dark_elf(int r_idx)
+static bool vault_aux_dark_elf(MONRACE_IDX r_idx)
 {
        int i;
        static int dark_elf_list[] =
@@ -1944,24 +1944,24 @@ static bool vault_aux_dark_elf(int r_idx)
        return FALSE;
 }
 
-/*! pit/nest·¿¾ðÊó¤Îtypedef */
+/*! pit/nest型情報のtypedef */
 typedef struct vault_aux_type vault_aux_type;
 
-/*! pit/nest·¿¾ðÊó¤Î¹½Â¤ÂÎÄêµÁ */
+/*! pit/nest型情報の構造体定義 */
 struct vault_aux_type
 {
        cptr name;
-       bool (*hook_func)(int r_idx);
+       bool (*hook_func)(MONRACE_IDX r_idx);
        void (*prep_func)(void);
        int level;
        int chance;
 };
 
 /*!
- * @brief ¥À¥ó¥¸¥ç¥óËè¤Ë»ØÄꤵ¤ì¤¿¥Ô¥Ã¥ÈÇÛÎó¤ò´ð½à¤Ë¥é¥ó¥À¥à¤Êpit/nest¥¿¥¤¥×¤ò·è¤á¤ë
- * @param l_ptr ÁªÂò¤µ¤ì¤¿pit/nest¾ðÊó¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
- * @param allow_flag_mask À¸À®¤¬µö¤µ¤ì¤ëpit/nest¤Î¥Ó¥Ã¥ÈÇÛÎó
- * @return ÁªÂò¤µ¤ì¤¿pit/nest¤ÎID¡¢ÁªÂò¼ºÇÔ¤·¤¿¾ì¹ç-1¤òÊÖ¤¹¡£
+ * @brief ダンジョン毎に指定されたピット配列を基準にランダムなpit/nestタイプを決める
+ * @param l_ptr é\81¸æ\8a\9eã\81\95ã\82\8cã\81\9fpit/nestæ\83\85å ±ã\82\92è¿\94ã\81\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @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)
 {
@@ -2010,20 +2010,20 @@ static int pick_vault_type(vault_aux_type *l_ptr, s16b allow_flag_mask)
        return n_ptr->name ? count : -1;
 }
 
-/*!nest¾ðÊó¥Æ¡¼¥Ö¥ë*/
+/*!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},
@@ -2040,20 +2040,20 @@ static vault_aux_type nest_types[] =
 #endif
 };
 
-/*!pit¾ðÊó¥Æ¡¼¥Ö¥ë*/
+/*!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},
@@ -2071,7 +2071,7 @@ static vault_aux_type pit_types[] =
 };
 
 
-/*! nest¤ÎIDÄêµÁ /  Nest types code */
+/*! nestのID定義 /  Nest types code */
 #define NEST_TYPE_CLONE        0
 #define NEST_TYPE_JELLY        1
 #define NEST_TYPE_SYMBOL_GOOD  2
@@ -2083,7 +2083,7 @@ static vault_aux_type pit_types[] =
 #define NEST_TYPE_CHAPEL       8
 #define NEST_TYPE_UNDEAD       9
 
-/*! pit¤ÎIDÄêµÁ / Pit types code */
+/*! pitのID定義 / Pit types code */
 #define PIT_TYPE_ORC           0
 #define PIT_TYPE_TROLL         1
 #define PIT_TYPE_GIANT         2
@@ -2097,10 +2097,10 @@ static vault_aux_type pit_types[] =
 
 
 /*!
- * @brief ¥Ç¥Ð¥Ã¥°»þ¤ËÀ¸À®¤µ¤ì¤¿pit/nest¤Î·¿¤ò½ÐÎϤ¹¤ë½èÍý
- * @param type pit/nest¤Î·¿ID
- * @param nest TRUE¤Ê¤é¤Ðnest¡¢FALSE¤Ê¤é¤Ðpit
- * @return ¥Ç¥Ð¥Ã¥°É½¼¨Ê¸»úÎó¤Î»²¾È¥Ý¥¤¥ó¥¿
+ * @brief デバッグ時に生成されたpit/nestの型を出力する処理
+ * @param type pit/nestの型ID
+ * @param nest TRUEならばnest、FALSEならばpit
+ * @return ã\83\87ã\83\90ã\83\83ã\82°è¡¨ç¤ºæ\96\87å­\97å\88\97ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
  * @details
  * Hack -- Get the string describing subtype of pit/nest
  * Determined in prepare function (some pit/nest only)
@@ -2136,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;
@@ -2163,7 +2163,7 @@ static cptr pit_subtype_string(int type, bool nest)
 }
 
 
-/*! ¥Ç¥Ð¥Ã¥°»þ¤Ë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;
@@ -2173,12 +2173,12 @@ nest_mon_info_type;
 
 
 /*
- *! @brief nest¤Î¥â¥ó¥¹¥¿¡¼¥ê¥¹¥È¤ò¥½¡¼¥È¤¹¤ë¤¿¤á¤Î´Ø¿ô /
+ *! @brief nestのモンスターリストをソートするための関数 /
  *  Comp function for sorting nest monster information
- *  @param u ¥½¡¼¥È½èÍýÂоÝÇÛÎó¥Ý¥¤¥ó¥¿
- *  @param v Ì¤»ÈÍÑ
- *  @param a Èæ³ÓÂоݻ²¾ÈID1
- *  @param b Èæ³ÓÂоݻ²¾ÈID2
+ *  @param u ã\82½ã\83¼ã\83\88å\87¦ç\90\86対象é\85\8då\88\97ã\83\9dã\82¤ã\83³ã\82¿
+ *  @param v 未使用
+ *  @param a 比較対象参照ID1
+ *  @param b 比較対象参照ID2
  */
 static bool ang_sort_comp_nest_mon_info(vptr u, vptr v, int a, int b)
 {
@@ -2213,12 +2213,12 @@ static bool ang_sort_comp_nest_mon_info(vptr u, vptr v, int a, int b)
 }
 
 /*!
- * @brief nest¤Î¥â¥ó¥¹¥¿¡¼¥ê¥¹¥È¤ò¥¹¥ï¥Ã¥×¤¹¤ë¤¿¤á¤Î´Ø¿ô /
+ * @brief nestのモンスターリストをスワップするための関数 /
  * Swap function for sorting nest monster information
- * @param u ¥¹¥ï¥Ã¥×½èÍýÂоÝÇÛÎó¥Ý¥¤¥ó¥¿
- * @param v Ì¤»ÈÍÑ
- * @param a ¥¹¥ï¥Ã¥×Âоݻ²¾ÈID1
- * @param b ¥¹¥ï¥Ã¥×Âоݻ²¾ÈID2
+ * @param u ã\82¹ã\83¯ã\83\83ã\83\97å\87¦ç\90\86対象é\85\8då\88\97ã\83\9dã\82¤ã\83³ã\82¿
+ * @param v 未使用
+ * @param a スワップ対象参照ID1
+ * @param b スワップ対象参照ID2
  */
 static void ang_sort_swap_nest_mon_info(vptr u, vptr v, int a, int b)
 {
@@ -2235,12 +2235,12 @@ static void ang_sort_swap_nest_mon_info(vptr u, vptr v, int a, int b)
 }
 
 
-#define NUM_NEST_MON_TYPE 64 /*!<nest¤Î¼ïÊÌ¿ô */
+#define NUM_NEST_MON_TYPE 64 /*!<nestの種別数 */
 
 
 /*!
- * @brief ¥¿¥¤¥×5¤ÎÉô²°¡Änest¤òÀ¸À®¤¹¤ë / Type 5 -- Monster nests
- * @return ¤Ê¤·
+ * @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
@@ -2260,7 +2260,7 @@ static void ang_sort_swap_nest_mon_info(vptr u, vptr v, int a, int b)
  */
 static bool build_type5(void)
 {
-       int y, x, y1, x1, y2, x2, xval, yval;
+       POSITION y, x, y1, x1, y2, x2, xval, yval;
        int i;
        nest_mon_info_type nest_mon_info[NUM_NEST_MON_TYPE];
 
@@ -2287,7 +2287,8 @@ static bool build_type5(void)
        /* Pick some monster types */
        for (i = 0; i < NUM_NEST_MON_TYPE; i++)
        {
-               int r_idx = 0, attempts = 100;
+               MONRACE_IDX r_idx = 0;
+               int attempts = 100;
                monster_race *r_ptr = NULL;
 
                while (attempts--)
@@ -2310,7 +2311,7 @@ static bool build_type5(void)
                if (r_ptr->flags3 & RF3_EVIL) align.sub_align |= SUB_ALIGN_EVIL;
                if (r_ptr->flags3 & RF3_GOOD) align.sub_align |= SUB_ALIGN_GOOD;
 
-               nest_mon_info[i].r_idx = r_idx;
+               nest_mon_info[i].r_idx = (s16b)r_idx;
                nest_mon_info[i].used = FALSE;
        }
 
@@ -2390,23 +2391,14 @@ static bool build_type5(void)
                case 4: place_secret_door(yval, x2 + 1, DOOR_DEFAULT); break;
        }
 
-       /* Describe */
-       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_wizard(CHEAT_DUNGEON, _("モンスター部屋(nest)(%s%s)を生成します。", "Monster nest (%s%s)"), n_ptr->name, pit_subtype_string(cur_nest_type, TRUE));
 
        /* Place some monsters */
        for (y = yval - 2; y <= yval + 2; y++)
        {
                for (x = xval - 9; x <= xval + 9; x++)
                {
-                       int r_idx;
+                       MONRACE_IDX r_idx;
 
                        i = randint0(NUM_NEST_MON_TYPE);
                        r_idx = nest_mon_info[i].r_idx;
@@ -2418,7 +2410,7 @@ static bool build_type5(void)
                }
        }
 
-       if (cheat_room && cheat_hear)
+       if (cheat_room)
        {
                ang_sort_comp = ang_sort_comp_nest_mon_info;
                ang_sort_swap = ang_sort_swap_nest_mon_info;
@@ -2433,7 +2425,7 @@ static bool build_type5(void)
                                if (nest_mon_info[i].r_idx != nest_mon_info[i + 1].r_idx) break;
                                if (!nest_mon_info[i + 1].used) break;
                        }
-                       msg_print(r_name + r_info[nest_mon_info[i].r_idx].name);
+                       msg_format_wizard(CHEAT_DUNGEON, "Nest構成モンスターNo.%d:%s", i, r_name + r_info[nest_mon_info[i].r_idx].name);
                }
        }
 
@@ -2442,8 +2434,8 @@ static bool build_type5(void)
 
 
 /*!
- * @brief ¥¿¥¤¥×6¤ÎÉô²°¡Äpit¤òÀ¸À®¤¹¤ë / Type 6 -- Monster pits
- * @return ¤Ê¤·
+ * @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
@@ -2480,10 +2472,10 @@ static bool build_type5(void)
  */
 static bool build_type6(void)
 {
-       int y, x, y1, x1, y2, x2, xval, yval;
+       POSITION y, x, y1, x1, y2, x2, xval, yval;
        int i, j;
 
-       int what[16];
+       MONRACE_IDX what[16];
 
        monster_type align;
 
@@ -2508,7 +2500,8 @@ static bool build_type6(void)
        /* Pick some monster types */
        for (i = 0; i < 16; i++)
        {
-               int r_idx = 0, attempts = 100;
+               MONRACE_IDX r_idx = 0;
+               int attempts = 100;
                monster_race *r_ptr = NULL;
 
                while (attempts--)
@@ -2623,35 +2616,21 @@ static bool build_type6(void)
                        /* Bubble */
                        if (p1 > p2)
                        {
-                               int tmp = what[i1];
+                               MONRACE_IDX tmp = what[i1];
                                what[i1] = what[i2];
                                what[i2] = tmp;
                        }
                }
        }
 
-       /* Message */
-       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_wizard(CHEAT_DUNGEON, _("モンスター部屋(pit)(%s%s)を生成します。", "Monster pit (%s%s)"), n_ptr->name, pit_subtype_string(cur_pit_type, FALSE));
 
        /* Select the entries */
        for (i = 0; i < 8; i++)
        {
                /* Every other entry */
                what[i] = what[i * 2];
-
-               if (cheat_hear)
-               {
-                       /* Message */
-                       msg_print(r_name + r_info[what[i]].name);
-               }
+               msg_format_wizard(CHEAT_DUNGEON, _("Nest構成モンスター選択No.%d:%s", "Nest Monster Select No.%d:%s"), i, r_name + r_info[what[i]].name);
        }
 
        /* Top and bottom rows */
@@ -2708,15 +2687,15 @@ static bool build_type6(void)
 
 
 /*!
- * @brief VaultÃÏ·Á¤ò²óž¡¢¾å²¼º¸±¦È¿Å¾¤¹¤ë¤¿¤á¤ÎºÂɸÊÑ´¹¤òÊÖ¤¹ / coordinate translation code
- * @param x ÊÑ´¹¤·¤¿¤¤ÅÀ¤ÎXºÂɸ»²¾È¥Ý¥¤¥ó¥¿
- * @param y ÊÑ´¹¤·¤¿¤¤ÅÀ¤ÎYºÂɸ»²¾È¥Ý¥¤¥ó¥¿
- * @param xoffset VaultÀ¸À®»þ¤Î´ð½àXºÂɸ
- * @param yoffset VaultÀ¸À®»þ¤Î´ð½àYºÂɸ
- * @param transno ½èÍýID
- * @return ¤Ê¤·
+ * @brief Vault地形を回転、上下左右反転するための座標変換を返す / coordinate translation code
+ * @param x å¤\89æ\8f\9bã\81\97ã\81\9fã\81\84ç\82¹ã\81®X座æ¨\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param y å¤\89æ\8f\9bã\81\97ã\81\9fã\81\84ç\82¹ã\81®Y座æ¨\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @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)
+static void coord_trans(POSITION *x, POSITION *y, POSITION xoffset, POSITION yoffset, int transno)
 {
        int i;
        int temp;
@@ -2750,27 +2729,24 @@ static void coord_trans(int *x, int *y, int xoffset, int yoffset, int transno)
 }
 
 /*!
- * @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 ¤Ê¤·
+ * @brief Vaultをフロアに配置する / Hack -- fill in "vault" rooms
+ * @param yval 生成基準Y座標
+ * @param xval 生成基準X座標
+ * @param ymax Vaultã\81®Yã\82µã\82¤ã\82º
+ * @param xmax Vaultã\81®Xã\82µã\82¤ã\82º
+ * @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)
+static void build_vault(POSITION yval, POSITION xval, POSITION ymax, POSITION xmax, cptr data,
+               POSITION xoffset, POSITION yoffset, int transno)
 {
-       int dx, dy, x, y, i, j;
-
+       POSITION dx, dy, x, y, i, j;
        cptr t;
-
        cave_type *c_ptr;
 
-
        /* Place dungeon features and objects */
        for (t = data, dy = 0; dy < ymax; dy++)
        {
@@ -3020,16 +2996,16 @@ static void build_vault(int yval, int xval, int ymax, int xmax, cptr data,
 
 
 /*!
- * @brief ¥¿¥¤¥×7¤ÎÉô²°¡Äv_info.txt¤è¤ê¾®·¿vault¤òÀ¸À®¤¹¤ë / Type 7 -- simple vaults (see "v_info.txt")
- * @return ¤Ê¤·
+ * @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;
-       int xoffset, yoffset;
+       POSITION x, y;
+       POSITION xval, yval;
+       POSITION xoffset, yoffset;
        int transno;
 
        /* Pick a lesser vault */
@@ -3045,14 +3021,7 @@ static bool build_type7(void)
        /* No lesser vault found */
        if (dummy >= SAFE_MAX_ATTEMPTS)
        {
-               if (cheat_room)
-               {
-#ifdef JP
-                       msg_print("·Ù¹ð¡ª¾®¤µ¤ÊÃϲ¼¼¼¤òÇÛÃ֤Ǥ­¤Þ¤»¤ó¡ª");
-#else
-                       msg_print("Warning! Could not place lesser vault!");
-#endif
-               }
+               msg_print_wizard(CHEAT_DUNGEON, _("小型固定Vaultを配置できませんでした。", "Could not place lesser vault."));
                return FALSE;
        }
 
@@ -3098,11 +3067,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
+       msg_format_wizard(CHEAT_DUNGEON, _("小型Vault(%s)を生成しました。", "Lesser vault (%s)."), v_name + v_ptr->name);
 
        /* Hack -- Build the vault */
        build_vault(yval, xval, v_ptr->hgt, v_ptr->wid,
@@ -3112,15 +3077,15 @@ static bool build_type7(void)
 }
 
 /*!
- * @brief ¥¿¥¤¥×8¤ÎÉô²°¡Äv_info.txt¤è¤êÂç·¿vault¤òÀ¸À®¤¹¤ë / Type 8 -- greater vaults (see "v_info.txt")
- * @return ¤Ê¤·
+ * @brief タイプ8の部屋…v_info.txtより大型vaultを生成する / Type 8 -- greater vaults (see "v_info.txt")
+ * @return なし
  */
 static bool build_type8(void)
 {
        vault_type *v_ptr;
        int dummy;
-       int xval, yval;
-       int x, y;
+       POSITION xval, yval;
+       POSITION x, y;
        int transno;
        int xoffset, yoffset;
 
@@ -3137,14 +3102,7 @@ static bool build_type8(void)
        /* No greater vault found */
        if (dummy >= SAFE_MAX_ATTEMPTS)
        {
-               if (cheat_room)
-               {
-#ifdef JP
-                       msg_print("·Ù¹ð¡ªµðÂç¤ÊÃϲ¼¼¼¤òÇÛÃ֤Ǥ­¤Þ¤»¤ó¡ª");
-#else
-                       msg_print("Warning! Could not place greater vault!");
-#endif
-               }
+               msg_print_wizard(CHEAT_DUNGEON, _("大型固定Vaultを配置できませんでした。", "Could not place greater vault."));
                return FALSE;
        }
 
@@ -3189,18 +3147,13 @@ static bool build_type8(void)
         * prevent generation of vaults with no-entrance.
         */
        /* Find and reserve some space in the dungeon.  Get center of room. */
-       if (!find_space(&yval, &xval, abs(y) + 2, abs(x) + 2)) return FALSE;
+       if (!find_space(&yval, &xval, (POSITION)(abs(y) + 2), (POSITION)(abs(x) + 2))) return FALSE;
 
 #ifdef FORCE_V_IDX
        v_ptr = &v_info[76 + randint1(3)];
 #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
+       msg_format_wizard(CHEAT_DUNGEON, _("大型固定Vault(%s)を生成しました。", "Greater vault (%s)."), v_name + v_ptr->name);
 
        /* Hack -- Build the vault */
        build_vault(yval, xval, v_ptr->hgt, v_ptr->wid,
@@ -3254,7 +3207,7 @@ static void store_height(int x, int y, int val)
            (val <= fill_data.c1)) val = fill_data.c1 + 1;
 
        /* store the value in height-map format */
-       cave[y][x].feat = val;
+       cave[y][x].feat = (s16b)val;
 
        return;
 }
@@ -3379,10 +3332,10 @@ static void generate_hmap(int y0, int x0, int xsiz, int ysiz, int grd, int roug,
        }
 
        /* Boundaries are walls */
-       cave[fill_data.ymin][fill_data.xmin].feat = maxsize;
-       cave[fill_data.ymax][fill_data.xmin].feat = maxsize;
-       cave[fill_data.ymin][fill_data.xmax].feat = maxsize;
-       cave[fill_data.ymax][fill_data.xmax].feat = maxsize;
+       cave[fill_data.ymin][fill_data.xmin].feat = (s16b)maxsize;
+       cave[fill_data.ymax][fill_data.xmin].feat = (s16b)maxsize;
+       cave[fill_data.ymin][fill_data.xmax].feat = (s16b)maxsize;
+       cave[fill_data.ymax][fill_data.xmax].feat = (s16b)maxsize;
 
        /* Set the middle square to be an open area. */
        cave[y0][x0].feat = 0;
@@ -3534,14 +3487,14 @@ static bool hack_isnt_wall(int y, int x, int c1, int c2, int c3, int feat1, int
                        /* 25% of the time use the other tile : it looks better this way */
                        if (randint1(100) < 75)
                        {
-                               cave[y][x].feat = feat1;
+                               cave[y][x].feat = (s16b)feat1;
                                cave[y][x].info &= ~(CAVE_MASK);
                                cave[y][x].info |= info1;
                                return TRUE;
                        }
                        else
                        {
-                               cave[y][x].feat = feat2;
+                               cave[y][x].feat = (s16b)feat2;
                                cave[y][x].info &= ~(CAVE_MASK);
                                cave[y][x].info |= info2;
                                return TRUE;
@@ -3552,14 +3505,14 @@ static bool hack_isnt_wall(int y, int x, int c1, int c2, int c3, int feat1, int
                        /* 25% of the time use the other tile : it looks better this way */
                        if (randint1(100) < 75)
                        {
-                               cave[y][x].feat = feat2;
+                               cave[y][x].feat = (s16b)feat2;
                                cave[y][x].info &= ~(CAVE_MASK);
                                cave[y][x].info |= info2;
                                return TRUE;
                        }
                        else
                        {
-                               cave[y][x].feat = feat1;
+                               cave[y][x].feat = (s16b)feat1;
                                cave[y][x].info &= ~(CAVE_MASK);
                                cave[y][x].info |= info1;
                                return TRUE;
@@ -3567,7 +3520,7 @@ static bool hack_isnt_wall(int y, int x, int c1, int c2, int c3, int feat1, int
                }
                else if (cave[y][x].feat <= c3)
                {
-                       cave[y][x].feat = feat3;
+                       cave[y][x].feat = (s16b)feat3;
                        cave[y][x].info &= ~(CAVE_MASK);
                        cave[y][x].info |= info3;
                        return TRUE;
@@ -3588,7 +3541,7 @@ static bool hack_isnt_wall(int y, int x, int c1, int c2, int c3, int feat1, int
  * Quick and nasty fill routine used to find the connected region
  * of floor in the middle of the cave
  */
-static void cave_fill(byte y, byte x)
+static void cave_fill(POSITION y, POSITION x)
 {
        int i, j, d;
        int ty, tx;
@@ -3642,8 +3595,8 @@ static void cave_fill(byte y, byte x)
                                        fill_data.info1, fill_data.info2, fill_data.info3))
                                {
                                        /* Enqueue that entry */
-                                       temp_y[flow_tail] = j;
-                                       temp_x[flow_tail] = i;
+                                       temp_y[flow_tail] = (byte_hack)j;
+                                       temp_x[flow_tail] = (byte_hack)i;
 
                                        /* Advance the queue */
                                        if (++flow_tail == TEMP_MAX) flow_tail = 0;
@@ -3855,12 +3808,13 @@ static bool generate_fracave(int y0, int x0, int xsize, int ysize, int cutoff, b
 
 
 /*!
- * @brief ¥¿¥¤¥×9¤ÎÉô²°¡Ä¥Õ¥é¥¯¥¿¥ë¥«¡¼¥Ö¤Ë¤è¤ëƶ·¢À¸À® / Type 9 -- Driver routine to create fractal cave system
- * @return ¤Ê¤·
+ * @brief タイプ9の部屋…フラクタルカーブによる洞窟生成 / Type 9 -- Driver routine to create fractal cave system
+ * @return なし
  */
 static bool build_type9(void)
 {
-       int grd, roug, cutoff, xsize, ysize, y0, x0;
+       int grd, roug, cutoff;
+       POSITION xsize, ysize, y0, x0;
 
        bool done, light, room;
 
@@ -4369,8 +4323,7 @@ static void build_bubble_vault(int x0, int y0, int xsize, int ysize)
        int xhsize = xsize / 2;
        int yhsize = ysize / 2;
 
-
-       if (cheat_room) msg_print("Bubble Vault");
+       msg_print_wizard(CHEAT_DUNGEON, _("泡型ランダムVaultを生成しました。", "Room Vault."));
 
        /* Allocate center of bubbles */
        center[0].x = (byte)randint1(xsize - 3) + 1;
@@ -4395,31 +4348,31 @@ static void build_bubble_vault(int x0, int y0, int xsize, int ysize)
                        }
                }
 
-               center[i].x = x;
-               center[i].y = y;
+               center[i].x = (byte_hack)x;
+               center[i].y = (byte_hack)y;
        }
 
 
        /* 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 */
@@ -4430,8 +4383,8 @@ static void build_bubble_vault(int x0, int y0, int xsize, int ysize)
                        /* Get distances to two closest centers */
 
                        /* initialize */
-                       min1 = distance(x, y, center[0].x, center[0].y);
-                       min2 = distance(x, y, center[1].x, center[1].y);
+                       min1 = (u16b)distance(x, y, center[0].x, center[0].y);
+                       min2 = (u16b)distance(x, y, center[1].x, center[1].y);
 
                        if (min1 > min2)
                        {
@@ -4444,7 +4397,7 @@ static void build_bubble_vault(int x0, int y0, int xsize, int ysize)
                        /* Scan the rest */
                        for (i = 2; i < BUBBLENUM; i++)
                        {
-                               temp = distance(x, y, center[i].x, center[i].y);
+                               temp = (u16b)distance(x, y, center[i].x, center[i].y);
 
                                if (temp < min1)
                                {
@@ -4571,7 +4524,7 @@ static void build_room_vault(int x0, int y0, int xsize, int ysize)
        xhsize = xsize / 2;
        yhsize = ysize / 2;
 
-       if (cheat_room) msg_print("Room Vault");
+       msg_print_wizard(CHEAT_DUNGEON, _("部屋型ランダムVaultを生成しました。", "Room Vault."));
 
        /* fill area so don't get problems with arena levels */
        for (x1 = 0; x1 < xsize; x1++)
@@ -4622,7 +4575,7 @@ static void build_cave_vault(int x0, int y0, int xsiz, int ysiz)
        xsize = xhsize * 2;
        ysize = yhsize * 2;
 
-       if (cheat_room) msg_print("Cave Vault");
+       msg_print_wizard(CHEAT_DUNGEON, _("洞穴ランダムVaultを生成しました。", "Cave Vault."));
 
        light = done = FALSE;
        room = TRUE;
@@ -4770,8 +4723,7 @@ void build_maze_vault(int x0, int y0, int xsize, int ysize, bool is_vault)
        bool light;
        cave_type *c_ptr;
 
-
-       if (cheat_room && is_vault) msg_print("Maze Vault");
+       msg_print_wizard(CHEAT_DUNGEON, _("迷路ランダムVaultを生成しました。", "Maze Vault."));
 
        /* Choose lite or dark */
        light = ((dun_level <= randint1(25)) && is_vault && !(d_info[dungeon_type].flags1 & DF1_DARKNESS));
@@ -4841,7 +4793,7 @@ static void build_mini_c_vault(int x0, int y0, int xsize, int ysize)
        int m, n, num_vertices;
        int *visited;
 
-       if (cheat_room) msg_print("Mini Checker Board Vault");
+       msg_print_wizard(CHEAT_DUNGEON, _("小型チェッカーランダムVaultを生成しました。", "Mini Checker Board Vault."));
 
        /* Pick a random room size */
        dy = ysize / 2 - 1;
@@ -5180,7 +5132,7 @@ static void build_castle_vault(int x0, int y0, int xsize, int ysize)
        y2 = y0 + dy;
        x2 = x0 + dx;
 
-       if (cheat_room) msg_print("Castle Vault");
+       msg_print_wizard(CHEAT_DUNGEON, _("城型ランダムVaultを生成しました。", "Castle Vault"));
 
        /* generate the room */
        for (y = y1 - 1; y <= y2 + 1; y++)
@@ -5297,7 +5249,7 @@ static void build_target_vault(int x0, int y0, int xsize, int ysize)
        h3 = randint1(32);
        h4 = randint1(32) - 16;
 
-       if (cheat_room) msg_print("Target Vault");
+       msg_print_wizard(CHEAT_DUNGEON, _("対称形ランダムVaultを生成しました。", "Elemental Vault"));
 
        /* work out outer radius */
        if (xsize > ysize)
@@ -5418,8 +5370,7 @@ static void build_elemental_vault(int x0, int y0, int xsiz, int ysiz)
        int xsize, ysize, xhsize, yhsize, x, y, i;
        int type;
 
-
-       if (cheat_room) msg_print("Elemental Vault");
+       msg_print_wizard(CHEAT_DUNGEON, _("精霊界ランダムVaultを生成しました。", "Elemental Vault"));
 
        /* round to make sizes even */
        xhsize = xsiz / 2;
@@ -5497,12 +5448,12 @@ static void build_elemental_vault(int x0, int y0, int xsiz, int ysiz)
 
 
 /*!
- * @brief ¥¿¥¤¥×10¤ÎÉô²°¡Ä¥é¥ó¥À¥àÀ¸À®vault / Type 10 -- Random vaults
- * @return ¤Ê¤·
+ * @brief タイプ10の部屋…ランダム生成vault / Type 10 -- Random vaults
+ * @return なし
  */
 static bool build_type10(void)
 {
-       int y0, x0, xsize, ysize, vtype;
+       POSITION y0, x0, xsize, ysize, vtype;
 
        /* Get size */
        /* big enough to look good, small enough to be fairly common. */
@@ -5553,8 +5504,8 @@ static bool build_type10(void)
 
 
 /*!
- * @brief ¥¿¥¤¥×11¤ÎÉô²°¡Ä±ß·ÁÉô²°¤ÎÀ¸À® / Type 11 -- Build an vertical oval room.
- * @return ¤Ê¤·
+ * @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
@@ -5563,7 +5514,7 @@ static bool build_type10(void)
  */
 static bool build_type11(void)
 {
-       int rad, x, y, x0, y0;
+       POSITION rad, x, y, x0, y0;
        int light = FALSE;
 
        /* Occasional light */
@@ -5600,8 +5551,8 @@ static bool build_type11(void)
 
 
 /*!
- * @brief ¥¿¥¤¥×12¤ÎÉô²°¡Ä¥É¡¼¥à·¿Éô²°¤ÎÀ¸À® / Type 12 -- Build crypt room.
- * @return ¤Ê¤·
+ * @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
@@ -5610,7 +5561,7 @@ static bool build_type11(void)
  */
 static bool build_type12(void)
 {
-       int rad, x, y, x0, y0;
+       POSITION rad, x, y, x0, y0;
        int light = FALSE;
        bool emptyflag = TRUE;
 
@@ -5700,7 +5651,7 @@ static bool build_type12(void)
 /*
  * Helper function for "trapped monster pit"
  */
-static bool vault_aux_trapped_pit(int r_idx)
+static bool vault_aux_trapped_pit(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -5716,8 +5667,8 @@ static bool vault_aux_trapped_pit(int r_idx)
 
 
 /*!
- * @brief ¥¿¥¤¥×13¤ÎÉô²°¡Ä¥È¥é¥Ã¥×pit¤ÎÀ¸À® / Type 13 -- Trapped monster pits
- * @return ¤Ê¤·
+ * @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
@@ -5791,10 +5742,10 @@ static bool build_type13(void)
                {0, 0, -1}
        };
 
-       int y, x, y1, x1, y2, x2, xval, yval;
+       POSITION y, x, y1, x1, y2, x2, xval, yval;
        int i, j;
 
-       int what[16];
+       MONRACE_IDX what[16];
 
        monster_type align;
 
@@ -5822,7 +5773,8 @@ static bool build_type13(void)
        /* Pick some monster types */
        for (i = 0; i < 16; i++)
        {
-               int r_idx = 0, attempts = 100;
+               MONRACE_IDX r_idx = 0;
+               int attempts = 100;
                monster_race *r_ptr = NULL;
 
                while (attempts--)
@@ -5966,23 +5918,15 @@ static bool build_type13(void)
                        /* Bubble */
                        if (p1 > p2)
                        {
-                               int tmp = what[i1];
+                               MONRACE_IDX tmp = what[i1];
                                what[i1] = what[i2];
                                what[i2] = tmp;
                        }
                }
        }
 
-       /* Message */
-       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_wizard(CHEAT_DUNGEON, _("%s%sの罠ピットが生成されました。", "Trapped monster pit (%s%s)"),
+               n_ptr->name, pit_subtype_string(cur_pit_type, FALSE));
 
        /* Select the entries */
        for (i = 0; i < 8; i++)
@@ -6009,15 +5953,15 @@ static bool build_type13(void)
 
 
 /*!
- * @brief ¥¿¥¤¥×14¤ÎÉô²°¡ÄÆüì¥È¥é¥Ã¥×Éô²°¤ÎÀ¸À® / Type 14 -- trapped rooms
- * @return ¤Ê¤·
+ * @brief タイプ14の部屋…特殊トラップ部屋の生成 / Type 14 -- trapped rooms
+ * @return なし
  * @details
  * A special trap is placed at center of the room
  */
 static bool build_type14(void)
 {
-       int y, x, y2, x2, yval, xval;
-       int y1, x1, xsize, ysize;
+       POSITION y, x, y2, x2, yval, xval;
+       POSITION y1, x1, xsize, ysize;
 
        bool light;
 
@@ -6085,15 +6029,7 @@ static bool build_type14(void)
        c_ptr->mimic = c_ptr->feat;
        c_ptr->feat = trap;
 
-       /* 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_wizard(CHEAT_DUNGEON, _("%sの部屋が生成されました。", "Room of %s was generated."), f_name + f_info[trap].name);
 
        return TRUE;
 }
@@ -6102,7 +6038,7 @@ static bool build_type14(void)
 /*
  * Helper function for "glass room"
  */
-static bool vault_aux_lite(int r_idx)
+static bool vault_aux_lite(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -6110,7 +6046,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;
@@ -6124,7 +6060,7 @@ static bool vault_aux_lite(int r_idx)
 /*
  * Helper function for "glass room"
  */
-static bool vault_aux_shards(int r_idx)
+static bool vault_aux_shards(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -6140,19 +6076,19 @@ static bool vault_aux_shards(int r_idx)
 /*
  * Hack -- determine if a template is potion
  */
-static bool kind_is_potion(int k_idx)
+static bool kind_is_potion(KIND_OBJECT_IDX k_idx)
 {
        return k_info[k_idx].tval == TV_POTION;
 }
 
 /*!
- * @brief ¥¿¥¤¥×15¤ÎÉô²°¡Ä¥¬¥é¥¹Éô²°¤ÎÀ¸À® / Type 15 -- glass rooms
- * @return ¤Ê¤·
+ * @brief タイプ15の部屋…ガラス部屋の生成 / Type 15 -- glass rooms
+ * @return なし
  */
 static bool build_type15(void)
 {
-       int y, x, y2, x2, yval, xval;
-       int y1, x1, xsize, ysize;
+       POSITION y, x, y2, x2, yval, xval;
+       POSITION y1, x1, xsize, ysize;
        bool light;
 
        cave_type *c_ptr;
@@ -6218,7 +6154,7 @@ static bool build_type15(void)
                        /* Place fixed lite berathers */
                        for (dir1 = 4; dir1 < 8; dir1++)
                        {
-                               int r_idx = get_mon_num(dun_level);
+                               MONRACE_IDX r_idx = get_mon_num(dun_level);
 
                                y = yval + 2 * ddy_ddd[dir1];
                                x = xval + 2 * ddx_ddd[dir1];
@@ -6261,7 +6197,8 @@ static bool build_type15(void)
 
        case 2: /* 1 lite breather + random object */
                {
-                       int r_idx, dir1;
+                       MONRACE_IDX r_idx;
+                       DIRECTION dir1;
 
                        /* Pillars */
                        c_ptr = &cave[y1 + 1][x1 + 1];
@@ -6348,7 +6285,7 @@ static bool build_type15(void)
                        /* Place shard berathers */
                        for (dir1 = 4; dir1 < 8; dir1++)
                        {
-                               int r_idx = get_mon_num(dun_level);
+                               MONRACE_IDX r_idx = get_mon_num(dun_level);
 
                                y = yval + ddy_ddd[dir1];
                                x = xval + ddx_ddd[dir1];
@@ -6379,15 +6316,7 @@ static bool build_type15(void)
                break;
        }
 
-       /* Message */
-       if (cheat_room)
-       {
-#ifdef JP
-               msg_print("¥¬¥é¥¹¤ÎÉô²°");
-#else
-               msg_print("Glass room");
-#endif
-       }
+       msg_print_wizard(CHEAT_DUNGEON, _("ガラスの部屋が生成されました。", "Glass room was generated."));
 
        return TRUE;
 }
@@ -6523,13 +6452,20 @@ 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)
 {
-       int i, j, y, x;
+       int i, y, x;
+       IDX j;
        ugbldg_type *cur_ugbldg;
 
        for (i = 0; i < n; i++)
@@ -6601,8 +6537,8 @@ static void build_stores(int ltcy, int ltcx, int stores[], int n)
 
 
 /*!
- * @brief ¥¿¥¤¥×16¤ÎÉô²°¡ÄÃϲ¼ÅÔ»Ô¤ÎÀ¸À® / Type 16 -- Underground Arcade
- * @return ¤Ê¤·
+ * @brief タイプ16の部屋…地下都市の生成 / Type 16 -- Underground Arcade
+ * @return なし
  * @details
  * Town logic flow for generation of new town\n
  * Originally from Vanilla 3.0.3\n
@@ -6622,7 +6558,7 @@ static bool build_type16(void)
                STORE_ALCHEMIST, STORE_MAGIC, STORE_BLACK, STORE_BOOK,
        };
        int n = sizeof stores / sizeof (int);
-       int i, y, x, y1, x1, yval, xval;
+       POSITION i, y, x, y1, x1, yval, xval;
        int town_hgt = rand_range(MIN_TOWN_HGT, MAX_TOWN_HGT);
        int town_wid = rand_range(MIN_TOWN_WID, MAX_TOWN_WID);
        bool prevent_bm = FALSE;
@@ -6676,11 +6612,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
+       msg_print_wizard(CHEAT_DUNGEON, _("地下街を生成しました", "Underground arcade was generated."));
 
        /* Free buildings array */
        C_KILL(ugbldg, n, ugbldg_type);
@@ -6689,11 +6621,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)
 {
@@ -6723,13 +6655,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)
 {
@@ -6771,7 +6706,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++)
@@ -6781,7 +6716,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;
@@ -6789,8 +6724,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);
@@ -6798,24 +6732,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;
@@ -6932,16 +6867,14 @@ bool generate_rooms(void)
                if (!remain) break;
        }
 
-       if (rooms_built < 2) return FALSE;
-
-       if (cheat_room)
+       /*! @details 部屋生成数が2未満の場合生成失敗を返す */
+       if (rooms_built < 2)
        {
-#ifdef JP
-               msg_format("Éô²°¿ô: %d", rooms_built);
-#else
-               msg_format("Number of Rooms: %d", rooms_built);
-#endif
+               msg_format_wizard(CHEAT_DUNGEON, _("部屋数が2未満でした。生成を再試行します。", "Number of rooms was under 2. Retry."), rooms_built);
+               return FALSE;
        }
 
+       msg_format_wizard(CHEAT_DUNGEON, _("このダンジョンの部屋数は %d です。", "Number of Rooms: %d"), rooms_built);
+
        return TRUE;
 }