[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r3143 - in trunk/pingus/src: editor gui
From: |
grumbel at BerliOS |
Subject: |
[Pingus-CVS] r3143 - in trunk/pingus/src: editor gui |
Date: |
Fri, 14 Sep 2007 17:49:19 +0200 |
Author: grumbel
Date: 2007-09-14 17:49:18 +0200 (Fri, 14 Sep 2007)
New Revision: 3143
Modified:
trunk/pingus/src/editor/editor_viewport.cpp
trunk/pingus/src/gui/display.cpp
Log:
- fixed x/y mixup
Modified: trunk/pingus/src/editor/editor_viewport.cpp
===================================================================
--- trunk/pingus/src/editor/editor_viewport.cpp 2007-09-14 15:39:32 UTC (rev
3142)
+++ trunk/pingus/src/editor/editor_viewport.cpp 2007-09-14 15:49:18 UTC (rev
3143)
@@ -34,8 +34,8 @@
namespace Editor {
// Constructor
-EditorViewport::EditorViewport(EditorScreen* e, const Rect& rect)
- : RectComponent(rect),
+EditorViewport::EditorViewport(EditorScreen* e, const Rect& rect_)
+ : RectComponent(rect_),
state(rect.get_width(), rect.get_height()),
drawing_context(new DrawingContext(rect)),
editor(e),
Modified: trunk/pingus/src/gui/display.cpp
===================================================================
--- trunk/pingus/src/gui/display.cpp 2007-09-14 15:39:32 UTC (rev 3142)
+++ trunk/pingus/src/gui/display.cpp 2007-09-14 15:49:18 UTC (rev 3143)
@@ -35,7 +35,7 @@
SDL_Rect Intersection(SDL_Rect* r1, SDL_Rect* r2)
{
SDL_Rect rect;
- rect.x = Math::max(r1->x, r2->y);
+ rect.x = Math::max(r1->x, r2->x);
rect.y = Math::max(r1->y, r2->y);
int endx = Math::min(r1->x + r1->w, r2->x + r2->w);
rect.w = Math::max(endx - rect.x, 0);
@@ -392,7 +392,11 @@
void
Display::push_cliprect(const Rect& rect)
{
- SDL_Rect sdl_rect = { rect.left, rect.top, rect.get_width(),
rect.get_height() };
+ SDL_Rect sdl_rect;
+ sdl_rect.x = rect.left;
+ sdl_rect.y = rect.top;
+ sdl_rect.w = rect.get_width();
+ sdl_rect.h = rect.get_height();
if (!cliprect_stack.empty())
sdl_rect = Intersection(&cliprect_stack.back(), &sdl_rect);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r3143 - in trunk/pingus/src: editor gui,
grumbel at BerliOS <=