Browse Source

ImageWidth and ImageHeight were inverted in calculateImage function

capnlove 12 years ago
parent
commit
280903fb09
1 changed files with 2 additions and 2 deletions
  1. 2 2
      engine/source/2d/assets/ImageAsset.cc

+ 2 - 2
engine/source/2d/assets/ImageAsset.cc

@@ -999,7 +999,7 @@ void ImageAsset::calculateImplicitMode( void )
     }
     }
 
 
     // The cell height needs to be at maximum the image height!
     // The cell height needs to be at maximum the image height!
-    if ( mCellHeight < 1 || mCellHeight > imageWidth )
+    if ( mCellHeight < 1 || mCellHeight > imageHeight )
     {
     {
         // Warn.
         // Warn.
         Con::warnf("ImageAsset::calculateImage() - Invalid Cell Height of %d.", mCellHeight );
         Con::warnf("ImageAsset::calculateImage() - Invalid Cell Height of %d.", mCellHeight );
@@ -1015,7 +1015,7 @@ void ImageAsset::calculateImplicitMode( void )
     }
     }
 
 
     // The Cell Offset Y needs to be within the image.
     // The Cell Offset Y needs to be within the image.
-    if ( mCellOffsetY < 0 || mCellOffsetY >= imageWidth )
+    if ( mCellOffsetY < 0 || mCellOffsetY >= imageHeight )
     {
     {
         // Warn.
         // Warn.
         Con::warnf("ImageAsset::calculateImage() - Invalid Cell OffsetY of %d.", mCellOffsetY );
         Con::warnf("ImageAsset::calculateImage() - Invalid Cell OffsetY of %d.", mCellOffsetY );