OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
[hengband/hengband.git] / src / xtra2.c
index 0dad02e..de4704b 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "angband.h"
 #include "cmd-pet.h"
+#include "object-curse.h"
 
 #define REWARD_CHANCE 10
 
@@ -66,7 +67,6 @@ void check_experience(void)
                /* Redraw some stuff */
                p_ptr->redraw |= (PR_LEV | PR_TITLE);
 
-               /* Window stuff */
                p_ptr->window |= (PW_PLAYER);
 
                /* Handle stuff */
@@ -110,7 +110,6 @@ void check_experience(void)
                /* Redraw some stuff */
                p_ptr->redraw |= (PR_LEV | PR_TITLE | PR_EXP);
 
-               /* Window stuff */
                p_ptr->window |= (PW_PLAYER | PW_SPELL | PW_INVEN);
 
                /* HPとMPの上昇量を表示 */
@@ -203,7 +202,6 @@ void check_experience(void)
                /* Redraw some stuff */
                p_ptr->redraw |= (PR_LEV | PR_TITLE);
 
-               /* Window stuff */
                p_ptr->window |= (PW_PLAYER | PW_SPELL);
 
                /* Handle stuff */
@@ -222,7 +220,7 @@ void check_experience(void)
  * @details
  * Hack -- Return the "automatic coin type" of a monster race
  * Used to allocate proper treasure when "Creeping coins" die
- * XXX XXX XXX Note the use of actual "monster names"
+ * Note the use of actual "monster names"
  */
 static int get_coin_type(MONRACE_IDX r_idx)
 {
@@ -1352,7 +1350,6 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
                        /* Make some gold */
                        if (!make_gold(q_ptr)) continue;
 
-                       /* XXX XXX XXX */
                        dump_gold++;
                }
 
@@ -1362,7 +1359,6 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
                        /* Make an object */
                        if (!make_object(q_ptr, mo_mode)) continue;
 
-                       /* XXX XXX XXX */
                        dump_item++;
                }
 
@@ -1563,7 +1559,7 @@ static void get_exp_from_mon(HIT_POINT dam, monster_type *m_ptr)
  * Made name, sex, and capitalization generic -BEN-
  * As always, the "ghost" processing is a total hack.
  * Hack -- we "delay" fear messages by passing around a "fear" flag.
- * XXX XXX XXX Consider decreasing monster experience over time, say,
+ * Consider decreasing monster experience over time, say,
  * by using "(m_exp * m_lev * (m_lev)) / (p_lev * (m_lev + n_killed))"
  * instead of simply "(m_exp * m_lev) / (p_lev)", to make the first
  * monster worth more than subsequent monsters.  This would also need
@@ -1933,7 +1929,7 @@ msg_format("%sを葬り去った。", m_name);
 
                        if (is_pet(m_ptr)) mode |= PM_FORCE_PET;
 
-                       /* Delete the monster */
+
                        delete_monster_idx(m_idx);
 
                        if (summon_named_creature(0, dummy_y, dummy_x, MON_BIKETAL, mode))
@@ -1943,7 +1939,7 @@ msg_format("%sを葬り去った。", m_name);
                }
                else
                {
-                       /* Delete the monster */
+
                        delete_monster_idx(m_idx);
                }
 
@@ -1986,7 +1982,7 @@ msg_format("%sを葬り去った。", m_name);
                        /* Hack -- note fear */
                        (*fear) = TRUE;
 
-                       /* XXX XXX XXX Hack -- Add some timed fear */
+                       /* Hack -- Add some timed fear */
                        (void)set_monster_monfear(m_idx, (randint1(10) +
                                          (((dam >= m_ptr->hp) && (percentage > 7)) ?
                                           20 : ((11 - percentage) * 5))));
