- added worldmap stuff
[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 /* Bounciness of distros: */
20
21 #define NO_BOUNCE 0
22 #define BOUNCE 1
23
24 typedef struct bouncy_distro_type /*It is easier to read the sources IMHO, if we don't write something like int a,b,c; */
25   {
26     base_type base;
27   }
28 bouncy_distro_type;
29
30 extern texture_type img_distro[4];
31
32 void bouncy_distro_init(bouncy_distro_type* pbouncy_distro, float x, float y);
33 void bouncy_distro_action(bouncy_distro_type* pbouncy_distro);
34 void bouncy_distro_draw(bouncy_distro_type* pbouncy_distro);
35 void bouncy_distro_collision(bouncy_distro_type* pbouncy_distro, int c_object);
36
37 #define BOUNCY_BRICK_MAX_OFFSET 8
38 #define BOUNCY_BRICK_SPEED 0.9
39
40 typedef struct broken_brick_type
41   {
42     base_type base;
43     timer_type timer;
44   }
45 broken_brick_type;
46
47 void broken_brick_init(broken_brick_type* pbroken_brick, float x, float y, float xm, float ym);
48 void broken_brick_action(broken_brick_type* pbroken_brick);
49 void broken_brick_draw(broken_brick_type* pbroken_brick);
50
51 typedef struct bouncy_brick_type
52   {
53     float offset;
54     float offset_m;
55     int shape;
56     base_type base;
57   }
58 bouncy_brick_type;
59
60 void bouncy_brick_init(bouncy_brick_type* pbouncy_brick, float x, float y);
61 void bouncy_brick_action(bouncy_brick_type* pbouncy_brick);
62 void bouncy_brick_draw(bouncy_brick_type* pbouncy_brick);
63
64 typedef struct floating_score_type
65   {
66     int value;
67     timer_type timer;
68     base_type base;
69   }
70 floating_score_type;
71
72 void floating_score_init(floating_score_type* pfloating_score, float x, float y, int s);
73 void floating_score_action(floating_score_type* pfloating_score);
74 void floating_score_draw(floating_score_type* pfloating_score);
75
76 #endif /*SUPERTUX_WORLD_H*/
77