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
Revision 12:bc9a43f56261, committed 2019-05-10
- Comitter:
- batJoro
- Date:
- Fri May 10 14:38:36 2019 +0000
- Parent:
- 11:0e6a221ad8a9
- Commit message:
- final3
Changed in this revision
--- a/Car/car.h Fri May 10 13:58:51 2019 +0000
+++ b/Car/car.h Fri May 10 14:38:36 2019 +0000
@@ -139,20 +139,20 @@
private:
- int _fuel; // for future development
- int _health; // for future development
- int _direction; // variable to display the turning car
- int _gear; // gear of the car [1:3]
+ int _fuel; /**<int for future development */
+ int _health; /**<int for future development */
+ int _direction; /**<int choice to display the turning car */
+ int _gear; /**<int the gear between 1 and 3 */
- float _rev; // revs based on the gear
- float _car_distance; // distance the car has travelled
- float _speed; // car speed
- float _car_position;
+ float _rev; /**<float revs based on the gear */
+ float _car_distance; /**<float the distance of the car */
+ float _speed; /**<float car speed */
+ float _car_position; /**<float car position before parsing */
// pictures to draw car in different direction
- static int car1[];
- static int car2[];
- static int car3[];
+ static int car1[]; /**<static int car goes straight */
+ static int car2[]; /**<static int car goes to the right */
+ static int car3[]; /**<static int car goes to the left */
};
--- a/GameEngine/engine.cpp Fri May 10 13:58:51 2019 +0000
+++ b/GameEngine/engine.cpp Fri May 10 14:38:36 2019 +0000
@@ -38,10 +38,19 @@
addSegment(1.0f, 600.0f);
addSegment(-1.0f, 600.0f);
addSegment(-1.0f, 600.0f);
+ addSegment(1.0f, 140.0f);
+ addSegment(-1.0f, 150.0f);
addSegment(1.0f, 600.0f);
addSegment(-1.0f, 600.0f);
- addSegment(1.0f, 600.0f);
+ addSegment(1.0f, 200.0f);
+ addSegment(-1.0f, 600.0f);
+ addSegment(0.0f, 500.0f);
addSegment(-1.0f, 600.0f);
+ addSegment(1.0f, 200.0f);
+ addSegment(1.0f, 140.0f);
+ addSegment(-1.0f, 50.0f);
+ addSegment(1.0f, 140.0f);
+ addSegment(-1.0f, 150.0f);
addSegment(0.0f, 700.0f);
// find how long is the track
--- a/GameEngine/engine.h Fri May 10 13:58:51 2019 +0000
+++ b/GameEngine/engine.h Fri May 10 14:38:36 2019 +0000
@@ -124,14 +124,14 @@
vector<MapSegment> track; // fields: curvature distance
- int _screen_height;
- int _screen_width;
- int _lap;
+ int _screen_height; /**<int screen height */
+ int _screen_width; /**<int screen width */
+ int _lap; /**<int counter for the laps */
- float _track_curvature;
- float _track_distance;
+ float _track_curvature; /**<float variable helping for calulating road curvature */
+ float _track_distance; /**<float he length of the track */
- float _lap_time;
+ float _lap_time; /**<float lap time */
};
--- a/Map/map.h Fri May 10 13:58:51 2019 +0000
+++ b/Map/map.h Fri May 10 14:38:36 2019 +0000
@@ -49,8 +49,8 @@
void set_timed_curvature(float _timed_curvature);
private:
- float _player_curvature;
- float _timed_curvature;
+ float _player_curvature; /**<float variable to measure how far is the player from desired curvature */
+ float _timed_curvature; /**<float curvature of the track with speed taken into account */
};
#endif
\ No newline at end of file
--- a/Menu/menu.h Fri May 10 13:58:51 2019 +0000
+++ b/Menu/menu.h Fri May 10 14:38:36 2019 +0000
@@ -64,13 +64,13 @@
private:
int number_of_sprites;
- static int logo0[];
- static int choice1[];
- static int choice2[];
- static int choice1_dark[];
- static int choice2_dark[];
- static int selector[];
- static int clr_selector[];
+ static int logo0[]; /**<static int logo */
+ static int choice1[]; /**<static int menu option 1 light */
+ static int choice2[]; /**< static int menu option 2 light */
+ static int choice1_dark[];/**<static int menu option 1 dark */
+ static int choice2_dark[];/**<static int menu option 2 dark */
+ static int selector[]; /**<static int selector to highlight the options */
+ static int clr_selector[]; /**<static int clear selector */
};
--- a/main.cpp Fri May 10 13:58:51 2019 +0000
+++ b/main.cpp Fri May 10 14:38:36 2019 +0000
@@ -72,7 +72,7 @@
void welcome() {
Menu menu;
- //menu.intro(lcd, gamepad);
+ menu.intro(lcd, gamepad);
menu.startMainMenu(lcd, gamepad);
}