void Screen::copyBlock(BaseSurface *src, const Common::Rect &bounds) { Common::Rect destBounds = bounds; destBounds.translate(_windowXAdd, _windowYAdd + _screenYOff); copyRectToSurface(*src, destBounds.left, destBounds.top, bounds); addDirtyRect(destBounds); }
void Scalpel3DOScreen::rawBlitFrom(const Graphics::Surface &src, const Common::Point &pt) { Common::Rect srcRect(0, 0, src.w, src.h); Common::Rect destRect(pt.x, pt.y, pt.x + src.w, pt.y + src.h); addDirtyRect(destRect); copyRectToSurface(src, destRect.left, destRect.top, srcRect); }
void ASurface::restoreBlock() { if (!_savedBounds.isEmpty()) { copyRectToSurface(_savedBlock, _savedBounds.left, _savedBounds.top, Common::Rect(0, 0, _savedBlock.w, _savedBlock.h)); _savedBlock.free(); _savedBounds = Common::Rect(0, 0, 0, 0); } }
void ASurface::copyBlock(ASurface *src, const Common::Rect &bounds) { copyRectToSurface(*src, bounds.left, bounds.top, bounds); }
virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) { copyRectToSurface(_overlay, buf, pitch, x, y, w, h); }
virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { copyRectToSurface(_gameScreen, buf, pitch, x, y, w, h); }
virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) { const uint8_t *src = (const uint8_t*)buf; uint8_t *pix = (uint8_t*)_overlay.pixels; copyRectToSurface(pix, _overlay.pitch, src, pitch, x, y, w, h, _overlay.format.bytesPerPixel); }