Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("GIF")
- os.loadAPI("blittle")
- args = {...}
- local fileName, backgroundCol = args[1], colors.white
- local delay = 5
- local imgNum = 1
- local mon = peripheral.wrap("back")
- mon.setTextScale(0.5)
- mon.setCursorPos(1, 1)
- mon.setBackgroundColour(backgroundCol)
- mon.clear()
- local x, y = mon.getSize()
- local image = {}
- image[1] = blittle.shrink(GIF.toPaintutils(GIF.loadGIF(fileName)), backgroundCol)
- image[2] = blittle.shrink(GIF.toPaintutils(GIF.loadGIF(fileName)), backgroundCol)
- image[3] = blittle.shrink(GIF.toPaintutils(GIF.loadGIF(fileName)), backgroundCol)
- while true do
- imgNum = imgNum + 1
- if imgNum > 1 then
- imgNum = 1
- end
- blittle.draw(image[imgNum], math.floor((x-image[imgNum].width)/2)+1, math.floor((y-image[imgNum].height)/2)+1, mon)
- blittle.draw(image[imgNum], math.floor((x-image[imgNum].width)/2)+1, math.floor((y-image[imgNum].height)/2)+1)
- sleep(delay)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement