#include "cmd-io/macro-util.h"
-/*
- * Array of macro patterns [MACRO_MAX]
- */
+/* Array of macro types [MACRO_MAX] */
+bool *macro__cmd;
+
+/* Current macro action [1024] */
+char *macro__buf;
+
+/* Array of macro patterns [MACRO_MAX] */
concptr *macro__pat;
-/*
- * Array of macro actions [MACRO_MAX]
- */
+/* Array of macro actions [MACRO_MAX] */
concptr *macro__act;
-/*
- * Number of active macros.
- */
+/* Number of active macros */
s16b macro__num;
- /*
- * Determine if any macros have ever started with a given character.
- */
+/* Expand macros in "get_com" or not */
+bool get_com_no_macros = FALSE;
+
+/* Determine if any macros have ever started with a given character */
static bool macro__use[256];
-/*
- * Find the macro (if any) which exactly matches the given pattern
- */
+/* Find the macro (if any) which exactly matches the given pattern */
int macro_find_exact(concptr pat)
{
if (!macro__use[(byte)(pat[0])]) {
#include "system/angband.h"
+extern bool *macro__cmd;
+extern char *macro__buf;
+
+extern bool get_com_no_macros;
+
extern concptr *macro__pat;
extern concptr *macro__act;
extern s16b macro__num;
#include "core/asking-player.h"
+#include "cmd-io/macro-util.h"
#include "core/stuff-handler.h"
#include "game-option/input-options.h"
#include "io/input-key-acceptor.h"
#include "cmd-io/cmd-lore.h"
#include "cmd-io/cmd-macro.h"
#include "cmd-io/cmd-process-screen.h"
+#include "cmd-io/macro-util.h"
#include "cmd-item/cmd-item.h"
#include "cmd-item/cmd-magiceat.h"
#include "cmd-item/cmd-smith.h"
#include "util/string-processor.h"
+int max_macrotrigger = 0; /*!< 現在登録中のマクロ(トリガー)の数 */
+concptr macro_template = NULL; /*!< Angband設定ファイルのT: タグ情報から読み込んだ長いTコードを処理するために利用する文字列ポインタ */
+concptr macro_modifier_chr; /*!< &x# で指定されるマクロトリガーに関する情報を記録する文字列ポインタ */
+concptr macro_modifier_name[MAX_MACRO_MOD]; /*!< マクロ上で取り扱う特殊キーを文字列上で表現するためのフォーマットを記録した文字列ポインタ配列 */
+concptr macro_trigger_name[MAX_MACRO_TRIG]; /*!< マクロのトリガーコード */
+concptr macro_trigger_keycode[2][MAX_MACRO_TRIG]; /*!< マクロの内容 */
+
/*
* Convert a decimal to a single digit octal number
*/
#include "system/angband.h"
+/*
+ * Automatically generated "variable" declarations
+ */
+extern int max_macrotrigger;
+extern concptr macro_template;
+extern concptr macro_modifier_chr;
+extern concptr macro_modifier_name[MAX_MACRO_MOD];
+extern concptr macro_trigger_name[MAX_MACRO_TRIG];
+extern concptr macro_trigger_keycode[2][MAX_MACRO_TRIG];
+
void text_to_ascii(char *buf, concptr str);
void ascii_to_text(char *buf, concptr str);
*/
concptr keymap_act[KEYMAP_MODES][256];
-/*
- * Array of macro types [MACRO_MAX]
- */
-bool *macro__cmd;
-
-/*
- * Current macro action [1024]
- */
-char *macro__buf;
-
-bool get_com_no_macros = FALSE; /* Expand macros in "get_com" or not */
-
bool use_menu;
pos_list tmp_pos;
-int max_macrotrigger = 0; /*!< 現在登録中のマクロ(トリガー)の数 */
-concptr macro_template = NULL; /*!< Angband設定ファイルのT: タグ情報から読み込んだ長いTコードを処理するために利用する文字列ポインタ */
-concptr macro_modifier_chr; /*!< &x# で指定されるマクロトリガーに関する情報を記録する文字列ポインタ */
-concptr macro_modifier_name[MAX_MACRO_MOD]; /*!< マクロ上で取り扱う特殊キーを文字列上で表現するためのフォーマットを記録した文字列ポインタ配列 */
-concptr macro_trigger_name[MAX_MACRO_TRIG]; /*!< マクロのトリガーコード */
-concptr macro_trigger_keycode[2][MAX_MACRO_TRIG]; /*!< マクロの内容 */
-
s16b command_cmd; /* Current "Angband Command" */
COMMAND_ARG command_arg; /*!< 各種コマンドの汎用的な引数として扱う / Gives argument of current command */
COMMAND_NUM command_rep; /*!< 各種コマンドの汎用的なリピート数として扱う / Gives repetition of current command */
u16b total; /* Unused for now */
};
-extern bool *macro__cmd;
-extern char *macro__buf;
-
-extern bool get_com_no_macros;
-
extern bool use_menu;
extern pos_list tmp_pos;
-/*
- * Automatically generated "variable" declarations
- */
-extern int max_macrotrigger;
-extern concptr macro_template;
-extern concptr macro_modifier_chr;
-extern concptr macro_modifier_name[MAX_MACRO_MOD];
-extern concptr macro_trigger_name[MAX_MACRO_TRIG];
-extern concptr macro_trigger_keycode[2][MAX_MACRO_TRIG];
-
extern COMMAND_CODE command_cmd;
extern COMMAND_ARG command_arg;
extern s16b command_rep;