Commits

vrld  committed 6898619

Transformation tables are unlövely

  • Participants
  • Parent commits 8750ce4

Comments (0)

Files changed (2)

File src/scripts/graphics.lua

 		love.graphics.printf = love.graphics.printf1
 	end
 
-
-	local function unpack_transform(transform, ...)
-		if type(transform) ~= "table" then
-			return transform, ...
-		end
-
-		local r = transform.rot or transform.r or 0
-		local sx = transform.sx or transform.scale or 1
-		local sy = transform.sy or transform.scale or 1
-		local ox, oy = transform.ox or 0, transform.oy or 0
-		local kx, ky = transform.kx or 0, transform.ky or 0
-
-		return r,sx,sy,ox,oy,kx,ky
-	end
-
-	local draw = love.graphics.draw
-	function love.graphics.draw(drawable, x, y, ...)
-		return draw(drawable, x, y, unpack_transform(...))
-	end
-
-	local drawq = love.graphics.drawq
-	function love.graphics.drawq(img, quad, x, y, ...)
-		return drawq(img, quad, x, y, unpack_transform(...))
-	end
-
-	local lgprint = love.graphics.print1 -- << notice the 1
-	function love.graphics.print1(text, x,y, ...)
-		return lgprint(text, x,y, unpack_transform(...))
-	end
-
-	local newSpritebatch = love.graphics.newSpriteBatch
-	function love.graphics.newSpriteBatch(image, size)
-		local sb = newSpritebatch(image, size)
-		local meta = getmetatable(sb)
-
-		local add = meta.add
-		function meta:add(x,y, ...)
-			return add(self, x,y, unpack_transform(...))
-		end
-
-		local addq = meta.addq
-		function meta:addq(quad, x,y, ...)
-			return addq(self, quad, x,y, unpack_transform(...))
-		end
-
-		love.graphics.newSpriteBatch = newSpritebatch
-		return sb
-	end
 end

File src/scripts/graphics.lua.h

 	0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 
 	0x69, 0x6e, 0x74, 0x66, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 
 	0x63, 0x73, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x66, 0x31, 0x0a,
-	0x09, 0x65, 0x6e, 0x64, 0x0a,0x0a,0x0a,
-	0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x75, 0x6e, 
-	0x70, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x28, 0x74, 0x72, 0x61, 
-	0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a,
-	0x09, 0x09, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 
-	0x6d, 0x29, 0x20, 0x7e, 0x3d, 0x20, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
-	0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 
-	0x6d, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x0a,
-	0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,0x0a,
-	0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 
-	0x6f, 0x72, 0x6d, 0x2e, 0x72, 0x6f, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 
-	0x72, 0x6d, 0x2e, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x30, 0x0a,
-	0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x78, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 
-	0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x73, 0x78, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 
-	0x72, 0x6d, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x31, 0x0a,
-	0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x79, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 
-	0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x73, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 
-	0x72, 0x6d, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x31, 0x0a,
-	0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6f, 0x78, 0x2c, 0x20, 0x6f, 0x79, 0x20, 0x3d, 0x20, 0x74, 
-	0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x6f, 0x78, 0x20, 0x6f, 0x72, 0x20, 0x30, 0x2c, 0x20, 
-	0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x6f, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x30, 0x0a,
-	0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6b, 0x78, 0x2c, 0x20, 0x6b, 0x79, 0x20, 0x3d, 0x20, 0x74, 
-	0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x6b, 0x78, 0x20, 0x6f, 0x72, 0x20, 0x30, 0x2c, 0x20, 
-	0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x6b, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x30, 0x0a,0x0a,
-	0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x2c, 0x73, 0x78, 0x2c, 0x73, 0x79, 0x2c, 0x6f, 
-	0x78, 0x2c, 0x6f, 0x79, 0x2c, 0x6b, 0x78, 0x2c, 0x6b, 0x79, 0x0a,
 	0x09, 0x65, 0x6e, 0x64, 0x0a,0x0a,
