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: HighScoreEntry.h
- Revision:
- 16:d0b142ba4362
- Parent:
- 15:d8ea0c7b7e64
- Child:
- 17:194789db2215
--- a/HighScoreEntry.h Sat Jun 15 15:05:19 2013 +0000 +++ b/HighScoreEntry.h Sat Jun 15 19:27:36 2013 +0000 @@ -40,9 +40,12 @@ private : - // Position of cursor (zero for first character). - UInt8 cursorPos; - + // Index of character being modified in the name. + UInt8 charIndex; + + // Grid row and column number for cursor. + UInt8 cursorRow, cursorColumn; + // Grid around which cursor moves. FieldGrid grid; @@ -64,7 +67,8 @@ /* DRAW THE SCREEN */ /*******************/ // Pass pointer to Gameduino to display on in gd. - void DrawScreen( Gameduino *gd ); + // Pass player name in name. + void DrawScreen( Gameduino *gd, PlayerName *name ); /***************************/ /* DRAW THE CHARACTER GRID */ @@ -85,6 +89,26 @@ // Pass pointer to Gameduino to display on in gd. void Animate( Gameduino *gd ); + /*******************/ + /* WIPE THE CURSOR */ + /*******************/ + // Pass pointer to Gameduino to display on in gd. + // Pass cell to draw in cell. + void WipeCursor( Gameduino *gd, FieldCell *cell ); + + /*******************/ + /* DRAW THE CURSOR */ + /*******************/ + // Pass pointer to Gameduino to display on in gd. + // Pass cell to draw in cell. + void DrawCursor( Gameduino *gd, FieldCell *cell ); + + /**************************/ + /* VALIDATE CURSOR COLUMN */ + /**************************/ + // If cursor column is beyond end of row then forces it back. + void ValidateCursorColumn( void ); + }; #endif