OSDN Git Service

Extend features of tiling. (separation of Cell size and Tile size / add offset position.)
[hengband/hengband.git] / src / object2.c
index f398805..fd70402 100644 (file)
@@ -318,7 +318,7 @@ static void compact_objects_aux(int i1, int i2)
 /*!
  * @brief ¥°¥í¡¼¥Ð¥ë¥ª¥Ö¥¸¥§¥¯¥ÈÇÛÎ󤫤éÍ¥ÀèÅÙ¤ÎÄ㤤¤â¤Î¤òºï½ü¤·¡¢¥Ç¡¼¥¿¤ò°µ½Ì¤¹¤ë¡£ /
  * Compact and Reorder the object list.
- * @size ºÇÄã¤Ç¤â¸º¤é¤·¤¿¤¤¥ª¥Ö¥¸¥§¥¯¥È¿ô¤Î¿å½à
+ * @param size ºÇÄã¤Ç¤â¸º¤é¤·¤¿¤¤¥ª¥Ö¥¸¥§¥¯¥È¿ô¤Î¿å½à
  * @return ¤Ê¤·
  * @details
  * ¡Ê´í¸±¤Ê¤Î¤Ç»ÈÍѤˤÏÃí°Õ¤¹¤ë¤³¤È¡Ë
@@ -616,7 +616,7 @@ static errr get_obj_num_prep(void)
 /*!
  * @brief ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®¥Æ¡¼¥Ö¥ë¤«¤é¥¢¥¤¥Æ¥à¤ò¼èÆÀ¤¹¤ë /
  * Choose an object kind that seems "appropriate" to the given level
- * @param À¸À®³¬
+ * @param level À¸À®³¬
  * @return Áª¤Ð¤ì¤¿¥ª¥Ö¥¸¥§¥¯¥È¥Ù¡¼¥¹ID
  * @details
  * This function uses the "prob2" field of the "object allocation table",\n
@@ -996,7 +996,7 @@ s32b flag_cost(object_type *o_ptr, int plusses)
        if (have_flag(flgs, TR_EASY_SPELL)) total += 1500;
        if (have_flag(flgs, TR_THROW)) total += 5000;
        if (have_flag(flgs, TR_FREE_ACT)) total += 4500;
-       if (have_flag(flgs, TR_HOLD_LIFE)) total += 8500;
+       if (have_flag(flgs, TR_HOLD_EXP)) total += 8500;
 
        tmp_cost = 0;
        count = 0;
@@ -2497,7 +2497,7 @@ static void a_m_aux_1(object_type *o_ptr, int level, int power)
                                        break;
                                case EGO_PATTERN:
                                        if (one_in_(3))
-                                               add_flag(o_ptr->art_flags, TR_HOLD_LIFE);
+                                               add_flag(o_ptr->art_flags, TR_HOLD_EXP);
                                        if (one_in_(3))
                                                add_flag(o_ptr->art_flags, TR_DEX);
                                        if (one_in_(5))
@@ -2678,6 +2678,7 @@ static bool add_esp_strong(object_type *o_ptr)
 /*!
  * @brief ¥ª¥Ö¥¸¥§¥¯¥È¤Ë¥é¥ó¥À¥à¤Ê¼å¤¤ESP¤òÍ¿¤¨¤ë
  * @param o_ptr ¶¯²½¤òÍ¿¤¨¤¿¤¤¥ª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @param extra TRUE¤Ê¤é¤ÐESP¤ÎºÇÂçÉÕÍ¿¿ô¤¬Áý¤¨¤ë(TRUE -> 3+1d6 / FALSE -> 1d3)
  * @return ¤Ê¤·
  */
 static void add_esp_weak(object_type *o_ptr, bool extra)
@@ -3864,8 +3865,8 @@ static void a_m_aux_3(object_type *o_ptr, int level, int power)
                                                o_ptr->name2 = EGO_AMU_SEE_INVIS;
                                                break;
                                        case 7: case 8:
-                                               if (have_flag(k_ptr->flags, TR_HOLD_LIFE)) break;
-                                               o_ptr->name2 = EGO_AMU_HOLD_LIFE;
+                                               if (have_flag(k_ptr->flags, TR_HOLD_EXP)) break;
+                                               o_ptr->name2 = EGO_AMU_HOLD_EXP;
                                                break;
                                        case 9:
                                                if (have_flag(k_ptr->flags, TR_LEVITATION)) break;
