Added gate.
authorlimb <limb@bc5cbbab-a4ec-0310-bb52-ff3d296db539>
Tue, 14 Nov 2006 20:26:12 +0000 (20:26 +0000)
committerlimb <limb@bc5cbbab-a4ec-0310-bb52-ff3d296db539>
Tue, 14 Nov 2006 20:26:12 +0000 (20:26 +0000)
git-svn-id: svn+ssh://svn/var/repos/curfender@516 bc5cbbab-a4ec-0310-bb52-ff3d296db539

main.cpp

index 76668df..e26a42b 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -84,6 +84,10 @@ int draw_object(game_object object, int drawlocation){
       if(object.face==1){
        mvprintw(object.x,object.y-drawlocation,"%s",object.line1);
       };
+      if(object.face==2){
+       mvprintw(object.x,object.y-drawlocation,"%s",object.line1);
+       mvprintw(object.x-1,object.y-drawlocation,"%s",object.line0);
+      };
     };
   };
 
@@ -147,11 +151,44 @@ int main(){
   gate.x = 18;
   gate.y = 40;
   gate.direction = 5;
-  gate.face = 1;
+  gate.face = 2;
   gate.speed = 0;
-  strcpy (gate.line0, "/|\\");
+  strcpy (gate.line0, " ^ ");
   strcpy (gate.line1, "/|\\");
  
+  game_object gatebeam1;
+  gatebeam1.number = 11;
+  gatebeam1.active = 1;
+  gatebeam1.x = 16;
+  gatebeam1.y = 40;
+  gatebeam1.direction = 5;
+  gatebeam1.face = 2;
+  gatebeam1.speed = 0;
+  strcpy (gatebeam1.line0, " ] ");
+  strcpy (gatebeam1.line1, " [ ");
+
+  game_object gatebeam2;
+  gatebeam2.number = 11;
+  gatebeam2.active = 1;
+  gatebeam2.x = 14;
+  gatebeam2.y = 40;
+  gatebeam2.direction = 5;
+  gatebeam2.face = 2;
+  gatebeam2.speed = 0;
+  strcpy (gatebeam2.line0, " ] ");
+  strcpy (gatebeam2.line1, " [ ");
+
+  game_object gatebeam3;
+  gatebeam3.number = 11;
+  gatebeam3.active = 1;
+  gatebeam3.x = 12;
+  gatebeam3.y = 40;
+  gatebeam3.direction = 5;
+  gatebeam3.face = 2;
+  gatebeam3.speed = 0;
+  strcpy (gatebeam3.line0, " ] ");
+  strcpy (gatebeam3.line1, " [ ");
+
   initscr();
 
   //Check screen size 80x25
@@ -185,7 +222,9 @@ int main(){
     
     // Draw gate object 10
     drawlocation = draw_object(gate, drawlocation);
-
+    drawlocation = draw_object(gatebeam1, drawlocation);
+    drawlocation = draw_object(gatebeam2, drawlocation);
+    drawlocation = draw_object(gatebeam3, drawlocation);
     // Draw enemies
     
     // Draw shots