aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/msurface.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-02-08 22:07:42 -0500
committerPaul Gilbert2015-02-08 22:07:42 -0500
commit5e00b39caec66e1c5626a89f207c26c577fd30d8 (patch)
treed8d81eb6a19754c031fd603b4f6af5810fd38878 /engines/mads/msurface.cpp
parentcbbd1a92192ad118897f645f1aa6e968bff01466 (diff)
downloadscummvm-rg350-5e00b39caec66e1c5626a89f207c26c577fd30d8.tar.gz
scummvm-rg350-5e00b39caec66e1c5626a89f207c26c577fd30d8.tar.bz2
scummvm-rg350-5e00b39caec66e1c5626a89f207c26c577fd30d8.zip
MADS: Implementing code for panning screen transitions
Diffstat (limited to 'engines/mads/msurface.cpp')
-rw-r--r--engines/mads/msurface.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/mads/msurface.cpp b/engines/mads/msurface.cpp
index 39824bac4b..d8d01f307c 100644
--- a/engines/mads/msurface.cpp
+++ b/engines/mads/msurface.cpp
@@ -485,7 +485,6 @@ void MSurface::scrollY(int yAmount) {
delete[] tempData;
}
-
void MSurface::translate(Common::Array<RGB6> &palette) {
for (int y = 0; y < this->h; ++y) {
byte *pDest = getBasePtr(0, y);
@@ -521,6 +520,20 @@ MSurface *MSurface::flipHorizontal() const {
return dest;
}
+void MSurface::copyRectTranslate(MSurface &srcSurface, const byte *paletteMap,
+ const Common::Point &destPos, const Common::Rect &srcRect) {
+ // Loop through the lines
+ for (int yCtr = 0; yCtr < srcRect.height(); ++yCtr) {
+ const byte *srcP = srcSurface.getBasePtr(srcRect.left, srcRect.top + yCtr);
+ byte *destP = getBasePtr(destPos.x, destPos.y + yCtr);
+
+ // Copy the line over
+ for (int xCtr = 0; xCtr < srcRect.width(); ++xCtr, ++srcP, ++destP) {
+ *destP = paletteMap[*srcP];
+ }
+ }
+}
+
/*------------------------------------------------------------------------*/
int DepthSurface::getDepth(const Common::Point &pt) {