summaryrefslogtreecommitdiff
path: root/saedit
diff options
context:
space:
mode:
authorVasily_Makarov <danilka.pro@gmail.com>2011-06-12 12:33:30 +0400
committerVasily_Makarov <danilka.pro@gmail.com>2011-06-12 12:33:30 +0400
commitb7e4fba486963cc630f7d0ae8e56ac0f9c8393cc (patch)
tree21de58840cd4561781bc50e771b174e228950fe7 /saedit
parent5e831b42ef17b426c575fa315ef68430c4815857 (diff)
downloadevol-tools-b7e4fba486963cc630f7d0ae8e56ac0f9c8393cc.tar.gz
evol-tools-b7e4fba486963cc630f7d0ae8e56ac0f9c8393cc.tar.bz2
evol-tools-b7e4fba486963cc630f7d0ae8e56ac0f9c8393cc.tar.xz
evol-tools-b7e4fba486963cc630f7d0ae8e56ac0f9c8393cc.zip
saedit: Update
Diffstat (limited to 'saedit')
-rw-r--r--saedit/main.c7
-rw-r--r--saedit/main.h15
-rwxr-xr-xsaedit/saeditbin452072 -> 452307 bytes
3 files changed, 15 insertions, 7 deletions
diff --git a/saedit/main.c b/saedit/main.c
index 0c19f7a..404ca11 100644
--- a/saedit/main.c
+++ b/saedit/main.c
@@ -32,7 +32,7 @@ cairo_surface_t *get_grid_surface(int w, int h) {
for (x = 0; x < w; x++)
for (y = 0; y < h; y++) {
- gdk_cairo_set_source_pixbuf(cr, gen_sae_info->imageset->ground, x * GRID_SIZE, y * GRID_SIZE);
+ gdk_cairo_set_source_pixbuf(cr, gen_sae_info->ground, x * GRID_SIZE, y * GRID_SIZE);
cairo_paint(cr);
}
@@ -109,7 +109,8 @@ void free_imagesets(SAEInfo *sae_info) {
}
void free_imageset(SAEInfo *sae_info) {
- sae_info->imageset = imageset_info_new();
+ gen_sae_info->imageset = imageset_info_new();
+ gen_sae_info->ground = sae_info_ground_new();
gtk_widget_set_sensitive(imageset_preview_menu_item, FALSE);
}
@@ -431,7 +432,7 @@ void set_up_imageset_by_node(XMLNode *node, SAEInfo *sae_info) {
ground_attr = g_strjoin(NULL, DIR_GROUNDS, SEPARATOR_SLASH, ground_attr, ".png", NULL);
GdkPixbuf *pbuf = gdk_pixbuf_new_from_file(ground_attr, NULL);
if(pbuf != NULL)
- sae_info->imageset->ground = pbuf;
+ sae_info->ground = pbuf;
}
}
diff --git a/saedit/main.h b/saedit/main.h
index 2a5b670..01b60e8 100644
--- a/saedit/main.h
+++ b/saedit/main.h
@@ -101,15 +101,12 @@ typedef struct {
int width;
int height;
GdkPixbuf *spriteset;
- GdkPixbuf *ground;
} ImagesetInfo;
static ImagesetInfo *imageset_info_new() {
ImagesetInfo *res = g_new0(ImagesetInfo, 1);
- res->ground = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, GRID_SIZE * 3, GRID_SIZE * 3);
res->width = SPRITE_WIDTH_DEFAULT;
res->height = SPRITE_HEIGHT_DEFAULT;
- gdk_pixbuf_fill(res->ground, 0x00000000);
return res;
}
@@ -124,10 +121,19 @@ typedef struct {
GtkWidget *imagesets_combo_box;
GtkWidget *actions_combo_box;
GtkWidget *animations_combo_box;
+ GdkPixbuf *ground;
} SAEInfo;
+static GdkPixbuf *sae_info_ground_new() {
+ GdkPixbuf *ground = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, GRID_SIZE * 3, GRID_SIZE * 3);
+ gdk_pixbuf_fill(ground, 0x00000000);
+ return ground;
+}
+
static SAEInfo *sae_info_new() {
- return g_new0(SAEInfo, 1);
+ SAEInfo *res = g_new0(SAEInfo, 1);
+ res->ground = sae_info_ground_new();
+ return res;
}
int spriteset_width, spriteset_height;
@@ -197,3 +203,4 @@ static void free_imageset();
static void kill_timeout(int tag);
static void show_grid_menu_item_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data);
static void open_menu_item_activate(GtkMenuItem *menuitem, GtkFileChooserDialog *fcdialog);
+static void parse_xml_text(gchar *text, SAEInfo *sae_info);
diff --git a/saedit/saedit b/saedit/saedit
index 72e0f41..f361c59 100755
--- a/saedit/saedit
+++ b/saedit/saedit
Binary files differ