diff --git a/widget/include/Cevo/CevoScreenTools.h b/widget/include/Cevo/CevoScreenTools.h index 7ca0df4..a2ea94b 100644 --- a/widget/include/Cevo/CevoScreenTools.h +++ b/widget/include/Cevo/CevoScreenTools.h @@ -106,6 +106,9 @@ constexpr int ySizeBig = 40; // black double-frame. void frameImage(Dpi::Canvas &canvas, Dpi::Bitmap &src, int x, int y, int width, int height, int xSrc, int ySrc, bool isControl = false); +// ScreenTools.pas's Dump(): a plain sprite-sheet blit with no mask/ +// transparency handling (unlike sprite()). +void dump(Dpi::Bitmap &dst, GraphicSet &graphicSet, int xDst, int yDst, int width, int height, int xGr, int yGr); // Colors palette row/column indices (Colors->image().pixelColor(col, row)). constexpr int clkAge0 = 1; diff --git a/widget/src/CevoScreenTools.cpp b/widget/src/CevoScreenTools.cpp index 67a37cd..a3fc18b 100644 --- a/widget/src/CevoScreenTools.cpp +++ b/widget/src/CevoScreenTools.cpp @@ -363,6 +363,11 @@ void frameImage(Dpi::Canvas &canvas, Dpi::Bitmap &src, int x, int y, int width, canvas.copyRect(QRect(x, y, width, height), src.canvas(), QRect(xSrc, ySrc, width, height)); } +void dump(Dpi::Bitmap &dst, GraphicSet &graphicSet, int xDst, int yDst, int width, int height, int xGr, int yGr) +{ + bitBltBitmap(dst, xDst, yDst, width, height, graphicSet.data, xGr, yGr); +} + void editFrame(Dpi::Canvas &canvas, const QRect &rect, const Texture &texture) { frame(canvas, rect.left() - 1, rect.top() - 1, rect.right(), rect.bottom(), Qt::black, Qt::black);