@@ -2041,7 +2037,6 @@ void panel_bounds_center(void)
 {
        int wid, hgt;
 
-       /* Get size */
        get_screen_size(&wid, &hgt);
 
        panel_row_max = panel_row_min + hgt - 1;
@@ -2071,7 +2066,6 @@ void resize_map(void)
                                
        verify_panel();
 
-       /* Update stuff */
        p_ptr->update |= (PU_TORCH | PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
 
        /* Forget lite/view */
@@ -2112,10 +2106,8 @@ void redraw_window(void)
        /* Only if the dungeon exists */
        if (!character_dungeon) return;
 
-       /* 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);
 
        /* Hack -- update */
@@ -2140,7 +2132,6 @@ bool change_panel(POSITION dy, POSITION dx)
        POSITION y, x;
        TERM_LEN wid, hgt;
 
-       /* Get size */
        get_screen_size(&wid, &hgt);
 
        /* Apply the motion */
@@ -2165,7 +2156,6 @@ bool change_panel(POSITION dy, POSITION dx)
                /* Recalculate the boundaries */
                panel_bounds_center();
 
-               /* Update stuff */
                p_ptr->update |= (PU_MONSTERS);
 
                /* Redraw map */
@@ -2197,7 +2187,6 @@ static bool change_panel_xy(POSITION y, POSITION x)
        POSITION dy = 0, dx = 0;
        TERM_LEN wid, hgt;
 
-       /* Get size */
        get_screen_size(&wid, &hgt);
 
        if (y < panel_row_min) dy = -1;
@@ -2231,7 +2220,6 @@ void verify_panel(void)
        int max_prow_min;
        int max_pcol_min;
 
-       /* Get size */
        get_screen_size(&wid, &hgt);
 
        max_prow_min = cur_hgt - hgt;
@@ -2308,18 +2296,16 @@ void verify_panel(void)
        panel_col_min = pcol_min;
 
        /* Hack -- optional disturb on "panel change" */
-       if (disturb_panel && !center_player) disturb(0, 0);
+       if (disturb_panel && !center_player) disturb(FALSE, FALSE);
 
        /* Recalculate the boundaries */
        panel_bounds_center();
 
-       /* Update stuff */
        p_ptr->update |= (PU_MONSTERS);
 
        /* Redraw map */
        p_ptr->redraw |= (PR_MAP);
 
-       /* Window stuff */
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 }
 
@@ -2537,7 +2523,7 @@ bool target_able(MONSTER_IDX m_idx)
        /* Monster must be projectable */
        if (!projectable(p_ptr->y, p_ptr->x, m_ptr->fy, m_ptr->fx)) return (FALSE);
 
-       /* XXX XXX XXX Hack -- Never target trappers */
+       /* Hack -- Never target trappers */
        /* if (CLEAR_ATTR && (CLEAR_CHAR)) return (FALSE); */
 
        /* Assume okay */
@@ -2742,7 +2728,7 @@ static POSITION_IDX target_pick(POSITION y1, POSITION x1, POSITION dy, POSITION
                /* Approximate Double Distance */
                v = ((x4 > y4) ? (x4 + x4 + y4) : (y4 + y4 + x4));
 
-               /* XXX XXX XXX Penalize location */
+               /* Penalize location */
 
                /* Track best */
                if ((b_i >= 0) && (v >= b_v)) continue;
@@ -2750,8 +2736,6 @@ static POSITION_IDX target_pick(POSITION y1, POSITION x1, POSITION dy, POSITION
                /* Track best */
                b_i = i; b_v = v;
        }
-
-       /* Result */
        return (b_i);
 }
 
@@ -2810,7 +2794,6 @@ static bool target_set_accept(POSITION y, POSITION x)
                if (have_flag(f_info[get_feat_mimic(c_ptr)].flags, FF_NOTICE)) return TRUE;
        }
 
-       /* Nope */
        return (FALSE);
 }
 
@@ -2822,8 +2805,8 @@ static bool target_set_accept(POSITION y, POSITION x)
  */
 static void target_set_prepare(BIT_FLAGS mode)
 {
-       int y, x;
-       int min_hgt, max_hgt, min_wid, max_wid;
+       POSITION y, x;
+       POSITION min_hgt, max_hgt, min_wid, max_wid;
 
        if (mode & TARGET_KILL)
        {
@@ -2978,7 +2961,7 @@ bool show_gold_on_floor = FALSE;
  * recall info and the health bar info to track that monster.
  *
  * Eventually, we may allow multiple objects per grid, or objects
- * and terrain features in the same grid. XXX XXX XXX
+ * and terrain features in the same grid. 
  *
  * This function must handle blindness/hallucination.
  */
@@ -2992,8 +2975,6 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
        feature_type *f_ptr;
        char query = '\001';
        char out_val[MAX_NLEN+80];
-
-#ifdef ALLOW_EASY_FLOOR
        OBJECT_IDX floor_list[23];
        ITEM_NUMBER floor_num = 0;
 
@@ -3008,8 +2989,6 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
                }
        }
 
