/* * (c) Copyright 1995-1999, Igor Tarasov * FidoNet: 2:5020/370.2 620.20 1103.5 * Inet: itarasov@rtuis.miem.edu.ru * Phone: (095)942-50-97 */ #include #include #include #include #include #include #define racket_w 2 #define racket_delta racket_w/2 #define initial_vilocity 0.1 #define radius 1 double x, y; double racket_x=0; double vx, vy; double right = 5, left = -5, top = 5, bottom = -5; unsigned char array[] = { 0, 0, 0, 0, 124, 15, 128, 248, 126, 15, 128, 248, 127, 15, 128, 248, 127, 143, 128, 248, 127, 207, 128, 248, 127, 239, 128, 248, 127, 255, 128, 248, 127, 255, 128, 248, 125, 255, 128, 248, 124, 255, 128, 248, 124, 127, 128, 248, 124, 63, 128, 248, 124, 31, 192, 248, 124, 15, 224, 248, 124, 15, 240, 248, 124, 15, 248, 248, 124, 15, 252, 248, 124, 15, 254, 248, 124, 15, 255, 248, 124, 15, 191, 248, 124, 15, 159, 248, 124, 15, 143, 248, 124, 15, 135, 248, 124, 15, 131, 248, 124, 15, 129, 248, 124, 15, 128, 248, 128, 15, 128, 4, 128, 15, 128, 4, 255, 255, 255, 252, 255, 255, 255, 252, 255, 255, 255, 252, }; void CALLBACK Key_LEFT(void ) { if(racket_x>left) racket_x -= racket_delta; } void CALLBACK Key_RIGHT(void ) { if(racket_x+racket_wracket_x && xright) { vx = -vx; x += 2*vx; } if(y+radius>top || (y-radius