};
}
+game_object object_out(game_object object){
+ object.active=0;
+ object.x = 0;
+ object.y = 0;
+ object.speed = 0;
+ object.direction = 0;
+ return object;
+}
+
game_object process_motion(game_object object, game_object player){
if((object.number>=2)&&(object.number<=9)&&(object.number==pod_in)){
object.direction=player.direction;
object.y=player.y;
} else {
+ if(object.direction==9){
+ object.y = object.y+object.speed;
+ object.x = object.x-object.speed;
+ };
+ if(object.direction==8){
+ object.x = object.x-object.speed;
+ };
+ if(object.direction==7){
+ object.y = object.y-object.speed;
+ object.x = object.x-object.speed;
+ };
if(object.direction==6){
object.y = object.y+object.speed;
};
if(object.direction==4){
object.y = object.y-object.speed;
};
+ if(object.direction==3){
+ object.y = object.y+object.speed;
+ object.x = object.x+object.speed;
+ };
+ if(object.direction==2){
+ object.x = object.x+object.speed;
+ };
+ if(object.direction==1){
+ object.y = object.y-object.speed;
+ object.x = object.x+object.speed;
+ };
object = gravitize(object);
object.x = object.x + object.vspeed;
//bounds check
if(object.x<=0){
- object.x=1;
- object.direction=5;
- object.vspeed=1;
- object.vtime=0;
+ if(object.number>=80&&object.number<=89){
+ object_out(object);
+ } else {
+ object.x=1;
+ object.direction=5;
+ //object.vspeed=1;
+ //object.vtime=0;
+ };
};
+
if(object.x>=19){
- object.x=18;
- object.direction=5;
- object.vspeed=0;
- object.vtime=0;
+ if(object.number>=80&&object.number<=89){
+ object_out(object);
+ } else {
+ object.x=18;
+ object.direction=5;
+ object.vspeed=0;
+ object.vtime=0;
+ };
};
//wrap check
return pod;
}
-game_object object_out(game_object object){
- object.active=0;
- object.x = 0;
- object.y = 0;
- object.speed = 0;
- object.direction = 0;
- return object;
-}
-
game_object process_direction(game_object object, int input){
if(input==65){input=8;};
if(input==67){input=6;};
if(input==object.direction){
object.speed++;
} else {
- if((input==4)||(input==6)){
+
+ if(input==4||input==6||input==1||input==7||input==3||input==9){
if(object.direction!=input){
object.speed = 0;
} else {
};
};
};
- if(input==4){object.face=0;};
- if(input==6){object.face=1;};
+
+ if(input==4||input==1||input==7){object.face=0;};
+ if(input==6||input==3||input==9){object.face=1;};
if(object.speed>4){object.speed=4;};
return object;
int multiplier = 1;
landershot[landershotloop].active=1;
//set direction
- if(player.y<landers[landerloop].y){ landershot[landershotloop].direction = 4; multiplier = -1; };
- if(player.y>=landers[landerloop].y){ landershot[landershotloop].direction = 6; };
+ if(player.y<landers[landerloop].y){
+ if(player.x<landers[landerloop].x){ landershot[landershotloop].direction = 7; };
+ if(player.x==landers[landerloop].x){ landershot[landershotloop].direction = 4; };
+ if(player.x>landers[landerloop].x){ landershot[landershotloop].direction = 1; };
+ //set multipler based on direction
+ multiplier = -1;
+ };
+ if(player.y>=landers[landerloop].y){
+ if(player.x<landers[landerloop].x){ landershot[landershotloop].direction = 9; };
+ if(player.x==landers[landerloop].x){ landershot[landershotloop].direction = 6; };
+ if(player.x>landers[landerloop].x){ landershot[landershotloop].direction = 3; };
+ };
landershot[landershotloop].speed = landers[landerloop].speed + 2;
landershot[landershotloop].x = landers[landerloop].x;
- //set multipler based on direction
landershot[landershotloop].y = landers[landerloop].y + (landers[landerloop].speed * multiplier);
landershot[landershotloop].vtime = 1;
break;