adjust--;
};
- if((object.x>1&&adjust<0)||(object.x<17&&adjust>0)){
+ if((object.x>1)&&(object.x<17)){
object.x = object.x+adjust;
};
};
} else {
if(input==4||input==6||input==1||input==7||input==3||input==9){
- if(object.direction!=input){
- object.speed = 0;
- } else {
- object.speed = 1;
- };
+ object.speed = 0;
object.direction = input;
};
void radar_plot(game_object object, int drawlocation){
if(object.x>0&&object.y>0&&object.active==1){
- int line = 0; //vert plot pos
+ int line = 1; //vert plot pos
int row = 0; //horiz plot pos
int x_offset = 19; //offset for height
int y_offset = 17; //offset for display
int dl_radar; //main offset
//set line based on height rules
- if(object.x<=3){
- line = 1;
- } else if(object.x>=4&&object.x<=9){
+ if(object.x>=4&&object.x<=9){
line = 2;
} else if(object.x>=10&&object.x<=15){
line = 3;
//plot with symbol
mvprintw(line,row,"%s",object.radar);
};
-}
\ No newline at end of file
+}