[Scummvm-cvs-logs] SF.net SVN: scummvm: [28538] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sun Aug 12 10:26:20 CEST 2007
Revision: 28538
http://scummvm.svn.sourceforge.net/scummvm/?rev=28538&view=rev
Author: peres001
Date: 2007-08-12 01:26:20 -0700 (Sun, 12 Aug 2007)
Log Message:
-----------
Added very basic support for backgrounds larger than screen:
- background surfaces are now reallocated for every location
- screen is copied according to _scrollX/Y position
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/graphics.cpp
scummvm/trunk/engines/parallaction/graphics.h
Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp 2007-08-11 21:08:08 UTC (rev 28537)
+++ scummvm/trunk/engines/parallaction/graphics.cpp 2007-08-12 08:26:20 UTC (rev 28538)
@@ -280,7 +280,7 @@
}
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::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 @@
_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));
Modified: scummvm/trunk/engines/parallaction/graphics.h
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.h 2007-08-11 21:08:08 UTC (rev 28537)
+++ scummvm/trunk/engines/parallaction/graphics.h 2007-08-12 08:26:20 UTC (rev 28538)
@@ -241,6 +241,9 @@
PaletteFxRange _palettefx[6];
Palette _palette;
+ uint _screenX; // scrolling position
+ uint _screenY;
+
protected:
Parallaction* _vm;
Graphics::Surface *_buffers[NUM_BUFFERS];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list