summaryrefslogtreecommitdiff
path: root/include/constants/flags.h
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2020-07-14 19:58:38 -0400
committerGitHub <noreply@github.com>2020-07-14 19:58:38 -0400
commit3c356a1d7af543d84c06f28f670b6ddc4b27fdd6 (patch)
treeeb8f0ae6435b7fe9515928f6fedba5c872aa5827 /include/constants/flags.h
parent6f3c7925775bedb2195c9be03ab38a3fcee23836 (diff)
parentbeeb673ba16e02cacadb2de0ee3608d2106ed14a (diff)
Merge pull request #1082 from GriffinRichards/add-flagvarsave
Allow flag/var counts to be updated alongside values
Diffstat (limited to 'include/constants/flags.h')
-rw-r--r--include/constants/flags.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/constants/flags.h b/include/constants/flags.h
index 4dd18880f..a9c7abae1 100644
--- a/include/constants/flags.h
+++ b/include/constants/flags.h
@@ -1573,7 +1573,9 @@
#define FLAG_UNUSED_0x91F (SYSTEM_FLAGS + 0xBF) // Unused Flag
// Daily Flags
-#define DAILY_FLAGS_START 0x920
+// These flags are cleared once per day
+// The start and end are byte-aligned because the flags are cleared in byte increments
+#define DAILY_FLAGS_START (FLAG_UNUSED_0x91F + (8 - FLAG_UNUSED_0x91F % 8))
#define FLAG_UNUSED_0x920 (DAILY_FLAGS_START + 0x0) // Unused Flag
#define FLAG_DAILY_CONTEST_LOBBY_RECEIVED_BERRY (DAILY_FLAGS_START + 0x1)
#define FLAG_DAILY_SECRET_BASE (DAILY_FLAGS_START + 0x2)
@@ -1639,7 +1641,9 @@
#define FLAG_UNUSED_0x95D (DAILY_FLAGS_START + 0x3D) // Unused Flag
#define FLAG_UNUSED_0x95E (DAILY_FLAGS_START + 0x3E) // Unused Flag
#define FLAG_UNUSED_0x95F (DAILY_FLAGS_START + 0x3F) // Unused Flag
-#define DAILY_FLAGS_END FLAG_UNUSED_0x95F
+#define DAILY_FLAGS_END (FLAG_UNUSED_0x95F + (7 - FLAG_UNUSED_0x95F % 8))
+
+#define FLAGS_COUNT (DAILY_FLAGS_END + 1)
// Special Flags (Stored in EWRAM (gSpecialFlags), not in the SaveBlock)
#define SPECIAL_FLAGS_START 0x4000