diff options
author | Robin Watts | 2008-11-29 18:01:16 +0000 |
---|---|---|
committer | Robin Watts | 2008-11-29 18:01:16 +0000 |
commit | 8f3b2e9b4d9f1f82682e1eed018153091cddee9f (patch) | |
tree | f2af64fa467e70a3ba25e9c615baa053e0818d88 /graphics | |
parent | 362bdf87d78f611f3e308e7e9234831208b93d68 (diff) | |
download | scummvm-rg350-8f3b2e9b4d9f1f82682e1eed018153091cddee9f.tar.gz scummvm-rg350-8f3b2e9b4d9f1f82682e1eed018153091cddee9f.tar.bz2 scummvm-rg350-8f3b2e9b4d9f1f82682e1eed018153091cddee9f.zip |
Remove warnings from NDS build.
svn-id: r35172
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/scaler.cpp | 6 | ||||
-rw-r--r-- | graphics/scaler/scalebit.cpp | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp index 395ea31e75..868ecb6ab7 100644 --- a/graphics/scaler.cpp +++ b/graphics/scaler.cpp @@ -127,6 +127,12 @@ void DestroyScalers(){ */ void Normal1x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { + /* Spot the case when it can all be done in 1 hit */ + if (((int)srcPitch == 2*width) && ((int)dstPitch == 2*width)) + { + width *= height; + height = 1; + } while (height--) { memcpy(dstPtr, srcPtr, 2 * width); srcPtr += srcPitch; diff --git a/graphics/scaler/scalebit.cpp b/graphics/scaler/scalebit.cpp index 2210697d71..a6fd8df58f 100644 --- a/graphics/scaler/scalebit.cpp +++ b/graphics/scaler/scalebit.cpp @@ -131,7 +131,7 @@ static void scale2x(void* void_dst, unsigned dst_slice, const void* void_src, un } /** - * Apply the Scale32x effect on a bitmap. + * Apply the Scale3x effect on a bitmap. * The destination bitmap is filled with the scaled version of the source bitmap. * The source bitmap isn't modified. * The destination bitmap must be manually allocated before calling the function, |