OSDN Git Service

Merge branch 'master' of git.sourceforge.jp:/gitroot/hengband/hengband
authorDeskull <deskull@users.sourceforge.jp>
Thu, 13 Feb 2014 14:06:35 +0000 (23:06 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Thu, 13 Feb 2014 14:06:35 +0000 (23:06 +0900)
lib/edit/r_info.txt
src/util.c
src/wild.c

index b93716c..1c0e19b 100644 (file)
@@ -8781,7 +8781,7 @@ B:BITE:HURT:2d6
 F:FORCE_SLEEP | FORCE_MAXHP | 
 F:ONLY_ITEM | DROP_2D2 | CAN_FLY |
 F:INVISIBLE | PASS_WALL |
-F:EVIL | DRAGON | RES_LITE | RES_DARK | NO_CONF | NO_SLEEP | RIDING
+F:DRAGON | RES_LITE | RES_DARK | NO_CONF | NO_SLEEP | RIDING
 S:1_IN_6 | 
 S:SLOW | CONF | SCARE | 
 S:BR_LITE | BR_DARK
index c785afd..5ef7f93 100644 (file)
@@ -1725,6 +1725,7 @@ errr play_music(int type, int val)
  */
 void select_floor_music()
 {
+       int i;
        /* No sound */
        if (!use_music) return;
 
@@ -1733,17 +1734,20 @@ void select_floor_music()
                play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_WILD);
                return;
        }
-       else if(p_ptr->inside_arena)
+
+       if(p_ptr->inside_arena)
        {
                play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_ARENA);
                return;
        }
-       else if(p_ptr->inside_battle)
+
+       if(p_ptr->inside_battle)
        {
                play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_BATTLE);
                return;
        }
-       else if(p_ptr->inside_quest)
+
+       if(p_ptr->inside_quest)
        {
                if(play_music(TERM_XTRA_MUSIC_QUEST, p_ptr->inside_quest))
                {
@@ -1751,7 +1755,22 @@ void select_floor_music()
                }
                return;
        }
-       else if(dungeon_type)
+
+       for(i = 0; i < max_quests; i++)
+       { // TODO ¥Þ¥¯¥í¤ÇÎà»÷¾ò·ï¤òÅý¹ç¤¹¤ë¤³¤È
+               if(quest[i].status == QUEST_STATUS_TAKEN &&
+                       (quest[i].type == QUEST_TYPE_KILL_LEVEL || quest[i].type == QUEST_TYPE_RANDOM) &&
+                        quest[i].level == dun_level && dungeon_type == quest[i].dungeon)
+               {
+                       if(play_music(TERM_XTRA_MUSIC_QUEST, i)) 
+                       {
+                               play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_QUEST);
+                       }
+                       return;
+               }
+       }
+
+       if(dungeon_type)
        {
                if(play_music(TERM_XTRA_MUSIC_DUNGEON, dungeon_type))
                {
@@ -1766,7 +1785,8 @@ void select_floor_music()
                }
                return;
        }
-       else if(p_ptr->town_num)
+
+       if(p_ptr->town_num)
        {
                if(play_music(TERM_XTRA_MUSIC_TOWN, p_ptr->town_num))
                {
@@ -1774,7 +1794,8 @@ void select_floor_music()
                }
                return;
        }
-       else if(!dun_level)
+
+       if(!dun_level)
        {
                if(p_ptr->lev >= 45) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_FIELD3);
                else if(p_ptr->lev >= 25) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_FIELD2);
index 98acd6f..f382ea6 100644 (file)
@@ -1,19 +1,23 @@
-/* File: wild.c */
-
-/*
- * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke,
- * Robert Ruehlmann
- *
- * This software may be copied and distributed for educational, research,
- * and not for profit purposes provided that this copyright and statement
- * are included in all such copies.  Other copyrights may also apply.
+/*!
+ * @file wild.c
+ * @brief ¹ÓÌî¥Þ¥Ã¥×¤ÎÀ¸À®¤È¥ë¡¼¥ë´ÉÍý / Wilderness generation
+ * @date 2014/02/13
+ * @author
+ * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke\n
+ * This software may be copied and distributed for educational, research, and\n
+ * not for profit purposes provided that this copyright and statement are\n
+ * included in all such copies.\n
+ * 2013 Deskull rearranged comment for Doxygen.
  */
 
-/* Purpose: Wilderness generation */
-
 #include "angband.h"
 
-
+/*!
+ * @brief ÃÏ·ÁÀ¸À®³ÎΨ¤ò·è¤á¤ëÍ×ÁÇ100¤ÎÇÛÎó¤ò³ÎΨ¥Æ¡¼¥Ö¥ë¤«¤éºîÀ®¤¹¤ë
+ * @param feat_type Èó°ìÍͳÎΨ¤òºÆ¸½¤¹¤ë¤¿¤á¤ÎÍ×ÁÇ¿ô100¤ÎÇÛÎó
+ * @param prob ¸µ¤Î³ÎΨ¥Æ¡¼¥Ö¥ë
+ * @return ¤Ê¤·
+ */
 static void set_floor_and_wall_aux(s16b feat_type[100], feat_prob prob[DUNGEON_FEAT_PROB_NUM])
 {
        int lim[DUNGEON_FEAT_PROB_NUM], cur = 0, i;
@@ -31,8 +35,11 @@ static void set_floor_and_wall_aux(s16b feat_type[100], feat_prob prob[DUNGEON_F
        }
 }
 
-/*
- * Fill the arrays of floors and walls in the good proportions
+/*!
+ * @brief ¥À¥ó¥¸¥ç¥ó¤ÎÃÏ·Á¤ò»ØÄê³ÎΨ¤Ë±þ¤¸¤Æ³Æ¥Þ¥¹¤Ø¥é¥ó¥À¥à¤ËÉߤ­µÍ¤á¤ë
+ * / Fill the arrays of floors and walls in the good proportions
+ * @param type ¥À¥ó¥¸¥ç¥óID
+ * @return ¤Ê¤·
  */
 void set_floor_and_wall(byte type)
 {
@@ -54,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)
@@ -82,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)
 {
@@ -106,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)