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
Diff: GraphicEngine/GraphicEngine.h
- Revision:
- 42:04e326dcf09b
- Parent:
- 40:8cc82e3fce06
- Child:
- 43:2cd1cfe07770
--- a/GraphicEngine/GraphicEngine.h Mon May 18 03:12:30 2020 +0000 +++ b/GraphicEngine/GraphicEngine.h Mon May 18 04:39:06 2020 +0000 @@ -1,68 +1,71 @@ #ifndef GRAPHICENGINE_H #define GRAPHICENGINE_H -#include "Car.h" -#include "Chicken.h" -#include "Square.h" -#include "Vehicle.h" +#include "Frog.h" +#include "Object.h" #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include <vector> -class GraphicEngine { +class GraphicEngine +{ public: - typedef struct { - int x; - int y; - int width; - int height; - - } DrawCar; - typedef struct { - int x; - int row; - } DrawRoad; - + float x; + int y; + } ObjectParam; + public: - - Car *car1; - Chicken *chick; GraphicEngine(); - GraphicEngine(Chicken *chicken); + public: N5110 lcd; + + public: //initialize the LCD - void init(); - - //draws the chicken to the LCD screen - void showChicken(); - - //draws an individual car to the screen - void showCar(Car *car); - + void init(); + + // clear lcd screen void clear(); + // refresh to the next state void refresh(); - void print(); + // set contrast void contrast(); + // turn on backlight of lcd void backLightOn(); + + void printTest(); void printLoser(); + void print(); + void showIndividualCar(Car *car); - void displayCar(DrawCar &size); + void displayCar(DrawCar &size); + void drawGoalPost(); + //draws the chicken to the LCD screen + void showFrog(Frog &frog); + //draws an individual car to the screen + void showObj(Object &obj); + + void displayLog(int x, int y, char c); + void displayVehicle(int x, int y, char c); + + void drawSafetyLanes(); + }; #endif + \ No newline at end of file