Mark 0xFFF8 as ~7

Since 7 is used as a mask, I wondered if 0xFFF8 was used to undo the mask and it turns out it was.
This commit is contained in:
gAlfonso-bit 2021-05-23 19:48:34 -04:00 committed by huderlem
parent ff16812f99
commit aca96a1510

View File

@ -55,7 +55,7 @@ void ResetBgs(void)
static void SetBgModeInternal(u8 bgMode)
{
sGpuBgConfigs.bgVisibilityAndMode &= 0xFFF8;
sGpuBgConfigs.bgVisibilityAndMode &= ~0x7;
sGpuBgConfigs.bgVisibilityAndMode |= bgMode;
}
@ -66,13 +66,11 @@ u8 GetBgMode(void)
void ResetBgControlStructs(void)
{
struct BgConfig* bgConfigs = &sGpuBgConfigs.configs[0];
struct BgConfig zeroedConfig = sZeroedBgControlStruct;
int i;
for (i = 0; i < NUM_BACKGROUNDS; i++)
{
bgConfigs[i] = zeroedConfig;
sGpuBgConfigs.configs[i] = sZeroedBgControlStruct;
}
}