diff options
author | gAlfonso-bit <83477269+gAlfonso-bit@users.noreply.github.com> | 2021-05-23 19:48:34 -0400 |
---|---|---|
committer | huderlem <huderlem@gmail.com> | 2021-05-24 07:36:08 -0500 |
commit | aca96a1510879906237a4b6b2176fe5e342e1386 (patch) | |
tree | d395212d840b92921e0301ab96f0a93b9e678a64 | |
parent | ff16812f99f62a495975e7cc3c68ede339171765 (diff) |
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.
-rw-r--r-- | gflib/bg.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gflib/bg.c b/gflib/bg.c index 3c215c103..b6d1b0b92 100644 --- a/gflib/bg.c +++ b/gflib/bg.c @@ -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; } } |