bool wallhit(SDL_Rect check, s_wall a_wall[], float altitude){
for(int wallhit=0; wallhit<=WALLAMOUNT; wallhit++){
if (check.x+check.w > a_wall[wallhit].x && check.x < a_wall[wallhit].x + a_wall[wallhit].w && check.y+check.h > a_wall[wallhit].y && check.y < a_wall[wallhit].y + a_wall[wallhit].h){
if(a_wall[wallhit].c==1 && altitude==a_wall[wallhit].a){
return true;
}
}
}
return false;
};