diff options
Diffstat (limited to 'engines/hdb/draw-manager.cpp')
-rw-r--r-- | engines/hdb/draw-manager.cpp | 42 |
1 files changed, 4 insertions, 38 deletions
diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp index 038b29c525..5320581cec 100644 --- a/engines/hdb/draw-manager.cpp +++ b/engines/hdb/draw-manager.cpp @@ -270,28 +270,11 @@ Graphics::Surface Picture::load(Common::SeekableReadStream *stream) { } void Picture::draw(int x, int y) { - if (x == kScreenWidth || y == kScreenHeight) { - return; - } - Common::Rect clip(_surface.getBounds()); - clip.clip(Common::Rect(0, 0, kScreenWidth - 1 - x, kScreenHeight - 1 - y)); - if (!clip.isEmpty()) { - g_hdb->_drawMan->_globalSurface.copyRectToSurface(_surface.getBasePtr(0, 0), _surface.pitch, x, y, clip.width(), clip.height()); - } -// g_system->copyRectToScreen(_surface.getBasePtr(0, 0), _surface.pitch, x, y, _surface.w, _surface.h); + g_hdb->_drawMan->_globalSurface.transBlitFrom(_surface, Common::Point(x, y)); } void Picture::drawMasked(int x, int y) { - if (x == kScreenWidth || y == kScreenHeight) { - return; - } - _surface.transBlitFrom(_surface, 0xf81f); - Common::Rect clip(_surface.getBounds()); - clip.clip(Common::Rect(0, 0, kScreenWidth - 1 - x, kScreenHeight - 1 - y)); - if (!clip.isEmpty()) { - g_hdb->_drawMan->_globalSurface.copyRectToSurface(_surface.getBasePtr(0, 0), _surface.pitch, x, y, clip.width(), clip.height()); - } -// g_system->copyRectToScreen(tempSurf.getBasePtr(0, 0), tempSurf.pitch, x, y, tempSurf.w, tempSurf.h); + g_hdb->_drawMan->_globalSurface.transBlitFrom(_surface, Common::Point(x, y), 0xf81f); } Tile::~Tile() { @@ -319,28 +302,11 @@ Graphics::Surface Tile::load(Common::SeekableReadStream *stream) { } void Tile::draw(int x, int y) { - if (x == kScreenWidth || y == kScreenHeight) { - return; - } - Common::Rect clip(_surface.getBounds()); - clip.clip(Common::Rect(0, 0, kScreenWidth - 1 - x, kScreenHeight - 1 - y)); - if (!clip.isEmpty()) { - g_hdb->_drawMan->_globalSurface.copyRectToSurface(_surface.getBasePtr(0, 0), _surface.pitch, x, y, clip.width(), clip.height()); - } -// g_system->copyRectToScreen(_surface.getBasePtr(0, 0), _surface.pitch, x, y, _surface.w, _surface.h); + g_hdb->_drawMan->_globalSurface.transBlitFrom(_surface, Common::Point(x, y)); } void Tile::drawMasked(int x, int y) { - if (x == kScreenWidth || y == kScreenHeight) { - return; - } - _surface.transBlitFrom(_surface, 0xf81f); - Common::Rect clip(_surface.getBounds()); - clip.clip(Common::Rect(0, 0, kScreenWidth - 1 - x, kScreenHeight - 1 - y)); - if (!clip.isEmpty()) { - g_hdb->_drawMan->_globalSurface.copyRectToSurface(_surface.getBasePtr(0, 0), _surface.pitch, x, y, clip.width(), clip.height()); - } - // g_system->copyRectToScreen(_surface.getBasePtr(0, 0), _surface.pitch, x, y, _surface.w, _surface.h); + g_hdb->_drawMan->_globalSurface.transBlitFrom(_surface, Common::Point(x, y), 0xf81f); } } |