Added a stub for kMergePoly, to avoid crashing in QFG1VGA after killing a monster

svn-id: r49288
This commit is contained in:
Filippos Karapetis 2010-05-28 10:45:20 +00:00
parent bea6ef4beb
commit 967d9ea308
3 changed files with 32 additions and 0 deletions

View File

@ -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, ".*"),

View File

@ -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);

View File

@ -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