Version of Robotron arcade game using LPC1768, a Gameduino shield, a serial EEPROM (for high scores), two microswitch joysticks and two buttons plus a box to put it in. 20 levels of mayhem.

Dependencies:   25LCxxx_SPI CommonTypes Gameduino mbed

Revision:
2:bb0f631a6068
Parent:
0:5fa232ee5fdf
Child:
3:a6a0cd726ca0
--- a/HighScoreTable.h	Wed Jun 05 22:05:41 2013 +0000
+++ b/HighScoreTable.h	Thu Jun 06 20:11:28 2013 +0000
@@ -12,7 +12,7 @@
 
   #include "Types.h"
   #include "PlayerName.h"
-  #include "I2CEEPROM.h"
+  #include "SPIEEPROM.h"
   
   class HighScoreTable {
 
@@ -21,20 +21,20 @@
     /***************/
     /* CONSTRUCTOR */
     /***************/
-        // Pass pointer to an I2C EEPROM which contains the high scores.
-    HighScoreTable( I2CEEPROM *e );
+        // Pass pointer to an SPI EEPROM which contains the high scores.
+    HighScoreTable( SPIEEPROM *e );
 
     /**************/
     /* DESTRUCTOR */
     /**************/
     virtual ~HighScoreTable();
 
-        /***************************************/
-        /* GET EEPROM USED BY HIGH SCORE TABLE */
-        /***************************************/
-        I2CEEPROM *GetEEPROM( void ) const {
-            return eeprom;
-        }
+    /***************************************/
+    /* GET EEPROM USED BY HIGH SCORE TABLE */
+    /***************************************/
+    SPIEEPROM *GetEEPROM( void ) const {
+        return eeprom;
+    }
         
     /****************************************/
     /* VALIDATE EEPROM USED FOR HIGH SCORES */
@@ -87,16 +87,16 @@
 
     // Change the following to suit.
     enum {
-      eepromAddress = 0,    // address in EEPROM where high score table starts
-      capacity = 10,        // number of entries in table
-            // Amount of memory used in EEPROM.
-            // You need capacity bytes for the index and then
-            // eight bytes for each high score and name.
-            memoryUsed = capacity + ( capacity << 3 ),
+        eepromAddress = 0,    // address in EEPROM where high score table starts
+        capacity = 10,        // number of entries in table
+        // Amount of memory used in EEPROM.
+        // You need capacity bytes for the index and then
+        // eight bytes for each high score and name.
+        memoryUsed = capacity + ( capacity << 3 ),
     };
 
-        // Pointer to EEPROM that holds high scores.
-        I2CEEPROM *eeprom;
+    // Pointer to EEPROM that holds high scores.
+    SPIEEPROM *eeprom;
         
     /****************************/
     /* WRITE DEFAULTS TO EEPROM */
@@ -108,4 +108,3 @@
 #endif
 
 /* END of HighScoreTable.h */
-