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
Level1.cpp
- Committer:
- RichardE
- Date:
- 2013-06-04
- Revision:
- 0:5fa232ee5fdf
- Child:
- 5:0b0651ac7832
File content as of revision 0:5fa232ee5fdf:
/* * SOURCE FILE : Level1.cpp * * Definition of class Level1. * Machine written by program MapleRobotRicLevelGenerator. * DO NOT EDIT BY HAND! * */ #include "Level1.h" /**************/ /* PLAY LEVEL */ /**************/ // Returns code indicating how level ended. Level::LevelExitCode Level1::Play( void ) { #if 0 LevelData dataForThisLevel; GameObject **ptr = dataForThisLevel.Enemies; UInt8 i, humanCount, enemyCount = 0; // Enemies of type GruntObject. #define GRUNTOBJECTCOUNT 5 GruntObject gruntobjects[ GRUNTOBJECTCOUNT ]; for( i = 0; i < GRUNTOBJECTCOUNT; ++i ) { if( enemyCount < LevelData::MaxEnemies ) { *ptr++ = gruntobjects + i; enemyCount++; } } // Enemies of type CrusherObject. #define CRUSHEROBJECTCOUNT 5 CrusherObject crusherobjects[ CRUSHEROBJECTCOUNT ]; for( i = 0; i < CRUSHEROBJECTCOUNT; ++i ) { if( enemyCount < LevelData::MaxEnemies ) { *ptr++ = crusherobjects + i; enemyCount++; } } // Humans. #define HUMANCOUNT 5 HumanObject humans[ HUMANCOUNT ]; ptr = dataForThisLevel.Humans; humanCount = ( HUMANCOUNT > LevelData::MaxHumans ) ? LevelData::MaxHumans : HUMANCOUNT; for( i = 0; i < humanCount; ++i ) { *ptr++ = humans + i; } DataForLevel = &dataForThisLevel; return PlayLoop(); #else return Completed; #endif }