OSDN Git Service

For clarity, reword English description of the SP_RUSH sniper ability.
[hengband/hengband.git] / src / cmd-visual / cmd-map.c
1 #include "cmd-visual/cmd-map.h"
2 #include "autopick/autopick-methods-table.h"
3 #include "autopick/autopick-util.h"
4 #include "io/input-key-acceptor.h"
5 #include "term/screen-processor.h"
6 #include "view/display-map.h"
7 #include "window/main-window-util.h"
8
9 /*
10  * Display a "small-scale" map of the dungeon for the player
11  *
12  * Currently, the "player" is displayed on the map.
13  */
14 void do_cmd_view_map(player_type *player_ptr)
15 {
16     screen_save();
17     prt(_("お待ち下さい...", "Please wait..."), 0, 0);
18     term_fresh();
19     term_clear();
20     display_autopick = 0;
21
22     int cy, cx;
23     display_map(player_ptr, &cy, &cx);
24     if ((max_autopick == 0) || player_ptr->wild_mode) {
25         put_str(_("何かキーを押すとゲームに戻ります", "Hit any key to continue"), 23, 30);
26         move_cursor(cy, cx);
27         inkey();
28         screen_load();
29         return;
30     }
31
32     display_autopick = ITEM_DISPLAY;
33     while (TRUE) {
34         int wid, hgt;
35         term_get_size(&wid, &hgt);
36         int row_message = hgt - 1;
37         put_str(_("何かキーを押してください('M':拾う 'N':放置 'D':M+N 'K':壊すアイテムを表示)",
38                     " Hit M, N(for ~), K(for !), or D(same as M+N) to display auto-picker items."),
39             row_message, 1);
40         move_cursor(cy, cx);
41         int i = inkey();
42         byte flag;
43         if ('M' == i)
44             flag = (DO_AUTOPICK | DO_QUERY_AUTOPICK);
45         else if ('N' == i)
46             flag = DONT_AUTOPICK;
47         else if ('K' == i)
48             flag = DO_AUTODESTROY;
49         else if ('D' == i)
50             flag = (DO_AUTOPICK | DO_QUERY_AUTOPICK | DONT_AUTOPICK);
51         else
52             break;
53
54         term_fresh();
55         if (~display_autopick & flag)
56             display_autopick |= flag;
57         else
58             display_autopick &= ~flag;
59
60         display_map(player_ptr, &cy, &cx);
61     }
62
63     display_autopick = 0;
64     screen_load();
65 }