ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el19tb

Dependencies:   mbed

Committer:
el19tb
Date:
Wed May 13 03:59:27 2020 +0000
Revision:
13:cd6d2f999057
Parent:
8:52794de935b2
Child:
18:6be4c3c94a3d
the sprites appear to the screen, updated GraphicEngine

Who changed what in which revision?

UserRevisionLine numberNew 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 3:648c9d5001be 23
el19tb 3:648c9d5001be 24 public:
el19tb 3:648c9d5001be 25
el19tb 5:6e3afee7eac3 26 Car *car1;
el19tb 5:6e3afee7eac3 27 Chicken *chick;
el19tb 5:6e3afee7eac3 28
el19tb 5:6e3afee7eac3 29 GraphicEngine(Chicken *chicken);
el19tb 5:6e3afee7eac3 30
el19tb 5:6e3afee7eac3 31 N5110 lcd;
el19tb 5:6e3afee7eac3 32
el19tb 5:6e3afee7eac3 33 //initialize the LCD
el19tb 5:6e3afee7eac3 34 void init();
el19tb 5:6e3afee7eac3 35
el19tb 5:6e3afee7eac3 36 //draws the chicken to the LCD screen
el19tb 5:6e3afee7eac3 37 void showChicken();
el19tb 3:648c9d5001be 38
el19tb 5:6e3afee7eac3 39 //draws an individual car to the screen
el19tb 5:6e3afee7eac3 40 void showCar(Car *car);
el19tb 5:6e3afee7eac3 41
el19tb 5:6e3afee7eac3 42 void clear();
el19tb 5:6e3afee7eac3 43
el19tb 5:6e3afee7eac3 44 void refresh();
el19tb 8:52794de935b2 45 void print();
el19tb 5:6e3afee7eac3 46
el19tb 5:6e3afee7eac3 47 void contrast();
el19tb 5:6e3afee7eac3 48
el19tb 5:6e3afee7eac3 49 void backLightOn();
el19tb 5:6e3afee7eac3 50 void printTest();
el19tb 5:6e3afee7eac3 51
el19tb 5:6e3afee7eac3 52 void showIndividualCar(Car *car);
el19tb 5:6e3afee7eac3 53 void displayCar(DrawCar &size);
el19tb 3:648c9d5001be 54
el19tb 3:648c9d5001be 55
el19tb 3:648c9d5001be 56 };
el19tb 3:648c9d5001be 57
el19tb 3:648c9d5001be 58 #endif
el19tb 3:648c9d5001be 59
el19tb 3:648c9d5001be 60