![](/media/cache/profiles/LinkedIn_0NghoZJ.jpeg.50x50_q85.jpg)
Snake vs Block Game to be run upon K64F.
Diff: MenuClasses/StartScreen/StartScreen.h
- Revision:
- 67:39b9ba6019b0
- Parent:
- 66:e47333ffc6ca
- Child:
- 76:7fa91122907f
diff -r e47333ffc6ca -r 39b9ba6019b0 MenuClasses/StartScreen/StartScreen.h --- a/MenuClasses/StartScreen/StartScreen.h Fri May 03 22:39:38 2019 +0000 +++ b/MenuClasses/StartScreen/StartScreen.h Sat May 04 12:28:04 2019 +0000 @@ -11,60 +11,66 @@ class StartScreen { - public: - +public: + StartScreen(); ~StartScreen(); - + /** Initialise StartScreen * * This function initialises the Game Interface and restarts the display. */ void init(); - + /** Draw * * This function draws the Sprite onto the screen. */ void titleScreen(N5110 &lcd, Gamepad &pad); - + /** Instruct * * This function updates the user about how to progress after the game banner has been displayed.. */ void instruct(N5110 &lcd, Gamepad &pad); - + /** Display userID * * This function shows who the author of the game is before showing the menu screen. */ void credits(N5110 &lcd); - + /** Read Stats * * This function just reads the current top level stored in the sd card and saves it for displaying in the menu. */ void read_stats(SDFileSystem &sd); - + /** Check Back Pressed * * This function makes a centralised approach to check when back is pressed in a loop, so that it can be used to exit it and also go to. * the previous menu option. */ bool checkBackPressed(Gamepad &pad); - + /** The Menu Screen * * This function obtains the user input on how they want to progress. */ - void menuScreen(N5110 &lcd, Gamepad &pad); - + void menu(N5110 &lcd, Gamepad &pad); + /** Main Menu * * This function displays all the Main Menu contents to the player. */ void mainMenu(N5110 &lcd, Gamepad &pad); - + + /** Draw Selection Arrow + * + * This function draws arrow to select main menu options. + */ + void drawSelectionArrow(N5110 &lcd, Gamepad &pad); + /** Implementing The First Menu Screen * * This function just implements the things decided in main menu. @@ -76,69 +82,69 @@ * This function obtains the user input on the game type they would like to play. */ void game_mode(N5110 &lcd, Gamepad &pad); - + /** Displaying Mode Options * * This function displays game_mode contents. */ - void ModeOptions(N5110 &lcd); - + void showModeOptions(N5110 &lcd); + /** Selecting the game mode * * value of g_mode is changed in this function that allows the choise beteen joystick/motion control.. */ - void SelectMode(Gamepad &pad); - + void selectMode(Gamepad &pad); + /** Motion Control Instructions * * This promts the user to press A to centre position their angle if Motion Control is selected.. */ void motionControlInstructions(N5110 &lcd); - + /** The Third Menu Screen * * This function obtains the user input on the game speed that suits them. */ void game_speed(N5110 &lcd, Gamepad &pad); - + /** Implementing GS * * This function just decides what has to be done next. */ void selectSpeedPage(Gamepad &pad); - + /** Displaying GAME speed Contents * * This function just displays game_speed contents. */ void showSpeedOptions(N5110 &lcd); - + //SETTING THE GAME SPEED AND GAME MODE. int fps; // this sends over the game speed int g_mode; //this helps to select between joystick and motion control. - int gameSpeedIndex; - + int speed_index; + //MENU OPTIONS INDEX. - int i; - + int menu_index; + //VARIABLE USED TO DECIDE WEATHER TO SHOW CREDITS. int showCredits; - + //VARIABLE USED TO DECIDE THE WAIT TIME OF THE MENU PAGES. float controlSensitivity; - + //VARIABLES TO TOGGLE BACK AND FORTH BETWEEN MENU OPTIONS. bool _backPressed; //remembers if back is pressed. bool _startPressed; //remembers if start is pressed. - - private: - + +private: + //OBJECT DECLARATIONS Stats _stats; Settings _settings; Tutorial _tutorial; - + }; #endif \ No newline at end of file