summaryrefslogtreecommitdiff
path: root/saedit/action.h
blob: 57da15571a9d3289e9055a6a1555c9a63f383184 (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
#ifndef ACTION_H
#define ACTION_H

#include <glib.h>
#include "common.h"
#include "imageset.h"
#include "animation.h"
#include "xml.h"

typedef struct {
	gchar *name;
	gint hp;
	GList *animations;
} Action;

void
action_free (Action *action);

gint
action_compare_by_hp_and_name (
	const Action *first,
	const Action *second
);

gboolean
action_hp_and_name_equals (
	const Action *action,
	gint hp,
	const gchar *name
);

void
action_add_animation (
	Action  *action,
	const Imageset *imageset,
	const XMLNode *node,
	gint included_from
);

const Animation *
action_get_animation (
	const Action *action,
	const gchar *direction
);

void
action_get_hp_and_name (
	const Action *action,
	gint *hp,
	gchar **name
);

GList *
action_get_directions (const Action *action);

gchar *
get_action_id (gint hp, const gchar *name);

#endif