pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src pingu_holder.cxx,1.6,1.7 pingu_holder


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src pingu_holder.cxx,1.6,1.7 pingu_holder.hxx,1.4,1.5 world.cxx,1.25,1.26
Date: 18 Sep 2002 10:50:59 -0000

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

Modified Files:
        pingu_holder.cxx pingu_holder.hxx world.cxx 
Log Message:
placed some logic where it belongs, removed catch_pingu from PinguAction

Index: pingu_holder.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_holder.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pingu_holder.cxx    4 Sep 2002 20:30:28 -0000       1.6
+++ pingu_holder.cxx    18 Sep 2002 10:50:57 -0000      1.7
@@ -68,6 +68,8 @@
   
   while(pingu != pingus.end())
     {
+      // FIXME: The draw-loop is not the place for things like this,
+      // this belongs in the update loop
       if ((*pingu)->get_status() == PS_DEAD)
        {
          // Removing the dead pingu and setting the iterator back to
@@ -97,6 +99,18 @@
     {
       if ((*pingu)->get_action()) 
        (*pingu)->draw (gc);
+    }
+}
+
+void
+PinguHolder::update(float delta)
+{
+  // FIXME: This is a relictn, pingus should handle that themself
+  // FIXME: WorldObj::for_each_pingu (Func f); might cause throuble
+  // FIXME: with MSVC
+  for(PinguIter pingu = begin(); pingu != end(); ++pingu)
+    {
+      (*pingu)->update(delta);
     }
 }
 

Index: pingu_holder.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_holder.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- pingu_holder.hxx    4 Sep 2002 20:30:28 -0000       1.4
+++ pingu_holder.hxx    18 Sep 2002 10:50:57 -0000      1.5
@@ -53,6 +53,8 @@
   ~PinguHolder();
 
   void draw (GraphicContext& gc);
+  void update(float delta);
+
   int  total_size();
   int  get_saved() { return saved_pingus; }
   

Index: world.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/world.cxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- world.cxx   16 Sep 2002 19:18:56 -0000      1.25
+++ world.cxx   18 Sep 2002 10:50:57 -0000      1.26
@@ -188,20 +188,6 @@
       // needs to catch pingus.
       (*obj)->update(delta);
     }
-  
-  // FIXME: This is a relictn, pingus should handle that themself
-  // FIXME: WorldObj::for_each_pingu (Func f); might cause throuble
-  // FIXME: with MSVC
-  for(PinguIter pingu = pingus->begin(); pingu != pingus->end(); ++pingu) {
-
-      (*pingu)->update(delta);
-      
-      if ((*pingu)->need_catch()) {
-       for(PinguIter i = pingus->begin(); i != pingus->end(); ++i) {
-         (*pingu)->catch_pingu(*i);
-       }
-      }
-    }
 
   // FIXME: Why is the particle holder still a seperate object?
   particle_holder->update(delta);





reply via email to

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