diff options
author | Filippos Karapetis | 2009-10-21 14:13:08 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-10-21 14:13:08 +0000 |
commit | 1e4e76af0f231bc02871d36fae65810f6cf9a994 (patch) | |
tree | f0ede4ed62184bc52aa0b45e4f58accabd5eb628 /engines/sci/engine | |
parent | bb0cee730ef14cd347fca6a9da2942e755bef693 (diff) | |
download | scummvm-rg350-1e4e76af0f231bc02871d36fae65810f6cf9a994.tar.gz scummvm-rg350-1e4e76af0f231bc02871d36fae65810f6cf9a994.tar.bz2 scummvm-rg350-1e4e76af0f231bc02871d36fae65810f6cf9a994.zip |
Fixed self-intersecting pathfinding polygons in SQ1, room 66. This addresses the issue where Roger is able to walk anywhere on screen. However, there is still a separate issue in that room, which makes him stay stuck in one direction (like he's "moonwalking") and it only occurs in the new GUI
svn-id: r45307
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kpathing.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index b2d396c08a..adb5b0075b 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -1267,6 +1267,21 @@ static Polygon *convert_polygon(EngineState *s, reg_t polygon) { } for (i = skip; i < size; i++) { + if (size == 35 && (i == 20 || i == 21) && s->_gameName == "sq1sci" && + s->currentRoomNumber() == 66) { + if (i == 20 && read_point(segMan, points, 20) == Common::Point(0, 104)) { + debug(1, "Applying fix for self-intersecting polygon in SQ1, room 66"); + Vertex *vertex = new Vertex(Common::Point(1, 104)); + poly->vertices.insertHead(vertex); + continue; + } else if (i == 21 && read_point(segMan, points, 21) == Common::Point(0, 110)) { + debug(1, "Applying fix for self-intersecting polygon in SQ1, room 66"); + Vertex *vertex = new Vertex(Common::Point(1, 110)); + poly->vertices.insertHead(vertex); + continue; + } + } + Vertex *vertex = new Vertex(read_point(segMan, points, i)); poly->vertices.insertHead(vertex); } |