Implemented tripleshot. Needs powerup to activate.
authorlimb <limb@bc5cbbab-a4ec-0310-bb52-ff3d296db539>
Fri, 26 Jan 2007 20:02:12 +0000 (20:02 +0000)
committerlimb <limb@bc5cbbab-a4ec-0310-bb52-ff3d296db539>
Fri, 26 Jan 2007 20:02:12 +0000 (20:02 +0000)
git-svn-id: svn+ssh://svn/var/repos/curfender@620 bc5cbbab-a4ec-0310-bb52-ff3d296db539

CHANGELOG
main.cpp

index 34de11d..27600d7 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,5 @@
+Implemented triple shot.  Needs powerup to activate.
+Implemented shields.
 Implemented Smartbombs.
 Radar now wraps properly.
 Landers will now ignore or abort chasing dead or rescued pods.
index 2f77942..39a83a6 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -16,6 +16,7 @@ int drawlocation = 0;
 int pod_in = 0;
 int pause = 0;
 int shieldsleft = 400;
+int tripshot = 0;
 
 struct game_object {
   int number; //object number
@@ -1106,8 +1107,41 @@ int main(){
          break;
        };
       };
+      if(tripshot>=1){
+       for(int bulletloop = 0; bulletloop<bulletmax; bulletloop++){ 
+         if(bullets[bulletloop].active==0){ 
+           bullets[bulletloop].active=1;
+           if(player.face==0){ bullets[bulletloop].direction = 4; };
+           if(player.face==1){ bullets[bulletloop].direction = 6; };
+           bullets[bulletloop].speed = player.speed + 2;
+           bullets[bulletloop].x = player.x-1;
+           int multiplier = 1;
+           if(player.direction == 4){multiplier = -1; };
+           bullets[bulletloop].y = player.y + (player.speed * multiplier);
+           bullets[bulletloop].vtime = 1;
+           tripshot--;
+           break;
+         };
+       };
+       for(int bulletloop = 0; bulletloop<bulletmax; bulletloop++){ 
+         if(bullets[bulletloop].active==0){ 
+           bullets[bulletloop].active=1;
+           if(player.face==0){ bullets[bulletloop].direction = 4; };
+           if(player.face==1){ bullets[bulletloop].direction = 6; };
+           bullets[bulletloop].speed = player.speed + 2;
+           bullets[bulletloop].x = player.x+1;
+           int multiplier = 1;
+           if(player.direction == 4){multiplier = -1; };
+           bullets[bulletloop].y = player.y + (player.speed * multiplier);
+           bullets[bulletloop].vtime = 1;
+           tripshot--;
+           break;
+         };
+       };
+      };
     };
-      
+  
+  
     //check for / process smartbomb
     if(input=='a'&&smartbombs>=1){
       smartbombs--;