diff options
author | Filippos Karapetis | 2010-05-28 10:45:20 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-05-28 10:45:20 +0000 |
commit | 967d9ea308342cbfb3c99904b5d6f1a0a3cd7ba0 (patch) | |
tree | 3cf014d93ac2add1650d4197fefb1def36de6c77 | |
parent | bea6ef4beb9ff55a848a76c2b33e32a9b3d9cdd9 (diff) | |
download | scummvm-rg350-967d9ea308342cbfb3c99904b5d6f1a0a3cd7ba0.tar.gz scummvm-rg350-967d9ea308342cbfb3c99904b5d6f1a0a3cd7ba0.tar.bz2 scummvm-rg350-967d9ea308342cbfb3c99904b5d6f1a0a3cd7ba0.zip |
Added a stub for kMergePoly, to avoid crashing in QFG1VGA after killing a monster
svn-id: r49288
-rw-r--r-- | engines/sci/engine/kernel.cpp | 1 | ||||
-rw-r--r-- | engines/sci/engine/kernel.h | 1 | ||||
-rw-r--r-- | engines/sci/engine/kpathing.cpp | 30 |
3 files changed, 32 insertions, 0 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 5527939950..50d79c432b 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -332,6 +332,7 @@ SciKernelFunction kfunct_mappers[] = { DEFUN("DoSync", kDoSync, ".*"), DEFUN("MemorySegment", kMemorySegment, "iri*"), DEFUN("Intersections", kIntersections, "iiiiriiiri"), + DEFUN("MergePoly", kMergePoly, "rli"), DEFUN("ResCheck", kResCheck, "iii*"), DEFUN("SetQuitStr", kSetQuitStr, "r"), DEFUN("ShowMovie", kShowMovie, ".*"), diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 7717743e19..8f8f34f74e 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -414,6 +414,7 @@ reg_t kDoAudio(EngineState *s, int argc, reg_t *argv); reg_t kDoSync(EngineState *s, int argc, reg_t *argv); reg_t kMemorySegment(EngineState *s, int argc, reg_t *argv); reg_t kIntersections(EngineState *s, int argc, reg_t *argv); +reg_t kMergePoly(EngineState *s, int argc, reg_t *argv); reg_t kResCheck(EngineState *s, int argc, reg_t *argv); reg_t kSetQuitStr(EngineState *s, int argc, reg_t *argv); reg_t kShowMovie(EngineState *s, int argc, reg_t *argv); diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index 1152addeba..276d0df133 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -1694,4 +1694,34 @@ reg_t kIntersections(EngineState *s, int argc, reg_t *argv) { } } +reg_t kMergePoly(EngineState *s, int argc, reg_t *argv) { + // 3 parameters: raw polygon data, polygon list, list size + reg_t polygonData = argv[0]; + + // TODO: actually merge the polygon + +#if 0 + List *list = s->_segMan->lookupList(argv[1]); + Node *node = s->_segMan->lookupNode(list->first); + // List size is not needed + + Polygon *polygon; + int count = 0; + + while (node) { + polygon = convert_polygon(s, node->value); + + if (polygon) { + count += GET_SEL32V(s->_segMan, node->value, SELECTOR(size)); + } + + node = s->_segMan->lookupNode(node->succ); + } +#endif + + warning("Stub: kMergePoly"); + + return polygonData; +} + } // End of namespace Sci |