-#endif /* ALLOW_EASY_FLOOR */
-
        /* Hack -- under the player */
        if (player_bold(y, x))
        {
@@ -3174,7 +3153,6 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
                        /* Obtain an object description */
                        object_desc(o_name, o_ptr, 0);
 
-                       /* Describe the object */
 #ifdef JP
                        sprintf(out_val, "%s%s%s%s[%s]", s1, o_name, s2, s3, info);
 #else
@@ -3204,8 +3182,6 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
 #endif
        }
 
-
-#ifdef ALLOW_EASY_FLOOR
        if (floor_num)
        {
                int min_width = 0;
@@ -3221,15 +3197,12 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
                                /* Acquire object */
                                o_ptr = &o_list[floor_list[0]];
 
-                               /* Describe the object */
                                object_desc(o_name, o_ptr, 0);
 
 #ifdef JP
-                               sprintf(out_val, "%s%s%s%s[%s]",
-                                       s1, o_name, s2, s3, info);
+                               sprintf(out_val, "%s%s%s%s[%s]", s1, o_name, s2, s3, info);
 #else
-                               sprintf(out_val, "%s%s%s%s [%s]",
-                                       s1, s2, s3, o_name, info);
+                               sprintf(out_val, "%s%s%s%s [%s]", s1, s2, s3, o_name, info);
 #endif
 
                                prt(out_val, 0, 0);
@@ -3327,8 +3300,6 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
 
                /* NOTREACHED */
        }
-#endif /* ALLOW_EASY_FLOOR */
-
 
        /* Scan all objects in the grid */
        for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
@@ -3352,7 +3323,6 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
                        /* Obtain an object description */
                        object_desc(o_name, o_ptr, 0);
 
-                       /* Describe the object */
 #ifdef JP
                        sprintf(out_val, "%s%s%s%s[%s]", s1, o_name, s2, s3, info);
 #else
@@ -3530,7 +3500,7 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
  *
  * All locations must be on the current panel.  Consider the use of
  * "panel_bounds()" to allow "off-panel" targets, perhaps by using
- * some form of "scrolling" the map around the cursor.  XXX XXX XXX
+ * some form of "scrolling" the map around the cursor.  
  * That is, consider the possibility of "auto-scrolling" the screen
  * while the cursor moves around.  This may require changes in the
  * "update_mon()" code to allow "visibility" even if off panel, and
@@ -3580,7 +3550,6 @@ bool target_set(BIT_FLAGS mode)
 
        int wid, hgt;
        
-       /* Get size */
        get_screen_size(&wid, &hgt);
 
        /* Cancel target */
@@ -3717,13 +3686,11 @@ bool target_set(BIT_FLAGS mode)
                                        /* Recenter the map around the player */
                                        verify_panel();
 
-                                       /* Update stuff */
                                        p_ptr->update |= (PU_MONSTERS);
 
                                        /* Redraw map */
                                        p_ptr->redraw |= (PR_MAP);
 
-                                       /* Window stuff */
                                        p_ptr->window |= (PW_OVERHEAD);
 
                                        /* Handle stuff */
@@ -3810,13 +3777,11 @@ bool target_set(BIT_FLAGS mode)
                                                panel_col_min = x2;
                                                panel_bounds_center();
 
-                                               /* Update stuff */
                                                p_ptr->update |= (PU_MONSTERS);
 
                                                /* Redraw map */
                                                p_ptr->redraw |= (PR_MAP);
 
-                                               /* Window stuff */
                                                p_ptr->window |= (PW_OVERHEAD);
 
                                                /* Handle stuff */
@@ -3931,13 +3896,11 @@ bool target_set(BIT_FLAGS mode)
                                        /* Recenter the map around the player */
                                        verify_panel();
 
-                                       /* Update stuff */
                                        p_ptr->update |= (PU_MONSTERS);
 
                                        /* Redraw map */
                                        p_ptr->redraw |= (PR_MAP);
 
-                                       /* Window stuff */
                                        p_ptr->window |= (PW_OVERHEAD);
 
                                        /* Handle stuff */
