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
HighScoreEntry.h
- Committer:
- RichardE
- Date:
- 2013-06-15
- Revision:
- 15:d8ea0c7b7e64
- Parent:
- 14:46a353b2a8e8
- Child:
- 16:d0b142ba4362
File content as of revision 15:d8ea0c7b7e64:
/* * SOURCE FILE : HighScoreEntry.h * * Definition of class HighScoreEntry. * Routine to allow player to enter their name using joysticks. * */ #ifndef HighScoreEntryDefined #define HighScoreEntryDefined #include "Types.h" #include "PanelControls.h" // for reading panel controls. #include "PlayerName.h" #include "Gameduino.h" #include "FieldGrid.h" // grid around which cursor moves class HighScoreEntry { public : /***************/ /* CONSTRUCTOR */ /***************/ HighScoreEntry(); /**************/ /* DESTRUCTOR */ /**************/ virtual ~HighScoreEntry(); /*********************/ /* GET A PLAYER NAME */ /*********************/ // Pass pointer to place to store name in name. // Pass pointer to controls to read in controls. // Pass pointer to Gameduino to display on in gd. void GetName( PlayerName *name, PanelControls *controls, Gameduino *gd ); private : // Position of cursor (zero for first character). UInt8 cursorPos; // Grid around which cursor moves. FieldGrid grid; /*******************/ /* INITIALISE GRID */ /*******************/ void InitialiseGrid( void ); /*********************/ /* WAIT FOR CONTROLS */ /*********************/ // Pass pointer to Gameduino to display on in gd. // Pass pointer to controls to read in controls. // Pass true in waitActivate to wait for a control to be used. // Pass false to wait for release. void WaitControls( Gameduino *gd, PanelControls *controls, bool waitActivate ); /*******************/ /* DRAW THE SCREEN */ /*******************/ // Pass pointer to Gameduino to display on in gd. void DrawScreen( Gameduino *gd ); /***************************/ /* DRAW THE CHARACTER GRID */ /***************************/ // Pass pointer to Gameduino to draw on in gd. void DrawGrid( Gameduino *gd ); /********************************/ /* DRAW THE NAME AND THE CURSOR */ /********************************/ // Pass pointer to Gameduino to display on in gd. // Pass player name in name. void DrawName( Gameduino *gd, PlayerName *name ); /********************/ /* UPDATE ANIMATION */ /********************/ // Pass pointer to Gameduino to display on in gd. void Animate( Gameduino *gd ); }; #endif /* END of HighScoreEntry.h */