diff options
Diffstat (limited to 'src/resources/map.h')
-rw-r--r-- | src/resources/map.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/resources/map.h b/src/resources/map.h index 11ba808..bf225de 100644 --- a/src/resources/map.h +++ b/src/resources/map.h @@ -35,9 +35,33 @@ struct layer { char *compression; char *raw_data; }; +struct map_exit { + struct map *map; + int x; + int y; + int width; + int height; + char *target_map_name; + struct map *target_map; + int target_x_coord; + int target_y_coord; + struct map_exit *next; +}; +struct map_spawn { + struct map *map; + int x; + int y; + int width; + int height; + int player; + struct map_spawn *next; +}; struct map { struct resource res; char *dirname; + /* TODO: map_get() should take a name, not a path. + char *name; + */ int width; int height; int tilewidth; @@ -46,6 +70,8 @@ struct map { struct map_tileset *tilesets_tail; struct layer layers[LAYERS_MAX]; Uint8 *collision; + struct map_exit *map_exits_head; + struct map_exit *map_exits_tail; int cur_ts_firstgid; }; @@ -53,5 +79,6 @@ struct map *map_get(const char *path); void map_free(struct map *map); void map_add_tileset(struct map *m, struct tileset *t, int firstgid); struct layer *map_get_layer(struct map *m, const char *name); +void map_add_exit(struct map *m, struct map_exit *e); #endif |