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);
_______________________________________________
pingus-cvs mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/pingus-cvs