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

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Thu Jan 20 11:20:57 CET 2011


Revision: 55346
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55346&view=rev
Author:   drmccoy
Date:     2011-01-20 10:20:57 +0000 (Thu, 20 Jan 2011)

Log Message:
-----------
GOB: Urban: Fix missing visuals at Cemetary/Lab

Urban Runner decouples _frontSurface and
_spritesArray[kFrontSurface] at that screen... *sigh*

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

Modified: scummvm/trunk/engines/gob/draw.cpp
===================================================================
--- scummvm/trunk/engines/gob/draw.cpp	2011-01-20 07:29:45 UTC (rev 55345)
+++ scummvm/trunk/engines/gob/draw.cpp	2011-01-20 10:20:57 UTC (rev 55346)
@@ -329,6 +329,17 @@
 	_spritesArray[index]->clear();
 }
 
+void Draw::freeSprite(int16 index) {
+	assert(index < SPRITES_COUNT);
+
+	_spritesArray[index].reset();
+
+	if (index == kFrontSurface)
+		_spritesArray[index] = _frontSurface;
+	if (index == kBackSurface)
+		_spritesArray[index] = _backSurface;
+}
+
 void Draw::adjustCoords(char adjust, int16 *coord1, int16 *coord2) {
 	if (_needAdjust == 2)
 		return;
@@ -550,10 +561,12 @@
 		return;
 	if (_frontSurface == _backSurface)
 		return;
+	/*
 	if (_spritesArray[kFrontSurface] != _frontSurface)
 		return;
 	if (_spritesArray[kBackSurface] != _backSurface)
 		return;
+	*/
 
 	if (!backwards) {
 		_frontSurface->blit(*_backSurface);

Modified: scummvm/trunk/engines/gob/draw.h
===================================================================
--- scummvm/trunk/engines/gob/draw.h	2011-01-20 07:29:45 UTC (rev 55345)
+++ scummvm/trunk/engines/gob/draw.h	2011-01-20 10:20:57 UTC (rev 55346)
@@ -179,10 +179,7 @@
 	void dirtiedRect(SurfacePtr surface, int16 left, int16 top, int16 right, int16 bottom);
 
 	void initSpriteSurf(int16 index, int16 width, int16 height, int16 flags);
-	void freeSprite(int16 index) {
-		assert(index < SPRITES_COUNT);
-		_spritesArray[index].reset();
-	}
+	void freeSprite(int16 index);
 	void adjustCoords(char adjust, int16 *coord1, int16 *coord2);
 	void adjustCoords(char adjust, uint16 *coord1, uint16 *coord2) {
 		adjustCoords(adjust, (int16 *)coord1, (int16 *)coord2);

Modified: scummvm/trunk/engines/gob/inter_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v6.cpp	2011-01-20 07:29:45 UTC (rev 55345)
+++ scummvm/trunk/engines/gob/inter_v6.cpp	2011-01-20 10:20:57 UTC (rev 55346)
@@ -66,6 +66,7 @@
 	OPCODEFUNC(0x03, o6_loadCursor);
 	OPCODEFUNC(0x09, o6_assign);
 	OPCODEFUNC(0x19, o6_removeHotspot);
+	OPCODEFUNC(0x32, o1_copySprite);
 	OPCODEFUNC(0x33, o6_fillRect);
 }
 

Modified: scummvm/trunk/engines/gob/videoplayer.cpp
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.cpp	2011-01-20 07:29:45 UTC (rev 55345)
+++ scummvm/trunk/engines/gob/videoplayer.cpp	2011-01-20 10:20:57 UTC (rev 55346)
@@ -158,13 +158,20 @@
 					                          screenSize ? _vm->_height : video->decoder->getHeight(), 0);
 			}
 
-			if (!_vm->_draw->_spritesArray[properties.sprite]) {
+			if (!_vm->_draw->_spritesArray[properties.sprite] &&
+			    (properties.sprite != Draw::kFrontSurface) &&
+			    (properties.sprite != Draw::kBackSurface)) {
 				properties.sprite = -1;
 				video->surface.reset();
 				video->decoder->setSurfaceMemory();
 				properties.x = properties.y = 0;
 			} else {
 				video->surface = _vm->_draw->_spritesArray[properties.sprite];
+				if (properties.sprite == Draw::kFrontSurface)
+					video->surface = _vm->_draw->_frontSurface;
+				if (properties.sprite == Draw::kBackSurface)
+					video->surface = _vm->_draw->_backSurface;
+
 				video->decoder->setSurfaceMemory(video->surface->getData(),
 						video->surface->getWidth(), video->surface->getHeight(), video->surface->getBPP());
 


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