diff options
author | P. 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) |
commit | 13499eb84d624b2c94e415bab4b1304408cf0f92 (patch) | |
tree | d238b54d20115b0566c89e73c319eb677d544462 | |
parent | 3c71b27c5e1a74e75600efb730ab3252f9d468f6 (diff) | |
download | dodge-balls-13499eb84d624b2c94e415bab4b1304408cf0f92.zip dodge-balls-13499eb84d624b2c94e415bab4b1304408cf0f92.tar.gz dodge-balls-13499eb84d624b2c94e415bab4b1304408cf0f92.tar.bz2 |
map: Initialize all object members
-rw-r--r-- | src/map.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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 { |