OSDN Git Service

[Refactor] #37353 型の置換(C_MAKE)。 / Type replacement(C_MAKE).
[hengband/hengband.git] / src / spells1.c
index 1e83675..f23d6b4 100644 (file)
@@ -250,7 +250,7 @@ static TERM_COLOR spell_color(int type)
                SYMBOL_CODE c;
 
                /* Lookup the default colors for this type */
-               cptr s = quark_str(gf_color[type]);
+               concptr s = quark_str(gf_color[type]);
 
                if (!s) return (TERM_WHITE);
 
@@ -725,7 +725,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
        if (have_flag(f_ptr->flags, FF_TREE))
        {
-               cptr message;
+               concptr message;
                switch (typ)
                {
                case GF_POIS:
@@ -1284,7 +1284,7 @@ static bool project_o(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                bool ignore = FALSE;
                bool do_kill = FALSE;
 
-               cptr note_kill = NULL;
+               concptr note_kill = NULL;
 
 #ifndef JP
                /* Get the "plural"-ness */
@@ -1293,8 +1293,6 @@ static bool project_o(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
                /* Acquire next object */
                next_o_idx = o_ptr->next_o_idx;
-
-               /* Extract the flags */
                object_flags(o_ptr, flgs);
 
                /* Check for artifact */
@@ -1693,10 +1691,10 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
        PARAMETER_VALUE photo = 0;
 
        /* Assume no note */
-       cptr note = NULL;
+       concptr note = NULL;
 
        /* Assume a default death */
-       cptr note_dies = extract_note_dies(real_r_idx(m_ptr));
+       concptr note_dies = extract_note_dies(real_r_idx(m_ptr));
 
        POSITION ty = m_ptr->fy;
        POSITION tx = m_ptr->fx;
@@ -2567,8 +2565,8 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                        else if (dam > 0)
                        {
                                int b = damroll(5, dam) / 4;
-                               cptr str = (p_ptr->pclass == CLASS_MINDCRAFTER) ? _("超能力パワー", "psychic energy") : _("魔力", "mana");
-                               cptr msg = _("あなたは%sの苦痛を%sに変換した!", 
+                               concptr str = (p_ptr->pclass == CLASS_MINDCRAFTER) ? _("超能力パワー", "psychic energy") : _("魔力", "mana");
+                               concptr msg = _("あなたは%sの苦痛を%sに変換した!", 
                                         (seen ? "You convert %s's pain into %s!" : 
                                                         "You convert %ss pain into %s!"));
                                msg_format(msg, m_name, str);
@@ -4034,7 +4032,6 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                                /* Special message */
                                                if (see_s_msg)
                                                {
-                                                       /* Get the monster name */
                                                        monster_desc(killer, caster_ptr, 0);
                                                        msg_format(_("%^sは気分が良さそうだ。", "%^s appears healthier."), killer);
                                                }
@@ -4964,7 +4961,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                if (pet) mode |= PM_FORCE_PET;
                                else mode |= (PM_NO_PET | PM_FORCE_FRIENDLY);
 
-                               count += summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (pet ? p_ptr->lev*2/3+randint1(p_ptr->lev/2) : dun_level), 0, mode);
+                               count += summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (pet ? p_ptr->lev*2/3+randint1(p_ptr->lev/2) : dun_level), 0, mode, '\0');
                                if (!one_in_(6)) break;
                        }
                        case 23: case 24: case 25:
@@ -4979,7 +4976,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                int i = 0;
                                if (one_in_(13))
                                {
-                                       while (i < 6)
+                                       while (i < A_MAX)
                                        {
                                                do
                                                {
@@ -5056,8 +5053,6 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
                /* Mark the item as fully known */
                q_ptr->ident |= (IDENT_MENTAL);
-
-               /* Drop it in the dungeon */
                (void)drop_near(q_ptr, -1, p_ptr->y, p_ptr->x);
        }
 
@@ -5094,7 +5089,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
  * We return "TRUE" if any "obvious" effects were observed.  XXX XXX Actually,
  * we just assume that the effects were obvious, for historical reasons.
  */
-static bool project_p(MONSTER_IDX who, cptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell)
+static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell)
 {
        int k = 0;
        DEPTH rlev = 0;
@@ -5118,7 +5113,7 @@ static bool project_p(MONSTER_IDX who, cptr who_name, int r, POSITION y, POSITIO
        char killer[80];
 
        /* Hack -- messages */
-       cptr act = NULL;
+       concptr act = NULL;
 
        int get_damage = 0;
 
@@ -5191,12 +5186,8 @@ static bool project_p(MONSTER_IDX who, cptr who_name, int r, POSITION y, POSITIO
 
        if (who > 0)
        {
-               /* Get the source monster */
                m_ptr = &m_list[who];
-               /* Extract the monster level */
                rlev = (((&r_info[m_ptr->r_idx])->level >= 1) ? (&r_info[m_ptr->r_idx])->level : 1);
-
-               /* Get the monster name */
                monster_desc(m_name, m_ptr, 0);
 
                /* Get the monster's real name (gotten before polymorph!) */
@@ -5716,7 +5707,7 @@ static bool project_p(MONSTER_IDX who, cptr who_name, int r, POSITION y, POSITIO
                                                msg_print(_("あなたは以前ほど力強くなくなってしまった...。", 
                                                                        "You're not as powerful as you used to be..."));
 
-                                               for (k = 0; k < 6; k++)
+                                               for (k = 0; k < A_MAX; k++)
                                                {
                                                        p_ptr->stat_cur[k] = (p_ptr->stat_cur[k] * 7) / 8;
                                                        if (p_ptr->stat_cur[k] < 3) p_ptr->stat_cur[k] = 3;
@@ -6857,8 +6848,8 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                                {
                                        u16b p;
 
-                                       byte a;
-                                       char c;
+                                       TERM_COLOR a;
+                                       SYMBOL_CODE c;
 
                                        /* Obtain the bolt pict */
                                        p = bolt_pict(oy, ox, y, x, typ);
@@ -6996,7 +6987,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                                        u16b p;
 
                                        TERM_COLOR a;
-                                       char c;
+                                       SYMBOL_CODE c;
 
                                        /* Obtain the bolt pict */
                                        p = bolt_pict(oy, ox, y, x, typ);
@@ -7139,8 +7130,8 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                        {
                                u16b p;
 
-                               byte a;
-                               char c;
+                               TERM_COLOR a;
+                               SYMBOL_CODE c;
 
                                /* Obtain the bolt pict */
                                p = bolt_pict(oy, ox, y, x, typ);
@@ -7302,7 +7293,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                                        u16b p;
 
                                        TERM_COLOR a;
-                                       char c;
+                                       SYMBOL_CODE c;
 
                                        drawn = TRUE;
 
@@ -7356,10 +7347,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                }
        }
 
-
-       /* Update stuff if needed */
-       if (p_ptr->update) handle_stuff();
-
+       update_creature(p_ptr);
 
        if (flg & PROJECT_KILL)
        {
@@ -7400,8 +7388,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                }
        }
 
-       /* Update stuff if needed */
-       if (p_ptr->update) handle_stuff();
+       update_creature(p_ptr);
 
        /* Check objects */
        if (flg & (PROJECT_ITEM))