OSDN Git Service

Extend features of tiling. (separation of Cell size and Tile size / add offset position.)
[hengband/hengband.git] / src / wild.c
index b8e0e44..dc29212 100644 (file)
@@ -15,7 +15,7 @@
 /*!
  * @brief ÃÏ·ÁÀ¸À®³ÎΨ¤ò·è¤á¤ëÍ×ÁÇ100¤ÎÇÛÎó¤ò³ÎΨ¥Æ¡¼¥Ö¥ë¤«¤éºîÀ®¤¹¤ë
  * @param feat_type Èó°ìÍͳÎΨ¤òºÆ¸½¤¹¤ë¤¿¤á¤ÎÍ×ÁÇ¿ô100¤ÎÇÛÎó
- * @param feat_prob_prob ¸µ¤Î³ÎΨ¥Æ¡¼¥Ö¥ë
+ * @param prob ¸µ¤Î³ÎΨ¥Æ¡¼¥Ö¥ë
  * @return ¤Ê¤·
  */
 static void set_floor_and_wall_aux(s16b feat_type[100], feat_prob prob[DUNGEON_FEAT_PROB_NUM])
@@ -61,8 +61,18 @@ void set_floor_and_wall(byte type)
 }
 
 
-/*
- * Helper for plasma generation.
+/*!
+ * @brief ¥×¥é¥º¥Þ¥Õ¥é¥¯¥¿¥ëŪÃÏ·ÁÀ¸À®¤ÎºÆµ¢Ãæ´Ö½èÍý
+ * / Helper for plasma generation.
+ * @param x1 º¸¾åü¤Î¿¼¤ß
+ * @param x2 ±¦¾åü¤Î¿¼¤ß
+ * @param x3 º¸²¼Ã¼¤Î¿¼¤ß
+ * @param x4 ±¦²¼Ã¼¤Î¿¼¤ß
+ * @param xmid Ãæ±ûºÂɸX
+ * @param ymid Ãæ±ûºÂɸY
+ * @param rough ¥é¥ó¥À¥àÉý
+ * @param depth_max ¿¼¤ß¤ÎºÇÂçÃÍ
+ * @return ¤Ê¤·
  */
 static void perturb_point_mid(int x1, int x2, int x3, int x4,
                          int xmid, int ymid, int rough, int depth_max)
@@ -89,6 +99,18 @@ static void perturb_point_mid(int x1, int x2, int x3, int x4,
 }
 
 