@@ -5538,8 +5539,8 @@ s16b drop_near(object_type *j_ptr, int chance, int y, int x)
 /*!
  * @brief ³ÍÆÀ¥É¥í¥Ã¥×¤ò¹Ô¤¦¡£
  * Scatter some "great" objects near the player
- * @param y ÇÛÃÖ¤·¤¿¤¤¥Õ¥í¥¢¤ÎYºÂɸ
- * @param x ÇÛÃÖ¤·¤¿¤¤¥Õ¥í¥¢¤ÎXºÂɸ
+ * @param y1 ÇÛÃÖ¤·¤¿¤¤¥Õ¥í¥¢¤ÎYºÂɸ
+ * @param x1 ÇÛÃÖ¤·¤¿¤¤¥Õ¥í¥¢¤ÎXºÂɸ
  * @param num ³ÍÆÀ¤Î½èÍý²ó¿ô
  * @param great TRUE¤Ê¤é¤Ðɬ¤º¹âµéÉʰʾå¤òÍî¤È¤¹
  * @param special TRUE¤Ê¤é¤Ðɬ¤ºÆÃÊÌÉʤòÍî¤È¤¹
@@ -5614,8 +5615,8 @@ amuse_type amuse_info[] =
 
 /*!
  * @brief Ã¯ÆÀ¥É¥í¥Ã¥×¤ò¹Ô¤¦¡£
- * @param y ÇÛÃÖ¤·¤¿¤¤¥Õ¥í¥¢¤ÎYºÂɸ
- * @param x ÇÛÃÖ¤·¤¿¤¤¥Õ¥í¥¢¤ÎXºÂɸ
+ * @param y1 ÇÛÃÖ¤·¤¿¤¤¥Õ¥í¥¢¤ÎYºÂɸ
+ * @param x1 ÇÛÃÖ¤·¤¿¤¤¥Õ¥í¥¢¤ÎXºÂɸ
  * @param num Ã¯ÆÀ¤Î½èÍý²ó¿ô
  * @param known TRUE¤Ê¤é¤Ð¥ª¥Ö¥¸¥§¥¯¥È¤¬É¬¤º¡ö´ÕÄê¡öºÑ¤Ë¤Ê¤ë
  * @return ¤Ê¤·
@@ -6179,6 +6180,7 @@ bool inven_carry_okay(object_type *o_ptr)
  * Check if we have space for an item in the pack without overflow
  * @param o_ptr Èæ³ÓÂоݥª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿1
  * @param o_value o_ptr¤Î¥¢¥¤¥Æ¥à²ÁÃ͡ʼêÆ°¤Ç¤¢¤é¤«¤¸¤áÂåÆþ¤¹¤ëɬÍפ¬¤¢¤ë¡©¡Ë
+ * @param j_ptr Èæ³ÓÂоݥª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿2
  * @return o_ptr¤ÎÊý¤¬¾å°Ì¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
  */
 bool object_sort_comp(object_type *o_ptr, s32b o_value, object_type *j_ptr)
@@ -6777,10 +6779,12 @@ void reorder_pack(void)
 
 }
 
-
-/*
+/*!
+ * @brief ¸½ºß¥¢¥¯¥Æ¥£¥Ö¤Ë¤Ê¤Ã¤Æ¤¤¤ë¥¦¥£¥ó¥É¥¦¤Ë¥ª¥Ö¥¸¥§¥¯¥È¤Î¾ÜºÙ¤òɽ¼¨¤¹¤ë /
  * Hack -- display an object kind in the current window
- *
+ * @param k_idx ¥Ù¡¼¥¹¥¢¥¤¥Æ¥à¤Î»²¾ÈID
+ * @return ¤Ê¤·
+ * @details
  * Include list of usable spells for readible books
  */
 void display_koff(int k_idx)
@@ -6855,7 +6859,12 @@ void display_koff(int k_idx)
        }
 }
 
-/* Choose one of items that have warning flag */
+/*!
+ * @brief ·Ù¹ð¤òÊü¤Ä¥¢¥¤¥Æ¥à¤òÁªÂò¤¹¤ë /
+ * Choose one of items that have warning flag
+ * Calculate spell damages
+ * @return ·Ù¹ð¤ò¹Ô¤¦
+ */
 object_type *choose_warning_item(void)
 {
        int i;
@@ -6883,7 +6892,16 @@ object_type *choose_warning_item(void)
        return number ? &inventory[choices[randint0(number)]] : NULL;
 }
 
