Fix lingering long ability popup names (#4456)

This commit is contained in:
sneed 2024-04-28 18:06:39 +03:00 committed by GitHub
parent 3ac67acc63
commit 0fafb5cd96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3114,6 +3114,7 @@ static void PrintBattlerOnAbilityPopUp(u8 battlerId, u8 spriteId1, u8 spriteId2)
static void PrintAbilityOnAbilityPopUp(u32 ability, u8 spriteId1, u8 spriteId2)
{
ClearAbilityName(spriteId1, spriteId2);
PrintOnAbilityPopUp(gAbilitiesInfo[ability].name,
(void*)(OBJ_VRAM0) + (gSprites[spriteId1].oam.tileNum * 32) + 256,
(void*)(OBJ_VRAM0) + (gSprites[spriteId2].oam.tileNum * 32) + 256,
@ -3320,7 +3321,6 @@ void UpdateAbilityPopup(u8 battlerId)
u8 spriteId2 = gBattleStruct->abilityPopUpSpriteIds[battlerId][1];
u16 ability = (gBattleScripting.abilityPopupOverwrite != 0) ? gBattleScripting.abilityPopupOverwrite : gBattleMons[battlerId].ability;
ClearAbilityName(spriteId1, spriteId2);
PrintAbilityOnAbilityPopUp(ability, spriteId1, spriteId2);
RestoreOverwrittenPixels((void*)(OBJ_VRAM0) + (gSprites[spriteId1].oam.tileNum * 32));
}