- added object support (untested)
[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 struct bouncy_distro_type
25 {
26   base_type base;
27 };
28
29 extern texture_type img_distro[4];
30
31 void bouncy_distro_init(bouncy_distro_type* pbouncy_distro, float x, float y);
32 void bouncy_distro_action(bouncy_distro_type* pbouncy_distro);
33 void bouncy_distro_draw(bouncy_distro_type* pbouncy_distro);
34 void bouncy_distro_collision(bouncy_distro_type* pbouncy_distro, int c_object);
35
36 #define BOUNCY_BRICK_MAX_OFFSET 8
37 #define BOUNCY_BRICK_SPEED 0.9
38
39 struct broken_brick_type
40 {
41   base_type base;
42   timer_type timer;
43 };
44
45 void broken_brick_init(broken_brick_type* pbroken_brick, float x, float y, float xm, float ym);
46 void broken_brick_action(broken_brick_type* pbroken_brick);
47 void broken_brick_draw(broken_brick_type* pbroken_brick);
48
49 struct bouncy_brick_type
50 {
51   float offset;
52   float offset_m;
53   int shape;
54   base_type base;
55 };
56
57 void bouncy_brick_init(bouncy_brick_type* pbouncy_brick, float x, float y);
58 void bouncy_brick_action(bouncy_brick_type* pbouncy_brick);
59 void bouncy_brick_draw(bouncy_brick_type* pbouncy_brick);
60
61 struct floating_score_type
62 {
63   int value;
64   timer_type timer;
65   base_type base;
66 };
67
68 void floating_score_init(floating_score_type* pfloating_score, float x, float y, int s);
69 void floating_score_action(floating_score_type* pfloating_score);
70 void floating_score_draw(floating_score_type* pfloating_score);
71
72 #endif /*SUPERTUX_WORLD_H*/
73