From e5b4399a3cdbb259236e6d98896abc706fc93c1d Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 17 Feb 2013 16:20:48 -0500 Subject: Divide map exit dimensions by map tile dimensions. --- (limited to 'src/resources') diff --git a/src/resources/map.c b/src/resources/map.c index 800a272..c1a33bf 100644 --- a/src/resources/map.c +++ b/src/resources/map.c @@ -615,6 +615,10 @@ tmx_objectgroup_el_start(void *pv, const char * name, const char **attr) xml_get_int_attr(p, attr, "y", &e->y, 1); xml_get_int_attr(p, attr, "width", &e->width, 1); xml_get_int_attr(p, attr, "height", &e->height, 1); + e->x /= m->tilewidth; + e->y /= m->tileheight; + e->width /= m->tilewidth; + e->height /= m->tileheight; xml_node_push(p, e, tmx_object_exit_el_start, tmx_object_exit_end, NULL); } else if (strcmp(type, "spawn") == 0) { -- cgit v0.9.1