Invaders game for the Gameduino

Dependencies:   Gameduino mbed

Revision:
4:e82f4a87df9e
Parent:
2:20a89dc286d5
--- a/game.cpp	Fri Dec 21 13:53:46 2012 +0000
+++ b/game.cpp	Sat Oct 26 22:32:18 2013 +0000
@@ -134,6 +134,7 @@
   unsigned int addr = (y*64)+x;
   GD.__wstart(addr);
   char c = *m;
+  c = *m++;
   while (c != 0) {
     spigame.write(c);
     c = *m++;
@@ -403,11 +404,11 @@
   BlastInfo bulletBlast, bombBlast[3];
   void blastShield(BlastInfo& n, bool asBullet) {
     if (n.hasBlast()) {
-      byte s = (n.sprite-SP_FIRST_SHIELD)>>1;
-      int8 x = int8(n.xpos-(shieldXpos+(s*shieldXstep)));
-      //int8 y = zapShield(s,x,asBullet);
+      int8_t s = (n.sprite-SP_FIRST_SHIELD)>>1;
+      int8_t x = int8(n.xpos-(shieldXpos+(s*shieldXstep)));
+      int8_t y = zapShield(s,x,asBullet);
       if (asBullet) {
-        //bullet.setY(shieldYpos+y);
+        bullet.setY(shieldYpos+y);
       }
       n.reset();
     }
@@ -1092,4 +1093,3 @@
   highScore = 0;
   resetGame();
 }
-