diff --git a/lib/examples/LoLShield_Invader/LoLShield_Invader.pde b/lib/examples/LoLShield_Invader/LoLShield_Invader.pde index 869da81..3c0c33b 100644 --- a/lib/examples/LoLShield_Invader/LoLShield_Invader.pde +++ b/lib/examples/LoLShield_Invader/LoLShield_Invader.pde @@ -53,16 +53,16 @@ /** The score of the user (number of points = speed of each killed ennemy - number of ennemies missed) */ int score=0; /** Position of the ship between 1 & 7 */ -uint8_t shippos=4; +byte shippos=4; /** Number of lives of the user */ -uint8_t lives; +byte lives; /** Position of the bullets of the ship, [0]=x [1]=y */ -uint8_t firepos[9][2]={ +byte firepos[9][2]={ {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0} }; /** Position and speed of the ennemies [0]=x [1]=y [2]=speed [3]=speed counter */ -uint8_t ennemypos[8][4]={ +byte ennemypos[8][4]={ {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} }; @@ -71,11 +71,11 @@ uint8_t ennemypos[8][4]={ /** Draw the ship at its current position. * @param set 1 or 0 to set or clear the led. */ -void drawShip(int set=1) { - LedSign::Set(0,shippos-1,set); - LedSign::Set(0,shippos ,set); - LedSign::Set(0,shippos+1,set); - LedSign::Set(1,shippos ,set); +void drawShip(uint8_t c=1) { + LedSign::Set(0,shippos-1,c); + LedSign::Set(0,shippos ,c); + LedSign::Set(0,shippos+1,c); + LedSign::Set(1,shippos ,c); } @@ -83,7 +83,7 @@ void drawShip(int set=1) { /** Draw the number of lives remaining at the top left of the screen */ void drawLives() { - for(int i=0;i1000) { // FIRE ! status=1; - for(i=0;i-100;j--) { - x=j; - LedSign::Clear(); - for(int i=0;i<17;i++) { - x2=Font::Draw(test[i],x,0); - x+=x2; - if (x>=13) break; - } - delay(100); - } - delay(10000); -*/ -moveShip(); + moveShip(); fireShip(); moveFires(); moveEnnemies(); addEnnemies(); delay(100); - } - -