mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Pong no longer shakes as much the first few frames.
This commit is contained in:
parent
1686b2b903
commit
965f3e3dbf
1 changed files with 3 additions and 3 deletions
|
@ -74,10 +74,10 @@ void Reset()
|
||||||
|
|
||||||
ballx = width/2;
|
ballx = width/2;
|
||||||
bally = height/2;
|
bally = height/2;
|
||||||
oldballx = ballx;
|
|
||||||
oldbally = bally;
|
|
||||||
ballvelx = -1;
|
ballvelx = -1;
|
||||||
ballvely = -1;
|
ballvely = -1;
|
||||||
|
oldballx = ballx - ballvelx;
|
||||||
|
oldbally = bally - ballvely;
|
||||||
p1y = (height-padsize) / 5;
|
p1y = (height-padsize) / 5;
|
||||||
p2y = (height-padsize) / 5;
|
p2y = (height-padsize) / 5;
|
||||||
p1vup = false;
|
p1vup = false;
|
||||||
|
@ -239,11 +239,11 @@ int main(int argc, char* argv[])
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
Thread::USleep(sleepms * 1000);
|
||||||
ReadInput();
|
ReadInput();
|
||||||
Update();
|
Update();
|
||||||
UpdateUI();
|
UpdateUI();
|
||||||
FlushVGA();
|
FlushVGA();
|
||||||
Thread::USleep(sleepms * 1000);
|
|
||||||
if ( soundleft < 0 ) { continue; }
|
if ( soundleft < 0 ) { continue; }
|
||||||
if ( soundleft <= 50 )
|
if ( soundleft <= 50 )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue