Ben Evans / Mbed 2 deprecated Defender_Game

Dependencies:   mbed

Revision:
42:3aed75338272
Parent:
41:5959256f4aab
Child:
43:d43759dbddb9
--- a/GameEngine/GameEngine.h	Sun May 17 23:40:34 2020 +0000
+++ b/GameEngine/GameEngine.h	Mon May 18 00:18:58 2020 +0000
@@ -32,8 +32,10 @@
         /** Initalises GameEngine */
         void init();
         
-        /** Main gameplay loop that runs playable part of game */
-        void gameplay_loop();
+       
+        
+         /** Switch statement to run run different menu options */
+        void game_select_part();
         
     // Accessors and mutators --------------------------------------------------
           
@@ -41,8 +43,12 @@
     // Function prototypes -----------------------------------------------------
     
     // Menu Control
-        /** Switch statement to run run different menu options */
-        void game_select_part();
+    
+        /** Time-triggered interrupt to wake MCU from sleep */
+        void lcd_frame_time_isr();
+        
+        /** Main gameplay loop that runs playable part of game */
+        void gameplay_loop();
         
         /** Runs the menu */
         void run_menu();
@@ -56,7 +62,6 @@
         /** Runs settings part of games*/
         void run_saved_games();
         
-    
     //Spaceship Control      
         /** Gets joystick direction from gamepad and stores it in d_ */
         void read_joystick_direction();
@@ -132,7 +137,10 @@
     // Menu Control 
     
         MenuParts current_menu_part_;
-          
+        
+        /** Volatile flag for ISR */
+        volatile int g_lcd_frame_time_flag;  
+
     //Spacehip Control  
         /** Define points*/
         int points; 
@@ -209,6 +217,8 @@
         
         /** Define Menu object*/
         Menu menu;
+        
+        Ticker ticker; 
 };
  
 #endif
\ No newline at end of file