Author: boucman
Date: Thu Mar 20 23:27:04 2008
New Revision: 24915

URL: http://svn.gna.org/viewcvs/wesnoth?rev=24915&view=rev
Log:
make image_diagonal also work with normal frames

Modified:
    trunk/changelog
    trunk/src/unit.cpp
    trunk/src/unit_frame.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=24915&r1=24914&r2=24915&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Thu Mar 20 23:27:04 2008
@@ -96,6 +96,7 @@
      process as well.
    * new progressive parameter for animations : submerge
    * new progressive parameter for animations : x and y
+   * image_diagonal now also works with normal [frame]
 
 Version 1.4:
  * language and i18n:

Modified: trunk/src/unit.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.cpp?rev=24915&r1=24914&r2=24915&view=diff
==============================================================================
--- trunk/src/unit.cpp (original)
+++ trunk/src/unit.cpp Thu Mar 20 23:27:04 2008
@@ -1726,9 +1726,14 @@
        }
 
 
-       image::locator image_loc;
+       image::locator image_loc = image::locator();
 #ifndef LOW_MEM
-       image_loc = params.image;
+       if(facing_ != gamemap::location::NORTH && facing_ != 
gamemap::location::SOUTH) {
+               image_loc = params.image_diagonal;
+       } 
+       if(image_loc.is_void()|| image_loc.get_filename() == "") { // invalid 
diag image, or not diagonal
+               image_loc = params.image;
+       }
        if(image_loc.is_void()) {
                image_loc = absolute_image();
        }

Modified: trunk/src/unit_frame.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_frame.cpp?rev=24915&r1=24914&r2=24915&view=diff
==============================================================================
--- trunk/src/unit_frame.cpp (original)
+++ trunk/src/unit_frame.cpp Thu Mar 20 23:27:04 2008
@@ -343,7 +343,7 @@
        if(direction != gamemap::location::NORTH && direction != 
gamemap::location::SOUTH) {
                image_loc = current_data.image_diagonal;
        } 
-       if(image_loc.is_void()) { // invalid diag image, or not diagonal
+       if(image_loc.is_void() || image_loc.get_filename() == "") { // invalid 
diag image, or not diagonal
                image_loc = current_data.image;
        }
 


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to