summaryrefslogtreecommitdiff
path: root/src/pokemon/pokedex.c
diff options
context:
space:
mode:
authorProjectRevoTPP <projectrevotpp@hotmail.com>2018-01-17 17:47:46 -0500
committerProjectRevoTPP <projectrevotpp@hotmail.com>2018-01-17 17:47:46 -0500
commitf07cdb4c9723bdbb1fcdbbe622d39936ae5b532f (patch)
tree6b423f3b23c640582d6a7f44a802f8ba3dc6121e /src/pokemon/pokedex.c
parent05d18468a4b817c0976b16017ef7b6044befed7f (diff)
use Dma Large loops for every while(1) Dma loop
Diffstat (limited to 'src/pokemon/pokedex.c')
-rw-r--r--src/pokemon/pokedex.c29
1 files changed, 6 insertions, 23 deletions
diff --git a/src/pokemon/pokedex.c b/src/pokemon/pokedex.c
index faebe526a..cbd816206 100644
--- a/src/pokemon/pokedex.c
+++ b/src/pokemon/pokedex.c
@@ -1394,29 +1394,12 @@ void CB2_InitPokedex(void)
{
case 0:
default:
- {
- u8 *addr;
- u32 size;
-
- SetVBlankCallback(NULL);
- sub_8091060(0);
- addr = (u8 *)VRAM;
- size = VRAM_SIZE;
- while (1)
- {
- DmaFill16(3, 0, addr, 0x1000);
- addr += 0x1000;
- size -= 0x1000;
- if (size <= 0x1000)
- {
- DmaFill16(3, 0, addr, size);
- break;
- }
- }
- DmaClear32(3, OAM, OAM_SIZE);
- DmaClear16(3, PLTT, PLTT_SIZE);
- gMain.state = 1;
- }
+ SetVBlankCallback(NULL);
+ sub_8091060(0);
+ DmaFill16Large(3, 0, (void *)(VRAM + 0x0), VRAM_SIZE, 0x1000);
+ DmaClear32(3, OAM, OAM_SIZE);
+ DmaClear16(3, PLTT, PLTT_SIZE);
+ gMain.state = 1;
break;
case 1:
ScanlineEffect_Stop();