Adam Baker 201166301

Dependencies:   mbed Gamepad N5110

Revision:
41:4b20f909bbcb
Parent:
40:f53c70793975
Child:
43:11c5d098ce9d
diff -r f53c70793975 -r 4b20f909bbcb Menu/Menu.h
--- a/Menu/Menu.h	Tue May 07 18:07:39 2019 +0000
+++ b/Menu/Menu.h	Wed May 08 15:22:53 2019 +0000
@@ -5,48 +5,100 @@
 #include "Gamepad.h"
 #include "N5110.h"
 
+/** Menu Class
+ * @brief Library for interfacing with ELEC2645 Gamepad PCB, University of Leeds
+ * @author Adam P. Baker
+ */
 
 class Menu
 {
 public:
+/**
+    *@brief Constructor
+    */
     Menu();
+    
+    /**
+    *@brief Deconstructor
+    */
     ~Menu();
-
+    
+    /** 
+    *@brief intialises 
+    */
+    void init();
+    
+    /**
+    *@brief runs the title sequence
+    *@param lcd @brief class which controlls lcd screen
+    *@param pad @breif class for working with the gamepad 
+    */
     void title_intro(N5110 &lcd, Gamepad &pad);
+    
+    /**
+    *@brief holds title screen and flashes 'press start'
+    *@param lcd @brief class which controlls lcd screen
+    *@param pad @breif class for working with the gamepad 
+    *@returns _start (1 when pressed, else 0)
+    */
     int press_start(N5110 &lcd, Gamepad &pad);
 
-    void init();
-
+    /**
+    *@brief displays main menu screen and takes in input to select next state
+    *@param lcd @brief class which controlls lcd screen
+    *@param pad @breif class for working with the gamepad 
+    *@returns _input (1 when pressed, else 0)
+    */
     int select_input_main(Gamepad &pad, N5110 &lcd);
+    
+    /**
+    *@brief displays continue menu screen and takes in input to select next state
+    *@param lcd @brief class which controlls lcd screen
+    *@param pad @breif class for working with the gamepad 
+    *@returns _input (1 when pressed, else 0)
+    */
     int select_input_continue(Gamepad &pad, N5110 &lcd);
+    
+    /**
+    *@brief displays highscore screen
+    *@param lcd @brief class which controlls lcd screen
+    *@param highscore @breif highest level reached by user
+    */
     void print_highscore(N5110 &lcd, int highscore);
+    
+    /**
+    *@brief displays continue menu screen and takes in input to select next state
+    *@param lcd @brief class which controlls lcd screen
+    *@param pad @breif class for working with the gamepad 
+    *@returns contrast level
+    */
     float print_settings(Gamepad &pad, N5110 &lcd);
 private:
 
-    void print_main_menu(N5110 &lcd);
-    void print_continue_menu(N5110 &lcd);
+    void print_main_menu(N5110 &lcd);                               //prints menu class visuals        
+    void print_continue_menu(N5110 &lcd);                           //prints continue class visuals
 
-    void menu_decoration(N5110 &lcd);
+    void menu_decoration(N5110 &lcd);                               //prints menu border decoration
 
-    void intro_b(N5110 &lcd, Gamepad &pad);
-    void intro_bl(N5110 &lcd, Gamepad &pad);
-    void intro_blo(N5110 &lcd, Gamepad &pad);
-    void intro_bloc(N5110 &lcd, Gamepad &pad);
-    void intro_block(N5110 &lcd, Gamepad &pad);
-    void intro_block_h(N5110 &lcd, Gamepad &pad);
-    void intro_block_he(N5110 &lcd, Gamepad &pad);
-    void intro_block_hea(N5110 &lcd, Gamepad &pad);
-    void intro_block_head(N5110 &lcd, Gamepad &pad);
+    void intro_b(N5110 &lcd, Gamepad &pad);                         //display b with note
+    void intro_bl(N5110 &lcd, Gamepad &pad);                        //display bl with note
+    void intro_blo(N5110 &lcd, Gamepad &pad);                       //display blo with note
+    void intro_bloc(N5110 &lcd, Gamepad &pad);                      //display bloc with note
+    void intro_block(N5110 &lcd, Gamepad &pad);                     //display block  with note    
+    void intro_block_h(N5110 &lcd, Gamepad &pad);                   //display block h with note
+    void intro_block_he(N5110 &lcd, Gamepad &pad);                  //display block he with note
+    void intro_block_hea(N5110 &lcd, Gamepad &pad);                 //display block hea with note
+    void intro_block_head(N5110 &lcd, Gamepad &pad);                //display block head with note
 
-    void B(int x, int y, N5110 &lcd);
-    void BL(int x, int y, N5110 &lcd);
-    void BLO(int x, int y, N5110 &lcd);
-    void BLOC(int x, int y, N5110 &lcd);
-    void BLOCK(int x, int y, N5110 &lcd);
-    void BLOCK_H(int x, int y, N5110 &lcd);
-    void BLOCK_HE(int x, int y, N5110 &lcd);
-    void BLOCK_HEA(int x, int y, N5110 &lcd);
-    void BLOCK_HEAD(int x, int y, N5110 &lcd);
+    void B(int x, int y, N5110 &lcd);                               //prints B HEAD sprite
+    void BL(int x, int y, N5110 &lcd);                              //prints BL sprite
+    void BLO(int x, int y, N5110 &lcd);                             //prints BLO sprite
+    void BLOC(int x, int y, N5110 &lcd);                            //prints BLOC sprite
+    void BLOCK(int x, int y, N5110 &lcd);                           //prints BLOCK  sprite
+    void BLOCK_H(int x, int y, N5110 &lcd);                         //prints BLOCK H sprite
+    void BLOCK_HE(int x, int y, N5110 &lcd);                        //prints BLOCK HE sprite
+    void BLOCK_HEA(int x, int y, N5110 &lcd);                       //prints BLOCK HEA sprite
+    void BLOCK_HEAD(int x, int y, N5110 &lcd);                      //prints BLOCK HEAD sprite
 
     int _start;
     int _count;