- moved gameobjects into there own file
[supertux.git] / src / gameobjs.h
1
2 #ifndef SUPERTUX_GAMEOBJS_H
3 #define SUPERTUX_GAMEOBJS_H
4
5 #include "type.h"
6 #include "texture.h"
7 #include "timer.h"
8 #include "scene.h"
9
10 /* Bounciness of distros: */
11 #define NO_BOUNCE 0
12 #define BOUNCE 1
13
14 class bouncy_distro_type
15 {
16  public:
17   base_type base;
18 };
19
20 extern texture_type img_distro[4];
21
22 void bouncy_distro_init(bouncy_distro_type* pbouncy_distro, float x, float y);
23 void bouncy_distro_action(bouncy_distro_type* pbouncy_distro);
24 void bouncy_distro_draw(bouncy_distro_type* pbouncy_distro);
25 void bouncy_distro_collision(bouncy_distro_type* pbouncy_distro, int c_object);
26
27 #define BOUNCY_BRICK_MAX_OFFSET 8
28 #define BOUNCY_BRICK_SPEED 0.9
29
30 class Tile;
31
32 class broken_brick_type
33 {
34  public:
35   base_type base;
36   timer_type timer;
37   Tile* tile;
38 };
39
40 void broken_brick_init(broken_brick_type* pbroken_brick, Tile* tile,
41                        float x, float y, float xm, float ym);
42 void broken_brick_action(broken_brick_type* pbroken_brick);
43 void broken_brick_draw(broken_brick_type* pbroken_brick);
44
45 class bouncy_brick_type
46 {
47  public:
48   float offset;
49   float offset_m;
50   int shape;
51   base_type base;
52 };
53
54 void bouncy_brick_init(bouncy_brick_type* pbouncy_brick, float x, float y);
55 void bouncy_brick_action(bouncy_brick_type* pbouncy_brick);
56 void bouncy_brick_draw(bouncy_brick_type* pbouncy_brick);
57
58 class floating_score_type
59 {
60  public:
61   int value;
62   timer_type timer;
63   base_type base;
64 };
65
66 void floating_score_init(floating_score_type* pfloating_score, float x, float y, int s);
67 void floating_score_action(floating_score_type* pfloating_score);
68 void floating_score_draw(floating_score_type* pfloating_score);
69
70 #endif 
71
72 /* Local Variables: */
73 /* mode:c++ */
74 /* End */