mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-28 04:34:50 +00:00
Simplified rectangle height and width calculation in Sprite::drawScaled() (use methods of Common::Rect instead of doing it manually).
svn-id: r42779
This commit is contained in:
parent
6970e178dc
commit
20a744bdd2
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user