aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kpathing.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp
index a93cc8d44d..13830fba3d 100644
--- a/engines/sci/engine/kpathing.cpp
+++ b/engines/sci/engine/kpathing.cpp
@@ -1239,7 +1239,7 @@ static Polygon *convert_polygon(EngineState *s, reg_t polygon) {
}
}
- // 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 @@ static Polygon *convert_polygon(EngineState *s, reg_t polygon) {
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));