diff options
author | Aki <nthirtyone@gmail.com> | 2017-03-19 00:21:02 +0100 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-03-19 00:21:02 +0100 |
commit | 340a3a4b92de5495b47e8e1e102178edfd97514f (patch) | |
tree | 62e528b45c90affd4339942a8911fe51137ad963 /main.lua | |
parent | c16c1206f5884614157b8f5049e601ff77478d7f (diff) | |
download | roflnauts-340a3a4b92de5495b47e8e1e102178edfd97514f.zip roflnauts-340a3a4b92de5495b47e8e1e102178edfd97514f.tar.gz roflnauts-340a3a4b92de5495b47e8e1e102178edfd97514f.tar.bz2 |
Night commit, added PhysicalBody, newImage to sprite
Diffstat (limited to 'main.lua')
-rw-r--r-- | main.lua | 14 |
1 files changed, 0 insertions, 14 deletions
@@ -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" |