[Scummvm-cvs-logs] SF.net SVN: scummvm: [30685] scummvm/trunk/engines/parallaction/graphics. cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Mon Jan 28 19:15:06 CET 2008
Revision: 30685
http://scummvm.svn.sourceforge.net/scummvm/?rev=30685&view=rev
Author: peres001
Date: 2008-01-28 10:15:06 -0800 (Mon, 28 Jan 2008)
Log Message:
-----------
Made halfbrite work again.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/graphics.cpp
Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp 2008-01-28 18:10:16 UTC (rev 30684)
+++ scummvm/trunk/engines/parallaction/graphics.cpp 2008-01-28 18:15:06 UTC (rev 30685)
@@ -345,10 +345,18 @@
}
void Gfx::updateScreen() {
-#if 0
+
+ g_system->copyRectToScreen((const byte*)_buffers[kBit2]->pixels, _buffers[kBit2]->pitch, _screenX, _screenY, _vm->_screenWidth, _vm->_screenHeight);
+
+ Graphics::Surface *surf = g_system->lockScreen();
+ drawGfxObjects(*surf);
+ g_system->unlockScreen();
+
if (_halfbrite) {
+ // FIXME: the implementation of halfbrite is now largely sub-optimal in that a full screen
+ // rewrite is needed to apply the effect.
Graphics::Surface *surf = g_system->lockScreen();
- byte *src = (byte*)_buffers[kBitFront]->pixels;
+ byte *src = (byte*)_buffers[kBit2]->pixels;
byte *dst = (byte*)surf->pixels;
for (int i = 0; i < surf->w*surf->h; i++) {
*dst++ = *src++ | 0x20;
@@ -357,16 +365,8 @@
drawCircle(_hbCirclePos.x, _hbCirclePos.y, _hbCircleRadius, 0, &halfbritePixel, surf->pixels);
}
g_system->unlockScreen();
- } else {
- g_system->copyRectToScreen((const byte*)_buffers[kBitFront]->pixels, _buffers[kBitFront]->pitch, _screenX, _screenY, _vm->_screenWidth, _vm->_screenHeight);
}
-#endif
- g_system->copyRectToScreen((const byte*)_buffers[kBit2]->pixels, _buffers[kBit2]->pitch, _screenX, _screenY, _vm->_screenWidth, _vm->_screenHeight);
- Graphics::Surface *surf = g_system->lockScreen();
- drawGfxObjects(*surf);
- g_system->unlockScreen();
-
drawInventory();
drawItems();
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