ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el19tb

Dependencies:   mbed

GraphicEngine/GraphicEngine.h

Committer:
el19tb
Date:
2020-05-18
Revision:
42:04e326dcf09b
Parent:
40:8cc82e3fce06
Child:
43:2cd1cfe07770

File content as of revision 42:04e326dcf09b:

#ifndef GRAPHICENGINE_H
#define GRAPHICENGINE_H

#include "Frog.h"
#include "Object.h"

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

class GraphicEngine 
{
    public:
        typedef struct 
        {
            float x;
            int y;
        } ObjectParam;
        
    public:
        
        GraphicEngine();
    public:
        
        N5110 lcd;

    public:     
        
        //initialize the LCD
        void init();  

        // clear lcd screen      
        void clear();
        
        // refresh to the next state
        void refresh();
        
        // 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 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