OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
[hengband/hengband.git] / src / cmd4.c
index 2982869..c1fa564 100644 (file)
@@ -918,7 +918,6 @@ void do_cmd_nikki(void)
                /* Prompt */
                i = inkey();
 
-               /* Done */
                if (i == ESCAPE) break;
 
                switch (i)
@@ -984,7 +983,6 @@ void do_cmd_redraw(void)
        /* Update torch */
        p_ptr->update |= (PU_TORCH);
 
-       /* Update stuff */
        p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
 
        /* Forget lite/view */
@@ -999,10 +997,8 @@ void do_cmd_redraw(void)
        /* Redraw everything */
        p_ptr->redraw |= (PR_WIPE | PR_BASIC | PR_EXTRA | PR_MAP | PR_EQUIPPY);
 
-       /* Window stuff */
        p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER);
 
-       /* Window stuff */
        p_ptr->window |= (PW_MESSAGE | PW_OVERHEAD | PW_DUNGEON | PW_MONSTER | PW_OBJECT);
 
        update_playtime();
@@ -1109,7 +1105,6 @@ void do_cmd_change_name(void)
                        mode++;
                }
 
-               /* Oops */
                else
                {
                        bell();
@@ -1136,7 +1131,7 @@ void do_cmd_change_name(void)
  */
 void do_cmd_message_one(void)
 {
-       /* Recall one message XXX XXX XXX */
+       /* Recall one message */
        prt(format("> %s", message_str(0)), 0, 0);
 }
 
@@ -1173,7 +1168,6 @@ void do_cmd_messages(int num_now)
        int wid, hgt;
        int num_lines;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        /* Number of message lines in a screen */
@@ -1236,7 +1230,7 @@ void do_cmd_messages(int num_now)
                        Term_erase(0, num_lines + 1 - j, 255);
                }
 
-               /* Display header XXX XXX XXX */
+               /* Display header */
                /* translation */
                prt(format(_("以前のメッセージ %d-%d 全部で(%d)", "Message Recall (%d-%d of %d)"),
                           i, i + j - 1, n), 0, 0);
@@ -1270,7 +1264,6 @@ void do_cmd_messages(int num_now)
                        }
                        else strcpy(shower_str, back_str);
 
-                       /* Okay */
                        continue;
 
                /* Hack -- handle find */
@@ -1309,7 +1302,6 @@ void do_cmd_messages(int num_now)
                                                /* New location */
                                                i = z;
 
-                                               /* Done */
                                                break;
                                        }
                                }
