OSDN Git Service

[Refactor] #2138 Separated get_caret_command() from request_command()
[hengbandforosx/hengbandosx.git] / src / io / input-key-requester.h
1 #pragma once
2
3 #include "system/angband.h"
4 #include "game-option/keymap-directory-getter.h"
5
6 extern concptr keymap_act[KEYMAP_MODES][256];
7
8 extern bool use_menu;
9
10 extern COMMAND_CODE command_cmd;
11 extern COMMAND_ARG command_arg;
12 extern short command_rep;
13 extern DIRECTION command_dir;
14 extern int16_t command_see;
15 extern TERM_LEN command_gap;
16 extern int16_t command_wrk;
17 extern int16_t command_new;
18
19 class PlayerType;
20 class InputKeyRequestor {
21 public:
22     InputKeyRequestor(PlayerType *player_ptr, bool shopping);
23     void request_command();
24
25 private:
26     PlayerType *player_ptr;
27     bool shopping;
28     char request_command_buffer[256]{}; /*!< Special buffer to hold the action of the current keymap */
29     keymap_mode mode;
30
31     void input_command();
32     short get_command();
33     char inkey_from_menu();
34     bool process_repeat_num(short *cmd);
35     char input_repeat_num();
36     void process_command_command(short *cmd);
37     void process_control_command(short *cmd);
38     void change_shopping_command();
39     int get_caret_command();
40 };