4 // Copyright (C) 2000 Bill Kendrick <bill@newbreedsoftware.com>
5 // Copyright (C) 2004 Tobias Glaesser <tobi.web@gmx.de>
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.
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.
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
22 #ifndef SUPERTUX_GAMEOBJS_H
23 #define SUPERTUX_GAMEOBJS_H
37 ObjectData(ObjectData* pobject)
38 : x((int)pobject->x), y((int)pobject->y) {};
39 ObjectData(int x_, int y_, T type_specific_)
40 : x(x_), y(y_), type_specific(type_specific_) {};
43 : x(0), y(0), type_specific() {};
52 /* Bounciness of distros: */
56 class BouncyDistro : public GameObject
60 void init(float x, float y);
61 void action(double frame_ratio);
63 std::string type() { return "BouncyDistro"; };
66 extern Surface* img_distro[4];
68 #define BOUNCY_BRICK_MAX_OFFSET 8
69 #define BOUNCY_BRICK_SPEED 0.9
73 class BrokenBrick : public GameObject
79 void init(Tile* tile, float x, float y, float xm, float ym);
80 void action(double frame_ratio);
82 std::string type() { return "BrokenBrick"; };
85 class BouncyBrick : public GameObject
92 void init(float x, float y);
93 void action(double frame_ratio);
95 std::string type() { return "BouncyBrick"; };
98 class FloatingScore : public GameObject
104 void init(float x, float y, int s);
105 void action(double frame_ratio);
107 std::string type() { return "FloatingScore"; };
110 class Trampoline : public GameObject
113 void init(float x, float y);
114 void action(double frame_ratio);
116 std::string type() { return "Trampoline"; };
119 void load_trampoline_gfx();
123 /* Local Variables: */