fix sprite pos changes

This commit is contained in:
ghoulslash 2021-09-01 07:45:41 -04:00
parent dfe59992d3
commit 39a254f80d
2 changed files with 13 additions and 13 deletions

View File

@ -3218,8 +3218,8 @@ void TryAddLastUsedBallItemSprites(void)
if (gBattleStruct->ballSpriteIds[0] == MAX_SPRITES) if (gBattleStruct->ballSpriteIds[0] == MAX_SPRITES)
{ {
gBattleStruct->ballSpriteIds[0] = AddItemIconSprite(102, 102, gSaveBlock2Ptr->lastUsedBall); gBattleStruct->ballSpriteIds[0] = AddItemIconSprite(102, 102, gSaveBlock2Ptr->lastUsedBall);
gSprites[gBattleStruct->ballSpriteIds[0]].pos1.x = LAST_USED_BALL_X_0; gSprites[gBattleStruct->ballSpriteIds[0]].x = LAST_USED_BALL_X_0;
gSprites[gBattleStruct->ballSpriteIds[0]].pos1.y = LAST_USED_BALL_Y; gSprites[gBattleStruct->ballSpriteIds[0]].y = LAST_USED_BALL_Y;
gSprites[gBattleStruct->ballSpriteIds[0]].sHide = FALSE; // restore gSprites[gBattleStruct->ballSpriteIds[0]].sHide = FALSE; // restore
gSprites[gBattleStruct->ballSpriteIds[0]].callback = SpriteCB_LastUsedBall; gSprites[gBattleStruct->ballSpriteIds[0]].callback = SpriteCB_LastUsedBall;
} }
@ -3258,16 +3258,16 @@ static void SpriteCB_LastUsedBallWin(struct Sprite *sprite)
{ {
if (sprite->sHide) if (sprite->sHide)
{ {
if (sprite->pos1.x != LAST_BALL_WIN_X_0) if (sprite->x != LAST_BALL_WIN_X_0)
sprite->pos1.x--; sprite->x--;
if (sprite->pos1.x == LAST_BALL_WIN_X_0) if (sprite->x == LAST_BALL_WIN_X_0)
DestroyLastUsedBallWinGfx(sprite); DestroyLastUsedBallWinGfx(sprite);
} }
else else
{ {
if (sprite->pos1.x != LAST_BALL_WIN_X_F) if (sprite->x != LAST_BALL_WIN_X_F)
sprite->pos1.x++; sprite->x++;
} }
} }
@ -3275,16 +3275,16 @@ static void SpriteCB_LastUsedBall(struct Sprite *sprite)
{ {
if (sprite->sHide) if (sprite->sHide)
{ {
if (sprite->pos1.x != LAST_USED_BALL_X_0) if (sprite->x != LAST_USED_BALL_X_0)
sprite->pos1.x--; sprite->x--;
if (sprite->pos1.x == LAST_USED_BALL_X_0) if (sprite->x == LAST_USED_BALL_X_0)
DestroyLastUsedBallGfx(sprite); DestroyLastUsedBallGfx(sprite);
} }
else else
{ {
if (sprite->pos1.x != LAST_USED_BALL_X_F) if (sprite->x != LAST_USED_BALL_X_F)
sprite->pos1.x++; sprite->x++;
} }
} }

View File

@ -966,7 +966,7 @@ void ItemUseInBattle_PokeBall(u8 taskId)
break; break;
case 1: // There are two present pokemon. case 1: // There are two present pokemon.
if (!InBattlePyramid()) if (!InBattlePyramid())
DisplayItemMessage(taskId, 1, sText_CantThrowPokeBall_TwoMons, BagMenu_InitListsMenu); DisplayItemMessage(taskId, 1, sText_CantThrowPokeBall_TwoMons, CloseItemMessage);
else else
DisplayItemMessageInBattlePyramid(taskId, sText_CantThrowPokeBall_TwoMons, Task_CloseBattlePyramidBagMessage); DisplayItemMessageInBattlePyramid(taskId, sText_CantThrowPokeBall_TwoMons, Task_CloseBattlePyramidBagMessage);
break; break;