]> git.jsancho.org Git - lugaru.git/blob - Source/Animation.h
Install more docs (AUTHORS, DEBUG-OPTIONS.txt)
[lugaru.git] / Source / Animation.h
1 /*
2 Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
3
4 This file is part of Lugaru.
5
6 Lugaru is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 Lugaru is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef ANIMATION_H
21 #define ANIMATION_H
22
23 enum anim_attack_type {
24     neutral, normalattack, reversed, reversal
25 };
26
27 enum anim_height_type {
28     lowheight, middleheight, highheight
29 };
30
31 enum animation_types {
32 #define DECLARE_ANIM(id, ...) id,
33 #include "Animation.def"
34 #undef DECLARE_ANIM
35     animation_count
36 };
37
38 enum animation_bit_offsets {
39 #define DECLARE_ANIM_BIT(bit) o_##bit,
40 #include "Animation.def"
41 #undef DECLARE_ANIM_BIT
42     animation_bit_count
43 };
44
45 enum animation_bits_def {
46 #define DECLARE_ANIM_BIT(bit) bit = 1 << o_##bit,
47 #include "Animation.def"
48 #undef DECLARE_ANIM_BIT
49 };
50
51 static const int animation_bits[animation_count] = {
52 #define DECLARE_ANIM(id, name, height, type, bits) bits,
53 #include "Animation.def"
54 #undef DECLARE_ANIM
55 };
56
57 extern Animation animation[animation_count];
58
59 extern void loadAllAnimations();
60 #endif