From b23906e11e5ea7e8ab9c51ef44aa28d2ba98f33f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 18 Jun 2019 20:29:23 +0200 Subject: HDB: Clip blitting properly --- engines/hdb/draw-manager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp index b4152bb6b5..dfac7f9268 100644 --- a/engines/hdb/draw-manager.cpp +++ b/engines/hdb/draw-manager.cpp @@ -304,7 +304,7 @@ void Picture::draw(int x, int y) { clip.moveTo(x, y); clip.clip(g_hdb->_drawMan->_globalSurface.getBounds()); if (!clip.isEmpty()) { - g_system->copyRectToScreen(g_hdb->_drawMan->_globalSurface.getBasePtr(x, y), g_hdb->_drawMan->_globalSurface.pitch, x, y, clip.width(), clip.height()); + g_system->copyRectToScreen(g_hdb->_drawMan->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_drawMan->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height()); } } @@ -315,7 +315,7 @@ void Picture::drawMasked(int x, int y) { clip.moveTo(x, y); clip.clip(g_hdb->_drawMan->_globalSurface.getBounds()); if (!clip.isEmpty()) { - g_system->copyRectToScreen(g_hdb->_drawMan->_globalSurface.getBasePtr(x, y), g_hdb->_drawMan->_globalSurface.pitch, x, y, clip.width(), clip.height()); + g_system->copyRectToScreen(g_hdb->_drawMan->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_drawMan->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height()); } } @@ -350,7 +350,7 @@ void Tile::draw(int x, int y) { clip.moveTo(x, y); clip.clip(g_hdb->_drawMan->_globalSurface.getBounds()); if (!clip.isEmpty()) { - g_system->copyRectToScreen(g_hdb->_drawMan->_globalSurface.getBasePtr(x, y), g_hdb->_drawMan->_globalSurface.pitch, x, y, clip.width(), clip.height()); + g_system->copyRectToScreen(g_hdb->_drawMan->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_drawMan->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height()); } } @@ -361,7 +361,7 @@ void Tile::drawMasked(int x, int y) { clip.moveTo(x, y); clip.clip(g_hdb->_drawMan->_globalSurface.getBounds()); if (!clip.isEmpty()) { - g_system->copyRectToScreen(g_hdb->_drawMan->_globalSurface.getBasePtr(x, y), g_hdb->_drawMan->_globalSurface.pitch, x, y, clip.width(), clip.height()); + g_system->copyRectToScreen(g_hdb->_drawMan->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_drawMan->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height()); } } -- cgit v1.2.3