- Timestamp:
- 20/11/07 21:58:59 (14 months ago)
- Location:
- nds/trunk
- Files:
-
- 1 removed
- 1 modified
-
comp_peter_pong/source/main.cpp (modified) (3 diffs)
-
test (deleted)
Legend:
- Unmodified
- Added
- Removed
-
nds/trunk/comp_peter_pong/source/main.cpp
r15 r17 35 35 float balldy; 36 36 37 player1 = player2 = 0; 38 37 39 powerON(POWER_ALL); 38 40 … … 78 80 79 81 // straight to paddle 80 balldx =0.002f;81 balldy = 0.f;82 // balldx = -0.002f; 83 // balldy = 0.f; 82 84 83 85 while (1) { … … 199 201 float playerX; 200 202 playerX = getPlayerPos(player); 201 // if ( 202 // playerY - PADDLE_HEIGHT2 > yBall && 203 // playerY + PADDLE_HEIGHT2 < yBall 204 // ) { 205 206 if (player) { 207 if ( 208 playerX - REAL_PADDLE_WIDTH > xBall && 209 playerX + REAL_PADDLE_WIDTH < xBall 210 ) { 211 *xxBall = -*xxBall; 203 if ( 204 playerY - PADDLE_HEIGHT2 < yBall && 205 playerY + PADDLE_HEIGHT2 > yBall 206 ) { 207 if (player) { 208 if (playerX - REAL_PADDLE_WIDTH < xBall && playerX + REAL_PADDLE_WIDTH > xBall) { 209 *xxBall = -*xxBall; 210 } 211 } else { 212 if (playerX - REAL_PADDLE_WIDTH < xBall && playerX + REAL_PADDLE_WIDTH > xBall) { 213 *xxBall = -*xxBall; 214 } 212 215 } 213 216 } 214 215 217 } 216 218