mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2026-01-07 19:52:40 +01:00
Update Photoshop.lua
This commit is contained in:
parent
1c8c0912be
commit
957eabcedb
@ -189,35 +189,27 @@ local function drawFromMassiv(clearScreenOrNot)
|
||||
if MasterPixels[i][j][3] ~= transparentSymbol then
|
||||
|
||||
--Оптимизация
|
||||
if j > 1 then
|
||||
if MasterPixels[i][j - 1][1] ~= MasterPixels[i][j][1] then
|
||||
gpu.setBackground(MasterPixels[i][j][1])
|
||||
end
|
||||
if MasterPixels[i][j - 1][2] ~= MasterPixels[i][j][2] then
|
||||
gpu.setForeground(MasterPixels[i][j][2])
|
||||
end
|
||||
else
|
||||
|
||||
if MasterPixels[i][j][1] ~= gpu.getBackground() then
|
||||
gpu.setBackground(MasterPixels[i][j][1])
|
||||
gpu.setForeground(MasterPixels[i][j][2])
|
||||
end
|
||||
|
||||
if MasterPixels[i][j][2] ~= gpu.getForeground() then
|
||||
gpu.setForeground(MasterPixels[i][j][1])
|
||||
end
|
||||
|
||||
gpu.set(x+j, y+i, MasterPixels[i][j][3])
|
||||
|
||||
else
|
||||
|
||||
--Оптимизация
|
||||
if j > 1 then
|
||||
if MasterPixels[i][j - 1][1] ~= MasterPixels[i][j][1] then
|
||||
gpu.setBackground(transparentBackground)
|
||||
end
|
||||
if MasterPixels[i][j - 1][2] ~= MasterPixels[i][j][2] then
|
||||
gpu.setForeground(transparentForeground)
|
||||
end
|
||||
else
|
||||
if transparentBackground ~= gpu.getBackground() then
|
||||
gpu.setBackground(transparentBackground)
|
||||
gpu.setForeground(transparentForeground)
|
||||
end
|
||||
|
||||
if transparentForeground ~= gpu.getForeground() then
|
||||
gpu.setForeground(transparentForeground)
|
||||
end
|
||||
|
||||
gpu.set(x+j, y+i, transparentSymbol)
|
||||
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user