Advertisement
Zantag

adDisplay

Sep 9th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. adMonitor = {[1] = peripheral.wrap("monitor_17")}
  2. term.redirect(adMonitor)
  3. imgWidth = 39
  4. imgHeight = 19
  5.  
  6. img = paintutils.loadImage("ad1")
  7. function drawImg2(img, x,y, imgwidth, imgheight)
  8. curY = 0
  9. for yy = 1, imgheight do
  10. for xx = 1, imgwidth do
  11. local c = img[yy][xx]
  12. if (c == 0) then
  13. c = 15
  14. end
  15. paintutils.drawPixel(x+xx-1, y+curY, c)
  16. end
  17. curY = curY + 1
  18. end
  19. end
  20.  
  21. drawImg2(img, 1,1,imgWidth, imgHeight)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement