Merge branch 'master' of github.com:AnonymusRaccoon/Gamacon

This commit is contained in:
Anonymus Raccoon
2020-04-15 12:00:56 +02:00
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -74,9 +74,9 @@ const char *file)
dprintf(fd, "\t</vertex_data>\n\t<tiles_data>\n");
for (int i = 0; ve->map[i].corners[0]; i++) {
texture = scene->get_data_ptr(scene, ve->map[i].texture);
dprintf(fd, "\t\t<tile x=\"%d\" y=\"%d\" texture=\"%s\" %s/>\n", \
dprintf(fd, "\t\t<tile x=\"%d\" y=\"%d\" texture=\"%s\" rotation=\"%d\" %s/>\n", \
ve->map[i].corners[0]->x, ve->map[i].corners[0]->y, \
texture ? texture->name : "", ve->map[i].solid ? "solid=\"true\"" : "");
texture ? texture->name : "", ve->map[i].data, ve->map[i].solid ? "solid=\"true\"" : "");
}
dprintf(fd, "\t</tiles_data>\n</gc_map>\n");
return (!close(fd));
+1
View File
@@ -76,6 +76,7 @@ bool init_data(struct tile *tile, gc_vector2i c, node *n, gc_scene *scene)
tile->texture = scene->get_data(scene, "sprite", tmp);
tile->solid = xml_getbool(n, "solid", false);
tile->type = xml_getproperty(n, "type");
tile->data = xml_getintprop(n, "rotation");
return (true);
}