c4cba8de7145ab664c899cdf506adb4ceef6bcb8
[rocksndiamonds.git] / src / misc.h
1 /***********************************************************
2 *  Rocks'n'Diamonds -- McDuffin Strikes Back!              *
3 *----------------------------------------------------------*
4 *  ©1995 Artsoft Development                               *
5 *        Holger Schemel                                    *
6 *        33659 Bielefeld-Senne                             *
7 *        Telefon: (0521) 493245                            *
8 *        eMail: aeglos@valinor.owl.de                      *
9 *               aeglos@uni-paderborn.de                    *
10 *               q99492@pbhrzx.uni-paderborn.de             *
11 *----------------------------------------------------------*
12 *  misc.h                                                  *
13 *                                                          *
14 *  Letzte Aenderung: 15.06.1995                            *
15 ***********************************************************/
16
17 #ifndef MISC_H
18 #define MISC_H
19
20 #include "main.h"
21
22 /* values for cartoon figures */
23 #define NUM_TOONS       6
24
25 #define DWARF_XSIZE     40
26 #define DWARF_YSIZE     48
27 #define DWARF_X         2
28 #define DWARF_Y         72
29 #define DWARF2_Y        186
30 #define DWARF_FRAMES    8
31 #define DWARF_FPS       10
32 #define DWARF_STEPSIZE  4
33 #define JUMPER_XSIZE    48
34 #define JUMPER_YSIZE    56
35 #define JUMPER_X        2
36 #define JUMPER_Y        125
37 #define JUMPER_FRAMES   8
38 #define JUMPER_FPS      10
39 #define JUMPER_STEPSIZE 4
40 #define CLOWN_XSIZE     80
41 #define CLOWN_YSIZE     110
42 #define CLOWN_X         327
43 #define CLOWN_Y         10
44 #define CLOWN_FRAMES    1
45 #define CLOWN_FPS       10
46 #define CLOWN_STEPSIZE  4
47 #define BIRD_XSIZE      32
48 #define BIRD_YSIZE      30
49 #define BIRD1_X         2
50 #define BIRD1_Y         2
51 #define BIRD2_X         2
52 #define BIRD2_Y         37
53 #define BIRD_FRAMES     8
54 #define BIRD_FPS        20
55 #define BIRD_STEPSIZE   4
56
57 #define ANIMDIR_LEFT    1
58 #define ANIMDIR_RIGHT   2
59 #define ANIMDIR_UP      4
60 #define ANIMDIR_DOWN    8
61
62 #define ANIMPOS_ANY     0
63 #define ANIMPOS_LEFT    1
64 #define ANIMPOS_RIGHT   2
65 #define ANIMPOS_UP      4
66 #define ANIMPOS_DOWN    8
67 #define ANIMPOS_UPPER   16
68
69 #define ANIM_START      0
70 #define ANIM_CONTINUE   1
71 #define ANIM_STOP       2
72
73 struct AnimInfo
74 {
75   int width, height;
76   int src_x, src_y;
77   int frames;
78   int frames_per_second;
79   int stepsize;
80   BOOL pingpong;
81   int direction;
82   int position;
83 };
84
85 #define NEW_RANDOMIZE   -1
86
87 void microsleep(unsigned long);
88 unsigned long be2long(unsigned long *);
89 char *int2str(int, int);
90 unsigned int RND(unsigned int);
91 unsigned int InitRND(long);
92 char *GetLoginName(void);
93
94 void InitAnimation(void);
95 void StopAnimation(void);
96 void DoAnimation(void);
97 void HandleAnimation(int);
98 BOOL AnimateToon(int, BOOL);
99 void DrawAnim(int, int, int, int, int, int, int, int);
100
101 #endif