Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5131 clevermous 1
/*
2
	SDL_anim:  an animation library for SDL
3
	Copyright (C) 2001, 2002  Michael Leonhard
4
 
5
	This library is free software; you can redistribute it and/or
6
	modify it under the terms of the GNU Library General Public
7
	License as published by the Free Software Foundation; either
8
	version 2 of the License, or (at your option) any later version.
9
 
10
	This library is distributed in the hope that it will be useful,
11
	but WITHOUT ANY WARRANTY; without even the implied warranty of
12
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
	Library General Public License for more details.
14
 
15
	You should have received a copy of the GNU Library General Public
16
	License along with this library; if not, write to the Free
17
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 
19
	Michael Leonhard
20
	mike@tamale.net
21
*/
22
 
23
#ifndef _SDLanim_h
24
#define _SDLanim_h
25
 
26
#include "SDL.h"
27
#include "begin_code.h"
28
 
29
/* Set up for C function definitions, even when using C++ */
30
#ifdef __cplusplus
31
extern "C" {
32
#endif
33
 
34
struct SDL_Animation;
35
typedef struct SDL_Animation {
36
	SDL_Surface *surface;
37
	int frames, w, h;
38
	Uint32 duration;
39
	} SDL_Animation;
40
 
41
extern DECLSPEC struct SDL_Animation *Anim_Load( const char *file );
42
extern DECLSPEC void Anim_Free( SDL_Animation *anim );
43
extern DECLSPEC int Anim_GetFrameNum( SDL_Animation *anim, Uint32 start, Uint32 now );
44
extern DECLSPEC int Anim_BlitFrame( SDL_Animation *anim, Uint32 start, Uint32 now, SDL_Surface *dest, SDL_Rect *dr );
45
extern DECLSPEC void Anim_GetFrameRect( SDL_Animation *anim, int frame, SDL_Rect *rect );
46
extern DECLSPEC int Anim_BlitFrameNum( SDL_Animation *anim, int frame, SDL_Surface *dest, SDL_Rect *dr );
47
extern DECLSPEC int Anim_DisplayFormat( SDL_Animation *anim );
48
 
49
/* We'll use SDL for reporting errors */
50
#define Anim_SetError	SDL_SetError
51
#define Anim_GetError	SDL_GetError
52
 
53
/* Ends C function definitions when using C++ */
54
#ifdef __cplusplus
55
};
56
#endif
57
 
58
#include "SDL/close_code.h"
59
 
60
#endif /* _SDL_anim_h */