OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
[hengband/hengband.git] / src / files.c
index 20f7423..f27b2da 100644 (file)
@@ -603,7 +603,6 @@ errr process_pref_file_command(char *buf)
                        /* Find the colon */
                        char *t = my_strchr(buf + 2, ':');
 
-                       /* Oops */
                        if (!t) return 1;
 
                        /* Nuke the colon */
@@ -792,7 +791,6 @@ cptr process_pref_file_expr(char **sp, char *fp)
                /* First */
                t = process_pref_file_expr(&s, &f);
 
-               /* Oops */
                if (!*t)
                {
                        /* Nothing */
@@ -880,7 +878,6 @@ cptr process_pref_file_expr(char **sp, char *fp)
                        }
                }
 
-               /* Oops */
                else
                {
                        while (*s && (f != b2))
@@ -1039,8 +1036,6 @@ cptr process_pref_file_expr(char **sp, char *fp)
 
        /* Save */
        (*sp) = s;
-
-       /* Result */
        return (v);
 }
 
@@ -1123,8 +1118,6 @@ static errr process_pref_file_aux(cptr name, int preftype)
 
                        /* Set flag */
                        bypass = (streq(v, "0") ? TRUE : FALSE);
-
-                       /* Continue */
                        continue;
                }
 
@@ -1159,8 +1152,6 @@ static errr process_pref_file_aux(cptr name, int preftype)
 
                        /* Set back depth level */
                        depth_count--;
-
-                       /* Continue */
                        continue;
                }
 
@@ -1191,8 +1182,6 @@ static errr process_pref_file_aux(cptr name, int preftype)
 
        /* Close the file */
        my_fclose(fp);
-
-       /* Result */
        return (err);
 }
 
@@ -1472,7 +1461,6 @@ errr check_load_init(void)
                /* Use that value */
                check_load_value = value;
 
-               /* Done */
                break;
        }
 
@@ -3826,7 +3814,6 @@ void display_player(BIT_FLAGS mode)
        char    tmp[64];
 
 
-       /* XXX XXX XXX */
        if ((p_ptr->muta1 || p_ptr->muta2 || p_ptr->muta3) && display_mutations)
                mode = (mode % 5);
        else
@@ -4366,7 +4353,7 @@ static void dump_aux_class_special(FILE *fff)
                char s[EATER_EXT][MAX_NLEN];
                OBJECT_TYPE_VALUE tval;
                int ext;
-               IDX k_idx;
+               KIND_OBJECT_IDX k_idx;
                OBJECT_SUBTYPE_VALUE i;
                int magic_num;
 
@@ -5021,7 +5008,7 @@ errr make_character_dump(FILE *fff)
  * @param name 出力ファイル名
  * @return エラーコード
  * @details
- * XXX XXX XXX Allow the "full" flag to dump additional info,
+ * Allow the "full" flag to dump additional info,
  * and trigger its usage from various places in the code.
  */
 errr file_character(cptr name)
