diff options
-rw-r--r-- | engines/parallaction/graphics.cpp | 10 | ||||
-rw-r--r-- | engines/parallaction/graphics.h | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 2e7d79c37c..95e36cbd69 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -280,7 +280,7 @@ void Gfx::setHalfbriteMode(bool enable) { } void Gfx::updateScreen() { - g_system->copyRectToScreen((const byte*)_buffers[kBitFront]->pixels, _vm->_screenWidth, 0, 0, _vm->_screenWidth, _vm->_screenHeight); + g_system->copyRectToScreen((const byte*)_buffers[kBitFront]->pixels, _buffers[kBitFront]->pitch, _screenX, _screenY, _vm->_screenWidth, _vm->_screenHeight); g_system->updateScreen(); return; } @@ -695,6 +695,10 @@ void Gfx::restoreBackground(const Common::Rect& r) { void Gfx::setBackground(Graphics::Surface *surface) { _buffers[kBit2] = surface; + + _buffers[kBitFront]->create(surface->w, surface->h, 1); + _buffers[kBitBack]->create(surface->w, surface->h, 1); + copyScreen(kBit2, kBitBack); } @@ -778,13 +782,15 @@ Gfx::Gfx(Parallaction* vm) : _buffers[kBitFront]->create(_vm->_screenWidth, _vm->_screenHeight, 1); _buffers[kBitBack] = new Graphics::Surface; _buffers[kBitBack]->create(_vm->_screenWidth, _vm->_screenHeight, 1); - _buffers[kBit2] = 0; _depthMask = 0; setPalette(_palette); + _screenX = 0; + _screenY = 0; + _bgLayers[0] = _bgLayers[1] = _bgLayers[2] = _bgLayers[3] = 0; memset(_palettefx, 0, sizeof(_palettefx)); diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h index a830b9b2c9..5125e09b04 100644 --- a/engines/parallaction/graphics.h +++ b/engines/parallaction/graphics.h @@ -241,6 +241,9 @@ public: PaletteFxRange _palettefx[6]; Palette _palette; + uint _screenX; // scrolling position + uint _screenY; + protected: Parallaction* _vm; Graphics::Surface *_buffers[NUM_BUFFERS]; |