1 #include "cmd-io/cmd-floor.h"
2 #include "core/asking-player.h"
3 #include "core/player-redraw-types.h"
4 #include "core/player-update-types.h"
5 #include "core/stuff-handler.h"
6 #include "core/window-redrawer.h"
7 #include "floor/geometry.h"
8 #include "game-option/keymap-directory-getter.h"
10 #include "io/screen-util.h"
11 #include "main/sound-of-music.h"
12 #include "target/target-checker.h"
13 #include "target/target-setter.h"
14 #include "target/target-types.h"
15 #include "view/display-messages.h"
16 #include "window/main-window-util.h"
19 * @brief
\83^
\81[
\83Q
\83b
\83g
\82ð
\90Ý
\92è
\82·
\82é
\83R
\83}
\83\93\83h
\82Ì
\83\81\83C
\83\93\83\8b\81[
\83`
\83\93
23 void do_cmd_target(player_type *creature_ptr)
25 if (creature_ptr->wild_mode)
28 if (target_set(creature_ptr, TARGET_KILL))
29 msg_print(_("
\83^
\81[
\83Q
\83b
\83g
\8c\88\92è
\81B", "Target Selected."));
31 msg_print(_("
\83^
\81[
\83Q
\83b
\83g
\89ð
\8f\9c\81B", "Target Aborted."));
35 * @brief
\8eü
\88Í
\82ð
\8c©
\93n
\82·
\83R
\83}
\83\93\83h
\82Ì
\83\81\83C
\83\93\83\8b\81[
\83`
\83\93
39 void do_cmd_look(player_type *creature_ptr)
41 creature_ptr->window |= PW_MONSTER_LIST;
42 handle_stuff(creature_ptr);
43 if (target_set(creature_ptr, TARGET_LOOK))
44 msg_print(_("
\83^
\81[
\83Q
\83b
\83g
\8c\88\92è
\81B", "Target Selected."));
48 * @brief
\88Ê
\92u
\82ð
\8am
\94F
\82·
\82é
\83R
\83}
\83\93\83h
\82Ì
\83\81\83C
\83\93\83\8b\81[
\83`
\83\93
49 * Allow the player to examine other sectors on the map
52 void do_cmd_locate(player_type *creature_ptr)
56 GAME_TEXT tmp_val[80];
57 GAME_TEXT out_val[160];
59 get_screen_size(&wid, &hgt);
60 POSITION y2 = y1 = panel_row_min;
61 POSITION x2 = x1 = panel_col_min;
63 if ((y2 == y1) && (x2 == x1))
64 strcpy(tmp_val, _("
\90^
\8fã", "\0"));
66 sprintf(tmp_val, "%s%s", ((y2 < y1) ? _("
\96k", " North") : (y2 > y1) ? _("
\93ì", " South") : ""),
67 ((x2 < x1) ? _("
\90¼", " West") : (x2 > x1) ? _("
\93\8c", " East") : ""));
69 sprintf(out_val, _("
\83}
\83b
\83v
\88Ê
\92u [%d(%02d),%d(%02d)] (
\83v
\83\8c\83C
\83\84\81[
\82Ì%s)
\95û
\8cü?", "Map sector [%d(%02d),%d(%02d)], which is%s your sector. Direction?"),
70 y2 / (hgt / 2), y2 % (hgt / 2), x2 / (wid / 2), x2 % (wid / 2), tmp_val);
75 if (!get_com(out_val, &command, TRUE))
78 dir = get_keymap_dir(command);
86 if (change_panel(creature_ptr, ddy[dir], ddx[dir])) {
92 verify_panel(creature_ptr);
93 creature_ptr->update |= PU_MONSTERS;
94 creature_ptr->redraw |= PR_MAP;
95 creature_ptr->window |= PW_OVERHEAD | PW_DUNGEON;
96 handle_stuff(creature_ptr);