OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement.
[hengband/hengband.git] / src / cmd4.c
index 1506b5f..460a0cb 100644 (file)
@@ -983,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 */
@@ -998,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();
@@ -1020,8 +1017,6 @@ void do_cmd_redraw(void)
 
                /* Activate */
                Term_activate(angband_term[j]);
-
-               /* Redraw */
                Term_redraw();
 
                /* Refresh */
@@ -1108,7 +1103,6 @@ void do_cmd_change_name(void)
                        mode++;
                }
 
-               /* Oops */
                else
                {
                        bell();
@@ -1135,7 +1129,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);
 }
 
@@ -1172,7 +1166,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 */
@@ -1235,7 +1228,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);
@@ -1269,7 +1262,6 @@ void do_cmd_messages(int num_now)
                        }
                        else strcpy(shower_str, back_str);
 
-                       /* Okay */
                        continue;
 
                /* Hack -- handle find */
@@ -1401,7 +1393,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);
@@ -1539,11 +1531,9 @@ static s16b toggle_frequency(s16b current)
  */
 static void do_cmd_options_autosave(cptr info)
 {
-       char    ch;
-
-       int     i, k = 0, n = 2;
-
-       char    buf[80];
+       char ch;
+       int i, k = 0, n = 2;
+       char buf[80];
 
 
        /* Clear screen */
@@ -1552,7 +1542,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);
 
@@ -1568,9 +1558,9 @@ static void do_cmd_options_autosave(cptr info)
 
                        /* Display the option text */
                        sprintf(buf, "%-48s: %s (%s)",
-                           autosave_info[i].o_desc,
-                           (*autosave_info[i].o_var ? _("はい  ", "yes") : _("いいえ", "no ")),
-                           autosave_info[i].o_text);
+                               autosave_info[i].o_desc,
+                               (*autosave_info[i].o_var ? _("はい  ", "yes") : _("いいえ", "no ")),
+                               autosave_info[i].o_text);
                        c_prt(a, buf, i + 2, 0);
                }
                prt(format(_("自動セーブの頻度: %d ターン毎", "Timed autosave frequency: every %d turns"),  autosave_freq), 5, 0);
@@ -1676,7 +1666,6 @@ void do_cmd_options_aux(int page, cptr info)
                if (option_info[i].o_page == page) opt[n++] = i;
        }
 
-
        /* Clear screen */
        Term_clear();
 
@@ -1685,7 +1674,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);
@@ -1829,7 +1818,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 */
@@ -2309,7 +2298,6 @@ void do_cmd_options(void)
                        /* Unknown option */
                        default:
                        {
-                               /* Oops */
                                bell();
                                break;
                        }
@@ -2334,7 +2322,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)
 {
@@ -2433,7 +2421,6 @@ static void do_cmd_macro_aux(char *buf)
        int n = 0;
        char tmp[1024];
 
-       /* Flush */
        flush();
 
        /* Do not process macros */
@@ -2461,10 +2448,8 @@ static void do_cmd_macro_aux(char *buf)
        /* Terminate */
        buf[n] = '\0';
 
-       /* Flush */
        flush();
 
-
        /* Convert the trigger */
        ascii_to_text(tmp, buf);
 
@@ -2482,31 +2467,25 @@ 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)
 {
        char tmp[1024];
 
-
-       /* Flush */
        flush();
 
-
        /* Get a key */
        buf[0] = inkey();
        buf[1] = '\0';
 
-
        /* Convert to ascii */
        ascii_to_text(tmp, buf);
 
        /* Hack -- display the trigger */
        Term_addstr(-1, TERM_WHITE, tmp);
 
-
-       /* Flush */
        flush();
 }
 
@@ -2593,7 +2572,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)
@@ -2622,8 +2601,6 @@ void do_cmd_macros(void)
        /* File type is "TEXT" */
        FILE_TYPE(FILE_TYPE_TEXT);
 
-
-       /* Save screen */
        screen_save();
 
 