+/*!
+ * @brief ¥×¥é¥º¥Þ¥Õ¥é¥¯¥¿¥ëŪÃÏ·ÁÀ¸À®¤ÎºÆµ¢Ëöü½èÍý
+ * / Helper for plasma generation.
+ * @param x1 Ãæ´ÖËöüÉô1¤Î½Å¤ß
+ * @param x2 Ãæ´ÖËöüÉô2¤Î½Å¤ß
+ * @param x3 Ãæ´ÖËöüÉô3¤Î½Å¤ß
+ * @param xmid ºÇ½ªËöüÉôºÂɸX
+ * @param ymid ºÇ½ªËöüÉôºÂɸY
+ * @param rough ¥é¥ó¥À¥àÉý
+ * @param depth_max ¿¼¤ß¤ÎºÇÂçÃÍ
+ * @return ¤Ê¤·
+ */
 static void perturb_point_end(int x1, int x2, int x3,
                          int xmid, int ymid, int rough, int depth_max)
 {
@@ -113,12 +135,24 @@ static void perturb_point_end(int x1, int x2, int x3,
 }
 
 
-/*
+/*!
+ * @brief ¥×¥é¥º¥Þ¥Õ¥é¥¯¥¿¥ëŪÃÏ·ÁÀ¸À®¤Î³«»Ï½èÍý
+ * / Helper for plasma generation.
+ * @param x1 ½èÍýÈϰϤκ¸¾åXºÂɸ
+ * @param y1 ½èÍýÈϰϤκ¸¾åYºÂɸ
+ * @param x2 ½èÍýÈϰϤᦲ¼XºÂɸ
+ * @param y2 ½èÍýÈϰϤᦲ¼YºÂɸ
+ * @param depth_max ¿¼¤ß¤ÎºÇÂçÃÍ
+ * @param rough ¥é¥ó¥À¥àÉý
+ * @return ¤Ê¤·
+ * @details
+ * <pre>
  * A generic function to generate the plasma fractal.
  * Note that it uses ``cave_feat'' as temporary storage.
  * The values in ``cave_feat'' after this function
  * are NOT actual features; They are raw heights which
  * need to be converted to features.
+ * </pre>
  */
 static void plasma_recursive(int x1, int y1, int x2, int y2,
                             int depth_max, int rough)
@@ -161,7 +195,14 @@ static void plasma_recursive(int x1, int y1, int x2, int y2,
  */
 static s16b terrain_table[MAX_WILDERNESS][MAX_FEAT_IN_TERRAIN];
 
-
+/*!
+ * @brief ¹ÓÌî¥Õ¥í¥¢À¸À®¤Î¥µ¥Ö¥ë¡¼¥Á¥ó
+ * @param terrain ¹ÓÌîÃÏ·ÁID
+ * @param seed Íð¿ô¤Î¸ÇÄꥷ¡¼¥É
+ * @param border Ì¤»ÈÍÑ
+ * @param corner ¹­°è¥Þ¥Ã¥×¤Î³ÑÉôʬ¤È¤·¤Æ¤ÎÀ¸À®¤Ê¤é¤ÐTRUE
+ * @return ¤Ê¤·
+ */
 static void generate_wilderness_area(int terrain, u32b seed, bool border, bool corner)
 {
        int x1, y1;
@@ -256,15 +297,23 @@ static void generate_wilderness_area(int terrain, u32b seed, bool border, bool c
 
 
 
-/*
+/*!
+ * @brief ¹ÓÌî¥Õ¥í¥¢À¸À®¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
  * Load a town or generate a terrain level using "plasma" fractals.
- *
+ * @param y ¹­°è¥Þ¥Ã¥×YºÂɸ
+ * @param x ¹­°è¥Þ¥Ã¥×YºÂɸ
+ * @param border ¹­°è¥Þ¥Ã¥×¤ÎÊÕÉôʬ¤È¤·¤Æ¤ÎÀ¸À®¤Ê¤é¤ÐTRUE
+ * @param corner ¹­°è¥Þ¥Ã¥×¤Î³ÑÉôʬ¤È¤·¤Æ¤ÎÀ¸À®¤Ê¤é¤ÐTRUE
+ * @return ¤Ê¤·
+ * @details
+ * <pre>
  * x and y are the coordinates of the area in the wilderness.
  * Border and corner are optimization flags to speed up the
  * generation of the fractal terrain.
  * If border is set then only the border of the terrain should
  * be generated (for initializing the border structure).
  * If corner is set then only the corners of the area are needed.
+ * </pre>
  */
 static void generate_area(int y, int x, bool border, bool corner)
 {
@@ -391,8 +440,10 @@ static void generate_area(int y, int x, bool border, bool corner)
 static border_type border;
 
 
-/*
+/*!
+ * @brief ¹­°è¥Þ¥Ã¥×¤ÎÀ¸À® /
  * Build the wilderness area outside of the town.
+ * @return ¤Ê¤·
  */
 void wilderness_gen(void)
 {
@@ -637,9 +688,10 @@ void wilderness_gen(void)
 
 static s16b conv_terrain2feat[MAX_WILDERNESS];
 
-/*
- * Build the wilderness area.
- * -DG-
+/*!
+ * @brief ¹­°è¥Þ¥Ã¥×¤ÎÀ¸À®(´Ê°×½èÍýÈÇ) /
+ * Build the wilderness area. -DG-
+ * @return ¤Ê¤·
  */
 void wilderness_gen_small()
 {
@@ -708,8 +760,17 @@ struct wilderness_grid
 static wilderness_grid w_letter[255];
 
 
-/*
+/*!
+ * @brief w_info.txt¤Î¥Ç¡¼¥¿²òÀÏ /
  * Parse a sub-file of the "extra info"
+ * @param buf Æɤ߼è¤Ã¤¿¥Ç¡¼¥¿¹Ô¤Î¥Ð¥Ã¥Õ¥¡
+ * @param ymin Ì¤»ÈÍÑ
+ * @param xmin ¹­°èÃÏ·Á¥Þ¥Ã¥×¤òÆɤ߹þ¤ß¤¿¤¤xºÂɸ¤Î³«»Ï°ÌÃÖ
+ * @param ymax Ì¤»ÈÍÑ
+ * @param xmax ¹­°èÃÏ·Á¥Þ¥Ã¥×¤òÆɤ߹þ¤ß¤¿¤¤xºÂɸ¤Î½ªÎ»°ÌÃÖ
+ * @param y ¹­°è¥Þ¥Ã¥×¤Î¹â¤µ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
+ * @param x ¹­°è¥Þ¥Ã¥×¤ÎÉý¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
+ * @return ¤Ê¤·
  */
 errr parse_line_wilderness(char *buf, int ymin, int xmin, int ymax, int xmax, int *y, int *x)
 {
@@ -852,8 +913,11 @@ errr parse_line_wilderness(char *buf, int ymin, int xmin, int ymax, int xmax, in
 }
 
 
-/*
+
+/*!
+ * @brief ¥²¡¼¥à³«»Ï»þ¤Ë³Æ¹ÓÌî¥Õ¥í¥¢¤ÎÍð¿ô¥·¡¼¥É¤ò»ØÄꤹ¤ë /
  * Generate the random seeds for the wilderness
+ * @return ¤Ê¤·
  */
 void seed_wilderness(void)
 {
@@ -876,8 +940,11 @@ void seed_wilderness(void)
  */
 typedef wilderness_type *wilderness_type_ptr;
 
-/*
+
+/*!
+ * @brief ¥²¡¼¥à³«»Ï»þ¤Î¹ÓÌî½é´ü²½¥á¥¤¥ó¥ë¡¼¥Á¥ó /
  * Initialize wilderness array
+ * @return ¥¨¥é¡¼¥³¡¼¥É
  */
 errr init_wilderness(void)
 {
@@ -896,7 +963,14 @@ errr init_wilderness(void)
        return 0;
 }
 
-
+/*!
+ * @brief ¹ÓÌî¤ÎÃÏÀªÀßÄê¤ò½é´ü²½¤¹¤ë /
+ * Initialize wilderness array
+ * @param terrain ½é´ü²½¤·¤¿¤¤ÃÏÀªID
+ * @param feat_global ´ðËÜŪ¤ÊÃÏ·ÁID
+ * @param fmt ÃÏÀªÆâ¤ÎÃÏ·Á¿ô¤ò»²¾È¤¹¤ë¤¿¤á¤ÎÆȼ«¥Õ¥©¡¼¥Þ¥Ã¥È
+ * @return ¤Ê¤·
+ */
 static void init_terrain_table(int terrain, s16b feat_global, cptr fmt, ...)
 {
        va_list vp;
@@ -946,8 +1020,10 @@ static void init_terrain_table(int terrain, s16b feat_global, cptr fmt, ...)
 }
 
 
-/*
+/*!
+ * @brief ¹ÓÌî¤ÎÃÏÀªÀßÄêÁ´ÂΤò½é´ü²½¤¹¤ë¥á¥¤¥ó¥ë¡¼¥Á¥ó /
  * Initialize arrays for wilderness terrains
+ * @return ¤Ê¤·
  */
 void init_wilderness_terrains(void)
 {
@@ -1024,7 +1100,11 @@ void init_wilderness_terrains(void)
                feat_mountain, MAX_FEAT_IN_TERRAIN - 8);
 }
 
-
+/*!
+ * @brief ¹ÓÌ¤é¹­°è¥Þ¥Ã¥×¤Ø¤ÎÀÚ¤êÂؤ¨½èÍý /
+ * Initialize arrays for wilderness terrains
+ * @return ÀÚ¤êÂؤ¨¤¬¹Ô¤ï¤ì¤¿¾ì¹ç¤ÏTRUE¤òÊÖ¤¹¡£
+ */
 bool change_wild_mode(void)
 {
        int i;