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

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Sun Feb 7 00:06:49 CET 2010


Revision: 47947
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47947&view=rev
Author:   strangerke
Date:     2010-02-06 23:06:20 +0000 (Sat, 06 Feb 2010)

Log Message:
-----------
Fascination - Use invalidateRect instead of dirtiedRect, fix several other little errors

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

Modified: scummvm/trunk/engines/gob/draw.cpp
===================================================================
--- scummvm/trunk/engines/gob/draw.cpp	2010-02-06 22:54:20 UTC (rev 47946)
+++ scummvm/trunk/engines/gob/draw.cpp	2010-02-06 23:06:20 UTC (rev 47947)
@@ -882,7 +882,6 @@
 	// TODO: Implementation to be confirmed (used cut and paste from another part of the code)
 	Resource *resource;
 
-	warning("winDecomp");
 	resource = _vm->_game->_resources->getResource((uint16) _spriteLeft,
 	                                               &_spriteRight, &_spriteBottom);
 
@@ -907,6 +906,7 @@
 	int16 height;
 
 	warning("winDraw %d", fct);
+
 	bool found = false;
 	int len;
 	Resource *resource;
@@ -1045,8 +1045,8 @@
 		for (int i = 9; i >= j; i--) {
 			if (table[i])
 				_vm->_video->drawSprite(*_fascinWin[table[i]].savedSurface, *_spritesArray[_destSurface],
-										 _fascinWin[table[i]].left & 15, 0,
-										(_fascinWin[table[i]].left & 15) + _fascinWin[table[i]].width - 1,
+										 _fascinWin[table[i]].left & 7, 0,
+										(_fascinWin[table[i]].left & 7) + _fascinWin[table[i]].width - 1,
 										 _fascinWin[table[i]].height - 1, _fascinWin[table[i]].left - _spriteLeft + _destSpriteX,
 										 _fascinWin[table[i]].top - _spriteTop + _destSpriteY, 0);
 		}
@@ -1064,15 +1064,15 @@
 		for (int i = 9; i >= max; i--) {
 			if (table[i])
 				_vm->_video->drawSprite(*_fascinWin[table[i]].savedSurface, *tempSrf,
-										 _fascinWin[table[i]].left & 15, 0,
-										(_fascinWin[table[i]].left & 15) + _fascinWin[table[i]].width - 1,
+										 _fascinWin[table[i]].left & 7, 0,
+										(_fascinWin[table[i]].left & 7) + _fascinWin[table[i]].width - 1,
 										 _fascinWin[table[i]].height - 1,
 										 _fascinWin[table[i]].left  - left,
 										 _fascinWin[table[i]].top   - top , 0);
 		}
 
-		// NOTE: Strangerke not sure concerning the use of _destSurface
-		dirtiedRect(_destSurface, left, top, width, height);
+		invalidateRect(left, top, width, height);
+
 		switch (fct) {
 		case DRAW_BLITSURF:    // 0 - move
 			_vm->_video->drawSprite(*_spritesArray[_sourceSurface], *tempSrf,
@@ -1152,7 +1152,7 @@
 				int k = table[i];
 				_vm->_video->drawSprite(*tempSrf, *_fascinWin[k].savedSurface,
 										0, 0, width - left, height - top,
-										left - _fascinWin[k].left + (_fascinWin[k].left & 15),
+										left - _fascinWin[k].left + (_fascinWin[k].left & 7),
 										top  - _fascinWin[k].top, 0);
 				// Shift skipped as always set to zero (?)
 				_vm->_video->drawSprite(*_frontSurface, *tempSrf,
@@ -1171,10 +1171,10 @@
 						int l = table[j];
 						_vm->_video->drawSprite(*_fascinWin[l].savedSurface, *tempSrf,
 												MAX(_fascinWin[l].left, _fascinWin[k].left)
-												  - _fascinWin[l].left + (_fascinWin[l].left & 15),
+												  - _fascinWin[l].left + (_fascinWin[l].left & 7),
 												MAX(_fascinWin[l].top , _fascinWin[k].top ) - _fascinWin[l].top,
 												MIN(_fascinWin[l].left + _fascinWin[l].width  - 1, _fascinWin[k].left + _fascinWin[k].width - 1)
-												  - _fascinWin[l].left + (_fascinWin[l].left & 15),
+												  - _fascinWin[l].left + (_fascinWin[l].left & 7),
 												MIN(_fascinWin[l].top  + _fascinWin[l].height - 1, _fascinWin[k].top  + _fascinWin[k].height - 1)
 												  - _fascinWin[l].top,
 												MAX(_fascinWin[l].left, _fascinWin[k].left) - left,
@@ -1186,9 +1186,7 @@
 		_vm->_video->drawSprite(*tempSrf, *_backSurface, 0, 0, width - left, height - top, left, top, 0);
 		tempSrf.reset();
 	} else {
-		// NOTE: Strangerke not sure concerning the use of _destSurface
-
-		dirtiedRect(_destSurface, left, top, width, height);
+		invalidateRect(left, top, width, height);
 		switch (fct) {
 		case DRAW_BLITSURF:    // 0 - move
 			_vm->_video->drawSprite(*_spritesArray[_sourceSurface], *_backSurface,


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