@@ -2632,8 +2609,6 @@ void do_cmd_macros(void)
        {
                /* Clear screen */
                Term_clear();
-
-               /* Describe */
                prt(_("[ マクロの設定 ]", "Interact with Macros"), 2, 0);
 
                /* Describe that action */
@@ -2982,18 +2957,14 @@ void do_cmd_macros(void)
 
 #endif /* ALLOW_MACROS */
 
-               /* Oops */
                else
                {
-                       /* Oops */
                        bell();
                }
 
                /* Flush messages */
                msg_print(NULL);
        }
-
-       /* Load screen */
        screen_load();
 }
 
@@ -4678,7 +4649,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);
@@ -4985,7 +4955,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);
@@ -5200,7 +5169,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);
@@ -5435,8 +5403,6 @@ static void do_cmd_knowledge_artifacts(void)
                        for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
                        {
                                object_type *o_ptr;
-
-                               /* Acquire object */
                                o_ptr = &o_list[this_o_idx];
 
                                /* Acquire next object */
@@ -5500,8 +5466,6 @@ static void do_cmd_knowledge_artifacts(void)
                {
                        object_type forge;
                        object_type *q_ptr;
-
-                       /* Get local object */
                        q_ptr = &forge;
 
                        /* Create fake object */
@@ -5566,9 +5530,9 @@ static void do_cmd_knowledge_uniques(void)
 
        if (!fff)
        {
-           msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name);
-           msg_print(NULL);
-           return;
+               msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name);
+               msg_print(NULL);
+               return;
        }
 
        /* Allocate the "who" array */
@@ -5648,7 +5612,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);
        }
 
@@ -6056,7 +6019,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)
 {
@@ -6151,9 +6114,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++;
                        }
                }
@@ -6200,8 +6161,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
 
 
@@ -6232,8 +6192,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;
 
@@ -6290,7 +6249,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;
@@ -6668,7 +6626,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;
@@ -6829,8 +6786,6 @@ static void do_cmd_knowledge_monsters(bool *need_redraw, bool visual_only, IDX d
                {
                        /* Mega Hack -- track this monster race */
                        if (mon_cnt) monster_race_track(mon_idx[mon_cur]);
-
-                       /* Hack -- handle stuff */
                        handle_stuff();
                }
 
@@ -6991,11 +6946,7 @@ static void desc_obj_fake(KIND_OBJECT_IDX k_idx)
 {
        object_type *o_ptr;
        object_type object_type_body;
-
-       /* Get local object */
        o_ptr = &object_type_body;
-
-       /* Wipe the object */
        object_wipe(o_ptr);
 
        /* Create the artifact */
@@ -7009,8 +6960,6 @@ static void desc_obj_fake(KIND_OBJECT_IDX k_idx)
 
        /* Hack - mark as fake */
        /* term_obj_real = FALSE; */
-
-       /* Hack -- Handle stuff */
        handle_stuff();
 
        if (!screen_object(o_ptr, SCROBJ_FAKE_OBJECT | SCROBJ_FORCE_DETAIL))
@@ -7049,7 +6998,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;
@@ -7239,7 +7187,6 @@ static void do_cmd_knowledge_objects(bool *need_redraw, bool visual_only, IDX di
                        /* The "current" object changed */
                        if (object_old != object_idx[object_cur])
                        {
-                               /* Hack -- handle stuff */
                                handle_stuff();
 
                                /* Remember the "current" object */
@@ -7417,7 +7364,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;
@@ -8449,7 +8395,7 @@ static void do_cmd_knowledge_autopick(void)
                {
                        tmp = _("拾う", "Pickup");
                }
-               else /* if (act & DO_QUERY_AUTOPICK) */ /* Obvious */
+               else
                {
                        tmp = _("確認", "Query");
                }
@@ -8728,7 +8674,6 @@ void do_cmd_time(void)
        /* Open this file */
        fff = my_fopen(buf, "rt");
 
-       /* Oops */
        if (!fff) return;
 
        /* Find this time */