pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src/particles particle_holder.cxx,1.2,1.3


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/particles particle_holder.cxx,1.2,1.3 particle_holder.hxx,1.3,1.4
Date: 4 Sep 2002 17:49:50 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/particles
In directory dark:/tmp/cvs-serv23629/particles

Modified Files:
        particle_holder.cxx particle_holder.hxx 
Log Message:
- added GraphicContext (aka View)

Index: particle_holder.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/particles/particle_holder.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- particle_holder.cxx 17 Aug 2002 17:56:24 -0000      1.2
+++ particle_holder.cxx 4 Sep 2002 17:49:48 -0000       1.3
@@ -18,6 +18,7 @@
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "../globals.hxx"
+#include "../graphic_context.hxx"
 #include "../algo.hxx"
 #include "pingu_particle.hxx"
 
@@ -53,9 +54,19 @@
 void
 ParticleHolder::draw_offset(int x, int y, float s) // const
 {
+  // FIXME: obsolete
   for(std::list<Particle*>::iterator i = this->begin(); i != this->end(); ++i) 
     { 
       (*i)->draw_offset(x, y, s);
+    }
+}
+
+void
+ParticleHolder::draw (GraphicContext& gc) // const
+{
+  for(std::list<Particle*>::iterator i = this->begin(); i != this->end(); ++i) 
+    { 
+      (*i)->draw_offset (int(gc.get_x_offset ()), int(gc.get_y_offset ()), 
gc.get_zoom ());
     }
 }
 

Index: particle_holder.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/particles/particle_holder.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- particle_holder.hxx 23 Aug 2002 15:49:56 -0000      1.3
+++ particle_holder.hxx 4 Sep 2002 17:49:48 -0000       1.4
@@ -23,8 +23,10 @@
 #include <list>
 #include "particle_cache.hxx"
 
+class GraphicContext;
 class Particle;
 
+/** FIXME: Inherit from std::list<> is evil... */
 class ParticleHolder : public std::list<Particle*>
 {
 private:
@@ -36,7 +38,10 @@
   virtual ~ParticleHolder ();
 
   void update (float delta);
+
   void draw_offset (int, int, float); /// const;
+  void draw (GraphicContext& gc); /// const;
+
   void add_pingu_explo (int x, int y);
   void add_particle (Particle* p);
   





reply via email to

[Prev in Thread] Current Thread [Next in Thread]