aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Hesse2011-03-29 12:32:30 +0200
committerSven Hesse2011-03-29 12:32:30 +0200
commitf5fb832b634f5101dc88f121d9413ef04b5868bf (patch)
treed1c64d07871be2587a23a6683db1ebc6a05620d7
parent4b19c1bf32cd8ae62afa5937b0f4ffaff6154f09 (diff)
downloadscummvm-rg350-f5fb832b634f5101dc88f121d9413ef04b5868bf.tar.gz
scummvm-rg350-f5fb832b634f5101dc88f121d9413ef04b5868bf.tar.bz2
scummvm-rg350-f5fb832b634f5101dc88f121d9413ef04b5868bf.zip
GOB: Use memmove instead of memcpy in Surface::blit()
Inca 2 actually blits surfaces on themselves...
-rw-r--r--engines/gob/surface.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/gob/surface.cpp b/engines/gob/surface.cpp
index 8d06ca8d63..c3e8cd9ff5 100644
--- a/engines/gob/surface.cpp
+++ b/engines/gob/surface.cpp
@@ -420,25 +420,25 @@ void Surface::blit(const Surface &from, int16 left, int16 top, int16 right, int1
return;
if ((left == 0) && (_width == from._width) && (_width == width) && (transp == -1)) {
- // If these conditions are met, we can directly use memcpy
+ // If these conditions are met, we can directly use memmove
// Pointers to the blit destination and source start points
byte *dst = getData(x , y);
const byte *src = from.getData(left, top);
- memcpy(dst, src, width * height * _bpp);
+ memmove(dst, src, width * height * _bpp);
return;
}
if (transp == -1) {
- // We don't have to look for transparency => we can use memcpy line-wise
+ // We don't have to look for transparency => we can use memmove line-wise
// Pointers to the blit destination and source start points
byte *dst = getData(x , y);
const byte *src = from.getData(left, top);
while (height-- > 0) {
- memcpy(dst, src, width * _bpp);
+ memmove(dst, src, width * _bpp);
dst += _width * _bpp;
src += from._width * from._bpp;
@@ -521,7 +521,7 @@ void Surface::blitScaled(const Surface &from, int16 left, int16 top, int16 right
posW = 0;
for (uint16 i = 0; i < width; i++, dstRow += _bpp) {
- memcpy(dstRow, srcRow, _bpp);
+ memmove(dstRow, srcRow, _bpp);
posW += step;
while (posW >= ((frac_t) FRAC_ONE)) {