[Scummvm-cvs-logs] SF.net SVN: scummvm:[40677] scummvm/trunk/engines/sci/engine/kgraphics.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon May 18 11:07:32 CEST 2009


Revision: 40677
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40677&view=rev
Author:   thebluegr
Date:     2009-05-18 09:07:31 +0000 (Mon, 18 May 2009)

Log Message:
-----------
Added a workaround for LSL6, thanks to waltervn's comments

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kgraphics.cpp

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-05-18 08:28:04 UTC (rev 40676)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-05-18 09:07:31 UTC (rev 40677)
@@ -2378,12 +2378,19 @@
 			return s->r_acc;
 		}
 
-		s->gfx_state->pic_port_bounds = gfx_rect(UKPV(5), UKPV(4),
-		        UKPV(3), UKPV(2));
+		// LSL6 calls kSetPort to extend the screen to draw the GUI. If we free all resources
+		// here, the background picture is freed too, and this makes everything a big mess.
+		// FIXME/TODO: This code really needs to be rewritten to conform to the original behavior
+		if (s->_gameName != "LSL6") {
+			s->gfx_state->pic_port_bounds = gfx_rect(UKPV(5), UKPV(4), UKPV(3), UKPV(2));
 
-		// FIXME: Should really only invalidate all loaded pic resources here;
-		// this is overkill
-		s->gfx_state->gfxResMan->freeAllResources();
+			// FIXME: Should really only invalidate all loaded pic resources here;
+			// this is overkill
+			s->gfx_state->gfxResMan->freeAllResources();
+		} else {
+			// WORKAROUND for LSL6
+			printf("SetPort case 6 called in LSL6. Origin: %d, %d - Clip rect: %d, %d, %d, %d\n", SKPV(0), SKPV(1), UKPV(2), UKPV(3), UKPV(4), UKPV(5));
+		}
 
 		break;
 	}


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