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: LevelCollection.h
- Revision:
- 10:bfa1c307c99d
- Parent:
- 0:5fa232ee5fdf
--- a/LevelCollection.h Sun Jun 09 14:28:53 2013 +0000 +++ b/LevelCollection.h Sun Jun 09 19:34:56 2013 +0000 @@ -1,51 +1,61 @@ -/* - * SOURCE FILE : LevelCollection.h - * - * Definition of class LevelCollection. - * - */ - -#ifndef LevelCollectionDefined - - #define LevelCollectionDefined - - #include "Types.h" - #include "Level.h" - - class LevelCollection { - - public : - - enum { - AttractLevel = 0, // just ticking over encouraging player to start - FirstNormalLevel = 1, // first real level excluding attract mode - }; - - /***************/ - /* CONSTRUCTOR */ - /***************/ - LevelCollection(); - - /**************/ - /* DESTRUCTOR */ - /**************/ - virtual ~LevelCollection(); - - /************************/ - /* GET NUMBER OF LEVELS */ - /************************/ - UInt8 GetLevelCount( void ) const; - - /***************/ - /* GET A LEVEL */ - /***************/ - // Pass level number in levelNumber. - // Returns pointer to level or NULL if no such level. - Level *GetLevel( UInt8 levelNumber ); - - }; - -#endif - -/* END of LevelCollection.h */ +/* + * SOURCE FILE : LevelCollection.h + * + * Definition of class LevelCollection. + * + */ + +#ifndef LevelCollectionDefined + + #define LevelCollectionDefined + + #include "Types.h" + #include "Level.h" + + class LevelCollection { + + public : + + enum { + AttractLevel = 0, // just ticking over encouraging player to start + FirstNormalLevel = 1, // first real level excluding attract mode + }; + + /***************/ + /* CONSTRUCTOR */ + /***************/ + LevelCollection(); + /**************/ + /* DESTRUCTOR */ + /**************/ + virtual ~LevelCollection(); + + /************************/ + /* GET NUMBER OF LEVELS */ + /************************/ + UInt8 GetLevelCount( void ) const; + + /***************/ + /* GET A LEVEL */ + /***************/ + // Pass level number in levelNumber. + // Returns pointer to level or NULL if no such level. + // Note that the level MAY be dynamically allocated and you must + // call FreeLevel when you have finished with the level to release + // memory used. + Level *GetLevel( UInt8 levelNumber ); + + /*******************************/ + /* FREE MEMORY USED BY A LEVEL */ + /*******************************/ + // Pass pointer to a level. + // Frees memory used by level. + void FreeLevel( Level *level ); + + }; + +#endif + +/* END of LevelCollection.h */ +