mail[Wesnoth-commits] r20076 - /trunk/src/display.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by alinktomine on September 03, 2007 - 22:06:
Author: alink
Date: Mon Sep  3 22:06:09 2007
New Revision: 20076

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20076&view=rev
Log:
Cleaner clipping of unit at the border of the map
Maybe fix a bug reported by uso with a fencer animation there
(can't reproduce it, so I don't know if the bug existed before of after this)

Modified:
    trunk/src/display.cpp

Modified: trunk/src/display.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/display.cpp?rev=20076&r1=20075&r2=20076&view=diff
==============================================================================
--- trunk/src/display.cpp (original)
+++ trunk/src/display.cpp Mon Sep  3 22:06:09 2007
@@ -821,7 +821,8 @@
                return;
 
        SDL_Rect image_rect = {x, y, image->w, image->h};
-       if (!rects_overlap(image_rect, map_outside_area()))
+       SDL_Rect clip_rect = map_area();
+       if (!rects_overlap(image_rect, clip_rect))
                return;
 
        surface surf(image);
@@ -852,7 +853,7 @@
 
        const int submerge_height = 
minimum<int>(surf->h,maximum<int>(0,int(surf->h*(1.0-submerged))));
 
-       SDL_Rect clip_rect = map_outside_area();
+       
        SDL_Rect srcrect = {0,0,surf->w,submerge_height};
        video().blit_surface(x,y,surf,&srcrect,&clip_rect);
 




Related Messages


Powered by MHonArc, Updated Mon Sep 03 22:20:19 2007