pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r3917 - trunk/pingus/src/editor


From: grumbel at BerliOS
Subject: [Pingus-CVS] r3917 - trunk/pingus/src/editor
Date: Sun, 27 Jul 2008 16:42:35 +0200

Author: grumbel
Date: 2008-07-27 16:42:34 +0200 (Sun, 27 Jul 2008)
New Revision: 3917

Modified:
   trunk/pingus/src/editor/viewport.cpp
Log:
Some more float/int cleanup

Modified: trunk/pingus/src/editor/viewport.cpp
===================================================================
--- trunk/pingus/src/editor/viewport.cpp        2008-07-27 14:34:33 UTC (rev 
3916)
+++ trunk/pingus/src/editor/viewport.cpp        2008-07-27 14:42:34 UTC (rev 
3917)
@@ -342,11 +342,12 @@
 void
 Viewport::update(float delta)
 {
-  UNUSED_ARG(delta);
-
   if (current_action == SCROLLING)
-    state.set_pos(state.get_pos() + (mouse_screen_pos - drag_screen_pos) * 5 * 
delta);
-
+    {
+      state.set_pos(Vector2i(static_cast<int>(state.get_pos().x + 
(mouse_screen_pos.x - drag_screen_pos.x) * 5 * delta),
+                             static_cast<int>(state.get_pos().y + 
(mouse_screen_pos.y - drag_screen_pos.y) * 5 * delta)));
+    }
+  
   // Autoscroll if necessary
   if (autoscroll)
     {





reply via email to

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