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
Diff: GameRobotRic.cpp
- Revision:
- 17:194789db2215
- Parent:
- 14:46a353b2a8e8
--- a/GameRobotRic.cpp Sat Jun 15 19:27:36 2013 +0000 +++ b/GameRobotRic.cpp Sun Jun 16 08:54:57 2013 +0000 @@ -16,7 +16,10 @@ #include "ArenaConst.h" // gameplay arena constants // Define following for debugging messages to serial port. -#define CHATTY +#undef CHATTY + +// Define following to reset all high scores on power up. +#undef RESETHIGHSCORES // Number of lives player starts with. #define START_LIVES 5 @@ -108,11 +111,10 @@ // Restrict players movement. player.MovementRestricted = true; player.Bounds = &ArenaRectangle; - - // REMOVE THIS! - CheckForHighScore( &gd, &highScores, 0x10000 ); - - + // If configured to do so reset high scores. + #ifdef RESETHIGHSCORES + highScores.WriteEEPROMDefaults(); + #endif // Repeat forever. while( true ) { // Get level specified by level number.