contains my game for the embedded systems project 2645

Dependencies:   mbed FXOS8700CQQQ

Revision:
28:39607fb67e88
Child:
29:e660274d8222
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/GameMenus/Menus.h	Wed Apr 24 10:19:07 2019 +0000
@@ -0,0 +1,100 @@
+#ifndef MENUS_H
+#define MENUS_H
+#include "RocketRacer.h"
+#include "GameSprites.h"
+#include "GameTones.h"
+ 
+ /** Menus class
+
+@brief C++ class containing the game menu and the interface
+
+@version 1.0
+
+@author Omar Alebiary
+
+@date April 2019
+
+@code
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+#include "RocketRacer.h"
+
+// objects 
+Gamepad pad;
+RocketRacer rc;
+Menus menus;
+
+
+
+int main(){
+    
+    
+    setup();
+    menus.welcomeMenu(pad,lcd); 
+    menus.InstructionsMenu(pad,lcd);
+    //keeps looping untill the player loses
+    while(1){
+        Rocket_Racer.Game_Loop(lcd,pad);
+    }
+
+
+}
+
+@endcode
+*/
+  
+  
+class Menus{
+    
+    public:
+    /**
+  * @brief default constructor
+  */
+    Menus();
+    /**
+  * @brief welcome menu method
+  * @param pad @details calls the Gamepad object to be passed to the methods called inside this method
+  * @param lcd @details calls the lcd object to be passed to the methods called inside this method
+  */
+  void welcomeMenu(Gamepad &pad,N5110 &lcd);
+   /**
+  * @brief instructions menu method
+  * @param pad @details calls the Gamepad object to be passed to the methods called inside this method
+  * @param lcd @details calls the lcd object to be passed to the methods called inside this method
+  */
+  void InstructionsMenu(Gamepad &pad,N5110 &lcd);
+  
+  /**
+  * @brief draw menu method that draws the main menu
+  * @param pad @details calls the Gamepad object to be passed to the methods called inside this method
+  * @param lcd @details calls the lcd object to be passed to the methods called inside this method
+  */ 
+  void  drawMenu(N5110 &lcd,Gamepad &pad);
+  /**
+  * @brief method that displays credits of the owner of the game
+  * @param pad @details calls the Gamepad object to be passed to the methods called inside this method
+  * @param lcd @details calls the lcd object to be passed to the methods called inside this method
+  */  
+  void  credits(N5110 &lcd,Gamepad &pad);
+  /**
+  * @brief method that checks buttons pressed in the main menu
+  * @param pad @details calls the Gamepad object to be passed to the methods called inside this method
+  * @param lcd @details calls the lcd object to be passed to the methods called inside this method
+  */ 
+  void  check_button_pressed(Gamepad &pad,N5110 &lcd);
+  /**
+  * @brief method that draws loading bar
+  * @param lcd @details calls the lcd object to be passed to the methods called inside this method
+  */ 
+  void  loading_menu(N5110 &lcd);
+  
+  private:
+  RocketRacer Rocket_Race;
+  GameTones tone;
+  
+  
+};
+
+#endif
\ No newline at end of file