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

waltervn at users.sourceforge.net waltervn at users.sourceforge.net
Tue Mar 24 22:03:50 CET 2009


Revision: 39674
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39674&view=rev
Author:   waltervn
Date:     2009-03-24 21:03:50 +0000 (Tue, 24 Mar 2009)

Log Message:
-----------
SCI: Added workaround for broken polygon in LSL1 room 350.

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

Modified: scummvm/trunk/engines/sci/engine/kpathing.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kpathing.cpp	2009-03-24 19:56:41 UTC (rev 39673)
+++ scummvm/trunk/engines/sci/engine/kpathing.cpp	2009-03-24 21:03:50 UTC (rev 39674)
@@ -1192,6 +1192,17 @@
 	Polygon *poly = new Polygon(KP_UINT(GET_SEL32(polygon, type)));
 	int is_reg_t = polygon_is_reg_t(list, size);
 
+	// WORKAROUND: broken polygon in LSL1VGA, room 350, after opening elevator
+	// Polygon has 17 points but size is set to 19
+	if ((strcmp(s->game_name, "LSL1") == 0)) {
+		// FIXME: implement function to get current room number
+		if ((KP_UINT(s->script_000->locals_block->locals[13]) == 350)
+		&& (size == 19) && (read_point(list, is_reg_t, 18) == Common::Point(108, 137))) {
+			debug(1, "Applying fix for broken polygon in LSL1, room 350");
+			size = 17;
+		}
+	}
+
 	for (i = 0; i < size; i++) {
 		Vertex *vertex = new Vertex(read_point(list, is_reg_t, i));
 		poly->vertices.insertHead(vertex);


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