Use constant for daily flag offset

This commit is contained in:
GriffinR 2019-12-08 13:10:12 -05:00 committed by huderlem
parent 49f1a90534
commit 1a672dac8d
2 changed files with 2 additions and 1 deletions

View File

@ -1566,6 +1566,7 @@
#define FLAG_UNUSED_0x91F (SYSTEM_FLAGS + 0xBF) // Unused Flag
// Daily Flags
#define DAILY_FLAGS_START FLAG_DAILY_0x920
#define FLAG_DAILY_0x920 (SYSTEM_FLAGS + 0xC0)
#define FLAG_DAILY_CONTEST_LOBBY_RECEIVED_BERRY (SYSTEM_FLAGS + 0xC1)
#define FLAG_DAILY_SECRET_BASE (SYSTEM_FLAGS + 0xC2)

View File

@ -48,7 +48,7 @@ void ClearTempFieldEventData(void)
void ClearDailyFlags(void)
{
memset(gSaveBlock1Ptr->flags + 0x124, 0, DAILY_FLAGS_SIZE);
memset(gSaveBlock1Ptr->flags + (DAILY_FLAGS_START / 8), 0, DAILY_FLAGS_SIZE);
}
void DisableNationalPokedex(void)