Removed trailing whitespace from all *.?pp files
[supertux.git] / src / object / particlesystem_interactive.hpp
index e291053..b38a7ce 100644 (file)
@@ -1,35 +1,26 @@
-//  $Id: ParticleSystem_Interactive.h 2462 2005-05-10 15:38:16Z wansti $
-// 
 //  SuperTux
-//  Copyright (C) 2004 Matthias Braun <matze@braunis.de>
+//  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
 //
-//  This program is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU General Public License
-//  as published by the Free Software Foundation; either version 2
-//  of the License, or (at your option) any later version.
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
 //
 //  This program is distributed in the hope that it will be useful,
 //  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.
-#ifndef SUPERTUX_PARTICLESYSTEM_INTERACTIVE_H
-#define SUPERTUX_PARTICLESYSTEM_INTERACTIVE_H
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-#include <vector>
+#ifndef HEADER_SUPERTUX_OBJECT_PARTICLESYSTEM_INTERACTIVE_HPP
+#define HEADER_SUPERTUX_OBJECT_PARTICLESYSTEM_INTERACTIVE_HPP
 
-#include "video/surface.hpp"
-#include "game_object.hpp"
-#include "serializable.hpp"
-#include "sector.hpp"
 #include "math/vector.hpp"
-
-namespace lisp {
-class Lisp;
-}
+#include "supertux/game_object.hpp"
+#include "supertux/sector.hpp"
+#include "video/surface_ptr.hpp"
 
 class DisplayManager;
 
@@ -47,76 +38,39 @@ class DisplayManager;
 class ParticleSystem_Interactive : public GameObject
 {
 public:
-    ParticleSystem_Interactive();
-    virtual ~ParticleSystem_Interactive();
-    
-    virtual void draw(DrawingContext& context);
-
-protected:
-    int layer;
-
-    class Particle
-    {
-    public:
-        virtual ~Particle()
-        { }
-
-        Vector pos;
-        Surface* texture;
-    };
-    
-    std::vector<Particle*> particles;
-    float virtual_width, virtual_height;
-    int collision(Particle* particle, Vector movement);
-};
-
-class RainParticleSystem : public ParticleSystem_Interactive, public Serializable
-{
-public:
-    RainParticleSystem();
-    virtual ~RainParticleSystem();
+  ParticleSystem_Interactive();
+  virtual ~ParticleSystem_Interactive();
 
-    void parse(const lisp::Lisp& lisp);
-    void write(lisp::Writer& writer);
+  virtual void draw(DrawingContext& context);
 
-    virtual void update(float elapsed_time);
-
-    std::string type() const
-    { return "RainParticleSystem"; }
-    
-private:
-    class RainParticle : public Particle
-    {
-    public:
-        float speed;
-    };
-    
-    Surface* rainimages[2];
-};
-
-class CometParticleSystem : public ParticleSystem_Interactive, public Serializable
-{
-public:
-    CometParticleSystem();
-    virtual ~CometParticleSystem();
-
-    void parse(const lisp::Lisp& lisp);
-    void write(lisp::Writer& writer);
-
-    virtual void update(float elapsed_time);
-
-    std::string type() const
-    { return "CometParticleSystem"; }
-    
-private:
-    class CometParticle : public Particle
-    {
-    public:
-        float speed;
-    };
-    
-    Surface* cometimages[2];
+protected:
+  class Particle
+  {
+  public:
+    Particle() :
+      pos(),
+      texture()
+    {}
+
+    virtual ~Particle()
+    {}
+
+    Vector pos;
+    SurfacePtr texture;
+
+  private:
+    Particle(const Particle&);
+    Particle& operator=(const Particle&);
+  };
+
+  int collision(Particle* particle, Vector movement);
+
+  int z_pos;
+  std::vector<Particle*> particles;
+  float virtual_width;
+  float virtual_height;
 };
 
 #endif
 
+/* EOF */