Mercurial > molko
comparison libmlk-core/core/animation.h @ 292:08ab73b32832
misc: add extern "C" {} blocks for C++ friends
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 05 Mar 2021 10:08:09 +0100 |
parents | c4da052c0def |
children | 196264679079 |
comparison
equal
deleted
inserted
replaced
291:5d8700074dd7 | 292:08ab73b32832 |
---|---|
19 #ifndef MOLKO_CORE_ANIMATION_H | 19 #ifndef MOLKO_CORE_ANIMATION_H |
20 #define MOLKO_CORE_ANIMATION_H | 20 #define MOLKO_CORE_ANIMATION_H |
21 | 21 |
22 #include <stdbool.h> | 22 #include <stdbool.h> |
23 | 23 |
24 #include "core.h" | |
25 | |
24 struct drawable; | 26 struct drawable; |
25 struct sprite; | 27 struct sprite; |
26 | 28 |
27 struct animation { | 29 struct animation { |
28 const struct sprite *sprite; | 30 const struct sprite *sprite; |
29 unsigned int row; | 31 unsigned int row; |
30 unsigned int column; | 32 unsigned int column; |
31 unsigned int delay; | 33 unsigned int delay; |
32 unsigned int elapsed; | 34 unsigned int elapsed; |
33 }; | 35 }; |
36 | |
37 CORE_BEGIN_DECLS | |
34 | 38 |
35 void | 39 void |
36 animation_init(struct animation *an, const struct sprite *sprite, unsigned int delay); | 40 animation_init(struct animation *an, const struct sprite *sprite, unsigned int delay); |
37 | 41 |
38 void | 42 void |
48 animation_draw(const struct animation *an, int x, int y); | 52 animation_draw(const struct animation *an, int x, int y); |
49 | 53 |
50 void | 54 void |
51 animation_drawable(struct animation *an, struct drawable *dw, int x, int y); | 55 animation_drawable(struct animation *an, struct drawable *dw, int x, int y); |
52 | 56 |
57 CORE_END_DECLS | |
58 | |
53 #endif /* !MOLKO_CORE_ANIMATION_H */ | 59 #endif /* !MOLKO_CORE_ANIMATION_H */ |