Add bugfix from bugs_and_glitches.md to BUGFIX

Item flicker fix now in `BUGFIX`
Supersedes and resolves #1680
Fixes #1215
Fixes #1514
This commit is contained in:
Colton G. Rushton 2022-06-17 18:06:37 -03:00 committed by GitHub
parent 03e74c4aff
commit e42498ab40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -544,7 +544,20 @@ void AddBagItemIconSprite(u16 itemId, u8 id)
void RemoveBagItemIconSprite(u8 id)
{
RemoveBagSprite(id + ITEMMENUSPRITE_ITEM);
#ifdef BUGFIX
u8 *spriteId = &gBagMenu->spriteIds[ITEMMENUSPRITE_ITEM];
if (spriteId[id ^ 1] != SPRITE_NONE)
gSprites[spriteId[id ^ 1]].invisible = TRUE;
if (spriteId[id] != SPRITE_NONE)
{
DestroySpriteAndFreeResources(&gSprites[spriteId[id]]);
spriteId[id] = SPRITE_NONE;
}
#else
RemoveBagSprite(id + ITEMMENUSPRITE_ITEM);
#endif
}
void CreateItemMenuSwapLine(void)