diff options
Diffstat (limited to 'engines/mads/msurface.cpp')
-rw-r--r-- | engines/mads/msurface.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/mads/msurface.cpp b/engines/mads/msurface.cpp index 5d1e948f77..4fae799c28 100644 --- a/engines/mads/msurface.cpp +++ b/engines/mads/msurface.cpp @@ -494,6 +494,16 @@ void MSurface::translate(Common::Array<RGB6> &palette) { } } +void MSurface::translate(byte map[PALETTE_COUNT]) { + for (int y = 0; y < this->h; ++y) { + byte *pDest = getBasePtr(0, y); + + for (int x = 0; x < this->w; ++x, ++pDest) { + *pDest = map[*pDest]; + } + } +} + MSurface *MSurface::flipHorizontal() const { MSurface *dest = new MSurface(this->w, this->h); |