summaryrefslogtreecommitdiff
path: root/saedit/sae.c
diff options
context:
space:
mode:
authorVasily_Makarov <danilka.pro@gmail.com>2011-06-15 18:24:14 +0400
committerVasily_Makarov <danilka.pro@gmail.com>2011-06-15 18:24:14 +0400
commit6c0a4a2bc3809ee49d55fdff7c55c25d3e6ad4a5 (patch)
tree8a43922891e4f5eb7909d8d2b80f64235760e18d /saedit/sae.c
parent34dbe2ca8daae2595ee6ff37632a15e68fcc7fc2 (diff)
downloadevol-tools-6c0a4a2bc3809ee49d55fdff7c55c25d3e6ad4a5.tar.gz
evol-tools-6c0a4a2bc3809ee49d55fdff7c55c25d3e6ad4a5.tar.bz2
evol-tools-6c0a4a2bc3809ee49d55fdff7c55c25d3e6ad4a5.tar.xz
evol-tools-6c0a4a2bc3809ee49d55fdff7c55c25d3e6ad4a5.zip
saedit: Review code and add some features
Diffstat (limited to 'saedit/sae.c')
-rw-r--r--saedit/sae.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/saedit/sae.c b/saedit/sae.c
new file mode 100644
index 0000000..638baca
--- /dev/null
+++ b/saedit/sae.c
@@ -0,0 +1,45 @@
+/*=======================================*\
+| ____ ____ |
+| / \ /\ | |
+| \____ / \ |____ |
+| \ /____\ | |
+| \____/prite / \nimation |____ditor |
+| |
+| Copyleft Vasily_Makarov 2011 |
+| |
+\*=======================================*/
+
+#include <gtk/gtk.h>
+#include <ibusxml.h>
+#include "common.h"
+#include "sae.h"
+
+Frame *frame_new(int index, int offsetX, int offsetY, int delay) {
+ Frame *res = g_new0(Frame, 1);
+ res->index = index;
+ res->offsetX = offsetX;
+ res->offsetY = offsetY;
+ res->delay = delay;
+ return res;
+}
+
+Imageset *imageset_new() {
+ Imageset *res = g_new0(Imageset, 1);
+ res->width = SPRITE_WIDTH_DEFAULT;
+ res->height = SPRITE_HEIGHT_DEFAULT;
+ return res;
+}
+
+SAEInfo *sae_info_new() {
+ SAEInfo *res = g_new0(SAEInfo, 1);
+ res->ground = sae_info_ground_new();
+ res->sprite = frame_new(-1, 0, 0, 0);
+ res->imageset = imageset_new();
+ return res;
+}
+
+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;
+}