ELEC2645 (2018/19) / Mbed 2 deprecated el17cd

Dependencies:   mbed

Revision:
40:065f0e4d6652
Parent:
39:41dcf1604fdf
Child:
41:733f1b23e611
--- a/Game/Game.h	Tue May 07 16:57:26 2019 +0000
+++ b/Game/Game.h	Tue May 07 17:09:33 2019 +0000
@@ -11,8 +11,18 @@
 #include "mbed.h"
 #include "SDFileSystem.h"
 
-/** Input struct
-*Stores current details of required inputs, this being the joystick x axis, the a, b and y buttons. It also stores whether the button press can be registered yet to remove the switch bouncing issue.
+/** Input struct */
+struct Input{
+    float x; /**<The x axis of the joystick*/
+    bool yButton; /**<Whether the y button is pressed*/
+    bool aButton; /**<Whether the a button is pressed*/
+    bool bButton; /**<Whether the b button is pressed*/
+    bool yCooldown; /**<Whether 0.2 seconds has elapsed since the y button was pressed*/
+    bool aCooldown; /**<Whether 0.2 seconds has elapsed since the a button was pressed*/
+    bool bCooldown; /**<Whether 0.2 seconds has elapsed since the b button was pressed*/
+};
+
+/**
 *@code
 *void Game::processInput(){ //Obtain user inputs and store in input struct
 *    input.x = gamepad.get_coord().x; //Get value of joystick x axis
@@ -36,20 +46,8 @@
 *    }
 *}
 */
-struct Input{
-    float x; /**<The x axis of the joystick*/
-    bool yButton; /**<Whether the y button is pressed*/
-    bool aButton; /**<Whether the a button is pressed*/
-    bool bButton; /**<Whether the b button is pressed*/
-    bool yCooldown; /**<Whether 0.2 seconds has elapsed since the y button was pressed*/
-    bool aCooldown; /**<Whether 0.2 seconds has elapsed since the a button was pressed*/
-    bool bCooldown; /**<Whether 0.2 seconds has elapsed since the b button was pressed*/
-};
 
-
-/** MenuSelections struct
-*Stores the current selections in both the home menu and death menu.
-*/
+/** MenuSelections struct */
 struct MenuSelections{ //stores the current selections in both menus
     int deathMenuSelection; /**< Which item in the death screen has been selected*/
     int homeMenuSelection; /**< Which item in the home screen has been selected*/