Snake vs Block Game to be run upon K64F.

Dependencies:   mbed

Revision:
83:329da564799a
Parent:
76:7fa91122907f
Child:
84:9950d561fdf8
--- a/MenuClasses/StartScreen/StartScreen.h	Mon May 06 10:49:50 2019 +0000
+++ b/MenuClasses/StartScreen/StartScreen.h	Mon May 06 14:28:35 2019 +0000
@@ -20,25 +20,25 @@
     *
     *   This function initialises the Game Interface and restarts the display.
     */
-    void init();
+    void init(N5110 *lcd, Gamepad *pad);
 
     /** Draw
     *
     *   This function draws the Sprite onto the screen.
     */
-    void titleScreen(N5110 &lcd, Gamepad &pad);
+    void titleScreen();
 
     /** Instruct
     *
     *   This function updates the user about how to progress after the game banner has been displayed..
     */
-    void instruct(N5110 &lcd, Gamepad &pad);
+    void instruct();
 
     /** Display userID
     *
     *   This function shows who the author of the game is before showing the menu screen.
     */
-    void credits(N5110 &lcd);
+    void credits();
 
     /** Read Stats
     *
@@ -51,73 +51,73 @@
     *   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);
+    bool checkBackPressed();
 
     /** The Menu Screen
     *
     *   This function obtains the user input on how they want to progress.
     */
-    void menu(N5110 &lcd, Gamepad &pad);
+    void menu();
 
     /** Main Menu
     *
     *   This function displays all the Main Menu contents to the player.
     */
-    void mainMenu(N5110 &lcd, Gamepad &pad);
+    void mainMenu();
 
     /** Draw Selection Arrow
     *
     *   This function draws arrow to select main menu options.
     */
-    void drawSelectionArrow(N5110 &lcd, Gamepad &pad);
+    void drawSelectionArrow();
 
     /** Implementing The First Menu Screen
     *
     *   This function just implements the things decided in main menu.
     */
-    void nextMenu(N5110 &lcd, Gamepad &pad);
+    void nextMenu();
 
     /** The Second Menu Screen
     *
     *   This function obtains the user input on the game type they would like to play.
     */
-    void game_mode(N5110 &lcd, Gamepad &pad);
+    void game_mode();
 
     /** Displaying Mode Options
     *
     *   This function displays game_mode contents.
     */
-    void selectMode(N5110 &lcd, Gamepad &pad);
+    void selectMode();
 
     /** Selecting the game mode
     *
     *   value of g_mode is changed in this function that allows the choise beteen joystick/motion control..
     */
-    void scrollModeSelection(Gamepad &pad);
+    void scrollModeSelection();
 
     /** Motion Control Instructions
     *
     *   This promts the user to press A to centre position their angle if Motion Control is selected..
     */
-    void motionControlInstructions(N5110 &lcd);
+    void motionControlInstructions();
 
     /** The Third Menu Screen
     *
     *   This function obtains the user input on the game speed that suits them.
     */
-    void game_speed(N5110 &lcd, Gamepad &pad);
+    void game_speed();
     
     /** Displaying GAME speed Contents
     *
     *   This function just displays game_speed contents.
     */
-    void selectSpeed(N5110 &lcd, Gamepad &pad);
+    void selectSpeed();
 
     /** Implementing GS
     *
     *   This function just decides what has to be done next.
     */
-    void scrollSpeedSelection(Gamepad &pad);
+    void scrollSpeedSelection();
 
 
     //SETTING THE GAME SPEED AND GAME MODE.
@@ -144,6 +144,11 @@
     Stats _stats;
     Settings _settings;
     Tutorial _tutorial;
+    
+    //Pointer to the game pad object pad.
+    Gamepad *_pad;
+    //Pointer to the N5110 object lcd.
+    N5110 *_lcd;