James Cummins / Mbed 2 deprecated el17jnc

Dependencies:   mbed

Revision:
37:de1f584bce71
Parent:
36:9f7463a65fe0
Child:
38:a85bc227b907
--- a/main.cpp	Mon May 06 00:05:52 2019 +0000
+++ b/main.cpp	Mon May 06 21:44:49 2019 +0000
@@ -31,16 +31,17 @@
 Pause pause;
 SDFileSystem sd(PTE3,PTE1,PTE2,PTE4,"sd");
 
-//Enumeric class and struct for game mode selection menu
+/** Enum for start menu options*/
 enum StartOption{
     CLASSIC,
     BRICKBREAKER,
     OPTIONS
     };
 
+/**Start selection struct*/
 struct StartSelection{
-    int output;
-    StartOption next_state[3];
+    int output;                 /**<Integer output for line to print arrows to*/
+    StartOption next_state[3];  /**<Array of enums for possible next start option*/
     };
 
 //Methods
@@ -186,12 +187,12 @@
         lcd.clear();
         brick.brickbreaker_draw(lcd, ball);
         lcd.refresh();
-        brick.time_warning(gamepad, i, fps);
         wait_ms(1000/fps);
         if(gamepad.check_event(gamepad.BACK_PRESSED)){
             PauseOption choice = pause.pause_menu(gamepad, lcd, fps);
             i = pause.brickbreaker_action(choice, gamepad, lcd, i, fps);  //returns which frame to jump to
         }
+        brick.time_warning(gamepad, i, fps);
     }
     brick.end(gamepad, lcd);
     brick.write_high_scores();