main.c
// Tests wether a coordinate is free to spawn/walk on or not.
Tests wether a coordinate is free to spawn/walk on or not.
Tests wether a coordinate is free to spawn / walk on or not .
int freeCoord(coord c)
{
    if(map[c.y][c.x] != FLOOR) return 0;
    if(player->c.x == c.x && player->c.y == c.y) return 0;
    LIST_FOREACH(ep2, &entities, listitems)
    if(ep2->entity.c.x == c.x && ep2->entity.c.y == c.y) return 0;
    return 1;
}
int freeCoord ( coord c ) { if ( map [ c . y ] [ c . x ] != FLOOR ) return 0 ; if ( player -> c . x == c . x && player -> c . y == c . y ) return 0 ; LIST_FOREACH ( ep2 , & entities , listitems ) if ( ep2 -> entity . c . x == c . x && ep2 -> entity . c . y == c . y ) return 0 ; return 1 ; }
Tests wether a coordinate is free to spawn/walk on or not.
Tests wether a coordinate is free to spawn / walk on or not .