-/* Calculate spell damages */
+/*!
+ * @brief ·Ù¹ð´ð½à¤òÄê¤á¤ë¤¿¤á¤ËËâË¡¤Î¸ú²Ì°À­¤Ë´ð¤Å¤¤¤ÆºÇÂçËâË¡¥À¥á¡¼¥¸¤ò·×»»¤¹¤ë /
+ * Calculate spell damages
+ * @param m_ptr ËâË¡¤ò¹Ô»È¤¹¤ë¥â¥ó¥¹¥¿¡¼¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @param typ ¸ú²Ì°À­¤ÎID
+ * @param dam ´ðËÜ¥À¥á¡¼¥¸
+ * @param limit ¥À¥á¡¼¥¸¤Î¸Â³¦ÃÍ
+ * @param max »»½Ð¤·¤¿ºÇÂç¥À¥á¡¼¥¸¤òÊÖ¤¹¥Ý¥¤¥ó¥¿
+ * @return ¤Ê¤·
+ */
 static void spell_damcalc(monster_type *m_ptr, int typ, int dam, int limit, int *max)
 {
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
@@ -7122,7 +7140,13 @@ static void spell_damcalc(monster_type *m_ptr, int typ, int dam, int limit, int
        if (dam > *max) *max = dam;
 }
 
-/* Calculate blow damages */
+/*!
+ * @brief ·Ù¹ð´ð½à¤òÄê¤á¤ë¤¿¤á¤Ë¥â¥ó¥¹¥¿¡¼¤ÎÂÇ·âºÇÂç¥À¥á¡¼¥¸¤ò»»½Ð¤¹¤ë /
+ * Calculate blow damages
+ * @param m_ptr ÂÇ·â¤ò¹Ô»È¤¹¤ë¥â¥ó¥¹¥¿¡¼¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @param blow_ptr ¥â¥ó¥¹¥¿¡¼¤ÎÂÇ·âǽÎϤι½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @return »»½Ð¤µ¤ì¤¿ºÇÂç¥À¥á¡¼¥¸¤òÊÖ¤¹¡£
+ */
 static int blow_damcalc(monster_type *m_ptr, monster_blow *blow_ptr)
 {
        int  dam = blow_ptr->d_dice * blow_ptr->d_side;
@@ -7193,7 +7217,13 @@ static int blow_damcalc(monster_type *m_ptr, monster_blow *blow_ptr)
        return dam;
 }
 
-/* Examine the grid (xx,yy) and warn the player if there are any danger */
+/*!
+ * @brief ¥×¥ì¥¤¥ä¡¼¤¬ÆÃÄêÃÏÅÀ¤Ø°ÜÆ°¤·¤¿¾ì¹ç¤Ë·Ù¹ð¤òȯ¤¹¤ë½èÍý /
+ * Examine the grid (xx,yy) and warn the player if there are any danger
+ * @param xx ´í¸±À­¤òÄ´ºº¤¹¤ë¥Þ¥¹¤ÎXºÂɸ
+ * @param yy ´í¸±À­¤òÄ´ºº¤¹¤ë¥Þ¥¹¤ÎYºÂɸ
+ * @return ·Ù¹ð¤ò̵»ë¤·¤Æ¿Ê¤à¤³¤È¤òÁªÂò¤¹¤ë¤«¤«ÌäÂ̵꤬¤±¤ì¤ÐTRUE¡¢·Ù¹ð¤Ë½¾¤Ã¤¿¤Ê¤éFALSE¤òÊÖ¤¹¡£
+ */
 bool process_warning(int xx, int yy)
 {
        int mx, my;
@@ -7349,7 +7379,11 @@ bool process_warning(int xx, int yy)
        return TRUE;
 }
 
-
+/*!
+ * @brief ¥¨¥Ã¥»¥ó¥¹¤ÎÉղòÄǽ¤ÊÉð´ï¤äÌðÃƤ«¤òÊÖ¤¹
+ * @param o_ptr ¥Á¥§¥Ã¥¯¤·¤¿¤¤¥ª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @return ¥¨¥Ã¥»¥ó¥¹¤ÎÉղòÄǽ¤ÊÉð´ï¤«ÌðÃƤʤé¤ÐTRUE¤òÊÖ¤¹¡£
+ */
 static bool item_tester_hook_melee_ammo(object_type *o_ptr)
 {
        switch (o_ptr->tval)
@@ -7373,8 +7407,8 @@ static bool item_tester_hook_melee_ammo(object_type *o_ptr)
 }
 
 
-/*
- *  A structure for smithing
+/*!
+ * ¥¨¥Ã¥»¥ó¥¹¾ðÊó¤Î¹½Â¤ÂΠ/ A structure for smithing
  */
 typedef struct {
        int add;       /* TR flag number or special essence id */
@@ -7385,8 +7419,8 @@ typedef struct {
 } essence_type;
 
 
-/*
- *  Smithing type data for Weapon smith
+/*!
+ * ¥¨¥Ã¥»¥ó¥¹¾ðÊó¥Æ¡¼¥Ö¥ë Smithing type data for Weapon smith
  */
 #ifdef JP
 static essence_type essence_info[] = 
@@ -7424,7 +7458,7 @@ static essence_type essence_info[] =
        {TR_IM_COLD, "Î䵤ÌȱÖ", 2, TR_IM_ACID, 20},
        {TR_REFLECT, "È¿¼Í", 2, TR_REFLECT, 20},
        {TR_FREE_ACT, "ËãáãÃΤ餺", 3, TR_FREE_ACT, 20},
-       {TR_HOLD_LIFE, "À¸Ì¿ÎÏ°Ý»ý", 3, TR_HOLD_LIFE, 20},
+       {TR_HOLD_EXP, "·Ð¸³ÃÍ°Ý»ý", 3, TR_HOLD_EXP, 20},
        {TR_RES_ACID, "ÂÑ»À", 2, TR_RES_ACID, 15},
        {TR_RES_ELEC, "ÂÑÅÅ·â", 2, TR_RES_ELEC, 15},
        {TR_RES_FIRE, "ÂѲбê", 2, TR_RES_FIRE, 15},
@@ -7535,7 +7569,7 @@ static essence_type essence_info[] =
        {TR_IM_COLD, "cold immunity", 2, TR_IM_ACID, 20},
        {TR_REFLECT, "reflection", 2, TR_REFLECT, 20},
        {TR_FREE_ACT, "free action", 3, TR_FREE_ACT, 20},
-       {TR_HOLD_LIFE, "hold life", 3, TR_HOLD_LIFE, 20},
+       {TR_HOLD_EXP, "hold experience", 3, TR_HOLD_EXP, 20},
        {TR_RES_ACID, "resistance to acid", 2, TR_RES_ACID, 15},
        {TR_RES_ELEC, "resistance to electric", 2, TR_RES_ELEC, 15},
        {TR_RES_FIRE, "resistance to fire", 2, TR_RES_FIRE, 15},
@@ -7613,8 +7647,8 @@ static essence_type essence_info[] =
 #endif
 
 
-/*
- *  Essense names for Weapon smith
+/*!
+ * ¥¨¥Ã¥»¥ó¥¹Ì¾¥Æ¡¼¥Ö¥ë / Essense names for Weapon smith
  */
 #ifdef JP
 cptr essence_name[] = 
@@ -7666,7 +7700,7 @@ cptr essence_name[] =
        "",
        "È¿¼Í",
        "ËãáãÃΤ餺",
-       "À¸Ì¿ÎÏ°Ý»ý",
+       "·Ð¸³ÃÍ°Ý»ý",
        "ÂÑ»À",
        "ÂÑÅÅ·â",
        "ÂѲбê",
@@ -7769,7 +7803,7 @@ static cptr essence_name[] =
        "",
        "reflection",
        "free action",
-       "hold life",
+       "hold exp",
        "res. acid",
        "res. elec.",
        "res. fire",
@@ -7822,7 +7856,10 @@ static cptr essence_name[] =
 };
 #endif
 
-
+/*!
+ * @brief ½ê»ý¤·¤Æ¤¤¤ë¥¨¥Ã¥»¥ó¥¹°ìÍ÷¤òɽ¼¨¤¹¤ë
+ * @return ¤Ê¤·
+ */
 static void display_essence(void)
 {
        int i, num = 0;
@@ -7853,6 +7890,10 @@ static void display_essence(void)
        return;
 }
 
+/*!
+ * @brief ¥¨¥Ã¥»¥ó¥¹¤ÎÃê½Ð½èÍý
+ * @return ¤Ê¤·
+ */
 static void drain_essence(void)
 {
        int drain_value[sizeof(p_ptr->magic_num1) / sizeof(s32b)];
@@ -8097,8 +8138,10 @@ static void drain_essence(void)
        p_ptr->window |= (PW_INVEN);
 }
 
-
-
+/*!
+ * @brief Éղ乤륨¥Ã¥»¥ó¥¹¤ÎÂçÊ̤òÁªÂò¤¹¤ë
+ * @return Áª¤ó¤À¥¨¥Ã¥»¥ó¥¹¤ÎÂçÊÌID
+ */
 static int choose_essence(void)
 {
        int mode = 0;
@@ -8213,6 +8256,11 @@ static int choose_essence(void)
        return mode;
 }
 
+/*!
+ * @brief ¥¨¥Ã¥»¥ó¥¹¤ò¼ÂºÝ¤ËÉղ乤ë
+ * @param mode ¥¨¥Ã¥»¥ó¥¹¤ÎÂçÊÌID
+ * @return ¤Ê¤·
+ */
 static void add_essence(int mode)
 {
        int item, max_num = 0;
@@ -8823,7 +8871,10 @@ static void add_essence(int mode)
        p_ptr->window |= (PW_INVEN);
 }
 
-
+/*!
+ * @brief ¥¨¥Ã¥»¥ó¥¹¤ò¾Ãµî¤¹¤ë
+ * @return ¤Ê¤·
+ */
 static void erase_essence(void)
 {
        int item;
@@ -8890,6 +8941,11 @@ static void erase_essence(void)
        p_ptr->window |= (PW_INVEN);
 }
 
+/*!
+ * @brief ÃÃÌꥳ¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó
+ * @param only_browse TRUE¤Ê¤é¤Ð¥¨¥Ã¥»¥ó¥¹°ìÍ÷¤Îɽ¼¨¤Î¤ß¤ò¹Ô¤¦
+ * @return ¤Ê¤·
+ */
 void do_cmd_kaji(bool only_browse)
 {
        int mode = 0;
@@ -9080,8 +9136,12 @@ void do_cmd_kaji(bool only_browse)
 }
 
 
-/*
+/*!
+ * @brief ÅêÚ³»þ¤¿¤¤¤Þ¤Ä¤ËÅꤲ¤ä¤¹¤¤/¾Æ´þ/¥¢¥ó¥Ç¥Ã¥É¥¹¥ì¥¤¤ÎÆÃÊ̸ú²Ì¤òÊÖ¤¹¡£
  * Torches have special abilities when they are flaming.
+ * @param o_ptr ÅêÚ³¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @param flgs ÆÃÊ̤ËÄɲ乤ë¥Õ¥é¥°¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
+ * @return ¤Ê¤·
  */
 void torch_flags(object_type *o_ptr, u32b *flgs)
 {
@@ -9096,6 +9156,14 @@ void torch_flags(object_type *o_ptr, u32b *flgs)
        }
 }
 
