[Scummvm-cvs-logs] SF.net SVN: scummvm:[42779] scummvm/branches/gsoc2009-draci/engines/draci/ sprite.cpp
dkasak13 at users.sourceforge.net
dkasak13 at users.sourceforge.net
Sat Jul 25 20:33:20 CEST 2009
Revision: 42779
http://scummvm.svn.sourceforge.net/scummvm/?rev=42779&view=rev
Author: dkasak13
Date: 2009-07-25 18:33:20 +0000 (Sat, 25 Jul 2009)
Log Message:
-----------
Simplified rectangle height and width calculation in Sprite::drawScaled() (use methods of Common::Rect instead of doing it manually).
Modified Paths:
--------------
scummvm/branches/gsoc2009-draci/engines/draci/sprite.cpp
Modified: scummvm/branches/gsoc2009-draci/engines/draci/sprite.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/sprite.cpp 2009-07-25 18:29:43 UTC (rev 42778)
+++ scummvm/branches/gsoc2009-draci/engines/draci/sprite.cpp 2009-07-25 18:33:20 UTC (rev 42779)
@@ -126,7 +126,6 @@
_mirror = false;
}
-// TODO: Research what kind of sampling the original player uses
void Sprite::drawScaled(Surface *surface, bool markDirty) const {
Common::Rect sourceRect(0, 0, _width, _height);
@@ -155,8 +154,8 @@
const int transparent = surface->getTransparentColour();
// Calculate how many rows and columns we need to draw
- const int rows = clippedDestRect.bottom - clippedDestRect.top;
- const int columns = clippedDestRect.right - clippedDestRect.left;
+ const int rows = clippedDestRect.height();
+ const int columns = clippedDestRect.width();
int *rowIndices = new int[rows];
int *columnIndices = new int[columns];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list