aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/math
diff options
context:
space:
mode:
authorFilippos Karapetis2011-01-28 20:52:52 +0000
committerFilippos Karapetis2011-01-28 20:52:52 +0000
commit42670975acf72ca52bbf73c0f0c0295b07c0a50a (patch)
tree2239c83e7e97900c0b211fef8550bf1fbfa7ee49 /engines/sword25/math
parentcfca829e46d40381142c5f024d7f3c555a34564f (diff)
downloadscummvm-rg350-42670975acf72ca52bbf73c0f0c0295b07c0a50a.tar.gz
scummvm-rg350-42670975acf72ca52bbf73c0f0c0295b07c0a50a.tar.bz2
scummvm-rg350-42670975acf72ca52bbf73c0f0c0295b07c0a50a.zip
SWORD25: Removed a lot of debug/unimplemented/unused functions
svn-id: r55600
Diffstat (limited to 'engines/sword25/math')
-rw-r--r--engines/sword25/math/geometry_script.cpp47
1 files changed, 7 insertions, 40 deletions
diff --git a/engines/sword25/math/geometry_script.cpp b/engines/sword25/math/geometry_script.cpp
index 15b1aadac1..6562a0f0a5 100644
--- a/engines/sword25/math/geometry_script.cpp
+++ b/engines/sword25/math/geometry_script.cpp
@@ -359,45 +359,6 @@ static int r_setY(lua_State *L) {
return 0;
}
-static void drawPolygon(const Polygon &polygon, uint color, const Vertex &offset) {
- GraphicEngine *pGE = Kernel::getInstance()->getGfx();
- assert(pGE);
-
- for (int i = 0; i < polygon.vertexCount - 1; i++)
- pGE->drawDebugLine(polygon.vertices[i] + offset, polygon.vertices[i + 1] + offset, color);
-
- pGE->drawDebugLine(polygon.vertices[polygon.vertexCount - 1] + offset, polygon.vertices[0] + offset, color);
-}
-
-static void drawRegion(const Region &region, uint color, const Vertex &offset) {
- drawPolygon(region.getContour(), color, offset);
- for (int i = 0; i < region.getHoleCount(); i++)
- drawPolygon(region.getHole(i), color, offset);
-}
-
-static int r_draw(lua_State *L) {
- Region *pR = checkRegion(L);
- assert(pR);
-
- switch (lua_gettop(L)) {
- case 3: {
- Vertex offset;
- Vertex::luaVertexToVertex(L, 3, offset);
- drawRegion(*pR, GraphicEngine::luaColorToARGBColor(L, 2), offset);
- }
- break;
-
- case 2:
- drawRegion(*pR, GraphicEngine::luaColorToARGBColor(L, 2), Vertex(0, 0));
- break;
-
- default:
- drawRegion(*pR, BS_RGB(255, 255, 255), Vertex(0, 0));
- }
-
- return 0;
-}
-
static int r_getCentroid(lua_State *L) {
Region *RPtr = checkRegion(L);
assert(RPtr);
@@ -414,6 +375,12 @@ static int r_delete(lua_State *L) {
return 0;
}
+// Marks a function that should never be used
+static int dummyFuncError(lua_State *L) {
+ error("Dummy function invoked by LUA");
+ return 1;
+}
+
static const luaL_reg REGION_METHODS[] = {
{"SetPos", r_setPos},
{"SetX", r_setX},
@@ -423,7 +390,7 @@ static const luaL_reg REGION_METHODS[] = {
{"GetX", r_getX},
{"GetY", r_getY},
{"IsValid", r_isValid},
- {"Draw", r_draw},
+ {"Draw", dummyFuncError},
{"GetCentroid", r_getCentroid},
{0, 0}
};