diff options
author | Vasily_Makarov <danilka.pro@gmail.com> | 2011-06-09 18:17:08 +0400 |
---|---|---|
committer | Vasily_Makarov <danilka.pro@gmail.com> | 2011-06-09 18:17:08 +0400 |
commit | fae8a3bcd2f31afb357fcf83beb9a7cd6d4bc400 (patch) | |
tree | cafd334e75b8b369912c7ab89953f12a2b73816a /saedit/main.h | |
parent | 9bb81baee05bb38cf80c8ef10d4db94b307f6eea (diff) | |
download | evol-tools-fae8a3bcd2f31afb357fcf83beb9a7cd6d4bc400.tar.gz evol-tools-fae8a3bcd2f31afb357fcf83beb9a7cd6d4bc400.tar.bz2 evol-tools-fae8a3bcd2f31afb357fcf83beb9a7cd6d4bc400.tar.xz evol-tools-fae8a3bcd2f31afb357fcf83beb9a7cd6d4bc400.zip |
Add Sprite Animation Editor in /saedit
Diffstat (limited to 'saedit/main.h')
-rw-r--r-- | saedit/main.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/saedit/main.h b/saedit/main.h new file mode 100644 index 0000000..02f060f --- /dev/null +++ b/saedit/main.h @@ -0,0 +1,62 @@ +/*=======================================*\ +| ____ ____ | +| / \ /\ | | +| \____ / \ |____ | +| \ /____\ | | +| \____/prite / \nimation |____ditor | +| | +| Copyleft Vasily_Makarov 2011 | +| | +\*=======================================*/ +typedef struct { + XMLNode *node; + GList *next; + guint delay; +} sequence; + +typedef struct { + int index; + int offsetX; + int offsetY; +} sprite_info; +static sprite_info *sprite_info_new(int index, int offsetX, int offsetY); + +typedef struct { + XMLNode *node; + int offsetX; + int offsetY; +} imageset_info; +static imageset_info *imageset_info_new() { + return g_new0(imageset_info, 1); +} + +static gboolean show_animation_by_sub_nodes (GList *sub_nodes); +static gchar *markup_bold(gchar *str); +static void format_src_string(gchar *src); +static void open_xml_file(GtkButton *button, gpointer buffer); +static void free_imagesets(); +static void free_actions(); +static void free_animations(); +static void save_to_xml_file(GtkButton *button, gpointer buffer); +static void xml_file_set_handler(GtkFileChooserButton *widget, gpointer data); +static void data_folder_set_handler(GtkFileChooserButton *widget, gpointer data); +static void show_wrong_source_buffer_dialog(); +static gchar* xml_node_get_attr_value(const XMLNode *node, const gchar *attr_name); +static gint xml_node_compare_with_name(gconstpointer a, gconstpointer b); +static gint xml_node_compare_with_action_node_by_imageset_name_func(gconstpointer a, gconstpointer b); +static gint xml_node_compare_with_direction_attr(gconstpointer node, gconstpointer direction); +static gint xml_node_compare_with_name_attr(gconstpointer node, gconstpointer name); +static GdkPixbuf* get_sprite_by_index(size_t index); +static void set_sprite_by_index(size_t index); +static void set_up_actions_by_imageset_name(gchar *imageset_name); +static gboolean set_up_imagesets(const XMLNode *root); +static gboolean sequence_source_func(sequence *seq); +static gboolean show_general_animation(); +static gboolean set_up_action_by_name(const gchar *name); +static void actions_combo_box_changed_handler(GtkComboBox *widget, gpointer user_data); +static void animations_combo_box_changed_handler(GtkComboBox *widget, gpointer user_data); +static void set_up_imageset_by_node(XMLNode *node); +static void imagesets_combo_box_changed_handler(GtkComboBox *widget, gpointer user_data); +static void parse_xml_buffer(GtkWidget *button, gpointer buffer); +static void set_up_interface(); +static void show_about_dialog(); |