summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2021-03-25 19:09:23 (EDT)
committer P. J. McDermott <pj@pehjota.net>2021-03-25 19:10:05 (EDT)
commit13499eb84d624b2c94e415bab4b1304408cf0f92 (patch)
treed238b54d20115b0566c89e73c319eb677d544462
parent3c71b27c5e1a74e75600efb730ab3252f9d468f6 (diff)
downloaddodge-balls-13499eb84d624b2c94e415bab4b1304408cf0f92.zip
dodge-balls-13499eb84d624b2c94e415bab4b1304408cf0f92.tar.gz
dodge-balls-13499eb84d624b2c94e415bab4b1304408cf0f92.tar.bz2
map: Initialize all object members
-rw-r--r--src/map.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/map.c b/src/map.c
index 78d5d05..3f3a6f9 100644
--- a/src/map.c
+++ b/src/map.c
@@ -583,9 +583,13 @@ _db_tmx_object_start(void *pv, const char *name, const char **attr)
XML_StopParser(p, XML_FALSE);
return;
}
- map->obj_x = x + w / 2;
- map->obj_y = y - h / 2; /* Object origin is BOTTOM left */
- map->obj_r = w / 2;
+ map->obj_x = x + w / 2;
+ map->obj_y = y - h / 2; /* Object origin is BOTTOM left */
+ map->obj_r = w / 2;
+ map->obj_a = 0;
+ map->obj_d = 0;
+ map->obj_sr = 0;
+ map->obj_s = 0.0;
db_xml_node_push(p, map, _db_tmx_object_properties_start,
_db_tmx_object_end, NULL);
} else {