summaryrefslogtreecommitdiff
path: root/saedit/interactor.h
blob: 5d0ddfc01fe77801e5c429615d451b7d8b7ec17a (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#ifndef _INTERACTOR_H_
#define _INTERACTOR_H_

#include "context.h"

typedef struct _Interactor Interactor;

Interactor *
interactor_new (
	const SpriteContext *context
);

gboolean
interactor_set_action (
	Interactor *interactor,
	gint hp,
	const gchar *name
);

gboolean
interactor_reset_animation (
	Interactor *interactor
);

gboolean
interactor_set_direction (
	Interactor *interactor,
	const gchar *direction
);

gboolean
interactor_play (
	Interactor *interactor,
	gint time
);

const GdkPixbuf *
interactor_get_sprite (const Interactor *interactor);

void
interactor_loop_start (
	Interactor *interactor,
	const guint interval,
	const guint tick_length
);

gboolean
interactor_loop_stop (Interactor *interactor);

void
interactor_free (Interactor *interactor);

void
interactor_free_with_repeaters (Interactor *interactor);

typedef void
(*InteractionUpdatedFunc) (Interactor *interactor);

void
interactor_set_updated_callback (
	Interactor *interactor,
	InteractionUpdatedFunc callback
);

void
interactor_get_offset (
	const Interactor *interactor,
	gint *offsetX,
	gint *offsetY
);

gint
interactor_get_line_no (
	Interactor *interactor
);

const gchar *
interactor_get_animation_direction (
	const Interactor *interactor
);

const gchar *
interactor_get_direction (
	const Interactor *interactor
);

gboolean
interactor_get_action_hp_and_name (
	const Interactor *interactor,
	gint *hp,
	gchar **name
);

gboolean
interactor_loop_running (
	const Interactor *interactor
);

void
interactor_skip_current_frame (
	Interactor *interactor
);

void
interactor_add_repeater (
	Interactor *interactor,
	Interactor *repeater
);

#endif