- removed old code
[supertux.git] / src / gameobjs.h
1 //  $Id$
2 // 
3 //  SuperTux
4 //  Copyright (C) 2000 Bill Kendrick <bill@newbreedsoftware.com>
5 //  Copyright (C) 2004 Tobias Glaesser <tobi.web@gmx.de>
6 //
7 //  This program is free software; you can redistribute it and/or
8 //  modify it under the terms of the GNU General Public License
9 //  as published by the Free Software Foundation; either version 2
10 //  of the License, or (at your option) any later version.
11 //
12 //  This program is distributed in the hope that it will be useful,
13 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 //  GNU General Public License for more details.
16 // 
17 //  You should have received a copy of the GNU General Public License
18 //  along with this program; if not, write to the Free Software
19 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 //  02111-1307, USA.
21
22 #ifndef SUPERTUX_GAMEOBJS_H
23 #define SUPERTUX_GAMEOBJS_H
24
25 #include "type.h"
26 #include "texture.h"
27 #include "timer.h"
28 #include "scene.h"
29
30 /* Bounciness of distros: */
31 #define NO_BOUNCE 0
32 #define BOUNCE 1
33
34 class BouncyDistro : public GameObject
35 {
36  public:
37   
38   void init(float x, float y);
39   void action(double frame_ratio);
40   void draw(); 
41   std::string type() { return "BouncyDistro"; };
42 };
43
44 extern Surface* img_distro[4];
45
46 #define BOUNCY_BRICK_MAX_OFFSET 8
47 #define BOUNCY_BRICK_SPEED 0.9
48
49 class Tile;
50
51 class BrokenBrick : public GameObject
52 {
53  public:
54   Timer timer;
55   Tile* tile;
56
57   void init(Tile* tile, float x, float y, float xm, float ym);
58   void action(double frame_ratio);
59   void draw();
60   std::string type() { return "BrokenBrick"; };
61 };
62
63 class BouncyBrick : public GameObject
64 {
65  public:
66   float offset;
67   float offset_m;
68   int shape;
69
70   void init(float x, float y);
71   void action(double frame_ratio);
72   void draw();
73   std::string type() { return "BouncyBrick"; };
74 };
75
76 class FloatingScore : public GameObject
77 {
78  public:
79   int value;
80   Timer timer;
81   
82   void init(float x, float y, int s);
83   void action(double frame_ratio);
84   void draw();
85   std::string type() { return "FloatingScore"; };
86 };
87
88 #endif 
89
90 /* Local Variables: */
91 /* mode:c++ */
92 /* End: */