Turn some methods into functions (potentially gives better code, and we may want to move some of those into the graphics/ module one day)

svn-id: r15703
This commit is contained in:
Max Horn 2004-10-30 22:34:08 +00:00
parent 06c46fe423
commit 4126001b86
11 changed files with 39 additions and 63 deletions

View file

@ -285,10 +285,10 @@ int ObjectMap::draw(SURFACE *ds, const Point& imousePt, int color, int color2) {
clickarea = &object_map->clickareas[k];
if (clickarea->n_points == 2) {
// 2 points represent a box
_vm->_gfx->drawFrame(ds, &clickarea->points[0], &clickarea->points[1], draw_color);
drawFrame(ds, &clickarea->points[0], &clickarea->points[1], draw_color);
} else if (clickarea->n_points > 2) {
// Otherwise draw a polyline
_vm->_gfx->drawPolyLine(ds, clickarea->points, clickarea->n_points, draw_color);
drawPolyLine(ds, clickarea->points, clickarea->n_points, draw_color);
}
}
}
@ -332,7 +332,7 @@ int ObjectMap::hitTest(const Point& imousePt) {
}
} else if (n_points > 2) {
// Hit-test a polygon
if (_vm->_gfx->hitTestPoly(points, n_points, imouse)) {
if (hitTestPoly(points, n_points, imouse)) {
return object_map->objectNum;
}
}