-	0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x64, 0x72, 0x61, 0x77, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 0x65, 
-	0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x64, 0x72, 0x61, 0x77, 0x0a,
-	0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 
-	0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x64, 0x72, 0x61, 0x77, 0x28, 0x64, 0x72, 0x61, 0x77, 0x61, 0x62, 0x6c, 
-	0x65, 0x2c, 0x20, 0x78, 0x2c, 0x20, 0x79, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a,
-	0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x64, 0x72, 0x61, 0x77, 0x28, 0x64, 0x72, 0x61, 0x77, 
-	0x61, 0x62, 0x6c, 0x65, 0x2c, 0x20, 0x78, 0x2c, 0x20, 0x79, 0x2c, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 
-	0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x28, 0x2e, 0x2e, 0x2e, 0x29, 0x29, 0x0a,
-	0x09, 0x65, 0x6e, 0x64, 0x0a,0x0a,
-	0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x64, 0x72, 0x61, 0x77, 0x71, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 
-	0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x64, 0x72, 0x61, 0x77, 0x71, 0x0a,
-	0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 
-	0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x64, 0x72, 0x61, 0x77, 0x71, 0x28, 0x69, 0x6d, 0x67, 0x2c, 0x20, 0x71, 
-	0x75, 0x61, 0x64, 0x2c, 0x20, 0x78, 0x2c, 0x20, 0x79, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a,
-	0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x64, 0x72, 0x61, 0x77, 0x71, 0x28, 0x69, 0x6d, 0x67, 
-	0x2c, 0x20, 0x71, 0x75, 0x61, 0x64, 0x2c, 0x20, 0x78, 0x2c, 0x20, 0x79, 0x2c, 0x20, 0x75, 0x6e, 0x70, 0x61, 
-	0x63, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x28, 0x2e, 0x2e, 0x2e, 0x29, 0x29, 0x0a,
-	0x09, 0x65, 0x6e, 0x64, 0x0a,0x0a,
-	0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x67, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x6c, 
-	0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 
-	0x31, 0x20, 0x2d, 0x2d, 0x20, 0x3c, 0x3c, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 
-	0x20, 0x31, 0x0a,
-	0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 
-	0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x31, 0x28, 0x74, 0x65, 0x78, 0x74, 0x2c, 
-	0x20, 0x78, 0x2c, 0x79, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a,
-	0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x67, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x28, 0x74, 
-	0x65, 0x78, 0x74, 0x2c, 0x20, 0x78, 0x2c, 0x79, 0x2c, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x5f, 0x74, 
-	0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x28, 0x2e, 0x2e, 0x2e, 0x29, 0x29, 0x0a,
-	0x09, 0x65, 0x6e, 0x64, 0x0a,0x0a,
-	0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6e, 0x65, 0x77, 0x53, 0x70, 0x72, 0x69, 0x74, 0x65, 0x62, 0x61, 
-	0x74, 0x63, 0x68, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 
-	0x73, 0x2e, 0x6e, 0x65, 0x77, 0x53, 0x70, 0x72, 0x69, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x0a,
-	0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 
-	0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x6e, 0x65, 0x77, 0x53, 0x70, 0x72, 0x69, 0x74, 0x65, 0x42, 0x61, 0x74, 
-	0x63, 0x68, 0x28, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x29, 0x0a,
-	0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x62, 0x20, 0x3d, 0x20, 0x6e, 0x65, 0x77, 0x53, 0x70, 
-	0x72, 0x69, 0x74, 0x65, 0x62, 0x61, 0x74, 0x63, 0x68, 0x28, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x73, 
-	0x69, 0x7a, 0x65, 0x29, 0x0a,
-	0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x74, 
-	0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x73, 0x62, 0x29, 0x0a,0x0a,
-	0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x64, 0x64, 0x20, 0x3d, 0x20, 0x6d, 0x65, 0x74, 0x61, 
-	0x2e, 0x61, 0x64, 0x64, 0x0a,
-	0x09, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x3a, 0x61, 0x64, 
-	0x64, 0x28, 0x78, 0x2c, 0x79, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a,
-	0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x28, 0x73, 0x65, 0x6c, 0x66, 
-	0x2c, 0x20, 0x78, 0x2c, 0x79, 0x2c, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x6e, 
-	0x73, 0x66, 0x6f, 0x72, 0x6d, 0x28, 0x2e, 0x2e, 0x2e, 0x29, 0x29, 0x0a,
-	0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,0x0a,
-	0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x64, 0x64, 0x71, 0x20, 0x3d, 0x20, 0x6d, 0x65, 0x74, 
-	0x61, 0x2e, 0x61, 0x64, 0x64, 0x71, 0x0a,
-	0x09, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x3a, 0x61, 0x64, 
-	0x64, 0x71, 0x28, 0x71, 0x75, 0x61, 0x64, 0x2c, 0x20, 0x78, 0x2c, 0x79, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a,
-	0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x71, 0x28, 0x73, 0x65, 0x6c, 
-	0x66, 0x2c, 0x20, 0x71, 0x75, 0x61, 0x64, 0x2c, 0x20, 0x78, 0x2c, 0x79, 0x2c, 0x20, 0x75, 0x6e, 0x70, 0x61, 
-	0x63, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x28, 0x2e, 0x2e, 0x2e, 0x29, 0x29, 0x0a,
-	0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,0x0a,
-	0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x6e, 0x65, 
-	0x77, 0x53, 0x70, 0x72, 0x69, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x20, 0x3d, 0x20, 0x6e, 0x65, 0x77, 
-	0x53, 0x70, 0x72, 0x69, 0x74, 0x65, 0x62, 0x61, 0x74, 0x63, 0x68, 0x0a,
-	0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x62, 0x0a,
-	0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x65, 0x6e, 0x64, 0x0a,
 }; // [graphics.lua]
 } // love