#ifndef RESOURCE_MAP_H #define RESOURCE_MAP_H #include #include "resource.h" #include "image.h" #include "layer.h" struct tileset { struct resource res; int firstgid; char *name; int tilewidth; int tileheight; struct image *image; struct tileset *next; }; struct map { struct resource res; int width; int height; int tilewidth; int tileheight; struct tileset *tilesets_head; struct tileset *tilesets_tail; struct layer *layers_head; struct layer *layers_tail; Uint8 *collision; }; struct map *map_get(const char *path); void map_free(struct map *map); void map_add_layer(struct map *m, struct layer *l); void map_add_tileset(struct map *m, struct tileset *t); #endif