From 965f3e3dbf3ea10479039b58808ac139428c9191 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Mon, 28 Nov 2011 11:48:02 +0100 Subject: [PATCH] Pong no longer shakes as much the first few frames. --- games/pong.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/games/pong.cpp b/games/pong.cpp index f0c9cb28..0df5e101 100644 --- a/games/pong.cpp +++ b/games/pong.cpp @@ -74,10 +74,10 @@ void Reset() ballx = width/2; bally = height/2; - oldballx = ballx; - oldbally = bally; ballvelx = -1; ballvely = -1; + oldballx = ballx - ballvelx; + oldbally = bally - ballvely; p1y = (height-padsize) / 5; p2y = (height-padsize) / 5; p1vup = false; @@ -239,11 +239,11 @@ int main(int argc, char* argv[]) while (true) { + Thread::USleep(sleepms * 1000); ReadInput(); Update(); UpdateUI(); FlushVGA(); - Thread::USleep(sleepms * 1000); if ( soundleft < 0 ) { continue; } if ( soundleft <= 50 ) {