James Cummins / Mbed 2 deprecated el17jnc

Dependencies:   mbed

Revision:
24:c6415cc74b17
Parent:
23:61fa82f76808
Child:
25:b52aa23df120
--- a/main.cpp	Thu Apr 18 22:56:34 2019 +0000
+++ b/main.cpp	Fri Apr 19 11:16:19 2019 +0000
@@ -13,6 +13,7 @@
 #include "N5110.h"
 #include "BrickBreakerEngine.h"
 #include "OptionsEngine.h"
+#include "SDFileSystem.h"
 #define RADIUS 3
 
 
@@ -23,6 +24,8 @@
 OptionsEngine opt;
 AnalogIn randnoise(PTB0);
 FXOS8700CQ accelerometer(I2C_SDA,I2C_SCL);
+Ball ball;
+SDFileSystem sd(PTE3,PTE1,PTE2,PTE4,"sd");
 
 //Enumeric class and struct for game mode selection menu
 enum StartOption{
@@ -41,7 +44,6 @@
 StartOption menu();
 void init();
 void print_start_menu(int output);
-Ball ball;
 
 
 ////////////////Main Function/////////////////
@@ -55,7 +57,7 @@
         StartOption choice_selected = menu();
         if(choice_selected == CLASSIC){ /*engine.classic_mode(accelerometer, gamepad, lcd, fps);*/}
         if(choice_selected == BRICKBREAKER){ brick.brickbreaker_mode(accelerometer, gamepad, lcd, randnoise, fps, ball);}
-        if(choice_selected == OPTIONS){ opt.options_menu(gamepad, lcd, ball);}
+        if(choice_selected == OPTIONS){ opt.options_menu(gamepad, lcd, ball, sd);}
     }
 }
   
@@ -70,6 +72,7 @@
     brick.init(RADIUS, ball);
     opt.init();
     accelerometer.init();
+    sd.disk_initialize();
     wait(1);
 }