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
GraphicEngine/GraphicEngine.h@18:6be4c3c94a3d, 2020-05-14 (annotated)
- Committer:
- el19tb
- Date:
- Thu May 14 03:53:16 2020 +0000
- Revision:
- 18:6be4c3c94a3d
- Parent:
- 13:cd6d2f999057
- Child:
- 40:8cc82e3fce06
fixed bugs regarding car lanes, started fixing bugs regarding safety lanes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el19tb | 3:648c9d5001be | 1 | #ifndef GRAPHICENGINE_H |
el19tb | 3:648c9d5001be | 2 | #define GRAPHICENGINE_H |
el19tb | 3:648c9d5001be | 3 | |
el19tb | 3:648c9d5001be | 4 | #include "Car.h" |
el19tb | 3:648c9d5001be | 5 | #include "Chicken.h" |
el19tb | 3:648c9d5001be | 6 | #include "Square.h" |
el19tb | 13:cd6d2f999057 | 7 | #include "Vehicle.h" |
el19tb | 3:648c9d5001be | 8 | |
el19tb | 3:648c9d5001be | 9 | #include "mbed.h" |
el19tb | 3:648c9d5001be | 10 | #include "N5110.h" |
el19tb | 3:648c9d5001be | 11 | #include "Gamepad.h" |
el19tb | 4:aae7f8d4ab78 | 12 | #include <vector> |
el19tb | 3:648c9d5001be | 13 | |
el19tb | 3:648c9d5001be | 14 | class GraphicEngine { |
el19tb | 5:6e3afee7eac3 | 15 | public: |
el19tb | 5:6e3afee7eac3 | 16 | typedef struct { |
el19tb | 5:6e3afee7eac3 | 17 | int x; |
el19tb | 5:6e3afee7eac3 | 18 | int y; |
el19tb | 5:6e3afee7eac3 | 19 | int width; |
el19tb | 5:6e3afee7eac3 | 20 | int height; |
el19tb | 5:6e3afee7eac3 | 21 | |
el19tb | 5:6e3afee7eac3 | 22 | } DrawCar; |
el19tb | 18:6be4c3c94a3d | 23 | |
el19tb | 18:6be4c3c94a3d | 24 | typedef struct |
el19tb | 18:6be4c3c94a3d | 25 | { |
el19tb | 18:6be4c3c94a3d | 26 | int x; |
el19tb | 18:6be4c3c94a3d | 27 | int row; |
el19tb | 18:6be4c3c94a3d | 28 | } DrawRoad; |
el19tb | 3:648c9d5001be | 29 | |
el19tb | 3:648c9d5001be | 30 | public: |
el19tb | 3:648c9d5001be | 31 | |
el19tb | 5:6e3afee7eac3 | 32 | Car *car1; |
el19tb | 5:6e3afee7eac3 | 33 | Chicken *chick; |
el19tb | 5:6e3afee7eac3 | 34 | |
el19tb | 5:6e3afee7eac3 | 35 | GraphicEngine(Chicken *chicken); |
el19tb | 5:6e3afee7eac3 | 36 | |
el19tb | 5:6e3afee7eac3 | 37 | N5110 lcd; |
el19tb | 5:6e3afee7eac3 | 38 | |
el19tb | 5:6e3afee7eac3 | 39 | //initialize the LCD |
el19tb | 5:6e3afee7eac3 | 40 | void init(); |
el19tb | 5:6e3afee7eac3 | 41 | |
el19tb | 5:6e3afee7eac3 | 42 | //draws the chicken to the LCD screen |
el19tb | 5:6e3afee7eac3 | 43 | void showChicken(); |
el19tb | 3:648c9d5001be | 44 | |
el19tb | 5:6e3afee7eac3 | 45 | //draws an individual car to the screen |
el19tb | 5:6e3afee7eac3 | 46 | void showCar(Car *car); |
el19tb | 5:6e3afee7eac3 | 47 | |
el19tb | 5:6e3afee7eac3 | 48 | void clear(); |
el19tb | 5:6e3afee7eac3 | 49 | |
el19tb | 5:6e3afee7eac3 | 50 | void refresh(); |
el19tb | 8:52794de935b2 | 51 | void print(); |
el19tb | 5:6e3afee7eac3 | 52 | |
el19tb | 5:6e3afee7eac3 | 53 | void contrast(); |
el19tb | 5:6e3afee7eac3 | 54 | |
el19tb | 5:6e3afee7eac3 | 55 | void backLightOn(); |
el19tb | 5:6e3afee7eac3 | 56 | void printTest(); |
el19tb | 5:6e3afee7eac3 | 57 | |
el19tb | 5:6e3afee7eac3 | 58 | void showIndividualCar(Car *car); |
el19tb | 5:6e3afee7eac3 | 59 | void displayCar(DrawCar &size); |
el19tb | 3:648c9d5001be | 60 | |
el19tb | 3:648c9d5001be | 61 | |
el19tb | 3:648c9d5001be | 62 | }; |
el19tb | 3:648c9d5001be | 63 | |
el19tb | 3:648c9d5001be | 64 | #endif |
el19tb | 3:648c9d5001be | 65 | |
el19tb | 3:648c9d5001be | 66 |