OSDN Git Service

[Fix] #37353 プロジェクトファイルとソース修正。 / Fix project file and sources.
[hengband/hengband.git] / src / snipe.c
index 462da5a..cdc48c3 100644 (file)
@@ -170,7 +170,7 @@ void display_snipe_list(void)
        int             i;
        int             y = 1;
        int             x = 1;
-       int             plev = p_ptr->lev;
+       PLAYER_LEVEL plev = p_ptr->lev;
        snipe_power     spell;
        char            psi_desc[80];
 
@@ -220,13 +220,13 @@ void display_snipe_list(void)
  * when you run it. It's probably easy to fix but I haven't tried,\n
  * sorry.\n
  */
-static int get_snipe_power(int *sn, bool only_browse)
+static int get_snipe_power(COMMAND_CODE *sn, bool only_browse)
 {
-       int             i;
+       COMMAND_CODE i;
        int             num = 0;
        int             y = 1;
        int             x = 20;
-       int             plev = p_ptr->lev;
+       PLAYER_LEVEL plev = p_ptr->lev;
        int             ask;
        char            choice;
        char            out_val[160];
@@ -234,8 +234,6 @@ static int get_snipe_power(int *sn, bool only_browse)
        snipe_power     spell;
        bool            flag, redraw;
 
-#ifdef ALLOW_REPEAT /* TNB */
-
        repeat_push(*sn);
 
        /* Assume cancelled */
@@ -253,8 +251,6 @@ static int get_snipe_power(int *sn, bool only_browse)
                }
        }
 
-#endif /* ALLOW_REPEAT -- TNB */
-
        /* Nothing chosen yet */
        flag = FALSE;
 
@@ -356,7 +352,7 @@ static int get_snipe_power(int *sn, bool only_browse)
                ask = isupper(choice);
 
                /* Lowercase */
-               if (ask) choice = tolower(choice);
+               if (ask) choice = (char)tolower(choice);
 
                /* Extract request */
                i = (islower(choice) ? A2I(choice) : -1);
@@ -394,7 +390,6 @@ static int get_snipe_power(int *sn, bool only_browse)
        /* Show choices */
        p_ptr->window |= (PW_SPELL);
 
-       /* Window stuff */
        window_stuff();
 
        /* Abort if needed */
@@ -403,12 +398,8 @@ static int get_snipe_power(int *sn, bool only_browse)
        /* Save the choice */
        (*sn) = i;
 
-#ifdef ALLOW_REPEAT /* TNB */
-
        repeat_push(*sn);
 
-#endif /* ALLOW_REPEAT -- TNB */
-
        /* Success */
        return (TRUE);
 }
@@ -567,7 +558,7 @@ static bool cast_sniper_spell(int spell)
  */
 void do_cmd_snipe(void)
 {
-       int             n = 0;
+       COMMAND_CODE n = 0;
        bool            cast;
 
 
@@ -602,13 +593,11 @@ void do_cmd_snipe(void)
 
        if (!cast) return;
 #if 0
-       /* Take a turn */
        p_ptr->energy_use = 100;
 #endif
        /* Redraw mana */
        p_ptr->redraw |= (PR_HP | PR_MANA);
 
-       /* Window stuff */
        p_ptr->window |= (PW_PLAYER);
        p_ptr->window |= (PW_SPELL);
 }
@@ -619,7 +608,7 @@ void do_cmd_snipe(void)
  */
 void do_cmd_snipe_browse(void)
 {
-       int n = 0;
+       COMMAND_CODE n = 0;
        int j, line;
        char temp[62 * 4];