@@ -1403,7 +1395,7 @@ static void do_cmd_options_cheat(cptr info)
        {
                DIRECTION dir;
 
-               /* Prompt XXX XXX XXX */
+               /* Prompt */
                sprintf(buf, _("%s ( リターンで次へ, y/n でセット, ESC で決定 )", "%s (RET to advance, y/n to set, ESC to accept) "), info);
 
                prt(buf, 0, 0);
@@ -1554,7 +1546,7 @@ static void do_cmd_options_autosave(cptr info)
        /* Interact with the player */
        while (TRUE)
        {
-               /* Prompt XXX XXX XXX */
+               /* Prompt */
                sprintf(buf, _("%s ( リターンで次へ, y/n でセット, F で頻度を入力, ESC で決定 ) ", 
                                           "%s (RET to advance, y/n to set, 'F' for frequency, ESC to accept) "), info);
 
@@ -1687,7 +1679,7 @@ void do_cmd_options_aux(int page, cptr info)
        {
                DIRECTION dir;
 
-               /* Prompt XXX XXX XXX */
+               /* Prompt */
                sprintf(buf, _("%s (リターン:次, %sESC:終了, ?:ヘルプ) ", "%s (RET:next, %s, ?:help) "),
                                        info, browse_only ? _("", "ESC:exit") : _("y/n:変更, ", "y/n:change, ESC:accept"));
                prt(buf, 0, 0);
@@ -1831,7 +1823,7 @@ static void do_cmd_options_win(void)
        /* Interact */
        while (go)
        {
-               /* Prompt XXX XXX XXX */
+               /* Prompt */
                prt(_("ウィンドウ・フラグ (<方向>で移動, tでチェンジ, y/n でセット, ESC)", "Window Flags (<dir>, t, y, n, ESC) "), 0, 0);
 
                /* Display the windows */
@@ -2043,8 +2035,8 @@ option_fields[OPT_NUM] =
 void do_cmd_options(void)
 {
        char k;
-       int i, d, skey;
-       int y = 0;
+       int d, skey;
+       TERM_LEN i, y = 0;
 
        /* Save the screen */
        screen_save();
@@ -2311,7 +2303,6 @@ void do_cmd_options(void)
                        /* Unknown option */
                        default:
                        {
-                               /* Oops */
                                bell();
                                break;
                        }
@@ -2336,7 +2327,7 @@ void do_cmd_options(void)
  * Ask for a "user pref line" and process it
  * @return なし
  * @details
- * XXX XXX XXX Allow absolute file names?
+ * Allow absolute file names?
  */
 void do_cmd_pref(void)
 {
@@ -2484,7 +2475,7 @@ static void do_cmd_macro_aux(char *buf)
  * @details
  * <pre>
  * Note that both "flush()" calls are extremely important.  This may
- * no longer be true, since "util.c" is much simpler now.  XXX XXX XXX
+ * no longer be true, since "util.c" is much simpler now.  
  * </pre>
  */
 static void do_cmd_macro_aux_keymap(char *buf)
@@ -2595,7 +2586,7 @@ static errr keymap_dump(cptr fname)
  * <pre>
  * Note that the macro "action" must be defined before the trigger.
  *
- * Could use some helpful instructions on this page.  XXX XXX XXX
+ * Could use some helpful instructions on this page.  
  * </pre>
  */
 void do_cmd_macros(void)
@@ -2984,10 +2975,8 @@ void do_cmd_macros(void)
 
 #endif /* ALLOW_MACROS */
 
-               /* Oops */
                else
                {
-                       /* Oops */
                        bell();
                }
 
@@ -3112,7 +3101,6 @@ void do_cmd_visuals(void)
                /* Prompt */
                i = inkey();
 
-               /* Done */
                if (i == ESCAPE) break;
 
                switch (i)
@@ -3184,7 +3172,6 @@ void do_cmd_visuals(void)
                        /* Close */
                        close_auto_dump();
 
-                       /* Message */
                        msg_print(_("モンスターの[色/文字]をファイルに書き出しました。", "Dumped monster attr/chars."));
 
                        break;
@@ -3253,7 +3240,6 @@ void do_cmd_visuals(void)
                        /* Close */
                        close_auto_dump();
 
-                       /* Message */
                        msg_print(_("アイテムの[色/文字]をファイルに書き出しました。", "Dumped object attr/chars."));
 
                        break;
@@ -3309,7 +3295,6 @@ void do_cmd_visuals(void)
                        /* Close */
                        close_auto_dump();
 
-                       /* Message */
                        msg_print(_("地形の[色/文字]をファイルに書き出しました。", "Dumped feature attr/chars."));
 
                        break;
@@ -3639,7 +3624,6 @@ void do_cmd_visuals(void)
                        /* Reset */
                        reset_visuals();
 
-                       /* Message */
                        msg_print(_("画面上の[色/文字]を初期値にリセットしました。", "Visual attr/char tables reset."));
                        need_redraw = TRUE;
                        break;
@@ -3703,7 +3687,6 @@ void do_cmd_colors(void)
                /* Prompt */
                i = inkey();
 
-               /* Done */
                if (i == ESCAPE) break;
 
                /* Load a 'pref' file */
@@ -3786,7 +3769,6 @@ void do_cmd_colors(void)
                        /* Close */
                        close_auto_dump();
 
-                       /* Message */
                        msg_print(_("カラーの設定をファイルに書き出しました。", "Dumped color redefinitions."));
                }
 
@@ -4687,7 +4669,6 @@ void do_cmd_load_screen(void)
        /* Append to the file */
        fff = my_fopen(buf, "r");
 
-       /* Oops */
        if (!fff) {
                msg_format(_("%s を開くことができませんでした。", "Failed to open %s."), buf);
                msg_print(NULL);
@@ -4763,7 +4744,6 @@ void do_cmd_load_screen(void)
        my_fclose(fff);
 
 
-       /* Message */
        prt(_("ファイルに書き出された画面(記念撮影)をロードしました。", "Screen dump loaded."), 0, 0);
 
        flush();
@@ -4995,7 +4975,6 @@ void do_cmd_save_screen_html_aux(char *filename, int message)
        /* Append to the file */
        fff = my_fopen(filename, "w");
 
-       /* Oops */
        if (!fff) {
                if (message) {
                    msg_format(_("ファイル %s を開けませんでした。", "Failed to open file %s."), filename);
@@ -5101,7 +5080,6 @@ void do_cmd_save_screen_html_aux(char *filename, int message)
        /* Close it */
        my_fclose(fff);
 
-       /* Message */
        if (message) {
                msg_print(_("画面(記念撮影)をファイルに書き出しました。", "Screen dump saved."));
                msg_print(NULL);
@@ -5211,7 +5189,6 @@ void do_cmd_save_screen(void)
                /* Append to the file */
                fff = my_fopen(buf, "w");
 
-               /* Oops */
                if (!fff)
                {
                        msg_format(_("ファイル %s を開けませんでした。", "Failed to open file %s."), buf);
@@ -5275,7 +5252,6 @@ void do_cmd_save_screen(void)
                /* Close it */
                my_fclose(fff);
 
-               /* Message */
                msg_print(_("画面(記念撮影)をファイルに書き出しました。", "Screen dump saved."));
                msg_print(NULL);
 
@@ -5660,7 +5636,6 @@ static void do_cmd_knowledge_uniques(void)
        {
                monster_race *r_ptr = &r_info[who[k]];
 
-               /* Print a message */
                fprintf(fff, _("     %s (レベル%d)\n", "     %s (level %d)\n"), r_name + r_ptr->name, (int)r_ptr->level);
        }
 
@@ -6068,7 +6043,7 @@ static void do_cmd_knowledge_pets(void)
  * @brief 現在のペットを表示するコマンドのメインルーチン /
  * Total kill count
  * @return なし
- * @note the player ghosts are ignored.  XXX XXX XXX
+ * @note the player ghosts are ignored.  
  */
 static void do_cmd_knowledge_kill_count(void)
 {
@@ -6163,9 +6138,7 @@ static void do_cmd_knowledge_kill_count(void)
 
                        if (dead)
                        {
-                               /* Print a message */
-                               fprintf(fff, "     %s\n",
-                                   (r_name + r_ptr->name));
+                               fprintf(fff, "     %s\n", (r_name + r_ptr->name));
                                Total++;
                        }
                }
@@ -6212,8 +6185,7 @@ static void do_cmd_knowledge_kill_count(void)
 #ifdef JP
        fprintf(fff,"    合計: %lu 体を倒した。\n", (unsigned long int)Total);
 #else
-       fprintf(fff,"   Total: %lu creature%s killed.\n",
-               (unsigned long int)Total, (Total == 1 ? "" : "s"));
+       fprintf(fff,"   Total: %lu creature%s killed.\n", (unsigned long int)Total, (Total == 1 ? "" : "s"));
 #endif
 
 
@@ -6244,8 +6216,7 @@ static void do_cmd_knowledge_kill_count(void)
  * @param grp_top 現在の選択リスト最上部ID
  * @return なし
  */
-static void display_group_list(int col, int row, int wid, int per_page,
-       IDX grp_idx[], cptr group_text[], int grp_cur, int grp_top)
+static void display_group_list(int col, int row, int wid, int per_page, IDX grp_idx[], cptr group_text[], int grp_cur, int grp_top)
 {
        int i;
 
@@ -6302,7 +6273,6 @@ static void browser_cursor(char ch, int *column, IDX *grp_cur, int grp_cnt,
                int browser_rows;
                int wid, hgt;
 
-               /* Get size */
                Term_get_size(&wid, &hgt);
 
                browser_rows = hgt - 8;
@@ -6680,7 +6650,6 @@ static void do_cmd_knowledge_monsters(bool *need_redraw, bool visual_only, IDX d
 
        BIT_FLAGS8 mode;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        browser_rows = hgt - 8;
@@ -7061,7 +7030,6 @@ static void do_cmd_knowledge_objects(bool *need_redraw, bool visual_only, IDX di
 
        byte mode;
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        browser_rows = hgt - 8;
@@ -7429,7 +7397,6 @@ static void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX d
        (void)C_WIPE(attr_old, F_LIT_MAX, byte);
        (void)C_WIPE(char_old, F_LIT_MAX, byte);
 
-       /* Get size */
        Term_get_size(&wid, &hgt);
 
        browser_rows = hgt - 8;
@@ -8587,7 +8554,6 @@ void do_cmd_knowledge(void)
                /* Prompt */
                i = inkey();
 
-               /* Done */
                if (i == ESCAPE) break;
                switch (i)
                {
@@ -8717,7 +8683,6 @@ void do_cmd_time(void)
        if (day < MAX_DAYS) sprintf(day_buf, "%d", day);
        else strcpy(day_buf, "*****");
 
-       /* Message */
 #ifdef JP
        msg_format("%s日目, 時刻は%d:%02d %sです。",
                   day_buf, (hour % 12 == 0) ? 12 : (hour % 12),
@@ -8742,7 +8707,6 @@ void do_cmd_time(void)
        /* Open this file */
        fff = my_fopen(buf, "rt");
 
-       /* Oops */
        if (!fff) return;
 
        /* Find this time */
@@ -8793,7 +8757,6 @@ void do_cmd_time(void)
                }
        }
 
-       /* Message */
        msg_print(desc);
 
        /* Close the file */