OSDN Git Service

[Refactor] #37353 型の置換(C_MAKE)。 / Type replacement(C_MAKE).
[hengband/hengband.git] / src / mane.c
index 5974546..96fcc3e 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include "angband.h"
+#include "spells-summon.h"
 
 static int damage;
 
@@ -24,10 +25,10 @@ static int damage;
 static void mane_info(char *p, int power, HIT_POINT dam)
 {
        PLAYER_LEVEL plev = p_ptr->lev;
-       cptr s_dam = _("損傷:", "dam ");
-       cptr s_dur = _("期間:", "dur ");
-       cptr s_range = _("範囲:", "range ");
-       cptr s_heal = _("回復:", "heal ");
+       concptr s_dam = _("損傷:", "dam ");
+       concptr s_dur = _("期間:", "dur ");
+       concptr s_range = _("範囲:", "range ");
+       concptr s_heal = _("回復:", "heal ");
 
        strcpy(p, "");
 
@@ -96,7 +97,7 @@ static int get_mane_power(int *sn, bool baigaesi)
        char            choice;
        char            out_val[160];
        char            comment[80];
-       cptr            p = _("能力", "power");
+       concptr            p = _("能力", "power");
 
        monster_power   spell;
        bool            flag, redraw;
@@ -135,8 +136,6 @@ static int get_mane_power(int *sn, bool baigaesi)
 
                                /* Show list */
                                redraw = TRUE;
-
-                               /* Save the screen */
                                screen_save();
 
                                /* Display a list of spells */
@@ -195,8 +194,6 @@ static int get_mane_power(int *sn, bool baigaesi)
                        {
                                /* Hide list */
                                redraw = FALSE;
-
-                               /* Restore the screen */
                                screen_load();
                        }
 
@@ -238,8 +235,6 @@ static int get_mane_power(int *sn, bool baigaesi)
                /* Stop the loop */
                flag = TRUE;
        }
-
-       /* Restore the screen */
        if (redraw) screen_load();
 
        p_ptr->window |= (PW_SPELL);
@@ -694,7 +689,7 @@ static bool use_mane(int spell)
        {
                monster_type *m_ptr;
                monster_race *r_ptr;
-               char m_name[80];
+               GAME_TEXT m_name[MAX_NLEN];
 
                if (!target_set(TARGET_KILL)) return FALSE;
                if (!cave[target_row][target_col].m_idx) break;
@@ -735,7 +730,7 @@ static bool use_mane(int spell)
                IDX target_m_idx;
                monster_type *m_ptr;
                monster_race *r_ptr;
-               char m_name[80];
+               GAME_TEXT m_name[MAX_NLEN];
 
                if (!target_set(TARGET_KILL)) return FALSE;
                target_m_idx = cave[target_row][target_col].m_idx;
@@ -799,7 +794,7 @@ static bool use_mane(int spell)
                msg_print(_("サイバーデーモンを召喚した!", "You summon Cyberdemons!"));
                if (max_cyber > 4) max_cyber = 4;
                for (k = 0;k < max_cyber; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_CYBER, mode);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_CYBER, mode, '\0');
                break;
        }
        case MS_S_MONSTER:
@@ -808,7 +803,7 @@ static bool use_mane(int spell)
                if (!target_set(TARGET_KILL)) return FALSE;
                msg_print(_("仲間を召喚した。", "You summon help."));
                for (k = 0;k < 1; k++)
-                       summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode));
+                       summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode), '\0');
                break;
        }
        case MS_S_MONSTERS:
@@ -816,8 +811,8 @@ static bool use_mane(int spell)
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
                msg_print(_("モンスターを召喚した!", "You summon monsters!"));
-               for (k = 0;k < 6; k++)
-                       summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode));
+               for (k = 0;k < A_MAX; k++)
+                       summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode), '\0');
                break;
        }
        case MS_S_ANT:
@@ -825,8 +820,8 @@ static bool use_mane(int spell)
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
                msg_print(_("アリを召喚した。", "You summon ants."));
-               for (k = 0;k < 6; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_ANT, mode);
+               for (k = 0;k < A_MAX; k++)
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_ANT, mode, '\0');
                break;
        }
        case MS_S_SPIDER:
@@ -834,8 +829,8 @@ static bool use_mane(int spell)
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
                msg_print(_("蜘蛛を召喚した。", "You summon spiders."));
