diff options
author | Bertrand Augereau | 2003-06-22 17:22:40 +0000 |
---|---|---|
committer | Bertrand Augereau | 2003-06-22 17:22:40 +0000 |
commit | 73f2ea0b94db86f1f6d6f4de29b145248c0e5527 (patch) | |
tree | 2a7c89c0beccb74b4481046e8cfe5f2580defcef /scumm | |
parent | 098b60beeb8d45a15a57413fe66cb90fd0160b59 (diff) | |
download | scummvm-rg350-73f2ea0b94db86f1f6d6f4de29b145248c0e5527.tar.gz scummvm-rg350-73f2ea0b94db86f1f6d6f4de29b145248c0e5527.tar.bz2 scummvm-rg350-73f2ea0b94db86f1f6d6f4de29b145248c0e5527.zip |
Special case for screen-wide blits
svn-id: r8626
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/gfx.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index c702452bd4..57d829e563 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -506,11 +506,16 @@ void Scumm::blit(byte *dst, const byte *src, int w, int h) { assert(src != NULL); assert(dst != NULL); - do { - memcpy(dst, src, w); - dst += _screenWidth; - src += _screenWidth; - } while (--h); + if (w==_screenWidth) + memcpy (dst, src, w*h); + else + { + do { + memcpy(dst, src, w); + dst += _screenWidth; + src += _screenWidth; + } while (--h); + } } void Scumm::drawBox(int x, int y, int x2, int y2, int color) { |