From 340a3a4b92de5495b47e8e1e102178edfd97514f Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 19 Mar 2017 00:21:02 +0100 Subject: Night commit, added PhysicalBody, newImage to sprite --- main.lua | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'main.lua') diff --git a/main.lua b/main.lua index bbcf0e0..9180ebf 100644 --- a/main.lua +++ b/main.lua @@ -18,20 +18,6 @@ end function getRealScale() return math.max(1, math.max(love.graphics.getWidth() / 320, love.graphics.getHeight() / 180)) end --- Should be moved to Sprite metaclass (non-existent yet) -function newImage(path) - local imagedata = love.image.newImageData(path) - local transparency = function(x, y, r, g, b, a) - if (r == 0 and g == 128 and b == 64) or - (r == 0 and g == 240 and b == 6) then - a = 0 - end - return r, g, b, a - end - imagedata:mapPixel(transparency) - local image = love.graphics.newImage(imagedata) - return image -end -- Require require "not.World" -- cgit v1.1