@@ -4058,13 +4021,11 @@ bool target_set(BIT_FLAGS mode)
        /* Recenter the map around the player */
        verify_panel();
 
-       /* Update stuff */
        p_ptr->update |= (PU_MONSTERS);
 
        /* Redraw map */
        p_ptr->redraw |= (PR_MAP);
 
-       /* Window stuff */
        p_ptr->window |= (PW_OVERHEAD);
 
        /* Handle stuff */
@@ -4096,7 +4057,6 @@ bool get_aim_dir(DIRECTION *dp)
        cptr    p;
        COMMAND_CODE code;
 
-       /* Initialize */
        (*dp) = 0;
 
        /* Global direction */
@@ -4105,8 +4065,6 @@ bool get_aim_dir(DIRECTION *dp)
        /* Hack -- auto-target if requested */
        if (use_old_target && target_okay()) dir = 5;
 
-#ifdef ALLOW_REPEAT /* TNB */
-
        if (repeat_pull(&code))
        {
                /* Confusion? */
@@ -4120,8 +4078,6 @@ bool get_aim_dir(DIRECTION *dp)
        }
        *dp = (DIRECTION)code;
 
-#endif /* ALLOW_REPEAT -- TNB */
-
        /* Ask until satisfied */
        while (!dir)
        {
@@ -4195,7 +4151,6 @@ bool get_aim_dir(DIRECTION *dp)
        /* Check for confusion */
        if (p_ptr->confused)
        {
-               /* XXX XXX XXX */
                /* Random direction */
                dir = ddd[randint0(8)];
        }
@@ -4210,59 +4165,33 @@ bool get_aim_dir(DIRECTION *dp)
        /* Save direction */
        (*dp) = dir;
 
-#ifdef ALLOW_REPEAT /* TNB */
-
 /*     repeat_push(dir); */
        repeat_push((COMMAND_CODE)command_dir);
 
-#endif /* ALLOW_REPEAT -- TNB */
-
        /* A "valid" direction was entered */
        return (TRUE);
 }
 
 
-
-/*
- * Request a "movement" direction (1,2,3,4,6,7,8,9) from the user,
- * and place it into "command_dir", unless we already have one.
- *
- * This function should be used for all "repeatable" commands, such as
- * run, walk, open, close, bash, disarm, spike, tunnel, etc, as well
- * as all commands which must reference a grid adjacent to the player,
- * and which may not reference the grid under the player.  Note that,
- * for example, it is no longer possible to "disarm" or "open" chests
- * in the same grid as the player.
- *
- * Direction "5" is illegal and will (cleanly) abort the command.
- *
- * This function tracks and uses the "global direction", and uses
- * that as the "desired direction", to which "confusion" is applied.
- */
-bool get_rep_dir(DIRECTION *dp, bool under)
+bool get_direction(DIRECTION *dp, bool allow_under, bool with_steed)
 {
        DIRECTION dir;
        cptr prompt;
        COMMAND_CODE code;
 
-       /* Initialize */
        (*dp) = 0;
 
        /* Global direction */
        dir = command_dir;
 
-#ifdef ALLOW_REPEAT /* TNB */
-
        if (repeat_pull(&code))
        {
                dir = (DIRECTION)code;
-/*             return (TRUE); */
+               /*              return (TRUE); */
        }
        *dp = (DIRECTION)code;
 
-#endif /* ALLOW_REPEAT -- TNB */
-
-       if (under)
+       if (allow_under)
        {
                prompt = _("方向 ('.'足元, ESCで中断)? ", "Direction ('.' at feet, Escape to cancel)? ");
        }
@@ -4270,7 +4199,7 @@ bool get_rep_dir(DIRECTION *dp, bool under)
        {
                prompt = _("方向 (ESCで中断)? ", "Direction (Escape to cancel)? ");
        }
-       
+
        /* Get a direction */
        while (!dir)
        {
@@ -4280,7 +4209,7 @@ bool get_rep_dir(DIRECTION *dp, bool under)
                if (!get_com(prompt, &ch, TRUE)) break;
 
                /* Look down */
-               if ((under) && ((ch == '5') || (ch == '-') || (ch == '.')))
+               if ((allow_under) && ((ch == '5') || (ch == '-') || (ch == '.')))
                {
                        dir = 5;
                }
@@ -4289,13 +4218,12 @@ bool get_rep_dir(DIRECTION *dp, bool under)
                        /* Look up the direction */
                        dir = get_keymap_dir(ch);
 
-                       /* Oops */
                        if (!dir) bell();
                }
        }
 
        /* Prevent weirdness */
