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:
+2
-4
@@ -55,7 +55,7 @@ void ResetBgs(void)
|
|||||||
|
|
||||||
static void SetBgModeInternal(u8 bgMode)
|
static void SetBgModeInternal(u8 bgMode)
|
||||||
{
|
{
|
||||||
sGpuBgConfigs.bgVisibilityAndMode &= 0xFFF8;
|
sGpuBgConfigs.bgVisibilityAndMode &= ~0x7;
|
||||||
sGpuBgConfigs.bgVisibilityAndMode |= bgMode;
|
sGpuBgConfigs.bgVisibilityAndMode |= bgMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,13 +66,11 @@ u8 GetBgMode(void)
|
|||||||
|
|
||||||
void ResetBgControlStructs(void)
|
void ResetBgControlStructs(void)
|
||||||
{
|
{
|
||||||
struct BgConfig* bgConfigs = &sGpuBgConfigs.configs[0];
|
|
||||||
struct BgConfig zeroedConfig = sZeroedBgControlStruct;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < NUM_BACKGROUNDS; i++)
|
for (i = 0; i < NUM_BACKGROUNDS; i++)
|
||||||
{
|
{
|
||||||
bgConfigs[i] = zeroedConfig;
|
sGpuBgConfigs.configs[i] = sZeroedBgControlStruct;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user