[Scummvm-cvs-logs] SF.net SVN: scummvm:[52238] scummvm/trunk/engines/gob/draw.cpp

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Fri Aug 20 22:31:05 CEST 2010


Revision: 52238
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52238&view=rev
Author:   strangerke
Date:     2010-08-20 20:31:05 +0000 (Fri, 20 Aug 2010)

Log Message:
-----------
Fascination - (SylvainTV) Implement window traces

Modified Paths:
--------------
    scummvm/trunk/engines/gob/draw.cpp

Modified: scummvm/trunk/engines/gob/draw.cpp
===================================================================
--- scummvm/trunk/engines/gob/draw.cpp	2010-08-20 18:52:21 UTC (rev 52237)
+++ scummvm/trunk/engines/gob/draw.cpp	2010-08-20 20:31:05 UTC (rev 52238)
@@ -733,26 +733,24 @@
 }
 
 void Draw::winTrace(int16 left, int16 top, int16 width, int16 height) {
-	// TODO: Implement proper behavior for the trace of the Window. In short,
-	//  - drawline currently use the wrong surface, to be fixed
-	//  - dirtiedRect should be put after the 4 drawlines when the surface is fixed <- Not in 256 col version
-	//  - drawline should be replaced by a drawline with palette inversion
-	//  - Shift skipped as always set to zero (?)
-
-	int16 right, bottom;
-
-	right  = left + width  - 1;
-	bottom = top  + height - 1;
-
-// To be fixed : either wrong surface, or anything else, but crappy look.
-//	_vm->_video->drawLine(*_frontSurface, left,  top,    right, top,    0);
-//	_vm->_video->drawLine(*_frontSurface, left,  top,    left,  bottom, 0);
-//	_vm->_video->drawLine(*_frontSurface, left,  bottom, right, bottom, 0);
-//	_vm->_video->drawLine(*_frontSurface, right, top,    right, bottom, 0);
-
-// Not in 256 col version
-	_vm->_video->dirtyRectsAll();
-
+  int16 right, bottom;
+ 
+  right  = left + width  - 1;
+  bottom = top  + height - 1;
+ 
+ 
+  for(int32 x = left; x < right; x++ ) {
+    _frontSurface->getVidMem()[_frontSurface->getWidth() * top + x] = (128 + _frontSurface->getVidMem()[_frontSurface->getWidth() * top + x]) & 0xff;
+    _frontSurface->getVidMem()[_frontSurface->getWidth() * bottom + x] = (128 + _frontSurface->getVidMem()[_frontSurface->getWidth() * bottom + x]) & 0xff;
+  }
+ 
+  for(int32 y = top; y < bottom; y++ ) {
+    _frontSurface->getVidMem()[_frontSurface->getWidth() * y + left] = (128 + _frontSurface->getVidMem()[_frontSurface->getWidth() * y + left]) & 0xff;
+    _frontSurface->getVidMem()[_frontSurface->getWidth() * y + right] = (128 + _frontSurface->getVidMem()[_frontSurface->getWidth() * y + right]) & 0xff;
+  }
+ 
+  _vm->_video->dirtyRectsAll();
+  _vm->_video->retrace(true);
 }
 
 void Draw::handleWinBorder(int16 id) {


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