Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed FATFileSystem
Diff: Ball/Ball.h
- Revision:
- 10:9f54a6366e94
- Parent:
- 9:bc34f2243e43
- Child:
- 11:6d2027253aa9
--- a/Ball/Ball.h Sat Apr 20 10:42:17 2019 +0000
+++ b/Ball/Ball.h Tue Apr 23 12:03:38 2019 +0000
@@ -12,6 +12,12 @@
RIGHT, /**< right wall */
TOP, /**< top wall */
BOTTOM, /**< bottom wall */
+ BOTTOMLEFT, /**< bottom left 45 deg wall */
+ BOTTOMRIGHT, /**< bottom right 45 deg wall */
+ TOPLEFT, /**< top left 45 deg wall */
+ TOPRIGHT, /**< top right 45 deg wall */
+
+
};
/** Pixel Coordinate Struct*/
@@ -31,7 +37,7 @@
struct Levels {
Coord ball; /**< start position of ball */
Coord hole; /**< position of hole */
- WallMap walls[10]; /**< array of wall plots */
+ WallMap walls[15]; /**< array of wall plots */
int wall_count;
};
@@ -63,7 +69,7 @@
void drawAim(N5110 &lcd, Vector2D joy_coord ,float angle);
- void move_ball(int frame_rate);
+ void move_ball();
Vector2D get_ball_pos();
@@ -86,6 +92,16 @@
void top_bounce(Coord start, Coord end);
void bottom_bounce(Coord start, Coord end);
+
+ void bottom_left_bounce(Coord start, Coord end);
+
+ void bottom_right_bounce(Coord start, Coord end);
+
+ void top_left_bounce(Coord start, Coord end);
+
+ void top_right_bounce(Coord start, Coord end);
+
+ void set_frame_rate(int frame_rate);
private:
@@ -95,6 +111,7 @@
float _y_vel;
int _shot_count;
int _total_shot_count;
+ int _frame_rate;
Direction _direction;
};