ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el19tb

Dependencies:   mbed

GraphicEngine/GraphicEngine.h

Committer:
el19tb
Date:
2020-05-14
Revision:
18:6be4c3c94a3d
Parent:
13:cd6d2f999057
Child:
40:8cc82e3fce06

File content as of revision 18:6be4c3c94a3d:

#ifndef GRAPHICENGINE_H
#define GRAPHICENGINE_H

#include "Car.h"
#include "Chicken.h"
#include "Square.h"
#include "Vehicle.h"

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include <vector>

class GraphicEngine {
    public:
        typedef struct {
            int x;
            int y;
            int width;
            int height;
            
        } DrawCar;
        
        typedef struct 
        {
            int x;
            int row;        
        } DrawRoad;
    
    public:
    
        Car *car1;
        Chicken *chick;
        
        GraphicEngine(Chicken *chicken);
        
        N5110 lcd;
        
        //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 clear();
        
        void refresh();
        void print();
        
        void contrast();
        
        void backLightOn();
        void printTest();
        
        void showIndividualCar(Car *car);
        void displayCar(DrawCar &size);

    
};

#endif