int score;
int lives;
+int drawlocation = 0;
+
struct game_object {
int number; //object number
int active; //object active, 1 or 0
};
game_object process_motion(game_object object){
+
if(object.direction==2){
object.x = object.x+object.speed;
};
object.speed=0;
};
+ //wrap check
+ if(object.y<=0){
+ object.y=object.y+560;
+ drawlocation=drawlocation+560;
+ };
+ if(object.y>=560){
+ object.y=object.y-560;
+ drawlocation=drawlocation-560;
+ };
+
return object;
}
int loopvar = 0;
int input = 0;
- int drawlocation = 0;
cbreak();
halfdelay(1);