diff options
Diffstat (limited to 'src/map.c')
-rw-r--r-- | src/map.c | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -1148,3 +1148,32 @@ db_map_tile_ball_collides(struct db_map *map, int x, int y) i = y * map->w + x; return (map->b_col[i / 8] & (1 << (i % 8))) != 0; } + +struct db_map_line * +db_map_get_lines(struct db_map *map) +{ + return map->line_head; +} + +int +db_map_line_get_coords(struct db_map_line *line, + int *x1, int *y1, int *x2, int *y2) +{ + if (line == NULL) { + return -1; + } + *x1 = line->x1; + *y1 = line->y1; + *x2 = line->x2; + *y2 = line->y2; + return 1; +} + +struct db_map_line * +db_map_line_get_next(struct db_map_line *line) +{ + if (line == NULL) { + return NULL; + } + return line->next; +} |