From 9b32771017de2db833c787c338b01cdcf76d27a9 Mon Sep 17 00:00:00 2001 From: Denis Kasak Date: Wed, 22 Jul 2009 04:50:11 +0000 Subject: Fixed scaled mirrored sprite drawing. This change enables the NoSense logo animation to be played correctly. svn-id: r42649 --- engines/draci/sprite.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/draci/sprite.cpp') diff --git a/engines/draci/sprite.cpp b/engines/draci/sprite.cpp index 23cc386a67..97118dd506 100644 --- a/engines/draci/sprite.cpp +++ b/engines/draci/sprite.cpp @@ -180,7 +180,7 @@ void Sprite::drawScaled(Surface *surface, bool markDirty) const { // Fetch index of current row to be drawn int row = rowIndices[i]; - for (int j = 0, q = sourceRect.left; j < columns; ++j, ++q) { + for (int j = 0; j < columns; ++j) { // Fetch index of current column to be drawn int column = columnIndices[j]; @@ -190,9 +190,9 @@ void Sprite::drawScaled(Surface *surface, bool markDirty) const { // Draw the sprite mirrored if the _mirror flag is set if (_mirror) { - dst[sourceRect.right - q - 1] = src[row * _width + column]; + dst[sourceRect.left + columns - j - 1] = src[row * _width + column]; } else { - dst[q] = src[row * _width + column]; + dst[sourceRect.left + j] = src[row * _width + column]; } } } -- cgit v1.2.3