Get camera coords before drawing, to prevent jerky player.
This commit is contained in:
parent
b2c6708ef4
commit
bedf2fe74d
|
@ -105,9 +105,6 @@ static void doBattle(void)
|
|||
{
|
||||
if (player != NULL)
|
||||
{
|
||||
battle.camera.x = player->x - (SCREEN_WIDTH / 2);
|
||||
battle.camera.y = player->y - (SCREEN_HEIGHT / 2);
|
||||
|
||||
ssx = player->dx;
|
||||
ssy = player->dy;
|
||||
}
|
||||
|
@ -160,6 +157,9 @@ static void draw(void)
|
|||
{
|
||||
prepareScene();
|
||||
|
||||
battle.camera.x = player->x - (SCREEN_WIDTH / 2);
|
||||
battle.camera.y = player->y - (SCREEN_HEIGHT / 2);
|
||||
|
||||
drawBackground(battle.background);
|
||||
|
||||
drawStars();
|
||||
|
|
Loading…
Reference in New Issue