Screen = require("screen") x = -100 y = -170 function _init() sys.stepinterval(1000 / 60) scrn = Screen:new("Swing Tut", 10, 5) img = image.load(_DIR .. "images/pharao.gif", 1)[1] width, height = image.size(img) scrn:usepalette(img) end function _step(t) sx = 2 * math.sin(t / 1000) sy = 2 * math.sin(t / 1100) image.draw(img, 160 - (width * sx / 2), 90 - height * sy / 2, 0, 0, width * sx, height * sy, width, height) if input.hotkey() == "q" then sys.exit(0) end scrn:step() end