aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2010-10-01 20:44:41 +0000
committerJohannes Schickel2010-10-01 20:44:41 +0000
commit288d09389e358c1e317a7be72486b7ca46a843b7 (patch)
tree0acd6958065c65792fa12a3edab52d5ee6f9fd76
parent0d8f4a22ae51d5943014a4c5f3ba610686039a24 (diff)
downloadscummvm-rg350-288d09389e358c1e317a7be72486b7ca46a843b7.tar.gz
scummvm-rg350-288d09389e358c1e317a7be72486b7ca46a843b7.tar.bz2
scummvm-rg350-288d09389e358c1e317a7be72486b7ca46a843b7.zip
GRAPHICS: Cleanup.
svn-id: r52967
-rw-r--r--graphics/surface.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/graphics/surface.cpp b/graphics/surface.cpp
index 73fff26dbd..b704c7fc9c 100644
--- a/graphics/surface.cpp
+++ b/graphics/surface.cpp
@@ -180,11 +180,6 @@ void Surface::frameRect(const Common::Rect &r, uint32 color) {
vLine(r.right-1, r.top, r.bottom-1, color);
}
-// FIXME: LordHoto asks why is this in Surface, since this
-// just supports 8bpp surfaces. Looks like someone wants
-// to subclass Surface to add this or it should be extended
-// to support 16bpp (or marked as just working for 8bpp
-// surfaces).
void Surface::move(int dx, int dy, int height) {
// Short circuit check - do we have to do anything anyway?
if ((dx == 0 && dy == 0) || height <= 0)
@@ -224,7 +219,7 @@ void Surface::move(int dx, int dy, int height) {
if (bytesPerPixel == 1) {
*dst-- = *src--;
} else if (bytesPerPixel == 2) {
- WRITE_LE_UINT16(dst, READ_LE_UINT16(src));
+ *(uint16 *)dst = *(const uint16 *)src;
src -= 2;
dst -= 2;
}
@@ -241,7 +236,7 @@ void Surface::move(int dx, int dy, int height) {
if (bytesPerPixel == 1) {
*dst++ = *src++;
} else if (bytesPerPixel == 2) {
- WRITE_LE_UINT16(dst, READ_LE_UINT16(src));
+ *(uint16 *)dst = *(const uint16 *)src;
src += 2;
dst += 2;
}