-       if ((dir == 5) && (!under)) dir = 0;
+       if ((dir == 5) && (!allow_under)) dir = 0;
 
        /* Aborted */
        if (!dir) return (FALSE);
@@ -4313,7 +4241,7 @@ bool get_rep_dir(DIRECTION *dp, bool under)
                        dir = ddd[randint0(8)];
                }
        }
-       else if (p_ptr->riding)
+       else if (p_ptr->riding && with_steed)
        {
                monster_type *m_ptr = &m_list[p_ptr->riding];
                monster_race *r_ptr = &r_info[m_ptr->r_idx];
@@ -4367,31 +4295,40 @@ bool get_rep_dir(DIRECTION *dp, bool under)
        /* Save direction */
        (*dp) = dir;
 
-#ifdef ALLOW_REPEAT /* TNB */
-
-/*     repeat_push(dir); */
+       /*      repeat_push(dir); */
        repeat_push((COMMAND_CODE)command_dir);
 
-#endif /* ALLOW_REPEAT -- TNB */
-
        /* Success */
        return (TRUE);
 }
 
-
-bool get_rep_dir2(DIRECTION *dp)
+/*
+ * @brief 進行方向を指定する(騎乗対象の混乱の影響を受ける) / Request a "movement" direction (1,2,3,4,6,7,8,9) from the user,
+ * and place it into "command_dir", unless we already have one.
+ *
+ * This function should be used for all "repeatable" commands, such as
+ * run, walk, open, close, bash, disarm, spike, tunnel, etc, as well
+ * as all commands which must reference a grid adjacent to the player,
+ * and which may not reference the grid under the player.  Note that,
+ * for example, it is no longer possible to "disarm" or "open" chests
+ * in the same grid as the player.
+ *
+ * Direction "5" is illegal and will (cleanly) abort the command.
+ *
+ * This function tracks and uses the "global direction", and uses
+ * that as the "desired direction", to which "confusion" is applied.
+ */
+bool get_rep_dir(DIRECTION *dp, bool under)
 {
        DIRECTION dir;
+       cptr prompt;
        COMMAND_CODE code;
 
-       /* Initialize */
        (*dp) = 0;
 
        /* Global direction */
        dir = command_dir;
 
-#ifdef ALLOW_REPEAT /* TNB */
-
        if (repeat_pull(&code))
        {
                dir = (DIRECTION)code;
@@ -4399,25 +4336,39 @@ bool get_rep_dir2(DIRECTION *dp)
        }
        *dp = (DIRECTION)code;
 
-#endif /* ALLOW_REPEAT -- TNB */
-
+       if (under)
+       {
+               prompt = _("方向 ('.'足元, ESCで中断)? ", "Direction ('.' at feet, Escape to cancel)? ");
+       }
+       else
+       {
+               prompt = _("方向 (ESCで中断)? ", "Direction (Escape to cancel)? ");
+       }
+       
        /* Get a direction */
        while (!dir)
        {
                char ch;
 
                /* Get a command (or Cancel) */
-               if (!get_com(_("方向 (ESCで中断)? ", "Direction (Escape to cancel)? "), &ch, TRUE)) break;
+               if (!get_com(prompt, &ch, TRUE)) break;
 
-               /* Look up the direction */
-               dir = get_keymap_dir(ch);
+               /* Look down */
+               if ((under) && ((ch == '5') || (ch == '-') || (ch == '.')))
+               {
+                       dir = 5;
+               }
+               else
+               {
+                       /* Look up the direction */
+                       dir = get_keymap_dir(ch);
 
-               /* Oops */
-               if (!dir) bell();
+                       if (!dir) bell();
+               }
        }
 
        /* Prevent weirdness */
-       if (dir == 5) dir = 0;
+       if ((dir == 5) && (!under)) dir = 0;
 
        /* Aborted */
        if (!dir) return (FALSE);
@@ -4435,24 +4386,63 @@ bool get_rep_dir2(DIRECTION *dp)
                        dir = ddd[randint0(8)];
                }
        }
