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
Diff: Fruit.h
- Revision:
- 3:aecb8ec9c91d
- Parent:
- 2:15120c2cf507
- Child:
- 4:7310089c4a57
--- a/Fruit.h Sat Apr 22 12:32:50 2017 +0000 +++ b/Fruit.h Thu Apr 27 12:40:16 2017 +0000 @@ -13,23 +13,122 @@ ~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// - void draw_pineapple(int x, int y, N5110 &lcd); + + /** 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: