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 ターゲットを設定するコマンドのメインルーチン
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(_("ターゲット決定。", "Target Selected."));
31 msg_print(_("ターゲット解除。", "Target Aborted."));
35 * @brief 周囲を見渡すコマンドのメインルーチン
39 void do_cmd_look(player_type *creature_ptr)
41 creature_ptr->window_flags |= PW_MONSTER_LIST;
42 handle_stuff(creature_ptr);
43 if (target_set(creature_ptr, TARGET_LOOK))
44 msg_print(_("ターゲット決定。", "Target Selected."));
48 * @brief 位置を確認するコマンドのメインルーチン
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[MAX_MONSTER_NAME];
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, _("真上", "\0"));
66 sprintf(tmp_val, "%s%s", ((y2 < y1) ? _("北", " North") : (y2 > y1) ? _("南", " South") : ""),
67 ((x2 < x1) ? _("西", " West") : (x2 > x1) ? _("東", " East") : ""));
69 sprintf(out_val, _("マップ位置 [%d(%02d),%d(%02d)] (プレイヤーの%s) 方向?", "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_flags |= PW_OVERHEAD | PW_DUNGEON;
96 handle_stuff(creature_ptr);