pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r2854 - branches/pingus_sdl/src


From: grumbel at BerliOS
Subject: [Pingus-CVS] r2854 - branches/pingus_sdl/src
Date: Sun, 12 Aug 2007 14:55:51 +0200

Author: grumbel
Date: 2007-08-12 14:55:51 +0200 (Sun, 12 Aug 2007)
New Revision: 2854

Modified:
   branches/pingus_sdl/src/graphic_context_state.cpp
Log:
- fixed screen2world to take left,top into account

Modified: branches/pingus_sdl/src/graphic_context_state.cpp
===================================================================
--- branches/pingus_sdl/src/graphic_context_state.cpp   2007-08-12 12:50:12 UTC 
(rev 2853)
+++ branches/pingus_sdl/src/graphic_context_state.cpp   2007-08-12 12:55:51 UTC 
(rev 2854)
@@ -224,8 +224,8 @@
 Vector2f
 GraphicContextState::screen2world(const Vector2i& pos_)
 {
-  Vector2f pos(float(pos_.x),
-               float(pos_.y));
+  Vector2f pos(float(pos_.x - impl->rect.left),
+               float(pos_.y - impl->rect.top));
 
   float sa = (float)sin(-impl->rotation/180.0f*M_PI);
   float ca = (float)cos(-impl->rotation/180.0f*M_PI);





reply via email to

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