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@8:52794de935b2, 2020-05-12 (annotated)
- Committer:
- el19tb
- Date:
- Tue May 12 05:14:17 2020 +0000
- Revision:
- 8:52794de935b2
- Parent:
- 5:6e3afee7eac3
- Child:
- 13:cd6d2f999057
implemented the attach function so the frog can jump on a log
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 | 3:648c9d5001be | 7 | |
el19tb | 3:648c9d5001be | 8 | #include "mbed.h" |
el19tb | 3:648c9d5001be | 9 | #include "N5110.h" |
el19tb | 3:648c9d5001be | 10 | #include "Gamepad.h" |
el19tb | 4:aae7f8d4ab78 | 11 | #include <vector> |
el19tb | 3:648c9d5001be | 12 | |
el19tb | 3:648c9d5001be | 13 | class GraphicEngine { |
el19tb | 5:6e3afee7eac3 | 14 | public: |
el19tb | 5:6e3afee7eac3 | 15 | typedef struct { |
el19tb | 5:6e3afee7eac3 | 16 | int x; |
el19tb | 5:6e3afee7eac3 | 17 | int y; |
el19tb | 5:6e3afee7eac3 | 18 | int width; |
el19tb | 5:6e3afee7eac3 | 19 | int height; |
el19tb | 5:6e3afee7eac3 | 20 | |
el19tb | 5:6e3afee7eac3 | 21 | } DrawCar; |
el19tb | 3:648c9d5001be | 22 | |
el19tb | 3:648c9d5001be | 23 | public: |
el19tb | 3:648c9d5001be | 24 | |
el19tb | 5:6e3afee7eac3 | 25 | Car *car1; |
el19tb | 5:6e3afee7eac3 | 26 | Chicken *chick; |
el19tb | 5:6e3afee7eac3 | 27 | |
el19tb | 5:6e3afee7eac3 | 28 | GraphicEngine(Chicken *chicken); |
el19tb | 5:6e3afee7eac3 | 29 | |
el19tb | 5:6e3afee7eac3 | 30 | N5110 lcd; |
el19tb | 5:6e3afee7eac3 | 31 | |
el19tb | 5:6e3afee7eac3 | 32 | //initialize the LCD |
el19tb | 5:6e3afee7eac3 | 33 | void init(); |
el19tb | 5:6e3afee7eac3 | 34 | |
el19tb | 5:6e3afee7eac3 | 35 | //draws the chicken to the LCD screen |
el19tb | 5:6e3afee7eac3 | 36 | void showChicken(); |
el19tb | 3:648c9d5001be | 37 | |
el19tb | 5:6e3afee7eac3 | 38 | //draws an individual car to the screen |
el19tb | 5:6e3afee7eac3 | 39 | void showCar(Car *car); |
el19tb | 5:6e3afee7eac3 | 40 | |
el19tb | 5:6e3afee7eac3 | 41 | void clear(); |
el19tb | 5:6e3afee7eac3 | 42 | |
el19tb | 5:6e3afee7eac3 | 43 | void refresh(); |
el19tb | 8:52794de935b2 | 44 | void print(); |
el19tb | 5:6e3afee7eac3 | 45 | |
el19tb | 5:6e3afee7eac3 | 46 | void contrast(); |
el19tb | 5:6e3afee7eac3 | 47 | |
el19tb | 5:6e3afee7eac3 | 48 | void backLightOn(); |
el19tb | 5:6e3afee7eac3 | 49 | void printTest(); |
el19tb | 5:6e3afee7eac3 | 50 | |
el19tb | 5:6e3afee7eac3 | 51 | void showIndividualCar(Car *car); |
el19tb | 5:6e3afee7eac3 | 52 | void displayCar(DrawCar &size); |
el19tb | 3:648c9d5001be | 53 | |
el19tb | 3:648c9d5001be | 54 | |
el19tb | 3:648c9d5001be | 55 | }; |
el19tb | 3:648c9d5001be | 56 | |
el19tb | 3:648c9d5001be | 57 | #endif |
el19tb | 3:648c9d5001be | 58 | |
el19tb | 3:648c9d5001be | 59 |