drawlocation=drawlocation+object.speed;
};
};
-
- if(object.active==1){
- if(object.face==0){
- mvprintw(object.x,object.y-drawlocation,"%s",object.line0);
- };
- if(object.face==1){
- mvprintw(object.x,object.y-drawlocation,"%s",object.line1);
+
+ if((object.y-drawlocation>0)and(object.y-drawlocation<79)){
+ if(object.active==1){
+ if(object.face==0){
+ mvprintw(object.x,object.y-drawlocation,"%s",object.line0);
+ };
+ if(object.face==1){
+ mvprintw(object.x,object.y-drawlocation,"%s",object.line1);
+ };
};
};
-
+
return drawlocation;
}
player.speed = 0;
strcpy (player.line0, "<==_>");
strcpy (player.line1, "<_==>");
+
+ game_object gate;
+ gate.number = 10;
+ gate.active = 1;
+ gate.x = 18;
+ gate.y = 40;
+ gate.direction = 5;
+ gate.face = 1;
+ gate.speed = 0;
+ strcpy (gate.line0, "/|\\");
+ strcpy (gate.line1, "/|\\");
initscr();
score++;
// Draw gate object 10
+ drawlocation = draw_object(gate, drawlocation);
// Draw enemies