diff options
author | Max Horn | 2003-01-18 21:04:31 +0000 |
---|---|---|
committer | Max Horn | 2003-01-18 21:04:31 +0000 |
commit | e225720414409a27a3aed383379d4c1ae865c2d0 (patch) | |
tree | 219a74ad1beacd3e82e37964515d40ff46b396e4 /common/scaler.cpp | |
parent | 18fdd807103b9ceefa99dc25114795c17bb5d0ff (diff) | |
download | scummvm-rg350-e225720414409a27a3aed383379d4c1ae865c2d0.tar.gz scummvm-rg350-e225720414409a27a3aed383379d4c1ae865c2d0.tar.bz2 scummvm-rg350-e225720414409a27a3aed383379d4c1ae865c2d0.zip |
optimized Normal1x a bit (well at least memcpy won't be slower and on many systems will be faster)
svn-id: r6505
Diffstat (limited to 'common/scaler.cpp')
-rw-r--r-- | common/scaler.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/common/scaler.cpp b/common/scaler.cpp index c0e9f85719..45c40c328e 100644 --- a/common/scaler.cpp +++ b/common/scaler.cpp @@ -750,15 +750,8 @@ void AdvMame2x(uint8 *srcPtr, uint32 srcPitch, uint8 *null, uint8 *dstPtr, uint3 void Normal1x(uint8 *srcPtr, uint32 srcPitch, uint8 *null, uint8 *dstPtr, uint32 dstPitch, int width, int height) { - uint16 *r; - while (height--) { - r = (uint16 *)dstPtr; - for (int i = 0; i < width; ++i, ++r) { - uint16 color = *(((uint16 *)srcPtr) + i); - - *r = color; - } + memcpy(dstPtr, srcPtr, 2 * width); srcPtr += srcPitch; dstPtr += dstPitch; } |