     do
     {
         gameState.battleField.ballScaled += gameState.battleField.ballSpeed;
+        gameState.battleField.ball = gameState.battleField.ballScaled >> PIX_BITS;
         moveBall = false;
-        gameState.battleField.ball = gameState.battleField.ballScaled >> PIX_BITS;
         if (checkGameAreaHit())
         {
             moveBall = true;

/* Moves platform right or left according to pressed keys */
void movePlatform(void)
{
    if (engine.pressed( BUTTON_LEFT ) && (gameState.battleField.platform.p1.x > gameArea.p1.x))
    {
        engine.refreshWorld( gameState.battleField.platform );
        gameState.battleField.platform.move(-1, 0);
        engine.refreshWorld( gameState.battleField.platform );
    }
    if (engine.pressed( BUTTON_RIGHT ) && (gameState.battleField.platform.p2.x < gameArea.p2.x))
    {
        engine.refreshWorld( gameState.battleField.platform );
        gameState.battleField.platform.move(+1, 0);

bool checkGameAreaHit(void)
{
    bool hit = false;
    if ((gameState.battleField.ball.x < 0) ||
        (gameState.battleField.ball.x >= gameArea.width()))
    {
        hit = true;
        gameState.battleField.ballSpeed.x = -gameState.battleField.ballSpeed.x;
    }
    if ((gameState.battleField.ball.y < 0) ||
        (gameState.battleField.ball.y >= gameArea.height()))
    {
        hit = true;
        gameState.battleField.ballSpeed.y = -gameState.battleField.ballSpeed.y;
        if (gameState.battleField.ball.y >= gameArea.height())
        {
             startBattleField( false );
        }
