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

Revision:
7:e72691603fd3
Parent:
6:8bbdb70bc11c
Child:
8:82d88f9381f3
--- a/LevelNormal.cpp	Sat Jun 08 15:50:38 2013 +0000
+++ b/LevelNormal.cpp	Sat Jun 08 16:44:54 2013 +0000
@@ -57,7 +57,6 @@
     // Use next free sprite number for player.
     player->SpriteNumber = PlayerSprite;
     // Do futher initialisation for all enemies.
-#if 0
     EnemyObject *object;
     for( UInt8 e = 0; e < LevelData::MaxEnemies; ++e ) {
         object = (EnemyObject*)DataForLevel->Enemies[ e ];
@@ -72,7 +71,6 @@
             }
         }
     }
-#endif
     // Put player in the centre of the arena.
     player->Xco = PLAYER_START_X;
     player->Yco = PLAYER_START_Y;
@@ -317,9 +315,9 @@
 #endif
             // Redraw the player's score and number of lives.
             DrawScoreAndLives();
+            // Draw all the enemies.
+            GameObject::DrawAll( gd, DataForLevel->Enemies, LevelData::MaxEnemies );
 #if 0
-            // Draw all the enemies.
-            GameObject::DrawAll( DataForLevel->Enemies, LevelData::MaxEnemies );
             // Draw all the humans.
             GameObject::DrawAll( DataForLevel->Humans, LevelData::MaxHumans );
             // Draw all the explosions.
@@ -364,7 +362,6 @@
                 }
             }
             else {
-#if 0
                 // Move all the enemies and check if all dead.
                 allEnemiesAreDead = ! GameObject::MoveAll( DataForLevel->Enemies, LevelData::MaxEnemies );
                 // If there are still some enemies alive then check if those that remain are indestructable.
@@ -377,6 +374,7 @@
                         LevelData::MaxEnemies
                     );
                 }
+#if 0
                 // Move all the humans.
                 GameObject::MoveAll( DataForLevel->Humans, LevelData::MaxHumans );
                 // Move (update) all the explosions.