Update of /cvsroot/plib/plib/demos/simon/astropong
In directory usw-pr-cvs1:/tmp/cvs-serv7115/plib/demos/simon/astropong
Added Files:
astropong.psl
Log Message:
Added the AstroPong demo. Fixed up a couple of bugs in PSL.
--- NEW FILE: astropong.psl ---
#define ARENA_SIZE 8.0 /* meters */
#define ARENA_LENGTH 10.0 /* meters */
#define BALL_SIZE 2.5 /* meters */
#define BOUNCE (ARENA_SIZE/2.0 - BALL_SIZE/2.0)
#define BOUNCEY (ARENA_LENGTH/2.0 - BALL_SIZE/2.0)
#define BAT_SIZE (1.0 + BALL_SIZE/2.0) /* From the center to the sides */
int arena ;
int shadow ;
int difficulty ;
int scoreBoardR ;
int scoreBoardB ;
int ball ;
int bPaddle ;
int rPaddle ;
int camera ;
[...189 lines suppressed...]
if ( rpaddleZ < -BOUNCE ) rpaddleZ = -BOUNCE ;
/* Tell SIMON where to position the paddle, ball and camera */
/* MODEL X, Y, Z, H, P, R */
siPosition ( scoreBoardR, 1, 0, 0, 0, scoreSpinR, 0 ) ;
siPosition ( scoreBoardB, -1, 0, 0, 0, scoreSpinB, 0 ) ;
siPosition ( bPaddle , bpaddleX, 5, bpaddleZ, 0, 0 , 0 ) ;
siPosition ( rPaddle , rpaddleX, -5, rpaddleZ, 0, 0 , 0 ) ;
siPosition ( ball , ballX, ballY, ballZ,
ballSpinH,ballSpinP,ballSpinR);
siPosition ( arena , 0, 0, 0, 0, 0 , 0 ) ;
siPosition ( shadow , ballX, ballY, -4, 0, 0 , 0 ) ;
siPosition ( camera , 0, -10, 0, 0, 0 , 0 ) ;
pause ;
}
}
|