mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Merge pull request #239 from DizzyEggg/patch-1
Use DMA large macro in option menu
This commit is contained in:
commit
867b496f2e
@ -146,23 +146,7 @@ void CB2_InitOptionMenu(void)
|
|||||||
gMain.state++;
|
gMain.state++;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
{
|
DmaClearLarge16(3, (void*)(VRAM), VRAM_SIZE, 0x1000);
|
||||||
u8 *addr;
|
|
||||||
u32 size;
|
|
||||||
|
|
||||||
addr = (u8 *)VRAM;
|
|
||||||
size = 0x18000;
|
|
||||||
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);
|
DmaClear32(3, OAM, OAM_SIZE);
|
||||||
DmaClear16(3, PLTT, PLTT_SIZE);
|
DmaClear16(3, PLTT, PLTT_SIZE);
|
||||||
SetGpuReg(REG_OFFSET_DISPCNT, 0);
|
SetGpuReg(REG_OFFSET_DISPCNT, 0);
|
||||||
@ -189,7 +173,6 @@ void CB2_InitOptionMenu(void)
|
|||||||
ShowBg(0);
|
ShowBg(0);
|
||||||
ShowBg(1);
|
ShowBg(1);
|
||||||
gMain.state++;
|
gMain.state++;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
ResetPaletteFade();
|
ResetPaletteFade();
|
||||||
|
Loading…
Reference in New Issue
Block a user