Merge branch 'master' into releases
[rocksndiamonds.git] / src / libgame / toons.h
1 /***********************************************************
2 * Artsoft Retro-Game Library                               *
3 *----------------------------------------------------------*
4 * (c) 1995-2006 Artsoft Entertainment                      *
5 *               Holger Schemel                             *
6 *               Detmolder Strasse 189                      *
7 *               33604 Bielefeld                            *
8 *               Germany                                    *
9 *               e-mail: info@artsoft.org                   *
10 *----------------------------------------------------------*
11 * toons.h                                                  *
12 ***********************************************************/
13
14 #ifndef TOONS_H
15 #define TOONS_H
16
17 #include "system.h"
18
19
20 struct ToonScreenInfo
21 {
22   Bitmap *save_buffer;
23   void (*update_function)(void);
24   void (*prepare_backbuffer_function)(void);
25   boolean (*redraw_needed_function)(void);
26
27   struct ToonInfo *toons;
28   int num_toons;
29
30   int startx, starty;
31   int width, height;
32
33   int frame_delay_value;
34 };
35
36 struct ToonInfo
37 {
38   Bitmap *bitmap;
39
40   int src_x, src_y;
41   int width, height;
42   int anim_frames;
43   int anim_start_frame;
44   int anim_delay;
45   int anim_mode;
46   int step_offset;
47   int step_delay;
48
49   char *direction;
50   char *position;
51 };
52
53
54 int getAnimationFrame(int, int, int, int, int);
55
56 void InitToonScreen(Bitmap *, void (*update_function)(void),
57                     void (*prepare_backbuffer_function)(void),
58                     boolean (*redraw_needed_function)(void),
59                     struct ToonInfo *, int, int, int, int, int, int);
60 void InitAnimation(void);
61 void StopAnimation(void);
62 void DoAnimation(void);
63
64 #endif  /* TOONS_H */