@@ -5060,7 +5047,6 @@ errr file_character(cptr name)
        /* Invalid file */
        if (!fff)
        {
-               /* Message */
                prt(_("キャラクタ情報のファイルへの書き出しに失敗しました!", "Character dump failed!"), 0, 0);
 
                (void)inkey();
@@ -5075,7 +5061,6 @@ errr file_character(cptr name)
        my_fclose(fff);
 
 
-       /* Message */
        msg_print(_("キャラクタ情報のファイルへの書き出しに成功しました。", "Character dump successful."));
        msg_print(NULL);
 
@@ -5318,7 +5303,7 @@ bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode
        /* Redirect the name */
        name = filename;
 
-       /* Hack XXX XXX XXX */
+       /* Hack */
        if (what)
        {
                /* Caption */
@@ -5374,14 +5359,11 @@ bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode
                fff = my_fopen(path, "r");
        }
 
-       /* Oops */
        if (!fff)
        {
-               /* Message */
                msg_format(_("'%s'をオープンできません。", "Cannot open '%s'."), name);
                msg_print(NULL);
 
-               /* Oops */
                return (TRUE);
        }
 
@@ -5460,7 +5442,6 @@ bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode
                        /* Hack -- Re-Open the file */
                        fff = my_fopen(path, "r");
 
-                       /* Oops */
                        if (!fff) return (FALSE);
 
                        /* File has been restarted */
@@ -5746,7 +5727,6 @@ bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode
 
                        ffp = my_fopen(buff, "w");
 
-                       /* Oops */
                        if (!(fff && ffp))
                        {
                                msg_print(_("ファイルを開けません。", "Failed to open file."));
@@ -5798,13 +5778,10 @@ bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode
  */
 void do_cmd_help(void)
 {
-       /* Save screen */
        screen_save();
 
        /* Peruse the main help file */
        (void)show_file(TRUE, _("jhelp.hlp", "help.hlp"), NULL, 0, 0);
-
-       /* Load screen */
        screen_load();
 }
 
@@ -5976,7 +5953,7 @@ void process_player_name(bool sf)
  * Assumes that "display_player(0)" has just been called
  * Perhaps we should NOT ask for a name (at "birth()") on
  * Unix machines?  XXX XXX
- * What a horrible name for a global function.  XXX XXX XXX
+ * What a horrible name for a global function.  
  * </pre>
  */
 void get_name(void)
@@ -6118,17 +6095,13 @@ void do_cmd_save_game(int is_autosave)
        }
        else
        {
-               /* Disturb the player */
-               disturb(1, 1);
+               disturb(TRUE, TRUE);
        }
 
        /* Clear messages */
        msg_print(NULL);
-
-       /* Handle stuff */
        handle_stuff();
 
-       /* Message */
        prt(_("ゲームをセーブしています...", "Saving game..."), 0, 0);
 
        /* Refresh */
@@ -6164,7 +6137,6 @@ void do_cmd_save_game(int is_autosave)
        /* HACK -- don't get sanity blast on updating view */
        is_loading_now = FALSE;
 
-       /* Update stuff */
        update_stuff();
 
        /* Initialize monster process */
@@ -6304,7 +6276,7 @@ static void make_bones(void)
                {
                        char tmp[128];
 
-                       /* XXX XXX XXX "Bones" name */
+                       /* "Bones" name */
                        sprintf(tmp, "bone.%03d", dun_level);
 
                        /* Build the filename */
@@ -6610,8 +6582,6 @@ static void show_info(void)
 
        /* Hack -- Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
 
        /* Flush all input keys */
@@ -6641,14 +6611,10 @@ static void show_info(void)
 
                /* Return means "show on screen" */
                if (!out_val[0]) break;
-
-               /* Save screen */
                screen_save();
 
                /* Dump a character file */
                (void)file_character(out_val);
-
-               /* Load screen */
                screen_load();
        }
 
@@ -6811,8 +6777,6 @@ void close_game(void)
        bool do_send = TRUE;
 
 /*     cptr p = "[i:キャラクタの情報, f:ファイル書き出し, t:スコア, x:*鑑定*, ESC:ゲーム終了]"; */
-
-       /* Handle stuff */
        handle_stuff();
 
        /* Flush the messages */
@@ -6897,7 +6861,7 @@ void close_game(void)
                /* Save the game */
                do_cmd_save_game(FALSE);
 
-               /* Prompt for scores XXX XXX XXX */
+               /* Prompt for scores */
                prt(_("リターンキーか ESC キーを押して下さい。", "Press Return (or Escape)."), 0, 40);
                play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_EXIT);
 
@@ -6944,7 +6908,7 @@ void exit_game_panic(void)
        prt("", 0, 0);
 
        /* Hack -- turn off some things */
-       disturb(1, 1);
+       disturb(TRUE, TRUE);
 
        /* Mega-Hack -- Delay death */
        if (p_ptr->chp < 0) p_ptr->is_dead = FALSE;
@@ -7121,8 +7085,6 @@ errr process_autopick_file(cptr name)
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, name);
 
        err = process_pref_file_aux(buf, PREF_TYPE_AUTOPICK);
-
-       /* Result */
        return (err);
 }
 
@@ -7149,8 +7111,6 @@ errr process_histpref_file(cptr name)
        err = process_pref_file_aux(buf, PREF_TYPE_HISTPREF);
 
        character_xtra = old_character_xtra;
-
-       /* Result */
        return (err);
 }
 
@@ -7423,7 +7383,6 @@ static void handle_signal_simple(int sig)
                /* Display the cause */
                Term_putstr(0, 0, -1, TERM_WHITE, _("熟慮の上の自殺!", "Contemplating suicide!"));
 
-               /* Flush */
                Term_fresh();
        }
 
@@ -7482,7 +7441,6 @@ static void handle_signal_abort(int sig)
        _("恐ろしいソフトのバグが飛びかかってきた!", "A gruesome software bug LEAPS out at you!"));
 
 
-       /* Message */
        Term_putstr(45, hgt - 1, -1, TERM_RED, _("緊急セーブ...", "Panic save..."));
 
        do_cmd_write_nikki(NIKKI_GAMESTART, 0, _("----ゲーム異常終了----", "---- Panic Save and Abort Game ----"));