summaryrefslogtreecommitdiffstats
path: root/src/resources/map.h
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-02-17 16:04:04 (EST)
committer P. J. McDermott <pjm@nac.net>2013-02-17 16:04:04 (EST)
commitb32bffdf8fc10db7875ce1bbf4fed2a23a160653 (patch)
tree04d5fc2e22a8f6c987fce88976cb5bb187c22295 /src/resources/map.h
parent3f5ba41ed0364268d5a6d10e4ab559b61393edf0 (diff)
downloadoverworld-rpg-b32bffdf8fc10db7875ce1bbf4fed2a23a160653.zip
overworld-rpg-b32bffdf8fc10db7875ce1bbf4fed2a23a160653.tar.gz
overworld-rpg-b32bffdf8fc10db7875ce1bbf4fed2a23a160653.tar.bz2
Support objectgroups and map exits.
Diffstat (limited to 'src/resources/map.h')
-rw-r--r--src/resources/map.h27
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