aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kpathing.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2010-01-03 05:29:30 +0000
committerMatthew Hoops2010-01-03 05:29:30 +0000
commit986a75b7ee11ef74746a9291c469016dec5dd764 (patch)
tree9554ed5f14dcc0add67ee6dd87a65256355f1a84 /engines/sci/engine/kpathing.cpp
parent7d5e91337e31f89b28a85b65ce09d88b0e698040 (diff)
downloadscummvm-rg350-986a75b7ee11ef74746a9291c469016dec5dd764.tar.gz
scummvm-rg350-986a75b7ee11ef74746a9291c469016dec5dd764.tar.bz2
scummvm-rg350-986a75b7ee11ef74746a9291c469016dec5dd764.zip
Implement kInPolygon for SCI32. GK1 now responds when you click on things.
svn-id: r46918
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;