mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 09:24:19 +01:00
Replaced busy-wait loops
This commit is contained in:
parent
6363e61043
commit
610a8efb7d
@ -408,9 +408,7 @@ static void IntrDummy(void)
|
|||||||
static void WaitForVBlank(void)
|
static void WaitForVBlank(void)
|
||||||
{
|
{
|
||||||
gMain.intrCheck &= ~INTR_FLAG_VBLANK;
|
gMain.intrCheck &= ~INTR_FLAG_VBLANK;
|
||||||
|
VBlankIntrWait();
|
||||||
while (!(gMain.intrCheck & INTR_FLAG_VBLANK))
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetTrainerHillVBlankCounter(u32 *counter)
|
void SetTrainerHillVBlankCounter(u32 *counter)
|
||||||
|
@ -1380,7 +1380,7 @@ static void UpdateSubmenuOneOptionValue(u8 taskId, bool8 increment)
|
|||||||
|
|
||||||
UpdateBattlerValue(data);
|
UpdateBattlerValue(data);
|
||||||
ReloadPokemonSprites(data);
|
ReloadPokemonSprites(data);
|
||||||
while (!(gMain.intrCheck & INTR_FLAG_VBLANK));
|
VBlankIntrWait();
|
||||||
PlaySE(SE_DEX_SCROLL);
|
PlaySE(SE_DEX_SCROLL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1499,7 +1499,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId)
|
|||||||
PrintDigitChars(data);
|
PrintDigitChars(data);
|
||||||
UpdateBattlerValue(data);
|
UpdateBattlerValue(data);
|
||||||
ReloadPokemonSprites(data);
|
ReloadPokemonSprites(data);
|
||||||
while (!(gMain.intrCheck & INTR_FLAG_VBLANK));
|
VBlankIntrWait();
|
||||||
PlaySE(SE_DEX_SCROLL);
|
PlaySE(SE_DEX_SCROLL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1531,7 +1531,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId)
|
|||||||
ResetOffsetSpriteValues(data);
|
ResetOffsetSpriteValues(data);
|
||||||
}
|
}
|
||||||
PlaySE(SE_DEX_SCROLL);
|
PlaySE(SE_DEX_SCROLL);
|
||||||
while (!(gMain.intrCheck & INTR_FLAG_VBLANK));
|
VBlankIntrWait();
|
||||||
}
|
}
|
||||||
else if (JOY_NEW(DPAD_UP))
|
else if (JOY_NEW(DPAD_UP))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user