Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local func = table.unpack({...})
- local gpu = require("component").gpu
- local w, h = gpu.getResolution()
- local scr = {}
- for i = 1, w do
- scr[i] = {}
- for j = 1, h do
- scr[i][j] = {gpu.get(i, j)}
- end
- end
- func()
- for i = 1, w do
- for j = 1, h do
- local symbol = {gpu.get(i, j)}
- if symbol[1] ~= scr[i][j][1] or symbol[2] ~= scr[i][j][2] or symbol[3] ~= scr[i][j][3] then
- if gpu.getBackground ~= scr[i][j][3] then gpu.setBackground(scr[i][j][3]) end
- if gpu.getForeground ~= scr[i][j][2] then gpu.setForeground(scr[i][j][2]) end
- gpu.set(i, j, scr[i][j][1])
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement