aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kpathing.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-22 18:33:19 +0000
committerFilippos Karapetis2010-06-22 18:33:19 +0000
commit56bf0c0e635383929704ba12df3808f39aeb697e (patch)
tree05d44a811f40ab94255a9227971217ee1d1e5f09 /engines/sci/engine/kpathing.cpp
parent78fb62bcdf8c54a4c6024aa160641f6a196ebcf4 (diff)
downloadscummvm-rg350-56bf0c0e635383929704ba12df3808f39aeb697e.tar.gz
scummvm-rg350-56bf0c0e635383929704ba12df3808f39aeb697e.tar.bz2
scummvm-rg350-56bf0c0e635383929704ba12df3808f39aeb697e.zip
Fixed kMergePoly after discussing with waltervn so that it correctly returns a pointer to an empty (for now) polygon array. This means that you can walk over enemy bodies after killing them in QFG1VGA, but at least it fixes the crashes after killing monsters
svn-id: r50160
Diffstat (limited to 'engines/sci/engine/kpathing.cpp')
-rw-r--r--engines/sci/engine/kpathing.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp
index 8988aa5734..ba6fb9bb6e 100644
--- a/engines/sci/engine/kpathing.cpp
+++ b/engines/sci/engine/kpathing.cpp
@@ -1739,14 +1739,9 @@ reg_t kIntersections(EngineState *s, int argc, reg_t *argv) {
* is in QFG1VGA, after killing any monster.
*/
reg_t kMergePoly(EngineState *s, int argc, reg_t *argv) {
+#if 0
// 3 parameters: raw polygon data, polygon list, list size
reg_t polygonData = argv[0];
-
- // TODO: actually merge the polygon
- // In QFG1VGA, there are no immediately visible side-effects
- // of this being a stub.
-
-#if 0
List *list = s->_segMan->lookupList(argv[1]);
Node *node = s->_segMan->lookupNode(list->first);
// List size is not needed
@@ -1765,9 +1760,14 @@ reg_t kMergePoly(EngineState *s, int argc, reg_t *argv) {
}
#endif
+ // TODO: actually merge the polygon. We return an empty polygon for now.
+ // In QFG1VGA, you can walk over enemy bodies after killing them, since
+ // this is a stub.
+ reg_t output = allocateOutputArray(s->_segMan, 1);
+ SegmentRef arrayRef = s->_segMan->dereference(output);
+ writePoint(arrayRef, 0, Common::Point(POLY_LAST_POINT, POLY_LAST_POINT));
warning("Stub: kMergePoly");
-
- return polygonData;
+ return output;
}
} // End of namespace Sci