Update image.lua

This commit is contained in:
Igor Timofeev 2015-08-29 23:03:14 +03:00
parent a18bf92b41
commit c3a530e53d

View File

@ -352,34 +352,6 @@ function image.draw(x, y, kartinka)
end
end
function image.rememberOldPixels(x, y, x2, y2)
local oldPixels = {}
oldPixels.x = x
oldPixels.y = y
oldPixels.image = {}
local xCounter, yCounter = 1, 1
for j = y, y2 do
xCounter = 1
oldPixels.image[j] = {}
for i = x, x2 do
local symbol, fore, back = gpu.get(xCounter, yCounter)
oldPixels.image[j][i] = { back, fore, symbol }
symbol, fore, back = nil, nil, nil
xCounter = xCounter + 1
end
yCounter = yCounter + 1
end
xCounter, yCounter = nil, nil
return oldPixels
end
function image.drawOldPixels(oldPixels)
drawPNG(oldPixels.x, oldPixels.y, convertImagetoGroupedImage(oldPixels.image))
end
---------------------------------------------------------------------------------------------------------------------
-- ecs.prepareToExit()