Special case for screen-wide blits

svn-id: r8626
This commit is contained in:
Bertrand Augereau 2003-06-22 17:22:40 +00:00
parent 098b60beeb
commit 73f2ea0b94

View File

@ -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) {