+       else if (p_ptr->riding)
+       {
+               monster_type *m_ptr = &m_list[p_ptr->riding];
+               monster_race *r_ptr = &r_info[m_ptr->r_idx];
+
+               if (MON_CONFUSED(m_ptr))
+               {
+                       /* Standard confusion */
+                       if (randint0(100) < 75)
+                       {
+                               /* Random direction */
+                               dir = ddd[randint0(8)];
+                       }
+               }
+               else if ((r_ptr->flags1 & RF1_RAND_50) && (r_ptr->flags1 & RF1_RAND_25) && (randint0(100) < 50))
+               {
+                       /* Random direction */
+                       dir = ddd[randint0(8)];
+               }
+               else if ((r_ptr->flags1 & RF1_RAND_50) && (randint0(100) < 25))
+               {
+                       /* Random direction */
+                       dir = ddd[randint0(8)];
+               }
+       }
 
        /* Notice confusion */
        if (command_dir != dir)
        {
-               /* Warn the user */
-               msg_print(_("あなたは混乱している。", "You are confused."));
+               if (p_ptr->confused)
+               {
+                       /* Warn the user */
+                       msg_print(_("あなたは混乱している。", "You are confused."));
+               }
+               else
+               {
+                       char m_name[80];
+                       monster_type *m_ptr = &m_list[p_ptr->riding];
+
+                       monster_desc(m_name, m_ptr, 0);
+                       if (MON_CONFUSED(m_ptr))
+                       {
+                               msg_format(_("%sは混乱している。", "%^s is confusing."), m_name);
+                       }
+                       else
+                       {
+                               msg_format(_("%sは思い通りに動いてくれない。", "You cannot control %s."), m_name);
+                       }
+               }
        }
 
        /* Save direction */
        (*dp) = dir;
 
-#ifdef ALLOW_REPEAT /* TNB */
-
 /*     repeat_push(dir); */
        repeat_push((COMMAND_CODE)command_dir);
 
-#endif /* ALLOW_REPEAT -- TNB */
-
        /* Success */
        return (TRUE);
 }
@@ -5067,7 +5057,6 @@ static bool tgt_pt_accept(POSITION y, POSITION x)
                if (cave_have_flag_grid(c_ptr, FF_QUEST_EXIT)) return (TRUE);
        }
 
-       /* Nope */
        return (FALSE);
 }
 
@@ -5120,7 +5109,6 @@ bool tgt_pt(POSITION *x_ptr, POSITION *y_ptr)
 
        int wid, hgt;
 
-       /* Get size */
        get_screen_size(&wid, &hgt);
 
        x = p_ptr->x;
@@ -5188,13 +5176,11 @@ bool tgt_pt(POSITION *x_ptr, POSITION *y_ptr)
                                        x = p_ptr->x;
                                        verify_panel(); /* Move cursor to player */
 
-                                       /* Update stuff */
                                        p_ptr->update |= (PU_MONSTERS);
 
                                        /* Redraw map */
                                        p_ptr->redraw |= (PR_MAP);
 
-                                       /* Window stuff */
                                        p_ptr->window |= (PW_OVERHEAD);
 
                                        /* Handle stuff */
@@ -5279,13 +5265,11 @@ bool tgt_pt(POSITION *x_ptr, POSITION *y_ptr)
        /* Recenter the map around the player */
        verify_panel();
 
-       /* Update stuff */
        p_ptr->update |= (PU_MONSTERS);
 
        /* Redraw map */
        p_ptr->redraw |= (PR_MAP);
 
-       /* Window stuff */
        p_ptr->window |= (PW_OVERHEAD);
 
        /* Handle stuff */
@@ -5303,7 +5287,6 @@ bool get_hack_dir(DIRECTION *dp)
        cptr    p;
        char    command;
 
-       /* Initialize */
        (*dp) = 0;
 
        /* Global direction */
@@ -5380,7 +5363,6 @@ bool get_hack_dir(DIRECTION *dp)
        /* Check for confusion */
        if (p_ptr->confused)
        {
-               /* XXX XXX XXX */
                /* Random direction */
                dir = ddd[randint0(8)];
        }