OSDN Git Service

[Refactor] #38997 'while (1)' を 'while (TRUE)' に変更 / Changed 'while (1)' to 'while...
[hengband/hengband.git] / src / files.c
index f0ddc98..11c9abc 100644 (file)
@@ -5343,7 +5343,7 @@ bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAG
                msg_format(_("'%s'をオープンできません。", "Cannot open '%s'."), name);
                msg_print(NULL);
 
-               return (TRUE);
+               return TRUE;
        }
 
 
@@ -5418,7 +5418,7 @@ bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAG
                        /* Hack -- Re-Open the file */
                        fff = my_fopen(path, "r");
 
-                       if (!fff) return (FALSE);
+                       if (!fff) return FALSE;
 
                        /* File has been restarted */
                        next = 0;
@@ -5731,10 +5731,10 @@ bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAG
        my_fclose(fff);
 
        /* Escape */
-       if (skey == 'q') return (FALSE);
+       if (skey == 'q') return FALSE;
 
        /* Normal return */
-       return (TRUE);
+       return TRUE;
 }
 
 
@@ -5757,13 +5757,14 @@ void do_cmd_help(void)
 /*!
  * @brief プレイヤーの名前をチェックして修正する
  * Process the player name.
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @param sf セーブファイル名に合わせた修正を行うならばTRUE
  * @return なし
  * @details
  * Extract a clean "base name".
  * Build the savefile name if needed.
  */
-void process_player_name(bool sf)
+void process_player_name(player_type *creature_ptr, bool sf)
 {
        int i, k = 0;
        char old_player_base[32] = "";
@@ -5871,7 +5872,7 @@ void process_player_name(bool sf)
        {
                concptr s;
                s = savefile;
-               while (1)
+               while (TRUE)
                {
                        concptr t;
                        t = my_strstr(s, PATH_SEP);
@@ -5905,7 +5906,7 @@ void process_player_name(bool sf)
        /* Load an autopick preference file */
        if (current_world_ptr->character_generated)
        {
-               if (!streq(old_player_base, p_ptr->base_name)) autopick_load_pref(FALSE);
+               if (!streq(old_player_base, p_ptr->base_name)) autopick_load_pref(creature_ptr, FALSE);
        }
 }
 
@@ -5983,7 +5984,7 @@ void do_cmd_save_game(player_type *creature_ptr, int is_autosave)
 
        /* Clear messages */
        msg_print(NULL);
-       handle_stuff();
+       handle_stuff(creature_ptr);
 
        prt(_("ゲームをセーブしています...", "Saving game..."), 0, 0);
 
@@ -6366,7 +6367,7 @@ void show_info(player_type *creature_ptr)
                if (!o_ptr->k_idx) continue;
 
                /* Aware and Known */
-               object_aware(o_ptr);
+               object_aware(creature_ptr, o_ptr);
                object_known(o_ptr);
        }
 
@@ -6381,14 +6382,14 @@ void show_info(player_type *creature_ptr)
                        if (!o_ptr->k_idx) continue;
 
                        /* Aware and Known */
-                       object_aware(o_ptr);
+                       object_aware(creature_ptr, o_ptr);
                        object_known(o_ptr);
                }
        }
 
        /* Hack -- Recalculate bonuses */
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
+       handle_stuff(creature_ptr);
 
        /* Flush all input keys */
        flush();
@@ -6737,7 +6738,7 @@ static errr counts_seek(int fd, u32b where, bool flag)
                temp1[i] ^= (i+1) * 63;
 
        seekpoint = 0;
-       while (1)
+       while (TRUE)
        {
                if (fd_seek(fd, seekpoint + 3 * sizeof(u32b)))
                        return 1;