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
FieldCell.h@18:70190f956a24, 2013-06-17 (annotated)
- Committer:
- RichardE
- Date:
- Mon Jun 17 15:10:43 2013 +0000
- Revision:
- 18:70190f956a24
- Parent:
- 15:d8ea0c7b7e64
Improved response to button 1 when entering high scores (HighScoreEntry.cpp).
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
RichardE | 15:d8ea0c7b7e64 | 1 | /* |
RichardE | 15:d8ea0c7b7e64 | 2 | * SOURCE FILE : FieldCell.h |
RichardE | 15:d8ea0c7b7e64 | 3 | * |
RichardE | 15:d8ea0c7b7e64 | 4 | * Definition of class FieldCell. |
RichardE | 15:d8ea0c7b7e64 | 5 | * |
RichardE | 15:d8ea0c7b7e64 | 6 | */ |
RichardE | 15:d8ea0c7b7e64 | 7 | |
RichardE | 15:d8ea0c7b7e64 | 8 | #ifndef FieldCellDefined |
RichardE | 15:d8ea0c7b7e64 | 9 | |
RichardE | 15:d8ea0c7b7e64 | 10 | #define FieldCellDefined |
RichardE | 15:d8ea0c7b7e64 | 11 | |
RichardE | 15:d8ea0c7b7e64 | 12 | #include <stdlib.h> // for NULL |
RichardE | 15:d8ea0c7b7e64 | 13 | #include "Rectangle.h" |
RichardE | 15:d8ea0c7b7e64 | 14 | |
RichardE | 15:d8ea0c7b7e64 | 15 | class FieldCell { |
RichardE | 15:d8ea0c7b7e64 | 16 | |
RichardE | 15:d8ea0c7b7e64 | 17 | public : |
RichardE | 15:d8ea0c7b7e64 | 18 | |
RichardE | 15:d8ea0c7b7e64 | 19 | // Rectangle which cell covers. |
RichardE | 15:d8ea0c7b7e64 | 20 | // Specified in pixel coordinates. |
RichardE | 15:d8ea0c7b7e64 | 21 | Rectangle Rect; |
RichardE | 15:d8ea0c7b7e64 | 22 | |
RichardE | 15:d8ea0c7b7e64 | 23 | /***************/ |
RichardE | 15:d8ea0c7b7e64 | 24 | /* CONSTRUCTOR */ |
RichardE | 15:d8ea0c7b7e64 | 25 | /***************/ |
RichardE | 15:d8ea0c7b7e64 | 26 | FieldCell(); |
RichardE | 15:d8ea0c7b7e64 | 27 | |
RichardE | 15:d8ea0c7b7e64 | 28 | /**************/ |
RichardE | 15:d8ea0c7b7e64 | 29 | /* DESTRUCTOR */ |
RichardE | 15:d8ea0c7b7e64 | 30 | /**************/ |
RichardE | 15:d8ea0c7b7e64 | 31 | virtual ~FieldCell(); |
RichardE | 15:d8ea0c7b7e64 | 32 | |
RichardE | 15:d8ea0c7b7e64 | 33 | /************************/ |
RichardE | 15:d8ea0c7b7e64 | 34 | /* GET NEXT CELL IN ROW */ |
RichardE | 15:d8ea0c7b7e64 | 35 | /************************/ |
RichardE | 15:d8ea0c7b7e64 | 36 | FieldCell *GetNext( void ) const { |
RichardE | 15:d8ea0c7b7e64 | 37 | return nextCell; |
RichardE | 15:d8ea0c7b7e64 | 38 | } |
RichardE | 15:d8ea0c7b7e64 | 39 | |
RichardE | 15:d8ea0c7b7e64 | 40 | /************************/ |
RichardE | 15:d8ea0c7b7e64 | 41 | /* SET NEXT CELL IN ROW */ |
RichardE | 15:d8ea0c7b7e64 | 42 | /************************/ |
RichardE | 15:d8ea0c7b7e64 | 43 | // Pass pointer to next cell in cell. |
RichardE | 15:d8ea0c7b7e64 | 44 | void SetNext( FieldCell *cell ) { |
RichardE | 15:d8ea0c7b7e64 | 45 | nextCell = cell; |
RichardE | 15:d8ea0c7b7e64 | 46 | } |
RichardE | 15:d8ea0c7b7e64 | 47 | |
RichardE | 15:d8ea0c7b7e64 | 48 | private : |
RichardE | 15:d8ea0c7b7e64 | 49 | |
RichardE | 15:d8ea0c7b7e64 | 50 | // Pointer to next cell in row. NULL if last cell in row. |
RichardE | 15:d8ea0c7b7e64 | 51 | FieldCell *nextCell; |
RichardE | 15:d8ea0c7b7e64 | 52 | |
RichardE | 15:d8ea0c7b7e64 | 53 | }; |
RichardE | 15:d8ea0c7b7e64 | 54 | |
RichardE | 15:d8ea0c7b7e64 | 55 | #endif |
RichardE | 15:d8ea0c7b7e64 | 56 | |
RichardE | 15:d8ea0c7b7e64 | 57 | /* END of FieldCell.h */ |
RichardE | 15:d8ea0c7b7e64 | 58 | |
RichardE | 15:d8ea0c7b7e64 | 59 |