f754876e31e03d4c4237c5e05d9b00ebdc6d2ca9
[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);
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 4
34
35 typedef struct broken_brick_type
36   {
37     base_type base;
38   }
39 broken_brick_type;
40
41 void broken_brick_action(broken_brick_type* pbroken_brick);
42 void broken_brick_draw(broken_brick_type* pbroken_brick);
43
44 typedef struct bouncy_brick_type
45   {
46     float offset;
47     float offset_m;
48     int shape;
49     base_type base;
50   }
51 bouncy_brick_type;
52
53 void bouncy_brick_action(bouncy_brick_type* pbouncy_brick);
54 void bouncy_brick_draw(bouncy_brick_type* pbouncy_brick);
55
56 typedef struct floating_score_type
57   {
58     int value;
59     timer_type timer;
60     base_type base;
61   }
62 floating_score_type;
63
64 void floating_score_init(floating_score_type* pfloating_score, int x, int y, int s);
65 void floating_score_action(floating_score_type* pfloating_score);
66 void floating_score_draw(floating_score_type* pfloating_score);
67
68 #endif /*SUPERTUX_WORLD_H*/
69