aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kpathing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine/kpathing.cpp')
-rw-r--r--engines/sci/engine/kpathing.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp
index 2895f4afb6..b19d6d7b8c 100644
--- a/engines/sci/engine/kpathing.cpp
+++ b/engines/sci/engine/kpathing.cpp
@@ -1285,6 +1285,12 @@ static Polygon *convert_polygon(EngineState *s, reg_t polygon) {
reg_t points = GET_SEL32(segMan, polygon, points);
int size = GET_SEL32(segMan, polygon, size).toUint16();
+#ifdef ENABLE_SCI32
+ // SCI32 stores the actual points in the data property of points (in a new array)
+ if (segMan->isHeapObject(points))
+ points = GET_SEL32(segMan, points, data);
+#endif
+
if (size == 0) {
// If the polygon has no vertices, we skip it
return NULL;