mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 22:03:53 +01:00
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:
parent
ff16812f99
commit
aca96a1510
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user