1 //-------------------------------------------------------------------------
2 /*
3 Copyright (C) 2010 EDuke32 developers and contributors
4 
5 This file is part of EDuke32.
6 
7 EDuke32 is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License version 2
9 as published by the Free Software Foundation.
10 
11 This program 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.
14 
15 See the GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20 */
21 //-------------------------------------------------------------------------
22 
23 #ifndef anim_h_
24 #define anim_h_
25 
26 typedef struct {
27     uint16_t frame;
28     int16_t sound;
29 } animsound_t;
30 
31 typedef struct
32 {
33     double frameaspect1, frameaspect2;
34     uint8_t* animbuf;
35     animsound_t *sounds;
36     uint16_t numsounds;
37     uint8_t framedelay;
38     uint8_t frameflags;
39     char animlock;
40 } dukeanim_t;
41 
42 extern dukeanim_t * g_animPtr;
43 extern hashtable_t h_dukeanim;
44 extern dukeanim_t * Anim_Find(const char *s);
45 extern dukeanim_t * Anim_Create(const char *fn);
46 int32_t Anim_Play(const char *fn);
47 void Anim_Init(void);
48 
49 #endif
50