From 43b11e051f3ac7da2671e3aa9a0fb851d6a3b32f Mon Sep 17 00:00:00 2001 From: Hourier Date: Sat, 25 Apr 2020 00:08:38 +0900 Subject: [PATCH] [Refactor] #39964 Separated autopick-dirty-flags.h from autopick.c --- Hengband_vcs2017/Hengband/Hengband.vcxproj | 1 + Hengband_vcs2017/Hengband/Hengband.vcxproj.filters | 3 +++ src/Makefile.am | 5 +++-- src/autopick/autopick-dirty-flags.h | 13 +++++++++++++ src/autopick/autopick.c | 13 +------------ 5 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 src/autopick/autopick-dirty-flags.h diff --git a/Hengband_vcs2017/Hengband/Hengband.vcxproj b/Hengband_vcs2017/Hengband/Hengband.vcxproj index 57a07e8f6..7045a17f6 100644 --- a/Hengband_vcs2017/Hengband/Hengband.vcxproj +++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj @@ -287,6 +287,7 @@ + diff --git a/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters b/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters index 74316c694..7e87b69be 100644 --- a/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters +++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters @@ -1256,6 +1256,9 @@ autopick + + autopick + diff --git a/src/Makefile.am b/src/Makefile.am index 2f69906ac..abc119ae7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,8 +10,9 @@ hengband_SOURCES = \ angband.h\ \ autopick/autopick.c autopick/autopick.h \ - autopick/autopick-commands-table.h autopick/autopick-editor-table.h \ - autopick/autopick-flags-table.h autopick/autopick-key-table.h \ + autopick/autopick-commands-table.h autopick/autopick-dirty-flags.h \ + autopick/autopick-editor-table.h autopick/autopick-flags-table.h \ + autopick/autopick-key-table.h \ \ avatar.h avatar.c birth.c birth.h \ \ diff --git a/src/autopick/autopick-dirty-flags.h b/src/autopick/autopick-dirty-flags.h new file mode 100644 index 000000000..b285e8834 --- /dev/null +++ b/src/autopick/autopick-dirty-flags.h @@ -0,0 +1,13 @@ +#pragma once + +/* + * Dirty flag for text editor + */ +#define DIRTY_ALL 0x0001 +#define DIRTY_MODE 0x0004 +#define DIRTY_SCREEN 0x0008 +#define DIRTY_NOT_FOUND 0x0010 +#define DIRTY_NO_SEARCH 0x0020 +#define DIRTY_EXPRESSION 0x0040 +#define DIRTY_SKIP_INACTIVE 0x0080 +#define DIRTY_INACTIVE 0x0100 diff --git a/src/autopick/autopick.c b/src/autopick/autopick.c index 3bfa4b8e6..7db5421e7 100644 --- a/src/autopick/autopick.c +++ b/src/autopick/autopick.c @@ -14,6 +14,7 @@ #include "angband.h" #include "util.h" #include "autopick/autopick-commands-table.h" +#include "autopick/autopick-dirty-flags.h" #include "autopick/autopick-editor-table.h" #include "autopick/autopick-flags-table.h" #include "autopick/autopick-keys-table.h" @@ -65,18 +66,6 @@ #define QUIT_WITHOUT_SAVE 1 #define QUIT_AND_SAVE 2 -/* - * Dirty flag for text editor - */ -#define DIRTY_ALL 0x0001 -#define DIRTY_MODE 0x0004 -#define DIRTY_SCREEN 0x0008 -#define DIRTY_NOT_FOUND 0x0010 -#define DIRTY_NO_SEARCH 0x0020 -#define DIRTY_EXPRESSION 0x0040 -#define DIRTY_SKIP_INACTIVE 0x0080 -#define DIRTY_INACTIVE 0x0100 - #define DESCRIPT_HGT 3 #define MATCH_KEY(KEY) (!strncmp(ptr, KEY, sizeof(KEY)-1)\ -- 2.11.0