Simple fish eat program

Dependencies:   mbed mbed-rtos N5110 ShiftReg Tone

Committer:
el18a2k
Date:
Mon Aug 02 14:35:02 2021 +0000
Revision:
14:f1552b691274
Parent:
12:20ac766b3175
final

Who changed what in which revision?

UserRevisionLine numberNew contents of line
el18a2k 14:f1552b691274 1 /* Fish Eat Game v2.0
el18a2k 14:f1552b691274 2 * Author: Andrew Knowles
el18a2k 14:f1552b691274 3 * Date: 21/04/2021
el18a2k 14:f1552b691274 4 * Note: See hearder files for additional recognistion */
el18a2k 14:f1552b691274 5
el18a2k 0:cf9660998431 6 #ifndef GRAPHICS_H
el18a2k 0:cf9660998431 7 #define GRAPHICS_H
el18a2k 0:cf9660998431 8
el18a2k 0:cf9660998431 9 #include "N5110.h"
el18a2k 0:cf9660998431 10
el18a2k 0:cf9660998431 11 class Graphics {
el18a2k 0:cf9660998431 12
el18a2k 0:cf9660998431 13 public:
el18a2k 12:20ac766b3175 14 //creates the game title screen
el18a2k 12:20ac766b3175 15 void titleScreen(N5110 &lcd);
el18a2k 12:20ac766b3175 16
el18a2k 12:20ac766b3175 17 //waits for player to press A
el18a2k 12:20ac766b3175 18 void confirmationScreen(N5110 &lcd);
el18a2k 3:8c9c9794bcf2 19
el18a2k 3:8c9c9794bcf2 20 /* If the ScreenFlash function doesnt operate as intended check that the LCD
el18a2k 3:8c9c9794bcf2 21 * screen its self is seated correctly as this seems to be an issue*/
el18a2k 12:20ac766b3175 22
el18a2k 12:20ac766b3175 23 //flashes LCD screen
el18a2k 12:20ac766b3175 24 void screenFlash(N5110 &lcd);
el18a2k 12:20ac766b3175 25
el18a2k 12:20ac766b3175 26 //displays new high score screen
el18a2k 12:20ac766b3175 27 void newHighscore(N5110 &lcd, int score);
el18a2k 12:20ac766b3175 28
el18a2k 12:20ac766b3175 29 //displays playing instructions
el18a2k 12:20ac766b3175 30 void playerInstruc(N5110 &lcd);
el18a2k 12:20ac766b3175 31
el18a2k 12:20ac766b3175 32 //gameover screen
el18a2k 12:20ac766b3175 33 void gameOver(N5110 &lcd);
el18a2k 3:8c9c9794bcf2 34
el18a2k 10:e221bd1ce3ec 35 //player fish
el18a2k 10:e221bd1ce3ec 36 void Fish_1(N5110 &lcd, int _x, int _y); //draws fish 1 (smallest fish)
el18a2k 10:e221bd1ce3ec 37 void Fish_2(N5110 &lcd, int _x, int _y); //draws fish 2
el18a2k 10:e221bd1ce3ec 38 void Fish_3(N5110 &lcd, int _x, int _y); //draws fish 3
el18a2k 10:e221bd1ce3ec 39 void Fish_4(N5110 &lcd, int _x, int _y); //draws fish 4 (largest fish)
el18a2k 10:e221bd1ce3ec 40
el18a2k 10:e221bd1ce3ec 41 //enemy fish
el18a2k 10:e221bd1ce3ec 42 void E_Fish_1(N5110 &lcd, int _x, int _y); //draws fish 1 (smallest fish
el18a2k 10:e221bd1ce3ec 43 void E_Fish_2(N5110 &lcd, int _x, int _y); //draws fish 2
el18a2k 10:e221bd1ce3ec 44 void E_Fish_3(N5110 &lcd, int _x, int _y); //draws fish 3
el18a2k 10:e221bd1ce3ec 45 void E_Fish_4(N5110 &lcd, int _x, int _y); //draws fish 4 (largest fish)
el18a2k 12:20ac766b3175 46
el18a2k 12:20ac766b3175 47 private:
el18a2k 12:20ac766b3175 48 int i;
el18a2k 12:20ac766b3175 49 char writeScore2[14];
el18a2k 12:20ac766b3175 50 int stringCon2;
el18a2k 0:cf9660998431 51 };
el18a2k 0:cf9660998431 52
el18a2k 0:cf9660998431 53 #endif