[Plib-cvs] plib/demos/simon/astropong astropong.psl,1.2,1.3
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2002-09-22 15:22:24
|
Update of /cvsroot/plib/plib/demos/simon/astropong In directory usw-pr-cvs1:/tmp/cvs-serv23622/plib/demos/simon/astropong Modified Files: astropong.psl Log Message: Changed the expression handler to handle the difference between an lvalue and an rvalue. This enabled the assignment statement code to be moved down into expression handling where it belongs. Hence multiple assignments - and assignments tucked away in weird places should now work. Index: astropong.psl =================================================================== RCS file: /cvsroot/plib/plib/demos/simon/astropong/astropong.psl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- astropong.psl 15 Sep 2002 02:31:49 -0000 1.2 +++ astropong.psl 22 Sep 2002 15:22:21 -0000 1.3 @@ -148,13 +148,12 @@ ballSZ = -fabs ( hitZ / 2.0 ) ; ballSY = -ballSY ; - // printf("Blue hit the planet!\n"); } else { scoreR++ ; - // printf("The score is Red:%d Blue:%d\n", scoreR, scoreB ) ; + print ("The score is Red:", scoreR, " Blue:", scoreB, "\n" ) ; ballSX = 0.1 ; ballSY = 0.1 ; @@ -163,7 +162,7 @@ ballX = 0.0 ; ballY = 0.0 ; ballZ = 0.0; - // sleep(1); + for ( int i = 0 ; i < 60 ; i++ ) pause ; } } @@ -189,20 +188,19 @@ ballSZ = -fabs ( hitZ / 2.0 ) ; ballSY = -ballSY ; - // printf("Red hit the planet!\n") ; } else { scoreB++ ; - // printf("The score is Red:%d Blue:%d\n", scoreR, scoreB ) ; + print ("The score is Red:", scoreR, " Blue:", scoreB, "\n" ) ; ballSX = .1 ; ballSY = .1 ; ballSZ = .1; ballSY = -ballSY ; - // sleep(1); ballX = 0.0 ; ballY = 0.0 ; ballZ = 0.0; + for ( int i = 0 ; i < 60 ; i++ ) pause ; } } |