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 climber.cxx,1.12,1.13 climber


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/actions climber.cxx,1.12,1.13 climber.hxx,1.8,1.9
Date: 16 Sep 2002 23:06:03 -0000

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

Modified Files:
        climber.cxx climber.hxx 
Log Message:
CL_Vector() constructor with one argument is \!evil\!, probally timeto fork or 
wrap it

Index: climber.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- climber.cxx 16 Sep 2002 20:31:09 -0000      1.12
+++ climber.cxx 16 Sep 2002 23:06:01 -0000      1.13
@@ -35,15 +35,19 @@
 
   // these alignments are necessary to prevent climber walking 
   // inside the wall.
-  sprite_height = sprite.get_height();
-  sprite_width = sprite.get_width();
-  if (pingu->direction.is_left ()) {
-    sprite.set_align (0, -sprite_height/2);
-    sprite.set_direction (Sprite::LEFT); 
-  } else {
-    sprite.set_align (-sprite_width, -sprite_height/2);
-    sprite.set_direction (Sprite::RIGHT);
-  }
+  int sprite_height = sprite.get_height();
+  int sprite_width  = sprite.get_width();
+
+  if (pingu->direction.is_left ()) 
+    {
+      sprite.set_align (0, -sprite_height/2);
+      sprite.set_direction (Sprite::LEFT); 
+    } 
+  else 
+    {
+      sprite.set_align (-sprite_width, -sprite_height/2);
+      sprite.set_direction (Sprite::RIGHT);
+    }
 }
 
 void
@@ -66,7 +70,8 @@
       // and there is still ground to walk on
       if (rel_getpixel(1, 1) !=  Groundtype::GP_NOTHING) 
        {
-         pingu->set_pos(pingu->get_y() - 1);
+         pingu->set_pos(pingu->get_x(), 
+                        pingu->get_y() - 1);
          return;
        }
       else if (rel_getpixel(1, 1) ==  Groundtype::GP_NOTHING) 
@@ -77,7 +82,8 @@
          if (!head_collision_on_walk(pingu->direction, 1))
            {
               // Get ready to walk
-             pingu->set_pos(pingu->get_x() + pingu->direction, pingu->get_y() 
- 1);
+             pingu->set_pos(pingu->get_x() + pingu->direction, 
+                            pingu->get_y() - 1);
            }
          else
            {

Index: climber.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- climber.hxx 10 Sep 2002 19:24:19 -0000      1.8
+++ climber.hxx 16 Sep 2002 23:06:01 -0000      1.9
@@ -29,7 +29,6 @@
 {
 private:
   Sprite sprite;
-  int sprite_width, sprite_height;
 public:
   Climber ();
   void   init ();





reply via email to

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