[Scummvm-cvs-logs] SF.net SVN: scummvm:[40397] scummvm/trunk/engines/sci/engine/kpathing.cpp
waltervn at users.sourceforge.net
waltervn at users.sourceforge.net
Sat May 9 02:32:06 CEST 2009
Revision: 40397
http://scummvm.svn.sourceforge.net/scummvm/?rev=40397&view=rev
Author: waltervn
Date: 2009-05-09 00:32:05 +0000 (Sat, 09 May 2009)
Log Message:
-----------
SCI: AvoidPath: another workaround for ECO.
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-05-08 23:10:25 UTC (rev 40396)
+++ scummvm/trunk/engines/sci/engine/kpathing.cpp 2009-05-09 00:32:05 UTC (rev 40397)
@@ -1239,7 +1239,7 @@
}
}
- // WORKAROUND: self-intersecting polygons in ECO, rooms 280 and 300
+ // WORKAROUND: self-intersecting polygons in ECO, rooms 221, 280 and 300
if ((size == 11) && (s->_gameName == "eco")) {
if ((KP_UINT(s->script_000->locals_block->locals[13]) == 300)
&& (read_point(list, is_reg_t, 10) == Common::Point(221, 0))) {
@@ -1254,6 +1254,18 @@
size = 10;
}
}
+ if ((size == 16) && (s->_gameName == "eco")) {
+ if ((KP_UINT(s->script_000->locals_block->locals[13]) == 221)
+ && (read_point(list, is_reg_t, 1) == Common::Point(419, 175))) {
+ debug(1, "Applying fix for self-intersecting polygon in ECO, room 221");
+ // Swap the first two points
+ poly->vertices.insertHead(new Vertex(read_point(list, is_reg_t, 1)));
+ poly->vertices.insertHead(new Vertex(read_point(list, is_reg_t, 0)));
+ size = 14;
+ assert(!is_reg_t);
+ list += 2 * POLY_POINT_SIZE;
+ }
+ }
for (i = 0; i < size; i++) {
Vertex *vertex = new Vertex(read_point(list, is_reg_t, i));
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