pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r2563 - trunk/src/actions


From: jave27
Subject: [Pingus-CVS] r2563 - trunk/src/actions
Date: Tue, 27 Dec 2005 21:50:47 +0100

Author: jave27
Date: 2005-12-27 21:50:43 +0100 (Tue, 27 Dec 2005)
New Revision: 2563

Modified:
   trunk/src/actions/bridger.cxx
   trunk/src/actions/bridger.hxx
Log:
Minor get_pos() calls changed to newer method.

Modified: trunk/src/actions/bridger.cxx
===================================================================
--- trunk/src/actions/bridger.cxx       2005-12-15 14:52:00 UTC (rev 2562)
+++ trunk/src/actions/bridger.cxx       2005-12-27 20:50:43 UTC (rev 2563)
@@ -74,13 +74,13 @@
   switch (mode)
     {
     case B_BUILDING:
-      gc.color().draw(build_sprite[pingu->direction], Vector(pingu->get_x () - 
(x_offset * pingu->direction),
-                                                     pingu->get_y () + 
y_offset));
+      gc.color().draw(build_sprite[pingu->direction], 
Vector(pingu->get_pos().x - (x_offset * pingu->direction),
+                                                     pingu->get_pos().y + 
y_offset));
       break;
 
     case B_WALKING:
-      gc.color().draw(walk_sprite[pingu->direction], Vector(pingu->get_x () - 
(x_offset * pingu->direction),
-                                                    pingu->get_y () + 
y_offset));
+      gc.color().draw(walk_sprite[pingu->direction], Vector(pingu->get_pos().x 
- (x_offset * pingu->direction),
+                                                    pingu->get_pos().y + 
y_offset));
       break;
     }
 }
@@ -223,30 +223,30 @@
   if (pingu->direction.is_right())
     {
       WorldObj::get_world()->get_colmap()->put(brick_r,
-                                              static_cast<int>(pingu->get_x() 
+ 10 - brick_r.get_width()),
-                                              static_cast<int>(pingu->get_y()),
+                                              
static_cast<int>(pingu->get_pos().x + 10 - brick_r.get_width()),
+                                              
static_cast<int>(pingu->get_pos().y),
                                               Groundtype::GP_BRIDGE);
       WorldObj::get_world()->get_gfx_map()->put(brick_r,
-                                               static_cast<int>(pingu->get_x() 
+ 10 - brick_r.get_width()),
-                                               
static_cast<int>(pingu->get_y()));
+                                               
static_cast<int>(pingu->get_pos().x + 10 - brick_r.get_width()),
+                                               
static_cast<int>(pingu->get_pos().y));
     }
   else
     {
       WorldObj::get_world()->get_colmap()->put(brick_r,
-                                              static_cast<int>(pingu->get_x() 
- 10),
-                                              static_cast<int>(pingu->get_y()),
+                                              
static_cast<int>(pingu->get_pos().x - 10),
+                                              
static_cast<int>(pingu->get_pos().y),
                                               Groundtype::GP_BRIDGE);
       WorldObj::get_world()->get_gfx_map()->put(brick_l,
-                                               static_cast<int>(pingu->get_x() 
- 10),
-                                               
static_cast<int>(pingu->get_y()));
+                                               
static_cast<int>(pingu->get_pos().x - 10),
+                                               
static_cast<int>(pingu->get_pos().y));
     }
 }
 
 void
 Bridger::walk_one_step_up()
 {
-  pingu->set_pos(pingu->get_x() + 4.0 * pingu->direction, pingu->get_y() - 2);
-  counter = 0;
+  pingu->set_pos(pingu->get_pos().x + (float)(4 * pingu->direction), 
+               pingu->get_pos().y - 2);
 }
 
 std::string

Modified: trunk/src/actions/bridger.hxx
===================================================================
--- trunk/src/actions/bridger.hxx       2005-12-15 14:52:00 UTC (rev 2562)
+++ trunk/src/actions/bridger.hxx       2005-12-27 20:50:43 UTC (rev 2563)
@@ -21,7 +21,6 @@
 #define HEADER_PINGUS_ACTIONS_BRIDGER_HXX
 
 #include "../vector.hxx"
-#include "../game_counter.hxx"
 #include "../pingu_action.hxx"
 #include "../state_sprite.hxx"
 
@@ -41,8 +40,6 @@
   CL_PixelBuffer brick_l;
   CL_PixelBuffer brick_r;
 
-  GameCounter counter;
-
   int bricks;
   //int step;
   //int do_steps;





reply via email to

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