e85ccdaaaf0cfd8306648d0857f701f2c207f20b
[supertux.git] / src / world.h
1 //
2 // Interface: world
3 //
4 // Description: 
5 //
6 //
7 // Author: Tobias Glaesser <tobi.web@gmx.de>, (C) 2003
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12
13 #ifndef SUPERTUX_WORLD_H
14 #define SUPERTUX_WORLD_H
15
16 #include <SDL.h>
17 #include "type.h"
18
19 typedef struct bouncy_distro_type /*It is easier to read the sources IMHO, if we don't write something like int a,b,c; */
20   {
21     base_type base;
22   }
23 bouncy_distro_type;
24
25 texture_type img_distro[4];
26
27 void bouncy_distro_init(bouncy_distro_type* pbouncy_distro, float x, float y);
28 void bouncy_distro_action(bouncy_distro_type* pbouncy_distro);
29 void bouncy_distro_draw(bouncy_distro_type* pbouncy_distro);
30 void bouncy_distro_collision(bouncy_distro_type* pbouncy_distro, int c_object);
31
32 #define BOUNCY_BRICK_MAX_OFFSET 8
33 #define BOUNCY_BRICK_SPEED 0.9
34
35 typedef struct broken_brick_type
36   {
37     base_type base;
38     timer_type timer;
39   }
40 broken_brick_type;
41
42 void broken_brick_init(broken_brick_type* pbroken_brick, float x, float y, float xm, float ym);
43 void broken_brick_action(broken_brick_type* pbroken_brick);
44 void broken_brick_draw(broken_brick_type* pbroken_brick);
45
46 typedef struct bouncy_brick_type
47   {
48     float offset;
49     float offset_m;
50     int shape;
51     base_type base;
52   }
53 bouncy_brick_type;
54
55 void bouncy_brick_init(bouncy_brick_type* pbouncy_brick, float x, float y);
56 void bouncy_brick_action(bouncy_brick_type* pbouncy_brick);
57 void bouncy_brick_draw(bouncy_brick_type* pbouncy_brick);
58
59 typedef struct floating_score_type
60   {
61     int value;
62     timer_type timer;
63     base_type base;
64   }
65 floating_score_type;
66
67 void floating_score_init(floating_score_type* pfloating_score, float x, float y, int s);
68 void floating_score_action(floating_score_type* pfloating_score);
69 void floating_score_draw(floating_score_type* pfloating_score);
70
71 #endif /*SUPERTUX_WORLD_H*/
72