Home
last modified time | relevance | path

Searched refs:ball_vel (Results 1 – 1 of 1) sorted by relevance

/Zephyr-latest/samples/boards/bbc/microbit/pong/src/
Dmain.c104 static struct x_y ball_vel = { 0, 0 }; variable
256 ball_vel.y = BALL_VEL_Y_START; in check_start()
262 ball_vel.x = 2 + rnd; in check_start()
264 ball_vel.x = -2 - rnd; in check_start()
336 ball_pos.x += ball_vel.x; in game_refresh()
337 ball_pos.y += ball_vel.y; in game_refresh()
340 if (ball_vel.y < 0 && ball_pos.y < BALL_POS_Y_MIN) { in game_refresh()
343 ball_vel.y = -ball_vel.y; in game_refresh()
347 -ball_vel.x, -ball_vel.y); in game_refresh()
356 ball_vel.x = -ball_vel.x; in game_refresh()
[all …]