Clear up misnamed time-based flags and functions

This commit is contained in:
Diegoisawesome
2019-02-12 00:40:34 -06:00
parent bc4cc9f78a
commit 449fb25f23
19 changed files with 24 additions and 25 deletions

View File

@@ -41,7 +41,7 @@ static void UpdatePerDay(struct Time *localTime)
if (*days != localTime->days && *days <= localTime->days)
{
daysSince = localTime->days - *days;
ClearUpperFlags();
ClearDailyFlags();
UpdateDewfordTrendPerDay(daysSince);
UpdateTVShowsPerDay(daysSince);
UpdateWeatherPerDay(daysSince);

View File

@@ -3,7 +3,7 @@
#include "pokedex.h"
#define TEMP_FLAGS_SIZE 0x4
#define TEMP_UPPER_FLAGS_SIZE 0x8
#define DAILY_FLAGS_SIZE 0x8
#define TEMP_VARS_SIZE 0x20
EWRAM_DATA u16 gSpecialVar_0x8000 = 0;
@@ -48,10 +48,9 @@ void ClearTempFieldEventData(void)
FlagClear(FLAG_NURSE_UNION_ROOM_REMINDER);
}
// Probably had different flag splits at one point.
void ClearUpperFlags(void)
void ClearDailyFlags(void)
{
memset(gSaveBlock1Ptr->flags + 0x124, 0, TEMP_UPPER_FLAGS_SIZE);
memset(gSaveBlock1Ptr->flags + 0x124, 0, DAILY_FLAGS_SIZE);
}
void DisableNationalPokedex(void)

View File

@@ -690,7 +690,7 @@ bool8 ScrCmd_initclock(struct ScriptContext *ctx)
return FALSE;
}
bool8 ScrCmd_dodailyevents(struct ScriptContext *ctx)
bool8 ScrCmd_dotimebasedevents(struct ScriptContext *ctx)
{
DoTimeBasedEvents();
return FALSE;