![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
“Race Collision” is a one player game in which a truck has to avoid “particles” that appear on the road. By the use of the joystick, the player can guide themselves through the menu system to start the game. The truck is the main element of the game and it can be moved from side to side with the joystick. The road curves randomly from time to time and the player has to be careful to keep the truck within the road boundaries. Particles appear on the screen at random positions and 4 collisions lead to the end of the game.
Dependencies: ELEC2645_JoystickLCD_LPC1768_2021
Diff: lib/N5110.h
- Revision:
- 7:559edc36f261
- Parent:
- 6:40ef2030334c
- Child:
- 8:1fc5e14b0db6
--- a/lib/N5110.h Thu Apr 22 10:52:37 2021 +0000 +++ b/lib/N5110.h Thu Apr 22 16:33:42 2021 +0000 @@ -384,8 +384,23 @@ unsigned int const radius, FillType const fill); - - // Draw Curve + /** Draw Ellipse + * @param xc - x-coordinate of centre + * @param yc - y-coordinate of centre + * @param rx - radius of the minor axis + * @param ry - radius of the major axis + */ + void drawEllipse(unsigned int const xc, + unsigned int const yc, + unsigned int const ry, + unsigned int const rx); + + /** Draw Curve + * @param curve_points - all points that compose the curve + * @param offset - parameter for movememt illusion + * @param dash_line - lenght of the lines that compose the curve + * @param type - 0 white, 1 black + */ void drawCurve(std::vector<Vector2Df> curve_points, float offset, int dash_len,