From b32bffdf8fc10db7875ce1bbf4fed2a23a160653 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 17 Feb 2013 16:04:04 -0500 Subject: Support objectgroups and map exits. --- (limited to 'src/resources/map.h') 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 -- cgit v0.9.1