annotate libmlk-rpg/mlk/rpg/battle-entity-state-blinking.h @ 580:459ff09c09b3

core: animation can be looped
author David Demelier <markand@malikania.fr>
date Sat, 11 Mar 2023 21:20:33 +0100
parents bc5483849614
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
383
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
1 /*
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 * battle-entity-state-blinking.h -- the entity is blinking
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 *
445
773a082f0b91 misc: update copyright years
David Demelier <markand@malikania.fr>
parents: 434
diff changeset
4 * Copyright (c) 2020-2023 David Demelier <markand@malikania.fr>
383
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 *
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 * Permission to use, copy, modify, and/or distribute this software for any
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 * purpose with or without fee is hereby granted, provided that the above
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 * copyright notice and this permission notice appear in all copies.
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 *
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
17 */
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
18
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
19 #ifndef MLK_RPG_BATTLE_ENTITY_STATE_BLINKING_H
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
20 #define MLK_RPG_BATTLE_ENTITY_STATE_BLINKING_H
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
21
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 struct battle_entity;
472
bc5483849614 core: texture -> mlk_texture
David Demelier <markand@malikania.fr>
parents: 445
diff changeset
23 struct mlk_texture;
383
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
24
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
25 struct battle_entity_state_blinking {
472
bc5483849614 core: texture -> mlk_texture
David Demelier <markand@malikania.fr>
parents: 445
diff changeset
26 struct mlk_texture *tex;
383
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
27 unsigned int elapsed;
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
28 unsigned int count;
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
29 };
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
30
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
31 void
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
32 battle_entity_state_blinking_init(struct battle_entity_state_blinking *, struct battle_entity *et);
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
33
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
34 int
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
35 battle_entity_state_blinking_update(struct battle_entity_state_blinking *, unsigned int);
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
36
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
37 void
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
38 battle_entity_state_blinking(struct battle_entity *);
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
39
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
40 #endif /* !MLK_RPG_BATTLE_ENTITY_STATE_BLINKING_H */