aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorDenis Kasak2009-07-25 18:33:20 +0000
committerDenis Kasak2009-07-25 18:33:20 +0000
commit20a744bdd2bc889fdb1a460768c13f8be2d60d09 (patch)
tree34ef275411b74202dae968a5f4ad59ab0df921c3 /engines
parent6970e178dcb9c34eb5c021a27144bd64cd2534a7 (diff)
downloadscummvm-rg350-20a744bdd2bc889fdb1a460768c13f8be2d60d09.tar.gz
scummvm-rg350-20a744bdd2bc889fdb1a460768c13f8be2d60d09.tar.bz2
scummvm-rg350-20a744bdd2bc889fdb1a460768c13f8be2d60d09.zip
Simplified rectangle height and width calculation in Sprite::drawScaled() (use methods of Common::Rect instead of doing it manually).
svn-id: r42779
Diffstat (limited to 'engines')
-rw-r--r--engines/draci/sprite.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/draci/sprite.cpp b/engines/draci/sprite.cpp
index 97118dd506..1b9d0acefb 100644
--- a/engines/draci/sprite.cpp
+++ b/engines/draci/sprite.cpp
@@ -126,7 +126,6 @@ void Sprite::setMirrorOff() {
_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 @@ void Sprite::drawScaled(Surface *surface, bool markDirty) const {
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];