X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fgameobjs.hpp;h=b3d50d7b46de98e334fdc97649a657eadef2f255;hb=08ccb17345a52f5ffd8a5dd6ecf675cad55f16a7;hp=4aa1fa91e61812bbb1f0c3a53b0e3f43c7832f24;hpb=5b7f9214cb929399f1a855ef5807018a9447d510;p=supertux.git diff --git a/src/object/gameobjs.hpp b/src/object/gameobjs.hpp index 4aa1fa91e..b3d50d7b4 100644 --- a/src/object/gameobjs.hpp +++ b/src/object/gameobjs.hpp @@ -1,8 +1,7 @@ // $Id$ -// +// // SuperTux -// Copyright (C) 2000 Bill Kendrick -// Copyright (C) 2004 Tobias Glaesser +// Copyright (C) 2006 Matthias Braun // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -13,20 +12,20 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + #ifndef SUPERTUX_GAMEOBJS_H #define SUPERTUX_GAMEOBJS_H #include "video/surface.hpp" #include "timer.hpp" -#include "physic.hpp" #include "game_object.hpp" #include "moving_object.hpp" #include "serializable.hpp" +#include "video/color.hpp" /* Bounciness of distros: */ #define NO_BOUNCE 0 @@ -37,7 +36,7 @@ class Sprite; class BouncyCoin : public GameObject { public: - BouncyCoin(const Vector& pos); + BouncyCoin(const Vector& pos, bool emerge=false); ~BouncyCoin(); virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); @@ -46,6 +45,7 @@ private: Sprite* sprite; Vector position; Timer timer; + float emerge_distance; }; class BrokenBrick : public GameObject @@ -69,62 +69,32 @@ class FloatingText : public GameObject public: FloatingText(const Vector& pos, const std::string& text_); FloatingText(const Vector& pos, int s); // use this for score, for instance - + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); private: Vector position; std::string text; - Timer timer; + Timer timer; }; -extern Sprite *img_smoke_cloud; - class SmokeCloud : public GameObject { public: SmokeCloud(const Vector& pos); - - virtual void update(float elapsed_time); - virtual void draw(DrawingContext& context); - -private: - Timer timer; - Vector position; -}; + ~SmokeCloud(); -class Particles : public GameObject -{ -public: - Particles(const Vector& epicenter, int min_angle, int max_angle, - const Vector& initial_velocity, const Vector& acceleration, - int number, Color color, int size, float life_time, int drawing_layer); - ~Particles(); - virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); private: - Vector accel; + Sprite* sprite; Timer timer; - bool live_forever; - - Color color; - float size; - int drawing_layer; - - struct Particle { - Vector pos, vel; -// float angle; - }; - std::vector particles; + Vector position; }; -void load_object_gfx(); -void free_object_gfx(); - -#endif +#endif /* Local Variables: */ /* mode:c++ */