-               for (k = 0;k < 6; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_SPIDER, mode);
+               for (k = 0;k < A_MAX; k++)
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_SPIDER, mode, '\0');
                break;
        }
        case MS_S_HOUND:
@@ -844,7 +839,7 @@ static bool use_mane(int spell)
                if (!target_set(TARGET_KILL)) return FALSE;
                msg_print(_("ハウンドを召喚した。", "You summon hounds."));
                for (k = 0;k < 4; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_HOUND, mode);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_HOUND, mode, '\0');
                break;
        }
        case MS_S_HYDRA:
@@ -853,7 +848,7 @@ static bool use_mane(int spell)
                if (!target_set(TARGET_KILL)) return FALSE;
                msg_print(_("ヒドラを召喚した。", "You summon hydras."));
                for (k = 0;k < 4; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_HYDRA, mode);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_HYDRA, mode, '\0');
                break;
        }
        case MS_S_ANGEL:
@@ -862,7 +857,7 @@ static bool use_mane(int spell)
                if (!target_set(TARGET_KILL)) return FALSE;
                msg_print(_("天使を召喚した!", "You summon angel!"));
                for (k = 0;k < 1; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_ANGEL, mode);
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_ANGEL, mode, '\0');
                break;
        }
        case MS_S_DEMON:
@@ -871,7 +866,7 @@ static bool use_mane(int spell)
                if (!target_set(TARGET_KILL)) return FALSE;
                msg_print(_("混沌の宮廷から悪魔を召喚した!", "You summon a demon from the Courts of Chaos!"));
                for (k = 0;k < 1; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_DEMON, (mode | u_mode));
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_DEMON, (mode | u_mode), '\0');
                break;
        }
        case MS_S_UNDEAD:
@@ -880,7 +875,7 @@ static bool use_mane(int spell)
                if (!target_set(TARGET_KILL)) return FALSE;
                msg_print(_("アンデッドの強敵を召喚した!", "You summon an undead adversary!"));
                for (k = 0;k < 1; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_UNDEAD, (mode | u_mode));
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_UNDEAD, (mode | u_mode), '\0');
                break;
        }
        case MS_S_DRAGON:
@@ -889,7 +884,7 @@ static bool use_mane(int spell)
                if (!target_set(TARGET_KILL)) return FALSE;
                msg_print(_("ドラゴンを召喚した!", "You summon dragon!"));
                for (k = 0;k < 1; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_DRAGON, (mode | u_mode));
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_DRAGON, (mode | u_mode), '\0');
                break;
        }
        case MS_S_HI_UNDEAD:
@@ -897,8 +892,8 @@ static bool use_mane(int spell)
                int k;
                if (!target_set(TARGET_KILL)) return FALSE;
                msg_print(_("強力なアンデッドを召喚した!", "You summon greater undead!"));
-               for (k = 0;k < 6; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode));
+               for (k = 0;k < A_MAX; k++)
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode), '\0');
                break;
        }
        case MS_S_HI_DRAGON:
@@ -907,7 +902,7 @@ static bool use_mane(int spell)
                if (!target_set(TARGET_KILL)) return FALSE;
                msg_print(_("古代ドラゴンを召喚した!", "You summon ancient dragons!"));
                for (k = 0;k < 4; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_DRAGON, (mode | u_mode));
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_DRAGON, (mode | u_mode), '\0');
                break;
        }
        case MS_S_AMBERITE:
@@ -916,7 +911,7 @@ static bool use_mane(int spell)
                if (!target_set(TARGET_KILL)) return FALSE;
                msg_print(_("アンバーの王族を召喚した!", "You summon Lords of Amber!"));
                for (k = 0;k < 4; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE));
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE), '\0');
                break;
        }
        case MS_S_UNIQUE:
@@ -925,9 +920,9 @@ static bool use_mane(int spell)
                if (!target_set(TARGET_KILL)) return FALSE;
                msg_print(_("特別な強敵を召喚した!", "You summon special opponents!"));
                for (k = 0;k < 4; k++)
-                       if (summon_specific(-1, target_row, target_col, plev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE))) count++;
+                       if (summon_specific(-1, target_row, target_col, plev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE), '\0')) count++;
                for (k = count;k < 4; k++)
-                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode));
+                       summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode), '\0');
                break;
        }
        default: