summaryrefslogtreecommitdiff
path: root/src/cat/LuaScriptInterface.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-02 23:52:24 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-02 23:52:46 (GMT)
commit96132ee1c135b18a5a860ab3e1e3cd15fc90545b (patch)
tree4682c88ef55cf5c6c9e56dea03dfcc4eedeac47a /src/cat/LuaScriptInterface.cpp
parentb16561926625e92dc3525664e71890d8239ab8c3 (diff)
downloadpowder-96132ee1c135b18a5a860ab3e1e3cd15fc90545b.zip
powder-96132ee1c135b18a5a860ab3e1e3cd15fc90545b.tar.gz
Stop returning luaL_error from drawing functions for no reason, addresses
issue #29
Diffstat (limited to 'src/cat/LuaScriptInterface.cpp')
-rw-r--r--src/cat/LuaScriptInterface.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp
index 7b98fa3..edd111f 100644
--- a/src/cat/LuaScriptInterface.cpp
+++ b/src/cat/LuaScriptInterface.cpp
@@ -1518,7 +1518,7 @@ int luatpt_drawrect(lua_State* l)
if (a<0) a = 0;
if (a>255) a = 255;
luacon_g->drawrect(x, y, w, h, r, g, b, a);
- return luaL_error(l, "Screen buffer does not exist");
+ return 0;
}
int luatpt_fillrect(lua_State* l)
@@ -1548,7 +1548,7 @@ int luatpt_fillrect(lua_State* l)
if (a<0) a = 0;
if (a>255) a = 255;
luacon_g->fillrect(x, y, w, h, r, g, b, a);
- return luaL_error(l, "Screen buffer does not exist");
+ return 0;
}
int luatpt_drawline(lua_State* l)
@@ -1573,7 +1573,7 @@ int luatpt_drawline(lua_State* l)
if (a<0) a = 0;
if (a>255) a = 255;
luacon_g->draw_line(x1, y1, x2, y2, r, g, b, a);
- return luaL_error(l, "Screen buffer does not exist");
+ return 0;
}
int luatpt_textwidth(lua_State* l)