mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2026-01-10 05:02:40 +01:00
Update image.lua
This commit is contained in:
parent
a18bf92b41
commit
c3a530e53d
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user