diff options
author | Vasily_Makarov <danilka.pro@gmail.com> | 2011-06-11 10:20:12 +0400 |
---|---|---|
committer | Vasily_Makarov <danilka.pro@gmail.com> | 2011-06-11 10:20:12 +0400 |
commit | d1517d6d1d5c5d398e70696abe76ef5c2bd1711a (patch) | |
tree | 2d1959b875fa44d13c2e852fb15d075703bf6a6b /saedit/main.c | |
parent | b69351d7ea8c70ffdcde8e22699dcfbdafbde345 (diff) | |
download | evol-tools-d1517d6d1d5c5d398e70696abe76ef5c2bd1711a.tar.gz evol-tools-d1517d6d1d5c5d398e70696abe76ef5c2bd1711a.tar.bz2 evol-tools-d1517d6d1d5c5d398e70696abe76ef5c2bd1711a.tar.xz evol-tools-d1517d6d1d5c5d398e70696abe76ef5c2bd1711a.zip |
saedit: Add <end /> offsets saving
Diffstat (limited to 'saedit/main.c')
-rw-r--r-- | saedit/main.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/saedit/main.c b/saedit/main.c index c1fb09c..ee4104c 100644 --- a/saedit/main.c +++ b/saedit/main.c @@ -235,16 +235,18 @@ gboolean show_animation_by_sub_nodes(GList *sub_nodes) { if (next == NULL) next = g_list_first(sub_nodes); - int ofX = 0, ofY = 0; - gchar *ofX_param, *ofY_param; - ofX_param = xml_node_get_attr_value(node, "offsetX"); - if (ofX_param != NULL) - sscanf(ofX_param, "%d", &ofX); - ofY_param = xml_node_get_attr_value(node, "offsetY"); - if (ofY_param != NULL) - sscanf(ofY_param, "%d", &ofY); - current_sprite->offsetX = ofX; - current_sprite->offsetY = ofY; + if (g_strcmp0(node->name, "end")) { + int ofX = 0, ofY = 0; + gchar *ofX_param, *ofY_param; + ofX_param = xml_node_get_attr_value(node, "offsetX"); + if (ofX_param != NULL) + sscanf(ofX_param, "%d", &ofX); + ofY_param = xml_node_get_attr_value(node, "offsetY"); + if (ofY_param != NULL) + sscanf(ofY_param, "%d", &ofY); + current_sprite->offsetX = ofX; + current_sprite->offsetY = ofY; + } if (g_strcmp0(node->name, "frame") == 0) { gchar *index_attr = xml_node_get_attr_value(node, "index"); |