Changed paddle speed

This commit is contained in:
Joe Adams 2018-01-12 10:44:04 +00:00
parent ee23f2756a
commit a0a70d69ed
2 changed files with 3 additions and 3 deletions

View File

@ -1219,4 +1219,4 @@ void initialiseBricks(brick *bricks, int *brickCount, int level) {
*brickCount = 112;
break;
}
}
}

View File

@ -11,7 +11,7 @@
#include "include/utilityFunctions.h"
void updatePaddle(Uint32 tickrate, paddle *thePaddle, char moveX, int winWidth, int winHeight) {
thePaddle->x += moveX * 0.5 * tickrate;
thePaddle->x += moveX * 0.3 * tickrate;
if (thePaddle->x < 0 - (thePaddle->width / 2)) thePaddle->x = 0 - (thePaddle->width / 2);
if (thePaddle->x > winWidth - (thePaddle->width / 2)) thePaddle->x = winWidth - (thePaddle->width / 2);
}
@ -143,4 +143,4 @@ void updateBall(Uint32 tickrate, ball *theBall, paddle *thePaddle, int winWidth,
theBall->x = thePaddle->x - (double)(winWidth / 2) + (thePaddle->width) / 2;
theBall->y = 26 - (double)(winHeight / 2);
}
}
}