aboutsummaryrefslogtreecommitdiff
path: root/graphics/surface.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2007-11-16 23:39:14 +0000
committerJohannes Schickel2007-11-16 23:39:14 +0000
commit31180e79813f5e654a7b2ca7d740074d8e99d1d2 (patch)
tree2e8466941b6cb60e580007624df9d6a56a35ae58 /graphics/surface.cpp
parent4985e35b385fab0e2794aac9fada040b19ea7ff7 (diff)
downloadscummvm-rg350-31180e79813f5e654a7b2ca7d740074d8e99d1d2.tar.gz
scummvm-rg350-31180e79813f5e654a7b2ca7d740074d8e99d1d2.tar.bz2
scummvm-rg350-31180e79813f5e654a7b2ca7d740074d8e99d1d2.zip
Added assert for bit depth in Surface::move.
svn-id: r29522
Diffstat (limited to 'graphics/surface.cpp')
-rw-r--r--graphics/surface.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/graphics/surface.cpp b/graphics/surface.cpp
index 290bef6263..bc815c360f 100644
--- a/graphics/surface.cpp
+++ b/graphics/surface.cpp
@@ -163,6 +163,9 @@ void Surface::frameRect(const Common::Rect &r, uint32 color) {
// to support 16bpp (or marked as just working for 8bpp
// surfaces).
void Surface::move(int dx, int dy, int height) {
+ // This function currently just works with 8bpp surfaces
+ assert(bytesPerPixel == 1);
+
// Short circuit check - do we have to do anything anyway?
if ((dx == 0 && dy == 0) || height <= 0)
return;