pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r2631 - in trunk/src: . actions


From: jave27
Subject: [Pingus-CVS] r2631 - in trunk/src: . actions
Date: Mon, 10 Apr 2006 01:31:57 +0200

Author: jave27
Date: 2006-04-10 01:31:49 +0200 (Mon, 10 Apr 2006)
New Revision: 2631

Modified:
   trunk/src/actions/bridger.cxx
   trunk/src/graphic_context_state.cxx
Log:
Applied both patches by Aggro:
- Bridger now works in Fast-mode.
- Worldmap displays correctly if pingu position is further to the right than 
the default 
view.



Modified: trunk/src/actions/bridger.cxx
===================================================================
--- trunk/src/actions/bridger.cxx       2006-04-07 14:20:35 UTC (rev 2630)
+++ trunk/src/actions/bridger.cxx       2006-04-09 23:31:49 UTC (rev 2631)
@@ -128,7 +128,7 @@
 void
 Bridger::update_build ()
 {
-  build_sprite[pingu->direction].update ();
+  build_sprite[pingu->direction].update (0.033);
 
   if (build_sprite[pingu->direction].get_current_frame () >= 7 && !block_build)
     {

Modified: trunk/src/graphic_context_state.cxx
===================================================================
--- trunk/src/graphic_context_state.cxx 2006-04-07 14:20:35 UTC (rev 2630)
+++ trunk/src/graphic_context_state.cxx 2006-04-09 23:31:49 UTC (rev 2631)
@@ -153,9 +153,6 @@
 void
 GraphicContextState::set_pos(const CL_Pointf& pos)
 {
-       float old_x = impl->offset.x;
-       float old_y = impl->offset.y;
-       
   impl->offset.x = -pos.x + (get_width()/2  / impl->zoom);
   impl->offset.y = -pos.y + (get_height()/2 / impl->zoom);
 
@@ -163,20 +160,20 @@
     {
       if (-impl->offset.x < impl->limit.left)
         {
-          impl->offset.x = old_x;
+         impl->offset.x = -( impl->limit.left );
         }
       else if (-impl->offset.x + get_width() >= impl->limit.right)
         {
-          impl->offset.x = old_x;
+         impl->offset.x = -( impl->limit.right - get_width() - 1 );
         }
 
       if (-impl->offset.y < impl->limit.top)
         {
-          impl->offset.y = old_y;
+          impl->offset.y = -( impl->limit.top );
         }
       else if (-impl->offset.y + get_height() >= impl->limit.bottom)
         {
-          impl->offset.y = old_y;
+          impl->offset.y = -( impl->limit.bottom - get_height() - 1 );
         }
     }
 }





reply via email to

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