+/*!
+ * @brief ÅêÚ³»þ¤¿¤¤¤Þ¤Ä¤Ë¥À¥¤¥¹¤òÍ¿¤¨¤ë¡£
+ * Torches have special abilities when they are flaming.
+ * @param o_ptr ÅêÚ³¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @param dd ÆÃÊ̤ʥÀ¥¤¥¹¿ô¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
+ * @param ds ÆÃÊ̤ʥÀ¥¤¥¹ÌÌ¿ô¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
+ * @return ¤Ê¤·
+ */
 void torch_dice(object_type *o_ptr, int *dd, int *ds)
 {
        if ((o_ptr->tval == TV_LITE) && (o_ptr->sval == SV_LITE_TORCH))
@@ -9108,6 +9176,12 @@ void torch_dice(object_type *o_ptr, int *dd, int *ds)
        }
 }
 
+/*!
+ * @brief ÅêÚ³»þÌ¿Ã椷¤¿¤¿¤¤¤Þ¤Ä¤Î¼÷Ì¿¤ò½Ì¤á¤ë¡£
+ * Torches have special abilities when they are flaming.
+ * @param o_ptr ÅêÚ³¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @return ¤Ê¤·
+ */
 void torch_lost_fuel(object_type *o_ptr)
 {
        if ((o_ptr->tval == TV_LITE) && (o_ptr->sval == SV_LITE_TORCH))