annotate src/libmlk-rpg/rpg/battle-entity-state-blinking.h @ 383:b944cd41e8f9

rpg: do the same for battle entities
author David Demelier <markand@malikania.fr>
date Sun, 13 Feb 2022 11:13:17 +0100
parents
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 *
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 * Copyright (c) 2020-2022 David Demelier <markand@malikania.fr>
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;
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
23 struct texture;
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 {
b944cd41e8f9 rpg: do the same for battle entities
David Demelier <markand@malikania.fr>
parents:
diff changeset
26 struct texture *tex;
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 */