pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.12,1.13 basher.cx


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.12,1.13 basher.cxx,1.17,1.18 blocker.cxx,1.12,1.13 bridger.cxx,1.20,1.21 digger.hxx,1.10,1.11 floater.cxx,1.18,1.19
Date: 4 Oct 2002 13:46:58 -0000

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

Modified Files:
        angel.cxx basher.cxx blocker.cxx bridger.cxx digger.hxx 
        floater.cxx 
Log Message:
clean up the PinguHolder/World relation ship a bit

Index: angel.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/angel.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- angel.cxx   1 Oct 2002 19:53:44 -0000       1.12
+++ angel.cxx   4 Oct 2002 13:46:56 -0000       1.13
@@ -46,6 +46,7 @@
 Angel::update ()
 {
   sprite.update ();
+
   counter += game_speed;
   pingu->set_pos(x_pos + 20 * sin (counter * 3.0), pingu->get_y() - 50.0f * 
0.025f);
 

Index: basher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/basher.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- basher.cxx  1 Oct 2002 19:53:45 -0000       1.17
+++ basher.cxx  4 Oct 2002 13:46:56 -0000       1.18
@@ -75,7 +75,7 @@
          if (basher_c % 2 == 0)
            bash();
        }
-      else if (sprite.get_progress () > 0.6f)
+      else if (sprite.get_progress () > 0.6f) // FIXME: EVIL! 
        {
          pingu->set_action(Actions::Walker);
        }

Index: blocker.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/blocker.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- blocker.cxx 1 Oct 2002 19:53:45 -0000       1.12
+++ blocker.cxx 4 Oct 2002 13:46:56 -0000       1.13
@@ -63,7 +63,8 @@
     }
   else
     {
-      PinguHolder* pingus = WorldObj::get_world()->get_pingu_p();
+      // FIXME: PinguHolder iterations should be handled otherwise
+      PinguHolder* pingus = WorldObj::get_world()->get_pingus();
       for(PinguIter i = pingus->begin(); i != pingus->end(); ++i)
        {
          catch_pingu(*i);

Index: bridger.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bridger.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- bridger.cxx 1 Oct 2002 19:53:45 -0000       1.20
+++ bridger.cxx 4 Oct 2002 13:46:56 -0000       1.21
@@ -92,7 +92,7 @@
        build_sprite.set_direction (Sprite::RIGHT);
       
       gc.draw(build_sprite, Vector(pingu->get_x () - (x_offset * 
pingu->direction),
-                                     pingu->get_y () + y_offset));
+                                  pingu->get_y () + y_offset));
       break;
       
     case B_WALKING:
@@ -100,8 +100,8 @@
        walk_sprite.set_direction (Sprite::LEFT);
       else
        walk_sprite.set_direction (Sprite::RIGHT);
-      gc.draw (walk_sprite, Vector(static_cast<int>(pingu->get_x () - 
(x_offset * pingu->direction)),
-                                     static_cast<int>(pingu->get_y () + 
y_offset)));
+      gc.draw (walk_sprite, Vector(pingu->get_x () - (x_offset * 
pingu->direction),
+                                  pingu->get_y () + y_offset));
       break;
     }
 }

Index: digger.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/digger.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- digger.hxx  1 Oct 2002 19:53:45 -0000       1.10
+++ digger.hxx  4 Oct 2002 13:46:56 -0000       1.11
@@ -25,7 +25,6 @@
 
 namespace Actions {
 
-/** FIXME: Not delta capable! */
 class Digger : public PinguAction
 {
 private:
@@ -33,6 +32,7 @@
   CL_Surface digger_radius_gfx;
   Sprite sprite;
   int digger_c;
+
 public:
   Digger();
   void init (void);

Index: floater.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/floater.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- floater.cxx 1 Oct 2002 19:53:45 -0000       1.18
+++ floater.cxx 4 Oct 2002 13:46:56 -0000       1.19
@@ -43,15 +43,20 @@
   sprite.update ();
 
   pingu->set_velocity(Vector(0.0, 0.0));
-  if (rel_getpixel(0, -1) == Groundtype::GP_NOTHING) {
-    ++step;
-    if (step > 0) {
-      pingu->set_y(pingu->get_y() + 1);
-      step = 0;
+  
+  if (rel_getpixel(0, -1) == Groundtype::GP_NOTHING) 
+    {
+      ++step;
+      if (step > 0) 
+       {
+         pingu->set_y(pingu->get_y() + 1);
+         step = 0;
+       }
+    } 
+  else 
+    {
+      pingu->set_action (Actions::Walker);
     }
-  } else {
-    pingu->set_action (Actions::Walker);
-  }
 }
 
 void 





reply via email to

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