OSDN Git Service

[Refactor] #37353 bool型の返り値に付いていたカッコを除去 / Removed parenthesis from 'return (TRUE...
[hengband/hengband.git] / src / util.c
index dbe7365..c85fa8b 100644 (file)
@@ -1812,7 +1812,7 @@ void select_floor_music(player_type *player_ptr)
                if (!play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_WILD)) return;
        }
 
-       if(player_ptr->inside_arena)
+       if(player_ptr->current_floor_ptr->inside_arena)
        {
                if (!play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_ARENA)) return;
        }
@@ -1822,9 +1822,9 @@ void select_floor_music(player_type *player_ptr)
                if (!play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_BATTLE)) return;
        }
 
-       if(player_ptr->inside_quest)
+       if(player_ptr->current_floor_ptr->inside_quest)
        {
-               if (!play_music(TERM_XTRA_MUSIC_QUEST, player_ptr->inside_quest)) return;
+               if (!play_music(TERM_XTRA_MUSIC_QUEST, player_ptr->current_floor_ptr->inside_quest)) return;
                if (!play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_QUEST)) return;
        }
 
@@ -1842,11 +1842,11 @@ void select_floor_music(player_type *player_ptr)
                {
                        if (!play_music(TERM_XTRA_MUSIC_DUNGEON, player_ptr->dungeon_idx)) return;
 
-                       if (p_ptr->current_floor_ptr->dun_level < 40)
+                       if (player_ptr->current_floor_ptr->dun_level < 40)
                        {
                                if (!play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DUN_LOW)) return;
                        }
-                       else if (p_ptr->current_floor_ptr->dun_level < 80)
+                       else if (player_ptr->current_floor_ptr->dun_level < 80)
                        {
                                if (!play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DUN_MED)) return;
                        }
@@ -1864,7 +1864,7 @@ void select_floor_music(player_type *player_ptr)
                return;
        }
 
-       if(!p_ptr->current_floor_ptr->dun_level)
+       if(!player_ptr->current_floor_ptr->dun_level)
        {
                if (player_ptr->lev >= 45)
                {
@@ -3028,7 +3028,7 @@ void msg_print(concptr msg)
        /* if (current_world_ptr->character_generated) message_add(t); */
 
        p_ptr->window |= (PW_MESSAGE);
-       update_output();
+       update_output(p_ptr);
 
        /* Remember the message */
        msg_flag = TRUE;
@@ -3044,6 +3044,7 @@ void msg_print(concptr msg)
        if (fresh_message) Term_fresh();
 }
 
+
 void msg_print_wizard(int cheat_type, concptr msg)
 {
        if (!cheat_room && cheat_type == CHEAT_DUNGEON) return;
@@ -3063,6 +3064,7 @@ void msg_print_wizard(int cheat_type, concptr msg)
 
 }
 
+
 /*
  * Hack -- prevent "accidents" in "screen_save()" or "screen_load()"
  */
@@ -3074,7 +3076,7 @@ static int screen_depth = 0;
  *
  * This function must match exactly one call to "screen_load()".
  */
-void screen_save(void)
+void screen_save()
 {
        /* Hack -- Flush messages */
        msg_print(NULL);
@@ -3092,7 +3094,7 @@ void screen_save(void)
  *
  * This function must match exactly one call to "screen_save()".
  */
-void screen_load(void)
+void screen_load()
 {
        /* Hack -- Flush messages */
        msg_print(NULL);
@@ -3154,7 +3156,6 @@ void msg_format_wizard(int cheat_type, concptr fmt, ...)
 }
 
 
-
 /*
  * Display a string on the screen using an attribute.
  *
@@ -3731,15 +3732,15 @@ bool get_check_strict(concptr prompt, BIT_FLAGS mode)
        if (auto_more)
        {
                p_ptr->window |= PW_MESSAGE;
-               handle_stuff();
+               handle_stuff(p_ptr);
                num_more = 0;
        }
+
        msg_print(NULL);
 
        if (!rogue_like_commands)
                mode &= ~CHECK_OKAY_CANCEL;
 
-
        /* Hack -- Build a "useful" prompt */
        if (mode & CHECK_OKAY_CANCEL)
        {
@@ -3765,7 +3766,7 @@ bool get_check_strict(concptr prompt, BIT_FLAGS mode)
                /* HACK : Add the line to message buffer */
                message_add(buf);
                p_ptr->window |= (PW_MESSAGE);
-               handle_stuff();
+               handle_stuff(p_ptr);
        }
 
        /* Get an acceptable answer */
@@ -3850,11 +3851,11 @@ bool get_com(concptr prompt, char *command, bool z_escape)
        prt("", 0, 0);
 
        /* Handle "cancel" */
-       if (*command == ESCAPE) return (FALSE);
-       if (z_escape && ((*command == 'z') || (*command == 'Z'))) return (FALSE);
+       if (*command == ESCAPE) return FALSE;
+       if (z_escape && ((*command == 'z') || (*command == 'Z'))) return FALSE;
 
        /* Success */
-       return (TRUE);
+       return TRUE;
 }
 
 
@@ -4340,7 +4341,7 @@ static char inkey_from_menu(void)
                                        if (p_ptr->pclass == special_menu_info[hoge].jouken_naiyou) menu_name = special_menu_info[hoge].name;
                                        break;
                                case MENU_WILD:
-                                       if (!p_ptr->current_floor_ptr->dun_level && !p_ptr->inside_arena && !p_ptr->inside_quest)
+                                       if (!p_ptr->current_floor_ptr->dun_level && !p_ptr->current_floor_ptr->inside_arena && !p_ptr->current_floor_ptr->inside_quest)
                                        {
                                                if ((byte)p_ptr->wild_mode == special_menu_info[hoge].jouken_naiyou) menu_name = special_menu_info[hoge].name;
                                        }
@@ -4769,10 +4770,10 @@ bool is_a_vowel(int ch)
        case 'I':
        case 'O':
        case 'U':
-               return (TRUE);
+               return TRUE;
        }
 
-       return (FALSE);
+       return FALSE;
 }
 
 
@@ -4796,7 +4797,7 @@ static bool insert_str(char *buf, concptr target, concptr insert)
        buf = my_strstr(buf, target);
 
        /* No target found */
-       if (!buf) return (FALSE);
+       if (!buf) return FALSE;
 
        /* Be sure we have an insertion string */
        if (!insert) insert = "";
@@ -4828,7 +4829,7 @@ static bool insert_str(char *buf, concptr target, concptr insert)
        for (i = 0; i < i_len; ++i) buf[i] = insert[i];
 
        /* Successful operation */
-       return (TRUE);
+       return TRUE;
 }
 
 
@@ -4918,13 +4919,13 @@ void repeat_push(COMMAND_CODE what)
 bool repeat_pull(COMMAND_CODE *what)
 {
        /* All out of keys */
-       if (repeat__idx == repeat__cnt) return (FALSE);
+       if (repeat__idx == repeat__cnt) return FALSE;
 
        /* Grab the next key, advance */
        *what = repeat__key[repeat__idx++];
 
        /* Success */
-       return (TRUE);
+       return TRUE;
 }
 
 void repeat_check(void)