Accompanying library for Objects. Library contains five shapes that are selected at random by the Objects library and drawn on to the objects on a Nokia N5110 LCD display.
Dependents: Game_Controller_Project
Fruit.h
- Committer:
- Nathanj94
- Date:
- 2017-04-28
- Revision:
- 4:7310089c4a57
- Parent:
- 3:aecb8ec9c91d
- Child:
- 5:bb459bc1ad0b
File content as of revision 4:7310089c4a57:
#ifndef FRUIT_H #define FRUIT_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" class Fruit { public: Fruit(); ~Fruit(); //STRAWBERRY DRAW/UNDRAW// /** Draw Strawberry * * Use x and y co-ordinates of an initialised object to draw a * strawberry shape on the buffer. * @param x - x co-ordinate reference point * @param y - y co-ordinate reference point * @param lcd - N5110 custom library */ void draw_strawberry(int x, int y, N5110 &lcd); /** Undraw Strawberry * * Use x and y co-ordinates to draw the same shape but with * FILL_WHITE rather than FILL_BLACK to effectively clear it from * the buffer. * @param x - x co-ordinate reference point * @param y - y co-ordinate reference point * @param lcd - N5110 custom library */ void undraw_strawberry(int x, int y, N5110 &lcd); //PINEAPPLE DRAW/UNDRAW// /** Draw Pineapple * * Use x and y co-ordinates of an initialised object to draw a * pineapple shape on the buffer. * @param x - x co-ordinate reference point * @param y - y co-ordinate reference point * @param lcd - N5110 custom library */ void draw_pineapple(int x, int y, N5110 &lcd) /** Undraw Pineapple * * Use x and y co-ordinates to draw the same shape but with * FILL_WHITE rather than FILL_BLACK to effectively clear it from * the buffer. * @param x - x co-ordinate reference point * @param y - y co-ordinate reference point * @param lcd - N5110 custom library */; void undraw_pineapple(int x, int y, N5110 &lcd); //PEAR DRAW/UNDRAW// /** Draw Pear * * Use x and y co-ordinates of an initialised object to draw a * pear shape on the buffer. * @param x - x co-ordinate reference point * @param y - y co-ordinate reference point * @param lcd - N5110 custom library */ void draw_pear(int x, int y, N5110 &lcd); /** Undraw Pear * * Use x and y co-ordinates to draw the same shape but with * FILL_WHITE rather than FILL_BLACK to effectively clear it from * the buffer. * @param x - x co-ordinate reference point * @param y - y co-ordinate reference point * @param lcd - N5110 custom library */ void undraw_pear(int x, int y, N5110 &lcd); //MELON DRAW/UNDRAW// /** Draw Melon * * Use x and y co-ordinates of an initialised object to draw a * melon shape on the buffer. * @param x - x co-ordinate reference point * @param y - y co-ordinate reference point * @param lcd - N5110 custom library */ void draw_melon(int x, int y, N5110 &lcd); /** Undraw Melon * * Use x and y co-ordinates to draw the same shape but with * FILL_WHITE rather than FILL_BLACK to effectively clear it from * the buffer. * @param x - x co-ordinate reference point * @param y - y co-ordinate reference point * @param lcd - N5110 custom library */ void undraw_melon(int x, int y, N5110 &lcd); //ANTIFRUIT DRAW/UNDRAW// /** Draw Antifruit * * Use x and y co-ordinates of an initialised object to draw an * antifruit shape on the buffer. * @param x - x co-ordinate reference point * @param y - y co-ordinate reference point * @param lcd - N5110 custom library */ void draw_antifruit(int x, int y, N5110 &lcd); /** Undraw Antifruit * * Use x and y co-ordinates to draw the same shape but with * FILL_WHITE rather than FILL_BLACK to effectively clear it from * the buffer. * @param x - x co-ordinate reference point * @param y - y co-ordinate reference point * @param lcd - N5110 custom library */ void undraw_antifruit(int x, int y, N5110 &lcd); private: //No private variables required in this class }; #endif