aboutsummaryrefslogtreecommitdiff
path: root/engines/cge/bitmap.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2011-07-03 15:32:27 +1000
committerPaul Gilbert2011-07-03 15:32:27 +1000
commit900e8cbf5b95ceea36c44296bc0de12e32687745 (patch)
treeaeec6a80d257c53eaa09ecb1d9ac29a9d7cc54e6 /engines/cge/bitmap.cpp
parent156c2d020fca74bb901e547a04ae2a9e2f8ec8cc (diff)
downloadscummvm-rg350-900e8cbf5b95ceea36c44296bc0de12e32687745.tar.gz
scummvm-rg350-900e8cbf5b95ceea36c44296bc0de12e32687745.tar.bz2
scummvm-rg350-900e8cbf5b95ceea36c44296bc0de12e32687745.zip
CGE: Fixed GCC compiler warnings
Diffstat (limited to 'engines/cge/bitmap.cpp')
-rw-r--r--engines/cge/bitmap.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp
index e4e0a37eb3..c94b8503cf 100644
--- a/engines/cge/bitmap.cpp
+++ b/engines/cge/bitmap.cpp
@@ -102,9 +102,18 @@ Bitmap::Bitmap(uint16 w, uint16 h, uint8 fill)
*(uint16 *) v = CPY | dsiz; // data chunk hader
memset(v + 2, fill, dsiz); // data bytes
*(uint16 *)(v + lsiz - 2) = SKP | ((SCR_WID / 4) - dsiz); // gap
- memcpy(v + lsiz, v, psiz - lsiz); // tricky replicate lines
+
+ // Replicate lines
+ byte *destP;
+ for (destP = v + lsiz; destP < (v + psiz); destP += lsiz)
+ Common::copy(v, v + lsiz, destP);
+
*(uint16 *)(v + psiz - 2) = EOI; // plane trailer uint16
- memcpy(v + psiz, v, 3 * psiz); // tricky replicate planes
+
+ // Repliccate planes
+ for (destP = v + psiz; destP < (v + 4 * psiz); destP += psiz)
+ Common::copy(v, v + psiz, destP);
+
HideDesc *b = (HideDesc *)(v + 4 * psiz);
b->skip = (SCR_WID - _w) >> 2;
b->hide = _w >> 2;