diff options
author | Kaz <kazbloxmc@gmail.com> | 2020-09-13 04:08:13 -0400 |
---|---|---|
committer | Kaz <kazbloxmc@gmail.com> | 2020-09-13 04:08:13 -0400 |
commit | 9681d71c924db5481323882f47d7644bbb97ff54 (patch) | |
tree | 63f2fb31e301a2f3f15e5b195a5197b6e48f6a42 /src | |
parent | 3d96e954c845659f5184e99856ddf61ce1375b2f (diff) |
shop.c: The do {} is actually a fakematch.
Turns out we were using the wrong macro the whole time.
Diffstat (limited to 'src')
-rw-r--r-- | src/shop.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/shop.c b/src/shop.c index 3e399f0da..d5c5e55c5 100644 --- a/src/shop.c +++ b/src/shop.c @@ -265,21 +265,7 @@ static void BuyMenuDrawGraphics(void) REG_BG3VOFS = 0; gPaletteFade.bufferTransferDisabled = 1; - /* - THEORY: This seemingly useless loop is required in order to match this - function without hacks. The reason is because it alters the 0 optimization - of a later assignment into using 2 different 0s instead of the same register. - It is speculated that at some point Game Freak insert an artificial - breakpoint here in order to look at the contents of OAM before it is cleared, - possibly because a programmer made a mistake in shop.c which corrupted its - contents. There may have been a macro here which at one point idled on the - while(1) but was changed to 0 for release due to a define somewhere. A - while(0) also matches, but it is more correct to use do {} while(0) as it - was a fix to prevent compiler warnings on older compilers. - */ - do {} while(0); - - DmaFill32Defvars(3, 0, (void*)OAM, OAM_SIZE); + Dma3FillLarge32_(0, (void*)OAM, OAM_SIZE); LZDecompressVram(gBuyMenuFrame_Gfx, (void*)(VRAM + 0x7C00)); LZDecompressWram(gBuyMenuFrame_Tilemap, ewram18000_2); LoadCompressedPalette(gMenuMoneyPal, 0xC0, sizeof(gMenuMoneyPal)); |