aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxgoff <antipotroast@gmail.com>2012-08-01 22:48:57 -0500
committerxgoff <antipotroast@gmail.com>2012-08-01 22:48:57 -0500
commitb299cfe8bee64d1d299e7382ba854f92fcbdbbc5 (patch)
tree41c021b23a86aeb03fd265616d36937a6ab53926
parent42448e56a204a61b612d07fac2d38733070c7a23 (diff)
downloadlove2d-fakecanvas-b299cfe8bee64d1d299e7382ba854f92fcbdbbc5.tar.gz
love2d-fakecanvas-b299cfe8bee64d1d299e7382ba854f92fcbdbbc5.tar.bz2
love2d-fakecanvas-b299cfe8bee64d1d299e7382ba854f92fcbdbbc5.tar.xz
love2d-fakecanvas-b299cfe8bee64d1d299e7382ba854f92fcbdbbc5.zip
might as well make these vararg functions
-rw-r--r--fakecanvas.lua13
1 files changed, 6 insertions, 7 deletions
diff --git a/fakecanvas.lua b/fakecanvas.lua
index 461c451..1647c3c 100644
--- a/fakecanvas.lua
+++ b/fakecanvas.lua
@@ -208,17 +208,17 @@ local _wrap_funcs = {
setCanvas = setCanvas,
newCanvas = Canvas,
- draw = function (obj, x, y, r, sw, sh, ox, oy, kx, ky)
+ draw = function (obj, ...)
if canvases[obj] then
- return _love_funcs.drawq(obj:_getImage(), obj:_getQuad(), x, y, r, sw, sh, ox, oy, kx, ky) -- flip texcoords part 2
+ return _love_funcs.drawq(obj:_getImage(), obj:_getQuad(), ...) -- flip texcoords part 2
end
- return _love_funcs.draw(obj, x, y, r, sw, sh, ox, oy, kx, ky)
+ return _love_funcs.draw(obj, ...)
end,
- drawq = function (obj, x, y, r, sw, sh, ox, oy, kx, ky)
+ drawq = function (obj, ...)
if canvases[obj] then
- return _love_funcs.drawq(obj:_getImage(), x, y, r, sw, sh, ox, oy, kx, ky)
+ return _love_funcs.drawq(obj:_getImage(), ...)
end
- return _love_funcs.drawq(obj, x, y, r, sw, sh, ox, oy, kx, ky)
+ return _love_funcs.drawq(obj, ...)
end,
pe_send = function (pe, name, data)
@@ -249,7 +249,6 @@ function M.enable (state)
love.graphics.getCanvas = function () return nil end
love.graphics.setCanvas = function () end
love.graphics.newCanvas = function () error("canvases disabled", 2) end
-
love.graphics.draw = _love_funcs.draw
love.graphics.drawq = _love_funcs.drawq