Advertisement
Guest User

Untitled

a guest
Mar 1st, 2014
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. local function saveWin(x, y, w, h)
  2. local winCol = {}
  3. local winRow = {}
  4. for a = 1, h do
  5. for b = 1, w do
  6. winCol[b] = gpu.get((x + b) - 1, (y + a) - 1)
  7. end
  8. winRow[a] = table.concat(winCol)
  9. end
  10. return winRow
  11. end
  12.  
  13. local function restoreWin(x, y, wind)
  14. for a = 1, #wind do
  15. gpu.set(x, (y + a) - 1, wind[a])
  16. end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement