2
0
Эх сурвалжийг харах

More fixes on image loader

nordsoft 2 жил өмнө
parent
commit
7bac01f10a

+ 2 - 2
mapeditor/Animation.cpp

@@ -450,10 +450,10 @@ void ImageLoader::init(QPoint SpriteSize, QPoint Margins, QPoint FullSize)
 	margins = Margins;
 	margins = Margins;
 	fullSize = FullSize;
 	fullSize = FullSize;
 	
 	
-	memset((void *)image->bits(), 0, fullSize.y() * fullSize.x());
+	memset((void *)image->bits(), 0, fullSize.y() * image->bytesPerLine());
 	
 	
 	lineStart = image->bits();
 	lineStart = image->bits();
-	lineStart += margins.y() * fullSize.x() + margins.x();
+	lineStart += margins.y() * image->bytesPerLine + margins.x();
 	position = lineStart;
 	position = lineStart;
 }
 }