blob: 51f45c1d9d183022d566df6bada08c48a0a13916 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
/*=======================================*\
| ____ ____ |
| / \ /\ | |
| \____ / \ |____ |
| \ /____\ | |
| \____/prite / \nimation |____ditor |
| |
| Copyleft Vasily_Makarov 2011 |
| |
\*=======================================*/
#ifndef SAE_H
#define SAE_H
#include <gtk/gtk.h>
#include "common.h"
#include "xml.h"
void kill_timeout(guint tag);
typedef struct {
int index;
int offsetX;
int offsetY;
int delay;
int line_number;
GdkPixbuf *pixbuf;
cairo_surface_t *surface;
} Frame;
Frame *frame_new(int index, int offsetX, int offsetY, int delay);
typedef struct {
XMLNode *node;
int offsetX;
int offsetY;
int width;
int height;
int spriteset_width;
int spriteset_height;
GdkPixbuf *spriteset;
} Imageset;
Imageset *imageset_new();
typedef struct {
GList *imagesets;
GList *actions;
GList *animations;
GList *animation;
Imageset *imageset;
Frame *sprite;
guint anim_tag;
XMLNode *root;
GtkWidget *imagesets_combo_box;
GtkWidget *actions_combo_box;
GtkWidget *animations_combo_box;
GdkPixbuf *ground;
int offsetX;
int offsetY;
} SAEInfo;
SAEInfo *sae_info_new();
GdkPixbuf *sae_info_ground_new();
GdkPixbuf* get_sprite_by_index(int index, SAEInfo *sae_info);
gboolean set_up_animation_by_direction(SAEInfo *sae_info, const gchar *direction);
#endif
|