Author: boucman
Date: Mon Aug 1 13:27:54 2011
New Revision: 50525
URL: http://svn.gna.org/viewcvs/wesnoth?rev=50525&view=rev
Log:
apply patch patch #2664, Fix for bug #17933
Modified:
trunk/src/image.cpp
Modified: trunk/src/image.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/image.cpp?rev=50525&r1=50524&r2=50525&view=diff
==============================================================================
--- trunk/src/image.cpp (original)
+++ trunk/src/image.cpp Mon Aug 1 13:27:54 2011
@@ -472,30 +472,30 @@
if(surf == NULL)
return NULL;
+ modification_queue mods = modification::decode(val_.modifications_);
+
+ while(!mods.empty()) {
+ modification* mod = mods.top();
+ mods.pop();
+
+ surf = (*mod)(surf);
+ delete mod;
+ }
+
if(val_.loc_.valid()) {
SDL_Rect srcrect = create_rect(
- ((tile_size*3) / 4) * val_.loc_.x
- , tile_size * val_.loc_.y + (tile_size / 2) *
(val_.loc_.x % 2)
- , tile_size
- , tile_size);
-
+
((tile_size*3) / 4) * val_.loc_.x
+ ,
tile_size * val_.loc_.y + (tile_size / 2) * (val_.loc_.x % 2)
+ ,
tile_size
+ ,
tile_size);
+
if(val_.center_x_ >= 0 && val_.center_y_>= 0){
srcrect.x += surf->w/2 - val_.center_x_;
srcrect.y += surf->h/2 - val_.center_y_;
}
-
+
surface cut(cut_surface(surf, srcrect));
surf = mask_surface(cut, get_hexmask());
- }
-
- modification_queue mods = modification::decode(val_.modifications_);
-
- while(!mods.empty()) {
- modification* mod = mods.top();
- mods.pop();
-
- surf = (*mod)(surf);
- delete mod;
}
return surf;
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits