Ben Evans / Mbed 2 deprecated Defender_Game

Dependencies:   mbed

Revision:
51:35cb8e604b72
Parent:
50:13c8710985f4
Child:
52:feb8cf28bcff
--- a/SavedGames/SavedGames.h	Tue May 19 16:05:18 2020 +0000
+++ b/SavedGames/SavedGames.h	Tue May 19 16:46:40 2020 +0000
@@ -6,6 +6,14 @@
 #include "N5110.h"
 #include "Gamepad.h"
 #include "SDFileSystem.h"
+#include <vector>
+
+struct SavedGamesData{
+    int score; /**< Bool to draw circle one */
+    int lives; /**< Bool to draw circle two */
+    int smart_bombs; /**< Fill type of circle one */
+    int alien_number; /**< Fill type of circle two */
+};
 
 /** SavedGames class
  * @brief Stores saved games on sd card, stores score, lives, smart bombs and 
@@ -21,11 +29,29 @@
         /** Destructor */
         ~SavedGames();
         
-        /** Initalises SavedGames*/
+        /** Initalises SavedGames
+         * @param lcd @details N5110 object
+         * @param sd @details sd card object
+         */
         void init(SDFileSystem &sd,N5110 &lcd);
         
-        /** Check if sd card is inserted and print message if not*/
-        void check_sd_present(SDFileSystem &sd,N5110 &lcd);  
+        /** Check if sd card is inserted and print message if not
+         * @param lcd @details N5110 object
+         * @param sd @details sd card object
+         */
+        void check_sd_present(SDFileSystem &sd,N5110 &lcd); 
+        
+        /** Check if saveddata files opens correctly
+         * @param lcd @details N5110 object
+         * @param sd @details sd card object
+         */
+        void check_open_file(SDFileSystem &sd,N5110 &lcd);
+        
+        /** Adds saved data to sd card 
+         * @param SavedGamesData @details Saved game data struct
+         * @param sd @details sd card object
+         */
+        void add_saved_data(SDFileSystem &sd,struct SavedGamesData); 
     
     // Accessors and mutators --------------------------------------------------
         
@@ -40,5 +66,8 @@
         
         /** Flag for error, true = error */
         bool error_;
+        
+        /** Vector to store saved game data*/
+        std::vector<SavedGamesData> saved_data_vector;
 };
 #endif
\ No newline at end of file