Made window's starting location track with ball; made window show if it's showing on startup (#3042)

This commit is contained in:
voloved 2023-06-21 13:19:08 -04:00 committed by GitHub
parent 62ae3b1df1
commit c911d4bf57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3258,7 +3258,7 @@ static const struct SpriteSheet sSpriteSheet_LastUsedBallWindow =
#define LAST_USED_BALL_Y ((IsDoubleBattle()) ? 78 : 68)
#define LAST_BALL_WIN_X_F (LAST_USED_BALL_X_F - 1)
#define LAST_BALL_WIN_X_0 (LAST_USED_BALL_X_0 - 0)
#define LAST_BALL_WIN_X_0 (LAST_USED_BALL_X_0 - 1)
#define LAST_USED_WIN_Y (LAST_USED_BALL_Y - 8)
#define sHide data[0]
@ -3314,7 +3314,7 @@ void TryAddLastUsedBallItemSprites(void)
gBattleStruct->ballSpriteIds[1] = CreateSprite(&sSpriteTemplate_LastUsedBallWindow,
LAST_BALL_WIN_X_0,
LAST_USED_WIN_Y, 5);
gSprites[gBattleStruct->ballSpriteIds[0]].sHide = FALSE; // restore
gSprites[gBattleStruct->ballSpriteIds[1]].sHide = FALSE; // restore
}
#endif
}