A retro gaming programme, designed for use on a portable embedded system. Incorporates power saving techniques.

Dependencies:   ConfigFile N5110 PowerControl beep mbed

Revision:
75:445c1ea33944
Parent:
74:d76be537bafd
Child:
76:c11cb774bd27
--- a/main.cpp	Sun May 10 09:36:23 2015 +0000
+++ b/main.cpp	Sun May 10 13:31:26 2015 +0000
@@ -49,21 +49,21 @@
     if (cfg.getValue(key1, &player1initials[0], sizeof(player1initials))) {
         serial.printf("%s\n",player1initials);
         char a = (int)player1initials[10];
-        //highScore1 = a; 
-        serial.printf("%d\n",highScore1);
+        highScore1 = a; 
+        serial.printf("%c\n",highScore1);
         }
     //check file size - if size acceptable, prints buffer to location.
     if (cfg.getValue(key2, &player2initials[0], sizeof(player2initials))) {
         serial.printf("%s\n",player2initials);
         char b = (int)player2initials[10];
-       // highScore2 = b;
+        highScore2 = b;
         serial.printf("%c\n",highScore2);
      }
     //check file size - if size acceptable, prints buffer to location.
     if (cfg.getValue(key3, &player3initials[0], sizeof(player3initials))) {
         serial.printf("%s\n",player3initials);
         char c = (int)player3initials[10];
-        //highScore3 = c;
+        highScore3 = c;
         serial.printf("%c\n",highScore3);
     }
 }
@@ -1193,8 +1193,6 @@
     drawBackground();//set background
     lcd.printString("High Scores",10,0);//title
     
-    read();//reads scores from CFG
-    
     //prints scores with names
     lcd.printString(player1initials,5,2);//display
 
@@ -1379,7 +1377,6 @@
         }
         // if 'Scores' selected
         if((mainOption == 1)&&(buttonFlagA)) {
-            read();
             buttonFlagA = 0;
             buttonFlagB = 0;
             scores();